Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ThreadsSetting Struct Reference

Public Types

using RETURN_TYPE = int64_t

Static Public Member Functions

static void SetGlobal (DatabaseInstance *db, DBConfig &config, const Value &parameter)
static void ResetGlobal (DatabaseInstance *db, DBConfig &config)
static Value GetSetting (const ClientContext &context)

Static Public Attributes

static constexpr const char * Name = "threads"
static constexpr const char * Description = "The number of total threads used by the system."
static constexpr const char * InputType = "BIGINT"

Member Function Documentation

◆ SetGlobal()

void duckdb::ThreadsSetting::SetGlobal ( DatabaseInstance * db,
DBConfig & config,
const Value & parameter )
static
302969 {
302970 auto new_val = input.GetValue<int64_t>();
302971 if (new_val < 1) {
302972 throw SyntaxException("Must have at least 1 thread!");
302973 }
302974 auto new_maximum_threads = NumericCast<idx_t>(new_val);
302975 if (db) {
302976 TaskScheduler::GetScheduler(*db).SetThreads(new_maximum_threads, Settings::Get<ExternalThreadsSetting>(config));
302977 }
302978 config.options.maximum_threads = new_maximum_threads;
302979}
::int64_t int64_t
idx_t maximum_threads
The maximum amount of CPU threads used by the database system. Default: all available.
Definition duckdb.hpp:40004
DBConfigOptions options
Database configuration options.
Definition duckdb.hpp:40090

◆ ResetGlobal()

void duckdb::ThreadsSetting::ResetGlobal ( DatabaseInstance * db,
DBConfig & config )
static
302981 {
302982 idx_t new_maximum_threads = config.GetSystemMaxThreads(*config.file_system);
302983 if (db) {
302984 TaskScheduler::GetScheduler(*db).SetThreads(new_maximum_threads, Settings::Get<ExternalThreadsSetting>(config));
302985 }
302986 config.options.maximum_threads = new_maximum_threads;
302987}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
unique_ptr< FileSystem > file_system
The FileSystem to use, can be overwritten to allow for injecting custom file systems for testing purp...
Definition duckdb.hpp:40082

◆ GetSetting()

Value duckdb::ThreadsSetting::GetSetting ( const ClientContext & context)
static
302989 {
302990 auto &config = DBConfig::GetConfig(context);
302991 return Value::BIGINT(NumericCast<int64_t>(config.options.maximum_threads));
302992}
static DUCKDB_API Value BIGINT(int64_t value)
Create a bigint Value from a specified value.
Definition duckdb.cpp:132146

The documentation for this struct was generated from the following file: