annotate src/test/Cudasample_cpu.cu @ 429:54352ed97f34

Rename macro from ALLOC_ARRAY to ALLOCATE_PTR_ARRAY
author Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp>
date Mon, 09 Oct 2017 14:55:23 +0900
parents 2b41bd298fe8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
283
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
1 #include <stdio.h>
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
2
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
3 int main(void)
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
4 {
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
5 int b;
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
6
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
7 for (b = 99; b >= 0; b--) {
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
8 switch (b) {
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
9 case 0:
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
10 printf("No more bottles of beer on the wall, no more bottles of beer.\n");
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
11 printf("Go to the store and buy some more, 99 bottles of beer on the wall.\n");
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
12 break;
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
13 case 1:
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
14 printf("1 bottle of beer on the wall, 1 bottle of beer.\n");
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
15 printf("Take one down and pass it around, no more bottles of beer on the wall\n");
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
16 break;
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
17 default:
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
18 printf("%d bottles of beer on the wall, %d bottles of beer.\n", b, b);
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
19 printf("Take one down and pass it around, %d %s of beer on the wall.\n"
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
20 ,b - 1
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
21 ,((b - 1) > 1)? "bottles" : "bottle");
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
22 break;
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
23 }
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
24 }
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
25 return 0;
2b41bd298fe8 add openCL test files
mir3636
parents:
diff changeset
26 }