Actually return the device_mem value in Device::malloc, also update CUDADevice to use mem_flags instead of permission
Fixed the build
Merge branch 'master' of https://github.com/gfokkema/RT-Raytracing

Conflicts:
	src/devices/cudadevice.cpp
Merge branch 'master' into osx_gcl