Skip to content

Instantly share code, notes, and snippets.

@will-ca
Last active February 20, 2020 18:32
Show Gist options
  • Save will-ca/b93bc5814a0f26681f2b26b80e0432f1 to your computer and use it in GitHub Desktop.
Save will-ca/b93bc5814a0f26681f2b26b80e0432f1 to your computer and use it in GitHub Desktop.
# distutils: language = c++
import cython
ctypedef fused fused_type_ohtest:
double
int
ctypedef fused fused_type_ohtest2:
double
int
ctypedef fused big_fused_type:
char
short
int
long
long long
float
double
long double
ctypedef fused big_fused_type2:
char
short
int
long
long long
float
double
long double
ctypedef fused big_fused_type3:
char
short
int
long
long long
float
double
long double
cpdef bint no_overhead(double var)
@cython.locals(a=cython.double, b=cython.int)
cpdef bint py_overhead(var)
cpdef bint fused_type_overhead(fused_type_ohtest var)
cpdef bint fused_bind(self, fused_type_ohtest var)
cdef class compiled_fused_type_cls:
cpdef bint static_meth(self, fused_type_ohtest var)
@cython.locals(obj=compiled_fused_type_cls, v=cython.double)
cpdef (bint, bint) fused_type_cls_compiledtest()
@cython.locals(a=cython.double, b=cython.int)
cpdef bint fused_type_staticwrapped(var)
cpdef bint fused_type_multisig(fused_type_ohtest var1, fused_type_ohtest2 var2)
cpdef bint bigfused_type_overhead(big_fused_type var)
cpdef bint bigfused_type_multisig(big_fused_type var1, big_fused_type2 var2, big_fused_type3 var3)
#cpdef kwaronly_func(self, a, *, b=*)
cdef class kwargonly_callable:
cdef callobj, boundobj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment