 
 	float *d_x = NULL;
 	float *d_y = NULL;
-	float *d_inside = NULL;
+	int *d_inside = NULL;
 	checkCuda(cudaHostGetDevicePointer(&d_x, h_x, 0));
 	checkCuda(cudaHostGetDevicePointer(&d_y, h_y, 0));
 	checkCuda(cudaHostGetDevicePointer(&d_inside, h_inside, 0));
 
 	printf("Run computation on GPU\n");
-	device_method<<<blocks, threads>>>(n, d_inside, d_x, d_y);
+	device_method<<<blocks, threads>>>(d_x, d_y, d_inside, n);
 
 #ifdef DEBUG // For debugging purposes
 // Check for CUDA runtime errors

	// random scattering of (x,y) points
	float *h_x = NULL;
	float *h_y = NULL;
	float *h_inside = NULL;
	unsigned bytes = sizeof(float) * n;

	// allocate memory

// not a uniform distribution
void random_number_generator(float* array, int size) {
	for (int i = 0; i < size; i++) {
		array[i] = rand_float_range(0, 1);
	}
}

void vector_sum(int* result, int* array, int size) {
	for (int i = 0; i < size; i++) {
		//printf("h_inside[%d]=%d\n", i, array[i]);
		*result += array[i];
	}
}
