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

Method setData

src/backend/cpu/jit/BufferNode.hpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 }
47
48 void setData(std::shared_ptr<T> data, unsigned bytes, dim_t data_off,
49 const dim_t *dims, const dim_t *strides,
50 const bool is_linear) {
51 m_data = data;
52 m_ptr = data.get() + data_off;
53 m_bytes = bytes;
54 m_linear_buffer = is_linear;
55 for (int i = 0; i < 4; i++) {
56 m_strides[i] = strides[i];
57 m_dims[i] = dims[i];
58 }
59 }
60
61 void setShape(af::dim4 new_shape) final {
62 auto new_strides = calcStrides(new_shape);

Callers 4

getNodeMethod · 0.45
getNodeMethod · 0.45
getNodeMethod · 0.45
getNodeMethod · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected