1 .. title:: clang-tidy - mpi-buffer-deref
6 This check verifies if a buffer passed to an MPI (Message Passing Interface)
7 function is sufficiently dereferenced. Buffers should be passed as a single
8 pointer or array. As MPI function signatures specify ``void *`` for their buffer
9 types, insufficiently dereferenced buffers can be passed, like for example as
10 double pointers or multidimensional arrays, without a compiler warning emitted.
16 // A double pointer is passed to the MPI function.
18 MPI_Send(&buf, 1, MPI_CHAR, 0, 0, MPI_COMM_WORLD);
20 // A multidimensional array is passed to the MPI function.
22 MPI_Send(buf, 1, MPI_SHORT, 0, 0, MPI_COMM_WORLD);
24 // A pointer to an array is passed to the MPI function.
26 MPI_Send(buf, 1, MPI_SHORT, 0, 0, MPI_COMM_WORLD);