1#ifndef DEVICE_HELPERS_H_
2#define DEVICE_HELPERS_H_
30template <
typename Device>
33 if (std::is_same<Device, DEVICE_CPU>::value)
return CpuDevice;
34 else if (std::is_same<Device, DEVICE_GPU>::value)
return GpuDevice;
35 else if (std::is_same<Device, DEVICE_DSP>::value)
return DspDevice;
56std::string get_current_precision<std::complex<float>>(
const std::complex<float>* var);
59std::string get_current_precision<std::complex<double>>(
const std::complex<double>* var);
#define T
Definition exp.cpp:237
std::string get_current_precision< double >(const double *var)
Definition device_helpers.cpp:14
std::string get_current_precision(const T *var)
Get the precision string for a given numeric type.
std::string get_current_precision< float >(const float *var)
Definition device_helpers.cpp:8
AbacusDevice_t
Definition types.h:12
@ GpuDevice
Definition types.h:15
@ UnKnown
Definition types.h:13
@ CpuDevice
Definition types.h:14
@ DspDevice
Definition types.h:16
AbacusDevice_t get_device_type(const Device *dev)
Get the device type enum for a given device type (compile-time version).
Definition device_helpers.h:31