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

Function af_transform_coordinates

src/api/c/transform_coordinates.cpp:84–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84af_err af_transform_coordinates(af_array *out, const af_array tf,
85 const float d0_, const float d1_) {
86 try {
87 const ArrayInfo &tfInfo = getInfo(tf);
88 dim4 tfDims = tfInfo.dims();
89 ARG_ASSERT(1,
90 (tfDims[0] == 3 && tfDims[1] == 3 && tfDims.ndims() == 2));
91
92 af_array output;
93 af_dtype type = tfInfo.getType();
94 switch (type) {
95 case f32:
96 output = transform_coordinates<float>(tf, d0_, d1_);
97 break;
98 case f64:
99 output = transform_coordinates<double>(tf, d0_, d1_);
100 break;
101 default: TYPE_ERROR(1, type);
102 }
103 std::swap(*out, output);
104 }
105 CATCHALL;
106
107 return AF_SUCCESS;
108}

Callers 1

transformCoordinatesFunction · 0.50

Calls 4

swapFunction · 0.85
dimsMethod · 0.45
ndimsMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected