00001 #ifndef FUPERMOD_CBLAS_H_
00002 #define FUPERMOD_CBLAS_H_
00003
00004 #include "config.h"
00005 #include "fupermod/fupermod_conf.h"
00006 #include "fupermod/fupermod_bind.h"
00007 #include <gsl/gsl_cblas.h>
00008
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023 #ifdef ENABLE_BLAS_SP
00024
00025 typedef float fupermod_float;
00027 #define FUPERMOD_MPI_FLOAT MPI_FLOAT
00028 #else
00029
00030 typedef double fupermod_float;
00032 #define FUPERMOD_MPI_FLOAT MPI_DOUBLE
00033 #endif
00034
00036 typedef struct fupermod_gemm {
00038 fupermod_process_conf* conf;
00039
00040 float time;
00042 void* params;
00043 } fupermod_gemm;
00044
00046 fupermod_gemm* fupermod_gemm_alloc(fupermod_process_conf* conf);
00047
00049 void fupermod_gemm_execute(struct fupermod_gemm* gemm,
00050 const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB,
00051 const int M, const int N, const int K,
00052 const fupermod_float alpha, const fupermod_float *A, const int lda,
00053 const fupermod_float *B, const int ldb, const fupermod_float beta,
00054 fupermod_float *C, const int ldc);
00055
00057 void fupermod_gemm_free(fupermod_gemm* gemm);
00058
00059 #ifdef __cplusplus
00060 }
00061 #endif
00062
00066 #endif