Changed GenerateObjects to append combination codes (e.g. dtrmm_TU).
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
include_directories(${CMAKE_SOURCE_DIR})
|
||||
|
||||
# TODO: These all need NAME/CNAME set (see GenerateNamedObjects)
|
||||
|
||||
# sources that need to be compiled twice, once with no flags and once with LOWER
|
||||
set(UL_SOURCES
|
||||
sbmv_k.c
|
||||
|
||||
@@ -25,19 +25,32 @@ endif ()
|
||||
# loop through gemm.c defines
|
||||
set(GEMM_DEFINES NN NT TN TT)
|
||||
foreach (GEMM_DEFINE ${GEMM_DEFINES})
|
||||
add_library(GEMM_${GEMM_DEFINE}_OBJS OBJECT gemm.c)
|
||||
set_target_properties(GEMM_${GEMM_DEFINE}_OBJS PROPERTIES COMPILE_DEFINITIONS ${GEMM_DEFINE})
|
||||
list(APPEND DBLAS_OBJS GEMM_${GEMM_DEFINE}_OBJS)
|
||||
string(TOLOWER ${GEMM_DEFINE} GEMM_DEFINE_LC)
|
||||
GenerateNamedObjects("gemm.c" "DOUBLE" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0 "" "")
|
||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||
endforeach ()
|
||||
|
||||
AllCombinations("TRANS;UPPER;UNIT")
|
||||
set(define_combos ${LIST_OUT})
|
||||
foreach (def_combo ${define_combos})
|
||||
# replace colon separated list with semicolons, this turns it into a CMake list that we can use foreach with
|
||||
string(REPLACE ":" ";" def_combo ${def_combo})
|
||||
|
||||
GenerateObjects("trmm_L.c;trmm_R.c;trsm_L.c;trsm_R.c" "TRANS;UPPER;UNIT" "")
|
||||
# build a unique variable name for this obj file by picking two letters from the defines (can't use one in this case)
|
||||
set(obj_name "")
|
||||
foreach (combo_elem ${def_combo})
|
||||
string(REGEX MATCH "^[A-Z][A-Z]" letter ${combo_elem})
|
||||
set(obj_name "${obj_name}${letter}")
|
||||
endforeach ()
|
||||
endforeach ()
|
||||
|
||||
GenerateCombinationObjects("trmm_L.c;trmm_R.c;trsm_L.c;trsm_R.c" "TRANS;UPPER;UNIT" "DOUBLE" "" 0)
|
||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||
GenerateObjects("symm_k.c" "LOWER;RSIDE" "NN")
|
||||
GenerateCombinationObjects("symm_k.c" "LOWER;RSIDE" "DOUBLE" "NN" 1)
|
||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||
GenerateObjects("syrk_k.c;syr2k_k.c" "LOWER;TRANS" "")
|
||||
GenerateCombinationObjects("syrk_k.c;syr2k_k.c" "LOWER;TRANS" "DOUBLE" "" 1)
|
||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||
GenerateObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "")
|
||||
GenerateCombinationObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "DOUBLE" "" 1)
|
||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||
|
||||
#if (SMP)
|
||||
|
||||
Reference in New Issue
Block a user