Skip to content

Commit

Permalink
Convert generated_jit to overload.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTodd13 committed Feb 5, 2024
1 parent 6bdd881 commit 4e569c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ramba/shardview_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import numba
from numba import literal_unroll
from numba.extending import overload
import numpy as np
from ramba.common import *

Expand Down Expand Up @@ -388,7 +389,7 @@ def has_index(sv, index):
# return (_index_start(sv)<=index).all() and (index<_stop(sv)).all()


@numba.generated_jit(nopython=True,cache=True)
@overload(calc_map_internal, nopython=True, cache=True)
def calc_map_internal(sl_i, sv_s, sv_e, sv_st):
if isinstance(sl_i,numba.types.SliceType):
if (sl_i.members==2):
Expand Down Expand Up @@ -424,6 +425,7 @@ def impl(sl_i, sv_s, sv_e, sv_st):
else:
raise numba.core.errors.TypingError("ERR: slice contains something unexpected!", type(sl_i))


@numba.njit(fastmath=fastmath, cache=True)
def mapslice(sv, sl):
# assert len(sl) == len_size(sv) # This assert causes compilation failure at i+=1; likely due to Numba bug; need to revisit
Expand Down

0 comments on commit 4e569c4

Please sign in to comment.