#include <setassoc_table.h>
shttl::setassoc_table_set_map< line_type, strage_type >のコラボレーション図
Public 型 | |
typedef strage_type::invalid_map_type | invalid_map_type |
typedef strage_type::line_map_type | line_map_type |
typedef strage_type::size_type | size_type |
typedef line_type::key_type | tag_type |
typedef line_type::value_type | value_type |
Public メソッド | |
const line_type & | at (size_type way) const |
line_type & | at (size_type way) |
void | clear () |
size_type | find (const tag_type tag) const |
size_type | find_free_way () const |
void | invalidate (const size_type way) |
bool | read (size_type way, line_type *line) const |
setassoc_table_set_map (strage_type *lines, size_type way_num, size_type index, size_type offset) | |
void | write (const size_type way, const tag_type tag, const value_type &val=value_type()) |
Static Public 変数 | |
static const size_type | invalid_index = strage_type::invalid_index |
static const size_type | invalid_way = strage_type::invalid_way |
Protected メソッド | |
void | assert_valid_way (size_type way) const |
Protected 変数 | |
size_type | m_index |
size_type | m_offset |
strage_type * | m_strage |
size_type | m_way_num |
setassoc_table.h の 451 行で定義されています。
typedef strage_type::invalid_map_type shttl::setassoc_table_set_map< line_type, strage_type >::invalid_map_type |
setassoc_table.h の 461 行で定義されています。
typedef strage_type::line_map_type shttl::setassoc_table_set_map< line_type, strage_type >::line_map_type |
setassoc_table.h の 460 行で定義されています。
typedef strage_type::size_type shttl::setassoc_table_set_map< line_type, strage_type >::size_type |
setassoc_table.h の 456 行で定義されています。
typedef line_type::key_type shttl::setassoc_table_set_map< line_type, strage_type >::tag_type |
setassoc_table.h の 457 行で定義されています。
typedef line_type::value_type shttl::setassoc_table_set_map< line_type, strage_type >::value_type |
setassoc_table.h の 458 行で定義されています。
shttl::setassoc_table_set_map< line_type, strage_type >::setassoc_table_set_map | ( | strage_type * | lines, | |
size_type | way_num, | |||
size_type | index, | |||
size_type | offset | |||
) | [inline] |
void shttl::setassoc_table_set_map< line_type, strage_type >::assert_valid_way | ( | size_type | way | ) | const [inline, protected] |
setassoc_table.h の 611 行で定義されています。
参照先 SHTTL_ASSERT.
00611 { 00612 SHTTL_ASSERT( 0 <= way && way < m_way_num ); 00613 } 00614
const line_type& shttl::setassoc_table_set_map< line_type, strage_type >::at | ( | size_type | way | ) | const [inline] |
line_type& shttl::setassoc_table_set_map< line_type, strage_type >::at | ( | size_type | way | ) | [inline] |
void shttl::setassoc_table_set_map< line_type, strage_type >::clear | ( | ) | [inline] |
size_type shttl::setassoc_table_set_map< line_type, strage_type >::find | ( | const tag_type | tag | ) | const [inline] |
setassoc_table.h の 480 行で定義されています。
00480 { 00481 line_map_type& strage_set = m_strage->get_line_map( m_index ); 00482 typename line_map_type::iterator strage_line = strage_set.find( tag ); 00483 00484 size_type found = invalid_way; 00485 if( strage_line != strage_set.end() && strage_line->second->valid ){ 00486 found = 00487 strage_line->second - m_strage->get_set_strage_iterator( m_index ); 00488 } 00489 00490 #ifdef SHTTL_SET_ASSOC_TABLE_VALIDATE_STRAGE_MAP 00491 size_type linear_found = invalid_way; 00492 for( size_type w = 0; w < m_way_num; w++ ){ 00493 const line_type& line = at( w ); 00494 if( line.key == tag && line.valid ){ 00495 linear_found = w; 00496 break; 00497 } 00498 } 00499 SHTTL_ASSERT( linear_found == found ); 00500 #endif 00501 00502 return found; 00503 } 00504
size_type shttl::setassoc_table_set_map< line_type, strage_type >::find_free_way | ( | ) | const [inline] |
setassoc_table.h の 507 行で定義されています。
参照先 SHTTL_ASSERT.
00507 { 00508 00509 invalid_map_type& invalid_set = m_strage->get_invalid_map( m_index ); 00510 typename invalid_map_type::iterator invalid_line = invalid_set.begin(); 00511 size_type found = invalid_way; 00512 if( invalid_line != invalid_set.end() ){ 00513 found = invalid_line->second; 00514 } 00515 00516 #ifdef SHTTL_SET_ASSOC_TABLE_VALIDATE_STRAGE_MAP 00517 size_type linear_found = invalid_way; 00518 for( size_type w = 0; w < m_way_num; w++ ){ 00519 if( !at( w ).valid ){ 00520 linear_found = w; 00521 break; 00522 } 00523 } 00524 SHTTL_ASSERT( linear_found == found ); 00525 #endif 00526 00527 return found; 00528 } 00529
void shttl::setassoc_table_set_map< line_type, strage_type >::invalidate | ( | const size_type | way | ) | [inline] |
setassoc_table.h の 532 行で定義されています。
00532 { 00533 if( way == invalid_way ) 00534 return; 00535 00536 assert_valid_way( way ); 00537 at( way ).valid = false; 00538 00539 m_strage->get_invalid_map( m_index )[ way ] = way; 00540 } 00541
bool shttl::setassoc_table_set_map< line_type, strage_type >::read | ( | size_type | way, | |
line_type * | line | |||
) | const [inline] |
setassoc_table.h の 543 行で定義されています。
00543 { 00544 if( way == invalid_way ) 00545 return false; 00546 00547 assert_valid_way( way ); 00548 if( line ){ 00549 *line = at( way ); 00550 } 00551 return at( way ).valid; 00552 } 00553
void shttl::setassoc_table_set_map< line_type, strage_type >::write | ( | const size_type | way, | |
const tag_type | tag, | |||
const value_type & | val = value_type() | |||
) | [inline] |
setassoc_table.h の 555 行で定義されています。
参照先 SHTTL_ASSERT.
00558 { 00559 if(way == invalid_way) 00560 return; 00561 00562 assert_valid_way(way); 00563 00564 // keydH 00565 SHTTL_ASSERT( find(tag) == invalid_way || find( tag ) == way ); 00566 00567 // 00568 typename strage_type::strage_type::iterator line = 00569 m_strage->get_set_strage_iterator( m_index ) + way; 00570 00571 line_map_type& strage_set = m_strage->get_line_map( m_index ); 00572 typename line_map_type::iterator old_line = strage_set.find( at( way ).key ); 00573 if( old_line->second == line ){ 00574 strage_set.erase( old_line ); 00575 } 00576 00577 at( way ) = line_type( tag, val, true ); 00578 00579 strage_set[ tag ] = line; 00580 m_strage->get_invalid_map( m_index ).erase( way ); 00581 } 00582
const size_type shttl::setassoc_table_set_map< line_type, strage_type >::invalid_index = strage_type::invalid_index [static] |
setassoc_table.h の 463 行で定義されています。
const size_type shttl::setassoc_table_set_map< line_type, strage_type >::invalid_way = strage_type::invalid_way [static] |
setassoc_table.h の 464 行で定義されています。
size_type shttl::setassoc_table_set_map< line_type, strage_type >::m_index [protected] |
setassoc_table.h の 608 行で定義されています。
size_type shttl::setassoc_table_set_map< line_type, strage_type >::m_offset [protected] |
setassoc_table.h の 609 行で定義されています。
strage_type* shttl::setassoc_table_set_map< line_type, strage_type >::m_strage [protected] |
setassoc_table.h の 606 行で定義されています。
size_type shttl::setassoc_table_set_map< line_type, strage_type >::m_way_num [protected] |
setassoc_table.h の 607 行で定義されています。