GPU: In strcut _scanElemOp dummy type pass by value

This commit is contained in:
Anatoly Baksheev 2011-02-14 13:30:00 +00:00
parent 2a612ca62c
commit d7e612cd4b

View File

@ -178,11 +178,11 @@ struct _scanElemOp
private:
template <int v> struct Int2Type { enum { value = v }; };
static inline __host__ __device__ T_out scanElemOp(T_in elem,const Int2Type<0>&)
static inline __host__ __device__ T_out scanElemOp(T_in elem, Int2Type<0>)
{
return (T_out)elem;
}
static inline __host__ __device__ T_out scanElemOp(T_in elem, const Int2Type<1>&)
static inline __host__ __device__ T_out scanElemOp(T_in elem, Int2Type<1>)
{
return (T_out)(elem*elem);
}