Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?lacpy

Copies all or part of one two-dimensional array to another.

Syntax

lapack_int LAPACKE_slacpy (int matrix_layout, char uplo, lapack_int m, lapack_int n, const float* a, lapack_int lda, float* b, lapack_int ldb);

lapack_int LAPACKE_dlacpy (int matrix_layout, char uplo, lapack_int m, lapack_int n, const double* a, lapack_int lda, double* b, lapack_int ldb);

lapack_int LAPACKE_clacpy (int matrix_layout, char uplo, lapack_int m, lapack_int n, const lapack_complex_float* a, lapack_int lda, lapack_complex_float* b, lapack_int ldb);

lapack_int LAPACKE_zlacpy (int matrix_layout, char uplo, lapack_int m, lapack_int n, const lapack_complex_double* a, lapack_int lda, lapack_complex_double* b, lapack_int ldb);

Include Files

  • mkl.h

Description

The routine copies all or part of a two-dimensional matrix A to another matrix B.

Input Parameters

A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.

uplo

Specifies the part of the matrix A to be copied to B.

If uplo = 'U', the upper triangular part of A;

if uplo = 'L', the lower triangular part of A.

Otherwise, all of the matrix A is copied.

m

The number of rows in the matrix A (m 0).

n

The number of columns in A (n 0).

a

Array, size at least max(1, lda*n) for column major and max(1, lda*m) for row major layout. A contains the m-by-n matrix A.

If uplo = 'U', only the upper triangle or trapezoid is accessed; if uplo = 'L', only the lower triangle or trapezoid is accessed.

lda
The leading dimension of a; ldamax(1,m) for column major layout and max(1,n) for row major layout.
ldb

The leading dimension of the output array b; ldb max(1, m)for column major layout and max(1,n) for row major layout.

Output Parameters

b

Array, size at least max(1, ldb*n) for column major and max(1, ldb*m) for row major layout. Array a contains the m-by-n matrix B.

On exit, B = A in the locations specified by uplo.

Return Values

This function returns a value info.

If info = 0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.