Mercurial > hg > GearsTemplate
changeset 535:093f5c25c76d
Fix args
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 06 Feb 2018 00:31:16 +0900 |
parents | 6ca515352a76 |
children | acc80b26156b |
files | src/parallel_execution/examples/bitonicSort/bitonicSort.cbc src/parallel_execution/examples/twice/main.cbc |
diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/examples/bitonicSort/bitonicSort.cbc Fri Feb 02 03:41:23 2018 +0900 +++ b/src/parallel_execution/examples/bitonicSort/bitonicSort.cbc Tue Feb 06 00:31:16 2018 +0900 @@ -69,6 +69,9 @@ } void init(int argc, char** argv) { + if (gpu_num == 1) { + split = length/2; + } for (int i = 1; argv[i]; ++i) { if (strcmp(argv[i], "-cpu") == 0) cpu_num = (int)atoi(argv[i+1]); @@ -81,9 +84,6 @@ CPU_CUDA = 0; } } - if (gpu_num == 1) { - split = length/2; - } } int main(int argc, char** argv) {
--- a/src/parallel_execution/examples/twice/main.cbc Fri Feb 02 03:41:23 2018 +0900 +++ b/src/parallel_execution/examples/twice/main.cbc Tue Feb 06 00:31:16 2018 +0900 @@ -55,6 +55,9 @@ } void init(int argc, char** argv) { + if (gpu_num == 1) { + split = length; + } for (int i = 1; argv[i]; ++i) { if (strcmp(argv[i], "-cpu") == 0) cpu_num = (int)atoi(argv[i+1]); @@ -67,9 +70,6 @@ CPU_CUDA = 0; } } - if (gpu_num == 1) { - split = length; - } } int main(int argc, char** argv) {