internal.h Source File

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

internal.h
Go to the documentation of this file.
1 /*******************************************************
2 * Copyright (c) 2016, 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 #include <af/dim4.hpp>
13
14 #ifdef __cplusplus
15 namespace af
16 {
17 class array;
18
19 #if AF_API_VERSION >= 33
20
34 AFAPI array createStridedArray(const void *data, const dim_t offset,
35 const dim4 dims, const dim4 strides,
36 const af::dtype ty,
37 const af::source location);
38 #endif
39
40 #if AF_API_VERSION >= 33
41
47 AFAPI dim4 getStrides(const array &in);
48 #endif
49
50 #if AF_API_VERSION >= 33
51
57 AFAPI dim_t getOffset(const array &in);
58 #endif
59
60 #if AF_API_VERSION >= 33
61
69 AFAPI void *getRawPtr(const array &in);
70 #endif
71
72 #if AF_API_VERSION >= 33
73
79 AFAPI bool isLinear(const array &in);
80 #endif
81
82 #if AF_API_VERSION >= 33
83
89 AFAPI bool isOwner(const array &in);
90 #endif
91 }
92 #endif
93
94 #ifdef __cplusplus
95 extern "C"
96 {
97 #endif
98
99 #if AF_API_VERSION >= 33
100
114 AFAPI af_err af_create_strided_array(af_array *arr,
115 const void *data,
116 const dim_t offset,
117 const unsigned ndims,
118 const dim_t *const dims,
119 const dim_t *const strides,
120 const af_dtype ty,
121 const af_source location);
122 #endif
123
124 #if AF_API_VERSION >= 33
125
134 AFAPI af_err af_get_strides(dim_t *s0, dim_t *s1, dim_t *s2, dim_t *s3, const af_array arr);
135 #endif
136
137 #if AF_API_VERSION >= 33
138
144 AFAPI af_err af_get_offset(dim_t *offset, const af_array arr);
145 #endif
146
147 #if AF_API_VERSION >= 33
148
156 AFAPI af_err af_get_raw_ptr(void **ptr, const af_array arr);
157 #endif
158
159 #if AF_API_VERSION >= 33
160
166 AFAPI af_err af_is_linear(bool *result, const af_array arr);
167 #endif
168
169 #if AF_API_VERSION >= 33
170
176 AFAPI af_err af_is_owner(bool *result, const af_array arr);
177 #endif
178
179 #ifdef __cplusplus
180 }
181 #endif
af
Definition: algorithm.h:14
af_get_strides
AFAPI af_err af_get_strides(dim_t *s0, dim_t *s1, dim_t *s2, dim_t *s3, const af_array arr)
af_get_offset
AFAPI af_err af_get_offset(dim_t *offset, const af_array arr)
af::getRawPtr
AFAPI void * getRawPtr(const array &in)
af_create_strided_array
AFAPI af_err af_create_strided_array(af_array *arr, const void *data, const dim_t offset, const unsigned ndims, const dim_t *const dims, const dim_t *const strides, const af_dtype ty, const af_source location)
af::getOffset
AFAPI dim_t getOffset(const array &in)
af_is_owner
AFAPI af_err af_is_owner(bool *result, const af_array arr)
af::isOwner
AFAPI bool isOwner(const array &in)
af_is_linear
AFAPI af_err af_is_linear(bool *result, const af_array arr)
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:337
dim4.hpp
af_err
af_err
Definition: defines.h:67
af::isLinear
AFAPI bool isLinear(const array &in)
af_source
af_source
Definition: defines.h:218
defines.h
dim_t
long long dim_t
Definition: defines.h:50
AFAPI
#define AFAPI
Definition: defines.h:31
af::createStridedArray
AFAPI array createStridedArray(const void *data, const dim_t offset, const dim4 dims, const dim4 strides, const af::dtype ty, const af::source location)
af_get_raw_ptr
AFAPI af_err af_get_raw_ptr(void **ptr, const af_array arr)
af_array
void * af_array
Definition: defines.h:226
af::getStrides
AFAPI dim4 getStrides(const array &in)
af_dtype
af_dtype
Definition: defines.h:199