GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
omp_threads.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
Include dependency graph for omp_threads.c:

Go to the source code of this file.

Functions

int G_set_omp_num_threads (struct Option *opt)
 Set the number of threads for OpenMP The intended usage is at the beginning of a C tool when parameters are processed, namely the G_OPT_M_NPROCS standard option. More...
 

Function Documentation

◆ G_set_omp_num_threads()

int G_set_omp_num_threads ( struct Option opt)

Set the number of threads for OpenMP The intended usage is at the beginning of a C tool when parameters are processed, namely the G_OPT_M_NPROCS standard option.

Parameters
optA nprocs Option struct to specify the number of threads
Returns
the number of threads set up for OpenMP parallel computing

Definition at line 19 of file omp_threads.c.

References _, Option::answer, G_fatal_error(), G_verbose_message(), G_warning(), Option::key, and NULL.