MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / make_stride

Function make_stride

src/utils/inc/brainflow_array.h:65–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64template <size_t N>
65static inline std::array<int, N> make_stride (const std::array<int, N> &size)
66{
67 std::array<int, N> stride;
68
69 stride[N - 1] = 1;
70 for (int i = (int)N - 2; i >= 0; i--)
71 {
72 stride[i] = stride[i + 1] * size[i + 1];
73 }
74
75 return stride;
76}
77
78/// Class to represent NDArrays, row major order, continuous memory
79template <typename T, size_t Dim>

Callers 1

BrainFlowArrayMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected