This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |