Skip to content

Commit c95d1bb

Browse files
committed
Change test set
1 parent ae3e865 commit c95d1bb

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

test/test_gamma_nvrtc.cpp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,7 @@
2424
*
2525
*/
2626
const char* cuda_kernel = R"(
27-
28-
namespace boost {
29-
namespace math {
30-
31-
template <typename T>
32-
__host__ __device__ T tgamma(T x)
33-
{
34-
return ::tgamma(x);
35-
}
36-
37-
} // namespace math
38-
} // namespace boost
39-
27+
#include <boost/math/special_functions/gamma.hpp>
4028
extern "C" __global__
4129
void test_gamma_kernel(const float *in1, const float*, float *out, int numElements)
4230
{
@@ -64,15 +52,25 @@ int main()
6452
nvrtcResult res;
6553

6654
// Create NVRTC program
67-
res = nvrtcCreateProgram(&prog, cuda_kernel, "test_gamma_kernel.cu", 0, nullptr, nullptr);
55+
res = nvrtcCreateProgram(&prog,
56+
cuda_kernel,
57+
"test_gamma_kernel.cu",
58+
0,
59+
nullptr,
60+
nullptr);
61+
6862
checkNVRTCError(res, "Failed to create NVRTC program");
6963

7064
nvrtcAddNameExpression(prog, "test_gamma_kernel");
7165

72-
const char* opts[] = {"--std=c++14"};
66+
#ifdef BOOST_MATH_NVRTC_CI_RUN
67+
const char* opts[] = {"--std=c++14", "--include-path=../libs/cuda-math/include/"};
68+
#else
69+
const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"};
70+
#endif
7371

7472
// Compile the program
75-
res = nvrtcCompileProgram(prog, 1, opts);
73+
res = nvrtcCompileProgram(prog, 2, opts);
7674
if (res != NVRTC_SUCCESS)
7775
{
7876
size_t log_size;

0 commit comments

Comments
 (0)