address_range_t Struct Reference

address_range_t Struct Reference#

Rocprofiler SDK Developer API: rocprofiler::sdk::codeobj::segment::address_range_t Struct Reference
Rocprofiler SDK Developer API 0.5.0
ROCm Profiling API and tools
rocprofiler::sdk::codeobj::segment::address_range_t Struct Reference

#include "rocprofiler-sdk/cxx/codeobj/segment.hpp"

+ Collaboration diagram for rocprofiler::sdk::codeobj::segment::address_range_t:

Public Member Functions

bool operator== (const address_range_t &other) const
 
bool operator< (const address_range_t &other) const
 
bool inrange (uint64_t _addr) const
 

Data Fields

uint64_t addr {0}
 
uint64_t size {0}
 
marker_id_t id {0}
 

Detailed Description

Definition at line 42 of file segment.hpp.

Member Function Documentation

◆ inrange()

bool rocprofiler::sdk::codeobj::segment::address_range_t::inrange ( uint64_t  _addr) const
inline

Definition at line 58 of file segment.hpp.

58{ return addr <= _addr && addr + size > _addr; };

Referenced by rocprofiler::sdk::codeobj::segment::CodeobjTableTranslator::find_codeobj_in_range().

+ Here is the caller graph for this function:

◆ operator<()

bool rocprofiler::sdk::codeobj::segment::address_range_t::operator< ( const address_range_t other) const
inline

Definition at line 53 of file segment.hpp.

54 {
55 if(*this == other) return false;
56 return addr < other.addr;
57 }

References addr.

◆ operator==()

bool rocprofiler::sdk::codeobj::segment::address_range_t::operator== ( const address_range_t other) const
inline

Definition at line 48 of file segment.hpp.

49 {
50 return (addr >= other.addr && addr < other.addr + other.size) ||
51 (other.addr >= addr && other.addr < addr + size);
52 }

References addr, and size.

Field Documentation

◆ addr

uint64_t rocprofiler::sdk::codeobj::segment::address_range_t::addr {0}

Definition at line 44 of file segment.hpp.

44{0};

Referenced by operator<(), and operator==().

◆ id

marker_id_t rocprofiler::sdk::codeobj::segment::address_range_t::id {0}

Definition at line 46 of file segment.hpp.

46{0};

◆ size

uint64_t rocprofiler::sdk::codeobj::segment::address_range_t::size {0}

Definition at line 45 of file segment.hpp.

45{0};

Referenced by operator==().


The documentation for this struct was generated from the following file: