Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2096

Reorder state dimensions for minimum strides over node state

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: TVB-Simulator
    • Labels:
      None

      Description

      Current node state (in model dfun for example) has the state variable as the longest strided dimension. This makes the code somewhat more legible but requires much wider and more repetitive memory access patterns, which limit the speed of dfun evaluation.

      This task is to evaluate the impact of reordering the state dimensions from (svar, node, mode) to (node, svar, mode) so that state variables are contiguous in memory.

      This is complicated by the implicit API provided by the simulator wherein the svar dimension precedes the node dim, so this reordering would apply only internally to the simulator package.

      Another possibility would be to maintain the order of the dimensions, but change their strides. The arrays would no longer have monotonic strides, so neither Fortran nor C ordered, but it would keep API and allow for performance improvement.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              marmaduke.woodman Marmaduke Woodman
              Reporter:
              marmaduke.woodman Marmaduke Woodman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  0m
                  Logged:
                  Time Not Required
                  Not Specified