I'm new to Arrayfire and searching for a method like 2D texture sampling.
float uvInit[] = { 0, 0, 1, 1, 1, 0, 0, 1 };
array uv = array(4, 2, uvInit, f32);
float texInit[] = { 1, 2, 3, 4 };
array tex = array(2, 2, texInit, f32);
array color = ???????;
// color should be 1d array { 1, 4, 3, 2 },
// e.g. { tex(0, 0), tex(1, 1), tex(1, 0), tex(0, 1) }.
Searched for documentation but not found anything like this, and I cannot even index an array with array element...
array s = ..., g = ...;
gfor(seq i, ...) {
auto x = g(0, i); // take an element from g.
s(x); // ERROR: no matched function.
}