backend.h
Go to the documentation of this file.
1 /*******************************************************
2  * Copyright (c) 2014, ArrayFire
3  * All rights reserved.
4  *
5  * This file is distributed under 3-clause BSD license.
6  * The complete license agreement can be obtained at:
7  * http://arrayfire.com/licenses/BSD-3-Clause
8  ********************************************************/
9 
10 #pragma once
11 #include <af/defines.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #if AF_API_VERSION >= 32
18 
25 #endif
26 
27 #if AF_API_VERSION >= 32
28 
34 AFAPI af_err af_get_backend_count(unsigned* num_backends);
35 #endif
36 
37 #if AF_API_VERSION >= 32
38 
45 #endif
46 
47 #if AF_API_VERSION >= 32
48 
56 #endif
57 
58 #if AF_API_VERSION >= 33
59 
67 #endif
68 
69 #if AF_API_VERSION >= 33
70 
77 AFAPI af_err af_get_device_id(int *device, const af_array in);
78 #endif
79 
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #ifdef __cplusplus
86 namespace af
87 {
88 class array;
89 
90 #if AF_API_VERSION >= 32
91 
96 AFAPI void setBackend(const Backend bknd);
97 #endif
98 
99 #if AF_API_VERSION >= 32
100 
105 AFAPI unsigned getBackendCount();
106 #endif
107 
108 #if AF_API_VERSION >= 32
109 
115 #endif
116 
117 #if AF_API_VERSION >= 32
118 
125 #endif
126 
127 #if AF_API_VERSION >= 33
128 
134 #endif
135 
136 #if AF_API_VERSION >= 33
137 
145 AFAPI int getDeviceId(const array &in);
146 #endif
147 
148 }
149 #endif
af_backend
Definition: defines.h:369
AFAPI void setBackend(const Backend bknd)
Definition: algorithm.h:14
AFAPI af_err af_get_active_backend(af_backend *backend)
AFAPI af_err af_set_backend(const af_backend bknd)
af_backend Backend
Definition: defines.h:421
AFAPI af::Backend getActiveBackend()
AFAPI af_err af_get_available_backends(int *backends)
AFAPI af::Backend getBackendId(const array &in)
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer.
Definition: opencl.h:329
af_err
Definition: defines.h:63
AFAPI int getAvailableBackends()
AFAPI int getDeviceId(const array &in)
AFAPI unsigned getBackendCount()
#define AFAPI
Definition: defines.h:31
AFAPI af_err af_get_backend_id(af_backend *backend, const af_array in)
void * af_array
Definition: defines.h:222
AFAPI af_err af_get_backend_count(unsigned *num_backends)
AFAPI af_err af_get_device_id(int *device, const af_array in)