trait Functions extends Base with ProgramGraphs
- Alphabetic
- By Inheritance
- Functions
- ProgramGraphs
- AstGraphs
- Transforming
- Base
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
abstract
class
BaseDef[+T] extends Scalan.Node with Scalan.Def[T]
Base class for most predefined operations.
Base class for most predefined operations.
- Definition Classes
- Base
-
abstract
class
CompanionDef[T] extends Scalan.Node with Scalan.Def[T]
Base class for virtualized instances of type companions.
Base class for virtualized instances of type companions. Each virtualized entity type (trait or class) may have virtualized companion class.
- Definition Classes
- Base
-
case class
Const[T](x: T)(implicit eT: Scalan.Elem[T]) extends Scalan.BaseDef[T] with Product with Serializable
Default node type for embedding of literal values to graph IR.
Default node type for embedding of literal values to graph IR. This can be used or those types
T
whenElem[T]
is defined, butLiftable[_,T]
is not, i.e. for non-liftable types.- x
literal value
- eT
type descriptor of IR type T
- Definition Classes
- Base
-
trait
Def[+T] extends Scalan.Node
Base type for all graph nodes (aka computable value definitions).
Base type for all graph nodes (aka computable value definitions). Each graph node or definition represent one operation node of the data flow graph.
- Definition Classes
- Base
-
class
EntityObject extends AnyRef
Base class for all objects generated for virtualized types to support staged evaluation machinery.
Base class for all objects generated for virtualized types to support staged evaluation machinery. Each object contains definitions which can be imported when necessary. All that objects are registered in
entityObjects
hash map, which is done while IR cake is constructed.- Definition Classes
- Base
-
case class
EntityObjectOwner(obj: Scalan.EntityObject) extends Scalan.OwnerKind with Product with Serializable
- Definition Classes
- Base
-
abstract
class
Node extends Product
Base class for all IR nodes/operations/definitions.
Base class for all IR nodes/operations/definitions.
- Definition Classes
- Base
-
class
NotImplementedStagingException extends Scalan.StagingException
- Definition Classes
- Base
-
sealed abstract
class
OwnerKind extends AnyRef
Variants of
owner
parameter of constructors of nested classes: 1) predefined node classes are owned by IR cake (ScalanOwner) 2) entity classes are owned by enclosing EntityObjectVariants of
owner
parameter of constructors of nested classes: 1) predefined node classes are owned by IR cake (ScalanOwner) 2) entity classes are owned by enclosing EntityObject- Definition Classes
- Base
-
case class
Placeholder[T](eT: Scalan.LElem[T]) extends Scalan.Node with Scalan.Def[T] with Product with Serializable
Symbols may temporary refer to this node until their target node is updated.
Symbols may temporary refer to this node until their target node is updated.
- Definition Classes
- Base
-
abstract
class
Ref[+T] extends AnyRef
Abstract representation of a computable value.
Abstract representation of a computable value. Default implementation is a simple lightweight reference to the corresponding definition. Every Ref have direct access to its Def via
node
property. Every Ref is typed, and the type is avaliable viaelem
property.- Definition Classes
- Base
- See also
SingleRep
-
final
class
SingleRef[+T] extends Scalan.Ref[T]
A Ref is a symbolic reference used internally to refer to graph nodes.
A Ref is a symbolic reference used internally to refer to graph nodes. Light weight stateless immutable reference to a graph node (Def[T]). Two symbols are equal if they refer to the nodes with the same id, which is due to Def unification means equal symbols refer to the same instance of Def.
- Definition Classes
- Base
-
class
StagingException extends RuntimeException
- Definition Classes
- Base
-
abstract
class
Transformer extends AnyRef
Base class for Ref to Ref transformations.
Base class for Ref to Ref transformations. Each transformer keeps a mapping data between references to original nodes and references to the corresponding transformed nodes.
- Definition Classes
- Base
-
case class
Variable[T](varId: Int)(implicit eT: Scalan.LElem[T]) extends Scalan.Node with Scalan.Def[T] with Product with Serializable
Node class for typed variables.
Node class for typed variables. In particular for lambda-bound variables.
- varId
is independent from nodeId, shouldn't be used as node id.
- eT
type descriptor of the variable type
- Definition Classes
- Base
- case class Apply[A, B](f: Scalan.Ref[(A) ⇒ B], arg: Scalan.Ref[A], mayInline: Boolean = true) extends Scalan.Node with Scalan.Def[B] with Product with Serializable
- implicit class FuncExtensions[A, B] extends AnyRef
-
class
Lambda[A, B] extends Scalan.AstGraph with Scalan.Def[(A) ⇒ B]
Represent lambda expression as IR node.
- type LambdaData[A, B] = (Scalan.Lambda[A, B], Nullable[(Scalan.Ref[A]) ⇒ Scalan.Ref[B]], Scalan.Ref[A], Scalan.Ref[B])
- implicit class LambdaOps[A, B] extends AnyRef
- class LambdaStack extends AnyRef
-
type
PGraph = Scalan.ProgramGraph
- Definition Classes
- ProgramGraphs
-
type
RFunc[-A, +B] = Scalan.Ref[(A) ⇒ B]
- Definition Classes
- Base
-
type
RPair[+A, +B] = Scalan.Ref[(A, B)]
- Definition Classes
- Base
-
type
Schedule = Seq[Scalan.Sym]
Type synonim for graph schedules.
Type synonim for graph schedules.
- Definition Classes
- AstGraphs
-
type
ScheduleIds = Buffer[Int]
Alternative representation of schedules using node ids.
Alternative representation of schedules using node ids.
- Definition Classes
- AstGraphs
- type Subst = HashMap[Scalan.Sym, Scalan.Sym]
-
type
Sym = Scalan.Ref[_]
Untyped shortcut sinonim of Ref, which is used as untyped reference to graph nodes (definitions).
Untyped shortcut sinonim of Ref, which is used as untyped reference to graph nodes (definitions). Following a tradition in compiler engineering we call references to definitions as symbols.
- Definition Classes
- Base
-
type
|[+A, +B] = Either[A, B]
- Definition Classes
- Base
-
abstract
class
AstGraph extends Scalan.Node
Base class for all compound nodes with schedule (e.g.
Base class for all compound nodes with schedule (e.g. Lambda, ThunkDef). The graph is directed acyclic (i.e. DAG) in which edges go from
boundVars
down toroots
.- Definition Classes
- AstGraphs
-
case class
GraphNode(sym: Scalan.Sym, usages: Buffer[Int]) extends Product with Serializable
GraphNode is created for each symbol of the AstGraph and represents graph linking structure
GraphNode is created for each symbol of the AstGraph and represents graph linking structure
- Definition Classes
- AstGraphs
-
class
PGraphUsages extends DFunc[Int, Buffer[Int]]
Deboxed function to obtain usages of a given node.
Deboxed function to obtain usages of a given node. Represents adjacency matrix of the reversed graph
g
.- Definition Classes
- ProgramGraphs
-
case class
ProgramGraph(roots: Seq[Scalan.Sym], mapping: Nullable[Scalan.Transformer], filterNode: Nullable[(Scalan.Sym) ⇒ Boolean]) extends Scalan.AstGraph with Product with Serializable
Immutable graph collected from
roots
following Ref.node.deps links.Immutable graph collected from
roots
following Ref.node.deps links.- Definition Classes
- ProgramGraphs
-
class
DefaultPass extends Scalan.Pass
Default pass to be used when IR is used without special compiler configuration.
Default pass to be used when IR is used without special compiler configuration.
- Definition Classes
- Transforming
-
case class
MapTransformer(subst: HashMap[Scalan.Sym, Scalan.Sym]) extends Scalan.Transformer with Product with Serializable
Concrete and default implementation of Transformer using underlying HashMap.
Concrete and default implementation of Transformer using underlying HashMap. HOTSPOT: don't beatify the code
- Definition Classes
- Transforming
-
abstract
class
Mirror extends AnyRef
Base class for mirrors of graph nodes.
Base class for mirrors of graph nodes. Provides default implementations which can be overriden if special logic is required. HOTSPOT: don't beautify the code
- Definition Classes
- Transforming
-
implicit
class
PartialRewriter extends Scalan.Rewriter
Turns partial function into rewriter (i.e.
Turns partial function into rewriter (i.e. set of rewriting rules)
- Definition Classes
- Transforming
-
abstract
class
Pass extends AnyRef
Descriptor of a current compiler pass.
Descriptor of a current compiler pass. Compiler can be configured to perform one pass after another. Each pass has name, configuration parameters, finalizaton logic etc.
- Definition Classes
- Transforming
-
case class
PassConfig(shouldUnpackTuples: Boolean = false, shouldExtractFields: Boolean = true, constantPropagation: Boolean = true, shouldSlice: Boolean = false) extends Product with Serializable
Configuration parameters of the Pass descriptor.
Configuration parameters of the Pass descriptor.
- Definition Classes
- Transforming
-
abstract
class
Rewriter extends AnyRef
- Definition Classes
- Transforming
Value Members
-
object
&&
Logical AND between two pattern matches of the save value
x
.Logical AND between two pattern matches of the save value
x
. Can be used to construct patterns likecase P1 && P2 => ...
- Definition Classes
- Base
-
object
Def
- Definition Classes
- Base
-
object
ExpWithElem
- Definition Classes
- Base
-
object
Liftables
Data type
ST
is liftable is there is Liftable[ST, T] instance for some typeT
.Data type
ST
is liftable is there is Liftable[ST, T] instance for some typeT
. Liftable typeclass allows to define which types can have values embedded as literals into graph IR.- Definition Classes
- Base
-
object
NoOwner extends Scalan.OwnerKind with Product with Serializable
- Definition Classes
- Base
-
object
ScalanOwner extends Scalan.OwnerKind with Product with Serializable
- Definition Classes
- Base
-
def
!!!(msg: String, e: Throwable, syms: Scalan.Ref[_]*): Nothing
- Definition Classes
- Base
-
def
!!!(msg: String, syms: Scalan.Ref[_]*): Nothing
- Definition Classes
- Base
-
def
!!!: Nothing
Helper methods to throw errors
Helper methods to throw errors
- Definition Classes
- Base
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
???(value: Any, syms: Scalan.Ref[_]*): Nothing
- Definition Classes
- Base
-
def
???: Nothing
- Definition Classes
- Base
-
val
DefaultMirror: Scalan.Mirror
Default Mirror instance which is used in core IR methods.
Default Mirror instance which is used in core IR methods.
- Definition Classes
- Transforming
-
val
EmptyArrayOfSym: Array[Scalan.Sym]
Immutable empty array of symbols, can be used to avoid unnecessary allocations.
Immutable empty array of symbols, can be used to avoid unnecessary allocations.
- Definition Classes
- Base
-
val
EmptyDSetOfInt: Set[Int]
Used internally in IR and should be used with care since it is mutable.
Used internally in IR and should be used with care since it is mutable. At the same time, it is used in the hotspot and allows to avoid roughly tens of thousands of allocations per second. WARNING: Mutations of this instance can lead to undefined behavior.
- Attributes
- protected
- Definition Classes
- Base
-
val
EmptySeqOfSym: Seq[Scalan.Sym]
Immutable empty Seq, can be used to avoid unnecessary allocations.
Immutable empty Seq, can be used to avoid unnecessary allocations.
- Definition Classes
- Base
-
final
def
IntZero: Scalan.Ref[Int]
Zero literal node, which is lazily created and can be efficiently reused.
Zero literal node, which is lazily created and can be efficiently reused. Much faster alternative to
(0: Rep[Int])
ortoRep(0)
.- Definition Classes
- Base
- Annotations
- @inline()
-
val
NoRewriting: Scalan.Rewriter
Identity rewriter, i.e.
Identity rewriter, i.e. doesn't change the graph when applied.
- Definition Classes
- Transforming
-
val
_currentPass: Scalan.Pass
- Definition Classes
- Transforming
- def alphaEqual(s1: Scalan.Sym, s2: Scalan.Sym): Boolean
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
asRep[T](x: Scalan.Ref[_]): Scalan.Ref[T]
Helper to type cast node references.
Helper to type cast node references.
- Definition Classes
- Base
- Annotations
- @inline()
-
def
beginPass(pass: Scalan.Pass): Unit
Called to setup IR before the new pass is executed.
Called to setup IR before the new pass is executed.
- Definition Classes
- Transforming
-
val
cacheElems: Boolean
Whether IR type descriptors should be cached.
Whether IR type descriptors should be cached.
- Definition Classes
- Base
-
val
cachePairs: Boolean
Whether Tup instances should be cached.
Whether Tup instances should be cached.
- Definition Classes
- Base
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
compose[A, B, C](f: Scalan.Ref[(B) ⇒ C], g: Scalan.Ref[(A) ⇒ B]): Scalan.Ref[(A) ⇒ C]
Composition of two functions (in mathematical notation), where first
g
is applied and themf
. - def constFun[A, B](x: Scalan.Ref[B])(implicit e: Scalan.Elem[A]): Scalan.Ref[(A) ⇒ B]
-
def
createDefinition[T](optScope: Nullable[Scalan.ThunkScope], s: Scalan.Ref[T], d: Scalan.Def[T]): Scalan.Ref[T]
Create new definition entry in either given Thunk or in the global hash table.
Create new definition entry in either given Thunk or in the global hash table.
- optScope
optional thunk scope to put given definition
- s
symbol refering to
d
- d
definition node to add to the scope of globally
- returns
reference to
d
(which iss
)
- Attributes
- protected
- Definition Classes
- Base
-
def
currentPass: Scalan.Pass
IR global current Pass, changes when the compier switches from one pass to the next one.
IR global current Pass, changes when the compier switches from one pass to the next one. Should remain constant during the whole pass execution.
- Definition Classes
- Transforming
-
val
debugModeSanityChecks: Boolean
Whether to perform extended checks of correctness, expected invariants and data consistency.
Whether to perform extended checks of correctness, expected invariants and data consistency. NOTE: Since it may add substantial overhead, set it to
false
before using in production.- Definition Classes
- Base
-
def
defCount: Int
Returns a number of definitions added to this IR context.
Returns a number of definitions added to this IR context.
- Definition Classes
- Base
-
def
def_unapply[T](e: Scalan.Ref[T]): Nullable[Scalan.Def[T]]
- Definition Classes
- Base
-
final
def
emptyDBufferOfSym: Buffer[Scalan.Sym]
Create a new empty buffer around pre-allocated empty array.
Create a new empty buffer around pre-allocated empty array. This method is preferred, rather that creating empty debox.Buffer directly because it allows to avoid allocation of the empty array.
- Definition Classes
- Base
- Annotations
- @inline()
-
def
emptyMatchSubst: Scalan.Subst
- Annotations
- @inline()
-
def
endPass(pass: Scalan.Pass): Unit
Called to let this IR context to finalized the given pass.
Called to let this IR context to finalized the given pass.
- Definition Classes
- Transforming
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findGlobalDefinition[T](d: Scalan.Def[T]): Scalan.Ref[T]
Lookup definition in this IR context's hash table of definitions.
Lookup definition in this IR context's hash table of definitions.
- returns
node reference to an instance stored in hash table, which is equal to
d
and null if there is no definition which is equal tod
- Definition Classes
- Base
-
def
findOrCreateDefinition[T](d: Scalan.Def[T], newSym: ⇒ Scalan.Ref[T]): Scalan.Ref[T]
Lookup
d
in the heap of nodes.Lookup
d
in the heap of nodes. If the lookup is successfull, then its reference is returned. If the node is not found in the heap, then it is added andd.self
reference is returned.- d
node to be added to the head of nodes
- newSym
producer of the reference to be used as the reference to
d
node.- returns
return a reference to
d
node in the heap HOTSPOT:
- Definition Classes
- Base
-
final
def
freshId: Int
Get next fresh node id
Get next fresh node id
- Definition Classes
- Base
- Annotations
- @inline()
-
final
def
freshSym[T](d: Scalan.Def[T]): Scalan.Ref[T]
Lookup of create reference to the given definition.
Lookup of create reference to the given definition. To lookup
d.nodeId
is used as the index in the_symbolTable
. If Ref is not found in_symbolTable
, then new Ref instance is created and stored in_symbolTable
atd.nodeId
index.- Definition Classes
- Base
- Annotations
- @inline()
-
implicit final
def
fun[A, B](f: (Scalan.Ref[A]) ⇒ Scalan.Ref[B])(implicit eA: Scalan.LElem[A]): Scalan.Ref[(A) ⇒ B]
Executes given lambda to construct Lambda node.
Executes given lambda to construct Lambda node. The function
f
can be called with any symbol and has an effect of growing a graph starting from the argument symbol. If a reference toVariable
node is passed as argument, then the constructed graph nodes can be collected to Lambda node forming its body and schedule.- f
function which execution will create body nodes
- eA
arguments type descriptor
- implicit final def fun2[A, B, C](f: (Scalan.Ref[A], Scalan.Ref[B]) ⇒ Scalan.Ref[C])(implicit eA: Scalan.LElem[A], eB: Scalan.LElem[B]): Scalan.Ref[((A, B)) ⇒ C]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getEntityObject(name: String): Nullable[Scalan.EntityObject]
- Definition Classes
- Base
- Annotations
- @inline()
-
def
getOwnerKind(constructor: RConstructor[_]): Scalan.OwnerKind
Returns OwnerKind for the given constructor, using its first parameter.
Returns OwnerKind for the given constructor, using its first parameter.
- Attributes
- protected
- Definition Classes
- Base
-
final
def
getSym(id: Int): Scalan.Sym
Lookup node reference by its id.
Lookup node reference by its id. This is simple array access by index O(1) operation.
- Definition Classes
- Base
- Annotations
- @inline()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def identityFun[A](implicit e: Scalan.Elem[A]): Scalan.Ref[(A) ⇒ A]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
keepOriginalFunc: Boolean
Global flag governing lambda reification in
fun
andmkLambda
.Global flag governing lambda reification in
fun
andmkLambda
. If this flag istrue
then originalf: Ref[A] => Ref[B]
function is stored in Lambda node. As a consequence iff
is not stored, thenunfoldLambda
is done bymirrorLambda
. - val lambdaStack: List[Scalan.Lambda[_, _]]
-
implicit
def
liftToRep[A](x: A)(implicit arg0: Scalan.Elem[A]): Scalan.Ref[A]
- Definition Classes
- Base
- Annotations
- @inline()
-
def
logWarn(msg: ⇒ String): Unit
Log warning message to the log.
Log warning message to the log. This is default and simple implementation, which can be overriden.
- Definition Classes
- Base
-
def
matchAny(a1: Any, a2: Any, allowInexactMatch: Boolean, subst: Scalan.Subst): Nullable[Scalan.Subst]
- Attributes
- protected
-
def
matchDefs(d1: Scalan.Def[_], d2: Scalan.Def[_], allowInexactMatch: Boolean, subst: Scalan.Subst): Nullable[Scalan.Subst]
- Attributes
- protected
-
def
matchExps(s1: Scalan.Sym, s2: Scalan.Sym, allowInexactMatch: Boolean, subst: Scalan.Subst): Nullable[Scalan.Subst]
- Attributes
- protected
-
def
matchIterators(i1: Iterator[_], i2: Iterator[_], allowInexactMatch: Boolean, subst: Scalan.Subst): Nullable[Scalan.Subst]
- Attributes
- protected
- def mirrorApply[A, B](lam: Scalan.Lambda[A, B], s: Scalan.Ref[A]): Scalan.Ref[B]
- def mkApply[A, B](f: Scalan.Ref[(A) ⇒ B], x: Scalan.Ref[A]): Scalan.Ref[B]
- def mkLambda[A, B, C](f: (Scalan.Ref[A], Scalan.Ref[B]) ⇒ Scalan.Ref[C])(implicit eA: Scalan.LElem[A], eB: Scalan.LElem[B]): Scalan.Ref[((A, B)) ⇒ C]
- def mkLambda[A, B, C](f: (Scalan.Ref[A]) ⇒ (Scalan.Ref[B]) ⇒ Scalan.Ref[C])(implicit eA: Scalan.LElem[A], eB: Scalan.Elem[B]): Scalan.Ref[(A) ⇒ (B) ⇒ C]
- def mkLambda[A, B](f: (Scalan.Ref[A]) ⇒ Scalan.Ref[B], mayInline: Boolean, alphaEquality: Boolean, keepOriginalFunc: Boolean)(implicit eA: Scalan.LElem[A]): Scalan.Ref[(A) ⇒ B]
-
val
nInitialDefs: Int
- Definition Classes
- Base
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onReset(): Unit
Called during resetContext() operation after the core context state has been reset.
Called during resetContext() operation after the core context state has been reset. Derived classes can override to define application specific initialization. Don't forget to call super method in the beginning of your overriding method.
- Attributes
- protected
- Definition Classes
- Base
- def patternMatch(s1: Scalan.Sym, s2: Scalan.Sym): Nullable[Scalan.Subst]
-
def
placeholder[T](implicit eT: Scalan.LElem[T]): Scalan.Ref[T]
- Definition Classes
- Base
- Annotations
- @inline()
-
def
registerEntityObject(name: String, obj: Scalan.EntityObject): Unit
- Attributes
- protected
- Definition Classes
- Base
-
implicit
def
reifyObject[A](obj: Scalan.Def[A]): Scalan.Ref[A]
Implicit injection of new definition (graph node) into universum of nodes with collapsing semantics.
Implicit injection of new definition (graph node) into universum of nodes with collapsing semantics. If there exists node
n
in this IR such thatobj equals n
, then the value ofn.self
is returned, i.e. the new nodeobj
is collapsed with already existing one. This has an effect of Common Subexpression Elimination (CSE) when an expression tree is transformed to the graph and identical subtrees are collapsed. After a reference to the node is obtained, global rewriting rules are examined and the reference may be replaced with a new one.- Definition Classes
- Base
-
def
resetContext(): Unit
- Definition Classes
- Base
-
def
stagingExceptionMessage(message: String, syms: Seq[Scalan.Ref[_]]): String
Prettyprint exception message
Prettyprint exception message
- Attributes
- protected
- Definition Classes
- Base
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toExp[T](d: Scalan.Def[T], newSym: ⇒ Scalan.Ref[T]): Scalan.Ref[T]
Updates the universe of symbols and definitions, then rewrites until fix-point
Updates the universe of symbols and definitions, then rewrites until fix-point
- d
A new graph node to add to the universe
- newSym
A symbol that will be used if d doesn't exist in the universe
- returns
The symbol of the graph which is semantically(up to rewrites) equivalent to d
-
def
toRep[A](x: A)(implicit eA: Scalan.Elem[A]): Scalan.Ref[A]
Lifting of data values to IR nodes.
Lifting of data values to IR nodes.
- Definition Classes
- Base
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transformProductParam(x: Any, t: Scalan.Transformer): Any
Transforms this object into new one by applying
t
to every Ref inside its structure.Transforms this object into new one by applying
t
to every Ref inside its structure. The structure is build out of Seq, Array, Option and Def values. Other structure items remain unchanged and copied to the new instance. HOTSPOT: don't beautify the code- Attributes
- protected
- Definition Classes
- Base
- def unfoldLambda[A, B](f: Scalan.Ref[(A) ⇒ B], x: Scalan.Ref[A]): Scalan.Ref[B]
- def unfoldLambda[A, B](lam: Scalan.Lambda[A, B], x: Scalan.Ref[A]): Scalan.Ref[B]
-
val
unfoldWithOriginalFunc: Boolean
Turns on/off lambda unfolding using original function
f
stored in the Lambda node.Turns on/off lambda unfolding using original function
f
stored in the Lambda node. If this flag isfalse
then this function cannot be used even if it is present in the node. - def upcastFun[A, B >: A](implicit arg0: Scalan.Elem[A]): Scalan.Ref[(A) ⇒ B]
-
final
def
updateSymbolTable[T](s: Scalan.Ref[T], d: Scalan.Def[T]): Scalan.Ref[T]
Create or find symbol (node Ref) which refers to the given node in the table of all created symbols.
Create or find symbol (node Ref) which refers to the given node in the table of all created symbols. The d.nodeId is the index in the _symbolTable which is DBuffer (backed by Array)
- returns
new of existing symbol HOTSPOT: the method should be allocation-free (make it sure by examining the generated Java code)
- Definition Classes
- Base
-
val
useAlphaEquality: Boolean
Global lambda equality mode used by default.
Global lambda equality mode used by default. It is used in
fun
andfun2
lambda builders. If this flag istrue
then Lambda nodes are equal if they are the same up to renaming of symbols. (see Lambda.equals()). Each Lambda node has independent equality mode flag which is setup in the constructor. -
final
def
valueFromRep[A](x: Scalan.Ref[A]): A
Extract data value from Const node or throw an exception.
Extract data value from Const node or throw an exception.
- Definition Classes
- Base
- Annotations
- @inline()
-
def
variable[T](implicit eT: Scalan.LElem[T]): Scalan.Ref[T]
- Definition Classes
- Base
- Annotations
- @inline()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
object
ConstantLambda
Matcher for lambdas which don't depend on their arguments (but can close over other expressions, unlike VeryConstantLambda).
- object IdentityLambda
- object Lambda
-
object
VeryConstantLambda
Matcher for lambdas which return staging-time constants.
Matcher for lambdas which return staging-time constants. VeryConstantLambda(x) should be equivalent to ConstantLambda(Def(Const(x)))
-
object
ProgramGraph extends Serializable
- Definition Classes
- ProgramGraphs
-
object
MapTransformer extends Serializable
- Definition Classes
- Transforming
-
object
Pass
- Definition Classes
- Transforming