Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Last active September 26, 2018 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/023a802a458943ff4207ddbd47705aaf to your computer and use it in GitHub Desktop.
Save chelseatroy/023a802a458943ff4207ddbd47705aaf to your computer and use it in GitHub Desktop.
The C++ sparsetools generator
"""
python generate_sparsetools.py
Generate manual wrappers for C++ sparsetools code.
Type codes used:
'i': integer scalar
'I': integer array
'T': data array
'B': boolean array
'V': std::vector<integer>*
'W': std::vector<data>*
'*': indicates that the next argument is an output argument
'v': void
'l': 64-bit integer scalar
See sparsetools.cxx for more details.
"""
...
# csr.h
CSR_ROUTINES = """
...
csr_todense v iiIIT*T
...
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment