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 
58 #endif
59 
60 #if AF_API_VERSION >= 32
61 
69 #endif
70 
71 #if AF_API_VERSION >= 33
72 
80 #endif
81 
82 #if AF_API_VERSION >= 33
83 
90 AFAPI af_err af_get_device_id(int *device, const af_array in);
91 #endif
92 
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #ifdef __cplusplus
99 namespace af
100 {
101 class array;
102 
103 #if AF_API_VERSION >= 32
104 
109 AFAPI void setBackend(const Backend bknd);
110 #endif
111 
112 #if AF_API_VERSION >= 32
113 
118 AFAPI unsigned getBackendCount();
119 #endif
120 
121 #if AF_API_VERSION >= 32
122 
138 #endif
139 
140 #if AF_API_VERSION >= 32
141 
148 #endif
149 
150 #if AF_API_VERSION >= 33
151 
157 #endif
158 
159 #if AF_API_VERSION >= 33
160 
168 AFAPI int getDeviceId(const array &in);
169 #endif
170 
171 }
172 #endif
af_get_available_backends
AFAPI af_err af_get_available_backends(int *backends)
Returns a flag of all available backends.
af::Backend
af_backend Backend
Definition: defines.h:570
af::getActiveBackend
AFAPI af::Backend getActiveBackend()
AFAPI
#define AFAPI
Definition: defines.h:38
af
Definition: algorithm.h:14
af::getBackendId
AFAPI af::Backend getBackendId(const array &in)
af_array
void * af_array
Definition: defines.h:240
af_backend
af_backend
Definition: defines.h:413
afcl::array
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:327
af_get_backend_count
AFAPI af_err af_get_backend_count(unsigned *num_backends)
af_set_backend
AFAPI af_err af_set_backend(const af_backend bknd)
af::getBackendCount
AFAPI unsigned getBackendCount()
af_get_active_backend
AFAPI af_err af_get_active_backend(af_backend *backend)
af::getDeviceId
AFAPI int getDeviceId(const array &in)
af_get_backend_id
AFAPI af_err af_get_backend_id(af_backend *backend, const af_array in)
af_get_device_id
AFAPI af_err af_get_device_id(int *device, const af_array in)
af::setBackend
AFAPI void setBackend(const Backend bknd)
af::getAvailableBackends
AFAPI int getAvailableBackends()
Returns a flag of all available backends.
af_err
af_err
Definition: defines.h:71
defines.h