Hi,
i am trying to define a new array, but i failed complie my new code in SORT or OEORDER
first i define it as ushort, then i got this error infomation: cannot determine which instance of overloaded function “tex1Dfetch” is intended. i think it may cause by the datatype, ushort. then i try uint and int (because i read the developer guide, it says only 32-bit and 64-bit are supported), also failed. so i wanna ask, how can i fix that.
and typedef ushort aprinfo
moreover, i am trying done this in SORT, adding this new array in tuple, but i am not sure, because in the original code, both hashkey and particleinfo are used for SORTing, but my new array wasn’t. i just bind it with then (3 element in tuple but ptype_hash_compare remian unchanged), not sure whether it works.
from the snippets you pasted it seems you’re calling tex1Dfetch with square brackets [] instead of parenthesis ()? I would also recommend being consistent with the type naming, if you have defined the aprinfo type (as used in the definition of aprTex) you might want to use it in the buffer traits for BUFFER_APRINFO too.
For the sorting, the question is: do you want to sort according to the APR info too, or do you just want to sort the APR info array?
If the APR info is to be used as a key for sorting, then you need to change the ptype_hash_compare functor to include aprinfo in the tuples, and add the aprInfo to the make_tuple calls in sort() (all of this is in buildneibs.cu).
If the APR info is just a value to be sorted, then you don’t need to do that, it will be automatically sorted with the rest if you handle the array in reorder.