diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-13 20:53:06 +0100 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2017-02-13 20:53:06 +0100 |
commit | cdb3bb7166bc75842ff95e14915bff881297fc62 (patch) | |
tree | 507a6c8008055d8ea1e469a77d00922dd88d1368 /src/routine.cpp | |
parent | 00eb55a2d449e98816e77576f166e89682efbfd6 (diff) |
Added first version of the OverrideParameters function
Diffstat (limited to 'src/routine.cpp')
-rw-r--r-- | src/routine.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/routine.cpp b/src/routine.cpp index 854c7046..3cd045c8 100644 --- a/src/routine.cpp +++ b/src/routine.cpp @@ -21,6 +21,31 @@ namespace clblast { // ================================================================================================= +// For each kernel this map contains a list of routines it is used in +const std::vector<std::string> Routine::routines_axpy = {"AXPY", "COPY", "SCAL", "SWAP"}; +const std::vector<std::string> Routine::routines_dot = {"AMAX", "ASUM", "DOT", "DOTC", "DOTU", "MAX", "MIN", "NRM2", "SUM"}; +const std::vector<std::string> Routine::routines_ger = {"GER", "GERC", "GERU", "HER", "HER2", "HPR", "HPR2", "SPR", "SPR2", "SYR", "SYR2"}; +const std::vector<std::string> Routine::routines_gemv = {"GBMV", "GEMV", "HBMV", "HEMV", "HPMV", "SBMV", "SPMV", "SYMV", "TMBV", "TPMV", "TRMV"}; +const std::vector<std::string> Routine::routines_gemm = {"GEMM", "HEMM", "SYMM", "TRMM"}; +const std::vector<std::string> Routine::routines_gemm_syrk = {"GEMM", "HEMM", "HER2K", "HERK", "SYMM", "SYR2K", "SYRK", "TRMM"}; +const std::unordered_map<std::string, const std::vector<std::string>> Routine::routines_by_kernel = { + {"Xaxpy", routines_axpy}, + {"Xdot", routines_dot}, + {"Xgemv", routines_gemv}, + {"XgemvFast", routines_gemv}, + {"XgemvFastRot", routines_gemv}, + {"Xgemv", {}}, + {"Xger", routines_ger}, + {"Copy", routines_gemm_syrk}, + {"Pad", routines_gemm_syrk}, + {"Transpose", routines_gemm_syrk}, + {"Padtranspose", routines_gemm_syrk}, + {"Xgemm", routines_gemm_syrk}, + {"XgemmDirect", routines_gemm}, + {"KernelSelection", routines_gemm}, +}; +// ================================================================================================= + // The constructor does all heavy work, errors are returned as exceptions Routine::Routine(Queue &queue, EventPointer event, const std::string &name, const std::vector<std::string> &kernel_names, const Precision precision, |