SNABSuite  0.x
Spiking Neural Architecture Benchmark Suite
Functions | Variables
generate_bench_json Namespace Reference

Functions

def get_key_arrays (dictionary)
 
def get_available_simulators (dictionary)
 

Variables

list simulators = ["nest", "spinnaker", "nmpm1", "spikey"]
 
list web_simulators
 
list bench_index
 
list global_json = []
 
list list_files = []
 
 cppHeader = CppHeaderParser.CppHeader(headername)
 
 clazz = cppHeader.classes[classname]
 
string comment = ""
 
dictionary snab_dict = {}
 
 json_temp = json.load(temp)
 
 json_temp2
 
 length = 1
 
 avail_list = get_available_simulators(json_temp)
 
list tasks = []
 
bool set_snab = False
 
bool set_task = False
 
dictionary task_dict = {}
 
 file
 
 indent
 
 sort_keys
 

Function Documentation

def generate_bench_json.get_available_simulators (   dictionary)
Checks the dictionary for lists of every simulator to gather information 
about which simulator is available at which network size

dictionary -- config file to search for dictionaries

Definition at line 64 of file generate_bench_json.py.

64 def get_available_simulators(dictionary):
65  """
66  Checks the dictionary for lists of every simulator to gather information
67  about which simulator is available at which network size
68 
69  dictionary -- config file to search for dictionaries
70  """
71  avail_list = []
72  global_length = 0
73  for simulator in simulators:
74  try:
75  a, length = get_key_arrays(dictionary[simulator])
76  if length > global_length:
77  global_length = length
78  avail_list.append(length)
79  except:
80  avail_list.append(0)
81 
82  if global_length == 0: # Not a scalable benchmark
83  avail_list = [1 for i in avail_list]
84 
85  # Check for invalid flag
86  for i, simulator in enumerate(simulators):
87  if "invalid" in dictionary[simulator]:
88  if dictionary[simulator]["invalid"]:
89  avail_list[i] = 0
90 
91  return avail_list
92 
93 
def get_available_simulators(dictionary)
def get_key_arrays(dictionary)
def generate_bench_json.get_key_arrays (   dictionary)
Iterates through the dictionary, gathers all entries with lists

dictionary -- dict to iteratively search for lists

Definition at line 40 of file generate_bench_json.py.

40 def get_key_arrays(dictionary):
41  """
42  Iterates through the dictionary, gathers all entries with lists
43 
44  dictionary -- dict to iteratively search for lists
45  """
46 
47  temp_dict = dict()
48  length = 0
49  for i in dictionary:
50  if type(dictionary[i]) == list:
51  temp_dict[i] = dictionary[i]
52  if(length < len(dictionary[i])):
53  length = len(dictionary[i])
54  else:
55  if type(dictionary[i]) == dict:
56  a, length2 = get_key_arrays(dictionary[i])
57  if len(a) != 0:
58  temp_dict[i] = a
59  if(length < length2):
60  length = length2
61  return temp_dict, length
62 
63 
def get_key_arrays(dictionary)

Variable Documentation

generate_bench_json.avail_list = get_available_simulators(json_temp)

Definition at line 139 of file generate_bench_json.py.

list generate_bench_json.bench_index
Initial value:
1 = ["Single Core/Smallest Network", "Single Chip",
2  "Small System", "Large System"]

Definition at line 36 of file generate_bench_json.py.

generate_bench_json.clazz = cppHeader.classes[classname]

Definition at line 114 of file generate_bench_json.py.

generate_bench_json.comment = ""

Definition at line 118 of file generate_bench_json.py.

generate_bench_json.cppHeader = CppHeaderParser.CppHeader(headername)

Definition at line 104 of file generate_bench_json.py.

generate_bench_json.file

Definition at line 178 of file generate_bench_json.py.

generate_bench_json.global_json = []

Definition at line 94 of file generate_bench_json.py.

generate_bench_json.indent

Definition at line 178 of file generate_bench_json.py.

generate_bench_json.json_temp = json.load(temp)

Definition at line 137 of file generate_bench_json.py.

generate_bench_json.json_temp2

Definition at line 138 of file generate_bench_json.py.

int generate_bench_json.length = 1

Definition at line 138 of file generate_bench_json.py.

list generate_bench_json.list_files = []

Definition at line 95 of file generate_bench_json.py.

bool generate_bench_json.set_snab = False

Definition at line 144 of file generate_bench_json.py.

bool generate_bench_json.set_task = False

Definition at line 146 of file generate_bench_json.py.

list generate_bench_json.simulators = ["nest", "spinnaker", "nmpm1", "spikey"]

Definition at line 33 of file generate_bench_json.py.

dictionary generate_bench_json.snab_dict = {}

Definition at line 131 of file generate_bench_json.py.

generate_bench_json.sort_keys

Definition at line 178 of file generate_bench_json.py.

dictionary generate_bench_json.task_dict = {}

Definition at line 147 of file generate_bench_json.py.

list generate_bench_json.tasks = []

Definition at line 141 of file generate_bench_json.py.

list generate_bench_json.web_simulators
Initial value:
1 = ["NEST", "SpiNNaker", "BrainScaleS",
2  "Spikey"]

Definition at line 34 of file generate_bench_json.py.