Why are the various operations of the ‘double’ class in the Optix framework not implemented?

When I was writing the program, I found that the precision of the float was not enough, so I needed double to do the calculation.
However, I found that optix assigns values from host to device, including operator overloading of double3 are not implemented.

In my code I need to multiply the float by a million, which will result in an error in the last digits.

Maybe these older threads about the same topic will shed some light on it:
[url]https://devtalk.nvidia.com/default/topic/1027430/optix/double-buffers-in-optix/post/5226360[/url]
[url]https://devtalk.nvidia.com/default/topic/1036155/optix/double-precision-of-ray-lengths/post/5263625[/url]

(The forum has a search function in the upper right corner next to your log-in name.)

I looked at the two links you provided, one of which is to create a double-precision buffer, which seems to be useful. I have defined a double operations’ function in the cu file, but in the function “rtVariableSet1f” that passes the variable from the cpp file to cu, it does not provide an interface that passes double precision. Should I pass the parameter using the double buffer provided by the link?

You could do that with either a variable of user defined type
[url]https://raytracing-docs.nvidia.com/optix_6_0/api_6_0/html/group___variables.html#ga02128277755aec10ac6cddcb15770aa1[/url]
or user defined data elements in an input buffer.
[url]https://raytracing-docs.nvidia.com/optix_6_0/api_6_0/html/group___buffer.html#gafbd4982c76b5d68dfb2a11dfadc803e5[/url]

For variables which change often between launches it’s recommended to use an input buffer with user defined element size holding a struct with your global variables for performance reasons:
[url]https://devtalk.nvidia.com/default/topic/1048952/optix/recompile-question/post/5323558/#5323558[/url]
[url]https://devtalk.nvidia.com/default/topic/1055077/optix/optix-bad-performance-with-dynamic-objects/[/url]

All that said, I would really recommend to avoid using doubles in OptiX device code, even more if you’re not running on workstation GPU hardware.
Maybe there is a different solution to your precision problem if you explain what exactly requires it.