Mercurial > hg > GearsTemplate
comparison src/parallel_execution/CUDAtwice.cbc @ 321:a9a6d571fa80
Update todo
author | innparusu |
---|---|
date | Wed, 01 Mar 2017 18:28:49 +0900 |
parents | a15511b1a6e0 |
children |
comparison
equal
deleted
inserted
replaced
320:f730761bb044 | 321:a9a6d571fa80 |
---|---|
1 #include <stdio.h> | 1 #include <stdio.h> |
2 #include "../context.h" | 2 #include "../context.h" |
3 | 3 |
4 | 4 |
5 extern void CUDAExec(struct Context* context, Array* array, LoopCounter *loopCounter) ; | 5 extern void CUDAExec(struct Context* context, Array* array, LoopCounter *loopCounter); |
6 | 6 |
7 __code CUDAtwice(struct Context* context, struct LoopCounter* loopCounter, int index, int prefix, int* array, struct Context* workerContext) { | 7 __code CUDAtwice(struct Context* context, struct LoopCounter* loopCounter, int index, int prefix, int* array, struct Context* workerContext) { |
8 int i = loopCounter->i; | 8 int i = loopCounter->i; |
9 if (i < prefix) { | 9 if (i < prefix) { |
10 array[i+index*prefix] = array[i+index*prefix]*2; | 10 array[i+index*prefix] = array[i+index*prefix]*2; |