CuPy-backed finite functions, bipartite multigraphs, and diagrams.


Experimental Module

This code is not thoroughly tested. It’s included here as a proof-of-concept for GPU acceleration. The way backends are selected is also likely to change in the future.

class yarrow.cupy.CupyFiniteFunction(target, table, dtype='int64')

CuPy-backed finite functions

class yarrow.cupy.CupyBipartiteMultigraph(wi, wo, xi, xo, wn, pi, po, xn)

CuPy-backed bipartite multigraphs

class yarrow.cupy.CupyDiagram(s: AbstractFiniteFunction, t: AbstractFiniteFunction, G: AbstractBipartiteMultigraph)

CuPy-backed string diagrams