Skip to content
Snippets Groups Projects
  1. Nov 19, 2020
    • Brent Huisman's avatar
      Fix portability issues with long double in modcc. (#1246) · d75a1bcf
      Brent Huisman authored
      Change from long double to double for storing floating point values in modcc.
      
      WSL, and Windows generally, treats long double differently than Linux, which leads to inconsistencies in literal numeric values in code generated by modcc on the two platforms.
      
      Fixes #1245
      d75a1bcf
  2. Sep 14, 2020
    • 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.
      74411404
  3. 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
      57394539
  4. Jul 08, 2020
  5. Jul 07, 2020
  6. 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. 
      7fe3141d
  7. Jun 24, 2020
  8. May 28, 2020
    • thorstenhater's avatar
      Parser improvements for modcc (#1050) · b6bd831b
      thorstenhater authored
      * Add ranges in STATE blocks of the form FROM ... TO ...
      * Unit test for the above
      * Add type check for <..., ...> ranges
      * Add units in procedure argument lists
      * Unit test for the above.
      b6bd831b
  9. May 20, 2020
  10. May 15, 2020
  11. Apr 15, 2020
    • Nora Abi Akar's avatar
      Compile arbor for AMD and Nvidia GPUs using clang (#1007) · 90a1e6d7
      Nora Abi Akar authored
      - Add option to compile Arbor for HIP/CUDA backend using Clang. 
      - Add new CMake option `ARB_GPU_COMPILE_TYPE` to distinguish between three possible gpu platforms/builds: `cuda-nvcc`; `cuda-clang`; `hip-clang`
      - Add gpu wrapper functions in `arbor/backends/gpu/gpu_api.hpp` and `arborenv/gpu_api.hpp` which call HIP/CUDA functions depending on the platform
      - Rename functions and files: cuda -> gpu
      - Add downgraded warp primitives for HIP
      - Implement `uuid` workaround for HIP
      - Set correct alignment and warp size for AMD gpus
      - Update installation guide and docs.
      - Update pip/setuptools to support new gpu targets
      
      Fixes #833
      90a1e6d7
  12. Mar 24, 2020
    • Nora Abi Akar's avatar
      Remove TCLAP (#981) · 321a5a24
      Nora Abi Akar authored
      * Replace TCLAP with tinyopt, remove TCLAP from `ext/`.
      * Replace `sup/tinyopt.hpp` with copy of external tinyopt, update use of `tinyopt` in unit tests and examples to suit.
      * Use tinyopt's 'smallopt' interface in `modcc`, `brunel` example.
      * Update tinyopt interface in `single` example.
       Fix our attributions and add HBP acknowledgement
      
      Addresses #557 #695 #803 
      321a5a24
  13. Feb 11, 2020
    • Nora Abi Akar's avatar
      Modcc: modify semantic passes (#932) · 6e2be21b
      Nora Abi Akar authored
      - Reset the error of the semantic pass of an expression at the start of the function call. 
      - Check the errors of sub-expressions after applying to them their semantic passes, and report errors if found. If the error could disrupt the rest of the original semantic pass, return.
      - Check errors in functions/procedures before and after inlining, but not during. 
      
      Fixes #931 
      6e2be21b
  14. Jan 23, 2020
    • Nora Abi Akar's avatar
      Modcc: Add vectorization support for conditionals (#930) · 31cae053
      Nora Abi Akar authored
      * Add support for conditionals with the SIMD printer by using `where_expresssions` to mask assignments to range variables that happen inside if/else blocks. Assignments to non-range variables are executed non-masked when correctness is ensured. 
      
      Fixes #836 
      31cae053
  15. Jan 07, 2020
  16. Dec 20, 2019
    • Nora Abi Akar's avatar
      Modcc: refactor function expander and inliner (#912) · 0549d2eb
      Nora Abi Akar authored
      * Rewrite the function expander which lowers function calls and function arguments, such that both steps are done in the same visitor, and both visitors are applied to the entire procedure. 
      * Rewrite the function inliner such that it is also applied to an entire procedure, after all functions have been expanded. The function inliner iterates over the body of the procedure, inlining one function call at a time, until all function calls have been inlined. 
      * Conductivity and current accumulations are also modified to be done in one step at the end of `nrn_current`
      0549d2eb
  17. Dec 05, 2019
  18. Nov 28, 2019
  19. Nov 27, 2019
  20. Oct 23, 2019
  21. Oct 22, 2019
  22. Oct 02, 2019
    • Nora Abi Akar's avatar
      Expose CV diam to mechanisms (#880) · 37d03975
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Sets the diameter of a CV as the diameter at the middle of a CV
      Exposes the diameter in `shared_state` and `mechanism`
      Adds support in modcc to treat `diam` as a special parameter 
      Implements unit tests
      
      Fixes #850 
      37d03975
  23. Oct 01, 2019
  24. Sep 30, 2019
  25. Sep 23, 2019
    • Benjamin Cumming's avatar
      Cable cell (#865) · aaa42b77
      Benjamin Cumming authored
      WIP on implementation of new cable cell API.
      
      * Hide implementation and state using PIMPL
      * Add consistent `place` methods for adding synapse, stimuls, gap junction site and spike detectors to `cable_cell`.
      * Add default constructor for `region` and `locset` that create empty `nil` instances.
      aaa42b77
  26. Sep 16, 2019
    • Sam Yates's avatar
      Address Clang 8 warnings. (#867) · 12150544
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      * Remove or implement move ctor/assign operations for ostream-derived classes.
      * Add explicit test for a zero row in modcc's sparse and linear solver finalize routines.
      * Forward declare `morphology_impl` as a struct.
      * Remove redundant capture in a lambda expression in fvm_layout.cpp.
      * Add extra parens in an assign-and-test condition in mechcat.cpp.
      12150544
  27. Sep 02, 2019
    • Nora Abi Akar's avatar
      Modcc compartment (#846) · efe17c53
      Nora Abi Akar authored
      * Adds modcc support for COMPARTMENT statements of the form: `COMPARTMENT v {state_0, state_1, ..., state_n}`.
      * Use `COMPARTMENT` values `v` to multiply the derivative of state variables `state_0, state_1, ..., state_n` in associated kinetic scheme blocks.
      
      Fixes #838.
      efe17c53
  28. Aug 21, 2019
    • Nora Abi Akar's avatar
      modcc: parse and process `LINEAR` blocks (#840) · 336c0574
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add support for parsing and processing `LINEAR` blocks: 
      
      Changes: 
      * `SOLVE` expressions can be called from inside an `INITIAL` block, but only if they are solving a linear system
      * Tilde expressions can now be either linear expressions or reaction expressions
      * Linear expressions need to be rewritten before being sent to the solver, this is done using `LinearRewriter`
      * The linear system is setup in `LinearSolverVisitor` fills the lhs and rhs of the symbolic matrix   
      * The matrix is recued using `gj_reduce`, which now works on non-diagonal matrices. 
      
      Fixes #839 
      336c0574
  29. Aug 15, 2019
    • Nora Abi Akar's avatar
      modcc: process `CONSERVE` statements in `KINETIC` block (#829) · fdd9e7ee
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add modcc support for processing `CONSERVE` statements in `KINETIC` blocks.
      
      The `KineticRewriter` remains unchanged. The `SparseSolverVisitor` is modified. 
      If one or more `CONSERVE` statements are present, corresponding rows in the symbolic matrix, which would otherwise represent differential equations, are replaced by the content of the conserve statements. 
      
      Addresses #828 and #830 
      fdd9e7ee
  30. Jul 29, 2019
    • Nora Abi Akar's avatar
      Add CONSTANT block support for modcc (#825) · 74616108
      Nora Abi Akar authored
      Addresses #824.
      
      * Add modcc support for `CONSTANT` blocks in NMODL, subject to the following constraints:
          - Any identifier declared in the `CONSTANT` block may only be used after that declaration (including within the `CONSTANT` block itself).
          - Units in the `CONSTANT` block are parsed but not processed.
          - Values assigned to identifiers inside the `CONSTANT` block may only be signed numeric literals, or an already declared constant, possibly preceded by unary minus.
      74616108
    • Sam Yates's avatar
      New revpot and per-cell/segment parameters. (#823) · fd4f4def
      Sam Yates authored
      * Collect cable cell parameter setting structures into `include/cable_cell_param.hpp`.
      * Restructure electrical specifications (axial resistance, membrane capacitance) and ionic concentrations and reversal potentials on cable cells, so that these can be specified with a global default, per-cell defaults, and per-segment values.
      * Allow reversal potentials to be set by a mechanism of a new kind 'revpot', which are prohibited from maintaining state or writing to any shared state other than ionic reversal potentials.
      * Specify reversal potential mechanisms as global defaults or per-cell. Reversal potential mechanisms may not be specified at the level of a segment in order to avoid non-linearities arising from the discretization.
      * Supply default cable cell parameter data that matches NEURON values (this is _not_ used by default).
      * Replace the d_lambda calculation with one that approximates more faithfully the effect of tapered segments, and which will ...
      fd4f4def
  31. Jul 02, 2019
    • Nora Abi Akar's avatar
      pass correct index to simd procedure calls (#805) · 74df9f5a
      Nora Abi Akar authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Add missing check of whether to use direct or indirect indexing for simd procedure calls.
      
      fixes #804
      74df9f5a
    • Sam Yates's avatar
      Rejig weight and conversions for modcc (#800) · f9f34ccf
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Address inconsistencies in unit conversions between current updates, initialization, ionic currents etc.
      
      Fixes issues #793 and #798.
      
      * Correct units in comments for ion state iX_ to a current density.
      * Remove conversion factor for NMODL current densities [mA/cm²] to Arbor current densities [A/m²] from layout weight: from the point of view of Arbor, mechanisms now write in units that Arbor uses natively.
      * Remove weight_ as a magic modcc variable; applying weight_ is now performed directly by code generated by printers.
      * Change IndexedVariable interface: remove redundant index_name; remove 'op'. Whether external data is accumulated or assigned is now a property of the corresponding sourceKind.
      * Conversion factors for NMODL <-> Arbor are collated in printerutils.cpp, determined by the external data sourceKind.
      * Permit direct assignment of external data, as opposed to a weighted sum. This behaviour will be required for reversal potential handling.
      * `current_` and `conducitivity_` get a different sourceKind in point mechanisms, allowing us to distinguish current contributions from current density contributions (and applying correct unit scaling accordingly.)
      * Add unit test for correct initialization and scaling of ionic currents, together with two corresponding unit test mechanisms.
      f9f34ccf
  32. Jun 27, 2019
  33. Jun 12, 2019
    • Sam Yates's avatar
      Extend and implement extended VALENCE semantics (#781) · 76d10ff1
      Sam Yates authored and Benjamin Cumming's avatar Benjamin Cumming committed
      Extended USEION VALENCE support.
      
      * Augment modcc parser to accept identifier or signed integer after VALENCE.
      * Treat identifer after VALENCE as global scalar, tied to ionic charge.
      * Add ionic charge field to mechanism ion parameter pointers, replacing scalar in shared state with a length-1 array.
      * Verify presence of ion name and check ion charge against numeric valence in mechanism info when discretizing in `fvm_build_mechanism_data`.
      * Pass ion info, coalesce_synapse global state to `fvm_build_mechanism_data` just via cable cell global properties.
      * Add more unit-test only mechanisms (test_ca_read_valence, test_cl_valence).
      * Add unit tests for valence verification and reading into mechanism state (multicore only).
      * Update existing unit tests for new interfaces.
      
      Implements #780.
      76d10ff1