diff --git a/lmorpho/lmorpho.cpp b/lmorpho/lmorpho.cpp index 65f32009b766b84209cef6954c52c848902a6bf1..418b67ad5066a57d6e47011d64fdf43f603c7439 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 efc595f07806b443fd446d34da9fde6ed19f3d35..06cd740ab207726b5ac53cb696ab162ce5e6cd46 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 723caf43799f22cf461acd7f5ab44a9836fb417b..a4baddd80d237a2af459a1c5e15815cb9b19a160 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 6568e279d5e859fece0a30e047e1e8d7be566f1a..1feb6f0f03d1ed7a227d31d825a920cf1a387c5d 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 47fc16f7b9313ef26964f13a1557b4fbde0e44f1..dd9c36675c72ba6a6b310c1ebaf8954d2889db9b 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 87a80db2f85488d3c9196fa6b4320c3860827658..0cc4f703b4bd74b6235ee8aedb419fa01185f3d3 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 631ff9e5aa7f4246719b82199d03ac7e2ccc7dc2..2fcee0ca3ca526ddae4553be073b9331d38195f0 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 8dbda791490b72e2eccda4a520852f5e77693624..a782346639eabb17ce37ca3fd5e0d82ac749a92f 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 66b0ff2eaf3f8259aa43968bcada4fa5373ccea2..08a759d18f17561913bb6b75c789ccb2e5c66bda 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 a2039a7e19e65308e23a54a7167c1d1634cb4adc..91384d47e43ce342ee752fdba083e20a5436b341 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 bb3c5240b4238806d84b0a89e61e4357db4fc06c..729be3a13cbbb6f6eb78dd5d51d70f9d120d0a0b 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 68f3a6176300f043e408b65ad4ef057f86122cc8..aeda54361789599f200873ddc569142dff48a25f 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 30eadcc09304fd833bf67330b26593373f9173a8..34fb01c80e5018ae7c7a7c2b5888e1076bc4ddef 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 32903c757e92904cdeb00da6f2dba6c8fe95f4a7..b834ed40ff4ed7938dc6a6c188d6dcadd3e232fd 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 8bb5bf664001997c3eb9fb0c800a5d875f08e5ab..af42528de69d84aa4e7137df1b14c9f95d468262 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 7aebf61d7f99a335a2582b5bc7ec8518e4ba2029..081b3fe23263963a02655a923314bce06691f15a 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 f1c7fce179afd21b4284af6026c58326867b89bf..024c220a1a53898bfdf0703c0fe8a1e761c8b09e 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 c5d0fdf45eb826fdf13fc1869915d289dfa6af89..cee812e84953152d847738b447f42e32646a022a 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 bfac874ae5493785c9b83428ddf03b1a0d4229f3..3559e3272d38d49cf66e751f584c52a3cb14549e 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 08e5f09019e9a8a70ef2badb855cda6ae7763643..3eeecf8476f6f70d269d433fb448ad9f84c3ca57 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 a588638ba0c080783d24e2e33618ac7155bc45cc..7ff7a0ac1713c2fe6acd40c2f385fed100f111a8 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 ef1a0e3ff19c68756b3a4ee1111e3aa753d66387..03f2957c0f3a1cb8fd8c6b4c0516268903625517 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 296b78e1b67d0951405a4075fbd0493df3e6ffe4..bca8a5bc6fb4dee1bf8e336ab23f5c2807105f84 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 22325d224ce576cdaa32d759d71368845e51c944..da3de60f6d7489b028b1cd1903d58c3095365650 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 9f97d1d5b16062214d523debf4ebeee5127f3919..b4d9c1b39f2f5dd2601439e34acd05b6db5547d9 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 efcb673dbb6c6723d1bf0cbc650f6e1d9cc65658..f6abfdfaf4fcc038d4f567663bf1485545ee2801 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 7b94edb53e9fa8175ed8f85c3da62c21f94dfdf0..d85f69c417462e3ca77d35e5f0c726aaa0f847f9 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 71dfcbfa4db4635a682343faa3c07afc593c959c..5252afb0448b0a0d5f80c654b81a747bd592a23d 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 f82f1d8eb809c0340ac1050f67a69bba101adc6c..4ac9b417e4e152365487476badb1c2bc9fe16bc4 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 4b1447fcee449557eb4e32926294da6ae0d440de..c118c1392f20aa1109c52290d01119cb0d90d799 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 291722e8e2dc5c23b5774a8fad53edde6863ef1d..c1d98df56065604d6d876bdfcdd524b0e4d30e0b 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 ac4397859b69aa99eeb2b6f9ec992c85259e34c4..ebdf9961b990c845ca1ed7edae4ddb85ea4d8c20 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 c6bd144d1240b4cb00cb9c201c8d4e4e02fab015..a609079d4cb2c1b9779188d130995b84d986dbe2 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 15d08a6fbbbb5fc2deb562b457eeb5f2824ade1b..454dfe21602f13bdf0f4273ca147c11e1eb8e8de 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 cea3c7234a0886eb61d46c4a6067bad9483143a6..4bf923f7b71fc4d8f3778049566a474fe1a48d63 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 e6c855937b337d4a9434f367b61d05b5dd35e03b..76e41af6d7d9d99687276be4e4a02b5d17f9cd82 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 1b34d7c19f107ee7c6e47620333d0ef77e363d41..0d4627e5030f067a90bbcbe233a6c6f3739bb67a 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 45558fa0448ece53b783da4339d65548077747fd..30026e9fe7b12bc1d9c8566b95d3137c4554ebaf 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 d303144b5093ef793beb9748a62ab4e3c5513d13..b20f18c3b2e05fb12e21819607276399e71ff011 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 7e5340bc32fdea6b3d21da4a0e15b6e910b0da19..12caa155834df00d8974934ff98a9b05e677a4ac 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 2145400a058d6d8414064360346f5e64e27f8a7f..1e85f0e3805d19aabbb0e3e040bed2c99c7c483c 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 8fdd0de35a4ff25a167f257f108084ca0231a3de..f174c99cd6d210f4d7092a638f52763b8414681d 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 946a0e2974f23c62cea9126f29f5872ddfacbd0f..ce0ef688b96e28477dc7d9737b3899d5517c2d75 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 c7b8526c5324f427c0a5e28bb388704c929fd540..d7f9479e5e4615c7042f7b6d7c89d3b99a006dd3 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 c2a108a8ab35fbdb99f6cf98af3dd5093389587a..7b78152219771abc7a01003a1d4e89395064daa8 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 ca42638e649b55c83dd43b61b52ca9f0f43ba41f..8343470fab5afa66169179fde3948a8a36f5d36d 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 a68ecad88e81702df0d147794f7d77246db6bc28..1f814c072d9f3140b9bd191d0d9b68684b337353 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 054af9e58497741061b6bc7525ffc1f1ae94457b..99a00a8e0c9743458d5332a5b9f64d94d32fc744 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 f36863c7ac7734598c971d0af1936c7646725353..7dac8501e5893b4c3180eb4c4033aef1c33704c5 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 6ebe84309e2a4db3cd2927b61adb49c14b1e57e6..94fa0fd9428757e568500818c617cd15641d863f 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 ce00d9bc7a5ad2f7cbcd7542782f58a04c19919b..591bda9fbe443a220fb93606ca1ee611fdafb7ca 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 7473007976a7a44a66f6bb95330f672b5ccba535..1d58646f6c68af4011a86720e3e0a15dcd1b1ba1 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 6d3397559b500f7c401c3f2dc49e5cbd470bd428..0405a6fe43109595fbeddebd88464d6c160725ac 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 651e903c4631d4968edde0a884b134bbe62fbcc5..93aa10f3eed08c346d1c52ab2936c83e1f60474e 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 b63ec72ee73e11935e700882b788dbfb94619340..ebb4ed6bd573c65ef9449d3a9a49492652246e6c 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 a851a7c484f6d71f0f0c47d14def0a2e7474af52..b38760f8bb6343b6ce37adf0e08ad411274a229f 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 4797d691f6f7a59440e2e544eaae9d2d3a0ca8aa..b0ef0f472c5a4e7b396d27ad92aa8c5d5b22f5e7 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 6999f10c352e6cdb17ea40939dda84f910ae6011..25e75e3c3c7526488b14d76f57c09417e2150764 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 e00b1df8a025ce1a757140b329866f15245ac2a5..801f0744f79e89fe8489e8b18b674765a06e1485 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 7f6de29b26b820d823b14678e561416b17d0f225..05f5e2b5701e256e69c6a5321c591552cd3b6976 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 15507ca0bc0a8c7f8abf6b16922677daba4b165c..d7eb87c45046309ff838c59a026ddfb3f249f93a 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 18b12742052d46209e7ce2761111f27d53108efc..dc6683faf6fdb3d6d8a356c1fe6ea0dbe465520c 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 f26f1ede59ef7bb310581abbbf102699d1810f63..d43b3d7f4c46176f91d1d4b996a406fa60e111f3 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 8a09cdca4f72f59ea534261c207ddcbed161f02c..ad97a5e88dcf79620212861da1caf161d59d4b29 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 04766c84a4f80e8b20ca539fee1f0effc08beb20..5dfb1920b96cb534c5fa26a2d6ae2a91f952d654 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 40139722691bce880508dcd59bcdb730532dc58a..7879ab6a4275a3e059b118bd2e3e587379974e48 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 7c9bdd3c449cc97a90f7bc917fbbe775859787b2..9abb760bebcbc0fbdccecc77262964e19aab83ac 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 e3cf5b7632d1906ae2729844a6e36ea52f47e5c4..a1e5fc1e9e13a8d7595878e5ffb0bb84e31820d7 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 e639b2c848966da6392a6609956a48aeed12219c..12c038b18e2b8cd148b9a0435fbbf097c62b4701 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 26fe9575b00c904ae873730745cbaabbedcf57db..14d232d0711a124a4bcd5a9b3e5b903e09b2a866 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 c0499a8eb07e9c693268b9756ba75a2e2434ae9a..f817ea6e9cd92ead859f38d5a4ddfb24100375ad 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 ad6ca540b80e1ce296c8ba2f4eceb52cd9ebfd63..4850d5d8ba0fbe6c437200b2a01ad70728b268c9 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 8a974d856a94367fed2b8f2862652d04f19ea98d..a34da7eb60098e5a12f1ee7a7dd1abd63d60a766 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 a713a8abf2f3c3d65a669e32e8dd25fdf5a9e6c5..5e640c65427c101d4adb7744d923bb475f452d1d 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 811c6796bda2d69804a065cd42ddbc010c9eeab7..67ca6db04db85d9096529c79a343bea95b310481 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 22daa5a68a4c0c288c613a8a547ff532ed463e3c..19c51fb930ac2ad4bdb0dc4bd9a1ec969e9e6150 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 3bc1919d1df76a118fdbfc7cebc224b5718016ab..20af00fc999ee843f546b729a61659f6c02c88fa 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 770d4b84bde51bd05779dbb92fb2ea3ba46a9da1..d1073f6928a20a3a14cb9212292dcb062867bd0e 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 ec7fc8a3d7c487fe1490da13c8864678606e8402..8d541308a56ed6e6bc80097d66b40e3fc613338d 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 178d52e60584af08382146257492b797f43ef3d5..32f5beedd81b60de4a41432673e1f7c25949fe65 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 81d2f3bc58d3cb1e7dedf14a856e056b4a90b21f..ec853175bce423b08eb54271ac55eac63b86a41b 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 fae0ad88be325c0943729dc95ea544a8be4bfc94..b68118ef825c6e3cc137cbc81d4a76b05c9f520c 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 65d039151c1863ac39cea9d959fc498b0e5ab4eb..24b9af55e9be9d374760bbe81416200951672ff5 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 9655e4ea3b7adb6ebfd2f82fdd85c6204e22f32a..cd9fa29b5d365189d0538373f8bb40fb17ba0c25 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 bfb9fd68e2668b7aaf842dc88b68f3ea3c81f2ed..d0c937a8f3b6bb84bd9025b431fd42e634f85061 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 5f3e32d68548c453d65fae9ce2372826797c480d..ffaecbe50933902edb3d43c5560de744b420f9e1 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 278f7f5153fc67604fa0abce468821b7de40a632..c5e7bc4809e74deef63fe64387289510fcd735ae 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 f9ed628281a48dbb1b36614f767bdd4f82957c0b..bcdce2ffb0669133ece48cc943dbe6f392837c35 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 7f1e8e3f211d7f46b2ceab069eecf5e692cbdcff..02dfd2bbd5b49743a1ac4643e74811ec353932eb 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 8b86178748a94780f470056b7d0ee033385fe1c3..c7cbe89db9c4951b349b477bb3c6528c4c31b61f 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 f405261663cebb2a71268786439c04c3725c7bca..c8263c6ad3d1e2c960e6c7d0a65266e1dd024309 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 8d1895a0d7cf26d0c303f6491ee9cfb0d1137cec..b36f34e8c05e6f3735d110b5fae64b87cbb42999 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 598917cdb08dcd0e615982ede0b409d5dec31b98..6c58e7bb894995d4b7e8bc7c0c3d6e1de5001d22 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 8ee70b1d3e5b62c4ea8581fc0cace736f4e007b5..6e8ac4cb6c45ce8522696272916822165f0b21ba 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 953509f7bc96bb5257379596b4bb7ade67822fda..78b8ea807c3b772be81c344989792f0d2e85667c 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 60427ac3a1b7f818dab3dad096be1ab78e112f95..6cce80dac82b2eb3ebe1464bee74d3509942d34f 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 3688746b6a54e4dcc7956b58bfa32ac20aa60078..b5cb68968d3783a375a217485870b742315f0b0e 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 3a7e4c1631ee3ffb32e9688dad6c773dc8142219..354a697dfb5b3aa5e1c1cfaf9b7d55b31a47b9ef 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 b7a68b517b084af40618e17d7db79fc3877c18ef..f83a2caf000c37d791ef8a477e2703d481c94cdd 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 9f08af85283f0e1fe27cdfb9f8a6880e84eb65dc..05c5303f6ddb7c3af6c843635f2b0cff9e4dca80 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 de1bebf710a93f806b84e83e59a439113d43c18c..2d3c2e593623c74a2a8093fb9c3ca322fc02a585 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 cae1e30a5b7b43835cced5292d7f06e11b1c5d7f..f11c86d07e09d3fa6fc7f3fc45eaa3b0d06138d7 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 e27ae636dada96e006936382873f114f731d927a..9cf817f3c530e94c5fa2e0900deba556d17dbae2 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 090a4641b99851c2610b3932169eeeb6dacfb91f..06e709b7bd68f2bda1a0cb4545e022b0b0da381a 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 fce239f70d3ea39e1b2359cdb8a7a30954d5e99c..d719daa8207059009cb661506f71c050a59fdc0d 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 6e77ca255d03537425c24a4daca3c6274217dae3..817a7b4e4d6c6a497e84c7ede08724d83910dee6 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 de2665105c097ef10ca973969b5863930d1b43e6..50e2ebbda77dd848d53b320bf261791707e8cf4a 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 0afadd79f897d1ce2bf9a0a8b9ed5377e225d629..5de693d6f0631d51ed2ff82ecabb4b74a672638c 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 80793199762c2a53392545ee673e3f6b3aef7425..65b2472ba460e8ded47fe998ed08dfa517a871d0 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 39ed49f7eb478c8745bc4120ff42071dd95970a4..2711c6795d1ddcfba50f6bd3c49efe560fc57a81 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 3f77c08fa89d290ca0cd3c7d4971516b77057be1..74b8c921e7f32d26947ef033a31e9d11eb2c6bc2 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 7a7196d89d20e7f2ca7c9d2a938c2d2e8aa95c99..cdc97fe4d889e79f0aa56e8607785b5d76b455b7 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 d4f61302cd3f004ea3be0c636ae070efec966bda..df89aae97d30cf768aba822f0c963e1d42c498c6 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 5a4c1d49c159f06371758e65d8b36ccacb05178f..3c8a84312efbd29f6d0cc312332cdcf77137046d 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 3b0b32778a7e5b463d49b3b8358debfb6442d1ac..c2b3679f6b37d63d963f2d265613d427b57366f7 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 5d273da336c04dd53ae7b44d8f3fabe2d3c869c6..f710d6bd04ab0e3c64569f460182a351eb8e7cbf 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 895882729280cf88ba3021acd84724f1f28d2f87..bb187e6bf25dfa4cf61a408fda00025e6fe31206 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 1f45b336f4a8a4319c1f46fae6b5b13fe9fad8cf..329521a50cca9b21618c912656c383d55c152349 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 50bbdf14276eb1a390d4e0be427c1be5d5ded515..c0b660d8dd7bf8c4bd2c960a2a8a22aaa8c56e91 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 2b8d85ff794e972bdc5593d3e4301df7f7ff111e..c1284a8b533813cc72e5d49b38b1b2a8e0efb21b 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 0fe62e67fbce9fb3f8c89d449240fc24374f5165..9d5cdcf3988f973f31053ba4587c36738a56b352 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 50393017701cb18b0e4b4d7ab9a2026e8264ba5b..50a9092399ecabcb979840bd1b327c3f31977911 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 b74bdf6a6d57db3a4dbc9a5234e86b2b672a565a..c46c52ed039644aa2f8654594a88f328247b6c93 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 9c0c1ed65f6931b263f1ded3e2793b3186b7c99d..b1477101efe49379e5a36d7ed95e1dc3fc8aa843 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 35b520adee658f1659748848d8eb3fed08b29ac5..ea0a4581cdc1bd988b3b643c7d3ac03edc630210 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 4faf75358502e29b90e5593e186a543b573b522b..44ac1212d1f7313b5f68bcffa98cf74ff087e5d1 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 2ca508175f58a402165fd0d56b744148cdb2b267..5b5d974c8629e1d0440ca1fb173a9b5b8ce27cff 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 caa752b9489a483e91f718350bd5c456ded0ae66..bc47ef0ad52085ace1aee7d37331551eb238f17f 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 2147c63febc98da2885f790ac251bc88045ea678..32f202aad8d3284c6dd743b7740bfae52106cae5 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 256e518d06f6d9817a65ba295eb9b560d9327000..aa4c71062ad5e0fd21c171207b0e2e3ec683a928 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 a502255b913c1f3422e3e696553e8dae594af834..611eeac2f99274be99d6e68381e08c48fae2c4f1 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 cf9d71529baaf19bcc4a93670043567e797a4d1f..4242e3c9bacd6e021a7cb5c7fdad94c20bf210e5 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 11afc7a616d627417685c346bc9b8cdeba0d135f..f5ead8f161ae15e7b0d0120fd865d2c1909cda34 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 eae9d3ed47e2f63d7d9ff7b8319bc026e12851f4..c1c4723098e59b610944996f86fc05dfbf36f3fe 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 d92789b8e9e938d81500ce112c58e79d04c338a3..eba604e74b92e4c87ec277798a48037853ee694a 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 f4cbd2b9e9208b3f24d2cf858a1e95ba182b392a..9432253e929c161c6e29fc2b8f66eac2a8d4671a 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 7c54e15c93aee945f1eb62a6e34fdcab6c72f01f..f781964fd7baf30f72cfc8794fe71c1d512610a3 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 2a85c4645cfd1906d4e5fd0ee32ffe1d4adbd833..b260e2faf477b80f942dab7d8778c1bce4ab4673 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 271f49453414d14203ae8430d382ee634e783b28..fb5c09aa7ba51aea0c41c6f5174b95544b2b17db 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 1eda5252aa935800396a6fc46cc201a0b612842e..52c8c37733aaabb9669fba043f7855a19d0c545f 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 6ee5d07c4082a492aa13f5113b6bcb69b90665dd..17f2c4ae26d4c5569b3f18fd2cbe95a9dd792ec7 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 201b7b9f8b58e5131503532ad049991fefec5292..f69b7aaa2bf0ab92bddb32a1d13d096f970d5c4f 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 34caadc7af34fdcd24fda895e484b5360846b750..7d5fc5c8084b24a79161429b1382f6b69430d789 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 f1ca642e67a68ec6b655d61a8e9e4a3e0ddc3c69..aa2c82a8ed0b6f2f96219c5950b949c6172ce571 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 c1f569a685c26ad040a2f4b5c1ce3fe16341d7f0..6fd82067720887e33e683f51fdcc44cc9acf5214 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 4a3212e0c975be82ad468f5713e6ad0a67d7b5e9..06937357881d44280659dae61fe223ad30c8ee9b 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 e208ec69588563637a5a61c77b31494466d40d17..bfdfa1f09506bbe8bbc48a82256f66ab4839015d 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 e096756414d9813b8e0ed0e9caa79f343f40fd7c..5961c9da0d6d2d46fae97d34aa1319bc0a1bc0c8 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 d2343ed3ddcb41d8ffbcca1316abe78a3d4fda04..067c23bbcb3e6a0140292877e31f7b488e2d7dd5 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 f3c587a412eb2aba5a0dc1c127c262b86ca018e7..071966c6b60c7b03b2a6cbda6953fea9824ca4b0 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 3b825d3ec4bf5d890f31325ea04fb7f1ef33aad7..7a3c2720d7a956597c4394a0edea321b149c81db 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 a7e728fdfdaaae7a0fc47d940e81cf9210e39066..2ba4b3943d963085841d49097e389b14a1850e73 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 4b1973e3aceae22cf9820b4161192904d68b2f17..336ac9f4e048d517ed6502494431397360dbb905 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 6a257f9d504f3b5597acff0c25b6f0c65e822d7b..759a8406402f79fde4afa19ccaecb1ccb3f695bf 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 d17d44075b4f893a4d96623612e993d51aa4454c..9b8a8f3a651a80526b28257c71dfec148f3c28c4 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 e3d254184e5484707b16ccd2270f9302e0d734eb..32630e74eaa53b5731ffac81776d07994307015b 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 6876d3db9c312282644318cbe729cea2cd3da331..0a182eafa1c2785064e8118095bb6c7067921aee 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 c7614bceca5abcd075746b71d4e0226159556a03..59dc8ebf27e3d22872ab875d3af185fbb464523b 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 7f13a42a57f2e8b42769440e961f873f993114cb..1316949b5c9e977d2edf14c1447954237fefe0f4 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 493b5260dc2788ef71b7b3c27acbb3eec163578e..9049d0a9d3a0425b8b383cd1c2ea35fd4eb5d5c4 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 bf8242a58b08d1d9497c12e2df0f99d3987395da..027da9f698f37a90e8272e944a931352d989e571 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 1e50a926d849d4041132ad4ee1b7aa17c8b4bd96..c90ba789bd96079694202bdaf50a0d3abba4419c 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 5a1d90687162254e2ec110d51e3b08628b78d220..7d9eab05ffb8f32c784bdb151b95feacca822f37 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 83bf63a35a92bf79b18bc3490123d416c9e0e563..1bc1e587d99ab70f2649e672a3a6492caba1e42b 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 cbd7433cf691e7519d8a174cf9db4713bdc6c592..e7c1534f4ff643ecb6246d64b96bfb3466c71436 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 2e113bf485da41c02327ce021d51f569b91a855d..5103bcf3e599a4f5425a5553d9016bb5413b51c5 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 5f31cc4810edbdb39b89aaf6b6ab7d07e548e8cf..4328876da231e0398187fa025a5aa433e9a5e5e4 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 a4d2b050e2e28c035be0743a7976bb5cdd7e7487..83fe7e08502b73df0e1414e26f8eacc80a5c0458 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 c0924d9c7e418830700c23b37da87b251d2a2cf3..cecaa2a49e860213f950a0cb039510cabaa25dd3 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 08c6c0dc9e4ad366af0034316772cb3de2787cc2..331ca6af8888e96d8e4b51fbb62b6482835547cf 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 31cffa1babef2ced0b843b4d3e375678612528b2..9a56a521eb88ce68f5ed005af0eab4d130b0a0d3 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 9fd406a255bff67bc70bcd3b320f81601bff9fdb..4adc4c2b96f163a20e06fdbead406dff92ef148d 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 730fb84958cec97ee26bcb6a753d9641aa815d4b..f085eb4780b16c013e8378dd88ffd577ab695cc7 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 b28be5228266189763a709342b84cc1fa284e28e..1db4d6d5a2f1b04ca3e85f02db19ee948840bcb1 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 04086c1ea07ec71a2fa79c7e6a8e75133848470e..3a161687f1638f7dae05ac3a32a65209848c3816 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 c39f3084ff265ca1306e90f9ccd65f223be64b7d..85152e903184253b6e2e959f4f20978d7a72c5e4 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 ae735ef5a77144954f71c2532f89bdc98bd75d88..7034fd51046214c2977bce2e6789395b2006c8bb 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 30501e3d0fefe463c711607da85b0fca22f72006..0205a15a8a841d912a7ecb26d656db3be88264cf 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 2feab394df71d730bde904d041ebbeeb85bf9a44..b45db228b31f59ce651d41f39d53a56395a8523e 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 6c8e1350e1f20ded2c5ead857979138e8d25a037..2d3478c0979ca4d3b96cf511008bc4cdc1679dc6 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 09cff7c0eefb8a36425869948190452b973fe6fc..6b345c1254ac20d13f026598e66ef267887f6a2b 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 8984bc6b9df6c8a877674cd9bfb8f2f4b365fee1..18820aa91e31a35d3803600df75f43230c5dc704 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 6ec568b9d5fe9bfe4904b23ea6babcdf8b4ca84e..4f3fdd3ddbcd9d52f673f6ccc81d7a8b3cd13bf4 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 56a75adda1cadf62eb3a9d12bd9c6b6b517027e3..f674f8f3a42669c008a6a9b53aa1fc65a7ef863b 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 425d41f164c3d6ecc27df1fd6d844f9917a55d8e..a4138b66a658bcb883ca5e7578db7c50780c19a8 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 fbfcb93c956e86eac55c0a3310b4605bd745e71c..1f23f718da335a262ee7612b197944cc0ccc6ae8 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 88c74b564b1a9fc415e8b11be3228146d587be50..df571b2fe53cea978eb9a4729fd0fc0fb4cf445a 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 e3114518cf597611f101597b7f4146b5b12c98ed..dd1725c88f8a8e94a9ac2e8ece96f0d1c0cb174d 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 9e038101169ba1b031c9249b859d213ad66ac88e..f93d58f56905371def8b6d3bd3089344f5cfe564 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 6df51e35b901231284adeacb90585ec805fc2b18..c177f80b328faa0c6822e6e9297ef2eec64250ad 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 e7ee41eda2add841410c48f6e315da2391e918b3..ba2a3c0a3f66c8a5bce593447215e09ba067aa79 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 c5bb28b46497968c9f47bbb523d67558dba19903..2bd619fbd8b9299e6529505ddbf6440c4fe23408 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 3cfd84e381ee7f4ffb52ff853291c9c79bcb86b5..961a4b44bed52d136b8cd362eed01251cd09303d 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 06cdfa36924324c589af8a16412d8c167fb0429f..6767ba346e14f7ac16083ebf61e1ea5596ccd230 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 e40a2d71ee54ffab3223cdf8077d818995a26a99..738353f9631347decb19cc4baae7a5b511cc7f61 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 ed9a31d6bc2aab70ae61a898fb2e65e0b4d05905..c91dbba762359a60db7c80a994a54ff1a7d22af9 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 f9c1bf3685a98c5f405a3f0c0fe929adf8a182b9..b5653939cd8f47ac1a231c48d8b243821eb5a198 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 758356db528e949a4e9a99d2d3199cf867d38b4c..5091cc56e0f7752a49b7be063eb214bf642d2eb1 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 4a64712e1f0427a7fb77bdc6627d0bbc13164a3b..d74abdb8d99cb3c33ea32d06afa4bd3262fa747e 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 68c1cdfde3755008d8e17fc42848218f84d957e8..e9480e14b7977308073d6fb9611c6d18d2ac23ea 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 feae376db2b26534fea3f97413b961ce30cb0501..dc6d0d19e9b4bdb92d590e0a1e8fc46d80443813 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 c255c6be82026cc19b7d29d2a4ecec686126045a..4049d0965565d378cfe06be1d7681880f7a8f642 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 6eb249034614d886ab3f62d2372216b3b9b2d17f..d0b917e044fb4869a0851568f217c66f80683408 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 e2f65c01c078b1af47e4ae8a95c3927d4eeadead..532e7444ff34e3b2c5140e62fdd713abd74bea18 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 e6ddfd86c4a5f0a502fa80ea47191c919a81fb11..745d1641fbde5be54e30c632e698067f5f2960be 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 376230ed607da7eca55b8671c1b593edd9d9b4e4..500a8985fb4c679558fe14ee54507b43fafb6ef8 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 8d676a17d253a423797ba535241347284e703162..d122ff3660313f3a01a934678f11c9a482396a12 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 2e379ae6aa4bfa29d2fa151c10c996039ffcc057..03cded6ef2e343a94043c176b254ad3d4b8f9ccb 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 c671e907475e2de443fceac1d0818958ac0a1cf8..9dc6f41635da716ba09e98c9f088d2fe3d28533c 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 0dd687362b09958c4caf8fc53540ec25665242c0..338b0a554b5d9c16034b49c947e045fcfcb573b1 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 19fa94a61ccb34fc9b768b55a961946d2b958512..fdf6653b1512865921253278cd5dc01eebe371b7 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 2863b42aa3413d90c849c605f4713c837e7e4c63..d5a0004645d96ec8fe833b286a75a618a479ac65 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 b2430738055e16fa91cebed5cc1b203393a18458..1e26caf796a0232fe4238cf07cb557a270b06f44 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 26902f41d6d8239f4d51f7f470aab0a3ae61006e..ac15a43ca50eedf5fc91116387cdb9c45c54637c 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 594cb63a61404f43b23d2657498ceb550221eefc..12aa3598258b1a6960065aa06166ae0e7f48a82f 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 e92004f54afe6ae5e429272af6c5f15a8af0c058..b1bac8d78ff7324c1d265aad9ff85de1921cf03c 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 109d75962f6772a90503ea8589ff617d926c11e0..441429221acf202ecec6f5cc7f12ef9fa64640a3 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 f36a62f6f16dbf1cb3fd4008acd2278adff5a12a..8fbcabd435c1fef3b38aeae9569a5365947b6b59 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 c80c0195b7fc44aa59f75b7e9fb52cf4bc5c92e9..ac4503ebc68de66fbea238944fb50d24a511d851 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 3a2320ab98c9bc4f23443dfb68aecf118936991e..f58c67cefc6b7cbf5afdc0000ac6894705c23d96 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 621f4515bb160b552470b646cdd2d646a8024916..6cac18a88c97e24d59723107beb6d26fd9d14916 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 f9724af498840e37779176d170f136411a922f78..0b988fe37622f3ec8e78fa6efa5d9a54f721c7c2 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 1fa04c1ebffb6c81ca276d1bcf91626919306d9b..b8ec6ef75cfa4c71a284d85d636d0f53e2b82705 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 8c841bc2f8ffe2eef3586a967c12b1358b8fed4c..d456225a066450810e6bbd79cf2f60e58d0d4130 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 f8a67da9b66571b0c1f8a33fffd429f47b9240c9..79344e211edccf0fdec3d9585245f6d7a55e10c3 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 b99501e082b96c65079def7b702e9f998e39eb20..f43e01eb5c7010bd5debe9cab8e56d4af1a7ba70 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 de3762d26ce714bfb7e9bfcc8f4f204d6594bdc0..8a3389a40d997389e1e09e087053a4664f1a1f80 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 d8ca4e64e6ca465abcd1486ab3e3275ae1555845..5b1ecdc2184d6d867aef361ed22cd55e2d248e51 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 97b9f2fa631eb067e0fa83be14f02801b548405d..eb7cafcea31cc5d8562176b35c43469aa52d2da6 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 343d4142abba91b98bdfb1382ad9438cc99a0fc7..214a86122810841748ee1695839e9e5f27079d2c 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 8e96b1e4c32b160b2dcaf8f55582a0d3df554ca1..e5c83a8206f6fc51f8811b381aed38a5597da467 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 a9b6bdd02c3d51a06dad59c0855e93eaaced7bd8..a14de4d361435fc490cfe416faad4101c79f6c6d 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 f4f12d91ccf4b1a8dcf5726768a2ac321df18ee9..7ea1aeac366e5a96d3edab1a1e143eb1f472ef32 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 7cc1e959acbc17dba8620d467122958219c4d457..22f66f0266a6a38c122664b5b7cb5b75bfa5aee4 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 7e5bf6cc2253acfcdfac2b9a17ee6bfb4c88964c..195f82eae6814309e77a97b58253ada6812bbd7a 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 4d5b14692e3150d59c70fa40624a5aface3b91b4..151e8a0defa375208c1c16d595684cf54dced468 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 0bf73d492addf3503191acb956be9538179910a4..331a2e94f55ed5f5f91725ad04f3dd9fe75dfe0c 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 9ae67eabef92ff3f06059232574d616c33cab34b..7d3dae4eeaab731cd8b11ad24fe9560571ec4a12 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 7b3c8738b8f171bc801871118f5668b54d33be17..8183e57a33e8d04db7d4d0e007391a3203911e84 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 bf0177e9faa8484c70bc560e6cd6b92078b437dc..6a0e9997b3a5ff0640cc2223dfa3bc4b553890b1 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 3c83199e7ddc278e4a266b2b28db1feb9af08c65..63a8857f0fb085bcc6a0c534d3c6a7fa562c532d 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 e7244f8db8474d2bb5bae3173dbcfe1fc36a83eb..73384f1b4d009643c0ebc103b98dc5c75c8bfc33 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 19aaf0c20d7067c2fce414a94ee6595ffa771cc2..f8e29ca3c2344e43a21fd15396470f44c7cb784d 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 13bae85165cad9b92cd60a9d05137107713664fa..e0ce1a673d37aac12756a078d36cf2e54a5378a7 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 e48e4d2027d056424e16d435785aaf33e9274ab5..350f1b29ffb633fb0adcbdd1568d19caa4e7ccac 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 1f45e693a8182403f29510e66819df26fa23f55d..a5e2300fb285e5a01ea6aa583e66564649b4d7af 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 281304f61b9d859b5b1661c929cf85b2758221a0..38a279e3d90b1cf46a09e02932f30a4134cc6143 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 bdec7c3e9afbcddb1d44ff0919e503b9cf36313e..90b9f9faa67455972774f8dddff3815f0064a0ba 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 29f359def8521fca9f3469df7a3b2156cb2c711c..a226a5584b041a714e080bdc66d41d318f518f70 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 5812c2c2e35b888f54d5fa79d823bf0647d8c7f9..15e176494781a5a5146ef74f078eb2cc02313332 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 055b17eebfeea64c46497481cfd36f2a7f6a3642..0281d647baaa9456be6947e11374329582a55811 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 97f0adc98544bb0a5239ccc0075c76cef69c79bd..574e5ad9fd476c077abd085224b34d728688e6b7 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 50ee7f2208ad8f42f595a8b01a28464cdf4dc05e..6c55aeade259d722e84e2c14c52f1a3415badb88 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 854e0eee00a6031a96d33f4b23d9f0e2a6e461e6..a0b9a7589e93a1d8bce04aac7f3de26d4de68fbe 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 cd9929841ba64ea9df19187e176c00a1f234bd0f..e8df09d59978639606892c4f65d04e7780d81ec8 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 a10ed776e08490e141157962d5cf87ebd6dc5ad8..b706767c519e426ddd5a2afd8a3a3556d8618427 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 781ea1b0f446f711b62981587a23282a1c91d0ec..93eacb40ee1fb4d1bfa8f8c1e0466c1c4f5a51ce 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 9917bbfe12bfd2f1e11561f667607ae57cb872fa..a27572ee3332bdb98e5bc7a074b0ff2d95b2663b 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 e1a98e849efbe3d3c239676c4dd5e68bc24df6b7..804218f37b4fd210906070343c88479380684e61 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 ab48a1cdf244a75d7cf69c2bdadf07a3b549e55c..105c07a58bc7e3367be7d09e7123b770c1ad3db7 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 49b36f758625a4c4a7faa3f8ac0055f83cb76e04..a424d9fab50f1d062ced8e733ca3d2f742b5dc43 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 864f2dd5535ddc44a424c6c9d5751d0bf0a468cd..bb38e3d038ff1c2656ae8442183987029d9d85c2 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 f2b9b4492720544cac93e10408d2986d84d1f77b..8fc88c1e9f453a3fb6f973a848e10ecfa25e0fed 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 8eaa1280e459187a2018171aebcb61fc26b70c62..76f9781b41e279675b678bed67f334b2e3ab9d90 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 0eb6b5ccb46b6c2d7fdd7308e8de8a9dcfd4fc61..f3562f02e372806b1e9c20c21c4beb6e31d93ae3 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 daf6f4b885c7f09f872e648be4a709812bfaa286..9d25f1b4580a91a803af22bf88e4b7e48b97f4cd 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 befe39f57ed43fad6965316c73bd8f59df704d72..28d9a47055e714319d7fcc54979d58b3d3293697 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 3bed1446512cc55a44195f9a415c5af4c9473fab..78a19b5949a93427a8c5113f9bdbf69b1703fd9a 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 911e3067f3c4392bbb07a1d5bd6f430e5b1b8781..6431a4977456627ed7860a730c6734a0e155a98d 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 9d1a99dc08f4f267779b1cf30286eeb1a857a655..62b5e2b557a08c52f90df538906c91e22e65b898 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 3c78c3a2e415be7aa1ce51c1e1a77b0d4a87883e..75d5ee0d2659c4623caef848427d8d37e6d686f8 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 6815a91caa4045a80938e93400d5af565afef658..749e0b3b0c5869575f7d5b7323f67fbc232ecae0 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 a41f4353e1eb82d2ea0c10f94d3ab90e99f1616e..8b0f35ba54800fbb1f11933119496c6cf8723984 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 557a7470e1a29e02d8c7df70dd8bf466a03c881a..f4b3b7b03672e82b5c69815f1c9aeafe2c71785d 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 7bb9d86152fd5a580e231bae5a86174bd59a6bdf..2ce470f3063a79ed0599c0754cfcc3d539a9d66e 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 e462b5d8b2fbecc69652f44d481c9f45953d9a83..c1944eb3ba144a05fc75a4016cc06f667a9a3ece 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