I want to use __saturate(x) function in my kernel. But I get an error.

Does it realy faster then this stupid code?

```
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
x = min(x,1.0f);
x = max(x,0.0f);
```

I want to use __saturate(x) function in my kernel. But I get an error.

Does it realy faster then this stupid code?

```
#define min(a,b) (((a) < (b)) ? (a) : (b))
#define max(a,b) (((a) > (b)) ? (a) : (b))
x = min(x,1.0f);
x = max(x,0.0f);
```

Perhaps you should try __saturatef(), declared in device_functions.h? That function compiles for me with CUDA 2.0.

Jeremy

Thanks,