A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arrayfire.org/docs/lin_algebra_2svd_8cpp-example.htm below:

ArrayFire: lin_algebra/svd.cpp

#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);

svd(u, s_vec, vt, in);

array

s_mat = diag(s_vec, 0,

false

);

array

in_recon = matmul(u, s_mat, vt(

seq

(2), span));

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

AFAPI void setDevice(const int device)

Sets the current device.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4