1 #ifdef STAN_OPENCL
2 #include <stan/math/opencl/rev.hpp>
3 #include <stan/math.hpp>
4 #include <gtest/gtest.h>
5 #include <test/unit/math/opencl/util.hpp>
6 
__anoncf39c1c90102(const auto& a) 7 auto atanh_functor = [](const auto& a) { return stan::math::atanh(a); };
8 
TEST(OpenCLAtanh,prim_rev_values_small)9 TEST(OpenCLAtanh, prim_rev_values_small) {
10   Eigen::VectorXd a(8);
11   a << -0.98, -0.8, 0.5, 0.6 + std::numeric_limits<double>::epsilon(), 0.5,
12       -0.03, -0.34, 0.44;
13   stan::math::test::compare_cpu_opencl_prim_rev(atanh_functor, a);
14 }
15 
TEST(OpenCLAtanh,prim_rev_size_0)16 TEST(OpenCLAtanh, prim_rev_size_0) {
17   int N = 0;
18 
19   Eigen::MatrixXd a(N, N);
20   stan::math::test::compare_cpu_opencl_prim_rev(atanh_functor, a);
21 }
22 
TEST(OpenCLAtanh,prim_rev_values_large)23 TEST(OpenCLAtanh, prim_rev_values_large) {
24   int N = 71;
25 
26   Eigen::MatrixXd a = Eigen::MatrixXd::Random(N, N);
27   stan::math::test::compare_cpu_opencl_prim_rev(atanh_functor, a);
28 }
29 
30 #endif
31