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

Function kernel

examples/cpu/fractal.cpp:100–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void kernel(Bitmap& bmp)
101{
102 for (unsigned y=0; y<bmp.height; ++y) {
103 for (unsigned x=0; x<bmp.width; ++x) {
104 int offset = x + y * bmp.width;
105 int juliaVal= julia(x, y, bmp.width, bmp.height);
106 bmp.ptr[offset*4 + 0] = 255 * juliaVal;
107 bmp.ptr[offset*4 + 1] = 0;
108 bmp.ptr[offset*4 + 2] = 0;
109 bmp.ptr[offset*4 + 3] = 255;
110 }
111 }
112}
113
114int julia(int x, int y, int width, int height)
115{

Callers 1

mainFunction · 0.70

Calls 1

juliaFunction · 0.85

Tested by

no test coverage detected