 	// random scattering of (x,y) points
 	float *h_x = NULL;
 	float *h_y = NULL;
-	float *h_inside = NULL;
+	int *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] = 2 * rand_float_range(0, 1) - 1;
	}
}

void vector_sum(float* result, float* array, int size) {
	for (int i = 0; i < size; i++) {
		*result += array[i];
	}
}

#endif

	// count how many fell inside
	int hits = 0;
	vector_sum(&hits, h_inside, n);
	printf("hits: %d\n", hits);

	// approximate PI
	float pi = 4.0f * hits / n;
	printf("pi: %f\n", pi);

	checkCuda(cudaFreeHost(h_x));
