-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,34 @@ | ||
#include <csignal> | ||
#include <iostream> | ||
#include <string> | ||
|
||
#include <celerity.h> | ||
#include <region_map.h> | ||
|
||
int main() { | ||
celerity::detail::task_id tid = 10; | ||
celerity::detail::buffer_id bid = 11; | ||
celerity::detail::node_id nid = 12; | ||
celerity::detail::command_id cid = 13; | ||
celerity::detail::collective_group_id cgid = 14; | ||
celerity::detail::reduction_id rid = 15; | ||
celerity::detail::host_object_id hoid = 16; | ||
celerity::detail::hydration_id hyid = 17; | ||
celerity::detail::transfer_id trid = 18; | ||
[[maybe_unused]] celerity::detail::task_id tid = 10; | ||
[[maybe_unused]] celerity::detail::buffer_id bid = 11; | ||
[[maybe_unused]] celerity::detail::node_id nid = 12; | ||
[[maybe_unused]] celerity::detail::command_id cid = 13; | ||
[[maybe_unused]] celerity::detail::collective_group_id cgid = 14; | ||
[[maybe_unused]] celerity::detail::reduction_id rid = 15; | ||
[[maybe_unused]] celerity::detail::host_object_id hoid = 16; | ||
[[maybe_unused]] celerity::detail::hydration_id hyid = 17; | ||
[[maybe_unused]] celerity::detail::transfer_id trid = 18; | ||
|
||
celerity::id<3> id(1, 2, 3); | ||
celerity::range<3> range(1, 2, 3); | ||
celerity::subrange<3> subrange(celerity::id(1, 2, 3), celerity::range(4, 5, 6)); | ||
celerity::chunk<3> chunk(celerity::id(1, 2, 3), celerity::range(4, 5, 6), celerity::range(7, 8, 9)); | ||
celerity::nd_range<3> nd_range(celerity::range(2, 4, 6), celerity::range(1, 2, 3), celerity::id(7, 8, 9)); | ||
celerity::detail::box<3> box(celerity::id(1, 2, 3), celerity::id(4, 5, 6)); | ||
celerity::detail::region<3> region({ | ||
[[maybe_unused]] celerity::id<3> id(1, 2, 3); | ||
[[maybe_unused]] celerity::range<3> range(1, 2, 3); | ||
[[maybe_unused]] celerity::subrange<3> subrange(celerity::id(1, 2, 3), celerity::range(4, 5, 6)); | ||
[[maybe_unused]] celerity::chunk<3> chunk(celerity::id(1, 2, 3), celerity::range(4, 5, 6), celerity::range(7, 8, 9)); | ||
[[maybe_unused]] celerity::nd_range<3> nd_range(celerity::range(2, 4, 6), celerity::range(1, 2, 3), celerity::id(7, 8, 9)); | ||
[[maybe_unused]] celerity::detail::box<3> box(celerity::id(1, 2, 3), celerity::id(4, 5, 6)); | ||
[[maybe_unused]] celerity::detail::region<3> region({ | ||
celerity::detail::box(celerity::id(1, 2, 3), celerity::id(4, 5, 6)), | ||
celerity::detail::box(celerity::id(11, 2, 3), celerity::id(14, 5, 6)), | ||
celerity::detail::box(celerity::id(21, 2, 3), celerity::id(24, 5, 6)), | ||
}); | ||
|
||
celerity::detail::region_map<int> region_map(celerity::range<3>(10, 10, 10), 3); | ||
[[maybe_unused]] celerity::detail::region_map<int> region_map(celerity::range<3>(10, 10, 10), 3); | ||
region_map.update_region(celerity::detail::box<3>({1, 1, 1}, {5, 5, 5}), 42); | ||
region_map.update_region(celerity::detail::box<3>({1, 1, 1}, {3, 3, 3}), 69); | ||
region_map.update_region(celerity::detail::box<3>({1, 1, 1}, {2, 2, 2}), 1337); | ||
|
||
__builtin_trap(); // tell GDB to break here so we can examine locals | ||
// tell GDB to break here so we can examine locals | ||
__builtin_trap(); | ||
} |