Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/arrayfire/arrayfire
/ ids_from_pos
Function
ids_from_pos
examples/graphics/gravity_sim.cpp:68–70 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
66
}
67
68
af::array ids_from_pos(vector<af::array> &pos) {
69
return (pos[0].as(u32) * height) + pos[1].as(u32);
70
}
71
72
af::array ids_from_3D(vector<af::array> &pos, float Rx, float Ry, float Rz) {
73
af::array x0 = (pos[0] - width / 2);
Callers
1
main
Function · 0.85
Calls
1
as
Method · 0.80
Tested by
no test coverage detected