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.

CMakeLists.txt 1.9 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. include_directories(${CMAKE_SOURCE_DIR})
  2. # sources that need to be compiled twice, once with no flags and once with LOWER
  3. set(UL_SOURCES
  4. sbmv_k.c
  5. spmv_k.c
  6. spr_k.c
  7. spr2_k.c
  8. syr_k.c
  9. syr2_k.c
  10. )
  11. # sources that need to be compiled several times, for UNIT, TRANSA
  12. set(NU_SOURCES
  13. tbmv_U.c
  14. tbsv_U.c
  15. tpmv_U.c
  16. tpsv_U.c
  17. trmv_U.c
  18. trsv_U.c
  19. tbmv_L.c
  20. tbsv_L.c
  21. tpmv_L.c
  22. tpsv_L.c
  23. trmv_L.c
  24. trsv_L.c
  25. )
  26. # objects that need LOWER set
  27. GenerateCombinationObjects("${UL_SOURCES}" "LOWER" "U" "DOUBLE" "" 1)
  28. # objects that need TRANSA and UNIT set
  29. # N.B. BLAS wants to put the U/L from the filename in the *MIDDLE* because of course why not have a different naming scheme for every single object -hpa
  30. GenerateCombinationObjects("${NU_SOURCES}" "TRANSA;UNIT" "N;N" "DOUBLE" "" 3)
  31. # gbmv uses a lowercase n and t. WHY? WHO KNOWS!
  32. GenerateNamedObjects("gbmv_k.c" "DOUBLE" "" "gbmv_n")
  33. GenerateNamedObjects("gbmv_k.c" "DOUBLE" "TRANS" "gbmv_t")
  34. if (SMP)
  35. # gbmv uses a lowercase n and t. N.B. this uses TRANSA where gbmv.c uses TRANS. Intentional?
  36. GenerateNamedObjects("gbmv_thread.c" "DOUBLE" "" "gbmv_thread_n")
  37. GenerateNamedObjects("gbmv_thread.c" "DOUBLE" "TRANSA" "gbmv_thread_t")
  38. GenerateNamedObjects("gemv_thread.c" "DOUBLE" "" "gemv_thread_n")
  39. GenerateNamedObjects("gemv_thread.c" "DOUBLE" "TRANSA" "gemv_thread_t")
  40. GenerateNamedObjects("ger_thread.c" "DOUBLE")
  41. set(UL_SMP_SOURCES
  42. symv_thread.c
  43. syr_thread.c
  44. syr2_thread.c
  45. spr_thread.c
  46. spr2_thread.c
  47. spmv_thread.c
  48. sbmv_thread.c
  49. )
  50. GenerateCombinationObjects("${UL_SMP_SOURCES}" "LOWER" "U" "DOUBLE" "" 2)
  51. set(NU_SMP_SOURCES
  52. trmv_thread.c
  53. tpmv_thread.c
  54. tbmv_thread.c
  55. )
  56. GenerateCombinationObjects("${NU_SMP_SOURCES}" "TRANSA;LOWER;UNIT" "N;U;N" "DOUBLE" "" 2)
  57. endif ()
  58. set(DBLAS_OBJS ${DBLAS_OBJS} PARENT_SCOPE) # list append removes the scope from DBLAS_OBJS