Skip to content

Commit 11911fd

Browse files
committed
Add kernel/Makefile.LA to CMake
1 parent 408b4fe commit 11911fd

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

kernel/CMakeLists.txt

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,30 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
464464
GenerateNamedObjects("${KERNELDIR}/${${float_char}GEADD_KERNEL}" "" "geadd_k" false "" "" false ${float_type})
465465
endforeach ()
466466

467+
# Makefile.LA
468+
if(NOT NO_LAPACK)
469+
foreach (float_type ${FLOAT_TYPES})
470+
if (NOT DEFINED ${float_char}NEG_TCOPY)
471+
if (${float_char} STREQUAL "Z" OR ${float_char} STREQUAL "C" OR ${float_char} STREQUAL "X")
472+
set(${float_char}NEG_TCOPY ../generic/zneg_tcopy.c)
473+
else ()
474+
set(${float_char}NEG_TCOPY ../generic/neg_tcopy.c)
475+
endif ()
476+
endif ()
477+
478+
if (NOT DEFINED ${float_char}LASWP_NCOPY)
479+
if (${float_char} STREQUAL "Z" OR ${float_char} STREQUAL "C" OR ${float_char} STREQUAL "X")
480+
set(${float_char}LASWP_NCOPY ../generic/zlaswp_ncopy.c)
481+
else ()
482+
set(${float_char}LASWP_NCOPY ../generic/laswp_ncopy.c)
483+
endif ()
484+
endif ()
485+
string(SUBSTRING ${float_type} 0 1 float_char)
486+
GenerateNamedObjects("${KERNELDIR}/${${float_char}NEG_TCOPY}_${${float_char}GEMM_UNROLL_M}" "" "neg_tcopy" false "" "" false ${float_type})
487+
GenerateNamedObjects("${KERNELDIR}/${${float_char}LASWP_NCOPY}_${${float_char}GEMM_UNROLL_N}" "" "laswp_ncopy" false "" "" false ${float_type})
488+
endforeach()
489+
endif()
490+
467491
if (${DYNAMIC_ARCH})
468492
set(SETPARAM_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
469493
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/setparam-ref.c SETPARAM_REF_CONTENTS)
@@ -484,9 +508,6 @@ function (build_core TARGET_CORE KDIR TSUFFIX KERNEL_DEFINITIONS)
484508
file(REMOVE ${SETPARAM_TARGET_DIR}/kernel${TSUFFIX}.tmp)
485509
endif ()
486510

487-
# Makefile.LA
488-
#DBLASOBJS += dneg_tcopy$(TSUFFIX).$(SUFFIX) dlaswp_ncopy$(TSUFFIX).$(SUFFIX)
489-
490511
add_library(kernel${TSUFFIX} OBJECT ${OPENBLAS_SRC})
491512
set_target_properties(kernel${TSUFFIX} PROPERTIES COMPILE_FLAGS "${KERNEL_DEFINITIONS}")
492513
get_target_property(KERNEL_INCLUDE_DIRECTORIES kernel${TSUFFIX} INCLUDE_DIRECTORIES)

0 commit comments

Comments
 (0)