You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
-
- include_directories(${CMAKE_SOURCE_DIR})
-
- set(BLAS1_SOURCES
- axpy.c swap.c
- copy.c scal.c
- dot.c
- asum.c nrm2.c
- rot.c rotg.c rotm.c rotmg.c
- axpby.c
- )
-
- # TODO: USE_NETLIB_GEMV shoudl switch gemv.c to netlib/*gemv.f
- set(BLAS2_SOURCES
- gemv.c ger.c
- trsv.c trmv.c symv.c
- syr.c syr2.c gbmv.c
- sbmv.c spmv.c
- spr.c spr2.c
- tbsv.c tbmv.c
- tpsv.c tpmv.c
- )
-
- set(BLAS3_SOURCES
- gemm.c symm.c
- trsm.c syrk.c syr2k.c
- omatcopy.c imatcopy.c
- )
-
- # generate the BLAS objs once with and once without cblas
- set (CBLAS_FLAGS "")
-
- if (NOT DEFINED NO_FBLAS)
- list(APPEND CBLAS_FLAGS 0)
- endif ()
-
- if (NOT DEFINED NO_CBLAS)
- list(APPEND CBLAS_FLAGS 1)
- endif ()
-
- foreach (CBLAS_FLAG ${CBLAS_FLAGS})
-
- GenerateNamedObjects("${BLAS1_SOURCES}" "DOUBLE" "" "" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("${BLAS2_SOURCES}" "DOUBLE" "" "" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("${BLAS3_SOURCES}" "DOUBLE" "" "" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
-
- # trmm is trsm with a compiler flag set
- GenerateNamedObjects("trsm.c" "DOUBLE" "TRMM" "trmm" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
-
- # max and imax are compiled 4 times
- GenerateNamedObjects("max.c" "DOUBLE" "" "" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("max.c" "DOUBLE" "USE_ABS" "amax" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("max.c" "DOUBLE" "USE_ABS;USE_MIN" "amin" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("max.c" "DOUBLE" "USE_MIN" "min" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
-
- GenerateNamedObjects("imax.c" "DOUBLE" "" "i*max" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("imax.c" "DOUBLE" "USE_ABS" "i*amax" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("imax.c" "DOUBLE" "USE_ABS;USE_MIN" "i*amin" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- GenerateNamedObjects("imax.c" "DOUBLE" "USE_MIN" "i*min" ${CBLAS_FLAG})
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
-
- endforeach ()
-
- if (NOT DEFINED NO_LAPACK)
- set(LAPACK_SOURCES
- lapack/getrf.c lapack/getrs.c lapack/potrf.c lapack/getf2.c
- lapack/potf2.c lapack/laswp.c lapack/gesv.c lapack/lauu2.c
- lapack/lauum.c lapack/trti2.c lapack/trtri.c
- )
- GenerateNamedObjects("${LAPACK_SOURCES}" "DOUBLE" "" "" 0)
- list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
- endif ()
-
- set(DBLAS_OBJS ${DBLAS_OBJS} PARENT_SCOPE) # list append removes the scope from DBLAS_OBJS
|