Highly Efficient FFT for Exascale: HeFFTe v2.3
heffte::define_standard_type< typename, typename > Struct Template Reference

Struct to specialize that returns the C++ equivalent of each type. More...

#include <heffte_utils.h>

Detailed Description

template<typename, typename = void>
struct heffte::define_standard_type< typename, typename >

Struct to specialize that returns the C++ equivalent of each type.

Given a type that is either float, double, or recognized by the heffte::is_ccomplex and heffte::is_zcomplex templates, this struct will define a member type (called type) that will define the corresponding C++ equivalent.

Example:

struct custom_double_precision_complex{
double real, imag;
}
namespace heffte {
template<> struct is_ccomplex<custom_double_precision_complex> : std::true_type{};
}
...
static_assert(std::is_same<typename define_standard_type<custom_double_precision_complex>::type,
std::complex<double>>::value,
"error: custom_double_precision_complex not equivalent to std::complex<double>");
template<typename input_type>
void foo(input_type x[]){
auto y = reinterpret_cast<typename define_standard_type<input_type>::type*>(x);
...
}
...
std::vector<custom_double_precision_complex> x(10);
foo(x.data()); // here input_type will be deduced to custom_double_precision_complex
// and inside foo() y will be std::complex<double>*
Namespace containing all HeFFTe methods and classes.
Definition: heffte_backend_cuda.h:38

The documentation for this struct was generated from the following file: