apparently, all device functions need to be inline because nvcc doesn't link them.