| @@ -21,8 +21,8 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS) | |||
| endif () | |||
| if (${ADD_COMMONOBJS}) | |||
| if (${ARCH} STREQUAL "x86") | |||
| if (NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") | |||
| if (X86) | |||
| if (NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") | |||
| GenerateNamedObjects("${KERNELDIR}/cpuid.S" "" "" false "" "" true) | |||
| else() | |||
| GenerateNamedObjects("${KERNELDIR}/cpuid_win.c" "" "" false "" "" true) | |||
| @@ -121,7 +121,7 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS) | |||
| # Makefile.L3 | |||
| set(USE_TRMM false) | |||
| if (${ARCH} STREQUAL "arm" OR ${ARCH} STREQUAL "arm64" OR "${TARGET}" STREQUAL "LONGSOON3B" OR "${TARGET}" STREQUAL "GENERIC" OR "${CORE}" STREQUAL "generic" OR "${TARGET}" STREQUAL "HASWELL" OR "${CORE}" STREQUAL "haswell" OR "{CORE}" STREQUAL "zen") | |||
| if (ARM OR ARM64 OR "${TARGET}" STREQUAL "LONGSOON3B" OR "${TARGET}" STREQUAL "GENERIC" OR "${CORE}" STREQUAL "generic" OR "${TARGET}" STREQUAL "HASWELL" OR "${CORE}" STREQUAL "haswell" OR "{CORE}" STREQUAL "zen") | |||
| set(USE_TRMM true) | |||
| endif () | |||
| @@ -464,6 +464,30 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS) | |||
| GenerateNamedObjects("${KERNELDIR}/${${float_char}GEADD_KERNEL}" "" "geadd_k" false "" "" false ${float_type}) | |||
| endforeach () | |||
| # Makefile.LA | |||
| if(NOT NO_LAPACK) | |||
| foreach (float_type ${FLOAT_TYPES}) | |||
| if (NOT DEFINED ${float_char}NEG_TCOPY) | |||
| if (${float_char} STREQUAL "Z" OR ${float_char} STREQUAL "C" OR ${float_char} STREQUAL "X") | |||
| set(${float_char}NEG_TCOPY ../generic/zneg_tcopy.c) | |||
| else () | |||
| set(${float_char}NEG_TCOPY ../generic/neg_tcopy.c) | |||
| endif () | |||
| endif () | |||
| if (NOT DEFINED ${float_char}LASWP_NCOPY) | |||
| if (${float_char} STREQUAL "Z" OR ${float_char} STREQUAL "C" OR ${float_char} STREQUAL "X") | |||
| set(${float_char}LASWP_NCOPY ../generic/zlaswp_ncopy.c) | |||
| else () | |||
| set(${float_char}LASWP_NCOPY ../generic/laswp_ncopy.c) | |||
| endif () | |||
| endif () | |||
| string(SUBSTRING ${float_type} 0 1 float_char) | |||
| GenerateNamedObjects("${KERNELDIR}/${${float_char}NEG_TCOPY}_${${float_char}GEMM_UNROLL_M}" "" "neg_tcopy" false "" "" false ${float_type}) | |||
| GenerateNamedObjects("${KERNELDIR}/${${float_char}LASWP_NCOPY}_${${float_char}GEMM_UNROLL_N}" "" "laswp_ncopy" false "" "" false ${float_type}) | |||
| endforeach() | |||
| endif() | |||
| if (${DYNAMIC_ARCH}) | |||
| set(SETPARAM_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}) | |||
| file(READ ${CMAKE_CURRENT_SOURCE_DIR}/setparam-ref.c SETPARAM_REF_CONTENTS) | |||
| @@ -482,20 +506,8 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS) | |||
| file(WRITE ${SETPARAM_TARGET_DIR}/kernel${TSUFFIX}.tmp "${KERNEL_TSUFFIX_CONTENTS}") | |||
| configure_file(${SETPARAM_TARGET_DIR}/kernel${TSUFFIX}.tmp ${SETPARAM_TARGET_DIR}/kernel${TSUFFIX}.h COPYONLY) | |||
| file(REMOVE ${SETPARAM_TARGET_DIR}/kernel${TSUFFIX}.tmp) | |||
| foreach (float_type ${FLOAT_TYPES}) | |||
| # a bit of metaprogramming here to pull out the appropriate KERNEL var | |||
| string(SUBSTRING ${float_type} 0 1 float_char) | |||
| GenerateNamedObjects("generic/neg_tcopy_${${float_char}GEMM_UNROLL_M}.c" "" "neg_tcopy" false "" ${TSUFFIX} false ${float_type}) | |||
| GenerateNamedObjects("generic/laswp_ncopy_${${float_char}GEMM_UNROLL_N}.c" "" "laswp_ncopy" false "" ${TSUFFIX} false ${float_type}) | |||
| endforeach () | |||
| endif () | |||
| # Makefile.LA | |||
| #DBLASOBJS += dneg_tcopy$(TSUFFIX).$(SUFFIX) dlaswp_ncopy$(TSUFFIX).$(SUFFIX) | |||
| add_library(kernel${TSUFFIX} OBJECT ${OPENBLAS_SRC}) | |||
| set_target_properties(kernel${TSUFFIX} PROPERTIES COMPILE_FLAGS "${KERNEL_DEFINITIONS}") | |||
| get_target_property(KERNEL_INCLUDE_DIRECTORIES kernel${TSUFFIX} INCLUDE_DIRECTORIES) | |||