Skip to content

Commit 28af818

Browse files
committed
gtdot2
1 parent 2969257 commit 28af818

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

test/gtdot2.ijs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,41 @@ NB. run & open the futures results
337337
(271828) 18!:55 :: 1: "0 -.&' '&.> <"1 'loc',~"1 'f',"1 ": ,. i.TASK*STRIDE NB. clear all locales
338338
18!:55 [ 18!:1 [1 NB. erase residual numbered locales in each task
339339

340-
4!:55 ;:'NX STRIDE TASK delth s1 t1'
340+
NB. x is number of iterations
341+
NB. y is a task number
342+
NB. result is always 1
343+
NB. task 0 repeatedly delete locale; task 1 repeatedly accesses them
344+
t1=: 4 : 0"_ 0
345+
if. y=0 do.
346+
while. 0<t1done do.
347+
(271828) 18!:55 ;:'l1'
348+
'a_l1_ a_l2_ b_l1_ b_l2_ ' =: 1 1 5 5
349+
end.
350+
1
351+
else.
352+
for_xno. i.x do.
353+
a + b
354+
end.
355+
t1done=: <:t1done
356+
1
357+
end.
358+
)
359+
360+
s1=: 3 : 0
361+
100 (t1 f. t.'')"0 y NB. start task 14
362+
)
363+
364+
'a_l1_ a_l2_ b_l1_ b_l2_ ' =: 1 1 5 5
365+
(;:'l1 l2') 18!:2 <'base'
366+
4!:55 ;:'a b'
367+
4!:55 ;:'a b'
368+
t1done=: 10
369+
]&> s1 0, 10#1
370+
371+
(<'z') 18!:2 <'base'
372+
(271828) 18!:55 ;:'l1 l2'
373+
374+
4!:55 ;:'NX STRIDE TASK delth s1 t1 t1done'
341375

342376
epilog''
343377

0 commit comments

Comments
 (0)