LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
 All Files Functions Typedefs Macros
lapacke_ctprfb.c File Reference
#include "lapacke_utils.h"
Include dependency graph for lapacke_ctprfb.c:

Go to the source code of this file.

Functions

lapack_int LAPACKE_ctprfb (int matrix_order, char side, char trans, char direct, char storev, lapack_int m, lapack_int n, lapack_int k, lapack_int l, const lapack_complex_float *v, lapack_int ldv, const lapack_complex_float *t, lapack_int ldt, lapack_complex_float *a, lapack_int lda, lapack_complex_float *b, lapack_int ldb)
 

Function Documentation

lapack_int LAPACKE_ctprfb ( int  matrix_order,
char  side,
char  trans,
char  direct,
char  storev,
lapack_int  m,
lapack_int  n,
lapack_int  k,
lapack_int  l,
const lapack_complex_float v,
lapack_int  ldv,
const lapack_complex_float t,
lapack_int  ldt,
lapack_complex_float a,
lapack_int  lda,
lapack_complex_float b,
lapack_int  ldb 
)

Definition at line 36 of file lapacke_ctprfb.c.

43 {
44  lapack_int info = 0;
45  lapack_int ldwork;
46  lapack_int work_size;
47  float* work = NULL;
48  if( matrix_order != LAPACK_COL_MAJOR && matrix_order != LAPACK_ROW_MAJOR ) {
49  LAPACKE_xerbla( "LAPACKE_ctprfb", -1 );
50  return -1;
51  }
52 #ifndef LAPACK_DISABLE_NAN_CHECK
53  /* Optionally check input matrices for NaNs */
54  if( LAPACKE_cge_nancheck( matrix_order, k, m, a, lda ) ) {
55  return -14;
56  }
57  if( LAPACKE_cge_nancheck( matrix_order, m, n, b, ldb ) ) {
58  return -16;
59  }
60  if( LAPACKE_cge_nancheck( matrix_order, ldt, k, t, ldt ) ) {
61  return -12;
62  }
63  if( LAPACKE_cge_nancheck( matrix_order, ldv, k, v, ldv ) ) {
64  return -10;
65  }
66 #endif
67  if (side=='l' || side=='L') {
68  ldwork = k;
69  work_size = MAX(1,ldwork) * MAX(1,n);
70  }
71  else {
72  ldwork = m;
73  work_size = MAX(1,ldwork) * MAX(1,k);
74  }
75  /* Allocate memory for working array(s) */
76  work = (float*)
77  LAPACKE_malloc( sizeof(float) * MAX(1,ldwork) * MAX(n,k) );
78  if( work == NULL ) {
80  goto exit_level_0;
81  }
82  /* Call middle-level interface */
83  info = LAPACKE_ctprfb_work( matrix_order, side, trans, direct, storev, m, n,
84  k, l, v, ldv, t, ldt, a, lda, b, ldb, work,
85  ldwork );
86  /* Release memory and exit */
87  LAPACKE_free( work );
88 exit_level_0:
89  if( info == LAPACK_WORK_MEMORY_ERROR ) {
90  LAPACKE_xerbla( "LAPACKE_ctprfb", info );
91  }
92  return info;
93 }
#define LAPACK_COL_MAJOR
Definition: lapacke.h:120
lapack_int LAPACKE_ctprfb_work(int matrix_order, char side, char trans, char direct, char storev, lapack_int m, lapack_int n, lapack_int k, lapack_int l, const lapack_complex_float *v, lapack_int ldv, const lapack_complex_float *t, lapack_int ldt, lapack_complex_float *a, lapack_int lda, lapack_complex_float *b, lapack_int ldb, const float *work, lapack_int ldwork)
void LAPACKE_xerbla(const char *name, lapack_int info)
lapack_logical LAPACKE_cge_nancheck(int matrix_order, lapack_int m, lapack_int n, const lapack_complex_float *a, lapack_int lda)
#define LAPACK_ROW_MAJOR
Definition: lapacke.h:119
#define LAPACKE_malloc(size)
Definition: lapacke.h:110
#define MAX(x, y)
Definition: lapacke_utils.h:47
#define LAPACKE_free(p)
Definition: lapacke.h:113
#define LAPACK_WORK_MEMORY_ERROR
Definition: lapacke.h:122
#define lapack_int
Definition: lapacke.h:47

Here is the call graph for this function: