Skip to content

Commit

Permalink
Audit header files for using-directives.
Browse files Browse the repository at this point in the history
This removes using-directives for std and raptor namespaces in header
files.  Many functions are also moved into the raptor namespace.
  • Loading branch information
andrewreisner committed Dec 4, 2023
1 parent 496c096 commit b25f3b2
Show file tree
Hide file tree
Showing 101 changed files with 374 additions and 299 deletions.
2 changes: 2 additions & 0 deletions examples/benchmark_amg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "raptor/raptor.hpp"

using namespace raptor;

int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
Expand Down
2 changes: 1 addition & 1 deletion examples/benchmark_matmult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "external/mfem_wrapper.hpp"
#endif

// using namespace raptor;
using namespace raptor;
int main(int argc, char *argv[])
{
MPI_Init(&argc, &argv);
Expand Down
2 changes: 2 additions & 0 deletions examples/benchmark_matops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include "external/mfem_wrapper.hpp"
#endif

using namespace raptor;

#define eager_cutoff 1000
#define short_cutoff 62

Expand Down
8 changes: 5 additions & 3 deletions examples/benchmark_nek5000.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

#include "clear_cache.hpp"

#include "core/types.hpp"
#include "multilevel/par_multilevel.hpp"
#include "external/hypre_wrapper.hpp"
#include "raptor/core/types.hpp"
#include "raptor/multilevel/par_multilevel.hpp"
#include "raptor/external/hypre_wrapper.hpp"

using namespace raptor;

int main(int argc, char *argv[])
{
Expand Down
4 changes: 2 additions & 2 deletions examples/benchmark_par_spmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#include "raptor/raptor.hpp"

#ifdef USING_MFEM
#include "external/mfem_wrapper.hpp"
#include "raptor/external/mfem_wrapper.hpp"
#endif

//using namespace raptor;
using namespace raptor;
int main(int argc, char *argv[])
{
MPI_Init(&argc, &argv);
Expand Down
1 change: 1 addition & 0 deletions examples/benchmark_pcg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "raptor/raptor.hpp"

using namespace raptor;
int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
Expand Down
1 change: 1 addition & 0 deletions examples/benchmark_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include "raptor/raptor.hpp"

using namespace raptor;
int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
Expand Down
26 changes: 13 additions & 13 deletions examples/benchmark_rss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@

#include "clear_cache.hpp"

#include "core/par_matrix.hpp"
#include "core/par_vector.hpp"
#include "core/types.hpp"
#include "gallery/par_stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/par_matrix_IO.hpp"
#include "ruge_stuben/par_ruge_stuben_solver.hpp"
#include "external/hypre_wrapper.hpp"
#include "krylov/par_cg.hpp"
#include "raptor/core/par_matrix.hpp"
#include "raptor/core/par_vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/par_stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/par_matrix_IO.hpp"
#include "raptor/ruge_stuben/par_ruge_stuben_solver.hpp"
#include "raptor/external/hypre_wrapper.hpp"
#include "raptor/krylov/par_cg.hpp"

#ifdef USING_MFEM
#include "external/mfem_wrapper.hpp"
#include "raptorexternal/mfem_wrapper.hpp"
#endif

//using namespace raptor;
//
using namespace raptor;


void form_hypre_weights(std::vector<double>& weights, int n_rows)
{
Expand Down
17 changes: 9 additions & 8 deletions examples/benchmark_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@

#include "clear_cache.hpp"

#include "core/par_matrix.hpp"
#include "core/par_vector.hpp"
#include "core/types.hpp"
#include "gallery/par_stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/par_matrix_IO.hpp"
#include "ruge_stuben/par_ruge_stuben_solver.hpp"
#include "raptor/core/par_matrix.hpp"
#include "raptor/core/par_vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/par_stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/par_matrix_IO.hpp"
#include "raptor/ruge_stuben/par_ruge_stuben_solver.hpp"

#define eager_cutoff 8000
#define short_cutoff 496

using namespace raptor;
int main(int argc, char *argv[])
{

Expand Down
1 change: 1 addition & 0 deletions examples/benchmark_setup_sweeps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "clear_cache.hpp"

#include "raptor/raptor.hpp"
using namespace raptor;

int main(int argc, char* argv[])
{
Expand Down
18 changes: 10 additions & 8 deletions examples/benchmark_solve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@

#include "clear_cache.hpp"

#include "core/par_matrix.hpp"
#include "core/par_vector.hpp"
#include "core/types.hpp"
#include "gallery/par_stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/par_matrix_IO.hpp"
#include "ruge_stuben/par_ruge_stuben_solver.hpp"
#include "raptor/core/par_matrix.hpp"
#include "raptor/core/par_vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/par_stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/par_matrix_IO.hpp"
#include "raptor/ruge_stuben/par_ruge_stuben_solver.hpp"

#define eager_cutoff 8000
#define short_cutoff 496

using namespace raptor;

int main(int argc, char *argv[])
{

Expand Down
2 changes: 2 additions & 0 deletions examples/benchmark_spgemm_overlap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "raptor/raptor.hpp"

using namespace raptor;

int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
Expand Down
18 changes: 9 additions & 9 deletions examples/benchmark_spmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
#include "clear_cache.hpp"
#include <ctime>

#include "core/matrix.hpp"
#include "core/vector.hpp"
#include "core/types.hpp"
#include "gallery/stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/matrix_IO.hpp"

//using namespace raptor;
#include "raptor/core/matrix.hpp"
#include "raptor/core/vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/matrix_IO.hpp"

using namespace raptor;

double wtime()
{
Expand Down
2 changes: 2 additions & 0 deletions examples/benchmark_spmv_overlap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "raptor/raptor.hpp"

using namespace raptor;

int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
Expand Down
2 changes: 2 additions & 0 deletions examples/benchmark_tap_amg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

#include "raptor/raptor.hpp"

using namespace raptor;

void form_hypre_weights(double** weight_ptr, int n_rows)
{
int rank;
Expand Down
22 changes: 12 additions & 10 deletions examples/benchmark_tap_spgemm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@

#include "clear_cache.hpp"

#include "core/par_matrix.hpp"
#include "core/par_vector.hpp"
#include "core/types.hpp"
#include "gallery/par_stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/par_matrix_IO.hpp"
#include "multilevel/par_multilevel.hpp"
#include "ruge_stuben/par_ruge_stuben_solver.hpp"
#include "raptor/core/par_matrix.hpp"
#include "raptor/core/par_vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/par_stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/par_matrix_IO.hpp"
#include "raptor/multilevel/par_multilevel.hpp"
#include "raptor/ruge_stuben/par_ruge_stuben_solver.hpp"

#ifdef USING_MFEM
#include "external/mfem_wrapper.hpp"
#include "raptor/external/mfem_wrapper.hpp"
#endif

#define eager_cutoff 1000
#define short_cutoff 62

using namespace raptor;

void print_times(double time, double time_comm, const char* name)
{
int rank;
Expand Down
21 changes: 11 additions & 10 deletions examples/benchmark_tap_spmv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@

#include "clear_cache.hpp"

#include "core/par_matrix.hpp"
#include "core/par_vector.hpp"
#include "core/types.hpp"
#include "gallery/par_stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/par_matrix_IO.hpp"
#include "multilevel/par_multilevel.hpp"
#include "ruge_stuben/par_ruge_stuben_solver.hpp"
#include "raptor/core/par_matrix.hpp"
#include "raptor/core/par_vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/par_stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/par_matrix_IO.hpp"
#include "raptor/multilevel/par_multilevel.hpp"
#include "raptor/ruge_stuben/par_ruge_stuben_solver.hpp"

#ifdef USING_MFEM
#include "external/mfem_wrapper.hpp"
#include "raptor/external/mfem_wrapper.hpp"
#endif


#define eager_cutoff 1000
#define short_cutoff 62

using namespace raptor;

int main(int argc, char *argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion examples/clear_cache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <time.h>
#include <math.h>
#include <vector>
#include "core/types.hpp"
#include "raptor/core/types.hpp"

using namespace raptor;

Expand Down
2 changes: 2 additions & 0 deletions examples/coo_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// Include raptor
#include "raptor/raptor.hpp"

using namespace raptor;

// This example creates a random ParCSRMatrix
// All values are added into COO format and then converted.
// The example then performs a SpMV on this matrix
Expand Down
1 change: 1 addition & 0 deletions examples/csr_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// Include raptor
#include "raptor/raptor.hpp"

using namespace raptor;
// This example creates a random ParCSRMatrix
// All values are added directly into ParCSR format.
// The example then performs a SpMV on this matrix
Expand Down
2 changes: 2 additions & 0 deletions examples/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// Include raptor
#include "raptor/raptor.hpp"

using namespace raptor;

// This is a basic use case.
int main(int argc, char *argv[])
{
Expand Down
2 changes: 2 additions & 0 deletions examples/matop_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// Include raptor
#include "raptor/raptor.hpp"

using namespace raptor;

// This is a basic use case.
int main(int argc, char *argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion examples/model_tap_steps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "clear_cache.hpp"

#include "raptor/raptor.hpp"

using namespace raptor;

void time_AP(ParCSRMatrix* A, ParCSRMatrix* P, int n_tests, bool tap, const char* name)
{
Expand Down
1 change: 1 addition & 0 deletions examples/profile_amg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "raptor/raptor.hpp"

using namespace raptor;
int main(int argc, char* argv[])
{
MPI_Init(&argc, &argv);
Expand Down
20 changes: 10 additions & 10 deletions examples/profile_rss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@

#include "clear_cache.hpp"

#include "core/par_matrix.hpp"
#include "core/par_vector.hpp"
#include "core/types.hpp"
#include "gallery/par_stencil.hpp"
#include "gallery/laplacian27pt.hpp"
#include "gallery/diffusion.hpp"
#include "gallery/par_matrix_IO.hpp"
#include "multilevel/par_multilevel.hpp"
#include "ruge_stuben/par_ruge_stuben_solver.hpp"
#include "raptor/core/par_matrix.hpp"
#include "raptor/core/par_vector.hpp"
#include "raptor/core/types.hpp"
#include "raptor/gallery/par_stencil.hpp"
#include "raptor/gallery/laplacian27pt.hpp"
#include "raptor/gallery/diffusion.hpp"
#include "raptor/gallery/par_matrix_IO.hpp"
#include "raptor/multilevel/par_multilevel.hpp"
#include "raptor/ruge_stuben/par_ruge_stuben_solver.hpp"

#ifdef USING_MFEM
#include "external/mfem_wrapper.hpp"
#include "raptor/external/mfem_wrapper.hpp"
#endif

using namespace raptor;
Expand Down
1 change: 1 addition & 0 deletions examples/profile_tap_amg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "raptor/raptor.hpp"

using namespace raptor;

int main(int argc, char* argv[])
{
Expand Down
Loading

0 comments on commit b25f3b2

Please sign in to comment.