Rate This Document
Findability
Accuracy
Completeness
Readability

?lasr

Interface Definition

C interface:

void slasr_(const char *SIDE, const char *PIVOT, const char *DIRECT, const int *M, const int *N, float *C, float *S, float *A, const int *LDA);

void dlasr_(const char *SIDE, const char *PIVOT, const char *DIRECT, const int *M, const int *N, double *C, double *S, double *A, const int *LDA);

void clasr_(const char *SIDE, const char *PIVOT, const char *DIRECT, const int *M, const int *N, float *C, float *S, float _Complex *A, const int *LDA);

void zlasr_(const char *SIDE, const char *PIVOT, const char *DIRECT, const int *M, const int *N, double *C, double *S, double _Complex *A, const int *LDA);

Fortran interface:

SLASR(SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA);

DLASR(SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA);

CLASR(SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA);

ZLASR(SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA);

Parameters

Parameter

Type

Description

Input/Output

SIDE

Character

  • 'L': A:=P*A
  • 'R': A:=A*PT

Input

PIVOT

Character

  • 'V': variable pivot, plane (k, k+1).
  • 'T': top pivot, plane(1, k+1).
  • 'B': bottom pivot, plane (k, z).

Input

DIRECT

Character

  • 'F': forward, P=P(z-1)*…*P(2)*P(1)
  • 'B': backward, P=P(1)*P(2)*…*P(z-1)

Input

M

Integer

Number of rows in matrix A

Input

N

Integer

Number of columns in matrix A.

Input

C

  • A single-precision floating-point array for slasr/clasr
  • A double-precision floating-point array for dlasr/zlasr

Cosine value of plane rotation.

Input

S

  • A single-precision floating-point array for slasr/clasr
  • A double-precision floating-point array for dlasr/zlasr

Sine value of plane rotation.

Input

A

  • A single-precision floating-point array for slasr
  • A double-precision floating-point array for dlasr
  • A single-precision complex array for clasr
  • A double-precision complex array for zlasr

Matrix A, with a dimension of (LDA, N)

Input, output

LDA

Integer

Leading dimension of matrix A.

Input

Dependency

#include "klapack.h"

Examples

C interface:

    const char side = 'L';
    const char pivot = 'V';
    const char direct = 'F';
    int m = 4;
    int n = 4;
    int lda = m;

    double c[] = {0.000000, 0.900000, 1.100000};
    double s[] = {0.181818, 0.545455, 0.000000};
    double a[] = {0.600000,0.200000,0.900000,0.100000,
                  0.200000,0.700000,0.000000,0.900000,
                  0.300000,0.600000,0.000000,0.600000,
                  0.200000,0.600000,0.100000,0.800000};

    dlasr_(&side, &pivot, &direct, &m, &n, c, s, a, &lda);
/* 
     * Output: 
     * a output (stored in column-major)
     *   0.036364        0.392727        0.956455        0.110000
     *   0.127273        -0.032727       0.021818        0.990000
     *   0.109091        -0.049091       0.032727        0.660000
     *   0.109091        0.021818        0.120818        0.880000

Fortran interface:

CHARACTER :: side = "L"
CHARACTER :: pivot = "V"
CHARACTER :: direct = "F"
PARAMETER (m = 4) 
PARAMETER (n = 4)
PARAMETER (lda = 4) 
REAL(8) :: c(m-1) 
REAL(8) :: s(m-1)
REAL(8) :: a(lda, n)  
  
DATA c / 0.000000, 0.900000, 1.100000 / 
DATA s / 0.181818, 0.545455, 0.000000 /
DATA a / 0.600000,0.200000,0.900000,0.100000,
$        0.200000,0.700000,0.000000,0.900000,
$        0.300000,0.600000,0.000000,0.600000,
$        0.200000,0.600000,0.100000,0.800000 /
 EXTERNAL DLASR 
 CALL DLASR(side, pivot, direct, m, n, c, s, a, lda);
* 
* Output: 
* a output (stored in column-major)
*   0.036364        0.392727        0.956455        0.110000
*   0.127273        -0.032727       0.021818        0.990000
*   0.109091        -0.049091       0.032727        0.660000
*   0.109091        0.021818        0.120818        0.880000