#include <math.h>
#include <cstdio>
static const int ITERATIONS = 50;
static const float PRECISION = 1.0f / ITERATIONS;
int main(int, char**) {
try {
af::Window myWindow(800, 800,
"2D Plot example: ArrayFire");
for (
double val = 0; !myWindow.
close();) {
myWindow(0, 0).
plot(X, Y);
X = X + PRECISION * float(sign);
val += PRECISION * float(sign);
sign = -1;
sign = 1;
}
}
fprintf(stderr,
"%s\n", e.
what());
throw;
}
return 0;
}