MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / af_sparse_get_values

Function af_sparse_get_values

src/api/c/sparse.cpp:438–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438af_err af_sparse_get_values(af_array *out, const af_array in) {
439 try {
440 const SparseArrayBase base = getSparseArrayBase(in);
441
442 af_array output = nullptr;
443
444 switch (base.getType()) {
445 case f32: output = getSparseValues<float>(in); break;
446 case f64: output = getSparseValues<double>(in); break;
447 case c32: output = getSparseValues<cfloat>(in); break;
448 case c64: output = getSparseValues<cdouble>(in); break;
449 default: TYPE_ERROR(1, base.getType());
450 }
451 std::swap(*out, output);
452 }
453 CATCHALL;
454 return AF_SUCCESS;
455}
456
457af_err af_sparse_get_row_idx(af_array *out, const af_array in) {
458 try {

Callers 2

af_sparse_get_infoFunction · 0.70
sparseGetValuesFunction · 0.50

Calls 2

swapFunction · 0.85
getTypeMethod · 0.45

Tested by

no test coverage detected