1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #pragma once
- #include <stdint.h>
- #include <stddef.h>
- #ifdef __cplusplus
- // Only expose templated version with C++
- template<typename T>
- void debug_ipc_assert_equal(T value);
- extern "C" {
- #endif
- #define DEBUG_IPC_CHECKPOINT() debug_ipc_assert_source_location(__FILE__, __LINE__)
- void debug_ipc_init();
- void debug_ipc_assert_equal_double(double value);
- void debug_ipc_assert_equal_uint(uint32_t value);
- void debug_ipc_assert_equal_int(int32_t value);
- void debug_ipc_assert_equal_int64(int64_t value);
- void debug_ipc_assert_equal_array(void *value, size_t size);
- /**
- * Check that root and client are executing the same source line.
- * Should typically be called like this:
- * debug_ipc_assert_source_location(__FILE__, __LINE__)
- */
- void debug_ipc_assert_source_location(const char *source_file, const long int line_number);
- /**
- * Debug IPC also allows comparing across multiple MPI ranks with differing cluster sizes.
- * This method can be used to define the order of ranks.
- */
- void debug_ipc_mpi_set_data_distribution(int start_index);
- /**
- * Compare two MPI distributed arrays between processes.
- * array_length denotes the local number of double elements in the array, not the number of bytes.
- *
- * The data distribution must be given through `debug_ipc_mpi_set_data_distribution` before calling
- * this method.
- */
- void debug_ipc_assert_equal_mpi_double_array(double *array, size_t array_length);
- #ifdef __cplusplus
- }
- #endif
|