Conditional compilation with macros?

Hi,

is there a comprehensive list of predefined cuda macros around? I would like to achieve the following:

#ifdef COMP_ARCH_20
<code for compute capability 2.0>
#else

#endif

THanks in advance,

Kwyjibo

Use

#if CUDA_ARCH >= 200
<code for compute capability 2.0 and later>
#else

#endif

Use

#if CUDA_ARCH >= 200
<code for compute capability 2.0 and later>
#else

#endif

Yes I’ve also been looking for such a list!

For your example:

#if (__CUDA_ARCH__ < 200)

#define int_mult(x,y)	__mul24(x,y)	

#else

#define int_mult(x,y)	x*y

#endif

Yes I’ve also been looking for such a list!

For your example:

#if (__CUDA_ARCH__ < 200)

#define int_mult(x,y)	__mul24(x,y)	

#else

#define int_mult(x,y)	x*y

#endif

Thank you, that solved my problem!

Thank you, that solved my problem!