Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

set_lidr_threads

Set or get number of threads that lidR should use


Description

Set and get number of threads to be used in lidR functions that are parallelized with OpenMP. 0 means to utilize all CPU available. get_lidr_threads() returns the number of threads that will be used. This affects lidR package but also the data.table package by internally calling setDTthreads because several functions of lidR rely on data.table but it does not change R itself or other packages using OpenMP.

Usage

set_lidr_threads(threads)

get_lidr_threads()

Arguments

threads

Positve scala. Default 0 means use all CPU available. Values > 1 mean using n cores, values in ]0, 1[ mean using a fraction of the cores e.g. 0.5 = half.

See Also


lidR

Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

v3.1.2
GPL-3
Authors
Jean-Romain Roussel [aut, cre, cph], David Auty [aut, ctb] (Reviews the documentation), Florian De Boissieu [ctb] (Fixed bugs and improved catalog features), Andrew Sánchez Meador [ctb] (Implemented wing2015() for segment_snags()), Bourdon Jean-François [ctb] (Contributed to Roussel2020() for track_sensor()), Gatziolis Demetrios [ctb] (Implemented Gatziolis2019() for track_sensor())
Initial release
2021-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.