// compute message size
// arbitrary: 8 for type, and 8 for each double
switch (type) {
- case INFO:
+ case CTRL:
size = opt::bookkeeping ? 24 : 16; // type + amount + (credit)?
break;
- case LOAD:
+ case DATA:
size = 16 + opt::comm_cost(amount); // type + amount + data size
break;
default:
std::string message::to_string()
{
- static const char* str[DATA_CLOSE + 1] = { "INFO", "LOAD",
+ static const char* str[DATA_CLOSE + 1] = { "CTRL", "DATA",
"CTRL_CLOSE", "DATA_CLOSE" };
std::ostringstream oss;
oss << str[type] << ": " << amount;