#include <cstdio>
#include <math.h>
static const int M = 30;
static const int N = 2 * M;
int main(int argc, char *argv[])
{
try {
af::Window myWindow(800, 800,
"3D Surface example: ArrayFire");
std::cout << x.
dims() << y.
dims() << std::endl;
static float t=0;
while(!myWindow.
close()) {
t+=0.07;
}
fprintf(stderr,
"%s\n", e.
what());
throw;
}
return 0;
}
Window object to render af::arrays.
Definition: graphics.h:37
A multi dimensional data container.
Definition: array.h:27
Definition: exception.h:20
virtual const char * what() const
Definition: exception.h:34
AFAPI array abs(const array &in)
C++ Interface for absolute value.
AFAPI array cos(const array &in)
C++ Interface for cos.
AFAPI array sin(const array &in)
C++ Interface for sin.
AFAPI array iota(const dim4 &dims, const dim4 &tile_dims=dim4(1), const dtype ty=f32)
void surface(const array &S, const char *const title=NULL)
Renders the input arrays as a 3D surface plot to the window.
bool close()
Check if window is marked for close.
dim4 dims() const
Get dimensions of the array.
Definition: algorithm.h:15