The C++ interface for tile. More...

array tile (const array &A, unsigned d0, unsigned d1=1, unsigned d2=1)
 
array tile (const array &A, const dim4 &dims)
 

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

array af::tile ( const array &  A,
unsigned  d0,
unsigned  d1 = 1,
unsigned  d2 = 1 
)
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]
Parameters
[in]A
[in]d0repetitions along first dimension (1 indicates no repeat)
[in]d1repetitions along second dimension (default: 1, no repeat)
[in]d2repetitions along third dimension (default: 1, no repeat)
Returns
A repeated according to specified repetitions
Examples:
examples/financial/blackscholes.cpp, examples/machine_learning/kmeans.cpp, examples/pde/fdtd.cpp, examples/pde/swe.cpp, and examples/visualization/blip.cpp.
array af::tile ( const array &  A,
const dim4 &  dims 
)
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]
Parameters
[in]A
[in]dimsspecifications of number of times to repeat
Returns
A repeated according to specified repetitions