Cache Class Reference
HiCR
|
HiCR::backend::hwloc::Cache Class Reference
#include <cache.hpp>
Public Types | |
enum | cacheLevel_t { L1 = 1 , L2 = 2 , L3 = 3 , L4 = 4 , L5 = 5 } |
Public Member Functions | |
Cache (const cacheLevel_t level, std::string type, const size_t size, const size_t lineSize, const bool shared) | |
Cache (const nlohmann::json &input) | |
__INLINE__ size_t | getSize () const |
__INLINE__ size_t | getLineSize () const |
__INLINE__ cacheLevel_t | getLevel () const |
__INLINE__ bool | getShared () const |
__INLINE__ const std::string & | getType () const |
__INLINE__ nlohmann::json | serialize () const |
__INLINE__ void | deserialize (const nlohmann::json &input) |
Detailed Description
Object class representing a cache found in a CPU/Processing Unit
Member Enumeration Documentation
◆ cacheLevel_t
Constructor & Destructor Documentation
◆ Cache() [1/2]
|
inline |
Constructor for the cache class
- Parameters
-
[in] level The level (L1, L1, L2, L3...) detected for this cache instance [in] type The type (instruction, data, unified) for this cache [in] lineSize The size of each cache line contained within [in] shared Indicates whether this cache is shared among others [in] size The size of the detected cache
◆ Cache() [2/2]
|
inline |
Deserializing constructor
The instance created will contain all information, if successful in deserializing it, corresponding to the passed cache This instance should NOT be used for anything else than reporting/printing the contained resources
- Parameters
-
[in] input A JSON-encoded serialized cache information
Member Function Documentation
◆ deserialize()
|
inline |
De-serialization function to obtain the cache values from a serialized JSON object
- Parameters
-
[in] input JSON-formatted serialized cache information
◆ getLevel()
|
inline |
Obtain the type of the cache object
- Returns
- The cache type in as a cacheType_t enum value
◆ getLineSize()
|
inline |
Obtain the line size of the cache object
- Returns
- The cache line size in Bytes
◆ getShared()
|
inline |
Indicates whether the cache is shared among other procesing units
- Returns
- True, if the cache is shared; false, otherwise
◆ getSize()
|
inline |
Obtain the size of the cache object
- Returns
- The cache size in Bytes
◆ getType()
|
inline |
Returns the cache type
- Returns
- The cache type (instruction, data, unified)
◆ serialize()
|
inline |
Serialization function to enable sharing cache information
- Returns
- JSON-formatted serialized cache information
The documentation for this class was generated from the following file:
- /home/runner/work/HiCR/HiCR/include/hicr/backends/hwloc/cache.hpp
Generated by