Sha256: 9a4c5a00d1aa6a5f9115f69632bd1b383a29ebd8905ddee7df45b78568594067

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

/* STARTDEF
void bones_kernel_<algorithm_name>_0(int bones_thread_id, int bones_thread_count, <devicedefinitions>, <argument_definition>);
ENDDEF */
// Start of the <algorithm_name> kernel
void bones_kernel_<algorithm_name>_0(int bones_thread_id, int bones_thread_count, <devicedefinitions>, <argument_definition>) {
  int bones_workload = DIV_CEIL(<parallelism>,bones_thread_count);
  int bones_start = bones_thread_id*bones_workload;
  int bones_end = BONES_MIN((bones_thread_id+1)*bones_workload,<parallelism>);
  for(int bones_global_id=bones_start; bones_global_id<bones_end; bones_global_id++) {
    
    // Calculate the global ID(s) based on the thread id
    <ids>
    
    // Perform the main computation
<algorithm_code1>
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bones-compiler-1.6.0 skeletons/CPU-OPENMP/kernel/default.kernel.c
bones-compiler-1.3.1 skeletons/CPU-OPENMP/kernel/default.kernel.c
bones-compiler-1.1.0 skeletons/CPU-OPENMP/kernel/default.kernel.c