|
@@ -352,7 +352,7 @@ bool ecall_ingest_raw(uint8_t *msgs, uint32_t num_msgs)
|
|
|
}
|
|
|
|
|
|
// Send the round 1 messages. Note that N here is not private.
|
|
|
-static void send_round1_msgs(const uint8_t *msgs, const uint64_t *indices,
|
|
|
+static void send_round1_msgs(const uint8_t *msgs, const UidKey *indices,
|
|
|
uint32_t N)
|
|
|
{
|
|
|
uint16_t msg_size = g_teems_config.msg_size;
|
|
@@ -406,15 +406,15 @@ static void send_round1_msgs(const uint8_t *msgs, const uint64_t *indices,
|
|
|
uint8_t *buf = round1.buf + start * msg_size;
|
|
|
|
|
|
for (uint32_t i=0; i<full_rows; ++i) {
|
|
|
- const uint64_t *idxp = indices + i*tot_weight + start_weight;
|
|
|
+ const UidKey *idxp = indices + i*tot_weight + start_weight;
|
|
|
for (uint32_t j=0; j<weight; ++j) {
|
|
|
- memmove(buf, msgs + idxp[j]*msg_size, msg_size);
|
|
|
+ memmove(buf, msgs + idxp[j].index()*msg_size, msg_size);
|
|
|
buf += msg_size;
|
|
|
}
|
|
|
}
|
|
|
- const uint64_t *idxp = indices + full_rows*tot_weight + start_weight;
|
|
|
+ const UidKey *idxp = indices + full_rows*tot_weight + start_weight;
|
|
|
for (uint32_t j=0; j<num_msgs_last_row; ++j) {
|
|
|
- memmove(buf, msgs + idxp[j]*msg_size, msg_size);
|
|
|
+ memmove(buf, msgs + idxp[j].index()*msg_size, msg_size);
|
|
|
buf += msg_size;
|
|
|
}
|
|
|
|
|
@@ -427,14 +427,14 @@ static void send_round1_msgs(const uint8_t *msgs, const uint64_t *indices,
|
|
|
NodeCommState &nodecom = g_commstates[routing_node];
|
|
|
nodecom.message_start(num_msgs * msg_size);
|
|
|
for (uint32_t i=0; i<full_rows; ++i) {
|
|
|
- const uint64_t *idxp = indices + i*tot_weight + start_weight;
|
|
|
+ const UidKey *idxp = indices + i*tot_weight + start_weight;
|
|
|
for (uint32_t j=0; j<weight; ++j) {
|
|
|
- nodecom.message_data(msgs + idxp[j]*msg_size, msg_size);
|
|
|
+ nodecom.message_data(msgs + idxp[j].index()*msg_size, msg_size);
|
|
|
}
|
|
|
}
|
|
|
- const uint64_t *idxp = indices + full_rows*tot_weight + start_weight;
|
|
|
+ const UidKey *idxp = indices + full_rows*tot_weight + start_weight;
|
|
|
for (uint32_t j=0; j<num_msgs_last_row; ++j) {
|
|
|
- nodecom.message_data(msgs + idxp[j]*msg_size, msg_size);
|
|
|
+ nodecom.message_data(msgs + idxp[j].index()*msg_size, msg_size);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -524,7 +524,7 @@ void ecall_routing_proceed(void *cbpointer)
|
|
|
unsigned long start_round1 = printf_with_rtclock("begin round1 processing (%u)\n", inserted);
|
|
|
unsigned long start_sort = printf_with_rtclock("begin oblivious sort (%u,%u)\n", inserted, route_state.tot_msg_per_ing);
|
|
|
#endif
|
|
|
- sort_mtobliv(g_teems_config.nthreads, ingbuf.buf,
|
|
|
+ sort_mtobliv<UidKey>(g_teems_config.nthreads, ingbuf.buf,
|
|
|
g_teems_config.msg_size, ingbuf.inserted,
|
|
|
route_state.tot_msg_per_ing, send_round1_msgs);
|
|
|
#ifdef PROFILE_ROUTING
|