I have a setup very similar to osgRTTDemo. In order for my CUDA kernel to do any work, I must first gather some basic statistics about the floating point values in the FBO. I need, min, max, mean, stddev, and eventually a histogram. These are all parallel reduction problems and the standard CUDA examples has a whitepaper on optimized parallel reduction algorithms. However, I would prefer to use the built-in NPP functions that are able to gather those statistics for me.
Since the values in the FBO are changing every frame I need to recalculate the statistics on a per-frame basis. In osgRTTDemo, the launch() function within TexFilter is where the CUDA kernel is called on a per-frame calculation. Is this where I should try to also implement an NPP statistics call? I found this thread: http://stackoverflow.com/questions/12480821/how-to-use-cuda-nppnvidia-performance-primitives-on-opengl-textures that says that NPP needs a cuda device pointer in order to get those statistics; am I able to retrieve the cuda device pointer from a osgCuda::Texture2d object? I think I may have jumped in too deep with this CUDA stuff and may just need to go back and teach myself CUDA from the beginning, but any advice is appreciated as I slog my way through this problem. Thanks. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53469#53469 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org