Constrain variadic constructor to ranks > 1 and add missing __device__s

This commit is contained in:
Alex Voicu committed 2018-07-17 17:18:45 +01:00
1 vanhempi 502ce06dda
commit 96aa6e22ee
2 files changed
+4 -1

No files matched your search

@@ -120,7 +120,8 @@ THE SOFTWARE.
}
template< // TODO: constrain based on type as well.
typename... Us,
typename std::enable_if<sizeof...(Us) == rank>::type* = nullptr>
typename std::enable_if<
(rank > 1) && sizeof...(Us) == rank>::type* = nullptr>
__host__ __device__
HIP_vector_type(Us... xs) noexcept { data = Native_vec_{xs...}; }
__host__ __device__