PyCULA /

Filename Size Date modified Message
PyCULA
PyCULA.egg-info
38 B
1.3 KB
493 B
596 B

Welcome to PyCULA, a python wrapper for CULAtools.

PyCULA was written by Garrett Wright and Dr. Louis Theran. It was funded by an NSF grant through Dr. Igor Rivin.

Using PyCULA is meant to be simple. For those familiar with using numpy this will be quite similar, and for those familiar with using CULA, well, this should be simpler!

Below is an example. You can enter this into the python interpreter once you have installed PyCULA and its dependencies.

Here is how it works:

# Import cula wrappers >>> from PyCULA.cula import *

# Import numpy >>> import numpy as np

# Make a numpy array >>> a = np.array([[1,2],[3,4]],np.float32)

# Initialize CULA on GPU card so it can do some work >>> culaInitialize()

# Perform a routine. You may either print the answers, or give them a variable name. In this case we will call answers b. # Python, numpy, and PyCULA takes care of all the background memory alloc/deallocation and variable types for us>> This is the automagic part.

>>> b = gpu_eigenvalues(a)
>>> b # Print the answer
array([-0.37228107+0.j, 5.37228155+0.j])

# Shutdown CULA on GPU card so it is ready for its next job >>> culaShutdown()

There is much more functionality then this, including the ability to use the device wrappers mixed with your own kernel code by utilizing pyCUDA! See the examples folder.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.