# subtract 1 since we will iterate from 0 to num_combos
math(EXPR num_combos "(${num_combos} << ${list_count}) - 1")
set(LIST_OUT "")
+ set(CODES_OUT "")
foreach (c RANGE 0 ${num_combos})
set(current_combo "")
# @param sources_in the source files to build from
# @param defines_in the preprocessor definitions that will be combined to create the object files
# @param float_type_in the float type to define for this build (e.g. SINGLE/DOUBLE/etc)
-# @param replace_k Replace the "k" in the filename with the define combo letters (else it appends). E.g. symm_k with TRANS and UNIT defined will be symm_TU.
# @param all_defines_in (optional) preprocessor definitions that will be applied to all objects
+# @param replace_k If 1, replace the "k" in the filename with the define combo letters. E.g. symm_k with TRANS and UNIT defined will be symm_TU. If 0, appends, or if 2 appends with an underscore.
function(GenerateCombinationObjects sources_in defines_in float_type_in all_defines_in replace_k)
AllCombinations("${defines_in}")
set(replace_k_name "")
set(append_name "")
- if (replace_k)
+ if (replace_k EQUAL 1)
set(replace_k_name ${define_code})
else ()
- set(append_name ${define_code})
+ if (replace_k EQUAL 2)
+ set(append_name "_${define_code}")
+ else ()
+ set(append_name ${define_code})
+ endif ()
endif ()
GenerateNamedObjects("${source_file}" "${float_type_in}" "${cur_defines}" "" 0 "${replace_k_name}" "${append_name}")
set(COMBO_OBJ_LIST_OUT ${COMBO_OBJ_LIST_OUT} PARENT_SCOPE)
endfunction ()
+
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
GenerateCombinationObjects("syrk_k.c;syr2k_k.c" "LOWER;TRANS" "DOUBLE" "" 1)
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
-GenerateCombinationObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "DOUBLE" "" 1)
+GenerateCombinationObjects("syrk_kernel.c;syr2k_kernel.c" "LOWER" "DOUBLE" "" 2)
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
#if (SMP)