Skip to content

Instantly share code, notes, and snippets.

View computemachines's full-sized avatar

Tyler Parker computemachines

View GitHub Profile
#! /usr/bin/python
import numpy as np
from numpy import array, arange
from matplotlib import pyplot as plt
m = 1.0
gamma = 1.0
g = array((0, -9.8))
r = array((0, 0), dtype=float) # create an array and force elements to have type float
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function
import numpy as np
import pyopencl as cl
a_np = np.ones(5000).astype('u4') * 400
ctx = cl.create_some_context()
queue = cl.CommandQueue(ctx)