diff --git a/src/radix_sort_par.cu b/src/radix_sort_par.cu
index 98787cf8ce8e92e37ec2852b820f0dc80f023a24..371862304caf572dcc6fcb49c74ac9f51df822e6 100644
--- a/src/radix_sort_par.cu
+++ b/src/radix_sort_par.cu
@@ -5,7 +5,7 @@
 using namespace std; 
   
 // A utility function to get maximum value in arr[] 
-int getMax(int arr[], int n) 
+__device__ int getMax(int arr[], int n) 
 { 
     int mx = arr[0]; 
     for (int i = 1; i < n; i++) 
@@ -16,8 +16,7 @@ int getMax(int arr[], int n)
   
 // A function to do counting sort of arr[] according to 
 // the digit represented by exp. 
-__global__
-void countSort(int arr[], int n, int exp) 
+__device__ void countSort(int arr[], int n, int exp) 
 { 
 	int index = threadIdx.x;
     int stride = blockDim.x;
@@ -50,7 +49,7 @@ void countSort(int arr[], int n, int exp)
 // The main function to that sorts arr[] of size n using  
 // Radix Sort
 
-void radixsort(int *arr, int n) 
+__device__ void radixsort(int *arr, int n) 
 { 
     int *d_arr;