This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ NUMBA_OPT=0 NUMBA_DUMP_CFG=1 NUMBA_DEBUG_PRINT_BEFORE=translate_bytecode NUMBA_DEBUG_PRINT_AFTER=translate_bytecode pytest -sv rbc/tests/test_omnisci_array.py::test_array_ret -x --disable-warnings | |
| ============================================================================================================================ test session starts ============================================================================================================================= | |
| platform darwin -- Python 3.8.1, pytest-5.3.5, py-1.8.1, pluggy-0.13.1 -- /Users/guilhermeleobas/miniconda3/envs/rbc-dev/bin/python | |
| cachedir: .pytest_cache | |
| rootdir: /Users/guilhermeleobas/Documents/GitHub/rbc | |
| collecting ... OmnisciDB version (5, 1, 0, '-20200211-bc790105fb') | |
| collected 1 item | |
| rbc/tests/test_omnisci_array.py::test_array_ret -------------rbc.tests.test_omnisci_array.test_array_ret.<locals>.foo: nopython: BEFORE translate_bytecode-------------- | |
| func_ir is None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from numba.core.extending import typeof_impl, type_callable, \ | |
| models, register_model, make_attribute_wrapper, lower_builtin, \ | |
| unbox, box, overload, overload_method, intrinsic | |
| from numba.core import cgutils, typing | |
| from numba.core.imputils import numba_typeref_ctor | |
| from numba import types, njit, typeof | |
| from llvmlite import ir | |
| import operator | |
| # Array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from numba.core.extending import typeof_impl, type_callable, \ | |
| models, register_model, make_attribute_wrapper, lower_builtin, \ | |
| unbox, box, overload, overload_method, intrinsic | |
| from numba.core import cgutils, typing | |
| from numba.core.imputils import numba_typeref_ctor | |
| from numba import types, njit, typeof | |
| from llvmlite import ir | |
| import operator | |
| # Array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <time.h> | |
| #include <sys/time.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #define SAMPLING_FACTOR 1000 | |
| double sampling(float *restrict m, int n){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# OmniSci User Defined Table Function Support\n", | |
| "\n", | |
| "The *Remote Backend Compiler* package supports OmniSci table functions. Table functions blah balh blah.\n", | |
| "\n", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @extending.intrinsic | |
| def zeros(typingctx, shape, dtype=nb_types.double): | |
| # find the correct zero | |
| if isinstance(dtype, nb_types.Integer): | |
| zero = 0 | |
| elif isinstance(dtype, nb_types.Float): | |
| zero = 0.0 | |
| else: | |
| msg = 'omnisci_np_zeros: dtype {} not supported'.format(dtype) | |
| raise errors.TypingError(msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from numba import njit | |
| from numba.core import extending, types, cgutils | |
| import operator | |
| from llvmlite import ir | |
| i32 = ir.IntType(32) | |
| class Buffer(): | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from numba.core import extending | |
| class Namespace(object): | |
| def __init__(self): | |
| self._globals = {} | |
| @property | |
| def globals(self): | |
| return self._globals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from collections import defaultdict | |
| from sparse._meta.dense_level import Dense | |
| from copy import copy | |
| counter = 97 | |
| class IndexVar(object): | |
| def __init__(self, name=None): | |
| if name is None: |