Skip to content
Snippets Groups Projects
  1. Sep 25, 2020
    • Benjamin Cumming's avatar
      remove spurious const_cast (#1161) · 6b561d15
      Benjamin Cumming authored
    • Sam Yates's avatar
      Add NeuroML2 morphology support in new library. (#1148) · 3c453b64
      Sam Yates authored
      * Add CMake infrastructure for new `arbornml` library comprising Arbor's NeuroML2 (C++) support.
      * Implement NeuroML2 parsing and interpretation, using libxml2 for XML parsing.
      * Add associated documentation, unit tests.
      * Replace `arb::util::optional` with `std::optional` in stitch morphology interface.
      * Add optional prefix to `arb::label_dict` import.
      * Update CI to test arbornml, with associated workarounds for OS X targets.
      * Remove glob functionality from `sup`, as it is no longer needed (it was used for lmorpho) and it triggers yet another OS X issue.
      
      Fixes #1088.
  2. Sep 22, 2020
    • Benjamin Cumming's avatar
      Move region/locset S-expr evaluation from python lib to Arbor lib. (#1157) · 3ba5f437
      Benjamin Cumming authored
      * Move label and s-expr parsing code and unit tests from Python to arbor C++ library.
      * Update `locset` and `region` constructors that take string arguments to parse strings as s-expressions or "quoted" labels.
      * Modify the input stream modifier used to parse asc files to use a lookup table for substitutions, renamed it transmogrifier.                                                             
      * Replace `hopefully` type implemented in python headers with an `arb::util::expected`.
      * Add `ARBDEV_COLOR` CMake option that forces gcc and clang to always output color output.
      * Allow arbitrary strings in labels in region and locset expressions.
      * Add `parse_region_expression` and `parse_locset_expression` functions alongside the existing `parse_label_expression` function for use when a region or locset is expected. These calls will promote a quoted string `"label"` to `(region "label")` or 
       `(locset "label")` respectively.
      * Add user-defined string literals for labels so that the C++ interface can use `"soma"_lab` instead of awkward escaping `"\"soma\""`.
      * Simplify Python wrapper code.
  3. Sep 18, 2020
    • Sam Yates's avatar
      Replace `util::any` and `util::variant` with std:: equivalents. (#1152) · 30e4c684
      Sam Yates authored
      * Replace usages of `util::any` with `std::any`.
      * Modify `util::any_cast` so that it forwards `std::any` arguments to `std::any_cast`; move into own header.
      * Prevent `std::unique_any` from implicitly encapsulating `std::any` objects.
      * Replace `test_any.cpp` unit tests with `test_any_cast.cpp` unit tests.
      * Replace some usages of `std::is_same<X, Y>::value` with `std::is_same_v<X, Y>` as part of general C++17ification.
      * Remove `util/variant.hpp`, `test_variant.cpp`.
      * Replace occurrences of `util::variant` with `std::variant`.
      * Replace `util::variant::get<N>` with `std::get<N>`.
      * Replace `util::get_if<N>` with `std::get_if<N>`, passing a pointer to variant instead of a ref or value.
      * Add some standard #includes where they were required in the source, but only included transitively.
      * Some minor comment tidying and fix-ups.
      * Update C++ API docs.
      
      Fixes #1144.
    • Sam Yates's avatar
      Fix misleading typo in cable cel python docs. (#1153) · 72df06e6
      Sam Yates authored
      Fixes #1149.
  4. Sep 17, 2020
    • Nora Abi Akar's avatar
      Optional Ion data (#1147) · 3bfd82d3
      Nora Abi Akar authored
      * Make the members of `cable_cell_ion_data`  optional.
      * Add separate methods for painting `init_int_concentration` , `init_ext_concentration` and `init_reversal_potential` on the cell.
  5. Sep 16, 2020
  6. Sep 14, 2020
    • Sam Yates's avatar
      Replace `util::either` with `util::expected`. (#1142) · 74e911e6
      Sam Yates authored
      * Implement a workalike for the proposed `std::expected` class: see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0323r9.html .
      * Replace use of `either` with `expected` in `mprovider`, `mechanism_catalogue`, `util::partition_range`, and `pyarb::hopefully`.
      * Replace use of `either` with `variant` in `util::sentinel_iterator`.
      * Add `in_place_t` constructor for `util::optional`.
      * Fix move assignment bug in `util::variant`.
      * Remove `util/either.hpp` and associated tests.
      
      Fixes #1135. 
    • Benjamin Cumming's avatar
      Update to C++17 (#1141) · 74411404
      Benjamin Cumming authored
      * Update CMake CXX version.
      * Make CUDA 10 a minimum requirement and remove CUDA 9 support code.
      * Set up g++ Travis tests to use g++ 8.
      * Explicitly set C++14 version for nvcc.
      * Properly split cuda compilation, including in unit tests.
      * Remove unnecessary modcc `SOLVE` warning.
      * Update pybind11 module to tag v2.5.0
      * Replace `util::size` and `util::data` with `std::` equivalents.
  7. Sep 08, 2020
  8. Sep 07, 2020
  9. Aug 31, 2020
    • Sam Yates's avatar
      Extend place_pwlin interface for multivalued. (#1124) · 57415f0b
      Sam Yates authored
      * Add `equal_range()` method to `pw_elements`.
      * Simplify `embed_pwlin`, `place_pwlin` implementations, in particular the handling of zero-length branches.
      * Scale segment positions in `embed_pwlin` by divding by branch_length, instead of multiplying by the reciprocal, as the latter is a false economy after all the caveats that need to be checked to preserve ordering and bounds.
      * Add new method `place_pwlin::all_at()`, which gives all the points that correspond to a single `mlocation`.
      * Add new method `place_pwlin::all_segments()`, providing the set of segments and/or partial-segments that correspond to an extent.
      * Add new method `place_pwlin::segments()`, which provides a minimal set of segments and/or partial-segments that map onto an extent.
      * Extend unit tests to suit.
      
      Fixes #1116 and #1068.
  10. Aug 27, 2020
    • Benjamin Cumming's avatar
      Pydoc (#1122) · 23a24b5a
      Benjamin Cumming authored
      This PR adds a bunch of high-level docs for concepts related to single cell models.
        * morphologies
        * labels (region and locset expressions)
        * mechanisms
        * cable cells
      
      It adds some python scripts to the `doc` path, which are called during documentation building to generate images of cell morphologies, regions and locsets that are generated in a separate script that uses the Arbor Python API.
      
      The docs are not complete: the cable cell and mechanism docs are unfinished, and the tutorial section needs to build on these concepts to give more detailed step by step examples.
    • Sam Yates's avatar
      Merge pull request #1123 from halfflat/feature/stitch-morphology · 135e91ac
      Sam Yates authored
      New PR post master rollback; squashed and rebased, but reprises #1111.
      
      * Add (forward) ordered forest implementation, tests.
      * Add `segment` region expression; to ease implementation, `msegment` now also knows its own id.
      * Add `stitch_builder` and `stitched_morphology`. A stitch corresponds to a labelled, linearly-interpolated segment which can be attached at any point along a parent stitch. A `stitched_morphology` takes a `stitch_builder` object and constructs a segment tree and morphology, and provides a dictionary of stitch labels to segment indices and region expressions.
      * Add `import` method for `label_dict`, so that the label dictionary returned by `stitched_morphology` can be merged with an existing dictionary.
      * Add section on stitch builder etc. to cable cell docs.
      * Update cable cell docs to remove out of date info and to provide some context.
      * Describe ordered forest datastructure and interface in a long comment at the...
    • Sam Yates's avatar
      Retrieve probe metadata from simulator object. (#1101) · 3cc73f1e
      Sam Yates authored
      * Add `get_probe_metadata` method to `simulator` that forwards probe metadata queries to appropriate cell group, via new interface method in cell group base class.
      * Replace `gid_to_local_` map in simulator implementation with a map that takes gid to local cell index _and_ local cell group index.
      * Move scheduler association map mutex into the cell group where it is being used (i.e. `mc_cell_group`).
      * Add generic (`visit`-able) interface to specifc fvm-probe types for accessing metadata via `any_ptr`.
      * Implement (override) `get_probe_metadata` method for `mc_cell_group`.
      * Use new cv policy API for LFP example discretization.
      * Use new probe metadata API to simplify LFP example sampler callback.
      * Add `on_components` locset expression that gives points a relative distance from the head of each component of a region.
      * Simplify implementation of thingification of `ls::boundary`.
      
      Fixes #1079 
  11. Aug 26, 2020
  12. Aug 20, 2020
    • Nora Abi Akar's avatar
      Expose `time` to the mechanisms (#1113) · 57394539
      Nora Abi Akar authored
      The `vec_t_` time vector is already available to the mechanisms, but not exposed. It is indexed by `cell_index` instead of directly by the `node_index` (`vec_t[vec_ci_[node_index_[i]]]`). This kind of indexing was previously unavailble. It has not been added to the printers. 
      This PR also includes some cleanup in the vectorized code printer. 
      
      Address #1109
  13. Aug 13, 2020
  14. Aug 10, 2020
  15. Aug 06, 2020
  16. Aug 05, 2020
  17. Jul 28, 2020
  18. Jul 24, 2020
  19. Jul 23, 2020
    • Harmen Stoppels's avatar
      Set the status on the commit from the PR (#1099) · 4d328ee0
      Harmen Stoppels authored
      This is copied from DLA Future. It should set the CI status on the commit from the PR instead of just on the Bors commit. This way the gitlab CI status also appears in the checks section below the PR.
    • Nora Abi Akar's avatar
      Fix python examples (#1096) · 5933b6f1
      Nora Abi Akar authored
      Fix a Python example that was out of date.
    • thorstenhater's avatar
      Gpu/restrict all the things (#1026) · 5ace929e
      thorstenhater authored
      Make all pointer arguments to kernels `__restrict__` to avoid unnecessary loads.
      
      The effect on the busyring benchmark (swapped pas -> hh) with 8192 cells on a V100 GPU (time for model-run in seconds): 
      ```
      |----------+-------|
      | Baseline | After |
      |----------+-------|
      |    2.347 | 2.268 |
      |    2.345 | 2.262 |
      |    2.321 | 2.276 |
      |    2.323 | 2.267 |
      |    2.330 | 2.249 |
      |----------+-------|
      |    2.321 | 2.249 |
      |----------+-------|
      ```
  20. Jul 21, 2020
  21. Jul 13, 2020
    • Benjamin Cumming's avatar
      flexible cable-based cable_cell representation (#1083) · 9dc8969c
      Benjamin Cumming authored
      * Remove spherical root/soma from morphology representations and logic.
      * Replace `sample_tree` with `segment_tree`, which represents sample points in pairs and allows the representation of detached branches and cable segments.
      * Remove sample point properties and predicates.
      * Remove `cv_policy_flag::single_root_cv` as somata with a single attached dendrite will have a representation in the morphology of a single branch.
      * Remove `arb::math::{volume/area}_sphere`, which are no longer being used.
      * Remove spherical root special cases from `embed_pwlin` and `place_pwlin` objects.
      * Add textual representation of `mnpos` in morphology exception text.
      * Rename `sample_tree_from_swc` to `segement_tree_from_swc` and remove any special casing for one point somata.
      * Remove `msample` and `mbranch` types.
      * Update unit tests and python wrapper to reflect the changes.
    • thorstenhater's avatar
      Python/allen catalogue (#1074) · 6151e173
      thorstenhater authored
      * Add import method for mechanism catalogues, allowing mechanisms from a second catalogue to be incorporated with a prefix, together with Python interface.
      * Expose `global_allen_catalogue`.
      * Extend unit tests to cover mechanism catalogue import and check for name collision error cases.
  22. Jul 08, 2020
  23. Jul 07, 2020
  24. Jul 02, 2020
    • Sam Yates's avatar
      Allow CV policies to be composed over subregions. (#1078) · 2e90a382
      Sam Yates authored
      * Move `cv_policy` classes to new source files.
      * Remove `cv_policy_flag::single_root_cv`.
      * Allow all supplied `cv_policy` makers to be restricted a domain specified by a region: the policy is then applied per component, with the boundary points of the completion of the components included.
      * Expose `cv_policy` domain in public interface.
      * Add `components` function for splitting an extent into disconnected components. Add comment describing what is meant by connected in this context.
      * Rename `super` region function to `complete`.
      * Add region expression functions `complement` and `difference`.
      * Add new locset expression function `boundary` which returns the extrmal points of each component of a region.
      * Add new locset expression `cboundary` which returns the extremal points of the completion of each component of the region, which is what we need to close off CVs generated by region-restricted CV policies.
      * Add locset expression `supp...
  25. Jun 25, 2020
    • Nora Abi Akar's avatar
      Refactor simd API and add SVE backend (#1044) · 7fe3141d
      Nora Abi Akar authored
      * Add new API for the SIMD library that is compatible with the ARM 'sizeless' SVE vectors. Language restrictions prevent the use of the operator overload interface used up to this point for SIMD.
      * Add `indirect_expressions` and `indirect_indexed_expressions` for describing memory reads/writes. `where_expressions` control masked access to simd vectors.
      * Implement the SVE SIMD back-end in accordance with the alternate SIMD API.
      * Retrieve vector width information from compiled mechanisms.
      * Use alternate SIMD API in modcc-generated mechanisms.
      * Add assertion in generated mechanism code that checks runtime vector width compatibility.
      
      Fixess #1021. 
    • Sam Yates's avatar
      Add LFP example/demo. (#1073) · 0c374140
      Sam Yates authored
      * Add C++ analogue to simple NEURON demo provided by LFPy project under example/lfp.
      * Add plot script for rending example output to match that from NEURON demo.
  26. Jun 24, 2020
    • thorstenhater's avatar
      Performance/copy to swap (#1027) · a316dd87
      thorstenhater authored
      Remove a redundant copy in favor of a swap operation for a gain in performance;
      especially on GPU since copies are synchronous. Similarly, instead of solving the 
      linear system into an intermediate array, write output directly into the target.
      
      Here is the effect on the busyring benchmark (swapped pas -> hh) with 8192 cells on a
      V100 GPU (time for model-run in seconds).
      ```
      |----------+--------------------------------+------------------------------------|
      | Baseline | fvm_lowered_cell: copy -> swap | matrix: solve + copy -> solve_into |
      |----------+--------------------------------+------------------------------------|
      |    2.230 |                          2.199 |                              2.129 |
      |    2.231 |                          2.209 |                              2.132 |
      |    2.225 |                          2.209 |                              2.136 |
      |    2.227 |                          2.186 |                              2.130 |
      |    2.220 |   ...