Gromacs
2024.4
|
#include "gmxpre.h"
#include "threaded_force_buffer.h"
#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"
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) | |
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. | |