13 __host__ __device__
inline double2
operator+(
const double2&
x,
const double2 &
y) {
14 return make_double2(x.x + y.x, x.y + y.y);
17 __host__ __device__
inline double2
operator-(
const double2&
x,
const double2 &
y) {
18 return make_double2(x.x - y.x, x.y - y.y);
21 __host__ __device__
inline float2
operator-(
const float2&
x,
const float2 &
y) {
22 return make_float2(x.x - y.x, x.y - y.y);
25 __host__ __device__
inline float4
operator-(
const float4&
x,
const float4 &
y) {
26 return make_float4(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);
29 __host__ __device__
inline double3
operator+(
const double3&
x,
const double3 &
y) {
31 z.x = x.x + y.x; z.y = x.y + y.y; z.z = x.z + y.z;
35 __host__ __device__
inline float4
operator*(
const float a,
const float4
x) {
44 __host__ __device__
inline float2
operator*(
const float a,
const float2
x) {
51 __host__ __device__
inline double2
operator*(
const double a,
const double2
x) {
58 __host__ __device__
inline double4
operator*(
const double a,
const double4
x) {
67 __host__ __device__
inline float2
operator+(
const float2
x,
const float2
y) {
74 __host__ __device__
inline float4
operator+(
const float4
x,
const float4
y) {
83 __host__ __device__
inline float4
operator+=(float4 &
x,
const float4
y) {
91 __host__ __device__
inline float2
operator+=(float2 &
x,
const float2
y) {
97 __host__ __device__
inline double2
operator+=(double2 &
x,
const double2
y) {
103 __host__ __device__
inline double3
operator+=(double3 &
x,
const double3
y) {
110 __host__ __device__
inline float4
operator-=(float4 &
x,
const float4
y) {
118 __host__ __device__
inline float2
operator-=(float2 &
x,
const float2
y) {
124 __host__ __device__
inline double2
operator-=(double2 &
x,
const double2
y) {
130 __host__ __device__
inline float2
operator*=(float2 &
x,
const float a) {
136 __host__ __device__
inline double2
operator*=(double2 &
x,
const float a) {
142 __host__ __device__
inline float4
operator*=(float4 &a,
const float &b) {
150 __host__ __device__
inline double2
operator*=(double2 &a,
const double &b) {
156 __host__ __device__
inline double4
operator*=(double4 &a,
const double &b) {
164 __host__ __device__
inline float2
operator-(
const float2 &
x) {
165 return make_float2(-x.x, -x.y);
168 __host__ __device__
inline double2
operator-(
const double2 &
x) {
169 return make_double2(-x.x, -x.y);
177 __forceinline__ __host__ __device__
float max_fabs(
const float4 &c) {
178 float a = fmaxf(fabsf(c.x), fabsf(c.y));
179 float b = fmaxf(fabsf(c.z), fabsf(c.w));
183 __forceinline__ __host__ __device__
float max_fabs(
const float2 &b) {
184 return fmaxf(fabsf(b.x), fabsf(b.y));
187 __forceinline__ __host__ __device__
double max_fabs(
const double4 &c) {
188 double a = fmaxf(fabsf(c.x), fabsf(c.y));
189 double b = fmaxf(fabsf(c.z), fabsf(c.w));
193 __forceinline__ __host__ __device__
double max_fabs(
const double2 &b) {
194 return fmaxf(fabsf(b.x), fabsf(b.y));
201 __forceinline__ __host__ __device__ float2
make_FloatN(
const double2 &a) {
202 return make_float2(a.x, a.y);
205 __forceinline__ __host__ __device__ float4
make_FloatN(
const double4 &a) {
206 return make_float4(a.x, a.y, a.z, a.w);
209 __forceinline__ __host__ __device__ double2
make_FloatN(
const float2 &a) {
210 return make_double2(a.x, a.y);
213 __forceinline__ __host__ __device__ double4
make_FloatN(
const float4 &a) {
214 return make_double4(a.x, a.y, a.z, a.w);
217 __forceinline__ __host__ __device__ short4
make_shortN(
const float4 &a) {
218 return make_short4(a.x, a.y, a.z, a.w);
221 __forceinline__ __host__ __device__ short2
make_shortN(
const float2 &a) {
222 return make_short2(a.x, a.y);
225 __forceinline__ __host__ __device__ short4
make_shortN(
const double4 &a) {
226 return make_short4(a.x, a.y, a.z, a.w);
229 __forceinline__ __host__ __device__ short2
make_shortN(
const double2 &a) {
230 return make_short2(a.x, a.y);
__host__ __device__ float4 operator-=(float4 &x, const float4 y)
__forceinline__ __host__ __device__ short4 make_shortN(const float4 &a)
__host__ __device__ float2 operator*=(float2 &x, const float a)
__host__ __device__ complex< ValueType > operator-(const complex< ValueType > &lhs, const complex< ValueType > &rhs)
__forceinline__ __host__ __device__ float2 make_FloatN(const double2 &a)
__host__ __device__ complex< ValueType > operator*(const complex< ValueType > &lhs, const complex< ValueType > &rhs)
__forceinline__ __host__ __device__ float max_fabs(const float4 &c)
__host__ __device__ float4 operator+=(float4 &x, const float4 y)
__host__ __device__ complex< ValueType > operator+(const complex< ValueType > &lhs, const complex< ValueType > &rhs)