From d9f9948913f57d71d2a779b88d818c76d3dd513c Mon Sep 17 00:00:00 2001 From: Sam Yates <yates@cscs.ch> Date: Thu, 28 Sep 2017 13:54:02 +0200 Subject: [PATCH] Change nest::mc namespaces to arb (#362) Change nest::mc namespaces to arb --- lmorpho/lmorpho.cpp | 8 +- lmorpho/lsys_models.cpp | 2 +- lmorpho/lsystem.cpp | 12 +- lmorpho/lsystem.hpp | 2 +- lmorpho/morphio.cpp | 16 +-- lmorpho/morphio.hpp | 4 +- miniapp/io.cpp | 10 +- miniapp/io.hpp | 8 +- miniapp/miniapp.cpp | 2 +- miniapp/miniapp_recipes.cpp | 14 +- miniapp/miniapp_recipes.hpp | 6 +- miniapp/morphology_pool.cpp | 6 +- miniapp/morphology_pool.hpp | 6 +- miniapp/trace.cpp | 2 +- miniapp/trace.hpp | 4 +- modcc/backends/avx2.hpp | 12 +- modcc/backends/avx512.hpp | 5 +- modcc/backends/base.hpp | 7 +- modcc/cprinter.cpp | 8 +- modcc/cudaprinter.cpp | 48 +++---- modcc/modcc.cpp | 2 +- modcc/simd_printer.hpp | 2 +- scripts/print_backtrace | 2 +- src/algorithms.hpp | 6 +- src/backends.hpp | 6 +- src/backends/event.hpp | 6 +- src/backends/fvm.hpp | 10 +- src/backends/fvm_types.hpp | 6 +- src/backends/gpu/fill.cu | 6 +- src/backends/gpu/fill.hpp | 8 +- src/backends/gpu/fvm.cpp | 6 +- src/backends/gpu/fvm.hpp | 20 ++- src/backends/gpu/kernels/assemble_matrix.cu | 6 +- src/backends/gpu/kernels/detail.hpp | 6 +- src/backends/gpu/kernels/interleave.cu | 6 +- src/backends/gpu/kernels/interleave.hpp | 6 +- src/backends/gpu/kernels/reduce_by_key.hpp | 6 +- src/backends/gpu/kernels/solve_matrix.cu | 6 +- src/backends/gpu/kernels/stack.hpp | 6 +- src/backends/gpu/kernels/stim_current.cu | 6 +- src/backends/gpu/kernels/take_samples.cu | 6 +- src/backends/gpu/kernels/take_samples.hpp | 6 +- src/backends/gpu/kernels/test_thresholds.cu | 6 +- src/backends/gpu/kernels/test_thresholds.hpp | 6 +- src/backends/gpu/kernels/time_ops.cu | 6 +- src/backends/gpu/managed_ptr.hpp | 6 +- src/backends/gpu/matrix_state_flat.hpp | 6 +- src/backends/gpu/matrix_state_interleaved.hpp | 6 +- src/backends/gpu/multi_event_stream.cu | 6 +- src/backends/gpu/multi_event_stream.hpp | 14 +- src/backends/gpu/stack.hpp | 6 +- src/backends/gpu/stack_common.hpp | 6 +- src/backends/gpu/stim_current.hpp | 6 +- src/backends/gpu/stimulus.hpp | 8 +- src/backends/gpu/threshold_watcher.hpp | 6 +- src/backends/gpu/time_ops.hpp | 6 +- src/backends/multi_event_stream_state.hpp | 6 +- src/backends/multicore/fvm.cpp | 6 +- src/backends/multicore/fvm.hpp | 16 +-- src/backends/multicore/intrin.hpp | 6 +- src/backends/multicore/matrix_state.hpp | 6 +- src/backends/multicore/multi_event_stream.hpp | 24 ++-- src/backends/multicore/stimulus.hpp | 8 +- src/backends/multicore/threshold_watcher.hpp | 6 +- src/cell.cpp | 6 +- src/cell.hpp | 6 +- src/cell_group.hpp | 6 +- src/cell_group_factory.cpp | 6 +- src/cell_group_factory.hpp | 6 +- src/cell_tree.hpp | 8 +- src/common_types.hpp | 14 +- src/common_types_io.cpp | 2 +- src/communication/communicator.hpp | 6 +- src/communication/dryrun_global_policy.cpp | 6 +- src/communication/dryrun_global_policy.hpp | 6 +- src/communication/gathered_vector.hpp | 6 +- src/communication/global_policy.hpp | 14 +- src/communication/mpi.cpp | 6 +- src/communication/mpi.hpp | 6 +- src/communication/mpi_global_policy.hpp | 16 +-- src/communication/serial_global_policy.hpp | 6 +- src/compartment.hpp | 6 +- src/connection.hpp | 8 +- src/domain_decomposition.hpp | 8 +- src/dss_cell_description.hpp | 6 +- src/dss_cell_group.hpp | 6 +- src/event_binner.cpp | 6 +- src/event_binner.hpp | 6 +- src/event_queue.hpp | 20 ++- src/fvm_multicell.hpp | 12 +- src/generic_event.hpp | 14 +- src/hardware/affinity.cpp | 6 +- src/hardware/affinity.hpp | 6 +- src/hardware/gpu.cpp | 6 +- src/hardware/gpu.hpp | 6 +- src/hardware/memory.cpp | 6 +- src/hardware/memory.hpp | 6 +- src/hardware/node_info.cpp | 6 +- src/hardware/node_info.hpp | 6 +- src/hardware/power.cpp | 6 +- src/hardware/power.hpp | 6 +- src/helpers.hpp | 2 +- src/io/exporter.hpp | 6 +- src/io/exporter_spike_file.hpp | 6 +- src/ion.hpp | 6 +- src/load_balance.hpp | 6 +- src/math.hpp | 6 +- src/matrix.hpp | 6 +- src/mc_cell_group.hpp | 6 +- src/mechanism.hpp | 6 +- src/memory/allocator.hpp | 6 +- src/memory/array.hpp | 16 +-- src/memory/array_view.hpp | 6 +- src/memory/copy.hpp | 6 +- src/memory/definitions.hpp | 6 +- src/memory/device_coordinator.hpp | 8 +- src/memory/gpu.hpp | 6 +- src/memory/host_coordinator.hpp | 6 +- src/memory/memory.hpp | 6 +- src/memory/range_limits.hpp | 6 +- src/memory/util.hpp | 8 +- src/memory/wrappers.hpp | 6 +- src/model.cpp | 6 +- src/model.hpp | 6 +- src/morphology.cpp | 8 +- src/morphology.hpp | 6 +- src/parameter_list.cpp | 12 +- src/parameter_list.hpp | 12 +- src/partition_load_balance.cpp | 6 +- src/point.hpp | 8 +- src/profiling/memory_meter.cpp | 6 +- src/profiling/memory_meter.hpp | 6 +- src/profiling/meter.hpp | 6 +- src/profiling/meter_manager.cpp | 6 +- src/profiling/meter_manager.hpp | 8 +- src/profiling/power_meter.cpp | 6 +- src/profiling/power_meter.hpp | 6 +- src/profiling/profiler.cpp | 6 +- src/profiling/profiler.hpp | 14 +- src/recipe.hpp | 6 +- src/rss_cell.hpp | 6 +- src/rss_cell_group.hpp | 6 +- src/sampler_map.hpp | 6 +- src/sampling.hpp | 6 +- src/schedule.cpp | 6 +- src/schedule.hpp | 6 +- src/segment.hpp | 6 +- src/simple_sampler.hpp | 6 +- src/spike.hpp | 10 +- src/stimulus.hpp | 6 +- src/swcio.cpp | 6 +- src/swcio.hpp | 16 +-- src/thread_private_spike_store.hpp | 6 +- src/threading/cthread.cpp | 4 +- src/threading/cthread_impl.hpp | 26 ++-- src/threading/cthread_sort.hpp | 11 +- src/threading/serial.hpp | 10 +- src/threading/tbb.hpp | 8 +- src/threading/threading.cpp | 6 +- src/threading/threading.hpp | 6 +- src/threading/timer.hpp | 4 +- src/tinyopt.hpp | 6 +- src/tree.hpp | 6 +- src/util/any.hpp | 6 +- src/util/any_ptr.hpp | 6 +- src/util/config.hpp | 6 +- src/util/counter.hpp | 6 +- src/util/cycle.hpp | 6 +- src/util/debug.cpp | 6 +- src/util/debug.hpp | 12 +- src/util/double_buffer.hpp | 6 +- src/util/either.hpp | 6 +- src/util/file.hpp | 6 +- src/util/filter.hpp | 6 +- src/util/handle_set.hpp | 6 +- src/util/hostname.cpp | 6 +- src/util/hostname.hpp | 6 +- src/util/indirect.hpp | 6 +- src/util/ioutil.hpp | 6 +- src/util/iterutil.hpp | 6 +- src/util/make_unique.hpp | 6 +- src/util/meta.hpp | 6 +- src/util/nop.hpp | 6 +- src/util/optional.hpp | 6 +- src/util/partition.hpp | 6 +- src/util/partition_iterator.hpp | 6 +- src/util/path.cpp | 6 +- src/util/path.hpp | 8 +- src/util/pprintf.hpp | 6 +- src/util/range.hpp | 6 +- src/util/rangeutil.hpp | 6 +- src/util/scope_exit.hpp | 6 +- src/util/sentinel.hpp | 8 +- src/util/span.hpp | 6 +- src/util/strprintf.hpp | 6 +- src/util/transform.hpp | 6 +- src/util/uninitialized.hpp | 6 +- src/util/unique_any.hpp | 6 +- src/util/unwind.cpp | 12 +- src/util/unwind.hpp | 6 +- tests/common_cells.hpp | 6 +- tests/global_communication/mpi_listener.hpp | 6 +- tests/global_communication/test.cpp | 2 +- .../test_communicator.cpp | 2 +- .../test_domain_decomposition.cpp | 2 +- .../test_exporter_spike_file.cpp | 6 +- tests/global_communication/test_mpi.cpp | 4 +- tests/modcc/test_simd_backend.cpp | 2 +- tests/performance/io/disk_io.cpp | 2 +- tests/simple_recipes.hpp | 6 +- tests/ubench/accumulate_functor_values.cpp | 2 +- tests/ubench/cuda_reduce_by_key.cu | 2 +- tests/unit/stats.hpp | 2 +- tests/unit/test_algorithms.cpp | 122 +++++++++--------- tests/unit/test_any.cpp | 2 +- tests/unit/test_atomics.cu | 8 +- tests/unit/test_backend.cpp | 6 +- tests/unit/test_cell.cpp | 12 +- tests/unit/test_compartments.cpp | 14 +- tests/unit/test_counter.cpp | 2 +- tests/unit/test_cycle.cpp | 2 +- tests/unit/test_domain_decomposition.cpp | 2 +- tests/unit/test_double_buffer.cpp | 6 +- tests/unit/test_dss_cell_group.cpp | 2 +- tests/unit/test_either.cpp | 2 +- tests/unit/test_event_binner.cpp | 2 +- tests/unit/test_event_queue.cpp | 2 +- tests/unit/test_filter.cpp | 2 +- tests/unit/test_fvm_multi.cpp | 22 ++-- tests/unit/test_gpu_stack.cu | 4 +- tests/unit/test_intrin.cpp | 2 +- tests/unit/test_mask_stream.cpp | 2 +- tests/unit/test_math.cpp | 2 +- tests/unit/test_matrix.cpp | 4 +- tests/unit/test_matrix.cu | 2 +- tests/unit/test_mc_cell_group.cpp | 4 +- tests/unit/test_mc_cell_group.cu | 4 +- tests/unit/test_mechanisms.cpp | 40 +++--- tests/unit/test_multi_event_stream.cpp | 2 +- tests/unit/test_multi_event_stream.cu | 2 +- tests/unit/test_nop.cpp | 2 +- tests/unit/test_optional.cpp | 2 +- tests/unit/test_parameters.cpp | 4 +- tests/unit/test_partition.cpp | 2 +- tests/unit/test_path.cpp | 2 +- tests/unit/test_point.cpp | 2 +- tests/unit/test_probe.cpp | 4 +- tests/unit/test_range.cpp | 8 +- tests/unit/test_reduce_by_key.cu | 2 +- tests/unit/test_rss_cell.cpp | 2 +- tests/unit/test_schedule.cpp | 2 +- tests/unit/test_segment.cpp | 12 +- tests/unit/test_span.cpp | 2 +- tests/unit/test_spike_store.cpp | 8 +- tests/unit/test_spikes.cpp | 2 +- tests/unit/test_stimulus.cpp | 2 +- tests/unit/test_strprintf.cpp | 2 +- tests/unit/test_swcio.cpp | 18 +-- tests/unit/test_synapses.cpp | 8 +- tests/unit/test_transform.cpp | 2 +- tests/unit/test_tree.cpp | 10 +- tests/unit/test_uninitialized.cpp | 2 +- tests/unit/test_unique_any.cpp | 2 +- tests/unit/test_vector.cpp | 2 +- tests/unit/test_vector.cu | 2 +- tests/validation/convergence_test.hpp | 6 +- tests/validation/trace_analysis.cpp | 6 +- tests/validation/trace_analysis.hpp | 6 +- tests/validation/validate.cpp | 2 +- tests/validation/validate_ball_and_stick.cpp | 24 ++-- .../validate_compartment_policy.cpp | 2 +- tests/validation/validate_kinetic.cpp | 20 +-- tests/validation/validate_soma.cpp | 2 +- tests/validation/validate_synapses.cpp | 2 +- tests/validation/validation_data.cpp | 8 +- tests/validation/validation_data.hpp | 6 +- 276 files changed, 796 insertions(+), 1173 deletions(-) diff --git a/lmorpho/lmorpho.cpp b/lmorpho/lmorpho.cpp index 65f32009..418b67ad 100644 --- a/lmorpho/lmorpho.cpp +++ b/lmorpho/lmorpho.cpp @@ -13,10 +13,10 @@ #include "lsystem.hpp" #include "lsys_models.hpp" -namespace to = nest::mc::to; -using nest::mc::util::optional; -using nest::mc::util::nothing; -using nest::mc::util::just; +namespace to = arb::to; +using arb::util::optional; +using arb::util::nothing; +using arb::util::just; const char* usage_str = "[OPTION]...\n" diff --git a/lmorpho/lsys_models.cpp b/lmorpho/lsys_models.cpp index efc595f0..06cd740a 100644 --- a/lmorpho/lsys_models.cpp +++ b/lmorpho/lsys_models.cpp @@ -3,7 +3,7 @@ #include "lsystem.hpp" #include "lsys_models.hpp" -static constexpr double inf = nest::mc::math::infinity<double>(); +static constexpr double inf = arb::math::infinity<double>(); // Predefined parameters for two classes of neurons. Numbers taken primarily // from Ascoli et al. 2001, but some details (soma diameters for example) diff --git a/lmorpho/lsystem.cpp b/lmorpho/lsystem.cpp index 723caf43..a4baddd8 100644 --- a/lmorpho/lsystem.cpp +++ b/lmorpho/lsystem.cpp @@ -9,11 +9,11 @@ #include "lsystem.hpp" -using namespace nest::mc::math; +using namespace arb::math; -using nest::mc::section_geometry; -using nest::mc::section_point; -using nest::mc::morphology; +using arb::section_geometry; +using arb::section_point; +using arb::morphology; // L-system implementation. @@ -267,9 +267,9 @@ grow_result grow(section_tip tip, const lsys_sampler& S, Gen &g) { } } -nest::mc::morphology generate_morphology(const lsys_param& P, lsys_generator &g) { +arb::morphology generate_morphology(const lsys_param& P, lsys_generator &g) { constexpr quaternion xaxis = {0, 1, 0, 0}; - nest::mc::morphology morph; + arb::morphology morph; lsys_sampler S(P); double soma_radius = 0.5*S.diam_soma(g); diff --git a/lmorpho/lsystem.hpp b/lmorpho/lsystem.hpp index 6568e279..1feb6f0f 100644 --- a/lmorpho/lsystem.hpp +++ b/lmorpho/lsystem.hpp @@ -8,7 +8,7 @@ struct lsys_param; using lsys_generator = std::minstd_rand; -nest::mc::morphology generate_morphology(const lsys_param& P, lsys_generator& g); +arb::morphology generate_morphology(const lsys_param& P, lsys_generator& g); // The distribution parameters used in the specification of the L-system parameters. // The distribution can be a constant, uniform over an interval, or truncated normal. diff --git a/lmorpho/morphio.cpp b/lmorpho/morphio.cpp index 47fc16f7..dd9c3667 100644 --- a/lmorpho/morphio.cpp +++ b/lmorpho/morphio.cpp @@ -10,10 +10,10 @@ #include "morphio.hpp" -using nest::mc::io::swc_record; -using nest::mc::util::strprintf; +using arb::io::swc_record; +using arb::util::strprintf; -std::vector<swc_record> as_swc(const nest::mc::morphology& morph); +std::vector<swc_record> as_swc(const arb::morphology& morph); // Multi-file manager implementation. multi_file::multi_file(const std::string& pattern, int digits) { @@ -60,10 +60,10 @@ void multi_file::open(unsigned n) { // SWC transform -using nest::mc::io::swc_record; +using arb::io::swc_record; // TODO: Move this functionality to nestmc library. -std::vector<swc_record> as_swc(const nest::mc::morphology& morph) { +std::vector<swc_record> as_swc(const arb::morphology& morph) { using kind = swc_record::kind; std::map<int, int> parent_end_id; std::vector<swc_record> swc; @@ -112,7 +112,7 @@ std::vector<swc_record> as_swc(const nest::mc::morphology& morph) { // SWC emitter implementation. -void swc_emitter::operator()(unsigned index, const nest::mc::morphology& m) { +void swc_emitter::operator()(unsigned index, const arb::morphology& m) { file_.open(index); auto& stream = file_.stream(); @@ -123,7 +123,7 @@ void swc_emitter::operator()(unsigned index, const nest::mc::morphology& m) { // pvector emitter implementation. -std::vector<int> as_pvector(const nest::mc::morphology& morph, unsigned offset) { +std::vector<int> as_pvector(const arb::morphology& morph, unsigned offset) { std::map<int, unsigned> parent_index; // section id to segment index std::vector<int> pvec; unsigned index = offset; // starting segment index @@ -153,7 +153,7 @@ std::vector<int> as_pvector(const nest::mc::morphology& morph, unsigned offset) return pvec; } -void pvector_emitter::operator()(unsigned index, const nest::mc::morphology& m) { +void pvector_emitter::operator()(unsigned index, const arb::morphology& m) { auto pvec = as_pvector(m, offset_); if (coalesce_) offset_ += pvec.size(); diff --git a/lmorpho/morphio.hpp b/lmorpho/morphio.hpp index 87a80db2..0cc4f703 100644 --- a/lmorpho/morphio.hpp +++ b/lmorpho/morphio.hpp @@ -59,7 +59,7 @@ public: swc_emitter(swc_emitter&&) = default; // write `index`th morphology as SWC. - void operator()(unsigned index, const nest::mc::morphology& m); + void operator()(unsigned index, const arb::morphology& m); void close() { file_.close(); } ~swc_emitter() { close(); } @@ -85,7 +85,7 @@ public: pvector_emitter(pvector_emitter&&) = default; // write pvector for `index`th morphology. - void operator()(unsigned index, const nest::mc::morphology& m); + void operator()(unsigned index, const arb::morphology& m); void close() { file_.close(); } ~pvector_emitter() { close(); } diff --git a/miniapp/io.cpp b/miniapp/io.cpp index 631ff9e5..2fcee0ca 100644 --- a/miniapp/io.cpp +++ b/miniapp/io.cpp @@ -21,13 +21,12 @@ namespace TCLAP { template <typename V> - struct ArgTraits<nest::mc::util::optional<V>> { + struct ArgTraits<arb::util::optional<V>> { using ValueCategory = ValueLike; }; } // namespace TCLAP -namespace nest { -namespace mc { +namespace arb { namespace util { // Using static here because we do not want external linkage for this operator. @@ -433,7 +432,7 @@ std::vector<time_type> parse_spike_times_from_stream(std::ifstream & fid) { /// /// Returns a vector of time_type -std::vector<time_type> get_parsed_spike_times_from_path(nest::mc::util::path path) { +std::vector<time_type> get_parsed_spike_times_from_path(arb::util::path path) { std::ifstream fid(path); if (!fid) { throw std::runtime_error(util::strprintf( @@ -444,5 +443,4 @@ std::vector<time_type> get_parsed_spike_times_from_path(nest::mc::util::path pat } } // namespace io -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/miniapp/io.hpp b/miniapp/io.hpp index 8dbda791..a7823466 100644 --- a/miniapp/io.hpp +++ b/miniapp/io.hpp @@ -11,8 +11,7 @@ #include <util/optional.hpp> #include <util/path.hpp> -namespace nest { -namespace mc { +namespace arb { namespace io { // Holds the options for a simulation run. @@ -90,8 +89,7 @@ cl_options read_options(int argc, char** argv, bool allow_write = true); /// Spike times are expected to be in milli seconds floating points /// On spike-time per line -std::vector<time_type> get_parsed_spike_times_from_path(nest::mc::util::path path); +std::vector<time_type> get_parsed_spike_times_from_path(arb::util::path path); } // namespace io -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/miniapp/miniapp.cpp b/miniapp/miniapp.cpp index 66b0ff2e..08a759d1 100644 --- a/miniapp/miniapp.cpp +++ b/miniapp/miniapp.cpp @@ -32,7 +32,7 @@ #include "miniapp_recipes.hpp" #include "trace.hpp" -using namespace nest::mc; +using namespace arb; using util::any_cast; using util::make_span; diff --git a/miniapp/miniapp_recipes.cpp b/miniapp/miniapp_recipes.cpp index a2039a7e..91384d47 100644 --- a/miniapp/miniapp_recipes.cpp +++ b/miniapp/miniapp_recipes.cpp @@ -14,8 +14,7 @@ #include "morphology_pool.hpp" -namespace nest { -namespace mc { +namespace arb { // TODO: split cell description into separate morphology, stimulus, mechanisms etc. // description for greater data reuse. @@ -28,7 +27,7 @@ cell make_basic_cell( const std::string& syn_type, RNG& rng) { - nest::mc::cell cell = make_cell(morph, true); + arb::cell cell = make_cell(morph, true); for (auto& segment: cell.segments()) { if (compartments_per_segment!=0) { @@ -38,12 +37,12 @@ cell make_basic_cell( } if (segment->is_dendrite()) { - segment->add_mechanism(mc::pas_parameters()); + segment->add_mechanism(pas_parameters()); segment->mechanism("membrane").set("r_L", 100); } } - cell.soma()->add_mechanism(mc::hh_parameters()); + cell.soma()->add_mechanism(hh_parameters()); cell.add_detector({0,0}, 20); auto distribution = std::uniform_real_distribution<float>(0.f, 1.0f); @@ -63,7 +62,7 @@ cell make_basic_cell( EXPECTS(!terminals.empty()); - nest::mc::parameter_list syn_default(syn_type); + arb::parameter_list syn_default(syn_type); for (unsigned i=0; i<num_synapses; ++i) { unsigned id = terminals[i%terminals.size()]; cell.add_synapse({id, distribution(rng)}, syn_default); @@ -357,5 +356,4 @@ std::unique_ptr<recipe> make_basic_kgraph_recipe( return std::unique_ptr<recipe>(new basic_kgraph_recipe(ncell, param, pdist)); } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/miniapp/miniapp_recipes.hpp b/miniapp/miniapp_recipes.hpp index bb3c5240..729be3a1 100644 --- a/miniapp/miniapp_recipes.hpp +++ b/miniapp/miniapp_recipes.hpp @@ -11,8 +11,7 @@ // miniapp-specific recipes -namespace nest { -namespace mc { +namespace arb { struct probe_distribution { float proportion = 1.f; // what proportion of cells should get probes? @@ -61,5 +60,4 @@ std::unique_ptr<recipe> make_basic_rgraph_recipe( basic_recipe_param param, probe_distribution pdist = probe_distribution{}); -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/miniapp/morphology_pool.cpp b/miniapp/morphology_pool.cpp index 68f3a617..aeda5436 100644 --- a/miniapp/morphology_pool.cpp +++ b/miniapp/morphology_pool.cpp @@ -8,8 +8,7 @@ #include "morphology_pool.hpp" -namespace nest { -namespace mc { +namespace arb { static morphology make_basic_y_morphology() { morphology morph; @@ -52,5 +51,4 @@ void load_swc_morphology_glob(morphology_pool& pool, const std::string& swc_patt } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/miniapp/morphology_pool.hpp b/miniapp/morphology_pool.hpp index 30eadcc0..34fb01c8 100644 --- a/miniapp/morphology_pool.hpp +++ b/miniapp/morphology_pool.hpp @@ -11,8 +11,7 @@ #include <morphology.hpp> #include <util/path.hpp> -namespace nest { -namespace mc { +namespace arb { class morphology_pool { std::shared_ptr<std::vector<morphology>> pool; @@ -38,5 +37,4 @@ extern morphology_pool default_morphology_pool; void load_swc_morphology(morphology_pool& pool, const util::path& swc_path); void load_swc_morphology_glob(morphology_pool& pool, const std::string& pattern); -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/miniapp/trace.cpp b/miniapp/trace.cpp index 32903c75..b834ed40 100644 --- a/miniapp/trace.cpp +++ b/miniapp/trace.cpp @@ -8,7 +8,7 @@ #include "trace.hpp" -using namespace nest::mc; +using namespace arb; static std::string to_string(cell_member_type m) { return std::to_string(m.gid)+"."+std::to_string(m.index); diff --git a/miniapp/trace.hpp b/miniapp/trace.hpp index 8bb5bf66..af42528d 100644 --- a/miniapp/trace.hpp +++ b/miniapp/trace.hpp @@ -11,10 +11,10 @@ #include <simple_sampler.hpp> struct sample_trace { - nest::mc::cell_member_type probe_id; + arb::cell_member_type probe_id; std::string name; std::string units; - nest::mc::trace_data<double> samples; + arb::trace_data<double> samples; }; void write_trace_csv(const sample_trace& trace, const std::string& prefix); diff --git a/modcc/backends/avx2.hpp b/modcc/backends/avx2.hpp index 7aebf61d..081b3fe2 100644 --- a/modcc/backends/avx2.hpp +++ b/modcc/backends/avx2.hpp @@ -7,9 +7,7 @@ #include "backends/base.hpp" #include "util/compat.hpp" - -namespace nest { -namespace mc { +namespace arb { namespace modcc { // Specialize for the different architectures @@ -79,7 +77,7 @@ struct simd_intrinsics<targetKind::avx2> { tb << "_mm256_exp_pd("; } else { - tb << "nest::mc::multicore::nmc_mm256_exp_pd("; + tb << "arb::multicore::nmc_mm256_exp_pd("; } break; case tok::log: @@ -87,7 +85,7 @@ struct simd_intrinsics<targetKind::avx2> { tb << "_mm256_log_pd("; } else { - tb << "nest::mc::multicore::nmc_mm256_log_pd("; + tb << "arb::multicore::nmc_mm256_log_pd("; } break; default: @@ -104,7 +102,7 @@ struct simd_intrinsics<targetKind::avx2> { tb << "_mm256_pow_pd("; } else { - tb << "nest::mc::multicore::nmc_mm256_pow_pd("; + tb << "arb::multicore::nmc_mm256_pow_pd("; } emit_operands(tb, arg_emitter(base), arg_emitter(exp)); @@ -203,4 +201,4 @@ private: int simd_intrinsics<targetKind::avx2>::varcnt = 0; const std::string simd_intrinsics<targetKind::avx2>::varprefix = "_r"; -}}} // closing namespaces +}} // closing namespaces diff --git a/modcc/backends/avx512.hpp b/modcc/backends/avx512.hpp index f1c7fce1..024c220a 100644 --- a/modcc/backends/avx512.hpp +++ b/modcc/backends/avx512.hpp @@ -7,8 +7,7 @@ #include "backends/base.hpp" -namespace nest { -namespace mc { +namespace arb { namespace modcc { // Specialize for the different architectures @@ -148,4 +147,4 @@ struct simd_intrinsics<targetKind::avx512> { } }; -}}} // closing namespaces +}} // closing namespaces diff --git a/modcc/backends/base.hpp b/modcc/backends/base.hpp index c5d0fdf4..cee812e8 100644 --- a/modcc/backends/base.hpp +++ b/modcc/backends/base.hpp @@ -13,11 +13,10 @@ #include "textbuffer.hpp" #include "util/meta.hpp" -namespace nest { -namespace mc { +namespace arb { namespace modcc { -using nest::mc::util::enable_if_t; +using arb::util::enable_if_t; using operand_fn_t = std::function<void(TextBuffer&)>; static void emit_operands(TextBuffer& tb, operand_fn_t emitter) { @@ -88,4 +87,4 @@ struct simd_intrinsics { static bool has_scatter(); }; -}}} // closing namespaces +}} // closing namespaces diff --git a/modcc/cprinter.cpp b/modcc/cprinter.cpp index bfac874a..3559e327 100644 --- a/modcc/cprinter.cpp +++ b/modcc/cprinter.cpp @@ -43,7 +43,7 @@ std::string CPrinter::emit_source() { ////////////////////////////////////////////// std::string class_name = "mechanism_" + module_name; - text_.add_line("namespace nest{ namespace mc{ namespace multicore {"); + text_.add_line("namespace arb { namespace multicore {"); text_.add_line(); text_.add_line("template<class Backend>"); text_.add_line("class " + class_name + " : public mechanism<Backend> {"); @@ -267,7 +267,7 @@ std::string CPrinter::emit_source() { }; text_.add_line("void set_ion(ionKind k, ion_type& i, std::vector<size_type>const& index) override {"); text_.increase_indentation(); - text_.add_line("using nest::mc::algorithms::index_into;"); + text_.add_line("using arb::algorithms::index_into;"); if(has_ion(ionKind::Na)) { auto ion = find_ion(ionKind::Na); text_.add_line("if(k==ionKind::na) {"); @@ -307,7 +307,7 @@ std::string CPrinter::emit_source() { text_.decrease_indentation(); text_.add_line("}"); } - text_.add_line("throw std::domain_error(nest::mc::util::pprintf(\"mechanism % does not support ion type\\n\", name()));"); + text_.add_line("throw std::domain_error(arb::util::pprintf(\"mechanism % does not support ion type\\n\", name()));"); text_.decrease_indentation(); text_.add_line("}"); text_.add_line(); @@ -392,7 +392,7 @@ std::string CPrinter::emit_source() { text_.add_line("};"); text_.add_line(); - text_.add_line("}}} // namespaces"); + text_.add_line("}} // namespaces"); return text_.str(); } diff --git a/modcc/cudaprinter.cpp b/modcc/cudaprinter.cpp index 08e5f090..3eeecf84 100644 --- a/modcc/cudaprinter.cpp +++ b/modcc/cudaprinter.cpp @@ -48,7 +48,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().add_line("#include <backends/gpu/kernels/detail.hpp>"); buffer().add_line(); - buffer().add_line("namespace nest{ namespace mc{ namespace gpu{"); + buffer().add_line("namespace arb { namespace gpu{"); buffer().add_line("using deliverable_event_stream_state = multi_event_stream_state<deliverable_event_data>;"); buffer().add_line(); @@ -57,8 +57,8 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().add_gutter() << "struct " << pack_name() << " {"; buffer().end_line(); buffer().increase_indentation(); - buffer().add_line("using T = nest::mc::fvm_value_type;"); - buffer().add_line("using I = nest::mc::fvm_size_type;"); + buffer().add_line("using T = arb::fvm_value_type;"); + buffer().add_line("using I = arb::fvm_size_type;"); buffer().add_line("// array parameters"); for(auto const &var: array_variables) { buffer().add_line("T* " + var->name() + ";"); @@ -116,11 +116,11 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) } else if (var.second->is_net_receive()) { buffer().add_line( - "void deliver_events_" + module_name_ +"(" + pack_name() + " params_, nest::mc::fvm_size_type mech_id, deliverable_event_stream_state state);"); + "void deliver_events_" + module_name_ +"(" + pack_name() + " params_, arb::fvm_size_type mech_id, deliverable_event_stream_state state);"); } } buffer().add_line(); - buffer().add_line("}}} // namespace nest::mc::gpu"); + buffer().add_line("}} // namespace arb::gpu"); // // Implementation @@ -134,7 +134,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().add_line("#include <backends/gpu/intrinsics.hpp>"); buffer().add_line("#include <backends/gpu/kernels/reduce_by_key.hpp>"); buffer().add_line(); - buffer().add_line("namespace nest{ namespace mc{ namespace gpu{"); + buffer().add_line("namespace arb { namespace gpu{"); buffer().add_line("namespace kernels {"); buffer().increase_indentation(); { @@ -174,25 +174,25 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().add_line("constexpr int blockwidth = 128;"); buffer().add_line("dim3 dim_block(blockwidth);"); buffer().add_line("dim3 dim_grid(impl::block_count(n, blockwidth));"); - buffer().add_line("nest::mc::gpu::kernels::"+e->name()+"_"+module_name_+"<<<dim_grid, dim_block>>>(params_);"); + buffer().add_line("arb::gpu::kernels::"+e->name()+"_"+module_name_+"<<<dim_grid, dim_block>>>(params_);"); buffer().decrease_indentation(); buffer().add_line("}"); buffer().add_line(); } else if (var.second->is_net_receive()) { buffer().add_line("void deliver_events_" + module_name_ - + "(" + pack_name() + " params_, nest::mc::fvm_size_type mech_id, deliverable_event_stream_state state) {"); + + "(" + pack_name() + " params_, arb::fvm_size_type mech_id, deliverable_event_stream_state state) {"); buffer().increase_indentation(); buffer().add_line("const int n = state.n;"); buffer().add_line("constexpr int blockwidth = 128;"); buffer().add_line("const auto nblock = impl::block_count(n, blockwidth);"); - buffer().add_line("nest::mc::gpu::kernels::deliver_events<<<nblock, blockwidth>>>(params_, mech_id, state);"); + buffer().add_line("arb::gpu::kernels::deliver_events<<<nblock, blockwidth>>>(params_, mech_id, state);"); buffer().decrease_indentation(); buffer().add_line("}"); buffer().add_line(); } } - buffer().add_line("}}} // namespace nest::mc::gpu"); + buffer().add_line("}} // namespace arb::gpu"); // // Interface header @@ -217,7 +217,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().add_line("#include \"" + module_name_ + "_impl.hpp\""); buffer().add_line(); - buffer().add_line("namespace nest{ namespace mc{ namespace gpu{"); + buffer().add_line("namespace arb { namespace gpu{"); buffer().add_line(); ////////////////////////////////////////////// @@ -448,7 +448,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) }; buffer().add_line("void set_ion(ionKind k, ion_type& i, const std::vector<size_type>& index) override {"); buffer().increase_indentation(); - buffer().add_line("using nest::mc::algorithms::index_into;"); + buffer().add_line("using arb::algorithms::index_into;"); if(has_ion(ionKind::Na)) { auto ion = find_ion(ionKind::Na); buffer().add_line("if(k==ionKind::na) {"); @@ -488,7 +488,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().decrease_indentation(); buffer().add_line("}"); } - buffer().add_line("throw std::domain_error(nest::mc::util::pprintf(\"mechanism % does not support ion type\\n\", name()));"); + buffer().add_line("throw std::domain_error(arb::util::pprintf(\"mechanism % does not support ion type\\n\", name()));"); buffer().decrease_indentation(); buffer().add_line("}"); buffer().add_line(); @@ -504,7 +504,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) auto name = proc->name(); buffer().add_line("void " + name + "() {"); buffer().increase_indentation(); - buffer().add_line("nest::mc::gpu::"+name+"_"+module_name_+"(param_pack_);"); + buffer().add_line("arb::gpu::"+name+"_"+module_name_+"(param_pack_);"); buffer().decrease_indentation(); buffer().add_line("}"); buffer().add_line(); @@ -516,7 +516,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().add_line("void deliver_events(const deliverable_event_stream_state& events) override {"); buffer().increase_indentation(); - buffer().add_line("nest::mc::gpu::deliver_events_"+module_name_ + buffer().add_line("arb::gpu::deliver_events_"+module_name_ +"(param_pack_, mech_id_, events);"); buffer().decrease_indentation(); @@ -559,7 +559,7 @@ CUDAPrinter::CUDAPrinter(Module &m, bool o) buffer().decrease_indentation(); buffer().add_line("};"); buffer().add_line(); - buffer().add_line("}}} // namespaces"); + buffer().add_line("}} // namespaces"); } void CUDAPrinter::visit(Expression *e) { @@ -736,7 +736,7 @@ void CUDAPrinter::print_device_function_prototype(ProcedureExpression *e) { << "(" << module_->name() << "_ParamPack const& params_," << "const int tid_"; for(auto& arg : e->args()) { - buffer() << ", nest::mc::fvm_value_type " << arg->is_argument()->name(); + buffer() << ", arb::fvm_value_type " << arg->is_argument()->name(); } buffer() << ")"; } @@ -758,7 +758,7 @@ void CUDAPrinter::visit(ProcedureExpression *e) { // print body buffer().increase_indentation(); - buffer().add_line("using value_type = nest::mc::fvm_value_type;"); + buffer().add_line("using value_type = arb::fvm_value_type;"); buffer().add_line(); e->body()->accept(this); @@ -774,11 +774,11 @@ void CUDAPrinter::visit(ProcedureExpression *e) { // Core `net_receive` kernel is called device-side from `kernel::deliver_events`. buffer().add_line( "__device__"); buffer().add_gutter() << "void net_receive(const " << module_->name() << "_ParamPack& params_, " - << "nest::mc::fvm_size_type i_, nest::mc::fvm_value_type weight) {"; + << "arb::fvm_size_type i_, arb::fvm_value_type weight) {"; buffer().add_line(); buffer().increase_indentation(); - buffer().add_line("using value_type = nest::mc::fvm_value_type;"); + buffer().add_line("using value_type = arb::fvm_value_type;"); buffer().add_line(); buffer().add_line("auto tid_ = i_;"); @@ -797,7 +797,7 @@ void CUDAPrinter::visit(ProcedureExpression *e) { buffer().add_line( "__global__"); buffer().add_gutter() << "void net_receive_global(" << module_->name() << "_ParamPack params_, " - << "nest::mc::fvm_size_type i_, nest::mc::fvm_value_type weight) {"; + << "arb::fvm_size_type i_, arb::fvm_value_type weight) {"; buffer().add_line(); buffer().increase_indentation(); @@ -811,7 +811,7 @@ void CUDAPrinter::visit(ProcedureExpression *e) { buffer().add_line( "__global__"); buffer().add_gutter() << "void deliver_events(" << module_->name() << "_ParamPack params_, " - << "nest::mc::fvm_size_type mech_id, deliverable_event_stream_state state) {"; + << "arb::fvm_size_type mech_id, deliverable_event_stream_state state) {"; buffer().add_line(); buffer().increase_indentation(); @@ -861,7 +861,7 @@ void CUDAPrinter::visit(APIMethod *e) { } buffer().increase_indentation(); - buffer().add_line("using value_type = nest::mc::fvm_value_type;"); + buffer().add_line("using value_type = arb::fvm_value_type;"); buffer().add_line(); buffer().add_line("auto tid_ = threadIdx.x + blockDim.x*blockIdx.x;"); @@ -943,7 +943,7 @@ void CUDAPrinter::print_APIMethod_body(ProcedureExpression* e) { in->accept(this); } else { - buffer() << "nest::mc::gpu::reduce_by_key("; + buffer() << "arb::gpu::reduce_by_key("; if (out->op()==tok::minus) buffer() << "-"; in->accept(this); // reduce_by_key() takes a pointer to the start of the target diff --git a/modcc/modcc.cpp b/modcc/modcc.cpp index a588638b..7ff7a0ac 100644 --- a/modcc/modcc.cpp +++ b/modcc/modcc.cpp @@ -15,7 +15,7 @@ #include "simd_printer.hpp" -using namespace nest::mc; +using namespace arb; //#define VERBOSE diff --git a/modcc/simd_printer.hpp b/modcc/simd_printer.hpp index ef1a0e3f..03f2957c 100644 --- a/modcc/simd_printer.hpp +++ b/modcc/simd_printer.hpp @@ -16,7 +16,7 @@ #endif -using namespace nest::mc; +using namespace arb; template<targetKind Arch> class SimdPrinter : public CPrinter { diff --git a/scripts/print_backtrace b/scripts/print_backtrace index 296b78e1..bca8a5bc 100755 --- a/scripts/print_backtrace +++ b/scripts/print_backtrace @@ -65,7 +65,7 @@ def get_function_name(location, executable): def unmangle(mangled): unmangled = os.popen('c++filt ' + mangled).read().strip() - return unmangled.replace('nest::mc::', '') + return unmangled.replace('arb::', '') # # main diff --git a/src/algorithms.hpp b/src/algorithms.hpp index 22325d22..da3de60f 100644 --- a/src/algorithms.hpp +++ b/src/algorithms.hpp @@ -21,8 +21,7 @@ * */ -namespace nest { -namespace mc { +namespace arb { namespace algorithms { template <typename C> @@ -417,5 +416,4 @@ auto binary_find(Seq& seq, const T& value) } } // namespace algorithms -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends.hpp b/src/backends.hpp index 9f97d1d5..b4d9c1b3 100644 --- a/src/backends.hpp +++ b/src/backends.hpp @@ -3,8 +3,7 @@ #include <string> #include <backends/fvm.hpp> -namespace nest { -namespace mc { +namespace arb { enum class backend_kind { multicore, // use multicore backend for all computation @@ -21,5 +20,4 @@ inline std::string to_string(backend_kind p) { return "unknown"; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/event.hpp b/src/backends/event.hpp index efcb673d..f6abfdfa 100644 --- a/src/backends/event.hpp +++ b/src/backends/event.hpp @@ -6,8 +6,7 @@ // Structures for the representation of event delivery targets and // staged events. -namespace nest { -namespace mc { +namespace arb { // Post-synaptic spike events @@ -74,5 +73,4 @@ inline cell_size_type event_index(const sample_event& ev) { } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/fvm.hpp b/src/backends/fvm.hpp index 7b94edb5..d85f69c4 100644 --- a/src/backends/fvm.hpp +++ b/src/backends/fvm.hpp @@ -2,8 +2,7 @@ #include <backends/multicore/fvm.hpp> -namespace nest { -namespace mc { +namespace arb { // A null back end used as a placeholder for back ends that are not supported // on the target platform. @@ -33,13 +32,12 @@ struct null_backend: public multicore::backend { } }; -} // namespace mc -} // namespace nest +} // namespace arb #ifdef NMC_HAVE_GPU #include <backends/gpu/fvm.hpp> #else -namespace nest { namespace mc { namespace gpu { +namespace arb { namespace gpu { using backend = null_backend; -}}} // namespace nest::mc::gpu +}} // namespace arb::gpu #endif diff --git a/src/backends/fvm_types.hpp b/src/backends/fvm_types.hpp index 71dfcbfa..5252afb0 100644 --- a/src/backends/fvm_types.hpp +++ b/src/backends/fvm_types.hpp @@ -4,11 +4,9 @@ // Basic types shared across FVM implementations/backends. -namespace nest { -namespace mc { +namespace arb { using fvm_value_type = double; using fvm_size_type = cell_local_size_type; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/fill.cu b/src/backends/gpu/fill.cu index f82f1d8e..4ac9b417 100644 --- a/src/backends/gpu/fill.cu +++ b/src/backends/gpu/fill.cu @@ -1,7 +1,6 @@ #include <cstdint> -namespace nest { -namespace mc { +namespace arb { namespace gpu { template <typename T, typename I> @@ -39,5 +38,4 @@ void fill64(uint64_t* v, uint64_t value, std::size_t n) { }; } // namespace gpu -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/backends/gpu/fill.hpp b/src/backends/gpu/fill.hpp index 4b1447fc..c118c139 100644 --- a/src/backends/gpu/fill.hpp +++ b/src/backends/gpu/fill.hpp @@ -6,8 +6,7 @@ // prototypes for compiled wrappers around fill kernels for GPU memory // -namespace nest { -namespace mc { +namespace arb { namespace gpu { void fill8(uint8_t* v, uint8_t value, std::size_t n); @@ -43,7 +42,7 @@ fill(T* ptr, T value, std::size_t n) { \ sizeof(T), \ reinterpret_cast<char*>(&v) \ ); \ - nest::mc::gpu::fill ## N(reinterpret_cast<I*>(ptr), v, n); \ + arb::gpu::fill ## N(reinterpret_cast<I*>(ptr), v, n); \ } FILL(8) @@ -52,5 +51,4 @@ FILL(32) FILL(64) } // namespace gpu -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/backends/gpu/fvm.cpp b/src/backends/gpu/fvm.cpp index 291722e8..c1d98df5 100644 --- a/src/backends/gpu/fvm.cpp +++ b/src/backends/gpu/fvm.cpp @@ -7,8 +7,7 @@ #include <mechanisms/gpu/test_kin1.hpp> #include <mechanisms/gpu/test_kinlva.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { std::map<std::string, backend::maker_type> @@ -22,5 +21,4 @@ backend::mech_map_ = { }; } // namespace multicore -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/fvm.hpp b/src/backends/gpu/fvm.hpp index ac439785..ebdf9961 100644 --- a/src/backends/gpu/fvm.hpp +++ b/src/backends/gpu/fvm.hpp @@ -18,8 +18,7 @@ #include "threshold_watcher.hpp" #include "time_ops.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { struct backend { @@ -61,8 +60,8 @@ struct backend { using matrix_state = matrix_state_interleaved<value_type, size_type>; // backend-specific multi event streams. - using deliverable_event_stream = nest::mc::gpu::multi_event_stream<deliverable_event>; - using sample_event_stream = nest::mc::gpu::multi_event_stream<sample_event>; + using deliverable_event_stream = arb::gpu::multi_event_stream<deliverable_event>; + using sample_event_stream = arb::gpu::multi_event_stream<sample_event>; // mechanism infrastructure using ion_type = ion<backend>; @@ -92,7 +91,7 @@ struct backend { return mech_map_.count(name)>0; } - using threshold_watcher = nest::mc::gpu::threshold_watcher; + using threshold_watcher = arb::gpu::threshold_watcher; // perform min/max reductions on 'array' type template <typename V> @@ -115,7 +114,7 @@ struct backend { } static void update_time_to(array& time_to, const_view time, value_type dt, value_type tmax) { - nest::mc::gpu::update_time_to(time_to.size(), time_to.data(), time.data(), dt, tmax); + arb::gpu::update_time_to(time_to.size(), time_to.data(), time.data(), dt, tmax); } // set the per-cell and per-compartment dt_ from time_to_ - time_. @@ -123,7 +122,7 @@ struct backend { size_type ncell = util::size(dt_cell); size_type ncomp = util::size(dt_comp); - nest::mc::gpu::set_dt( + arb::gpu::set_dt( ncell, ncomp, dt_cell.data(), dt_comp.data(), time_to.data(), time.data(), cv_to_cell.data()); } @@ -134,7 +133,7 @@ struct backend { array& sample_time, array& sample_value) { - nest::mc::gpu::take_samples(s, time.data(), sample_time.data(), sample_value.data()); + arb::gpu::take_samples(s, time.data(), sample_time.data(), sample_value.data()); } private: @@ -143,11 +142,10 @@ private: template <template <typename> class Mech> static mechanism maker(size_type mech_id, const_iview vec_ci, const_view vec_t, const_view vec_t_to, const_view vec_dt, view vec_v, view vec_i, array&& weights, iarray&& node_indices) { - return nest::mc::make_mechanism<Mech<backend>> + return arb::make_mechanism<Mech<backend>> (mech_id, vec_ci, vec_t, vec_t_to, vec_dt, vec_v, vec_i, std::move(weights), std::move(node_indices)); } }; } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/assemble_matrix.cu b/src/backends/gpu/kernels/assemble_matrix.cu index c6bd144d..a609079d 100644 --- a/src/backends/gpu/kernels/assemble_matrix.cu +++ b/src/backends/gpu/kernels/assemble_matrix.cu @@ -2,8 +2,7 @@ #include "detail.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace kernels { @@ -194,5 +193,4 @@ void assemble_matrix_interleaved( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/detail.hpp b/src/backends/gpu/kernels/detail.hpp index 15d08a6f..454dfe21 100644 --- a/src/backends/gpu/kernels/detail.hpp +++ b/src/backends/gpu/kernels/detail.hpp @@ -11,8 +11,7 @@ # define HOST_DEVICE_IF_CUDA #endif -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace impl { @@ -89,5 +88,4 @@ inline T lerp(T a, T b, T u) { } // namespace impl } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/interleave.cu b/src/backends/gpu/kernels/interleave.cu index cea3c723..4bf923f7 100644 --- a/src/backends/gpu/kernels/interleave.cu +++ b/src/backends/gpu/kernels/interleave.cu @@ -2,8 +2,7 @@ #include "detail.hpp" #include "interleave.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { // host side wrapper for the flat to interleaved operation @@ -41,5 +40,4 @@ void interleaved_to_flat( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/interleave.hpp b/src/backends/gpu/kernels/interleave.hpp index e6c85593..76e41af6 100644 --- a/src/backends/gpu/kernels/interleave.hpp +++ b/src/backends/gpu/kernels/interleave.hpp @@ -2,8 +2,7 @@ #include "detail.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { /////////////////////////////////////////////////////////////////////////////// @@ -148,6 +147,5 @@ void interleaved_to_flat( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/reduce_by_key.hpp b/src/backends/gpu/kernels/reduce_by_key.hpp index 1b34d7c1..0d4627e5 100644 --- a/src/backends/gpu/kernels/reduce_by_key.hpp +++ b/src/backends/gpu/kernels/reduce_by_key.hpp @@ -3,8 +3,7 @@ #include <cstdint> #include "detail.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace impl{ @@ -128,5 +127,4 @@ void reduce_by_key(T contribution, T* target, I idx) { } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/solve_matrix.cu b/src/backends/gpu/kernels/solve_matrix.cu index 45558fa0..30026e9f 100644 --- a/src/backends/gpu/kernels/solve_matrix.cu +++ b/src/backends/gpu/kernels/solve_matrix.cu @@ -3,8 +3,7 @@ #include "detail.hpp" #include <backends/fvm_types.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace kernels { @@ -118,5 +117,4 @@ void solve_matrix_interleaved( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/stack.hpp b/src/backends/gpu/kernels/stack.hpp index d303144b..b20f18c3 100644 --- a/src/backends/gpu/kernels/stack.hpp +++ b/src/backends/gpu/kernels/stack.hpp @@ -2,8 +2,7 @@ #include "../stack_common.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { template <typename T> @@ -27,5 +26,4 @@ void push_back(stack_storage<T>& s, const T& value) { } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/stim_current.cu b/src/backends/gpu/kernels/stim_current.cu index 7e5340bc..12caa155 100644 --- a/src/backends/gpu/kernels/stim_current.cu +++ b/src/backends/gpu/kernels/stim_current.cu @@ -1,8 +1,7 @@ #include <backends/fvm_types.hpp> #include <backends/gpu/intrinsics.hpp> -namespace nest{ -namespace mc{ +namespace arb{ namespace gpu { namespace kernels { @@ -44,5 +43,4 @@ void stim_current( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/take_samples.cu b/src/backends/gpu/kernels/take_samples.cu index 2145400a..1e85f0e3 100644 --- a/src/backends/gpu/kernels/take_samples.cu +++ b/src/backends/gpu/kernels/take_samples.cu @@ -3,8 +3,7 @@ #include <backends/fvm_types.hpp> #include <backends/multi_event_stream_state.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace kernels { @@ -43,6 +42,5 @@ void take_samples( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/take_samples.hpp b/src/backends/gpu/kernels/take_samples.hpp index 8fdd0de3..f174c99c 100644 --- a/src/backends/gpu/kernels/take_samples.hpp +++ b/src/backends/gpu/kernels/take_samples.hpp @@ -5,8 +5,7 @@ #include <backends/fvm_types.hpp> #include <backends/multi_event_stream_state.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { void take_samples( @@ -16,6 +15,5 @@ void take_samples( fvm_value_type* sample_value); } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/test_thresholds.cu b/src/backends/gpu/kernels/test_thresholds.cu index 946a0e29..ce0ef688 100644 --- a/src/backends/gpu/kernels/test_thresholds.cu +++ b/src/backends/gpu/kernels/test_thresholds.cu @@ -3,8 +3,7 @@ #include "detail.hpp" #include "stack.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { /// kernel used to test for threshold crossing test code. @@ -75,5 +74,4 @@ void test_thresholds( } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/test_thresholds.hpp b/src/backends/gpu/kernels/test_thresholds.hpp index c7b8526c..d7f9479e 100644 --- a/src/backends/gpu/kernels/test_thresholds.hpp +++ b/src/backends/gpu/kernels/test_thresholds.hpp @@ -4,8 +4,7 @@ #include "stack.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { extern void test_thresholds( @@ -16,5 +15,4 @@ extern void test_thresholds( const fvm_size_type* cv_index, const fvm_value_type* values, const fvm_value_type* thresholds); } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/kernels/time_ops.cu b/src/backends/gpu/kernels/time_ops.cu index c2a108a8..7b781522 100644 --- a/src/backends/gpu/kernels/time_ops.cu +++ b/src/backends/gpu/kernels/time_ops.cu @@ -1,7 +1,6 @@ #include <backends/fvm_types.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace kernels { @@ -76,5 +75,4 @@ void set_dt(fvm_size_type ncell, } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/managed_ptr.hpp b/src/backends/gpu/managed_ptr.hpp index ca42638e..8343470f 100644 --- a/src/backends/gpu/managed_ptr.hpp +++ b/src/backends/gpu/managed_ptr.hpp @@ -4,8 +4,7 @@ #include <memory/allocator.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { // used to indicate that the type pointed to by the managed_ptr is to be @@ -113,6 +112,5 @@ managed_ptr<T> make_managed_ptr(Args&&... args) { } } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/matrix_state_flat.hpp b/src/backends/gpu/matrix_state_flat.hpp index a68ecad8..1f814c07 100644 --- a/src/backends/gpu/matrix_state_flat.hpp +++ b/src/backends/gpu/matrix_state_flat.hpp @@ -7,8 +7,7 @@ #include <util/partition.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { void solve_matrix_flat( @@ -135,5 +134,4 @@ private: }; } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/matrix_state_interleaved.hpp b/src/backends/gpu/matrix_state_interleaved.hpp index 054af9e5..99a00a8e 100644 --- a/src/backends/gpu/matrix_state_interleaved.hpp +++ b/src/backends/gpu/matrix_state_interleaved.hpp @@ -10,8 +10,7 @@ #include "kernels/detail.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { // host side wrapper for interleaved matrix assembly kernel @@ -290,5 +289,4 @@ private: }; } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/multi_event_stream.cu b/src/backends/gpu/multi_event_stream.cu index f36863c7..7dac8501 100644 --- a/src/backends/gpu/multi_event_stream.cu +++ b/src/backends/gpu/multi_event_stream.cu @@ -5,8 +5,7 @@ #include <memory/copy.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { namespace kernels { @@ -136,5 +135,4 @@ void multi_event_stream_base::event_time_if_before(view t_until) { } // namespace gpu -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/backends/gpu/multi_event_stream.hpp b/src/backends/gpu/multi_event_stream.hpp index 6ebe8430..94fa0fd9 100644 --- a/src/backends/gpu/multi_event_stream.hpp +++ b/src/backends/gpu/multi_event_stream.hpp @@ -11,8 +11,7 @@ #include <memory/copy.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { // Base class provides common implementations across event types. @@ -61,8 +60,8 @@ protected: template <typename Event> void init(std::vector<Event>& staged) { - using ::nest::mc::event_time; - using ::nest::mc::event_index; + using ::arb::event_time; + using ::arb::event_index; if (staged.size()>std::numeric_limits<size_type>::max()) { throw std::range_error("too many events"); @@ -120,7 +119,7 @@ protected: template <typename Event> class multi_event_stream: public multi_event_stream_base { public: - using event_data_type = ::nest::mc::event_data_type<Event>; + using event_data_type = ::arb::event_data_type<Event>; using data_array = memory::device_vector<event_data_type>; using state = multi_event_stream_state<event_data_type>; @@ -138,7 +137,7 @@ public: tmp_ev_data_.clear(); tmp_ev_data_.reserve(staged.size()); - using ::nest::mc::event_data; + using ::arb::event_data; util::assign_by(tmp_ev_data_, staged, [](const Event& ev) { return event_data(ev); }); ev_data_ = data_array(memory::make_view(tmp_ev_data_)); } @@ -155,5 +154,4 @@ private: }; } // namespace gpu -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/backends/gpu/stack.hpp b/src/backends/gpu/stack.hpp index ce00d9bc..591bda9f 100644 --- a/src/backends/gpu/stack.hpp +++ b/src/backends/gpu/stack.hpp @@ -5,8 +5,7 @@ #include <memory/allocator.hpp> #include "stack_common.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { // A simple stack data structure for the GPU. @@ -118,5 +117,4 @@ public: }; } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/stack_common.hpp b/src/backends/gpu/stack_common.hpp index 74730079..1d58646f 100644 --- a/src/backends/gpu/stack_common.hpp +++ b/src/backends/gpu/stack_common.hpp @@ -2,8 +2,7 @@ #include <backends/fvm_types.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { // stores a single crossing event @@ -38,5 +37,4 @@ struct stack_storage { } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/stim_current.hpp b/src/backends/gpu/stim_current.hpp index 6d339755..0405a6fe 100644 --- a/src/backends/gpu/stim_current.hpp +++ b/src/backends/gpu/stim_current.hpp @@ -2,8 +2,7 @@ #include <backends/fvm_types.hpp> -namespace nest{ -namespace mc{ +namespace arb{ namespace gpu { void stim_current( @@ -12,5 +11,4 @@ void stim_current( const fvm_size_type* cell_index, const fvm_value_type* time, fvm_value_type* current); } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/stimulus.hpp b/src/backends/gpu/stimulus.hpp index 651e903c..93aa10f3 100644 --- a/src/backends/gpu/stimulus.hpp +++ b/src/backends/gpu/stimulus.hpp @@ -8,8 +8,7 @@ #include "stim_current.hpp" #include <util/pprintf.hpp> -namespace nest{ -namespace mc{ +namespace arb{ namespace gpu { template<class Backend> @@ -55,7 +54,7 @@ public: void set_ion(ionKind k, ion_type& i, std::vector<size_type>const& index) override { throw std::domain_error( - nest::mc::util::pprintf("mechanism % does not support ion type\n", name())); + arb::util::pprintf("mechanism % does not support ion type\n", name())); } void nrn_init() override {} @@ -101,5 +100,4 @@ public: }; } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/threshold_watcher.hpp b/src/backends/gpu/threshold_watcher.hpp index b63ec72e..ebb4ed6b 100644 --- a/src/backends/gpu/threshold_watcher.hpp +++ b/src/backends/gpu/threshold_watcher.hpp @@ -9,8 +9,7 @@ #include "backends/fvm_types.hpp" #include "kernels/test_thresholds.hpp" -namespace nest { -namespace mc { +namespace arb { namespace gpu { /// threshold crossing logic @@ -136,5 +135,4 @@ private: }; } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/gpu/time_ops.hpp b/src/backends/gpu/time_ops.hpp index a851a7c4..b38760f8 100644 --- a/src/backends/gpu/time_ops.hpp +++ b/src/backends/gpu/time_ops.hpp @@ -2,8 +2,7 @@ #include <backends/fvm_types.hpp> -namespace nest { -namespace mc { +namespace arb { namespace gpu { void update_time_to(fvm_size_type n, @@ -21,5 +20,4 @@ void set_dt(fvm_size_type ncell, const fvm_size_type* cv_to_cell); } // namespace gpu -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/multi_event_stream_state.hpp b/src/backends/multi_event_stream_state.hpp index 4797d691..b0ef0f47 100644 --- a/src/backends/multi_event_stream_state.hpp +++ b/src/backends/multi_event_stream_state.hpp @@ -5,8 +5,7 @@ // Pointer representation of multi-event stream marked event state, // common across CPU and GPU backends. -namespace nest { -namespace mc { +namespace arb { template <typename EvData> struct multi_event_stream_state { @@ -30,5 +29,4 @@ struct multi_event_stream_state { } }; -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/backends/multicore/fvm.cpp b/src/backends/multicore/fvm.cpp index 6999f10c..25e75e3c 100644 --- a/src/backends/multicore/fvm.cpp +++ b/src/backends/multicore/fvm.cpp @@ -7,8 +7,7 @@ #include <mechanisms/multicore/test_kin1.hpp> #include <mechanisms/multicore/test_kinlva.hpp> -namespace nest { -namespace mc { +namespace arb { namespace multicore { std::map<std::string, backend::maker_type> @@ -22,5 +21,4 @@ backend::mech_map_ = { }; } // namespace multicore -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/multicore/fvm.hpp b/src/backends/multicore/fvm.hpp index e00b1df8..801f0744 100644 --- a/src/backends/multicore/fvm.hpp +++ b/src/backends/multicore/fvm.hpp @@ -19,8 +19,7 @@ #include "stimulus.hpp" #include "threshold_watcher.hpp" -namespace nest { -namespace mc { +namespace arb { namespace multicore { struct backend { @@ -48,11 +47,11 @@ struct backend { using host_view = view; using host_iview = iview; - using matrix_state = nest::mc::multicore::matrix_state<value_type, size_type>; + using matrix_state = arb::multicore::matrix_state<value_type, size_type>; // backend-specific multi event streams. - using deliverable_event_stream = nest::mc::multicore::multi_event_stream<deliverable_event>; - using sample_event_stream = nest::mc::multicore::multi_event_stream<sample_event>; + using deliverable_event_stream = arb::multicore::multi_event_stream<deliverable_event>; + using sample_event_stream = arb::multicore::multi_event_stream<sample_event>; // // mechanism infrastructure @@ -95,7 +94,7 @@ struct backend { /// threshold crossing logic /// used as part of spike detection back end using threshold_watcher = - nest::mc::multicore::threshold_watcher<value_type, size_type>; + arb::multicore::threshold_watcher<value_type, size_type>; // perform min/max reductions on 'array' type @@ -155,11 +154,10 @@ private: template <template <typename> class Mech> static mechanism maker(value_type mech_id, const_iview vec_ci, const_view vec_t, const_view vec_t_to, const_view vec_dt, view vec_v, view vec_i, array&& weights, iarray&& node_indices) { - return nest::mc::make_mechanism<Mech<backend>> + return arb::make_mechanism<Mech<backend>> (mech_id, vec_ci, vec_t, vec_t_to, vec_dt, vec_v, vec_i, std::move(weights), std::move(node_indices)); } }; } // namespace multicore -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/multicore/intrin.hpp b/src/backends/multicore/intrin.hpp index 7f6de29b..05f5e2b5 100644 --- a/src/backends/multicore/intrin.hpp +++ b/src/backends/multicore/intrin.hpp @@ -9,8 +9,7 @@ #include <iostream> #include <immintrin.h> -namespace nest { -namespace mc { +namespace arb { namespace multicore { namespace detail { @@ -404,5 +403,4 @@ __m256d nmc_mm256_pow_pd(__m256d x, __m256d y) { } } // end namespace multicore -} // end namespace mc -} // end namespace nest +} // end namespace arb diff --git a/src/backends/multicore/matrix_state.hpp b/src/backends/multicore/matrix_state.hpp index 15507ca0..d7eb87c4 100644 --- a/src/backends/multicore/matrix_state.hpp +++ b/src/backends/multicore/matrix_state.hpp @@ -4,8 +4,7 @@ #include <util/partition.hpp> #include <util/span.hpp> -namespace nest { -namespace mc { +namespace arb { namespace multicore { template <typename T, typename I> @@ -127,5 +126,4 @@ private: }; } // namespace multicore -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/multicore/multi_event_stream.hpp b/src/backends/multicore/multi_event_stream.hpp index 18b12742..dc6683fa 100644 --- a/src/backends/multicore/multi_event_stream.hpp +++ b/src/backends/multicore/multi_event_stream.hpp @@ -16,8 +16,7 @@ #include <util/rangeutil.hpp> #include <util/strprintf.hpp> -namespace nest { -namespace mc { +namespace arb { namespace multicore { template <typename Event> @@ -26,9 +25,9 @@ public: using size_type = cell_size_type; using event_type = Event; - using event_time_type = ::nest::mc::event_time_type<Event>; - using event_data_type = ::nest::mc::event_data_type<Event>; - using event_index_type = ::nest::mc::event_index_type<Event>; + using event_time_type = ::arb::event_time_type<Event>; + using event_data_type = ::arb::event_data_type<Event>; + using event_index_type = ::arb::event_index_type<Event>; using state = multi_event_stream_state<event_data_type>; @@ -52,9 +51,9 @@ public: // Initialize event streams from a vector of events, sorted by time. void init(std::vector<Event> staged) { - using ::nest::mc::event_time; - using ::nest::mc::event_index; - using ::nest::mc::event_data; + using ::arb::event_time; + using ::arb::event_index; + using ::arb::event_data; if (staged.size()>std::numeric_limits<size_type>::max()) { throw std::range_error("too many events"); @@ -94,7 +93,7 @@ public: // until `event_time(ev)` > `t_until[i]`. template <typename TimeSeq> void mark_until_after(const TimeSeq& t_until) { - using ::nest::mc::event_time; + using ::arb::event_time; EXPECTS(n_streams()==util::size(t_until)); @@ -115,7 +114,7 @@ public: // while `t_until[i]` > `event_time(ev)`. template <typename TimeSeq> void mark_until(const TimeSeq& t_until) { - using ::nest::mc::event_time; + using ::arb::event_time; EXPECTS(n_streams()==util::size(t_until)); @@ -150,7 +149,7 @@ public: // `t_until[i]` to the event time. template <typename TimeSeq> void event_time_if_before(TimeSeq& t_until) { - using ::nest::mc::event_time; + using ::arb::event_time; // note: operation on each `i` is independent. for (size_type i = 0; i<n_streams(); ++i) { @@ -205,5 +204,4 @@ private: }; } // namespace multicore -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/backends/multicore/stimulus.hpp b/src/backends/multicore/stimulus.hpp index f26f1ede..d43b3d7f 100644 --- a/src/backends/multicore/stimulus.hpp +++ b/src/backends/multicore/stimulus.hpp @@ -8,8 +8,7 @@ #include <util/indirect.hpp> #include <util/pprintf.hpp> -namespace nest{ -namespace mc{ +namespace arb{ namespace multicore{ template<class Backend> @@ -56,7 +55,7 @@ public: void set_ion(ionKind k, ion_type& i, std::vector<size_type>const& index) override { throw std::domain_error( - nest::mc::util::pprintf("mechanism % does not support ion type\n", name())); + arb::util::pprintf("mechanism % does not support ion type\n", name())); } void nrn_init() override {} @@ -105,5 +104,4 @@ public: }; } // namespace multicore -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/backends/multicore/threshold_watcher.hpp b/src/backends/multicore/threshold_watcher.hpp index 8a09cdca..ad97a5e8 100644 --- a/src/backends/multicore/threshold_watcher.hpp +++ b/src/backends/multicore/threshold_watcher.hpp @@ -3,8 +3,7 @@ #include <math.hpp> #include <memory/memory.hpp> -namespace nest { -namespace mc { +namespace arb { namespace multicore { template <typename T, typename I> @@ -129,5 +128,4 @@ private: }; } // namespace multicore -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/cell.cpp b/src/cell.cpp index 04766c84..5dfb1920 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -3,8 +3,7 @@ #include <tree.hpp> #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { int find_compartment_index( segment_location const& location, @@ -280,5 +279,4 @@ cell make_cell(const morphology& morph, bool compartments_from_discretization) { return newcell; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/cell.hpp b/src/cell.hpp index 40139722..7879ab6a 100644 --- a/src/cell.hpp +++ b/src/cell.hpp @@ -14,8 +14,7 @@ #include <util/pprintf.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { /// wrapper around compartment layout information derived from a high level cell /// description @@ -227,5 +226,4 @@ cable_segment* cell::add_cable(cell::index_type parent, Args&&... args) // section of the morphologu. cell make_cell(const morphology&, bool compartments_from_discretization=false); -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/cell_group.hpp b/src/cell_group.hpp index 7c9bdd3c..9abb760b 100644 --- a/src/cell_group.hpp +++ b/src/cell_group.hpp @@ -11,8 +11,7 @@ #include <schedule.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { class cell_group { public: @@ -42,5 +41,4 @@ cell_group_ptr make_cell_group(Args&&... args) { return cell_group_ptr(new T(std::forward<Args>(args)...)); } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/cell_group_factory.cpp b/src/cell_group_factory.cpp index e3cf5b76..a1e5fc1e 100644 --- a/src/cell_group_factory.cpp +++ b/src/cell_group_factory.cpp @@ -10,8 +10,7 @@ #include <rss_cell_group.hpp> #include <util/unique_any.hpp> -namespace nest { -namespace mc { +namespace arb { using gpu_fvm_cell = mc_cell_group<fvm::fvm_multicell<gpu::backend>>; using mc_fvm_cell = mc_cell_group<fvm::fvm_multicell<multicore::backend>>; @@ -37,5 +36,4 @@ cell_group_ptr cell_group_factory(const recipe& rec, const group_description& gr } } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/cell_group_factory.hpp b/src/cell_group_factory.hpp index e639b2c8..12c038b1 100644 --- a/src/cell_group_factory.hpp +++ b/src/cell_group_factory.hpp @@ -8,11 +8,9 @@ #include <recipe.hpp> #include <util/unique_any.hpp> -namespace nest { -namespace mc { +namespace arb { // Helper factory for building cell groups cell_group_ptr cell_group_factory(const recipe& rec, const group_description& group); -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/cell_tree.hpp b/src/cell_tree.hpp index 26fe9575..14d232d0 100644 --- a/src/cell_tree.hpp +++ b/src/cell_tree.hpp @@ -14,8 +14,7 @@ #include <common_types.hpp> #include <tree.hpp> -namespace nest { -namespace mc { +namespace arb { /// The tree data structure that describes the segments of a cell tree. /// A cell is represented as a tree where each node may have any number of @@ -37,7 +36,7 @@ public: using view_type = iarray::view_type; using const_view_type = iarray::const_view_type; - using tree = nest::mc::tree<int_type, size_type>; + using tree = arb::tree<int_type, size_type>; static constexpr int_type no_parent = tree::no_parent; /// default empty constructor @@ -300,5 +299,4 @@ private : int_type soma_ = 0; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/common_types.hpp b/src/common_types.hpp index c0499a8e..f817ea6e 100644 --- a/src/common_types.hpp +++ b/src/common_types.hpp @@ -12,8 +12,7 @@ #include <util/lexcmp_def.hpp> -namespace nest { -namespace mc { +namespace arb { // For identifying cells globally. @@ -72,15 +71,14 @@ enum cell_kind { data_spike_source, // Spike source from values inserted via description }; -} // namespace mc -} // namespace nest +} // namespace arb -std::ostream& operator<<(std::ostream& O, nest::mc::cell_member_type m); +std::ostream& operator<<(std::ostream& O, arb::cell_member_type m); namespace std { - template <> struct hash<nest::mc::cell_member_type> { - std::size_t operator()(const nest::mc::cell_member_type& m) const { - using namespace nest::mc; + template <> struct hash<arb::cell_member_type> { + std::size_t operator()(const arb::cell_member_type& m) const { + using namespace arb; static_assert(sizeof(std::size_t)>sizeof(cell_gid_type), "invalid size assumptions for hash of cell_member_type"); std::size_t k = ((std::size_t)m.gid << (8*sizeof(cell_gid_type))) + m.index; diff --git a/src/common_types_io.cpp b/src/common_types_io.cpp index ad6ca540..4850d5d8 100644 --- a/src/common_types_io.cpp +++ b/src/common_types_io.cpp @@ -2,7 +2,7 @@ #include <common_types.hpp> -std::ostream& operator<<(std::ostream& O, nest::mc::cell_member_type m) { +std::ostream& operator<<(std::ostream& O, arb::cell_member_type m) { return O << m.gid << ':' << m.index; } diff --git a/src/communication/communicator.hpp b/src/communication/communicator.hpp index 8a974d85..a34da7eb 100644 --- a/src/communication/communicator.hpp +++ b/src/communication/communicator.hpp @@ -20,8 +20,7 @@ #include <util/partition.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { namespace communication { // When the communicator is constructed the number of target groups and targets @@ -220,5 +219,4 @@ private: }; } // namespace communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/dryrun_global_policy.cpp b/src/communication/dryrun_global_policy.cpp index a713a8ab..5e640c65 100644 --- a/src/communication/dryrun_global_policy.cpp +++ b/src/communication/dryrun_global_policy.cpp @@ -1,12 +1,10 @@ #include "global_policy.hpp" -namespace nest { -namespace mc { +namespace arb { namespace communication { int dryrun_communicator_size=0; int dryrun_num_local_cells=0; } // namespace communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/dryrun_global_policy.hpp b/src/communication/dryrun_global_policy.hpp index 811c6796..67ca6db0 100644 --- a/src/communication/dryrun_global_policy.hpp +++ b/src/communication/dryrun_global_policy.hpp @@ -8,8 +8,7 @@ #include <util/span.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { namespace communication { extern int dryrun_num_local_cells; @@ -90,5 +89,4 @@ struct dryrun_global_policy { using global_policy = dryrun_global_policy; } // namespace communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/gathered_vector.hpp b/src/communication/gathered_vector.hpp index 22daa5a6..19c51fb9 100644 --- a/src/communication/gathered_vector.hpp +++ b/src/communication/gathered_vector.hpp @@ -6,8 +6,7 @@ #include <algorithms.hpp> -namespace nest { -namespace mc { +namespace arb { template <typename T> class gathered_vector { @@ -48,5 +47,4 @@ private: std::vector<count_type> partition_; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/global_policy.hpp b/src/communication/global_policy.hpp index 3bc1919d..20af00fc 100644 --- a/src/communication/global_policy.hpp +++ b/src/communication/global_policy.hpp @@ -2,14 +2,14 @@ #include <string> -namespace nest { namespace mc { namespace communication { +namespace arb { namespace communication { enum class global_policy_kind {serial, mpi, dryrun}; -}}} +}} namespace std { inline - std::string to_string(nest::mc::communication::global_policy_kind k) { - using namespace nest::mc::communication; + std::string to_string(arb::communication::global_policy_kind k) { + using namespace arb::communication; if (k == global_policy_kind::mpi) { return "MPI"; } @@ -28,8 +28,7 @@ namespace std { #include "serial_global_policy.hpp" #endif -namespace nest { -namespace mc { +namespace arb { namespace communication { template <typename Policy> @@ -54,5 +53,4 @@ struct policy_guard { using global_policy_guard = policy_guard<global_policy>; } // namespace communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/mpi.cpp b/src/communication/mpi.cpp index 770d4b84..d1073f69 100644 --- a/src/communication/mpi.cpp +++ b/src/communication/mpi.cpp @@ -2,8 +2,7 @@ #include <communication/mpi.hpp> -namespace nest { -namespace mc { +namespace arb { namespace mpi { // global state @@ -67,5 +66,4 @@ bool ballot(bool vote) { } } // namespace mpi -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/mpi.hpp b/src/communication/mpi.hpp index ec7fc8a3..8d541308 100644 --- a/src/communication/mpi.hpp +++ b/src/communication/mpi.hpp @@ -15,8 +15,7 @@ #include <profiling/profiler.hpp> -namespace nest { -namespace mc { +namespace arb { namespace mpi { // prototypes @@ -263,5 +262,4 @@ namespace mpi { } } // namespace mpi -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/mpi_global_policy.hpp b/src/communication/mpi_global_policy.hpp index 178d52e6..32f5beed 100644 --- a/src/communication/mpi_global_policy.hpp +++ b/src/communication/mpi_global_policy.hpp @@ -15,8 +15,7 @@ #include <communication/mpi.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { namespace communication { struct mpi_global_policy { @@ -38,17 +37,17 @@ struct mpi_global_policy { template <typename T> static T min(T value) { - return nest::mc::mpi::reduce(value, MPI_MIN); + return arb::mpi::reduce(value, MPI_MIN); } template <typename T> static T max(T value) { - return nest::mc::mpi::reduce(value, MPI_MAX); + return arb::mpi::reduce(value, MPI_MAX); } template <typename T> static T sum(T value) { - return nest::mc::mpi::reduce(value, MPI_SUM); + return arb::mpi::reduce(value, MPI_SUM); } template <typename T> @@ -61,11 +60,11 @@ struct mpi_global_policy { } static void setup(int& argc, char**& argv) { - nest::mc::mpi::init(&argc, &argv); + arb::mpi::init(&argc, &argv); } static void teardown() { - nest::mc::mpi::finalize(); + arb::mpi::finalize(); } static global_policy_kind kind() { return global_policy_kind::mpi; }; @@ -74,6 +73,5 @@ struct mpi_global_policy { using global_policy = mpi_global_policy; } // namespace communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/communication/serial_global_policy.hpp b/src/communication/serial_global_policy.hpp index 81d2f3bc..ec853175 100644 --- a/src/communication/serial_global_policy.hpp +++ b/src/communication/serial_global_policy.hpp @@ -8,8 +8,7 @@ #include <communication/gathered_vector.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { namespace communication { struct serial_global_policy { @@ -68,5 +67,4 @@ struct serial_global_policy { using global_policy = serial_global_policy; } // namespace communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/compartment.hpp b/src/compartment.hpp index fae0ad88..b68118ef 100644 --- a/src/compartment.hpp +++ b/src/compartment.hpp @@ -13,8 +13,7 @@ #include <util/rangeutil.hpp> #include <util/transform.hpp> -namespace nest { -namespace mc { +namespace arb { /// Defines the simplest type of compartment /// The compartment is a conic frustrum @@ -286,7 +285,6 @@ protected: } }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/connection.hpp b/src/connection.hpp index 65d03915..24b9af55 100644 --- a/src/connection.hpp +++ b/src/connection.hpp @@ -6,8 +6,7 @@ #include <event_queue.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { class connection { public: @@ -58,10 +57,9 @@ static inline bool operator<(cell_member_type lhs, const connection& rhs) { return lhs < rhs.source(); } -} // namespace mc -} // namespace nest +} // namespace arb -static inline std::ostream& operator<<(std::ostream& o, nest::mc::connection const& con) { +static inline std::ostream& operator<<(std::ostream& o, arb::connection const& con) { return o << "con [" << con.source() << " -> " << con.destination() << " : weight " << con.weight() << ", delay " << con.delay() << "]"; diff --git a/src/domain_decomposition.hpp b/src/domain_decomposition.hpp index 9655e4ea..cd9fa29b 100644 --- a/src/domain_decomposition.hpp +++ b/src/domain_decomposition.hpp @@ -14,8 +14,7 @@ #include <util/partition.hpp> #include <util/transform.hpp> -namespace nest { -namespace mc { +namespace arb { inline bool has_gpu_backend(cell_kind k) { if (k==cell_kind::cable1d_neuron) { @@ -46,7 +45,7 @@ struct group_description { /// A domain_decomposition type is responsible solely for describing the /// distribution of cells across cell_groups and domains. /// A load balancing algorithm is responsible for generating the -/// domain_decomposition, e.g. nest::mc::partitioned_load_balancer(). +/// domain_decomposition, e.g. arb::partitioned_load_balancer(). struct domain_decomposition { /// Tests whether a gid is on the local domain. bool is_local_gid(cell_gid_type gid) const { @@ -74,5 +73,4 @@ struct domain_decomposition { std::vector<group_description> groups; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/dss_cell_description.hpp b/src/dss_cell_description.hpp index bfb9fd68..d0c937a8 100644 --- a/src/dss_cell_description.hpp +++ b/src/dss_cell_description.hpp @@ -4,8 +4,7 @@ #include <common_types.hpp> -namespace nest { -namespace mc { +namespace arb { /// Description for a data spike source: a cell that generates spikes provided as a vector of /// spike times at the start of a run. @@ -19,5 +18,4 @@ struct dss_cell_description { {} }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/dss_cell_group.hpp b/src/dss_cell_group.hpp index 5f3e32d6..ffaecbe5 100644 --- a/src/dss_cell_group.hpp +++ b/src/dss_cell_group.hpp @@ -6,8 +6,7 @@ #include <util/span.hpp> #include <util/unique_any.hpp> -namespace nest { -namespace mc { +namespace arb { /// Cell_group to collect spike sources class dss_cell_group: public cell_group { @@ -100,6 +99,5 @@ private: std::vector<std::vector<time_type>::iterator > not_emit_it_; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/event_binner.cpp b/src/event_binner.cpp index 278f7f51..c5e7bc48 100644 --- a/src/event_binner.cpp +++ b/src/event_binner.cpp @@ -9,8 +9,7 @@ #include <spike.hpp> #include <util/optional.hpp> -namespace nest { -namespace mc { +namespace arb { void event_binner::reset() { last_event_times_.clear(); @@ -52,6 +51,5 @@ void event_binner::update_last_event_time(cell_gid_type id, time_type t) { last_event_times_[id] = t; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/event_binner.hpp b/src/event_binner.hpp index f9ed6282..bcdce2ff 100644 --- a/src/event_binner.hpp +++ b/src/event_binner.hpp @@ -7,8 +7,7 @@ #include <spike.hpp> #include <util/optional.hpp> -namespace nest { -namespace mc { +namespace arb { enum class binning_kind { none, @@ -49,6 +48,5 @@ private: void update_last_event_time(cell_gid_type id, time_type t); }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/event_queue.hpp b/src/event_queue.hpp index 7f1e8e3f..02dfd2bb 100644 --- a/src/event_queue.hpp +++ b/src/event_queue.hpp @@ -14,8 +14,7 @@ #include "util/range.hpp" #include "util/strprintf.hpp" -namespace nest { -namespace mc { +namespace arb { /* Event classes `Event` used with `event_queue` must be move and copy constructible, * and either have a public field `time` that returns the time value, or provide an @@ -33,7 +32,7 @@ struct postsynaptic_spike_event { return l.target==r.target && l.time==r.time && l.weight==r.weight; } - friend std::ostream& operator<<(std::ostream& o, const nest::mc::postsynaptic_spike_event& e) + friend std::ostream& operator<<(std::ostream& o, const arb::postsynaptic_spike_event& e) { return o << "E[tgt " << e.target << ", t " << e.time << ", w " << e.weight << "]"; } @@ -43,7 +42,7 @@ template <typename Event> class event_queue { public : using value_type = Event; - using event_time_type = ::nest::mc::event_time_type<Event>; + using event_time_type = ::arb::event_time_type<Event>; event_queue() {} @@ -69,7 +68,7 @@ public : return util::nothing; } - using ::nest::mc::event_time; + using ::arb::event_time; auto t = event_time(queue_.top()); return t_until > t? util::just(t): util::nothing; } @@ -78,7 +77,7 @@ public : // queue non-empty and the head satisfies predicate. template <typename Pred> util::optional<value_type> pop_if(Pred&& pred) { - using ::nest::mc::event_time; + using ::arb::event_time; if (!queue_.empty() && pred(queue_.top())) { auto ev = queue_.top(); queue_.pop(); @@ -91,7 +90,7 @@ public : // Pop and return top event `ev` of queue if `t_until` > `event_time(ev)`. util::optional<value_type> pop_if_before(const event_time_type& t_until) { - using ::nest::mc::event_time; + using ::arb::event_time; return pop_if( [&t_until](const value_type& ev) { return t_until > event_time(ev); } ); @@ -99,7 +98,7 @@ public : // Pop and return top event `ev` of queue unless `event_time(ev)` > `t_until` util::optional<value_type> pop_if_not_after(const event_time_type& t_until) { - using ::nest::mc::event_time; + using ::arb::event_time; return pop_if( [&t_until](const value_type& ev) { return !(event_time(ev) > t_until); } ); @@ -113,7 +112,7 @@ public : private: struct event_greater { bool operator()(const Event& a, const Event& b) { - using ::nest::mc::event_time; + using ::arb::event_time; return event_time(a) > event_time(b); } }; @@ -125,5 +124,4 @@ private: > queue_; }; -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/fvm_multicell.hpp b/src/fvm_multicell.hpp index 8b861787..c7cbe89d 100644 --- a/src/fvm_multicell.hpp +++ b/src/fvm_multicell.hpp @@ -27,8 +27,7 @@ #include <util/rangeutil.hpp> #include <util/span.hpp> -namespace nest { -namespace mc { +namespace arb { namespace fvm { inline int find_cv_index(const segment_location& loc, const compartment_model& graph) { @@ -70,9 +69,9 @@ public: // handles and events are currently common across implementations; // re-expose definitions from `backends/event.hpp`. - using target_handle = ::nest::mc::target_handle; - using probe_handle = ::nest::mc::probe_handle; - using deliverable_event = ::nest::mc::deliverable_event; + using target_handle = ::arb::target_handle; + using probe_handle = ::arb::probe_handle; + using deliverable_event = ::arb::deliverable_event; fvm_multicell() = default; @@ -1001,5 +1000,4 @@ void fvm_multicell<Backend>::step_integration() { } } // namespace fvm -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/generic_event.hpp b/src/generic_event.hpp index f4052616..c8263c6a 100644 --- a/src/generic_event.hpp +++ b/src/generic_event.hpp @@ -34,12 +34,11 @@ // // template <typename Event> // bool is_before(const Event& a, const Event& b) { -// using ::nest::mc::event_time; +// using ::arb::event_time; // return event_time(a)<event_time(b); // } -namespace nest { -namespace mc { +namespace arb { template <typename Event> auto event_time(const Event& ev) -> decltype(ev.time) { @@ -59,9 +58,9 @@ auto event_data(const Event& ev) -> decltype(ev.data) { namespace impl { // Wrap in `impl::` namespace to obtain correct ADL for return type. - using ::nest::mc::event_time; - using ::nest::mc::event_index; - using ::nest::mc::event_data; + using ::arb::event_time; + using ::arb::event_index; + using ::arb::event_data; template <typename Event> using event_time_type = decltype(event_time(std::declval<Event>())); @@ -82,6 +81,5 @@ using event_index_type = impl::event_index_type<Event>; template <typename Event> using event_data_type = impl::event_data_type<Event>; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/affinity.cpp b/src/hardware/affinity.cpp index 8d1895a0..b36f34e8 100644 --- a/src/hardware/affinity.cpp +++ b/src/hardware/affinity.cpp @@ -15,8 +15,7 @@ #endif -namespace nest { -namespace mc { +namespace arb { namespace hw { #ifdef __linux__ @@ -61,5 +60,4 @@ util::optional<std::size_t> num_cores() { } } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/affinity.hpp b/src/hardware/affinity.hpp index 598917cd..6c58e7bb 100644 --- a/src/hardware/affinity.hpp +++ b/src/hardware/affinity.hpp @@ -5,8 +5,7 @@ #include <util/optional.hpp> -namespace nest { -namespace mc { +namespace arb { namespace hw { // The list of cores for which the calling thread has affinity. @@ -28,5 +27,4 @@ std::vector<int> get_affinity(); util::optional<std::size_t> num_cores(); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/gpu.cpp b/src/hardware/gpu.cpp index 8ee70b1d..6e8ac4cb 100644 --- a/src/hardware/gpu.cpp +++ b/src/hardware/gpu.cpp @@ -2,8 +2,7 @@ #include <cuda_runtime.h> #endif -namespace nest { -namespace mc { +namespace arb { namespace hw { #ifdef NMC_HAVE_GPU @@ -19,5 +18,4 @@ unsigned num_gpus() { #endif } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/gpu.hpp b/src/hardware/gpu.hpp index 953509f7..78b8ea80 100644 --- a/src/hardware/gpu.hpp +++ b/src/hardware/gpu.hpp @@ -1,11 +1,9 @@ #pragma once -namespace nest { -namespace mc { +namespace arb { namespace hw { unsigned num_gpus(); } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/memory.cpp b/src/hardware/memory.cpp index 60427ac3..6cce80da 100644 --- a/src/hardware/memory.cpp +++ b/src/hardware/memory.cpp @@ -10,8 +10,7 @@ extern "C" { #include <cuda_runtime.h> #endif -namespace nest { -namespace mc { +namespace arb { namespace hw { #if defined(__linux__) @@ -40,5 +39,4 @@ memory_size_type gpu_allocated_memory() { #endif } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/memory.hpp b/src/hardware/memory.hpp index 3688746b..b5cb6896 100644 --- a/src/hardware/memory.hpp +++ b/src/hardware/memory.hpp @@ -2,8 +2,7 @@ #include <cstdint> -namespace nest { -namespace mc { +namespace arb { namespace hw { // Use a signed type to store memory sizes because it can be used to store @@ -22,5 +21,4 @@ memory_size_type allocated_memory(); memory_size_type gpu_allocated_memory(); } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/node_info.cpp b/src/hardware/node_info.cpp index 3a7e4c16..354a697d 100644 --- a/src/hardware/node_info.cpp +++ b/src/hardware/node_info.cpp @@ -4,8 +4,7 @@ #include "gpu.hpp" #include "node_info.hpp" -namespace nest { -namespace mc { +namespace arb { namespace hw { // Return a node_info that describes the hardware resources available on this node. @@ -18,5 +17,4 @@ node_info get_node_info() { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/node_info.hpp b/src/hardware/node_info.hpp index b7a68b51..f83a2caf 100644 --- a/src/hardware/node_info.hpp +++ b/src/hardware/node_info.hpp @@ -1,7 +1,6 @@ #pragma once -namespace nest { -namespace mc { +namespace arb { namespace hw { // Information about the computational resources available on a compute node. @@ -20,5 +19,4 @@ struct node_info { node_info get_node_info(); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/power.cpp b/src/hardware/power.cpp index 9f08af85..05c5303f 100644 --- a/src/hardware/power.cpp +++ b/src/hardware/power.cpp @@ -2,8 +2,7 @@ #include "power.hpp" -namespace nest { -namespace mc { +namespace arb { namespace hw { #ifdef NMC_HAVE_CRAY @@ -28,5 +27,4 @@ energy_size_type energy() { #endif } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/hardware/power.hpp b/src/hardware/power.hpp index de1bebf7..2d3c2e59 100644 --- a/src/hardware/power.hpp +++ b/src/hardware/power.hpp @@ -2,8 +2,7 @@ #include <cstdint> -namespace nest { -namespace mc { +namespace arb { namespace hw { // Energy in Joules (J) @@ -13,5 +12,4 @@ using energy_size_type = std::uint64_t; energy_size_type energy(); } // namespace hw -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/helpers.hpp b/src/helpers.hpp index cae1e30a..f11c86d0 100644 --- a/src/helpers.hpp +++ b/src/helpers.hpp @@ -1,6 +1,6 @@ #include <algorithm> -namespace nestmc { +namespace arbmc { namespace range{ template <typename C> diff --git a/src/io/exporter.hpp b/src/io/exporter.hpp index e27ae636..9cf817f3 100644 --- a/src/io/exporter.hpp +++ b/src/io/exporter.hpp @@ -6,8 +6,7 @@ #include <common_types.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { namespace io { // interface for exporters. @@ -25,5 +24,4 @@ public: }; } //communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/io/exporter_spike_file.hpp b/src/io/exporter_spike_file.hpp index 090a4641..06e709b7 100644 --- a/src/io/exporter_spike_file.hpp +++ b/src/io/exporter_spike_file.hpp @@ -15,8 +15,7 @@ #include <util/file.hpp> #include <spike.hpp> -namespace nest { -namespace mc { +namespace arb { namespace io { template <typename CommunicationPolicy> @@ -92,5 +91,4 @@ private: }; } //communication -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/ion.hpp b/src/ion.hpp index fce239f7..d719daa8 100644 --- a/src/ion.hpp +++ b/src/ion.hpp @@ -4,8 +4,7 @@ #include <memory/memory.hpp> #include <util/indirect.hpp> -namespace nest { -namespace mc { +namespace arb { /* Ion channels have the following fields, whose label corresponds to that @@ -102,6 +101,5 @@ private : array Xo_; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/load_balance.hpp b/src/load_balance.hpp index 6e77ca25..817a7b4e 100644 --- a/src/load_balance.hpp +++ b/src/load_balance.hpp @@ -3,10 +3,8 @@ #include <hardware/node_info.hpp> #include <recipe.hpp> -namespace nest { -namespace mc { +namespace arb { domain_decomposition partition_load_balance(const recipe& rec, hw::node_info nd); -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/math.hpp b/src/math.hpp index de266510..50e2ebbd 100644 --- a/src/math.hpp +++ b/src/math.hpp @@ -4,8 +4,7 @@ #include <limits> #include <utility> -namespace nest { -namespace mc { +namespace arb { namespace math { template <typename T> @@ -200,6 +199,5 @@ inline quaternion rotation_z(double psi) { } } // namespace math -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/matrix.hpp b/src/matrix.hpp index 0afadd79..5de693d6 100644 --- a/src/matrix.hpp +++ b/src/matrix.hpp @@ -7,8 +7,7 @@ #include <util/debug.hpp> #include <util/span.hpp> -namespace nest { -namespace mc { +namespace arb { /// Hines matrix /// Make the back end state implementation optional to allow for @@ -92,5 +91,4 @@ public: state state_; }; -} // namespace nest -} // namespace mc +} // namespace arb diff --git a/src/mc_cell_group.hpp b/src/mc_cell_group.hpp index 80793199..65b2472b 100644 --- a/src/mc_cell_group.hpp +++ b/src/mc_cell_group.hpp @@ -25,8 +25,7 @@ #include <profiling/profiler.hpp> -namespace nest { -namespace mc { +namespace arb { template <typename LoweredCell> class mc_cell_group: public cell_group { @@ -313,5 +312,4 @@ private: } }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/mechanism.hpp b/src/mechanism.hpp index 39ed49f7..2711c679 100644 --- a/src/mechanism.hpp +++ b/src/mechanism.hpp @@ -12,8 +12,7 @@ #include <util/meta.hpp> #include <util/make_unique.hpp> -namespace nest { -namespace mc { +namespace arb { enum class mechanismKind {point, density}; @@ -114,5 +113,4 @@ auto make_mechanism( ) DEDUCED_RETURN_TYPE(util::make_unique<M>(mech_id, vec_ci, vec_t, vec_t_to, vec_dt, vec_v, vec_i, std::move(weights), std::move(node_indices))) -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/allocator.hpp b/src/memory/allocator.hpp index 3f77c08f..74b8c921 100644 --- a/src/memory/allocator.hpp +++ b/src/memory/allocator.hpp @@ -13,8 +13,7 @@ #include "definitions.hpp" #include "util.hpp" -namespace nest { -namespace mc { +namespace arb { namespace memory { namespace impl { @@ -390,5 +389,4 @@ using cuda_allocator = allocator<T, impl::cuda::device_policy>; #endif } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/array.hpp b/src/memory/array.hpp index 7a7196d8..cdc97fe4 100644 --- a/src/memory/array.hpp +++ b/src/memory/array.hpp @@ -15,8 +15,7 @@ #include "util.hpp" #include "array_view.hpp" -namespace nest { -namespace mc { +namespace arb { namespace memory{ // forward declarations @@ -210,7 +209,7 @@ public: template < typename It, - typename = nest::mc::util::enable_if_t<nest::mc::util::is_forward_iterator<It>::value> > + typename = arb::util::enable_if_t<arb::util::is_forward_iterator<It>::value> > array(It b, It e) : base(coordinator_type().allocate(std::distance(b, e))) { @@ -220,18 +219,18 @@ public: << "\n this " << util::pretty_printer<array>::print(*this) << "\n"; //<< "\n other " << util::pretty_printer<Other>::print(other) << std::endl; #endif - //auto canon = nest::mc::util::canonical_view(rng); + //auto canon = arb::util::canonical_view(rng); std::copy(b, e, this->begin()); } template <typename Seq> array( const Seq& seq, - nest::mc::util::enable_if_t< + arb::util::enable_if_t< !std::is_convertible<Seq, std::size_t>::value && !impl::is_array_t<Seq>::value >* = nullptr ): - base(coordinator_type().allocate(nest::mc::util::size(seq))) + base(coordinator_type().allocate(arb::util::size(seq))) { #ifdef VERBOSE std::cerr << util::green("array(iterator, iterator)") @@ -239,7 +238,7 @@ public: << "\n this " << util::pretty_printer<array>::print(*this) << "\n"; //<< "\n other " << util::pretty_printer<Other>::print(other) << std::endl; #endif - auto canon = nest::mc::util::canonical_view(seq); + auto canon = arb::util::canonical_view(seq); std::copy(std::begin(canon), std::end(canon), this->begin()); } @@ -262,6 +261,5 @@ private: }; } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/array_view.hpp b/src/memory/array_view.hpp index d4f61302..df89aae9 100644 --- a/src/memory/array_view.hpp +++ b/src/memory/array_view.hpp @@ -10,8 +10,7 @@ #include "range_limits.hpp" #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { namespace memory{ // forward declarations @@ -498,6 +497,5 @@ protected : using impl::is_array_view; } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/copy.hpp b/src/memory/copy.hpp index 5a4c1d49..3c8a8431 100644 --- a/src/memory/copy.hpp +++ b/src/memory/copy.hpp @@ -6,8 +6,7 @@ #include "wrappers.hpp" -namespace nest { -namespace mc { +namespace arb { namespace memory { template <typename LHS, typename RHS> @@ -57,5 +56,4 @@ void fill(LHS&& target, T value) { } } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/definitions.hpp b/src/memory/definitions.hpp index 3b0b3277..c2b3679f 100644 --- a/src/memory/definitions.hpp +++ b/src/memory/definitions.hpp @@ -4,8 +4,7 @@ #include <sstream> #include <typeinfo> -namespace nest { -namespace mc { +namespace arb { namespace memory { namespace types { @@ -113,6 +112,5 @@ namespace util { } // namespace util } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/device_coordinator.hpp b/src/memory/device_coordinator.hpp index 5d273da3..f710d6bd 100644 --- a/src/memory/device_coordinator.hpp +++ b/src/memory/device_coordinator.hpp @@ -12,8 +12,7 @@ #include "gpu.hpp" #include "util.hpp" -namespace nest { -namespace mc { +namespace arb { namespace memory { // forward declare @@ -253,7 +252,7 @@ public: // fill memory void set(view_type &rng, value_type value) { if (rng.size()) { - nest::mc::gpu::fill<value_type>(rng.data(), value, rng.size()); + arb::gpu::fill<value_type>(rng.data(), value, rng.size()); } } @@ -278,5 +277,4 @@ public: }; } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/gpu.hpp b/src/memory/gpu.hpp index 89588272..bb187e6b 100644 --- a/src/memory/gpu.hpp +++ b/src/memory/gpu.hpp @@ -10,8 +10,7 @@ #include <cuda.h> #include <cuda_runtime.h> -namespace nest { -namespace mc { +namespace arb { namespace memory { namespace gpu { @@ -62,7 +61,6 @@ void memcpy_d2d(const T* from, T* to, std::size_t size) { } // namespace gpu } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb #endif diff --git a/src/memory/host_coordinator.hpp b/src/memory/host_coordinator.hpp index 1f45b336..329521a5 100644 --- a/src/memory/host_coordinator.hpp +++ b/src/memory/host_coordinator.hpp @@ -15,8 +15,7 @@ #include "gpu.hpp" #endif -namespace nest { -namespace mc { +namespace arb { namespace memory { // forward declare for type printers @@ -196,5 +195,4 @@ public: }; } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/memory.hpp b/src/memory/memory.hpp index 50bbdf14..c0b660d8 100644 --- a/src/memory/memory.hpp +++ b/src/memory/memory.hpp @@ -10,8 +10,7 @@ #include "device_coordinator.hpp" #endif -namespace nest { -namespace mc { +namespace arb { namespace memory { // specialization for host vectors @@ -54,8 +53,7 @@ using hwb_view = array_view<T, host_coordinator<T, hwb_allocator<T>>>; #endif } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb // now import the helpers // these require that host_vector etc have been defined diff --git a/src/memory/range_limits.hpp b/src/memory/range_limits.hpp index 2b8d85ff..c1284a8b 100644 --- a/src/memory/range_limits.hpp +++ b/src/memory/range_limits.hpp @@ -1,7 +1,6 @@ #pragma once -namespace nest { -namespace mc { +namespace arb { namespace memory { // tag for final element in a range struct end_type {}; @@ -13,5 +12,4 @@ namespace{ } } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/util.hpp b/src/memory/util.hpp index 0fe62e67..9d5cdcf3 100644 --- a/src/memory/util.hpp +++ b/src/memory/util.hpp @@ -6,10 +6,9 @@ #include <util/debug.hpp> -#define LOG_ERROR(msg) nest::mc::util::backtrace().print(); util::log_error(__FILE__, __LINE__, msg) +#define LOG_ERROR(msg) arb::util::backtrace().print(); util::log_error(__FILE__, __LINE__, msg) -namespace nest { -namespace mc { +namespace arb { namespace memory { namespace util { @@ -88,5 +87,4 @@ inline void log_error(const char* file, int line, std::string msg) { } // namespace util } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/memory/wrappers.hpp b/src/memory/wrappers.hpp index 50393017..50a90923 100644 --- a/src/memory/wrappers.hpp +++ b/src/memory/wrappers.hpp @@ -10,8 +10,7 @@ #include <cuda_runtime.h> #endif -namespace nest { -namespace mc { +namespace arb { namespace memory { // @@ -162,5 +161,4 @@ auto on_gpu(const C& c) -> device_vector<typename C::value_type> { #endif } // namespace memory -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/model.cpp b/src/model.cpp index b74bdf6a..c46c52ed 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -10,8 +10,7 @@ #include <util/unique_any.hpp> #include <profiling/profiler.hpp> -namespace nest { -namespace mc { +namespace arb { model::model(const recipe& rec, const domain_decomposition& decomp): communicator_(rec, decomp) @@ -197,5 +196,4 @@ void model::set_local_spike_callback(spike_export_function export_callback) { local_export_callback_ = export_callback; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/model.hpp b/src/model.hpp index 9c0c1ed6..b1477101 100644 --- a/src/model.hpp +++ b/src/model.hpp @@ -16,8 +16,7 @@ #include <util/handle_set.hpp> #include <util/unique_any.hpp> -namespace nest { -namespace mc { +namespace arb { class model { public: @@ -106,5 +105,4 @@ private: util::handle_set<sampler_association_handle> sassoc_handles_; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/morphology.cpp b/src/morphology.cpp index 35b520ad..ea0a4581 100644 --- a/src/morphology.cpp +++ b/src/morphology.cpp @@ -5,10 +5,9 @@ #include <morphology.hpp> -namespace nest { -namespace mc { +namespace arb { -using ::nest::mc::math::lerp; +using ::arb::math::lerp; static section_point lerp(const section_point& a, const section_point& b, double u) { return { lerp(a.x, b.x, u), lerp(a.y, b.y, u), lerp(a.z, b.z, u), lerp(a.r, b.r, u) }; @@ -134,5 +133,4 @@ void morphology::assert_valid() const { -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/morphology.hpp b/src/morphology.hpp index 4faf7535..44ac1212 100644 --- a/src/morphology.hpp +++ b/src/morphology.hpp @@ -6,8 +6,7 @@ #include <stdexcept> #include <vector> -namespace nest { -namespace mc { +namespace arb { struct section_point { double x, y, z, r; // [µm], r is radius. @@ -81,5 +80,4 @@ struct morphology { section_geometry& add_section(std::vector<section_point> points, unsigned parent_id = 0, section_kind kind = section_kind::none); }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/parameter_list.cpp b/src/parameter_list.cpp index 2ca50817..5b5d974c 100644 --- a/src/parameter_list.cpp +++ b/src/parameter_list.cpp @@ -3,8 +3,7 @@ #include "parameter_list.hpp" -namespace nest { -namespace mc { +namespace arb { bool parameter_list::add_parameter(parameter p) { if (has_parameter(p.name)) { @@ -87,11 +86,10 @@ auto parameter_list::find_by_name(std::string const& n) const ); } -} // namespace mc -} // namespace nest +} // namespace arb std::ostream& -operator<<(std::ostream& o, nest::mc::parameter const& p) { +operator<<(std::ostream& o, arb::parameter const& p) { return o << "parameter(" << "name " << p.name @@ -101,9 +99,9 @@ operator<<(std::ostream& o, nest::mc::parameter const& p) { } std::ostream& -operator<<(std::ostream& o, nest::mc::parameter_list const& l) { +operator<<(std::ostream& o, arb::parameter_list const& l) { o << "parameters \"" << l.name() << "\" :\n"; - for(nest::mc::parameter const& p : l.parameters()) { + for(arb::parameter const& p : l.parameters()) { o << " " << p << "\n"; } return o; diff --git a/src/parameter_list.hpp b/src/parameter_list.hpp index caa752b9..bc47ef0a 100644 --- a/src/parameter_list.hpp +++ b/src/parameter_list.hpp @@ -6,8 +6,7 @@ #include <string> #include <vector> -namespace nest { -namespace mc { +namespace arb { template <typename T> struct value_range { @@ -207,11 +206,10 @@ namespace mc { } }; -} // namespace mc -} // namespace nest +} // namespace arb template <typename T> -std::ostream& operator<<(std::ostream& o, nest::mc::value_range<T> const& r) +std::ostream& operator<<(std::ostream& o, arb::value_range<T> const& r) { o << "["; if(r.has_lower_bound()) @@ -226,6 +224,6 @@ std::ostream& operator<<(std::ostream& o, nest::mc::value_range<T> const& r) return o << "]"; } -std::ostream& operator<<(std::ostream& o, nest::mc::parameter const& p); -std::ostream& operator<<(std::ostream& o, nest::mc::parameter_list const& l); +std::ostream& operator<<(std::ostream& o, arb::parameter const& p); +std::ostream& operator<<(std::ostream& o, arb::parameter_list const& l); diff --git a/src/partition_load_balance.cpp b/src/partition_load_balance.cpp index 2147c63f..32f202aa 100644 --- a/src/partition_load_balance.cpp +++ b/src/partition_load_balance.cpp @@ -3,8 +3,7 @@ #include <hardware/node_info.hpp> #include <recipe.hpp> -namespace nest { -namespace mc { +namespace arb { domain_decomposition partition_load_balance(const recipe& rec, hw::node_info nd) { struct partition_gid_domain { @@ -93,6 +92,5 @@ domain_decomposition partition_load_balance(const recipe& rec, hw::node_info nd) //return domain_decomposition(num_domains, domain_id, num_local_cells, num_global_cells, std::move(groups)); } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/point.hpp b/src/point.hpp index 256e518d..aa4c7106 100644 --- a/src/point.hpp +++ b/src/point.hpp @@ -4,8 +4,7 @@ #include <limits> #include <ostream> -namespace nest { -namespace mc { +namespace arb { template <typename T> struct point { @@ -69,10 +68,9 @@ bool operator!=(const point<T> &rhs, const point<T> &lhs) { return !(rhs == lhs); } -} // namespace mc -} // namespace nest +} // namespace arb template <typename T> -std::ostream& operator << (std::ostream& o, nest::mc::point<T> const& p) { +std::ostream& operator << (std::ostream& o, arb::point<T> const& p) { return o << "[" << p.x << ", " << p.y << ", " << p.z << "]"; } diff --git a/src/profiling/memory_meter.cpp b/src/profiling/memory_meter.cpp index a502255b..611eeac2 100644 --- a/src/profiling/memory_meter.cpp +++ b/src/profiling/memory_meter.cpp @@ -7,8 +7,7 @@ #include "memory_meter.hpp" #include "meter.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { // @@ -75,5 +74,4 @@ meter_ptr make_gpu_memory_meter() { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/memory_meter.hpp b/src/profiling/memory_meter.hpp index cf9d7152..4242e3c9 100644 --- a/src/profiling/memory_meter.hpp +++ b/src/profiling/memory_meter.hpp @@ -2,13 +2,11 @@ #include "meter.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { meter_ptr make_memory_meter(); meter_ptr make_gpu_memory_meter(); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/meter.hpp b/src/profiling/meter.hpp index 11afc7a6..f5ead8f1 100644 --- a/src/profiling/meter.hpp +++ b/src/profiling/meter.hpp @@ -4,8 +4,7 @@ #include <string> #include <vector> -namespace nest { -namespace mc { +namespace arb { namespace util { // A meter can be used to take a measurement of resource consumption, for @@ -41,5 +40,4 @@ public: using meter_ptr = std::unique_ptr<meter>; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/meter_manager.cpp b/src/profiling/meter_manager.cpp index eae9d3ed..c1c47230 100644 --- a/src/profiling/meter_manager.cpp +++ b/src/profiling/meter_manager.cpp @@ -8,8 +8,7 @@ #include "memory_meter.hpp" #include "power_meter.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { measurement::measurement( @@ -174,5 +173,4 @@ std::ostream& operator<<(std::ostream& o, const meter_report& report) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/meter_manager.hpp b/src/profiling/meter_manager.hpp index d92789b8..eba604e7 100644 --- a/src/profiling/meter_manager.hpp +++ b/src/profiling/meter_manager.hpp @@ -9,8 +9,7 @@ #include "meter.hpp" #include "profiler.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { // A measurement has the following: @@ -54,7 +53,7 @@ public: struct meter_report { std::vector<std::string> checkpoints; unsigned num_domains; - nest::mc::communication::global_policy_kind communication_policy; + arb::communication::global_policy_kind communication_policy; std::vector<measurement> meters; std::vector<std::string> hosts; }; @@ -64,5 +63,4 @@ meter_report make_meter_report(const meter_manager& manager); std::ostream& operator<<(std::ostream& o, const meter_report& report); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/power_meter.cpp b/src/profiling/power_meter.cpp index f4cbd2b9..9432253e 100644 --- a/src/profiling/power_meter.cpp +++ b/src/profiling/power_meter.cpp @@ -6,8 +6,7 @@ #include <util/config.hpp> #include <hardware/power.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { class power_meter: public meter { @@ -45,5 +44,4 @@ meter_ptr make_power_meter() { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/power_meter.hpp b/src/profiling/power_meter.hpp index 7c54e15c..f781964f 100644 --- a/src/profiling/power_meter.hpp +++ b/src/profiling/power_meter.hpp @@ -2,12 +2,10 @@ #include "meter.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { meter_ptr make_power_meter(); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/profiler.cpp b/src/profiling/profiler.cpp index 2a85c464..b260e2fa 100644 --- a/src/profiling/profiler.cpp +++ b/src/profiling/profiler.cpp @@ -10,8 +10,7 @@ #include <util/make_unique.hpp> #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { // Here we provide functionality that the profiler can use to control the CUDA @@ -440,5 +439,4 @@ void profilers_restart() {}; #endif } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/profiling/profiler.hpp b/src/profiling/profiler.hpp index 271f4945..fb5c09aa 100644 --- a/src/profiling/profiler.hpp +++ b/src/profiling/profiler.hpp @@ -16,8 +16,7 @@ #include <threading/threading.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { inline std::string green(std::string s) { return s; } @@ -26,7 +25,7 @@ inline std::string white(std::string s) { return s; } inline std::string red(std::string s) { return s; } inline std::string cyan(std::string s) { return s; } -using timer_type = nest::mc::threading::timer; +using timer_type = arb::threading::timer; namespace impl { /// simple hashing function for strings @@ -205,7 +204,7 @@ private: #ifdef NMC_HAVE_PROFILING namespace data { - using profiler_wrapper = nest::mc::threading::enumerable_thread_specific<profiler>; + using profiler_wrapper = arb::threading::enumerable_thread_specific<profiler>; extern profiler_wrapper profilers_; } #endif @@ -248,10 +247,9 @@ void profilers_restart(); void profiler_output(double threshold, bool profile_only_zero); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb // define some helper macros to make instrumentation of the source code with calls // to the profiler a little less visually distracting -#define PE nest::mc::util::profiler_enter -#define PL nest::mc::util::profiler_leave +#define PE arb::util::profiler_enter +#define PL arb::util::profiler_leave diff --git a/src/recipe.hpp b/src/recipe.hpp index 1eda5252..52c8c377 100644 --- a/src/recipe.hpp +++ b/src/recipe.hpp @@ -9,8 +9,7 @@ #include <common_types.hpp> #include <util/unique_any.hpp> -namespace nest { -namespace mc { +namespace arb { struct probe_info { cell_member_type id; @@ -65,5 +64,4 @@ public: virtual probe_info get_probe(cell_member_type probe_id) const = 0; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/rss_cell.hpp b/src/rss_cell.hpp index 6ee5d07c..17f2c4ae 100644 --- a/src/rss_cell.hpp +++ b/src/rss_cell.hpp @@ -2,8 +2,7 @@ #include <common_types.hpp> -namespace nest { -namespace mc { +namespace arb { /// Description class for a regular spike source: a cell that generates /// spikes with a fixed period over a given time interval. @@ -14,5 +13,4 @@ struct rss_cell { time_type stop_time; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/rss_cell_group.hpp b/src/rss_cell_group.hpp index 201b7b9f..f69b7aaa 100644 --- a/src/rss_cell_group.hpp +++ b/src/rss_cell_group.hpp @@ -7,8 +7,7 @@ #include <rss_cell.hpp> #include <util/unique_any.hpp> -namespace nest { -namespace mc { +namespace arb { /// Cell group implementing RSS cells. @@ -88,6 +87,5 @@ private: std::vector<spike> spikes_; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/sampler_map.hpp b/src/sampler_map.hpp index 34caadc7..7d5fc5c8 100644 --- a/src/sampler_map.hpp +++ b/src/sampler_map.hpp @@ -15,8 +15,7 @@ #include <util/deduce_return.hpp> #include <util/transform.hpp> -namespace nest { -namespace mc { +namespace arb { // An association between a samplers, schedule, and set of probe ids, as provided // to e.g. `model::add_sampler()`. @@ -73,5 +72,4 @@ struct probe_association { template <typename Handle> using probe_association_map = std::unordered_map<cell_member_type, probe_association<Handle>>; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/sampling.hpp b/src/sampling.hpp index f1ca642e..aa2c82a8 100644 --- a/src/sampling.hpp +++ b/src/sampling.hpp @@ -6,8 +6,7 @@ #include <common_types.hpp> #include <util/any_ptr.hpp> -namespace nest { -namespace mc { +namespace arb { using cell_member_predicate = std::function<bool (cell_member_type)>; @@ -32,5 +31,4 @@ enum class sampling_policy { // exact // placeholder: unsupported }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/schedule.cpp b/src/schedule.cpp index c1f569a6..6fd82067 100644 --- a/src/schedule.cpp +++ b/src/schedule.cpp @@ -8,8 +8,7 @@ // Implementations for specific schedules. -namespace nest { -namespace mc { +namespace arb { // Regular schedule implementation. @@ -46,5 +45,4 @@ std::vector<time_type> explicit_schedule_impl::events(time_type t0, time_type t1 return std::vector<time_type>(lb, ub); } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/schedule.hpp b/src/schedule.hpp index 4a3212e0..06937357 100644 --- a/src/schedule.hpp +++ b/src/schedule.hpp @@ -12,8 +12,7 @@ // Time schedules for probe–sampler associations. -namespace nest { -namespace mc { +namespace arb { // A schedule describes a sequence of time values used for sampling. Schedules // are queried monotonically in time: if two method calls `events(t0, t1)` @@ -181,5 +180,4 @@ inline schedule poisson_schedule(time_type tstart, time_type mean_dt, const Rand return schedule(poisson_schedule_impl<RandomNumberEngine>(tstart, mean_dt, rng)); } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/segment.hpp b/src/segment.hpp index e208ec69..bfdfa1f0 100644 --- a/src/segment.hpp +++ b/src/segment.hpp @@ -12,8 +12,7 @@ #include <point.hpp> #include <util/make_unique.hpp> -namespace nest { -namespace mc { +namespace arb { template <typename T, typename valid = typename std::is_floating_point<T>::type> @@ -488,5 +487,4 @@ struct segment_location { double position; }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/simple_sampler.hpp b/src/simple_sampler.hpp index e0967564..5961c9da 100644 --- a/src/simple_sampler.hpp +++ b/src/simple_sampler.hpp @@ -16,8 +16,7 @@ #include <iostream> -namespace nest { -namespace mc { +namespace arb { template <typename V> struct trace_entry { @@ -74,5 +73,4 @@ inline simple_sampler<V> make_simple_sampler(trace_data<V>& trace) { return simple_sampler<V>(trace); } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/spike.hpp b/src/spike.hpp index d2343ed3..067c23bb 100644 --- a/src/spike.hpp +++ b/src/spike.hpp @@ -5,8 +5,7 @@ #include <common_types.hpp> -namespace nest { -namespace mc { +namespace arb { template <typename I> struct basic_spike { @@ -25,11 +24,10 @@ struct basic_spike { /// Standard specialization: using spike = basic_spike<cell_member_type>; -} // namespace mc -} // namespace nest +} // namespace arb -// Custom stream operator for printing nest::mc::spike<> values. +// Custom stream operator for printing arb::spike<> values. template <typename I> -std::ostream& operator<<(std::ostream& o, nest::mc::basic_spike<I> s) { +std::ostream& operator<<(std::ostream& o, arb::basic_spike<I> s) { return o << "S[src " << s.source << ", t " << s.time << "]"; } diff --git a/src/stimulus.hpp b/src/stimulus.hpp index f3c587a4..071966c6 100644 --- a/src/stimulus.hpp +++ b/src/stimulus.hpp @@ -1,7 +1,6 @@ #pragma once -namespace nest { -namespace mc { +namespace arb { class i_clamp { public: @@ -50,5 +49,4 @@ class i_clamp { value_type amplitude_ = 0; // [nA] }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/swcio.cpp b/src/swcio.cpp index 3b825d3e..7a3c2720 100644 --- a/src/swcio.cpp +++ b/src/swcio.cpp @@ -12,8 +12,7 @@ #include <swcio.hpp> #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { namespace io { // swc_record implementation @@ -157,5 +156,4 @@ std::vector<swc_record> parse_swc_file(std::istream& is) { } } // namespace io -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/swcio.hpp b/src/swcio.hpp index a7e728fd..2ba4b394 100644 --- a/src/swcio.hpp +++ b/src/swcio.hpp @@ -13,8 +13,7 @@ #include <point.hpp> #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { namespace io { class swc_record { @@ -72,12 +71,12 @@ public: return 2*r; } - nest::mc::point<coord_type> coord() const { - return nest::mc::point<coord_type>(x, y, z); + arb::point<coord_type> coord() const { + return arb::point<coord_type>(x, y, z); } - nest::mc::section_point as_section_point() const { - return nest::mc::section_point{x, y, z, r}; + arb::section_point as_section_point() const { + return arb::section_point{x, y, z, r}; } // validity checks @@ -234,11 +233,10 @@ void swc_canonicalize_sequence(RandomAccessSequence& swc_records) { parent_list.push_back(swc_records[i].parent_id); } - if (!nest::mc::algorithms::has_contiguous_compartments(parent_list)) { + if (!arb::algorithms::has_contiguous_compartments(parent_list)) { throw swc_error("branches are not contiguously numbered", 0); } } } // namespace io -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/thread_private_spike_store.hpp b/src/thread_private_spike_store.hpp index 4b1973e3..336ac9f4 100644 --- a/src/thread_private_spike_store.hpp +++ b/src/thread_private_spike_store.hpp @@ -6,8 +6,7 @@ #include <spike.hpp> #include <threading/threading.hpp> -namespace nest { -namespace mc { +namespace arb { /// Handles the complexity of managing thread private buffers of spikes. /// Internally stores one thread private buffer of spikes for each hardware thread. @@ -73,5 +72,4 @@ public : const_iterator end() const { return buffers_.begin(); } }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/threading/cthread.cpp b/src/threading/cthread.cpp index 6a257f9d..759a8406 100644 --- a/src/threading/cthread.cpp +++ b/src/threading/cthread.cpp @@ -8,8 +8,8 @@ #include "cthread.hpp" #include "threading.hpp" -using namespace nest::mc::threading::impl; -using namespace nest::mc; +using namespace arb::threading::impl; +using namespace arb; // RAII owner for a task in flight struct task_pool::run_task { diff --git a/src/threading/cthread_impl.hpp b/src/threading/cthread_impl.hpp index d17d4407..9b8a8f3a 100644 --- a/src/threading/cthread_impl.hpp +++ b/src/threading/cthread_impl.hpp @@ -19,17 +19,16 @@ #include "timer.hpp" -namespace nest { -namespace mc { +namespace arb { namespace threading { // Forward declare task_group at bottom of this header class task_group; -using nest::mc::threading::impl::timer; +using arb::threading::impl::timer; namespace impl { -using nest::mc::threading::task_group; +using arb::threading::task_group; using std::mutex; using lock = std::unique_lock<mutex>; using std::condition_variable; @@ -56,7 +55,7 @@ private: thread_map thread_ids_; // flag to handle exit from all threads bool quit_ = false; - + // internals for taking tasks as a resource // and running them (updating above) // They get run by a thread in order to consume @@ -80,21 +79,21 @@ private: // must be > 0 // singled only created in static get_global_task_pool() task_pool(std::size_t nthreads); - + // task_pool is a singleton task_pool(const task_pool&) = delete; task_pool& operator=(const task_pool&) = delete; // set quit and wait for secondary threads to end ~task_pool(); - + public: // Like tbb calls: run queues a task, // wait waits for all tasks in the group to be done void run(const task&); void run(task&&); void wait(task_group*); - + // includes master thread int get_num_threads() { return threads_.size() + 1; @@ -121,7 +120,7 @@ class enumerable_thread_specific { using storage_class = std::vector<T>; storage_class data; - + public : using iterator = typename storage_class::iterator; using const_iterator = typename storage_class::const_iterator; @@ -206,12 +205,12 @@ private: impl::task_pool& global_task_pool; // task pool manipulates in_flight friend impl::task_pool; - + public: task_group(): global_task_pool{impl::task_pool::get_global_task_pool()} {} - + task_group(const task_group&) = delete; task_group& operator=(const task_group&) = delete; @@ -264,6 +263,5 @@ struct parallel_for { } }; -} // threading -} // mc -} // nest +} // namespace threading +} // namespace arb diff --git a/src/threading/cthread_sort.hpp b/src/threading/cthread_sort.hpp index e3d25418..32630e74 100644 --- a/src/threading/cthread_sort.hpp +++ b/src/threading/cthread_sort.hpp @@ -1,5 +1,6 @@ -namespace nest { -namespace mc { +#pragma once + +namespace arb { namespace threading { template <typename RandomIt> @@ -17,7 +18,5 @@ void sort(Container& c) { std::sort(std::begin(c), std::end(c)); } - -} -} -} +} // namespace threading +} // namespace arb diff --git a/src/threading/serial.hpp b/src/threading/serial.hpp index 6876d3db..0a182eaf 100644 --- a/src/threading/serial.hpp +++ b/src/threading/serial.hpp @@ -12,11 +12,10 @@ #include "timer.hpp" -namespace nest { -namespace mc { +namespace arb { namespace threading { -using nest::mc::threading::impl::timer; +using arb::threading::impl::timer; /////////////////////////////////////////////////////////////////////// // types @@ -120,7 +119,6 @@ public: {} }; -} // threading -} // mc -} // nest +} // namespace threading +} // namespace arb diff --git a/src/threading/tbb.hpp b/src/threading/tbb.hpp index c7614bce..59dc8ebf 100644 --- a/src/threading/tbb.hpp +++ b/src/threading/tbb.hpp @@ -11,8 +11,7 @@ #include <tbb/compat/thread> #include <tbb/enumerable_thread_specific.h> -namespace nest { -namespace mc { +namespace arb { namespace threading { template <typename T> @@ -67,9 +66,8 @@ void sort(Container& c) { tbb::parallel_sort(c.begin(), c.end()); } -} // threading -} // mc -} // nest +} // namespace threading +} // namespace arb namespace tbb { /// comparison operator for tbb::tick_count type diff --git a/src/threading/threading.cpp b/src/threading/threading.cpp index 7f13a42a..1316949b 100644 --- a/src/threading/threading.cpp +++ b/src/threading/threading.cpp @@ -8,8 +8,7 @@ #include "threading.hpp" -namespace nest { -namespace mc { +namespace arb { namespace threading { // Test environment variables for user-specified count of threads. @@ -81,5 +80,4 @@ size_t num_threads() { } } // namespace threading -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/threading/threading.hpp b/src/threading/threading.hpp index 493b5260..9049d0a9 100644 --- a/src/threading/threading.hpp +++ b/src/threading/threading.hpp @@ -2,8 +2,7 @@ #include <util/optional.hpp> -namespace nest { -namespace mc { +namespace arb { namespace threading { // Test environment variables for user-specified count of threads. @@ -24,8 +23,7 @@ util::optional<size_t> get_env_num_threads(); size_t num_threads(); } // namespace threading -} // namespace mc -} // namespace nest +} // namespace arb #if defined(NMC_HAVE_TBB) #include "tbb.hpp" diff --git a/src/threading/timer.hpp b/src/threading/timer.hpp index bf8242a5..027da9f6 100644 --- a/src/threading/timer.hpp +++ b/src/threading/timer.hpp @@ -2,8 +2,7 @@ #include <chrono> -namespace nest { -namespace mc { +namespace arb { namespace threading { namespace impl{ @@ -26,4 +25,3 @@ struct timer { } } } -} diff --git a/src/tinyopt.hpp b/src/tinyopt.hpp index 1e50a926..c90ba789 100644 --- a/src/tinyopt.hpp +++ b/src/tinyopt.hpp @@ -12,8 +12,7 @@ #include <util/meta.hpp> #include <util/optional.hpp> -namespace nest { -namespace mc { +namespace arb { namespace to { struct parse_opt_error: public std::runtime_error { @@ -129,5 +128,4 @@ util::optional<void> parse_opt(char **& argp, char shortopt, const char* longopt } // namespace to; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/tree.hpp b/src/tree.hpp index 5a1d9068..7d9eab05 100644 --- a/src/tree.hpp +++ b/src/tree.hpp @@ -9,8 +9,7 @@ #include <algorithms.hpp> -namespace nest { -namespace mc { +namespace arb { template <typename Int, typename Size = std::size_t> class tree { @@ -333,5 +332,4 @@ std::vector<IntT> make_parent_index(tree<IntT, SizeT> const& t, C const& counts) return parent_index; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/any.hpp b/src/util/any.hpp index 83bf63a3..1bc1e587 100644 --- a/src/util/any.hpp +++ b/src/util/any.hpp @@ -15,8 +15,7 @@ // - Does not implement the in_place_type<T> constructors from the standard. // - Does not implement the emplace modifier from the standard. -namespace nest { -namespace mc { +namespace arb { namespace util { // Defines a type of object to be thrown by the value-returning forms of @@ -216,5 +215,4 @@ any make_any(Args&&... args) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/any_ptr.hpp b/src/util/any_ptr.hpp index cbd7433c..e7c1534f 100644 --- a/src/util/any_ptr.hpp +++ b/src/util/any_ptr.hpp @@ -25,8 +25,7 @@ #include <util/lexcmp_def.hpp> #include <util/meta.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { struct any_ptr { @@ -94,5 +93,4 @@ template <typename T> T any_cast(any_ptr p) noexcept { return p.as<T>(); } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/config.hpp b/src/util/config.hpp index 2e113bf4..5103bcf3 100644 --- a/src/util/config.hpp +++ b/src/util/config.hpp @@ -1,7 +1,6 @@ #pragma once -namespace nest { -namespace mc { +namespace arb { namespace config { // has_memory_measurement @@ -37,5 +36,4 @@ constexpr bool has_cuda = false; #endif } // namespace config -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/counter.hpp b/src/util/counter.hpp index 5f31cc48..4328876d 100644 --- a/src/util/counter.hpp +++ b/src/util/counter.hpp @@ -6,8 +6,7 @@ #include <iterator> #include <type_traits> -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename V, typename = typename std::enable_if<std::is_integral<V>::value>::type> @@ -93,5 +92,4 @@ private: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/cycle.hpp b/src/util/cycle.hpp index a4d2b050..83fe7e08 100644 --- a/src/util/cycle.hpp +++ b/src/util/cycle.hpp @@ -5,8 +5,7 @@ #include <util/iterutil.hpp> #include <util/range.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename I, typename S = I> @@ -216,5 +215,4 @@ cyclic_view(const std::initializer_list<T> &list) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/debug.cpp b/src/util/debug.cpp index c0924d9c..cecaa2a4 100644 --- a/src/util/debug.cpp +++ b/src/util/debug.cpp @@ -9,8 +9,7 @@ #include <util/ioutil.hpp> #include <util/unwind.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { std::mutex global_debug_cerr_mutex; @@ -61,5 +60,4 @@ std::ostream& debug_emit_trace_leader( } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/debug.hpp b/src/util/debug.hpp index 08c6c0dc..331ca6af 100644 --- a/src/util/debug.hpp +++ b/src/util/debug.hpp @@ -8,8 +8,7 @@ #include <threading/threading.hpp> #include "unwind.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { constexpr inline bool is_debug_mode() { @@ -49,7 +48,7 @@ extern std::mutex global_debug_cerr_mutex; template <typename... Args> void debug_emit_trace(const char* file, int line, const char* varlist, const Args&... args) { - if (nest::mc::threading::multithreaded()) { + if (arb::threading::multithreaded()) { std::stringstream buffer; buffer.precision(17); @@ -96,11 +95,10 @@ impl::sepval<Seq, Separator> sepval(const Seq& seq, Separator sep) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb #ifdef NMC_HAVE_TRACE - #define TRACE(vars...) nest::mc::util::debug_emit_trace(__FILE__, __LINE__, #vars, ##vars) + #define TRACE(vars...) arb::util::debug_emit_trace(__FILE__, __LINE__, #vars, ##vars) #else #define TRACE(...) #endif @@ -114,7 +112,7 @@ impl::sepval<Seq, Separator> sepval(const Seq& seq, Separator sep) { #define EXPECTS(condition) \ (void)((condition) || \ - nest::mc::util::global_failed_assertion_handler(#condition, __FILE__, __LINE__, DEBUG_FUNCTION_NAME)) + arb::util::global_failed_assertion_handler(#condition, __FILE__, __LINE__, DEBUG_FUNCTION_NAME)) #else #define EXPECTS(condition) \ (void)(false && (condition)) diff --git a/src/util/double_buffer.hpp b/src/util/double_buffer.hpp index 31cffa1b..9a56a521 100644 --- a/src/util/double_buffer.hpp +++ b/src/util/double_buffer.hpp @@ -5,8 +5,7 @@ #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { /// double buffer with thread safe exchange/flip operation. @@ -62,5 +61,4 @@ public: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/either.hpp b/src/util/either.hpp index 9fd406a2..4adc4c2b 100644 --- a/src/util/either.hpp +++ b/src/util/either.hpp @@ -14,8 +14,7 @@ #include "util/meta.hpp" #include "util/uninitialized.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { struct either_invalid_access: std::runtime_error { @@ -383,5 +382,4 @@ public: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/file.hpp b/src/util/file.hpp index 730fb849..f085eb47 100644 --- a/src/util/file.hpp +++ b/src/util/file.hpp @@ -3,8 +3,7 @@ #include <string> #include <fstream> -namespace nest { -namespace mc { +namespace arb { namespace util { inline bool file_exists(const std::string& file_path) { @@ -13,5 +12,4 @@ inline bool file_exists(const std::string& file_path) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/filter.hpp b/src/util/filter.hpp index b28be522..1db4d6d5 100644 --- a/src/util/filter.hpp +++ b/src/util/filter.hpp @@ -14,8 +14,7 @@ #include <util/debug.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { namespace impl { @@ -241,5 +240,4 @@ filter(const Seq& s, const F& f) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/handle_set.hpp b/src/util/handle_set.hpp index 04086c1e..3a161687 100644 --- a/src/util/handle_set.hpp +++ b/src/util/handle_set.hpp @@ -14,8 +14,7 @@ * handles; smarter versions to be implemented as required. */ -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename Handle> @@ -58,6 +57,5 @@ private: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/hostname.cpp b/src/util/hostname.cpp index c39f3084..85152e90 100644 --- a/src/util/hostname.cpp +++ b/src/util/hostname.cpp @@ -10,8 +10,7 @@ extern "C" { } #endif -namespace nest { -namespace mc { +namespace arb { namespace util { #ifdef __linux__ @@ -32,6 +31,5 @@ util::optional<std::string> hostname() { #endif } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/hostname.hpp b/src/util/hostname.hpp index ae735ef5..7034fd51 100644 --- a/src/util/hostname.hpp +++ b/src/util/hostname.hpp @@ -4,13 +4,11 @@ #include <util/optional.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { // Get the name of the host on which this process is running. util::optional<std::string> hostname(); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/indirect.hpp b/src/util/indirect.hpp index 30501e3d..0205a15a 100644 --- a/src/util/indirect.hpp +++ b/src/util/indirect.hpp @@ -14,8 +14,7 @@ #include <util/transform.hpp> #include <util/meta.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { // Seq: random access sequence @@ -45,5 +44,4 @@ auto indirect_view(RASeq&& data, const Seq& index_map) DEDUCED_RETURN_TYPE(transform_view(index_map, impl::indirect_accessor<RASeq>(std::move(data)))); } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/ioutil.hpp b/src/util/ioutil.hpp index 2feab394..b45db228 100644 --- a/src/util/ioutil.hpp +++ b/src/util/ioutil.hpp @@ -2,8 +2,7 @@ #include <iostream> -namespace nest { -namespace mc { +namespace arb { namespace util { class iosfmt_guard { @@ -94,6 +93,5 @@ private: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/iterutil.hpp b/src/util/iterutil.hpp index 6c8e1350..2d3478c0 100644 --- a/src/util/iterutil.hpp +++ b/src/util/iterutil.hpp @@ -13,8 +13,7 @@ #include <util/compat.hpp> #include <util/meta.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { /* @@ -214,5 +213,4 @@ public: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/make_unique.hpp b/src/util/make_unique.hpp index 09cff7c0..6b345c12 100644 --- a/src/util/make_unique.hpp +++ b/src/util/make_unique.hpp @@ -2,8 +2,7 @@ #include <memory> -namespace nest { -namespace mc { +namespace arb { namespace util { // just because we aren't using C++14, doesn't mean we shouldn't go @@ -14,7 +13,6 @@ std::unique_ptr<T> make_unique(Args&&... args) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/meta.hpp b/src/util/meta.hpp index 8984bc6b..18820aa9 100644 --- a/src/util/meta.hpp +++ b/src/util/meta.hpp @@ -8,8 +8,7 @@ #include <util/compat.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { // Until C++14 ... @@ -276,5 +275,4 @@ struct second_t { constexpr second_t second{}; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/nop.hpp b/src/util/nop.hpp index 6ec568b9..4f3fdd3d 100644 --- a/src/util/nop.hpp +++ b/src/util/nop.hpp @@ -8,8 +8,7 @@ #include <functional> -namespace nest { -namespace mc { +namespace arb { namespace util { struct nop_function_t { @@ -31,5 +30,4 @@ struct nop_function_t { static constexpr nop_function_t nop_function; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/optional.hpp b/src/util/optional.hpp index 56a75add..f674f8f3 100644 --- a/src/util/optional.hpp +++ b/src/util/optional.hpp @@ -22,8 +22,7 @@ #include "util/meta.hpp" #include "util/uninitialized.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename X> struct optional; @@ -429,5 +428,4 @@ optional<X> just(X&& x) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/partition.hpp b/src/util/partition.hpp index 425d41f1..a4138b66 100644 --- a/src/util/partition.hpp +++ b/src/util/partition.hpp @@ -9,8 +9,7 @@ #include <util/partition_iterator.hpp> #include <util/range.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { struct invalid_partition: std::runtime_error { @@ -173,5 +172,4 @@ make_partition(Part& divisions, const Sizes& sizes, T from=T{}) { } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/partition_iterator.hpp b/src/util/partition_iterator.hpp index fbfcb93c..1f23f718 100644 --- a/src/util/partition_iterator.hpp +++ b/src/util/partition_iterator.hpp @@ -15,8 +15,7 @@ #include <util/iterutil.hpp> #include <util/meta.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename I> @@ -66,5 +65,4 @@ public: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/path.cpp b/src/util/path.cpp index 88c74b56..df571b2f 100644 --- a/src/util/path.cpp +++ b/src/util/path.cpp @@ -20,8 +20,7 @@ extern "C" { #include <util/scope_exit.hpp> #include <util/path.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { namespace posix { @@ -102,6 +101,5 @@ file_status symlink_status(const path& p, std::error_code& ec) { } // namespace posix } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/path.hpp b/src/util/path.hpp index e3114518..dd1725c8 100644 --- a/src/util/path.hpp +++ b/src/util/path.hpp @@ -26,8 +26,7 @@ #include <util/meta.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { class posix_path { @@ -370,7 +369,7 @@ inline std::vector<path> glob(const std::string& pattern) { inline file_status status(const path& p) { std::error_code ec; - auto r = ::nest::mc::util::posix::status(p, ec); + auto r = ::arb::util::posix::status(p, ec); if (ec) { throw filesystem_error("status()", p, ec); } @@ -426,6 +425,5 @@ inline bool exists(const path& p, std::error_code& ec) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/pprintf.hpp b/src/util/pprintf.hpp index 9e038101..f93d58f5 100644 --- a/src/util/pprintf.hpp +++ b/src/util/pprintf.hpp @@ -7,8 +7,7 @@ #include <string> #include <sstream> -namespace nest { -namespace mc { +namespace arb { namespace util { inline std::string pprintf(const char *s) { @@ -47,5 +46,4 @@ std::string pprintf(const char *s, T value, Args... args) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/range.hpp b/src/util/range.hpp index 6df51e35..c177f80b 100644 --- a/src/util/range.hpp +++ b/src/util/range.hpp @@ -37,8 +37,7 @@ #include <util/meta.hpp> #include <util/sentinel.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename U, typename S = U> @@ -184,5 +183,4 @@ auto strict_view(const Seq& s) -> range<decltype(std::begin(s))> } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/rangeutil.hpp b/src/util/rangeutil.hpp index e7ee41ed..ba2a3c0a 100644 --- a/src/util/rangeutil.hpp +++ b/src/util/rangeutil.hpp @@ -16,8 +16,7 @@ #include <util/transform.hpp> #include <util/meta.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { // Present a single item as a range @@ -373,6 +372,5 @@ C make_copy(Seq const& seq) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/scope_exit.hpp b/src/util/scope_exit.hpp index c5bb28b4..2bd619fb 100644 --- a/src/util/scope_exit.hpp +++ b/src/util/scope_exit.hpp @@ -5,8 +5,7 @@ // Convenience class for RAII control of resources. -namespace nest { -namespace mc { +namespace arb { namespace util { // `scope_exit` guard object will call provided functional object @@ -50,5 +49,4 @@ scope_exit<typename std::decay<F>::type> on_scope_exit(F&& f) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/sentinel.hpp b/src/util/sentinel.hpp index 3cfd84e3..961a4b44 100644 --- a/src/util/sentinel.hpp +++ b/src/util/sentinel.hpp @@ -10,8 +10,7 @@ * algorithms. */ -namespace nest { -namespace mc { +namespace arb { namespace util { template<typename I, typename S, bool Same> @@ -27,7 +26,7 @@ struct iterator_category_select<I,S,true> { template <typename I, typename S> class sentinel_iterator { - nest::mc::util::either<I, S> e_; + arb::util::either<I, S> e_; I& iter() { EXPECTS(!is_sentinel()); @@ -189,5 +188,4 @@ sentinel_iterator_t<I, S> make_sentinel_end(const I& i, const S& s) { } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/span.hpp b/src/util/span.hpp index 06cdfa36..6767ba34 100644 --- a/src/util/span.hpp +++ b/src/util/span.hpp @@ -10,8 +10,7 @@ #include <util/counter.hpp> #include <util/range.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { template <typename I> @@ -29,5 +28,4 @@ span<typename std::common_type<I, J>::type> make_span(std::pair<I, J> interval) } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/strprintf.hpp b/src/util/strprintf.hpp index e40a2d71..738353f9 100644 --- a/src/util/strprintf.hpp +++ b/src/util/strprintf.hpp @@ -10,8 +10,7 @@ #include <utility> #include <vector> -namespace nest { -namespace mc { +namespace arb { namespace util { namespace impl { @@ -49,5 +48,4 @@ std::string strprintf(const std::string& fmt, Args&&... args) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/transform.hpp b/src/util/transform.hpp index ed9a31d6..c91dbba7 100644 --- a/src/util/transform.hpp +++ b/src/util/transform.hpp @@ -13,8 +13,7 @@ #include <util/meta.hpp> #include <util/range.hpp> -namespace nest { -namespace mc { +namespace arb { namespace util { /* Note, this is actually only an input iterator if F is non-assignable, such @@ -151,5 +150,4 @@ transform_view(Seq&& s, const F& f) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/uninitialized.hpp b/src/util/uninitialized.hpp index f9c1bf36..b5653939 100644 --- a/src/util/uninitialized.hpp +++ b/src/util/uninitialized.hpp @@ -15,8 +15,7 @@ #include "util/compat.hpp" #include "util/meta.hpp" -namespace nest { -namespace mc { +namespace arb { namespace util { /* @@ -145,5 +144,4 @@ public: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/unique_any.hpp b/src/util/unique_any.hpp index 758356db..5091cc56 100644 --- a/src/util/unique_any.hpp +++ b/src/util/unique_any.hpp @@ -44,8 +44,7 @@ // After which a is in moved from state. -namespace nest { -namespace mc { +namespace arb { namespace util { class unique_any { @@ -207,5 +206,4 @@ unique_any make_unique_any(Args&&... args) { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/src/util/unwind.cpp b/src/util/unwind.cpp index 4a64712e..d74abdb8 100644 --- a/src/util/unwind.cpp +++ b/src/util/unwind.cpp @@ -16,8 +16,7 @@ #include <iostream> #include <vector> -namespace nest { -namespace mc { +namespace arb { namespace util { static_assert(sizeof(std::uintptr_t)>=sizeof(unw_word_t), @@ -66,7 +65,7 @@ std::string demangle(std::string s) { } void backtrace::print(bool stop_at_main) const { - using namespace nest::mc::memory::util; + using namespace arb::memory::util; auto i = 0; while (file_exists("backtrace_" + std::to_string(i))) { @@ -88,11 +87,10 @@ void backtrace::print(bool stop_at_main) const { } } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb #else -nest::mc::util::backtrace::backtrace() {} -void nest::mc::util::backtrace::print(bool) const {} +arb::util::backtrace::backtrace() {} +void arb::util::backtrace::print(bool) const {} #endif diff --git a/src/util/unwind.hpp b/src/util/unwind.hpp index 68c1cdfd..e9480e14 100644 --- a/src/util/unwind.hpp +++ b/src/util/unwind.hpp @@ -4,8 +4,7 @@ #include <string> #include <vector> -namespace nest { -namespace mc { +namespace arb { namespace util { /// Represents a source code location as a function name and address @@ -34,5 +33,4 @@ private: }; } // namespace util -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/common_cells.hpp b/tests/common_cells.hpp index feae376d..dc6d0d19 100644 --- a/tests/common_cells.hpp +++ b/tests/common_cells.hpp @@ -6,8 +6,7 @@ #include <math.hpp> #include <parameter_list.hpp> -namespace nest { -namespace mc { +namespace arb { /* * Create cell with just a soma: @@ -298,5 +297,4 @@ inline cell make_cell_simple_cable(bool with_stim = true) { return c; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/global_communication/mpi_listener.hpp b/tests/global_communication/mpi_listener.hpp index c255c6be..4049d096 100644 --- a/tests/global_communication/mpi_listener.hpp +++ b/tests/global_communication/mpi_listener.hpp @@ -65,8 +65,8 @@ private: public: mpi_listener(std::string f_base="") { - rank_ = nest::mc::communication::global_policy::id(); - size_ = nest::mc::communication::global_policy::size(); + rank_ = arb::communication::global_policy::id(); + size_ = arb::communication::global_policy::size(); if (f_base.empty()) { return; @@ -149,7 +149,7 @@ public: // count the number of ranks that had errors int global_errors = - nest::mc::communication::global_policy::sum(test_failures_>0 ? 1 : 0); + arb::communication::global_policy::sum(test_failures_>0 ? 1 : 0); if (global_errors>0) { test_case_failures_++; printf_helper(" GLOBAL_FAIL on %d ranks\n", global_errors); diff --git a/tests/global_communication/test.cpp b/tests/global_communication/test.cpp index 6eb24903..d0b917e0 100644 --- a/tests/global_communication/test.cpp +++ b/tests/global_communication/test.cpp @@ -13,7 +13,7 @@ #include <util/ioutil.hpp> -using namespace nest::mc; +using namespace arb; const char* usage_str = "[OPTION]...\n" diff --git a/tests/global_communication/test_communicator.cpp b/tests/global_communication/test_communicator.cpp index e2f65c01..532e7444 100644 --- a/tests/global_communication/test_communicator.cpp +++ b/tests/global_communication/test_communicator.cpp @@ -11,7 +11,7 @@ #include <util/rangeutil.hpp> #include <util/span.hpp> -using namespace nest::mc; +using namespace arb; using communicator_type = communication::communicator<communication::global_policy>; diff --git a/tests/global_communication/test_domain_decomposition.cpp b/tests/global_communication/test_domain_decomposition.cpp index e6ddfd86..745d1641 100644 --- a/tests/global_communication/test_domain_decomposition.cpp +++ b/tests/global_communication/test_domain_decomposition.cpp @@ -14,7 +14,7 @@ #include "../simple_recipes.hpp" -using namespace nest::mc; +using namespace arb; using communicator_type = communication::communicator<communication::global_policy>; diff --git a/tests/global_communication/test_exporter_spike_file.cpp b/tests/global_communication/test_exporter_spike_file.cpp index 376230ed..500a8985 100644 --- a/tests/global_communication/test_exporter_spike_file.cpp +++ b/tests/global_communication/test_exporter_spike_file.cpp @@ -13,10 +13,10 @@ class exporter_spike_file_fixture : public ::testing::Test { protected: - using communicator_type = nest::mc::communication::global_policy; + using communicator_type = arb::communication::global_policy; using exporter_type = - nest::mc::io::exporter_spike_file<communicator_type>; + arb::io::exporter_spike_file<communicator_type>; std::string file_name_; std::string path_; @@ -87,7 +87,7 @@ TEST_F(exporter_spike_file_fixture, do_export) { exporter_type exporter(file_name_, path_, extension_); // Create some spikes - std::vector<nest::mc::spike> spikes; + std::vector<arb::spike> spikes; spikes.push_back({ { 0, 0 }, 0.0 }); spikes.push_back({ { 0, 0 }, 0.1 }); spikes.push_back({ { 1, 0 }, 1.0 }); diff --git a/tests/global_communication/test_mpi.cpp b/tests/global_communication/test_mpi.cpp index 8d676a17..d122ff36 100644 --- a/tests/global_communication/test_mpi.cpp +++ b/tests/global_communication/test_mpi.cpp @@ -9,8 +9,8 @@ #include <communication/mpi.hpp> #include <util/rangeutil.hpp> -using namespace nest::mc; -using namespace nest::mc::communication; +using namespace arb; +using namespace arb::communication; struct big_thing { big_thing() {} diff --git a/tests/modcc/test_simd_backend.cpp b/tests/modcc/test_simd_backend.cpp index 2e379ae6..03cded6e 100644 --- a/tests/modcc/test_simd_backend.cpp +++ b/tests/modcc/test_simd_backend.cpp @@ -4,7 +4,7 @@ #include "token.hpp" #include "test.hpp" -using namespace nest::mc; +using namespace arb; TEST(avx512, emit_binary_op) { diff --git a/tests/performance/io/disk_io.cpp b/tests/performance/io/disk_io.cpp index c671e907..9dc6f416 100644 --- a/tests/performance/io/disk_io.cpp +++ b/tests/performance/io/disk_io.cpp @@ -14,7 +14,7 @@ #include <profiling/profiler.hpp> #include <spike.hpp> -using namespace nest::mc; +using namespace arb; using global_policy = communication::global_policy; using timer = util::timer_type; diff --git a/tests/simple_recipes.hpp b/tests/simple_recipes.hpp index 0dd68736..338b0a55 100644 --- a/tests/simple_recipes.hpp +++ b/tests/simple_recipes.hpp @@ -8,8 +8,7 @@ #include <cell.hpp> #include <recipe.hpp> -namespace nest { -namespace mc { +namespace arb { // Common functionality: maintain an unordered map of probe data // per gid, built with `add_probe()`. @@ -109,6 +108,5 @@ protected: }; -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/ubench/accumulate_functor_values.cpp b/tests/ubench/accumulate_functor_values.cpp index 19fa94a6..fdf6653b 100644 --- a/tests/ubench/accumulate_functor_values.cpp +++ b/tests/ubench/accumulate_functor_values.cpp @@ -15,7 +15,7 @@ #define NOINLINE __attribute__((noinline)) -using namespace nest::mc; +using namespace arb; inline long long square_function(long long x) { return x*x; } diff --git a/tests/ubench/cuda_reduce_by_key.cu b/tests/ubench/cuda_reduce_by_key.cu index 2863b42a..d5a00046 100644 --- a/tests/ubench/cuda_reduce_by_key.cu +++ b/tests/ubench/cuda_reduce_by_key.cu @@ -16,7 +16,7 @@ #include <backends/gpu/intrinsics.hpp> #include <util/rangeutil.hpp> -using namespace nest::mc; +using namespace arb; // Run benchmarks // * with between 100:1million entries to update diff --git a/tests/unit/stats.hpp b/tests/unit/stats.hpp index b2430738..1e26caf7 100644 --- a/tests/unit/stats.hpp +++ b/tests/unit/stats.hpp @@ -57,7 +57,7 @@ namespace ks { template <typename Seq> double dn_statistic(const Seq& qs) { - double n = static_cast<double>(nest::mc::util::size(qs)); + double n = static_cast<double>(arb::util::size(qs)); double d = 0; int j = 0; for (auto q: qs) { diff --git a/tests/unit/test_algorithms.cpp b/tests/unit/test_algorithms.cpp index 26902f41..ac15a43c 100644 --- a/tests/unit/test_algorithms.cpp +++ b/tests/unit/test_algorithms.cpp @@ -23,7 +23,7 @@ TEST(algorithms, parallel_sort) // assert that the original vector has in fact been permuted EXPECT_FALSE(std::is_sorted(v.begin(), v.end())); - nest::mc::threading::sort(v); + arb::threading::sort(v); EXPECT_TRUE(std::is_sorted(v.begin(), v.end())); for(auto i=0; i<n; ++i) { @@ -36,7 +36,7 @@ TEST(algorithms, sum) { // sum of 10 times 2 is 20 std::vector<int> v1(10, 2); - EXPECT_EQ(10*2, nest::mc::algorithms::sum(v1)); + EXPECT_EQ(10*2, arb::algorithms::sum(v1)); // make an array 1:20 and sum it up using formula for arithmetic sequence auto n = 20; @@ -45,28 +45,28 @@ TEST(algorithms, sum) // the result being required in EXPECT_EQ // std::iota(v2.begin(), v2.end(), 1); for(auto i=0; i<n; ++i) { v2[i] = i+1; } - EXPECT_EQ((n+1)*n/2, nest::mc::algorithms::sum(v2)); + EXPECT_EQ((n+1)*n/2, arb::algorithms::sum(v2)); } TEST(algorithms, make_index) { { std::vector<int> v(10, 1); - auto index = nest::mc::algorithms::make_index(v); + auto index = arb::algorithms::make_index(v); EXPECT_EQ(index.size(), 11u); EXPECT_EQ(index.front(), 0); - EXPECT_EQ(index.back(), nest::mc::algorithms::sum(v)); + EXPECT_EQ(index.back(), arb::algorithms::sum(v)); } { std::vector<int> v(10); std::iota(v.begin(), v.end(), 1); - auto index = nest::mc::algorithms::make_index(v); + auto index = arb::algorithms::make_index(v); EXPECT_EQ(index.size(), 11u); EXPECT_EQ(index.front(), 0); - EXPECT_EQ(index.back(), nest::mc::algorithms::sum(v)); + EXPECT_EQ(index.back(), arb::algorithms::sum(v)); } } @@ -74,69 +74,69 @@ TEST(algorithms, minimal_degree) { { std::vector<int> v = {0}; - EXPECT_TRUE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_TRUE(arb::algorithms::is_minimal_degree(v)); } { std::vector<int> v = {0, 0, 1, 2, 3, 4}; - EXPECT_TRUE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_TRUE(arb::algorithms::is_minimal_degree(v)); } { std::vector<int> v = {0, 0, 1, 2, 0, 4}; - EXPECT_TRUE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_TRUE(arb::algorithms::is_minimal_degree(v)); } { std::vector<int> v = {0, 0, 1, 2, 0, 4, 5, 4}; - EXPECT_TRUE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_TRUE(arb::algorithms::is_minimal_degree(v)); } { std::vector<int> v = {1}; - EXPECT_FALSE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_FALSE(arb::algorithms::is_minimal_degree(v)); } { std::vector<int> v = {0, 2}; - EXPECT_FALSE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_FALSE(arb::algorithms::is_minimal_degree(v)); } { std::vector<int> v = {0, 1, 2}; - EXPECT_FALSE(nest::mc::algorithms::is_minimal_degree(v)); + EXPECT_FALSE(arb::algorithms::is_minimal_degree(v)); } } TEST(algorithms, is_strictly_monotonic_increasing) { EXPECT_TRUE( - nest::mc::algorithms::is_strictly_monotonic_increasing( + arb::algorithms::is_strictly_monotonic_increasing( std::vector<int>{0} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_strictly_monotonic_increasing( + arb::algorithms::is_strictly_monotonic_increasing( std::vector<int>{0, 1, 2, 3} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_strictly_monotonic_increasing( + arb::algorithms::is_strictly_monotonic_increasing( std::vector<int>{8, 20, 42, 89} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_increasing( + arb::algorithms::is_strictly_monotonic_increasing( std::vector<int>{0, 0} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_increasing( + arb::algorithms::is_strictly_monotonic_increasing( std::vector<int>{8, 20, 20, 89} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_increasing( + arb::algorithms::is_strictly_monotonic_increasing( std::vector<int>{3, 2, 1, 0} ) ); @@ -145,32 +145,32 @@ TEST(algorithms, is_strictly_monotonic_increasing) TEST(algorithms, is_strictly_monotonic_decreasing) { EXPECT_TRUE( - nest::mc::algorithms::is_strictly_monotonic_decreasing( + arb::algorithms::is_strictly_monotonic_decreasing( std::vector<int>{0} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_strictly_monotonic_decreasing( + arb::algorithms::is_strictly_monotonic_decreasing( std::vector<int>{3, 2, 1, 0} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_decreasing( + arb::algorithms::is_strictly_monotonic_decreasing( std::vector<int>{0, 1, 2, 3} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_decreasing( + arb::algorithms::is_strictly_monotonic_decreasing( std::vector<int>{8, 20, 42, 89} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_decreasing( + arb::algorithms::is_strictly_monotonic_decreasing( std::vector<int>{0, 0} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_strictly_monotonic_decreasing( + arb::algorithms::is_strictly_monotonic_decreasing( std::vector<int>{8, 20, 20, 89} ) ); @@ -179,22 +179,22 @@ TEST(algorithms, is_strictly_monotonic_decreasing) TEST(algorithms, is_positive) { EXPECT_TRUE( - nest::mc::algorithms::is_positive( + arb::algorithms::is_positive( std::vector<int>{} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_positive( + arb::algorithms::is_positive( std::vector<int>{3, 2, 1} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_positive( + arb::algorithms::is_positive( std::vector<int>{3, 2, 1, 0} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_positive( + arb::algorithms::is_positive( std::vector<int>{-1} ) ); @@ -214,7 +214,7 @@ TEST(algorithms, has_contiguous_compartments) // 5 6 // EXPECT_FALSE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{0, 0, 1, 2, 2, 3, 4, 2} ) ); @@ -231,7 +231,7 @@ TEST(algorithms, has_contiguous_compartments) // 4 7 // EXPECT_FALSE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{0, 0, 1, 2, 3, 2, 2, 5} ) ); @@ -248,7 +248,7 @@ TEST(algorithms, has_contiguous_compartments) // 4 6 // EXPECT_TRUE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{0, 0, 1, 2, 3, 2, 5, 2} ) ); @@ -265,7 +265,7 @@ TEST(algorithms, has_contiguous_compartments) // 4 6 // EXPECT_TRUE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{0, 0, 1, 2, 3, 2, 5, 1} ) ); @@ -278,21 +278,21 @@ TEST(algorithms, has_contiguous_compartments) // 3 4 // EXPECT_TRUE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{0, 0, 0, 1, 1} ) ); // Soma-only list EXPECT_TRUE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{0} ) ); // Empty list EXPECT_TRUE( - nest::mc::algorithms::has_contiguous_compartments( + arb::algorithms::has_contiguous_compartments( std::vector<int>{} ) ); @@ -301,32 +301,32 @@ TEST(algorithms, has_contiguous_compartments) TEST(algorithms, is_unique) { EXPECT_TRUE( - nest::mc::algorithms::is_unique( + arb::algorithms::is_unique( std::vector<int>{} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_unique( + arb::algorithms::is_unique( std::vector<int>{0} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_unique( + arb::algorithms::is_unique( std::vector<int>{0,1,100} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_unique( + arb::algorithms::is_unique( std::vector<int>{0,0} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_unique( + arb::algorithms::is_unique( std::vector<int>{0,1,2,2,3,4} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_unique( + arb::algorithms::is_unique( std::vector<int>{0,1,2,3,4,4} ) ); @@ -335,42 +335,42 @@ TEST(algorithms, is_unique) TEST(algorithms, is_sorted) { EXPECT_TRUE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{100} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{0,1,2} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{0,2,100} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{0,0} ) ); EXPECT_TRUE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{0,1,2,2,2,2,3,4,5,5,5} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{0,1,2,1} ) ); EXPECT_FALSE( - nest::mc::algorithms::is_sorted( + arb::algorithms::is_sorted( std::vector<int>{1,0} ) ); @@ -399,16 +399,16 @@ TEST(algorithms, child_count) std::vector<int> expected_child_count = { 3, 1, 1, 0, 1, 0, 1, 1, 2, 1, 0, 1, 1, 0 }; - // auto count = nest::mc::algorithms::child_count(parent_index); + // auto count = arb::algorithms::child_count(parent_index); EXPECT_EQ(expected_child_count, - nest::mc::algorithms::child_count(parent_index)); + arb::algorithms::child_count(parent_index)); } } TEST(algorithms, branches) { - using namespace nest::mc; + using namespace arb; { // @@ -546,7 +546,7 @@ struct test_index_into { TEST(algorithms, index_into) { using C = std::vector<int>; - using nest::mc::util::size; + using arb::util::size; // by default index_into assumes that the inputs satisfy // quite a strong set of prerequisites @@ -565,14 +565,14 @@ TEST(algorithms, index_into) test_index_into tester; for(auto& t : tests) { EXPECT_TRUE( - tester(t.second, t.first, nest::mc::algorithms::index_into(t.second, t.first)) + tester(t.second, t.first, arb::algorithms::index_into(t.second, t.first)) ); } // test for arrays int sub[] = {2, 3, 5, 9}; int sup[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - auto idx = nest::mc::algorithms::index_into(sub, sup); + auto idx = arb::algorithms::index_into(sub, sup); EXPECT_EQ(size(sub), size(idx)); auto it = idx.begin(); for (auto i: sub) { @@ -582,7 +582,7 @@ TEST(algorithms, index_into) TEST(algorithms, binary_find) { - using nest::mc::algorithms::binary_find; + using arb::algorithms::binary_find; // empty containers { @@ -710,7 +710,7 @@ TEST(algorithms, binary_find) auto itv = binary_find(vr, 10); auto found = itv!=std::end(vr); EXPECT_TRUE(found); - EXPECT_EQ(std::distance(nest::mc::util::cbegin(v), itv), 1u); + EXPECT_EQ(std::distance(arb::util::cbegin(v), itv), 1u); if (found) { EXPECT_EQ(*itv, 10); } @@ -736,10 +736,10 @@ struct int_string { TEST(algorithms, binary_find_convert) { - using nest::mc::algorithms::binary_find; + using arb::algorithms::binary_find; std::vector<std::string> values = {"0", "10", "20", "30"}; - auto it = nest::mc::algorithms::binary_find(values, int_string{20}); + auto it = arb::algorithms::binary_find(values, int_string{20}); EXPECT_TRUE(it!=values.end()); EXPECT_TRUE(std::distance(values.begin(), it)==2u); diff --git a/tests/unit/test_any.cpp b/tests/unit/test_any.cpp index 594cb63a..12aa3598 100644 --- a/tests/unit/test_any.cpp +++ b/tests/unit/test_any.cpp @@ -9,7 +9,7 @@ #include <typeinfo> -using namespace nest::mc; +using namespace arb; TEST(any, copy_construction) { util::any any_int(2); diff --git a/tests/unit/test_atomics.cu b/tests/unit/test_atomics.cu index e92004f5..b1bac8d7 100644 --- a/tests/unit/test_atomics.cu +++ b/tests/unit/test_atomics.cu @@ -21,13 +21,13 @@ namespace kernels { TEST(gpu_intrinsics, cuda_atomic_add) { int expected = (128*129)/2; - auto f = nest::mc::gpu::make_managed_ptr<float>(0.f); + auto f = arb::gpu::make_managed_ptr<float>(0.f); kernels::test_atomic_add<<<1, 128>>>(f.get()); cudaDeviceSynchronize(); EXPECT_EQ(float(expected), *f); - auto d = nest::mc::gpu::make_managed_ptr<double>(0.); + auto d = arb::gpu::make_managed_ptr<double>(0.); kernels::test_atomic_add<<<1, 128>>>(d.get()); cudaDeviceSynchronize(); @@ -38,13 +38,13 @@ TEST(gpu_intrinsics, cuda_atomic_add) { TEST(gpu_intrinsics, cuda_atomic_sub) { int expected = -(128*129)/2; - auto f = nest::mc::gpu::make_managed_ptr<float>(0.f); + auto f = arb::gpu::make_managed_ptr<float>(0.f); kernels::test_atomic_sub<<<1, 128>>>(f.get()); cudaDeviceSynchronize(); EXPECT_EQ(float(expected), *f); - auto d = nest::mc::gpu::make_managed_ptr<double>(0.); + auto d = arb::gpu::make_managed_ptr<double>(0.); kernels::test_atomic_sub<<<1, 128>>>(d.get()); cudaDeviceSynchronize(); diff --git a/tests/unit/test_backend.cpp b/tests/unit/test_backend.cpp index 109d7596..44142922 100644 --- a/tests/unit/test_backend.cpp +++ b/tests/unit/test_backend.cpp @@ -7,12 +7,12 @@ #include "../gtest.h" TEST(backends, gpu_is_null) { - using backend = nest::mc::gpu::backend; + using backend = arb::gpu::backend; - static_assert(std::is_same<backend, nest::mc::null_backend>::value || nest::mc::config::has_cuda, + static_assert(std::is_same<backend, arb::null_backend>::value || arb::config::has_cuda, "gpu back should be defined as null when compiling without gpu support."); - if (not nest::mc::config::has_cuda) { + if (not arb::config::has_cuda) { EXPECT_FALSE(backend::is_supported()); EXPECT_FALSE(backend::has_mechanism("hh")); diff --git a/tests/unit/test_cell.cpp b/tests/unit/test_cell.cpp index f36a62f6..8fbcabd4 100644 --- a/tests/unit/test_cell.cpp +++ b/tests/unit/test_cell.cpp @@ -7,7 +7,7 @@ TEST(cell_type, soma) // test that insertion of a soma works // define with no centre point { - nest::mc::cell c; + arb::cell c; auto soma_radius = 2.1; EXPECT_EQ(c.has_soma(), false); @@ -22,7 +22,7 @@ TEST(cell_type, soma) // test that insertion of a soma works // define with centre point @ (0,0,1) { - nest::mc::cell c; + arb::cell c; auto soma_radius = 3.2; EXPECT_EQ(c.has_soma(), false); @@ -40,7 +40,7 @@ TEST(cell_type, soma) TEST(cell_type, add_segment) { - using namespace nest::mc; + using namespace arb; // add a pre-defined segment { cell c; @@ -103,7 +103,7 @@ TEST(cell_type, add_segment) TEST(cell_type, multiple_cables) { - using namespace nest::mc; + using namespace arb; // generate a cylindrical cable segment of length 1/pi and radius 1 // volume = 1 @@ -167,7 +167,7 @@ TEST(cell_type, multiple_cables) TEST(cell_type, clone) { - using namespace nest::mc; + using namespace arb; // make simple cell with multiple segments @@ -223,7 +223,7 @@ TEST(cell_type, clone) TEST(cell_type, get_kind) { - using namespace nest::mc; + using namespace arb; // make a MC cell cell c; diff --git a/tests/unit/test_compartments.cpp b/tests/unit/test_compartments.cpp index c80c0195..ac4503eb 100644 --- a/tests/unit/test_compartments.cpp +++ b/tests/unit/test_compartments.cpp @@ -10,17 +10,17 @@ #include <util/span.hpp> #include <util/transform.hpp> -using namespace nest::mc; -using namespace nest::mc::algorithms; -using namespace nest::mc::math; -using namespace nest::mc::util; +using namespace arb; +using namespace arb::algorithms; +using namespace arb::math; +using namespace arb::util; // not much to test here: just test that values passed into the constructor // are correctly stored in members TEST(compartments, compartment) { { - nest::mc::compartment c(100, 1.2, 2.1, 2.2); + arb::compartment c(100, 1.2, 2.1, 2.2); EXPECT_EQ(c.index, 100u); EXPECT_EQ(c.length, 1.2); EXPECT_EQ(c.radius.first, 2.1); @@ -34,7 +34,7 @@ TEST(compartments, compartment) } { - nest::mc::compartment c{100, 1, 2, 3}; + arb::compartment c{100, 1, 2, 3}; EXPECT_EQ(c.index, 100u); EXPECT_EQ(c.length, 1.); EXPECT_EQ(c.radius.first, 2.); @@ -44,7 +44,7 @@ TEST(compartments, compartment) TEST(compartments, make_compartment_range) { - using namespace nest::mc; + using namespace arb; auto rng = make_compartment_range(10, 1.0, 2.0, 10.); EXPECT_EQ((*rng.begin()).index, 0u); diff --git a/tests/unit/test_counter.cpp b/tests/unit/test_counter.cpp index 3a2320ab..f58c67ce 100644 --- a/tests/unit/test_counter.cpp +++ b/tests/unit/test_counter.cpp @@ -5,7 +5,7 @@ #include <util/counter.hpp> -using namespace nest::mc; +using namespace arb; template <typename V> class counter_test: public ::testing::Test {}; diff --git a/tests/unit/test_cycle.cpp b/tests/unit/test_cycle.cpp index 621f4515..6cac18a8 100644 --- a/tests/unit/test_cycle.cpp +++ b/tests/unit/test_cycle.cpp @@ -8,7 +8,7 @@ #include <util/cycle.hpp> #include <util/meta.hpp> -using namespace nest::mc; +using namespace arb; TEST(cycle_iterator, construct) { std::vector<int> values = { 4, 2, 3 }; diff --git a/tests/unit/test_domain_decomposition.cpp b/tests/unit/test_domain_decomposition.cpp index f9724af4..0b988fe3 100644 --- a/tests/unit/test_domain_decomposition.cpp +++ b/tests/unit/test_domain_decomposition.cpp @@ -9,7 +9,7 @@ #include "../simple_recipes.hpp" -using namespace nest::mc; +using namespace arb; namespace { // Dummy recipes types for testing. diff --git a/tests/unit/test_double_buffer.cpp b/tests/unit/test_double_buffer.cpp index 1fa04c1e..b8ec6ef7 100644 --- a/tests/unit/test_double_buffer.cpp +++ b/tests/unit/test_double_buffer.cpp @@ -6,7 +6,7 @@ // are correctly stored in members TEST(double_buffer, exchange_and_get) { - using namespace nest::mc::util; + using namespace arb::util; double_buffer<int> buf; @@ -27,7 +27,7 @@ TEST(double_buffer, exchange_and_get) TEST(double_buffer, assign_get_other) { - using namespace nest::mc::util; + using namespace arb::util; double_buffer<std::string> buf; @@ -40,7 +40,7 @@ TEST(double_buffer, assign_get_other) TEST(double_buffer, non_pod) { - using namespace nest::mc::util; + using namespace arb::util; double_buffer<std::string> buf; diff --git a/tests/unit/test_dss_cell_group.cpp b/tests/unit/test_dss_cell_group.cpp index 8c841bc2..d456225a 100644 --- a/tests/unit/test_dss_cell_group.cpp +++ b/tests/unit/test_dss_cell_group.cpp @@ -6,7 +6,7 @@ #include "../simple_recipes.hpp" -using namespace nest::mc; +using namespace arb; using dss_recipe = homogeneous_recipe<cell_kind::data_spike_source, dss_cell_description>; diff --git a/tests/unit/test_either.cpp b/tests/unit/test_either.cpp index f8a67da9..79344e21 100644 --- a/tests/unit/test_either.cpp +++ b/tests/unit/test_either.cpp @@ -7,7 +7,7 @@ // TODO: coverage! -using namespace nest::mc::util; +using namespace arb::util; TEST(either, basic) { either<int, std::string> e0(17); diff --git a/tests/unit/test_event_binner.cpp b/tests/unit/test_event_binner.cpp index b99501e0..f43e01eb 100644 --- a/tests/unit/test_event_binner.cpp +++ b/tests/unit/test_event_binner.cpp @@ -4,7 +4,7 @@ #include "common.hpp" -using namespace nest::mc; +using namespace arb; TEST(event_binner, basic) { using testing::seq_almost_eq; diff --git a/tests/unit/test_event_queue.cpp b/tests/unit/test_event_queue.cpp index de3762d2..8a3389a4 100644 --- a/tests/unit/test_event_queue.cpp +++ b/tests/unit/test_event_queue.cpp @@ -5,7 +5,7 @@ #include <event_queue.hpp> -using namespace nest::mc; +using namespace arb; TEST(event_queue, push) { using ps_event_queue = event_queue<postsynaptic_spike_event>; diff --git a/tests/unit/test_filter.cpp b/tests/unit/test_filter.cpp index d8ca4e64..5b1ecdc2 100644 --- a/tests/unit/test_filter.cpp +++ b/tests/unit/test_filter.cpp @@ -10,7 +10,7 @@ #include "common.hpp" -using namespace nest::mc; +using namespace arb; using util::filter; using util::assign; using util::canonical_view; diff --git a/tests/unit/test_fvm_multi.cpp b/tests/unit/test_fvm_multi.cpp index 97b9f2fa..eb7cafce 100644 --- a/tests/unit/test_fvm_multi.cpp +++ b/tests/unit/test_fvm_multi.cpp @@ -17,13 +17,13 @@ #include "../simple_recipes.hpp" using fvm_cell = - nest::mc::fvm::fvm_multicell<nest::mc::multicore::backend>; + arb::fvm::fvm_multicell<arb::multicore::backend>; TEST(fvm_multi, cable) { - using namespace nest::mc; + using namespace arb; - nest::mc::cell cell=make_cell_ball_and_3stick(); + arb::cell cell=make_cell_ball_and_3stick(); std::vector<fvm_cell::target_handle> targets; probe_association_map<fvm_cell::probe_handle> probe_map; @@ -46,9 +46,9 @@ TEST(fvm_multi, cable) TEST(fvm_multi, init) { - using namespace nest::mc; + using namespace arb; - nest::mc::cell cell = make_cell_ball_and_stick(); + arb::cell cell = make_cell_ball_and_stick(); const auto m = cell.model(); EXPECT_EQ(m.tree.num_segments(), 2u); @@ -110,9 +110,9 @@ TEST(fvm_multi, init) TEST(fvm_multi, multi_init) { - using namespace nest::mc; + using namespace arb; - nest::mc::cell cells[] = { + arb::cell cells[] = { make_cell_ball_and_stick(), make_cell_ball_and_3stick() }; @@ -172,7 +172,7 @@ TEST(fvm_multi, multi_init) // test that stimuli are added correctly TEST(fvm_multi, stimulus) { - using namespace nest::mc; + using namespace arb; // the default ball and stick has one stimulus at the terminal end of the dendrite auto cell = make_cell_ball_and_stick(); @@ -248,7 +248,7 @@ TEST(fvm_multi, stimulus) // test that mechanism indexes are computed correctly TEST(fvm_multi, mechanism_indexes) { - using namespace nest::mc; + using namespace arb; // create a cell with 4 sements: // a soma with a branching dendrite @@ -338,9 +338,9 @@ struct handle_info { // on a two-cell ball-and-stick system. void run_target_handle_test(std::vector<handle_info> all_handles) { - using namespace nest::mc; + using namespace arb; - nest::mc::cell cells[] = { + arb::cell cells[] = { make_cell_ball_and_stick(), make_cell_ball_and_stick() }; diff --git a/tests/unit/test_gpu_stack.cu b/tests/unit/test_gpu_stack.cu index 343d4142..214a8612 100644 --- a/tests/unit/test_gpu_stack.cu +++ b/tests/unit/test_gpu_stack.cu @@ -4,7 +4,7 @@ #include <backends/gpu/stack.hpp> #include <backends/gpu/managed_ptr.hpp> -using namespace nest::mc; +using namespace arb; TEST(stack, construction) { using T = int; @@ -21,7 +21,7 @@ namespace kernels { __global__ void push_back(gpu::stack_storage<int>& s, F f) { if (f(threadIdx.x)) { - nest::mc::gpu::push_back(s, int(threadIdx.x)); + arb::gpu::push_back(s, int(threadIdx.x)); } } diff --git a/tests/unit/test_intrin.cpp b/tests/unit/test_intrin.cpp index 8e96b1e4..e5c83a82 100644 --- a/tests/unit/test_intrin.cpp +++ b/tests/unit/test_intrin.cpp @@ -5,7 +5,7 @@ #include "../gtest.h" -using namespace nest::mc::multicore; +using namespace arb::multicore; constexpr double dqnan = std::numeric_limits<double>::quiet_NaN(); constexpr double dmax = std::numeric_limits<double>::max(); diff --git a/tests/unit/test_mask_stream.cpp b/tests/unit/test_mask_stream.cpp index a9b6bdd0..a14de4d3 100644 --- a/tests/unit/test_mask_stream.cpp +++ b/tests/unit/test_mask_stream.cpp @@ -4,7 +4,7 @@ #include <util/ioutil.hpp> -using namespace nest::mc::util; +using namespace arb::util; TEST(mask_stream,nomask) { // expect mask_stream(true) on a new stream not to change rdbuf. diff --git a/tests/unit/test_math.cpp b/tests/unit/test_math.cpp index f4f12d91..7ea1aeac 100644 --- a/tests/unit/test_math.cpp +++ b/tests/unit/test_math.cpp @@ -6,7 +6,7 @@ #include <math.hpp> #include <util/compat.hpp> -using namespace nest::mc::math; +using namespace arb::math; TEST(math, pi) { // check regression against long double literal in implementation diff --git a/tests/unit/test_matrix.cpp b/tests/unit/test_matrix.cpp index 7cc1e959..22f66f02 100644 --- a/tests/unit/test_matrix.cpp +++ b/tests/unit/test_matrix.cpp @@ -10,9 +10,9 @@ #include "common.hpp" -using namespace nest::mc; +using namespace arb; -using matrix_type = matrix<nest::mc::multicore::backend>; +using matrix_type = matrix<arb::multicore::backend>; using size_type = matrix_type::size_type; using value_type = matrix_type::value_type; diff --git a/tests/unit/test_matrix.cu b/tests/unit/test_matrix.cu index 7e5bf6cc..195f82ea 100644 --- a/tests/unit/test_matrix.cu +++ b/tests/unit/test_matrix.cu @@ -18,7 +18,7 @@ #include <cuda.h> -using namespace nest::mc; +using namespace arb; using gpu::impl::npos; using util::make_span; diff --git a/tests/unit/test_mc_cell_group.cpp b/tests/unit/test_mc_cell_group.cpp index 4d5b1469..151e8a0d 100644 --- a/tests/unit/test_mc_cell_group.cpp +++ b/tests/unit/test_mc_cell_group.cpp @@ -10,8 +10,8 @@ #include "../common_cells.hpp" #include "../simple_recipes.hpp" -using namespace nest::mc; -using fvm_cell = fvm::fvm_multicell<nest::mc::multicore::backend>; +using namespace arb; +using fvm_cell = fvm::fvm_multicell<arb::multicore::backend>; cell make_cell() { auto c = make_cell_ball_and_stick(); diff --git a/tests/unit/test_mc_cell_group.cu b/tests/unit/test_mc_cell_group.cu index 0bf73d49..331a2e94 100644 --- a/tests/unit/test_mc_cell_group.cu +++ b/tests/unit/test_mc_cell_group.cu @@ -9,8 +9,8 @@ #include "../common_cells.hpp" #include "../simple_recipes.hpp" -using namespace nest::mc; -using fvm_cell = fvm::fvm_multicell<nest::mc::gpu::backend>; +using namespace arb; +using fvm_cell = fvm::fvm_multicell<arb::gpu::backend>; cell make_cell() { auto c = make_cell_ball_and_stick(); diff --git a/tests/unit/test_mechanisms.cpp b/tests/unit/test_mechanisms.cpp index 9ae67eab..7d3dae4e 100644 --- a/tests/unit/test_mechanisms.cpp +++ b/tests/unit/test_mechanisms.cpp @@ -25,7 +25,7 @@ #include <util/cycle.hpp> TEST(mechanisms, helpers) { - using namespace nest::mc; + using namespace arb; using size_type = multicore::backend::size_type; using value_type = multicore::backend::value_type; @@ -68,7 +68,7 @@ TEST(mechanisms, helpers) { template<typename T> void mech_update(T* mech, unsigned num_iters) { - using namespace nest::mc; + using namespace arb; std::map<ionKind, ion<typename T::backend>> ions; mech->set_params(); @@ -149,9 +149,9 @@ TYPED_TEST_P(mechanisms, update) { typename mechanism_type::array time_to(num_cell, 2.1); typename mechanism_type::array dt(num_comp, 2.1-2.); - array_init(voltage, nest::mc::util::cyclic_view({ -65.0, -61.0, -63.0 })); - array_init(current, nest::mc::util::cyclic_view({ 1.0, 0.9, 1.1 })); - array_init(weights, nest::mc::util::cyclic_view({ 1.0 })); + array_init(voltage, arb::util::cyclic_view({ -65.0, -61.0, -63.0 })); + array_init(current, arb::util::cyclic_view({ 1.0, 0.9, 1.1 })); + array_init(weights, arb::util::cyclic_view({ 1.0 })); // Initialise indexes std::vector<int> index_freq; @@ -162,7 +162,7 @@ TYPED_TEST_P(mechanisms, update) { index_freq.assign({ 1 }); } - auto freq_begin = nest::mc::util::cyclic_view(index_freq).cbegin(); + auto freq_begin = arb::util::cyclic_view(index_freq).cbegin(); auto freq = freq_begin; auto index = node_index.begin(); while (index != node_index.end()) { @@ -179,12 +179,12 @@ TYPED_TEST_P(mechanisms, update) { typename mechanism_type::array weights_copy(weights); // Create mechanisms - auto mech = nest::mc::make_mechanism<mechanism_type>( + auto mech = arb::make_mechanism<mechanism_type>( 0, cell_index, time, time_to, dt, voltage, current, std::move(weights), std::move(node_index) ); - auto mech_proto = nest::mc::make_mechanism<proto_mechanism_type>( + auto mech_proto = arb::make_mechanism<proto_mechanism_type>( 0, cell_index, time, time_to, dt, voltage_copy, current_copy, std::move(weights_copy), std::move(node_index_copy) @@ -203,30 +203,30 @@ REGISTER_TYPED_TEST_CASE_P(mechanisms, update); using mechanism_types = ::testing::Types< mechanism_info< - nest::mc::multicore::mechanism_hh<nest::mc::multicore::backend>, - nest::mc::multicore::mechanism_hh_proto<nest::mc::multicore::backend> + arb::multicore::mechanism_hh<arb::multicore::backend>, + arb::multicore::mechanism_hh_proto<arb::multicore::backend> >, mechanism_info< - nest::mc::multicore::mechanism_pas<nest::mc::multicore::backend>, - nest::mc::multicore::mechanism_pas_proto<nest::mc::multicore::backend> + arb::multicore::mechanism_pas<arb::multicore::backend>, + arb::multicore::mechanism_pas_proto<arb::multicore::backend> >, mechanism_info< - nest::mc::multicore::mechanism_expsyn<nest::mc::multicore::backend>, - nest::mc::multicore::mechanism_expsyn_proto<nest::mc::multicore::backend>, + arb::multicore::mechanism_expsyn<arb::multicore::backend>, + arb::multicore::mechanism_expsyn_proto<arb::multicore::backend>, true >, mechanism_info< - nest::mc::multicore::mechanism_exp2syn<nest::mc::multicore::backend>, - nest::mc::multicore::mechanism_exp2syn_proto<nest::mc::multicore::backend>, + arb::multicore::mechanism_exp2syn<arb::multicore::backend>, + arb::multicore::mechanism_exp2syn_proto<arb::multicore::backend>, true >, mechanism_info< - nest::mc::multicore::mechanism_test_kin1<nest::mc::multicore::backend>, - nest::mc::multicore::mechanism_test_kin1_proto<nest::mc::multicore::backend> + arb::multicore::mechanism_test_kin1<arb::multicore::backend>, + arb::multicore::mechanism_test_kin1_proto<arb::multicore::backend> >, mechanism_info< - nest::mc::multicore::mechanism_test_kinlva<nest::mc::multicore::backend>, - nest::mc::multicore::mechanism_test_kinlva_proto<nest::mc::multicore::backend> + arb::multicore::mechanism_test_kinlva<arb::multicore::backend>, + arb::multicore::mechanism_test_kinlva_proto<arb::multicore::backend> > >; diff --git a/tests/unit/test_multi_event_stream.cpp b/tests/unit/test_multi_event_stream.cpp index 7b3c8738..8183e57a 100644 --- a/tests/unit/test_multi_event_stream.cpp +++ b/tests/unit/test_multi_event_stream.cpp @@ -5,7 +5,7 @@ #include <backends/multicore/multi_event_stream.hpp> #include <util/rangeutil.hpp> -using namespace nest::mc; +using namespace arb; namespace common_events { // set up four targets across three streams and two mech ids. diff --git a/tests/unit/test_multi_event_stream.cu b/tests/unit/test_multi_event_stream.cu index bf0177e9..6a0e9997 100644 --- a/tests/unit/test_multi_event_stream.cu +++ b/tests/unit/test_multi_event_stream.cu @@ -11,7 +11,7 @@ #include <memory/wrappers.hpp> #include <util/rangeutil.hpp> -using namespace nest::mc; +using namespace arb; using deliverable_event_stream = gpu::multi_event_stream<deliverable_event>; diff --git a/tests/unit/test_nop.cpp b/tests/unit/test_nop.cpp index 3c83199e..63a8857f 100644 --- a/tests/unit/test_nop.cpp +++ b/tests/unit/test_nop.cpp @@ -1,7 +1,7 @@ #include "../gtest.h" #include "util/nop.hpp" -using namespace nest::mc::util; +using namespace arb::util; TEST(nop, void_fn) { std::function<void ()> f(nop_function); diff --git a/tests/unit/test_optional.cpp b/tests/unit/test_optional.cpp index e7244f8d..73384f1b 100644 --- a/tests/unit/test_optional.cpp +++ b/tests/unit/test_optional.cpp @@ -6,7 +6,7 @@ #include "util/optional.hpp" #include "common.hpp" -using namespace nest::mc::util; +using namespace arb::util; TEST(optionalm,ctors) { optional<int> a,b(3),c=b,d=4; diff --git a/tests/unit/test_parameters.cpp b/tests/unit/test_parameters.cpp index 19aaf0c2..f8e29ca3 100644 --- a/tests/unit/test_parameters.cpp +++ b/tests/unit/test_parameters.cpp @@ -8,11 +8,11 @@ // test out the parameter infrastructure TEST(parameters, setting) { - nest::mc::parameter_list list("test"); + arb::parameter_list list("test"); EXPECT_EQ(list.name(), "test"); EXPECT_EQ(list.num_parameters(), 0); - nest::mc::parameter p("a", 0.12, {0, 10}); + arb::parameter p("a", 0.12, {0, 10}); // add_parameter() returns a bool that indicates whether // it was able to successfull add the parameter diff --git a/tests/unit/test_partition.cpp b/tests/unit/test_partition.cpp index 13bae851..e0ce1a67 100644 --- a/tests/unit/test_partition.cpp +++ b/tests/unit/test_partition.cpp @@ -9,7 +9,7 @@ #include <util/nop.hpp> #include <util/partition.hpp> -using namespace nest::mc; +using namespace arb; TEST(partition, partition_view) { std::forward_list<int> fl = {1, 4, 6, 8, 10 }; diff --git a/tests/unit/test_path.cpp b/tests/unit/test_path.cpp index e48e4d20..350f1b29 100644 --- a/tests/unit/test_path.cpp +++ b/tests/unit/test_path.cpp @@ -7,7 +7,7 @@ #include <util/path.hpp> -using namespace nest::mc::util; +using namespace arb::util; TEST(path, posix_ctor) { // test constructor ans assignment overloads with sample character sequences. diff --git a/tests/unit/test_point.cpp b/tests/unit/test_point.cpp index 1f45e693..a5e2300f 100644 --- a/tests/unit/test_point.cpp +++ b/tests/unit/test_point.cpp @@ -5,7 +5,7 @@ #include "../src/point.hpp" -using namespace nest::mc; +using namespace arb; TEST(point, construction) { diff --git a/tests/unit/test_probe.cpp b/tests/unit/test_probe.cpp index 281304f6..38a279e3 100644 --- a/tests/unit/test_probe.cpp +++ b/tests/unit/test_probe.cpp @@ -9,11 +9,11 @@ #include "../common_cells.hpp" #include "../simple_recipes.hpp" -using namespace nest::mc; +using namespace arb; TEST(probe, fvm_multicell) { - using fvm_cell = fvm::fvm_multicell<nest::mc::multicore::backend>; + using fvm_cell = fvm::fvm_multicell<arb::multicore::backend>; cell bs = make_cell_ball_and_stick(false); diff --git a/tests/unit/test_range.cpp b/tests/unit/test_range.cpp index bdec7c3e..90b9f9fa 100644 --- a/tests/unit/test_range.cpp +++ b/tests/unit/test_range.cpp @@ -22,7 +22,7 @@ #include "common.hpp" -using namespace nest::mc; +using namespace arb; using testing::null_terminated; using testing::nocopy; using testing::nomove; @@ -445,9 +445,9 @@ TEST(range, sum_by) { } TEST(range, is_sequence) { - EXPECT_TRUE(nest::mc::util::is_sequence<std::vector<int>>::value); - EXPECT_TRUE(nest::mc::util::is_sequence<std::string>::value); - EXPECT_TRUE(nest::mc::util::is_sequence<int[8]>::value); + EXPECT_TRUE(arb::util::is_sequence<std::vector<int>>::value); + EXPECT_TRUE(arb::util::is_sequence<std::string>::value); + EXPECT_TRUE(arb::util::is_sequence<int[8]>::value); } TEST(range, all_of_any_of) { diff --git a/tests/unit/test_reduce_by_key.cu b/tests/unit/test_reduce_by_key.cu index 29f359de..a226a558 100644 --- a/tests/unit/test_reduce_by_key.cu +++ b/tests/unit/test_reduce_by_key.cu @@ -7,7 +7,7 @@ #include <util/span.hpp> #include <util/rangeutil.hpp> -using namespace nest::mc; +using namespace arb; template <typename T, typename I> __global__ diff --git a/tests/unit/test_rss_cell.cpp b/tests/unit/test_rss_cell.cpp index 5812c2c2..15e17649 100644 --- a/tests/unit/test_rss_cell.cpp +++ b/tests/unit/test_rss_cell.cpp @@ -5,7 +5,7 @@ #include "../simple_recipes.hpp" -using namespace nest::mc; +using namespace arb; using rss_recipe = homogeneous_recipe<cell_kind::regular_spike_source, rss_cell>; diff --git a/tests/unit/test_schedule.cpp b/tests/unit/test_schedule.cpp index 055b17ee..0281d647 100644 --- a/tests/unit/test_schedule.cpp +++ b/tests/unit/test_schedule.cpp @@ -11,7 +11,7 @@ #include "common.hpp" #include "stats.hpp" -using namespace nest::mc; +using namespace arb; using namespace testing; // Pull events from n non-contiguous subintervals of [t0, t1) diff --git a/tests/unit/test_segment.cpp b/tests/unit/test_segment.cpp index 97f0adc9..574e5ad9 100644 --- a/tests/unit/test_segment.cpp +++ b/tests/unit/test_segment.cpp @@ -6,8 +6,8 @@ TEST(segments, soma) { - using namespace nest::mc; - using nest::mc::math::pi; + using namespace arb; + using arb::math::pi; { auto s = make_segment<soma_segment>(1.0); @@ -28,8 +28,8 @@ TEST(segments, soma) TEST(segments, cable) { - using namespace nest::mc; - using nest::mc::math::pi; + using namespace arb; + using arb::math::pi; // take advantage of fact that a cable segment with constant radius 1 and // length 1 has volume=1. and area=2 @@ -62,8 +62,8 @@ TEST(segments, cable) TEST(segments, cable_positions) { - using namespace nest::mc; - using nest::mc::math::pi; + using namespace arb; + using arb::math::pi; // single frustrum of length 1 and radii 1 and 2 // the centre of each end are at the origin (0,0,0) and (0,1,0) diff --git a/tests/unit/test_span.cpp b/tests/unit/test_span.cpp index 50ee7f22..6c55aead 100644 --- a/tests/unit/test_span.cpp +++ b/tests/unit/test_span.cpp @@ -9,7 +9,7 @@ #include <util/span.hpp> -using namespace nest::mc; +using namespace arb; TEST(span, int_access) { using span = util::span<int>; diff --git a/tests/unit/test_spike_store.cpp b/tests/unit/test_spike_store.cpp index 854e0eee..a0b9a758 100644 --- a/tests/unit/test_spike_store.cpp +++ b/tests/unit/test_spike_store.cpp @@ -4,11 +4,11 @@ #include <threading/threading.hpp> #include <thread_private_spike_store.hpp> -using nest::mc::spike; +using arb::spike; TEST(spike_store, insert) { - using store_type = nest::mc::thread_private_spike_store; + using store_type = arb::thread_private_spike_store; store_type store; @@ -52,7 +52,7 @@ TEST(spike_store, insert) TEST(spike_store, clear) { - using store_type = nest::mc::thread_private_spike_store; + using store_type = arb::thread_private_spike_store; store_type store; @@ -67,7 +67,7 @@ TEST(spike_store, clear) TEST(spike_store, gather) { - using store_type = nest::mc::thread_private_spike_store; + using store_type = arb::thread_private_spike_store; store_type store; diff --git a/tests/unit/test_spikes.cpp b/tests/unit/test_spikes.cpp index cd992984..e8df09d5 100644 --- a/tests/unit/test_spikes.cpp +++ b/tests/unit/test_spikes.cpp @@ -5,7 +5,7 @@ #include <memory/memory.hpp> #include <util/rangeutil.hpp> -using namespace nest::mc; +using namespace arb; // This source is included in `test_spikes.cu`, which defines // USE_BACKEND to override the default `multicore::backend` diff --git a/tests/unit/test_stimulus.cpp b/tests/unit/test_stimulus.cpp index a10ed776..b706767c 100644 --- a/tests/unit/test_stimulus.cpp +++ b/tests/unit/test_stimulus.cpp @@ -4,7 +4,7 @@ TEST(stimulus, i_clamp) { - using namespace nest::mc; + using namespace arb; // stimulus with delay 2, duration 0.5, amplitude 6.0 i_clamp stim(2.0, 0.5, 6.0); diff --git a/tests/unit/test_strprintf.cpp b/tests/unit/test_strprintf.cpp index 781ea1b0..93eacb40 100644 --- a/tests/unit/test_strprintf.cpp +++ b/tests/unit/test_strprintf.cpp @@ -5,7 +5,7 @@ #include "../gtest.h" #include <util/strprintf.hpp> -using namespace nest::mc::util; +using namespace arb::util; TEST(strprintf, simple) { diff --git a/tests/unit/test_swcio.cpp b/tests/unit/test_swcio.cpp index 9917bbfe..a27572ee 100644 --- a/tests/unit/test_swcio.cpp +++ b/tests/unit/test_swcio.cpp @@ -17,7 +17,7 @@ # define DATADIR "../data" #endif -using namespace nest::mc; +using namespace arb; // SWC tests void expect_record_equals(const io::swc_record& expected, @@ -34,7 +34,7 @@ void expect_record_equals(const io::swc_record& expected, TEST(swc_record, construction) { - using namespace nest::mc::io; + using namespace arb::io; { // force an invalid type @@ -103,7 +103,7 @@ TEST(swc_record, construction) TEST(swc_parser, invalid_input_istream) { - using namespace nest::mc::io; + using namespace arb::io; { // check incomplete lines; missing parent @@ -125,7 +125,7 @@ TEST(swc_parser, invalid_input_istream) TEST(swc_parser, invalid_input_parse) { - using namespace nest::mc::io; + using namespace arb::io; { // check incomplete lines; missing parent @@ -166,7 +166,7 @@ TEST(swc_parser, invalid_input_parse) TEST(swc_parser, valid_input) { - using namespace nest::mc::io; + using namespace arb::io; { // check empty file; no record may be parsed @@ -302,7 +302,7 @@ TEST(swc_parser, valid_input) TEST(swc_parser, from_allen_db) { - using namespace nest::mc::io; + using namespace arb::io; std::string datadir{DATADIR}; auto fname = datadir + "/example.swc"; @@ -321,7 +321,7 @@ TEST(swc_parser, from_allen_db) TEST(swc_parser, input_cleaning) { - using namespace nest::mc::io; + using namespace arb::io; { // Check duplicates @@ -389,7 +389,7 @@ TEST(swc_parser, input_cleaning) TEST(swc_parser, raw) { - using namespace nest::mc::io; + using namespace arb::io; { // Check valid usage @@ -434,7 +434,7 @@ TEST(swc_parser, raw) } TEST(swc_io, cell_construction) { - using namespace nest::mc; + using namespace arb; // // 0 diff --git a/tests/unit/test_synapses.cpp b/tests/unit/test_synapses.cpp index e1a98e84..804218f3 100644 --- a/tests/unit/test_synapses.cpp +++ b/tests/unit/test_synapses.cpp @@ -10,9 +10,9 @@ // compares results with those generated by nrn/ball_and_stick.py TEST(synapses, add_to_cell) { - using namespace nest::mc; + using namespace arb; - nest::mc::cell cell; + arb::cell cell; // Soma with diameter 12.6157 um and HH channel auto soma = cell.add_soma(12.6157/2.0); @@ -43,7 +43,7 @@ TEST(synapses, add_to_cell) TEST(synapses, expsyn_basic_state) { - using namespace nest::mc; + using namespace arb; using size_type = multicore::backend::size_type; using value_type = multicore::backend::value_type; @@ -104,7 +104,7 @@ TEST(synapses, expsyn_basic_state) TEST(synapses, exp2syn_basic_state) { - using namespace nest::mc; + using namespace arb; using size_type = multicore::backend::size_type; using value_type = multicore::backend::value_type; diff --git a/tests/unit/test_transform.cpp b/tests/unit/test_transform.cpp index ab48a1cd..105c07a5 100644 --- a/tests/unit/test_transform.cpp +++ b/tests/unit/test_transform.cpp @@ -11,7 +11,7 @@ #include "common.hpp" -using namespace nest::mc; +using namespace arb; TEST(transform, transform_view) { std::forward_list<int> fl = {1, 4, 6, 8, 10 }; diff --git a/tests/unit/test_tree.cpp b/tests/unit/test_tree.cpp index 49b36f75..a424d9fa 100644 --- a/tests/unit/test_tree.cpp +++ b/tests/unit/test_tree.cpp @@ -16,7 +16,7 @@ using json = nlohmann::json; -using namespace nest::mc; +using namespace arb; using int_type = cell_tree::int_type; @@ -367,7 +367,7 @@ TEST(tree, make_parent_index) { std::vector<int> parent_index = {0}; std::vector<int> counts = {1}; - nest::mc::tree t(parent_index); + arb::tree t(parent_index); auto new_parent_index = make_parent_index(t, counts); EXPECT_EQ(parent_index.size(), new_parent_index.size()); } @@ -375,7 +375,7 @@ TEST(tree, make_parent_index) { std::vector<int> parent_index = {0}; std::vector<int> counts = {5}; - nest::mc::tree t(parent_index); + arb::tree t(parent_index); auto new_parent_index = make_parent_index(t, counts); EXPECT_EQ(new_parent_index.size(), (unsigned)counts[0]); EXPECT_EQ(new_parent_index[0], 0); @@ -403,7 +403,7 @@ TEST(tree, make_parent_index) }; for(auto &parent_index : trees) { std::vector<int> counts(parent_index.size(), 1); - nest::mc::tree t(parent_index); + arb::tree t(parent_index); auto new_parent_index = make_parent_index(t, counts); EXPECT_EQ(parent_index, new_parent_index); } @@ -424,7 +424,7 @@ TEST(tree, make_parent_index) { std::vector<int> parent_index = {0,0,1,2,3,4,3,6,0,8}; std::vector<int> counts = {1,3,2,2,2}; - nest::mc::tree t(parent_index); + arb::tree t(parent_index); auto new_parent_index = make_parent_index(t, counts); EXPECT_EQ(parent_index, new_parent_index); } diff --git a/tests/unit/test_uninitialized.cpp b/tests/unit/test_uninitialized.cpp index 864f2dd5..bb38e3d0 100644 --- a/tests/unit/test_uninitialized.cpp +++ b/tests/unit/test_uninitialized.cpp @@ -3,7 +3,7 @@ #include "util/uninitialized.hpp" #include "common.hpp" -using namespace nest::mc::util; +using namespace arb::util; namespace { struct count_ops { diff --git a/tests/unit/test_unique_any.cpp b/tests/unit/test_unique_any.cpp index f2b9b449..8fc88c1e 100644 --- a/tests/unit/test_unique_any.cpp +++ b/tests/unit/test_unique_any.cpp @@ -7,7 +7,7 @@ #include <util/span.hpp> #include <util/unique_any.hpp> -using namespace nest::mc; +using namespace arb; TEST(unique_any, copy_construction) { using util::unique_any; diff --git a/tests/unit/test_vector.cpp b/tests/unit/test_vector.cpp index 8eaa1280..76f9781b 100644 --- a/tests/unit/test_vector.cpp +++ b/tests/unit/test_vector.cpp @@ -10,7 +10,7 @@ // wrappers // -using namespace nest::mc; +using namespace arb; // test that memory::make_view and make_const_view work on std::vector TEST(vector, make_view_stdvector) { diff --git a/tests/unit/test_vector.cu b/tests/unit/test_vector.cu index 0eb6b5cc..f3562f02 100644 --- a/tests/unit/test_vector.cu +++ b/tests/unit/test_vector.cu @@ -10,7 +10,7 @@ // wrappers // -using namespace nest::mc; +using namespace arb; // test that memory::on_gpu copies std::vector into a device vector TEST(vector, make_gpu_stdvector) { diff --git a/tests/validation/convergence_test.hpp b/tests/validation/convergence_test.hpp index daf6f4b8..9d25f1b4 100644 --- a/tests/validation/convergence_test.hpp +++ b/tests/validation/convergence_test.hpp @@ -15,8 +15,7 @@ #include "trace_analysis.hpp" #include "validation_data.hpp" -namespace nest { -namespace mc { +namespace arb { struct probe_label { const char* label; @@ -154,5 +153,4 @@ inline std::vector<float> stimulus_ends(const cell& c) { return ts; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/validation/trace_analysis.cpp b/tests/validation/trace_analysis.cpp index befe39f5..28d9a470 100644 --- a/tests/validation/trace_analysis.cpp +++ b/tests/validation/trace_analysis.cpp @@ -14,8 +14,7 @@ #include "trace_analysis.hpp" -namespace nest { -namespace mc { +namespace arb { struct trace_interpolant { trace_interpolant(const trace_data<double>& trace): trace_(trace) {} @@ -134,6 +133,5 @@ util::optional<trace_peak> peak_delta(const trace_data<double>& a, const trace_d return max_delta; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/validation/trace_analysis.hpp b/tests/validation/trace_analysis.hpp index 3bed1446..78a19b59 100644 --- a/tests/validation/trace_analysis.hpp +++ b/tests/validation/trace_analysis.hpp @@ -10,8 +10,7 @@ #include <util/path.hpp> #include <util/rangeutil.hpp> -namespace nest { -namespace mc { +namespace arb { /* Trace data comparison */ @@ -107,5 +106,4 @@ void report_conv_table(std::ostream& out, const ConvEntrySeq& tbl, const std::st } } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/validation/validate.cpp b/tests/validation/validate.cpp index 911e3067..6431a497 100644 --- a/tests/validation/validate.cpp +++ b/tests/validation/validate.cpp @@ -11,7 +11,7 @@ #include "validation_data.hpp" -using namespace nest::mc; +using namespace arb; const char* usage_str = "[OPTION]...\n" diff --git a/tests/validation/validate_ball_and_stick.cpp b/tests/validation/validate_ball_and_stick.cpp index 9d1a99dc..62b5e2b5 100644 --- a/tests/validation/validate_ball_and_stick.cpp +++ b/tests/validation/validate_ball_and_stick.cpp @@ -22,7 +22,7 @@ #include "../gtest.h" -using namespace nest::mc; +using namespace arb; struct probe_point { const char* label; @@ -38,7 +38,7 @@ void run_ncomp_convergence_test( ProbePointSeq& probe_points, float t_end=100.f) { - using namespace nest::mc; + using namespace arb; auto max_ncomp = g_trace_io.max_ncomp(); auto dt = g_trace_io.min_dt(); @@ -86,8 +86,8 @@ void run_ncomp_convergence_test( runner.assert_all_convergence(); } -void validate_ball_and_stick(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_ball_and_stick(arb::backend_kind backend) { + using namespace arb; cell c = make_cell_ball_and_stick(); probe_point points[] = { @@ -104,8 +104,8 @@ void validate_ball_and_stick(nest::mc::backend_kind backend) { points); } -void validate_ball_and_taper(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_ball_and_taper(arb::backend_kind backend) { + using namespace arb; cell c = make_cell_ball_and_taper(); probe_point points[] = { @@ -122,8 +122,8 @@ void validate_ball_and_taper(nest::mc::backend_kind backend) { points); } -void validate_ball_and_3stick(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_ball_and_3stick(arb::backend_kind backend) { + using namespace arb; cell c = make_cell_ball_and_3stick(); probe_point points[] = { @@ -144,8 +144,8 @@ void validate_ball_and_3stick(nest::mc::backend_kind backend) { points); } -void validate_rallpack1(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_rallpack1(arb::backend_kind backend) { + using namespace arb; cell c = make_cell_simple_cable(); probe_point points[] = { @@ -163,8 +163,8 @@ void validate_rallpack1(nest::mc::backend_kind backend) { 250.f); } -void validate_ball_and_squiggle(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_ball_and_squiggle(arb::backend_kind backend) { + using namespace arb; cell c = make_cell_ball_and_squiggle(); probe_point points[] = { diff --git a/tests/validation/validate_compartment_policy.cpp b/tests/validation/validate_compartment_policy.cpp index 3c78c3a2..75d5ee0d 100644 --- a/tests/validation/validate_compartment_policy.cpp +++ b/tests/validation/validate_compartment_policy.cpp @@ -20,7 +20,7 @@ #include "trace_analysis.hpp" #include "validation_data.hpp" -using namespace nest::mc; +using namespace arb; #if 0 // *Temporarily* disabled: compartment division policy diff --git a/tests/validation/validate_kinetic.cpp b/tests/validation/validate_kinetic.cpp index 6815a91c..749e0b3b 100644 --- a/tests/validation/validate_kinetic.cpp +++ b/tests/validation/validate_kinetic.cpp @@ -21,13 +21,13 @@ #include "validation_data.hpp" void run_kinetic_dt( - nest::mc::backend_kind backend, - nest::mc::cell& c, + arb::backend_kind backend, + arb::cell& c, float t_end, nlohmann::json meta, const std::string& ref_file) { - using namespace nest::mc; + using namespace arb; float sample_dt = g_trace_io.sample_dt(); @@ -65,8 +65,8 @@ end: runner.assert_all_convergence(); } -void validate_kinetic_kin1(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_kinetic_kin1(arb::backend_kind backend) { + using namespace arb; // 20 µm diameter soma with single mechanism, current probe cell c; @@ -82,8 +82,8 @@ void validate_kinetic_kin1(nest::mc::backend_kind backend) { run_kinetic_dt(backend, c, 100.f, meta, "numeric_kin1.json"); } -void validate_kinetic_kinlva(nest::mc::backend_kind backend) { - using namespace nest::mc; +void validate_kinetic_kinlva(arb::backend_kind backend) { + using namespace arb; // 20 µm diameter soma with single mechanism, current probe cell c; @@ -101,18 +101,18 @@ void validate_kinetic_kinlva(nest::mc::backend_kind backend) { } -using namespace nest::mc; +using namespace arb; TEST(kinetic, kin1_numeric_ref) { validate_kinetic_kin1(backend_kind::multicore); if (hw::num_gpus()) { - validate_kinetic_kin1(nest::mc::backend_kind::gpu); + validate_kinetic_kin1(arb::backend_kind::gpu); } } TEST(kinetic, kinlva_numeric_ref) { validate_kinetic_kinlva(backend_kind::multicore); if (hw::num_gpus()) { - validate_kinetic_kinlva(nest::mc::backend_kind::gpu); + validate_kinetic_kinlva(arb::backend_kind::gpu); } } diff --git a/tests/validation/validate_soma.cpp b/tests/validation/validate_soma.cpp index a41f4353..8b0f35ba 100644 --- a/tests/validation/validate_soma.cpp +++ b/tests/validation/validate_soma.cpp @@ -20,7 +20,7 @@ #include "../gtest.h" -using namespace nest::mc; +using namespace arb; void validate_soma(backend_kind backend) { float sample_dt = g_trace_io.sample_dt(); diff --git a/tests/validation/validate_synapses.cpp b/tests/validation/validate_synapses.cpp index 557a7470..f4b3b7b0 100644 --- a/tests/validation/validate_synapses.cpp +++ b/tests/validation/validate_synapses.cpp @@ -19,7 +19,7 @@ #include "trace_analysis.hpp" #include "validation_data.hpp" -using namespace nest::mc; +using namespace arb; void run_synapse_test( const char* syn_type, diff --git a/tests/validation/validation_data.cpp b/tests/validation/validation_data.cpp index 7bb9d861..2ce470f3 100644 --- a/tests/validation/validation_data.cpp +++ b/tests/validation/validation_data.cpp @@ -11,8 +11,7 @@ #include "validation_data.hpp" -namespace nest { -namespace mc { +namespace arb { trace_io g_trace_io; @@ -53,7 +52,7 @@ void trace_io::save_trace(const std::string& label, const trace_data<double>& da } void trace_io::save_trace(const std::string& abscissa, const std::string& label, const trace_data<double>& data, const nlohmann::json& meta) { - using namespace nest::mc; + using namespace arb; nlohmann::json j = meta; j["data"] = { @@ -109,6 +108,5 @@ std::map<std::string, trace_data<double>> trace_io::load_traces(const util::path return traces; } -} // namespace mc -} // namespace nest +} // namespace arb diff --git a/tests/validation/validation_data.hpp b/tests/validation/validation_data.hpp index e462b5d8..c1944eb3 100644 --- a/tests/validation/validation_data.hpp +++ b/tests/validation/validation_data.hpp @@ -10,8 +10,7 @@ #include <simple_sampler.hpp> #include <util/path.hpp> -namespace nest { -namespace mc { +namespace arb { /* * Class manages input (loading and parsing) of JSON @@ -99,5 +98,4 @@ private: extern trace_io g_trace_io; -} // namespace mc -} // namespace nest +} // namespace arb -- GitLab