Skip to content

Commit fbb25cd

Browse files
Mark static function usm_ndarray_types::typenum_to_lookup_id const
This allows to call it for const struct references.
1 parent ecbe8fb commit fbb25cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpctl/tensor/libtensor/include/utils/type_dispatch.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class DispatchVectorBuilder
162162
struct usm_ndarray_types
163163
{
164164

165-
int typenum_to_lookup_id(int typenum)
165+
int typenum_to_lookup_id(int typenum) const
166166
{
167167
using typenum_t = dpctl::tensor::detail::typenum_t;
168168
auto const &api = ::dpctl::detail::dpctl_capi::get();
@@ -232,7 +232,7 @@ struct usm_ndarray_types
232232
}
233233

234234
private:
235-
void throw_unrecognized_typenum_error(int typenum)
235+
void throw_unrecognized_typenum_error(int typenum) const
236236
{
237237
throw std::runtime_error("Unrecogized typenum " +
238238
std::to_string(typenum) + " encountered.");

0 commit comments

Comments
 (0)