Replaced the #defines in tools.cu with enumeration and constant in tools.h