error: an asm operand must have scalar type. Merrill's radix sort under win-XP + VS2005.

Hi all,

I have a error when I am trying to compile Merrill’s radix sort under win-XP + VS2005.

error: asm operand type size(1) does not match type/size implied by constraint ‘r’

it occurs in the following code

#define B40C_DEFINE_GLOBAL_LOAD(base_type, dest_type, short_type, ptx_type, reg_mod)\

asm("ld.global.cg."#ptx_type" %0, [%1];" : "="#reg_mod(dest) : _B40C_ASM_PTR_(d_ptr + offset));\

...

B40C_DEFINE_GLOBAL_LOAD(char, signed char, char, s8, r)

Check out the bottom of page 8 in the “Using Inline PTX Assembly In Cuda”

You can also use my radix sort:
http://www.moderngpu.com/sort/mgpusort.html
https://www.github.com/seanbaxter/mgpu/

The library should compile under VC2005, although the tests require VC2008’s tr1 for mt19937. The .sln I included is for vs9. But for this you only need to compile cucpp.cpp, mgpusort.cpp, and sorttables.cpp. If you want it as a DLL (not required), use the mgpusort.def manifest.

sean