batmat 0.0.13
Batched linear algebra routines
Loading...
Searching...
No Matches
loop.hpp File Reference
#include <batmat/config.hpp>
#include <batmat/openmp.h>

Go to the source code of this file.

Namespaces

namespace  batmat

Enumerations

enum class  batmat::LoopDir { batmat::LoopDir::Forward , batmat::LoopDir::Backward }

Functions

void batmat::foreach_chunked (index_t i_begin, index_t i_end, auto chunk_size, auto func_chunk, auto func_rem, LoopDir dir=LoopDir::Forward)
 Iterate over the range [i_begin, i_end) in chunks of size chunk_size, calling func_chunk for each full chunk and func_rem for the remaining elements (if any).
void batmat::foreach_chunked_merged (index_t i_begin, index_t i_end, auto chunk_size, auto func_chunk, LoopDir dir=LoopDir::Forward)
 Iterate over the range [i_begin, i_end) in chunks of size chunk_size, calling func_chunk for each chunk (including the last chunk, which may be smaller than chunk_size).
void batmat::foreach_chunked_merged_parallel (index_t i_begin, index_t i_end, auto chunk_size, auto func_chunk, LoopDir dir=LoopDir::Forward)
void batmat::foreach_thread (auto &&func)
void batmat::foreach_thread (index_t num_threads, auto &&func)