File: print-binary.py

package info (click to toggle)
pyopencl 2016.1%2Bgit20161130-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,220 kB
  • ctags: 3,039
  • sloc: python: 20,232; cpp: 8,002; lisp: 4,361; makefile: 192; ansic: 103; sh: 1
file content (14 lines) | stat: -rwxr-xr-x 248 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /usr/bin/env python

from __future__ import division

import pyopencl as cl
import sys

ctx = cl.create_some_context()
with open(sys.argv[1], "r") as inf:
    src = inf.read()

prg = cl.Program(ctx, src).build()

print(prg.binaries[0].decode())