This contains my bachelors thesis and associated tex files, code snippets and maybe more. Topic: Data Movement in Heterogeneous Memories with Intel Data Streaming Accelerator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
517 B

# calculates throughput in gib/s from the meassured
# transfer duration (in nanoseconds) for a given element
# with the size of this given in bytes
def calc_throughput(size_bytes,time_ns):
time_seconds = time_ns * 1e-9
size_gib = size_bytes / (1024 ** 3)
throughput_gibs = size_gib / time_seconds
return throughput_gibs
# reverse array search: return index of value in array
def index_from_element(value,array):
for (idx,val) in enumerate(array):
if val == value: return idx
return 0