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
7baa7ed1
Commit
7baa7ed1
authored
May 03, 2022
by
Richard Angersbach
Browse files
Fix missing hostDataUpdated for node positions when reading in the domain from file.
parent
4c96a571
Changes
1
Hide whitespace changes
Inline
Side-by-side
Compiler/src/exastencils/parallelization/api/cuda/CUDA_GatherFieldAccess.scala
View file @
7baa7ed1
...
...
@@ -26,6 +26,7 @@ import exastencils.datastructures._
import
exastencils.domain.ir.IR_IV_NeighborFragmentIdx
import
exastencils.field.ir._
import
exastencils.logger.Logger
import
exastencils.util.ir.IR_Read
class
CUDA_GatherFieldAccess
extends
Collector
{
...
...
@@ -65,6 +66,28 @@ class CUDA_GatherFieldAccess extends Collector {
}
def
getFieldIdentifier
(
access
:
IR_MultiDimFieldAccess
)
=
{
val
field
=
access
.
field
var
identifier
=
field
.
codeName
// TODO: array fields
if
(
field
.
numSlots
>
1
)
{
access
.
slot
match
{
case
IR_SlotAccess
(
_
,
offset
)
=>
identifier
+=
s
"_o$offset"
case
IR_IntegerConstant
(
slot
)
=>
identifier
+=
s
"_s$slot"
case
other
=>
identifier
+=
s
"_s${ other.prettyprint }"
}
}
// also consider neighbor fragment accesses
access
.
fragIdx
match
{
case
neigh
:
IR_IV_NeighborFragmentIdx
=>
identifier
+=
s
"_n${ neigh.neighIdx }"
case
_
=>
}
identifier
}
node
match
{
case
assign
:
IR_Assignment
=>
assign
.
op
match
{
...
...
@@ -73,24 +96,15 @@ class CUDA_GatherFieldAccess extends Collector {
}
assign
.
src
.
annotate
(
Access
.
ANNOT
,
Access
.
READ
)
case
access
:
IR_MultiDimFieldAccess
=>
val
field
=
access
.
field
var
identifier
=
field
.
codeName
// TODO: array fields
if
(
field
.
numSlots
>
1
)
{
access
.
slot
match
{
case
IR_SlotAccess
(
_
,
offset
)
=>
identifier
+=
s
"_o$offset"
case
IR_IntegerConstant
(
slot
)
=>
identifier
+=
s
"_s$slot"
case
other
=>
identifier
+=
s
"_s${ other.prettyprint }"
}
case
read
:
IR_Read
=>
read
.
toRead
foreach
{
case
expr
:
IR_Expression
=>
expr
.
annotate
(
Access
.
ANNOT
,
Access
.
WRITE
)
case
_
=>
}
// also consider neighbor fragment accesses
access
.
fragIdx
match
{
case
neigh
:
IR_IV_NeighborFragmentIdx
=>
identifier
+=
s
"_n${ neigh.neighIdx }"
case
_
=>
}
case
access
:
IR_MultiDimFieldAccess
=>
val
identifier
=
getFieldIdentifier
(
access
)
if
(
isRead
)
fieldAccesses
.
put
(
"read_"
+
identifier
,
access
)
...
...
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