A high-performance general-purpose compute library

- Main Page
- Tutorials
- 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
24 AFAPI af_err af_set_backend(const af_backend bknd);
25#endif
26
27#if AF_API_VERSION >= 32
34 AFAPI af_err af_get_backend_count(unsigned* num_backends);
35#endif
36
37#if AF_API_VERSION >= 32
57 AFAPI af_err af_get_available_backends(int* backends);
58#endif
59
60#if AF_API_VERSION >= 32
68 AFAPI af_err af_get_backend_id(af_backend *backend, const af_array in);
69#endif
70
71#if AF_API_VERSION >= 33
79 AFAPI af_err af_get_active_backend(af_backend *backend);
80#endif
81
82#if AF_API_VERSION >= 33
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
109 AFAPI void setBackend(const Backend bknd);
110#endif
111
112#if AF_API_VERSION >= 32
118 AFAPI unsigned getBackendCount();
119#endif
120
121#if AF_API_VERSION >= 32
137 AFAPI int getAvailableBackends();
138#endif
139
140#if AF_API_VERSION >= 32
147 AFAPI af::Backend getBackendId(const array &in);
148#endif
149
150#if AF_API_VERSION >= 33
156 AFAPI af::Backend getActiveBackend();
157#endif
158
159#if AF_API_VERSION >= 33
168 AFAPI int getDeviceId(const array &in);
169#endif
170
171}
172#endif
af::array
A multi dimensional data container.
Definition array.h:37
defines.h
af_err
af_err
Definition defines.h:71
af_array
void * af_array
Definition defines.h:240
AFAPI
#define AFAPI
Definition defines.h:38
af_backend
af_backend
Definition defines.h:413
af_get_active_backend
AFAPI af_err af_get_active_backend(af_backend *backend)
af::getAvailableBackends
AFAPI int getAvailableBackends()
Returns a flag of all available backends.
af_get_available_backends
AFAPI af_err af_get_available_backends(int *backends)
Returns a flag of all available backends.
af::getBackendCount
AFAPI unsigned getBackendCount()
af_get_backend_count
AFAPI af_err af_get_backend_count(unsigned *num_backends)
af::getBackendId
AFAPI af::Backend getBackendId(const array &in)
af_get_backend_id
AFAPI af_err af_get_backend_id(af_backend *backend, const af_array in)
af::getDeviceId
AFAPI int getDeviceId(const array &in)
af_get_device_id
AFAPI af_err af_get_device_id(int *device, const af_array in)
af_set_backend
AFAPI af_err af_set_backend(const af_backend bknd)
af::setBackend
AFAPI void setBackend(const Backend bknd)
af
Definition algorithm.h:15
af::getActiveBackend
AFAPI af::Backend getActiveBackend()