Constrain variadic constructor to ranks > 1 and add missing __device__s

此提交包含在:
Alex Voicu
2018-07-17 17:17:48 +01:00
父節點 dd1ae05f1f
當前提交 31efcc17d7
共有 2 個檔案被更改,包括 4 行新增1 行删除
+2 -1
查看文件
@@ -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__