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

Function reshape

src/backend/oneapi/reshape.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21template<typename inType, typename outType>
22Array<outType> reshape(const Array<inType> &in, const dim4 &outDims,
23 outType defaultValue, double scale) {
24 Array<outType> out = createEmptyArray<outType>(outDims);
25 if (out.elements() > 0) {
26 kernel::copy<inType, outType>(out, in, in.ndims(), defaultValue, scale,
27 in.dims() == outDims);
28 }
29 return out;
30}
31
32#define INSTANTIATE(SRC_T) \
33 template Array<float> reshape<SRC_T, float>(Array<SRC_T> const &, \

Callers

nothing calls this directly

Calls 3

elementsMethod · 0.45
ndimsMethod · 0.45
dimsMethod · 0.45

Tested by

no test coverage detected