LLNL / RAJA

RAJA Performance Portability Layer (C++)
BSD 3-Clause "New" or "Revised" License
493 stars 102 forks source link

Add Tests for Strongly Typed Indices for TensorIndex #1745

Open rchen20 opened 2 months ago

rchen20 commented 2 months ago

Is your feature request related to a problem? Please describe.

In https://github.com/LLNL/RAJA/pull/1738, it was discovered that TensorIndex did not handle strongly typed indices, and was fixed directly in that PR.

Describe the solution you'd like

Tests using strongly typed indices with TensorIndex are missing, and we should add them. The cases which need covering are:

VectorIndex<strongtypedindex, vector> RowIndex<strongtypedindex, vector> ColIndex<strongtypedindex, vector>

See RAJA/benchmarks/ltimes.cpp for use cases.

rchen20 commented 1 month ago

Also check whether this implementation of range() should be index_type or value_type. Use range() with strongly typed indices in tests.

https://github.com/LLNL/RAJA/blob/6280cd6d53e2de8fb2b7692bc65cbc9d8025f5bb/include/RAJA/pattern/tensor/TensorIndex.hpp#L67