sandialabs / omega_h

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

Use alias for Omega_h_vector. #403

Closed jacobmerson closed 1 year ago

jacobmerson commented 1 year ago

This pull request replaces the Vector class with an alias for Few. The current implementation of Vector is essentially just an alias with the addition of operator().

jacobmerson commented 1 year ago

@ibaned how do you feel about this change as well? If you aren't a fan of this I'll put a pull request for marking the Vector initializer_list constructor OMEGA_H_INLINE as well. This was already done on the SCOREC version so I missed this change here.

ibaned commented 1 year ago

Interesting... this does seem to save code! Do you really need the volatile overloads? The latest version of Kokkos doesn't require volatile overloads for the result of reductions.

jacobmerson commented 1 year ago

@ibaned I don't think the volatile overloads were needed, but I wasn't positive why they were there, so I was nervous to remove them...If you want I can take out the volatile overloads and run the tests with Kokkos+Cuda.

ibaned commented 1 year ago

Yea that would be great! If all that passes this seems like a useful change.

jacobmerson commented 1 year ago

@ibaned this passed the omega_h test suite for both Kokkos+Cuda and Kokkos+OpenMP on my workstation.