summaryrefslogtreecommitdiff
path: root/impl/performance/generate-dense.py
diff options
context:
space:
mode:
Diffstat (limited to 'impl/performance/generate-dense.py')
-rw-r--r--impl/performance/generate-dense.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/impl/performance/generate-dense.py b/impl/performance/generate-dense.py
new file mode 100644
index 0000000..0efeed4
--- /dev/null
+++ b/impl/performance/generate-dense.py
@@ -0,0 +1,13 @@
+import sys
+
+size = int(sys.argv[1])
+
+for i in xrange(size):
+ expr = "max(0"
+ for j in xrange(size):
+ if j == i:
+ continue
+ expr += ','
+ expr += "x"+str(j)+" + "+str(j)+''
+ expr += ")"
+ print 'x'+str(i)+' = '+expr