#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.
Definition: array.h:27
Definition: exception.h:20
virtual const char * what() const
Definition: exception.h:34
seq is used to create seq for indexing af::array
Definition: seq.h:46
AFAPI array matmul(const array &lhs, const array &rhs, const matProp optLhs=AF_MAT_NONE, const matProp optRhs=AF_MAT_NONE)
Matrix multiply of two arrays.
AFAPI array diag(const array &in, const int num=0, const bool extract=true)
AFAPI void setDevice(const int device)
Sets the current device.
AFAPI void svd(array &u, array &s, array &vt, const array &in)
C++ Interface for SVD decomposition.
Definition: algorithm.h:15
#define af_print(...)
Definition: util.h:141