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 1989 - (download) (annotate)
Fri Aug 3 01:54:21 2012 UTC (8 years, 9 months ago) by lamonts
File size: 1633 byte(s)
Removed old code that caused problems on AMD GPUs and fixed the type conversion problems that caused problems for Mandelbrot. the GPU backend calls stabalize properly now. 
 * 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*/
//#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