search for: shared_var

Displaying 6 results from an estimated 6 matches for "shared_var".

2010 Apr 12
0
[LLVMdev] Proposal: stack/context switching within a thread
I created a wiki at http://code.google.com/p/llvm-stack-switch/ Right now I just copied and formatted the document as-is... I'll go back over it with your comments in mind soon. One more question, which you can answer here or there: > Point 4 is a bit confusing. Normally, it's fine for a thread to share > some of its stack space with another thread, but your wording seems to >
2010 Apr 12
2
[LLVMdev] Proposal: stack/context switching within a thread
...on, > which you can answer here or there: > >> Point 4 is a bit confusing. Normally, it's fine for a thread to share >> some of its stack space with another thread, but your wording seems to >> prohibit that. > > Really?  How does that work? void thread1() { Foo shared_var; queue.send(&shared_var); int result = otherqueue.recv(); return; } void thread2() { Foo* shared_var = queue.recv(); otherqueue.send(work_on(shared_var)); } is legal with posix threads. It's just illegal to return out of a function while its stack space is used by another thread...
2010 Apr 12
4
[LLVMdev] Proposal: stack/context switching within a thread
On Sun, Apr 11, 2010 at 2:41 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote: > On Sun, Apr 11, 2010 at 4:09 PM, Jeffrey Yasskin <jyasskin at google.com> wrote: >> Kenneth Uildriks <kennethuil at gmail.com> wrote: >>> As I see it, the context switching mechanism itself needs to know >>> where to point the stack register when switching.  The C
2012 Sep 26
0
[LLVMdev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)
...n the frontend (please read this in conjunction with [1]): Parallel regions can be lowered as a parallel_map with @llvm.num_threads as the limit. ``` #pragma PARALLEL block ``` desugars to ``` @llvm.parallel_map(num_threads, block_closure, shared_closure) ... void block_closure(i32 tid, i8* shared_vars) { block } ``` Reductions are handled by a parallel_map followed by a regular reduction loop (exactly as in Hal's proposal). Serial blocks reduce to a block conditional on the index inside the function being parallelly mapped. We lower critical and ordered regions into calls to `sync_regio...
2012 Aug 14
4
[LLVMdev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)
On Tue, 14 Aug 2012 10:22:35 +0300 Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi> wrote: > On 08/13/2012 10:54 PM, Hal Finkel wrote: > > I had thought about uses for shared-memory OpenCL implementations, > > but I don't know enough about the use cases to make a specific > > proposal. Is your metadata documented anywhere? > > It is now a quick "brute
2012 Sep 26
1
[LLVMdev] [RFC] Parallelization metadata and intrinsics in LLVM (for OpenMP, etc.)
...n the frontend (please read this in conjunction with [1]): Parallel regions can be lowered as a parallel_map with @llvm.num_threads as the limit. ``` #pragma PARALLEL block ``` desugars to ``` @llvm.parallel_map(num_threads, block_closure, shared_closure) ... void block_closure(i32 tid, i8* shared_vars) { block } ``` Reductions are handled by a parallel_map followed by a regular reduction loop (exactly as in Hal's proposal). Serial blocks reduce to a block conditional on the index inside the function being parallelly mapped. We lower critical and ordered regions into calls to `sync_regio...