|
|
|
@ -18,15 +18,15 @@ using real64 = double; /**< Type alias for 64-bit floating point datatype. */ |
|
|
|
|
|
|
|
|
|
#ifdef CUDACC |
|
|
|
|
|
|
|
|
|
using real16 = __half; |
|
|
|
|
using realb16 = __nv_bfloat16; |
|
|
|
|
using real16 = __half; /**< Type alias for 16-bit floating point datatype, when using GPU.
|
|
|
|
|
Otherwise, defaults to float. */ |
|
|
|
|
using realb16 = __nv_bfloat16; /**< Type alias for the 16-bit bfloat datatype, when using GPU.
|
|
|
|
|
Otherwise, defaults to float. */ |
|
|
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
using real16 = float; /**< Type alias for 16-bit floating point datatype, when using GPU. Otherwise,
|
|
|
|
|
defaults to float. */ |
|
|
|
|
using realb16 = float; /**< Type alias for the 16-bit bfloat datatype, when using GPU. Otherwise,
|
|
|
|
|
defaults to float. */ |
|
|
|
|
using real16 = float; |
|
|
|
|
using realb16 = float; |
|
|
|
|
|
|
|
|
|
#endif // CUDACC
|
|
|
|
|
|
|
|
|
@ -127,17 +127,17 @@ template complex<real32> operator/<real32>(const real32, const complex<real32>); |
|
|
|
|
template complex<real64> operator/<real64>(const real64, const complex<real64>); |
|
|
|
|
|
|
|
|
|
#ifdef CUDACC |
|
|
|
|
using complex64 = complex<real32>; |
|
|
|
|
using complex128 = complex<real64>; |
|
|
|
|
using complex64 = complex<real32>; /**< Type alias for 64-bit complex floating point datatype.
|
|
|
|
|
* This adapts depending on the CUDA compilation flag, and |
|
|
|
|
* will automatically switch std::complex<real32>. */ |
|
|
|
|
|
|
|
|
|
using complex128 = complex<real64>; /**< Type alias for 128-bit complex floating point datatype.
|
|
|
|
|
* This adapts depending on the CUDA compilation flag, and will |
|
|
|
|
* automatically switch std::complex<real64>. */ |
|
|
|
|
|
|
|
|
|
#else |
|
|
|
|
using complex64 = std::complex<real32>; /**< Type alias for 64-bit complex floating point datatype.
|
|
|
|
|
* This adapts depending on the CUDA compilation flag, and |
|
|
|
|
* will automatically switch CudaTools::complex<real32>. */ |
|
|
|
|
using complex128 = |
|
|
|
|
std::complex<real64>; /**< Type alias for 128-bit complex floating point datatype. This adapts
|
|
|
|
|
* depending on the CUDA compilation flag, and will automatically switch |
|
|
|
|
* CudaTools::complex<real64>. */ |
|
|
|
|
using complex64 = std::complex<real32>; |
|
|
|
|
using complex128 = std::complex<real64>; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
/** Type alises and lots of metaprogramming definitions, primarily dealing with
|
|
|
|
|