The following minimal tutorial will guide through writing and building your first NVIDIA® DriveWorks based application on a Linux desktop machine.
The first thing to do when building an application based on DriveWorks is to initialize its context:
The header for the context can be included as:
Now we can for example figure out how many GPUs are available on the host machine:
Last thing to do before exiting the program is to release the context:
For your reference this is what the full program will look like:
This application can be built with gcc using the following command:
gcc -I/usr/local/driveworks/include/ -I/usr/local/cuda/include helloworld.cpp -ldriveworks -L/usr/local/driveworks/lib/ -lstdc++ -o helloworld
Afterwords when executing ./helloworld you should get an output similiar to:
Context of Driveworks SDK successfully initialized. Version: 1.0.218 Available GPUs: 1