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

SCM Repository

[diderot] View of /trunk/src/compiler/cl-target/fragments/header.in
ViewVC logotype

View of /trunk/src/compiler/cl-target/fragments/header.in

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2005 - (download) (annotate)
Fri Oct 5 11:57:00 2012 UTC (8 years, 2 months ago) by jhr
File size: 1677 byte(s)
  minor tweaks
 * OpenCL code generated from @SRCFILE@.

 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
/* AMD has an error in their OpenCL sdk that doesn't enable atomics for OpenCL 1.2 
 * so enable them just by default until they fix it.
 * FIXME: can we just test for AMD here?
//#if (DIDEROT_CL_VERSION == 100)
    #pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics: enable
    #pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics: enable

#include "Diderot/cl-diderot.h"

typedef struct {
    int         blkIdx;         // the id of this block 
    int         nActive;        // number of active (status != DIE or STABLE) strands
    int         nDead;          // number of strands in the DIE state
    int         nStabilizing;   // number of new strands in the STABILIZE state
    int         nDying;         // number of new strands in the DIE state
} StrandBlock_t;

typedef struct { 
    int         numStrands;     // number of strands
    int         sId;            // the index accumlator for the todo list or queue
    int         nextStrand;     // index of the next strand to retrieve from the pool
    int         clearQueueSz;   // an indicator on whether the queue size should be cleared
    int         queueSize;      // number of blocks on the scheduler's queue
    int         todoSize;       // number of blocks on the scheduler's todo list
    int         numAvailable;   // number of active strands left to process
} SchedState_t;

ViewVC Help
Powered by ViewVC 1.0.0