|
Gromacs
2025.4
|
#include "gmxpre.h"#include "threaded_force_buffer.h"#include <cstdio>#include <algorithm>#include <array>#include <string>#include "gromacs/math/vec.h"#include "gromacs/mdtypes/forceoutput.h"#include "gromacs/pbcutil/ishift.h"#include "gromacs/utility/alignedallocator.h"#include "gromacs/utility/exceptions.h"#include "gromacs/utility/fatalerror.h"#include "gromacs/utility/gmxassert.h"
Include dependency graph for threaded_force_buffer.cpp:This file defines the implementation of ThreadForceBuffer and ThreadedForceBuffer.
Functions | |
| template<typename ForceBufferElementType > | |
| void | gmx::anonymous_namespace{threaded_force_buffer.cpp}::reduceThreadForceBuffers (ArrayRef< gmx::RVec > force, ArrayRef< std::unique_ptr< ThreadForceBuffer< ForceBufferElementType >>> threadForceBuffers, ArrayRef< const gmx_bitmask_t > masks, ArrayRef< const int > usedBlockIndices) |
Reduce thread-local force buffers into force (does not reduce shift forces) | |
| template<typename ForceBufferElementType > | |
| void | gmx::anonymous_namespace{threaded_force_buffer.cpp}::reduceVirialData (ForceWithShiftForces *forceWithShiftForces, ArrayRef< const std::unique_ptr< ThreadForceBuffer< ForceBufferElementType >>> threadForceBuffers) |
Reduces the shift forces in threadForceBuffers to forceWithShiftForces. | |
| template<typename ForceBufferElementType > | |
| void | gmx::anonymous_namespace{threaded_force_buffer.cpp}::reduceVirialData (ForceWithVirial *forceWithVirial, ArrayRef< const std::unique_ptr< ThreadForceBuffer< ForceBufferElementType >>> threadForceBuffers) |
Reduces the virial contributions in threadForceBuffers to forceWithVirial. | |
Variables | |
| static constexpr int | gmx::s_maxNumThreadsForReduction = 256 |
| The max thread number is arbitrary, we used a fixed number to avoid memory management. Using more than 16 threads is probably never useful performance wise. | |
1.8.5