treelite
Classes | Namespaces | Functions
threading_utils.h File Reference

Helper functions for threading with OpenMP. More...

#include <treelite/detail/omp_exception.h>
#include <treelite/logging.h>
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <limits>
#include <mutex>
#include <type_traits>
Include dependency graph for threading_utils.h:

Go to the source code of this file.

Classes

struct  treelite::detail::threading_utils::ThreadConfig
 Represent thread configuration, to be used with parallel loops. More...
 
struct  treelite::detail::threading_utils::ParallelSchedule
 

Namespaces

 treelite
 
 treelite::detail
 
 treelite::detail::threading_utils
 

Functions

int omp_get_max_threads ()
 
int omp_get_num_procs ()
 
int omp_get_thread_num ()
 
int omp_get_thread_limit ()
 
int treelite::detail::threading_utils::OmpGetThreadLimit ()
 
int treelite::detail::threading_utils::MaxNumThread ()
 
template<typename IndexType , typename FuncType >
void treelite::detail::threading_utils::ParallelFor (IndexType begin, IndexType end, ThreadConfig const &thread_config, ParallelSchedule sched, FuncType func)
 

Detailed Description

Helper functions for threading with OpenMP.

Copyright (c) 2021-2023 by Contributors

Author
Hyunsu Cho

Function Documentation

◆ omp_get_max_threads()

int omp_get_max_threads ( )
inline

◆ omp_get_num_procs()

int omp_get_num_procs ( )
inline

◆ omp_get_thread_limit()

int omp_get_thread_limit ( )
inline

◆ omp_get_thread_num()

int omp_get_thread_num ( )
inline