summaryrefslogtreecommitdiff
path: root/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py
diff options
context:
space:
mode:
authorDerick Huth <derickhuth@gmail.com>2016-01-18 15:43:52 -0700
committerDerick Huth <derickhuth@gmail.com>2016-01-18 15:43:52 -0700
commit983749787ee0dc1beb1107873e8a13ebdaeba576 (patch)
treee9bff337b4d5582b87ad2edc25baa4d3b0c163fa /test-chill/unit-tests/cpp_validate_prog/print_mm_out.py
parent0cff3f9a3c4ccd434900162ebef4bd814850f481 (diff)
downloadchill-983749787ee0dc1beb1107873e8a13ebdaeba576.tar.gz
chill-983749787ee0dc1beb1107873e8a13ebdaeba576.tar.bz2
chill-983749787ee0dc1beb1107873e8a13ebdaeba576.zip
restore test suite
Diffstat (limited to 'test-chill/unit-tests/cpp_validate_prog/print_mm_out.py')
-rwxr-xr-xtest-chill/unit-tests/cpp_validate_prog/print_mm_out.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py b/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py
new file mode 100755
index 0000000..fefbd2a
--- /dev/null
+++ b/test-chill/unit-tests/cpp_validate_prog/print_mm_out.py
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+import struct
+import numpy as np
+
+with open('mm.out.data','rb') as f:
+ data = f.read()
+
+mat = np.array([struct.unpack_from('f',data,n*4) for n in range(len(data)/4)]).reshape((3,2))
+print(mat)