Skip to content

Commit 5933b7d

Browse files
authored
Better logic for saving DFT plans (#665)
* This patch introduces a better scheme for saving and loading DFT plan * no message
1 parent f285afc commit 5933b7d

File tree

6 files changed

+210
-311
lines changed

6 files changed

+210
-311
lines changed

include/sleefdft.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,12 @@ IMPORT void SleefDFT_setDefaultVerboseFP(FILE *fp);
5959
//
6060

6161
IMPORT void SleefDFT_setPlanFilePath(const char *path, const char *arch, uint64_t mode);
62+
IMPORT int SleefDFT_savePlan(const char *pathStr);
6263

63-
#define SLEEF_PLAN_AUTOMATIC 0
6464
#define SLEEF_PLAN_READONLY (1 << 0)
6565
#define SLEEF_PLAN_RESET (1 << 1)
66-
#define SLEEF_PLAN_BUILDALLPLAN (1 << 2)
66+
#define SLEEF_PLAN_AUTOMATIC (1 << 2)
6767
#define SLEEF_PLAN_NOLOCK (1 << 3)
68-
#define SLEEF_PLAN_MEASURE (1 << 29)
6968
#define SLEEF_PLAN_REFERTOENVVAR (1 << 30)
7069

7170
#undef IMPORT

src/dft-tester/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ add_dependencies(${TARGET_TEST_DFTPLANNER} ${TARGET_HEADERS} ${TARGET_LIBSLEEF}
9090
target_compile_definitions(${TARGET_TEST_DFTPLANNER} PRIVATE ${COMMON_TARGET_DEFINITIONS} MEASURE=1)
9191
target_link_libraries(${TARGET_TEST_DFTPLANNER} ${COMMON_LINK_LIBRARIES})
9292
set_target_properties(${TARGET_TEST_DFTPLANNER} PROPERTIES ${COMMON_TARGET_PROPERTIES})
93-
add_test(NAME ${TARGET_TEST_DFTPLANNER} COMMAND $<TARGET_FILE:${TARGET_TEST_DFTPLANNER}> ${PROJECT_BINARY_DIR}/testm.plan)
93+
add_test(NAME ${TARGET_TEST_DFTPLANNER} COMMAND $<TARGET_FILE:${TARGET_TEST_DFTPLANNER}> ${PROJECT_BINARY_DIR}/testm1.plan ${PROJECT_BINARY_DIR}/testm2.plan)
9494
set_tests_properties(${TARGET_TEST_DFTPLANNER} PROPERTIES COST 2)
9595

9696
# Target executable test_dftplannerest
@@ -100,7 +100,7 @@ add_dependencies(${TARGET_TEST_DFTPLANNEREST} ${TARGET_HEADERS} ${TARGET_LIBSLEE
100100
target_compile_definitions(${TARGET_TEST_DFTPLANNEREST} PRIVATE ${COMMON_TARGET_DEFINITIONS})
101101
target_link_libraries(${TARGET_TEST_DFTPLANNEREST} ${COMMON_LINK_LIBRARIES})
102102
set_target_properties(${TARGET_TEST_DFTPLANNEREST} PROPERTIES ${COMMON_TARGET_PROPERTIES})
103-
add_test(NAME ${TARGET_TEST_DFTPLANNEREST} COMMAND $<TARGET_FILE:${TARGET_TEST_DFTPLANNEREST}> ${PROJECT_BINARY_DIR}/teste.plan)
103+
add_test(NAME ${TARGET_TEST_DFTPLANNEREST} COMMAND $<TARGET_FILE:${TARGET_TEST_DFTPLANNEREST}> ${PROJECT_BINARY_DIR}/teste1.plan ${PROJECT_BINARY_DIR}/teste2.plan)
104104
set_tests_properties(${TARGET_TEST_DFTPLANNEREST} PROPERTIES COST 2)
105105

106106
# Target executable roundtriptest1ddp

0 commit comments

Comments
 (0)