sandialabs / omega_h

Simplex mesh adaptivity for HPC
Other
114 stars 53 forks source link

Add mising OMEGA_H_INLINE for gpu compute #404

Closed jacobmerson closed 1 year ago

jacobmerson commented 1 year ago

This pull request fixes a bug in the few class (missing OMEGA_H_INLINE). When running with Kokkos+Cuda this was causing memory corruption when using the Vector initializer_list constructor since the constructor code did not exist on the device side.

Most likely due to the use through inheritance the compiler was not warning about missing host device annotations.

jacobmerson commented 1 year ago

@ibaned

ibaned commented 1 year ago

Thanks for pinging me @jacobmerson ! I wouldn't have seen this otherwise. That function wasn't marked before because I thought std::initializer_list didn't work on GPU, but I'm glad you're able to use it today!