Commit 9b1987e3 authored by Cianciosa, Mark's avatar Cianciosa, Mark
Browse files

Use cuda standard library when compiling for the device.

parent 9f033528
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -408,6 +408,7 @@ namespace gpu {
//------------------------------------------------------------------------------
        void create_header(std::ostringstream &source_buffer) {
            if constexpr (jit::is_complex<T> ()) {
                source_buffer << "#define CUDA_DEVICE_CODE" << std::endl;
                source_buffer << "#include <cuda/std/complex>" << std::endl;
                source_buffer << "#include <special_functions.hpp>" << std::endl;
            }
+7 −0
Original line number Diff line number Diff line
@@ -8,10 +8,17 @@
#ifndef special_functions_h
#define special_functions_h

#ifdef CUDA_DEVICE_CODE
#include <cuda/std/complex>

using namespace cuda

#else
#include <complex>
#include <cfloat>
#include <cmath>
#include <limits>
#endif

namespace special {