Mercurial > hg > Gears > GearsAgda
view src/parallel_execution/CUDAtwice.cu @ 308:aeddca686007
CUDAtwice
author | ikkun |
---|---|
date | Tue, 14 Feb 2017 16:55:22 +0900 |
parents | 8e7926f3e271 |
children | 8c2123bb577b |
line wrap: on
line source
extern "C" { #include <stdio.h> __global__ void twice(strct LoopCounter* loopCounter, int prefix ,int* array) { int index = blockIdx.x * blockDim.x + threadIdx.x; printf("array %p, blockIdx.x = %d, blockDim.x = %d, threadIdx.x = %d\n"); int i = 0; while (i < prefix) { array[i+index*prefix] = array[i+index*prefix]*2; } } }