From 68ac6731cbea6db9677e1a26f673f53d964245ee Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:18:56 -0400 Subject: [PATCH 01/24] Add NVRTC support to cos_pi --- .../boost/math/special_functions/cos_pi.hpp | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/cos_pi.hpp b/include/boost/math/special_functions/cos_pi.hpp index 5a7c742b4..7c33614de 100644 --- a/include/boost/math/special_functions/cos_pi.hpp +++ b/include/boost/math/special_functions/cos_pi.hpp @@ -11,9 +11,12 @@ #pragma once #endif +#include + +#ifndef BOOST_MATH_HAS_NVRTC + #include #include -#include #include #include #include @@ -86,5 +89,40 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type cos_pi(T x) } // namespace math } // namespace boost + +#else // Special handling for NVRTC + +namespace boost { +namespace math { + +template +BOOST_MATH_GPU_ENABLED auto cos_pi(T x) +{ + return ::cospi(x); +} + +template <> +BOOST_MATH_GPU_ENABLED auto cos_pi(float x) +{ + return ::cospif(x); +} + +template +BOOST_MATH_GPU_ENABLED auto cos_pi(T x, const Policy&) +{ + return ::cospi(x); +} + +template +BOOST_MATH_GPU_ENABLED auto cos_pi(float x, const Policy&) +{ + return ::cospif(x); +} + +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_HAS_NVRTC + #endif From dae8f3ad2753815a37c166e5fe3e050b939e19da Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:19:10 -0400 Subject: [PATCH 02/24] Add cos_pi NVRTC testing --- test/nvrtc_jamfile | 2 + test/test_cos_pi_nvrtc_double.cpp | 186 ++++++++++++++++++++++++++++++ test/test_cos_pi_nvrtc_float.cpp | 186 ++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 test/test_cos_pi_nvrtc_double.cpp create mode 100644 test/test_cos_pi_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index 703bf8099..38f9f2476 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -12,6 +12,8 @@ project : requirements # Special Functions run test_cbrt_nvrtc_double.cpp ; run test_cbrt_nvrtc_float.cpp ; +run test_cos_pi_nvrtc_double.cpp ; +run test_cos_pi_nvrtc_float.cpp ; run test_expm1_nvrtc_double.cpp ; run test_expm1_nvrtc_float.cpp ; run test_fpclassify_nvrtc_double.cpp ; diff --git a/test/test_cos_pi_nvrtc_double.cpp b/test/test_cos_pi_nvrtc_double.cpp new file mode 100644 index 000000000..459524bbe --- /dev/null +++ b/test/test_cos_pi_nvrtc_double.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_cos_pi_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::cos_pi(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_cos_pi_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_cos_pi_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_cos_pi_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::cos_pi(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_cos_pi_nvrtc_float.cpp b/test/test_cos_pi_nvrtc_float.cpp new file mode 100644 index 000000000..7c1eef3fa --- /dev/null +++ b/test/test_cos_pi_nvrtc_float.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_cos_pi_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::cos_pi(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_cos_pi_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_cos_pi_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_cos_pi_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::cos_pi(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From 6100af43339680dd1ea88626f4a8533dfd2718bd Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:23:35 -0400 Subject: [PATCH 03/24] Add NVRTC support to sin_pi --- .../boost/math/special_functions/sin_pi.hpp | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/sin_pi.hpp b/include/boost/math/special_functions/sin_pi.hpp index 3e16bfc96..e59e232e6 100644 --- a/include/boost/math/special_functions/sin_pi.hpp +++ b/include/boost/math/special_functions/sin_pi.hpp @@ -11,10 +11,13 @@ #pragma once #endif +#include + +#ifndef BOOST_MATH_HAS_NVRTC + #include #include #include -#include #include #include #include @@ -94,5 +97,40 @@ inline typename tools::promote_args::type sin_pi(T x) } // namespace math } // namespace boost + +#else // Special handling for NVRTC + +namespace boost { +namespace math { + +template +BOOST_MATH_GPU_ENABLED auto sin_pi(T x) +{ + return ::sinpi(x); +} + +template <> +BOOST_MATH_GPU_ENABLED auto sin_pi(float x) +{ + return ::sinpif(x); +} + +template +BOOST_MATH_GPU_ENABLED auto sin_pi(T x, const Policy&) +{ + return ::sinpi(x); +} + +template +BOOST_MATH_GPU_ENABLED auto sin_pi(float x, const Policy&) +{ + return ::sinpif(x); +} + +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_HAS_NVRTC + #endif From 566c5a1422bbe87b01696886088d77ec49d2e9f1 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:23:46 -0400 Subject: [PATCH 04/24] Add sin_pi NVRTC testing --- test/nvrtc_jamfile | 2 + test/test_sin_pi_nvrtc_double.cpp | 186 ++++++++++++++++++++++++++++++ test/test_sin_pi_nvrtc_float.cpp | 186 ++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 test/test_sin_pi_nvrtc_double.cpp create mode 100644 test/test_sin_pi_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index 38f9f2476..9eebb3df5 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -26,4 +26,6 @@ run test_round_nvrtc_double.cpp ; run test_round_nvrtc_float.cpp ; run test_sign_nvrtc_double.cpp ; run test_sign_nvrtc_float.cpp ; +run test_sin_pi_nvrtc_double.cpp ; +run test_sin_pi_nvrtc_float.cpp ; run test_trunc_nvrtc_double.cpp ; diff --git a/test/test_sin_pi_nvrtc_double.cpp b/test/test_sin_pi_nvrtc_double.cpp new file mode 100644 index 000000000..b6cff9798 --- /dev/null +++ b/test/test_sin_pi_nvrtc_double.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_sin_pi_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::sin_pi(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_sin_pi_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_sin_pi_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_sin_pi_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::sin_pi(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_sin_pi_nvrtc_float.cpp b/test/test_sin_pi_nvrtc_float.cpp new file mode 100644 index 000000000..32cc38059 --- /dev/null +++ b/test/test_sin_pi_nvrtc_float.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_sin_pi_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::sin_pi(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_sin_pi_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_sin_pi_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_sin_pi_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::sin_pi(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From c9b230422c2b0d3dec4af4765cf853605d6a594d Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:38:14 -0400 Subject: [PATCH 05/24] Add NVRTC support to erf and erfc --- include/boost/math/special_functions/erf.hpp | 63 +++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/include/boost/math/special_functions/erf.hpp b/include/boost/math/special_functions/erf.hpp index 0b311c464..d56fc58dc 100644 --- a/include/boost/math/special_functions/erf.hpp +++ b/include/boost/math/special_functions/erf.hpp @@ -11,8 +11,11 @@ #pragma once #endif -#include #include + +#ifndef BOOST_MATH_HAS_NVRTC + +#include #include #include #include @@ -1273,6 +1276,64 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type erfc(T z) } // namespace math } // namespace boost +#else // Special handling for NVRTC platform + +namespace boost { +namespace math { + +template +BOOST_MATH_GPU_ENABLED auto erf(T x) +{ + return ::erf(x); +} + +template <> +BOOST_MATH_GPU_ENABLED auto erf(float x) +{ + return ::erff(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erf(T x, const Policy&) +{ + return ::erf(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erf(float x, const Policy&) +{ + return ::erff(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erfc(T x) +{ + return ::erfc(x); +} + +template <> +BOOST_MATH_GPU_ENABLED auto erfc(float x) +{ + return ::erfcf(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erfc(T x, const Policy&) +{ + return ::erfc(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erfc(float x, const Policy&) +{ + return ::erfcf(x); +} + +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_HAS_NVRTC + #include #endif // BOOST_MATH_SPECIAL_ERF_HPP From 781f6604ea85811a9ed1f9c63a6fdcb19a16e4dc Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:38:27 -0400 Subject: [PATCH 06/24] Add erf NVRTC testing --- test/nvrtc_jamfile | 2 + test/test_erf_nvrtc_double.cpp | 186 +++++++++++++++++++++++++++++++++ test/test_erf_nvrtc_float.cpp | 186 +++++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 test/test_erf_nvrtc_double.cpp create mode 100644 test/test_erf_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index 9eebb3df5..5b19c4bd2 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -14,6 +14,8 @@ run test_cbrt_nvrtc_double.cpp ; run test_cbrt_nvrtc_float.cpp ; run test_cos_pi_nvrtc_double.cpp ; run test_cos_pi_nvrtc_float.cpp ; +run test_erf_nvrtc_double.cpp ; +run test_erf_nvrtc_float.cpp ; run test_expm1_nvrtc_double.cpp ; run test_expm1_nvrtc_float.cpp ; run test_fpclassify_nvrtc_double.cpp ; diff --git a/test/test_erf_nvrtc_double.cpp b/test/test_erf_nvrtc_double.cpp new file mode 100644 index 000000000..e20d0188d --- /dev/null +++ b/test/test_erf_nvrtc_double.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erf(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erf(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_erf_nvrtc_float.cpp b/test/test_erf_nvrtc_float.cpp new file mode 100644 index 000000000..913b1a14c --- /dev/null +++ b/test/test_erf_nvrtc_float.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erf(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erf(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From abd0618942f5c77e35b9605f338e46a3d6530a2b Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:40:23 -0400 Subject: [PATCH 07/24] Add erfc NVRTC testing --- test/nvrtc_jamfile | 2 + test/test_erfc_nvrtc_double.cpp | 186 ++++++++++++++++++++++++++++++++ test/test_erfc_nvrtc_float.cpp | 186 ++++++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 test/test_erfc_nvrtc_double.cpp create mode 100644 test/test_erfc_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index 5b19c4bd2..fa04990e5 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -16,6 +16,8 @@ run test_cos_pi_nvrtc_double.cpp ; run test_cos_pi_nvrtc_float.cpp ; run test_erf_nvrtc_double.cpp ; run test_erf_nvrtc_float.cpp ; +run test_erfc_nvrtc_double.cpp ; +run test_erfc_nvrtc_float.cpp ; run test_expm1_nvrtc_double.cpp ; run test_expm1_nvrtc_float.cpp ; run test_fpclassify_nvrtc_double.cpp ; diff --git a/test/test_erfc_nvrtc_double.cpp b/test/test_erfc_nvrtc_double.cpp new file mode 100644 index 000000000..c43a469ac --- /dev/null +++ b/test/test_erfc_nvrtc_double.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erfc(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erfc(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_erfc_nvrtc_float.cpp b/test/test_erfc_nvrtc_float.cpp new file mode 100644 index 000000000..f8756045a --- /dev/null +++ b/test/test_erfc_nvrtc_float.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erfc(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erfc(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From cc4cf74edf17f7fc846db825e16a4cc284dbcbd5 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:47:55 -0400 Subject: [PATCH 08/24] Fix types in NVRTC testing --- test/test_cos_pi_nvrtc_float.cpp | 2 +- test/test_sin_pi_nvrtc_float.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_cos_pi_nvrtc_float.cpp b/test/test_cos_pi_nvrtc_float.cpp index 7c1eef3fa..2f541e217 100644 --- a/test/test_cos_pi_nvrtc_float.cpp +++ b/test/test_cos_pi_nvrtc_float.cpp @@ -21,7 +21,7 @@ typedef float float_type; const char* cuda_kernel = R"( -typedef double float_type; +typedef float float_type; #include extern "C" __global__ void test_cos_pi_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) diff --git a/test/test_sin_pi_nvrtc_float.cpp b/test/test_sin_pi_nvrtc_float.cpp index 32cc38059..f67079774 100644 --- a/test/test_sin_pi_nvrtc_float.cpp +++ b/test/test_sin_pi_nvrtc_float.cpp @@ -21,7 +21,7 @@ typedef float float_type; const char* cuda_kernel = R"( -typedef double float_type; +typedef float float_type; #include extern "C" __global__ void test_sin_pi_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) From 4d59bbd38c02a8749a70f0dba77b57deaf39f9f8 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:48:12 -0400 Subject: [PATCH 09/24] Add NVRTC support to erf_inv and erfc_inv --- .../math/special_functions/detail/erf_inv.hpp | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/include/boost/math/special_functions/detail/erf_inv.hpp b/include/boost/math/special_functions/detail/erf_inv.hpp index 69a08abe6..cb65cffbc 100644 --- a/include/boost/math/special_functions/detail/erf_inv.hpp +++ b/include/boost/math/special_functions/detail/erf_inv.hpp @@ -15,6 +15,9 @@ #endif #include + +#ifndef BOOST_MATH_HAS_NVRTC + #include namespace boost{ namespace math{ @@ -490,6 +493,64 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type erf_inv(T z) } // namespace math } // namespace boost +#else // Special handling for NVRTC + +namespace boost { +namespace math { + +template +BOOST_MATH_GPU_ENABLED auto erf_inv(T x) +{ + return ::erfinv(x); +} + +template <> +BOOST_MATH_GPU_ENABLED auto erf_inv(float x) +{ + return ::erfinvf(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erf_inv(T x, const Policy&) +{ + return ::erfinv(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erf_inv(float x, const Policy&) +{ + return ::erfinvf(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erfc_inv(T x) +{ + return ::erfcinv(x); +} + +template <> +BOOST_MATH_GPU_ENABLED auto erfc_inv(float x) +{ + return ::erfcinvf(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erfc_inv(T x, const Policy&) +{ + return ::erfcinv(x); +} + +template +BOOST_MATH_GPU_ENABLED auto erfc_inv(float x, const Policy&) +{ + return ::erfcinvf(x); +} + +} // namespace math +} // namespace boost + +#endif // BOOST_MATH_HAS_NVRTV + #ifdef _MSC_VER #pragma warning(pop) #endif From 54d5ff8b8111af5a91bc956c865b10e6c6c6b3ef Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:48:26 -0400 Subject: [PATCH 10/24] Add erf_inv NVRTC testing --- test/nvrtc_jamfile | 2 + test/test_erf_inv_nvrtc_double.cpp | 186 +++++++++++++++++++++++++++++ test/test_erf_inv_nvrtc_float.cpp | 186 +++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 test/test_erf_inv_nvrtc_double.cpp create mode 100644 test/test_erf_inv_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index fa04990e5..d36a3381d 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -18,6 +18,8 @@ run test_erf_nvrtc_double.cpp ; run test_erf_nvrtc_float.cpp ; run test_erfc_nvrtc_double.cpp ; run test_erfc_nvrtc_float.cpp ; +run test_erf_inv_nvrtc_double.cpp ; +run test_erf_inv_nvrtc_float.cpp ; run test_expm1_nvrtc_double.cpp ; run test_expm1_nvrtc_float.cpp ; run test_fpclassify_nvrtc_double.cpp ; diff --git a/test/test_erf_inv_nvrtc_double.cpp b/test/test_erf_inv_nvrtc_double.cpp new file mode 100644 index 000000000..5588b7668 --- /dev/null +++ b/test/test_erf_inv_nvrtc_double.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erf_inv(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erf_inv(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_erf_inv_nvrtc_float.cpp b/test/test_erf_inv_nvrtc_float.cpp new file mode 100644 index 000000000..ff7f6db98 --- /dev/null +++ b/test/test_erf_inv_nvrtc_float.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erf_inv(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erf_inv(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From 79d555677659fc10cb743cc163971b6f03295bbf Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 11:49:56 -0400 Subject: [PATCH 11/24] Add erfc_inv NVRTC testing --- test/nvrtc_jamfile | 2 + test/test_erfc_inv_nvrtc_double.cpp | 186 ++++++++++++++++++++++++++++ test/test_erfc_inv_nvrtc_float.cpp | 186 ++++++++++++++++++++++++++++ 3 files changed, 374 insertions(+) create mode 100644 test/test_erfc_inv_nvrtc_double.cpp create mode 100644 test/test_erfc_inv_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index d36a3381d..9e59740e6 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -20,6 +20,8 @@ run test_erfc_nvrtc_double.cpp ; run test_erfc_nvrtc_float.cpp ; run test_erf_inv_nvrtc_double.cpp ; run test_erf_inv_nvrtc_float.cpp ; +run test_erfc_inv_nvrtc_double.cpp ; +run test_erfc_inv_nvrtc_float.cpp ; run test_expm1_nvrtc_double.cpp ; run test_expm1_nvrtc_float.cpp ; run test_fpclassify_nvrtc_double.cpp ; diff --git a/test/test_erfc_inv_nvrtc_double.cpp b/test/test_erfc_inv_nvrtc_double.cpp new file mode 100644 index 000000000..ae961d657 --- /dev/null +++ b/test/test_erfc_inv_nvrtc_double.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erfc_inv(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erfc_inv(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_erfc_inv_nvrtc_float.cpp b/test/test_erfc_inv_nvrtc_float.cpp new file mode 100644 index 000000000..b676330ce --- /dev/null +++ b/test/test_erfc_inv_nvrtc_float.cpp @@ -0,0 +1,186 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +extern "C" __global__ +void test_erf_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::erfc_inv(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_erf_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_erf_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_erf_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + auto res = boost::math::erfc_inv(h_in1[i]); + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} From 090735e915f156a078d9533b8d3b678cbb247ce7 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:04:17 -0400 Subject: [PATCH 12/24] Update polynomial evaluation for NVRTC --- .../tools/detail/polynomial_horner1_10.hpp | 22 +++---- .../tools/detail/polynomial_horner1_11.hpp | 24 ++++---- .../tools/detail/polynomial_horner1_12.hpp | 26 ++++---- .../tools/detail/polynomial_horner1_13.hpp | 28 ++++----- .../tools/detail/polynomial_horner1_14.hpp | 30 +++++----- .../tools/detail/polynomial_horner1_15.hpp | 32 +++++----- .../tools/detail/polynomial_horner1_16.hpp | 34 +++++------ .../tools/detail/polynomial_horner1_17.hpp | 36 +++++------ .../tools/detail/polynomial_horner1_18.hpp | 38 ++++++------ .../tools/detail/polynomial_horner1_19.hpp | 40 ++++++------- .../tools/detail/polynomial_horner1_2.hpp | 6 +- .../tools/detail/polynomial_horner1_20.hpp | 42 ++++++------- .../tools/detail/polynomial_horner1_3.hpp | 8 +-- .../tools/detail/polynomial_horner1_4.hpp | 10 ++-- .../tools/detail/polynomial_horner1_5.hpp | 12 ++-- .../tools/detail/polynomial_horner1_6.hpp | 14 ++--- .../tools/detail/polynomial_horner1_7.hpp | 16 ++--- .../tools/detail/polynomial_horner1_8.hpp | 18 +++--- .../tools/detail/polynomial_horner1_9.hpp | 20 +++---- .../tools/detail/polynomial_horner2_10.hpp | 22 +++---- .../tools/detail/polynomial_horner2_11.hpp | 24 ++++---- .../tools/detail/polynomial_horner2_12.hpp | 26 ++++---- .../tools/detail/polynomial_horner2_13.hpp | 28 ++++----- .../tools/detail/polynomial_horner2_14.hpp | 30 +++++----- .../tools/detail/polynomial_horner2_15.hpp | 32 +++++----- .../tools/detail/polynomial_horner2_16.hpp | 34 +++++------ .../tools/detail/polynomial_horner2_17.hpp | 36 +++++------ .../tools/detail/polynomial_horner2_18.hpp | 38 ++++++------ .../tools/detail/polynomial_horner2_19.hpp | 40 ++++++------- .../tools/detail/polynomial_horner2_2.hpp | 10 ++-- .../tools/detail/polynomial_horner2_20.hpp | 42 ++++++------- .../tools/detail/polynomial_horner2_3.hpp | 10 ++-- .../tools/detail/polynomial_horner2_4.hpp | 10 ++-- .../tools/detail/polynomial_horner2_5.hpp | 12 ++-- .../tools/detail/polynomial_horner2_6.hpp | 14 ++--- .../tools/detail/polynomial_horner2_7.hpp | 16 ++--- .../tools/detail/polynomial_horner2_8.hpp | 18 +++--- .../tools/detail/polynomial_horner2_9.hpp | 20 +++---- .../tools/detail/polynomial_horner3_10.hpp | 22 +++---- .../tools/detail/polynomial_horner3_11.hpp | 24 ++++---- .../tools/detail/polynomial_horner3_12.hpp | 26 ++++---- .../tools/detail/polynomial_horner3_13.hpp | 28 ++++----- .../tools/detail/polynomial_horner3_14.hpp | 30 +++++----- .../tools/detail/polynomial_horner3_15.hpp | 32 +++++----- .../tools/detail/polynomial_horner3_16.hpp | 34 +++++------ .../tools/detail/polynomial_horner3_17.hpp | 36 +++++------ .../tools/detail/polynomial_horner3_18.hpp | 38 ++++++------ .../tools/detail/polynomial_horner3_19.hpp | 40 ++++++------- .../tools/detail/polynomial_horner3_2.hpp | 10 ++-- .../tools/detail/polynomial_horner3_20.hpp | 42 ++++++------- .../tools/detail/polynomial_horner3_3.hpp | 10 ++-- .../tools/detail/polynomial_horner3_4.hpp | 10 ++-- .../tools/detail/polynomial_horner3_5.hpp | 12 ++-- .../tools/detail/polynomial_horner3_6.hpp | 14 ++--- .../tools/detail/polynomial_horner3_7.hpp | 16 ++--- .../tools/detail/polynomial_horner3_8.hpp | 18 +++--- .../tools/detail/polynomial_horner3_9.hpp | 20 +++---- .../math/tools/detail/rational_horner1_10.hpp | 22 +++---- .../math/tools/detail/rational_horner1_11.hpp | 24 ++++---- .../math/tools/detail/rational_horner1_12.hpp | 26 ++++---- .../math/tools/detail/rational_horner1_13.hpp | 28 ++++----- .../math/tools/detail/rational_horner1_14.hpp | 30 +++++----- .../math/tools/detail/rational_horner1_15.hpp | 32 +++++----- .../math/tools/detail/rational_horner1_16.hpp | 34 +++++------ .../math/tools/detail/rational_horner1_17.hpp | 36 +++++------ .../math/tools/detail/rational_horner1_18.hpp | 38 ++++++------ .../math/tools/detail/rational_horner1_19.hpp | 40 ++++++------- .../math/tools/detail/rational_horner1_2.hpp | 6 +- .../math/tools/detail/rational_horner1_20.hpp | 42 ++++++------- .../math/tools/detail/rational_horner1_3.hpp | 8 +-- .../math/tools/detail/rational_horner1_4.hpp | 10 ++-- .../math/tools/detail/rational_horner1_5.hpp | 12 ++-- .../math/tools/detail/rational_horner1_6.hpp | 14 ++--- .../math/tools/detail/rational_horner1_7.hpp | 16 ++--- .../math/tools/detail/rational_horner1_8.hpp | 18 +++--- .../math/tools/detail/rational_horner1_9.hpp | 20 +++---- .../math/tools/detail/rational_horner2_10.hpp | 22 +++---- .../math/tools/detail/rational_horner2_11.hpp | 24 ++++---- .../math/tools/detail/rational_horner2_12.hpp | 26 ++++---- .../math/tools/detail/rational_horner2_13.hpp | 28 ++++----- .../math/tools/detail/rational_horner2_14.hpp | 30 +++++----- .../math/tools/detail/rational_horner2_15.hpp | 32 +++++----- .../math/tools/detail/rational_horner2_16.hpp | 34 +++++------ .../math/tools/detail/rational_horner2_17.hpp | 36 +++++------ .../math/tools/detail/rational_horner2_18.hpp | 38 ++++++------ .../math/tools/detail/rational_horner2_19.hpp | 40 ++++++------- .../math/tools/detail/rational_horner2_2.hpp | 10 ++-- .../math/tools/detail/rational_horner2_20.hpp | 42 ++++++------- .../math/tools/detail/rational_horner2_3.hpp | 10 ++-- .../math/tools/detail/rational_horner2_4.hpp | 10 ++-- .../math/tools/detail/rational_horner2_5.hpp | 12 ++-- .../math/tools/detail/rational_horner2_6.hpp | 14 ++--- .../math/tools/detail/rational_horner2_7.hpp | 16 ++--- .../math/tools/detail/rational_horner2_8.hpp | 18 +++--- .../math/tools/detail/rational_horner2_9.hpp | 20 +++---- .../math/tools/detail/rational_horner3_10.hpp | 22 +++---- .../math/tools/detail/rational_horner3_11.hpp | 24 ++++---- .../math/tools/detail/rational_horner3_12.hpp | 26 ++++---- .../math/tools/detail/rational_horner3_13.hpp | 28 ++++----- .../math/tools/detail/rational_horner3_14.hpp | 30 +++++----- .../math/tools/detail/rational_horner3_15.hpp | 32 +++++----- .../math/tools/detail/rational_horner3_16.hpp | 34 +++++------ .../math/tools/detail/rational_horner3_17.hpp | 36 +++++------ .../math/tools/detail/rational_horner3_18.hpp | 38 ++++++------ .../math/tools/detail/rational_horner3_19.hpp | 40 ++++++------- .../math/tools/detail/rational_horner3_2.hpp | 10 ++-- .../math/tools/detail/rational_horner3_20.hpp | 42 ++++++------- .../math/tools/detail/rational_horner3_3.hpp | 10 ++-- .../math/tools/detail/rational_horner3_4.hpp | 10 ++-- .../math/tools/detail/rational_horner3_5.hpp | 12 ++-- .../math/tools/detail/rational_horner3_6.hpp | 14 ++--- .../math/tools/detail/rational_horner3_7.hpp | 16 ++--- .../math/tools/detail/rational_horner3_8.hpp | 18 +++--- .../math/tools/detail/rational_horner3_9.hpp | 20 +++---- include/boost/math/tools/rational.hpp | 54 ++++++++++------- tools/generate_rational_code.cpp | 60 +++++++++---------- 116 files changed, 1443 insertions(+), 1431 deletions(-) diff --git a/include/boost/math/tools/detail/polynomial_horner1_10.hpp b/include/boost/math/tools/detail/polynomial_horner1_10.hpp index 37e4cba01..04ad90b69 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_10.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_10.hpp @@ -12,67 +12,67 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_11.hpp b/include/boost/math/tools/detail/polynomial_horner1_11.hpp index 885490f22..f99ab8250 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_11.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_11.hpp @@ -12,73 +12,73 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_12.hpp b/include/boost/math/tools/detail/polynomial_horner1_12.hpp index f54034592..3006ebe51 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_12.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_12.hpp @@ -12,79 +12,79 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_13.hpp b/include/boost/math/tools/detail/polynomial_horner1_13.hpp index e9e13bd52..0f1118909 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_13.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_13.hpp @@ -12,85 +12,85 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_14.hpp b/include/boost/math/tools/detail/polynomial_horner1_14.hpp index eaa18bdc5..caba4b97e 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_14.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_14.hpp @@ -12,91 +12,91 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_15.hpp b/include/boost/math/tools/detail/polynomial_horner1_15.hpp index c4a880449..c8f42ac81 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_15.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_15.hpp @@ -12,97 +12,97 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_16.hpp b/include/boost/math/tools/detail/polynomial_horner1_16.hpp index 5c262cc63..2ed591ccf 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_16.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_16.hpp @@ -12,103 +12,103 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_17.hpp b/include/boost/math/tools/detail/polynomial_horner1_17.hpp index 90d49a0bd..5e9fc8cd7 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_17.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_17.hpp @@ -12,109 +12,109 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_18.hpp b/include/boost/math/tools/detail/polynomial_horner1_18.hpp index 58fb83fd3..ffb62ff04 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_18.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_18.hpp @@ -12,115 +12,115 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_19.hpp b/include/boost/math/tools/detail/polynomial_horner1_19.hpp index 18a6af2d3..56df108ac 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_19.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_19.hpp @@ -12,121 +12,121 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_2.hpp b/include/boost/math/tools/detail/polynomial_horner1_2.hpp index 645e3f878..63091ebdd 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_2.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_2.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_20.hpp b/include/boost/math/tools/detail/polynomial_horner1_20.hpp index 47584e787..c16e5143e 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_20.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_20.hpp @@ -12,127 +12,127 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((((((((((((((a[19] * x + a[18]) * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_3.hpp b/include/boost/math/tools/detail/polynomial_horner1_3.hpp index 420bbcc28..0aeccc111 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_3.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_3.hpp @@ -12,25 +12,25 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_4.hpp b/include/boost/math/tools/detail/polynomial_horner1_4.hpp index 930798e74..61058fce8 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_4.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_4.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_5.hpp b/include/boost/math/tools/detail/polynomial_horner1_5.hpp index b97a8f9eb..47021bc50 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_5.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_5.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_6.hpp b/include/boost/math/tools/detail/polynomial_horner1_6.hpp index 6a699f517..bfd24371d 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_6.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_6.hpp @@ -12,43 +12,43 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_7.hpp b/include/boost/math/tools/detail/polynomial_horner1_7.hpp index 2aceeeca1..50ddca63f 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_7.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_7.hpp @@ -12,49 +12,49 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_8.hpp b/include/boost/math/tools/detail/polynomial_horner1_8.hpp index 0486d642f..3be7ba4d1 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_8.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_8.hpp @@ -12,55 +12,55 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner1_9.hpp b/include/boost/math/tools/detail/polynomial_horner1_9.hpp index b0838014b..4ec53c48b 100644 --- a/include/boost/math/tools/detail/polynomial_horner1_9.hpp +++ b/include/boost/math/tools/detail/polynomial_horner1_9.hpp @@ -12,61 +12,61 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner2_10.hpp b/include/boost/math/tools/detail/polynomial_horner2_10.hpp index 2a680d756..f242d7464 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_10.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_10.hpp @@ -12,72 +12,72 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_11.hpp b/include/boost/math/tools/detail/polynomial_horner2_11.hpp index 7036eec3f..edf7f86c5 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_11.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_11.hpp @@ -12,79 +12,79 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_12.hpp b/include/boost/math/tools/detail/polynomial_horner2_12.hpp index fbbf2a3fa..969c9c4dd 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_12.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_12.hpp @@ -12,86 +12,86 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_13.hpp b/include/boost/math/tools/detail/polynomial_horner2_13.hpp index 46fb3859d..ed4559d11 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_13.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_13.hpp @@ -12,93 +12,93 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_14.hpp b/include/boost/math/tools/detail/polynomial_horner2_14.hpp index d1c326e0f..4b79eb78a 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_14.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_14.hpp @@ -12,100 +12,100 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_15.hpp b/include/boost/math/tools/detail/polynomial_horner2_15.hpp index d679cfeaf..28b62eee7 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_15.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_15.hpp @@ -12,107 +12,107 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_16.hpp b/include/boost/math/tools/detail/polynomial_horner2_16.hpp index 0f3ed8f6c..6368b4054 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_16.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_16.hpp @@ -12,114 +12,114 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_17.hpp b/include/boost/math/tools/detail/polynomial_horner2_17.hpp index 7783c4c81..551e6191c 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_17.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_17.hpp @@ -12,121 +12,121 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_18.hpp b/include/boost/math/tools/detail/polynomial_horner2_18.hpp index 4e3b57f98..19cfdc19e 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_18.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_18.hpp @@ -12,128 +12,128 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_19.hpp b/include/boost/math/tools/detail/polynomial_horner2_19.hpp index 9eca8ef11..9ea87fd93 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_19.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_19.hpp @@ -12,135 +12,135 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_2.hpp b/include/boost/math/tools/detail/polynomial_horner2_2.hpp index 857d43fdb..1982a81f3 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_2.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_2.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner2_20.hpp b/include/boost/math/tools/detail/polynomial_horner2_20.hpp index 2a8359025..23afe55e0 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_20.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_20.hpp @@ -12,142 +12,142 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((a[9] * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((a[10] * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((a[11] * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((a[12] * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((a[13] * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((a[14] * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((((((a[15] * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + (((((((a[16] * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((((((((a[17] * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((((((((a[19] * x2 + a[17]) * x2 + a[15]) * x2 + a[13]) * x2 + a[11]) * x2 + a[9]) * x2 + a[7]) * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((((((((a[18] * x2 + a[16]) * x2 + a[14]) * x2 + a[12]) * x2 + a[10]) * x2 + a[8]) * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_3.hpp b/include/boost/math/tools/detail/polynomial_horner2_3.hpp index b5956cdaf..f9d6953b8 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_3.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_3.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner2_4.hpp b/include/boost/math/tools/detail/polynomial_horner2_4.hpp index 9194a1868..8f11de5b3 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_4.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_4.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner2_5.hpp b/include/boost/math/tools/detail/polynomial_horner2_5.hpp index 4e20c214a..eba9ee9e6 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_5.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_5.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_6.hpp b/include/boost/math/tools/detail/polynomial_horner2_6.hpp index a33168d5e..ef77c6255 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_6.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_6.hpp @@ -12,44 +12,44 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_7.hpp b/include/boost/math/tools/detail/polynomial_horner2_7.hpp index 2f135756c..fe8d21b95 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_7.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_7.hpp @@ -12,51 +12,51 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner2_8.hpp b/include/boost/math/tools/detail/polynomial_horner2_8.hpp index 4c59602f9..de1810a94 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_8.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_8.hpp @@ -12,58 +12,58 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); diff --git a/include/boost/math/tools/detail/polynomial_horner2_9.hpp b/include/boost/math/tools/detail/polynomial_horner2_9.hpp index 0b60c3c04..5c53b7329 100644 --- a/include/boost/math/tools/detail/polynomial_horner2_9.hpp +++ b/include/boost/math/tools/detail/polynomial_horner2_9.hpp @@ -12,65 +12,65 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x + ((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; return static_cast((((a[8] * x2 + a[6]) * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + (((a[7] * x2 + a[5]) * x2 + a[3]) * x2 + a[1]) * x); diff --git a/include/boost/math/tools/detail/polynomial_horner3_10.hpp b/include/boost/math/tools/detail/polynomial_horner3_10.hpp index 3386fcae4..7fb5bb474 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_10.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_10.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_11.hpp b/include/boost/math/tools/detail/polynomial_horner3_11.hpp index f24ebb024..9f22820de 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_11.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_11.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_12.hpp b/include/boost/math/tools/detail/polynomial_horner3_12.hpp index 73916940d..b04961376 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_12.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_12.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_13.hpp b/include/boost/math/tools/detail/polynomial_horner3_13.hpp index 44ec9a84c..f39a33cc9 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_13.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_13.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_14.hpp b/include/boost/math/tools/detail/polynomial_horner3_14.hpp index 4d4e9e21c..32b9e7db2 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_14.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_14.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_15.hpp b/include/boost/math/tools/detail/polynomial_horner3_15.hpp index b7cf83dd1..55325c84b 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_15.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_15.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -262,7 +262,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_16.hpp b/include/boost/math/tools/detail/polynomial_horner3_16.hpp index fbf504f3f..f71d62f50 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_16.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_16.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -262,7 +262,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -295,7 +295,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_17.hpp b/include/boost/math/tools/detail/polynomial_horner3_17.hpp index c7af11b65..783a34558 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_17.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_17.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -262,7 +262,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -295,7 +295,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -330,7 +330,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_18.hpp b/include/boost/math/tools/detail/polynomial_horner3_18.hpp index feceac694..b10b270c4 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_18.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_18.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -262,7 +262,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -295,7 +295,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -330,7 +330,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -367,7 +367,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_19.hpp b/include/boost/math/tools/detail/polynomial_horner3_19.hpp index 6a9a4ea6f..21147591c 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_19.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_19.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -262,7 +262,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -295,7 +295,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -330,7 +330,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -367,7 +367,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -406,7 +406,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_2.hpp b/include/boost/math/tools/detail/polynomial_horner3_2.hpp index 69925be1c..ee3e35e6c 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_2.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_2.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner3_20.hpp b/include/boost/math/tools/detail/polynomial_horner3_20.hpp index 8dda51139..338aeb7db 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_20.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_20.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -127,7 +127,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -150,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -175,7 +175,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -231,7 +231,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -262,7 +262,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -295,7 +295,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -330,7 +330,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -367,7 +367,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -406,7 +406,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -447,7 +447,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_3.hpp b/include/boost/math/tools/detail/polynomial_horner3_3.hpp index 30e68ac2a..1eee0cfac 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_3.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_3.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner3_4.hpp b/include/boost/math/tools/detail/polynomial_horner3_4.hpp index e3c9b16f3..efa7fba48 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_4.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_4.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } diff --git a/include/boost/math/tools/detail/polynomial_horner3_5.hpp b/include/boost/math/tools/detail/polynomial_horner3_5.hpp index c02467da0..f150e2a4a 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_5.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_5.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_6.hpp b/include/boost/math/tools/detail/polynomial_horner3_6.hpp index ad71255bf..fe679e74d 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_6.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_6.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_7.hpp b/include/boost/math/tools/detail/polynomial_horner3_7.hpp index 31e0afa66..76f080ad9 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_7.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_7.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_8.hpp b/include/boost/math/tools/detail/polynomial_horner3_8.hpp index 33121b204..75634bdfc 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_8.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_8.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/polynomial_horner3_9.hpp b/include/boost/math/tools/detail/polynomial_horner3_9.hpp index c9f717133..63a40580d 100644 --- a/include/boost/math/tools/detail/polynomial_horner3_9.hpp +++ b/include/boost/math/tools/detail/polynomial_horner3_9.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[1] * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[2] * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -55,7 +55,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -70,7 +70,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -87,7 +87,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x } template -BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { V x2 = x * x; V t[2]; diff --git a/include/boost/math/tools/detail/rational_horner1_10.hpp b/include/boost/math/tools/detail/rational_horner1_10.hpp index 346ac34ec..e2f6c6d2f 100644 --- a/include/boost/math/tools/detail/rational_horner1_10.hpp +++ b/include/boost/math/tools/detail/rational_horner1_10.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_11.hpp b/include/boost/math/tools/detail/rational_horner1_11.hpp index 74ed24a74..31d480a65 100644 --- a/include/boost/math/tools/detail/rational_horner1_11.hpp +++ b/include/boost/math/tools/detail/rational_horner1_11.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_12.hpp b/include/boost/math/tools/detail/rational_horner1_12.hpp index 9072d1698..c08a85b3a 100644 --- a/include/boost/math/tools/detail/rational_horner1_12.hpp +++ b/include/boost/math/tools/detail/rational_horner1_12.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_13.hpp b/include/boost/math/tools/detail/rational_horner1_13.hpp index 1e5c75092..cc87ec2dc 100644 --- a/include/boost/math/tools/detail/rational_horner1_13.hpp +++ b/include/boost/math/tools/detail/rational_horner1_13.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_14.hpp b/include/boost/math/tools/detail/rational_horner1_14.hpp index 75b9bde42..256473710 100644 --- a/include/boost/math/tools/detail/rational_horner1_14.hpp +++ b/include/boost/math/tools/detail/rational_horner1_14.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_15.hpp b/include/boost/math/tools/detail/rational_horner1_15.hpp index 47f18a3c4..2ab24814e 100644 --- a/include/boost/math/tools/detail/rational_horner1_15.hpp +++ b/include/boost/math/tools/detail/rational_horner1_15.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_16.hpp b/include/boost/math/tools/detail/rational_horner1_16.hpp index fec9a51a2..dce0b5e9b 100644 --- a/include/boost/math/tools/detail/rational_horner1_16.hpp +++ b/include/boost/math/tools/detail/rational_horner1_16.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -192,7 +192,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_17.hpp b/include/boost/math/tools/detail/rational_horner1_17.hpp index b26dac95c..8e875d657 100644 --- a/include/boost/math/tools/detail/rational_horner1_17.hpp +++ b/include/boost/math/tools/detail/rational_horner1_17.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -192,7 +192,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -204,7 +204,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_18.hpp b/include/boost/math/tools/detail/rational_horner1_18.hpp index 074a6359b..ab67a970b 100644 --- a/include/boost/math/tools/detail/rational_horner1_18.hpp +++ b/include/boost/math/tools/detail/rational_horner1_18.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -192,7 +192,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -204,7 +204,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -216,7 +216,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((b[17] * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_19.hpp b/include/boost/math/tools/detail/rational_horner1_19.hpp index a1cceaeab..dc300343a 100644 --- a/include/boost/math/tools/detail/rational_horner1_19.hpp +++ b/include/boost/math/tools/detail/rational_horner1_19.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -192,7 +192,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -204,7 +204,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -216,7 +216,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((b[17] * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -228,7 +228,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((((b[18] * x + b[17]) * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_2.hpp b/include/boost/math/tools/detail/rational_horner1_2.hpp index 81250ba10..c6b1ef9ef 100644 --- a/include/boost/math/tools/detail/rational_horner1_2.hpp +++ b/include/boost/math/tools/detail/rational_horner1_2.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_20.hpp b/include/boost/math/tools/detail/rational_horner1_20.hpp index 63763fd8c..5b8b170c1 100644 --- a/include/boost/math/tools/detail/rational_horner1_20.hpp +++ b/include/boost/math/tools/detail/rational_horner1_20.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -120,7 +120,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((a[9] * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((b[9] * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -132,7 +132,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((a[10] * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((b[10] * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -144,7 +144,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((a[11] * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((b[11] * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -156,7 +156,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((a[12] * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((b[12] * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -168,7 +168,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((a[13] * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((b[13] * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((a[14] * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((b[14] * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -192,7 +192,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((a[15] * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((b[15] * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -204,7 +204,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((((a[16] * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((b[16] * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -216,7 +216,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((((a[17] * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((b[17] * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -228,7 +228,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((((((((((((a[18] * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((((((((((((b[18] * x + b[17]) * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -240,7 +240,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((((((((((((((a[19] * x + a[18]) * x + a[17]) * x + a[16]) * x + a[15]) * x + a[14]) * x + a[13]) * x + a[12]) * x + a[11]) * x + a[10]) * x + a[9]) * x + a[8]) * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((((((((((((((b[19] * x + b[18]) * x + b[17]) * x + b[16]) * x + b[15]) * x + b[14]) * x + b[13]) * x + b[12]) * x + b[11]) * x + b[10]) * x + b[9]) * x + b[8]) * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_3.hpp b/include/boost/math/tools/detail/rational_horner1_3.hpp index 1aebe20d3..6933e22bf 100644 --- a/include/boost/math/tools/detail/rational_horner1_3.hpp +++ b/include/boost/math/tools/detail/rational_horner1_3.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_4.hpp b/include/boost/math/tools/detail/rational_horner1_4.hpp index 8175f348c..49b983577 100644 --- a/include/boost/math/tools/detail/rational_horner1_4.hpp +++ b/include/boost/math/tools/detail/rational_horner1_4.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_5.hpp b/include/boost/math/tools/detail/rational_horner1_5.hpp index 93c11c1ef..91e97ff44 100644 --- a/include/boost/math/tools/detail/rational_horner1_5.hpp +++ b/include/boost/math/tools/detail/rational_horner1_5.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_6.hpp b/include/boost/math/tools/detail/rational_horner1_6.hpp index a59cceb24..876b026cd 100644 --- a/include/boost/math/tools/detail/rational_horner1_6.hpp +++ b/include/boost/math/tools/detail/rational_horner1_6.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_7.hpp b/include/boost/math/tools/detail/rational_horner1_7.hpp index eaa023a50..bcac18293 100644 --- a/include/boost/math/tools/detail/rational_horner1_7.hpp +++ b/include/boost/math/tools/detail/rational_horner1_7.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_8.hpp b/include/boost/math/tools/detail/rational_horner1_8.hpp index 5624c814f..55e30a53e 100644 --- a/include/boost/math/tools/detail/rational_horner1_8.hpp +++ b/include/boost/math/tools/detail/rational_horner1_8.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner1_9.hpp b/include/boost/math/tools/detail/rational_horner1_9.hpp index c94e7ed42..c7087de50 100644 --- a/include/boost/math/tools/detail/rational_horner1_9.hpp +++ b/include/boost/math/tools/detail/rational_horner1_9.hpp @@ -12,19 +12,19 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); @@ -36,7 +36,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); @@ -48,7 +48,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); @@ -60,7 +60,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((a[4] * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((b[4] * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -72,7 +72,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((a[5] * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((b[5] * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((a[6] * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((b[6] * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -96,7 +96,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast((((((((a[7] * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / (((((((b[7] * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); @@ -108,7 +108,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) return static_cast(((((((((a[8] * x + a[7]) * x + a[6]) * x + a[5]) * x + a[4]) * x + a[3]) * x + a[2]) * x + a[1]) * x + a[0]) / ((((((((b[8] * x + b[7]) * x + b[6]) * x + b[5]) * x + b[4]) * x + b[3]) * x + b[2]) * x + b[1]) * x + b[0])); diff --git a/include/boost/math/tools/detail/rational_horner2_10.hpp b/include/boost/math/tools/detail/rational_horner2_10.hpp index 0e4fd54ea..4d74a714d 100644 --- a/include/boost/math/tools/detail/rational_horner2_10.hpp +++ b/include/boost/math/tools/detail/rational_horner2_10.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_11.hpp b/include/boost/math/tools/detail/rational_horner2_11.hpp index 841c8bd49..15f1cf255 100644 --- a/include/boost/math/tools/detail/rational_horner2_11.hpp +++ b/include/boost/math/tools/detail/rational_horner2_11.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_12.hpp b/include/boost/math/tools/detail/rational_horner2_12.hpp index 3e783c577..24e9d9e7f 100644 --- a/include/boost/math/tools/detail/rational_horner2_12.hpp +++ b/include/boost/math/tools/detail/rational_horner2_12.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_13.hpp b/include/boost/math/tools/detail/rational_horner2_13.hpp index a3afa653d..495f88525 100644 --- a/include/boost/math/tools/detail/rational_horner2_13.hpp +++ b/include/boost/math/tools/detail/rational_horner2_13.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_14.hpp b/include/boost/math/tools/detail/rational_horner2_14.hpp index 377c1ad42..273e723b6 100644 --- a/include/boost/math/tools/detail/rational_horner2_14.hpp +++ b/include/boost/math/tools/detail/rational_horner2_14.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_15.hpp b/include/boost/math/tools/detail/rational_horner2_15.hpp index 9082d03f8..c7e24ec7d 100644 --- a/include/boost/math/tools/detail/rational_horner2_15.hpp +++ b/include/boost/math/tools/detail/rational_horner2_15.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_16.hpp b/include/boost/math/tools/detail/rational_horner2_16.hpp index 64173bffe..2eebd702b 100644 --- a/include/boost/math/tools/detail/rational_horner2_16.hpp +++ b/include/boost/math/tools/detail/rational_horner2_16.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -218,7 +218,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_17.hpp b/include/boost/math/tools/detail/rational_horner2_17.hpp index 5ae8cb428..1fee63047 100644 --- a/include/boost/math/tools/detail/rational_horner2_17.hpp +++ b/include/boost/math/tools/detail/rational_horner2_17.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -218,7 +218,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -234,7 +234,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_18.hpp b/include/boost/math/tools/detail/rational_horner2_18.hpp index ebe440e62..7aedbf2aa 100644 --- a/include/boost/math/tools/detail/rational_horner2_18.hpp +++ b/include/boost/math/tools/detail/rational_horner2_18.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -218,7 +218,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -234,7 +234,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -250,7 +250,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_19.hpp b/include/boost/math/tools/detail/rational_horner2_19.hpp index c1a2d4383..1c36a267c 100644 --- a/include/boost/math/tools/detail/rational_horner2_19.hpp +++ b/include/boost/math/tools/detail/rational_horner2_19.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -218,7 +218,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -234,7 +234,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -250,7 +250,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -266,7 +266,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_2.hpp b/include/boost/math/tools/detail/rational_horner2_2.hpp index e1dd400ae..bb2e2c4dc 100644 --- a/include/boost/math/tools/detail/rational_horner2_2.hpp +++ b/include/boost/math/tools/detail/rational_horner2_2.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } diff --git a/include/boost/math/tools/detail/rational_horner2_20.hpp b/include/boost/math/tools/detail/rational_horner2_20.hpp index 50a63c128..a591b901c 100644 --- a/include/boost/math/tools/detail/rational_horner2_20.hpp +++ b/include/boost/math/tools/detail/rational_horner2_20.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -122,7 +122,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -138,7 +138,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -154,7 +154,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -170,7 +170,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -186,7 +186,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -202,7 +202,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -218,7 +218,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -234,7 +234,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -250,7 +250,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -266,7 +266,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -282,7 +282,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_3.hpp b/include/boost/math/tools/detail/rational_horner2_3.hpp index ab0d029aa..0b410d8bb 100644 --- a/include/boost/math/tools/detail/rational_horner2_3.hpp +++ b/include/boost/math/tools/detail/rational_horner2_3.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } diff --git a/include/boost/math/tools/detail/rational_horner2_4.hpp b/include/boost/math/tools/detail/rational_horner2_4.hpp index 147f5d1da..07a9a2c5a 100644 --- a/include/boost/math/tools/detail/rational_horner2_4.hpp +++ b/include/boost/math/tools/detail/rational_horner2_4.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } diff --git a/include/boost/math/tools/detail/rational_horner2_5.hpp b/include/boost/math/tools/detail/rational_horner2_5.hpp index db5907b6f..0933ddfbc 100644 --- a/include/boost/math/tools/detail/rational_horner2_5.hpp +++ b/include/boost/math/tools/detail/rational_horner2_5.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_6.hpp b/include/boost/math/tools/detail/rational_horner2_6.hpp index b71bc150a..dee9c6e16 100644 --- a/include/boost/math/tools/detail/rational_horner2_6.hpp +++ b/include/boost/math/tools/detail/rational_horner2_6.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_7.hpp b/include/boost/math/tools/detail/rational_horner2_7.hpp index da5b1476a..6f9a85838 100644 --- a/include/boost/math/tools/detail/rational_horner2_7.hpp +++ b/include/boost/math/tools/detail/rational_horner2_7.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_8.hpp b/include/boost/math/tools/detail/rational_horner2_8.hpp index b047ad948..33dda23bb 100644 --- a/include/boost/math/tools/detail/rational_horner2_8.hpp +++ b/include/boost/math/tools/detail/rational_horner2_8.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner2_9.hpp b/include/boost/math/tools/detail/rational_horner2_9.hpp index 4eed1c430..a9025a890 100644 --- a/include/boost/math/tools/detail/rational_horner2_9.hpp +++ b/include/boost/math/tools/detail/rational_horner2_9.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -58,7 +58,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -74,7 +74,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -90,7 +90,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -106,7 +106,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_10.hpp b/include/boost/math/tools/detail/rational_horner3_10.hpp index 1fe94f8e3..b7cec124e 100644 --- a/include/boost/math/tools/detail/rational_horner3_10.hpp +++ b/include/boost/math/tools/detail/rational_horner3_10.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_11.hpp b/include/boost/math/tools/detail/rational_horner3_11.hpp index 1a4277a82..579f0e486 100644 --- a/include/boost/math/tools/detail/rational_horner3_11.hpp +++ b/include/boost/math/tools/detail/rational_horner3_11.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_12.hpp b/include/boost/math/tools/detail/rational_horner3_12.hpp index 5deb0f374..54300dd08 100644 --- a/include/boost/math/tools/detail/rational_horner3_12.hpp +++ b/include/boost/math/tools/detail/rational_horner3_12.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_13.hpp b/include/boost/math/tools/detail/rational_horner3_13.hpp index 6c6857f31..d2fc7b633 100644 --- a/include/boost/math/tools/detail/rational_horner3_13.hpp +++ b/include/boost/math/tools/detail/rational_horner3_13.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_14.hpp b/include/boost/math/tools/detail/rational_horner3_14.hpp index 1aadb35de..0b7675f49 100644 --- a/include/boost/math/tools/detail/rational_horner3_14.hpp +++ b/include/boost/math/tools/detail/rational_horner3_14.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_15.hpp b/include/boost/math/tools/detail/rational_horner3_15.hpp index 0f79e5b0d..8286caed0 100644 --- a/include/boost/math/tools/detail/rational_horner3_15.hpp +++ b/include/boost/math/tools/detail/rational_horner3_15.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -782,7 +782,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_16.hpp b/include/boost/math/tools/detail/rational_horner3_16.hpp index b7c6e96c1..fc823e416 100644 --- a/include/boost/math/tools/detail/rational_horner3_16.hpp +++ b/include/boost/math/tools/detail/rational_horner3_16.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -782,7 +782,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -900,7 +900,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_17.hpp b/include/boost/math/tools/detail/rational_horner3_17.hpp index 25328e7ff..cf7f75a70 100644 --- a/include/boost/math/tools/detail/rational_horner3_17.hpp +++ b/include/boost/math/tools/detail/rational_horner3_17.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -782,7 +782,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -900,7 +900,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1026,7 +1026,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_18.hpp b/include/boost/math/tools/detail/rational_horner3_18.hpp index 335b895c4..f853ed3e0 100644 --- a/include/boost/math/tools/detail/rational_horner3_18.hpp +++ b/include/boost/math/tools/detail/rational_horner3_18.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -782,7 +782,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -900,7 +900,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1026,7 +1026,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1160,7 +1160,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_19.hpp b/include/boost/math/tools/detail/rational_horner3_19.hpp index 22d24403e..d44e22c90 100644 --- a/include/boost/math/tools/detail/rational_horner3_19.hpp +++ b/include/boost/math/tools/detail/rational_horner3_19.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -782,7 +782,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -900,7 +900,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1026,7 +1026,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1160,7 +1160,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1302,7 +1302,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_2.hpp b/include/boost/math/tools/detail/rational_horner3_2.hpp index e1dd400ae..bb2e2c4dc 100644 --- a/include/boost/math/tools/detail/rational_horner3_2.hpp +++ b/include/boost/math/tools/detail/rational_horner3_2.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } diff --git a/include/boost/math/tools/detail/rational_horner3_20.hpp b/include/boost/math/tools/detail/rational_horner3_20.hpp index f97124afb..967edf083 100644 --- a/include/boost/math/tools/detail/rational_horner3_20.hpp +++ b/include/boost/math/tools/detail/rational_horner3_20.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -312,7 +312,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -390,7 +390,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -476,7 +476,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -570,7 +570,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -672,7 +672,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -782,7 +782,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -900,7 +900,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1026,7 +1026,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1160,7 +1160,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1302,7 +1302,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -1452,7 +1452,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_3.hpp b/include/boost/math/tools/detail/rational_horner3_3.hpp index ab0d029aa..0b410d8bb 100644 --- a/include/boost/math/tools/detail/rational_horner3_3.hpp +++ b/include/boost/math/tools/detail/rational_horner3_3.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } diff --git a/include/boost/math/tools/detail/rational_horner3_4.hpp b/include/boost/math/tools/detail/rational_horner3_4.hpp index 147f5d1da..07a9a2c5a 100644 --- a/include/boost/math/tools/detail/rational_horner3_4.hpp +++ b/include/boost/math/tools/detail/rational_horner3_4.hpp @@ -12,31 +12,31 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } diff --git a/include/boost/math/tools/detail/rational_horner3_5.hpp b/include/boost/math/tools/detail/rational_horner3_5.hpp index af1c76f1c..62c76dd50 100644 --- a/include/boost/math/tools/detail/rational_horner3_5.hpp +++ b/include/boost/math/tools/detail/rational_horner3_5.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_6.hpp b/include/boost/math/tools/detail/rational_horner3_6.hpp index 05d626ac8..f81a068ac 100644 --- a/include/boost/math/tools/detail/rational_horner3_6.hpp +++ b/include/boost/math/tools/detail/rational_horner3_6.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_7.hpp b/include/boost/math/tools/detail/rational_horner3_7.hpp index 2d91a5c50..fea457ccf 100644 --- a/include/boost/math/tools/detail/rational_horner3_7.hpp +++ b/include/boost/math/tools/detail/rational_horner3_7.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_8.hpp b/include/boost/math/tools/detail/rational_horner3_8.hpp index 3a6ea4ff0..306e2a41d 100644 --- a/include/boost/math/tools/detail/rational_horner3_8.hpp +++ b/include/boost/math/tools/detail/rational_horner3_8.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/detail/rational_horner3_9.hpp b/include/boost/math/tools/detail/rational_horner3_9.hpp index d20149b22..93a3527c1 100644 --- a/include/boost/math/tools/detail/rational_horner3_9.hpp +++ b/include/boost/math/tools/detail/rational_horner3_9.hpp @@ -12,37 +12,37 @@ namespace boost{ namespace math{ namespace tools{ namespace detail{ template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(0); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(a[0]) / static_cast(b[0]); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0])); } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -80,7 +80,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -126,7 +126,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -180,7 +180,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { @@ -242,7 +242,7 @@ BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, } template -BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*) BOOST_MATH_NOEXCEPT(V) { if((-1 <= x) && (x <= 1)) { diff --git a/include/boost/math/tools/rational.hpp b/include/boost/math/tools/rational.hpp index b65700f62..e3c3e7e33 100644 --- a/include/boost/math/tools/rational.hpp +++ b/include/boost/math/tools/rational.hpp @@ -10,9 +10,13 @@ #pragma once #endif -#include #include #include +#include + +#ifndef BOOST_MATH_HAS_NVRTC +#include +#endif #if BOOST_MATH_POLY_METHOD == 1 # define BOOST_HEADER() @@ -168,7 +172,7 @@ namespace boost{ namespace math{ namespace tools{ // Forward declaration to keep two phase lookup happy: // template -BOOST_MATH_GPU_ENABLED U evaluate_polynomial(const T* poly, U const& z, std::size_t count) BOOST_MATH_NOEXCEPT(U); +BOOST_MATH_GPU_ENABLED U evaluate_polynomial(const T* poly, U const& z, BOOST_MATH_SIZE_T count) BOOST_MATH_NOEXCEPT(U); namespace detail{ @@ -186,7 +190,7 @@ BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp // the loop expanded versions above: // template -BOOST_MATH_GPU_ENABLED inline U evaluate_polynomial(const T* poly, U const& z, std::size_t count) BOOST_MATH_NOEXCEPT(U) +BOOST_MATH_GPU_ENABLED inline U evaluate_polynomial(const T* poly, U const& z, BOOST_MATH_SIZE_T count) BOOST_MATH_NOEXCEPT(U) { BOOST_MATH_ASSERT(count > 0); U sum = static_cast(poly[count - 1]); @@ -201,64 +205,70 @@ BOOST_MATH_GPU_ENABLED inline U evaluate_polynomial(const T* poly, U const& z, s // Compile time sized polynomials, just inline forwarders to the // implementations above: // -template +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial(const T(&a)[N], const V& val) BOOST_MATH_NOEXCEPT(V) { - typedef std::integral_constant tag_type; + typedef boost::math::integral_constant tag_type; return detail::evaluate_polynomial_c_imp(static_cast(a), val, static_cast(nullptr)); } -template +#ifndef BOOST_MATH_HAS_NVRTC +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial(const std::array& a, const V& val) BOOST_MATH_NOEXCEPT(V) { - typedef std::integral_constant tag_type; + typedef boost::math::integral_constant tag_type; return detail::evaluate_polynomial_c_imp(static_cast(a.data()), val, static_cast(nullptr)); } +#endif // // Even polynomials are trivial: just square the argument! // template -BOOST_MATH_GPU_ENABLED inline U evaluate_even_polynomial(const T* poly, U z, std::size_t count) BOOST_MATH_NOEXCEPT(U) +BOOST_MATH_GPU_ENABLED inline U evaluate_even_polynomial(const T* poly, U z, BOOST_MATH_SIZE_T count) BOOST_MATH_NOEXCEPT(U) { return evaluate_polynomial(poly, U(z*z), count); } -template +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_even_polynomial(const T(&a)[N], const V& z) BOOST_MATH_NOEXCEPT(V) { return evaluate_polynomial(a, V(z*z)); } -template +#ifndef BOOST_MATH_HAS_NVRTC +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_even_polynomial(const std::array& a, const V& z) BOOST_MATH_NOEXCEPT(V) { return evaluate_polynomial(a, V(z*z)); } +#endif // // Odd polynomials come next: // template -BOOST_MATH_GPU_ENABLED inline U evaluate_odd_polynomial(const T* poly, U z, std::size_t count) BOOST_MATH_NOEXCEPT(U) +BOOST_MATH_GPU_ENABLED inline U evaluate_odd_polynomial(const T* poly, U z, BOOST_MATH_SIZE_T count) BOOST_MATH_NOEXCEPT(U) { return poly[0] + z * evaluate_polynomial(poly+1, U(z*z), count-1); } -template +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_odd_polynomial(const T(&a)[N], const V& z) BOOST_MATH_NOEXCEPT(V) { - typedef std::integral_constant tag_type; + typedef boost::math::integral_constant tag_type; return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a) + 1, V(z*z), static_cast(nullptr)); } -template +#ifndef BOOST_MATH_HAS_NVRTC +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_odd_polynomial(const std::array& a, const V& z) BOOST_MATH_NOEXCEPT(V) { - typedef std::integral_constant tag_type; + typedef boost::math::integral_constant tag_type; return a[0] + z * detail::evaluate_polynomial_c_imp(static_cast(a.data()) + 1, V(z*z), static_cast(nullptr)); } +#endif template -BOOST_MATH_GPU_ENABLED V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count) BOOST_MATH_NOEXCEPT(V); +BOOST_MATH_GPU_ENABLED V evaluate_rational(const T* num, const U* denom, const V& z_, BOOST_MATH_SIZE_T count) BOOST_MATH_NOEXCEPT(V); namespace detail{ @@ -278,7 +288,7 @@ BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(c // in our Lanczos code for example. // template -BOOST_MATH_GPU_ENABLED V evaluate_rational(const T* num, const U* denom, const V& z_, std::size_t count) BOOST_MATH_NOEXCEPT(V) +BOOST_MATH_GPU_ENABLED V evaluate_rational(const T* num, const U* denom, const V& z_, BOOST_MATH_SIZE_T count) BOOST_MATH_NOEXCEPT(V) { V z(z_); V s1, s2; @@ -310,17 +320,19 @@ BOOST_MATH_GPU_ENABLED V evaluate_rational(const T* num, const U* denom, const V return s1 / s2; } -template +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_rational(const T(&a)[N], const U(&b)[N], const V& z) BOOST_MATH_NOEXCEPT(V) { - return detail::evaluate_rational_c_imp(a, b, z, static_cast*>(nullptr)); + return detail::evaluate_rational_c_imp(a, b, z, static_cast*>(nullptr)); } -template +#ifndef BOOST_MATH_HAS_NVRTC +template BOOST_MATH_GPU_ENABLED BOOST_MATH_GPU_ENABLED inline V evaluate_rational(const std::array& a, const std::array& b, const V& z) BOOST_MATH_NOEXCEPT(V) { - return detail::evaluate_rational_c_imp(a.data(), b.data(), z, static_cast*>(nullptr)); + return detail::evaluate_rational_c_imp(a.data(), b.data(), z, static_cast*>(nullptr)); } +#endif } // namespace tools } // namespace math diff --git a/tools/generate_rational_code.cpp b/tools/generate_rational_code.cpp index 92b7da9a1..20ffde850 100644 --- a/tools/generate_rational_code.cpp +++ b/tools/generate_rational_code.cpp @@ -40,13 +40,13 @@ void print_polynomials(int max_order) "#define BOOST_MATH_TOOLS_POLY_EVAL_" << i << "_HPP\n\n" "namespace boost{ namespace math{ namespace tools{ namespace detail{\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(0);\n" "}\n" "\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[0]);\n" "}\n\n"; @@ -55,7 +55,7 @@ void print_polynomials(int max_order) { ofs << "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast("; @@ -90,28 +90,28 @@ void print_polynomials(int max_order) "#define BOOST_MATH_TOOLS_POLY_EVAL_" << i << "_HPP\n\n" "namespace boost{ namespace math{ namespace tools{ namespace detail{\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(0);\n" "}\n" "\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[1] * x + a[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast((a[2] * x + a[1]) * x + a[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);\n" "}\n\n"; @@ -120,7 +120,7 @@ void print_polynomials(int max_order) { ofs << "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " V x2 = x * x;\n" " return static_cast("; @@ -186,28 +186,28 @@ void print_polynomials(int max_order) "#define BOOST_MATH_TOOLS_POLY_EVAL_" << i << "_HPP\n\n" "namespace boost{ namespace math{ namespace tools{ namespace detail{\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T*, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(0);\n" "}\n" "\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[1] * x + a[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast((a[2] * x + a[1]) * x + a[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);\n" "}\n\n"; @@ -216,7 +216,7 @@ void print_polynomials(int max_order) { ofs << "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_polynomial_c_imp(const T* a, const V& x, const boost::math::integral_constant*)\n" "{\n" " V x2 = x * x;\n" " V t[2];\n"; @@ -281,13 +281,13 @@ void print_rationals(int max_order) "#define BOOST_MATH_TOOLS_POLY_RAT_" << i << "_HPP\n\n" "namespace boost{ namespace math{ namespace tools{ namespace detail{\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(0);\n" "}\n" "\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[0]) / static_cast(b[0]);\n" "}\n\n"; @@ -296,7 +296,7 @@ void print_rationals(int max_order) { ofs << "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " if((-1 <= x) && (x <= 1))\n" " return static_cast(("; @@ -361,28 +361,28 @@ void print_rationals(int max_order) "#define BOOST_MATH_TOOLS_RAT_EVAL_" << i << "_HPP\n\n" "namespace boost{ namespace math{ namespace tools{ namespace detail{\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(0);\n" "}\n" "\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[0]) / static_cast(b[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0]));\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));\n" "}\n\n"; @@ -391,7 +391,7 @@ void print_rationals(int max_order) { ofs << "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " if((-1 <= x) && (x <= 1))\n {\n" " V x2 = x * x;\n" @@ -577,28 +577,28 @@ void print_rationals(int max_order) "#define BOOST_MATH_TOOLS_RAT_EVAL_" << i << "_HPP\n\n" "namespace boost{ namespace math{ namespace tools{ namespace detail{\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T*, const U*, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(0);\n" "}\n" "\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const boost::math::integral_constant*)\n" "{\n" " return static_cast(a[0]) / static_cast(b[0]);\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast((a[1] * x + a[0]) / (b[1] * x + b[0]));\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));\n" "}\n\n" "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " return static_cast((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));\n" "}\n\n"; @@ -607,7 +607,7 @@ void print_rationals(int max_order) { ofs << "template \n" - "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const std::integral_constant*)\n" + "BOOST_MATH_GPU_ENABLED inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const boost::math::integral_constant*)\n" "{\n" " if((-1 <= x) && (x <= 1))\n {\n" " V x2 = x * x;\n" From da6abf9fb3700e51584c964dcd513373dee9a55d Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:16:42 -0400 Subject: [PATCH 13/24] Add GPU definition of assertions --- include/boost/math/tools/assert.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/include/boost/math/tools/assert.hpp b/include/boost/math/tools/assert.hpp index 3d5655923..3f57351fc 100644 --- a/include/boost/math/tools/assert.hpp +++ b/include/boost/math/tools/assert.hpp @@ -10,6 +10,19 @@ #ifndef BOOST_MATH_TOOLS_ASSERT_HPP #define BOOST_MATH_TOOLS_ASSERT_HPP +#include + +#ifdef BOOST_MATH_HAS_GPU_SUPPORT + +// Run time asserts are generally unsupported + +#define BOOST_MATH_ASSERT(expr) +#define BOOST_MATH_ASSERT_MSG(expr, msg) +#define BOOST_MATH_STATIC_ASSERT(expr) static_assert(expr, #expr " failed") +#define BOOST_MATH_STATIC_ASSERT_MSG(expr, msg) static_assert(expr, msg) + +#else + #include #ifndef BOOST_MATH_STANDALONE @@ -29,6 +42,8 @@ #define BOOST_MATH_STATIC_ASSERT(expr) static_assert(expr, #expr " failed") #define BOOST_MATH_STATIC_ASSERT_MSG(expr, msg) static_assert(expr, msg) -#endif +#endif // Is standalone + +#endif // BOOST_MATH_HAS_GPU_SUPPORT #endif // BOOST_MATH_TOOLS_ASSERT_HPP From 865eacb8c78dc1e8f3966c09b2359696503f84a0 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:37:51 -0400 Subject: [PATCH 14/24] Apply promotion changes from https://github.com/boostorg/math/pull/1022 --- include/boost/math/tools/promotion.hpp | 318 ++++++------------------- 1 file changed, 71 insertions(+), 247 deletions(-) diff --git a/include/boost/math/tools/promotion.hpp b/include/boost/math/tools/promotion.hpp index c117e9575..a65f3703f 100644 --- a/include/boost/math/tools/promotion.hpp +++ b/include/boost/math/tools/promotion.hpp @@ -3,6 +3,7 @@ // Copyright John Maddock 2006. // Copyright Paul A. Bristow 2006. // Copyright Matt Borland 2023. +// Copyright Ryan Elandt 2023. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. @@ -24,15 +25,7 @@ #endif #include -#include - -#if defined __has_include -# if __cplusplus > 202002L || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) -# if __has_include () -# include -# endif -# endif -#endif +#include namespace boost { @@ -40,272 +33,103 @@ namespace boost { namespace tools { + ///// This promotion system works as follows: + // + // Rule (one argument promotion rule): + // - Promotes `T` to `double` if `T` is an integer type as identified by + // `std::is_integral`, otherwise is `T` + // + // Rule (two or more argument promotion rule): + // - 1. Calculates type using applying Rule. + // - 2. Calculates type using applying Rule + // - If the type calculated in 1 and 2 are both floating point types, as + // identified by `std::is_floating_point`, then return the type + // determined by `std::common_type`. Otherwise return the type using + // an asymmetric convertibility rule. + // + ///// Discussion: + // // If either T1 or T2 is an integer type, // pretend it was a double (for the purposes of further analysis). // Then pick the wider of the two floating-point types // as the actual signature to forward to. // For example: - // foo(int, short) -> double foo(double, double); - // foo(int, float) -> double foo(double, double); - // Note: NOT float foo(float, float) - // foo(int, double) -> foo(double, double); - // foo(double, float) -> double foo(double, double); - // foo(double, float) -> double foo(double, double); - // foo(any-int-or-float-type, long double) -> foo(long double, long double); - // but ONLY float foo(float, float) is unchanged. - // So the only way to get an entirely float version is to call foo(1.F, 2.F), - // But since most (all?) the math functions convert to double internally, - // probably there would not be the hoped-for gain by using float here. - + // foo(int, short) -> double foo(double, double); // ***NOT*** float foo(float, float) + // foo(int, float) -> double foo(double, double); // ***NOT*** float foo(float, float) + // foo(int, double) -> foo(double, double); + // foo(double, float) -> double foo(double, double); + // foo(double, float) -> double foo(double, double); + // foo(any-int-or-float-type, long double) -> foo(long double, long double); + // ONLY float foo(float, float) is unchanged, so the only way to get an + // entirely float version is to call foo(1.F, 2.F). But since most (all?) the + // math functions convert to double internally, probably there would not be the + // hoped-for gain by using float here. + // // This follows the C-compatible conversion rules of pow, etc // where pow(int, float) is converted to pow(double, double). + + // Promotes a single argument to double if it is an integer type template - struct promote_arg - { // If T is integral type, then promote to double. - using type = typename std::conditional::value, double, T>::type; + struct promote_arg { + using type = typename boost::math::conditional::value, double, T>::type; }; - // These full specialisations reduce std::conditional usage and speed up - // compilation: - template <> struct promote_arg { using type = float; }; - template <> struct promote_arg{ using type = double; }; - template <> struct promote_arg { using type = long double; }; - template <> struct promote_arg { using type = double; }; - #ifdef __STDCPP_FLOAT16_T__ - template <> struct promote_arg { using type = std::float16_t; }; - #endif - #ifdef __STDCPP_FLOAT32_T__ - template <> struct promote_arg { using type = std::float32_t; }; - #endif - #ifdef __STDCPP_FLOAT64_T__ - template <> struct promote_arg { using type = std::float64_t; }; - #endif - #ifdef __STDCPP_FLOAT128_T__ - template <> struct promote_arg { using type = std::float128_t; }; - #endif - - template - using promote_arg_t = typename promote_arg::type; + // Promotes two arguments, neither of which is an integer type using an asymmetric + // convertibility rule. + template ::value && boost::math::is_floating_point::value)> + struct pa2_integral_already_removed { + using type = typename boost::math::conditional< + !boost::math::is_floating_point::value && boost::math::is_convertible::value, + T2, T1>::type; + }; + // For two floating point types, promotes using `std::common_type` functionality template - struct promote_args_2 - { // Promote, if necessary, & pick the wider of the two floating-point types. - // for both parameter types, if integral promote to double. - using T1P = typename promote_arg::type; // T1 perhaps promoted. - using T2P = typename promote_arg::type; // T2 perhaps promoted. - using intermediate_type = typename std::conditional< - std::is_floating_point::value && std::is_floating_point::value, // both T1P and T2P are floating-point? -#ifdef __STDCPP_FLOAT128_T__ - typename std::conditional::value || std::is_same::value, // either long double? - std::float128_t, -#endif -#ifdef BOOST_MATH_USE_FLOAT128 - typename std::conditional::value || std::is_same<__float128, T2P>::value, // either long double? - __float128, -#endif - typename std::conditional::value || std::is_same::value, // either long double? - long double, // then result type is long double. -#ifdef __STDCPP_FLOAT64_T__ - typename std::conditional::value || std::is_same::value, // either float64? - std::float64_t, // then result type is float64_t. -#endif - typename std::conditional::value || std::is_same::value, // either double? - double, // result type is double. -#ifdef __STDCPP_FLOAT32_T__ - typename std::conditional::value || std::is_same::value, // either float32? - std::float32_t, // then result type is float32_t. -#endif - float // else result type is float. - >::type -#ifdef BOOST_MATH_USE_FLOAT128 - >::type -#endif -#ifdef __STDCPP_FLOAT128_T__ - >::type -#endif -#ifdef __STDCPP_FLOAT64_T__ - >::type -#endif -#ifdef __STDCPP_FLOAT32_T__ - >::type -#endif - >::type, - // else one or the other is a user-defined type: - typename std::conditional::value && std::is_convertible::value, T2P, T1P>::type>::type; - -#ifdef __STDCPP_FLOAT64_T__ - // If long doubles are doubles then we should prefer to use std::float64_t when available - using type = std::conditional_t<(sizeof(double) == sizeof(long double) && std::is_same::value), std::float64_t, intermediate_type>; -#else - using type = intermediate_type; -#endif - }; // promote_arg2 - // These full specialisations reduce std::conditional usage and speed up - // compilation: - template <> struct promote_args_2 { using type = float; }; - template <> struct promote_args_2{ using type = double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - - #ifdef __STDCPP_FLOAT128_T__ - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - - #ifdef __STDCPP_FLOAT16_T__ - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - #endif - - #ifdef __STDCPP_FLOAT32_T__ - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - #endif - - #ifdef __STDCPP_FLOAT64_T__ - template <> struct promote_args_2 { using type = std::float128_t; }; - template <> struct promote_args_2 { using type = std::float128_t; }; - #endif - - template <> struct promote_args_2 { using type = std::float128_t; }; - #endif - - #ifdef __STDCPP_FLOAT64_T__ - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - - #ifdef __STDCPP_FLOAT16_T__ - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - #endif - - #ifdef __STDCPP_FLOAT32_T__ - template <> struct promote_args_2 { using type = std::float64_t; }; - template <> struct promote_args_2 { using type = std::float64_t; }; - #endif - - template <> struct promote_args_2 { using type = std::float64_t; }; - #endif - - #ifdef __STDCPP_FLOAT32_T__ - template <> struct promote_args_2 { using type = std::float32_t; }; - template <> struct promote_args_2 { using type = std::float32_t; }; - template <> struct promote_args_2 { using type = std::float32_t; }; - template <> struct promote_args_2 { using type = std::float32_t; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - - #ifdef __STDCPP_FLOAT16_T__ - template <> struct promote_args_2 { using type = std::float32_t; }; - template <> struct promote_args_2 { using type = std::float32_t; }; - #endif - - template <> struct promote_args_2 { using type = std::float32_t; }; - #endif + struct pa2_integral_already_removed { + using type = boost::math::common_type_t; + }; - #ifdef __STDCPP_FLOAT16_T__ - template <> struct promote_args_2 { using type = std::float16_t; }; - template <> struct promote_args_2 { using type = std::float16_t; }; - template <> struct promote_args_2 { using type = float; }; - template <> struct promote_args_2 { using type = float; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = long double; }; - template <> struct promote_args_2 { using type = std::float16_t; }; - #endif + // Template definition for promote_args_permissive + template + struct promote_args_permissive; + // Specialization for one argument + template + struct promote_args_permissive { + using type = typename promote_arg::type>::type; + }; + // Specialization for two or more arguments + template + struct promote_args_permissive { + using type = typename pa2_integral_already_removed< + typename promote_args_permissive::type, + typename promote_args_permissive::type + >::type; + }; - template - using promote_args_2_t = typename promote_args_2::type; + template + using promote_args_permissive_t = typename promote_args_permissive::type; - template - struct promote_args - { - using type = typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, typename std::remove_cv::type - >::type - >::type - >::type - >::type - >::type; + // Same as `promote_args_permissive` but with a static assertion that the promoted type + // is not `long double` if `BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS` is defined + template + struct promote_args { + using type = typename promote_args_permissive::type; #if defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) // // Guard against use of long double if it's not supported: // - static_assert((0 == std::is_same::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented."); + static_assert((0 == boost::math::is_same::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented."); #endif }; - template - using promote_args_t = typename promote_args::type; - - // - // This struct is the same as above, but has no static assert on long double usage, - // it should be used only on functions that can be implemented for long double - // even when std lib support is missing or broken for that type. - // - template - struct promote_args_permissive - { - using type = typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, - typename promote_args_2< - typename std::remove_cv::type, typename std::remove_cv::type - >::type - >::type - >::type - >::type - >::type; - }; - - template - using promote_args_permissive_t = typename promote_args_permissive::type; + template + using promote_args_t = typename promote_args::type; } // namespace tools } // namespace math } // namespace boost #endif // BOOST_MATH_PROMOTION_HPP - From 5261cf3dfe914e7ce92415712b2148b35c4cab0b Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:38:07 -0400 Subject: [PATCH 15/24] Fix old promotion args --- include/boost/math/ccmath/copysign.hpp | 2 +- include/boost/math/ccmath/fdim.hpp | 2 +- include/boost/math/ccmath/fmax.hpp | 2 +- include/boost/math/ccmath/fmin.hpp | 2 +- include/boost/math/ccmath/hypot.hpp | 2 +- include/boost/math/differentiation/autodiff.hpp | 14 +++++++------- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/math/ccmath/copysign.hpp b/include/boost/math/ccmath/copysign.hpp index 90a58102b..e117e57fa 100644 --- a/include/boost/math/ccmath/copysign.hpp +++ b/include/boost/math/ccmath/copysign.hpp @@ -54,7 +54,7 @@ constexpr auto copysign(T1 mag, T2 sgn) noexcept { if (BOOST_MATH_IS_CONSTANT_EVALUATED(mag)) { - using promoted_type = boost::math::tools::promote_args_2_t; + using promoted_type = boost::math::tools::promote_args_t; return boost::math::ccmath::copysign(static_cast(mag), static_cast(sgn)); } else diff --git a/include/boost/math/ccmath/fdim.hpp b/include/boost/math/ccmath/fdim.hpp index cdcbc223c..d6b4e25ce 100644 --- a/include/boost/math/ccmath/fdim.hpp +++ b/include/boost/math/ccmath/fdim.hpp @@ -66,7 +66,7 @@ constexpr auto fdim(T1 x, T2 y) noexcept { if (BOOST_MATH_IS_CONSTANT_EVALUATED(x)) { - using promoted_type = boost::math::tools::promote_args_2_t; + using promoted_type = boost::math::tools::promote_args_t; return boost::math::ccmath::fdim(promoted_type(x), promoted_type(y)); } else diff --git a/include/boost/math/ccmath/fmax.hpp b/include/boost/math/ccmath/fmax.hpp index 237355275..8a0d17d03 100644 --- a/include/boost/math/ccmath/fmax.hpp +++ b/include/boost/math/ccmath/fmax.hpp @@ -62,7 +62,7 @@ constexpr auto fmax(T1 x, T2 y) noexcept { if (BOOST_MATH_IS_CONSTANT_EVALUATED(x)) { - using promoted_type = boost::math::tools::promote_args_2_t; + using promoted_type = boost::math::tools::promote_args_t; return boost::math::ccmath::fmax(static_cast(x), static_cast(y)); } else diff --git a/include/boost/math/ccmath/fmin.hpp b/include/boost/math/ccmath/fmin.hpp index 1c113e0d6..29885b69c 100644 --- a/include/boost/math/ccmath/fmin.hpp +++ b/include/boost/math/ccmath/fmin.hpp @@ -62,7 +62,7 @@ constexpr auto fmin(T1 x, T2 y) noexcept { if (BOOST_MATH_IS_CONSTANT_EVALUATED(x)) { - using promoted_type = boost::math::tools::promote_args_2_t; + using promoted_type = boost::math::tools::promote_args_t; return boost::math::ccmath::fmin(static_cast(x), static_cast(y)); } else diff --git a/include/boost/math/ccmath/hypot.hpp b/include/boost/math/ccmath/hypot.hpp index 4e0e245b4..34dd5ab2c 100644 --- a/include/boost/math/ccmath/hypot.hpp +++ b/include/boost/math/ccmath/hypot.hpp @@ -89,7 +89,7 @@ constexpr auto hypot(T1 x, T2 y) noexcept { if(BOOST_MATH_IS_CONSTANT_EVALUATED(x)) { - using promoted_type = boost::math::tools::promote_args_2_t; + using promoted_type = boost::math::tools::promote_args_t; return boost::math::ccmath::hypot(static_cast(x), static_cast(y)); } else diff --git a/include/boost/math/differentiation/autodiff.hpp b/include/boost/math/differentiation/autodiff.hpp index 7a57aa2f9..b8880f24d 100644 --- a/include/boost/math/differentiation/autodiff.hpp +++ b/include/boost/math/differentiation/autodiff.hpp @@ -39,7 +39,7 @@ namespace detail { template struct promote_args_n { - using type = typename tools::promote_args_2::type>::type; + using type = typename tools::promote_args::type>::type; }; template @@ -2002,9 +2002,9 @@ using autodiff_root_type = typename autodiff_fvar_type::root_ty // See boost/math/tools/promotion.hpp template -struct promote_args_2, +struct promote_args, detail::autodiff_fvar_type> { - using type = detail::autodiff_fvar_type::type, + using type = detail::autodiff_fvar_type::type, #ifndef BOOST_MATH_NO_CXX14_CONSTEXPR (std::max)(Order0, Order1)>; #else @@ -2018,13 +2018,13 @@ struct promote_args> { }; template -struct promote_args_2, RealType1> { - using type = detail::autodiff_fvar_type::type, Order0>; +struct promote_args, RealType1> { + using type = detail::autodiff_fvar_type::type, Order0>; }; template -struct promote_args_2> { - using type = detail::autodiff_fvar_type::type, Order1>; +struct promote_args> { + using type = detail::autodiff_fvar_type::type, Order1>; }; template From cbdb7207a8e947bbb87a31f79cdf4f2313cf8404 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:38:30 -0400 Subject: [PATCH 16/24] Add NVRTC definition of BOOST_MATH_NOEXCEPT --- include/boost/math/tools/config.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index eeee11671..2048cfbc1 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -793,6 +793,8 @@ BOOST_MATH_GPU_ENABLED constexpr T cuda_safe_max(const T& a, const T& b) { retur #define BOOST_MATH_STATIC static +#define BOOST_MATH_NOEXCEPT(T) noexcept(boost::math::is_floating_point_v) + template BOOST_MATH_GPU_ENABLED constexpr void gpu_safe_swap(T& a, T& b) { T t(a); a = b; b = t; } From 0089d4cb9d1fa2fa0055aa1154e7ca05d4725b4b Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:59:05 -0400 Subject: [PATCH 17/24] Add GPU to macro definitions --- include/boost/math/policies/policy.hpp | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/boost/math/policies/policy.hpp b/include/boost/math/policies/policy.hpp index a17dfe6db..432191362 100644 --- a/include/boost/math/policies/policy.hpp +++ b/include/boost/math/policies/policy.hpp @@ -135,16 +135,16 @@ namespace policies{ \ namespace detail{ \ template \ - char test_is_valid_arg(const name* = nullptr); \ - char test_is_default_arg(const name* = nullptr); \ + BOOST_MATH_GPU_ENABLED char test_is_valid_arg(const name* = nullptr); \ + BOOST_MATH_GPU_ENABLED char test_is_default_arg(const name* = nullptr); \ \ template \ class is_##name##_imp \ { \ private: \ template \ - static char test(const name* = nullptr); \ - static double test(...); \ + BOOST_MATH_GPU_ENABLED static char test(const name* = nullptr); \ + BOOST_MATH_GPU_ENABLED static double test(...); \ public: \ static constexpr bool value = sizeof(test(static_cast(nullptr))) == sizeof(char); \ }; \ @@ -164,16 +164,16 @@ namespace policies{ \ namespace detail{ \ template \ - char test_is_valid_arg(const name* = nullptr); \ - char test_is_default_arg(const name* = nullptr); \ + BOOST_MATH_GPU_ENABLED char test_is_valid_arg(const name* = nullptr); \ + BOOST_MATH_GPU_ENABLED char test_is_default_arg(const name* = nullptr); \ \ template \ class is_##name##_imp \ { \ private: \ template \ - static char test(const name* = nullptr); \ - static double test(...); \ + BOOST_MATH_GPU_ENABLED static char test(const name* = nullptr); \ + BOOST_MATH_GPU_ENABLED static double test(...); \ public: \ static constexpr bool value = sizeof(test(static_cast(nullptr))) == sizeof(char); \ }; \ @@ -273,10 +273,10 @@ struct precision #endif }; -double test_is_valid_arg(...); -double test_is_default_arg(...); -char test_is_valid_arg(const default_policy*); -char test_is_default_arg(const default_policy*); +BOOST_MATH_GPU_ENABLED double test_is_valid_arg(...); +BOOST_MATH_GPU_ENABLED double test_is_default_arg(...); +BOOST_MATH_GPU_ENABLED char test_is_valid_arg(const default_policy*); +BOOST_MATH_GPU_ENABLED char test_is_default_arg(const default_policy*); template class is_valid_policy_imp @@ -934,8 +934,8 @@ template -char test_is_policy(const policy*); -double test_is_policy(...); +BOOST_MATH_GPU_ENABLED char test_is_policy(const policy*); +BOOST_MATH_GPU_ENABLED double test_is_policy(...); template class is_policy_imp From 7818b0648013d0f5cf91b6cdf2756613ea4a9e28 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 14:59:21 -0400 Subject: [PATCH 18/24] Add more macro definitions --- include/boost/math/tools/config.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index 2048cfbc1..dc358852b 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -794,6 +794,8 @@ BOOST_MATH_GPU_ENABLED constexpr T cuda_safe_max(const T& a, const T& b) { retur #define BOOST_MATH_STATIC static #define BOOST_MATH_NOEXCEPT(T) noexcept(boost::math::is_floating_point_v) +#define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T) +#define BOOST_MATH_BIG_CONSTANT(T, N, V) static_cast(V) template BOOST_MATH_GPU_ENABLED constexpr void gpu_safe_swap(T& a, T& b) { T t(a); a = b; b = t; } From f060ae2260747d96fd1c57d64bc3af0b77955d3d Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 15:53:53 -0400 Subject: [PATCH 19/24] Remove old workaround --- .../boost/math/policies/error_handling.hpp | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index 0f85023be..b1c0d8e3e 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -336,32 +336,6 @@ BOOST_MATH_GPU_ENABLED constexpr T raise_overflow_error( return boost::math::numeric_limits::has_infinity ? boost::math::numeric_limits::infinity() : boost::math::tools::max_value(); } -#ifdef BOOST_MATH_HAS_GPU_SUPPORT - -template <> -BOOST_MATH_GPU_ENABLED constexpr float raise_overflow_error( - const char* , - const char* , - const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(float) -{ - // This may or may not do the right thing, but the user asked for the error - // to be ignored so here we go anyway: - return static_cast(INFINITY); -} - -template <> -BOOST_MATH_GPU_ENABLED constexpr double raise_overflow_error( - const char* , - const char* , - const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(double) -{ - // This may or may not do the right thing, but the user asked for the error - // to be ignored so here we go anyway: - return INFINITY; -} - -#endif - template BOOST_MATH_GPU_ENABLED constexpr T raise_overflow_error( const char* , From dc8469f346c653190dceab4829a1b0b1fd87ba16 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 16:19:12 -0400 Subject: [PATCH 20/24] Add NVRTC capable error handling --- .../boost/math/policies/error_handling.hpp | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) diff --git a/include/boost/math/policies/error_handling.hpp b/include/boost/math/policies/error_handling.hpp index b1c0d8e3e..d1d74c534 100644 --- a/include/boost/math/policies/error_handling.hpp +++ b/include/boost/math/policies/error_handling.hpp @@ -10,6 +10,9 @@ #include #include + +#ifndef BOOST_MATH_HAS_NVRTC + #include #include #include @@ -892,5 +895,149 @@ BOOST_MATH_GPU_ENABLED std::pair pair_from_single(const T& val) BOOST_MATH }} // namespaces boost/math +#else // Special values for NVRTC + +namespace boost { +namespace math { +namespace policies { + +template +BOOST_MATH_GPU_ENABLED constexpr T raise_domain_error( + const char* , + const char* , + const T& , + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return boost::math::numeric_limits::quiet_NaN(); +} + +template +BOOST_MATH_GPU_ENABLED constexpr T raise_pole_error( + const char* function, + const char* message, + const T& val, + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + return boost::math::numeric_limits::quiet_NaN(); +} + +template +BOOST_MATH_GPU_ENABLED constexpr T raise_overflow_error( + const char* , + const char* , + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return boost::math::numeric_limits::has_infinity ? boost::math::numeric_limits::infinity() : (boost::math::numeric_limits::max)(); +} + +template +BOOST_MATH_GPU_ENABLED constexpr T raise_overflow_error( + const char* , + const char* , + const T&, + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return boost::math::numeric_limits::has_infinity ? boost::math::numeric_limits::infinity() : (boost::math::numeric_limits::max)(); +} + +template +BOOST_MATH_GPU_ENABLED constexpr T raise_underflow_error( + const char* , + const char* , + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return static_cast(0); +} + +template +BOOST_MATH_GPU_ENABLED inline constexpr T raise_denorm_error( + const char* , + const char* , + const T& val, + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return val; +} + +template +BOOST_MATH_GPU_ENABLED constexpr T raise_evaluation_error( + const char* , + const char* , + const T& val, + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return val; +} + +template +BOOST_MATH_GPU_ENABLED constexpr TargetType raise_rounding_error( + const char* , + const char* , + const T& val, + const TargetType&, + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + static_assert(boost::math::numeric_limits::is_specialized, "The target type must have std::numeric_limits specialized."); + return val > 0 ? (boost::math::numeric_limits::max)() : (boost::math::numeric_limits::is_integer ? (boost::math::numeric_limits::min)() : -(boost::math::numeric_limits::max)()); +} + +template +BOOST_MATH_GPU_ENABLED inline constexpr T raise_indeterminate_result_error( + const char* , + const char* , + const T& , + const R& result, + const Policy&) BOOST_MATH_NOEXCEPT(T) +{ + // This may or may not do the right thing, but the user asked for the error + // to be ignored so here we go anyway: + return result; +} + +template +BOOST_MATH_GPU_ENABLED BOOST_MATH_FORCEINLINE R checked_narrowing_cast(T val, const char* function) noexcept(boost::math::is_floating_point_v && boost::math::is_floating_point_v) +{ + // We only have ignore error policy so no reason to check + return static_cast(val); +} + +template +BOOST_MATH_GPU_ENABLED inline void check_series_iterations(const char* function, BOOST_MATH_UINTMAX_T max_iter, const Policy& pol) noexcept(boost::math::is_floating_point_v) +{ + if(max_iter >= policies::get_max_series_iterations()) + raise_evaluation_error( + function, + "Series evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); +} + +template +BOOST_MATH_GPU_ENABLED inline void check_root_iterations(const char* function, BOOST_MATH_UINTMAX_T max_iter, const Policy& pol) noexcept(boost::math::is_floating_point_v) +{ + if(max_iter >= policies::get_max_root_iterations()) + raise_evaluation_error( + function, + "Root finding evaluation exceeded %1% iterations, giving up now.", static_cast(static_cast(max_iter)), pol); +} + +} // namespace policies +} // namespace math +} // namespace boost + +#endif + #endif // BOOST_MATH_POLICY_ERROR_HANDLING_HPP From 333e85f6826695e0d69d1403f5a75d860dd84625 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 16:19:24 -0400 Subject: [PATCH 21/24] Add missing macros --- include/boost/math/tools/config.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/math/tools/config.hpp b/include/boost/math/tools/config.hpp index dc358852b..4c8e3dcf3 100644 --- a/include/boost/math/tools/config.hpp +++ b/include/boost/math/tools/config.hpp @@ -796,6 +796,8 @@ BOOST_MATH_GPU_ENABLED constexpr T cuda_safe_max(const T& a, const T& b) { retur #define BOOST_MATH_NOEXCEPT(T) noexcept(boost::math::is_floating_point_v) #define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T) #define BOOST_MATH_BIG_CONSTANT(T, N, V) static_cast(V) +#define BOOST_MATH_FORCEINLINE __forceinline__ +#define BOOST_MATH_STD_USING template BOOST_MATH_GPU_ENABLED constexpr void gpu_safe_swap(T& a, T& b) { T t(a); a = b; b = t; } From 067efe69f7dd9b705af898a422eaeeace9b8b574 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 16:27:36 -0400 Subject: [PATCH 22/24] Add NVRTC support to constants --- include/boost/math/constants/constants.hpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/include/boost/math/constants/constants.hpp b/include/boost/math/constants/constants.hpp index bd2afd714..df702bf89 100644 --- a/include/boost/math/constants/constants.hpp +++ b/include/boost/math/constants/constants.hpp @@ -1,5 +1,6 @@ // Copyright John Maddock 2005-2006, 2011. // Copyright Paul A. Bristow 2006-2011. +// Copyright Matt Borland 2024. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -8,6 +9,9 @@ #define BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED #include + +#ifndef BOOST_MATH_HAS_NVRTC + #include #include #include @@ -243,6 +247,16 @@ namespace boost{ namespace math namespace long_double_constants{ static constexpr long double name = BOOST_MATH_JOIN(x, L); }\ namespace constants{ +#else // NVRTC simplified macro definition + +#define BOOST_DEFINE_MATH_CONSTANT(name, value, str_value) template BOOST_MATH_GPU_ENABLED constexpr T name() noexcept { return static_cast(value); } + +namespace boost { +namespace math { +namespace constants { + +#endif + BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01") BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01") BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01") @@ -318,14 +332,12 @@ namespace boost{ namespace math BOOST_DEFINE_MATH_CONSTANT(one_div_pi, 0.3183098861837906715377675267450287240689192, "0.31830988618379067153776752674502872406891929148091289749533468811779359526845307018022760553250617191214568545351") BOOST_DEFINE_MATH_CONSTANT(two_div_root_pi, 1.12837916709551257389615890312154517168810125, "1.12837916709551257389615890312154517168810125865799771368817144342128493688298682897348732040421472688605669581272") -#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900) BOOST_DEFINE_MATH_CONSTANT(first_feigenbaum, 4.66920160910299067185320382046620161725818557747576863274, "4.6692016091029906718532038204662016172581855774757686327456513430041343302113147371386897440239480138171") BOOST_DEFINE_MATH_CONSTANT(plastic, 1.324717957244746025960908854478097340734404056901733364534, "1.32471795724474602596090885447809734073440405690173336453401505030282785124554759405469934798178728032991") BOOST_DEFINE_MATH_CONSTANT(gauss, 0.834626841674073186281429732799046808993993013490347002449, "0.83462684167407318628142973279904680899399301349034700244982737010368199270952641186969116035127532412906785") BOOST_DEFINE_MATH_CONSTANT(dottie, 0.739085133215160641655312087673873404013411758900757464965, "0.739085133215160641655312087673873404013411758900757464965680635773284654883547594599376106931766531849801246") BOOST_DEFINE_MATH_CONSTANT(reciprocal_fibonacci, 3.35988566624317755317201130291892717968890513, "3.35988566624317755317201130291892717968890513373196848649555381532513031899668338361541621645679008729704") BOOST_DEFINE_MATH_CONSTANT(laplace_limit, 0.662743419349181580974742097109252907056233549115022417, "0.66274341934918158097474209710925290705623354911502241752039253499097185308651127724965480259895818168") -#endif template BOOST_MATH_GPU_ENABLED inline constexpr T tau() { return two_pi(); } @@ -338,7 +350,11 @@ BOOST_MATH_GPU_ENABLED inline constexpr T tau() { return two_pi(); } // We deliberately include this *after* all the declarations above, // that way the calculation routines can call on other constants above: // +// NVRTC will not have a type that needs runtime calculation +// +#ifndef BOOST_MATH_HAS_NVRTC #include +#endif #endif // BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED From 74a2138a436981096ef3287d77852e38b67b8b36 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 16:27:46 -0400 Subject: [PATCH 23/24] Add NVRTC support to digamma --- .../boost/math/special_functions/digamma.hpp | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/include/boost/math/special_functions/digamma.hpp b/include/boost/math/special_functions/digamma.hpp index bde80f7dd..382ad0d6b 100644 --- a/include/boost/math/special_functions/digamma.hpp +++ b/include/boost/math/special_functions/digamma.hpp @@ -14,13 +14,20 @@ #endif #include -#include +#include #include -#include #include +#include +#include +#include + +#ifndef BOOST_MATH_HAS_NVRTC +#include +#include #include #include #include +#endif #if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128) // @@ -39,9 +46,9 @@ namespace detail{ // Begin by defining the smallest value for which it is safe to // use the asymptotic expansion for digamma: // -BOOST_MATH_GPU_ENABLED inline unsigned digamma_large_lim(const std::integral_constant*) +BOOST_MATH_GPU_ENABLED inline unsigned digamma_large_lim(const boost::math::integral_constant*) { return 20; } -BOOST_MATH_GPU_ENABLED inline unsigned digamma_large_lim(const std::integral_constant*) +BOOST_MATH_GPU_ENABLED inline unsigned digamma_large_lim(const boost::math::integral_constant*) { return 20; } BOOST_MATH_GPU_ENABLED inline unsigned digamma_large_lim(const void*) { return 10; } @@ -55,8 +62,10 @@ BOOST_MATH_GPU_ENABLED inline unsigned digamma_large_lim(const void*) // // This first one gives 34-digit precision for x >= 20: // + +#ifndef BOOST_MATH_HAS_NVRTC template -inline T digamma_imp_large(T x, const std::integral_constant*) +inline T digamma_imp_large(T x, const boost::math::integral_constant*) { BOOST_MATH_STD_USING // ADL of std functions. static const T P[] = { @@ -89,7 +98,7 @@ inline T digamma_imp_large(T x, const std::integral_constant*) // 19-digit precision for x >= 10: // template -inline T digamma_imp_large(T x, const std::integral_constant*) +inline T digamma_imp_large(T x, const boost::math::integral_constant*) { BOOST_MATH_STD_USING // ADL of std functions. static const T P[] = { @@ -112,11 +121,12 @@ inline T digamma_imp_large(T x, const std::integral_constant*) result -= z * tools::evaluate_polynomial(P, z); return result; } +#endif // // 17-digit precision for x >= 10: // template -BOOST_MATH_GPU_ENABLED inline T digamma_imp_large(T x, const std::integral_constant*) +BOOST_MATH_GPU_ENABLED inline T digamma_imp_large(T x, const boost::math::integral_constant*) { BOOST_MATH_STD_USING // ADL of std functions. BOOST_MATH_STATIC const T P[] = { @@ -140,7 +150,7 @@ BOOST_MATH_GPU_ENABLED inline T digamma_imp_large(T x, const std::integral_const // 9-digit precision for x >= 10: // template -BOOST_MATH_GPU_ENABLED inline T digamma_imp_large(T x, const std::integral_constant*) +BOOST_MATH_GPU_ENABLED inline T digamma_imp_large(T x, const boost::math::integral_constant*) { BOOST_MATH_STD_USING // ADL of std functions. BOOST_MATH_STATIC const T P[] = { @@ -155,6 +165,8 @@ BOOST_MATH_GPU_ENABLED inline T digamma_imp_large(T x, const std::integral_const result -= z * tools::evaluate_polynomial(P, z); return result; } + +#ifndef BOOST_MATH_HAS_NVRTC // // Fully generic asymptotic expansion in terms of Bernoulli numbers, see: // http://functions.wolfram.com/06.14.06.0012.01 @@ -179,7 +191,7 @@ struct digamma_series_func }; template -inline T digamma_imp_large(T x, const Policy& pol, const std::integral_constant*) +inline T digamma_imp_large(T x, const Policy& pol, const boost::math::integral_constant*) { BOOST_MATH_STD_USING digamma_series_func s(x); @@ -196,7 +208,7 @@ inline T digamma_imp_large(T x, const Policy& pol, const std::integral_constant< // 35-digit precision: // template -T digamma_imp_1_2(T x, const std::integral_constant*) +T digamma_imp_1_2(T x, const boost::math::integral_constant*) { // // Now the approximation, we use the form: @@ -260,7 +272,7 @@ T digamma_imp_1_2(T x, const std::integral_constant*) // 19-digit precision: // template -T digamma_imp_1_2(T x, const std::integral_constant*) +T digamma_imp_1_2(T x, const boost::math::integral_constant*) { // // Now the approximation, we use the form: @@ -308,11 +320,13 @@ T digamma_imp_1_2(T x, const std::integral_constant*) return result; } + +#endif // // 18-digit precision: // template -BOOST_MATH_GPU_ENABLED T digamma_imp_1_2(T x, const std::integral_constant*) +BOOST_MATH_GPU_ENABLED T digamma_imp_1_2(T x, const boost::math::integral_constant*) { // // Now the approximation, we use the form: @@ -363,7 +377,7 @@ BOOST_MATH_GPU_ENABLED T digamma_imp_1_2(T x, const std::integral_constant -BOOST_MATH_GPU_ENABLED inline T digamma_imp_1_2(T x, const std::integral_constant*) +BOOST_MATH_GPU_ENABLED inline T digamma_imp_1_2(T x, const boost::math::integral_constant*) { // // Now the approximation, we use the form: @@ -441,11 +455,13 @@ BOOST_MATH_GPU_ENABLED T digamma_imp(T x, const Tag* t, const Policy& pol) // If we're above the lower-limit for the // asymptotic expansion then use it: // + #ifndef BOOST_MATH_HAS_NVRTC if(x >= digamma_large_lim(t)) { result += digamma_imp_large(x, t); } else + #endif { // // If x > 2 reduce to the interval [1,2]: @@ -468,8 +484,10 @@ BOOST_MATH_GPU_ENABLED T digamma_imp(T x, const Tag* t, const Policy& pol) return result; } +#ifndef BOOST_MATH_HAS_NVRTC + template -T digamma_imp(T x, const std::integral_constant* t, const Policy& pol) +T digamma_imp(T x, const boost::math::integral_constant* t, const Policy& pol) { // // This handles reflection of negative arguments, and all our @@ -566,6 +584,8 @@ T digamma_imp(T x, const std::integral_constant* t, const Policy& pol) // LCOV_EXCL_STOP } +#endif + } // namespace detail template @@ -575,7 +595,7 @@ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args::type typedef typename tools::promote_args::type result_type; typedef typename policies::evaluation::type value_type; typedef typename policies::precision::type precision_type; - typedef std::integral_constant 113) ? 0 : precision_type::value <= 24 ? 24 : precision_type::value <= 53 ? 53 : From ce0f99eb98d99569c6695107e98a62e275c9f0db Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Tue, 13 Aug 2024 16:39:53 -0400 Subject: [PATCH 24/24] Add NVRTC digamma tests --- test/nvrtc_jamfile | 2 + test/test_digamma_nvrtc_double.cpp | 190 +++++++++++++++++++++++++++++ test/test_digamma_nvrtc_float.cpp | 190 +++++++++++++++++++++++++++++ 3 files changed, 382 insertions(+) create mode 100644 test/test_digamma_nvrtc_double.cpp create mode 100644 test/test_digamma_nvrtc_float.cpp diff --git a/test/nvrtc_jamfile b/test/nvrtc_jamfile index 9e59740e6..434ca002b 100644 --- a/test/nvrtc_jamfile +++ b/test/nvrtc_jamfile @@ -14,6 +14,8 @@ run test_cbrt_nvrtc_double.cpp ; run test_cbrt_nvrtc_float.cpp ; run test_cos_pi_nvrtc_double.cpp ; run test_cos_pi_nvrtc_float.cpp ; +run test_digamma_nvrtc_double.cpp ; +run test_digamma_nvrtc_float.cpp ; run test_erf_nvrtc_double.cpp ; run test_erf_nvrtc_float.cpp ; run test_erfc_nvrtc_double.cpp ; diff --git a/test/test_digamma_nvrtc_double.cpp b/test/test_digamma_nvrtc_double.cpp new file mode 100644 index 000000000..d3da10188 --- /dev/null +++ b/test/test_digamma_nvrtc_double.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef double float_type; + +const char* cuda_kernel = R"( +typedef double float_type; +#include +#include +extern "C" __global__ +void test_digamma_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::digamma(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_digamma_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_digamma_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_digamma_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1000.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::digamma(h_in1[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +} diff --git a/test/test_digamma_nvrtc_float.cpp b/test/test_digamma_nvrtc_float.cpp new file mode 100644 index 000000000..a698cbd56 --- /dev/null +++ b/test/test_digamma_nvrtc_float.cpp @@ -0,0 +1,190 @@ +// Copyright John Maddock 2016. +// Copyright Matt Borland 2024. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error +#define BOOST_MATH_PROMOTE_DOUBLE_POLICY false + +// Must be included first +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +typedef float float_type; + +const char* cuda_kernel = R"( +typedef float float_type; +#include +#include +extern "C" __global__ +void test_digamma_kernel(const float_type *in1, const float_type*, float_type *out, int numElements) +{ + int i = blockDim.x * blockIdx.x + threadIdx.x; + if (i < numElements) + { + out[i] = boost::math::digamma(in1[i]); + } +} +)"; + +void checkCUDAError(cudaError_t result, const char* msg) +{ + if (result != cudaSuccess) + { + std::cerr << msg << ": " << cudaGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkCUError(CUresult result, const char* msg) +{ + if (result != CUDA_SUCCESS) + { + const char* errorStr; + cuGetErrorString(result, &errorStr); + std::cerr << msg << ": " << errorStr << std::endl; + exit(EXIT_FAILURE); + } +} + +void checkNVRTCError(nvrtcResult result, const char* msg) +{ + if (result != NVRTC_SUCCESS) + { + std::cerr << msg << ": " << nvrtcGetErrorString(result) << std::endl; + exit(EXIT_FAILURE); + } +} + +int main() +{ + try + { + // Initialize CUDA driver API + checkCUError(cuInit(0), "Failed to initialize CUDA"); + + // Create CUDA context + CUcontext context; + CUdevice device; + checkCUError(cuDeviceGet(&device, 0), "Failed to get CUDA device"); + checkCUError(cuCtxCreate(&context, 0, device), "Failed to create CUDA context"); + + nvrtcProgram prog; + nvrtcResult res; + + res = nvrtcCreateProgram(&prog, cuda_kernel, "test_digamma_kernel.cu", 0, nullptr, nullptr); + checkNVRTCError(res, "Failed to create NVRTC program"); + + nvrtcAddNameExpression(prog, "test_digamma_kernel"); + + #ifdef BOOST_MATH_NVRTC_CI_RUN + const char* opts[] = {"--std=c++14", "--gpu-architecture=compute_75", "--include-path=/home/runner/work/cuda-math/boost-root/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #else + const char* opts[] = {"--std=c++14", "--include-path=/home/mborland/Documents/boost/libs/cuda-math/include/", "-I/usr/local/cuda/include"}; + #endif + + // Compile the program + res = nvrtcCompileProgram(prog, sizeof(opts) / sizeof(const char*), opts); + if (res != NVRTC_SUCCESS) + { + size_t log_size; + nvrtcGetProgramLogSize(prog, &log_size); + char* log = new char[log_size]; + nvrtcGetProgramLog(prog, log); + std::cerr << "Compilation failed:\n" << log << std::endl; + delete[] log; + exit(EXIT_FAILURE); + } + + // Get PTX from the program + size_t ptx_size; + nvrtcGetPTXSize(prog, &ptx_size); + char* ptx = new char[ptx_size]; + nvrtcGetPTX(prog, ptx); + + // Load PTX into CUDA module + CUmodule module; + CUfunction kernel; + checkCUError(cuModuleLoadDataEx(&module, ptx, 0, 0, 0), "Failed to load module"); + checkCUError(cuModuleGetFunction(&kernel, module, "test_digamma_kernel"), "Failed to get kernel function"); + + int numElements = 5000; + float_type *h_in1, *h_in2, *h_out; + float_type *d_in1, *d_in2, *d_out; + + // Allocate memory on the host + h_in1 = new float_type[numElements]; + h_in2 = new float_type[numElements]; + h_out = new float_type[numElements]; + + // Initialize input arrays + std::mt19937_64 rng(42); + std::uniform_real_distribution dist(0.0f, 1000.0f); + for (int i = 0; i < numElements; ++i) + { + h_in1[i] = static_cast(dist(rng)); + h_in2[i] = static_cast(dist(rng)); + } + + checkCUDAError(cudaMalloc(&d_in1, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in1"); + checkCUDAError(cudaMalloc(&d_in2, numElements * sizeof(float_type)), "Failed to allocate device memory for d_in2"); + checkCUDAError(cudaMalloc(&d_out, numElements * sizeof(float_type)), "Failed to allocate device memory for d_out"); + + checkCUDAError(cudaMemcpy(d_in1, h_in1, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in1"); + checkCUDAError(cudaMemcpy(d_in2, h_in2, numElements * sizeof(float_type), cudaMemcpyHostToDevice), "Failed to copy data to device for d_in2"); + + int blockSize = 256; + int numBlocks = (numElements + blockSize - 1) / blockSize; + void* args[] = { &d_in1, &d_in2, &d_out, &numElements }; + checkCUError(cuLaunchKernel(kernel, numBlocks, 1, 1, blockSize, 1, 1, 0, 0, args, 0), "Kernel launch failed"); + + checkCUDAError(cudaMemcpy(h_out, d_out, numElements * sizeof(float_type), cudaMemcpyDeviceToHost), "Failed to copy data back to host for h_out"); + + // Verify Result + for (int i = 0; i < numElements; ++i) + { + const auto res = boost::math::digamma(h_in1[i]); + + if (std::isfinite(res)) + { + if (boost::math::epsilon_difference(res, h_out[i]) > 300) + { + std::cout << "error at line: " << i + << "\nParallel: " << h_out[i] + << "\n Serial: " << res + << "\n Dist: " << boost::math::epsilon_difference(res, h_out[i]) << std::endl; + } + } + } + + cudaFree(d_in1); + cudaFree(d_in2); + cudaFree(d_out); + delete[] h_in1; + delete[] h_in2; + delete[] h_out; + + nvrtcDestroyProgram(&prog); + delete[] ptx; + + cuCtxDestroy(context); + + std::cout << "Kernel executed successfully." << std::endl; + return 0; + } + catch(const std::exception& e) + { + std::cerr << "Stopped with exception: " << e.what() << std::endl; + return EXIT_FAILURE; + } +}