A high-performance general-purpose compute library
complex.h File Reference
#include "af/defines.h"
#include <ostream>
#include <istream>

Go to the source code of this file.

Data Structures

struct  af_cfloat
 
struct  af_cdouble
 

Namespaces

namespace  af
 

Macros

#define DEFINE_OP(OP)
 
#define DEFINE_OP(OP)
 
#define DEFINE_OP(OP)
 
#define DEFINE_OP(OP)
 

Typedefs

typedef struct af::af_cfloat af_cfloat
 
typedef struct af::af_cdouble af_cdouble
 
typedef af::af_cfloat cfloat
 
typedef af::af_cdouble cdouble
 

Functions

AFAPI float real (af_cfloat val)
 
AFAPI double real (af_cdouble val)
 
AFAPI float imag (af_cfloat val)
 
AFAPI double imag (af_cdouble val)
 
AFAPI af::cfloat operator+ (const af::cfloat &lhs, const af::cfloat &rhs)
 
AFAPI af::cdouble operator+ (const af::cdouble &lhs, const af::cdouble &rhs)
 
AFAPI af::cfloat operator- (const af::cfloat &lhs, const af::cfloat &rhs)
 
AFAPI af::cdouble operator- (const af::cdouble &lhs, const af::cdouble &rhs)
 
AFAPI af::cfloat operator* (const af::cfloat &lhs, const af::cfloat &rhs)
 
AFAPI af::cdouble operator* (const af::cdouble &lhs, const af::cdouble &rhs)
 
AFAPI af::cfloat operator/ (const af::cfloat &lhs, const af::cfloat &rhs)
 
AFAPI af::cdouble operator/ (const af::cdouble &lhs, const af::cdouble &rhs)
 
AFAPI af::cfloat operator+ (const af::cfloat &lhs, const double &rhs)
 
AFAPI af::cdouble operator+ (const af::cdouble &lhs, const double &rhs)
 
AFAPI af::cfloat operator/ (const af::cfloat &lhs, const double &rhs)
 
AFAPI af::cdouble operator/ (const af::cdouble &lhs, const double &rhs)
 
AFAPI af::cfloat operator- (const af::cfloat &lhs, const double &rhs)
 
AFAPI af::cdouble operator- (const af::cdouble &lhs, const double &rhs)
 
AFAPI af::cfloat operator* (const af::cfloat &lhs, const double &rhs)
 
AFAPI af::cdouble operator* (const af::cdouble &lhs, const double &rhs)
 
AFAPI af::cfloat operator+ (const double &rhs, const af::cfloat &lhs)
 
AFAPI af::cdouble operator+ (const double &rhs, const af::cdouble &lhs)
 
AFAPI af::cdouble operator+ (const af::cfloat &lhs, const af::cdouble &rhs)
 
AFAPI af::cdouble operator+ (const af::cdouble &lhs, const af::cfloat &rhs)
 
AFAPI af::cfloat operator- (const double &rhs, const af::cfloat &lhs)
 
AFAPI af::cdouble operator- (const double &rhs, const af::cdouble &lhs)
 
AFAPI af::cdouble operator- (const af::cfloat &lhs, const af::cdouble &rhs)
 
AFAPI af::cdouble operator- (const af::cdouble &lhs, const af::cfloat &rhs)
 
AFAPI af::cfloat operator* (const double &rhs, const af::cfloat &lhs)
 
AFAPI af::cdouble operator* (const double &rhs, const af::cdouble &lhs)
 
AFAPI af::cdouble operator* (const af::cfloat &lhs, const af::cdouble &rhs)
 
AFAPI af::cdouble operator* (const af::cdouble &lhs, const af::cfloat &rhs)
 
AFAPI af::cfloat operator/ (const double &rhs, const af::cfloat &lhs)
 
AFAPI af::cdouble operator/ (const double &rhs, const af::cdouble &lhs)
 
AFAPI af::cdouble operator/ (const af::cfloat &lhs, const af::cdouble &rhs)
 
AFAPI af::cdouble operator/ (const af::cdouble &lhs, const af::cfloat &rhs)
 
AFAPI bool operator== (const cfloat &lhs, const cfloat &rhs)
 
AFAPI bool operator== (const cdouble &lhs, const cdouble &rhs)
 
AFAPI bool operator!= (const cfloat &lhs, const cfloat &rhs)
 
AFAPI bool operator!= (const cdouble &lhs, const cdouble &rhs)
 
AFAPI std::istream & operator>> (std::istream &is, cfloat &in)
 
AFAPI std::istream & operator>> (std::istream &is, cdouble &in)
 
AFAPI std::ostream & operator<< (std::ostream &os, const cfloat &in)
 
AFAPI std::ostream & operator<< (std::ostream &os, const cdouble &in)
 
AFAPI float abs (const cfloat &val)
 
AFAPI double abs (const cdouble &val)
 
AFAPI cfloat conj (const cfloat &val)
 
AFAPI cdouble conj (const cdouble &val)
 

Macro Definition Documentation

◆ DEFINE_OP [1/4]

#define DEFINE_OP (   OP)
Value:
AFAPI af::cfloat operator OP(const af::cfloat &lhs, const af::cfloat &rhs); \
AFAPI af::cdouble operator OP(const af::cdouble &lhs, const af::cdouble &rhs); \
#define AFAPI
Definition: defines.h:38

Definition at line 89 of file complex.h.

◆ DEFINE_OP [2/4]

#define DEFINE_OP (   OP)
Value:
AFAPI af::cfloat operator OP(const af::cfloat &lhs, const double &rhs); \
AFAPI af::cdouble operator OP(const af::cdouble &lhs, const double &rhs); \

Definition at line 89 of file complex.h.

◆ DEFINE_OP [3/4]

#define DEFINE_OP (   OP)
Value:
AFAPI af::cfloat operator OP(const af::cfloat &lhs, const double &rhs); \
AFAPI af::cdouble operator OP(const af::cdouble &lhs, const double &rhs); \

Definition at line 89 of file complex.h.

◆ DEFINE_OP [4/4]

#define DEFINE_OP (   OP)
Value:
AFAPI af::cfloat operator OP(const double &rhs, const af::cfloat &lhs); \
AFAPI af::cdouble operator OP(const double &rhs, const af::cdouble &lhs); \
AFAPI af::cdouble operator OP(const af::cfloat &lhs, const af::cdouble &rhs); \
AFAPI af::cdouble operator OP(const af::cdouble &lhs, const af::cfloat &rhs); \

Definition at line 89 of file complex.h.