001: /* ///////////////////////////// P /// L /// A /// S /// M /// A /////////////////////////////// */
002: /* ///                    PLASMA auxiliary routines (version 2.1.0)                          ///
003:  * ///                    Author: Bilel Hadri                                                ///
004:  * ///                    Release Date: November, 15th 2009                                  ///
005:  * ///                    PLASMA is a software package provided by Univ. of Tennessee,       ///
006:  * ///                    Univ. of California Berkeley and Univ. of Colorado Denver          /// */
007: /* ///////////////////////////////////////////////////////////////////////////////////////////// */
008: #include "common.h"
009: 
010: #ifdef ADD_
011:     #define PLASMA_SGELQF       plasma_sgelqf_
012:     #define PLASMA_SGELQS       plasma_sgelqs_
013:     #define PLASMA_SGELS        plasma_sgels_
014:     #define PLASMA_SGEQRF       plasma_sgeqrf_
015:     #define PLASMA_SGEQRS       plasma_sgeqrs_
016:     #define PLASMA_SGESV        plasma_sgesv_
017:     #define PLASMA_SGETRF       plasma_sgetrf_
018:     #define PLASMA_SGETRS       plasma_sgetrs_
019:     #define PLASMA_SPOSV        plasma_sposv_
020:     #define PLASMA_SPOTRF       plasma_spotrf_
021:     #define PLASMA_SPOTRS       plasma_spotrs_
022:     #define PLASMA_STRSM        plasma_strsm_
023:     #define PLASMA_STRSMPL      plasma_strsmpl_
024:     #define PLASMA_SORGLQ       plasma_sorglq_
025:     #define PLASMA_SORGQR       plasma_sorgqr_
026:     #define PLASMA_SORMLQ       plasma_sormlq_
027:     #define PLASMA_SORMQR       plasma_sormqr_
028:     #define PLASMA_SGEMM        plasma_sgemm_
029: 
030:     #define PLASMA_SGELQF_TILE      plasma_sgelqf_tile_
031:     #define PLASMA_SGELQS_TILE      plasma_sgelqs_tile_
032:     #define PLASMA_SGELS_TILE       plasma_sgels_tile_
033:     #define PLASMA_SGEQRF_TILE      plasma_sgeqrf_tile_
034:     #define PLASMA_SGEQRS_TILE      plasma_sgeqrs_tile_
035:     #define PLASMA_SGESV_TILE       plasma_sgesv_tile_
036:     #define PLASMA_SGETRF_TILE      plasma_sgetrf_tile_
037:     #define PLASMA_SGETRS_TILE      plasma_sgetrs_tile_
038:     #define PLASMA_SPOSV_TILE       plasma_sposv_tile_
039:     #define PLASMA_SPOTRF_TILE      plasma_spotrf_tile_
040:     #define PLASMA_SPOTRS_TILE      plasma_spotrs_tile_
041:     #define PLASMA_STRSM_TILE       plasma_strsm_tile_
042:     #define PLASMA_STRSMPL_TILE     plasma_strsmpl_tile_
043:     #define PLASMA_SORGLQ_TILE      plasma_sorglq_tile_
044:     #define PLASMA_SORGQR_TILE      plasma_sorgqr_tile_
045:     #define PLASMA_SORMLQ_TILE      plasma_sormlq_tile_
046:     #define PLASMA_SORMQR_TILE      plasma_sormqr_tile_
047:     #define PLASMA_SGEMM_TILE       plasma_sgemm_tile_
048: 
049:     #define PLASMA_ALLOC_WORKSPACE_SGELQF       plasma_alloc_workspace_sgelqf_
050:     #define PLASMA_ALLOC_WORKSPACE_SGELS        plasma_alloc_workspace_sgels_
051:     #define PLASMA_ALLOC_WORKSPACE_SGEQRF       plasma_alloc_workspace_sgeqrf_
052:     #define PLASMA_ALLOC_WORKSPACE_SGESV        plasma_alloc_workspace_sgesv_
053:     #define PLASMA_ALLOC_WORKSPACE_SGETRF       plasma_alloc_workspace_sgetrf_
054:     #define PLASMA_ALLOC_WORKSPACE_SGELQF       plasma_alloc_workspace_sgelqf_
055: #elif defined (NOCHANGE)
056:     #define PLASMA_SGELQF       plasma_sgelqf
057:     #define PLASMA_SGELQS       plasma_sgelqs
058:     #define PLASMA_SGELS        plasma_sgels
059:     #define PLASMA_SGEQRF       plasma_sgeqrf
060:     #define PLASMA_SGEQRS       plasma_sgeqrs
061:     #define PLASMA_SGESV        plasma_sgesv
062:     #define PLASMA_SGETRF       plasma_sgetrf
063:     #define PLASMA_SGETRS       plasma_sgetrs
064:     #define PLASMA_SPOSV        plasma_sposv
065:     #define PLASMA_SPOTRF       plasma_spotrf
066:     #define PLASMA_SPOTRS       plasma_spotrs
067:     #define PLASMA_STRSM        plasma_strsm
068:     #define PLASMA_STRSMPL      plasma_strsmpl
069:     #define PLASMA_SORGLQ       plasma_sorglq
070:     #define PLASMA_SORGQR       plasma_sorgqr
071:     #define PLASMA_SORMLQ       plasma_sormlq
072:     #define PLASMA_SORMQR       plasma_sormqr
073:     #define PLASMA_SGEMM        plasma_sgemm
074: 
075:     #define PLASMA_SGELQF_TILE      plasma_sgelqf_tile
076:     #define PLASMA_SGELQS_TILE      plasma_sgelqs_tile
077:     #define PLASMA_SGELS_TILE       plasma_sgels_tile
078:     #define PLASMA_SGEQRF_TILE      plasma_sgeqrf_tile
079:     #define PLASMA_SGEQRS_TILE      plasma_sgeqrs_tile
080:     #define PLASMA_SGESV_TILE       plasma_sgesv_tile
081:     #define PLASMA_SGETRF_TILE      plasma_sgetrf_tile
082:     #define PLASMA_SGETRS_TILE      plasma_sgetrs_tile
083:     #define PLASMA_SPOSV_TILE       plasma_sposv_tile
084:     #define PLASMA_SPOTRF_TILE      plasma_spotrf_tile
085:     #define PLASMA_SPOTRS_TILE      plasma_spotrs_tile
086:     #define PLASMA_STRSM_TILE       plasma_strsm_tile
087:     #define PLASMA_STRSMPL_TILE     plasma_strsmpl_tile
088:     #define PLASMA_SORGLQ_TILE      plasma_sorglq_tile
089:     #define PLASMA_SORGQR_TILE      plasma_sorgqr_tile
090:     #define PLASMA_SORMLQ_TILE      plasma_sormlq_tile
091:     #define PLASMA_SORMQR_TILE      plasma_sormqr_tile
092:     #define PLASMA_SGEMM_TILE       plasma_sgemm_tile
093: 
094:     #define PLASMA_ALLOC_WORKSPACE_SGELQF       plasma_alloc_workspace_sgelqf
095:     #define PLASMA_ALLOC_WORKSPACE_SGELS        plasma_alloc_workspace_sgels
096:     #define PLASMA_ALLOC_WORKSPACE_SGEQRF       plasma_alloc_workspace_sgeqrf
097:     #define PLASMA_ALLOC_WORKSPACE_SGESV        plasma_alloc_workspace_sgesv
098:     #define PLASMA_ALLOC_WORKSPACE_SGETRF       plasma_alloc_workspace_sgetrf
099: #endif
100: 
101: #ifdef __cplusplus
102: extern "C" {
103: #endif
104: 
105: /* ///////////////////////////////////////////////////////////////////////////////////////////// */
106: //  FORTRAN API - math functions
107: void PLASMA_SGELQF(int *M, int *N, float *A, int *LDA, float **T, int *INFO)
108: {   *INFO = PLASMA_sgelqf(*M, *N, A, *LDA, *T); }
109: 
110: void PLASMA_SGELQS(int *M, int *N, int *NRHS, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
111: {   *INFO = PLASMA_sgelqs(*M, *N, *NRHS, A, *LDA, *T, B, *LDB); }
112: 
113: void PLASMA_SGELS(PLASMA_enum *trans, int *M, int *N, int *NRHS, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
114: {   *INFO = PLASMA_sgels(*trans, *M, *N, *NRHS, A, *LDA, *T, B, *LDB); }
115: 
116: void PLASMA_SGEQRF(int *M, int *N, float *A, int *LDA, float **T, int *INFO)
117: {   *INFO = PLASMA_sgeqrf(*M, *N, A, *LDA, *T); }
118: 
119: void PLASMA_SGEQRS(int *M, int *N, int *NRHS, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
120: {   *INFO = PLASMA_sgeqrs(*M, *N, *NRHS, A, *LDA, *T, B, *LDB); }
121: 
122: void PLASMA_SGESV(int *N, int *NRHS, float *A, int *LDA, float **LH, int **IPIVH, float *B, int *LDB, int *INFO)
123: {   *INFO = PLASMA_sgesv(*N, *NRHS, A, *LDA, *LH, *IPIVH, B, *LDB); }
124: 
125: void PLASMA_SGETRF(int *M, int *N, float *A, int *LDA, float **LH, int **IPIVH, int *INFO)
126: {   *INFO = PLASMA_sgetrf(*M, *N, A, *LDA, *LH, *IPIVH); }
127: 
128: void PLASMA_SGETRS(PLASMA_enum *uplo, int *N, int *NRHS, float *A, int *LDA, float **LH, int **IPIVH, float *B, int *LDB, int *INFO)
129: {   *INFO = PLASMA_sgetrs(*uplo, *N, *NRHS, A, *LDA, *LH, *IPIVH, B, *LDB); }
130: 
131: void PLASMA_SPOSV(PLASMA_enum *uplo, int *N, int *NRHS, float *A, int *LDA, float *B, int *LDB, int *INFO)
132: {   *INFO = PLASMA_sposv(*uplo, *N, *NRHS, A, *LDA, B, *LDB); }
133: 
134: void PLASMA_SPOTRF(PLASMA_enum *uplo, int *N, float *A, int *LDA, int *INFO)
135: {   *INFO = PLASMA_spotrf(*uplo, *N, A, *LDA); }
136: 
137: void PLASMA_SPOTRS(PLASMA_enum *uplo, int *N, int *NRHS, float *A, int *LDA, float *B, int* LDB, int * INFO)
138: {   *INFO = PLASMA_spotrs(*uplo, *N, *NRHS, A, *LDA, B, *LDB); }
139: 
140: void PLASMA_STRSM(PLASMA_enum *side, PLASMA_enum *uplo, PLASMA_enum *transA, PLASMA_enum *diag, int *N, int *NRHS, float *A, int *LDA, float *B, int *LDB, int *INFO)
141: {   *INFO = PLASMA_strsm(*side, *uplo, *transA, *diag, *N, *NRHS, A, *LDA, B, *LDB); }
142: 
143: void PLASMA_STRSMPL(int *N, int *NRHS, float *A, int *LDA, float **LH, int **IPIVH, float *B, int *LDB, int *INFO)
144: {   *INFO = PLASMA_strsmpl(*N, *NRHS, A, *LDA, *LH, *IPIVH, B, *LDB); }
145: 
146: void PLASMA_SORGLQ(int *M, int *N, int *K, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
147: {   *INFO = PLASMA_sorglq(*M, *N, *K, A, *LDA, *T, B, *LDB); }
148: 
149: void PLASMA_SORGQR(int *M, int *N, int *K, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
150: {   *INFO = PLASMA_sorgqr(*M, *N, *K, A, *LDA, *T, B, *LDB); }
151: 
152: void PLASMA_SORMLQ(PLASMA_enum *side, PLASMA_enum *trans, int *M, int *N, int *K, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
153: {   *INFO = PLASMA_sormlq(*side, *trans, *M, *N, *K, A, *LDA, *T, B, *LDB); }
154: 
155: void PLASMA_SORMQR(PLASMA_enum *side, PLASMA_enum *trans, int *M, int *N, int *K, float *A, int *LDA, float **T, float *B, int *LDB, int *INFO)
156: {   *INFO = PLASMA_sormqr(*side, *trans, *M, *N, *K, A, *LDA, *T, B, *LDB); }
157: 
158: void PLASMA_SGEMM(PLASMA_enum *transA, PLASMA_enum *transB, int *M, int *N, int *K, float *alpha, float *A, int *LDA, float *B, int *LDB, float *beta, float *C, int *LDC, int *INFO)
159: {   *INFO = PLASMA_sgemm(*transA, *transB, *M, *N, *K, *alpha, A, *LDA, B, *LDB, *beta, C, *LDC); }
160: 
161: 
162: /* ///////////////////////////////////////////////////////////////////////////////////////////// */
163: //  Math functions - native interface
164: void PLASMA_SGELQF_TILE(long long int *A, long long int *T,int *INFO)
165: {   *INFO = PLASMA_sgelqf_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*T)); }
166: 
167: void PLASMA_SGELQS_TILE(long long int *A, long long int *B, long long int *T, int *INFO)
168: {   *INFO = PLASMA_sgelqs_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*B), (PLASMA_desc *)(*T)); }
169: 
170: void PLASMA_SGELS_TILE(PLASMA_enum *trans, long long int *A, long long int *B, long long int *T, int *INFO)
171: {   *INFO = PLASMA_sgels_Tile(*trans, (PLASMA_desc *)(*A), (PLASMA_desc *)(*B), (PLASMA_desc *)(*T)); }
172: 
173: void PLASMA_SGEQRF_TILE(long long int *A, long long int *T, int *INFO)
174: {   *INFO = PLASMA_sgeqrf_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*T)); }
175: 
176: void PLASMA_SGEQRS_TILE(long long int *A, long long int *B, long long int *T, int *INFO)
177: {   *INFO = PLASMA_sgeqrs_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*B), (PLASMA_desc *)(*T)); }
178: 
179: void PLASMA_SGESV_TILE(long long int *A, long long int *L, int **IPIVH, long long int *B, int *INFO)
180: {   *INFO = PLASMA_sgesv_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*L), *IPIVH, (PLASMA_desc *)(*B)); }
181: 
182: void PLASMA_SGETRF_TILE(long long int *A, long long int *L, int **IPIVH, int *INFO)
183: {   *INFO = PLASMA_sgetrf_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*L), *IPIVH); }
184: 
185: void PLASMA_SGETRS_TILE(long long int *A, long long int *L, int **IPIVH, long long int *B, int *INFO)
186: {   *INFO = PLASMA_sgetrs_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*L), *IPIVH, (PLASMA_desc *)(*B)); }
187: 
188: void PLASMA_SPOSV_TILE(PLASMA_enum *uplo, long long int *A, long long int *B, int *INFO)
189: {   *INFO = PLASMA_sposv_Tile(*uplo, (PLASMA_desc *)(*A), (PLASMA_desc *)(*B)); }
190: 
191: void PLASMA_SPOTRF_TILE(PLASMA_enum *uplo, long long int *A, int *INFO)
192: {   *INFO = PLASMA_spotrf_Tile(*uplo, (PLASMA_desc *)(*A)); }
193: 
194: void PLASMA_SPOTRS_TILE(PLASMA_enum *uplo, long long int *A, long long int *B, int *INFO)
195: {   *INFO = PLASMA_spotrs_Tile(*uplo, (PLASMA_desc *)(*A), (PLASMA_desc *)(*B)); }
196: 
197: void PLASMA_STRSM_TILE(PLASMA_enum *side, PLASMA_enum *uplo, PLASMA_enum *transA, PLASMA_enum *diag, long long int *A, long long int *B, int *INFO)
198: {   *INFO = PLASMA_strsm_Tile(*side, *uplo, *transA, *diag, (PLASMA_desc *)(*A), (PLASMA_desc *)(*B)); }
199: 
200: void PLASMA_STRSMPL_TILE(long long int *A, long long int *L, int **IPIVH, long long int *B, int *INFO)
201: {   *INFO = PLASMA_strsmpl_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*L), *IPIVH, (PLASMA_desc *)(*B)); }
202: 
203: void PLASMA_SUNQLQ_TILE(long long int *A, long long int *T, long long int *B, int *INFO)
204: {   *INFO = PLASMA_sorglq_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*T), (PLASMA_desc *)(*B)); }
205: 
206: void PLASMA_SORGQR_TILE(long long int *A, long long int *T, long long int *B, int *INFO)
207: {   *INFO = PLASMA_sorgqr_Tile((PLASMA_desc *)(*A), (PLASMA_desc *)(*T), (PLASMA_desc *)(*B)); }
208: 
209: void PLASMA_SORMLQ_TILE(PLASMA_enum *side, PLASMA_enum *trans, long long int *A, long long int *T, long long int *B, int *INFO)
210: {   *INFO = PLASMA_sormlq_Tile(*side, *trans, (PLASMA_desc *)(*A), (PLASMA_desc *)(*T), (PLASMA_desc *)(*B)); }
211: 
212: void PLASMA_SORMQR_TILE(PLASMA_enum *side, PLASMA_enum *trans, long long int *A, long long int *T, long long int *B, int *INFO)
213: {   *INFO = PLASMA_sormqr_Tile(*side, *trans, (PLASMA_desc *)(*A), (PLASMA_desc *)(*T), (PLASMA_desc *)(*B)); }
214: 
215: /* void PLASMA_SGEMM_TILE(PLASMA_enum *transA, PLASMA_enum *transB, int *alpha, long long int *A, long long int *B, int *beta, long long int *C, int *INFO)
216: {   *INFO = PLASMA_sgemm_Tile(*transA, *transB, *alpha, (PLASMA_desc *)(*A), (PLASMA_desc *)(*B), *beta, (PLASMA_desc *)(*C)); } */
217: 
218: /* ///////////////////////////////////////////////////////////////////////////////////////////// */
219: //  FORTRAN API - workspace allocation
220: void PLASMA_ALLOC_WORKSPACE_SGELQF(int *M, int *N, float **T, int *INFO)
221: {   *INFO = PLASMA_Alloc_Workspace_sgelqf(*M, *N, T); }
222: 
223: void PLASMA_ALLOC_WORKSPACE_SGELS(int *M, int *N, float **T, int *INFO)
224: {   *INFO = PLASMA_Alloc_Workspace_sgels(*M, *N, T); }
225: 
226: void PLASMA_ALLOC_WORKSPACE_SGEQRF(int *M, int *N, float **T, int *INFO)
227: {   *INFO = PLASMA_Alloc_Workspace_sgeqrf(*M, *N, T); }
228: 
229: void PLASMA_ALLOC_WORKSPACE_SGESV(int *N, float **L, int **IPIV, int *INFO)
230: {   *INFO = PLASMA_Alloc_Workspace_sgesv(*N, L, IPIV); }
231: 
232: void PLASMA_ALLOC_WORKSPACE_SGETRF(int *M, int *N, float **L, int **IPIV, int *INFO)
233: {   *INFO = PLASMA_Alloc_Workspace_sgetrf(*M, *N, L, IPIV); }
234: 
235: #ifdef __cplusplus
236: }
237: #endif
238: