|
My Project
|
|
Go to the documentation of this file.
26 #if AF_API_VERSION >= 31
37 #if AF_API_VERSION >= 31
49 AFAPI int saveArray(
const char *key,
const array &arr,
const char *filename,
const bool append =
false);
52 #if AF_API_VERSION >= 31
66 #if AF_API_VERSION >= 31
80 #if AF_API_VERSION >= 31
95 #if AF_API_VERSION >= 31
109 const int precision = 4,
const bool transpose =
true);
112 #if AF_API_VERSION >= 33
127 const int precision = 4,
const bool transpose =
true);
134 #if AF_API_VERSION >= 31
136 #define AF_PRINT1(exp) af::print(#exp, exp);
137 #define AF_PRINT2(exp, precision) af::print(#exp, exp, precision);
139 #define GET_PRINT_MACRO(_1, _2, NAME, ...) NAME
141 #define af_print(...) GET_PRINT_MACRO(__VA_ARGS__, AF_PRINT2, AF_PRINT1)(__VA_ARGS__)
143 #else // AF_API_VERSION
145 #define af_print(exp) af::print(#exp, exp);
147 #endif // AF_API_VERSION
164 #if AF_API_VERSION >= 31
177 #if AF_API_VERSION >= 31
191 #if AF_API_VERSION >= 31
204 #if AF_API_VERSION >= 31
217 #if AF_API_VERSION >= 31
231 #if AF_API_VERSION >= 31
244 const int precision,
const bool transpose);
256 #if AF_API_VERSION >= 33
AFAPI void toString(char **output, const char *exp, const array &arr, const int precision=4, const bool transpose=true)
AFAPI af_err af_read_array_index(af_array *out, const char *filename, const unsigned index)
AFAPI af_err af_get_version(int *major, int *minor, int *patch)
Get the version information of the library.
AFAPI array readArray(const char *filename, const unsigned index)
AFAPI array exp(const array &in)
C++ Interface for exponential of an array.
AFAPI int saveArray(const char *key, const array &arr, const char *filename, const bool append=false)
AFAPI array exampleFunction(const array &in, const af_someenum_t param)
#define AFAPI
Definition: defines.h:30
Definition: algorithm.h:13
AFAPI int readArrayCheck(const char *filename, const char *key)
When reading by key, it may be a good idea to run this function first to check for the key and then c...
void * af_array
Definition: defines.h:221
AFAPI void print(const char *exp, const array &arr)
AFAPI af_err af_read_array_key(af_array *out, const char *filename, const char *key)
const AFAPI char * af_get_revision()
Get the revision (commit) information of the library.
AFAPI af_err af_example_function(af_array *out, const af_array in, const af_someenum_t param)
AFAPI af_err af_save_array(int *index, const char *key, const af_array arr, const char *filename, const bool append)
AFAPI af_err af_array_to_string(char **output, const char *exp, const af_array arr, const int precision, const bool transpose)
AFAPI af_err af_print_array(af_array arr)
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer.
Definition: opencl.h:328
AFAPI af_err af_read_array_key_check(int *index, const char *filename, const char *key)
When reading by key, it may be a good idea to run this function first to check for the key and then c...
AFAPI af_err af_print_array_gen(const char *exp, const af_array arr, const int precision)
af_err
Definition: defines.h:62
AFAPI array transpose(const array &in, const bool conjugate=false)
Transposes a matrix.
af_someenum_t
Definition: defines.h:379