Beispiel #1
0
from numba import exportmany, export
from numba import decorators

def mult(a, b):
    return a * b

exportmany(['multf f4(f4,f4)', 'multi i4(i4,i4)'])(mult)
export('multc c16(c16,c16)')(mult)
export('mult f8(f8, f8)')(mult)
Beispiel #2
0
from numba import exportmany, export


def mult(a, b):
    return a * b


exportmany(['multf f4(f4,f4)', 'multi i4(i4,i4)'])(mult)
# Needs to link to helperlib to due with complex arguments
# export('multc c16(c16,c16)')(mult)
export('mult f8(f8, f8)')(mult)
Beispiel #3
0
#!/usr/bin/env python
from numba import exportmany, export


def mult(a, b):
    return a * b


export('multi i4(i4, i4)')(mult)
exportmany(['multf f4(f4, f4)', 'mult f8(f8, f8)'])(mult)
Beispiel #4
0
from numba import exportmany, export


def mult(a, b):
    return a * b


export("multi i4(i4, i4)")(mult)
exportmany(["multf f4(f4, f4)", "mult f8(f8, f8)"])(mult)
Beispiel #5
0
# Compile this file with 'pycc pi.py'

from numba import export


def multiply_by_pi(num):
    """ Multiply a number by pi. """
    return num * 3.14159265359


export('mult f8(i4)')(multiply_by_pi)
export('mult_f f8(f8)')(multiply_by_pi)