From 7039c80632451f3b48a8dc0148f97159a6eff831 Mon Sep 17 00:00:00 2001
From: Yora <13516067@std.stei.itb.ac.id>
Date: Thu, 11 Apr 2019 19:59:36 +0700
Subject: [PATCH] add radix

---
 src/radix_sort_par3.cu | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/radix_sort_par3.cu b/src/radix_sort_par3.cu
index 942a286..463fd28 100644
--- a/src/radix_sort_par3.cu
+++ b/src/radix_sort_par3.cu
@@ -14,7 +14,7 @@ int getMax(int arr[], int n)
     return mx; 
 } 
   
-__global__ void storeCount(int *count, int *arr, int n){
+__global__ void storeCount(int *count, int *arr, int n, int exp){
     for (int i = 0; i < n; i++) 
         count[ (arr[i]/exp)%10 ]++;
 }
@@ -34,7 +34,7 @@ void countSort(int arr[], int n, int exp)
     cudaMemset(count,0,sizeof(int)*10);
   
     // Store count of occurrences in count[] 
-    storeCount<<<1,32>>>(count,d_arr,n); 
+    storeCount<<<1,32>>>(count,d_arr,n,exp); 
   
     // Change count[i] so that count[i] now contains actual 
     //  position of this digit in output[] 
-- 
GitLab