Skip to content

Commit

Permalink
Add BUILD files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ldhulipala authored and Laxman Dhulipala committed Nov 14, 2024
1 parent 451068b commit 4d4ee0f
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 32 deletions.
9 changes: 5 additions & 4 deletions include/parlay/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "alloc",
hdrs = ["alloc.h"],
Expand Down Expand Up @@ -91,6 +95,7 @@ cc_library(
name = "primitives",
hdrs = ["primitives.h"],
deps = [
":delayed",
":delayed_sequence",
":monoid",
":parallel",
Expand Down Expand Up @@ -184,7 +189,3 @@ cc_library(
"//parlay/internal:debug_uninitialized",
],
)

package(
default_visibility = ["//visibility:public"],
)
4 changes: 2 additions & 2 deletions include/parlay/delayed_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ class delayed_sequence {
// Subscript access with bounds checking
T at(size_t i) const {
if (i < first || i >= last) {
std::cerr << std::out_of_range("Delayed sequence access out of"
std::cerr << "Delayed sequence access out of"
"range at " + std::to_string(i) +
"for a sequence with bounds [" +
std::to_string(first) + ", " +
std::to_string(last) + ")") << std::endl;
std::to_string(last) + ")" << std::endl;
exit(-1);
}
return f(i);
Expand Down
8 changes: 4 additions & 4 deletions include/parlay/internal/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "atomic_wait",
hdrs = ["atomic_wait.h"],
Expand Down Expand Up @@ -281,7 +285,3 @@ cc_library(
":atomic_wait",
],
)

package(
default_visibility = ["//visibility:public"],
)
8 changes: 4 additions & 4 deletions include/parlay/internal/concurrency/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "acquire_retire",
hdrs = ["acquire_retire.h"],
Expand All @@ -17,7 +21,3 @@ cc_library(
":acquire_retire",
],
)

package(
default_visibility = ["//visibility:public"],
)
8 changes: 4 additions & 4 deletions include/parlay/internal/delayed/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "common",
hdrs = ["common.h"],
Expand Down Expand Up @@ -107,7 +111,3 @@ cc_library(
"//parlay/internal:sequence_ops",
],
)

package(
default_visibility = ["//visibility:public"],
)
8 changes: 4 additions & 4 deletions include/parlay/internal/posix/BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "file_map_impl_posix",
hdrs = ["file_map_impl_posix.h"],
)

package(
default_visibility = ["//visibility:public"],
)
8 changes: 4 additions & 4 deletions include/parlay/internal/scheduler_plugins/BUILD
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
licenses(["notice"])

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "sequential",
hdrs = ["sequential.h"],
)

package(
default_visibility = ["//visibility:public"],
)
8 changes: 4 additions & 4 deletions include/parlay/internal/uninitialized_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class uninitialized_sequence {

value_type& at(size_t i) {
if (i >= size()) {
std::cerr << std::out_of_range("uninitialized_sequence access out of bounds: length = " +
std::to_string(size()) + ", index = " + std::to_string(i)) << std::endl:
std::cerr << "uninitialized_sequence access out of bounds: length = " +
std::to_string(size()) + ", index = " + std::to_string(i) << std::endl;
exit(-1);
}
else {
Expand All @@ -178,8 +178,8 @@ class uninitialized_sequence {

const value_type& at(size_t i) const {
if (i >= size()) {
std::cerr << std::out_of_range("uninitialized_sequence access out of bounds: length = " +
std::to_string(size()) + ", index = " + std::to_string(i)) << std::endl;
std::cerr << "uninitialized_sequence access out of bounds: length = " +
std::to_string(size()) + ", index = " + std::to_string(i) << std::endl;
exit(-1);
}
else {
Expand Down
4 changes: 2 additions & 2 deletions include/parlay/sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ class sequence : protected sequence_internal::sequence_base<T, Allocator, Enable

const value_type& at(size_t i) const {
if (i >= size()) {
std::cerr << std::out_of_range("sequence access out of bounds: length = " + std::to_string(size()) +
", index = " + std::to_string(i)) << std::endl;
std::cerr << "sequence access out of bounds: length = " + std::to_string(size()) +
", index = " + std::to_string(i) << std::endl;
exit(-1);
} else {
return storage.at(i);
Expand Down

0 comments on commit 4d4ee0f

Please sign in to comment.