Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ExaStencils
exastencils-release
Commits
722ab5f4
Commit
722ab5f4
authored
Feb 24, 2022
by
Richard Angersbach
Browse files
Adapt access for multiple frags in IR_IV_TemporaryBuffer
parent
eef8aae6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Compiler/src/exastencils/io/ir/IR_IV_TemporaryBuffer.scala
View file @
722ab5f4
...
...
@@ -18,7 +18,12 @@ import exastencils.grid.ir.IR_Localization
object
IR_IV_TemporaryBuffer
{
def
accessArray
(
tempBuf
:
IR_IV_TemporaryBuffer
,
idx
:
IR_Expression
)
=
{
IR_ArrayAccess
(
tempBuf
,
tempBuf
.
linearizedIndex
(
idx
))
// TODO: should be done automatically
var
base
:
IR_Expression
=
tempBuf
if
(!
tempBuf
.
blockwise
)
base
=
IR_ArrayAccess
(
tempBuf
,
IR_LoopOverFragments
.
defIt
)
IR_ArrayAccess
(
base
,
tempBuf
.
linearizedIndex
(
idx
))
}
}
...
...
@@ -46,8 +51,10 @@ case class IR_IV_TemporaryBuffer(
def
endIndices
:
ListBuffer
[
IR_Expression
]
=
dimsLocal
def
totalDimsLocal
:
ListBuffer
[
IR_Expression
]
=
dimsLocal
def
resolveAccess
()
:
IR_Expression
=
resolveAccess
(
resolveName
(),
if
(!
blockwise
)
IR_LoopOverFragments
.
defIt
else
IR_NullExpression
,
domainIdx
,
IR_NullExpression
,
IR_NullExpression
,
IR_NullExpression
)
def
resolveAccess
()
:
IR_Expression
=
{
super
.
resolveAccess
(
resolveName
(),
if
(!
blockwise
)
IR_LoopOverFragments
.
defIt
else
IR_NullExpression
,
domainIdx
,
IR_NullExpression
,
IR_NullExpression
,
IR_NullExpression
)
}
def
linearizedIndex
(
index
:
IR_Expression
)
=
index
match
{
case
idx
:
IR_Index
=>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment