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

Function flip

src/backend/common/indexing_helpers.hpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22// of size original dims according to axes specified in flip
23template<typename T>
24static detail::Array<T> flip(const detail::Array<T>& in,
25 const std::array<bool, AF_MAX_DIMS> flip) {
26 std::vector<af_seq> index(4, af_span);
27 const af::dim4& dims = in.dims();
28
29 for (int i = 0; i < AF_MAX_DIMS; ++i) {
30 if (flip[i]) {
31 index[i] = {static_cast<double>(dims[i] - 1), 0.0, -1.0};
32 }
33 }
34 return createSubArray(in, index);
35}
36
37} // namespace common
38} // namespace arrayfire

Callers 12

convolve2_unwrapFunction · 0.50
conv2DataGradientFunction · 0.50
conv2FilterGradientFunction · 0.50
convolve2_unwrapFunction · 0.50
conv2DataGradientFunction · 0.50
conv2FilterGradientFunction · 0.50
convolve2_unwrapFunction · 0.50
conv2DataGradientFunction · 0.50
conv2FilterGradientFunction · 0.50
convolve2_baseFunction · 0.50
data_gradient_baseFunction · 0.50
filter_gradient_baseFunction · 0.50

Calls 2

createSubArrayFunction · 0.50
dimsMethod · 0.45

Tested by

no test coverage detected