internal.h File Reference

(2020-07-07 17:43:34 +0530, (build 218dd2c99))

#include <af/defines.h>
#include <af/dim4.hpp>

Go to the source code of this file.

Namespaces

 af
 

Functions

AFAPI array createStridedArray (const void *data, const dim_t offset, const dim4 dims, const dim4 strides, const af::dtype ty, const af::source location)
 
AFAPI dim4 getStrides (const array &in)
 
AFAPI dim_t getOffset (const array &in)
 
AFAPI void * getRawPtr (const array &in)
 
AFAPI bool isLinear (const array &in)
 
AFAPI bool isOwner (const array &in)
 
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)
 
AFAPI af_err af_get_strides (dim_t *s0, dim_t *s1, dim_t *s2, dim_t *s3, const af_array arr)
 
AFAPI af_err af_get_offset (dim_t *offset, const af_array arr)
 
AFAPI af_err af_get_raw_ptr (void **ptr, const af_array arr)
 
AFAPI af_err af_is_linear (bool *result, const af_array arr)
 
AFAPI af_err af_is_owner (bool *result, const af_array arr)
 
AFAPI af_err af_get_allocated_bytes (size_t *bytes, const af_array arr)
 

Function Documentation

◆ af_get_allocated_bytes()

AFAPI af_err af_get_allocated_bytes ( size_t *  bytes,
const af_array  arr 
)
Parameters
[out]bytesthe size of the physical allocated bytes. This will return the size of the parent/owner if the arr is an indexed array.
[in]arrthe input array.

◆ af_get_raw_ptr()

AFAPI af_err af_get_raw_ptr ( void **  ptr,
const af_array  arr 
)
Parameters
[in]arrAn multi dimensional array.
[out]ptrthe raw pointer location to the array.
Note
This pointer may be shared with other arrays. Use this function with caution.