summaryrefslogtreecommitdiff
path: root/benchmarks/CUDA/CP/common/python/binaryfilecompare.py
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-10-01 08:55:28 -0800
committerTor Aamodt <[email protected]>2010-10-01 08:55:28 -0800
commit11b308e7363e937966b035b4891db32b4eece3bf (patch)
tree50ca4c9ad6f163ac4acb2bf505e64dfebed66947 /benchmarks/CUDA/CP/common/python/binaryfilecompare.py
parentbb820c116764d7a1b8e071137d32b74e7f34dd2f (diff)
integrating recent changes from fermi-test into fermi
(i'll use "fermi" for more disruptive changes to the pipeline model such as updating the MSHRs and getting rid of the warp tracker, ripping out DWF, etc...) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7805]
Diffstat (limited to 'benchmarks/CUDA/CP/common/python/binaryfilecompare.py')
-rw-r--r--benchmarks/CUDA/CP/common/python/binaryfilecompare.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/benchmarks/CUDA/CP/common/python/binaryfilecompare.py b/benchmarks/CUDA/CP/common/python/binaryfilecompare.py
deleted file mode 100644
index b143b68..0000000
--- a/benchmarks/CUDA/CP/common/python/binaryfilecompare.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# (c) Copyright 2007 The Board of Trustees of the University of Illinois.
-
-import struct
-
-def uint16(f):
- """Read a 16-bit unsigned integer from f."""
- [c, c2] = f.read(2)
- return ord(c) + (ord(c2) << 8)
-
-def uint32(f):
- """Read a 32-bit unsigned integer from f."""
- [c, c2, c3, c4] = f.read(4)
- return ord(c) + (ord(c2) << 8) + (ord(c3) << 16) + (ord(c4) << 24)
-
-def float(f):
- """Read a floating-point number from f."""
- s = f.read(4)
- (n,) = struct.unpack("<f", s)
- return n
-
-def many(reader, count):
- """Create a reader function that reads a fixed-size sequence of
- values from f."""
- return lambda f: [reader(f) for n in range(count)]
-
-def many_uint16(count):
- """Create a reader function that reads a fixed-size sequence of
- 16-bit unsigned integers from f."""
- def read(f):
- s = f.read(2*count)
- ns = struct.unpack("<%dH" % count, s)
- return ns
- return read
-
-def many_float(count):
- """Create a reader function that reads a fixed-size sequence of
- floats from f."""
- def read(f):
- s = f.read(4*count)
- floats = struct.unpack("<%df" % count, s)
- return floats
- return read
-
-def eof(f):
- """Read the end of file 'f'. A ValueError is raised if anything
- other than EOF is read from the file."""
- if f.readline() == "": return None
- else: raise ValueError, "Expecting end of file"
-
-