all functions cuda depth 2

min size is 8   size must be multiple of 2