Post

DeviceVector & Fixes for moving the CAAR branch to main

Fixes

This week our long term development branch, CAAR, got merged into main. Before that could happen I needed to submit a couple of fixes for outstanding issues.

GoogleTest Version

Our automated builds and scripts for building GoogleTest from scratch all build GoogleTest main. However, after v1.12.1 GoogleTest will no longer support C++11 which Cholla uses. I updated the build scripts to instead pull a specific release of GoogleTest (PR #162). Since future version of Cholla will be using C++14 or newer I submitted a second PR to switch back to GoogleTest main when the C++14 version of Cholla is ready (PR #171).

GPU Resident Reductions

The GPU resident reduction utilities I wrote awhile ago had a race condition that occasionally caused issues. I fixed it and added a function for easily setting GPU memory. I also cleaned up some misleading documentation and implementation. PR #163

DeviceVector

Device side pointers can be annoying and difficult to work with, plus they don’t conform well with the C++ principle of Scope-Bound Resource Management or RAII. I implemented a simple class that has an interface similar to std::vector for handling resource allocation and deallocation, copying to and from the device, and allowing easy host side access to values in the array. PR #170

Reading

This post is licensed under CC BY 4.0 by the author.