#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;
}
A multi dimensional data container.
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.
array matmulNT(const array &lhs, const array &rhs)
C++ Interface to multiply two matrices.
array identity(const dim4 &dims, const dtype ty=f32)
C++ Interface to generate an identity array.
void setDevice(const int device)
Sets the current device.
AFAPI int choleskyInPlace(array &in, const bool is_upper=true)
C++ Interface to perform in-place Cholesky decomposition.
AFAPI int cholesky(array &out, const array &in, const bool is_upper=true)
C++ Interface to perform Cholesky decomposition.
array randu(const dim4 &dims, const dtype ty, randomEngine &r)
C++ Interface to create an array of random numbers uniformly distributed.