Skip to content

Commit

Permalink
kokkos#338: fix various warnings in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nmm0 committed Jun 3, 2024
1 parent 5a51d65 commit b859258
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions comp_bench/cbench_submdspan.cpp.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ int test(int* data) {
<% end %>
;
#endif
return 0;
}

int main() {}
8 changes: 4 additions & 4 deletions examples/dot_product/dot_product.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ T dot_product(
) //requires ExtsA::rank() == ExtsB::rank() && ExtsA::rank() == 2
{
T result = 0;
for(int i = 0; i < a.extent(0); ++i) {
for(int j = 0; j < a.extent(1); ++j) {
for (size_t i = 0; i < a.extent(0); ++i) {
for (size_t j = 0; j < a.extent(1); ++j) {
#if MDSPAN_USE_BRACKET_OPERATOR
result += a[i, j] * b[i, j];
#else
Expand All @@ -79,8 +79,8 @@ void fill_in_order(
) // requires ExtsA::rank() == 2
{
T count = 0;
for(int i = 0; i < a.extent(0); ++i) {
for(int j = 0; j < a.extent(1); ++j) {
for(size_t i = 0; i < a.extent(0); ++i) {
for (size_t j = 0; j < a.extent(1); ++j) {
#if MDSPAN_USE_BRACKET_OPERATOR
a[i, j] = count++;
#else
Expand Down

0 comments on commit b859258

Please sign in to comment.