Skip to main content

ctypes utilities for faster and easier simulation programming in C and Python

Project description

Overview

RailGun is a ctypes utilities for faster and easier simulation programming in C and Python. It automatically creates Python class to call C functions easily and safely. All you need is a few constraints in C code.

RailGun does more than just exporting C functions to Python world [1]. For example, when you write simulation code, you may face situation like this many times:

I am accessing array like x[i][j] and y[j][k], so I want the second axis of the array x and the first axis of the array y to be of the same length.

RailGun solves this problem by keeping shape of all arrays to be consistent. Memory allocation for these arrays is done automatically.

RailGun also provides some value check before passing it to C function. For example, you may want to pass an index of some array to C function. When you do that, you need to check if the index is in a certain range, to avoid segmentation fault. RailGun provides a short hand notation to check that automatically. Also, you can wrap C function to put any kind of complex value check and pre/post-processing.

With these features and other useful utilities provided by RailGun, you can really focus on guts of computation in C code.

Installation

pip install railgun   # using pip
easy_install railgun  # using setuptools (if you must)

Requirement

  • Numpy

  • (matplotlib for sample code)

License

See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

railgun-0.1.7.tar.gz (18.8 kB view details)

Uploaded Source

File details

Details for the file railgun-0.1.7.tar.gz.

File metadata

  • Download URL: railgun-0.1.7.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for railgun-0.1.7.tar.gz
Algorithm Hash digest
SHA256 8d147afc92cd60e1cf11df7f128955c6096a843ca352c1b84d98ad3f9de75ee1
MD5 9e201389e9d28902028fefe858f69728
BLAKE2b-256 a264e1a5ca1b5eed59ac18ab6ea016cdd64ff20ca247e2a68c7d997733d9725a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page