config.hpp 567 B

1234567891011121314151617181920212223242526
  1. #ifndef __CONFIG_HPP__
  2. #define __CONFIG_HPP__
  3. #include <vector>
  4. #include "enclave_api.h"
  5. // startweight is the running total of all the weight entries of nodes
  6. // lower numbered than this one. E.g., if the weights of nodes 0, 1,
  7. // ..., etc. are [1, 2, 4, 1, 2, ...], the startweight values will be
  8. // [0, 1, 3, 7, 8, ...].
  9. struct NodeWeight {
  10. uint16_t startweight;
  11. uint8_t weight;
  12. };
  13. struct Config {
  14. nodenum_t num_nodes;
  15. nodenum_t my_node_num;
  16. uint16_t msgsize;
  17. std::vector<NodeWeight> weights;
  18. };
  19. extern Config g_teems_config;
  20. #endif