#include <cstdio>
#include <cstdlib>
int main(int argc, char* argv[]) {
try {
int device = argc > 1 ? atoi(argv[1]) : 0;
int n = 5;
printf("Running Cholesky InPlace\n");
printf("Running Cholesky Out of place\n");
fprintf(stderr,
"%s\n", e.
what());
throw;
}
return 0;
}
array copy() const
Perform deep copy of the array.
An ArrayFire exception class.
virtual const char * what() const
Returns an error message for the exception in a string format.
AFAPI array matmulNT(const array &lhs, const array &rhs)
Matrix multiply of two arrays.
AFAPI array identity(const dim4 &dims, const dtype ty=f32)
AFAPI void setDevice(const int device)
Sets the current device.
AFAPI int choleskyInPlace(array &in, const bool is_upper=true)
C++ Interface for in place cholesky decomposition.
AFAPI int cholesky(array &out, const array &in, const bool is_upper=true)
C++ Interface for cholesky decomposition.
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.
AFAPI array randu(const dim4 &dims, const dtype ty, randomEngine &r)