File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ concrete:
15
15
A = rand (1000 )
16
16
B = rand (1000 )
17
17
C = zeros (1000 )
18
- add! (X, Y) = X .+ = Y
18
+ @everywhere add! (X, Y) = X .+ = Y
19
19
Dagger. spawn_datadeps () do
20
20
Dagger. @spawn add! (InOut (B), In (A))
21
21
Dagger. @spawn copyto! (Out (C), In (B))
@@ -118,7 +118,7 @@ A_l = view(A, 1:500)
118
118
A_r = view (A, 501 : 1000 )
119
119
120
120
# inc! supports views, so we can pass A_l and A_r directly
121
- inc! (X) = X .+ = 1
121
+ @everywhere inc! (X) = X .+ = 1
122
122
123
123
Dagger. spawn_datadeps () do
124
124
# These two tasks don't alias, so they can run in parallel
@@ -137,9 +137,9 @@ from how that argument is accessed within the function. This is done with the
137
137
``` julia
138
138
A = rand (1000 , 1000 )
139
139
140
- inc_upper! (X) = UpperTriangular (X) .+ = 1
141
- inc_ulower! (X) = UnitLowerTriangular (X) .+ = 1
142
- inc_diag! (X) = X[diagind (X)] .+ = 1
140
+ @everywhere inc_upper! (X) = UpperTriangular (X) .+ = 1
141
+ @everywhere inc_ulower! (X) = UnitLowerTriangular (X) .+ = 1
142
+ @everywhere inc_diag! (X) = X[diagind (X)] .+ = 1
143
143
144
144
Dagger. spawn_datadeps () do
145
145
# These two tasks don't alias, so they can run in parallel
You can’t perform that action at this time.
0 commit comments