Skip to content

Mark static function usm_ndarray_types::typenum_to_lookup_id const #1077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dpctl/tensor/libtensor/include/utils/type_dispatch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class DispatchVectorBuilder
struct usm_ndarray_types
{

int typenum_to_lookup_id(int typenum)
int typenum_to_lookup_id(int typenum) const
{
using typenum_t = dpctl::tensor::detail::typenum_t;
auto const &api = ::dpctl::detail::dpctl_capi::get();
Expand Down Expand Up @@ -232,7 +232,7 @@ struct usm_ndarray_types
}

private:
void throw_unrecognized_typenum_error(int typenum)
void throw_unrecognized_typenum_error(int typenum) const
{
throw std::runtime_error("Unrecogized typenum " +
std::to_string(typenum) + " encountered.");
Expand Down