MAGMA  magma-1.4.0
Matrix Algebra on GPU and Multicore Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
operators.h File Reference
#include "magma.h"
Include dependency graph for operators.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

__host__ static __device__ double real (const magmaDoubleComplex &x)
 
__host__ static __device__ float real (const magmaFloatComplex &x)
 
__host__ static __device__ double real (const double &x)
 
__host__ static __device__ float real (const float &x)
 
__host__ static __device__ double imag (const magmaDoubleComplex &x)
 
__host__ static __device__ float imag (const magmaFloatComplex &x)
 
__host__ static __device__ double imag (const double &x)
 
__host__ static __device__ float imag (const float &x)
 
__host__ static __device__
magmaDoubleComplex 
conj (const magmaDoubleComplex &x)
 
__host__ static __device__
magmaFloatComplex 
conj (const magmaFloatComplex &x)
 
__host__ static __device__ double conj (const double &x)
 
__host__ static __device__ float conj (const float &x)
 
__host__ static __device__
magmaDoubleComplex 
operator- (const magmaDoubleComplex &a)
 
__host__ static __device__
magmaDoubleComplex 
operator+ (const magmaDoubleComplex a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex 
operator+ (const magmaDoubleComplex a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator+ (const double s, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex & 
operator+= (magmaDoubleComplex &a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex & 
operator+= (magmaDoubleComplex &a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator- (const magmaDoubleComplex a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex 
operator- (const magmaDoubleComplex a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator- (const double s, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex & 
operator-= (magmaDoubleComplex &a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex & 
operator-= (magmaDoubleComplex &a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator* (const magmaDoubleComplex a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex 
operator* (const magmaDoubleComplex a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator* (const double s, const magmaDoubleComplex a)
 
__host__ static __device__
magmaDoubleComplex & 
operator*= (magmaDoubleComplex &a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex & 
operator*= (magmaDoubleComplex &a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator/ (const magmaDoubleComplex x, const magmaDoubleComplex y)
 
__host__ static __device__
magmaDoubleComplex 
operator/ (const magmaDoubleComplex a, const double s)
 
__host__ static __device__
magmaDoubleComplex 
operator/ (const double a, const magmaDoubleComplex y)
 
__host__ static __device__
magmaDoubleComplex & 
operator/= (magmaDoubleComplex &a, const magmaDoubleComplex b)
 
__host__ static __device__
magmaDoubleComplex & 
operator/= (magmaDoubleComplex &a, const double s)
 
__host__ static __device__ bool operator== (const magmaDoubleComplex a, const magmaDoubleComplex b)
 
__host__ static __device__ bool operator== (const magmaDoubleComplex a, const double s)
 
__host__ static __device__ bool operator== (const double s, const magmaDoubleComplex a)
 
__host__ static __device__ bool operator!= (const magmaDoubleComplex a, const magmaDoubleComplex b)
 
__host__ static __device__ bool operator!= (const magmaDoubleComplex a, const double s)
 
__host__ static __device__ bool operator!= (const double s, const magmaDoubleComplex a)
 
__host__ static __device__
magmaFloatComplex 
operator- (const magmaFloatComplex &a)
 
__host__ static __device__
magmaFloatComplex 
operator+ (const magmaFloatComplex a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex 
operator+ (const magmaFloatComplex a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator+ (const float s, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex & 
operator+= (magmaFloatComplex &a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex & 
operator+= (magmaFloatComplex &a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator- (const magmaFloatComplex a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex 
operator- (const magmaFloatComplex a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator- (const float s, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex & 
operator-= (magmaFloatComplex &a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex & 
operator-= (magmaFloatComplex &a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator* (const magmaFloatComplex a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex 
operator* (const magmaFloatComplex a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator* (const float s, const magmaFloatComplex a)
 
__host__ static __device__
magmaFloatComplex & 
operator*= (magmaFloatComplex &a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex & 
operator*= (magmaFloatComplex &a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator/ (const magmaFloatComplex x, const magmaFloatComplex y)
 
__host__ static __device__
magmaFloatComplex 
operator/ (const magmaFloatComplex a, const float s)
 
__host__ static __device__
magmaFloatComplex 
operator/ (const float a, const magmaFloatComplex y)
 
__host__ static __device__
magmaFloatComplex & 
operator/= (magmaFloatComplex &a, const magmaFloatComplex b)
 
__host__ static __device__
magmaFloatComplex & 
operator/= (magmaFloatComplex &a, const float s)
 
__host__ static __device__ bool operator== (const magmaFloatComplex a, const magmaFloatComplex b)
 
__host__ static __device__ bool operator== (const magmaFloatComplex a, const float s)
 
__host__ static __device__ bool operator== (const float s, const magmaFloatComplex a)
 
__host__ static __device__ bool operator!= (const magmaFloatComplex a, const magmaFloatComplex b)
 
__host__ static __device__ bool operator!= (const magmaFloatComplex a, const float s)
 
__host__ static __device__ bool operator!= (const float s, const magmaFloatComplex a)
 

Function Documentation

__host__ static __device__ magmaDoubleComplex conj ( const magmaDoubleComplex &  x)
inlinestatic

Definition at line 29 of file operators.h.

References MAGMA_Z_CNJG.

29 { return MAGMA_Z_CNJG(x); }
#define MAGMA_Z_CNJG(v, t)
Definition: magma.h:120
__host__ static __device__ magmaFloatComplex conj ( const magmaFloatComplex &  x)
inlinestatic

Definition at line 30 of file operators.h.

References MAGMA_C_CNJG.

30 { return MAGMA_C_CNJG(x); }
#define MAGMA_C_CNJG(v, t)
Definition: magma.h:142
__host__ static __device__ double conj ( const double &  x)
inlinestatic

Definition at line 31 of file operators.h.

31 { return x; }
__host__ static __device__ float conj ( const float &  x)
inlinestatic

Definition at line 32 of file operators.h.

32 { return x; }
__host__ static __device__ double imag ( const magmaDoubleComplex &  x)
inlinestatic

Definition at line 24 of file operators.h.

References MAGMA_Z_IMAG.

24 { return MAGMA_Z_IMAG(x); }
#define MAGMA_Z_IMAG(a)
Definition: magma.h:125

Here is the caller graph for this function:

__host__ static __device__ float imag ( const magmaFloatComplex &  x)
inlinestatic

Definition at line 25 of file operators.h.

References MAGMA_C_IMAG.

25 { return MAGMA_C_IMAG(x); }
#define MAGMA_C_IMAG(a)
Definition: magma.h:147
__host__ static __device__ double imag ( const double &  x)
inlinestatic

Definition at line 26 of file operators.h.

26 { return 0.; }
__host__ static __device__ float imag ( const float &  x)
inlinestatic

Definition at line 27 of file operators.h.

27 { return 0.; }
__host__ static __device__ bool operator!= ( const magmaDoubleComplex  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 265 of file operators.h.

266 {
267  return ! (a == b);
268 }
__host__ static __device__ bool operator!= ( const magmaDoubleComplex  a,
const double  s 
)
inlinestatic

Definition at line 271 of file operators.h.

272 {
273  return ! (a == s);
274 }
__host__ static __device__ bool operator!= ( const double  s,
const magmaDoubleComplex  a 
)
inlinestatic

Definition at line 277 of file operators.h.

278 {
279  return ! (a == s);
280 }
__host__ static __device__ bool operator!= ( const magmaFloatComplex  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 513 of file operators.h.

514 {
515  return ! (a == b);
516 }
__host__ static __device__ bool operator!= ( const magmaFloatComplex  a,
const float  s 
)
inlinestatic

Definition at line 519 of file operators.h.

520 {
521  return ! (a == s);
522 }
__host__ static __device__ bool operator!= ( const float  s,
const magmaFloatComplex  a 
)
inlinestatic

Definition at line 525 of file operators.h.

526 {
527  return ! (a == s);
528 }
__host__ static __device__ magmaDoubleComplex operator* ( const magmaDoubleComplex  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 128 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

129 {
130  return MAGMA_Z_MAKE( real(a)*real(b) - imag(a)*imag(b),
131  imag(a)*real(b) + real(a)*imag(b) );
132 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator* ( const magmaDoubleComplex  a,
const double  s 
)
inlinestatic

Definition at line 135 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

136 {
137  return MAGMA_Z_MAKE( real(a)*s,
138  imag(a)*s );
139 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator* ( const double  s,
const magmaDoubleComplex  a 
)
inlinestatic

Definition at line 142 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

143 {
144  return MAGMA_Z_MAKE( real(a)*s,
145  imag(a)*s );
146 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator* ( const magmaFloatComplex  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 376 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

377 {
378  return MAGMA_C_MAKE( real(a)*real(b) - imag(a)*imag(b),
379  imag(a)*real(b) + real(a)*imag(b) );
380 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator* ( const magmaFloatComplex  a,
const float  s 
)
inlinestatic

Definition at line 383 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

384 {
385  return MAGMA_C_MAKE( real(a)*s,
386  imag(a)*s );
387 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator* ( const float  s,
const magmaFloatComplex  a 
)
inlinestatic

Definition at line 390 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

391 {
392  return MAGMA_C_MAKE( real(a)*s,
393  imag(a)*s );
394 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator*= ( magmaDoubleComplex &  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 149 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

150 {
151  a = MAGMA_Z_MAKE( real(a)*real(b) - imag(a)*imag(b),
152  imag(a)*real(b) + real(a)*imag(b) );
153  return a;
154 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator*= ( magmaDoubleComplex &  a,
const double  s 
)
inlinestatic

Definition at line 157 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

158 {
159  a = MAGMA_Z_MAKE( real(a)*s,
160  imag(a)*s );
161  return a;
162 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator*= ( magmaFloatComplex &  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 397 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

398 {
399  a = MAGMA_C_MAKE( real(a)*real(b) - imag(a)*imag(b),
400  imag(a)*real(b) + real(a)*imag(b) );
401  return a;
402 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator*= ( magmaFloatComplex &  a,
const float  s 
)
inlinestatic

Definition at line 405 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

406 {
407  a = MAGMA_C_MAKE( real(a)*s,
408  imag(a)*s );
409  return a;
410 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator+ ( const magmaDoubleComplex  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 50 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

51 {
52  return MAGMA_Z_MAKE( real(a) + real(b),
53  imag(a) + imag(b) );
54 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator+ ( const magmaDoubleComplex  a,
const double  s 
)
inlinestatic

Definition at line 57 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

58 {
59  return MAGMA_Z_MAKE( real(a) + s,
60  imag(a) );
61 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator+ ( const double  s,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 64 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

65 {
66  return MAGMA_Z_MAKE( s + real(b),
67  imag(b) );
68 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator+ ( const magmaFloatComplex  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 298 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

299 {
300  return MAGMA_C_MAKE( real(a) + real(b),
301  imag(a) + imag(b) );
302 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator+ ( const magmaFloatComplex  a,
const float  s 
)
inlinestatic

Definition at line 305 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

306 {
307  return MAGMA_C_MAKE( real(a) + s,
308  imag(a) );
309 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator+ ( const float  s,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 312 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

313 {
314  return MAGMA_C_MAKE( s + real(b),
315  imag(b) );
316 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator+= ( magmaDoubleComplex &  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 71 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

72 {
73  a = MAGMA_Z_MAKE( real(a) + real(b),
74  imag(a) + imag(b) );
75  return a;
76 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator+= ( magmaDoubleComplex &  a,
const double  s 
)
inlinestatic

Definition at line 79 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

80 {
81  a = MAGMA_Z_MAKE( real(a) + s,
82  imag(a) );
83  return a;
84 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator+= ( magmaFloatComplex &  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 319 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

320 {
321  a = MAGMA_C_MAKE( real(a) + real(b),
322  imag(a) + imag(b) );
323  return a;
324 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator+= ( magmaFloatComplex &  a,
const float  s 
)
inlinestatic

Definition at line 327 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

328 {
329  a = MAGMA_C_MAKE( real(a) + s,
330  imag(a) );
331  return a;
332 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator- ( const magmaDoubleComplex &  a)
inlinestatic

Definition at line 41 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

42 {
43  return MAGMA_Z_MAKE( -real(a),
44  -imag(a) );
45 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator- ( const magmaDoubleComplex  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 89 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

90 {
91  return MAGMA_Z_MAKE( real(a) - real(b),
92  imag(a) - imag(b) );
93 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator- ( const magmaDoubleComplex  a,
const double  s 
)
inlinestatic

Definition at line 96 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

97 {
98  return MAGMA_Z_MAKE( real(a) - s,
99  imag(a) );
100 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator- ( const double  s,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 103 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

104 {
105  return MAGMA_Z_MAKE( s - real(b),
106  - imag(b) );
107 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator- ( const magmaFloatComplex &  a)
inlinestatic

Definition at line 289 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

290 {
291  return MAGMA_C_MAKE( -real(a),
292  -imag(a) );
293 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator- ( const magmaFloatComplex  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 337 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

338 {
339  return MAGMA_C_MAKE( real(a) - real(b),
340  imag(a) - imag(b) );
341 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator- ( const magmaFloatComplex  a,
const float  s 
)
inlinestatic

Definition at line 344 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

345 {
346  return MAGMA_C_MAKE( real(a) - s,
347  imag(a) );
348 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator- ( const float  s,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 351 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

352 {
353  return MAGMA_C_MAKE( s - real(b),
354  - imag(b) );
355 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator-= ( magmaDoubleComplex &  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 110 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

111 {
112  a = MAGMA_Z_MAKE( real(a) - real(b),
113  imag(a) - imag(b) );
114  return a;
115 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator-= ( magmaDoubleComplex &  a,
const double  s 
)
inlinestatic

Definition at line 118 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

119 {
120  a = MAGMA_Z_MAKE( real(a) - s,
121  imag(a) );
122  return a;
123 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator-= ( magmaFloatComplex &  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 358 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

359 {
360  a = MAGMA_C_MAKE( real(a) - real(b),
361  imag(a) - imag(b) );
362  return a;
363 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator-= ( magmaFloatComplex &  a,
const float  s 
)
inlinestatic

Definition at line 366 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

367 {
368  a = MAGMA_C_MAKE( real(a) - s,
369  imag(a) );
370  return a;
371 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator/ ( const magmaDoubleComplex  x,
const magmaDoubleComplex  y 
)
inlinestatic

Definition at line 174 of file operators.h.

References lapack_testing::f, imag(), MAGMA_Z_MAKE, and real().

175 {
176  double a = real(x);
177  double b = imag(x);
178  double c = real(y);
179  double d = imag(y);
180  double e, f, p, q;
181  if ( fabs( d ) < fabs( c ) ) {
182  e = d / c;
183  f = c + d*e;
184  p = ( a + b*e ) / f;
185  q = ( b - a*e ) / f;
186  }
187  else {
188  e = c / d;
189  f = d + c*e;
190  p = ( b + a*e ) / f;
191  q = ( -a + b*e ) / f;
192  }
193  return MAGMA_Z_MAKE( p, q );
194 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator/ ( const magmaDoubleComplex  a,
const double  s 
)
inlinestatic

Definition at line 197 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

198 {
199  return MAGMA_Z_MAKE( real(a)/s,
200  imag(a)/s );
201 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex operator/ ( const double  a,
const magmaDoubleComplex  y 
)
inlinestatic

Definition at line 204 of file operators.h.

References lapack_testing::f, imag(), MAGMA_Z_MAKE, and real().

205 {
206  double c = real(y);
207  double d = imag(y);
208  double e, f, p, q;
209  if ( fabs( d ) < fabs( c ) ) {
210  e = d / c;
211  f = c + d*e;
212  p = a / f;
213  q = -a*e / f;
214  }
215  else {
216  e = c / d;
217  f = d + c*e;
218  p = a*e / f;
219  q = -a / f;
220  }
221  return MAGMA_Z_MAKE( p, q );
222 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator/ ( const magmaFloatComplex  x,
const magmaFloatComplex  y 
)
inlinestatic

Definition at line 422 of file operators.h.

References lapack_testing::f, imag(), MAGMA_C_MAKE, and real().

423 {
424  float a = real(x);
425  float b = imag(x);
426  float c = real(y);
427  float d = imag(y);
428  float e, f, p, q;
429  if ( fabs( d ) < fabs( c ) ) {
430  e = d / c;
431  f = c + d*e;
432  p = ( a + b*e ) / f;
433  q = ( b - a*e ) / f;
434  }
435  else {
436  e = c / d;
437  f = d + c*e;
438  p = ( b + a*e ) / f;
439  q = ( -a + b*e ) / f;
440  }
441  return MAGMA_C_MAKE( p, q );
442 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator/ ( const magmaFloatComplex  a,
const float  s 
)
inlinestatic

Definition at line 445 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

446 {
447  return MAGMA_C_MAKE( real(a)/s,
448  imag(a)/s );
449 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex operator/ ( const float  a,
const magmaFloatComplex  y 
)
inlinestatic

Definition at line 452 of file operators.h.

References lapack_testing::f, imag(), MAGMA_C_MAKE, and real().

453 {
454  float c = real(y);
455  float d = imag(y);
456  float e, f, p, q;
457  if ( fabs( d ) < fabs( c ) ) {
458  e = d / c;
459  f = c + d*e;
460  p = a / f;
461  q = -a*e / f;
462  }
463  else {
464  e = c / d;
465  f = d + c*e;
466  p = a*e / f;
467  q = -a / f;
468  }
469  return MAGMA_C_MAKE( p, q );
470 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ magmaDoubleComplex& operator/= ( magmaDoubleComplex &  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 225 of file operators.h.

226 {
227  a = a/b;
228  return a;
229 }
__host__ static __device__ magmaDoubleComplex& operator/= ( magmaDoubleComplex &  a,
const double  s 
)
inlinestatic

Definition at line 232 of file operators.h.

References imag(), MAGMA_Z_MAKE, and real().

233 {
234  a = MAGMA_Z_MAKE( real(a)/s,
235  imag(a)/s );
236  return a;
237 }
#define MAGMA_Z_MAKE(r, i)
Definition: magma.h:123
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ magmaFloatComplex& operator/= ( magmaFloatComplex &  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 473 of file operators.h.

474 {
475  a = a/b;
476  return a;
477 }
__host__ static __device__ magmaFloatComplex& operator/= ( magmaFloatComplex &  a,
const float  s 
)
inlinestatic

Definition at line 480 of file operators.h.

References imag(), MAGMA_C_MAKE, and real().

481 {
482  a = MAGMA_C_MAKE( real(a)/s,
483  imag(a)/s );
484  return a;
485 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19
#define MAGMA_C_MAKE(r, i)
Definition: magma.h:145

Here is the call graph for this function:

__host__ static __device__ bool operator== ( const magmaDoubleComplex  a,
const magmaDoubleComplex  b 
)
inlinestatic

Definition at line 242 of file operators.h.

References imag(), and real().

243 {
244  return ( real(a) == real(b) &&
245  imag(a) == imag(b) );
246 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ bool operator== ( const magmaDoubleComplex  a,
const double  s 
)
inlinestatic

Definition at line 249 of file operators.h.

References imag(), and real().

250 {
251  return ( real(a) == s &&
252  imag(a) == 0. );
253 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ bool operator== ( const double  s,
const magmaDoubleComplex  a 
)
inlinestatic

Definition at line 256 of file operators.h.

References imag(), and real().

257 {
258  return ( real(a) == s &&
259  imag(a) == 0. );
260 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ bool operator== ( const magmaFloatComplex  a,
const magmaFloatComplex  b 
)
inlinestatic

Definition at line 490 of file operators.h.

References imag(), and real().

491 {
492  return ( real(a) == real(b) &&
493  imag(a) == imag(b) );
494 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ bool operator== ( const magmaFloatComplex  a,
const float  s 
)
inlinestatic

Definition at line 497 of file operators.h.

References imag(), and real().

498 {
499  return ( real(a) == s &&
500  imag(a) == 0. );
501 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ bool operator== ( const float  s,
const magmaFloatComplex  a 
)
inlinestatic

Definition at line 504 of file operators.h.

References imag(), and real().

505 {
506  return ( real(a) == s &&
507  imag(a) == 0. );
508 }
__host__ static __device__ double imag(const magmaDoubleComplex &x)
Definition: operators.h:24
__host__ static __device__ double real(const magmaDoubleComplex &x)
Definition: operators.h:19

Here is the call graph for this function:

__host__ static __device__ double real ( const magmaDoubleComplex &  x)
inlinestatic

Definition at line 19 of file operators.h.

References MAGMA_Z_REAL.

19 { return MAGMA_Z_REAL(x); }
#define MAGMA_Z_REAL(a)
Definition: magma.h:124
__host__ static __device__ float real ( const magmaFloatComplex &  x)
inlinestatic

Definition at line 20 of file operators.h.

References MAGMA_C_REAL.

20 { return MAGMA_C_REAL(x); }
#define MAGMA_C_REAL(a)
Definition: magma.h:146
__host__ static __device__ double real ( const double &  x)
inlinestatic

Definition at line 21 of file operators.h.

21 { return x; }
__host__ static __device__ float real ( const float &  x)
inlinestatic

Definition at line 22 of file operators.h.

22 { return x; }