Using float3 instead of VertexAttributes in optixIntro

The different variable names indicate the two different memory spaces you’re working with in CUDA applications.
The variables with d_ prefix in my code indicate device memory, the ones without are in host memory.

OptiX kernels only work with device memory, that is addresses which can be accessed by the GPU (could also be pinned host memory, but I digress).

Means all input data is normally build up inside host memory first, and when time has come, the necessary data is copied to the resp. device memory location with a CUDA cuMemcpy*() call where the name “HtoD” implies Host to Device, and vice versa.
So inside the OptiX device code you normally handle with CUdeviceptr allocated with cuMemAlloc() which are 64-bit device addresses of the underlying devive memory, think buffers or arrays of data.

The m_d_systemParameter holds the single global constant memory which is given to OptiX as launch parameters.
Think of it as a structure with all variables declared at context scope in previous OptiX versions.
Look at the optixLaunch() call inside the examples This is the same in all examples, just the name changes.

The name of that constant struct is given to the Pipeline in the PipelineCompileOptions via the pipelineLaunchParamsVariableName. In my code that is normally “sysParameter” or “sysData” because these are renderer system wide, means they can be accessed anywhere in the OptiX device code, aka. what was done with context scope variables in the past.

Some care needs to be taken with the CUDA vector type alignment restrictions.
https://forums.developer.nvidia.com/t/preferred-alignment-for-buffers/107532/2

Please read though the OptiX 7 Programming Guide and API Reference:
https://raytracing-docs.nvidia.com/optix7/index.html
https://forums.developer.nvidia.com/t/porting-to-optix-7/79249/2

Understanding the Shader Binding Table layout and the indexing into that is crucial.
https://raytracing-docs.nvidia.com/optix7/guide/index.html#shader_binding_table#shader-binding-table
Some more information about that:
https://forums.developer.nvidia.com/t/index-each-gltf-imported-triangle-with-a-unique-primitiveid/111093/8

For additional OptiX 7 examples from beginner to advanced level please have a look into the resources linked in the following sticky posts at the top of the OptiX sub-forum:
https://forums.developer.nvidia.com/t/optix-7-1-release/139962