xalgospp
xalgospp
Section titled “xalgospp”Classes
Section titled “Classes”| Name | Description |
|---|---|
Algorithm |
Base Algorithm class. |
DetectorRegistry |
|
invalid_type_string |
Error indicating an unknown, unrecognized, or invalid type representation. |
DetectorDescriptor |
|
DetectorEntry |
|
ParameterDesc |
A compound descriptor for a single parameter. |
Parameters |
A base Parameters struct with generic setting and getting routines. |
type_list |
Simple type-list for compile-time listing of inputs/outputs. |
Enumerations
Section titled “Enumerations”| Name | Description |
|---|---|
AlgTypeConstraint |
Indicates the degree of input/output type restrictions for an Algorithm. |
AlgTypeConstraint
Section titled “AlgTypeConstraint”enum AlgTypeConstraintIndicates the degree of input/output type restrictions for an Algorithm.
Algorithms provide a type_list of supported inputs and outputs. These are used both to provide easy access to supported types, but also to constrain the inputs on the Algorithm’s processing routine. By default, the constraint is to allow the cartesian product of the Input and Output type_lists. An Algorithm subclass may opt instead to enforce stronger constraints, e.g., it may require strict ordering such that the first item in the Input list must be paired with the first item in the output list. Refer to each Algorithm to verify if extra constraints are in effect.
| Value | Description |
|---|---|
Product |
Any input type can pair with any output type. |
StrictOrdering |
Inputs must be paired with outputs in the order the appear. |
Typedefs
Section titled “Typedefs”| Return | Name | Description |
|---|---|---|
type_list< ncarray::NCViewFor< ncarray::HostTag >, ncarray::SOViewFor< ncarray::HostTag > > |
HostArrayViewTypes |
HostArrayViewTypes
Section titled “HostArrayViewTypes”using HostArrayViewTypes = type_list< ncarray::NCViewFor< ncarray::HostTag >, ncarray::SOViewFor< ncarray::HostTag > >Functions
Section titled “Functions”| Return | Name | Description |
|---|---|---|
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > |
ncarray_to_eigen |
|
XALG_HD constexpr ParameterDesc< Class, T > |
make_param_desc constexpr |
|
void |
print_parameters |
Recurse a Parameters object and print the name/value pairs. |
ncarray::DType |
string_to_dtype |
Convert a string representation of a type to an ncarray::DType. |
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > |
to_eigen_array inline requires (HostArrayViewTypes::template accepts<InputArg>) |
Convert an NCArrayView or SOArrayView to an Eigen Map. |
std::uint32_t |
timestamp_from_bson_object_id |
Return the timestamp from a MongoDB object ID. |
str |
get_pkg_config |
|
None |
xalg_pkg_config |
|
str |
get_include |
|
str |
get_lib_dir |
ncarray_to_eigen
Section titled “ncarray_to_eigen”template<typename T> Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > ncarray_to_eigen(const ncarray::NCArrayView & view)make_param_desc
Section titled “make_param_desc”constexpr
template<typename Class, typename T> constexpr XALG_HD constexpr ParameterDesc< Class, T > make_param_desc(const char * name, T Class::* ptr)print_parameters
Section titled “print_parameters”template<typename Params> void print_parameters(const Params & params)Recurse a Parameters object and print the name/value pairs.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
params |
const Params & |
The Parameters to print. |
string_to_dtype
Section titled “string_to_dtype”ncarray::DType string_to_dtype(const std::string & dtype_str)Convert a string representation of a type to an ncarray::DType.
This utility handles converting various string/character forms/representations for data types that may be encountered to the ncarray::DType. The latter is used as the standard type identifier in this library.
This is a host only function.
Returns
Section titled “Returns”The ncarray::DType for the string.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
dtype_str |
const std::string & |
The string representation of the datatype. |
Exceptions
Section titled “Exceptions”| Exception | Description |
|---|---|
invalid_type_string |
Thrown if the dtype_str is an unrecognized type representation. |
to_eigen_array
Section titled “to_eigen_array”inline requires (HostArrayViewTypes::template accepts<InputArg>)
template<typename T, typename InputArg> inline Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > to_eigen_array(const InputArg & view) requires (HostArrayViewTypes::template accepts<InputArg>)Convert an NCArrayView or SOArrayView to an Eigen Map.
Returns
Section titled “Returns”An Eigen::Map over the NCArrayView’s data.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
view |
const InputArg & |
The NCArrayView to convert. |
timestamp_from_bson_object_id
Section titled “timestamp_from_bson_object_id”std::uint32_t timestamp_from_bson_object_id(std::string & oid)Return the timestamp from a MongoDB object ID.
The timestamps from MongoDB are stored as a big-endian Unix timestamp. The first 4 bytes of the ID contain it.
get_pkg_config
Section titled “get_pkg_config”str get_pkg_config()xalg_pkg_config
Section titled “xalg_pkg_config”None xalg_pkg_config()get_include
Section titled “get_include”str get_include()get_lib_dir
Section titled “get_lib_dir”str get_lib_dir()Variables
Section titled “Variables”| Return | Name | Description |
|---|---|---|
constexpr std::uint16_t |
MaxNameSize static constexpr |
|
constexpr std::uint8_t |
MaxNDim static constexpr |
|
constexpr std::uint16_t |
MaxDetectors static constexpr |
|
str |
lib_dir |
|
bool |
has_driver |
|
str |
stub_path |
|
mode |
MaxNameSize
Section titled “MaxNameSize”static constexpr
constexpr std::uint16_t MaxNameSize { 256 }MaxNDim
Section titled “MaxNDim”static constexpr
constexpr std::uint8_t MaxNDim { 10 }MaxDetectors
Section titled “MaxDetectors”static constexpr
constexpr std::uint16_t MaxDetectors { 256 }lib_dir
Section titled “lib_dir”str lib_dir = ()has_driver
Section titled “has_driver”bool has_driver = ctypes.util.find_library("cuda") is not Nonestub_path
Section titled “stub_path”str stub_path = os.path.join( os.path.dirname(__file__), "core", "stubs", "libcuda.so" ) mode