LAMA
/home/brandes/workspace/LAMA/src/lama/cuda/CUDABLAS2.hpp
Go to the documentation of this file.
00001 
00033 #ifndef LAMA_CUDABLAS2_HPP_
00034 #define LAMA_CUDABLAS2_HPP_
00035 
00036 // for dll_import
00037 #include <lama/config.hpp>
00038 
00039 // others
00040 #include <lama/LAMATypes.hpp>
00041 #include <lama/SyncToken.hpp>
00042 
00043 #include <lama/openmp/BLASHelper.hpp>
00044 
00045 // logging
00046 #include <logging/logging.hpp>
00047 
00048 #include <cublas.h>
00049 #include <cuda_runtime_api.h>
00050 
00051 namespace lama
00052 {
00053 
00054 class LAMA_DLL_IMPORTEXPORT CUDABLAS2
00055 {
00056 public:
00057 
00061     template<typename T>
00062     static void gemv(
00063         const enum CBLAS_ORDER order,
00064         const enum CBLAS_TRANSPOSE trans,
00065         const IndexType m,
00066         const IndexType n,
00067         const T alpha,
00068         const T* A,
00069         const IndexType lda,
00070         const T* x,
00071         const IndexType incX,
00072         const T beta,
00073         T* y,
00074         const IndexType incY,
00075         SyncToken* syncToken );
00076 
00080     template<typename T>
00081     static void symv(
00082         const enum CBLAS_ORDER order,
00083         const enum CBLAS_UPLO uplo,
00084         const IndexType n,
00085         const T alpha,
00086         const T* A,
00087         const IndexType lda,
00088         const T* x,
00089         const IndexType incX,
00090         const T beta,
00091         T* y,
00092         const IndexType incY,
00093         SyncToken* syncToken );
00094 
00098     template<typename T>
00099     static void trmv(
00100         const enum CBLAS_ORDER order,
00101         const enum CBLAS_UPLO uplo,
00102         const enum CBLAS_TRANSPOSE trans,
00103         const enum CBLAS_DIAG diag,
00104         const IndexType n,
00105         const T* A,
00106         const IndexType lda,
00107         T* x,
00108         const IndexType incX,
00109         SyncToken* syncToken );
00110 
00114     template<typename T>
00115     static void trsv(
00116         const enum CBLAS_ORDER order,
00117         const enum CBLAS_UPLO uplo,
00118         const enum CBLAS_TRANSPOSE trans,
00119         const enum CBLAS_DIAG diag,
00120         const IndexType n,
00121         const T* A,
00122         const IndexType lda,
00123         T* x,
00124         const IndexType incX,
00125         SyncToken* syncToken );
00126 
00130     template<typename T>
00131     static void gbmv(
00132         const enum CBLAS_ORDER order,
00133         const enum CBLAS_TRANSPOSE trans,
00134         const IndexType m,
00135         const IndexType n,
00136         const IndexType kl,
00137         const IndexType ku,
00138         const T alpha,
00139         const T* A,
00140         const IndexType lda,
00141         const T* x,
00142         const IndexType incX,
00143         const T beta,
00144         T* y,
00145         const IndexType incY,
00146         SyncToken* syncToken );
00147 
00151     template<typename T>
00152     static void sbmv(
00153         const enum CBLAS_ORDER order,
00154         const enum CBLAS_UPLO uplo,
00155         const IndexType n,
00156         const IndexType k,
00157         const T alpha,
00158         const T* A,
00159         const IndexType lda,
00160         const T* x,
00161         const IndexType incX,
00162         const T beta,
00163         T* y,
00164         const IndexType incY,
00165         SyncToken* syncToken );
00166 
00170     template<typename T>
00171     static void tbmv(
00172         const enum CBLAS_ORDER order,
00173         const enum CBLAS_UPLO uplo,
00174         const enum CBLAS_TRANSPOSE trans,
00175         const enum CBLAS_DIAG diag,
00176         const IndexType n,
00177         const IndexType k,
00178         const T* A,
00179         const IndexType lda,
00180         T* x,
00181         const IndexType incX,
00182         SyncToken* syncToken );
00183 
00187     template<typename T>
00188     static void tbsv(
00189         const enum CBLAS_ORDER order,
00190         const enum CBLAS_UPLO uplo,
00191         const enum CBLAS_TRANSPOSE trans,
00192         const enum CBLAS_DIAG diag,
00193         const IndexType n,
00194         const IndexType k,
00195         const T* A,
00196         const IndexType lda,
00197         T* x,
00198         const IndexType incX,
00199         SyncToken* syncToken );
00200 
00204     template<typename T>
00205     static void ger(
00206         const enum CBLAS_ORDER order,
00207         const IndexType m,
00208         const IndexType n,
00209         const T alpha,
00210         const T* x,
00211         const IndexType incX,
00212         const T* y,
00213         const IndexType incY,
00214         T* A,
00215         const IndexType lda,
00216         SyncToken* syncToken );
00217 
00221     template<typename T>
00222     static void syr(
00223         const enum CBLAS_ORDER order,
00224         const enum CBLAS_UPLO uplo,
00225         const IndexType n,
00226         const T alpha,
00227         const T* x,
00228         const IndexType incX,
00229         T* A,
00230         const IndexType lda,
00231         SyncToken* syncToken );
00232 
00236     template<typename T>
00237     static void syr2(
00238         const enum CBLAS_ORDER order,
00239         const enum CBLAS_UPLO uplo,
00240         const IndexType n,
00241         const T alpha,
00242         const T* x,
00243         const IndexType incX,
00244         const T* y,
00245         const IndexType incY,
00246         T* A,
00247         const IndexType lda,
00248         SyncToken* syncToken );
00249 
00253     template<typename T>
00254     static void spmv(
00255         const enum CBLAS_ORDER order,
00256         const enum CBLAS_UPLO uplo,
00257         const IndexType n,
00258         const T alpha,
00259         const T* AP,
00260         const T* x,
00261         const IndexType incX,
00262         const T beta,
00263         T* y,
00264         const IndexType incY,
00265         SyncToken* syncToken );
00266 
00270     template<typename T>
00271     static void spr(
00272         const enum CBLAS_ORDER order,
00273         const enum CBLAS_UPLO uplo,
00274         const IndexType n,
00275         const T alpha,
00276         const T* x,
00277         const IndexType incX,
00278         T* AP,
00279         SyncToken* syncToken );
00280 
00284     template<typename T>
00285     static void spr2(
00286         const enum CBLAS_ORDER order,
00287         const enum CBLAS_UPLO uplo,
00288         const IndexType n,
00289         const T alpha,
00290         const T* x,
00291         const IndexType incX,
00292         const T* y,
00293         const IndexType incY,
00294         T* AP,
00295         SyncToken* syncToken );
00296 
00300     template<typename T>
00301     static void tpmv(
00302         const enum CBLAS_ORDER order,
00303         const enum CBLAS_UPLO uplo,
00304         const enum CBLAS_TRANSPOSE trans,
00305         const enum CBLAS_DIAG diag,
00306         const IndexType n,
00307         const T* AP,
00308         T* x,
00309         const IndexType incX,
00310         SyncToken* syncToken );
00311 
00315     template<typename T>
00316     static void tpsv(
00317         const enum CBLAS_ORDER order,
00318         const enum CBLAS_UPLO uplo,
00319         const enum CBLAS_TRANSPOSE trans,
00320         const enum CBLAS_DIAG diag,
00321         const IndexType n,
00322         const T* Ap,
00323         T* x,
00324         const IndexType incX,
00325         SyncToken* syncToken );
00326 
00327 private:
00328 
00329     LAMA_LOG_DECL_STATIC_LOGGER( logger );
00330 
00331 };
00332 
00333 } /* namespace lama */
00334 
00335 #endif // LAMA_CUDABLAS2_HPP_