@@ -4,23 +4,23 @@ struct BatchClosure{F,A,S,C}
44 f:: F
55end
66function (b:: BatchClosure{F,A,S,C} )(p:: Ptr{UInt} ) where {F,A,S,C}
7- (offset, args) = ThreadingUtilities . load (p, A, 2 * sizeof (UInt))
8- (offset, start) = ThreadingUtilities . load (p, UInt, offset)
9- (offset, stop) = ThreadingUtilities . load (p, UInt, offset)
7+ (offset, args) = ManualMemory . load (p, A, 2 * sizeof (UInt))
8+ (offset, start) = ManualMemory . load (p, UInt, offset)
9+ (offset, stop) = ManualMemory . load (p, UInt, offset)
1010 if C === Tuple{} && ! S
1111 b. f (args, (start + one (UInt)) % Int, stop % Int)
1212 elseif C === Tuple{} && S
13- ((offset, i) = ThreadingUtilities . load (p, UInt, offset))
13+ ((offset, i) = ManualMemory . load (p, UInt, offset))
1414 b. f (args, (start + one (UInt)) % Int, stop % Int, i % Int)
1515 elseif C != = Tuple{} && ! S
16- ((offset, reducinits) = ThreadingUtilities . load (p, C, offset))
16+ ((offset, reducinits) = ManualMemory . load (p, C, offset))
1717 reducres = b. f (args, (start + one (UInt)) % Int, stop % Int, reducinits)
18- ThreadingUtilities . store! (p, reducres, offset)
18+ ManualMemory . store! (p, reducres, offset)
1919 else
20- ((offset, i) = ThreadingUtilities . load (p, UInt, offset))
21- ((offset, reducinits) = ThreadingUtilities . load (p, C, offset))
20+ ((offset, i) = ManualMemory . load (p, UInt, offset))
21+ ((offset, reducinits) = ManualMemory . load (p, C, offset))
2222 reducres = b. f (args, (start + one (UInt)) % Int, stop % Int, i % Int, reducinits)
23- ThreadingUtilities . store! (p, reducres, offset)
23+ ManualMemory . store! (p, reducres, offset)
2424 end
2525 ThreadingUtilities. _atomic_store! (p, ThreadingUtilities. SPIN)
2626 nothing
4545
4646@inline function load_threadlocals (tid, argtup:: A , :: Val{S} , reductup:: C ) where {A,S,C}
4747 p = ThreadingUtilities. taskpointer (tid)
48- (offset, _) = ThreadingUtilities . load (p, UInt, sizeof (UInt))
49- (offset, _) = ThreadingUtilities . load (p, A, offset)
50- (offset, _) = ThreadingUtilities . load (p, UInt, offset)
51- (offset, _) = ThreadingUtilities . load (p, UInt, offset)
48+ (offset, _) = ManualMemory . load (p, UInt, sizeof (UInt))
49+ (offset, _) = ManualMemory . load (p, A, offset)
50+ (offset, _) = ManualMemory . load (p, UInt, offset)
51+ (offset, _) = ManualMemory . load (p, UInt, offset)
5252 if S
53- (offset, _) = ThreadingUtilities . load (p, UInt, offset)
53+ (offset, _) = ManualMemory . load (p, UInt, offset)
5454 end
55- (offset, _) = ThreadingUtilities . load (p, C, offset)
56- (offset, reducvals) = ThreadingUtilities . load (p, C, offset)
55+ (offset, _) = ManualMemory . load (p, C, offset)
56+ (offset, reducvals) = ManualMemory . load (p, C, offset)
5757 return reducvals
5858end
5959
6464 start:: UInt ,
6565 stop:: UInt ,
6666)
67- offset = ThreadingUtilities . store! (p, fptr, sizeof (UInt))
68- offset = ThreadingUtilities . store! (p, argtup, offset)
69- offset = ThreadingUtilities . store! (p, start, offset)
70- offset = ThreadingUtilities . store! (p, stop, offset)
67+ offset = ManualMemory . store! (p, fptr, sizeof (UInt))
68+ offset = ManualMemory . store! (p, argtup, offset)
69+ offset = ManualMemory . store! (p, start, offset)
70+ offset = ManualMemory . store! (p, stop, offset)
7171 nothing
7272end
7373@inline function setup_batch! (
7878 stop:: UInt ,
7979 i_or_reductup,
8080)
81- offset = ThreadingUtilities . store! (p, fptr, sizeof (UInt))
82- offset = ThreadingUtilities . store! (p, argtup, offset)
83- offset = ThreadingUtilities . store! (p, start, offset)
84- offset = ThreadingUtilities . store! (p, stop, offset)
85- offset = ThreadingUtilities . store! (p, i_or_reductup, offset)
81+ offset = ManualMemory . store! (p, fptr, sizeof (UInt))
82+ offset = ManualMemory . store! (p, argtup, offset)
83+ offset = ManualMemory . store! (p, start, offset)
84+ offset = ManualMemory . store! (p, stop, offset)
85+ offset = ManualMemory . store! (p, i_or_reductup, offset)
8686 nothing
8787end
8888@inline function setup_batch! (
9494 i:: UInt ,
9595 reductup,
9696)
97- offset = ThreadingUtilities . store! (p, fptr, sizeof (UInt))
98- offset = ThreadingUtilities . store! (p, argtup, offset)
99- offset = ThreadingUtilities . store! (p, start, offset)
100- offset = ThreadingUtilities . store! (p, stop, offset)
101- offset = ThreadingUtilities . store! (p, i, offset)
102- offset = ThreadingUtilities . store! (p, reductup, offset)
97+ offset = ManualMemory . store! (p, fptr, sizeof (UInt))
98+ offset = ManualMemory . store! (p, argtup, offset)
99+ offset = ManualMemory . store! (p, start, offset)
100+ offset = ManualMemory . store! (p, stop, offset)
101+ offset = ManualMemory . store! (p, i, offset)
102+ offset = ManualMemory . store! (p, reductup, offset)
103103 nothing
104104end
105105@inline function launch_batched_thread! (cfunc, tid, argtup, start, stop)
0 commit comments