alpaqa
develop
Nonconvex constrained optimization
Loading...
Searching...
No Matches
src
alpaqa
include
alpaqa
util
dl.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <alpaqa/export.h>
4
#include <
alpaqa/util/dl-flags.hpp
>
5
#include <filesystem>
6
#include <memory>
7
#include <stdexcept>
8
9
namespace
alpaqa::util
{
10
11
/// Failed to load a DLL or SO file, or failed to access a function in it.
12
struct
ALPAQA_EXPORT
dynamic_load_error
: std::runtime_error {
13
using
std::runtime_error::runtime_error;
14
};
15
16
/// Load a DLL or SO file.
17
ALPAQA_EXPORT
std::shared_ptr<void>
18
load_lib
(
const
std::filesystem::path &
so_filename
,
DynamicLoadFlags
flags
);
19
/// Get a pointer to a function inside of a loaded DLL or SO file.
20
ALPAQA_EXPORT
void
*
load_func
(
void
*
lib_handle
,
const
std::string &name);
21
22
}
// namespace alpaqa::util
dl-flags.hpp
alpaqa::util
Definition
check-dim.hpp:8
alpaqa::util::load_func
void * load_func(void *lib_handle, const std::string &name)
Get a pointer to a function inside of a loaded DLL or SO file.
Definition
dl.cpp:66
alpaqa::util::load_lib
std::shared_ptr< void > load_lib(const std::filesystem::path &so_filename, DynamicLoadFlags flags)
Load a DLL or SO file.
Definition
dl.cpp:52
alpaqa::inf
constexpr const auto inf
Definition
config.hpp:112
alpaqa::DynamicLoadFlags
Flags to be passed to dlopen.
Definition
dl-flags.hpp:8
alpaqa::util::dynamic_load_error
Failed to load a DLL or SO file, or failed to access a function in it.
Definition
dl.hpp:12
Generated on Mon May 6 2024 for alpaqa by
1.9.8