Sha256: 18f5ded3cef30cfe29402e0b41b43936fa9deddfdee3ca075351b1e8ca18d85c

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

  fflush(stdout);
  cl_int bones_errors;
  cl_event bones_event;
  
  // Only compile if this program is different from the last one
  if (strcmp(bones_last_program,"<algorithm_filename>") != 0) {
    strcpy(bones_last_program,"<algorithm_filename>");
    
    // Load and compile the kernel
    char *bones_source = get_source("<algorithm_filename>_device.cl");
    bones_program = clCreateProgramWithSource(bones_context,1,(const char **)&bones_source,NULL,&bones_errors); error_check(bones_errors);
    bones_errors = clBuildProgram(bones_program,0,NULL,"-cl-single-precision-constant",NULL,NULL);
    
    // Get and print the compiler log
    char* bones_log;
    size_t bones_log_size;
    clGetProgramBuildInfo(bones_program,bones_device,CL_PROGRAM_BUILD_LOG,0,NULL,&bones_log_size);
    bones_log = (char*)malloc((bones_log_size+1)*sizeof(char));
    clGetProgramBuildInfo(bones_program,bones_device,CL_PROGRAM_BUILD_LOG,bones_log_size,bones_log, NULL);
    bones_log[bones_log_size] = '\0';
    //if (strcmp(bones_log,"\n") != 0 && strcmp(bones_log,"") != 0) { printf("--------- \n--- Compilation log:\n--------- \n%s\n",bones_log); }
    free(bones_log);
    error_check(bones_errors);
  }

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bones-compiler-1.6.0 skeletons/CPU-OPENCL-AMD/common/prologue.c
bones-compiler-1.3.1 skeletons/CPU-OPENCL-AMD/common/prologue.c
bones-compiler-1.1.0 skeletons/CPU-OPENCL-AMD/common/prologue.c