Object/Class

cogx.compiler.parser.syntaxtree

Actuator

Related Docs: class Actuator | package syntaxtree

Permalink

object Actuator extends SemanticError

Factory for creating actuators that write fields to Scala arrays.

Linear Supertypes
SemanticError, CompilerError, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Actuator
  2. SemanticError
  3. CompilerError
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. type IteratorOfFloatFunc = (Iterator[Float]) ⇒ Unit

    Permalink
  2. type ScalarFieldReaderFunc = (platform.cpumemory.readerwriter.ScalarFieldReader) ⇒ Unit

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(source: Field, update: IteratorOfFloatFunc, resetHook: () ⇒ Unit)(implicit tt: ClassTag[IteratorOfFloatFunc]): Actuator

    Permalink

    Create an actuator for an nD scalar field source whose update callback function takes an Iterator[Float] as an argument.

    Create an actuator for an nD scalar field source whose update callback function takes an Iterator[Float] as an argument.

    Init supplied: NO Reset supplied: YES

    Some extra implicit arg had to added here to disambiguate this constructor's signature from the above-seen:

    apply(source: Field, update: ScalarFieldReaderFunc, resetHook: () => Unit)

    source

    The field to written output to an array each clock cycle.

    update

    A callback function that is called after each new value is available.

    resetHook

    An callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  5. def apply(source: Field, update: ScalarFieldReaderFunc, resetHook: () ⇒ Unit): Actuator

    Permalink

    Create an actuator for an nD scalar field source whose update callback function takes a ScalarFieldReader as an argument.

    Create an actuator for an nD scalar field source whose update callback function takes a ScalarFieldReader as an argument.

    Init supplied: NO Reset supplied: YES

    source

    The field to written output to an array each clock cycle.

    update

    A callback function that is called after each new value is available.

    resetHook

    An callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  6. def apply[T](source: Field, target: T)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for an nD scalar field source whose target can be a function(ScalarFieldReader), function(Iterator[Float]) or an nD array of Floats.

    Create an actuator for an nD scalar field source whose target can be a function(ScalarFieldReader), function(Iterator[Float]) or an nD array of Floats.

    Init supplied: NO Reset supplied: NO

    source

    The field to written output to an array each clock cycle.

    target

    Receiver of the data, a function of a ScalarFieldReader or Iterator[Float].

    returns

    An actuator that writes source to output each cycle.

  7. def apply(source: Field, output: Array[Array[Array[Float]]], resetHook: () ⇒ Unit): Actuator

    Permalink

    Create an actuator for a 3D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 3D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: NO Reset supplied: YES

    source

    The field to written output to an array each clock cycle.

    output

    The output array where field is written.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  8. def apply[T](source: Field, target: T, init: (Int, Int, Int) ⇒ Float)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 3D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 3D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES Reset supplied: NO

    source

    The field to written output to an array each clock cycle.

    target

    Receiver of the data, either an Array[ Array[ Array[Float] ] ] or function of a ScalarFieldReader.

    init

    Function providing initial values upon reset.

    returns

    An actuator that writes source to output each cycle.

  9. def apply[T](source: Field, target: T, init: (Int, Int, Int) ⇒ Float, resetHook: () ⇒ Unit)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 3D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 3D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES Reset supplied: YES

    The use of TypeTag's here was used to coerce what would have been two distinct apply() method signatures into one. The problem with having two signatures is that the Scala compiler then started refusing to convert fairly generic init function actual arguments of the form (say):

    (l,r,c) => l + r + c

    into the required Function3[Int,Int,Int,Float] type, requiring the user to instead write:

    (l:Int, r:Int, c:Int) => (l + r + c).toFloat

    Rather than break the existing codebase, we put up with the fact that the type checking on the target parameter is now done at runtime, rather than at compile time.

    source

    The field to written output to an array each clock cycle.

    target

    Receiver of the data, either an Array[ Array[ Array[Float] ] ] or function of a ScalarFieldReader.

    init

    Function providing initial values upon reset.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  10. def apply(source: Field, output: Array[Array[Float]], resetHook: () ⇒ Unit): Actuator

    Permalink

    Create an actuator for a 2D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 2D scalar field source that writes the output of that field to the array output which the user can access. The actuator outputs 0's upon reset.

    Init supplied: NO Reset supplied: YES

    source

    The field to written output to an array each clock cycle.

    output

    The output array where field is written.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  11. def apply[T](source: Field, target: T, init: (Int, Int) ⇒ Float)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 2D scalar field source that invokes a callback function 'update' that is passed a ScalarFieldReader.

    Create an actuator for a 2D scalar field source that invokes a callback function 'update' that is passed a ScalarFieldReader.

    Init supplied: YES Reset supplied: NO

    source

    The field to written output to an array each clock cycle.

    target

    Receiver of the data, either an Array[ Array[Float] ] or function of a ScalarFieldReader.

    init

    Function providing initial value upon reset.

    returns

    An actuator that writes source to output each cycle.

  12. def apply[T](source: Field, target: T, init: (Int, Int) ⇒ Float, resetHook: () ⇒ Unit)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 2D scalar field source that invokes a callback function 'update' that is passed a ScalarFieldReader.

    Create an actuator for a 2D scalar field source that invokes a callback function 'update' that is passed a ScalarFieldReader.

    Init supplied: YES Reset supplied: YES

    The use of TypeTag's here was used to coerce what would have been two distinct apply() method signatures into one. The problem with having two signatures is that the Scala compiler then started refusing to convert fairly generic init function actual arguments of the form (say):

    (r,c) => r + c

    into the required Function2[Int,Int,Float] type, requiring the user to instead write:

    (r:Int, c:Int) => (r + c).toFloat

    Rather than break the existing codebase, we put up with the fact that the type checking on the target parameter is now done at runtime, rather than at compile time.

    source

    The field to written output to an array each clock cycle.

    target

    Receiver of the data, either an Array[ Array[Float] ] or function of a ScalarFieldReader.

    init

    Function providing initial value upon reset.

    returns

    An actuator that writes source to output each cycle.

  13. def apply(source: Field, output: Array[Float], resetHook: () ⇒ Unit)(implicit tt: ClassTag[() ⇒ Unit]): Actuator

    Permalink

    Create an actuator for a 0D or 1D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 0D or 1D scalar field source that writes the output of that field to the array output which the user can access. The actuator outputs 0's upon reset.

    Init supplied: NO Reset supplied: YES

    Some extra implicit arg had to added here to disambiguate this constructor's signature from the above-seen:

    apply(source: Field, output: Array[Float], init: () => Float)

    source

    The field to be written to an array each clock cycle.

    output

    The output array where field is written.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  14. def apply[T](source: Field, target: T, init: (Int) ⇒ Float)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 1D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 1D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES Reset supplied: NO

    source

    The field to be written to an array each clock cycle.

    target

    Receiver of the data, either an Array[Float] or function of a ScalarFieldReader.

    init

    Function providing initial values upon reset.

    returns

    An actuator that writes source to output each cycle.

  15. def apply[T](source: Field, target: T, init: (Int) ⇒ Float, resetHook: () ⇒ Unit)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 1D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 1D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES Reset supplied: YES

    The use of TypeTag's here was used to coerce what would have been two distinct apply() method signatures into one. The problem with having two signatures is that the Scala compiler then started refusing to convert fairly generic init function actual arguments of the form (say):

    (c) => c + 1

    into the required Function1[Int,Float] type, requiring the user to instead write:

    (c:Int) => c + 1f

    source

    The field to be written to an array each clock cycle.

    target

    Receiver of the data, either an Array[Float] or function of a ScalarFieldReader.

    init

    Function providing initial values upon reset.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  16. def apply[T](source: Field, target: T, initVal: Float)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES (supplied as Float) Reset supplied: NO

    source

    The field to be written to an array each clock cycle.

    target

    Receiver of the data, either an Array[Array[Float] or function of a ScalarFieldReader.

    initVal

    Initial value upon reset.

    returns

    An actuator that writes source to output each cycle.

  17. def apply[T](source: Field, target: T, initVal: Float, resetHook: () ⇒ Unit)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES (supplied as Float) Reset supplied: YES

    source

    The field to be written to an array each clock cycle.

    target

    Receiver of the data, either an Array[Float] or function of a ScalarFieldReader.

    initVal

    Initial value upon reset.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  18. def apply[T](source: Field, target: T, init: () ⇒ Float)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES Reset supplied: NO

    source

    The field to be written to an array each clock cycle.

    target

    Receiver of the data, either an Array[Array[Float] or function of a ScalarFieldReader.

    init

    Function providing initial value upon reset.

    returns

    An actuator that writes source to output each cycle.

  19. def apply[T](source: Field, target: T, init: () ⇒ Float, resetHook: () ⇒ Unit)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): Actuator

    Permalink

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Create an actuator for a 0D scalar field source that writes the output of that field to the array output which the user can access.

    Init supplied: YES (supplied as () => Float) Reset supplied: YES

    The use of TypeTag's here was used to coerce what would have been two distinct apply() method signatures into one. The problem with having two signatures is that the Scala compiler then started refusing to convert fairly generic init function actual arguments of the form (say):

    () => 1

    into the required Function0[Float] type, requiring the user to instead write:

    () => 1f

    source

    The field to be written to an array each clock cycle.

    target

    Receiver of the data, either an Array[Float] or function of a ScalarFieldReader.

    init

    Function providing initial value upon reset.

    resetHook

    An optional callback function that is called upon reset.

    returns

    An actuator that writes source to output each cycle.

  20. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  21. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  27. def internalError(message: String): Unit

    Permalink

    Declare an internal error described by message.

    Declare an internal error described by message.

    Definition Classes
    CompilerError
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def targetToUpdateFunction[T](source: Field, target: T)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): ScalarFieldReaderFunc

    Permalink

    Create an actuator "update" function that takes a ScalarFieldReader and returns Unit.

    Create an actuator "update" function that takes a ScalarFieldReader and returns Unit.

    source

    The field supplying the data seen by the Actuator.

    target

    Receiver of the data, either an nD Float Array or function of a ScalarFieldReader.

    returns

    The update function

  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def wrap(f: (Iterator[Float]) ⇒ Unit): (platform.cpumemory.readerwriter.ScalarFieldReader) ⇒ Unit

    Permalink

    Adapter useful in expanding the functionality of Actuators.

    Adapter useful in expanding the functionality of Actuators. Originally, the Actuator update() was a user function that would take an Iterator[Float]. To enable bulk copies of the Actuator data to a user Array[Float], the callback has been generalized from an Iterator[Float] to a ScalarFieldReader (from which one can extract an iterator if one wants, or invoke the bulk copier function get()).

    This wrapper converts the legacy 'update' function signature to the current more capable one.

    f

    Old style form of update() that takes an Iterator[Float]

    returns

    new style form of update() that takes a ScalarFieldReader

  39. def zeroInitOp(field: Field): ConstantOp with Product with Serializable

    Permalink

    Create a ConstantScalarOp that inits the field to all zeros.

Inherited from SemanticError

Inherited from CompilerError

Inherited from AnyRef

Inherited from Any

Ungrouped