 		return;
 	}
 	
-	if (threadIdx.x < RAKING_THREADS) {
+	if (threadIdx.x < B40C_WARP_THREADS) {
 		
 		// two segs per row, odd segs are offset by 8
 		row = threadIdx.x >> LOG_SEGS_PER_ROW;

 * Scans a cycle of RADIXSORT_CYCLE_ELEMENTS elements 
 ******************************************************************************/

template<
	int SMEM_ROWS,
	int RAKING_THREADS,
	int PARTIALS_PER_ROW,
	int PARTIALS_PER_SEG>
__device__ __forceinline__ void SrtsScanCycle(
	int smem[SMEM_ROWS][PARTIALS_PER_ROW + 1],
	int *smem_offset,
	int *smem_segment,
	int warpscan[2][B40C_WARP_THREADS],

	int block_offset = 0;
	while (block_offset < normal_block_elements) {
		
		SrtsScanCycle<PARTIALS_PER_SEG>(	
			smem_offset, 
			smem_segment, 
			warpscan,
			reinterpret_cast<int4 *>(&d_ispine[block_offset]), 
			reinterpret_cast<int4 *>(&d_ospine[block_offset]), 
			carry);
