MCPcopy Create free account
hub / github.com/arrayfire/forge / generatePoints

Function generatePoints

examples/cpu/stream.cpp:48–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48void generatePoints(std::vector<float> &points, std::vector<float> &dirs)
49{
50 points.clear();
51
52 for (int k=0; k<NELEMS; ++k) {
53 float z = MINIMUM + k*STEP;
54 for (int j=0; j<NELEMS; ++j) {
55 float y = MINIMUM + j*STEP;
56 for (int i=0; i<NELEMS; ++i) {
57 float x = MINIMUM + i*STEP;
58 points.push_back(x);
59 points.push_back(y);
60 points.push_back(z);
61 dirs.push_back(x-10.0f);
62 dirs.push_back(y-10.0f);
63 dirs.push_back(z-10.0f);
64 }
65 }
66 }
67}
68
69int main(void)
70{

Callers 1

mainFunction · 0.70

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected