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

Method SparseArrayBase

src/backend/common/SparseArray.cpp:47–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 : (_dims[1] + 1))
46
47SparseArrayBase::SparseArrayBase(const af::dim4 &_dims, dim_t _nNZ,
48 af::storage _storage, af_dtype _type)
49 : info(getActiveDeviceId(), _dims, 0, calcStrides(_dims), _type, true)
50 , stype(_storage)
51 , rowIdx(createValueArray<int>(dim4(ROW_LENGTH), 0))
52 , colIdx(createValueArray<int>(dim4(COL_LENGTH), 0)) {
53 static_assert(offsetof(SparseArrayBase, info) == 0,
54 "SparseArrayBase::info must be the first member variable of "
55 "SparseArrayBase.");
56 static_assert(std::is_nothrow_move_assignable<SparseArrayBase>::value,
57 "SparseArrayBase is not move assignable");
58 static_assert(std::is_nothrow_move_constructible<SparseArrayBase>::value,
59 "SparseArrayBase is not move constructible");
60}
61
62SparseArrayBase::SparseArrayBase(const af::dim4 &_dims, dim_t _nNZ,
63 int *const _rowIdx, int *const _colIdx,

Callers

nothing calls this directly

Calls 3

calcStridesFunction · 0.70
getActiveDeviceIdFunction · 0.50
dim4Class · 0.50

Tested by

no test coverage detected