Added SMP sources to level2 CMakeLists.txt.
This commit is contained in:
parent
13d2d48e67
commit
6b5d26e07b
|
@ -70,7 +70,21 @@ endfunction ()
|
||||||
# e.g. with DOUBLE set, "i*max" will generate the name "idmax", and "max" will be "dmax"
|
# e.g. with DOUBLE set, "i*max" will generate the name "idmax", and "max" will be "dmax"
|
||||||
# @param replace_last_with replaces the last character in the filename with this string (e.g. symm_k should be symm_TU)
|
# @param replace_last_with replaces the last character in the filename with this string (e.g. symm_k should be symm_TU)
|
||||||
# @param append_with appends the filename with this string (e.g. trmm_R should be trmm_RTUU or some other combination of characters)
|
# @param append_with appends the filename with this string (e.g. trmm_R should be trmm_RTUU or some other combination of characters)
|
||||||
function(GenerateNamedObjects sources_in float_type_in defines_in name_in use_cblas)
|
function(GenerateNamedObjects sources_in float_type_in)
|
||||||
|
|
||||||
|
if (DEFINED ARGV2)
|
||||||
|
set(defines_in ${ARGV2})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (DEFINED ARGV3)
|
||||||
|
set(name_in ${ARGV3})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (DEFINED ARGV4)
|
||||||
|
set(use_cblas ${ARGV4})
|
||||||
|
else ()
|
||||||
|
set(use_cblas 0)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (DEFINED ARGV5)
|
if (DEFINED ARGV5)
|
||||||
set(replace_last_with ${ARGV5})
|
set(replace_last_with ${ARGV5})
|
||||||
|
@ -196,7 +210,6 @@ function(GenerateCombinationObjects sources_in defines_in absent_codes_in float_
|
||||||
set(extra_underscore "_")
|
set(extra_underscore "_")
|
||||||
endif ()
|
endif ()
|
||||||
string(REGEX REPLACE "(.+)(_[^_]+)$" "\\1${extra_underscore}${define_code}\\2" alternate_name ${alternate_name})
|
string(REGEX REPLACE "(.+)(_[^_]+)$" "\\1${extra_underscore}${define_code}\\2" alternate_name ${alternate_name})
|
||||||
message(STATUS ${alternate_name})
|
|
||||||
else()
|
else()
|
||||||
set(append_code ${define_code}) # replace_scheme should be 0
|
set(append_code ${define_code}) # replace_scheme should be 0
|
||||||
endif ()
|
endif ()
|
||||||
|
|
|
@ -11,7 +11,7 @@ set(UL_SOURCES
|
||||||
syr2_k.c
|
syr2_k.c
|
||||||
)
|
)
|
||||||
|
|
||||||
# sources that need to be compiled several times, for UNIT, TRANS
|
# sources that need to be compiled several times, for UNIT, TRANSA
|
||||||
set(NU_SOURCES
|
set(NU_SOURCES
|
||||||
tbmv_U.c
|
tbmv_U.c
|
||||||
tbsv_U.c
|
tbsv_U.c
|
||||||
|
@ -31,43 +31,52 @@ set(NU_SOURCES
|
||||||
GenerateCombinationObjects("${UL_SOURCES}" "LOWER" "U" "DOUBLE" "" 1)
|
GenerateCombinationObjects("${UL_SOURCES}" "LOWER" "U" "DOUBLE" "" 1)
|
||||||
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
|
|
||||||
# objects that need TRANS and UNIT set
|
# objects that need TRANSA and UNIT set
|
||||||
# N.B. BLAS wants to put the U/L from the filename in the *MIDDLE* because of course why not have a different naming scheme for every single object -hpa
|
# N.B. BLAS wants to put the U/L from the filename in the *MIDDLE* because of course why not have a different naming scheme for every single object -hpa
|
||||||
GenerateCombinationObjects("${NU_SOURCES}" "TRANS;UNIT" "N;N" "DOUBLE" "" 3)
|
GenerateCombinationObjects("${NU_SOURCES}" "TRANSA;UNIT" "N;N" "DOUBLE" "" 3)
|
||||||
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
|
|
||||||
# gbmv uses a lowercase n and t. WHY? WHO KNOWS!
|
# gbmv uses a lowercase n and t. WHY? WHO KNOWS!
|
||||||
GenerateNamedObjects("gbmv_k.c" "DOUBLE" "" "gbmv_n" 0)
|
GenerateNamedObjects("gbmv_k.c" "DOUBLE" "" "gbmv_n")
|
||||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
GenerateNamedObjects("gbmv_k.c" "DOUBLE" "TRANS" "gbmv_t" 0)
|
GenerateNamedObjects("gbmv_k.c" "DOUBLE" "TRANS" "gbmv_t")
|
||||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
|
|
||||||
#if (DEFINED SMP)
|
if (SMP)
|
||||||
# add_library(DBLASOBJS_SMP
|
|
||||||
# dgemv_thread_n.c dgemv_thread_t.c
|
# gbmv uses a lowercase n and t
|
||||||
# dger_thread.c
|
GenerateNamedObjects("gbmv_thread.c" "DOUBLE" "" "gbmv_thread_n")
|
||||||
# dsymv_thread_U.c dsymv_thread_L.c
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
# dsyr_thread_U.c dsyr_thread_L.c
|
GenerateNamedObjects("gbmv_thread.c" "DOUBLE" "TRANS" "gbmv_thread_t")
|
||||||
# dsyr2_thread_U.c dsyr2_thread_L.c
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
# dspr_thread_U.c dspr_thread_L.c
|
|
||||||
# dspr2_thread_U.c dspr2_thread_L.c
|
GenerateNamedObjects("ger_thread.c" "DOUBLE")
|
||||||
# dtrmv_thread_NUU.c dtrmv_thread_NUN.c
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
# dtrmv_thread_NLU.c dtrmv_thread_NLN.c
|
|
||||||
# dtrmv_thread_TUU.c dtrmv_thread_TUN.c
|
set(UL_SMP_SOURCES
|
||||||
# dtrmv_thread_TLU.c dtrmv_thread_TLN.c
|
symv_thread.c
|
||||||
# dspmv_thread_U.c dspmv_thread_L.c
|
syr_thread.c
|
||||||
# dtpmv_thread_NUU.c dtpmv_thread_NUN.c
|
syr2_thread.c
|
||||||
# dtpmv_thread_NLU.c dtpmv_thread_NLN.c
|
spr_thread.c
|
||||||
# dtpmv_thread_TUU.c dtpmv_thread_TUN.c
|
spr2_thread.c
|
||||||
# dtpmv_thread_TLU.c dtpmv_thread_TLN.c
|
spmv_thread.c
|
||||||
# dgbmv_thread_n.c dgbmv_thread_t.c
|
sbmv_thread.c
|
||||||
# dsbmv_thread_U.c dsbmv_thread_L.c
|
)
|
||||||
# dtbmv_thread_NUU.c dtbmv_thread_NUN.c
|
|
||||||
# dtbmv_thread_NLU.c dtbmv_thread_NLN.c
|
GenerateCombinationObjects("${UL_SMP_SOURCES}" "LOWER" "U" "DOUBLE" "" 2)
|
||||||
# dtbmv_thread_TUU.c dtbmv_thread_TUN.c
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
# dtbmv_thread_TLU.c dtbmv_thread_TLN.c
|
|
||||||
# )
|
|
||||||
#endif ()
|
set(NU_SMP_SOURCES
|
||||||
|
trmv_thread.c
|
||||||
|
tpmv_thread.c
|
||||||
|
tbmv_thread.c
|
||||||
|
)
|
||||||
|
|
||||||
|
GenerateCombinationObjects("${NU_SMP_SOURCES}" "TRANSA;LOWER;UNIT" "N;U;N" "DOUBLE" "" 2)
|
||||||
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
|
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(DBLAS_OBJS ${DBLAS_OBJS} PARENT_SCOPE) # list append removes the scope from DBLAS_OBJS
|
set(DBLAS_OBJS ${DBLAS_OBJS} PARENT_SCOPE) # list append removes the scope from DBLAS_OBJS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue