backend.h Source File

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

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
24 AFAPI af_err af_set_backend(const af_backend bknd);
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
44 AFAPI af_err af_get_available_backends(int* backends);
45 #endif
46
47 #if AF_API_VERSION >= 32
48
55 AFAPI af_err af_get_backend_id(af_backend *backend, const af_array in);
56 #endif
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #ifdef __cplusplus
63 namespace af
64 {
65 class array;
66
67 #if AF_API_VERSION >= 32
68
73 AFAPI void setBackend(const Backend bknd);
74 #endif
75
76 #if AF_API_VERSION >= 32
77
82 AFAPI unsigned getBackendCount();
83 #endif
84
85 #if AF_API_VERSION >= 32
86
91 AFAPI int getAvailableBackends();
92 #endif
93
94 #if AF_API_VERSION >= 32
95
101 AFAPI af::Backend getBackendId(const array &in);
102 #endif
103
104 }
105 #endif
af_backend
af_backend
Definition: defines.h:366
af::setBackend
AFAPI void setBackend(const Backend bknd)
af
Definition: algorithm.h:14
af_set_backend
AFAPI af_err af_set_backend(const af_backend bknd)
af::Backend
af_backend Backend
Definition: defines.h:405
af_get_available_backends
AFAPI af_err af_get_available_backends(int *backends)
af::getBackendId
AFAPI af::Backend getBackendId(const array &in)
af_err
af_err
Definition: defines.h:67
af::getAvailableBackends
AFAPI int getAvailableBackends()
defines.h
af::getBackendCount
AFAPI unsigned getBackendCount()
AFAPI
#define AFAPI
Definition: defines.h:31
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:161
af_get_backend_id
AFAPI af_err af_get_backend_id(af_backend *backend, const af_array in)
af_array
void * af_array
Definition: defines.h:219
af_get_backend_count
AFAPI af_err af_get_backend_count(unsigned *num_backends)