A high-performance general-purpose compute library

Pad an array. More...

Functions

AFAPI array pad (const array &in, const dim4 &beginPadding, const dim4 &endPadding, const borderType padFillType)
 C++ Interface to pad an array. More...
 
AFAPI af_err af_pad (af_array *out, const af_array in, const unsigned begin_ndims, const dim_t *const begin_dims, const unsigned end_ndims, const dim_t *const end_dims, const af_border_type pad_fill_type)
 C Interface to pad an array. More...
 

Detailed Description

Pad an array.

Pad the input array using a constant or values from input along the border.


Function Documentation

◆ af_pad()

AFAPI af_err af_pad ( af_array out,
const af_array  in,
const unsigned  begin_ndims,
const dim_t *const  begin_dims,
const unsigned  end_ndims,
const dim_t *const  end_dims,
const af_border_type  pad_fill_type 
)

C Interface to pad an array.

Parameters
[out]outpadded array
[in]ininput array
[in]begin_ndimsnumber of dimensions for start padding
[in]begin_dimsnumber of elements to be padded at the start of each dimension
[in]end_ndimsnumber of dimensions for end padding
[in]end_dimsnumber of elements to be padded at the end of each dimension
[in]pad_fill_typevalues to fill into the padded region
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given

◆ pad()

AFAPI array pad ( const array in,
const dim4 beginPadding,
const dim4 endPadding,
const borderType  padFillType 
)

C++ Interface to pad an array.

Parameters
[in]ininput array
[in]beginPaddingnumber of elements to be padded at the start of each dimension
[in]endPaddingnumber of elements to be padded at the end of each dimension
[in]padFillTypevalues to fill into the padded region
Returns
padded array