Skip to content
Snippets Groups Projects
BP1Writer.cpp 33.3 KiB
Newer Older

    for (unsigned int t = 0; t < m_Threads; ++t)
    {
        const size_t start = stride * t;
        size_t end;

        if (t == m_Threads - 1)
        {
            end = start + stride;
        }
        else
        {
            end = start + last;
        }

        threads.push_back(std::thread(lf_MergeRankRange,
                                      std::ref(nameRankIndices),
                                      std::ref(names), start, end));
    }

    for (auto &thread : threads)
    {
        thread.join();
//------------------------------------------------------------------------------
// Explicit instantiation of only public templates

#define declare_template_instantiation(T)                                      \
    template void BP1Writer::WriteVariableMetadata(                            \
        const Variable<T> &variable) noexcept;                                 \
    template void BP1Writer::WriteVariablePayload(                             \
        const Variable<T> &variable) noexcept;
ADIOS2_FOREACH_TYPE_1ARG(declare_template_instantiation)
#undef declare_template_instantiation

//------------------------------------------------------------------------------

} // end namespace format