-
Notifications
You must be signed in to change notification settings - Fork 1
master.c range array structure
Sam Burdick edited this page Mar 2, 2018
·
2 revisions
The range array passed to coordinator structure looks like this
unsigned int *range_array = {
2, m(1), 1, m(2), 2,
2, m(3), 3, m(4), 4,
2, m(5), 5, m(6), 6
}
For the example of R:[0,9]&[10,15]&[20,27]
(unsorted)
unsigned int *range_array = {
3, m(0), 0, m(1), 1, m(2), 2,
1, m(10), 10
}
where m(i)
is the machine address of vector with id i
.
Format of array: each subarray contains the following information:
Number of vectors in this range, n
.
The subsequent 2n
elements alternate between machine IDs and the vectors
we want from that machine.
Currently machine ID is an index in the array of machine address strings, which can be a hardcoded array or perhaps distributed hash table.