 
 	dim3 blockDim( COMPILE_TIME_DEFINED_BLOCK_SIZE, 1, 1 );
 
+	/*
 	// Occupying all SMs with (constant) maximum number of threads to eliminate new block scheduling overhead.
 	dim3 gridDim( (deviceProp.multiProcessorCount*deviceProp.maxThreadsPerMultiProcessor)/blockDim.x, 1, 1);
+	 */
+
+	dim3 gridDim( ceil(((double)hostGraph->num_of_vertices)/(COMPILE_TIME_DEFINED_BLOCK_SIZE/VirtualWarpSize)), 1, 1 );
 
 	// Host and device flags indicating if the processing is finished.
 	int finished;


	H2D_copy_time = getTime();
	fprintf( stdout, "Copying the graph from the host to the device finished in: %f (ms)\n", H2D_copy_time );

	//unsigned int AVertexSizeAligned = pow(2, ceil(log(sizeof(Vertex))/log(2)));	// Alignment for external shared memory usage.
	//const unsigned int requiredSharedMem = calculateRequiredSharedMemoryInBytes(AVertexSizeAligned, blockDim,VirtualWarpSize);

	// Iteratively process the graph on the device.
	fprintf( stdout, "Processing graph in a virtual warp-centric manner using CSR representation ...\n" );

#define COMPILE_TIME_DEFINED_BLOCK_SIZE 256

// Virtual Warp-Centric (VWC) manner of processing graph using Compressed Sparse Row (CSR) representation format.
// One can use shuffle instructions to implement this kernel. I used shared memory for data exchange between threads.
template < uint VWSize, uint VWMask >
__global__ void VWC_CSR_GPU_kernel(	const uint num_of_vertices,
									const uint* vertices_indices,
