PLASMA  2.8.0
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
void CORE_cpltmg_toeppd1 ( int  gM,
int  m0,
int  M,
PLASMA_Complex32_t *  W,
unsigned long long int  seed 
)

CORE_cpltmg_toeppd1 is the first kernel used in toeppd matrix generation.

See http://www.mathworks.fr/fr/help/matlab/ref/gallery.html#f84-1000272

A toeppd matrix is an n-by-n symmetric, positive semi-definite (SPD) Toeplitz matrix composed of the sum of m rank 2 (or, for certain theta, rank 1) SPD Toeplitz matrices. Specifically,

T = w(1)*T(theta(1)) + ... + w(m)*T(theta(m))

where T(theta(k)) has (i,j) element cos(2*pi*theta(k)*(i-j)).

In this matrix generation: w = rand(m,1), and theta = rand(m,1).

This kernel generates a portion of size 2-by-m of the full W and theta vectors.

Parameters
[in]gMThe size of the full vectors W and theta. gM >= M+m0.
[in]m0Index of the first element of W, in the full vector. m0 >= 0
[in]MThe number of elements to generate for w and theta vector. M >= 0.
[out]WAn 2-by-M matrix. On exit, the first row contains the walue of w[m0;m0+M] The second row contains the vector 2*pi*theta[m0;m0+M]
[in]seedThe seed used for random generation. Must be the same for all call to this routines generating the w and theta vectors.