Skip to main content

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.

Release files for railgun 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for railgun 0.1.8
File Size Uploaded
railgun-0.1.8.tar.gz 18.8 kB Details

Release files / railgun-0.1.8.tar.gz

Download URL railgun-0.1.8.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9a2767b94776065aa15832f7498ff65fd9e2b46a74539cf5cde60d5bbfa09fdd
BLAKE2b-256 checksum
How to use checksums
0bceacb4454e35b84d6dfce12624fff45cee7fff16f9d5a67d5b0e0018a33aba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.8 This release

1 release file

0.1.7

1 release file

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page