Added SMP objects to driver/level3.
This commit is contained in:
parent
943fa2fb58
commit
627d5e7401
|
@ -83,8 +83,10 @@ function(GenerateNamedObjects sources_in float_type_in defines_in name_in use_cb
|
||||||
set(OBJ_LIST_OUT "")
|
set(OBJ_LIST_OUT "")
|
||||||
foreach (source_file ${sources_in})
|
foreach (source_file ${sources_in})
|
||||||
|
|
||||||
|
if (NOT float_type_in STREQUAL "")
|
||||||
string(SUBSTRING ${float_type_in} 0 1 float_char)
|
string(SUBSTRING ${float_type_in} 0 1 float_char)
|
||||||
string(TOLOWER ${float_char} float_char)
|
string(TOLOWER ${float_char} float_char)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (NOT name_in)
|
if (NOT name_in)
|
||||||
get_filename_component(source_name ${source_file} NAME_WE)
|
get_filename_component(source_name ${source_file} NAME_WE)
|
||||||
|
@ -134,8 +136,13 @@ endfunction ()
|
||||||
# If 0, it will simply append the code, e.g. symm_L.c with TRANS and UNIT will be symm_LTU.
|
# If 0, it will simply append the code, e.g. symm_L.c with TRANS and UNIT will be symm_LTU.
|
||||||
# If 2, it will append the code with an underscore, e.g. symm.c with TRANS and UNIT will be symm_TU.
|
# If 2, it will append the code with an underscore, e.g. symm.c with TRANS and UNIT will be symm_TU.
|
||||||
# If 3, it will insert the code *around* the last character with an underscore, e.g. symm_L.c with TRANS and UNIT will be symm_TLU (required by BLAS level2 objects).
|
# If 3, it will insert the code *around* the last character with an underscore, e.g. symm_L.c with TRANS and UNIT will be symm_TLU (required by BLAS level2 objects).
|
||||||
|
# @param alternate_name replaces the source name as the object name (define codes are still appended)
|
||||||
function(GenerateCombinationObjects sources_in defines_in absent_codes_in float_type_in all_defines_in replace_scheme)
|
function(GenerateCombinationObjects sources_in defines_in absent_codes_in float_type_in all_defines_in replace_scheme)
|
||||||
|
|
||||||
|
if (DEFINED ARGV6)
|
||||||
|
set(alternate_name ${ARGV6})
|
||||||
|
endif ()
|
||||||
|
|
||||||
AllCombinations("${defines_in}" "${absent_codes_in}")
|
AllCombinations("${defines_in}" "${absent_codes_in}")
|
||||||
set(define_combos ${LIST_OUT})
|
set(define_combos ${LIST_OUT})
|
||||||
set(define_codes ${CODES_OUT})
|
set(define_codes ${CODES_OUT})
|
||||||
|
@ -182,7 +189,7 @@ function(GenerateCombinationObjects sources_in defines_in absent_codes_in float_
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
GenerateNamedObjects("${source_file}" "${float_type_in}" "${cur_defines}" "" 0 "${replace_code}" "${append_code}")
|
GenerateNamedObjects("${source_file}" "${float_type_in}" "${cur_defines}" "${alternate_name}" 0 "${replace_code}" "${append_code}")
|
||||||
list(APPEND COMBO_OBJ_LIST_OUT "${OBJ_LIST_OUT}")
|
list(APPEND COMBO_OBJ_LIST_OUT "${OBJ_LIST_OUT}")
|
||||||
endforeach ()
|
endforeach ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
|
@ -28,6 +28,10 @@ foreach (GEMM_DEFINE ${GEMM_DEFINES})
|
||||||
string(TOLOWER ${GEMM_DEFINE} GEMM_DEFINE_LC)
|
string(TOLOWER ${GEMM_DEFINE} GEMM_DEFINE_LC)
|
||||||
GenerateNamedObjects("gemm.c" "DOUBLE" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0)
|
GenerateNamedObjects("gemm.c" "DOUBLE" "${GEMM_DEFINE}" "gemm_${GEMM_DEFINE_LC}" 0)
|
||||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
|
if (SMP AND NOT USE_SIMPLE_THREADED_LEVEL3)
|
||||||
|
GenerateNamedObjects("gemm.c" "DOUBLE" "${GEMM_DEFINE};THREADED_LEVEL3" "gemm_thread_${GEMM_DEFINE_LC}" 0)
|
||||||
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
GenerateCombinationObjects("trmm_L.c;trmm_R.c;trsm_L.c;trsm_R.c" "TRANS;UPPER;UNIT" "N;L;N" "DOUBLE" "" 0)
|
GenerateCombinationObjects("trmm_L.c;trmm_R.c;trsm_L.c;trsm_R.c" "TRANS;UPPER;UNIT" "N;L;N" "DOUBLE" "" 0)
|
||||||
|
@ -39,19 +43,20 @@ list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
GenerateCombinationObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "U" "DOUBLE" "" 2)
|
GenerateCombinationObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "U" "DOUBLE" "" 2)
|
||||||
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
|
|
||||||
#if (SMP)
|
if (SMP)
|
||||||
#
|
|
||||||
# COMMONOBJS += gemm_thread_m.c gemm_thread_n.c gemm_thread_mn.c gemm_thread_variable.c
|
# N.B. these do NOT have a float type (e.g. DOUBLE) defined!
|
||||||
# COMMONOBJS += syrk_thread.c
|
GenerateNamedObjects("gemm_thread_m.c;gemm_thread_n.c;gemm_thread_mn.c;gemm_thread_variable.c;syrk_thread.c" "" "" "" 0)
|
||||||
#
|
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||||
# if (USE_SIMPLE_THREADED_LEVEL3)
|
|
||||||
# DBLASOBJS += dgemm_thread_nn.c dgemm_thread_nt.c dgemm_thread_tn.c dgemm_thread_tt.c
|
if (NOT USE_SIMPLE_THREADED_LEVEL3)
|
||||||
# DBLASOBJS += dsymm_thread_LU.c dsymm_thread_LL.c dsymm_thread_RU.c dsymm_thread_RL.c
|
GenerateCombinationObjects("syrk_k.c" "LOWER;TRANS" "U;N" "DOUBLE" "THREADED_LEVEL3" 2 "syrk_thread")
|
||||||
# DBLASOBJS += dsyrk_thread_UN.c dsyrk_thread_UT.c dsyrk_thread_LN.c dsyrk_thread_LT.c
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
#
|
GenerateCombinationObjects("symm_k.c" "RSIDE;LOWER" "L;U" "DOUBLE" "THREADED_LEVEL3;NN" 2 "symm_thread")
|
||||||
# endif ()
|
list(APPEND DBLAS_OBJS ${COMBO_OBJ_LIST_OUT})
|
||||||
#endif ()
|
endif ()
|
||||||
#
|
endif ()
|
||||||
|
|
||||||
#HPLOBJS =
|
#HPLOBJS =
|
||||||
# dgemm_nn.c dgemm_nt.c dgemm_tn.c dgemm_tt.c
|
# dgemm_nn.c dgemm_nt.c dgemm_tn.c dgemm_tt.c
|
||||||
# dtrsm_LNUU.c dtrsm_LNUN.c dtrsm_LNLU.c dtrsm_LNLN.c
|
# dtrsm_LNUU.c dtrsm_LNUN.c dtrsm_LNLU.c dtrsm_LNLN.c
|
||||||
|
|
Loading…
Reference in New Issue