Skip to content

Commit

Permalink
Merge pull request #2 from 0xz/vec_runtime
Browse files Browse the repository at this point in the history
show runtime for optimizations
  • Loading branch information
PhilipDeegan authored Jan 21, 2024
2 parents 1bc922a + 10188e9 commit 4e9f687
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tut_adv/002/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.run.sh.*
2 changes: 2 additions & 0 deletions tut_adv/002/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ int main(int argc, char* argv[]){
for(std::size_t i = 0; i < N_DOUBLES; ++i)
d2[i] = d0[i] + d1[i];

std::cout << "runtime for " << argv[0] << " is: " << total_runtime(start_time) << " microseconds" << std::endl;

for(auto const& d : d2)
if(d != 21)
throw std::runtime_error("FAIL! " + std::to_string(d));
Expand Down

0 comments on commit 4e9f687

Please sign in to comment.