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)
 
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)
 

Detailed Description

Pad an array.

Pad the input array using a constant or values from input along 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 
)
Parameters
[out]outis the padded array
[in]inis the input array to be padded
[in]begin_ndimsis size of l_dims array
[in]begin_dimsarray contains padding size at beginning of each dimension
[in]end_ndimsis size of u_dims array
[in]end_dimsarray contains padding sizes at end of each dimension
[in]pad_fill_typeis indicates what values should fill padded region

◆ pad()

AFAPI array pad ( const array in,
const dim4 beginPadding,
const dim4 endPadding,
const borderType  padFillType 
)
Parameters
[in]inis the input array to be padded
[in]beginPaddinginforms the number of elements to be padded at beginning of each dimension
[in]endPaddinginforms the number of elements to be padded at end of each dimension
[in]padFillTypeis indicates what values should fill padded region
Returns
the padded array