openhackathons-org / gpubootcamp

This repository consists for gpu bootcamp material for HPC and AI
Apache License 2.0
513 stars 254 forks source link

Do not use manual memory management in stdpar examples #97

Closed brycelelbach closed 1 year ago

brycelelbach commented 2 years ago

https://github.com/gpuhackathons-org/gpubootcamp/blob/c357a6b0b50a57fabaa699d0a0e5b49700f66b19/hpc/nways/nways_labs/nways_MD/English/C/source_code/stdpar/rdf.cpp#L68-L70

https://github.com/gpuhackathons-org/gpubootcamp/blob/c357a6b0b50a57fabaa699d0a0e5b49700f66b19/hpc/nways/nways_labs/nways_MD/English/C/source_code/stdpar/rdf.cpp#L74

In modern C++, we use RAII. We should not be doing manual memory management anywhere. These should be std::vectors, not raw allocations.