Skip to content

Commit

Permalink
support for metadata in parallel activation
Browse files Browse the repository at this point in the history
  • Loading branch information
cdelaunay committed May 23, 2024
1 parent 0244e00 commit 1fca03a
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions source/FingerBoard-Core/FBParallelActivation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Class {
#superclass : #FBBaseActivation,
#instVars : [
'values',
'arguments'
'arguments',
'metadata'
],
#category : #'FingerBoard-Core-Model'
}
Expand All @@ -24,9 +25,40 @@ FBParallelActivation >> arguments [
]

{ #category : #initialization }
FBParallelActivation >> initializeValues: anInteger [
FBParallelActivation >> initializeValues: anInteger [

arguments := Array new: anInteger.
values := Array new: anInteger
values := Array new: anInteger.
metadata := Array new: anInteger.
]

{ #category : #'as yet unclassified' }
FBParallelActivation >> metadataAt: key ifAbsent: aBlock [

^ (self metadataAtIndex: executor index) at: key
ifAbsent: aBlock
]

{ #category : #'as yet unclassified' }
FBParallelActivation >> metadataAt: key put: anObject [

(self metadataAtIndex: executor index) at: key
put: anObject
]

{ #category : #'as yet unclassified' }
FBParallelActivation >> metadataAtIndex: index [

^ (metadata at: index) ifNil: [
metadata at: index put: (FBActivationMetadata new
schema: self metadataSchema;
activation: self;
yourself) ]
]

{ #category : #initialization }
FBParallelActivation >> metadataSchema [
^ node metadataSchema
]

{ #category : #printing }
Expand Down

0 comments on commit 1fca03a

Please sign in to comment.