/*
  Helper functions for dealing with locations
 */

@pure
(location loc) location_from_rank(int rank) "turbine" "0.1.1" [
  // Currently location is represented as an integer rank,
  // so this function just down-casts the type.
  // This may change in future.
  "set <<loc>> <<rank>>"
];

(location loc) random_worker() "turbine" "0.1.1" [
   "set <<loc>> [ ::turbine::random_worker ]"
];

(location loc) random_engine() "turbine" "0.1.1" [
   "set <<loc>> [ ::turbine::random_engine ]"
];

(location rank) hostmap_one(string name) "turbine" "0.0.2" [
    "set <<rank>> [ draw [ adlb::hostmap <<name>> ] ]"
];

(location rank) hostmap_one_worker(string name) "turbine" "0.0.2" [
    "set <<rank>> [ ::turbine::random_rank WORKER [ adlb::hostmap <<name>> ] ]"
];

(string results[]) hostmap_list() "turbine" "0.5.0" "hostmap_list";

/*
  Helper functions for dealing with locations
 */

@pure
(location loc) location_from_rank(int rank) "turbine" "0.1.1" [
  // Currently location is represented as an integer rank,
  // so this function just down-casts the type.
  // This may change in future.
  "set <<loc>> <<rank>>"
];

(location loc) random_worker() "turbine" "0.1.1" [
   "set <<loc>> [ ::turbine::random_worker ]"
];

(location loc) random_engine() "turbine" "0.1.1" [
   "set <<loc>> [ ::turbine::random_engine ]"
];

(location rank) hostmap_one(string name) "turbine" "0.0.2" [
    "set <<rank>> [ draw [ adlb::hostmap_lookup <<name>> ] ]"
];

(location rank) hostmap_one_worker(string name) "turbine" "0.0.2" [
    "set <<rank>> [ ::turbine::random_rank WORKER [ adlb::hostmap_lookup <<name>> ] ]"
];

(string results[]) hostmap_list() "turbine" "0.5.0" "hostmap_list";

Update header to reflect new hostmap function
Update header to reflect new hostmap function

git-svn-id: 4403cc1077de9de61ebbb06aa07b0a825c555f62@8637 dc4e9af1-7f46-4ead-bba6-71afc04862de
