| 45 | : (_dims[1] + 1)) |
| 46 | |
| 47 | SparseArrayBase::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 | |
| 62 | SparseArrayBase::SparseArrayBase(const af::dim4 &_dims, dim_t _nNZ, |
| 63 | int *const _rowIdx, int *const _colIdx, |
nothing calls this directly
no test coverage detected