Mercurial > hg > Game > Cerium
changeset 1851:637fa9a4105b draft
fix many_task ( sort )
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 Dec 2013 19:42:17 +0900 |
parents | 260c0956424d |
children | 7e9ebc1b08b6 |
files | example/many_task/Makefile.def example/many_task/gpu/QuickSort.cl example/many_task/ppe/QuickSort.cc example/many_task/spe/QuickSort.cc |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/example/many_task/Makefile.def Sat Dec 21 10:28:18 2013 +0900 +++ b/example/many_task/Makefile.def Sat Dec 21 19:42:17 2013 +0900 @@ -7,7 +7,7 @@ CERIUM = ../../../Cerium OPT = -O -OPT = -g -O2 +OPT = -g -O0 # OPT = -g CC = clang++ CXX = clang++
--- a/example/many_task/gpu/QuickSort.cl Sat Dec 21 10:28:18 2013 +0900 +++ b/example/many_task/gpu/QuickSort.cl Sat Dec 21 19:42:17 2013 +0900 @@ -47,7 +47,7 @@ data[where].index = data[begin].index; int i; p = begin; - for (i=begin+1; i<=end; i++) { + for (i=begin+1; i<end; i++) { if (data[i].index < pivot) { p++; swap(data, p, i);
--- a/example/many_task/ppe/QuickSort.cc Sat Dec 21 10:28:18 2013 +0900 +++ b/example/many_task/ppe/QuickSort.cc Sat Dec 21 19:42:17 2013 +0900 @@ -81,7 +81,7 @@ data[where].index = data[begin].index; int i; p = begin; - for (i=begin+1; i<=end; i++) { + for (i=begin+1; i<end; i++) { if (data[i].index < pivot) { p++; swap(data, p, i);
--- a/example/many_task/spe/QuickSort.cc Sat Dec 21 10:28:18 2013 +0900 +++ b/example/many_task/spe/QuickSort.cc Sat Dec 21 19:42:17 2013 +0900 @@ -57,7 +57,7 @@ data[where].index = data[begin].index; int p = begin; int i; - for (i=begin+1; i<=end; i++) { + for (i=begin+1; i<end; i++) { if (data[i].index < pivot) { p++; swap(data, p, i);