DO MORE. CODE LESS. Free software for GPU computing on AMD, Intel, and NVIDIA.
Classes | Namespaces | Defines | Typedefs | Enumerations | Functions | Variables
arrayfire.h File Reference
#include <iomanip>
#include <CL/cl.h>
#include <string.h>
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <sys/time.h>
#include <math.h>

Go to the source code of this file.

Classes

class  af::array
struct  af::timer

Namespaces

namespace  af

Defines

#define MAX_PLATFORMS   16
#define MAX_DEVICES   16
#define OP(op)
#define OP_COM(op)
#define print(exp)   do { std::cout << #exp << " =\n"; print_(exp); } while (0)
 Print array name and data.
#define UNARY(OP)   array OP(const array& in)

Typedefs

typedef cl_float2 af::clFloatComplex
typedef struct af::timer af::timer

Enumerations

enum  af::af_type { af::AF_SINGLE_REAL, af::AF_SINGLE_CPLX }
enum  af::af_mode { af::af_valid = -1, af::af_same, af::af_full }
 Filtering modes. More...

Functions

array af::setdims (const array &in, unsigned R, unsigned C)
void af::print_ (const array &in)
 Print array contents to screen.
std::ostream & af::operator<< (std::ostream &out, const array in)
 Print to ostream.
array af::multiply (const array &A, const array &B)
 Matrix multiplication.
array af::dot (const array &A, const array &B)
 Dot product (k is 1)
array af::fft1D (const array &in)
 fourier transform along columns
array af::ifft1D (const array &in)
 inverse fourier transform along columns
array af::fft2D (const array &in)
 fourier transform of matrices / images
array af::ifft2D (const array &in)
 inverse fourier transform of matrices / images
array af::convolve (const array &input, const array &filter, af_mode mode=af_full)
 Apply convolution filter.
array af::real (const array &in)
 Get the real part.
array af::imag (const array &in)
 Get the imaginary part.
array af::complex (const array &real, const array &imag)
 Construct complex array from real and imaginary parts.
array af::complex (const array &real)
 Construct complex array from real part.
array af::conjugate (const array &a)
 Get the conjugate of the complex array.
void af::info ()
 Display the devices available for computation.
void af::device (int dev)
 Select a particular device.
int af::device (void)
 Returns the number of devices available.
void af::sync ()
 Synchronize the current device.
array af::tile (array &in, int M, int N=1)
 Tile the elements of the array.
array af::sin (const array &in)
array af::cos (const array &in)
array af::tan (const array &in)
array af::asin (const array &in)
array af::acos (const array &in)
array af::atan (const array &in)
array af::erf (const array &in)
array af::exp (const array &in)
array af::sqrt (const array &in)
array af::log (const array &in)
double af::timeit (void(*fn)())

Variables

cl_context g_ctx
cl_command_queue g_queue
cl_program g_program
cl_device_id devices [16]
int device_count
int current_device

Define Documentation

#define MAX_PLATFORMS   16
#define MAX_DEVICES   16
#define OP (   op)
Value:
                                 \
        array operator op(const array &lhs);                    \         \
        friend array operator op(const float& lhs, array &rhs); \         \
        array operator op(const float &lhs);                    \        \
        array operator op(const clFloatComplex& lhs)
#define OP_COM (   op)
Value:
                                 \
        array operator op(const array &lhs);                    \         \
        friend array operator op(const float& lhs, array &rhs)  \
        { return rhs op lhs;}                                   \         \
        array operator op(const float &lhs);                    \        \
        array operator op(const clFloatComplex& lhs)
#define UNARY (   OP)    array OP(const array& in)

Variable Documentation

cl_context g_ctx
cl_command_queue g_queue
cl_program g_program
cl_device_id devices[16]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines