Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12-cl/src/compiler/cl-target/fragments/cl-sched-nobsp.in
ViewVC logotype

View of /branches/vis12-cl/src/compiler/cl-target/fragments/cl-sched-nobsp.in

Parent Directory Parent Directory | Revision Log Revision Log

Revision 3215 - (download) (annotate)
Wed Jul 15 05:11:47 2015 UTC (4 years, 3 months ago) by jhr
File size: 804 byte(s)
  Fix race condition of OpenCL (no-BSP) scheduler.  Also marked all targets of
  atomic operations volatile.
// scheduler structure for no BSP
typedef struct {
  /* the scheduler prefix has a layout known to the CPU side */
    volatile int        nextStrand;     // the next strand to schedule
    volatile int        nSteps;         // number of executed steps
    volatile int        nStrands;       // total number of allocated strands
    volatile int        nActive;        // number of active strands
    volatile int        nStable;        // number of stable strands
    volatile int        nDied;          // number of strands that have died
  /* additional scheduler fields */
    __global @STRANDTY@ *state;         // strand state array; with nStrands elements
    __global uchar      *status;        // strand status array; with nStrands elements
} @PREFIX@Sched_t;

ViewVC Help
Powered by ViewVC 1.0.0