diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-05-11 10:22:15 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-05-11 10:22:15 -0700 |
commit | 217d984abc2dd619d9ba0c585f27065e40380fe3 (patch) | |
tree | 7a687523ce0126f5f6c3dac10ec6b53f6db465c0 /unsupported | |
parent | 08348b4e487547ea4fa035208eb09a955cca05fd (diff) |
Fixed a typo in my previous commit
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h | 2 | ||||
-rw-r--r-- | unsupported/test/cxx11_float16.cpp | 11 | ||||
-rw-r--r-- | unsupported/test/cxx11_tensor_of_float16_cuda.cu | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h index bbac88192..b433a14c9 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReductionCuda.h @@ -318,7 +318,7 @@ __global__ void InnerReductionKernel(Reducer reducer, const Self input, Index nu for (Index i = thread_id; i < num_preserved_coeffs; i += num_threads) { output[i] = reducer.initialize(); } - _syncthreads(); + __syncthreads(); } for (Index i = blockIdx.x; i < num_input_blocks; i += gridDim.x) { diff --git a/unsupported/test/cxx11_float16.cpp b/unsupported/test/cxx11_float16.cpp index 9141c4820..e39a7f83c 100644 --- a/unsupported/test/cxx11_float16.cpp +++ b/unsupported/test/cxx11_float16.cpp @@ -88,6 +88,16 @@ void test_conversion() #endif } +void test_numtraits() +{ + std::cout << "expsilin = " << NumTraits<half>::epsilon() << std::endl; + std::cout << "highest = " << NumTraits<half>::highest() << std::endl; + std::cout << "lowest = " << NumTraits<half>::lowest() << std::endl; + std::cout << "inifinty = " << NumTraits<half>::infinity() << std::endl; + std::cout << "nan = " << NumTraits<half>::quiet_NaN() << std::endl; + +} + void test_arithmetic() { VERIFY_IS_EQUAL(float(half(2) + half(2)), 4); @@ -185,6 +195,7 @@ void test_trigonometric_functions() void test_cxx11_float16() { CALL_SUBTEST(test_conversion()); + CALL_SUBTEST(test_numtraits()); CALL_SUBTEST(test_arithmetic()); CALL_SUBTEST(test_comparison()); CALL_SUBTEST(test_basic_functions()); diff --git a/unsupported/test/cxx11_tensor_of_float16_cuda.cu b/unsupported/test/cxx11_tensor_of_float16_cuda.cu index dceac793e..0d73318a9 100644 --- a/unsupported/test/cxx11_tensor_of_float16_cuda.cu +++ b/unsupported/test/cxx11_tensor_of_float16_cuda.cu @@ -388,6 +388,9 @@ void test_cuda_forced_evals() { #endif + + + void test_cxx11_tensor_of_float16_cuda() { #ifdef EIGEN_HAS_CUDA_FP16 |