#include <cstdio>
#include <cstdlib>
int main(int argc, char* argv[]) {
try {
int device = argc > 1 ? atoi(argv[1]) : 0;
float h_buffer[] = {1, 4, 2, 5, 3, 6};
array in(2, 3, h_buffer);
fprintf(stderr,
"%s\n", e.
what());
throw;
}
return 0;
}
A multi dimensional data container.
An ArrayFire exception class.
virtual const char * what() const
Returns an error message for the exception in a string format.
seq is used to create sequences for indexing af::array
array matmul(const array &lhs, const array &rhs, const matProp optLhs=AF_MAT_NONE, const matProp optRhs=AF_MAT_NONE)
C++ Interface to multiply two matrices.
array diag(const array &in, const int num=0, const bool extract=true)
C++ Interface to extract the diagonal from an array.
void setDevice(const int device)
Sets the current device.
AFAPI void svd(array &u, array &s, array &vt, const array &in)
C++ Interface to perform singular value decomposition.
seq span
A special value representing the entire axis of an af::array.