Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed Sep 16, 2024
1 parent bb9ae05 commit e723019
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cpp/tests/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace kvikio::test {
* Example: \
* ```c++ \
* \
* // Throws rmm::cuda_error if `cudaMalloc` fails \
* // Throws std::runtime_error if `cudaMalloc` fails \
* KVIKIO_CHECK_CUDA(cudaMalloc(&p, 100)); \
* \
* // Throws std::runtime_error if `cudaMalloc` fails \
Expand All @@ -67,6 +67,9 @@ namespace kvikio::test {
} while (0)
#define KVIKIO_CHECK_CUDA_1(_call) KVIKIO_CHECK_CUDA_2(_call, std::runtime_error)

/**
* @brief Help class to create a temporary directory.
*/
class TempDir {
public:
TempDir(const bool cleanup = true) : _cleanup{cleanup}
Expand Down Expand Up @@ -153,6 +156,9 @@ class DevBuffer {
}
};

/**
* @brief Check that two buffers are equal
*/
inline void expect_equal(const DevBuffer& a, const DevBuffer& b)
{
EXPECT_EQ(a.nbytes, b.nbytes);
Expand Down

0 comments on commit e723019

Please sign in to comment.