Pi constant

Hello All! Is there a constant Pi, defined in CUDA? Thank You

I don’ know but I guess that if you use math.h and you pass PI as an argument of the kernel launch, you wouldn’t have any problem.

Try looking in “math_constants.h”:

#define CUDART_PI_F 3.141592654f

I am using CUDA from C#. So i can not include .h files :)

I am using CUDA from C#. So i can not include .h files :)

Are you writing your kernels in C#? CUDA C supports #include just like regular C.

Are you writing your kernels in C#? CUDA C supports #include just like regular C.

Yea, i write kernels in CUDA C :) Thank You for solution

Yea, i write kernels in CUDA C :) Thank You for solution