Class BufferManagerStorage.Region

java.lang.Object
uk.ac.manchester.spinnaker.storage.BufferManagerStorage.Region
Enclosing interface:
BufferManagerStorage

public static class BufferManagerStorage.Region
extends Object
A region descriptor. Not expected to support useful notions of equality.
Author:
Donal Fellows
  • Field Summary

    Fields 
    Modifier and Type Field Description
    @Valid CoreLocation core
    What core owned the region? Note that the region might be retrieved from another core of the same chip.
    @javax.validation.constraints.PositiveOrZero int finalIgnore
    How many extra bytes are being read at the end of the region in order to get an aligned read?
    @javax.validation.constraints.PositiveOrZero int initialIgnore
    How many extra bytes are being read at the start of the region in order to get an aligned read?
    @javax.validation.constraints.NotNull boolean isRecording
    States is a recording region True if this region is appended after every run/loop.
    @javax.validation.constraints.Positive int realSize
    How much data was originally requested?
    int regionIndex
    What was the index of the region in the table of regions for the core?
    @javax.validation.constraints.Positive int size
    How much data should be downloaded? This is not necessarily the size of the region.
    @NotNull MemoryLocation startAddress
    Where should the data be downloaded from? This is not necessarily the start of the region.
  • Constructor Summary

    Constructors 
    Constructor Description
    Region​(HasCoreLocation core, int regionIndex, MemoryLocation startLocation, int size, boolean isRecording)
    Create a region descriptor.
  • Method Summary

    Modifier and Type Method Description
    boolean isAligned()  
    boolean isNonEmpty()  
    String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • core

      @Valid public final @Valid CoreLocation core
      What core owned the region? Note that the region might be retrieved from another core of the same chip.
    • regionIndex

      public final int regionIndex
      What was the index of the region in the table of regions for the core?
    • startAddress

      @NotNull public final @NotNull MemoryLocation startAddress
      Where should the data be downloaded from? This is not necessarily the start of the region.
    • size

      @Positive public final @javax.validation.constraints.Positive int size
      How much data should be downloaded? This is not necessarily the size of the region.
    • realSize

      @Positive public final @javax.validation.constraints.Positive int realSize
      How much data was originally requested?
    • initialIgnore

      @PositiveOrZero public final @javax.validation.constraints.PositiveOrZero int initialIgnore
      How many extra bytes are being read at the start of the region in order to get an aligned read?
    • finalIgnore

      @PositiveOrZero public final @javax.validation.constraints.PositiveOrZero int finalIgnore
      How many extra bytes are being read at the end of the region in order to get an aligned read?
    • isRecording

      @NotNull public final @javax.validation.constraints.NotNull boolean isRecording
      States is a recording region True if this region is appended after every run/loop. False is this region is overwritten aevery run.
  • Constructor Details

    • Region

      public Region​(HasCoreLocation core, int regionIndex, MemoryLocation startLocation, int size, boolean isRecording)
      Create a region descriptor.
      Parameters:
      core - What core owned the region? Note that the region might be retrieved from another core of the same chip.
      regionIndex - What was the index of the region in the table of regions for the core?
      startLocation - Where should the data be downloaded from? This is not necessarily the start of the region.
      size - How much data should be downloaded? This is not necessarily the size of the region.
      isRecording - States is a recording region True if this region is appended after every run/loop. False is this region is overwritten aevery run.
  • Method Details

    • isAligned

      public final boolean isAligned()
      Returns:
      Whether this is an aligned buffer. Aligned buffers can be read with efficient reading techniques.
    • isNonEmpty

      public final boolean isNonEmpty()
      Returns:
      Whether this is a non-empty buffer.
    • toString

      public String toString()
      Overrides:
      toString in class Object