src/raycastingGL.cpp
void displayCUDAInfo() {
	const int kb = 1024;
	const int mb = kb * kb;
	printf("CUDA INFO:\n=========\n\nCUDA version:   v%d\n", CUDART_VERSION);

	int devCount;
	cudaGetDeviceCount(&devCount);
	printf("CUDA Devices: \n\n");

	for (int i = 0; i < devCount; ++i) {
		cudaDeviceProp props;
		cudaGetDeviceProperties(&props, i);
		printf("%d : %s:%d.%d\n", i, props.name, props.major, props.minor);
		printf("  Global memory:   %dmb\n", props.totalGlobalMem / mb);
		printf("  Shared memory:   %dkb\n", props.sharedMemPerBlock / kb);
		printf("  Constant memory: %dkb\n", props.totalConstMem / kb);
		printf("  Block registers: %d\n", props.regsPerBlock);

		printf("  Warp size:         %d\n", props.warpSize);
		printf("  Threads per block: %d\n", props.maxThreadsPerBlock);
		printf("  Max block dimensions: [ %d, %d, %d ]\n",
				props.maxThreadsDim[0], props.maxThreadsDim[1],
				props.maxThreadsDim[2]);
		printf("  Max grid dimensions:  [ %d, %d, %d ]\n\n=========\n\n",
				props.maxGridSize[0], props.maxGridSize[1],
				props.maxGridSize[2]);
	}
}
//Handy function displaying GPU CUDA info
Handy function displaying GPU CUDA info
Handy function displaying GPU CUDA info
void displayCUDAInfo() {
	const int kb = 1024;
	const int mb = kb * kb;
	printf("CUDA INFO:\n=========\n\nCUDA version:   v%d\n", CUDART_VERSION);
	int devCount;
	cudaGetDeviceCount(&devCount);
	printf("CUDA Devices: \n\n");
	for (int i = 0; i < devCount; ++i) {
		cudaDeviceProp props;
		cudaGetDeviceProperties(&props, i);
		printf("%d : %s:%d.%d\n", i, props.name, props.major, props.minor);
		printf("  Global memory:   %dmb\n", props.totalGlobalMem / mb);
		printf("  Shared memory:   %dkb\n", props.sharedMemPerBlock / kb);
		printf("  Constant memory: %dkb\n", props.totalConstMem / kb);
		printf("  Block registers: %d\n", props.regsPerBlock);
		printf("  Warp size:         %d\n", props.warpSize);
		printf("  Threads per block: %d\n", props.maxThreadsPerBlock);
		printf("  Max block dimensions: [ %d, %d, %d ]\n",
				props.maxThreadsDim[0], props.maxThreadsDim[1],
				props.maxThreadsDim[2]);
		printf("  Max grid dimensions:  [ %d, %d, %d ]\n\n=========\n\n",
				props.maxGridSize[0], props.maxGridSize[1],
				props.maxGridSize[2]);
	}
}
void displayCUDAInfo ( ) { const int kb = 1024 ; const int mb = kb * kb ; printf ( " \n \n \n \n " , CUDART_VERSION ) ; int devCount ; cudaGetDeviceCount ( & devCount ) ; printf ( " \n \n " ) ; for ( int i = 0 ; i < devCount ; ++ i ) { cudaDeviceProp props ; cudaGetDeviceProperties ( & props , i ) ; printf ( " \n " , i , props . name , props . major , props . minor ) ; printf ( " \n " , props . totalGlobalMem / mb ) ; printf ( " \n " , props . sharedMemPerBlock / kb ) ; printf ( " \n " , props . totalConstMem / kb ) ; printf ( " \n " , props . regsPerBlock ) ; printf ( " \n " , props . warpSize ) ; printf ( " \n " , props . maxThreadsPerBlock ) ; printf ( " \n " , props . maxThreadsDim [ 0 ] , props . maxThreadsDim [ 1 ] , props . maxThreadsDim [ 2 ] ) ; printf ( " \n \n \n \n " , props . maxGridSize [ 0 ] , props . maxGridSize [ 1 ] , props . maxGridSize [ 2 ] ) ; } }
Handy function displaying GPU CUDA info
Handy function displaying GPU CUDA info