C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
utility.h File Reference
#include <cstddef>
#include <string>
#include <utility>
#include <vector>
#include "simics/detail/conf-object-util.h"

Go to the source code of this file.

Namespaces

namespace  simics
 

Functions

int simics::array_index (const std::string &name)
 This function looks for a pattern in the input string that resembles an array index, specifically a substring enclosed in square brackets (e.g., "array[2]").
 
std::vector< std::string > simics::expand_names (const std::string &name, const char delimiter='.')
 If name contains an array indicator, i.e.
 
std::pair< size_t, size_t > simics::overlap_range (size_t r1_start, size_t r1_end, size_t r2_start, size_t r2_end)
 Given two ranges [r1_start, r1_end) and [r2_start, r2_end), return the overlap range [o_start, o_end)
 
size_t simics::hash_str (const std::string &name)
 Hashes a string to a size_t value.