GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-90a26d7490
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/glocale.h>
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... | |
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.
If nprocs is set to 0, default OpenMP internal logic is used. If nprocs is a positive number, specified number of threads is used. If nprocs is a negative number, then maximum threads - number is used instead (e.g. to keep number of cores free for other use.
opt | A nprocs Option struct to specify the number of threads |
Definition at line 25 of file omp_threads.c.
References _, Option::answer, G_fatal_error(), G_verbose_message(), G_warning(), Option::key, n_, and NULL.