|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
-
- include_directories(${PROJECT_SOURCE_DIR})
- include_directories(${PROJECT_BINARY_DIR})
-
- list (REMOVE_ITEM FLOAT_TYPES "BFLOAT16")
-
- set(LAPACK_SOURCES
- potrf/potrf_U_single.c
- potrf/potrf_L_single.c
- lauum/lauum_U_single.c
- lauum/lauum_L_single.c
- )
-
- # add a 'z' to filename for complex version
- set(LAPACK_MANGLED_SOURCES
- getf2/getf2_k.c
- lauu2/lauu2_U.c
- lauu2/lauu2_L.c
- potf2/potf2_U.c
- potf2/potf2_L.c
- )
-
- # sources that need TRANS set
- # this has a 'z' version
- set(TRANS_SOURCES
- getrs/getrs_single.c
- )
-
- # sources that need UNIT set
- # these do NOT have a z version
- set(UNIT_SOURCES
- trtri/trtri_U_single.c
- trtri/trtri_L_single.c
- )
-
- # these have a 'z' version
- set(UNIT_SOURCES2
- trti2/trti2_U.c
- trti2/trti2_L.c
- )
-
- if (NOT RELAPACK_REPLACE)
- GenerateNamedObjects("${LAPACK_SOURCES}")
- GenerateNamedObjects("${LAPACK_MANGLED_SOURCES}" "" "" false "" "" false 3)
- else()
- GenerateNamedObjects("${LAPACK_MANGLED_SOURCES}" "" "" false "" "" false 3)
- endif()
-
- GenerateNamedObjects("laswp/generic/laswp_k_4.c" "" "laswp_plus" false "" "" false 3)
- GenerateNamedObjects("laswp/generic/laswp_k_4.c" "MINUS" "laswp_minus" false "" "" false 3)
-
- foreach (float_type ${FLOAT_TYPES})
- if (${float_type} STREQUAL "HALF")
- continue()
- endif()
- GenerateNamedObjects("getrf/getrf_single.c" "UNIT" "getrf_single" false "" "" false ${float_type})
- endforeach ()
-
- # dynamic_arch laswp needs arch specific code ?
- #foreach(TARGET_CORE ${DYNAMIC_CORE})
- # set(TSUFFIX "_${TARGET_CORE}")
- #
- #GenerateNamedObjects("laswp/generic/laswp_k_4.c" "" "laswp_plus" false "" ${TSUFFIX} false 3)
- #GenerateNamedObjects("laswp/generic/laswp_k_4.c" "MINUS" "laswp_minus" false "" ${TSUFFIX} false 3)
- #endforeach ()
-
- if (USE_THREAD)
-
- if (USE_OPENMP)
- set(GETRF_SRC getrf/getrf_parallel_omp.c)
- else ()
- set(GETRF_SRC getrf/getrf_parallel.c)
- endif ()
-
- # these do not have 'z' versions
- set(PARALLEL_SOURCES
- lauum/lauum_U_parallel.c
- lauum/lauum_L_parallel.c
- potrf/potrf_U_parallel.c
- potrf/potrf_L_parallel.c
- )
-
- # this has a z version
- list(APPEND TRANS_SOURCES
- getrs/getrs_parallel.c
- )
-
- # these do NOT have a z version
- list(APPEND UNIT_SOURCES
- trtri/trtri_U_parallel.c
- trtri/trtri_L_parallel.c
- )
-
- foreach (float_type ${FLOAT_TYPES})
- GenerateNamedObjects("${GETRF_SRC}" "UNIT" "getrf_parallel" false "" "" false ${float_type})
- endforeach()
-
- GenerateNamedObjects("${PARALLEL_SOURCES}")
- endif ()
-
- foreach (float_type ${FLOAT_TYPES})
- if (${float_type} STREQUAL "COMPLEX" OR ${float_type} STREQUAL "ZCOMPLEX")
- foreach (trans_src ${TRANS_SOURCES})
- string(REGEX MATCH "[a-z]/([a-z]+_)([a-z]+)" op_name ${trans_src})
- string(REPLACE "/" "/z" ztrans_src ${trans_src})
- GenerateNamedObjects("${ztrans_src}" "TRANS=1" "${CMAKE_MATCH_1}N_${CMAKE_MATCH_2}" false "" "" false ${float_type})
- GenerateNamedObjects("${ztrans_src}" "TRANS=2" "${CMAKE_MATCH_1}T_${CMAKE_MATCH_2}" false "" "" false ${float_type})
- GenerateNamedObjects("${ztrans_src}" "TRANS=3" "${CMAKE_MATCH_1}R_${CMAKE_MATCH_2}" false "" "" false ${float_type})
- GenerateNamedObjects("${ztrans_src}" "TRANS=4" "${CMAKE_MATCH_1}C_${CMAKE_MATCH_2}" false "" "" false ${float_type})
- endforeach ()
- else ()
- GenerateCombinationObjects("${TRANS_SOURCES}" "TRANS" "N" "" 4 "" false ${float_type})
- endif ()
- endforeach ()
-
- GenerateCombinationObjects("${UNIT_SOURCES}" "UNIT" "N" "" 4)
- GenerateCombinationObjects("${UNIT_SOURCES2}" "UNIT" "N" "" 0 "" "" 3)
-
- add_library(lapack OBJECT ${OPENBLAS_SRC})
|