3 #include "../iuhelpermath.h"
10 template<
typename PixelType>
19 return make_float2(x, x);
22 static inline __host__ __device__ float2
make_complex(
float x,
float y)
24 return make_float2(x, y);
28 static inline __host__ __device__ float2
make(
float x)
30 return make_float2(x, x);
34 static inline __host__ __device__
float abs(float2 x)
46 struct is_complex {
static const bool value =
true; };
61 return make_double2(x, x);
64 static inline __host__ __device__ double2
make_complex(
double x,
double y)
66 return make_double2(x, y);
70 static inline __host__ __device__ double2
make(
double x)
72 return make_double2(x, x);
76 static inline __host__ __device__
double abs(double2 x)
88 struct is_complex {
static const bool value =
true; };
91 static inline const char*
name()
103 return make_float2(x, x);
106 static inline __host__ __device__ float2
make_complex(
float x,
float y)
108 return make_float2(x, y);
112 static inline __host__ __device__
float make(
float x)
118 static inline __host__ __device__
float abs(
float x)
124 static inline __host__ __device__
float max(
float x,
float y)
136 struct is_complex {
static const bool value =
false; };
151 return make_double2(x, x);
155 static inline __host__ __device__ double2
make_complex(
double x,
double y)
157 return make_double2(x, y);
161 static inline __host__ __device__
double make(
double x)
167 static inline __host__ __device__
double abs(
double x)
173 static inline __host__ __device__
double max(
double x,
double y)
185 struct is_complex {
static const bool value =
true; };
197 template<
typename PixelType>
203 dst.x = src1.x * src2.x - src1.y * src2.y;
204 dst.y = src1.x * src2.y + src1.y * src2.x;
209 template<
typename PixelType>
215 dst.x = src1.x * src2.x + src1.y * src2.y;
216 dst.y = -src1.x * src2.y + src1.y * src2.x;
221 template<
typename PixelType>
static __host__ __device__ float abs(float x)
Definition: typetraits.h:118
static __host__ __device__ double abs(double2 x)
Definition: typetraits.h:76
static const char * name()
Definition: typetraits.h:49
static __host__ __device__ float2 make_complex(float x, float y)
Definition: typetraits.h:106
float real_type
Definition: typetraits.h:40
static __host__ __device__ float2 make_complex(float x)
Definition: typetraits.h:101
static const char * name()
Definition: typetraits.h:139
static __host__ __device__ double make(double x)
Definition: typetraits.h:161
static const char * name()
Definition: typetraits.h:91
static __host__ __device__ float abs(float2 x)
Definition: typetraits.h:34
float real_type
Definition: typetraits.h:130
static __host__ __device__ double2 make_complex(double x)
Definition: typetraits.h:59
static __host__ __device__ float2 make_complex(float x)
Definition: typetraits.h:17
float2 complex_type
Definition: typetraits.h:43
static __host__ __device__ double2 make_complex(double x)
Definition: typetraits.h:149
double real_type
Definition: typetraits.h:179
static const char * name()
Definition: typetraits.h:188
static __host__ __device__ float2 make_complex(float x, float y)
Definition: typetraits.h:22
static __host__ __device__ double abs(double x)
Definition: typetraits.h:167
double real_type
Definition: typetraits.h:82
static __host__ __device__ double max(double x, double y)
Definition: typetraits.h:173
static __host__ __device__ float max(float x, float y)
Definition: typetraits.h:124
static __host__ __device__ double2 make(double x)
Definition: typetraits.h:70
double2 complex_type
Definition: typetraits.h:182
Definition: typetraits.h:11
double2 complex_type
Definition: typetraits.h:85
static __host__ __device__ float make(float x)
Definition: typetraits.h:112
static __host__ __device__ float2 make(float x)
Definition: typetraits.h:28
static __host__ __device__ double2 make_complex(double x, double y)
Definition: typetraits.h:155
static __host__ __device__ double2 make_complex(double x, double y)
Definition: typetraits.h:64
float2 complex_type
Definition: typetraits.h:133