I have run into a problem getting a program to compile for cuda-5.0. I get the following error:
energy.cu(204): error: no operator “-” matches these operands
operand types are: ushort1 - int
Here is line energy.cu(204): ibead = ibead_bnd[i] - 1;
ibead_bnd[i] is of type ushort1 so the “-” operator will not work. However, I try casting ibead_bnd[i] to an int and I get an error that says there is no suitable conversion from ushort1 to int.
It seems like I’m in a catch 22. Does anyone know of a workaround for this? Thank you in advance for any help.