Constrain variadic constructor to ranks > 1 and add missing __device__s

[ROCm/clr commit: 31efcc17d7]
このコミットが含まれているのは:
Alex Voicu committed 2018-07-17 17:18:45 +01:00
1 親 98400c6b21
コミット 79fb5e9694
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__
+2
ファイルの表示
@@ -40,6 +40,7 @@ using namespace std;
template<
typename V,
Enable_if_t<!is_integral<decltype(declval<V>().x)>{}>* = nullptr>
__device__
constexpr
bool integer_unary_tests(const V&, const V&) {
return true;
@@ -73,6 +74,7 @@ bool integer_unary_tests(V& f1, V& f2) {
template<
typename V,
Enable_if_t<!is_integral<decltype(declval<V>().x)>{}>* = nullptr>
__device__
constexpr
bool integer_binary_tests(const V&, const V&, const V&) {
return true;