Skip to content

Add single-precision and half-precision math constants to port_from_opencl.cuh #107

@eyalroz

Description

@eyalroz

OpenCL offers several math constants at different floating-point precisions: double, single and half. CUDA does not really offer any of them; and if you use the C math library, you get double-precision constants.

So, let's make the constants available in CUDA as well.

Note, however, that OpenCL's M_PI and glibc's M_PI don't have the same textual value, while having the same double value. See this thread for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions