Displaying 1 result from an estimated 1 matches for "sumwrap".
Did you mean:
strwrap
2006 Oct 30
2
[LLVMdev] "fork" and "sync" for LLVM thread support - any comments?
...etc..
That's it - fork and sync are (I hope) all that's required.
A PATRONIZING EXAMPLE:
Summing the numbers in an array, using two threads:
%sumB = global int 0
int %sumfun(%base, %offset, %count)
[simple loop adding numbers from base[offset] to base[offset+count]]
void %sumwrap(int *base, int %offset, int %count)
%mysum = call int %sumfun(%base, %offset, %count)
store int %mysum, int %sumB
sync ubyte(42)
ret void
int %main(void)
%array = malloc [1000 x uint]
%sumA = call int %sumfun(%array, 0, 500)
fork void %sumwrap(%array, 500, 500)
sync ubyte (...