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

Function multiplyIndexed

src/api/c/transform_coordinates.cpp:31–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template<typename T>
31Array<T> multiplyIndexed(const Array<T> &lhs, const Array<T> &rhs,
32 std::vector<af_seq> idx) {
33 Array<T> rhs_sub = createSubArray(rhs, idx);
34 Array<T> out = createEmptyArray<T>(
35 dim4(lhs.dims()[0], rhs_sub.dims()[1], lhs.dims()[2], lhs.dims()[3]));
36 T alpha = scalar<T>(1.0);
37 T beta = scalar<T>(0.0);
38 gemm(out, AF_MAT_NONE, AF_MAT_NONE, &alpha, lhs, rhs_sub, &beta);
39 return out;
40}
41
42template<typename T>
43static af_array transform_coordinates(const af_array &tf_, const float d0_,

Callers 1

transform_coordinatesFunction · 0.85

Calls 4

gemmFunction · 0.70
createSubArrayFunction · 0.50
dim4Class · 0.50
dimsMethod · 0.45

Tested by

no test coverage detected