NEURON
test_solver.cpp File Reference
#include "coreneuron/apps/corenrn_parameters.hpp"
#include "coreneuron/gpu/nrn_acc_manager.hpp"
#include "coreneuron/permute/cellorder.hpp"
#include "coreneuron/permute/node_permute.h"
#include "coreneuron/sim/multicore.hpp"
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_vector.hpp>
#include <iostream>
#include <functional>
#include <map>
#include <random>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  SolverData
 
struct  ToyModelConfig
 
struct  SetupThreads
 

Enumerations

enum class  SolverImplementation {
  CellPermute0_CPU , CellPermute0_GPU , CellPermute1_CPU , CellPermute1_GPU ,
  CellPermute2_CPU , CellPermute2_GPU , CellPermute2_CUDA
}
 

Functions

std::ostream & operator<< (std::ostream &os, SolverImplementation impl)
 
template<typename... Args>
auto solve_and_dump (Args &&... args)
 
auto active_implementations ()
 
void compare_solver_data (std::map< SolverImplementation, std::vector< SolverData >> const &solver_data)
 
template<typename... Args>
auto compare_all_active_implementations (Args &&... args)
 
 TEST_CASE ("SingleCellAndThread", "[solver][single-thread]")
 
 TEST_CASE ("UnbalancedCellSingleThread", "[solver][single-thread]")
 
 TEST_CASE ("LargeCellSingleThread", "[solver][single-thread]")
 
 TEST_CASE ("ManySmallCellsSingleThread", "[solver][single-thread]")
 
 TEST_CASE ("ManySmallCellsMultiThread", "[solver][multi-thread]")
 
auto random_config ()
 
 TEST_CASE ("LargeCellSingleThreadRandom", "[solver][single-thread][random]")
 
 TEST_CASE ("ManySmallCellsSingleThreadRandom", "[solver][single-thread][random]")
 

Variables

constexpr auto magic_index_value = -2
 
constexpr auto magic_double_value = std::numeric_limits<double>::lowest()
 
constexpr double default_tolerance = 2e-11
 

Enumeration Type Documentation

◆ SolverImplementation

enum SolverImplementation
strong
Enumerator
CellPermute0_CPU 
CellPermute0_GPU 
CellPermute1_CPU 
CellPermute1_GPU 
CellPermute2_CPU 
CellPermute2_GPU 
CellPermute2_CUDA 

Definition at line 34 of file test_solver.cpp.

Function Documentation

◆ active_implementations()

auto active_implementations ( )

Definition at line 266 of file test_solver.cpp.

◆ compare_all_active_implementations()

template<typename... Args>
auto compare_all_active_implementations ( Args &&...  args)

Definition at line 306 of file test_solver.cpp.

◆ compare_solver_data()

void compare_solver_data ( std::map< SolverImplementation, std::vector< SolverData >> const &  solver_data)

Definition at line 281 of file test_solver.cpp.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
SolverImplementation  impl 
)

Definition at line 44 of file test_solver.cpp.

◆ random_config()

auto random_config ( )

Definition at line 357 of file test_solver.cpp.

◆ solve_and_dump()

template<typename... Args>
auto solve_and_dump ( Args &&...  args)

Definition at line 260 of file test_solver.cpp.

◆ TEST_CASE() [1/7]

TEST_CASE ( "LargeCellSingleThread"  ,
""  [solver][single-thread] 
)

Definition at line 338 of file test_solver.cpp.

◆ TEST_CASE() [2/7]

TEST_CASE ( "LargeCellSingleThreadRandom"  ,
""  [solver][single-thread][random] 
)

Definition at line 376 of file test_solver.cpp.

◆ TEST_CASE() [3/7]

TEST_CASE ( "ManySmallCellsMultiThread"  ,
""  [solver][multi-thread] 
)

Definition at line 350 of file test_solver.cpp.

◆ TEST_CASE() [4/7]

TEST_CASE ( "ManySmallCellsSingleThread"  ,
""  [solver][single-thread] 
)

Definition at line 344 of file test_solver.cpp.

◆ TEST_CASE() [5/7]

TEST_CASE ( "ManySmallCellsSingleThreadRandom"  ,
""  [solver][single-thread][random] 
)

Definition at line 382 of file test_solver.cpp.

◆ TEST_CASE() [6/7]

TEST_CASE ( "SingleCellAndThread"  ,
""  [solver][single-thread] 
)

Definition at line 319 of file test_solver.cpp.

◆ TEST_CASE() [7/7]

TEST_CASE ( "UnbalancedCellSingleThread"  ,
""  [solver][single-thread] 
)

Definition at line 332 of file test_solver.cpp.

Variable Documentation

◆ default_tolerance

constexpr double default_tolerance = 2e-11
constexpr

Definition at line 317 of file test_solver.cpp.

◆ magic_double_value

constexpr auto magic_double_value = std::numeric_limits<double>::lowest()
constexpr

Definition at line 32 of file test_solver.cpp.

◆ magic_index_value

constexpr auto magic_index_value = -2
constexpr

Definition at line 31 of file test_solver.cpp.