MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / index

Method index

extensions/include/cuMat/src/MatrixBlock.h:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 * \param batch the batch index (output)
84 */
85 __host__ __device__ CUMAT_STRONG_INLINE void index(Index index, Index& row, Index& col, Index& batch) const
86 {
87 if (CUMAT_IS_ROW_MAJOR(Flags)) {
88 batch = index / (rows() * cols());
89 index -= batch * rows() * cols();
90 row = index / cols();
91 index -= row * cols();
92 col = index;
93 }
94 else {
95 batch = index / (rows() * cols());
96 index -= batch * rows() * cols();
97 col = index / rows();
98 index -= col * rows();
99 row = index;
100 }
101 }
102
103 /**
104 * \brief Accesses the coefficient at the specified coordinate for reading and writing.

Callers 4

mainFunction · 0.45
CwiseOp.hFile · 0.45
IO.hFile · 0.45
RandomEvaluationKernelFunction · 0.45

Calls 2

rowsFunction · 0.70
colsFunction · 0.70

Tested by

no test coverage detected