23 #ifndef NDARRAY_FFT_FourierTraits_h_INCLUDED
24 #define NDARRAY_FFT_FourierTraits_h_INCLUDED
33 #include <boost/shared_ptr.hpp>
45 template <
typename T,
bool IsConst>
46 struct FourierTraits {
47 BOOST_STATIC_ASSERT(
sizeof(T) < 0);
53 struct FourierTraits<T,false> {
56 typedef std::complex<T> ElementK;
57 typedef std::complex<T> ValueK;
59 static inline int computeLastDimensionSize(
int n) {
return n/2 + 1; }
63 struct FourierTraits<T,true> {
65 typedef typename boost::remove_const<T>::type ValueX;
66 typedef std::complex<ValueX> ValueK;
67 typedef ValueK
const ElementK;
69 static inline int computeLastDimensionSize(
int n) {
return n/2 + 1; }
73 struct FourierTraits<std::complex<U>,false> {
74 typedef std::complex<U> ElementX;
75 typedef std::complex<U> ElementK;
76 typedef std::complex<U> ValueX;
77 typedef std::complex<U> ValueK;
79 static inline int computeLastDimensionSize(
int n) {
return n; }
83 struct FourierTraits<std::complex<U> const,true> {
84 typedef std::complex<U>
const ElementX;
85 typedef std::complex<U>
const ElementK;
86 typedef std::complex<U> ValueX;
87 typedef std::complex<U> ValueK;
89 static inline int computeLastDimensionSize(
int n) {
return n; }
98 #endif // !NDARRAY_FFT_FourierTraits_h_INCLUDED
Forward declarations and default template parameters for ndarray/fft.