 	}
 }
 
+// parallel taking the square root and multiplying with a scale factor
 __global__ void dev_scaleSqrt(float *data, float scale, int len) {
 	const int     tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
 	const int threadN = IMUL(blockDim.x, gridDim.x);

	}
}

__global__ void dev_split(unsigned char *idata, float *red, float *green, float *blue, float *gray, int len) {
	const int     tid = IMUL(blockDim.x, blockIdx.x) + threadIdx.x;
	const int threadN = IMUL(blockDim.x, gridDim.x);

			d_scalingStimBuf = tmp;
		}

		// nrT is 9, v1GaussSize is 9, so we're taking d_scalingStimBuf[0-0+nrX*nrY*9]
		// since nrT could be greater than v1GaussSize, we take "only the part we want", quote Micah comment
		cutilSafeCall(cudaMemcpy(d_v1GausBuf, &d_scalingStimBuf[nrX*nrY*((nrT-v1GausSize)/2)], sizeof(float)*nrX*nrY*v1GausSize, cudaMemcpyDeviceToDevice));

		float* tmp;
