hpc-lab-code/work/xmake.lua
2026-01-22 04:30:04 +08:00

34 lines
846 B
Lua

set_project("gemm")
set_version("1.0")
add_requires("openmp")
add_rules("mode.debug", "mode.release")
-- Find MPI package
add_requires("mpi", {system = true})
add_requires("mpi_cxx", {system = true})
-- 串行版本
target("gemm_serial")
set_kind("binary")
add_files("gemm_serial.cpp")
add_cxxflags("-O3", "-march=native")
-- 并行版本
target("gemm_parallel")
set_kind("binary")
add_files("gemm_parallel.cpp")
add_cxxflags("-O3", "-march=native")
add_packages("openmp")
-- 使用mpic++作为编译器
add_packages("mpi")
add_packages("mpi_cxx")
-- 优化版本
target("gemm_optimized")
set_kind("binary")
add_files("gemm_optimized.cpp")
add_cxxflags("-O3", "-march=native")
add_packages("openmp")
-- 使用mpic++作为编译器
add_packages("mpi")
add_packages("mpi_cxx")