Skip to content

Commit

Permalink
Fix circular dependency in include
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-ueding committed Nov 3, 2017
1 parent 4be4ae7 commit 0037a39
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 126 deletions.
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.jar
*.log
*.o
*.orig
*.rar
*.so
*.sql
Expand All @@ -17,17 +18,13 @@
*.zip
*autom4te.cache*
*~
._*
.deps
.deps/
.DS_Store
.DS_Store?
.Spotlight-V100
.Trashes
._*
.deps
.deps/
INSTALL
Makefile
Makefile.in
Thumbs.db
\#*\#
aclocal.m4
autom4te.cache*
Expand All @@ -49,11 +46,15 @@ include/qphix/qphix_config_internal.h
include/qphix/qphix_config_internal.h.in
include/qphix/stamp-h1
include4git
INSTALL
lib/libqphix_solver.a
lib4git
Makefile
Makefile.in
stamp-h1
tests/ipo_out.optrpt
tests/t_dslash
tests/t_minvcg
tests/time_clov_noqdp
tests/time_dslash_noqdp
Thumbs.db
2 changes: 2 additions & 0 deletions tests-gtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Include GTest Headers
include_directories(${PROJECT_SOURCE_DIR}/external)

include_directories(${PROJECT_SOURCE_DIR})

if( ${testing})
if ( ${QDPXX_CXX_FOUND} )
add_library(gtestlib STATIC process_args.cc random_gauge.cc qdpxx_test_env.cc)
Expand Down
2 changes: 1 addition & 1 deletion tests-gtest/a_imugamma5.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <qdp.h>
#include <qphix/blas_new_c.h>

#include "../tests/compare_qdp_spinors.h"
#include "../tests/compare_qdp_spinors_gtest.h"

#include <cmath>

Expand Down
3 changes: 1 addition & 2 deletions tests-gtest/clover_product.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using namespace QPhiX;
#include "../tests/tolerance.h"
#include "../tests/clover_fermact_params_w.h"
#include "../tests/clover_term.h"
#include "../tests/compare_qdp_spinors_gtest.h"

#include <qphix/clover.h>
#include <qphix/clover_product.h>
Expand All @@ -17,8 +18,6 @@ using namespace QPhiX;
#include <qphix/wilson.h>

#include <qdp.h>
#include <gtest/gtest.h>
#include "../tests/compare_qdp_spinors.h"

#include <iostream>

Expand Down
104 changes: 0 additions & 104 deletions tests-gtest/compare_spinors.h

This file was deleted.

3 changes: 1 addition & 2 deletions tests-gtest/ndtm_herm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using namespace QPhiX;

#include "../tests/veclen.h"
#include "../tests/tolerance.h"
#include "../tests/compare_qdp_spinors_gtest.h"

#include <qphix/blas_new_c.h>
#include <qphix/ndtm_reuse_operator.h>
Expand All @@ -15,9 +16,7 @@ using namespace QPhiX;
#include <qphix/wilson.h>

#include <qdp.h>
#include <gtest/gtest.h>

#include "../tests/compare_qdp_spinors.h"

#include <iostream>
#include <vector>
Expand Down
5 changes: 2 additions & 3 deletions tests-gtest/random_gauge.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <gtest/gtest.h>

#include "../tests/RandomGauge.h"
#include "../tests/compare_qdp_spinors.h"
#include "../tests/compare_qdp_spinors_gtest.h"

#include <qphix/qphix_cli_args.h>

using namespace QPhiX;
Expand Down
3 changes: 1 addition & 2 deletions tests-gtest/richardson_cg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
outer solver.
*/

#include <gtest/gtest.h>
#include <qphix/blas_new_c.h>
#include <qdp.h>
#include <qphix/qphix_cli_args.h>
#include <qphix/clover.h>
#include <qphix/invcg.h>
#include <qphix/inv_richardson_multiprec.h>

#include "../tests/compare_qdp_spinors.h"
#include "../tests/compare_qdp_spinors_gtest.h"
#include "../tests/RandomGauge.h"
#include "../tests/veclen.h"

Expand Down
4 changes: 4 additions & 0 deletions tests/compare_qdp_spinors.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

#if !defined(COMPARE_QDP_SPINORS_GTEST) && !defined(COMPARE_QDP_SPINORS_CUSTOM)
#error "This header must not be included directly, use the versions with _gtest or _custom in their filename."
#endif

#include <qphix/geometry.h>
#include <qphix/print_utils.h>
#include <qphix/qdp_packer.h>
Expand Down
5 changes: 5 additions & 0 deletions tests/compare_qdp_spinors_custom.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once

#define COMPARE_QDP_SPINORS_CUSTOM
#include "compare_qdp_spinors.h"
#undef COMPARE_QDP_SPINORS_CUSTOM
7 changes: 7 additions & 0 deletions tests/compare_qdp_spinors_gtest.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

#include <gtest/gtest.h>

#define COMPARE_QDP_SPINORS_GTEST
#include "tests/compare_qdp_spinors.h"
#undef COMPARE_QDP_SPINORS_GTEST
2 changes: 1 addition & 1 deletion tests/testClovDslashFull.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace std;
using namespace QPhiX;

#include "RandomGauge.h"
#include "compare_qdp_spinors.h"
#include "compare_qdp_spinors_custom.h"
#include "veclen.h"
#include "tolerance.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/testDslashFull.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace QPhiX;
#include "veclen.h"
#include "tolerance.h"
#include "tparam_selector.h"
#include "compare_qdp_spinors.h"
#include "compare_qdp_spinors_custom.h"
#include "RandomGauge.h"

int Nx, Ny, Nz, Nt, Nxh;
Expand Down
2 changes: 1 addition & 1 deletion tests/testMInvCG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace QPhiX;
#include "veclen.h"
#include "tolerance.h"
#include "RandomGauge.h"
#include "compare_qdp_spinors.h"
#include "compare_qdp_spinors_custom.h"

void TestMultishift::run()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/testTWMCloverFull.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace QPhiX;

#include "tolerance.h"
#include "veclen.h"
#include "compare_qdp_spinors.h"
#include "compare_qdp_spinors_custom.h"
#include "cli_args.h"
#include "tparam_selector.h"
#include "RandomGauge.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/testTWMDslashFull.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using namespace QPhiX;
#include "veclen.h"
#include "tolerance.h"
#include "tparam_selector.h"
#include "compare_qdp_spinors.h"
#include "compare_qdp_spinors_custom.h"

int Nx, Ny, Nz, Nt, Nxh;
bool verbose = true;
Expand Down

0 comments on commit 0037a39

Please sign in to comment.