Fixed errors running on CPU
Work correctly on devices with SIMD width less than 32
Eliminated compilation errors on devices that don't support 64 bit integers
Removed requirement that default device support double precision