The C interface for tile. More...

Device pointer interface: Replicating the input matrix

Replicate an array along specified dimensions.

Parameters
[out]d_outReplicated array
[in]ndimsNumber of dimensions in array dims
[in]dimsArray of dimensions
[in]d_inOriginal array.
[in]nrepsNumber of replications in array reps
[in]repsArray indicating extent of replication in each dimension, e.g. [1 2] replicates only in the second dimension.
[in]batchNumber of tiles in batch.
afError af_tile_S (float *d_out, unsigned ndims, const unsigned *dims, const float *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Single-precision array replication. More...
 
afError af_tile_D (double *d_out, unsigned ndims, const unsigned *dims, const double *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Double-precision array replication. More...
 
afError af_tile_B (bool *d_out, unsigned ndims, const unsigned *dims, const bool *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Boolean (8-bit) array replication. More...
 
afError af_tile_U (unsigned *d_out, unsigned ndims, const unsigned *dims, const unsigned *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Unsigned integer array replication. More...
 
afError af_tile_I (int *d_out, unsigned ndims, const unsigned *dims, const int *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Integer array replication. More...
 
afError af_tile_C (cfloat *d_out, unsigned ndims, const unsigned *dims, const cfloat *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Complex single-precision array replication. More...
 
afError af_tile_Z (cdouble *d_out, unsigned ndims, const unsigned *dims, const cdouble *d_in, unsigned nreps, const unsigned *reps, unsigned batch)
 Complex double-precision array replication. More...
 

Detailed Description

The C interface for tile.

array a(seq(5)); //a=[1 2 3 4 5]
a = tile(a, 2); //a=[1 2 3 4 5]
// [1 2 3 4 5]
array a(seq(5)); //a=[0]
// [1]
// [2]
// [3]
// [4]
a = tile(a, dim4(1,2)); //a=[0 0]
// [1 1]
// [2 2]
// [3 3]
// [4 4]

Function Documentation

afError af_tile_S ( float *  d_out,
unsigned  ndims,
const unsigned *  dims,
const float *  d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Single-precision array replication.

afError af_tile_D ( double *  d_out,
unsigned  ndims,
const unsigned *  dims,
const double *  d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Double-precision array replication.

afError af_tile_B ( bool *  d_out,
unsigned  ndims,
const unsigned *  dims,
const bool *  d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Boolean (8-bit) array replication.

afError af_tile_U ( unsigned *  d_out,
unsigned  ndims,
const unsigned *  dims,
const unsigned *  d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Unsigned integer array replication.

afError af_tile_I ( int *  d_out,
unsigned  ndims,
const unsigned *  dims,
const int *  d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Integer array replication.

afError af_tile_C ( cfloat d_out,
unsigned  ndims,
const unsigned *  dims,
const cfloat d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Complex single-precision array replication.

afError af_tile_Z ( cdouble d_out,
unsigned  ndims,
const unsigned *  dims,
const cdouble d_in,
unsigned  nreps,
const unsigned *  reps,
unsigned  batch 
)

Complex double-precision array replication.