---
name: "RsbLib"
section: "3"
platform: "linux"
package: "librsb-dev"
version: "1.3.0.2+dfsg-7"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/RsbLib"
---

# RsbLib(3)

Class initializing/finalizing librsb state.

## NAME

RsbLib - Class initializing/finalizing `librsb` state.

## SYNOPSIS

`#include <rsb.hpp>`

### Public Member Functions

**RSBP\_RVT** **Err\_t** **set\_opt\_str** (**const** **rsb\_char\_t** \***opnp**, **const** **rsb\_char\_t** \***opvp**)\
 **RSBP\_RVT** **Err\_t** **set\_opt** (**enum** **rsb\_opt\_t** **iof**, **const** **void** \***iop**)\
 **RSBP\_RVT** **Err\_t** **get\_opt** (**enum** **rsb\_opt\_t** **iof**, **void** \***iop**) **const**\
 **rsb\_string\_t** **get\_opt** (**enum** **rsb\_opt\_t** **iof**) **const**\
 **RSBP\_RVT** **Err\_t** **set\_num\_threads** (**rsb\_int\_t** **nt**)\
 **rsb\_int\_t** **get\_num\_threads** (**void**) **const**\
 **RSBP\_RVT** **Err\_t** **reinit** (**struct** **rsb\_initopts** \***iop**)\
 **RSBP\_DEPRECATED** **RsbLib** (**bool** **verbose**)\
 **RsbLib** (**void**)\
 **size\_t** **meminfo** (**void**)\
 **~RsbLib** (**void**)\

## Detailed Description

Class initializing/finalizing `librsb` state.

Before creating any **RsbMatrix objects, make sure you have initialized** `librsb` **by creating one single RsbLib object. Similarly, RsbMatrix object shall leave scope after the RsbLib object has been deallocated.**

**Several** `librsb` **options can be queried or changed via e.g. get\_opt(), set\_opt(), get\_num\_threads(), set\_num\_threads().**

## Constructor & Destructor Documentation

### RSBP\_DEPRECATED RsbLib::RsbLib (bool verbose)` [inline]`

**Initialize librsb.**

**See also**

**rsb\_lib\_reinit().**

### RsbLib::RsbLib (void)` [inline]`

**Initialize librsb.**

**See also**

**rsb\_lib\_reinit().**

### RsbLib::~RsbLib (void)` [inline]`

**Destructor: finalize** `librsb`**.**

**This is being invoked at the end of the scope of a RsbLib object: typically at application's end.**

## Member Function Documentation

### rsb\_int\_t RsbLib::get\_num\_threads (void) const` [inline]`

**Indirect interface to rsb\_lib\_get\_opt.**

### rsb\_string\_t RsbLib::get\_opt (enum rsb\_opt\_t iof) const` [inline]`

**Interface to rsb\_lib\_get\_opt.**

**Warning**

**Only RSB\_IO\_WANT\_MEMORY\_HIERARCHY\_INFO\_STRING is supported for now.**

### RSBP\_RVT Err\_t RsbLib::get\_opt (enum rsb\_opt\_t iof, void \* iop) const` [inline]`

**Interface to rsb\_lib\_get\_opt.**

### size\_t RsbLib::meminfo (void)` [inline]`

**Provide memory debug info from librsb and return usage amount. Only effective if librsb configured accordingly.**

**On error, throw an exception.**

### RSBP\_RVT Err\_t RsbLib::reinit (struct rsb\_initopts \* iop)` [inline]`

**Interface to rsb\_lib\_reinit().**

### RSBP\_RVT Err\_t RsbLib::set\_num\_threads (rsb\_int\_t nt)` [inline]`

**Indirect interface to rsb\_lib\_set\_opt.**

### RSBP\_RVT Err\_t RsbLib::set\_opt (enum rsb\_opt\_t iof, const void \* iop)` [inline]`

**Interface to rsb\_lib\_set\_opt.**

### RSBP\_RVT Err\_t RsbLib::set\_opt\_str (const rsb\_char\_t \* opnp, const rsb\_char\_t \* opvp)` [inline]`

**Interface to rsb\_lib\_set\_opt\_str.**

## Author

**Generated automatically by Doxygen for librsb from the source code.**
