Constrain variadic constructor to ranks > 1 and add missing __device__s

This commit is contained in:
Alex Voicu
2018-07-17 17:17:48 +01:00
parent dd1ae05f1f
commit 31efcc17d7
2 changed files with 4 additions and 1 deletions
@@ -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__