-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-configurations.py
57 lines (52 loc) · 960 Bytes
/
test-configurations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/python
import subprocess
import os
import sys
options = [
"CHANNEL_USE_SCRATCH",
"CHANNEL_USE_SSE",
"CHANNEL_PULL_INTO_CACHE_WRITE",
"CHANNEL_PULL_INTO_CACHE_CMPXCHG",
"CHANNEL_PREFETCH",
"CHANNEL_MFENCE_SEND",
"CHANNEL_NO_ALLOCATOR"
]
confs = [
"ooooooo",
"ooxoooo",
"oooxooo",
"xoooooo",
"xoxoooo",
"xooxooo",
"xxooooo",
"xxxoooo",
"xxoxooo",
"xxxoxoo",
"xxoxxoo",
"ooooxoo",
"xxxooxo",
"xxoxoxo",
"oooooxo",
"xxxoxxo",
"xxoxxoo",
"oooooox",
"xooooox",
"xxoooox",
"xxxooox",
"xxoxoox"
]
for i in confs:
for j in range(len(i)):
if (i[j] == 'x'):
sys.stdout.write('x\t')
else:
sys.stdout.write('\t')
sys.stdout.write('\t')
sys.stdout.flush()
CFLAGS = ""
for j in range(len(i)):
if (i[j] == 'x'):
CFLAGS += "-D" + options[j] + " "
env = os.environ
env["CFLAGS"] = CFLAGS
subprocess.Popen(args=[],executable="./test-channels.sh", shell=True, env=env).wait()