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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/lib/cl-target/main.c
ViewVC logotype

Diff of /branches/pure-cfg/src/lib/cl-target/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1641, Fri Nov 18 12:44:32 2011 UTC revision 1642, Fri Nov 18 20:22:52 2011 UTC
# Line 13  Line 13 
13  #include <sys/sysctl.h>  #include <sys/sysctl.h>
14  #include <sys/stat.h>  #include <sys/stat.h>
15    
 // FIXME: the kernels should really be in the lib subdirectory  
 // path to kernels  
 #define KERNELS_FILE_PATH       DIDEROT_INCLUDE_PATH "/cl_kernels/kernels.cl"  
   
   
16  typedef struct {  typedef struct {
17      cl_int              blkIdx;         //!< the id of this block      cl_int              blkIdx;         //!< the id of this block
18      cl_int              nActive;        //!< number of active (status != DIE or STABLE) strands      cl_int              nActive;        //!< number of active (status != DIE or STABLE) strands
# Line 496  Line 491 
491      char *updateSource = LoadSource (fname);      char *updateSource = LoadSource (fname);
492      free (fname);      free (fname);
493    
494    // load scheduler kernels      const char *src[1] = {updateSource};
495      char *kernelsSource = LoadSource(KERNELS_FILE_PATH);      cl_program prog = clCreateProgramWithSource(cxt, 1, src, NULL, &sts);
   
     const char *src[2] = {kernelsSource, updateSource};  
     cl_program prog = clCreateProgramWithSource(cxt, 2, src, NULL, &sts);  
496      free (updateSource);      free (updateSource);
     free (kernelsSource);  
497      if (sts != CL_SUCCESS) {      if (sts != CL_SUCCESS) {
498          fprintf (stderr, "error creating program\n");          fprintf (stderr, "error creating program\n");
499          return false;          return false;

Legend:
Removed from v.1641  
changed lines
  Added in v.1642

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0