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.8.tar.gz (18.8 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for railgun-0.1.8.tar.gz
Algorithm Hash digest
SHA256 9a2767b94776065aa15832f7498ff65fd9e2b46a74539cf5cde60d5bbfa09fdd
MD5 683c4eedcad08a18a41944c9593e0c94
BLAKE2b-256 0bceacb4454e35b84d6dfce12624fff45cee7fff16f9d5a67d5b0e0018a33aba

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