Exemplo n.º 1
0
def test_accel_nb_5(fn):
    """ JIT with function, with kwargs"""
    accel.has_numba = True
    fn = accel.try_jit(fn, nopython=True)
    fn()
    assert isinstance(fn, jitd_class)
    if jit_enabled:
        assert len(fn.nopython_signatures) > 0
Exemplo n.º 2
0
def test_accel_nb_5(fn):
    """ JIT with function, with kwargs"""
    accel.has_numba = True
    fn = accel.try_jit(fn, nopython=True)
    fn()
    assert isinstance(fn, jitd_class)
    if jit_enabled:
        assert len(fn.nopython_signatures) > 0
Exemplo n.º 3
0
def test_accel_no_nb(fn):
    """ Test function isn't JIT-ed if no numba """
    accel.has_numba = False
    assert accel.try_jit(fn) is fn
Exemplo n.º 4
0
def test_accel_nb_4(fn):
    """ JIT with function """
    accel.has_numba = True
    assert isinstance(accel.try_jit(fn), jitd_class)
Exemplo n.º 5
0
def test_accel_no_nb(fn):
    """ Test function isn't JIT-ed if no numba """
    accel.has_numba = False
    assert accel.try_jit(fn) is fn
Exemplo n.º 6
0
def test_accel_nb_4(fn):
    """ JIT with function """
    accel.has_numba = True
    assert isinstance(accel.try_jit(fn), jitd_class)