welcome my name is Stephen and I'm going to introduce how to use intellisense with EDEM CUDA API this is a new feature introduced in EDEM 2022. 2 and will help your GPU programming previous videos on the subject introduce how to use the API how to update versions and how to program using CUDA for faster GPU processing so this is an update video highlighting the latest features if we look at the files which are installed with EDEM 2022. 2 I mean the install folder EDEM Source API and the new CUDA folder within this CUDA folder a lot of header files .
cuh and an example plugin I'm going to load this example plugin into my resource files just so we can have a look there's a series of headers here and references and also some instructions on how to use so I'm working off a project as you see which I already have it's the field data example I've used in previous videos so I don't need to follow really steps one to three I'll start with step four but first off I'm going to copy the headers into my project copy them at the top so first we can see there's a bunch of areas it can't include them because it doesn't recognize them and it's also worthwhile highlighting why we're doing this as well we can see here if we highlight some of the functionality here Visual Studio doesn't really recognize any of these functions if I go to my CPU code I can highlight over a lot of the functionality and it gives me options as well 'particle. ' tells me all the functions available in the past confirmation and that's what we want to achieve with our intelligent sense CUDA options so let's go through the list add an include directory to the install path so we've done this before right click properties C++ addition include directories edit my previous videos were all from edom2022. 1 so let's say I have the paths in already I'm going to just copy and paste in the 2022.
2 CUDA I could upload these parts but I'll do that offline it's the same process as updating the versioning so I could use the latest version but it's not necessary in this instance I just need to include the CUDA path to 2022. 2 apply all configurations okay so we can see that we recognize these headers now and immediately there's some improvements we can see a bit about C api particle but we haven't finished yet we want to set the code editor options to interpret . cu and a .
cuh files or C++ tools options text editor file extensions you can see I've added in CUDA already it's just need to add in . cuh to be recognized as the C++ files and then we should be able to prototype CUDA plugin with syntax highlighting and intellisense so I don't need this example plugin so I'm going to remove it from my project let's have a look see what this just do for us so 'particle. ' we can see gives us a list of options already about the information that particle can provide to already makes the programming a lot easier as we can find out information also we can right click and look at the definition of things so the particle class brings us to the header file or this is defined same for the other information simulation we can maybe go to the go to the file and have a look and look through the information the documentation about what it provides us that helps to understand how how these functions work and that's it no compiling needed I just need to save the to file next time I run the project the file hasn't actually changed in this instance but next time I write some code I can add in intellisense options I'm using EDEM 2022.