Do more. Code less. Free software for GPU computing.
<scroll to top>

examples/template/template.cpp

#include <stdio.h>
#include <arrayfire.h>
using namespace af;

int main(int argc, char **argv)
{
    try {
        // print list of current GPUs
        info();

    } catch (af::exception &e) {
        fprintf(stderr, "%s\n", e.what());
    }

    #ifdef WIN32 // pause in Windows
    if (!(argc == 2 && argv[1][0] == '-')) {
        printf("hit [enter]...");
        getchar();
    }
    #endif
    return 0;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines