blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
264
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
5
140
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
905 values
visit_date
timestamp[us]date
2015-08-09 11:21:18
2023-09-06 10:45:07
revision_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-17 19:19:19
committer_date
timestamp[us]date
1997-09-14 05:04:47
2023-09-06 06:22:19
github_id
int64
3.89k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-07 00:51:45
2023-09-14 21:58:39
gha_created_at
timestamp[us]date
2008-03-27 23:40:48
2023-08-21 23:17:38
gha_language
stringclasses
141 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
10.4M
extension
stringclasses
115 values
content
stringlengths
3
10.4M
authors
listlengths
1
1
author_id
stringlengths
0
158
6f935b079fb8f4116e65d64f8f1ce03d03040321
0ce5a9be7357cd649cbfc2814ea3f558f227e064
/client/Tetris/Tetris/Classes/GameScene.cpp
a2e00be00c9eb417bf897bfa00b78d150e3499f9
[]
no_license
mjssw/myproj
1beb06c2b8e490a11decfa5213e122b54d09beec
4051ae1ed6062caa8acb24959416a5c4cfb4dea0
refs/heads/master
2021-01-17T06:23:53.492422
2014-10-27T09:19:03
2014-10-27T09:19:03
null
0
0
null
null
null
null
GB18030
C++
false
false
11,873
cpp
#include "GameScene.h" #include "Block.h" #include "NetManager.h" using namespace cocos2d; #include <vector> #include <algorithm> using namespace std; CCPoint _BuildPoint(s32 row, s32 col) { return CCPoint( col*BLOCK_W+BATTLE_AREA_X, (GAME_SCENE_ROW_NUM-1-row)*BLOCK_H+BATTLE_AREA_Y); } CBlockElement::CBlockElement(s32 id) { CCRect rc; if( id <= 0 ) { // 上涨的方块 rc.setRect( 0, BLOCK_H, BLOCK_W, BLOCK_H ); } else { // 普通方块 rc.setRect( ((id-1)/CBlockBase::E_VeryCount_OneBlock)*BLOCK_W, 0, BLOCK_W, BLOCK_H ); } m_pSprite = CCSprite::create( PATCH_RES_DIR("tetris_brick.png"), rc ); m_pSprite->setAnchorPoint( ccp(0, 0) ); } s32 CBlockElement::Row() { return (GAME_SCENE_ROW_NUM - ((m_pSprite->getPositionY() - BATTLE_AREA_Y) / BLOCK_H) - 1); } s32 CBlockElement::Col() { return ((m_pSprite->getPositionX() - BATTLE_AREA_X) / BLOCK_W); } CBlock::CBlock(s32 id) : m_BlockId(id) { for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { m_Block[i] = new CBlockElement( id ); } } void CBlock::AddScene(cocos2d::CCLayer *layer, s32 row, s32 col) { SetPosition( layer, row, col ); for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { layer->addChild( m_Block[i]->GetSprite() ); } } void CBlock::SetPosition(cocos2d::CCLayer *layer, s32 row, s32 col) { CBlockBase *block = CBlockManager::Instance().GetBlock( m_BlockId ); if( !block ) { return; } block->SetPosition( m_Block, row, col, m_CenterRow, m_CenterCol ); } void CBlock::Down(cocos2d::CCLayer *layer) { for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { CCPoint pt = m_Block[i]->GetSprite()->getPosition(); pt.y -= BLOCK_H; _Move( m_Block[i], pt ); } m_CenterRow += 1; } void CBlock::Right(cocos2d::CCLayer *layer) { for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { CCPoint pt = m_Block[i]->GetSprite()->getPosition(); pt.x += BLOCK_W; _Move( m_Block[i], pt ); } m_CenterCol += 1; } void CBlock::Left(cocos2d::CCLayer *layer) { for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { CCPoint pt = m_Block[i]->GetSprite()->getPosition(); pt.x -= BLOCK_W; _Move( m_Block[i], pt ); } m_CenterCol -= 1; } void CBlock::RotateClockwise(s32 nid, vector<CCPoint> &vecPos, cocos2d::CCLayer *layer) { if( vecPos.size() != E_SpriteCount_OneBlock ) { CCLog( "[ERROR] RotateClockwise" ); return; } m_BlockId = nid; for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { CCPoint pt = _BuildPoint( (s32)vecPos[i].x, (s32)vecPos[i].y ); _Move( m_Block[i], pt ); } } void CBlock::RotateAntiClockwise(s32 nid, vector<CCPoint> &vecPos, cocos2d::CCLayer *layer) { } CBlockElement* CBlock::BlockAt(s32 idx) { if( idx < 0 || idx >= CBlock::E_SpriteCount_OneBlock ) { return NULL; } return m_Block[idx]; } s32 CBlock::Row() { s32 minRow = GAME_SCENE_ROW_NUM; for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { s32 row = m_Block[i]->Row(); if( row < minRow ) { minRow = row; } } return minRow; } s32 CBlock::Col() { s32 minCol = GAME_SCENE_COL_NUM; for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { s32 col = m_Block[i]->Col(); if( col < minCol ) { minCol = col; } } return minCol; } void CBlock::GetRows(std::vector<s32> &rows) { // 取不重复的所有行 s32 flag[GAME_SCENE_ROW_NUM] = {0}; memset( flag, 0, sizeof(s32) * GAME_SCENE_ROW_NUM ); for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { s32 row = m_Block[i]->Row(); if( flag[row] == 0 ) { rows.push_back( row ); ++flag[row]; } } } void CBlock::MoveUp(s32 rowCount, cocos2d::CCLayer *layer) { for( int i=0; i<E_SpriteCount_OneBlock; ++i ) { s32 row = m_Block[i]->Row(); s32 col = m_Block[i]->Col(); CCPoint pt = _BuildPoint( row-rowCount, col ); _Move( m_Block[i], pt ); } } void CBlock::_Move(CBlockElement *elem, cocos2d::CCPoint &endPoint) { /* double moveTime = 0.01; CCMoveTo *moveAct = CCMoveTo::create( moveTime, endPoint ); CCFiniteTimeAction *action= CCSequence::create( moveAct, NULL ); elem->GetSprite()->stopAllActions(); elem->GetSprite()->runAction( action ); //*/ if( elem ) { elem->GetSprite()->setPosition( endPoint ); } } s32 CBlock::RotateClockwiseId(s32 id) { s32 _id = id - 1; if( _id == 0 ) { return CBlockBase::E_VeryCount_OneBlock; } s32 gid = _id / CBlockBase::E_VeryCount_OneBlock; s32 nid = _id - 1; if( nid / CBlockBase::E_VeryCount_OneBlock != gid ) { nid = (gid+1) * CBlockBase::E_VeryCount_OneBlock - 1; } return (nid+1); } /////////////////////////////////////////////////////////////////////////////// CGameScene::CGameScene() { } CGameScene::~CGameScene() { } void CGameScene::Init() { memset( m_Scene, NULL, GAME_SCENE_COL_NUM * GAME_SCENE_ROW_NUM * sizeof(CBlockElement*) ); m_MaxHigh = 0; m_bHeadEmpty = true; } bool CGameScene::PutBlock(CBlock *block, s32 column) { for( int i=0; i<CBlock::E_SpriteCount_OneBlock; ++i ) { CBlockElement *elem = block->BlockAt(i); if( elem ) { s32 row = elem->Row(); s32 col = elem->Col(); s32 high = GAME_SCENE_ROW_NUM - row; if( high > m_MaxHigh ) { m_MaxHigh = high; } if( m_Scene[ row ][ col ] ) { return false; } m_Scene[ row ][ col ] = elem; } } CCLog( "put %d, maxHigh=%d", block->Id(), m_MaxHigh ); return true; } bool CGameScene::TryDown(CBlock *block, cocos2d::CCLayer *layer) { if( _CanDown(block) ) { block->Down( layer ); return true; } return false; } bool CGameScene::TryLeft(CBlock *block, cocos2d::CCLayer *layer) { for( int i=0; i<CBlock::E_SpriteCount_OneBlock; ++i ) { CBlockElement *elem = block->BlockAt(i); if( elem ) { s32 row = elem->Row(); s32 col = elem->Col(); if( col - 1 < 0 ) { return false; } if( m_Scene[ row ][ col - 1 ] != NULL ) { return false; } } } block->Left( layer ); return true; } bool CGameScene::TryRight(CBlock *block, cocos2d::CCLayer *layer) { for( int i=0; i<CBlock::E_SpriteCount_OneBlock; ++i ) { CBlockElement *elem = block->BlockAt(i); if( elem ) { s32 row = elem->Row(); s32 col = elem->Col(); if( col + 1 >= GAME_SCENE_COL_NUM ) { return false; } if( m_Scene[ row ][ col + 1 ] != NULL ) { return false; } } } block->Right( layer ); return true; } s32 CGameScene::TryRotateClockwise(CBlock *block, cocos2d::CCLayer *layer) { s32 nid = CBlock::RotateClockwiseId( block->Id() ); CBlockBase *bk = CBlockManager::Instance().GetBlock( nid ); if( !bk ) { return block->Id(); } vector<CCPoint> vecPos; bk->GetPosition( vecPos, block->CenterRow(), block->CenterCol() ); bool ret = true; vector<CCPoint>::iterator it = vecPos.begin(); for( ; it != vecPos.end(); ++it ) { s32 row = (s32)it->x; s32 col = (s32)it->y; if( row < 0 || row >= GAME_SCENE_ROW_NUM || col < 0 || col >= GAME_SCENE_COL_NUM ) { return block->Id(); } if( m_Scene[ row ][ col ] != NULL ) { return block->Id(); } } block->RotateClockwise( nid, vecPos, layer ); return block->Id(); } s32 CGameScene::TryRotateAntiClockwise(CBlock *block, cocos2d::CCLayer *layer) { return block->Id(); } static bool CompairRow(s32 row1, s32 row2) { return (row1 > row2); } void CGameScene::CheckCleanUp(CBlock *block, cocos2d::CCLayer *layer) { // 注意: rows 是一个已经排好序的数组 if( !block || !layer ) { return; } vector<s32> rows; block->GetRows( rows ); sort( rows.begin(), rows.end(), CompairRow ); vector<s32>::iterator it = rows.begin(); for( ; it != rows.end(); ) { if( !_CheckRowFull( *it ) ) { it = rows.erase( it ); } else { ++it; } } _DoClearBlock( rows, layer ); s32 oldHigh = m_MaxHigh; m_MaxHigh -= rows.size(); if( rows.size() > 0 ) { CCLog( "clear, maxHigh=%d", m_MaxHigh ); _DebugLogScene( oldHigh ); } // 网络消息 if( rows.size() > 0 ) { CNetManager::Instance().ClearBlock( rows ); } } bool CGameScene::_CheckRowFull(s32 row) { bool ret = true; for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { if( m_Scene[row][col] == NULL ) { ret = false; break; } } return ret; } bool CGameScene::_CheckRowEmpty(s32 row) { //SG_ASSERT( row >= 0 && row < GAME_SCENE_ROW_NUM ); bool ret = true; for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { if( m_Scene[row][col] != NULL ) { ret = false; break; } } return ret; } bool CGameScene::_CanDown(CBlock *block) { if( !block ) { return false; } for( int i=0; i<CBlock::E_SpriteCount_OneBlock; ++i ) { CBlockElement *elem = block->BlockAt(i); if( elem ) { s32 row = elem->Row(); s32 col = elem->Col(); if( row + 1 >= GAME_SCENE_ROW_NUM ) { return false; } if( m_Scene[ row + 1 ][ col ] != NULL ) { return false; } } } return true; } void CGameScene::_DoClearBlock(vector<s32> &rows, cocos2d::CCLayer *layer) { s32 count = rows.size(); if( count == 0 ) { return; } s32 n = count - 1; s32 empty_idx = rows[0]; // 删除行 for( s32 i=0; i<count; ++i ) { for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { layer->removeChild( m_Scene[rows[i]][col]->GetSprite() ); m_Scene[rows[i]][col] = NULL; } } // 移动夹在删除行中间的内容 for( s32 i=0; i<n; ++i ) { for( s32 row=rows[i]-1; row>rows[i+1]; --row ) { for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { //layer->removeChild( m_Scene[empty_idx][col]->GetSprite() ); if( m_Scene[row][col] ) { m_Scene[row][col]->GetSprite()->setPosition( _BuildPoint(empty_idx, col) ); } m_Scene[empty_idx][col] = m_Scene[row][col]; m_Scene[row][col] = NULL; } --empty_idx; } } // 移动最上层删除行以上的内容 s32 maxhigh_idx = GAME_SCENE_ROW_NUM - m_MaxHigh; for( s32 row=rows[count-1]-1; row>=maxhigh_idx; --row ) { for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { if( m_Scene[row][col] ) { m_Scene[row][col]->GetSprite()->setPosition( _BuildPoint(empty_idx, col) ); } m_Scene[empty_idx][col] = m_Scene[row][col]; m_Scene[row][col] = NULL; } --empty_idx; } } bool CGameScene::RiseBlock(int count, CBlock *block, cocos2d::CCLayer *layer) { if( !block || !layer ) { return false; } if( !_CanDown( block ) ) { s32 row = block->Row(); if( row - count < 0 ) { return false; } // 当前方块不能在往下掉了,但是涨方块, // 当前方块上移count行 block->MoveUp( (s32)count, layer ); } // 当前场景内所有方块统一上移count行 _MoveUpBlocks( (s32)count, layer ); // 增加额外方块 _AddOtherBlocks( (s32)count, layer ); m_MaxHigh += count; return true; } void CGameScene::_MoveUpBlocks(s32 rowCount, cocos2d::CCLayer *layer) { for( s32 row=(GAME_SCENE_ROW_NUM-m_MaxHigh); row<GAME_SCENE_ROW_NUM; ++row ) { s32 targetRow = row - rowCount; for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { if( m_Scene[row][col] ) { m_Scene[row][col]->GetSprite()->setPosition( _BuildPoint(targetRow, col) ); m_Scene[targetRow][col] = m_Scene[row][col]; m_Scene[row][col] = NULL; } } } } void CGameScene::_AddOtherBlocks(s32 rowCount, cocos2d::CCLayer *layer) { for( s32 row=GAME_SCENE_ROW_NUM-rowCount; row<GAME_SCENE_ROW_NUM; ++row ) { s32 col = 0; if( m_bHeadEmpty ) { col += 1; } m_bHeadEmpty = !m_bHeadEmpty; for( ; col<GAME_SCENE_COL_NUM; col+=2 ) { CBlockElement *elem = new CBlockElement( 0 ); if( !elem ) { return; } elem->GetSprite()->setPosition( _BuildPoint(row, col) ); m_Scene[row][col] = elem; layer->addChild( elem->GetSprite() ); } } } void CGameScene::_DebugLogScene(s32 high) { s32 row = GAME_SCENE_ROW_NUM - high; for( ; row < GAME_SCENE_ROW_NUM; ++row ) { for( s32 col=0; col<GAME_SCENE_COL_NUM; ++col ) { if( m_Scene[row][col] == NULL ) { OutputDebugString( L"o" ); } else { OutputDebugString( L"#" ); } } OutputDebugString( L"\n" ); } }
[ "shenjiajia1225@163.com" ]
shenjiajia1225@163.com
766e79a6b7720de164345919614190e6272c47cd
95907fbc85a1e2c790298d1dcd830acdfda95731
/Physics/src/Tools/RestitutionTool.cpp
47a1e94ded21b6aa829ab91fe2af43acafacecec
[]
no_license
bombpersons/Box2DPhysicsSandbox
95d5aee8c8e3594a978d73671699261c6afa9f3c
439d0de8f38563b328fee8973ebb5c29e2818896
refs/heads/master
2021-03-12T20:45:50.711194
2014-06-30T10:07:01
2014-06-30T10:07:01
21,346,990
2
1
null
null
null
null
UTF-8
C++
false
false
897
cpp
#include <Tools/RestitutionTool.hpp> #include <Entities/PhysicsEntity.hpp> #include <Entities/UIEntity.hpp> RestitutionTool::RestitutionTool(Game* _game) : Tool(_game) { } RestitutionTool::~RestitutionTool() { } void RestitutionTool::OnPress(Entity* _entity, sf::Vector2f _pos, sf::Mouse::Button _button) { if (_button == sf::Mouse::Button::Left) { // Check if the entity is a physics entity. PhysicsEntity* entity = dynamic_cast<PhysicsEntity*>(_entity); if (entity != NULL) { // Set the restitution on the entity entity->SetRestitution(restitution); } } } void RestitutionTool::Update(float _deltatime) { // Get the values from the properties window. Gwen::Controls::GroupBox* box = game->GetUI()->GetPropertiesWindow()->GetPanel(12); // Get the friction restitution = atof(box->FindChildByName("RestitutionBox", true)->GetValue().c_str()); }
[ "blindrabbits@gmail.com" ]
blindrabbits@gmail.com
55b8fd6e4968152ec965d40b644e59a5d2f620c2
aa986bc72471c0100f5e324a040402842a6743e1
/Object Oriented Programming (C++)/Final Project/bruinen.cpp
d8447647cd680914f05bb8b3e2ff41b3574050bb
[]
no_license
AneresArsenal/portfolio
4e74a5c1e1c57238dd19f09971d0597f2af189d9
4ec09b660b930aec7b6f8dd8717261858e735965
refs/heads/master
2022-12-25T13:11:38.569534
2019-11-28T00:07:54
2019-11-28T00:07:54
166,751,398
0
0
null
2022-12-12T02:37:28
2019-01-21T05:06:03
C++
UTF-8
C++
false
false
2,930
cpp
/********************************************************************* ** Author: Serena Tay ** Date: August 12, 2018 ** Description: Final Project Assignnment ** Bruinen class cpp file *********************************************************************/ #include <iostream> #include <fstream> #include <ctime> #include "bruinen.hpp" #include "menu.hpp" using std::cin; using std::cout; using std::endl; using std::ifstream; using std::string; Bruinen::Bruinen() { spaceName = "Ford of Bruinen"; } bool Bruinen::event() { int count = 0; cout << "The nazguls are behind you! What stands between you and the shelter of Rivendell is the mighty ford of Bruinen." << endl; cout << "To call upon the ancient spirits for safe passage, solve the following riddles!" << endl; cout << "Who forged the three elf-rings Nenya, Narya and Vilya?" << endl; int choice1 = programRunningBruinen.prompt("[1] Thranduil [2] Celebrimbor ", 1, 2); if (choice1 == 2) { cout << "You have answered correctly!" << endl; count += 1; } if (choice1 != 2) { cout << "Sorry, you have answered incorrectly!" << endl; } cout << "Iarwain Ben-adar we called him, oldest and fatherless." << endl; cout << "But many another name he has since been given by other folk:" << endl; cout << "Forn by the Dwarves, Orald by Northern Men, and other names beside." << endl; cout << "He is a strange creature...who is he?" << endl; int choice2 = programRunningBruinen.prompt("[1] Tharanduil [2] Beren [3] Tom Bombadil ", 1, 3); if (choice2 == 3) { cout << "You have answered correctly!" << endl; count += 1; } if (choice2 != 3) { cout << "Sorry, you have answered incorrectly!" << endl; } cout << "Tinuviel the elven-fair, Immortal maidenelven-wise..." << endl; cout << "Long was the way that fate them bore, O’er stony mountains cold and grey, " << endl; cout << "Through halls of iron and darkling door, And woods of nightshade morrowless. " << endl; cout << "The Sundering Seas between them lay." << endl; cout << "And yet at last they met once more, And long ago they passed away." << endl; cout << "Whose story is the excerpt of the song describing?" << endl; int choice3 = programRunningBruinen.prompt("[1] Tom Bombadil and Goldberry [2] Aragon and Arwen [3] Beren and Luthien ", 1, 3); if (choice3 == 3) { cout << "You have answered correctly!" << endl; count += 1; } if (choice3 != 3) { cout << "Sorry, you have answered incorrectly!" << endl; } if (count >= 2) //pass the test { cout << "Congratulations, you may pass the fords of Bruinen and have safe passage into Rivendell!" << endl; return true; } else { cout << "Sorry, you will need to try again." << endl; return false; } }
[ "tays@oregonstate.edu" ]
tays@oregonstate.edu
2466181315e6f42a235bd9a2b3010233d6c99cc5
b7880e3193f43e1a2f67b254f16d76d485cf3f46
/src/urn_jaus_jss_mobility_LocalVectorDriver_1_0/Messages/ClearEmergency.cpp
e4c5995ad2e472cd2dd6b96fcd4274eacd80f4bc
[]
no_license
davidhodo/libJAUS
49e09c860c58f615c9b4cf88844caf2257e51d99
b034c614555478540ac2565812af94db44b54aeb
refs/heads/master
2020-05-15T17:44:55.910342
2012-01-18T20:33:41
2012-01-18T20:33:41
3,209,499
0
0
null
null
null
null
UTF-8
C++
false
false
11,888
cpp
#include "urn_jaus_jss_mobility_LocalVectorDriver_1_0/Messages/ClearEmergency.h" namespace urn_jaus_jss_mobility_LocalVectorDriver_1_0 { void ClearEmergency::AppHeader::HeaderRec::setParent(AppHeader* parent) { m_parent = parent; } void ClearEmergency::AppHeader::HeaderRec::setParentPresenceVector() { if(m_parent != NULL ) { m_parent->setParentPresenceVector(); } } jUnsignedShortInteger ClearEmergency::AppHeader::HeaderRec::getMessageID() { return m_MessageID; } int ClearEmergency::AppHeader::HeaderRec::setMessageID(jUnsignedShortInteger value) { m_MessageID = value; setParentPresenceVector(); return 0; } /** * Returns the size of memory the used data members of the class occupies. * This is not necessarily the same size of memory the class actually occupies. * Eg. A union of an int and a double may occupy 8 bytes. However, if the data * stored is an int, this function will return a size of 4 bytes. * * @return */ const unsigned int ClearEmergency::AppHeader::HeaderRec::getSize() { unsigned int size = 0; size += sizeof(jUnsignedShortInteger); return size; } void ClearEmergency::AppHeader::HeaderRec::encode(unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; jUnsignedShortInteger m_MessageIDTemp; m_MessageIDTemp = JSIDL_v_1_0::correctEndianness(m_MessageID); memcpy(bytes + pos, &m_MessageIDTemp, sizeof(jUnsignedShortInteger)); pos += sizeof(jUnsignedShortInteger); } void ClearEmergency::AppHeader::HeaderRec::decode(const unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; jUnsignedShortInteger m_MessageIDTemp; memcpy(&m_MessageIDTemp, bytes + pos, sizeof(jUnsignedShortInteger)); m_MessageID = JSIDL_v_1_0::correctEndianness(m_MessageIDTemp); pos += sizeof(jUnsignedShortInteger); } ClearEmergency::AppHeader::HeaderRec &ClearEmergency::AppHeader::HeaderRec::operator=(const HeaderRec &value) { m_MessageID = value.m_MessageID; return *this; } bool ClearEmergency::AppHeader::HeaderRec::operator==(const HeaderRec &value) const { if (m_MessageID != value.m_MessageID) { return false; } return true; } bool ClearEmergency::AppHeader::HeaderRec::operator!=(const HeaderRec &value) const { return !((*this) == value); } ClearEmergency::AppHeader::HeaderRec::HeaderRec() { m_parent = NULL; m_MessageID = 0x0007; } ClearEmergency::AppHeader::HeaderRec::HeaderRec(const HeaderRec &value) { /// Initiliaze the protected variables m_parent = NULL; m_MessageID = 0x0007; /// Copy the values m_MessageID = value.m_MessageID; } ClearEmergency::AppHeader::HeaderRec::~HeaderRec() { } ClearEmergency::AppHeader::HeaderRec* const ClearEmergency::AppHeader::getHeaderRec() { return &m_HeaderRec; } int ClearEmergency::AppHeader::setHeaderRec(const HeaderRec &value) { m_HeaderRec = value; setParentPresenceVector(); return 0; } void ClearEmergency::AppHeader::setParentPresenceVector() { // Nothing needed here, placeholder function } /** * Returns the size of memory the used data members of the class occupies. * This is not necessarily the same size of memory the class actually occupies. * Eg. A union of an int and a double may occupy 8 bytes. However, if the data * stored is an int, this function will return a size of 4 bytes. * * @return */ const unsigned int ClearEmergency::AppHeader::getSize() { unsigned int size = 0; size += m_HeaderRec.getSize(); return size; } void ClearEmergency::AppHeader::encode(unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; m_HeaderRec.encode(bytes + pos); pos += m_HeaderRec.getSize(); } void ClearEmergency::AppHeader::decode(const unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; m_HeaderRec.decode(bytes + pos); pos += m_HeaderRec.getSize(); } ClearEmergency::AppHeader &ClearEmergency::AppHeader::operator=(const AppHeader &value) { m_HeaderRec = value.m_HeaderRec; m_HeaderRec.setParent(this); return *this; } bool ClearEmergency::AppHeader::operator==(const AppHeader &value) const { if (m_HeaderRec != value.m_HeaderRec) { return false; } return true; } bool ClearEmergency::AppHeader::operator!=(const AppHeader &value) const { return !((*this) == value); } ClearEmergency::AppHeader::AppHeader() { m_HeaderRec.setParent(this); /// No Initialization of m_HeaderRec necessary. } ClearEmergency::AppHeader::AppHeader(const AppHeader &value) { /// Initiliaze the protected variables m_HeaderRec.setParent(this); /// No Initialization of m_HeaderRec necessary. /// Copy the values m_HeaderRec = value.m_HeaderRec; m_HeaderRec.setParent(this); } ClearEmergency::AppHeader::~AppHeader() { } ClearEmergency::AppHeader* const ClearEmergency::getAppHeader() { return &m_AppHeader; } int ClearEmergency::setAppHeader(const AppHeader &value) { m_AppHeader = value; return 0; } void ClearEmergency::Body::ClearEmergencyRec::setParent(Body* parent) { m_parent = parent; } void ClearEmergency::Body::ClearEmergencyRec::setParentPresenceVector() { if(m_parent != NULL ) { m_parent->setParentPresenceVector(); } } jUnsignedShortInteger ClearEmergency::Body::ClearEmergencyRec::getEmergencyCode() { return m_EmergencyCode; } int ClearEmergency::Body::ClearEmergencyRec::setEmergencyCode(jUnsignedShortInteger value) { if ((value == 1)) { m_EmergencyCode = value; setParentPresenceVector(); return 0; } return 1; } /** * Returns the size of memory the used data members of the class occupies. * This is not necessarily the same size of memory the class actually occupies. * Eg. A union of an int and a double may occupy 8 bytes. However, if the data * stored is an int, this function will return a size of 4 bytes. * * @return */ const unsigned int ClearEmergency::Body::ClearEmergencyRec::getSize() { unsigned int size = 0; size += sizeof(jUnsignedShortInteger); return size; } void ClearEmergency::Body::ClearEmergencyRec::encode(unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; jUnsignedShortInteger m_EmergencyCodeTemp; m_EmergencyCodeTemp = JSIDL_v_1_0::correctEndianness(m_EmergencyCode); memcpy(bytes + pos, &m_EmergencyCodeTemp, sizeof(jUnsignedShortInteger)); pos += sizeof(jUnsignedShortInteger); } void ClearEmergency::Body::ClearEmergencyRec::decode(const unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; jUnsignedShortInteger m_EmergencyCodeTemp; memcpy(&m_EmergencyCodeTemp, bytes + pos, sizeof(jUnsignedShortInteger)); m_EmergencyCode = JSIDL_v_1_0::correctEndianness(m_EmergencyCodeTemp); pos += sizeof(jUnsignedShortInteger); } ClearEmergency::Body::ClearEmergencyRec &ClearEmergency::Body::ClearEmergencyRec::operator=(const ClearEmergencyRec &value) { m_EmergencyCode = value.m_EmergencyCode; return *this; } bool ClearEmergency::Body::ClearEmergencyRec::operator==(const ClearEmergencyRec &value) const { if (m_EmergencyCode != value.m_EmergencyCode) { return false; } return true; } bool ClearEmergency::Body::ClearEmergencyRec::operator!=(const ClearEmergencyRec &value) const { return !((*this) == value); } ClearEmergency::Body::ClearEmergencyRec::ClearEmergencyRec() { m_parent = NULL; m_EmergencyCode = 0; } ClearEmergency::Body::ClearEmergencyRec::ClearEmergencyRec(const ClearEmergencyRec &value) { /// Initiliaze the protected variables m_parent = NULL; m_EmergencyCode = 0; /// Copy the values m_EmergencyCode = value.m_EmergencyCode; } ClearEmergency::Body::ClearEmergencyRec::~ClearEmergencyRec() { } ClearEmergency::Body::ClearEmergencyRec* const ClearEmergency::Body::getClearEmergencyRec() { return &m_ClearEmergencyRec; } int ClearEmergency::Body::setClearEmergencyRec(const ClearEmergencyRec &value) { m_ClearEmergencyRec = value; setParentPresenceVector(); return 0; } void ClearEmergency::Body::setParentPresenceVector() { // Nothing needed here, placeholder function } /** * Returns the size of memory the used data members of the class occupies. * This is not necessarily the same size of memory the class actually occupies. * Eg. A union of an int and a double may occupy 8 bytes. However, if the data * stored is an int, this function will return a size of 4 bytes. * * @return */ const unsigned int ClearEmergency::Body::getSize() { unsigned int size = 0; size += m_ClearEmergencyRec.getSize(); return size; } void ClearEmergency::Body::encode(unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; m_ClearEmergencyRec.encode(bytes + pos); pos += m_ClearEmergencyRec.getSize(); } void ClearEmergency::Body::decode(const unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; m_ClearEmergencyRec.decode(bytes + pos); pos += m_ClearEmergencyRec.getSize(); } ClearEmergency::Body &ClearEmergency::Body::operator=(const Body &value) { m_ClearEmergencyRec = value.m_ClearEmergencyRec; m_ClearEmergencyRec.setParent(this); /// This code is currently not supported return *this; } bool ClearEmergency::Body::operator==(const Body &value) const { if (m_ClearEmergencyRec != value.m_ClearEmergencyRec) { return false; } /// This code is currently not supported return true; } bool ClearEmergency::Body::operator!=(const Body &value) const { return !((*this) == value); } ClearEmergency::Body::Body() { m_ClearEmergencyRec.setParent(this); /// No Initialization of m_ClearEmergencyRec necessary. } ClearEmergency::Body::Body(const Body &value) { /// Initiliaze the protected variables m_ClearEmergencyRec.setParent(this); /// No Initialization of m_ClearEmergencyRec necessary. /// Copy the values m_ClearEmergencyRec = value.m_ClearEmergencyRec; m_ClearEmergencyRec.setParent(this); /// This code is currently not supported } ClearEmergency::Body::~Body() { } ClearEmergency::Body* const ClearEmergency::getBody() { return &m_Body; } int ClearEmergency::setBody(const Body &value) { m_Body = value; return 0; } /** * Returns the size of memory the used data members of the class occupies. * This is not necessarily the same size of memory the class actually occupies. * Eg. A union of an int and a double may occupy 8 bytes. However, if the data * stored is an int, this function will return a size of 4 bytes. * * @return */ const unsigned int ClearEmergency::getSize() { unsigned int size = 0; size += m_AppHeader.getSize(); size += m_Body.getSize(); return size; } void ClearEmergency::encode(unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; m_AppHeader.encode(bytes + pos); pos += m_AppHeader.getSize(); m_Body.encode(bytes + pos); pos += m_Body.getSize(); } void ClearEmergency::decode(const unsigned char *bytes) { if (bytes == NULL) { return; } int pos = 0; m_AppHeader.decode(bytes + pos); pos += m_AppHeader.getSize(); m_Body.decode(bytes + pos); pos += m_Body.getSize(); } ClearEmergency &ClearEmergency::operator=(const ClearEmergency &value) { m_AppHeader = value.m_AppHeader; m_Body = value.m_Body; return *this; } bool ClearEmergency::operator==(const ClearEmergency &value) const { if (m_AppHeader != value.m_AppHeader) { return false; } if (m_Body != value.m_Body) { return false; } return true; } bool ClearEmergency::operator!=(const ClearEmergency &value) const { return !((*this) == value); } ClearEmergency::ClearEmergency() { /// No Initialization of m_AppHeader necessary. /// No Initialization of m_Body necessary. m_IsCommand = true; } ClearEmergency::ClearEmergency(const ClearEmergency &value) { /// Initiliaze the protected variables /// No Initialization of m_AppHeader necessary. /// No Initialization of m_Body necessary. m_IsCommand = true; /// Copy the values m_AppHeader = value.m_AppHeader; m_Body = value.m_Body; } ClearEmergency::~ClearEmergency() { } }
[ "david.hodo@gmail.com" ]
david.hodo@gmail.com
661cc4f2260e927ec2169bf4c687715743dc92e2
52398a9441ed1cfe405965ce1a224dca3fd23b02
/04_Inheritance/MagicSpells.h
759c6684eb2c4b48755bda6e1b52f9bbd4f2ffdd
[]
no_license
evilbeaver12/HackerRank_Cpp
1172deee5e8da27f2673fea9902ad9b8e02e5ab4
f07953ee06c3d12b46f1496f5ef9f69750be2dad
refs/heads/master
2021-01-20T05:44:20.626206
2017-10-07T19:44:25
2017-10-07T19:44:25
101,468,915
0
0
null
null
null
null
UTF-8
C++
false
false
3,743
h
#pragma once #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Spell { private: string scrollName; public: Spell() : scrollName("") { } Spell(string name) : scrollName(name) { } virtual ~Spell() { } string revealScrollName() { return scrollName; } }; class Fireball : public Spell { private: int power; public: Fireball(int power) : power(power) { } void revealFirepower() { cout << "Fireball: " << power << endl; } }; class Frostbite : public Spell { private: int power; public: Frostbite(int power) : power(power) { } void revealFrostpower() { cout << "Frostbite: " << power << endl; } }; class Thunderstorm : public Spell { private: int power; public: Thunderstorm(int power) : power(power) { } void revealThunderpower() { cout << "Thunderstorm: " << power << endl; } }; class Waterbolt : public Spell { private: int power; public: Waterbolt(int power) : power(power) { } void revealWaterpower() { cout << "Waterbolt: " << power << endl; } }; class SpellJournal { public: static string journal; static string read() { return journal; } }; string SpellJournal::journal = ""; void counterspell(Spell *spell) { struct { int operator()(string a, string b) { //if (a.size() == 0 || b.size() == 0) //{ // return 0; //} //if (a[0] == b[0]) //{ // return 1 + (*this)(a.substr(1), b.substr(1)); //} //return max((*this)(a.substr(1), b), (*this)(a, b.substr(1))); vector<vector<int>> DP(a.size() + 1, vector<int>(b.size() + 1)); for (size_t i = 0; i <= a.size(); i++) { for (size_t j = 0; j <= b.size(); j++) { if (i == 0 || j == 0) { DP[i][j] = 0; } else { DP[i][j] = max(DP[i - 1][j], DP[i][j - 1]); if (a[i - 1] == b[j - 1]) { DP[i][j] = max(DP[i][j], DP[i - 1][j - 1] + 1); } } } } return DP.back().back(); } } longestSubSequence; Fireball* fire = dynamic_cast<Fireball*>(spell); Frostbite* frost = dynamic_cast<Frostbite*>(spell); Thunderstorm* thunder = dynamic_cast<Thunderstorm*>(spell); Waterbolt* water = dynamic_cast<Waterbolt*>(spell); if (fire != nullptr) { fire->revealFirepower(); } else if (frost != nullptr) { frost->revealFrostpower(); } else if (thunder != nullptr) { thunder->revealThunderpower(); } else if (water != nullptr) { water->revealWaterpower(); } else { string scrollName = spell->revealScrollName(); cout << longestSubSequence(scrollName, SpellJournal::journal) << endl; } } class Wizard { public: Spell *cast() { Spell *spell; string s; cin >> s; int power; cin >> power; if (s == "fire") { spell = new Fireball(power); } else if (s == "frost") { spell = new Frostbite(power); } else if (s == "water") { spell = new Waterbolt(power); } else if (s == "thunder") { spell = new Thunderstorm(power); } else { spell = new Spell(s); cin >> SpellJournal::journal; } return spell; } };
[ "hodosyg@gmail.com" ]
hodosyg@gmail.com
852bf40f71c3850d334a78b306492b5c1fd0c93f
4dad387620095fd9c6bc8c82459450ebb0b5c426
/computadora.cpp
2702ffb5c4843f28328733112848b1e8dd17527c
[]
no_license
koalamadness/Day-61-P2
6bb6cca8a973eab75653f7954c502f5beb98b4c2
3732cc30b69287836cf030b3e9044e82527f70dd
refs/heads/master
2023-01-07T03:07:52.304986
2020-11-09T06:32:59
2020-11-09T06:32:59
311,245,157
0
0
null
null
null
null
UTF-8
C++
false
false
821
cpp
#include "computadora.h" using namespace std; Computadora::Computadora() { } Computadora::Computadora(const string& os, const int RAM, const string& m, const float cst) { sistemaOperativo = os; memoriaRAM = RAM; marca = m; costo = cst; } void Computadora::setSistemaOperativo(const string& os) { sistemaOperativo = os; } void Computadora::setMemoriaRAM(const int RAM) { memoriaRAM = RAM; } void Computadora::setMarca(const string& m) { marca = m; } void Computadora::setCosto(const float cst) { costo = cst; } std::string Computadora::getSistemaOperativo() { return sistemaOperativo; } int Computadora::getMemoriaRAM() { return memoriaRAM; } std::string Computadora::getMarca() { return marca; } float Computadora::getCosto() { return costo; }
[ "paulhiram@hotmail.com" ]
paulhiram@hotmail.com
d51b385849745eb6c8723d818c616f2f4350bc9b
986bd7750a980e5b92f74fd2666404fae75cfc12
/RadImgViewer/ImgViewer.cpp
ea90179dd6517c20bfaf7914e76b27fdc402e263
[]
no_license
RadAd/RadImgViewer
f6a6ca55a4f81d958032b7ae7dd36ca36dc73163
6bb91bea1e2c890c28fa878dabf370a25a580b83
refs/heads/master
2022-11-24T14:57:53.875037
2022-11-04T01:59:41
2022-11-04T01:59:41
136,439,475
3
0
null
null
null
null
UTF-8
C++
false
false
25,188
cpp
#define NOMINMAX #include <Rad\GUI\WindowCreate.h> #include <Rad\GUI\MessageLoop.h> #include <Rad\GUI\RegClass.h> #include <Rad\Rect.h> #include <Rad\View\FrameWindow.h> #include <Rad\View\WindowBitmapView.h> #include <FreeImage.H> #include "ImgViewerDoc.h" #include "Dialogs.h" #include "FreeImageHelper.h" #include "resource.h" #define APP_NAME_A "RadImgViewer" #define APP_NAME _T(APP_NAME_A) using namespace rad; namespace { HINSTANCE g_hInstance = NULL; HACCEL g_hAccel = NULL; const TCHAR SEP = '\0'; } class ImgViewerView : public WindowBitmapView, public CImgViewerDocListener, public CommandStatus { public: // CImgViewerDocListener void ImgViewerDocMsg(CImgViewerDoc* pDoc, int Msg) override { m_pDoc = pDoc; if (Msg & IVDL_PALETTE_CHANGED) { SetPalette(pDoc->CreatePalette()); } if (Msg & IVDL_BITS_CHANGED) { rad::WindowDC DC(*this); SetBitmap(pDoc->CreateBitmap(DC, m_bg)); } if (Msg & IVDL_SIZE_CHANGED) { UpdateScrollBars(); InvalidateRect(); } } void ImgViewerDocError(CImgViewerDoc* /*pDoc*/, const std::string& Msg) override { MessageBoxA(GetHWND(), Msg.c_str(), APP_NAME_A, MB_OK | MB_ICONERROR); } protected: LRESULT OnCommand(WORD NotifyCode, WORD ID, HWND hWnd) override { switch (ID) { case ID_VIEW_ZOOM_INCREASE: if (GetZoom() < 10000) SetZoom(GetZoom() * 2); break; case ID_VIEW_ZOOM_ORIGINAL: SetZoom(100); break; case ID_VIEW_ZOOM_DECREASE: if (GetZoom() > 1) SetZoom(GetZoom() / 2); break; case ID_VIEW_ZOOM_TOFIT: { SIZE docSize = GetDocSize(); RECT rect; GetClientRect(&rect); SIZE zoom; zoom.cx = docSize.cx > 0 ? GetWidth(rect) * 100 / docSize.cx : 0; zoom.cy = docSize.cy > 0 ? GetHeight(rect) * 100 / docSize.cy : 0; //SetZoom(std::min(zoom.cx, zoom.cy)); SetZoom(zoom.cx < zoom.cy ? zoom.cx : zoom.cy); } break; case ID_BACKGROUND_CHEQUERED: m_bg = CImgViewerDoc::BG_CHEQUERED; if (m_pDoc != nullptr) { rad::WindowDC DC(*this); SetBitmap(m_pDoc->CreateBitmap(DC, m_bg)); } break; case ID_BACKGROUND_BLACK: m_bg = CImgViewerDoc::BG_BLACK; if (m_pDoc != nullptr) { rad::WindowDC DC(*this); SetBitmap(m_pDoc->CreateBitmap(DC, m_bg)); } break; case ID_BACKGROUND_WHITE: m_bg = CImgViewerDoc::BG_WHITE; if (m_pDoc != nullptr) { rad::WindowDC DC(*this); SetBitmap(m_pDoc->CreateBitmap(DC, m_bg)); } break; case ID_BACKGROUND_MAGENTA: m_bg = CImgViewerDoc::BG_MAGENTA; if (m_pDoc != nullptr) { rad::WindowDC DC(*this); SetBitmap(m_pDoc->CreateBitmap(DC, m_bg)); } break; default: return WindowBitmapView::OnCommand(NotifyCode, ID, hWnd); } return 0; } LRESULT OnMouseWheel(int Flags, short Distance, POINTS Point) override { if ((Flags & MK_CONTROL) == 0) { if (Distance > 0) SendMessage(WM_COMMAND, ID_VIEW_ZOOM_INCREASE); else if (Distance < 0) SendMessage(WM_COMMAND, ID_VIEW_ZOOM_DECREASE); // Do not pass on to parent (which Default() does) return 0; } else return WindowBitmapView::OnMouseWheel(Flags, Distance, Point); } CommandStatus::State GetCommandStatus(UINT CommandID) override { CommandStatus::State Status = {}; Status.Known = true; switch (CommandID) { case ID_VIEW_ZOOM_INCREASE: case ID_VIEW_ZOOM_ORIGINAL: case ID_VIEW_ZOOM_DECREASE: case ID_VIEW_ZOOM_TOFIT: if (!IsValid()) Status.Grayed = true; break; case ID_BACKGROUND_CHEQUERED: Status.Checked = m_bg == CImgViewerDoc::BG_CHEQUERED; break; case ID_BACKGROUND_BLACK: Status.Checked = m_bg == CImgViewerDoc::BG_BLACK; break; case ID_BACKGROUND_WHITE: Status.Checked = m_bg == CImgViewerDoc::BG_WHITE; break; case ID_BACKGROUND_MAGENTA: Status.Checked = m_bg == CImgViewerDoc::BG_MAGENTA; break; default: { assert(false); Status.Known = false; } break; } return Status; } CImgViewerDoc* m_pDoc = nullptr; CImgViewerDoc::BgE m_bg = CImgViewerDoc::BG_CHEQUERED; }; class ImgViewerFrame : public FrameWindow, public CommandStatus, public CImgViewerDocListener { protected: typedef FrameWindow Base; public: virtual WindowCreate GetWindowCreate(HINSTANCE hInstance) override { WindowCreate wc = Window::GetWindowCreate(hInstance); wc.hMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_MENU)); return wc; } ImgViewerFrame() { m_Doc.AddListener(this); ImgViewerView* View = new ImgViewerView; m_Doc.AddListener(View); SetView(View); m_StatusChain = View; } void Load(LPCTSTR FileName) { if (FileName) { HCURSOR OldCursor = SetCursor(LoadCursor(NULL, IDC_WAIT)); if (GetStatusWnd().IsAttached()) GetStatusWnd().SetText(_T("Loading..."), SBT_NOBORDERS); m_Doc.Load(FileName); SendMessage(WM_COMMAND, ID_VIEW_ZOOM_TOFIT); SetCursor(OldCursor); } else { m_Doc.Close(); } if (GetStatusWnd().IsAttached()) GetStatusWnd().SetText(_T(""), SBT_NOBORDERS); } protected: virtual void CreateChildren(LPCREATESTRUCT CreateStruct) override { GetToolBarWnd().Create(*this, WS_VISIBLE | WS_CHILD | TBSTYLE_TOOLTIPS | TBSTYLE_WRAPABLE, 1010, CreateStruct->hInstance, IDR_TOOLBAR); GetStatusWnd().Create(*this, WS_VISIBLE | WS_CHILD | SBARS_SIZEGRIP, 100, NULL); FrameWindow::CreateChildren(CreateStruct); } protected: LPCTSTR GetWndClassName(HINSTANCE hInstance) override { RegClass rc(hInstance, APP_NAME, DefWndHandlerWindowProc); rc.SetIcon(IDI_IMGVIEWER); rc.SetBackgroundColorType(COLOR_APPWORKSPACE); return MAKEINTATOM(rc.Register()); } virtual LRESULT OnCreate(LPCREATESTRUCT CreateStruct) override { LRESULT res = Base::OnCreate(CreateStruct); SetAccelerator(g_hAccel); DragAcceptFiles(); AddClipboardFormatListener(GetHWND()); SetTimer(0, 1000); return res; } virtual LRESULT OnSize(UINT Type, int cx, int cy) override { Base::OnSize(Type, cx, cy); // TODO Move into frame window or maybe status chain if (GetStatusWnd().IsAttached()) { int StatusSize[] = { 100, 100 ,100 }; int StatusParts[ARRAYSIZE(StatusSize) + 1]; StatusParts[ARRAYSIZE(StatusParts) - 1] = cx - 5; if (GetStatusWnd().GetWindowLongPtr(GWL_STYLE) & SBARS_SIZEGRIP) StatusParts[ARRAYSIZE(StatusParts) - 1] -= GetSystemMetrics(SM_CXVSCROLL); for (int i = ARRAYSIZE(StatusParts) - 2; i >= 0; --i) { StatusParts[i] = StatusParts[i + 1] - StatusSize[i]; } GetStatusWnd().SetParts(ARRAYSIZE(StatusParts), StatusParts); } return 0; } virtual LRESULT OnDropFiles(HDROP hDrop) override { UINT Count = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0); // for (UINT I = 0; I < Count; ++I) // { // } if (Count > 0) { TCHAR FileName[MAX_PATH]; DragQueryFile(hDrop, 0, FileName, MAX_PATH); Load(FileName); } DragFinish(hDrop); return 0; } virtual LRESULT OnCommand(WORD NotifyCode, WORD ID, HWND hWnd) override { switch (ID) { case ID_FILE_OPEN: { std::tstring Filter; // _T("All Files;*.*;"); Filter += _T("All Files"); Filter += SEP; Filter += _T("*.*"); Filter += SEP; GetFilter(Filter, SEP, FreeImage_FIFSupportsReading); TCHAR FileName[MAX_PATH] = _T(""); _tcscpy_s(FileName, MAX_PATH, m_Doc.GetFileName()); OPENFILENAME ofn = { sizeof(OPENFILENAME) }; ofn.hwndOwner = GetHWND(); ofn.hInstance = g_hInstance; ofn.lpstrFilter = Filter.c_str(); ofn.nFilterIndex = 1; ofn.lpstrFile = FileName; ofn.nMaxFile = MAX_PATH; ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY; if (GetOpenFileName(&ofn) != 0) { Load(ofn.lpstrFile); } } break; case ID_FILE_SAVE: m_Doc.Save(); break; case ID_FILE_SAVE_AS: { TCHAR FileName[MAX_PATH] = _T(""); _tcscpy_s(FileName, MAX_PATH, m_Doc.GetFileName()); std::tstring Filter; int Index = GetFilter(Filter, SEP, FreeImage_FIFSupportsWriting, FreeImage_GetFIFFromFilename(FileName)); OPENFILENAME ofn = { sizeof(OPENFILENAME) }; ofn.hwndOwner = GetHWND(); ofn.hInstance = g_hInstance; // ofn.lpstrFilter = "Windows Bitmap\0*.BMP\0JPEG Standard\0*.JPE;*.JPG;*.JPEG;*.JFIF;*.JIF\0Portable Bitmap\0*.PBM\0Portable Graymap\0*.PGM\0Portable Network Graphics file\0*.PNG\0Portable Pixelmap\0*.PPM\0Tagged Image File Format\0*.TIF;*.TIFF\0"; ofn.lpstrFilter = Filter.c_str(); ofn.lpstrFile = FileName; ofn.nFilterIndex = Index; ofn.nMaxFile = MAX_PATH; ofn.Flags = OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST | OFN_SHAREAWARE | OFN_HIDEREADONLY; if (GetSaveFileName(&ofn) != 0) { //FREE_IMAGE_FORMAT format = FreeImage_GetFIFByIndex(ofn.nFilterIndex - 1); //FREE_IMAGE_FORMAT format = static_cast<FREE_IMAGE_FORMAT>(ofn.nFilterIndex - 1); FREE_IMAGE_FORMAT format = FreeImage_GetFIFFromFilename(ofn.lpstrFile); if (ofn.nFileExtension == 0) { format = GetFilterFromIndex(FreeImage_FIFSupportsWriting, ofn.nFilterIndex); _tcscat_s(ofn.lpstrFile, MAX_PATH, _T(".")); _tcscat_s(ofn.lpstrFile, MAX_PATH, FreeImage_GetFormatFromFIF(format)); } else if (ofn.lpstrFile[ofn.nFileExtension] == '\0') { format = GetFilterFromIndex(FreeImage_FIFSupportsWriting, ofn.nFilterIndex); _tcscpy_s(ofn.lpstrFile + ofn.nFileExtension, MAX_PATH - ofn.nFileExtension, FreeImage_GetFormatFromFIF(format)); } m_Doc.SaveAs(ofn.lpstrFile, format); } } break; case ID_FILE_REVERT: { TCHAR FileName[MAX_PATH]; _tcscpy_s(FileName, MAX_PATH, m_Doc.GetFileName()); Load(FileName); } break; case ID_FILE_CLOSE: Load(NULL); break; case ID_FILE_EXIT: PostMessage(WM_CLOSE); break; case ID_EDIT_COPY: m_Doc.CopyToClipboard(*this); break; case ID_EDIT_PASTE: m_Doc.PasteFromClipboard(*this); break; case ID_IMAGE_CONVERT_TO8BITS: m_Doc.ConvertTo8Bits(); break; case ID_IMAGE_CONVERT_TO16BITS: m_Doc.ConvertTo16Bits(); break; case ID_IMAGE_CONVERT_TO24BITS: m_Doc.ConvertTo24Bits(); break; case ID_IMAGE_CONVERT_TO32BITS: m_Doc.ConvertTo32Bits(); break; case ID_IMAGE_COLOURQUANTIZE: { ColourQuantizeDlg dlg; if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.ColorQuantize(dlg.GetMethod()); } break; case ID_IMAGE_DITHER: { DitherDlg dlg; if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.Dither(dlg.GetMethod()); } break; case ID_IMAGE_RESCALE: { RescaleDlg dlg(m_Doc.GetWidth(), m_Doc.GetHeight()); if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.Rescale(dlg.GetWidth(), dlg.GetHeight(), dlg.GetMethod()); } break; case ID_IMAGE_ROTATE: { DoubleDlg dlg(IDD_ROTATE, IDC_ANGLE); if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.Rotate(dlg.GetDouble()); } break; case ID_FLIP_HORIZONTAL: { m_Doc.FlipHorizontal(); } break; case ID_FLIP_VERTICAL: { m_Doc.FlipVertical(); } break; case ID_IMAGE_INVERT: { m_Doc.Invert(); } break; case ID_IMAGE_BRIGHTNESS: { DoubleDlg dlg(IDD_BRIGHTNESS, IDC_PERCENTAGE); if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.Brightness(dlg.GetDouble()); } break; case ID_IMAGE_CONTRAST: { DoubleDlg dlg(IDD_CONTRAST, IDC_PERCENTAGE); if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.Contrast(dlg.GetDouble()); } break; case ID_IMAGE_GAMMA: { DoubleDlg dlg(IDD_GAMMA, IDC_GAMMA); if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) m_Doc.Gamma(dlg.GetDouble()); } break; case ID_IMAGE_RECOLOUR: { RecolourDlg dlg; if (dlg.DoModal(GetHWND(), g_hInstance) == IDOK) { m_Doc.Recolour(dlg.GetSourceColour(), dlg.GetDestColour(), dlg.GetTolerance()); } } break; case ID_VIEW_TOOLBAR: // TODO Move into FrameWindow or maybe ToolBarWndChain GetToolBarWnd().ShowWindow(GetToolBarWnd().IsWindowVisible() ? SW_HIDE : SW_SHOW); SizeView(); break; case ID_VIEW_STATUS_BAR: // TODO Move into FrameWindow or maybe StatusBarWndChain GetStatusWnd().ShowWindow(GetStatusWnd().IsWindowVisible() ? SW_HIDE : SW_SHOW); SizeView(); break; case ID_PAGE_NEXT: m_Doc.NextPage(); SendMessage(WM_COMMAND, ID_VIEW_ZOOM_TOFIT); break; case ID_PAGE_PREV: m_Doc.PrevPage(); SendMessage(WM_COMMAND, ID_VIEW_ZOOM_TOFIT); break; case ID_HELP_ABOUT: { ImgViewerAboutDlg ad(g_hInstance); ad.DoModal(GetHWND(), g_hInstance); } break; default: return Base::OnCommand(NotifyCode, ID, hWnd); } return 0; } LRESULT OnTimer(UINT ID, TIMERPROC* TimerProc) override { if (m_Doc.IsValid() && !m_Doc.IsModified() && (m_Doc.GetFileName()[0] != '\0')) { m_Doc.CheckFileTime(); #if 0 // TODO Auto revert. Need to check its not still be written to. if (m_Doc.IsModified()) { TCHAR FileName[MAX_PATH]; _tcscpy_s(FileName, MAX_PATH, m_Doc.GetFileName()); Load(FileName); } #endif } return Base::OnTimer(ID, TimerProc); } LRESULT OnMessage(UINT Message, WPARAM wParam, LPARAM lParam) override { if (Message == WM_CLIPBOARDUPDATE) { UpdateToolBarStatus(); } return Base::OnMessage(Message, wParam, lParam); } public: // CImgViewerDocListener void ImgViewerDocMsg(CImgViewerDoc* pDoc, int Msg) override { pDoc; // UNUSED assert(pDoc == &m_Doc); if ((Msg & IVDL_NAME_CHANGED) || (Msg & IVDL_MODIFIED_CHANGED)) { if (m_Doc.IsValid()) { LPCTSTR FileName = m_Doc.GetFileName(); LPCTSTR FileNameStart = FileName + _tcslen(FileName); while (FileNameStart > FileName) { if (*FileNameStart == '\\') { ++FileNameStart; break; } --FileNameStart; } TCHAR WndTitle[1024]; _tcscpy_s(WndTitle, ARRAYSIZE(WndTitle), FileNameStart); if (m_Doc.IsModified()) _tcscat_s(WndTitle, ARRAYSIZE(WndTitle), _T("*")); _tcscat_s(WndTitle, ARRAYSIZE(WndTitle), _T(" - ")); _tcscat_s(WndTitle, ARRAYSIZE(WndTitle), APP_NAME); SetWindowText(WndTitle); } else { SetWindowText(APP_NAME); } UpdateToolBarStatus(); } if (Msg & IVDL_SIZE_CHANGED) { if (GetStatusWnd().IsAttached()) { if (m_Doc.IsValid()) { TCHAR Text[1024]; _stprintf_s(Text, 1024, _T("%d x %d x %d"), m_Doc.GetWidth(), m_Doc.GetHeight(), m_Doc.GetBPP()); GetStatusWnd().SetText(Text, 0, 3); int ColorType = m_Doc.GetColorType(); if (ColorType == FIC_RGB) _tcscpy_s(Text, 1024, _T("RGB")); else if (ColorType == FIC_PALETTE) _tcscpy_s(Text, 1024, _T("PALETTE")); else if (ColorType == FIC_RGBALPHA) _tcscpy_s(Text, 1024, _T("RGBA")); else if (ColorType == FIC_CMYK) _tcscpy_s(Text, 1024, _T("CMYK")); else _tcscpy_s(Text, 1024, _T("")); GetStatusWnd().SetText(Text, 0, 2); _stprintf_s(Text, 1024, _T("%d/%d"), m_Doc.GetPage() + 1, m_Doc.GetNumPages()); GetStatusWnd().SetText(Text, 0, 1); } else { GetStatusWnd().SetText(_T(""), 0, 1); GetStatusWnd().SetText(_T(""), 0, 2); GetStatusWnd().SetText(_T(""), 0, 3); } } UpdateToolBarStatus(); // When page changes } } void ImgViewerDocError(CImgViewerDoc* /*pDoc*/, const std::string& Msg) override { MessageBoxA(GetHWND(), Msg.c_str(), APP_NAME_A, MB_OK | MB_ICONERROR); } public: // CCommandStatus CommandStatus::State GetCommandStatus(UINT CommandID) override { CommandStatus::State Status = {}; Status.Known = true; switch (CommandID) { case ID_FILE_OPEN: case ID_FILE_EXIT: case ID_HELP_ABOUT: Status.Known = true; break; case ID_FILE_CLOSE: if (!m_Doc.IsValid()) Status.Grayed = true; break; case ID_FILE_SAVE: if (!m_Doc.IsValid() || !m_Doc.IsModified() || !m_Doc.CanSave()) Status.Grayed = true; break; case ID_FILE_SAVE_AS: if (!m_Doc.IsValid()) Status.Grayed = true; break; case ID_FILE_REVERT: if (!m_Doc.IsValid() || !m_Doc.IsModified() || (m_Doc.GetFileName()[0] == '\0')) Status.Grayed = true; break; case ID_EDIT_COPY: if (!m_Doc.IsValid()) Status.Grayed = true; break; case ID_EDIT_PASTE: if (!m_Doc.CanPasteFromClipboard(*this)) Status.Grayed = true; break; case ID_IMAGE_CONVERT_TO8BITS: case ID_IMAGE_CONVERT_TO16BITS: case ID_IMAGE_CONVERT_TO24BITS: case ID_IMAGE_CONVERT_TO32BITS: case ID_IMAGE_COLOURQUANTIZE: case ID_IMAGE_DITHER: case ID_IMAGE_RESCALE: case ID_IMAGE_ROTATE: case ID_FLIP_HORIZONTAL: case ID_FLIP_VERTICAL: case ID_IMAGE_INVERT: case ID_IMAGE_BRIGHTNESS: case ID_IMAGE_CONTRAST: case ID_IMAGE_GAMMA: case ID_IMAGE_RECOLOUR: if (!m_Doc.IsValid()) Status.Grayed = true; break; case ID_PAGE_NEXT: Status.Grayed = !m_Doc.IsValid() || (m_Doc.GetPage() + 1) >= m_Doc.GetNumPages(); break; case ID_PAGE_PREV: Status.Grayed = !m_Doc.IsValid() || m_Doc.GetPage() <= 0; break; case ID_VIEW_TOOLBAR: // TODO Move GetCommandStatus into FrameWindow??? // TODO Move into FrameWindow or maybe ToolBarWndChain if (GetToolBarWnd().IsAttached() && GetToolBarWnd().IsWindowVisible()) Status.Checked = true; break; case ID_VIEW_STATUS_BAR: // TODO Move into FrameWindow or maybe StatusBarWndChain if (GetStatusWnd().IsAttached() && GetStatusWnd().IsWindowVisible()) Status.Checked = true; break; default: if (m_StatusChain != nullptr) Status = m_StatusChain->GetCommandStatus(CommandID); else { assert(false); Status.Known = false; } break; } return Status; } private: CImgViewerDoc m_Doc; CommandStatus* m_StatusChain = nullptr; }; int CALLBACK wWinMain( _In_ HINSTANCE hInstance, _In_ HINSTANCE /*hPrevInstance*/, _In_ LPTSTR lpCmdLine, _In_ int nCmdShow ) { InitCommonControls(); TCHAR filename[MAX_PATH] = _T(""); #if 1 lpCmdLine; //UNUSED for (int arg = 1; arg < __argc; ++arg) { _tcscpy_s(filename, __targv[arg]); } #else LPTSTR lpCmdLineNext = lpCmdLine; while (*lpCmdLineNext != _T('\0')) { switch (*lpCmdLineNext) { case _T(' '): case _T('\t'): case _T('\r'): case _T('\b'): ++lpCmdLineNext; break; case _T('\"'): { // TODO Better parsing if it contains _T('\"') in the string LPTSTR lpBegin = lpCmdLineNext + 1; LPTSTR lpEnd = _tcschr(lpBegin, _T('\"')); if (lpEnd != nullptr) { _tcsncpy_s(filename, lpBegin, lpEnd - lpBegin); filename[lpEnd - lpBegin] = _T('\0'); lpCmdLineNext = lpEnd + 1; } else { _tcscpy_s(filename, lpBegin); lpCmdLineNext += _tcslen(lpCmdLineNext); } } break; default: { LPTSTR lpBegin = lpCmdLineNext; LPTSTR lpEnd = _tcschr(lpBegin, _T(' ')); if (lpEnd != nullptr) { _tcsncpy_s(filename, lpBegin, lpEnd - lpBegin); filename[lpEnd - lpBegin] = _T('\0'); lpCmdLineNext = lpEnd + 1; } else { _tcscpy_s(filename, lpBegin); lpCmdLineNext += _tcslen(lpCmdLineNext); } } break; } } #endif g_hInstance = hInstance; g_hAccel = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR)); ImgViewerFrame* w = new ImgViewerFrame; w->CreateWnd(hInstance, APP_NAME); w->ShowWindow(nCmdShow); if (filename[0] != _T('\0')) w->Load(filename); return (int) DoMessageLoop(w->GetHWND(), g_hAccel); }
[ "adamgates84+github@gmail.com" ]
adamgates84+github@gmail.com
a25de45b5ffa40b96a4447213322241f01ae12d6
6e865381397892eeed6584d9660125d6d5fcbc82
/rmw_coredx_cpp/src/rmw_get_node_info_and_types.cpp
94dc771f63280dd4f5f42cda6a060237fdae6a99
[ "Apache-2.0" ]
permissive
sgermanserrano/rmw_coredx
576096dc4b9c314b1526b14fff32df0a8b8822c5
9fe0ee15e3e6af3e02a03c5f7813bfdd8e1179d1
refs/heads/master
2020-07-20T00:45:08.001985
2019-05-04T21:34:17
2019-05-04T21:34:17
206,541,673
0
0
Apache-2.0
2019-09-05T10:55:17
2019-09-05T10:55:16
null
UTF-8
C++
false
false
8,411
cpp
// Copyright 2015 Twin Oaks Computing, Inc. // Modifications copyright (C) 2017-2018 Twin Oaks Computing, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifdef CoreDX_GLIBCXX_USE_CXX11_ABI_ZERO #define _GLIBCXX_USE_CXX11_ABI 0 #endif #include <rmw/rmw.h> #include <rmw/types.h> #include <rmw/error_handling.h> #include <rmw/get_node_info_and_types.h> #if defined(__cplusplus) extern "C" { #endif /* ************************************************ * Return a list of subscribed topic names and their types. * * This function returns a list of subscribed topic names and their types. * * The node parameter must not be `NULL`, and must point to a valid node. * * The topic_names_and_types parameter must be allocated and zero initialized. * The topic_names_and_types is the output for this function, and contains * allocated memory. * Therefore, it should be passed to rmw_names_and_types_fini() when * it is no longer needed. * Failing to do so will result in leaked memory. * * \param[in] node the handle to the node being used to query the ROS graph * \param[in] allocator allocator to be used when allocating space for strings * \param[in] node_name the name of the node to get information for * \param[in] node_namespace the namespace of the node to get information for * \param[in] no_demangle if true, list all topics without any demangling * \param[out] topic_names_and_types list of topic names and their types the node_name is subscribed to * \return `RMW_RET_OK` if the query was successful, or * \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or * \return `RMW_RET_ERROR` if an unspecified error occurs. */ rmw_ret_t rmw_get_subscriber_names_and_types_by_node( const rmw_node_t * node, rcutils_allocator_t * allocator, const char * node_name, const char * node_namespace, bool demangle, rmw_names_and_types_t * topic_names_and_types) { if (!node) { RMW_SET_ERROR_MSG("node handle is null"); return RMW_RET_INVALID_ARGUMENT; } if (!allocator) { RMW_SET_ERROR_MSG("allocator is null"); return RMW_RET_INVALID_ARGUMENT; } if (!node_name) { RMW_SET_ERROR_MSG("node_name is null"); return RMW_RET_INVALID_ARGUMENT; } if (!node_namespace) { RMW_SET_ERROR_MSG("node_namespace is null"); return RMW_RET_INVALID_ARGUMENT; } if (!topic_names_and_types) { RMW_SET_ERROR_MSG("topic_names_and_types is null"); return RMW_RET_INVALID_ARGUMENT; } /* Is this intended to answer for only 'local' (locally created) nodes or for any/all discovered node[s] too? */ /* NOT YET IMPLEMENTED */ return RMW_RET_ERROR; } /* ************************************************ * Return a list of published topic names and their types. * This function returns a list of published topic names and their types. * * The node parameter must not be `NULL`, and must point to a valid node. * * The topic_names_and_types parameter must be allocated and zero initialized. * The topic_names_and_types is the output for this function, and contains * allocated memory. * Therefore, it should be passed to rmw_names_and_types_fini() when * it is no longer needed. * Failing to do so will result in leaked memory. * * \param[in] node the handle to the node being used to query the ROS graph * \param[in] allocator allocator to be used when allocating space for strings * \param[in] node_name the name of the node to get information for * \param[in] node_namespace the namespace of the node to get information for * \param[in] no_demangle if true, list all topics without any demangling * \param[out] topic_names_and_types list of topic names and their types the node_name is publishing * \return `RMW_RET_OK` if the query was successful, or * \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or * \return `RMW_RET_ERROR` if an unspecified error occurs. */ rmw_ret_t rmw_get_publisher_names_and_types_by_node( const rmw_node_t * node, rcutils_allocator_t * allocator, const char * node_name, const char * node_namespace, bool demangle, rmw_names_and_types_t * topic_names_and_types ) { if (!node) { RMW_SET_ERROR_MSG("node handle is null"); return RMW_RET_INVALID_ARGUMENT; } if (!allocator) { RMW_SET_ERROR_MSG("allocator is null"); return RMW_RET_INVALID_ARGUMENT; } if (!node_name) { RMW_SET_ERROR_MSG("node_name is null"); return RMW_RET_INVALID_ARGUMENT; } if (!node_namespace) { RMW_SET_ERROR_MSG("node_namespace is null"); return RMW_RET_INVALID_ARGUMENT; } if (!topic_names_and_types) { RMW_SET_ERROR_MSG("topic_names_and_types is null"); return RMW_RET_INVALID_ARGUMENT; } /* Is this intended to answer for only 'local' (locally created) nodes or for any/all discovered node[s] too? */ /* NOT YET IMPLEMENTED */ return RMW_RET_ERROR; } /* ************************************************ * Return a list of service topic names and their types. * This function returns a list of service topic names and their types. * * The node parameter must not be `NULL`, and must point to a valid node. * * The topic_names_and_types parameter must be allocated and zero initialized. * The topic_names_and_types is the output for this function, and contains * allocated memory. * Therefore, it should be passed to rmw_names_and_types_fini() when * it is no longer needed. * Failing to do so will result in leaked memory. * * \param[in] node the handle to the node being used to query the ROS graph * \param[in] allocator allocator to be used when allocating space for strings * \param[in] node_name the name of the node to get information for * \param[in] node_namespace the namespace of the node to get information for * \param[out] topic_names_and_types list of topic names and their types the node_name has created a service for * \return `RMW_RET_OK` if the query was successful, or * \return `RMW_RET_INVALID_ARGUMENT` if the node is invalid, or * \return `RMW_RET_INVALID_ARGUMENT` if any arguments are invalid, or * \return `RMW_RET_BAD_ALLOC` if memory allocation fails, or * \return `RMW_RET_ERROR` if an unspecified error occurs. */ rmw_ret_t rmw_get_service_names_and_types_by_node( const rmw_node_t * node, rcutils_allocator_t * allocator, const char * node_name, const char * node_namespace, rmw_names_and_types_t * service_names_and_types) { if (!node) { RMW_SET_ERROR_MSG("node handle is null"); return RMW_RET_INVALID_ARGUMENT; } if (!allocator) { RMW_SET_ERROR_MSG("allocator is null"); return RMW_RET_INVALID_ARGUMENT; } if (!node_name) { RMW_SET_ERROR_MSG("node_name is null"); return RMW_RET_INVALID_ARGUMENT; } if (!node_namespace) { RMW_SET_ERROR_MSG("node_namespace is null"); return RMW_RET_INVALID_ARGUMENT; } if (!service_names_and_types) { RMW_SET_ERROR_MSG("service_names_and_types is null"); return RMW_RET_INVALID_ARGUMENT; } /* Is this intended to answer for only 'local' (locally created) nodes or for any/all discovered node[s] too? */ /* NOT YET IMPLEMENTED */ return RMW_RET_ERROR; } #if defined(__cplusplus) } #endif
[ "ctucker@twinoakscomputing.com" ]
ctucker@twinoakscomputing.com
93680856a0f1d303aeda4ca5416c1c0785f07996
23e40c63da98484e7a9775f95dc43ca254208457
/containters/other/valarray/5 indirect subsets.cpp
108dd433e593cef5eb8198964d8a965cbb878d50
[]
no_license
faxinwang/cppNotes
92309162625fc496ab95c0864ae526c687827aac
f190c1b90063dd01d28374dc6cb5843ad4c0e36c
refs/heads/master
2021-01-15T09:19:39.983474
2017-08-07T12:15:15
2017-08-07T12:15:15
99,574,395
1
0
null
null
null
null
UTF-8
C++
false
false
989
cpp
#include<iostream> #include<valarray> using namespace std; //print valarray line-by-line template<class T> void printValarray(const valarray<T>& va,int num){ for(int i=0;i<va.size()/num;++i){ for(int j=0;j<num;++j){ cout<<va[i*num+j]<<' '; } cout<<endl; } cout<<endl; } int main(){ valarray<int> va(12); for(int i=0;i<12;++i){ va[i]=(i+1); } printValarray(va,4); //create array of indexes //-note: element type has to be size_t valarray<size_t> idx(4); idx[0]=8; idx[1]=0; idx[2]=3; idx[3]=7; //use array of indexes to print he ninth,first,fourth,and eighth elements printValarray(valarray<int>(va[idx]),4); //change the first and fourth elements and print them again indirectly va[0]=11; va[3]=44; printValarray(valarray<int>(va[idx]),4); //now select the second,third,sixth,and ninth elements and assign 99 to them idx[0]=1; idx[1]=2; idx[2]=5; idx[3]=8; va[idx]=99; //print the whole valarray again printValarray(va,4); return 0; }
[ "www.wjx.gg.66@qq.com" ]
www.wjx.gg.66@qq.com
25a00b54e4eddb0210cc9ef0acccee05e029e245
da9e7b2db881db1c24d56ffa9b4c007a05192b88
/Game/ClientShellDLL/GameClientShell.h
509fd68582a8e332b8d32f94f83104ef30d83bd8
[]
no_license
URAMetroid/contract-jack
15057033594297168ee15a2e0d85c013d7fee5af
edb7f65f7d16f180f343cde7ac4f8399b030b399
refs/heads/master
2020-03-14T14:12:05.195353
2018-05-01T06:01:47
2018-05-01T06:01:47
131,648,836
0
0
null
null
null
null
UTF-8
C++
false
false
13,159
h
// ----------------------------------------------------------------------- // // // MODULE : GameClientShell.h // // PURPOSE : Game Client Shell - Definition // // CREATED : 9/18/97 // // (c) 1997-2003 Monolith Productions, Inc. All Rights Reserved // // ----------------------------------------------------------------------- // #ifndef __GAME_CLIENT_SHELL_H__ #define __GAME_CLIENT_SHELL_H__ #include "iclientshell.h" #include "iltfontmanager.h" #include "ClientServerShared.h" #include "SFXMgr.h" #include "Music.h" #include "GlobalClientMgr.h" #include "VarTrack.h" #include "AttachButeMgr.h" #include "SharedMovement.h" #include "NetDefs.h" #include "ClientFXMgr.h" #include "CheatMgr.h" #include "LightScaleMgr.h" #include "ScreenTintMgr.h" #include "InterfaceMgr.h" #include "PlayerMgr.h" #include "VersionMgr.h" #include "ClientSoundMgr.h" #include "MsgIds.h" class CSpecialFX; class CCameraFX; class CGameTexMgr; class CInterfaceMgr; class CPlayerMgr; class CMissionMgr; class CClientSaveLoadMgr; class CClientWeaponAllocator; class ClientMultiplayerMgr; class CClientTrackedNodeMgr; class CPerformanceTest; class CGameClientShell; extern CGameClientShell* g_pGameClientShell; class CGameClientShell : public IClientShellStub { public: CGameClientShell(); ~CGameClientShell(); //************************************************************************** //general game stuff //************************************************************************** public: void OnEnterWorld(); void OnExitWorld(); void StartPerformanceTest(); void StopPerformanceTest(); void AbortPerformanceTest(); //cancel out early bool IsRunningPerformanceTest() const { return m_bRunningPerfTest; } CPerformanceTest* GetLastPerformanceTest() { return m_pPerformanceTest; } virtual void PauseGame(bool bPause, bool bPauseSound=false); float GetFrameTime() { return m_fFrameTime; } bool IsGamePaused() const { return m_bGamePaused || m_bServerPaused; } bool IsServerPaused() const { return m_bServerPaused; } bool IsFirstUpdate() const { return m_bFirstUpdate; } void MinimizeMainWindow() { m_bMainWindowMinimized = true; } bool IsMainWindowMinimized() { return m_bMainWindowMinimized; } void RestoreMainWindow() { m_bMainWindowMinimized = false; } CMusic* GetMusic() { return &m_Music; } void RestoreMusic(); void InitSound(); void UpdateGoreSettings(); void ClearAllScreenBuffers(); bool HasJoystick(); bool IsJoystickEnabled(); bool EnableJoystick(); bool HasGamepad(); bool IsGamepadEnabled(); bool EnableGamepad(); void SetInputState(bool bAllowInput); void CSPrint(char* msg, ...); void BuildClientSaveMsg(ILTMessage_Write *pMsg, SaveDataState eSaveDataState); void UnpackClientSaveMsg(ILTMessage_Read *pMsg); void PreLoadWorld(const char *pWorldName); // Mouse Messages static void OnChar(HWND hWnd, char c, int rep); static void OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags); static void OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); static void OnLButtonDblClick(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); static void OnRButtonUp(HWND hwnd, int x, int y, UINT keyFlags); static void OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); static void OnRButtonDblClick(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); static void OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags); bool IsRendererInitted() {return m_bRendererInit;} void SetFarZ(int nFarZ); void ResetDynamicWorldProperties(LTBOOL bUseWorldFog = LTTRUE); virtual CInterfaceMgr* GetInterfaceMgr() { return NULL; } virtual CPlayerMgr* GetPlayerMgr() = 0; virtual CClientWeaponAllocator const *GetClientWeaponAllocator() const = 0; LTBOOL IsWorldLoaded() const { return m_bInWorld; } void SetWorldNotLoaded() { m_bInWorld = LTFALSE; } // Are we able to use the radar functionality virtual bool ShouldUseRadar( ) { return false; } // Do whatever we need to do after the level loads, but before the first update. // This happens while the loading screen is still visible so we're not stuck at // a black screen. virtual void PostLevelLoadFirstUpdate(); // Called when done with loading and postloading screens. void SendClientLoadedMessage( ); // Check the server's status on loading the world. bool IsServerLoaded( ) { return ( m_eSwitchingWorldsState == eSwitchingWorldsStateWaitForClient || m_eSwitchingWorldsState == eSwitchingWorldsStateFinished ); } SwitchingWorldsState GetSwitchingWorldsState( ) { return m_eSwitchingWorldsState; } CClientFXMgr* GetClientFXMgr() { return &m_ClientFXMgr; } bool LauncherServerApp( char const* pszProfileFile ); // Launchers patchupdate given URL to patch file. bool LaunchPatchUpdate( char const* pszUrl ); // Runs a start command. bool LaunchFromString( char const* pszFile, char const* pszParameters ); protected : uint32 OnEngineInitialized(RMode *pMode, LTGUID *pAppGuid); void OnEngineTerm(); void OnEvent(uint32 dwEventID, uint32 dwParam); LTRESULT OnObjectMove(HOBJECT hObj, bool bTeleport, LTVector *pPos); LTRESULT OnObjectRotate(HOBJECT hObj, bool bTeleport, LTRotation *pNewRot); LTRESULT OnTouchNotify(HOBJECT hMain, CollisionInfo *pInfo, float forceMag); void PreUpdate(); void Update(); void PostUpdate(); void UpdatePlaying(); void OnCommandOn(int command); void OnCommandOff(int command); void OnKeyDown(int key, int rep); void OnKeyUp(int key); void OnObjectRemove(HLOCALOBJ hObj); virtual void OnMessage(ILTMessage_Read *pMsg); void OnModelKey(HLOCALOBJ hObj, ArgList *pArgs); void OnPlaySound(PlaySoundInfo* pPlaySoundInfo); void RenderCamera(bool bDrawInterface = true); void DontRenderCamera(); void OnLockRenderer(); void OnUnLockRenderer(); private: //************************************************************************** // settings //************************************************************************** public: void SetDifficulty(GameDifficulty e); GameDifficulty GetDifficulty() {return m_eDifficulty;} GameType GetGameType() {return m_eGameType;} void SetGameType(GameType eGameType); private: //************************************************************************** //Debug stuff //************************************************************************** public: void ToggleDebugCheat(CheatCode eCheat); void ShowPlayerPos(bool bShow=true) { m_bShowPlayerPos = bShow; } void ShowCamPosRot(bool bShow=true) { m_bShowCamPosRot = bShow; } void DebugWriteCameraPosition(); private: //************************************************************************** //SFX stuff //************************************************************************** public: CSFXMgr* GetSFXMgr() { return &m_sfxMgr; } void FlashScreen(const LTVector &vFlashColor, const LTVector &vPos, float fFlashRange, float fTime, float fRampUp, float fRampDown, bool bForce=false); void HandleWeaponPickup(uint8 nWeaponId, bool bSuccess, bool bActivatingPickup ); void HandleGearPickup(uint8 nGearId, bool bSucces, bool bActivatingPickup ); void HandleModPickup(uint8 nModId, bool bSucces, bool bActivatingPickup ); void HandleAmmoPickup(uint8 nAmmoId, int nAmmoCount, bool bSuccess, bool bActivatingPickup, uint8 nWeaponId = WMGR_INVALID_ID); CDamageFXMgr* GetDamageFXMgr() { return &m_DamageFXMgr; } void ClearScreenTint(); CScreenTintMgr* GetScreenTintMgr() { return &m_ScreenTintMgr; } CLightScaleMgr* GetLightScaleMgr() { return &m_LightScaleMgr; } protected : void SpecialEffectNotify(HLOCALOBJ hObj, ILTMessage_Read *pMsg); private : CMissionMgr* m_pMissionMgr; CClientSaveLoadMgr* m_pClientSaveLoadMgr; // Same as g_pClientSaveLoadMgr CGlobalClientMgr m_GlobalMgr; // Contains global mgrs CDamageFXMgr m_DamageFXMgr; // Same as g_pDamageFxMgr bool m_bFlashScreen; // Are we tinting the screen for a screen flash float m_fFlashTime; // Time screen stays at tint color float m_fFlashStart; // When did the flash start float m_fFlashRampUp; // Ramp up time float m_fFlashRampDown; // Ramp down time LTVector m_vFlashColor; // Tint color GameDifficulty m_eDifficulty; // Difficulty of this game GameType m_eGameType; // NOTE: The following data members do not need to be saved / loaded // when saving games. Any data members that don't need to be saved // should be added here (to keep them together)... float m_fFrameTime; // Current frame delta bool m_bRestoringGame; // Are we restoring a saved game bool m_bMainWindowMinimized; // Is the main window minimized? bool m_bTweakingWeapon; // Helper, move player-view weapon around bool m_bTweakingWeaponMuzzle; // Helper, move player-view weapon muzzle around bool m_bTweakingWeaponBreachOffset; // Helper, move player-view weapon breach offset around CMusic m_Music; // Music helper variable bool m_bGamePaused; // Is the game paused? bool m_bServerPaused; // Is server paused? SwitchingWorldsState m_eSwitchingWorldsState; // Server's switching world state. bool m_bMainWindowFocus; // Focus bool m_bRendererInit; // Has the renderer been initted? // Interface stuff... CCheatMgr m_cheatMgr; // Same as g_pCheatMgr CLightScaleMgr m_LightScaleMgr; // Class to handle light scale changes CScreenTintMgr m_ScreenTintMgr; HLOCALOBJ m_hBoundingBox; bool m_bFirstUpdate; // Is this the first update // Reverb parameters... bool m_bUseReverb; float m_fReverbLevel; float m_fNextSoundReverbTime; LTVector m_vLastReverbPos; // Special FX management... CSFXMgr m_sfxMgr; CClientFXMgr m_ClientFXMgr; // This handels the Client fx created with FxED bool m_bShowPlayerPos; // Display player's position. bool m_bShowCamPosRot; // Display camera's position/rotation. bool m_bAdjustLightScale; // Adjusting the global light scale bool m_bAdjustLightAdd; // Adjusting the camera light add bool m_bAdjustFOV; // Adjusting the FOV bool m_bAdjust1stPersonCamera; // Adjust the 1st person camera offset CClientTrackedNodeMgr* m_pClientTrackedNodeMgr; // Private helper functions... void FirstUpdate(); void MirrorSConVar(char *pSVarName, char *pCVarName); void Adjust1stPersonCamera(); void UpdateWeaponPosition(); void UpdateWeaponMuzzlePosition(); void UpdateWeaponBreachOffset(); void ResetCharacterFXSoundData(); SOUNDFILTER* GetDynamicSoundFilter(); void AdjustLightScale(); void AdjustLightAdd(); void AdjustFOV(); void AdjustMenuPolygrid(); void AdjustHeadBob(); void UpdateDebugInfo(); // Handle OnMessage Type (message) void HandleMsgChangingLevels (ILTMessage_Read*); void HandleMsgSFXMessage (ILTMessage_Read*); void HandleMsgPlayerLevelTransition (ILTMessage_Read*); void HandleMsgMusic (ILTMessage_Read*); void HandleMsgPlayerLoadClient (ILTMessage_Read*); void HandleMsgPlayerSingleplayerInit (ILTMessage_Read*); void HandleMsgServerError (ILTMessage_Read*); void HandleMsgBPrint (ILTMessage_Read*); void HandleMsgDefault (ILTMessage_Read*); void HandleMsgProjectile (uint8, ILTMessage_Read*); void HandleMsgPauseGame (ILTMessage_Read*); void HandleMsgSwitchingWorldState (ILTMessage_Read*); void HandleMsgMultiplayerOptions (ILTMessage_Read*); void InitSinglePlayer(); // Camera helper functions... void UpdateScreenFlash(); void CreateBoundingBox(); void UpdateBoundingBox(); bool UpdateCheats(); // Speed Hack security monitor void UpdateSpeedMonitor(); // Debugging variables... enum Constants { kMaxDebugStrings = 3 }; // Debug string screen locations... enum DSSL { eDSBottomLeft, eDSBottomRight }; void SetDebugString(char* strMessage, DSSL eLoc=eDSBottomRight, uint8 nLine=0); void ClearDebugStrings(); void RenderDebugStrings(); CUIPolyString* m_pLeftDebugString[kMaxDebugStrings]; CUIPolyString* m_pRightDebugString[kMaxDebugStrings]; // Contains all multiplayer functionality. ClientMultiplayerMgr* m_pClientMultiplayerMgr; // Are we in a world bool m_bInWorld; // Set when we get an oncommandon for quicksave. bool m_bQuickSave; // Speed Hack security monitor variables float m_fInitialServerTime; float m_fInitialLocalTime; uint8 m_nSpeedCheatCounter; // Performance testing variables bool m_bRunningPerfTest; CPerformanceTest *m_pPerformanceTest; bool m_bLaunchedServerApp; }; void DefaultModelHook(ModelHookData *pData, void *pUser); #endif // __GAME_CLIENT_SHELL_H__
[ "38868931+URAMetroid@users.noreply.github.com" ]
38868931+URAMetroid@users.noreply.github.com
cd9d7c703b3aaa562bacf18854ea038cd22dadef
23b2ddfa8d918011798669ba6ad8eda627656a05
/firmware/slave/slave.ino
1409cdeeb7334f93a6c7f4615349b8edee506d1a
[]
no_license
mattvenn/megadrawbz
3fce5b9ebace8d312fe864e2d6000cb8e4118ec8
e70cd705040a2155a46620a7fb48688d9412808a
refs/heads/master
2021-01-10T07:23:44.166697
2016-04-21T10:41:21
2016-04-21T10:41:21
48,244,553
0
0
null
null
null
null
UTF-8
C++
false
false
5,470
ino
typedef struct { uint8_t command; unsigned int pos; uint8_t cksum; } Slave; typedef struct { uint8_t status; unsigned int data; uint8_t cksum; } Response; //enum SlaveCommand {SLV_LOAD, SLV_SET_POS, SLV_LOAD_P, SLV_LOAD_I, SLV_LOAD_D}; typedef enum {SLV_LOAD, SLV_SET_POS, SLV_LOAD_P, SLV_LOAD_I, SLV_LOAD_D, SLV_GET_POS} SlaveCommand; #define RS485Transmit HIGH #define RS485Receive LOW #include "timer.h" #include "buttons.h" #include "utils.h" #include "pindefs.h" #include <Encoder.h> Encoder myEnc(ENCA,ENCB); #include <SoftwareSerial.h> SoftwareSerial master_serial(SS_RX, SS_TX); // RX, TX const float mm_to_pulse = 1.6985; volatile bool calc = false; //pid globals int pwm = 128; #define MAX_POSREF 65535 unsigned int posref = 0; long curpos = 0; float b0 = 0; float b1 = 0; float b2 = 0; double yn = 0; double ynm1 = 0; float xn = 0; float xnm1 = 0; float xnm2 = 0; float kp = .45; float ki = 0.000; float kd = .25; void setup() { buttons_setup(); setup_timer2(); Serial.begin(115200); master_serial.begin(57600); // 115200 too fast for reliable soft serial pinMode(SSerialTxControl, OUTPUT); digitalWrite(SSerialTxControl, RS485Receive); // Init Transceiver pinMode(FOR, OUTPUT); digitalWrite(FOR,LOW); pinMode(REV, OUTPUT); digitalWrite(REV,LOW); pinMode(LED_STATUS, OUTPUT); pinMode(LED_ERROR, OUTPUT); pinMode(LED_POWER, OUTPUT); digitalWrite(LED_POWER, HIGH); // pid init pid_init(); // turn on interrupts interrupts(); } void pid_init() { b0 = kp+ki+kd; b1 = -kp-2*kd; b2 = kd; yn = 0; ynm1 = 0; xn = 0; xnm1 = 0; xnm2 = 0; } int bad_cksum = 0; int ok = 0; void loop() { switch(buttons_check()) { case IN: if(posref < MAX_POSREF) posref ++; delay(1); break; case OUT: if(posref > 0) posref --; delay(1); break; case HOME: /* while(buttons_check() != LIMIT) drive(HOME_PWM); drive(0); */ posref = 0; myEnc.write(0); break; } if(calc) { calc = false; digitalWrite(LED_STATUS,HIGH); //pid calculation curpos = myEnc.read(); xn = float(posref - curpos); yn = ynm1 + (b0*xn) + (b1*xnm1) + (b2*xnm2); ynm1 = yn; //write pwm values drive(yn); //set previous input and output values xnm1 = xn; xnm2 = xnm1; digitalWrite(LED_STATUS,LOW); } if(master_serial.available() >= sizeof(Slave)) { Slave data; char buf[sizeof(Slave)]; // do something with status? int status = master_serial.readBytes(buf, sizeof(Slave)); //copy buffer to structure memcpy(&data, &buf, sizeof(Slave)); //calculate cksum is ok if(data.cksum != CRC8(buf,sizeof(Slave)-1)) { //ignore broken packet bad_cksum ++; //Serial.println("bad cksum"); return; } //Serial.println("ok!"); //set the servo position switch(data.command) { case SLV_LOAD: //Serial.print("loaded:"); //Serial.println(data.pos); ok ++; posref = data.pos * mm_to_pulse; break; case SLV_SET_POS: //Serial.print("setpos:"); //Serial.println(data.pos); posref = data.pos * mm_to_pulse; myEnc.write(posref); break; case SLV_LOAD_P: kp = data.pos / 1000.0; pid_init(); break; case SLV_LOAD_I: ki = data.pos / 1000.0; pid_init(); break; case SLV_LOAD_D: kd = data.pos / 1000.0; pid_init(); break; case SLV_GET_POS: send_response(SLV_GET_POS, curpos / mm_to_pulse); //Serial.println("sent pos"); break; } } /* leaving this in seems to stop the servo from taking new serial commands until the serial monitor is opened if(Serial.available()) { char cmd = Serial.read(); switch(cmd) { case 'a': Serial.println(ok); Serial.println(bad_cksum); break; case 'b': ok = 0; bad_cksum = 0; break; } } */ } void send_response(uint8_t status, unsigned int data) { //wait for master to release rs485 control line delay(2); Response resp; resp.status = status; resp.data = data; char buf[sizeof(Response)]; memcpy(&buf, &resp, sizeof(Response)); resp.cksum = CRC8(buf,sizeof(Response)-1); memcpy(&buf, &resp, sizeof(Response)); // Enable RS485 Transmit digitalWrite(SSerialTxControl, RS485Transmit); delay(1); for(int b = 0; b < sizeof(Response); b++) master_serial.write(buf[b]); master_serial.flush(); // remove this as it will block? delay(1); // Disable RS485 Transmit digitalWrite(SSerialTxControl, RS485Receive); }
[ "matt@mattvenn.net" ]
matt@mattvenn.net
1f9a2bd78b8efcf9fcf4316a580016ecaf40dfbb
fd00b8dfde18a59d94f6a2ea5f2b5ce8f28cbb1c
/VirtualCopyConstructor.h
cb68bbe865960b62563b982a30308aae7f2a05ee
[]
no_license
amorilio/CExamples
6001faab5481add76ee9c54875e9585cbc3ff253
cdd9071667b7fa3e7697e2bfaddfc9c618a6ef30
refs/heads/master
2021-01-19T08:11:04.214686
2014-08-31T07:59:22
2014-08-31T08:02:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,488
h
// VirtualCopyConstructor.h: interface for the VirtualCopyConstructor class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_VIRTUALCOPYCONSTRUCTOR_H__3C848F2C_36D2_426D_AC64_8C4F5DB66981__INCLUDED_) #define AFX_VIRTUALCOPYCONSTRUCTOR_H__3C848F2C_36D2_426D_AC64_8C4F5DB66981__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include <iostream> using namespace std; class VirtualCopyConstructor { public: VirtualCopyConstructor(); // Ensures to invoke actual object destructor virtual ~VirtualCopyConstructor(); virtual void ChangeAttributes() = 0; // The "Virtual Constructor" static VirtualCopyConstructor *Create(int id); // The "Virtual Copy Constructor" virtual VirtualCopyConstructor *Clone() = 0; }; class Derived1 : public VirtualCopyConstructor { public: Derived1() { cout << "Derived1 created" << endl; } Derived1(const Derived1& rhs) { cout << "Derived1 created by deep copy" << endl; } ~Derived1() { cout << "~Derived1 destroyed" << endl; } void ChangeAttributes() { cout << "Derived1 Attributes Changed" << endl; } VirtualCopyConstructor *Clone() { return new Derived1(*this); } }; class Derived2 : public VirtualCopyConstructor { public: Derived2() { cout << "Derived2 created" << endl; } Derived2(const Derived2& rhs) { cout << "Derived2 created by deep copy" << endl; } ~Derived2() { cout << "~Derived2 destroyed" << endl; } void ChangeAttributes() { cout << "Derived2 Attributes Changed" << endl; } VirtualCopyConstructor *Clone() { return new Derived2(*this); } }; class Derived3 : public VirtualCopyConstructor { public: Derived3() { cout << "Derived3 created" << endl; } Derived3(const Derived3& rhs) { cout << "Derived3 created by deep copy" << endl; } ~Derived3() { cout << "~Derived3 destroyed" << endl; } void ChangeAttributes() { cout << "Derived3 Attributes Changed" << endl; } VirtualCopyConstructor *Clone() { return new Derived3(*this); } }; //// LIBRARY END //// UTILITY SRART class User { public: User() : pVirtualCopyConstructor(0) { // Creates any object of VirtualCopyConstructor heirarchey at runtime int input; cout << "Enter ID (1, 2 or 3): "; cin >> input; while( (input != 1) && (input != 2) && (input != 3) ) { cout << "Enter ID (1, 2 or 3 only): "; cin >> input; } // Create objects via the "Virtual Constructor" pVirtualCopyConstructor = VirtualCopyConstructor::Create(input); } ~User() { if( pVirtualCopyConstructor ) { delete pVirtualCopyConstructor; pVirtualCopyConstructor = 0; } } void Action() { // Duplicate current object VirtualCopyConstructor *pNewVirtualCopyConstructor = pVirtualCopyConstructor->Clone(); // Change its attributes pNewVirtualCopyConstructor->ChangeAttributes(); // Dispose the created object delete pNewVirtualCopyConstructor; } private: VirtualCopyConstructor *pVirtualCopyConstructor; }; #endif // !defined(AFX_VIRTUALCOPYCONSTRUCTOR_H__3C848F2C_36D2_426D_AC64_8C4F5DB66981__INCLUDED_)
[ "amorilio@mail.ru" ]
amorilio@mail.ru
31798cd68e856de2b26597500639eab067c36318
63ffcd2798915ea9b9199cfd1d6ee6de319cff84
/Top Interview Questions Easy/Array/RotateArray.cpp
b477f49edbd56228ccaeb5d01d99e44b51029282
[]
no_license
numenoreon/LeetCode
b8069990d30bda73809e21d304703eec0c979ed6
912fcc4c5f6a2eb8e95db48096d3d8f5e3eb8cf0
refs/heads/master
2021-09-01T16:26:26.190661
2021-08-24T19:49:29
2021-08-24T19:49:29
231,564,913
0
0
null
null
null
null
UTF-8
C++
false
false
353
cpp
class Solution { public: void rotate(vector<int>& nums, int k) { const int N = nums.size(); if (k>=N) k=k%N; int temp=0; vector <int> tempVec(N); for(int i=0; i<N; i++){ tempVec[(i+k)%N]=nums[i]; } for(int i=0; i<N; i++){ nums[i]=tempVec[i]; } } };
[ "54109926+numenoreon@users.noreply.github.com" ]
54109926+numenoreon@users.noreply.github.com
53cd3b926d1e69b1e105120dff50087d7a3d8d48
b10917bf28b039a3a0e37ffc6825bcda1b5bfad4
/PSS_Class_task14/passchecker.cpp
23ab34feef8b4eac50a34e4056d2cf9b1e8037cb
[]
no_license
V-Roman-V/PSS_Class_task14
91452f04aec8324e8aa8e1e33ed7c077723b2404
cb089b582d47be6406c3d200ab0ab332122a0381
refs/heads/master
2023-04-09T18:57:40.785909
2021-04-19T19:54:20
2021-04-19T19:54:20
359,562,207
0
0
null
null
null
null
UTF-8
C++
false
false
1,237
cpp
#include "passchecker.h" void PassChecker::checkSize(const std::string& pass) noexcept(false) { if(pass.size() < MIN_PASS_SIZE) throw TooShortPassword(); } void PassChecker::checkCase(const std::string& pass) noexcept(false) { if(pass.find_first_of( "ABCDEFGHIJKLMNOPQRSTYVWXYZ") == std::string::npos) throw AllInLowerCase(); } void PassChecker::checkChar(const std::string& pass) noexcept(false) { if(pass.find_first_not_of("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTYVWXYZ0123456789") == std::string::npos) throw NoSpecialCharacters(); } void PassChecker::checkPass(const std::string& pass) noexcept { try { checkSize(pass); checkCase(pass); checkChar(pass); std::cout<<"The password is strong."<<std::endl; } catch (const TooShortPassword&) { std::cout<<"The password is too short. Use at least "<<MIN_PASS_SIZE<<" characters."<<std::endl; } catch (const AllInLowerCase&) { std::cout<<"The password is in lowercase. Use at least one character in uppercase."<<std::endl; } catch (const NoSpecialCharacters&) { std::cout<<"The password does not contain special characters. Use at least one of them."<<std::endl; } }
[ "vor.roman.v@gmail.com" ]
vor.roman.v@gmail.com
db1070d60ee76cbc6b76a04cb3088e020ab62808
873889d7a11743e681a6283782ffe44423755af7
/ArtificialNeuralNetwork/ArtificialNeuralNetwork.cpp
a50e2a32504e688ed591f90bff901800e833b6af
[]
no_license
coderofgames/IRIS-flower
6751ae7a9da36695ef6c8988ba345632fd5add6c
aaec7d9719c5998124b37d476366c8217f5f7183
refs/heads/master
2020-08-05T17:09:56.022981
2019-10-12T22:59:38
2019-10-12T22:59:38
67,136,924
0
0
null
null
null
null
UTF-8
C++
false
false
29,929
cpp
// ArtificialNeuralNetwork.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "Timer.h" #include <iostream> #include <vector> #include <algorithm> #include "NeuralNetworks.h" template< class NeuralNetwork > void Compute_IRIS_data_version_2_(int num_iterations, CSV &iris_data, vector<int> &training_set, vector<int> &test_set, vector<int> &indexes, double &time_) { Timer timer; int input_data_size = 1; int num_inputs = 4; int num_hidden = 8; int num_hidden_2 = 3; int num_outputs = 1; // ========================================== matrix input_matrix(1, num_inputs); float output_error = 0.0f; float alpha = 0.3f; float beta = 0.05f; float sum_squared_errors = 0.0f; vector<int> layer_sizes; layer_sizes.push_back(num_inputs); layer_sizes.push_back(num_hidden); layer_sizes.push_back(num_hidden); layer_sizes.push_back(num_hidden_2); NeuralNetwork *neuralNet = new NeuralNetwork(layer_sizes); cout << endl; cout << "Training, please wait ..." << endl; timer.Start(); matrix Cost_Matrix(1, 3); for (int mm = 0; mm < num_iterations; mm++) { for (int q = 0; q < training_set.size(); q++) { // index remap the shuffled set to the original data input_matrix(0, 0) = iris_data.iris_data[training_set[q]][0]; input_matrix(0, 1) = iris_data.iris_data[training_set[q]][1]; input_matrix(0, 2) = iris_data.iris_data[training_set[q]][2]; input_matrix(0, 3) = iris_data.iris_data[training_set[q]][3]; // formulate the correct solution vector matrix expected(1, 3); for (int p = 0; p < 3; p++) { if ((int)iris_data.iris_data[training_set[q]][4] == p) { expected(0, p) = 1.0; } else { expected(0, p) = 0.0; } } // feed forward matrix output = neuralNet->FeedForward(input_matrix); matrix errors = expected - output; matrix errors2 = errors; Cost_Matrix = Cost_Matrix + pow(errors2, 2); //errors = ln(output) * (-1); for (int p = 0; p < errors.NumCols(); p++) { //if (abs(errors(0, p)) > 0.15) { //errors(0, p) = -log(output(0, p));// errors(0, p) * sigmoid_deriv(output(0, p)); errors(0, p) = errors(0, p) * sigmoid_deriv(output(0, p)); } //else errors(0, p) = 0.0f; } // back propagate output neuralNet->BackPropagateErrors(errors); // weight deltas neuralNet->ComputeDeltas(alpha, beta); // update weights neuralNet->UpdateWeights(); } Cost_Matrix = Cost_Matrix / training_set.size(); if ((Cost_Matrix(0, 0) < 0.01) && (Cost_Matrix(0, 1) < 0.01) && (Cost_Matrix(0, 2) < 0.01)) { cout << "finished training because sum of squared errors is low at iteration p: " << mm << endl; break; } Cost_Matrix.ToZero(); } timer.Update(); timer.Stop(); double time_taken = timer.GetTimeDelta(); cout << "Finished training, Total calculation performed in " << time_taken << " seconds" << endl; time_ += time_taken; sum_squared_errors = 0.0f; // used here to count the number of correct guesses for (int q = 0; q < test_set.size(); q++) { input_matrix(0, 0) = iris_data.iris_data[test_set[q]][0]; input_matrix(0, 1) = iris_data.iris_data[test_set[q]][1]; input_matrix(0, 2) = iris_data.iris_data[test_set[q]][2]; input_matrix(0, 3) = iris_data.iris_data[test_set[q]][3]; matrix test_output = neuralNet->FeedForward(input_matrix); if (test_output.NumCols() != 3) cout << "should have more columns" << endl; int actual_type = (int)iris_data.iris_data[test_set[q]][4]; int found_type = 0; if ((test_output(0, 0) > 0.8) && (test_output(0, 1) < 0.2) && (test_output(0, 2) < 0.2)) { found_type = 0; } if ((test_output(0, 0) < 0.2) && (test_output(0, 1) > 0.8) && (test_output(0, 2) < 0.2)) { found_type = 1; } if ((test_output(0, 0) < 0.2) && (test_output(0, 1) < 0.2) && (test_output(0, 2)> 0.8)) { found_type = 2; } // cout << "Test Sample: " << q << ", Found Type: " << found_type << ", Actual Type: " << actual_type << endl; if (found_type == actual_type) sum_squared_errors += 1.0f; } cout << "Finished Test, Total classified correctly of " << test_set.size() << " tested: " << (int)sum_squared_errors << endl; } template< class Layer > void Compute_IRIS_data_version_0_(int num_iterations, CSV &iris_data, vector<int> &training_set, vector<int> &test_set, vector<int> &indexes) { Timer timer; int input_data_size = 1; int num_inputs = 4; int num_hidden = 8; int num_hidden_2 = 3; int num_outputs = 1; // ========================================== matrix input_matrix(1, num_inputs); float output_error = 0.0f; float alpha = 0.5f; float beta = 0.05f; float sum_squared_errors = 0.0f; Layer hidden(num_hidden, num_inputs); hidden.init_random_sample_weights_iris(); Layer hidden_2(num_hidden_2, num_hidden); hidden_2.init_random_sample_weights_iris(); Layer output(num_outputs, num_hidden_2); output.init_random_sample_weights_iris(); // indexes //vector< matrix > output_buffer; cout << endl; cout << "Training, please wait ..." << endl; //return; timer.Start(); // Sleep(2000); float last_sum_squared_errors = 0.0f; int positive_error_delta_count = 0; int negative_error_delta_count = 0; int alternation_count = 0; for (int mm = 0; mm< num_iterations; mm++) { for (int q = 0; q < training_set.size(); q++) { // index remap the shuffled set to the original data input_matrix(0, 0) = iris_data.iris_data[training_set[q]][0]; input_matrix(0, 1) = iris_data.iris_data[training_set[q]][1]; input_matrix(0, 2) = iris_data.iris_data[training_set[q]][2]; input_matrix(0, 3) = iris_data.iris_data[training_set[q]][3]; matrix expected(1, 3); for (int p = 0; p < 3; p++) { if ((int)iris_data.iris_data[training_set[q]][4] == p) { expected(0, p) = 1.0; } else { expected(0, p) = 0.0; } } // feed forward hidden.FeedForward(input_matrix); hidden_2.FeedForward(hidden.neurons_); // compute the cost function for this training sample matrix errors = expected - hidden_2.neurons_; for (int p = 0; p < errors.NumCols(); p++) { if (abs(errors(0, p)) > 0.2) { errors(0, p) = errors(0, p) * sigmoid_deriv(hidden_2.neurons_(0, p)); } else errors(0, p) = 0.0f; } // back propagate output hidden_2.BackPropogate_output(errors); hidden.BackPropogate(hidden_2.weights_, hidden_2.deltas_); // weight deltas hidden_2.ComputeWeightDeltas(hidden.neurons_, alpha, beta); hidden.ComputeWeightDeltas(input_matrix, alpha, beta); // update weights hidden_2.UpdateWeights(); hidden.UpdateWeights(); } } timer.Update(); timer.Stop(); cout << "Finished training, Total calculation performed in " << timer.GetTimeDelta() << " seconds" << endl; sum_squared_errors = 0.0f; // used here to count the number of correct guesses for (int q = 0; q < test_set.size(); q++) { /*input_matrix(0, 0) = iris_data.iris_data[q][0]; input_matrix(0, 1) = iris_data.iris_data[q][1]; input_matrix(0, 2) = iris_data.iris_data[q][2]; input_matrix(0, 3) = iris_data.iris_data[q][3];*/ input_matrix(0, 0) = iris_data.iris_data[test_set[q]][0]; input_matrix(0, 1) = iris_data.iris_data[test_set[q]][1]; input_matrix(0, 2) = iris_data.iris_data[test_set[q]][2]; input_matrix(0, 3) = iris_data.iris_data[test_set[q]][3]; //input_matrix(0, 2) = -1.0f; // bias is always -1 hidden.FeedForward(input_matrix); hidden_2.FeedForward(hidden.neurons_); //int actual_type = (int)iris_data.iris_data[q][4]; int actual_type = (int)iris_data.iris_data[test_set[q]][4]; int found_type = 0; if ((hidden_2.neurons_(0, 0) > 0.8) && (hidden_2.neurons_(0, 1) < 0.2) && (hidden_2.neurons_(0, 2) < 0.2)) { found_type = 0; } if ((hidden_2.neurons_(0, 0) < 0.2) && (hidden_2.neurons_(0, 1) > 0.8) && (hidden_2.neurons_(0, 2) < 0.2)) { found_type = 1; } if ((hidden_2.neurons_(0, 0) < 0.2) && (hidden_2.neurons_(0, 1) < 0.2) && (hidden_2.neurons_(0, 2)> 0.8)) { found_type = 2; } // cout << "Test Sample: " << q << ", Found Type: " << found_type << ", Actual Type: " << actual_type << endl; if (found_type == actual_type) sum_squared_errors += 1.0f; } cout << "Finished Test, Total classified correctly of " << test_set.size() << " tested: " << (int)sum_squared_errors << endl; } //#define VERBOSE template< class Layer > void Compute_IRIS_data_version_1_(int num_iterations, CSV &iris_data ,vector<int> &training_set, vector<int> &test_set, vector<int> &indexes) { Timer timer; int input_data_size = 1; int num_inputs = 4; int num_hidden = 6; int num_hidden_2 = 6; int num_outputs = 3; // ========================================== matrix input_matrix(1, num_inputs); float output_error = 0.0f; float alpha = 0.5f; float beta = 0.05f; float sum_squared_errors = 0.0f; Layer hidden(num_hidden, num_inputs); hidden.init_random_sample_weights_iris(); Layer hidden_2(num_hidden_2, num_hidden); hidden_2.init_random_sample_weights_iris(); Layer output(num_outputs, num_hidden_2); output.init_random_sample_weights_iris(); cout << endl; cout << "Training, please wait ..." << endl; //return; timer.Start(); // Sleep(2000); float last_sum_squared_errors = 0.0f; int positive_error_delta_count = 0; int negative_error_delta_count = 0; int alternation_count = 0; for (int mm = 0; mm < num_iterations; mm++) { for (int q = 0; q < training_set.size(); q++) { // index remap the shuffled set to the original data input_matrix(0, 0) = iris_data.iris_data[ training_set[q] ][0]; input_matrix(0, 1) = iris_data.iris_data[ training_set[q] ][1]; input_matrix(0, 2) = iris_data.iris_data[ training_set[q] ][2]; input_matrix(0, 3) = iris_data.iris_data[ training_set[q] ][3]; // feed forward hidden.FeedForward(input_matrix); hidden_2.FeedForward(hidden.neurons_); output.FeedForward(hidden_2.neurons_); matrix expected(1, 3); for (int p = 0; p < 3; p++) { if ((int)iris_data.iris_data[training_set[q]][4] == p) { expected(0, p) = 1.0; } else { expected(0, p) = 0.0; } } // compute the output error matrix errors = expected - output.neurons_; for (int p = 0; p < errors.NumCols(); p++) { if (abs(errors(0, p)) > 0.2) { errors(0, p) = errors(0, p) * sigmoid_deriv(output.neurons_(0, p)); } else errors(0, p) = 0.0; } // back propagate errors output.BackPropogate_output( errors); hidden_2.BackPropogate(output.weights_, output.deltas_); hidden.BackPropogate(hidden_2.weights_, hidden_2.deltas_); // weight deltas output.ComputeWeightDeltas(hidden_2.neurons_, alpha, beta); hidden_2.ComputeWeightDeltas(hidden.neurons_, alpha, beta); hidden.ComputeWeightDeltas(input_matrix, alpha, beta); // update weights output.UpdateWeights(); hidden_2.UpdateWeights(); hidden.UpdateWeights(); } } timer.Update(); timer.Stop(); cout << "Finished training, Total calculation performed in " << timer.GetTimeDelta() << " seconds" << endl; sum_squared_errors = 0.0f; // used here to count the number of correct guesses for (int q = 0; q < test_set.size(); q++) { input_matrix(0, 0) = iris_data.iris_data[test_set[q]][0]; input_matrix(0, 1) = iris_data.iris_data[test_set[q]][1]; input_matrix(0, 2) = iris_data.iris_data[test_set[q]][2]; input_matrix(0, 3) = iris_data.iris_data[test_set[q]][3]; //input_matrix(0, 2) = -1.0f; // bias is always -1 hidden.FeedForward(input_matrix); hidden_2.FeedForward(hidden.neurons_); output.FeedForward(hidden_2.neurons_); int actual_type = (int)iris_data.iris_data[test_set[q]][4]; int found_type = 0; if ((output.neurons_(0, 0) > 0.8) && (output.neurons_(0, 1) < 0.2) && (output.neurons_(0, 2) < 0.2)) { found_type = 0; } if ((output.neurons_(0, 0) < 0.2) && (output.neurons_(0, 1) > 0.8) && (output.neurons_(0, 2) < 0.2)) { found_type = 1; } if ((output.neurons_(0, 0) < 0.2) && (output.neurons_(0, 1) < 0.2) && (output.neurons_(0, 2)> 0.8)) { found_type = 2; } // cout << "Test Sample: " << q << ", Found Type: " << found_type << ", Actual Type: " << actual_type << endl; if (found_type == actual_type) sum_squared_errors += 1.0f; } cout << "Finished Test, Total classified correctly of "<< test_set.size() << " tested: " << (int)sum_squared_errors << endl; } void Compute_IRIS_data_version_3_(int num_iterations, vector<vector<float>> &data, vector<int> &training_set, vector<int> &test_set, vector<int> &indexes, double &time_) { Timer timer; int input_data_size = 1; int num_inputs = 2; int num_hidden = 9; int num_hidden2 = 3; int num_hidden3 = 8; int num_outputs = 3; // ========================================== matrix input_matrix(1, num_inputs); float alpha = 0.5f; float beta = 0.2;// 5f; // this does not appear to be working on either of these problems float sum_squared_errors = 0.0f; vector<int> layer_sizes; layer_sizes.push_back(num_inputs); layer_sizes.push_back(num_hidden); //layer_sizes.push_back(num_hidden2); //layer_sizes.push_back(num_hidden3); layer_sizes.push_back(num_outputs); Vanilla_Layer::Linked_Layer::NeuralNetwork *neuralNet = new Vanilla_Layer::Linked_Layer::NeuralNetwork(layer_sizes); //neuralNet->input_layer[3]->alpha = 0.1; neuralNet->input_layer[2]->alpha = 0.3; neuralNet->input_layer[1]->alpha = 0.5; neuralNet->input_layer[0]->alpha = 0.7; cout << endl; cout << "Training, please wait ..." << endl; timer.Start(); float tolerance = 0.15; // the new hyperparameter matrix Cost_Matrix(1, 3); matrix expected(1, 3); matrix output(1,3); matrix errors2(1, 3); matrix errors(1, 3); for (int mm = 0; mm < num_iterations; mm++) { for (int q = 0; q < training_set.size(); q++) { // index remap the shuffled set to the original data input_matrix(0, 0) = data[ training_set[q] ][0]; input_matrix(0, 1) = data[ training_set[q] ][1]; // formulate the correct output vector for (int p = 0; p < 3; p++) { if ((int)data[training_set[q]][2] == p) { expected(0, p) = 1.0; } else { expected(0, p) = 0.0; } } // feed forward output = neuralNet->FeedForward(input_matrix); errors = expected - output; errors2 = errors; Cost_Matrix = Cost_Matrix + pow(errors2, 2); for (int p = 0; p < errors.NumCols(); p++) { if (abs(errors(0, p)) > tolerance) { errors(0, p) = errors(0, p) * sigmoid_deriv(output(0, p)); } else errors(0, p) = 0.0f; } // back propagate output neuralNet->BackPropagateErrors(errors); // weight deltas neuralNet->ComputeDeltas(alpha, beta); // update weights neuralNet->UpdateWeights(); } Cost_Matrix = Cost_Matrix / training_set.size(); if ((Cost_Matrix(0, 0) < 0.001) && (Cost_Matrix(0, 1) < 0.001) && (Cost_Matrix(0, 2) < 0.001)) { cout << "finished training because sum of squared errors is low at iteration p: " << mm << endl; break; } Cost_Matrix.ToZero(); } timer.Update(); timer.Stop(); double time_taken = timer.GetTimeDelta(); cout << "Finished training, Total calculation performed in " << time_taken << " seconds" << endl; time_ += time_taken; sum_squared_errors = 0.0f; // used here to count the number of correct guesses tolerance += 0.2; matrix test_output(1, 3); for (int q = 0; q < test_set.size(); q++) { input_matrix(0, 0) = data[test_set[q]][0]; input_matrix(0, 1) = data[test_set[q]][1]; // test the neural network test_output = neuralNet->FeedForward(input_matrix); if (test_output.NumCols() != 3) cout << "should have more columns" << endl; int actual_type = (int)data[test_set[q]][2]; int found_type = 0; if ((test_output(0, 0) > (1 - tolerance)) && (test_output(0, 1) < tolerance) && (test_output(0, 2) < tolerance)) { found_type = 0; } if ((test_output(0, 0) < tolerance) && (test_output(0, 1) > (1 - tolerance)) && (test_output(0, 2) < tolerance)) { found_type = 1; } if ((test_output(0, 0) < tolerance) && (test_output(0, 1) < tolerance) && (test_output(0, 2)> (1 - tolerance))) { found_type = 2; } // cout << "Test Sample: " << q << ", Found Type: " << found_type << ", Actual Type: " << actual_type << endl; if (found_type == actual_type) sum_squared_errors += 1.0f; } cout << "Finished Test, Total classified correctly of " << test_set.size() << " tested: " << (int)sum_squared_errors << endl; } void Compute_IRIS_data_version_5_(int num_iterations, vector<vector<float>> &data, vector<int> &training_set, vector<int> &test_set, vector<int> &indexes, double &time_) { Timer timer; int input_data_size = 1; int num_inputs = 2; int num_hidden = 20; int num_hidden2 = 18; int num_hidden3 = 8; int num_outputs = 3; // ========================================== matrix input_matrix(1, num_inputs); float output_error = 0.0f; float alpha = 0.5f; float beta = 0.05f; float reg = 0.001; float sum_squared_errors = 0.0f; vector<int> layer_sizes; layer_sizes.push_back(num_inputs); layer_sizes.push_back(num_hidden); //layer_sizes.push_back(num_hidden2); //layer_sizes.push_back(num_hidden3); layer_sizes.push_back(num_outputs); Improved_Layer::Linked_Layer_Loop_Eval::NeuralNetwork *neuralNet = new Improved_Layer::Linked_Layer_Loop_Eval::NeuralNetwork(layer_sizes); // indexes //vector< matrix > output_buffer; cout << endl; cout << "Training, please wait ..." << endl; //return; timer.Start(); // Sleep(2000); float last_sum_squared_errors = 0.0f; int positive_error_delta_count = 0; int negative_error_delta_count = 0; int alternation_count = 0; float tolerance = 0.05; matrix Cost_Matrix(1, 3); matrix scores(training_set.size(), 3); matrix expect(training_set.size(), 3); for (int mm = 0; mm < num_iterations; mm++) { for (int q = 0; q < training_set.size(); q++) { // index remap the shuffled set to the original data input_matrix(0, 0) = data[training_set[q]][0]; input_matrix(0, 1) = data[training_set[q]][1]; matrix expected(1, 3); for (int p = 0; p < 3; p++) { if ((int)data[training_set[q]][2] == p) { expected(0, p) = 1.0; } else { expected(0, p) = 0.0; } } // feed forward matrix output = neuralNet->FeedForward_ReLU(input_matrix); float sum_outputs = 0.0; for (int p = 0; p < 3; p++) { scores(q, p) = output(0, p); expect(q, p) = expected(0, p); } // back propagate output matrix probs_(1, 3); for (int i = 0; i < 3; i++) { probs_(0, i) = output(0, i); if (expected(0, i) == 1.0) probs_(0, i) = probs_(0, i) - 1; //if (expected(0, i) == 1.0) //{ // probs_(0, i) = probs(0, i) - 1; //} } neuralNet->BackPropagateErrors(probs_); // weight deltas neuralNet->ComputeDeltas(probs_, expected, training_set.size(), alpha, beta); // update weights neuralNet->UpdateWeights(reg); } // scores = neuralNet->Compute_Probabilities(scores); matrix probs = scores; //cout << "scores: " << scores.NumRows() << ", " << scores.NumCols() << endl; scores = neuralNet->Compute_Log_Probabilities(probs, expect); float data_loss = neuralNet->Compute_Data_Loss(scores, training_set.size()); float reg_loss = neuralNet->Compute_Regularization_Loss(reg); float total_loss = data_loss + reg_loss; if (mm % 20 == 0) cout << "total loss: " << total_loss << ", data_loss: " << data_loss << ", reg loss: " << reg_loss << endl; for (int q = 0; q < training_set.size(); q++) { } } timer.Update(); timer.Stop(); double time_taken = timer.GetTimeDelta(); cout << "Finished training, Total calculation performed in " << time_taken << " seconds" << endl; time_ += time_taken; sum_squared_errors = 0.0f; // used here to count the number of correct guesses for (int q = 0; q < test_set.size(); q++) { input_matrix(0, 0) = data[test_set[q]][0]; input_matrix(0, 1) = data[test_set[q]][1]; //input_matrix(0, 2) = -1.0f; // bias is always -1 matrix test_output = neuralNet->FeedForward_ReLU(input_matrix); if (test_output.NumCols() != 3) cout << "should have more columns" << endl; int actual_type = (int)data[test_set[q]][2]; int found_type = 0; if ((test_output(0, 0) > (1 - tolerance)) && (test_output(0, 1) < tolerance) && (test_output(0, 2) < tolerance)) { found_type = 0; } if ((test_output(0, 0) < tolerance) && (test_output(0, 1) > (1 - tolerance)) && (test_output(0, 2) < tolerance)) { found_type = 1; } if ((test_output(0, 0) < tolerance) && (test_output(0, 1) < tolerance) && (test_output(0, 2) > (1 - tolerance))) { found_type = 2; } // cout << "Test Sample: " << q << ", Found Type: " << found_type << ", Actual Type: " << actual_type << endl; if (found_type == actual_type) sum_squared_errors += 1.0f; } cout << "Finished Test, Total classified correctly of " << test_set.size() << " tested: " << (int)sum_squared_errors << endl; } void Compute_IRIS_data_version_4_(int num_iterations, vector<vector<float>> &data, vector<int> &training_set, vector<int> &test_set, vector<int> &indexes, double &time_) { Timer timer; int input_data_size = 1; int num_inputs = 2; int num_hidden = 20; int num_hidden2 = 18; int num_hidden3 = 8; int num_outputs = 3; // ========================================== matrix input_matrix(1, num_inputs); float output_error = 0.0f; float alpha = 0.5f; float beta = 0.05f; float reg = 0.001; float sum_squared_errors = 0.0f; vector<int> layer_sizes; layer_sizes.push_back(num_inputs); layer_sizes.push_back(num_hidden); //layer_sizes.push_back(num_hidden2); //layer_sizes.push_back(num_hidden3); layer_sizes.push_back(num_outputs); Improved_Layer::Linked_Layer_Loop_Eval::NeuralNetwork *neuralNet = new Improved_Layer::Linked_Layer_Loop_Eval::NeuralNetwork(layer_sizes); // indexes //vector< matrix > output_buffer; cout << endl; cout << "Training, please wait ..." << endl; //return; timer.Start(); // Sleep(2000); float last_sum_squared_errors = 0.0f; int positive_error_delta_count = 0; int negative_error_delta_count = 0; int alternation_count = 0; float tolerance = 0.05; matrix Cost_Matrix(1, 3); matrix scores(training_set.size(), 3); matrix expect(training_set.size(), 3); for (int mm = 0; mm < num_iterations; mm++) { for (int q = 0; q < training_set.size(); q++) { // index remap the shuffled set to the original data input_matrix(0, 0) = data[training_set[q]][0]; input_matrix(0, 1) = data[training_set[q]][1]; matrix expected(1, 3); for (int p = 0; p < 3; p++) { if ((int)data[training_set[q]][2] == p) { expected(0, p) = 1.0; } else { expected(0, p) = 0.0; } } // feed forward matrix output = neuralNet->FeedForward_ReLU(input_matrix); for (int p = 0; p < 3; p++) { scores(q, p) = output(0, p); expect(q, p) = expected(0, p); } matrix errors = expected - output; //errors = ln(output);// *(-1); matrix errors2 = errors; Cost_Matrix = Cost_Matrix + pow(errors2, 2); } scores = neuralNet->Compute_Probabilities(scores); matrix probs = scores; //cout << "scores: " << scores.NumRows() << ", " << scores.NumCols() << endl; scores = neuralNet->Compute_Log_Probabilities(scores, expect); float data_loss = neuralNet->Compute_Data_Loss(scores, training_set.size()); float reg_loss = neuralNet->Compute_Regularization_Loss(reg); float total_loss = data_loss + reg_loss; if (mm % 20 == 0) cout << "total loss: " << total_loss << ", data_loss: " << data_loss << ", reg loss: " << reg_loss << endl; for (int q = 0; q < training_set.size(); q++) { // back propagate output matrix probs_(1, 3); matrix expected(1, 3); for (int i = 0; i < 3; i++) { probs_(0, i) = probs(q, i); expected(0, i) = expect(q, i); //if (expected(0, i) == 1.0) //{ // probs_(0, i) = probs(0, i) - 1; //} } neuralNet->BackPropagateErrors(probs_,expected,training_set.size(), alpha, beta); // weight deltas neuralNet->ComputeDeltas(probs_, expected, training_set.size(), alpha, beta); } // update weights neuralNet->UpdateWeights(reg); //Cost_Matrix.print(3); Cost_Matrix.ToZero(); } timer.Update(); timer.Stop(); double time_taken = timer.GetTimeDelta(); cout << "Finished training, Total calculation performed in " << time_taken << " seconds" << endl; time_ += time_taken; sum_squared_errors = 0.0f; // used here to count the number of correct guesses for (int q = 0; q < test_set.size(); q++) { input_matrix(0, 0) = data[test_set[q]][0]; input_matrix(0, 1) = data[test_set[q]][1]; //input_matrix(0, 2) = -1.0f; // bias is always -1 matrix test_output = neuralNet->FeedForward_ReLU(input_matrix); if (test_output.NumCols() != 3) cout << "should have more columns" << endl; int actual_type = (int)data[test_set[q]][2]; int found_type = 0; if ((test_output(0, 0) > (1 - tolerance)) && (test_output(0, 1) < tolerance) && (test_output(0, 2) < tolerance)) { found_type = 0; } if ((test_output(0, 0) < tolerance) && (test_output(0, 1) > (1 - tolerance)) && (test_output(0, 2) < tolerance)) { found_type = 1; } if ((test_output(0, 0) < tolerance) && (test_output(0, 1) < tolerance) && (test_output(0, 2) > (1 - tolerance))) { found_type = 2; } // cout << "Test Sample: " << q << ", Found Type: " << found_type << ", Actual Type: " << actual_type << endl; if (found_type == actual_type) sum_squared_errors += 1.0f; } cout << "Finished Test, Total classified correctly of " << test_set.size() << " tested: " << (int)sum_squared_errors << endl; } int main(int argc, char* argv[]) { // load the Iris dataset CSV iris_data; iris_data.test(); // create a vector of integers to index the iris data array vector<int> indexes; for (int i = 0; i < iris_data.iris_data.size(); i++) indexes.push_back(i); // shuffle the indexes to randomize the order of the data std::random_shuffle(indexes.begin(), indexes.end()); // compute the half size of the data set int half_size = indexes.size() / 2; // create a vector of indexes for training vector<int> training_set; // create a vector of indexes for testing vector< int > test_set; // store the first half of the indexes in the training set // and the second half of the indexes in the test set for (int i = 0; i < indexes.size(); i++) { if (i < 100) { training_set.push_back(indexes[i]); } else { test_set.push_back(indexes[i]); } } double total_time = 0; // test the IRIS dataset cout << "===========================================================================================" << endl; cout << "Testing Linked_Layer_Loop_Eval neural net object" << endl; // Compute_IRIS_data_version_2_<Vanilla_Layer::Linked_Layer_Loop_Eval::NeuralNetwork> // (600, iris_data, training_set, test_set, // indexes, total_time); cout << endl << endl; cout << "Finished testing linked layer with iterative evaluation neural net object" << endl; // load the spiral dataset std::ifstream data_output; data_output.open("some.csv", std::ifstream::in); // vector<string> tokenized_string; copy(istream_iterator<string>(data_output), istream_iterator<string>(), back_inserter<vector<string> >(tokenized_string)); vector<vector<string>> output; // split lines by commas and store in output for (int j = 0; j < tokenized_string.size(); j++) { istringstream ss(tokenized_string[j]); vector<string> result; while (ss.good()) { string substr; getline(ss, substr, ','); result.push_back(substr); } output.push_back(result); for (int c = 0; c < result.size(); c++) cout << result[c] << ", "; cout << endl; } data_output.close(); vector< vector <float> > X; vector <int> Y; for (int i = 0; i < output.size(); i++) { vector<float> v; v.push_back(atof(output[i][0].c_str())); v.push_back(atof(output[i][1].c_str())); v.push_back(atof(output[i][2].c_str())); X.push_back(v); } vector<int> indexes_spiral; for (int i = 0; i < X.size(); i++) { indexes_spiral.push_back(i); } data_output.close(); // shuffle the indexes to randomize the order of the data for (int i = 0; i < 5; i++) std::random_shuffle(indexes_spiral.begin(), indexes_spiral.end()); // create a vector of indexes for training vector<int> training_set_spiral; // create a vector of indexes for testing vector< int > test_set_spiral; // store the first half of the indexes in the training set // and the second half of the indexes in the test set for (int i = 0; i < indexes_spiral.size(); i++) { if (i < 200) { training_set_spiral.push_back(indexes_spiral[i]); } else { test_set_spiral.push_back(indexes_spiral[i]); } } total_time = 0; cout << "===========================================================================================" << endl; cout << "Testing Linked_Layer_Loop_Eval neural net object" << endl; Compute_IRIS_data_version_3_ (1500, X, training_set_spiral, test_set_spiral, indexes_spiral, total_time); cout << endl << endl; cout << "Finished testing linked layer with iterative evaluation neural net object" << endl; /*total_time = 0; cout << "===========================================================================================" << endl; cout << "Testing Linked_Layer_Loop_Eval neural net object" << endl; Compute_IRIS_data_version_4_ (500, X, training_set_spiral, test_set_spiral, indexes_spiral, total_time); cout << endl << endl; cout << "Finished testing linked layer with iterative evaluation neural net object" << endl;*/ return 0; }
[ "dave@discrete-hosting.co.uk" ]
dave@discrete-hosting.co.uk
030cfbe300886ea8f1023c0645719bdaac433c52
cdc283b08383b8c4dc5239ad58c756c25d9c3947
/third_party/wpilibsuite/ntcore/src/main/native/cpp/CallbackManager.h
cf43dbcc2bcbe50a6ba134494b3543ddbc8e85dd
[ "MIT", "BSD-3-Clause" ]
permissive
amartin11/robot-code-public
4058386817fd8bcdd8b6ab9d176b4b2b96fb943a
9671deebff32336fea9865daf0f54d7925c36dd8
refs/heads/master
2020-03-19T02:49:19.175606
2018-05-27T16:02:41
2018-05-27T16:02:41
135,664,264
0
1
MIT
2019-10-03T20:44:48
2018-06-01T03:42:31
C++
UTF-8
C++
false
false
10,825
h
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2017-2018. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ #ifndef NTCORE_CALLBACKMANAGER_H_ #define NTCORE_CALLBACKMANAGER_H_ #include <atomic> #include <climits> #include <functional> #include <memory> #include <queue> #include <utility> #include <vector> #include <llvm/raw_ostream.h> #include <support/SafeThread.h> #include <support/UidVector.h> #include <support/condition_variable.h> #include <support/mutex.h> namespace nt { namespace impl { template <typename Callback> class ListenerData { public: ListenerData() = default; explicit ListenerData(Callback callback_) : callback(callback_) {} explicit ListenerData(unsigned int poller_uid_) : poller_uid(poller_uid_) {} explicit operator bool() const { return callback || poller_uid != UINT_MAX; } Callback callback; unsigned int poller_uid = UINT_MAX; }; // CRTP callback manager thread // @tparam Derived derived class // @tparam NotifierData data buffered for each callback // @tparam ListenerData data stored for each listener // Derived must define the following functions: // bool Matches(const ListenerData& listener, const NotifierData& data); // void SetListener(NotifierData* data, unsigned int listener_uid); // void DoCallback(Callback callback, const NotifierData& data); template <typename Derived, typename TUserInfo, typename TListenerData = ListenerData<std::function<void(const TUserInfo& info)>>, typename TNotifierData = TUserInfo> class CallbackThread : public wpi::SafeThread { public: typedef TUserInfo UserInfo; typedef TNotifierData NotifierData; typedef TListenerData ListenerData; ~CallbackThread() { // Wake up any blocked pollers for (size_t i = 0; i < m_pollers.size(); ++i) { if (auto poller = m_pollers[i]) poller->Terminate(); } } void Main() override; wpi::UidVector<ListenerData, 64> m_listeners; std::queue<std::pair<unsigned int, NotifierData>> m_queue; wpi::condition_variable m_queue_empty; struct Poller { void Terminate() { { std::lock_guard<wpi::mutex> lock(poll_mutex); terminating = true; } poll_cond.notify_all(); } std::queue<NotifierData> poll_queue; wpi::mutex poll_mutex; wpi::condition_variable poll_cond; bool terminating = false; bool cancelling = false; }; wpi::UidVector<std::shared_ptr<Poller>, 64> m_pollers; // Must be called with m_mutex held template <typename... Args> void SendPoller(unsigned int poller_uid, Args&&... args) { if (poller_uid > m_pollers.size()) return; auto poller = m_pollers[poller_uid]; if (!poller) return; { std::lock_guard<wpi::mutex> lock(poller->poll_mutex); poller->poll_queue.emplace(std::forward<Args>(args)...); } poller->poll_cond.notify_one(); } }; template <typename Derived, typename TUserInfo, typename TListenerData, typename TNotifierData> void CallbackThread<Derived, TUserInfo, TListenerData, TNotifierData>::Main() { std::unique_lock<wpi::mutex> lock(m_mutex); while (m_active) { while (m_queue.empty()) { m_cond.wait(lock); if (!m_active) return; } while (!m_queue.empty()) { if (!m_active) return; auto item = std::move(m_queue.front()); if (item.first != UINT_MAX) { if (item.first < m_listeners.size()) { auto& listener = m_listeners[item.first]; if (listener && static_cast<Derived*>(this)->Matches(listener, item.second)) { static_cast<Derived*>(this)->SetListener(&item.second, item.first); if (listener.callback) { lock.unlock(); static_cast<Derived*>(this)->DoCallback(listener.callback, item.second); lock.lock(); } else if (listener.poller_uid != UINT_MAX) { SendPoller(listener.poller_uid, std::move(item.second)); } } } } else { // Use index because iterator might get invalidated. for (size_t i = 0; i < m_listeners.size(); ++i) { auto& listener = m_listeners[i]; if (!listener) continue; if (!static_cast<Derived*>(this)->Matches(listener, item.second)) continue; static_cast<Derived*>(this)->SetListener(&item.second, i); if (listener.callback) { lock.unlock(); static_cast<Derived*>(this)->DoCallback(listener.callback, item.second); lock.lock(); } else if (listener.poller_uid != UINT_MAX) { SendPoller(listener.poller_uid, item.second); } } } m_queue.pop(); } m_queue_empty.notify_all(); } } } // namespace impl // CRTP callback manager // @tparam Derived derived class // @tparam Thread custom thread (must be derived from impl::CallbackThread) // // Derived must define the following functions: // void Start(); template <typename Derived, typename Thread> class CallbackManager { friend class RpcServerTest; public: void Stop() { m_owner.Stop(); } void Remove(unsigned int listener_uid) { auto thr = m_owner.GetThread(); if (!thr) return; thr->m_listeners.erase(listener_uid); } unsigned int CreatePoller() { static_cast<Derived*>(this)->Start(); auto thr = m_owner.GetThread(); return thr->m_pollers.emplace_back( std::make_shared<typename Thread::Poller>()); } void RemovePoller(unsigned int poller_uid) { auto thr = m_owner.GetThread(); if (!thr) return; // Remove any listeners that are associated with this poller for (size_t i = 0; i < thr->m_listeners.size(); ++i) { if (thr->m_listeners[i].poller_uid == poller_uid) thr->m_listeners.erase(i); } // Wake up any blocked pollers if (poller_uid >= thr->m_pollers.size()) return; auto poller = thr->m_pollers[poller_uid]; if (!poller) return; poller->Terminate(); return thr->m_pollers.erase(poller_uid); } bool WaitForQueue(double timeout) { auto thr = m_owner.GetThread(); if (!thr) return true; auto& lock = thr.GetLock(); #if defined(_MSC_VER) && _MSC_VER < 1900 auto timeout_time = std::chrono::steady_clock::now() + std::chrono::duration<int64_t, std::nano>( static_cast<int64_t>(timeout * 1e9)); #else auto timeout_time = std::chrono::steady_clock::now() + std::chrono::duration<double>(timeout); #endif while (!thr->m_queue.empty()) { if (!thr->m_active) return true; if (timeout == 0) return false; if (timeout < 0) { thr->m_queue_empty.wait(lock); } else { auto cond_timed_out = thr->m_queue_empty.wait_until(lock, timeout_time); if (cond_timed_out == std::cv_status::timeout) return false; } } return true; } std::vector<typename Thread::UserInfo> Poll(unsigned int poller_uid) { bool timed_out = false; return Poll(poller_uid, -1, &timed_out); } std::vector<typename Thread::UserInfo> Poll(unsigned int poller_uid, double timeout, bool* timed_out) { std::vector<typename Thread::UserInfo> infos; std::shared_ptr<typename Thread::Poller> poller; { auto thr = m_owner.GetThread(); if (!thr) return infos; if (poller_uid > thr->m_pollers.size()) return infos; poller = thr->m_pollers[poller_uid]; if (!poller) return infos; } std::unique_lock<wpi::mutex> lock(poller->poll_mutex); #if defined(_MSC_VER) && _MSC_VER < 1900 auto timeout_time = std::chrono::steady_clock::now() + std::chrono::duration<int64_t, std::nano>( static_cast<int64_t>(timeout * 1e9)); #else auto timeout_time = std::chrono::steady_clock::now() + std::chrono::duration<double>(timeout); #endif *timed_out = false; while (poller->poll_queue.empty()) { if (poller->terminating) return infos; if (poller->cancelling) { // Note: this only works if there's a single thread calling this // function for any particular poller, but that's the intended use. poller->cancelling = false; return infos; } if (timeout == 0) { *timed_out = true; return infos; } if (timeout < 0) { poller->poll_cond.wait(lock); } else { auto cond_timed_out = poller->poll_cond.wait_until(lock, timeout_time); if (cond_timed_out == std::cv_status::timeout) { *timed_out = true; return infos; } } } while (!poller->poll_queue.empty()) { infos.emplace_back(std::move(poller->poll_queue.front())); poller->poll_queue.pop(); } return infos; } void CancelPoll(unsigned int poller_uid) { std::shared_ptr<typename Thread::Poller> poller; { auto thr = m_owner.GetThread(); if (!thr) return; if (poller_uid > thr->m_pollers.size()) return; poller = thr->m_pollers[poller_uid]; if (!poller) return; } { std::lock_guard<wpi::mutex> lock(poller->poll_mutex); poller->cancelling = true; } poller->poll_cond.notify_one(); } protected: template <typename... Args> void DoStart(Args&&... args) { auto thr = m_owner.GetThread(); if (!thr) m_owner.Start(new Thread(std::forward<Args>(args)...)); } template <typename... Args> unsigned int DoAdd(Args&&... args) { static_cast<Derived*>(this)->Start(); auto thr = m_owner.GetThread(); return thr->m_listeners.emplace_back(std::forward<Args>(args)...); } template <typename... Args> void Send(unsigned int only_listener, Args&&... args) { auto thr = m_owner.GetThread(); if (!thr || thr->m_listeners.empty()) return; thr->m_queue.emplace(std::piecewise_construct, std::make_tuple(only_listener), std::forward_as_tuple(std::forward<Args>(args)...)); thr->m_cond.notify_one(); } typename wpi::SafeThreadOwner<Thread>::Proxy GetThread() const { return m_owner.GetThread(); } private: wpi::SafeThreadOwner<Thread> m_owner; }; } // namespace nt #endif // NTCORE_CALLBACKMANAGER_H_
[ "jishnusen@users.noreply.github.com" ]
jishnusen@users.noreply.github.com
7c6d5ed887646d0a7bee1fb596195bdfc4fa5f9a
cdc668f528ffb037f677ce505c6a91a6edd9ef45
/src/zpol/zpos.cpp
335181639fb7bb3c2987a92cdd16af2b9e4039e5
[ "MIT" ]
permissive
bspanda98/polaris
e05c6e543d3590fb36099b9b790500256ab5ef2b
f0d835cf699c2a131a747d48680710e364ce3b1b
refs/heads/master
2022-07-05T04:14:54.659583
2020-05-18T17:44:19
2020-05-18T17:44:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,952
cpp
// Copyright (c) 2017-2020 The POLARISNETWORK developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "zpol/zpos.h" #include "zpolchain.h" /* * LEGACY: Kept for IBD in order to verify zerocoin stakes occurred when zPoS was active * Find the first occurrence of a certain accumulator checksum. * Return block index pointer or nullptr if not found */ uint32_t ParseAccChecksum(uint256 nCheckpoint, const libzerocoin::CoinDenomination denom) { int pos = std::distance(libzerocoin::zerocoinDenomList.begin(), find(libzerocoin::zerocoinDenomList.begin(), libzerocoin::zerocoinDenomList.end(), denom)); nCheckpoint = nCheckpoint >> (32*((libzerocoin::zerocoinDenomList.size() - 1) - pos)); return nCheckpoint.Get32(); } bool CLegacyZpolStake::InitFromTxIn(const CTxIn& txin) { // Construct the stakeinput object if (!txin.IsZerocoinSpend()) return error("%s: unable to initialize CLegacyZpolStake from non zc-spend"); // Check spend type libzerocoin::CoinSpend spend = TxInToZerocoinSpend(txin); if (spend.getSpendType() != libzerocoin::SpendType::STAKE) return error("%s : spend is using the wrong SpendType (%d)", __func__, (int)spend.getSpendType()); *this = CLegacyZpolStake(spend); // Find the pindex with the accumulator checksum if (!GetIndexFrom()) return error("%s : Failed to find the block index for zpol stake origin", __func__); // All good return true; } CLegacyZpolStake::CLegacyZpolStake(const libzerocoin::CoinSpend& spend) { this->nChecksum = spend.getAccumulatorChecksum(); this->denom = spend.getDenomination(); uint256 nSerial = spend.getCoinSerialNumber().getuint256(); this->hashSerial = Hash(nSerial.begin(), nSerial.end()); } CBlockIndex* CLegacyZpolStake::GetIndexFrom() { // First look in the legacy database int nHeightChecksum = 0; if (zerocoinDB->ReadAccChecksum(nChecksum, denom, nHeightChecksum)) { return chainActive[nHeightChecksum]; } // Not found. Scan the chain. const Consensus::Params& consensus = Params().GetConsensus(); CBlockIndex* pindex = chainActive[consensus.height_start_ZC]; if (!pindex) return nullptr; while (pindex && pindex->nHeight <= consensus.height_last_ZC_AccumCheckpoint) { if (ParseAccChecksum(pindex->nAccumulatorCheckpoint, denom) == nChecksum) { // Found. Save to database and return zerocoinDB->WriteAccChecksum(nChecksum, denom, pindex->nHeight); return pindex; } //Skip forward in groups of 10 blocks since checkpoints only change every 10 blocks if (pindex->nHeight % 10 == 0) { pindex = chainActive[pindex->nHeight + 10]; continue; } pindex = chainActive.Next(pindex); } return nullptr; } CAmount CLegacyZpolStake::GetValue() const { return denom * COIN; } CDataStream CLegacyZpolStake::GetUniqueness() const { CDataStream ss(SER_GETHASH, 0); ss << hashSerial; return ss; } // Verify stake contextual checks bool CLegacyZpolStake::ContextCheck(int nHeight, uint32_t nTime) { const Consensus::Params& consensus = Params().GetConsensus(); if (nHeight < consensus.height_start_ZC_SerialsV2 || nHeight >= consensus.height_last_ZC_AccumCheckpoint) return error("%s : zPOL stake block: height %d outside range", __func__, nHeight); // The checkpoint needs to be from 200 blocks ago const int cpHeight = nHeight - 1 - consensus.ZC_MinStakeDepth; const libzerocoin::CoinDenomination denom = libzerocoin::AmountToZerocoinDenomination(GetValue()); if (ParseAccChecksum(chainActive[cpHeight]->nAccumulatorCheckpoint, denom) != GetChecksum()) return error("%s : accum. checksum at height %d is wrong.", __func__, nHeight); // All good return true; }
[ "bspanda98@gmail.com" ]
bspanda98@gmail.com
906db4c9639f95343eacd36a9bc500d05896d134
207cd6c4feefcaf8f2b8a17b00f2151a549dc215
/resources/cpp/fit_totals_mesg_listener.hpp
565fcf5f08de9222188acc8c672453791f441f70
[]
no_license
zigit/mytrainingpage
6c3001a11d5aa02773cc44642af579962be15709
fa4a60f677a772db5706c6540603d2bf441cf1ee
refs/heads/master
2020-04-28T12:25:04.141858
2016-11-12T00:56:48
2016-11-12T00:56:48
33,022,566
0
0
null
null
null
null
UTF-8
C++
false
false
1,262
hpp
//////////////////////////////////////////////////////////////////////////////// // The following FIT Protocol software provided may be used with FIT protocol // devices only and remains the copyrighted property of Dynastream Innovations Inc. // The software is being provided on an "as-is" basis and as an accommodation, // and therefore all warranties, representations, or guarantees of any kind // (whether express, implied or statutory) including, without limitation, // warranties of merchantability, non-infringement, or fitness for a particular // purpose, are specifically disclaimed. // // Copyright 2008 Dynastream Innovations Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. // Profile Version = 1.0Release // Tag = $Name: AKW1_000 $ //////////////////////////////////////////////////////////////////////////////// #if !defined(FIT_TOTALS_MESG_LISTENER_HPP) #define FIT_TOTALS_MESG_LISTENER_HPP #include "fit_totals_mesg.hpp" namespace fit { class TotalsMesgListener { public: virtual void OnMesg(TotalsMesg& mesg) = 0; }; } // namespace fit #endif // !defined(FIT_TOTALS_MESG_LISTENER_HPP)
[ "lancea12@04a8d5fa-f31d-11de-8b01-fd14ac940ccb" ]
lancea12@04a8d5fa-f31d-11de-8b01-fd14ac940ccb
a7bf92b59331dc947c3cde5d02780d8e6350acc3
f1fc349f2d4e876a070561a4c4d71c5e95fd33a4
/ch05/5_20_twowords.cpp
e09599429b95240a6a5b1bcd53e04ad0971e3288
[]
no_license
sytu/cpp_primer
9daccddd815fc0968008aa97e6bcfb36bbccd83d
6cfb14370932e93c796290f40c70c153cc15db44
refs/heads/master
2021-01-17T19:03:48.738381
2017-04-13T10:35:43
2017-04-13T10:35:43
71,568,597
0
0
null
null
null
null
UTF-8
C++
false
false
349
cpp
#include <iostream> #include <string> using namespace std; int main(void) { string word, preword; while (cin >> word) if (word == preword) break; else preword = word; if (cin.eof()) cout << "no word was repeated." << endl; // end of line : ctrl+d(unix) else cout << word << " occurs twice in succession." << endl; return 0; }
[ "imsytu@163.com" ]
imsytu@163.com
ebb2a89189db9acab743a4cf32442192d4041a84
61fa348720a0ab2a9f17c83086d271bcf0119ea9
/lab assignment 4/Gaddis_Chap12_Prob12/main.cpp
283aef2b3826eb225673118f8aeb5764ee9b39c9
[]
no_license
Willgunadi93/GunadiWill_CSC17A_Fall17
8dfa122e14a7057cec4f89c94d5f41044bb511b7
3360b45d14b20000417f8f190d119086b35acf8d
refs/heads/master
2021-08-23T19:35:18.523449
2017-12-06T07:09:27
2017-12-06T07:09:27
113,279,246
0
0
null
null
null
null
UTF-8
C++
false
false
2,670
cpp
/* * File: main.cpp * Author: William Gunadi * Created on September , 2017, * Purpose: Template to be utilized in creating * solutions to problems in our CSC/CIS 5 * class. */ //System Libraries #include <iostream> //Input - Output Library #include <fstream> using namespace std; //Name-space under which system libraries exist //User Libraries #include "division.h" //Global Constants //Function Prototypes //Execution begins here int main(int argc, char** argv) { // Declaration of Variables Division div[4][4] = {}; // Each division by quarter fstream file; // File to read from int quartly[4] = {}; // Total sales for each quarter int yearly[4] = {}; // Total sales by division int totYr = 0; // Total yearly corporate sales float avg[4] = {}; // Average sales of each division int high = 0; // Highest sales int low = 2000000000; // Lowest sales // Open the file file.open("Sales.dat", ios::in | ios::binary); // Read from the file for (int i = 0; i < 4; i++) { // Iterate through each division for (int j = 0; j < 4; j++) { // Iterate through each quarter int len; // Length of the name file.read(reinterpret_cast<char *>(&len), sizeof(int)); char *str = new char[len]; file.read(str, len); file.read(reinterpret_cast<char *>(&div[i][j].quart), sizeof(char)); file.read(reinterpret_cast<char *>(&div[i][j].sales), sizeof(int)); div[i][j].name = string(str); // Cleanup delete [] str; // Stats quartly[j] += div[i][j].sales; yearly[i] += div[i][j].sales; totYr += div[i][j].sales; high = (div[i][j].sales > high)?div[i][j].sales:high; low = (div[i][j].sales < low)?div[i][j].sales:low; } } // Close file.close(); // Display Output for (int i = 0; i < 4; i++) { cout << "Total sales for quarter " << i + 1 << ": $" << quartly[i] << endl; } for (int i = 0; i < 4; i++) { cout << "Total sales for " << div[i][0].name << ": $" << yearly[i] << endl; } for (int i = 0; i < 4; i++) { avg[i] = yearly[i] / 4.0f; cout << "Average quarterly sales for " << div[i][0].name << ": $" << avg[i] << endl; } cout << "Total yearly sales: $" << totYr << endl; cout << "Highest quarterly sales: $" << high << endl; cout << "Lowest quarterly sales: $" << low << endl; // Exit Program return 0; }
[ "2theman.bill@gmail.com" ]
2theman.bill@gmail.com
7719e43fdc9e1ad8141dc6571c9a7c5820d608b0
9bc92c4616d4dc30918b54e99bd0ece08c77ce11
/project/Project26/chcount.cpp
304587fc03671997888c1a8d9976d9c3046bbc12
[]
no_license
StasBeep/programs-CPP-Lafore
90977d7de9291992c2454c1b93a0f38c445b2ccb
3771c5c86f0786d77e07c5c46e2909b7c366a03b
refs/heads/main
2023-03-19T06:52:36.182806
2021-03-06T00:14:09
2021-03-06T00:14:09
344,962,693
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
1,073
cpp
// chcount.cpp // подсчёт числа слов и символов в строке #include <iostream> using namespace std; #include <conio.h> // для getche() int main() { setlocale(LC_ALL, "Russian"); int chcount = 0; // число непробельных символов int wdcount = 1; // число пробелов char ch = 'a'; // ch должна иметь определённое значение cout << "Введите строку: "; while (ch != '\r') // цикл, пока не будет нажата клавиша Enter { ch = _getche(); // считывание символа if (ch == ' ') // если символ является пробелом, wdcount++; // то инкрементируем число слов else // в противном случае chcount++; // инкриментируем число символов } // вывод результата на экран cout << "\nСлов: " << wdcount << endl; cout << "Букв: " << (chcount - 1) << endl; return 0; }
[ "stas-stas.stanislav@mail.ru" ]
stas-stas.stanislav@mail.ru
8d4769f81de23afd32f1f395671258364f29e09a
a879bcb6a5dbd40a1c4815dc00291fca458dcc01
/using_decleration.cpp
b5ee6ec08b10aed25075a17983c5af025f17560a
[]
no_license
hgedek/cpp-samples
38a5b44c43589bf441f4205bff2cb8a1e9f2c136
2f69954de8627fe2065a9958f997eee56d48f135
refs/heads/main
2023-04-20T06:24:36.931213
2021-05-01T14:41:20
2021-05-01T14:41:20
329,326,996
0
0
null
null
null
null
UTF-8
C++
false
false
345
cpp
#include <iostream> struct base { void foo(int) { std::cout << "base::foo" << std::endl; } protected: int m; using value_type = int; }; struct derived: base { using base::m; using base::value_type; using base::foo; }; using int_t = int; int main() { int_t i = 0; derived d; d.foo(0); return 0; }
[ "hgedek@gmail.com" ]
hgedek@gmail.com
586235febc338cd28b4b67757ef0aaa9bf5015e4
60f294e56dd4b03191af5fdf73a92a803024a9af
/ui/gfx/render_text_unittest.cc
fc9793e05d19fbd642da6e052aed1f973ddf9f80
[]
no_license
PCanyi/chromium_ui
86e25b02eb54b48721a0b1fa55aac9236ad11a56
fd48c7cdab20a4f63fe35e3b463eae1841328b12
refs/heads/master
2023-03-17T19:31:11.874865
2020-04-13T09:56:16
2020-04-13T09:56:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
75,019
cc
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/gfx/render_text.h" #include <algorithm> #include "base/format_macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/break_list.h" #include "ui/gfx/canvas.h" #if defined(OS_WIN) #include "base/win/windows_version.h" #include "ui/gfx/render_text_win.h" #endif #if defined(OS_LINUX) #include "ui/gfx/render_text_linux.h" #endif #if defined(TOOLKIT_GTK) #include <gtk/gtk.h> #endif namespace gfx { namespace { // Various weak, LTR, RTL, and Bidi string cases with three characters each. const wchar_t kWeak[] = L" . "; const wchar_t kLtr[] = L"abc"; const wchar_t kRtl[] = L"\x5d0\x5d1\x5d2"; #if !defined(OS_MACOSX) const wchar_t kLtrRtl[] = L"a" L"\x5d0\x5d1"; const wchar_t kLtrRtlLtr[] = L"a" L"\x5d1" L"b"; const wchar_t kRtlLtr[] = L"\x5d0\x5d1" L"a"; const wchar_t kRtlLtrRtl[] = L"\x5d0" L"a" L"\x5d1"; #endif // Checks whether |range| contains |index|. This is not the same as calling // |range.Contains(gfx::Range(index))| - as that would return true when // |index| == |range.end()|. bool IndexInRange(const Range& range, size_t index) { return index >= range.start() && index < range.end(); } base::string16 GetSelectedText(RenderText* render_text) { return render_text->text().substr(render_text->selection().GetMin(), render_text->selection().length()); } // A test utility function to set the application default text direction. void SetRTL(bool rtl) { // Override the current locale/direction. //base::i18n::SetICUDefaultLocale(rtl ? "he" : "en"); #if defined(TOOLKIT_GTK) // Do the same for GTK, which does not rely on the ICU default locale. gtk_widget_set_default_direction(rtl ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); #endif // EXPECT_EQ(rtl, base::i18n::IsRTL()); } // Ensure cursor movement in the specified |direction| yields |expected| values. void RunMoveCursorLeftRightTest(RenderText* render_text, const std::vector<SelectionModel>& expected, VisualCursorDirection direction) { for (size_t i = 0; i < expected.size(); ++i) { SCOPED_TRACE(base::StringPrintf("Going %s; expected value index %d.", direction == CURSOR_LEFT ? "left" : "right", static_cast<int>(i))); EXPECT_EQ(expected[i], render_text->selection_model()); render_text->MoveCursor(CHARACTER_BREAK, direction, false); } // Check that cursoring is clamped at the line edge. EXPECT_EQ(expected.back(), render_text->selection_model()); // Check that it is the line edge. render_text->MoveCursor(LINE_BREAK, direction, false); EXPECT_EQ(expected.back(), render_text->selection_model()); } } // namespace class RenderTextTest : public testing::Test { }; TEST_F(RenderTextTest, DefaultStyle) { // Check the default styles applied to new instances and adjusted text. scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); EXPECT_TRUE(render_text->text().empty()); const wchar_t* const cases[] = { kWeak, kLtr, L"Hello", kRtl, L"", L"" }; for (size_t i = 0; i < arraysize(cases); ++i) { EXPECT_TRUE(render_text->colors().EqualsValueForTesting(SK_ColorBLACK)); for (size_t style = 0; style < NUM_TEXT_STYLES; ++style) EXPECT_TRUE(render_text->styles()[style].EqualsValueForTesting(false)); render_text->SetText(WideToUTF16(cases[i])); } } TEST_F(RenderTextTest, SetColorAndStyle) { // Ensure custom default styles persist across setting and clearing text. scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); const SkColor color = SK_ColorRED; render_text->SetColor(color); render_text->SetStyle(BOLD, true); render_text->SetStyle(UNDERLINE, false); const wchar_t* const cases[] = { kWeak, kLtr, L"Hello", kRtl, L"", L"" }; for (size_t i = 0; i < arraysize(cases); ++i) { EXPECT_TRUE(render_text->colors().EqualsValueForTesting(color)); EXPECT_TRUE(render_text->styles()[BOLD].EqualsValueForTesting(true)); EXPECT_TRUE(render_text->styles()[UNDERLINE].EqualsValueForTesting(false)); render_text->SetText(WideToUTF16(cases[i])); // Ensure custom default styles can be applied after text has been set. if (i == 1) render_text->SetStyle(STRIKE, true); if (i >= 1) EXPECT_TRUE(render_text->styles()[STRIKE].EqualsValueForTesting(true)); } } TEST_F(RenderTextTest, ApplyColorAndStyle) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16("012345678")); // Apply a ranged color and style and check the resulting breaks. render_text->ApplyColor(SK_ColorRED, Range(1, 4)); render_text->ApplyStyle(BOLD, true, Range(2, 5)); std::vector<std::pair<size_t, SkColor> > expected_color; expected_color.push_back(std::pair<size_t, SkColor>(0, SK_ColorBLACK)); expected_color.push_back(std::pair<size_t, SkColor>(1, SK_ColorRED)); expected_color.push_back(std::pair<size_t, SkColor>(4, SK_ColorBLACK)); EXPECT_TRUE(render_text->colors().EqualsForTesting(expected_color)); std::vector<std::pair<size_t, bool> > expected_style; expected_style.push_back(std::pair<size_t, bool>(0, false)); expected_style.push_back(std::pair<size_t, bool>(2, true)); expected_style.push_back(std::pair<size_t, bool>(5, false)); EXPECT_TRUE(render_text->styles()[BOLD].EqualsForTesting(expected_style)); // Ensure setting a color and style overrides the ranged colors and styles. render_text->SetColor(SK_ColorBLUE); EXPECT_TRUE(render_text->colors().EqualsValueForTesting(SK_ColorBLUE)); render_text->SetStyle(BOLD, false); EXPECT_TRUE(render_text->styles()[BOLD].EqualsValueForTesting(false)); // Apply a color and style over the text end and check the resulting breaks. // (INT_MAX should be used instead of the text length for the range end) const size_t text_length = render_text->text().length(); render_text->ApplyColor(SK_ColorRED, Range(0, text_length)); render_text->ApplyStyle(BOLD, true, Range(2, text_length)); std::vector<std::pair<size_t, SkColor> > expected_color_end; expected_color_end.push_back(std::pair<size_t, SkColor>(0, SK_ColorRED)); EXPECT_TRUE(render_text->colors().EqualsForTesting(expected_color_end)); std::vector<std::pair<size_t, bool> > expected_style_end; expected_style_end.push_back(std::pair<size_t, bool>(0, false)); expected_style_end.push_back(std::pair<size_t, bool>(2, true)); EXPECT_TRUE(render_text->styles()[BOLD].EqualsForTesting(expected_style_end)); // Ensure ranged values adjust to accommodate text length changes. render_text->ApplyStyle(ITALIC, true, Range(0, 2)); render_text->ApplyStyle(ITALIC, true, Range(3, 6)); render_text->ApplyStyle(ITALIC, true, Range(7, text_length)); std::vector<std::pair<size_t, bool> > expected_italic; expected_italic.push_back(std::pair<size_t, bool>(0, true)); expected_italic.push_back(std::pair<size_t, bool>(2, false)); expected_italic.push_back(std::pair<size_t, bool>(3, true)); expected_italic.push_back(std::pair<size_t, bool>(6, false)); expected_italic.push_back(std::pair<size_t, bool>(7, true)); EXPECT_TRUE(render_text->styles()[ITALIC].EqualsForTesting(expected_italic)); // Truncating the text should trim any corresponding breaks. render_text->SetText(ASCIIToUTF16("0123456")); expected_italic.resize(4); EXPECT_TRUE(render_text->styles()[ITALIC].EqualsForTesting(expected_italic)); render_text->SetText(ASCIIToUTF16("01234")); expected_italic.resize(3); EXPECT_TRUE(render_text->styles()[ITALIC].EqualsForTesting(expected_italic)); // Appending text should extend the terminal styles without changing breaks. render_text->SetText(ASCIIToUTF16("012345678")); EXPECT_TRUE(render_text->styles()[ITALIC].EqualsForTesting(expected_italic)); } #if defined(OS_LINUX) TEST_F(RenderTextTest, PangoAttributes) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16("012345678")); // Apply ranged BOLD/ITALIC styles and check the resulting Pango attributes. render_text->ApplyStyle(BOLD, true, Range(2, 4)); render_text->ApplyStyle(ITALIC, true, Range(1, 3)); struct { int start; int end; bool bold; bool italic; } cases[] = { { 0, 1, false, false }, { 1, 2, false, true }, { 2, 3, true, true }, { 3, 4, true, false }, { 4, INT_MAX, false, false }, }; int start = 0, end = 0; RenderTextLinux* rt_linux = static_cast<RenderTextLinux*>(render_text.get()); rt_linux->EnsureLayout(); PangoAttrList* attributes = pango_layout_get_attributes(rt_linux->layout_); PangoAttrIterator* iter = pango_attr_list_get_iterator(attributes); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { pango_attr_iterator_range(iter, &start, &end); EXPECT_EQ(cases[i].start, start); EXPECT_EQ(cases[i].end, end); PangoFontDescription* font = pango_font_description_new(); pango_attr_iterator_get_font(iter, font, NULL, NULL); char* description_string = pango_font_description_to_string(font); const base::string16 desc = ASCIIToUTF16(description_string); const bool bold = desc.find(ASCIIToUTF16("Bold")) != std::string::npos; EXPECT_EQ(cases[i].bold, bold); const bool italic = desc.find(ASCIIToUTF16("Italic")) != std::string::npos; EXPECT_EQ(cases[i].italic, italic); pango_attr_iterator_next(iter); pango_font_description_free(font); g_free(description_string); } EXPECT_FALSE(pango_attr_iterator_next(iter)); pango_attr_iterator_destroy(iter); } #endif // TODO(asvitkine): Cursor movements tests disabled on Mac because RenderTextMac // does not implement this yet. http://crbug.com/131618 #if !defined(OS_MACOSX) void TestVisualCursorMotionInObscuredField(RenderText* render_text, const base::string16& text, bool select) { ASSERT_TRUE(render_text->obscured()); render_text->SetText(text); int len = text.length(); render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, select); EXPECT_EQ(SelectionModel(Range(select ? 0 : len, len), CURSOR_FORWARD), render_text->selection_model()); render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, select); EXPECT_EQ(SelectionModel(0, CURSOR_BACKWARD), render_text->selection_model()); for (int j = 1; j <= len; ++j) { render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, select); EXPECT_EQ(SelectionModel(Range(select ? 0 : j, j), CURSOR_BACKWARD), render_text->selection_model()); } for (int j = len - 1; j >= 0; --j) { render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, select); EXPECT_EQ(SelectionModel(Range(select ? 0 : j, j), CURSOR_FORWARD), render_text->selection_model()); } render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, select); EXPECT_EQ(SelectionModel(Range(select ? 0 : len, len), CURSOR_FORWARD), render_text->selection_model()); render_text->MoveCursor(WORD_BREAK, CURSOR_LEFT, select); EXPECT_EQ(SelectionModel(0, CURSOR_BACKWARD), render_text->selection_model()); } TEST_F(RenderTextTest, ObscuredText) { const base::string16 seuss = ASCIIToUTF16("hop on pop"); const base::string16 no_seuss = ASCIIToUTF16("**********"); scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // GetLayoutText() returns asterisks when the obscured bit is set. render_text->SetText(seuss); render_text->SetObscured(true); EXPECT_EQ(seuss, render_text->text()); EXPECT_EQ(no_seuss, render_text->GetLayoutText()); render_text->SetObscured(false); EXPECT_EQ(seuss, render_text->text()); EXPECT_EQ(seuss, render_text->GetLayoutText()); render_text->SetObscured(true); // Surrogate pairs are counted as one code point. const char16 invalid_surrogates[] = {0xDC00, 0xD800, 0}; render_text->SetText(invalid_surrogates); EXPECT_EQ(ASCIIToUTF16("**"), render_text->GetLayoutText()); const char16 valid_surrogates[] = {0xD800, 0xDC00, 0}; render_text->SetText(valid_surrogates); EXPECT_EQ(ASCIIToUTF16("*"), render_text->GetLayoutText()); EXPECT_EQ(0U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(2U, render_text->cursor_position()); // Test index conversion and cursor validity with a valid surrogate pair. EXPECT_EQ(0U, render_text->TextIndexToLayoutIndex(0U)); EXPECT_EQ(1U, render_text->TextIndexToLayoutIndex(1U)); EXPECT_EQ(1U, render_text->TextIndexToLayoutIndex(2U)); EXPECT_EQ(0U, render_text->LayoutIndexToTextIndex(0U)); EXPECT_EQ(2U, render_text->LayoutIndexToTextIndex(1U)); EXPECT_TRUE(render_text->IsCursorablePosition(0U)); EXPECT_FALSE(render_text->IsCursorablePosition(1U)); EXPECT_TRUE(render_text->IsCursorablePosition(2U)); // FindCursorPosition() should not return positions between a surrogate pair. render_text->SetDisplayRect(Rect(0, 0, 20, 20)); EXPECT_EQ(render_text->FindCursorPosition(Point(0, 0)).caret_pos(), 0U); EXPECT_EQ(render_text->FindCursorPosition(Point(20, 0)).caret_pos(), 2U); for (int x = -1; x <= 20; ++x) { SelectionModel selection = render_text->FindCursorPosition(Point(x, 0)); EXPECT_TRUE(selection.caret_pos() == 0U || selection.caret_pos() == 2U); } // GetGlyphBounds() should yield the entire string bounds for text index 0. EXPECT_EQ(render_text->GetStringSize().width(), static_cast<int>(render_text->GetGlyphBounds(0U).length())); // Cursoring is independent of underlying characters when text is obscured. const wchar_t* const texts[] = { kWeak, kLtr, kLtrRtl, kLtrRtlLtr, kRtl, kRtlLtr, kRtlLtrRtl, L"hop on pop", // Check LTR word boundaries. L"\x05d0\x05d1 \x05d0\x05d2 \x05d1\x05d2", // Check RTL word boundaries. }; for (size_t i = 0; i < arraysize(texts); ++i) { base::string16 text = WideToUTF16(texts[i]); TestVisualCursorMotionInObscuredField(render_text.get(), text, false); TestVisualCursorMotionInObscuredField(render_text.get(), text, true); } } TEST_F(RenderTextTest, RevealObscuredText) { const base::string16 seuss = ASCIIToUTF16("hop on pop"); const base::string16 no_seuss = ASCIIToUTF16("**********"); scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(seuss); render_text->SetObscured(true); EXPECT_EQ(seuss, render_text->text()); EXPECT_EQ(no_seuss, render_text->GetLayoutText()); // Valid reveal index and new revealed index clears previous one. render_text->RenderText::SetObscuredRevealIndex(0); EXPECT_EQ(ASCIIToUTF16("h*********"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(1); EXPECT_EQ(ASCIIToUTF16("*o********"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(2); EXPECT_EQ(ASCIIToUTF16("**p*******"), render_text->GetLayoutText()); // Invalid reveal index. render_text->RenderText::SetObscuredRevealIndex(-1); EXPECT_EQ(no_seuss, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(seuss.length() + 1); EXPECT_EQ(no_seuss, render_text->GetLayoutText()); // SetObscured clears the revealed index. render_text->RenderText::SetObscuredRevealIndex(0); EXPECT_EQ(ASCIIToUTF16("h*********"), render_text->GetLayoutText()); render_text->SetObscured(false); EXPECT_EQ(seuss, render_text->GetLayoutText()); render_text->SetObscured(true); EXPECT_EQ(no_seuss, render_text->GetLayoutText()); // SetText clears the revealed index. render_text->SetText(ASCIIToUTF16("new")); EXPECT_EQ(ASCIIToUTF16("***"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(2); EXPECT_EQ(ASCIIToUTF16("**w"), render_text->GetLayoutText()); render_text->SetText(ASCIIToUTF16("new longer")); EXPECT_EQ(ASCIIToUTF16("**********"), render_text->GetLayoutText()); // Text with invalid surrogates. const char16 invalid_surrogates[] = {0xDC00, 0xD800, 'h', 'o', 'p', 0}; render_text->SetText(invalid_surrogates); EXPECT_EQ(ASCIIToUTF16("*****"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(0); const char16 invalid_expect_0[] = {0xDC00, '*', '*', '*', '*', 0}; EXPECT_EQ(invalid_expect_0, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(1); const char16 invalid_expect_1[] = {'*', 0xD800, '*', '*', '*', 0}; EXPECT_EQ(invalid_expect_1, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(2); EXPECT_EQ(ASCIIToUTF16("**h**"), render_text->GetLayoutText()); // Text with valid surrogates before and after the reveal index. const char16 valid_surrogates[] = {0xD800, 0xDC00, 'h', 'o', 'p', 0xD800, 0xDC00, 0}; render_text->SetText(valid_surrogates); EXPECT_EQ(ASCIIToUTF16("*****"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(0); const char16 valid_expect_0_and_1[] = {0xD800, 0xDC00, '*', '*', '*', '*', 0}; EXPECT_EQ(valid_expect_0_and_1, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(1); EXPECT_EQ(valid_expect_0_and_1, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(2); EXPECT_EQ(ASCIIToUTF16("*h***"), render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(5); const char16 valid_expect_5_and_6[] = {'*', '*', '*', '*', 0xD800, 0xDC00, 0}; EXPECT_EQ(valid_expect_5_and_6, render_text->GetLayoutText()); render_text->RenderText::SetObscuredRevealIndex(6); EXPECT_EQ(valid_expect_5_and_6, render_text->GetLayoutText()); } TEST_F(RenderTextTest, TruncatedText) { struct { const wchar_t* text; const wchar_t* layout_text; } cases[] = { // Strings shorter than the truncation length should be laid out in full. { L"", L"" }, { kWeak, kWeak }, { kLtr, kLtr }, { kLtrRtl, kLtrRtl }, { kLtrRtlLtr, kLtrRtlLtr }, { kRtl, kRtl }, { kRtlLtr, kRtlLtr }, { kRtlLtrRtl, kRtlLtrRtl }, // Strings as long as the truncation length should be laid out in full. { L"01234", L"01234" }, // Long strings should be truncated with an ellipsis appended at the end. { L"012345", L"0123\x2026" }, { L"012" L" . ", L"012 \x2026" }, { L"012" L"abc", L"012a\x2026" }, { L"012" L"a" L"\x5d0\x5d1", L"012a\x2026" }, { L"012" L"a" L"\x5d1" L"b", L"012a\x2026" }, { L"012" L"\x5d0\x5d1\x5d2", L"012\x5d0\x2026" }, { L"012" L"\x5d0\x5d1" L"a", L"012\x5d0\x2026" }, { L"012" L"\x5d0" L"a" L"\x5d1", L"012\x5d0\x2026" }, // Surrogate pairs should be truncated reasonably enough. { L"0123\x0915\x093f", L"0123\x2026" }, { L"0\x05e9\x05bc\x05c1\x05b8", L"0\x05e9\x05bc\x05c1\x05b8" }, { L"01\x05e9\x05bc\x05c1\x05b8", L"01\x05e9\x05bc\x2026" }, { L"012\x05e9\x05bc\x05c1\x05b8", L"012\x05e9\x2026" }, { L"0123\x05e9\x05bc\x05c1\x05b8", L"0123\x2026" }, { L"01234\x05e9\x05bc\x05c1\x05b8", L"0123\x2026" }, { L"012\xF0\x9D\x84\x9E", L"012\xF0\x2026" }, }; scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->set_truncate_length(5); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { render_text->SetText(WideToUTF16(cases[i].text)); EXPECT_EQ(WideToUTF16(cases[i].text), render_text->text()); EXPECT_EQ(WideToUTF16(cases[i].layout_text), render_text->GetLayoutText()) << "For case " << i << ": " << cases[i].text; } } TEST_F(RenderTextTest, TruncatedObscuredText) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->set_truncate_length(3); render_text->SetObscured(true); render_text->SetText(WideToUTF16(L"abcdef")); EXPECT_EQ(WideToUTF16(L"abcdef"), render_text->text()); EXPECT_EQ(WideToUTF16(L"**\x2026"), render_text->GetLayoutText()); } TEST_F(RenderTextTest, TruncatedCursorMovementLTR) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->set_truncate_length(2); render_text->SetText(WideToUTF16(L"abcd")); EXPECT_EQ(SelectionModel(0, CURSOR_BACKWARD), render_text->selection_model()); render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(SelectionModel(4, CURSOR_FORWARD), render_text->selection_model()); render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); EXPECT_EQ(SelectionModel(0, CURSOR_BACKWARD), render_text->selection_model()); std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); // The cursor hops over the ellipsis and elided text to the line end. expected.push_back(SelectionModel(4, CURSOR_BACKWARD)); expected.push_back(SelectionModel(4, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); expected.clear(); expected.push_back(SelectionModel(4, CURSOR_FORWARD)); // The cursor hops over the elided text to preceeding text. expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); } TEST_F(RenderTextTest, TruncatedCursorMovementRTL) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->set_truncate_length(2); render_text->SetText(WideToUTF16(L"\x5d0\x5d1\x5d2\x5d3")); EXPECT_EQ(SelectionModel(0, CURSOR_BACKWARD), render_text->selection_model()); render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); EXPECT_EQ(SelectionModel(4, CURSOR_FORWARD), render_text->selection_model()); render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(SelectionModel(0, CURSOR_BACKWARD), render_text->selection_model()); std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); // The cursor hops over the ellipsis and elided text to the line end. expected.push_back(SelectionModel(4, CURSOR_BACKWARD)); expected.push_back(SelectionModel(4, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); expected.clear(); expected.push_back(SelectionModel(4, CURSOR_FORWARD)); // The cursor hops over the elided text to preceeding text. expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); } TEST_F(RenderTextTest, GetTextDirection) { // struct { // const wchar_t* text; // const base::i18n::TextDirection text_direction; // } cases[] = { // // Blank strings and those with no/weak directionality default to LTR. // { L"", base::i18n::LEFT_TO_RIGHT }, // { kWeak, base::i18n::LEFT_TO_RIGHT }, // // Strings that begin with strong LTR characters. // { kLtr, base::i18n::LEFT_TO_RIGHT }, // { kLtrRtl, base::i18n::LEFT_TO_RIGHT }, // { kLtrRtlLtr, base::i18n::LEFT_TO_RIGHT }, // // Strings that begin with strong RTL characters. // { kRtl, base::i18n::RIGHT_TO_LEFT }, // { kRtlLtr, base::i18n::RIGHT_TO_LEFT }, // { kRtlLtrRtl, base::i18n::RIGHT_TO_LEFT }, // }; // // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // const bool was_rtl = base::i18n::IsRTL(); // // for (size_t i = 0; i < 2; ++i) { // // Toggle the application default text direction (to try each direction). // SetRTL(!base::i18n::IsRTL()); // const base::i18n::TextDirection ui_direction = base::i18n::IsRTL() ? // base::i18n::RIGHT_TO_LEFT : base::i18n::LEFT_TO_RIGHT; // // // Ensure that directionality modes yield the correct text directions. // for (size_t j = 0; j < ARRAYSIZE_UNSAFE(cases); j++) { // render_text->SetText(WideToUTF16(cases[j].text)); // render_text->SetDirectionalityMode(DIRECTIONALITY_FROM_TEXT); // EXPECT_EQ(render_text->GetTextDirection(), cases[j].text_direction); // render_text->SetDirectionalityMode(DIRECTIONALITY_FROM_UI); // EXPECT_EQ(render_text->GetTextDirection(), ui_direction); // render_text->SetDirectionalityMode(DIRECTIONALITY_FORCE_LTR); // EXPECT_EQ(render_text->GetTextDirection(), base::i18n::LEFT_TO_RIGHT); // render_text->SetDirectionalityMode(DIRECTIONALITY_FORCE_RTL); // EXPECT_EQ(render_text->GetTextDirection(), base::i18n::RIGHT_TO_LEFT); // } // } // // EXPECT_EQ(was_rtl, base::i18n::IsRTL()); // // // Ensure that text changes update the direction for DIRECTIONALITY_FROM_TEXT. // render_text->SetDirectionalityMode(DIRECTIONALITY_FROM_TEXT); // render_text->SetText(WideToUTF16(kLtr)); // EXPECT_EQ(render_text->GetTextDirection(), base::i18n::LEFT_TO_RIGHT); // render_text->SetText(WideToUTF16(kRtl)); // EXPECT_EQ(render_text->GetTextDirection(), base::i18n::RIGHT_TO_LEFT); } TEST_F(RenderTextTest, MoveCursorLeftRightInLtr) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // Pure LTR. render_text->SetText(ASCIIToUTF16("abc")); // |expected| saves the expected SelectionModel when moving cursor from left // to right. std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); expected.push_back(SelectionModel(2, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); expected.clear(); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); expected.push_back(SelectionModel(2, CURSOR_FORWARD)); expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); } TEST_F(RenderTextTest, MoveCursorLeftRightInLtrRtl) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // LTR-RTL render_text->SetText(WideToUTF16(L"abc\x05d0\x05d1\x05d2")); // The last one is the expected END position. std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); expected.push_back(SelectionModel(2, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_BACKWARD)); expected.push_back(SelectionModel(5, CURSOR_FORWARD)); expected.push_back(SelectionModel(4, CURSOR_FORWARD)); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); expected.push_back(SelectionModel(6, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); expected.clear(); expected.push_back(SelectionModel(6, CURSOR_FORWARD)); expected.push_back(SelectionModel(4, CURSOR_BACKWARD)); expected.push_back(SelectionModel(5, CURSOR_BACKWARD)); expected.push_back(SelectionModel(6, CURSOR_BACKWARD)); expected.push_back(SelectionModel(2, CURSOR_FORWARD)); expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); } TEST_F(RenderTextTest, MoveCursorLeftRightInLtrRtlLtr) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // LTR-RTL-LTR. render_text->SetText(WideToUTF16(L"a" L"\x05d1" L"b")); std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(3, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); expected.clear(); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); expected.push_back(SelectionModel(2, CURSOR_FORWARD)); expected.push_back(SelectionModel(2, CURSOR_BACKWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); } TEST_F(RenderTextTest, MoveCursorLeftRightInRtl) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // Pure RTL. render_text->SetText(WideToUTF16(L"\x05d0\x05d1\x05d2")); render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); expected.push_back(SelectionModel(2, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); expected.clear(); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); expected.push_back(SelectionModel(2, CURSOR_FORWARD)); expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); } TEST_F(RenderTextTest, MoveCursorLeftRightInRtlLtr) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // RTL-LTR render_text->SetText(WideToUTF16(L"\x05d0\x05d1\x05d2" L"abc")); render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); expected.push_back(SelectionModel(2, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_BACKWARD)); expected.push_back(SelectionModel(5, CURSOR_FORWARD)); expected.push_back(SelectionModel(4, CURSOR_FORWARD)); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); expected.push_back(SelectionModel(6, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); expected.clear(); expected.push_back(SelectionModel(6, CURSOR_FORWARD)); expected.push_back(SelectionModel(4, CURSOR_BACKWARD)); expected.push_back(SelectionModel(5, CURSOR_BACKWARD)); expected.push_back(SelectionModel(6, CURSOR_BACKWARD)); expected.push_back(SelectionModel(2, CURSOR_FORWARD)); expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); } TEST_F(RenderTextTest, MoveCursorLeftRightInRtlLtrRtl) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // RTL-LTR-RTL. render_text->SetText(WideToUTF16(L"\x05d0" L"a" L"\x05d1")); render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); std::vector<SelectionModel> expected; expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_BACKWARD)); expected.push_back(SelectionModel(1, CURSOR_FORWARD)); expected.push_back(SelectionModel(3, CURSOR_BACKWARD)); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_LEFT); expected.clear(); expected.push_back(SelectionModel(3, CURSOR_FORWARD)); expected.push_back(SelectionModel(2, CURSOR_FORWARD)); expected.push_back(SelectionModel(2, CURSOR_BACKWARD)); expected.push_back(SelectionModel(0, CURSOR_FORWARD)); expected.push_back(SelectionModel(0, CURSOR_BACKWARD)); RunMoveCursorLeftRightTest(render_text.get(), expected, CURSOR_RIGHT); } // TODO(xji): temporarily disable in platform Win since the complex script // characters turned into empty square due to font regression. So, not able // to test 2 characters belong to the same grapheme. #if defined(OS_LINUX) TEST_F(RenderTextTest, MoveCursorLeftRight_ComplexScript) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(WideToUTF16(L"\x0915\x093f\x0915\x094d\x0915")); EXPECT_EQ(0U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(2U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(4U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(5U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(5U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(4U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(2U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(0U, render_text->cursor_position()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(0U, render_text->cursor_position()); } #endif TEST_F(RenderTextTest, MoveCursorLeftRight_MeiryoUILigatures) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // Meiryo UI uses single-glyph ligatures for 'ff' and 'ffi', but each letter // (code point) has unique bounds, so mid-glyph cursoring should be possible. render_text->SetFont(Font("Meiryo UI", 12)); render_text->SetText(WideToUTF16(L"ff ffi")); EXPECT_EQ(0U, render_text->cursor_position()); for (size_t i = 0; i < render_text->text().length(); ++i) { render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(i + 1, render_text->cursor_position()); } EXPECT_EQ(6U, render_text->cursor_position()); } TEST_F(RenderTextTest, GraphemePositions) { // LTR 2-character grapheme, LTR abc, LTR 2-character grapheme. const base::string16 kText1 = WideToUTF16(L"\x0915\x093f" L"abc" L"\x0915\x093f"); // LTR ab, LTR 2-character grapheme, LTR cd. const base::string16 kText2 = WideToUTF16(L"ab" L"\x0915\x093f" L"cd"); // The below is 'MUSICAL SYMBOL G CLEF', which is represented in UTF-16 as // two characters forming the surrogate pair 0x0001D11E. const std::string kSurrogate = "\xF0\x9D\x84\x9E"; // LTR ab, UTF16 surrogate pair, LTR cd. const base::string16 kText3 = UTF8ToUTF16("ab" + kSurrogate + "cd"); struct { base::string16 text; size_t index; size_t expected_previous; size_t expected_next; } cases[] = { { base::string16(), 0, 0, 0 }, { base::string16(), 1, 0, 0 }, { base::string16(), 50, 0, 0 }, { kText1, 0, 0, 2 }, { kText1, 1, 0, 2 }, { kText1, 2, 0, 3 }, { kText1, 3, 2, 4 }, { kText1, 4, 3, 5 }, { kText1, 5, 4, 7 }, { kText1, 6, 5, 7 }, { kText1, 7, 5, 7 }, { kText1, 8, 7, 7 }, { kText1, 50, 7, 7 }, { kText2, 0, 0, 1 }, { kText2, 1, 0, 2 }, { kText2, 2, 1, 4 }, { kText2, 3, 2, 4 }, { kText2, 4, 2, 5 }, { kText2, 5, 4, 6 }, { kText2, 6, 5, 6 }, { kText2, 7, 6, 6 }, { kText2, 50, 6, 6 }, { kText3, 0, 0, 1 }, { kText3, 1, 0, 2 }, { kText3, 2, 1, 4 }, { kText3, 3, 2, 4 }, { kText3, 4, 2, 5 }, { kText3, 5, 4, 6 }, { kText3, 6, 5, 6 }, { kText3, 7, 6, 6 }, { kText3, 50, 6, 6 }, }; // TODO(asvitkine): Disable tests that fail on XP bots due to lack of complete // font support for some scripts - http://crbug.com/106450 #if defined(OS_WIN) if (base::win::GetVersion() < base::win::VERSION_VISTA) return; #endif scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { render_text->SetText(cases[i].text); size_t next = render_text->IndexOfAdjacentGrapheme(cases[i].index, CURSOR_FORWARD); EXPECT_EQ(cases[i].expected_next, next); EXPECT_TRUE(render_text->IsCursorablePosition(next)); size_t previous = render_text->IndexOfAdjacentGrapheme(cases[i].index, CURSOR_BACKWARD); EXPECT_EQ(cases[i].expected_previous, previous); EXPECT_TRUE(render_text->IsCursorablePosition(previous)); } } TEST_F(RenderTextTest, EdgeSelectionModels) { // // Simple Latin text. // const base::string16 kLatin = WideToUTF16(L"abc"); // // LTR 2-character grapheme. // const base::string16 kLTRGrapheme = WideToUTF16(L"\x0915\x093f"); // // LTR 2-character grapheme, LTR a, LTR 2-character grapheme. // const base::string16 kHindiLatin = // WideToUTF16(L"\x0915\x093f" L"a" L"\x0915\x093f"); // // RTL 2-character grapheme. // const base::string16 kRTLGrapheme = WideToUTF16(L"\x05e0\x05b8"); // // RTL 2-character grapheme, LTR a, RTL 2-character grapheme. // const base::string16 kHebrewLatin = // WideToUTF16(L"\x05e0\x05b8" L"a" L"\x05e0\x05b8"); // // struct { // base::string16 text; // base::i18n::TextDirection expected_text_direction; // } cases[] = { // { base::string16(), base::i18n::LEFT_TO_RIGHT }, // { kLatin, base::i18n::LEFT_TO_RIGHT }, // { kLTRGrapheme, base::i18n::LEFT_TO_RIGHT }, // { kHindiLatin, base::i18n::LEFT_TO_RIGHT }, // { kRTLGrapheme, base::i18n::RIGHT_TO_LEFT }, // { kHebrewLatin, base::i18n::RIGHT_TO_LEFT }, // }; // // // TODO(asvitkine): Disable tests that fail on XP bots due to lack of complete // // font support for some scripts - http://crbug.com/106450 // #if defined(OS_WIN) // if (base::win::GetVersion() < base::win::VERSION_VISTA) // return; // #endif // // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { // render_text->SetText(cases[i].text); // bool ltr = (cases[i].expected_text_direction == base::i18n::LEFT_TO_RIGHT); // // SelectionModel start_edge = // render_text->EdgeSelectionModel(ltr ? CURSOR_LEFT : CURSOR_RIGHT); // EXPECT_EQ(start_edge, SelectionModel(0, CURSOR_BACKWARD)); // // SelectionModel end_edge = // render_text->EdgeSelectionModel(ltr ? CURSOR_RIGHT : CURSOR_LEFT); // EXPECT_EQ(end_edge, SelectionModel(cases[i].text.length(), CURSOR_FORWARD)); // } } TEST_F(RenderTextTest, SelectAll) { // const wchar_t* const cases[] = // { kWeak, kLtr, kLtrRtl, kLtrRtlLtr, kRtl, kRtlLtr, kRtlLtrRtl }; // // // Ensure that SelectAll respects the |reversed| argument regardless of // // application locale and text content directionality. // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // const SelectionModel expected_reversed(Range(3, 0), CURSOR_FORWARD); // const SelectionModel expected_forwards(Range(0, 3), CURSOR_BACKWARD); // const bool was_rtl = base::i18n::IsRTL(); // // for (size_t i = 0; i < 2; ++i) { // SetRTL(!base::i18n::IsRTL()); // // Test that an empty string produces an empty selection model. // render_text->SetText(base::string16()); // EXPECT_EQ(render_text->selection_model(), SelectionModel()); // // // Test the weak, LTR, RTL, and Bidi string cases. // for (size_t j = 0; j < ARRAYSIZE_UNSAFE(cases); j++) { // render_text->SetText(WideToUTF16(cases[j])); // render_text->SelectAll(false); // EXPECT_EQ(render_text->selection_model(), expected_forwards); // render_text->SelectAll(true); // EXPECT_EQ(render_text->selection_model(), expected_reversed); // } // } // // EXPECT_EQ(was_rtl, base::i18n::IsRTL()); } TEST_F(RenderTextTest, MoveCursorLeftRightWithSelection) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(WideToUTF16(L"abc\x05d0\x05d1\x05d2")); // Left arrow on select ranging (6, 4). render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(6), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(Range(4), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(Range(5), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(Range(6), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, true); EXPECT_EQ(Range(6, 5), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, true); EXPECT_EQ(Range(6, 4), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(Range(6), render_text->selection()); // Right arrow on select ranging (4, 6). render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); EXPECT_EQ(Range(0), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(1), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(2), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(3), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(5), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(4), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, true); EXPECT_EQ(Range(4, 5), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, true); EXPECT_EQ(Range(4, 6), render_text->selection()); render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(Range(4), render_text->selection()); } #endif // !defined(OS_MACOSX) // TODO(xji): Make these work on Windows. #if defined(OS_LINUX) void MoveLeftRightByWordVerifier(RenderText* render_text, const wchar_t* str) { render_text->SetText(WideToUTF16(str)); // Test moving by word from left ro right. render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); bool first_word = true; while (true) { // First, test moving by word from a word break position, such as from // "|abc def" to "abc| def". SelectionModel start = render_text->selection_model(); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); SelectionModel end = render_text->selection_model(); if (end == start) // reach the end. break; // For testing simplicity, each word is a 3-character word. int num_of_character_moves = first_word ? 3 : 4; first_word = false; render_text->MoveCursorTo(start); for (int j = 0; j < num_of_character_moves; ++j) render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(end, render_text->selection_model()); // Then, test moving by word from positions inside the word, such as from // "a|bc def" to "abc| def", and from "ab|c def" to "abc| def". for (int j = 1; j < num_of_character_moves; ++j) { render_text->MoveCursorTo(start); for (int k = 0; k < j; ++k) render_text->MoveCursor(CHARACTER_BREAK, CURSOR_RIGHT, false); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(end, render_text->selection_model()); } } // Test moving by word from right to left. render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); first_word = true; while (true) { SelectionModel start = render_text->selection_model(); render_text->MoveCursor(WORD_BREAK, CURSOR_LEFT, false); SelectionModel end = render_text->selection_model(); if (end == start) // reach the end. break; int num_of_character_moves = first_word ? 3 : 4; first_word = false; render_text->MoveCursorTo(start); for (int j = 0; j < num_of_character_moves; ++j) render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); EXPECT_EQ(end, render_text->selection_model()); for (int j = 1; j < num_of_character_moves; ++j) { render_text->MoveCursorTo(start); for (int k = 0; k < j; ++k) render_text->MoveCursor(CHARACTER_BREAK, CURSOR_LEFT, false); render_text->MoveCursor(WORD_BREAK, CURSOR_LEFT, false); EXPECT_EQ(end, render_text->selection_model()); } } } TEST_F(RenderTextTest, MoveLeftRightByWordInBidiText) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // For testing simplicity, each word is a 3-character word. std::vector<const wchar_t*> test; test.push_back(L"abc"); test.push_back(L"abc def"); test.push_back(L"\x05E1\x05E2\x05E3"); test.push_back(L"\x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6"); test.push_back(L"abc \x05E1\x05E2\x05E3"); test.push_back(L"abc def \x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6"); test.push_back(L"abc def hij \x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6" L" \x05E7\x05E8\x05E9"); test.push_back(L"abc \x05E1\x05E2\x05E3 hij"); test.push_back(L"abc def \x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6 hij opq"); test.push_back(L"abc def hij \x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6" L" \x05E7\x05E8\x05E9" L" opq rst uvw"); test.push_back(L"\x05E1\x05E2\x05E3 abc"); test.push_back(L"\x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6 abc def"); test.push_back(L"\x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6 \x05E7\x05E8\x05E9" L" abc def hij"); test.push_back(L"\x05D1\x05D2\x05D3 abc \x05E1\x05E2\x05E3"); test.push_back(L"\x05D1\x05D2\x05D3 \x05D4\x05D5\x05D6 abc def" L" \x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6"); test.push_back(L"\x05D1\x05D2\x05D3 \x05D4\x05D5\x05D6 \x05D7\x05D8\x05D9" L" abc def hij \x05E1\x05E2\x05E3 \x05E4\x05E5\x05E6" L" \x05E7\x05E8\x05E9"); for (size_t i = 0; i < test.size(); ++i) MoveLeftRightByWordVerifier(render_text.get(), test[i]); } TEST_F(RenderTextTest, MoveLeftRightByWordInBidiText_TestEndOfText) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(WideToUTF16(L"ab\x05E1")); // Moving the cursor by word from "abC|" to the left should return "|abC". // But since end of text is always treated as a word break, it returns // position "ab|C". // TODO(xji): Need to make it work as expected. render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); render_text->MoveCursor(WORD_BREAK, CURSOR_LEFT, false); // EXPECT_EQ(SelectionModel(), render_text->selection_model()); // Moving the cursor by word from "|abC" to the right returns "abC|". render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(SelectionModel(3, CURSOR_FORWARD), render_text->selection_model()); render_text->SetText(WideToUTF16(L"\x05E1\x05E2" L"a")); // For logical text "BCa", moving the cursor by word from "aCB|" to the left // returns "|aCB". render_text->MoveCursor(LINE_BREAK, CURSOR_RIGHT, false); render_text->MoveCursor(WORD_BREAK, CURSOR_LEFT, false); EXPECT_EQ(SelectionModel(3, CURSOR_FORWARD), render_text->selection_model()); // Moving the cursor by word from "|aCB" to the right should return "aCB|". // But since end of text is always treated as a word break, it returns // position "a|CB". // TODO(xji): Need to make it work as expected. render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); // EXPECT_EQ(SelectionModel(), render_text->selection_model()); } TEST_F(RenderTextTest, MoveLeftRightByWordInTextWithMultiSpaces) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(WideToUTF16(L"abc def")); render_text->MoveCursorTo(SelectionModel(5, CURSOR_FORWARD)); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(11U, render_text->cursor_position()); render_text->MoveCursorTo(SelectionModel(5, CURSOR_FORWARD)); render_text->MoveCursor(WORD_BREAK, CURSOR_LEFT, false); EXPECT_EQ(0U, render_text->cursor_position()); } TEST_F(RenderTextTest, MoveLeftRightByWordInChineseText) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(WideToUTF16(L"\x6211\x4EEC\x53BB\x516C\x56ED\x73A9")); render_text->MoveCursor(LINE_BREAK, CURSOR_LEFT, false); EXPECT_EQ(0U, render_text->cursor_position()); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(2U, render_text->cursor_position()); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(3U, render_text->cursor_position()); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(5U, render_text->cursor_position()); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(6U, render_text->cursor_position()); render_text->MoveCursor(WORD_BREAK, CURSOR_RIGHT, false); EXPECT_EQ(6U, render_text->cursor_position()); } #endif #if defined(OS_WIN) TEST_F(RenderTextTest, Win_LogicalClusters) { scoped_ptr<RenderTextWin> render_text( static_cast<RenderTextWin*>(RenderText::CreateInstance())); const base::string16 test_string = WideToUTF16(L"\x0930\x0930\x0930\x0930\x0930"); render_text->SetText(test_string); render_text->EnsureLayout(); ASSERT_EQ(1U, render_text->runs_.size()); WORD* logical_clusters = render_text->runs_[0]->logical_clusters.get(); for (size_t i = 0; i < test_string.length(); ++i) EXPECT_EQ(i, logical_clusters[i]); } #endif // defined(OS_WIN) TEST_F(RenderTextTest, StringSizeSanity) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(UTF8ToUTF16("Hello World")); const Size string_size = render_text->GetStringSize(); EXPECT_GT(string_size.width(), 0); EXPECT_GT(string_size.height(), 0); } // TODO(asvitkine): This test fails because PlatformFontMac uses point font // sizes instead of pixel sizes like other implementations. #if !defined(OS_MACOSX) TEST_F(RenderTextTest, StringSizeEmptyString) { // Ascent and descent of Arial and Symbol are different on most platforms. const FontList font_list("Arial,Symbol, 16px"); scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetFontList(font_list); // The empty string respects FontList metrics for non-zero height // and baseline. render_text->SetText(base::string16()); EXPECT_EQ(font_list.GetHeight(), render_text->GetStringSize().height()); EXPECT_EQ(0, render_text->GetStringSize().width()); EXPECT_EQ(font_list.GetBaseline(), render_text->GetBaseline()); render_text->SetText(UTF8ToUTF16(" ")); EXPECT_EQ(font_list.GetHeight(), render_text->GetStringSize().height()); EXPECT_EQ(font_list.GetBaseline(), render_text->GetBaseline()); } #endif // !defined(OS_MACOSX) TEST_F(RenderTextTest, StringSizeRespectsFontListMetrics) { // Check that Arial and Symbol have different font metrics. Font arial_font("Arial", 16); Font symbol_font("Symbol", 16); EXPECT_NE(arial_font.GetHeight(), symbol_font.GetHeight()); EXPECT_NE(arial_font.GetBaseline(), symbol_font.GetBaseline()); // "a" should be rendered with Arial, not with Symbol. const char* arial_font_text = "a"; // "®" (registered trademark symbol) should be rendered with Symbol, // not with Arial. const char* symbol_font_text = "\xC2\xAE"; Font smaller_font = arial_font; Font larger_font = symbol_font; const char* smaller_font_text = arial_font_text; const char* larger_font_text = symbol_font_text; if (symbol_font.GetHeight() < arial_font.GetHeight() && symbol_font.GetBaseline() < arial_font.GetBaseline()) { std::swap(smaller_font, larger_font); std::swap(smaller_font_text, larger_font_text); } ASSERT_LT(smaller_font.GetHeight(), larger_font.GetHeight()); ASSERT_LT(smaller_font.GetBaseline(), larger_font.GetBaseline()); // Check |smaller_font_text| is rendered with the smaller font. scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(UTF8ToUTF16(smaller_font_text)); render_text->SetFont(smaller_font); EXPECT_EQ(smaller_font.GetHeight(), render_text->GetStringSize().height()); EXPECT_EQ(smaller_font.GetBaseline(), render_text->GetBaseline()); // Layout the same text with mixed fonts. The text should be rendered with // the smaller font, but the height and baseline are determined with the // metrics of the font list, which is equal to the larger font. std::vector<Font> fonts; fonts.push_back(smaller_font); // The primary font is the smaller font. fonts.push_back(larger_font); const FontList font_list(fonts); render_text->SetFontList(font_list); EXPECT_LT(smaller_font.GetHeight(), render_text->GetStringSize().height()); EXPECT_LT(smaller_font.GetBaseline(), render_text->GetBaseline()); EXPECT_EQ(font_list.GetHeight(), render_text->GetStringSize().height()); EXPECT_EQ(font_list.GetBaseline(), render_text->GetBaseline()); } TEST_F(RenderTextTest, SetFont) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetFont(Font("Arial", 12)); EXPECT_EQ("Arial", render_text->GetPrimaryFont().GetFontName()); EXPECT_EQ(12, render_text->GetPrimaryFont().GetFontSize()); } TEST_F(RenderTextTest, SetFontList) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetFontList(FontList("Arial,Symbol, 13px")); const std::vector<Font>& fonts = render_text->font_list().GetFonts(); ASSERT_EQ(2U, fonts.size()); EXPECT_EQ("Arial", fonts[0].GetFontName()); EXPECT_EQ("Symbol", fonts[1].GetFontName()); EXPECT_EQ(13, render_text->GetPrimaryFont().GetFontSize()); } TEST_F(RenderTextTest, StringSizeBoldWidth) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(UTF8ToUTF16("Hello World")); const int plain_width = render_text->GetStringSize().width(); EXPECT_GT(plain_width, 0); // Apply a bold style and check that the new width is greater. render_text->SetStyle(BOLD, true); const int bold_width = render_text->GetStringSize().width(); EXPECT_GT(bold_width, plain_width); // Now, apply a plain style over the first word only. render_text->ApplyStyle(BOLD, false, Range(0, 5)); const int plain_bold_width = render_text->GetStringSize().width(); EXPECT_GT(plain_bold_width, plain_width); EXPECT_LT(plain_bold_width, bold_width); } TEST_F(RenderTextTest, StringSizeHeight) { base::string16 cases[] = { WideToUTF16(L"Hello World!"), // English WideToUTF16(L"\x6328\x62f6"), // Japanese WideToUTF16(L"\x0915\x093f"), // Hindi WideToUTF16(L"\x05e0\x05b8"), // Hebrew }; Font default_font; Font larger_font = default_font.DeriveFont(24, default_font.GetStyle()); EXPECT_GT(larger_font.GetHeight(), default_font.GetHeight()); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetFont(default_font); render_text->SetText(cases[i]); const int height1 = render_text->GetStringSize().height(); EXPECT_GT(height1, 0); // Check that setting the larger font increases the height. render_text->SetFont(larger_font); const int height2 = render_text->GetStringSize().height(); EXPECT_GT(height2, height1); } } TEST_F(RenderTextTest, GetBaselineSanity) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(UTF8ToUTF16("Hello World")); const int baseline = render_text->GetBaseline(); EXPECT_GT(baseline, 0); } TEST_F(RenderTextTest, CursorBoundsInReplacementMode) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16("abcdefg")); render_text->SetDisplayRect(Rect(100, 17)); SelectionModel sel_b(1, CURSOR_FORWARD); SelectionModel sel_c(2, CURSOR_FORWARD); Rect cursor_around_b = render_text->GetCursorBounds(sel_b, false); Rect cursor_before_b = render_text->GetCursorBounds(sel_b, true); Rect cursor_before_c = render_text->GetCursorBounds(sel_c, true); EXPECT_EQ(cursor_around_b.x(), cursor_before_b.x()); EXPECT_EQ(cursor_around_b.right(), cursor_before_c.x()); } TEST_F(RenderTextTest, GetTextOffset) { // The default horizontal text offset differs for LTR and RTL, and is only set // when the RenderText object is created. This test will check the default in // LTR mode, and the next test will check the RTL default. // const bool was_rtl = base::i18n::IsRTL(); // SetRTL(false); // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // render_text->SetText(ASCIIToUTF16("abcdefg")); // render_text->SetFontList(FontList("Arial, 13px")); // // // Set display area's size equal to the font size. // const Size font_size(render_text->GetContentWidth(), // render_text->GetStringSize().height()); // Rect display_rect(font_size); // render_text->SetDisplayRect(display_rect); // // Vector2d offset = render_text->GetLineOffset(0); // EXPECT_TRUE(offset.IsZero()); // // // Set display area's size greater than font size. // const int kEnlargement = 2; // display_rect.Inset(0, 0, -kEnlargement, -kEnlargement); // render_text->SetDisplayRect(display_rect); // // // Check the default horizontal and vertical alignment. // offset = render_text->GetLineOffset(0); // EXPECT_EQ(kEnlargement / 2, offset.y()); // EXPECT_EQ(0, offset.x()); // // // Check explicitly setting the horizontal alignment. // render_text->SetHorizontalAlignment(ALIGN_LEFT); // offset = render_text->GetLineOffset(0); // EXPECT_EQ(0, offset.x()); // render_text->SetHorizontalAlignment(ALIGN_CENTER); // offset = render_text->GetLineOffset(0); // EXPECT_EQ(kEnlargement / 2, offset.x()); // render_text->SetHorizontalAlignment(ALIGN_RIGHT); // offset = render_text->GetLineOffset(0); // EXPECT_EQ(kEnlargement, offset.x()); // // // Check explicitly setting the vertical alignment. // render_text->SetVerticalAlignment(ALIGN_TOP); // offset = render_text->GetLineOffset(0); // EXPECT_EQ(0, offset.y()); // render_text->SetVerticalAlignment(ALIGN_VCENTER); // offset = render_text->GetLineOffset(0); // EXPECT_EQ(kEnlargement / 2, offset.y()); // render_text->SetVerticalAlignment(ALIGN_BOTTOM); // offset = render_text->GetLineOffset(0); // EXPECT_EQ(kEnlargement, offset.y()); // // SetRTL(was_rtl); } TEST_F(RenderTextTest, GetTextOffsetHorizontalDefaultInRTL) { // This only checks the default horizontal alignment in RTL mode; all other // GetLineOffset(0) attributes are checked by the test above. // const bool was_rtl = base::i18n::IsRTL(); // SetRTL(true); // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // render_text->SetText(ASCIIToUTF16("abcdefg")); // render_text->SetFontList(FontList("Arial, 13px")); // const int kEnlargement = 2; // const Size font_size(render_text->GetContentWidth() + kEnlargement, // render_text->GetStringSize().height()); // Rect display_rect(font_size); // render_text->SetDisplayRect(display_rect); // Vector2d offset = render_text->GetLineOffset(0); // EXPECT_EQ(kEnlargement, offset.x()); // SetRTL(was_rtl); } TEST_F(RenderTextTest, SameFontForParentheses) { struct { const char16 left_char; const char16 right_char; } punctuation_pairs[] = { { '(', ')' }, { '{', '}' }, { '<', '>' }, }; struct { base::string16 text; } cases[] = { // English(English) { WideToUTF16(L"Hello World(a)") }, // English(English)English { WideToUTF16(L"Hello World(a)Hello World") }, // Japanese(English) { WideToUTF16(L"\x6328\x62f6(a)") }, // Japanese(English)Japanese { WideToUTF16(L"\x6328\x62f6(a)\x6328\x62f6") }, // English(Japanese)English { WideToUTF16(L"Hello World(\x6328\x62f6)Hello World") }, // Hindi(English) { WideToUTF16(L"\x0915\x093f(a)") }, // Hindi(English)Hindi { WideToUTF16(L"\x0915\x093f(a)\x0915\x093f") }, // English(Hindi)English { WideToUTF16(L"Hello World(\x0915\x093f)Hello World") }, // Hebrew(English) { WideToUTF16(L"\x05e0\x05b8(a)") }, // Hebrew(English)Hebrew { WideToUTF16(L"\x05e0\x05b8(a)\x05e0\x05b8") }, // English(Hebrew)English { WideToUTF16(L"Hello World(\x05e0\x05b8)Hello World") }, }; scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { base::string16 text = cases[i].text; const size_t start_paren_char_index = text.find('('); ASSERT_NE(base::string16::npos, start_paren_char_index); const size_t end_paren_char_index = text.find(')'); ASSERT_NE(base::string16::npos, end_paren_char_index); for (size_t j = 0; j < ARRAYSIZE_UNSAFE(punctuation_pairs); ++j) { text[start_paren_char_index] = punctuation_pairs[j].left_char; text[end_paren_char_index] = punctuation_pairs[j].right_char; render_text->SetText(text); const std::vector<RenderText::FontSpan> spans = render_text->GetFontSpansForTesting(); int start_paren_span_index = -1; int end_paren_span_index = -1; for (size_t k = 0; k < spans.size(); ++k) { if (IndexInRange(spans[k].second, start_paren_char_index)) start_paren_span_index = k; if (IndexInRange(spans[k].second, end_paren_char_index)) end_paren_span_index = k; } ASSERT_NE(-1, start_paren_span_index); ASSERT_NE(-1, end_paren_span_index); const Font& start_font = spans[start_paren_span_index].first; const Font& end_font = spans[end_paren_span_index].first; EXPECT_EQ(start_font.GetFontName(), end_font.GetFontName()); EXPECT_EQ(start_font.GetFontSize(), end_font.GetFontSize()); EXPECT_EQ(start_font.GetStyle(), end_font.GetStyle()); } } } // Make sure the caret width is always >=1 so that the correct // caret is drawn at high DPI. crbug.com/164100. TEST_F(RenderTextTest, CaretWidth) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16("abcdefg")); EXPECT_GE(render_text->GetUpdatedCursorBounds().width(), 1); } TEST_F(RenderTextTest, SelectWord) { scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16(" foo a.bc.d bar")); struct { size_t cursor; size_t selection_start; size_t selection_end; } cases[] = { { 0, 0, 1 }, { 1, 1, 4 }, { 2, 1, 4 }, { 3, 1, 4 }, { 4, 4, 6 }, { 5, 4, 6 }, { 6, 6, 7 }, { 7, 7, 8 }, { 8, 8, 10 }, { 9, 8, 10 }, { 10, 10, 11 }, { 11, 11, 12 }, { 12, 12, 13 }, { 13, 13, 16 }, { 14, 13, 16 }, { 15, 13, 16 }, { 16, 13, 16 }, }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { render_text->SetCursorPosition(cases[i].cursor); render_text->SelectWord(); EXPECT_EQ(Range(cases[i].selection_start, cases[i].selection_end), render_text->selection()); } } // Make sure the last word is selected when the cursor is at text.length(). TEST_F(RenderTextTest, LastWordSelected) { const std::string kTestURL1 = "http://www.google.com"; const std::string kTestURL2 = "http://www.google.com/something/"; scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16(kTestURL1)); render_text->SetCursorPosition(kTestURL1.length()); render_text->SelectWord(); EXPECT_EQ(ASCIIToUTF16("com"), GetSelectedText(render_text.get())); EXPECT_FALSE(render_text->selection().is_reversed()); render_text->SetText(ASCIIToUTF16(kTestURL2)); render_text->SetCursorPosition(kTestURL2.length()); render_text->SelectWord(); EXPECT_EQ(ASCIIToUTF16("/"), GetSelectedText(render_text.get())); EXPECT_FALSE(render_text->selection().is_reversed()); } // When given a non-empty selection, SelectWord should expand the selection to // nearest word boundaries. TEST_F(RenderTextTest, SelectMultipleWords) { const std::string kTestURL = "http://www.google.com"; scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->SetText(ASCIIToUTF16(kTestURL)); render_text->SelectRange(Range(16, 20)); render_text->SelectWord(); EXPECT_EQ(ASCIIToUTF16("google.com"), GetSelectedText(render_text.get())); EXPECT_FALSE(render_text->selection().is_reversed()); // SelectWord should preserve the selection direction. render_text->SelectRange(Range(20, 16)); render_text->SelectWord(); EXPECT_EQ(ASCIIToUTF16("google.com"), GetSelectedText(render_text.get())); EXPECT_TRUE(render_text->selection().is_reversed()); } // TODO(asvitkine): Cursor movements tests disabled on Mac because RenderTextMac // does not implement this yet. http://crbug.com/131618 #if !defined(OS_MACOSX) TEST_F(RenderTextTest, DisplayRectShowsCursorLTR) { // ASSERT_FALSE(base::i18n::IsRTL()); // ASSERT_FALSE(base::i18n::ICUIsRTL()); // // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // render_text->SetText(WideToUTF16(L"abcdefghijklmnopqrstuvwxzyabcdefg")); // render_text->MoveCursorTo(SelectionModel(render_text->text().length(), // CURSOR_FORWARD)); // int width = render_text->GetStringSize().width(); // ASSERT_GT(width, 10); // // // Ensure that the cursor is placed at the width of its preceding text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(width, render_text->GetUpdatedCursorBounds().x()); // // // Ensure that shrinking the display rectangle keeps the cursor in view. // render_text->SetDisplayRect(Rect(width - 10, 1)); // EXPECT_EQ(render_text->display_rect().width(), // render_text->GetUpdatedCursorBounds().right()); // // // Ensure that the text will pan to fill its expanding display rectangle. // render_text->SetDisplayRect(Rect(width - 5, 1)); // EXPECT_EQ(render_text->display_rect().width(), // render_text->GetUpdatedCursorBounds().right()); // // // Ensure that a sufficiently large display rectangle shows all the text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(width, render_text->GetUpdatedCursorBounds().x()); // // // Repeat the test with RTL text. // render_text->SetText(WideToUTF16(L"\x5d0\x5d1\x5d2\x5d3\x5d4\x5d5\x5d6\x5d7" // L"\x5d8\x5d9\x5da\x5db\x5dc\x5dd\x5de\x5df")); // render_text->MoveCursorTo(SelectionModel(0, CURSOR_FORWARD)); // width = render_text->GetStringSize().width(); // ASSERT_GT(width, 10); // // // Ensure that the cursor is placed at the width of its preceding text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(width, render_text->GetUpdatedCursorBounds().x()); // // // Ensure that shrinking the display rectangle keeps the cursor in view. // render_text->SetDisplayRect(Rect(width - 10, 1)); // EXPECT_EQ(render_text->display_rect().width(), // render_text->GetUpdatedCursorBounds().right()); // // // Ensure that the text will pan to fill its expanding display rectangle. // render_text->SetDisplayRect(Rect(width - 5, 1)); // EXPECT_EQ(render_text->display_rect().width(), // render_text->GetUpdatedCursorBounds().right()); // // // Ensure that a sufficiently large display rectangle shows all the text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(width, render_text->GetUpdatedCursorBounds().x()); // } // // TEST_F(RenderTextTest, DisplayRectShowsCursorRTL) { // // Set the application default text direction to RTL. // const bool was_rtl = base::i18n::IsRTL(); // SetRTL(true); // // scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); // render_text->SetText(WideToUTF16(L"abcdefghijklmnopqrstuvwxzyabcdefg")); // render_text->MoveCursorTo(SelectionModel(0, CURSOR_FORWARD)); // int width = render_text->GetStringSize().width(); // ASSERT_GT(width, 10); // // // Ensure that the cursor is placed at the width of its preceding text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(render_text->display_rect().width() - width - 1, // render_text->GetUpdatedCursorBounds().x()); // // // Ensure that shrinking the display rectangle keeps the cursor in view. // render_text->SetDisplayRect(Rect(width - 10, 1)); // EXPECT_EQ(0, render_text->GetUpdatedCursorBounds().x()); // // // Ensure that the text will pan to fill its expanding display rectangle. // render_text->SetDisplayRect(Rect(width - 5, 1)); // EXPECT_EQ(0, render_text->GetUpdatedCursorBounds().x()); // // // Ensure that a sufficiently large display rectangle shows all the text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(render_text->display_rect().width() - width - 1, // render_text->GetUpdatedCursorBounds().x()); // // // Repeat the test with RTL text. // render_text->SetText(WideToUTF16(L"\x5d0\x5d1\x5d2\x5d3\x5d4\x5d5\x5d6\x5d7" // L"\x5d8\x5d9\x5da\x5db\x5dc\x5dd\x5de\x5df")); // render_text->MoveCursorTo(SelectionModel(render_text->text().length(), // CURSOR_FORWARD)); // width = render_text->GetStringSize().width(); // ASSERT_GT(width, 10); // // // Ensure that the cursor is placed at the width of its preceding text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(render_text->display_rect().width() - width - 1, // render_text->GetUpdatedCursorBounds().x()); // // // Ensure that shrinking the display rectangle keeps the cursor in view. // render_text->SetDisplayRect(Rect(width - 10, 1)); // EXPECT_EQ(0, render_text->GetUpdatedCursorBounds().x()); // // // Ensure that the text will pan to fill its expanding display rectangle. // render_text->SetDisplayRect(Rect(width - 5, 1)); // EXPECT_EQ(0, render_text->GetUpdatedCursorBounds().x()); // // // Ensure that a sufficiently large display rectangle shows all the text. // render_text->SetDisplayRect(Rect(width + 10, 1)); // EXPECT_EQ(render_text->display_rect().width() - width - 1, // render_text->GetUpdatedCursorBounds().x()); // // // Reset the application default text direction to LTR. // SetRTL(was_rtl); // EXPECT_EQ(was_rtl, base::i18n::IsRTL()); } #endif // !defined(OS_MACOSX) // Changing colors between or inside ligated glyphs should not break shaping. TEST_F(RenderTextTest, SelectionKeepsLigatures) { const wchar_t* kTestStrings[] = { L"\x644\x623", L"\x633\x627" }; scoped_ptr<RenderText> render_text(RenderText::CreateInstance()); render_text->set_selection_color(SK_ColorRED); Canvas canvas; for (size_t i = 0; i < arraysize(kTestStrings); ++i) { render_text->SetText(WideToUTF16(kTestStrings[i])); const int expected_width = render_text->GetStringSize().width(); render_text->MoveCursorTo(SelectionModel(Range(0, 1), CURSOR_FORWARD)); EXPECT_EQ(expected_width, render_text->GetStringSize().width()); // Draw the text. It shouldn't hit any DCHECKs or crash. // See http://crbug.com/214150 render_text->Draw(&canvas); render_text->MoveCursorTo(SelectionModel(0, CURSOR_FORWARD)); } } #if defined(OS_WIN) // Ensure strings wrap onto multiple lines for a small available width. TEST_F(RenderTextTest, Multiline_MinWidth) { const wchar_t* kTestStrings[] = { kWeak, kLtr, kLtrRtl, kLtrRtlLtr, kRtl, kRtlLtr, kRtlLtrRtl }; scoped_ptr<RenderTextWin> render_text( static_cast<RenderTextWin*>(RenderText::CreateInstance())); render_text->SetDisplayRect(Rect(1, 1000)); render_text->SetMultiline(true); Canvas canvas; for (size_t i = 0; i < arraysize(kTestStrings); ++i) { SCOPED_TRACE(base::StringPrintf("kTestStrings[%" PRIuS "]", i)); render_text->SetText(WideToUTF16(kTestStrings[i])); render_text->Draw(&canvas); EXPECT_GT(render_text->lines_.size(), 1U); } } // Ensure strings wrap onto multiple lines for a normal available width. TEST_F(RenderTextTest, Multiline_NormalWidth) { const struct { const wchar_t* const text; const Range first_line_char_range; const Range second_line_char_range; } kTestStrings[] = { { L"abc defg hijkl", Range(0, 9), Range(9, 14) }, { L"qwertyzxcvbn", Range(0, 8), Range(8, 12) }, { L"\x062A\x0641\x0627\x062D\x05EA\x05E4\x05D5\x05D6\x05D9\x05DD", Range(4, 10), Range(0, 4) } }; scoped_ptr<RenderTextWin> render_text( static_cast<RenderTextWin*>(RenderText::CreateInstance())); render_text->SetDisplayRect(Rect(50, 1000)); render_text->SetMultiline(true); Canvas canvas; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestStrings); ++i) { SCOPED_TRACE(base::StringPrintf("kTestStrings[%" PRIuS "]", i)); render_text->SetText(WideToUTF16(kTestStrings[i].text)); render_text->Draw(&canvas); ASSERT_EQ(2U, render_text->lines_.size()); ASSERT_EQ(1U, render_text->lines_[0].segments.size()); EXPECT_EQ(kTestStrings[i].first_line_char_range, render_text->lines_[0].segments[0].char_range); ASSERT_EQ(1U, render_text->lines_[1].segments.size()); EXPECT_EQ(kTestStrings[i].second_line_char_range, render_text->lines_[1].segments[0].char_range); } } // Ensure strings don't wrap onto multiple lines for a sufficient available // width. TEST_F(RenderTextTest, Multiline_SufficientWidth) { const wchar_t* kTestStrings[] = { L"", L" ", L".", L" . ", L"abc", L"a b c", L"\x62E\x628\x632", L"\x62E \x628 \x632" }; scoped_ptr<RenderTextWin> render_text( static_cast<RenderTextWin*>(RenderText::CreateInstance())); render_text->SetDisplayRect(Rect(30, 1000)); render_text->SetMultiline(true); Canvas canvas; for (size_t i = 0; i < arraysize(kTestStrings); ++i) { SCOPED_TRACE(base::StringPrintf("kTestStrings[%" PRIuS "]", i)); render_text->SetText(WideToUTF16(kTestStrings[i])); render_text->Draw(&canvas); EXPECT_EQ(1U, render_text->lines_.size()); } } #endif // defined(OS_WIN) } // namespace gfx
[ "kanbang@163.com" ]
kanbang@163.com
687035c24343ed3c5fbf072bdc09e31c384fca8f
6b40e9cba1dd06cd31a289adff90e9ea622387ac
/Develop/Game/XModuleBuff.cpp
02fee43ab7e3d3336b5a69fd3593df15b251cf46
[]
no_license
AmesianX/SHZPublicDev
c70a84f9170438256bc9b2a4d397d22c9c0e1fb9
0f53e3b94a34cef1bc32a06c80730b0d8afaef7d
refs/heads/master
2022-02-09T07:34:44.339038
2014-06-09T09:20:04
2014-06-09T09:20:04
null
0
0
null
null
null
null
UHC
C++
false
false
31,695
cpp
#include "stdafx.h" #include "XModuleBuff.h" #include "XModuleEffect.h" #include "XModuleAction.h" #include "XModuleEntity.h" #include "XModuleTalent.h" #include "XNonPlayer.h" #include "XTalentInfoMgr.h" #include "XModuleMyControl.h" #include "XWidgetNameDef.h" #include "XEventID.h" #include "XStrings.h" ////////////////////////////////////////////////////////////////////////// void XBuffEnchant::Push( int nBuffID ) { m_vecBuffEnchant.push_back(nBuffID); } void XBuffEnchant::Pop( int nBuffID ) { for(vector<int>::iterator it = m_vecBuffEnchant.begin(); it != m_vecBuffEnchant.end(); ++it) { if(*it == nBuffID) { m_vecBuffEnchant.erase(it); return; } } } void XBuffEnchant::ParseBuffAttr( XBuffAttribute& buffAttribue ) { for(vector<int>::iterator it = m_vecBuffEnchant.begin(); it != m_vecBuffEnchant.end(); ++it) { XBuffInfo * pBuffInfo = info.buff->Get(*it); if(pBuffInfo) buffAttribue.ParseBuffAttr(pBuffInfo); } } bool XBuffEnchant::CheckEnchantBuffID( int nBuffID ) { for(vector<int>::iterator it = m_vecBuffEnchant.begin(); it != m_vecBuffEnchant.end(); ++it) { if(*it == nBuffID) return true; } return false; } /////////////////////////////////////////////////////////////////////////////////////////////// void XBuffInstant::PushInstant( int nBuffID ) { map<int, int>::iterator itFind = m_mapBuffInstantCount.find(nBuffID); if(itFind != m_mapBuffInstantCount.end()) { int nCount = itFind->second; ++nCount; itFind->second = nCount; } else { m_mapBuffInstantCount.insert(map< int, int>::value_type(nBuffID, 1)); } } void XBuffInstant::PopInstant( int nBuffID ) { map<int, int>::iterator itFind = m_mapBuffInstantCount.find(nBuffID); if(itFind != m_mapBuffInstantCount.end()) m_mapBuffInstantCount.erase(itFind); return; } int XBuffInstant::GetInstantCount( int nBuffID ) { map<int, int>::iterator itFind = m_mapBuffInstantCount.find(nBuffID); if(itFind != m_mapBuffInstantCount.end()) return itFind->second; return 0; } void XBuffInstant::ParseBuffAttr( XBuffAttribute& buffAttribue ) { for(map<int, int>::iterator itFind = m_mapBuffInstantCount.begin(); itFind != m_mapBuffInstantCount.end(); ++itFind) { XBuffInfo * pBuffInfo = info.buff->Get(itFind->first); if(pBuffInfo) buffAttribue.ParseBuffAttr(pBuffInfo, itFind->second); } } /////////////////////////////////////////////////////////////////////////////////////////////// XModuleBuff::XModuleBuff(XObject* pOwner /* = NULL */) : XModule(pOwner) { m_bLoadingComplete = false; m_eSavePaletteIndex = PALETTENUM_MAX; } XModuleBuff::~XModuleBuff(void) { DestroyBuff(); } void XModuleBuff::OnInitialized() { } void XModuleBuff::OnSubscribeEvent() { Subscribe(XEVTD_MESH_LOADING_COMPLETE); } XEventResult XModuleBuff::OnEvent( XEvent& msg ) { switch(msg.m_nID) { case XEVTD_MESH_LOADING_COMPLETE: { m_bLoadingComplete = true; ReSetRemainBuffList(); } break; } return MR_FALSE; } void XModuleBuff::OnUpdate( float fDelta ) { PFC_THISFUNC; } bool _IsDeactivateBuff( XBuffInfo * pBuffInfo) { if ( pBuffInfo->m_nPassiveExtraAttrib == BUFPEA_ROOT || pBuffInfo->m_nPassiveExtraAttrib == BUFPEA_SLEEP || pBuffInfo->m_nPassiveExtraAttrib2 == BUFPEA_ROOT || pBuffInfo->m_nPassiveExtraAttrib2 == BUFPEA_SLEEP) return true; return false; } void XModuleBuff::BuffGain( int nBuffID, float fLostRemained, bool bRemainBuffGain /*= false*/ ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; //------------------------------------------------------------------------ // 버프 관리 CheckBuffDuplication(nBuffID); AddBuff(nBuffID, pBuffInfo->m_nStackType, fLostRemained); if (pBuffInfo->m_bUseChangePalette) { ChangePalette(pBuffInfo); } //------------------------------------------------------------------------ // 버프 설정 SetGainBuffAnimation(pBuffInfo); CheckInvisibilityGain(pBuffInfo); // Modifier 값 더하기 GainMaintainEffect(pBuffInfo); //------------------------------------------------------------------------ // 이펙트 설정 XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEventData->m_eEffectType = BUFF_GAIN_EFFECT; pEventData->m_bRemainBuffGain = bRemainBuffGain; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF, pEventData); } //Mount if(pBuffInfo->IsRideBuff()) m_pOwner->AsPlayer()->SetRide(pBuffInfo->m_RideNPCID); //------------------------------------------------------------------------ // UI 설정 ActivedBuffUI(pBuffInfo, fLostRemained); //------------------------------------------------------------------------ // 장비 오버랩 if(m_pOwner->GetEntityType() == ETID_PLAYER) { for(int i = 0; i < ITEMSLOT_MAX; ++i) { int nItemID = pBuffInfo->m_nEquipItemIDs[i]; m_pOwner->AsPlayer()->EquipOverlapped(nItemID); } } } void XModuleBuff::BuffLost( int nBuffID ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; //------------------------------------------------------------------------ // 버프 관리 int nStackCount = GetStackBuffCount(nBuffID); int nInstantCount = m_BuffInstant.GetInstantCount(nBuffID); SubBuff(nBuffID); if (pBuffInfo->m_bUseChangePalette) { RestorePalette(pBuffInfo); } m_BuffInstant.PopInstant(nBuffID); //------------------------------------------------------------------------ // 버프 종료 if ( _IsDeactivateBuff( pBuffInfo) == true) { XModuleMotion* pModuleMotion = m_pOwner->GetModuleMotion(); if (pModuleMotion) pModuleMotion->RemoveIdleMemory(nBuffID); // 내 캐릭터는 비활동성 버프에 걸리면 스테이트를 변경함 if ( m_pOwner->GetUID() == XGetMyUID()) { XModuleMyControl* pControl = m_pOwner->GetModuleMyControl(); if ( pControl) pControl->DoActionIdleWithSpecialState(); } else StopAnimation(pBuffInfo); } // 애니메이션 접미사 if (!pBuffInfo->m_strAniPostfix.empty()) { XModuleMotion* pModuleMotion = m_pOwner->GetModuleMotion(); if (pModuleMotion) { pModuleMotion->ReleaseAnimationNamePostfix(); pModuleMotion->RefreshThisMotion(); } } // Modifier 값 빼기 // 버프 스탯만큼 뺀다. LostMaintainEffect(pBuffInfo, nStackCount + nInstantCount); //------------------------------------------------------------------------ // 이펙트 종료 XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_END, pEventData); } //------------------------------------------------------------------------ //------------------------------------------------------------------------ // 투명화 종료 CheckInvisibilityLost(pBuffInfo); //Mount if(pBuffInfo->IsRideBuff()) m_pOwner->AsPlayer()->RemoveRide(); // UI 빼기 DeactivedBuffUI(pBuffInfo); //------------------------------------------------------------------------ // 장비 오버랩 if(m_pOwner->GetEntityType() == ETID_PLAYER) { for(int i = 0; i < ITEMSLOT_MAX; ++i) { int nItemID = pBuffInfo->m_nEquipItemIDs[i]; m_pOwner->AsPlayer()->UnEquipOverlapped(nItemID); } } } void XModuleBuff::ChangePalette( XBuffInfo * pBuffInfo ) { if (!pBuffInfo || m_pOwner->GetType() != XOBJ_MY_PLAYER) return; m_eSavePaletteIndex = gvar.MyInfo.PaletteList.GetCurPaletteListIndex(); gvar.MyInfo.PaletteList.SetCurPaletteListIndex(PALETTENUM_1); gvar.MyInfo.PaletteList.ChangePalette(pBuffInfo->m_arrPalettes); global.ui->PaletteUIRefresh( true, true); // 탤런트 사용 할 수 있게 셋팅 gvar.MyInfo.Talent.SetBuffTalentID(pBuffInfo->m_arrPalettes); } void XModuleBuff::RestorePalette( XBuffInfo * pBuffInfo ) { if (!pBuffInfo || m_pOwner->GetType() != XOBJ_MY_PLAYER) return; gvar.MyInfo.PaletteList.RestorePalette(); if(m_eSavePaletteIndex >= PALETTENUM_1 && m_eSavePaletteIndex < PALETTENUM_MAX) gvar.MyInfo.PaletteList.SetCurPaletteListIndex(m_eSavePaletteIndex); global.ui->PaletteUIRefresh( true, false); m_eSavePaletteIndex = PALETTENUM_MAX; // 탤런트 리셋 gvar.MyInfo.Talent.ReSetBuffTalentID(); } void XModuleBuff::UseAnimation( XBuffInfo * pBuffInfo ) { XModuleAction * pModuleAction = m_pOwner->GetModuleAction(); if(pModuleAction == NULL) { return; } if(!pBuffInfo->m_strUseAniName.empty()) { pModuleAction->StartBuffAnimation(pBuffInfo->m_nID, pBuffInfo->m_strUseAniName); } } void XModuleBuff::StopAnimation( XBuffInfo * pBuffInfo ) { XModuleAction * pModuleAction = m_pOwner->GetModuleAction(); if(pModuleAction == NULL) { return; } // 애니메이션이 있었던것만 스돕을 한다. if(!pBuffInfo->m_strUseAniName.empty()) { pModuleAction->EndBuffAnimation(pBuffInfo->m_nID); } } void XModuleBuff::GainMaintainEffect( XBuffInfo * pBuffInfo) { if(m_pOwner->GetUID() == XGetMyUID()) { m_ModEffector.AddActorModifier(gvar.MyInfo.ChrStatus.ActorModifier, pBuffInfo->m_ActorModifier); m_ModEffector.AddActorModifier(gvar.MyInfo.ActorModifier_ExceptTalent, pBuffInfo->m_ActorModifier); m_ModEffector.AddPlayerModifier(gvar.MyInfo.PlayerModifier, pBuffInfo->m_PlayerModifier); m_ModEffector.AddPlayerModifier(gvar.MyInfo.PlayerModifier_ExceptTalent, pBuffInfo->m_PlayerModifier); } } void XModuleBuff::LostMaintainEffect( XBuffInfo * pBuffInfo, int nStack /*= 1*/ ) { if(m_pOwner->GetUID() == XGetMyUID()) { for(int i = 0; i < nStack; ++i) { m_ModEffector.EraseActorModifier(gvar.MyInfo.ChrStatus.ActorModifier, pBuffInfo->m_ActorModifier); m_ModEffector.EraseActorModifier(gvar.MyInfo.ActorModifier_ExceptTalent, pBuffInfo->m_ActorModifier); m_ModEffector.ErasePlayerModifier(gvar.MyInfo.PlayerModifier, pBuffInfo->m_PlayerModifier); m_ModEffector.ErasePlayerModifier(gvar.MyInfo.PlayerModifier_ExceptTalent, pBuffInfo->m_PlayerModifier); } } } void XModuleBuff::GainInstantEffect(int nBuffID) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; int nGainHP = 0; int nGainEn = 0; if(m_pOwner->GetUID() == XGetMyUID()) { int nHP = gvar.MyInfo.GetHP(); int nEN = gvar.MyInfo.GetEN(); int nSTA = gvar.MyInfo.GetSTA(); m_ModEffector.ApplyInstantModidier(pBuffInfo->m_InstantModifier); // HP 올라갈때에 관한 이펙트를 주자. if(pBuffInfo->m_InstantModifier.nHP.IsModified()) { nGainHP = gvar.MyInfo.GetHP() - nHP; } // EN 올라갈때에 관한 이펙트를 주자. if(pBuffInfo->m_InstantModifier.nEN.IsModified()) { nGainEn = gvar.MyInfo.GetEN() - nEN; } } XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEventData->m_eEffectType = BUFF_HIT_EFFECT; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF, pEventData); if(nGainHP > 0) { XCaptionEffectEventData* pEventData = new XCaptionEffectEventData; pEventData->m_nParam1 = nGainHP; pEffect->OnEffectEvent(XEFTEVT_EFFECT_CAPTION_HEAL, pEventData); } if(nGainEn > 0) { XCaptionEffectEventData* pEventData = new XCaptionEffectEventData; pEventData->m_nParam1 = nGainEn; pEffect->OnEffectEvent(XEFTEVT_EFFECT_CAPTION_EN, pEventData); } } } void XModuleBuff::BuffHit( int nBuffID ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return // Modifier 값 더하기 GainMaintainEffect(pBuffInfo); m_BuffInstant.PushInstant(nBuffID); XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEventData->m_eEffectType = BUFF_HIT_EFFECT; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF, pEventData); } } bool XModuleBuff::BuffExist( int nID ) { bool bExist = false; // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); bExist = pNonPlayer->GetBuffList().FindID( nID); } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { bExist = gvar.MyInfo.BuffExist( nID) ? true : false; } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); bExist = pNetPlayer->GetBuffList().FindID( nID); } return bExist; } void XModuleBuff::AddBuff( int nBuffID, BUFF_STACK_TYPE stackType, float fLostRemained) { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); if ( pNonPlayer->GetBuffList().FindID( nBuffID) == false) pNonPlayer->PushBuff( nBuffID); } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { if ( gvar.MyInfo.BuffList.FindID( nBuffID) == false) gvar.MyInfo.BuffList.PushBackItem( nBuffID, stackType, fLostRemained); } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); if ( pNetPlayer->GetBuffList().FindID( nBuffID) == false) pNetPlayer->PushBuff( nBuffID); } } void XModuleBuff::SubBuff( int nBuffID ) { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); pNonPlayer->PopBuff( nBuffID); } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { gvar.MyInfo.BuffList.PopItem( nBuffID); } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); pNetPlayer->PopBuff( nBuffID); } } void XModuleBuff::ClearBuff() { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { } // My player else if ( m_pOwner->GetEntityType() == ETID_PLAYER && m_pOwner->GetUID() == XGetMyUID()) { if ( global.script) global.script->GetGlueGameEvent().OnGameEvent( "BUFF", "CLEAR"); } // Net player else if ( m_pOwner->GetEntityType() == ETID_PLAYER) { } } bool XModuleBuff::IsFocusGain( int* pOutBuffID /*= NULL*/, int* pOutFocusType /*= NULL*/ ) { bool bFocus = false; for ( int i = 0; i < TFT_SIZE; i++) { if ( BuffExist( BUFF_FOCUS_ID[ i]) == false) continue; if ( pOutBuffID) *pOutBuffID = BUFF_FOCUS_ID[ i]; if ( pOutFocusType) *pOutFocusType = i; bFocus = true; break; } return bFocus; } void XModuleBuff::ActivedBuffUI( XBuffInfo * pBuffInfo, float fLostRemained) { //if ( global.script) // global.script->GetGlueGameEvent().OnBuffRefresh(); // My player if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { // 머리 위에 버프 표시 if ( XGETCFG_GAME_SHOWBUFFNAME == true) { XModuleEffect* pModuleEffect = m_pOwner->GetModuleEffect(); if ( pModuleEffect) { XBuffEffectEventData * pEventData = new XBuffEffectEventData; pEventData->m_strBuffName = pBuffInfo->GetName(); pEventData->m_bIsDeBuff = (pBuffInfo->m_nType == BUFT_DEBUFF) ? true : false; pModuleEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_CAPTION, pEventData); } } if ( global.script) global.script->GetGlueGameEvent().OnGameEvent( "BUFF", "ADD", pBuffInfo->m_nID); // 버프 뷰어 창에 표시 // XUIBuffViewer* pWidget = (XUIBuffViewer*)global.mint->FindWidget( WIDGET_NAME_BUFF_VIEWER); // if ( pWidget) // { // if ( pBuffInfo->m_nType == BUFT_BUFF) pWidget->ActivedBuff( pBuffInfo->m_nID); // else pWidget->ActivedDebuff( pBuffInfo->m_nID); // } // 전투메세지 분리 _by tripleJ 110504 if (pBuffInfo->m_bLogable) { wstring strMsg = FormatString(XGetStr(L"SMSG_BUFF_GAIN_MYPLAYER"), FSParam(pBuffInfo->GetName())); global.ui->OnBattleMsg(strMsg.c_str()); } } else { // 전투메세지 분리 _by tripleJ 110504 if (pBuffInfo->m_bLogable) { wstring strMsg = FormatString(XGetStr(L"SMSG_BUFF_GAIN_OTHER"), FSParam(m_pOwner->GetName(), pBuffInfo->GetName())); global.ui->OnBattleMsg(strMsg.c_str()); } } } void XModuleBuff::DeactivedBuffUI( XBuffInfo * pBuffInfo ) { //if ( global.script) // global.script->GetGlueGameEvent().OnBuffRefresh(); // My player if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { if ( global.script) global.script->GetGlueGameEvent().OnGameEvent( "BUFF", "REMOVE", pBuffInfo->m_nID); // 버프 뷰어 창에서 삭제 // XUIBuffViewer* pWidget = (XUIBuffViewer*)global.mint->FindWidget( WIDGET_NAME_BUFF_VIEWER); // if ( pWidget) // { // if ( pBuffInfo->m_nType == BUFT_BUFF) pWidget->DeactivedBuff( pBuffInfo->m_nID); // else pWidget->DeactivedDebuff( pBuffInfo->m_nID); // } if (pBuffInfo->m_bLogable) { // 전투메세지 분리 _by tripleJ 110504 wstring strMsg = FormatString(XGetStr(L"SMSG_BUFF_LOST_MYPLAYER"), FSParam(pBuffInfo->GetName())); global.ui->OnBattleMsg(strMsg.c_str()); } } else { if (pBuffInfo->m_bLogable) { // 전투메세지 분리 _by tripleJ 110504 wstring strMsg = FormatString(XGetStr(L"SMSG_BUFF_LOST_OTHER"), FSParam(m_pOwner->GetName(), pBuffInfo->GetName())); global.ui->OnBattleMsg(strMsg.c_str()); } } } XBuffAttribute XModuleBuff::GetBuffAttribute() { XBuffAttribute attr; // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); for each ( int nBuffID in pNonPlayer->GetBuffList().m_vContains) { XBuffInfo* pBuffInfo = info.buff->Get( nBuffID); if ( pBuffInfo == NULL) continue; attr.ParseBuffAttr( pBuffInfo); } } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { for ( map< int, XMYBUFFLIST>::iterator itr = gvar.MyInfo.BuffList.m_vContains.begin(); itr != gvar.MyInfo.BuffList.m_vContains.end(); itr++) { XBuffInfo* pBuffInfo = info.buff->Get( (*itr).first); if ( pBuffInfo == NULL) continue; int nStatckCount = itr->second.vecBuffItem.size(); attr.ParseBuffAttr( pBuffInfo, nStatckCount); } } // Net player else if ( m_pOwner->GetEntityType() == ETID_PLAYER && MIsDerivedFromClass(XNetPlayer, m_pOwner)) { int a = 0; XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); for each ( int nBuffID in pNetPlayer->GetBuffList().m_vContains) { XBuffInfo* pBuffInfo = info.buff->Get( nBuffID); if ( pBuffInfo == NULL) continue; attr.ParseBuffAttr( pBuffInfo); if(nBuffID == 1276) ++a; } } m_BuffInstant.ParseBuffAttr(attr); m_BuffEnchant.ParseBuffAttr(attr); return attr; } void XModuleBuff::DestroyBuff() { // My player if ( m_pOwner->GetEntityType() == ETID_PLAYER && m_pOwner->GetUID() == XGetMyUID()) { if ( global.script) global.script->GetGlueGameEvent().OnGameEvent( "BUFF", "CLEAR"); } } void XModuleBuff::BuffDie() { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); for each ( int nBuffID in pNonPlayer->GetBuffList().m_vContains) { XBuffInfo* pBuffInfo = info.buff->Get( nBuffID); if ( pBuffInfo == NULL) continue; XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if ( pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = pBuffInfo->m_nID; pEffect->OnEffectEvent( XEFTEVT_EFFECT_BUFF_DIE, pEventData); } } pNonPlayer->GetBuffList().DeleteAllItem(); } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { for ( map< int, XMYBUFFLIST>::iterator itr = gvar.MyInfo.BuffList.m_vContains.begin(); itr != gvar.MyInfo.BuffList.m_vContains.end(); itr++) { XBuffInfo* pBuffInfo = info.buff->Get( (*itr).first); if ( pBuffInfo == NULL) continue; XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if ( pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = pBuffInfo->m_nID; pEffect->OnEffectEvent( XEFTEVT_EFFECT_BUFF_DIE, pEventData); } } } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); for each ( int nBuffID in pNetPlayer->GetBuffList().m_vContains) { XBuffInfo* pBuffInfo = info.buff->Get( nBuffID); if ( pBuffInfo == NULL) continue; XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if ( pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = pBuffInfo->m_nID; pEffect->OnEffectEvent( XEFTEVT_EFFECT_BUFF_DIE, pEventData); } } pNetPlayer->GetBuffList().DeleteAllItem(); } } void XModuleBuff::SetRemainBuffList( int nBuffID, float fRemainTime ) { if(nBuffID <= 0) return; m_TempRemainBuffList.insert(map<int, float>::value_type(nBuffID, fRemainTime)); if(m_bLoadingComplete) ReSetRemainBuffList(); return; } void XModuleBuff::ReSetRemainBuffList() { // 게임 처음 진입시 버프 입력 // 메쉬가 로딩이 되어야 한다. for(map<int, float>::iterator itr = m_TempRemainBuffList.begin(); itr != m_TempRemainBuffList.end(); itr++) { BuffGain((*itr).first, (*itr).second, true); } m_TempRemainBuffList.clear(); } void XModuleBuff::MyBuffAllDelete() { // 버프를 모두 날립니다. // 조심해서 쓰시기 바랍니다. if (m_pOwner->GetEntityType() != ETID_PLAYER || m_pOwner->GetUID() != XGetMyUID()) return; map< int, XMYBUFFLIST> mapTempBuffList = gvar.MyInfo.BuffList.m_vContains; for ( map< int, XMYBUFFLIST>::iterator itr = mapTempBuffList.begin(); itr != mapTempBuffList.end(); itr++) { BuffLost(itr->first); } m_TempRemainBuffList.clear(); } bool XModuleBuff::CheckTempRemainBuffList(int nBuffID) { // 로딩전이라면... 임시 버퍼 리스트에 저장이 되어 있는지... 체크하자. if(m_bLoadingComplete == false) { for(map<int, float>::iterator itr = m_TempRemainBuffList.begin(); itr != m_TempRemainBuffList.end(); itr++) { if((*itr).first == nBuffID ) { m_TempRemainBuffList.erase(itr); return true; } } } return false; } void XModuleBuff::CheckBuffDuplication( int nBuffID ) { if(ExistBuffGain(nBuffID)) BuffLost(nBuffID); // 기존거 삭제 } void XModuleBuff::CheckInvisibilityGain( XBuffInfo* pBuffInfo ) { if (pBuffInfo->IsInvisibility() || pBuffInfo->IsInvisibilityToNPC()) { XModuleEntity* pModuleEntity = m_pOwner->GetModuleEntity(); if (pModuleEntity) { pModuleEntity->SetMaxVisibility(BUFF_INVISIBILITY_ALPHA); pModuleEntity->StartFade(BUFF_INVISIBILITY_ALPHA, 1.0f); } } } void XModuleBuff::CheckInvisibilityLost( XBuffInfo* pBuffInfo ) { if (pBuffInfo->IsInvisibility() || pBuffInfo->IsInvisibilityToNPC()) { XModuleEntity* pModuleEntity = m_pOwner->GetModuleEntity(); if (pModuleEntity) { pModuleEntity->SetMaxVisibility(1.0f); pModuleEntity->StartFade(1.0f, 1.0f); } } } void XModuleBuff::BuffIncrease( int nBuffID, float fLostRemained, bool bRemainBuffGain /*= false*/ ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; //------------------------------------------------------------------------ // 버프 관리 if(ExistBuffGain(nBuffID) == false) return; // 혹시 MAX 오바하셨나요? if(pBuffInfo->m_nStackMaxCount <= GetStackBuffCount(nBuffID)) { // 앞에꺼 하나씩 뺍니다. BuffInfoDecrease(nBuffID); } IncreaseBuff(nBuffID, fLostRemained); //------------------------------------------------------------------------ // 버프 설정 SetGainBuffAnimation(pBuffInfo); // Modifier 값 더하기 GainMaintainEffect(pBuffInfo); //------------------------------------------------------------------------ // 이펙트 설정 XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { // 이펙트 종료 XBuffEffectEventData* pEndEventData = new XBuffEffectEventData; pEndEventData->m_nParam1 = nBuffID; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_END, pEndEventData); // 이펙트 다시 시작 XBuffEffectEventData* pStartEventData = new XBuffEffectEventData; pStartEventData->m_nParam1 = nBuffID; pStartEventData->m_eEffectType = BUFF_GAIN_EFFECT; pStartEventData->m_bRemainBuffGain = bRemainBuffGain; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF, pStartEventData); } //mlog(L"버프 인크리(%s)\n", pBuffInfo->m_strName.c_str()); } void XModuleBuff::BuffDecrease( int nBuffID ) { BuffInfoDecrease(nBuffID); //------------------------------------------------------------------------ // 이펙트 설정 // 이펙트 종료 XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_END, pEventData); } //mlog(L"버프 디크리(%s)\n", pBuffInfo->m_strName.c_str()); } bool XModuleBuff::ExistBuffGain( int nBuffID ) { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); if(pNonPlayer->GetBuffList().FindID(nBuffID) == true) return true; } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER) { if(gvar.MyInfo.BuffList.FindID(nBuffID) == true) return true; } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); if(pNetPlayer->GetBuffList().FindID(nBuffID) == true) return true; } return false; } void XModuleBuff::IncreaseBuff( int nBuffID, float fLostRemained ) { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); if ( pNonPlayer->GetBuffList().FindID( nBuffID)) pNonPlayer->PushBuff( nBuffID); } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { if ( gvar.MyInfo.BuffList.FindID( nBuffID)) { gvar.MyInfo.BuffList.PushStackItem( nBuffID, fLostRemained); } } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); if ( pNetPlayer->GetBuffList().FindID( nBuffID)) pNetPlayer->PushBuff( nBuffID); } } void XModuleBuff::DecreaseBuff( int nBuffID ) { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); pNonPlayer->PopBuff( nBuffID); } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { gvar.MyInfo.BuffList.PopStackItem( nBuffID); } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); pNetPlayer->PopBuff( nBuffID); } } int XModuleBuff::GetStackBuffCount( int nBuffID ) { // Non plyer if ( m_pOwner->GetEntityType() == ETID_NPC) { int n = 0; XNonPlayer* pNonPlayer = m_pOwner->AsNPC(); for each ( int nID in pNonPlayer->GetBuffList().m_vContains) { if(nID == nBuffID) ++n; } return n; } // My player else if ( m_pOwner->GetType() == XOBJ_MY_PLAYER ) { return gvar.MyInfo.BuffList.GetItemCount(nBuffID); } // Net player else if ( m_pOwner->GetType() == XOBJ_NET_PLAYER ) { int n = 0; XNetPlayer* pNetPlayer = m_pOwner->AsNetPlayer(); for each ( int nID in pNetPlayer->GetBuffList().m_vContains) { if(nID == nBuffID) ++n; } return n; } return 0; } void XModuleBuff::SetGainBuffAnimation( XBuffInfo * pBuffInfo ) { if ( _IsDeactivateBuff( pBuffInfo) == true) { // 내 캐릭터는 비활동성 버프에 걸리면 스테이트를 변경함 XModuleActorControl* pControl = m_pOwner->GetModuleActorControl(); if ( pControl) pControl->DoActionDeactivate( pBuffInfo->m_nID, pBuffInfo->m_strUseAniName.c_str()); if ( m_pOwner->GetType() != XOBJ_MY_PLAYER && !pBuffInfo->m_strUseAniName.empty()) { UseAnimation( pBuffInfo); } } // 애니메이션 접미사 if (!pBuffInfo->m_strAniPostfix.empty()) { // 애니메이션이 있다면... 탤런트 취소 XModuleTalent* pModuleTalent = m_pOwner->GetModuleTalent(); if(pModuleTalent) { if (pModuleTalent->IsActive()) pModuleTalent->Cancel(); } XModuleMotion* pModuleMotion = m_pOwner->GetModuleMotion(); if (pModuleMotion) { pModuleMotion->SetAnimationNamePostfix(pBuffInfo->m_strAniPostfix.c_str()); pModuleMotion->RefreshThisMotion(); } } } void XModuleBuff::BuffInfoDecrease( int nBuffID ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; //------------------------------------------------------------------------ // 버프 관리 if(ExistBuffGain(nBuffID) == false) return; int nStackCount = GetStackBuffCount(nBuffID); DecreaseBuff(nBuffID); //------------------------------------------------------------------------ // 버프 설정 // Modifier 값 빼기 if(nStackCount > 0) LostMaintainEffect(pBuffInfo); } void XModuleBuff::BuffEnchantGain( int nBuffID, bool bEffect, int nPartsSlotType ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; //------------------------------------------------------------------------ // 버프 관리 // Modifier 값 더하기 GainMaintainEffect(pBuffInfo); m_BuffEnchant.Push(nBuffID); XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(bEffect && pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEventData->m_nPartsSlotType = nPartsSlotType; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_ENCHANT, pEventData); } } void XModuleBuff::BuffEnchantLost( int nBuffID, bool bEffect, int nPartsSlotType ) { XBuffInfo * pBuffInfo = info.buff->Get(nBuffID); if(pBuffInfo == NULL) return; //------------------------------------------------------------------------ if(m_BuffEnchant.CheckEnchantBuffID(nBuffID) == false) return; m_BuffEnchant.Pop(nBuffID); // Modifier 값 빼기 // 버프 스탯만큼 뺀다. LostMaintainEffect(pBuffInfo); //------------------------------------------------------------------------ // 이펙트 종료 XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(bEffect && pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEventData->m_nParam1 = nBuffID; pEventData->m_nPartsSlotType = nPartsSlotType; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_END, pEventData); } } void XModuleBuff::Init_ForChangeField() { // 필드나, 채널이동때 이펙트가 사라진것을 다시 복구 if(m_pOwner->GetType() != XOBJ_MY_PLAYER) return; XModuleEffect * pEffect = m_pOwner->GetModuleEffect(); if(pEffect) { XBuffEffectEventData* pEventData = new XBuffEffectEventData; pEffect->OnEffectEvent(XEFTEVT_EFFECT_BUFF_RESET, pEventData); } }
[ "shzdev@8fd9ef21-cdc5-48af-8625-ea2f38c673c4" ]
shzdev@8fd9ef21-cdc5-48af-8625-ea2f38c673c4
ee8d68f5d11ca9cc8e0a17c821eac038fc043cc7
52ca17dca8c628bbabb0f04504332c8fdac8e7ea
/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp
67214e6a6ea5d3d9b6542ed7c8ee6763ba63d3c6
[]
no_license
qinzuoyan/thirdparty
f610d43fe57133c832579e65ca46e71f1454f5c4
bba9e68347ad0dbffb6fa350948672babc0fcb50
refs/heads/master
2021-01-16T17:47:57.121882
2015-04-21T06:59:19
2015-04-21T06:59:19
33,612,579
0
0
null
2015-04-08T14:39:51
2015-04-08T14:39:51
null
UTF-8
C++
false
false
92
hpp
#include "thirdparty/boost_1_58_0/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp"
[ "qinzuoyan@xiaomi.com" ]
qinzuoyan@xiaomi.com
26ce34bda21ec4c8761d902dbb32050c5ad8270c
8985a13232fc5ca9e0da954c9002d79ffa2b2c65
/src/mtchain/json/json_forwards.h
c41267019dd832c0afb39dc2672604900dabb9ea
[]
no_license
finpal/finpal-basic
429b5871da8167c7adb38af43c64f4f8012901aa
3675542b1c95982321d03cb7bb3d4d204d6f71c9
refs/heads/main
2023-02-04T13:13:35.198917
2020-12-21T16:18:01
2020-12-21T16:18:01
323,375,890
0
1
null
null
null
null
UTF-8
C++
false
false
726
h
//------------------------------------------------------------------------------ /* This file is part of FinPald: https://github.com/finpal/finpal-basic Copyright (c) 2019 ~ 2020 FinPal Alliance. Permission to use, copy, modify, and/or distribute this software for any */ //============================================================================== #ifndef MTCHAIN_JSON_JSON_FORWARDS_H_INCLUDED #define MTCHAIN_JSON_JSON_FORWARDS_H_INCLUDED namespace Json { // value.h using Int = int; using UInt = unsigned int; class StaticString; class Value; class ValueIteratorBase; class ValueIterator; class ValueConstIterator; } // namespace Json #endif // JSON_FORWARDS_H_INCLUDED
[ "finpal6@outlook.com" ]
finpal6@outlook.com
daed084352a94c4d40016b5180ddc23e6e380473
bb82a5f977bef455714c16e24e2d8254e2d0faa5
/src/vendor/cget/include/asio/execution/prefer_only.hpp
b80636e7fcc85484bbd155cec70842222bfb9d00
[ "Unlicense" ]
permissive
pqrs-org/Karabiner-Elements
4ae307d82f8b67547c161c7d46d2083a0fd07630
d05057d7c769e2ff35638282e888a6d5eca566be
refs/heads/main
2023-09-01T03:11:08.474417
2023-09-01T00:44:19
2023-09-01T00:44:19
63,037,806
8,197
389
Unlicense
2023-09-01T00:11:00
2016-07-11T04:57:55
C++
UTF-8
C++
false
false
84
hpp
../../../cget/pkg/chriskohlhoff__asio/install/include/asio/execution/prefer_only.hpp
[ "tekezo@pqrs.org" ]
tekezo@pqrs.org
afb5a1eb4f3804acfa91f84932eba4f12972c4d4
4cf10eb7d4552639b65d1d6dca64daa8d528e63a
/Slash1.h
f89d0c68c9914d06172404b667ef221ce74070ca
[]
no_license
22hyunho/4wPort
a77bd7a4c6ea64d8069e6ea2bf5aae60b894ec96
5ef26a0b0400494338096fa43937f818426c93f4
refs/heads/master
2023-08-12T15:14:16.279189
2021-09-29T07:53:36
2021-09-29T07:53:36
411,575,491
0
0
null
null
null
null
UTF-8
C++
false
false
278
h
#pragma once #include "Effect.h" class Slash1 : public Effect { private : public: Slash1() {}; ~Slash1() {}; virtual HRESULT init(float x, float y, int width, int height); virtual void release(); virtual void update(); virtual void render(); void controlFrame(); };
[ "85976424+22hyunho@users.noreply.github.com" ]
85976424+22hyunho@users.noreply.github.com
457ecbefc8d0eada4406744dfc8f9876bdc5697d
e07311ca2a43a9649fe8a9760fde97855e339e00
/src/smmp/MemSourceObject.cpp
8ffb3a5256d72d6d0c8a22e37285055341e5b570
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
wilseypa/warped-models
afafee2457d5004ac578c0978012bc3321109d41
3b43934ab0de69d776df369d1fd010360b1ea0b2
refs/heads/master
2016-08-05T15:20:30.795510
2015-11-12T20:02:11
2015-11-12T20:02:11
12,739,052
2
0
null
null
null
null
UTF-8
C++
false
false
2,897
cpp
#include "MemSourceObject.h" #include "MemSourceState.h" #include "IntVTime.h" using namespace std; MemSourceObject::MemSourceObject(string initName, int max, int group): objectName(initName), maxMemRequests(max) { this->group = group; } MemSourceObject::~MemSourceObject() { } void MemSourceObject::initialize(){ //MemSourceState *myState = dynamic_cast<MemSourceState *>( getState() ); IntVTime sendTime = dynamic_cast<const IntVTime&>(getSimulationTime()); MemRequest *firstEvent = new MemRequest(sendTime, sendTime + 1, this, this); firstEvent->setProcessor(getName()); firstEvent->setStartTime(0); this->receiveEvent(firstEvent); } void MemSourceObject::finalize(){ MemSourceState *myState = dynamic_cast<MemSourceState *>(getState()); cout << getName() << " Complete: " << myState->numMemRequests << " requests with recent delay of " << myState->filter.getData() << "\n"; } void MemSourceObject::executeProcess(){ MemSourceState *myState = static_cast<MemSourceState *>(getState()); MemRequest* received = NULL; IntVTime sendTime = static_cast<const IntVTime&>(getSimulationTime()); //int id = getObjectID()->getSimulationObjectID(); while(true == haveMoreEvents()) { received = (MemRequest*)getEvent(); if(received != NULL){ myState->filter.update((double)((IntVTime &)getSimulationTime() - received->getStartTime() ).getTime() ); int requestsCompleted = myState->numMemRequests; if (requestsCompleted < maxMemRequests ) { double ldelay = 1.0; // we want the memRequest to get there at the exact scheduled time SimulationObject *receiver = getObjectHandle(destObjName); IntVTime recvTime = sendTime + (int) ldelay; MemRequest *newMemRequest = new MemRequest(sendTime, recvTime, this, receiver); newMemRequest->setProcessor(getName()); newMemRequest->setStartTime(sendTime.getTime()); myState->numMemRequests++; myState->oldDelay = sendTime; receiver->receiveEvent(newMemRequest); } } } } void MemSourceObject::setDestination(string dest){ destObjName = dest; } string MemSourceObject::getDestination(){ return destObjName; } State* MemSourceObject::allocateState() { return new MemSourceState(); } void MemSourceObject::deallocateState( const State *state ){ delete state; } void MemSourceObject::reclaimEvent(const Event *event){ delete event; } const string & MemSourceObject::getName()const{ return objectName; }
[ "aj@alt" ]
aj@alt
60b781c84602dddb049b9d15c7219858f99a5f22
f6575da0162773aeb06713fd68e3e52ee04d6fea
/mojo/services/video_decode_stats_recorder.h
88d5e303aa8e8290af78f70c8fb311bc3378679f
[]
no_license
xqq/chromium-media
b899b525e9354886784f83afaaa9fcd10ebbd215
13a841249697e61ff7ee176bd108b6c32b41560b
refs/heads/master
2020-04-16T02:12:13.385862
2017-11-10T19:54:01
2017-11-10T19:54:01
55,492,635
5
3
null
null
null
null
UTF-8
C++
false
false
2,133
h
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MEDIA_MOJO_SERVICES_VIDEO_DECODE_STATS_RECORDER_H_ #define MEDIA_MOJO_SERVICES_VIDEO_DECODE_STATS_RECORDER_H_ #include <stdint.h> #include <string> #include "base/time/time.h" #include "media/base/video_codecs.h" #include "media/mojo/interfaces/video_decode_stats_recorder.mojom.h" #include "media/mojo/services/media_mojo_export.h" #include "services/service_manager/public/cpp/bind_source_info.h" namespace media { class VideoDecodePerfHistory; // See mojom::VideoDecodeStatsRecorder for documentation. class MEDIA_MOJO_EXPORT VideoDecodeStatsRecorder : public mojom::VideoDecodeStatsRecorder { public: // See Create(). explicit VideoDecodeStatsRecorder(VideoDecodePerfHistory* perf_history); ~VideoDecodeStatsRecorder() override; // |perf_history| required to save decode stats to local database and report // metrics. Callers must ensure that |perf_history| outlives this object. static void Create(VideoDecodePerfHistory* perf_history, mojom::VideoDecodeStatsRecorderRequest request); // mojom::VideoDecodeStatsRecorder implementation: void StartNewRecord(VideoCodecProfile profile, const gfx::Size& natural_size, int frames_per_sec) override; void UpdateRecord(uint32_t frames_decoded, uint32_t frames_dropped, uint32_t frames_decoded_power_efficient) override; private: // Save most recent stats values to disk. Called during destruction and upon // starting a new record. void FinalizeRecord(); VideoDecodePerfHistory* perf_history_; VideoCodecProfile profile_ = VIDEO_CODEC_PROFILE_UNKNOWN; gfx::Size natural_size_; int frames_per_sec_ = 0; uint32_t frames_decoded_ = 0; uint32_t frames_dropped_ = 0; uint32_t frames_decoded_power_efficient_ = 0; DISALLOW_COPY_AND_ASSIGN(VideoDecodeStatsRecorder); }; } // namespace media #endif // MEDIA_MOJO_SERVICES_VIDEO_DECODE_STATS_RECORDER_H_
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
b14f5329714949d917654fd9b023c54e759293a3
5d83739af703fb400857cecc69aadaf02e07f8d1
/Archive2/65/5b0db265881fa3/main.cpp
53b8c1bc57c473960417005f2743bc5d83600c06
[]
no_license
WhiZTiM/coliru
3a6c4c0bdac566d1aa1c21818118ba70479b0f40
2c72c048846c082f943e6c7f9fa8d94aee76979f
refs/heads/master
2021-01-01T05:10:33.812560
2015-08-24T19:09:22
2015-08-24T19:09:22
56,789,706
3
0
null
null
null
null
UTF-8
C++
false
false
1,100
cpp
#include <boost/signals2/signal.hpp> #include <boost/timer.hpp> #include <boost/progress.hpp> #include <fstream> #include <iostream> #include <boost/function.hpp> #include <boost/bind.hpp> #include <boost/thread.hpp> struct Data { int iterations; Data() : iterations(1000); }; class Foo { public: template <typename L> void attachListener(L const &listener) { m_callback.connect(listener); } void doWork() { for (int i = 0; i < m_someData.iterations; ++i) { m_callback(m_someData); boost::this_thread::sleep_for(boost::chrono::milliseconds(2)); } } Data m_someData; private: boost::signals2::signal<void(Data const&)> m_callback; }; void callback(Data const &/*someData*/, boost::progress_display &pd) { ++pd; // other stuff } void otherFunction() { Foo foo; boost::progress_display pd(foo.m_someData.iterations); boost::function<void(Data const&)> f(boost::bind(&callback, _1, boost::ref(pd))); foo.attachListener(f); foo.doWork(); } int main() { otherFunction(); }
[ "francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df" ]
francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df
948276b67fa375ffa36b5a735c498de7331ce8df
668c55dcb12cd8428793636511c1ed4046236f82
/bruh-moment/bruh-moment.cpp
d306be62c8b5c625b35cc3de5cd91e87f99c4c5c
[ "MIT" ]
permissive
ChlodAlejandro/random-cpp
7ba823073e734498f0497b48c16a3787e78f16ec
37fcf022e8bdd50f536c3c556d17436865bdd722
refs/heads/master
2020-07-02T19:36:02.048563
2020-01-01T02:13:14
2020-01-01T02:13:14
201,641,044
1
0
null
null
null
null
UTF-8
C++
false
false
993
cpp
#include<iostream> #include<string> #include<windows.h> #include<stdlib.h> #include<time.h> using namespace std; HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE); void setcursor(bool visible, DWORD size) // set bool visible = 0 - invisible, bool visible = 1 - visible { if(size == 0) { size = 20; // default cursor size Changing to numbers from 1 to 20, decreases cursor width } CONSOLE_CURSOR_INFO lpCursor; lpCursor.bVisible = visible; lpCursor.dwSize = size; SetConsoleCursorInfo(console,&lpCursor); } main() { srand(time(NULL)); setcursor(0,0); for (int z = 0; z < 200; z++) { int randX = rand() % (47); int randY = rand() % (21); int randColor = rand() % (16 - 1) + 1; SetConsoleTextAttribute(console, randColor); COORD pt = {randX, randY}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pt); cout << "bruh"; Sleep(100); } SetConsoleTextAttribute(console, 7); system("pause > nul"); Sleep(2000); }
[ "chlodaidanalejandro@hotmail.com" ]
chlodaidanalejandro@hotmail.com
9d0c2e380578cf8aaa7a841e74ffb5fb252655f2
671bb17c3c7d5b75d4aaa07836fd3d396040b149
/UVA/12384 Span.cpp
e08a830f1c86cc999f65a4fc6143e514452863e5
[]
no_license
pz1971/Online-Judge-Solutions
31144ca10b5d501c91a3d817348c075272ab4f77
d3ee4bae47c3ebc08d234288f794b96d0b6beeef
refs/heads/master
2022-11-09T15:55:55.731337
2022-10-26T12:53:16
2022-10-26T12:53:16
205,677,062
0
0
null
null
null
null
UTF-8
C++
false
false
1,127
cpp
#include <bits/stdc++.h> using namespace std ; using LL = long long ; const int _SIEVE_MX = 5000005; bool stat[_SIEVE_MX]; vector<int> primes{2}; void sieve(){ for(int i = 3; i*i < _SIEVE_MX; i += 2){ if(!stat[i]){ primes.push_back(i); for(int j = i*i; j < _SIEVE_MX; j += i+i) stat[j] = 1; } } for(int i = primes.back() + 2; i < _SIEVE_MX; i += 2){ if(!stat[i]) primes.push_back(i); } } vector<int> S ; void span(const vector<int> &ar){ S.clear() ; stack<pair<int, int> > stk ; stk.push(make_pair(INT_MAX , -1)) ; for(int i = 0 ; i < ar.size() ; i++){ while(ar[i] >= stk.top().first) stk.pop() ; S.push_back(i - stk.top().second) ; stk.push(make_pair(ar[i], i)) ; } } int main(){ sieve() ; ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m; int test_cases ; cin >> test_cases ; for(int tc = 1 ; tc <= test_cases ; tc++){ cin >> n >> m ; vector<int> X ; for(int i = 0 ; i < n ; i++){ X.push_back(primes[i] % m) ; } span(X) ; int ans = 0 ; for(auto i : S){ ans = (ans + i) % m ; } cout << ans << endl ; } return 0; }
[ "parvez.pz1971@gmail.com" ]
parvez.pz1971@gmail.com
9e51d59421a1d55aeca11edbc8780ea917c9c8aa
82bd8624bf17658a42c4e9d77e46c313c6071f81
/trunk/amqp_0_9_1/foreign/copernica/connectionopenokframe.h
5b03653e137cc4a58dffad4216bf98629fa22351
[ "Apache-2.0" ]
permissive
scott-han/test
1ddeb10487ba93dfcd188821c32465d3360e8af0
ae6b649f32e6feb94c8f86e4cd2927b0b8dfa169
refs/heads/master
2021-01-23T19:33:50.490803
2017-09-12T00:52:22
2017-09-12T00:52:22
102,827,316
0
0
null
null
null
null
UTF-8
C++
false
false
2,332
h
/** * Class describing connection vhost open acknowledgement frame * * Message sent by the server to the client to confirm that a connection to * a vhost could be established * * @copyright 2014 Copernica BV */ #include "connectionframe.h" // some contents modified by leon zadorin ... #ifndef DATA_PROCESSORS_SYNAPSE_AMQP_0_9_1_FOREIGN_COPERNICA_CONNECTIONOPENOK_FRAME_H #define DATA_PROCESSORS_SYNAPSE_AMQP_0_9_1_FOREIGN_COPERNICA_CONNECTIONOPENOK_FRAME_H #ifndef NO_WHOLE_PROGRAM namespace { #endif namespace data_processors { namespace synapse { namespace amqp_0_9_1 { namespace foreign { namespace copernica { /** * Class implementation */ class ConnectionOpenOKFrame final : public ConnectionFrame { private: /** * Deprecated field we need to read * @var ShortString */ ShortString _deprecatedKnownHosts; protected: /** * Encode a frame on a string buffer * * @param buffer buffer to write frame to */ virtual void fill(OutBuffer& buffer) const override { // call base ConnectionFrame::fill(buffer); // add deprecaed field _deprecatedKnownHosts.fill(buffer); } public: /** * Construct a connectionopenokframe from a received frame * * @param frame received frame */ ConnectionOpenOKFrame(ReceivedFrame &frame) : ConnectionFrame(frame), _deprecatedKnownHosts(frame) {} /** * Construct a connectionopenokframe * */ ConnectionOpenOKFrame() : ConnectionFrame(1), // for the deprecated shortstring _deprecatedKnownHosts("") {} /** * Destructor */ virtual ~ConnectionOpenOKFrame() = default; /** * Method id * @return uint16_t */ virtual uint16_t methodID() const override { return 41; } /** * Process the frame * @param connection The connection over which it was received * @return bool Was it succesfully processed? */ virtual bool process(ConnectionImpl *) override { #if 0 // all is ok, mark the connection as connected connection->setConnected(); // done return true; #endif return false; } }; }}}}} #ifndef NO_WHOLE_PROGRAM } #endif #endif
[ "sikai.han@gmail.com" ]
sikai.han@gmail.com
3060b938817c2e7f6b8c5454671438df41c5ff99
e2bb8568b21bb305de3b896cf81786650b1a11f9
/SDK/SCUM_Cal20mm_AmmoBoxClosed_classes.hpp
d8a8d3518ede26dfeab9c4dcaf06661cb8aa656b
[]
no_license
Buttars/SCUM-SDK
822e03fe04c30e04df0ba2cb4406fe2c18a6228e
954f0ab521b66577097a231dab2bdc1dd35861d3
refs/heads/master
2020-03-28T02:45:14.719920
2018-09-05T17:53:23
2018-09-05T17:53:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
710
hpp
#pragma once // SCUM (0.1.17) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "SCUM_Cal20mm_AmmoBoxClosed_structs.hpp" namespace SDK { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass Cal20mm_AmmoBoxClosed.Cal20mm_AmmoBoxClosed_C // 0x0000 (0x07A0 - 0x07A0) class ACal20mm_AmmoBoxClosed_C : public AAmmunitionItem { public: static UClass* StaticClass() { static auto ptr = UObject::FindObject<UClass>("BlueprintGeneratedClass Cal20mm_AmmoBoxClosed.Cal20mm_AmmoBoxClosed_C"); return ptr; } }; } #ifdef _MSC_VER #pragma pack(pop) #endif
[ "igromanru@yahoo.de" ]
igromanru@yahoo.de
78ee104f41e4703cb24e1ce4313b311fe3e3a081
0bc2ceb00cac582d14c5da08c1ba31a737c0e0c3
/tests/unit_tests/soldier_tests.cpp
cf6e12351d30edbec159972975800a90e50a482d
[]
no_license
adriaanwm/antiChess
56f69e1e90b95ce93460b3c5e5b121f7c1652967
4c1bbffffba1c284a35b0ed67a60373f91a4d984
refs/heads/master
2021-01-10T22:10:16.969346
2015-05-04T19:53:03
2015-05-04T19:53:03
25,409,327
0
0
null
null
null
null
UTF-8
C++
false
false
3,923
cpp
#include "../../headers/soldier.h" #include <iostream> int main(){ cout << "*****SOLDIER TESTS*****" << endl; int passingTests = 0; int failingTests = 0; Soldier *soldier[7]; soldier[0] = new Pawn("w"); soldier[1] = new Rook("w"); soldier[2] = new Knight("w"); soldier[3] = new Bishop("w"); soldier[4] = new Queen("w"); soldier[5] = new King("w"); soldier[6] = new Pawn("b"); //test one black pawn since pawns move differently depending on the color //COLOR AND NAME TESTS cout << "running color and name tests..." << endl; //color for(int i=0;i<6;i++){ if(soldier[i]->getColor() == "w") passingTests ++; else { cout << "wrong color for soldier " << i << endl; failingTests++; } } if(soldier[6]->getColor() == "b") passingTests ++; else { cout << "wrong color for soldier " << 6 << endl; failingTests++; } //name string asciiName[7] = {"wp","wr","wn","wb","wq","wk","bp"}; for(int i=0;i<7;i++){ if(soldier[i]->getAsciiName() == asciiName[i]) passingTests ++; else { cout << "wrong asciiname for soldier " << i << endl; failingTests++; } } //ATTACK TESTS cout << "running attack tests..." << endl; int testAttacks[14][4][4] = {{{1,1,1,2},{1,1,2,1},{1,1,3,1},{1,0,2,-1}} // whitepawnfail ,{{1,1,2,2},{1,1,2,0},{6,2,7,1},{4,2,5,1}} //whitepawnpass ,{{1,1,1,1},{7,3,8,4},{3,2,3,-1},{4,2,9,2}} //rookfail ,{{1,1,2,1},{4,3,4,7},{0,3,7,3},{1,2,0,2}} //rookpass ,{{0,0,-1,-2},{0,0,2,-1},{7,7,8,9},{3,3,5,5}} //knightfail ,{{0,0,2,1},{0,0,1,2},{3,3,4,5},{4,4,2,3}} //knightpass ,{{3,4,2,2},{0,0,-2,-2},{4,5,0,6},{2,5,3,3}} //bishopfail ,{{3,6,1,4},{2,4,3,3},{0,0,6,6},{3,3,1,1}} //bishoppass ,{{3,4,2,2},{0,0,-2,-2},{3,2,3,-1},{4,2,9,2}} //queenfail ,{{1,1,2,1},{4,3,4,7},{3,6,1,4},{2,4,3,3}} //queenpass ,{{2,2,4,2},{2,2,2,2},{0,0,-1,0},{7,7,6,5}} //kingfail ,{{5,5,6,5},{1,1,0,0},{2,4,3,4},{5,6,5,5}} //kingpass ,{{5,3,4,3},{0,4,-1,3},{1,2,2,3},{4,4,4,4}} //blackpawnfail ,{{6,3,5,2},{1,0,0,1},{4,4,3,5},{5,1,4,0}}}; //blackpawnpass for(int i=0;i<14;i = i+2){ for(int j=0;j<4;j++){ if(soldier[i/2]->isValidAttack(testAttacks[i][j][0],testAttacks[i][j][1],testAttacks[i][j][2],testAttacks[i][j][3])){ failingTests ++; cout << "soldier " << i/2 << " accepted the move " << testAttacks[i][j][0]<<testAttacks[i][j][1]<<testAttacks[i][j][2]<<testAttacks[i][j][3] << endl; } else passingTests ++; if(!soldier[i/2]->isValidAttack(testAttacks[i+1][j][0],testAttacks[i+1][j][1],testAttacks[i+1][j][2],testAttacks[i+1][j][3])){ failingTests ++; cout << "soldier " << i/2 << " rejected the move " << testAttacks[i+1][j][0]<<testAttacks[i+1][j][1]<<testAttacks[i+1][j][2]<<testAttacks[i+1][j][3] << endl; } else passingTests ++; } } //KIND OF SOLDIER TESTS cout << "running kind-of-soldier tests..." << endl; for(int i=0;i<7;i++){ if(i!=0 && i!=6){ if(soldier[i]->isPawn()){ cout << "soldier" << i << " thinks it's a pawn" << endl; failingTests ++;} else passingTests++; } if(i!=1){ if(soldier[i]->isRook()){ cout << "soldier" << i << " thinks it's a rook" << endl; failingTests ++;} else passingTests++; } if(i!=2){ if(soldier[i]->isKnight()){ cout << "soldier" << i << " thinks it's a knight" << endl; failingTests ++;} else passingTests++; } if(i!=3){ if(soldier[i]->isBishop()){ cout << "soldier" << i << " thinks it's a bishop" << endl; failingTests ++;} else passingTests++; } if(i!=4){ if(soldier[i]->isQueen()){ cout << "soldier" << i << " thinks it's a queen" << endl; failingTests ++;} else passingTests++; } if(i!=5){ if(soldier[i]->isKing()){ cout << "soldier" << i << " thinks it's a king" << endl; failingTests ++;} else passingTests++; } } //results cout << passingTests << " passing tests" << endl; cout << failingTests << " failing tests" << endl; return 0; }
[ "adriaan.mulder@gmail.com" ]
adriaan.mulder@gmail.com
059ede01208f180c773f8b690402dd4f3c37ba84
b6473af3c1597d585234e2c6e19636bc230e3539
/TicTacToe/src/main.cpp
47d16db052ef7e0bd2b47c3f77d22dbf31b35031
[]
no_license
Skau/SFML_TicTacToe
31f57feb5f915598fff669cb49d60853bb1efec7
77e9dfae1e6a393d60c232292ec8a7712d135074
refs/heads/master
2022-04-03T17:00:35.120492
2020-02-03T19:46:39
2020-02-03T19:46:39
156,592,846
0
0
null
null
null
null
UTF-8
C++
false
false
80
cpp
#include "Application.h" int main() { Application a; a.init(); return 0; }
[ "kskau93@gmail.com" ]
kskau93@gmail.com
d535ea2d0d8fdc284a8b2f43a1c0a148ea55ec70
916aad120b60465afd28d180c2148ff37c055486
/set.cpp
134c5c02a5b9b112b6dc514618af96ad9093b675
[]
no_license
yunshouhu/cpp_stl
2ad108648b1c07174a140059b2c3b499473cdddb
6b554a0bfbbd51974f066a717493d1680aa2e777
refs/heads/master
2021-01-10T01:10:48.106796
2016-03-02T07:14:25
2016-03-02T07:14:25
50,569,320
1
0
null
null
null
null
UTF-8
C++
false
false
1,184
cpp
#include <set> #include <string> #include <iostream> #include <functional> #include <iterator> using namespace std; class BigObject { public: string id; explicit BigObject(const string& s) : id(s) {} bool operator< (const BigObject& other) const { return this->id < other.id; } }; inline bool operator<(const string& otherId, const BigObject& obj) { return otherId < obj.id; } inline bool operator<(const BigObject& obj, const string& otherId) { return obj.id < otherId; } //https://msdn.microsoft.com/zh-CN/library/1fe2x6kt.aspx int main() { // Use C++14 brace-init syntax to invoke BigObject(string). // The s suffix invokes string ctor. It is a C++14 user-defined // literal defined in <string> BigObject b1{ "42F"s }; BigObject b2{ "52F"s }; BigObject b3{ "62F"s }; set<BigObject, less<>> myNewSet; // C++14 myNewSet.insert(b1); myNewSet.insert(b3); myNewSet.insert(b2); auto it = myNewSet.find(string("62F")); if (it != myNewSet.end()) cout << "myNewSet element = " << it->id << endl; else cout << "element not found " << endl; for (it = myNewSet.begin(); it != myNewSet.end(); it++) { cout << it->id << " "; } cout << endl; return 0; }
[ "542335496@qq.com" ]
542335496@qq.com
d364227dd99a6637c744b4ca1db66b982f39eef6
e48aa581162a8bd0d6f94425b085d64c3826c870
/ProgrammingInLua/src/c_api/CAPI/CAPI/TestBase.h
7dc57b66f3b57dff09c2ba1caa95c82313b802dd
[ "MIT" ]
permissive
sysuyedong/CodingNote
47d26eafdbc4704e9ff71e69e83fe4a4ed595cb3
575afed1581a15340c8b4e8bb78a2aa1ae6bb320
refs/heads/master
2020-12-25T15:29:10.625955
2017-05-17T12:29:16
2017-05-17T12:29:16
39,433,931
2
0
null
null
null
null
UTF-8
C++
false
false
321
h
#pragma once #include <lua.hpp> #include <iostream> #include "Tools.h" using namespace std; #define DLL_EXPORTS 1 #ifdef DLL_EXPORTS #define DLL_API __declspec(dllexport) #else #define DLL_API __declspec(dllimport) #endif class TestBase { public: TestBase(); ~TestBase(); virtual void DoTest(lua_State *L) = 0; };
[ "sysuyedong@gmail.com" ]
sysuyedong@gmail.com
170343393d27bf26c445ac4059cfc1d7448c7b5c
e0525f19f28085947fca1565b246a77121d8c806
/task3/CarsClasses.h
7c34d74c57ee20d24088a516606daf9b229f3b38
[]
no_license
DenisTuxvatullin/Cars
80d6615e8f2d9bbbb7399fea8118c36a3b7fe9b7
6e79b7d86bcd9885fb88405472011382d8d7f456
refs/heads/master
2021-01-23T01:56:48.019478
2017-04-01T05:07:45
2017-04-01T05:07:45
85,951,256
0
0
null
null
null
null
UTF-8
C++
false
false
850
h
#pragma once #include "CarInterfaces.h" #include "CCarImplementation.h" #include "PersonImplementation.h" #include "PersonInterfaces.h" class CTaxi : public CCarImpl<CVehicleImpl<ITaxi, IPerson>> { public: CTaxi(const MakeOfTheCar &make, size_t places) :CCarImpl<CVehicleImpl<ITaxi, IPerson>>(make, places) { } }; class CPoliceCar : public CCarImpl<CVehicleImpl<IPoliceCar, IPoliceMan>> { public: CPoliceCar(MakeOfTheCar make, size_t places) :CCarImpl<CVehicleImpl<IPoliceCar, IPoliceMan>>(make, places) { } }; class CRacingCar : public CCarImpl<CVehicleImpl<IRacerCar, IRacer>> { public: CRacingCar(const MakeOfTheCar &make, size_t places) :CCarImpl<CVehicleImpl<IRacerCar, IRacer>>(make, places) { } }; class CBus : public CVehicleImpl<IBus, IPerson> { public: CBus(size_t places) :CVehicleImpl<IBus, IPerson>(places) { } };
[ "den44icc@mail.ru" ]
den44icc@mail.ru
42b7651c802632b25fcc2f67212250f7fc829d0f
54eaacbc913feea802b3739b1a8c34bf0c720fe9
/include/Utils.h
503534a3e7b80a3ba7ab8055a6981883cebe149c
[]
no_license
millag/alife
8e8171f303c883bcbe486fecf94e9834e30817af
0b28b22afa161b29e92fa06e631ca393c85baed0
refs/heads/master
2021-01-10T20:06:49.078859
2014-02-05T19:06:23
2014-02-05T19:06:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,372
h
#ifndef UTILS_H #define UTILS_H #include "ngl/Vec4.h" #include "Mesh.h" namespace utils { template<class T> T clamp(T v, T a, T b) { assert(a < b); return std::max(a, std::min(v, b)); } const static unsigned short C_SEC = 1000; const static unsigned short C_UPS = 30; const static unsigned short C_FPS = 30; const static unsigned short C_UPDATERATE = C_SEC / C_UPS; const static unsigned short C_REFRESHRATE = C_SEC / C_FPS; const static ngl::Real C_ERR = 0.000001; const static ngl::Vec4 C_EX(1,0,0,0); const static ngl::Vec4 C_EY(0,1,0,0); const static ngl::Vec4 C_EZ(0,0,1,0); const static ngl::Vec4 C_EW(0,0,0,1); ngl::Real getSign(ngl::Real _value); ngl::Real randf(ngl::Real _min = 0.0, ngl::Real _max = 1.0); ngl::Vec4 genRandPointInBox(ngl::Real _bBoxMin = -1.0, ngl::Real _bBoxMax = 1.0); ngl::Vec4 genRandPointOnSphere(ngl::Real _radius = 1.0, const ngl::Vec4& _center = ngl::Vec4()); ngl::Vec4 genRandPointOnDisk(ngl::Real _radius = 1.0, const ngl::Vec4& _center = ngl::Vec4()); void truncate(ngl::Vec4& io_v, ngl::Real _maxLength); ngl::Vec4 faceforward(const ngl::Vec4& _n, const ngl::Vec4& _v); ngl::Vec4 reflect(const ngl::Vec4& _v, const ngl::Vec4& _n); bool isInsideVolume(const ngl::Vec4& _p, const AABB& _volume); } #endif // UTILS_H
[ "millag43@gmail.com" ]
millag43@gmail.com
00d11cbdf7b399d5c8d84e55351e81dbbba1ed51
f906c252f152da842b89304ac6b681c58f922a13
/include/inmem_psascan_src/parallel_merge.hpp
0be58d5f785484c33f22d1747bbb3e03b272a26c
[ "MIT" ]
permissive
dominikkempa/psascan
5cbb3506ac0b2eb398010d8cc6d467b323b98003
d206aea99e0fe2130fcd0f726f1e0acb7699ebd6
refs/heads/master
2023-06-25T10:07:32.423845
2021-07-27T18:56:43
2021-07-27T18:56:43
282,378,208
8
1
null
null
null
null
UTF-8
C++
false
false
10,830
hpp
/** * @file src/psascan_src/inmem_psascan_src/parallel_merge.hpp * @section DESCRIPTION * * Parallel version of almost in-place stable merging described in * the Appending B of * * Juha Karkkainen, Peter Sanders, Stefan Burkhardt: * Linear work suffix array construction. * J. ACM 53(6), p. 918-936 (2006). * * @section LICENCE * * This file is part of pSAscan v0.1.1 * See: https://github.com/dominikkempa/psascan * * Copyright (C) 2014-2020 * Dominik Kempa <dominik.kempa (at) gmail.com> * Juha Karkkainen <juha.karkkainen (at) cs.helsinki.fi> * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. **/ #ifndef __SRC_PSASCAN_SRC_INMEM_PSASCAN_SRC_PARALLEL_MERGE_HPP_INCLUDED #define __SRC_PSASCAN_SRC_INMEM_PSASCAN_SRC_PARALLEL_MERGE_HPP_INCLUDED #include <cstdio> #include <cstdlib> #include <vector> #include <stack> #include <algorithm> #include <thread> #include <mutex> #include "../utils/utils.hpp" #include "pagearray.hpp" #include "inmem_gap_array.hpp" namespace psascan_private { namespace inmem_psascan_private { //============================================================================== // Compute the range [res_beg..res_beg+res_size) of the output (i.e., the // sequence after merging). The range is guaranteed to be aligned with page // boundaries. //============================================================================== template<typename pagearray_type> void parallel_merge_aux( const pagearray_type *l_pagearray, const pagearray_type *r_pagearray, pagearray_type *output, const inmem_gap_array *gap, long left_idx, long right_idx, long remaining_gap, long page_range_beg, long page_range_end, long what_to_add) { typedef typename pagearray_type::value_type value_type; static const unsigned pagesize = pagearray_type::pagesize; long res_beg = std::max(0L, output->get_page_addr(page_range_beg) - output->m_origin); long res_end = std::min( output->m_length, output->get_page_addr(page_range_end) - output->m_origin); long res_size = res_end - res_beg; long lpage_read = 0L; long lpage_id = l_pagearray->get_page_id(left_idx); long lpage_offset = l_pagearray->get_page_offset(left_idx); value_type *lpage = l_pagearray->m_pageindex[lpage_id++]; long rpage_read = 0L; long rpage_id = r_pagearray->get_page_id(right_idx); long rpage_offset = r_pagearray->get_page_offset(right_idx); value_type *rpage = r_pagearray->m_pageindex[rpage_id++]; long pageid = output->get_page_id(res_beg); long filled = output->get_page_offset(res_beg); value_type *dest = new value_type[pagesize]; output->m_pageindex[pageid++] = dest; std::stack<value_type*> freepages; size_t excess_ptr = std::lower_bound(gap->m_excess.begin(), gap->m_excess.end(), left_idx + 1) - gap->m_excess.begin(); for (long i = 0; i < res_size; ++i) { if (filled == pagesize) { if (freepages.empty()) dest = new value_type[pagesize]; else { dest = freepages.top(); freepages.pop(); } output->m_pageindex[pageid++] = dest; filled = 0L; } if (remaining_gap > 0) { --remaining_gap; // The next element comes from the right subarray. dest[filled] = rpage[rpage_offset++]; dest[filled++].sa += what_to_add; rpage_read++; if (rpage_offset == pagesize) { // We reached the end of page in the right subarray. // We put it into free pages if we read exactly // pagesize elements from it. This means the no other // thread will attemp to read from it in the future. if (rpage_read == pagesize) freepages.push(r_pagearray->m_pageindex[rpage_id - 1]); // Note: we don't have to check, if the page below exists, // because we have a sentinel page in the page index of // every pagearray. rpage = r_pagearray->m_pageindex[rpage_id++]; rpage_offset = 0L; rpage_read = 0L; } } else { // Next elem comes from the left subarray. dest[filled++] = lpage[lpage_offset++]; left_idx++; lpage_read++; // Compute gap[left_idx]. long gap_left_idx = gap->m_count[left_idx]; while (excess_ptr < gap->m_excess.size() && gap->m_excess[excess_ptr] == left_idx) { gap_left_idx += 256L; ++excess_ptr; } remaining_gap = gap_left_idx; if (lpage_offset == pagesize) { // We reached the end of page in the left // subarray, proceed analogously. if (lpage_read == pagesize) freepages.push(l_pagearray->m_pageindex[lpage_id - 1]); // Note: we don't have to check, if the page below exists, // because we have a sentinel page in the page index of // every pagearray. lpage = l_pagearray->m_pageindex[lpage_id++]; lpage_offset = 0L; lpage_read = 0L; } } } // Release the unused auxiliary pages. while (!freepages.empty()) { value_type* p = freepages.top(); freepages.pop(); if (!output->owns_page(p)) delete[] p; } } template<typename pagearray_type> pagearray_type *parallel_merge(pagearray_type *l_pagearray, pagearray_type *r_pagearray, const inmem_gap_array *gap, long max_threads, long i0, long &aux_result, long what_to_add) { static const unsigned pagesize_log = pagearray_type::pagesize_log; static const unsigned pagesize = pagearray_type::pagesize; typedef typename pagearray_type::value_type value_type; typedef pagearray<value_type, pagesize_log> output_type; //---------------------------------------------------------------------------- // STEP 1: compute the initial parameters for each thread. //---------------------------------------------------------------------------- fprintf(stderr, "queries: "); long double start = utils::wclock(); long length = l_pagearray->m_length + r_pagearray->m_length; long n_pages = (length + pagesize - 1) / pagesize; long pages_per_thread = (n_pages + max_threads - 1) / max_threads; long n_threads = (n_pages + pages_per_thread - 1) / pages_per_thread; output_type *result = new output_type(l_pagearray->m_origin, length); long *left_idx = new long[n_threads]; long *right_idx = new long[n_threads]; long *remaining_gap = new long[n_threads]; // Prepare gap queries. long *gap_query = new long[n_threads]; long *gap_answer_a = new long[n_threads]; long *gap_answer_b = new long[n_threads]; for (long i = 0; i < n_threads; ++i) { long page_range_beg = i * pages_per_thread; long res_beg = std::max(0L, result->get_page_addr(page_range_beg) - result->m_origin); gap_query[i] = res_beg; } // Answer these queries in parallel and convert the answers // to left_idx, right_idx and remaining_gap values. aux_result = gap->answer_queries(n_threads, gap_query, gap_answer_a, gap_answer_b, max_threads, i0); for (long i = 0; i < n_threads; ++i) { long page_range_beg = i * pages_per_thread; long res_beg = std::max(0L, result->get_page_addr(page_range_beg) - result->m_origin); long j = gap_answer_a[i], s = gap_answer_b[i]; left_idx[i] = j; right_idx[i] = res_beg - j; remaining_gap[i] = j + s - res_beg; } delete[] gap_query; delete[] gap_answer_a; delete[] gap_answer_b; fprintf(stderr, "%.2Lf ", utils::wclock() - start); //---------------------------------------------------------------------------- // STEP 2: merge the arrays. //---------------------------------------------------------------------------- fprintf(stderr, "merge: "); start = utils::wclock(); std::thread **threads = new std::thread*[n_threads]; for (long t = 0; t < n_threads; ++t) { long page_range_beg = t * pages_per_thread; long page_range_end = std::min(page_range_beg + pages_per_thread, n_pages); threads[t] = new std::thread(parallel_merge_aux<pagearray_type>, l_pagearray, r_pagearray, result, gap, left_idx[t], right_idx[t], remaining_gap[t], page_range_beg, page_range_end, what_to_add); } for (long t = 0; t < n_threads; ++t) threads[t]->join(); for (long t = 0; t < n_threads; ++t) delete threads[t]; delete[] threads; delete[] left_idx; delete[] right_idx; delete[] remaining_gap; bool *usedpage = new bool[n_pages]; std::fill(usedpage, usedpage + n_pages, false); // Handle the page that was not full // manually (if there was one). if (length % pagesize) { long size = length % pagesize; value_type *src = result->m_pageindex[0]; value_type *dest = result->get_page_addr(0); std::copy(src + pagesize - size, src + pagesize, dest + pagesize - size); result->m_pageindex[0] = dest; usedpage[0] = true; // Release the lastpage if it was temporary. if (!result->owns_page(src)) delete[] src; } // Find unused input pages. std::vector<std::pair<long, value_type*> > auxpages; for (long i = 0; i < n_pages; ++i) { value_type *p = result->m_pageindex[i]; if (result->owns_page(p)) usedpage[result->get_page_id(p)] = true; else auxpages.push_back(std::make_pair(i, p)); } // Assign aux pages to unused pages in any // order and release them (aux pages). for (long i = 0, ptr = 0; i < n_pages; ++i) { if (!usedpage[i]) { long id = auxpages[ptr].first; value_type *src = auxpages[ptr++].second; value_type *dest = result->get_page_addr(i); std::copy(src, src + pagesize, dest); result->m_pageindex[id] = dest; delete[] src; } } delete[] usedpage; fprintf(stderr, "%.2Lf ", utils::wclock() - start); return result; } } // namespace inmem_psascan_private } // namespace psascan_private #endif // __SRC_PSASCAN_SRC_INMEM_PSASCAN_SRC_PARALLEL_MERGE_HPP_INCLUDED
[ "dominik.kempa@gmail.com" ]
dominik.kempa@gmail.com
c77d9debca5b1426236afd96b0368db5f48e7256
c928ee4909bff4d412bd04d085d7ce5455d2af26
/src/test/netbase_tests.cpp
c56eec57e590b986d04930c1b78b8db980080c35
[]
no_license
turnkeyglobal/BitcoinJ
71004527a9448be79f7e48cc5067410f2398762c
c969ae131b5ffeccb00d3850267d50a1b3e8fd5b
refs/heads/master
2020-03-06T14:30:11.138789
2018-03-27T06:17:04
2018-03-27T06:17:04
126,937,125
0
0
null
null
null
null
UTF-8
C++
false
false
13,162
cpp
// Copyright (c) 2012-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "netbase.h" #include "test/test_minmontcoin.h" #include <string> #include <boost/assign/list_of.hpp> #include <boost/test/unit_test.hpp> using namespace std; BOOST_FIXTURE_TEST_SUITE(netbase_tests, BasicTestingSetup) BOOST_AUTO_TEST_CASE(netbase_networks) { BOOST_CHECK(CNetAddr("127.0.0.1").GetNetwork() == NET_UNROUTABLE); BOOST_CHECK(CNetAddr("::1").GetNetwork() == NET_UNROUTABLE); BOOST_CHECK(CNetAddr("8.8.8.8").GetNetwork() == NET_IPV4); BOOST_CHECK(CNetAddr("2001::8888").GetNetwork() == NET_IPV6); BOOST_CHECK(CNetAddr("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").GetNetwork() == NET_TOR); } BOOST_AUTO_TEST_CASE(netbase_properties) { BOOST_CHECK(CNetAddr("127.0.0.1").IsIPv4()); BOOST_CHECK(CNetAddr("::FFFF:192.168.1.1").IsIPv4()); BOOST_CHECK(CNetAddr("::1").IsIPv6()); BOOST_CHECK(CNetAddr("10.0.0.1").IsRFC1918()); BOOST_CHECK(CNetAddr("192.168.1.1").IsRFC1918()); BOOST_CHECK(CNetAddr("172.31.255.255").IsRFC1918()); BOOST_CHECK(CNetAddr("2001:0DB8::").IsRFC3849()); BOOST_CHECK(CNetAddr("169.254.1.1").IsRFC3927()); BOOST_CHECK(CNetAddr("2002::1").IsRFC3964()); BOOST_CHECK(CNetAddr("FC00::").IsRFC4193()); BOOST_CHECK(CNetAddr("2001::2").IsRFC4380()); BOOST_CHECK(CNetAddr("2001:10::").IsRFC4843()); BOOST_CHECK(CNetAddr("FE80::").IsRFC4862()); BOOST_CHECK(CNetAddr("64:FF9B::").IsRFC6052()); BOOST_CHECK(CNetAddr("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").IsTor()); BOOST_CHECK(CNetAddr("127.0.0.1").IsLocal()); BOOST_CHECK(CNetAddr("::1").IsLocal()); BOOST_CHECK(CNetAddr("8.8.8.8").IsRoutable()); BOOST_CHECK(CNetAddr("2001::1").IsRoutable()); BOOST_CHECK(CNetAddr("127.0.0.1").IsValid()); } bool static TestSplitHost(string test, string host, int port) { string hostOut; int portOut = -1; SplitHostPort(test, portOut, hostOut); return hostOut == host && port == portOut; } BOOST_AUTO_TEST_CASE(netbase_splithost) { BOOST_CHECK(TestSplitHost("www.minmontcoin.org", "www.minmontcoin.org", -1)); BOOST_CHECK(TestSplitHost("[www.minmontcoin.org]", "www.minmontcoin.org", -1)); BOOST_CHECK(TestSplitHost("www.minmontcoin.org:80", "www.minmontcoin.org", 80)); BOOST_CHECK(TestSplitHost("[www.minmontcoin.org]:80", "www.minmontcoin.org", 80)); BOOST_CHECK(TestSplitHost("127.0.0.1", "127.0.0.1", -1)); BOOST_CHECK(TestSplitHost("127.0.0.1:8333", "127.0.0.1", 8333)); BOOST_CHECK(TestSplitHost("[127.0.0.1]", "127.0.0.1", -1)); BOOST_CHECK(TestSplitHost("[127.0.0.1]:8333", "127.0.0.1", 8333)); BOOST_CHECK(TestSplitHost("::ffff:127.0.0.1", "::ffff:127.0.0.1", -1)); BOOST_CHECK(TestSplitHost("[::ffff:127.0.0.1]:8333", "::ffff:127.0.0.1", 8333)); BOOST_CHECK(TestSplitHost("[::]:8333", "::", 8333)); BOOST_CHECK(TestSplitHost("::8333", "::8333", -1)); BOOST_CHECK(TestSplitHost(":8333", "", 8333)); BOOST_CHECK(TestSplitHost("[]:8333", "", 8333)); BOOST_CHECK(TestSplitHost("", "", -1)); } bool static TestParse(string src, string canon) { CService addr; if (!LookupNumeric(src.c_str(), addr, 65535)) return canon == ""; return canon == addr.ToString(); } BOOST_AUTO_TEST_CASE(netbase_lookupnumeric) { BOOST_CHECK(TestParse("127.0.0.1", "127.0.0.1:65535")); BOOST_CHECK(TestParse("127.0.0.1:8333", "127.0.0.1:8333")); BOOST_CHECK(TestParse("::ffff:127.0.0.1", "127.0.0.1:65535")); BOOST_CHECK(TestParse("::", "[::]:65535")); BOOST_CHECK(TestParse("[::]:8333", "[::]:8333")); BOOST_CHECK(TestParse("[127.0.0.1]", "127.0.0.1:65535")); BOOST_CHECK(TestParse(":::", "")); } BOOST_AUTO_TEST_CASE(onioncat_test) { // values from https://web.archive.org/web/20121122003543/http://www.cypherpunk.at/onioncat/wiki/OnionCat CNetAddr addr1("5wyqrzbvrdsumnok.onion"); CNetAddr addr2("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca"); BOOST_CHECK(addr1 == addr2); BOOST_CHECK(addr1.IsTor()); BOOST_CHECK(addr1.ToStringIP() == "5wyqrzbvrdsumnok.onion"); BOOST_CHECK(addr1.IsRoutable()); } BOOST_AUTO_TEST_CASE(subnet_test) { BOOST_CHECK(CSubNet("1.2.3.0/24") == CSubNet("1.2.3.0/255.255.255.0")); BOOST_CHECK(CSubNet("1.2.3.0/24") != CSubNet("1.2.4.0/255.255.255.0")); BOOST_CHECK(CSubNet("1.2.3.0/24").Match(CNetAddr("1.2.3.4"))); BOOST_CHECK(!CSubNet("1.2.2.0/24").Match(CNetAddr("1.2.3.4"))); BOOST_CHECK(CSubNet("1.2.3.4").Match(CNetAddr("1.2.3.4"))); BOOST_CHECK(CSubNet("1.2.3.4/32").Match(CNetAddr("1.2.3.4"))); BOOST_CHECK(!CSubNet("1.2.3.4").Match(CNetAddr("5.6.7.8"))); BOOST_CHECK(!CSubNet("1.2.3.4/32").Match(CNetAddr("5.6.7.8"))); BOOST_CHECK(CSubNet("::ffff:127.0.0.1").Match(CNetAddr("127.0.0.1"))); BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8").Match(CNetAddr("1:2:3:4:5:6:7:8"))); BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8").Match(CNetAddr("1:2:3:4:5:6:7:9"))); BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:0/112").Match(CNetAddr("1:2:3:4:5:6:7:1234"))); BOOST_CHECK(CSubNet("192.168.0.1/24").Match(CNetAddr("192.168.0.2"))); BOOST_CHECK(CSubNet("192.168.0.20/29").Match(CNetAddr("192.168.0.18"))); BOOST_CHECK(CSubNet("1.2.2.1/24").Match(CNetAddr("1.2.2.4"))); BOOST_CHECK(CSubNet("1.2.2.110/31").Match(CNetAddr("1.2.2.111"))); BOOST_CHECK(CSubNet("1.2.2.20/26").Match(CNetAddr("1.2.2.63"))); // All-Matching IPv6 Matches arbitrary IPv4 and IPv6 BOOST_CHECK(CSubNet("::/0").Match(CNetAddr("1:2:3:4:5:6:7:1234"))); BOOST_CHECK(CSubNet("::/0").Match(CNetAddr("1.2.3.4"))); // All-Matching IPv4 does not Match IPv6 BOOST_CHECK(!CSubNet("0.0.0.0/0").Match(CNetAddr("1:2:3:4:5:6:7:1234"))); // Invalid subnets Match nothing (not even invalid addresses) BOOST_CHECK(!CSubNet().Match(CNetAddr("1.2.3.4"))); BOOST_CHECK(!CSubNet("").Match(CNetAddr("4.5.6.7"))); BOOST_CHECK(!CSubNet("bloop").Match(CNetAddr("0.0.0.0"))); BOOST_CHECK(!CSubNet("bloop").Match(CNetAddr("hab"))); // Check valid/invalid BOOST_CHECK(CSubNet("1.2.3.0/0").IsValid()); BOOST_CHECK(!CSubNet("1.2.3.0/-1").IsValid()); BOOST_CHECK(CSubNet("1.2.3.0/32").IsValid()); BOOST_CHECK(!CSubNet("1.2.3.0/33").IsValid()); BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8/0").IsValid()); BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8/33").IsValid()); BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8/-1").IsValid()); BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8/128").IsValid()); BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8/129").IsValid()); BOOST_CHECK(!CSubNet("fuzzy").IsValid()); //CNetAddr constructor test BOOST_CHECK(CSubNet(CNetAddr("127.0.0.1")).IsValid()); BOOST_CHECK(CSubNet(CNetAddr("127.0.0.1")).Match(CNetAddr("127.0.0.1"))); BOOST_CHECK(!CSubNet(CNetAddr("127.0.0.1")).Match(CNetAddr("127.0.0.2"))); BOOST_CHECK(CSubNet(CNetAddr("127.0.0.1")).ToString() == "127.0.0.1/32"); BOOST_CHECK(CSubNet(CNetAddr("1:2:3:4:5:6:7:8")).IsValid()); BOOST_CHECK(CSubNet(CNetAddr("1:2:3:4:5:6:7:8")).Match(CNetAddr("1:2:3:4:5:6:7:8"))); BOOST_CHECK(!CSubNet(CNetAddr("1:2:3:4:5:6:7:8")).Match(CNetAddr("1:2:3:4:5:6:7:9"))); BOOST_CHECK(CSubNet(CNetAddr("1:2:3:4:5:6:7:8")).ToString() == "1:2:3:4:5:6:7:8/128"); CSubNet subnet = CSubNet("1.2.3.4/255.255.255.255"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/32"); subnet = CSubNet("1.2.3.4/255.255.255.254"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/31"); subnet = CSubNet("1.2.3.4/255.255.255.252"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.4/30"); subnet = CSubNet("1.2.3.4/255.255.255.248"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/29"); subnet = CSubNet("1.2.3.4/255.255.255.240"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/28"); subnet = CSubNet("1.2.3.4/255.255.255.224"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/27"); subnet = CSubNet("1.2.3.4/255.255.255.192"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/26"); subnet = CSubNet("1.2.3.4/255.255.255.128"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/25"); subnet = CSubNet("1.2.3.4/255.255.255.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.3.0/24"); subnet = CSubNet("1.2.3.4/255.255.254.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.2.0/23"); subnet = CSubNet("1.2.3.4/255.255.252.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/22"); subnet = CSubNet("1.2.3.4/255.255.248.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/21"); subnet = CSubNet("1.2.3.4/255.255.240.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/20"); subnet = CSubNet("1.2.3.4/255.255.224.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/19"); subnet = CSubNet("1.2.3.4/255.255.192.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/18"); subnet = CSubNet("1.2.3.4/255.255.128.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/17"); subnet = CSubNet("1.2.3.4/255.255.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/16"); subnet = CSubNet("1.2.3.4/255.254.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/15"); subnet = CSubNet("1.2.3.4/255.252.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/14"); subnet = CSubNet("1.2.3.4/255.248.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/13"); subnet = CSubNet("1.2.3.4/255.240.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/12"); subnet = CSubNet("1.2.3.4/255.224.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/11"); subnet = CSubNet("1.2.3.4/255.192.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/10"); subnet = CSubNet("1.2.3.4/255.128.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/9"); subnet = CSubNet("1.2.3.4/255.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.0.0.0/8"); subnet = CSubNet("1.2.3.4/254.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/7"); subnet = CSubNet("1.2.3.4/252.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/6"); subnet = CSubNet("1.2.3.4/248.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/5"); subnet = CSubNet("1.2.3.4/240.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/4"); subnet = CSubNet("1.2.3.4/224.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/3"); subnet = CSubNet("1.2.3.4/192.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/2"); subnet = CSubNet("1.2.3.4/128.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/1"); subnet = CSubNet("1.2.3.4/0.0.0.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "0.0.0.0/0"); subnet = CSubNet("1:2:3:4:5:6:7:8/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"); BOOST_CHECK_EQUAL(subnet.ToString(), "1:2:3:4:5:6:7:8/128"); subnet = CSubNet("1:2:3:4:5:6:7:8/ffff:0000:0000:0000:0000:0000:0000:0000"); BOOST_CHECK_EQUAL(subnet.ToString(), "1::/16"); subnet = CSubNet("1:2:3:4:5:6:7:8/0000:0000:0000:0000:0000:0000:0000:0000"); BOOST_CHECK_EQUAL(subnet.ToString(), "::/0"); subnet = CSubNet("1.2.3.4/255.255.232.0"); BOOST_CHECK_EQUAL(subnet.ToString(), "1.2.0.0/255.255.232.0"); subnet = CSubNet("1:2:3:4:5:6:7:8/ffff:ffff:ffff:fffe:ffff:ffff:ffff:ff0f"); BOOST_CHECK_EQUAL(subnet.ToString(), "1:2:3:4:5:6:7:8/ffff:ffff:ffff:fffe:ffff:ffff:ffff:ff0f"); } BOOST_AUTO_TEST_CASE(netbase_getgroup) { BOOST_CHECK(CNetAddr("127.0.0.1").GetGroup() == boost::assign::list_of(0)); // Local -> !Routable() BOOST_CHECK(CNetAddr("257.0.0.1").GetGroup() == boost::assign::list_of(0)); // !Valid -> !Routable() BOOST_CHECK(CNetAddr("10.0.0.1").GetGroup() == boost::assign::list_of(0)); // RFC1918 -> !Routable() BOOST_CHECK(CNetAddr("169.254.1.1").GetGroup() == boost::assign::list_of(0)); // RFC3927 -> !Routable() BOOST_CHECK(CNetAddr("1.2.3.4").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // IPv4 BOOST_CHECK(CNetAddr("::FFFF:0:102:304").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC6145 BOOST_CHECK(CNetAddr("64:FF9B::102:304").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC6052 BOOST_CHECK(CNetAddr("2002:102:304:9999:9999:9999:9999:9999").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC3964 BOOST_CHECK(CNetAddr("2001:0:9999:9999:9999:9999:FEFD:FCFB").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV4)(1)(2)); // RFC4380 BOOST_CHECK(CNetAddr("FD87:D87E:EB43:edb1:8e4:3588:e546:35ca").GetGroup() == boost::assign::list_of((unsigned char)NET_TOR)(239)); // Tor BOOST_CHECK(CNetAddr("2001:470:abcd:9999:9999:9999:9999:9999").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV6)(32)(1)(4)(112)(175)); //he.net BOOST_CHECK(CNetAddr("2001:2001:9999:9999:9999:9999:9999:9999").GetGroup() == boost::assign::list_of((unsigned char)NET_IPV6)(32)(1)(32)(1)); //IPv6 } BOOST_AUTO_TEST_SUITE_END()
[ "sarathb922@gmail.com" ]
sarathb922@gmail.com
82d69f8e6495eeedb79176be755c22dc5d91ae4d
959819ffe6ff201f981d23c4d767e2beb52d0284
/TimerOne.h
a8eea843d044c73ce74e11e684618f7075b13140
[]
no_license
yuval-k/connectfirmware
d7e13f171d0ad9541beb764215423307276bd240
6ce19de6bf04d79dd57b8de23aa12f4c2d3740ed
refs/heads/master
2021-03-19T06:57:43.362905
2017-05-25T23:53:46
2017-05-25T23:53:46
91,030,080
0
0
null
null
null
null
UTF-8
C++
false
false
9,871
h
/* * Interrupt and PWM utilities for 16 bit Timer1 on ATmega168/328 * Original code by Jesse Tane for http://labs.ideo.com August 2008 * Modified March 2009 by Jérôme Despatis and Jesse Tane for ATmega328 support * Modified June 2009 by Michael Polli and Jesse Tane to fix a bug in setPeriod() which caused the timer to stop * Modified April 2012 by Paul Stoffregen - portable to other AVR chips, use inline functions * Modified again, June 2014 by Paul Stoffregen - support Teensy 3.x & even more AVR chips * * * This is free software. You can redistribute it and/or modify it under * the terms of Creative Commons Attribution 3.0 United States License. * To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/us/ * or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. * */ #ifndef TimerOne_h_ #define TimerOne_h_ #if defined(ARDUINO) && ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include "config/known_16bit_timers.h" #define TIMER1_RESOLUTION 65536UL // Timer1 is 16 bit // Placing nearly all the code in this .h file allows the functions to be // inlined by the compiler. In the very common case with constant values // the compiler will perform all calculations and simply write constants // to the hardware registers (for example, setPeriod). class TimerOne { #if defined(__AVR__) public: //**************************** // Configuration //**************************** void initialize(unsigned long microseconds=1000000) __attribute__((always_inline)) { TCCR1B = _BV(WGM13); // set mode as phase and frequency correct pwm, stop the timer TCCR1A = 0; // clear control register A setPeriod(microseconds); } void setPeriod(unsigned long microseconds) __attribute__((always_inline)) { const unsigned long cycles = (F_CPU / 2000000) * microseconds; if (cycles < TIMER1_RESOLUTION) { clockSelectBits = _BV(CS10); pwmPeriod = cycles; } else if (cycles < TIMER1_RESOLUTION * 8) { clockSelectBits = _BV(CS11); pwmPeriod = cycles / 8; } else if (cycles < TIMER1_RESOLUTION * 64) { clockSelectBits = _BV(CS11) | _BV(CS10); pwmPeriod = cycles / 64; } else if (cycles < TIMER1_RESOLUTION * 256) { clockSelectBits = _BV(CS12); pwmPeriod = cycles / 256; } else if (cycles < TIMER1_RESOLUTION * 1024) { clockSelectBits = _BV(CS12) | _BV(CS10); pwmPeriod = cycles / 1024; } else { clockSelectBits = _BV(CS12) | _BV(CS10); pwmPeriod = TIMER1_RESOLUTION - 1; } ICR1 = pwmPeriod; TCCR1B = _BV(WGM13) | clockSelectBits; } //**************************** // Run Control //**************************** void start() __attribute__((always_inline)) { TCCR1B = 0; TCNT1 = 0; // TODO: does this cause an undesired interrupt? resume(); } void stop() __attribute__((always_inline)) { TCCR1B = _BV(WGM13); } void restart() __attribute__((always_inline)) { start(); } void resume() __attribute__((always_inline)) { TCCR1B = _BV(WGM13) | clockSelectBits; } //**************************** // PWM outputs //**************************** void setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline)) { unsigned long dutyCycle = pwmPeriod; dutyCycle *= duty; dutyCycle >>= 10; if (pin == TIMER1_A_PIN) OCR1A = dutyCycle; #ifdef TIMER1_B_PIN else if (pin == TIMER1_B_PIN) OCR1B = dutyCycle; #endif #ifdef TIMER1_C_PIN else if (pin == TIMER1_C_PIN) OCR1C = dutyCycle; #endif } void pwm(char pin, unsigned int duty) __attribute__((always_inline)) { if (pin == TIMER1_A_PIN) { pinMode(TIMER1_A_PIN, OUTPUT); TCCR1A |= _BV(COM1A1); } #ifdef TIMER1_B_PIN else if (pin == TIMER1_B_PIN) { pinMode(TIMER1_B_PIN, OUTPUT); TCCR1A |= _BV(COM1B1); } #endif #ifdef TIMER1_C_PIN else if (pin == TIMER1_C_PIN) { pinMode(TIMER1_C_PIN, OUTPUT); TCCR1A |= _BV(COM1C1); } #endif setPwmDuty(pin, duty); TCCR1B = _BV(WGM13) | clockSelectBits; } void pwm(char pin, unsigned int duty, unsigned long microseconds) __attribute__((always_inline)) { if (microseconds > 0) setPeriod(microseconds); pwm(pin, duty); } void disablePwm(char pin) __attribute__((always_inline)) { if (pin == TIMER1_A_PIN) TCCR1A &= ~_BV(COM1A1); #ifdef TIMER1_B_PIN else if (pin == TIMER1_B_PIN) TCCR1A &= ~_BV(COM1B1); #endif #ifdef TIMER1_C_PIN else if (pin == TIMER1_C_PIN) TCCR1A &= ~_BV(COM1C1); #endif } private: // properties static unsigned short pwmPeriod; static unsigned char clockSelectBits; #elif defined(__arm__) && defined(CORE_TEENSY) #if defined(KINETISK) #define F_TIMER F_BUS #elif defined(KINETISL) #define F_TIMER (F_PLL/2) #endif public: //**************************** // Configuration //**************************** void initialize(unsigned long microseconds=1000000) __attribute__((always_inline)) { setPeriod(microseconds); } void setPeriod(unsigned long microseconds) __attribute__((always_inline)) { const unsigned long cycles = (F_TIMER / 2000000) * microseconds; // A much faster if-else // This is like a binary serch tree and no more than 3 conditions are evaluated. // I haven't checked if this becomes significantly longer ASM than the simple ladder. // It looks very similar to the ladder tho: same # of if's and else's /* // This code does not work properly in all cases :( // https://github.com/PaulStoffregen/TimerOne/issues/17 if (cycles < TIMER1_RESOLUTION * 16) { if (cycles < TIMER1_RESOLUTION * 4) { if (cycles < TIMER1_RESOLUTION) { clockSelectBits = 0; pwmPeriod = cycles; }else{ clockSelectBits = 1; pwmPeriod = cycles >> 1; } }else{ if (cycles < TIMER1_RESOLUTION * 8) { clockSelectBits = 3; pwmPeriod = cycles >> 3; }else{ clockSelectBits = 4; pwmPeriod = cycles >> 4; } } }else{ if (cycles > TIMER1_RESOLUTION * 64) { if (cycles > TIMER1_RESOLUTION * 128) { clockSelectBits = 7; pwmPeriod = TIMER1_RESOLUTION - 1; }else{ clockSelectBits = 7; pwmPeriod = cycles >> 7; } } else{ if (cycles > TIMER1_RESOLUTION * 32) { clockSelectBits = 6; pwmPeriod = cycles >> 6; }else{ clockSelectBits = 5; pwmPeriod = cycles >> 5; } } } */ if (cycles < TIMER1_RESOLUTION) { clockSelectBits = 0; pwmPeriod = cycles; } else if (cycles < TIMER1_RESOLUTION * 2) { clockSelectBits = 1; pwmPeriod = cycles >> 1; } else if (cycles < TIMER1_RESOLUTION * 4) { clockSelectBits = 2; pwmPeriod = cycles >> 2; } else if (cycles < TIMER1_RESOLUTION * 8) { clockSelectBits = 3; pwmPeriod = cycles >> 3; } else if (cycles < TIMER1_RESOLUTION * 16) { clockSelectBits = 4; pwmPeriod = cycles >> 4; } else if (cycles < TIMER1_RESOLUTION * 32) { clockSelectBits = 5; pwmPeriod = cycles >> 5; } else if (cycles < TIMER1_RESOLUTION * 64) { clockSelectBits = 6; pwmPeriod = cycles >> 6; } else if (cycles < TIMER1_RESOLUTION * 128) { clockSelectBits = 7; pwmPeriod = cycles >> 7; } else { clockSelectBits = 7; pwmPeriod = TIMER1_RESOLUTION - 1; } uint32_t sc = FTM1_SC; FTM1_SC = 0; FTM1_MOD = pwmPeriod; FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_CPWMS | clockSelectBits | (sc & FTM_SC_TOIE); } //**************************** // Run Control //**************************** void start() __attribute__((always_inline)) { stop(); FTM1_CNT = 0; resume(); } void stop() __attribute__((always_inline)) { FTM1_SC = FTM1_SC & (FTM_SC_TOIE | FTM_SC_CPWMS | FTM_SC_PS(7)); } void restart() __attribute__((always_inline)) { start(); } void resume() __attribute__((always_inline)) { FTM1_SC = (FTM1_SC & (FTM_SC_TOIE | FTM_SC_PS(7))) | FTM_SC_CPWMS | FTM_SC_CLKS(1); } //**************************** // PWM outputs //**************************** void setPwmDuty(char pin, unsigned int duty) __attribute__((always_inline)) { unsigned long dutyCycle = pwmPeriod; dutyCycle *= duty; dutyCycle >>= 10; if (pin == TIMER1_A_PIN) { FTM1_C0V = dutyCycle; } else if (pin == TIMER1_B_PIN) { FTM1_C1V = dutyCycle; } } void pwm(char pin, unsigned int duty) __attribute__((always_inline)) { setPwmDuty(pin, duty); if (pin == TIMER1_A_PIN) { *portConfigRegister(TIMER1_A_PIN) = PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; } else if (pin == TIMER1_B_PIN) { *portConfigRegister(TIMER1_B_PIN) = PORT_PCR_MUX(3) | PORT_PCR_DSE | PORT_PCR_SRE; } } void pwm(char pin, unsigned int duty, unsigned long microseconds) __attribute__((always_inline)) { if (microseconds > 0) setPeriod(microseconds); pwm(pin, duty); } void disablePwm(char pin) __attribute__((always_inline)) { if (pin == TIMER1_A_PIN) { *portConfigRegister(TIMER1_A_PIN) = 0; } else if (pin == TIMER1_B_PIN) { *portConfigRegister(TIMER1_B_PIN) = 0; } } //**************************** // Interrupt Function //**************************** void attachInterrupt(void (*isr)()) __attribute__((always_inline)) { isrCallback = isr; FTM1_SC |= FTM_SC_TOIE; NVIC_ENABLE_IRQ(IRQ_FTM1); } void attachInterrupt(void (*isr)(), unsigned long microseconds) __attribute__((always_inline)) { if(microseconds > 0) setPeriod(microseconds); attachInterrupt(isr); } void detachInterrupt() __attribute__((always_inline)) { FTM1_SC &= ~FTM_SC_TOIE; NVIC_DISABLE_IRQ(IRQ_FTM1); } static void (*isrCallback)(); static void isrDefaultUnused(); private: // properties static unsigned short pwmPeriod; static unsigned char clockSelectBits; #undef F_TIMER #endif }; extern TimerOne Timer1; #endif
[ "yuval.kohavi@gmail.com" ]
yuval.kohavi@gmail.com
6feec9d157730c3f2a8ec2d1a37787eb5b3798ef
cf4ef7a78e011bfd452c19a853255979c10d3067
/src/Codeforces/884A.cpp
a4a2f2653ece18a4ebaa82b5ffebf296e0deca79
[ "MIT" ]
permissive
lonelyenvoy/ACMCodingPlayground
eae99fadb5828a50dee7ecb26171626c40353132
96cc8901f14464ad0cb26ca00d7973172907392c
refs/heads/master
2022-01-07T13:00:29.302729
2019-05-11T09:14:51
2019-05-11T09:14:51
104,893,257
4
1
null
2017-09-26T15:22:52
2017-09-26T14:11:29
C++
UTF-8
C++
false
false
531
cpp
/** * Created by LonelyEnvoy on 2017-10-29. * A. Book Reading * Keywords: implementation */ #include <cstdio> #include <cstring> using namespace std; #define rep(i,a,n) for(int i=a;i<n;++i) #define erep(i,a,n) for(int i=a;i<=n;++i) #define per(i,a,n) for(int i=n-1;i>=a;--i) #define MAX 101 int n, t; int a[MAX]; int ans; int main() { scanf("%d%d", &n, &t); rep(i,0,n) scanf("%d", a+i); for (ans = 0; ans < n; ++ans) { if (t <= 0) break; t -= 86400 - a[ans]; } printf("%d\n", ans); }
[ "lonelyenvoy@gmail.com" ]
lonelyenvoy@gmail.com
7a9b9d3032ad22b127aef79313b7f5e7ef96d07d
09c9572cd5327cf3c74a8f3e203896bf3c53838d
/examples/SensorTempDHT22/SensorTempDHT22.ino
0e99588d6910d70c0427452dbcb7312f2643cd3f
[]
no_license
Nixes/iotHubLib
228fff1f78e32826e5926ff017eae927e12f5b2b
f79f1d4a848c80442626bc774d457e5b9c5bdc99
refs/heads/master
2021-09-18T23:19:28.044870
2018-07-21T11:12:35
2018-07-21T11:12:35
65,174,417
0
2
null
2018-07-14T05:11:52
2016-08-08T05:13:23
C++
UTF-8
C++
false
false
854
ino
#include "iotHubLib.h" #include "DHT.h" // using adafruit DHT lib: https://github.com/adafruit/DHT-sensor-library // to init iothublib use syntax like <sensors,actors>, // where sensors specifies number of sensors being used on this node // and actors specifies the number of actors being used on this node // the two arguments in the () are the hostname of the server and the port iothub is available on iotHubLib<2,0> iothub("linserver",3000); // note lack of http:// prefix, do not add one // init the temp sensors DHT dht_0(5, DHT22); DHT dht_1(4, DHT22); void setup() { iothub.Start(); // add sensors iothub.RegisterSensor("Temperature Sensor 1","number"); iothub.RegisterSensor("Temperature Sensor 2","number"); } void loop() { iothub.Send(0, dht_0.readTemperature() ); iothub.Send(1, dht_1.readTemperature() ); iothub.Tick(); }
[ "callum@see-bry.com" ]
callum@see-bry.com
d5444ac2e2f23bb92fc290b3507953b0b3865ff7
23b090e1d6bddc2b814e5c25180601a1dce6c1f2
/Source/BEWinFunctions.cpp
550cae55c7e3b7ddd4cf03c9284dd242778b064e
[]
no_license
chivalry/BaseElements-Plugin
22efb2df517c83de68a1c6554d550c73c12aff2a
588121bc16a0c2d03226e92271457ee0f5f157f5
refs/heads/master
2020-04-01T21:22:36.745234
2015-04-22T00:51:33
2015-04-22T00:51:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
22,702
cpp
/* BEWinFunctions.cpp BaseElements Plug-in Copyright 2010-2014 Goya. All rights reserved. For conditions of distribution and use please see the copyright notice in BEPlugin.cpp http://www.goya.com.au/baseelements/plugin */ #include <ShlObj.h> #include <sstream> #include <boost/algorithm/string.hpp> #include "BEWinFunctions.h" #include "BEWinIFileDialog.h" using namespace std; const bool IsUnicodeFormat ( const UINT format_id ); bool IsWindowsVistaOrLater ( ); wstring ClipboardFormatNameForID ( const UINT format_id ); UINT ClipboardFormatIDForName ( const wstring format_name ); bool SafeOpenClipboard ( void ); bool IsFileMakerClipboardType ( const wstring atype ); UINT32 ClipboardOffset ( const wstring atype ); // functions & globals for the dialog callback static int CALLBACK SelectFolderCallback ( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ); LRESULT CALLBACK DialogCallback ( int nCode, WPARAM wParam, LPARAM lParam ); HHOOK g_window_hook; wstring g_button1_name; wstring g_button2_name; wstring g_button3_name; // globals for the progress dialog #ifndef PROGDLG_MARQUEEPROGRESS #define PROGDLG_MARQUEEPROGRESS 0x00000020 #endif #ifndef PROGDLG_NOCANCEL #define PROGDLG_NOCANCEL 0x00000040 #endif IProgressDialog * progress_dialog; DWORD progress_dialog_maximum; // undocumented/private(?) system clipboard formats UINT BE_CF_FileGroupDescriptorW; UINT BE_CF_FileNameW; UINT BE_CF_FileNameMapW; void InitialiseForPlatform ( void ) { BE_CF_FileGroupDescriptorW = RegisterClipboardFormat ( CFSTR_FILEDESCRIPTORW ); BE_CF_FileNameW = RegisterClipboardFormat ( CFSTR_FILENAMEW ); BE_CF_FileNameMapW = RegisterClipboardFormat ( CFSTR_FILEDESCRIPTORW ); } // dry... fmx::errcode is not large enough to hold all results from GetLastError() fmx::errcode GetLastErrorAsFMX ( void ) { return (fmx::errcode)GetLastError(); } bool IsWindowsVistaOrLater ( ) { OSVERSIONINFO os_version; ZeroMemory ( &os_version, sizeof(OSVERSIONINFO) ); os_version.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx ( &os_version ); BOOL isWindowsVistaOrLater = os_version.dwMajorVersion >= 6; return isWindowsVistaOrLater != 0; } // clipbaord functions const bool IsUnicodeFormat ( const UINT format_id ) { bool is_unicode = false; if ( format_id == CF_UNICODETEXT || format_id == BE_CF_FileGroupDescriptorW || format_id == BE_CF_FileNameW || format_id == BE_CF_FileNameMapW ) { is_unicode = true; } return is_unicode; } // default, system formats // http://msdn.microsoft.com/en-us/library/windows/desktop/ff729168(v=vs.85).aspx wstring ClipboardFormatNameForID ( const UINT format_id ) { wstring format_name; switch ( format_id ) { case CF_BITMAP: format_name = L"CF_BITMAP"; break; case CF_DIB: format_name = L"CF_DIB"; break; case CF_DIBV5: format_name = L"CF_DIBV5"; break; case CF_DIF: format_name = L"CF_DIF"; break; case CF_DSPBITMAP: format_name = L"CF_DSPBITMAP"; break; case CF_DSPENHMETAFILE: format_name = L"CF_DSPENHMETAFILE"; break; case CF_DSPMETAFILEPICT: format_name = L"CF_DSPMETAFILEPICT"; break; case CF_DSPTEXT: format_name = L"CF_DSPTEXT"; break; case CF_ENHMETAFILE: format_name = L"CF_ENHMETAFILE"; break; case CF_GDIOBJFIRST: format_name = L"CF_GDIOBJFIRST"; break; case CF_GDIOBJLAST: format_name = L"CF_GDIOBJLAST"; break; case CF_HDROP: format_name = L"CF_HDROP"; break; case CF_LOCALE: format_name = L"CF_LOCALE"; break; case CF_METAFILEPICT: format_name = L"CF_METAFILEPICT"; break; case CF_OEMTEXT: format_name = L"CF_OEMTEXT"; break; case CF_OWNERDISPLAY: format_name = L"CF_OWNERDISPLAY"; break; case CF_PALETTE: format_name = L"CF_PALETTE"; break; case CF_PENDATA: format_name = L"CF_PENDATA"; break; case CF_PRIVATEFIRST: format_name = L"CF_PRIVATEFIRST"; break; case CF_PRIVATELAST: format_name = L"CF_PRIVATELAST"; break; case CF_RIFF: format_name = L"CF_RIFF"; break; case CF_SYLK: format_name = L"CF_SYLK"; break; case CF_TEXT: format_name = L"CF_TEXT"; break; case CF_TIFF: format_name = L"CF_TIFF"; break; case CF_UNICODETEXT: format_name = L"CF_UNICODETEXT"; break; case CF_WAVE: format_name = L"CF_WAVE"; break; default: wchar_t format[PATH_MAX]; int name_length = GetClipboardFormatName ( format_id, format, PATH_MAX ); format_name = format; } return format_name; } UINT ClipboardFormatIDForName ( const wstring name ) { UINT format_id = 0; wstring format_name = boost::to_upper_copy ( name ); if ( format_name == L"CF_BITMAP" ) { format_id = CF_BITMAP; } else if ( format_name == L"CF_DIB" ) { format_id = CF_DIB; } else if ( format_name == L"CF_DIBV5" ) { format_id = CF_DIBV5; } else if ( format_name == L"CF_DIF" ) { format_id = CF_DIF; } else if ( format_name == L"CF_DSPBITMAP" ) { format_id = CF_DSPBITMAP; } else if ( format_name == L"CF_DSPENHMETAFILE" ) { format_id = CF_DSPENHMETAFILE; } else if ( format_name == L"CF_DSPMETAFILEPICT" ) { format_id = CF_DSPMETAFILEPICT; } else if ( format_name == L"CF_DSPTEXT" ) { format_id = CF_DSPTEXT; } else if ( format_name == L"CF_ENHMETAFILE" ) { format_id = CF_ENHMETAFILE; } else if ( format_name == L"CF_GDIOBJFIRST" ) { format_id = CF_GDIOBJFIRST; } else if ( format_name == L"CF_GDIOBJLAST" ) { format_id = CF_GDIOBJLAST; } else if ( format_name == L"CF_HDROP" ) { format_id = CF_HDROP; } else if ( format_name == L"CF_LOCALE" ) { format_id = CF_LOCALE; } else if ( format_name == L"CF_METAFILEPICT" ) { format_id = CF_METAFILEPICT; } else if ( format_name == L"CF_OEMTEXT" ) { format_id = CF_OEMTEXT; } else if ( format_name == L"CF_OWNERDISPLAY" ) { format_id = CF_OWNERDISPLAY; } else if ( format_name == L"CF_PALETTE" ) { format_id = CF_PALETTE; } else if ( format_name == L"CF_PENDATA" ) { format_id = CF_PENDATA; } else if ( format_name == L"CF_PRIVATEFIRST" ) { format_id = CF_PRIVATEFIRST; } else if ( format_name == L"CF_PRIVATELAST" ) { format_id = CF_PRIVATELAST; } else if ( format_name == L"CF_RIFF" ) { format_id = CF_RIFF; } else if ( format_name == L"CF_SYLK" ) { format_id = CF_SYLK; } else if ( format_name == L"CF_TEXT" ) { format_id = CF_TEXT; } else if ( format_name == L"CF_TIFF" ) { format_id = CF_TIFF; } else if ( format_name == L"CF_UNICODETEXT" ) { format_id = CF_UNICODETEXT; } else if ( format_name == L"CF_WAVE" ) { format_id = CF_WAVE; } else if ( format_name == CFSTR_FILEDESCRIPTORW ) { format_id = BE_CF_FileGroupDescriptorW; } else if ( format_name == CFSTR_FILENAMEW ) { format_id = BE_CF_FileNameW; } else if ( format_name == CFSTR_FILEDESCRIPTORW ) { format_id = BE_CF_FileNameMapW; } else { format_id = RegisterClipboardFormat ( name.c_str() ); } return format_id; } // transient access is denied errors (#5) can occur after setting the clipboard bool SafeOpenClipboard ( void ) { BOOL is_open = OpenClipboard ( NULL ); int i = 0; while ( GetLastError() && i < 1 ) { Sleep ( 10 ); ++i; is_open = OpenClipboard ( NULL ); } g_last_error = GetLastErrorAsFMX(); return is_open != 0; } WStringAutoPtr ClipboardFormats ( void ) { wstring format_list = L""; if ( SafeOpenClipboard() ) { UINT formats = CountClipboardFormats(); UINT next_format = 0; for ( UINT i = 0 ; i < formats ; i++ ) { next_format = EnumClipboardFormats ( next_format ); format_list += ClipboardFormatNameForID ( next_format ); format_list += L"\r"; // ( FILEMAKER_END_OF_LINE ); } if ( CloseClipboard() ) { g_last_error = GetLastErrorAsFMX(); } } return WStringAutoPtr ( new wstring ( format_list ) ); } // ClipboardFormats /* FileMaker clipboard types for Windows are of the form Mac-XMxx */ bool IsFileMakerClipboardType ( const wstring atype ) { return ( atype.find ( L"Mac-XM" ) == 0 ); } /* for FileMaker types the first 4 bytes on the clipboard is the size of the data on the clipboard */ UINT32 ClipboardOffset ( const wstring atype ) { if ( IsFileMakerClipboardType ( atype ) ) { return 4; // char not wchar_t } else { return 0; } } StringAutoPtr UTF8ClipboardData ( const WStringAutoPtr atype ) { char * clipboard_data = NULL; UINT format_wanted = ClipboardFormatIDForName ( *atype ); HGLOBAL clipboard_memory = GetClipboardData ( format_wanted ); unsigned char * clipboard_contents = (unsigned char *)GlobalLock ( clipboard_memory ); SIZE_T clipboard_size = GlobalSize ( clipboard_memory ); clipboard_data = new char [ clipboard_size + 1 ](); memcpy_s ( clipboard_data, clipboard_size, clipboard_contents, clipboard_size ); GlobalUnlock ( clipboard_memory ); if ( !clipboard_data ) { clipboard_data = new char [ 1 ](); } /* prefix the data to place on the clipboard with the size of the data */ UINT32 offset = ClipboardOffset ( *atype ); StringAutoPtr reply ( new string ( clipboard_data + offset ) ); delete[] clipboard_data; return reply; } // UTF8ClipboardData StringAutoPtr WideClipboardData ( const WStringAutoPtr atype ) { wchar_t * clipboard_data = NULL; UINT format_wanted = ClipboardFormatIDForName ( *atype ); HGLOBAL clipboard_memory = GetClipboardData ( format_wanted ); wchar_t * clipboard_contents = (wchar_t *)GlobalLock ( clipboard_memory ); SIZE_T clipboard_size = GlobalSize ( clipboard_memory ) / sizeof ( wchar_t ); clipboard_data = new wchar_t [ clipboard_size + 1 ](); wmemcpy_s ( clipboard_data, clipboard_size, clipboard_contents, clipboard_size ); GlobalUnlock ( clipboard_memory ); if ( !clipboard_data ) { clipboard_data = new wchar_t [ 1 ](); } string utf8 = utf16ToUTF8 ( clipboard_data ); delete[] clipboard_data; StringAutoPtr reply ( new string ( utf8 ) ); return reply; } // WideClipboardData StringAutoPtr ClipboardData ( WStringAutoPtr atype ) { StringAutoPtr reply ( new string ); if ( SafeOpenClipboard() ) { UINT format = ClipboardFormatIDForName ( *atype ); if ( IsClipboardFormatAvailable ( format ) ) { if ( IsUnicodeFormat ( format ) ) { reply = WideClipboardData ( atype ); } else { reply = UTF8ClipboardData ( atype ); } } if ( CloseClipboard() ) { g_last_error = GetLastErrorAsFMX(); } } return reply; } // ClipboardData HGLOBAL DataForClipboardAsUTF8 ( const StringAutoPtr data, const WStringAutoPtr atype ) { SIZE_T data_size = data->size(); /* prefix the data to place on the clipboard with the size of the data */ SIZE_T offset = ClipboardOffset ( *atype ); SIZE_T clipboard_size = data_size + offset; HGLOBAL clipboard_memory = GlobalAlloc ( GMEM_MOVEABLE, clipboard_size ); unsigned char * clipboard_contents = (unsigned char *)GlobalLock ( clipboard_memory ); if ( IsFileMakerClipboardType ( *atype ) == TRUE ) { memcpy_s ( clipboard_contents, offset, &data_size, offset ); } memcpy_s ( clipboard_contents + offset, clipboard_size, data->c_str(), clipboard_size ); GlobalUnlock ( clipboard_memory ); return clipboard_memory; } // DataForClipboardAsUTF8 void * DataForClipboardAsWide ( const StringAutoPtr data ) { wstring data_as_wide = utf8toutf16 ( *data ); SIZE_T clipboard_size = data_as_wide.size() + 1; SIZE_T memory_size = clipboard_size * sizeof ( wchar_t ); HGLOBAL clipboard_memory = GlobalAlloc ( GMEM_MOVEABLE, memory_size ); wchar_t * clipboard_contents = (wchar_t *)GlobalLock ( clipboard_memory ); wmemcpy_s ( clipboard_contents, clipboard_size, data_as_wide.c_str(), clipboard_size ); GlobalUnlock ( clipboard_memory ); return clipboard_memory; } // DataForClipboardAsWide bool SetClipboardData ( StringAutoPtr data, WStringAutoPtr atype ) { bool ok = FALSE; if ( OpenClipboard ( GetActiveWindow() ) ) { if ( EmptyClipboard() ) { UINT format = ClipboardFormatIDForName ( *atype ); HGLOBAL clipboard_memory; if ( IsUnicodeFormat ( format ) ) { clipboard_memory = DataForClipboardAsWide ( data ); } else { clipboard_memory = DataForClipboardAsUTF8 ( data, atype ); } if ( SetClipboardData ( format, clipboard_memory ) ) { ok = TRUE; } } else { g_last_error = GetLastErrorAsFMX(); } if ( CloseClipboard() ) { g_last_error = g_last_error ? g_last_error : GetLastErrorAsFMX(); } } return ok; } // Set_ClipboardData // file dialogs WStringAutoPtr SelectFile ( WStringAutoPtr prompt, WStringAutoPtr in_folder ) { BEWinCommonFileOpenDialogAutoPtr file_dialog; if ( IsWindowsVistaOrLater( ) ) { file_dialog.reset ( new BEWinIFileOpenDialog ( prompt, in_folder ) ); } else { file_dialog.reset ( new BEWinCommonFileOpenDialog ( prompt, in_folder ) ); } WStringAutoPtr selected_files ( file_dialog->Show ( ) ); return selected_files; } // SelectFile static int CALLBACK SelectFolderCallback ( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData ) { // http://msdn.microsoft.com/en-us/library/windows/desktop/bb773205(v=vs.85).aspx if ( uMsg == BFFM_INITIALIZED ) { if ( NULL != lpData ) { SendMessage ( hwnd, BFFM_SETSELECTION, TRUE, lpData ); } } return 0; // should always return 0 } WStringAutoPtr SelectFolder ( WStringAutoPtr prompt, WStringAutoPtr in_folder ) { BROWSEINFO browse_info = { 0 }; browse_info.hwndOwner = GetActiveWindow(); browse_info.ulFlags = BIF_RETURNONLYFSDIRS | BIF_USENEWUI; browse_info.lpszTitle = prompt->c_str(); if ( !in_folder->empty() ) { browse_info.lpfn = SelectFolderCallback; browse_info.lParam = (LPARAM)in_folder->c_str(); } LPITEMIDLIST item_list = SHBrowseForFolder ( &browse_info ); // if the user hasn't cancelled the dialog get the path to the folder wchar_t path[PATH_MAX] = L""; if ( item_list != 0 ) { SHGetPathFromIDList ( item_list, path ); } return WStringAutoPtr ( new wstring ( path ) ); } // SelectFolder WStringAutoPtr SaveFileDialog ( WStringAutoPtr prompt, WStringAutoPtr file_name, WStringAutoPtr in_folder ) { BEWinCommonFileSaveDialogAutoPtr file_dialog; if ( IsWindowsVistaOrLater( ) ) { file_dialog.reset ( new BEWinIFileSaveDialog ( prompt, file_name, in_folder ) ); } else { file_dialog.reset ( new BEWinCommonFileSaveDialog ( prompt, file_name, in_folder ) ); } WStringAutoPtr save_file_as ( file_dialog->Show ( ) ); return save_file_as; } // SaveFileDialog // (customized) alert dialogs int DisplayDialog ( WStringAutoPtr title, WStringAutoPtr message, WStringAutoPtr button1, WStringAutoPtr button2, WStringAutoPtr button3 ) { // set the names to be used for each button g_button1_name.swap ( *button1 ); g_button2_name.swap ( *button2 ); g_button3_name.swap ( *button3 ); // the type of dialog displayed varies depends on the nunmber of buttons required UINT type = MB_OK; if ( g_button2_name != L"" ) { type = MB_OKCANCEL; if ( g_button3_name != L"" ) { type = MB_YESNOCANCEL; } } // set the callback so that the custom button names are installed g_window_hook = SetWindowsHookEx ( WH_CBT, &DialogCallback, 0, GetCurrentThreadId() ); /* get the user's choice and translate that into a response that matches the equivalent choice on OS X */ int button_clicked = MessageBox ( GetForegroundWindow(), message->c_str(), title->c_str(), type ); unsigned long response = 0; switch ( button_clicked ) { case IDOK: case IDYES: response = kBE_OKButton; break; case IDCANCEL: response = kBE_CancelButton; break; case IDNO: response = kBE_AlternateButton; break; } return response; } // DisplayDialog // callback to override the button text on standard alert dialogs LRESULT CALLBACK DialogCallback ( int nCode, WPARAM wParam, LPARAM lParam ) { UINT result = 0; if ( nCode == HCBT_ACTIVATE ) { HWND dialog = (HWND)wParam; // set the button text for each button // the first button can be IDOK or IDYES if ( GetDlgItem ( dialog, IDOK ) != NULL ) { result = SetDlgItemText ( dialog, IDOK, g_button1_name.c_str() ); } else if ( GetDlgItem ( dialog, IDYES ) != NULL ) { result = SetDlgItemText ( dialog, IDYES, g_button1_name.c_str() ); } if ( GetDlgItem ( dialog, IDCANCEL ) != NULL ) { result = SetDlgItemText( dialog, IDCANCEL, g_button2_name.c_str() ); } if ( GetDlgItem ( dialog, IDNO ) != NULL ) { result = SetDlgItemText ( dialog, IDNO, g_button3_name.c_str() ); } UnhookWindowsHookEx ( g_window_hook ); } else { // there may be other installed hooks CallNextHookEx ( g_window_hook, nCode, wParam, lParam ); } return result; } // CBTProc #pragma mark - #pragma mark Progress Dialog #pragma mark - fmx::errcode DisplayProgressDialog ( const WStringAutoPtr title, const WStringAutoPtr description, const long maximum, const bool can_cancel ) { HRESULT result = S_OK; if ( progress_dialog ) { result = kFileOrObjectIsInUse; } else { progress_dialog_maximum = maximum; HWND parent_window = GetForegroundWindow(); result = CoCreateInstance ( CLSID_ProgressDialog, NULL, CLSCTX_INPROC_SERVER, IID_IProgressDialog, (void**)&progress_dialog ); if ( result == S_OK ) { result = progress_dialog->SetTitle ( title->c_str () ); } if ( result == S_OK ) { result = progress_dialog->SetLine ( 2, description->c_str (), false, NULL ); } DWORD flags = PROGDLG_NORMAL; if ( !can_cancel ) { flags |= PROGDLG_NOCANCEL; } if ( 0 == maximum ) { flags |= PROGDLG_MARQUEEPROGRESS; } if ( result == S_OK ) { result = progress_dialog->StartProgressDialog ( parent_window, NULL, flags, NULL ); } } return (fmx::errcode)result; } // DisplayProgressDialog fmx::errcode UpdateProgressDialog ( const unsigned long value, const WStringAutoPtr description ) { fmx::errcode error = kNoError; if ( progress_dialog ) { BOOL user_cancelled = progress_dialog->HasUserCancelled(); if ( (user_cancelled != 0) || (value > progress_dialog_maximum) ) { progress_dialog->StopProgressDialog(); progress_dialog->Release(); progress_dialog = NULL; error = user_cancelled ? kUserCancelledError : error; } else { HRESULT result; if ( !description->empty () ) { result = progress_dialog->SetLine ( 2, description->c_str (), false, NULL ); } if ( result == S_OK ) { result = progress_dialog->SetProgress ( value, progress_dialog_maximum ); error = result == S_FALSE ? kNoError : (fmx::errcode)result; } } } else { error = kWindowIsMissingError; } return error; } #pragma mark - #pragma mark User Preferences #pragma mark - bool SetPreference ( WStringAutoPtr key, WStringAutoPtr value, WStringAutoPtr domain ) { HKEY registry_key; LSTATUS status; status = RegCreateKeyEx ( HKEY_CURRENT_USER, domain->c_str(), 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &registry_key, NULL ); if ( status == ERROR_SUCCESS ) { status = RegSetValueEx ( registry_key, key->c_str(), 0, REG_SZ, (PBYTE)value->c_str(), (DWORD)(value->size() * sizeof(wchar_t)) + 1 ); RegCloseKey ( registry_key ); } g_last_error = (fmx::errcode)status; return ( status == ERROR_SUCCESS ); } WStringAutoPtr GetPreference ( WStringAutoPtr key, WStringAutoPtr domain ) { HKEY registry_key; DWORD buffer_size = 1024; wchar_t * preference_data = new wchar_t[buffer_size](); LSTATUS status; status = RegOpenKeyEx ( HKEY_CURRENT_USER, domain->c_str(), NULL, KEY_READ, &registry_key ); if ( status == ERROR_SUCCESS ) { status = RegQueryValueEx ( registry_key, key->c_str(), NULL, NULL, (LPBYTE)preference_data, &buffer_size ); // if preference_data isn't big enough resize it and try again if ( status == ERROR_MORE_DATA ) { delete [] preference_data; preference_data = new wchar_t[buffer_size + 1](); status = RegQueryValueEx ( registry_key, key->c_str(), NULL, NULL, (LPBYTE)preference_data, &buffer_size ); } RegCloseKey ( registry_key ); } WStringAutoPtr value = WStringAutoPtr ( new wstring ( preference_data ) ); delete [] preference_data; g_last_error = (fmx::errcode)status; return value; } #pragma mark - #pragma mark Other #pragma mark - bool OpenURL ( WStringAutoPtr url ) { HINSTANCE result = ShellExecute ( NULL, (LPCWSTR)L"open", url->c_str(), NULL, NULL, SW_SHOWNORMAL ); // see http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx return ( result > (HINSTANCE)32 ); } bool OpenFile ( WStringAutoPtr path ) { return OpenURL ( path ); } #pragma mark - #pragma mark Utilities #pragma mark - wstring utf8toutf16 ( const string& instr ) { // Assumes std::string is encoded using the UTF-8 codepage int bufferlen = MultiByteToWideChar ( CP_UTF8, 0, instr.c_str(), (int)instr.size(), NULL, 0 ); // Allocate new LPWSTR - must deallocate it later LPWSTR widestr = new WCHAR[bufferlen + 1]; MultiByteToWideChar ( CP_UTF8, 0, instr.c_str(), (int)instr.size(), widestr, bufferlen ); // Ensure wide string is null terminated widestr[bufferlen] = 0; // Do something with widestr wstring out ( widestr ); delete[] widestr; return out; } string utf16ToUTF8 ( const wstring& s ) { const int size = ::WideCharToMultiByte( CP_UTF8, 0, s.c_str(), -1, NULL, 0, 0, NULL ); vector<char> buf( size ); ::WideCharToMultiByte( CP_UTF8, 0, s.c_str(), -1, &buf[0], size, 0, NULL ); return string( &buf[0] ); }
[ "mark@banks.id.au" ]
mark@banks.id.au
7fed1488938dda807a14abb83f55a70a1f6c5039
99aface0f184525416eacb8fa59afac1417b6c38
/LevelSet/src/lapack/ilaenv.cpp
e2189ea64e393f7a9830bd8d743cfc98688661c7
[]
no_license
cjbryant135/stokesLS
bef4c979c33721475498e176f177a2c4175e3cf5
ec6fbd2b1dd3210a2bb89dd58f0c3255d298dbb9
refs/heads/master
2022-12-15T12:47:13.883451
2020-09-21T13:55:50
2020-09-21T13:55:50
294,719,479
0
0
null
null
null
null
UTF-8
C++
false
false
19,060
cpp
/* * C++ implementation of lapack routine ilaenv * * $Id: ilaenv.cpp,v 1.6 1993/07/08 22:35:09 alv Exp $ * ************************************************************* * * Rogue Wave Software, Inc. * P.O. Box 2328 * Corvallis, OR 97339 * * Copyright (C) 1993. * This software is subject to copyright protection under the * laws of the United States and other countries. * ************************************************************* * * Translated from the Fortran using Cobalt Blue's FOR_C++, * and then massaged slightly to Rogue Wave format. * * Translated output further modified to remove Fortran string * processing. * * Translated by FOR_C++, v1.1 (P), on 02/18/93 at 07:27:37 * FOR_C++ Options SET: alloc do=rt no=p pf=xlapack s=dv str=l - prototypes * * $Log: ilaenv.cpp,v $ * Revision 1.6 1993/07/08 22:35:09 alv * recognizes RW_USE_UNBLOCKED * * Revision 1.5 1993/04/06 20:42:56 alv * added const to parameters; added include lapkdefs * * Revision 1.4 1993/03/19 18:47:27 alv * commented out unused vars to shut up SUN warnings * * Revision 1.3 1993/03/19 17:18:24 alv * added RWLAPKDECL linkage specifier * * Revision 1.2 1993/03/05 23:18:01 alv * changed ref parms to const ref * * Revision 1.1 1993/03/03 16:09:38 alv * Initial revision * */ #include <ctype.h> #include <string.h> #if 0 #include "rw/lapkdefs.h" #include "rw/bla.h" #include "rw/lapack.h" #include "rw/fortran.h" /* Fortran run time library */ #else #include "level/lapack.h" #endif RWLAPKDECL long /*FUNCTION*/ ilaenv(const long &ispec, char *name, char * /*opts*/, const long &n1, const long &n2, const long &/*n3*/, const long &n4) { char c2[3], c3[4], c4[3], subnam[7]; int cname, sname; char c1; long /*i, i_, ic,*/ ilaenv_v, /*iz,*/ nb, nbmin, nx; // -- LAPACK auxiliary routine (preliminary version) -- // Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., // Courant Institute, Argonne National Lab, and Rice University // February 20, 1992 // .. Scalar Arguments .. // .. // Purpose // ======= // ILAENV is called from the LAPACK routines to choose problem-dependent // parameters for the local environment. See ISPEC for a description of // the parameters. // This version provides a set of parameters which should give good, // but not optimal, performance on many of the currently available // computers. Users are encouraged to modify this subroutine to set // the tuning parameters for their particular machine using the option // and problem size information in the arguments. // This routine will not function correctly if it is converted to all // lower case. Converting it to all upper case is allowed. // Arguments // ========= // ISPEC (input) INTEGER // Specifies the parameter to be returned as the value of // ILAENV. // = 1: the optimal blocksize; if this value is 1, an unblocked // algorithm will give the best performance. // = 2: the minimum block size for which the block routine // should be used; if the usable block size is less than // this value, an unblocked routine should be used. // = 3: the crossover point (in a block routine, for N less // than this value, an unblocked routine should be used) // = 4: the number of shifts, used in the nonsymmetric // eigenvalue routines // = 5: the minimum column dimension for blocking to be used; // rectangular blocks must have dimension at least k by m, // where k is given by ILAENV(2,...) and m by ILAENV(5,...) // = 6: the crossover point for the SVD (when reducing an m by n // matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds // this value, a QR factorization is used first to reduce // the matrix to a triangular form.) // = 7: the number of processors // = 8: the crossover point for the multishift QR and QZ methods // for nonsymmetric eigenvalue problems. // NAME (input) CHARACTER*(*) // The name of the calling subroutine, in either upper case or // lower case. // OPTS (input) CHARACTER*(*) // The character options to the subroutine NAME, concatenated // into a single character string. For example, UPLO = 'U', // TRANS = 'T', and DIAG = 'N' for a triangular routine would // be specified as OPTS = 'UTN'. // N1 (input) INTEGER // N2 (input) INTEGER // N3 (input) INTEGER // N4 (input) INTEGER // Problem dimensions for the subroutine NAME; these may not all // be required. // (ILAENV) (output) INTEGER // >= 0: the value of the parameter specified by ISPEC // < 0: if ILAENV = -k, the k-th argument had an illegal value. // Further Details // =============== // The following conventions have been used when calling ILAENV from the // LAPACK routines: // 1) OPTS is a concatenation of all of the character options to // subroutine NAME, in the same order that they appear in the // argument list for NAME, even if they are not used in determining // the value of the parameter specified by ISPEC. // 2) The problem dimensions N1, N2, N3, N4 are specified in the order // that they appear in the argument list for NAME. N1 is used // first, N2 second, and so on, and unused problem dimensions are // passed a value of -1. // 3) The parameter value returned by ILAENV is checked for validity in // the calling subroutine. For example, ILAENV is used to retrieve // the optimal blocksize for STRTRI as follows: // NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) // IF( NB.LE.1 ) NB = MAX( 1, N ) // ===================================================================== // .. Local Scalars .. // .. // .. Intrinsic Functions .. // .. // .. Executable Statements .. #ifdef RW_USE_UNBLOCKED if (ispec==1) return 1; // optimal block size always one #endif switch( ispec ) { case 1: goto L_100; case 2: goto L_100; case 3: goto L_100; case 4: goto L_400; case 5: goto L_500; case 6: goto L_600; case 7: goto L_700; case 8: goto L_800; } // Invalid value for ISPEC ilaenv_v = -1; return( ilaenv_v ); L_100: ; // Convert NAME to upper case if the first character is lower case. // Store upper case name in subnam. ilaenv_v = 1; subnam[0] = toupper(name[0]); subnam[1] = toupper(name[1]); subnam[2] = toupper(name[2]); subnam[3] = toupper(name[3]); subnam[4] = toupper(name[4]); subnam[5] = toupper(name[5]); subnam[6] = 0; c1 = subnam[0]; sname = c1 == 'S' || c1 == 'D'; cname = c1 == 'C' || c1 == 'Z'; if( !(cname || sname) ) return( ilaenv_v ); c2[0] = subnam[1]; // Fortran: c2 = subnam(2:3) c2[1] = subnam[2]; c2[2] = 0; c3[0] = subnam[3]; // Fortran: c3 = subnam(4:6) c3[1] = subnam[4]; c3[2] = subnam[5]; c3[3] = 0; c4[0] = c3[1]; // Fortran: c4 = c3(2:3) c4[1] = c3[2]; c4[2] = 0; switch( ispec ) { case 1: goto L_110; case 2: goto L_200; case 3: goto L_300; } L_110: ; // ISPEC = 1: block size // In these examples, separate code is provided for setting NB for // real and DComplex. We assume that NB will take the same value in // single or double precision. nb = 1; if( strcmp(c2,"GE") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { if( sname ) { nb = 64; } else { nb = 64; } } else if( ((strcmp(c3,"QRF") == 0 || strcmp(c3,"RQF") == 0) || strcmp(c3,"LQF") == 0) || strcmp(c3,"QLF") == 0 ) { if( sname ) { nb = 32; } else { nb = 32; } } else if( strcmp(c3,"HRD") == 0 ) { if( sname ) { nb = 32; } else { nb = 32; } } else if( strcmp(c3,"BRD") == 0 ) { if( sname ) { nb = 32; } else { nb = 32; } } else if( strcmp(c3,"TRI") == 0 ) { if( sname ) { nb = 64; } else { nb = 64; } } } else if( strcmp(c2,"PO") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { if( sname ) { nb = 64; } else { nb = 64; } } } else if( strcmp(c2,"SY") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { if( sname ) { nb = 64; } else { nb = 64; } } else if( sname && strcmp(c3,"TRD") == 0 ) { nb = 1; } else if( sname && strcmp(c3,"GST") == 0 ) { nb = 64; } } else if( cname && strcmp(c2,"HE") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { nb = 64; } else if( strcmp(c3,"TRD") == 0 ) { nb = 1; } else if( strcmp(c3,"GST") == 0 ) { nb = 64; } } else if( sname && strcmp(c2,"OR") == 0 ) { if( c3[0] == 'G' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nb = 32; } } else if( c3[0] == 'M' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nb = 32; } } } else if( cname && strcmp(c2,"UN") == 0 ) { if( c3[0] == 'G' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nb = 32; } } else if( c3[0] == 'M' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nb = 32; } } } else if( strcmp(c2,"GB") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { if( sname ) { if( n4 <= 64 ) { nb = 1; } else { nb = 32; } } else { if( n4 <= 64 ) { nb = 1; } else { nb = 32; } } } } else if( strcmp(c2,"PB") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { if( sname ) { if( n2 <= 64 ) { nb = 1; } else { nb = 32; } } else { if( n2 <= 64 ) { nb = 1; } else { nb = 32; } } } } else if( strcmp(c2,"TR") == 0 ) { if( strcmp(c3,"TRI") == 0 ) { if( sname ) { nb = 64; } else { nb = 64; } } } else if( strcmp(c2,"LA") == 0 ) { if( strcmp(c3,"UUM") == 0 ) { if( sname ) { nb = 64; } else { nb = 64; } } } else if( sname && strcmp(c2,"ST") == 0 ) { if( strcmp(c3,"EBZ") == 0 ) { nb = 1; } } ilaenv_v = nb; return( ilaenv_v ); L_200: ; // ISPEC = 2: minimum block size nbmin = 2; if( strcmp(c2,"GE") == 0 ) { if( ((strcmp(c3,"QRF") == 0 || strcmp(c3,"RQF") == 0) || strcmp(c3 ,"LQF") == 0) || strcmp(c3,"QLF") == 0 ) { if( sname ) { nbmin = 2; } else { nbmin = 2; } } else if( strcmp(c3,"HRD") == 0 ) { if( sname ) { nbmin = 2; } else { nbmin = 2; } } else if( strcmp(c3,"BRD") == 0 ) { if( sname ) { nbmin = 2; } else { nbmin = 2; } } else if( strcmp(c3,"TRI") == 0 ) { if( sname ) { nbmin = 2; } else { nbmin = 2; } } } else if( strcmp(c2,"SY") == 0 ) { if( strcmp(c3,"TRF") == 0 ) { if( sname ) { nbmin = 2; } else { nbmin = 2; } } else if( sname && strcmp(c3,"TRD") == 0 ) { nbmin = 2; } } else if( cname && strcmp(c2,"HE") == 0 ) { if( strcmp(c3,"TRD") == 0 ) { nbmin = 2; } } else if( sname && strcmp(c2,"OR") == 0 ) { if( c3[0] == 'G' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nbmin = 2; } } else if( c3[0] == 'M' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nbmin = 2; } } } else if( cname && strcmp(c2,"UN") == 0 ) { if( c3[0] == 'G' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nbmin = 2; } } else if( c3[0] == 'M' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nbmin = 2; } } } ilaenv_v = nbmin; return( ilaenv_v ); L_300: ; // ISPEC = 3: crossover point nx = 0; if( strcmp(c2,"GE") == 0 ) { if( ((strcmp(c3,"QRF") == 0 || strcmp(c3,"RQF") == 0) || strcmp(c3 ,"LQF") == 0) || strcmp(c3,"QLF") == 0 ) { if( sname ) { nx = 128; } else { nx = 128; } } else if( strcmp(c3,"HRD") == 0 ) { if( sname ) { nx = 128; } else { nx = 128; } } else if( strcmp(c3,"BRD") == 0 ) { if( sname ) { nx = 128; } else { nx = 128; } } } else if( strcmp(c2,"SY") == 0 ) { if( sname && strcmp(c3,"TRD") == 0 ) { nx = 1; } } else if( cname && strcmp(c2,"HE") == 0 ) { if( strcmp(c3,"TRD") == 0 ) { nx = 1; } } else if( sname && strcmp(c2,"OR") == 0 ) { if( c3[0] == 'G' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nx = 128; } } } else if( cname && strcmp(c2,"UN") == 0 ) { if( c3[0] == 'G' ) { if( (((((strcmp(c4,"QR") == 0 || strcmp(c4,"RQ") == 0) || strcmp(c4,"LQ") == 0) || strcmp(c4,"QL") == 0) || strcmp(c4 ,"HR") == 0) || strcmp(c4,"TR") == 0) || strcmp(c4,"BR") == 0 ) { nx = 128; } } } ilaenv_v = nx; return( ilaenv_v ); L_400: ; // ISPEC = 4: number of shifts (used by xHSEQR) ilaenv_v = 6; return( ilaenv_v ); L_500: ; // ISPEC = 5: minimum column dimension (not used) ilaenv_v = 2; return( ilaenv_v ); L_600: ; // ISPEC = 6: crossover point for SVD (used by xGELSS and xGESVD) ilaenv_v = (long)( (float)( min( n1, n2 ) )*1.6e0 ); return( ilaenv_v ); L_700: ; // ISPEC = 7: number of processors (not used) ilaenv_v = 1; return( ilaenv_v ); L_800: ; // ISPEC = 8: crossover point for multishift (used by xHSEQR) ilaenv_v = 50; return( ilaenv_v ); // End of ILAENV } // end of function
[ "bryant@u.northwestern.edu" ]
bryant@u.northwestern.edu
347342056ca9ec6cb2403612fb8ce4c0c024af6c
438da38a75bc8b8c92c75280ade8e9a98fdf8d4a
/Labs/Code_Revision/Code_Revision/Controller.cpp
42e488eaebdb9b667d5e04cc3c98cf869ae43a08
[]
no_license
adonisbodea02/OOP
6c8d1ce72d390322f9339b719a27ac6482c86d8e
96c9ae4e07b1354fecc8d09be9b90676d32bbf79
refs/heads/master
2022-11-18T10:36:27.515906
2020-07-17T17:54:53
2020-07-17T17:54:53
280,484,886
0
0
null
null
null
null
UTF-8
C++
false
false
290
cpp
#include "Controller.h" void Controller::add_source_ctrl(std::string name, std::string creator) { this->repo.add_source(name, creator); notify(); } void Controller::update_ctrl(std::string name) { this->repo.update(name); notify(); } void Controller::save() { this->repo.write(); }
[ "31371688+adonisbodea02@users.noreply.github.com" ]
31371688+adonisbodea02@users.noreply.github.com
3c30de7898712ebd4a4e7bd263929acb3703ad97
3d15dbc612d635bc716b649449f309a10ce23cee
/ideal/base/Thread.cc
721caca0640c6bf47e02349eca2f0a4b8ad34337
[]
no_license
xiaozia/IdealServer
ca0485bcbe1cf9fa81577a9255e1a8679d4bf919
0978bdaa43484bf2af1b7bef6e21bf982ebe384c
refs/heads/master
2021-06-10T20:14:31.141925
2020-03-18T11:40:19
2020-03-18T12:17:01
254,346,975
1
0
null
2020-04-09T11:00:11
2020-04-09T11:00:11
null
UTF-8
C++
false
false
3,011
cc
/****************************************************** * Copyright (C)2019 All rights reserved. * * Author : owb * Email : 2478644416@qq.com * File Name : Thread.cc * Last Modified : 2019-11-23 14:13 * Describe : * *******************************************************/ #include "Thread.h" #include "CurrentThread.h" #include "Exception.h" #include <memory> #include <assert.h> #include <sys/prctl.h> namespace ideal { class ThreadData { public: using ThreadFunc = Thread::ThreadFunc; ThreadData(ThreadFunc func, const std::string& name, pid_t* tid, CountDownLatch* latch) : _func(std::move(func)), _name(name), _tid(tid), _latch(latch) { } void runInThread() { *_tid = ideal::CurrentThread::tid(); _tid = nullptr; _latch->countDown(); _latch = nullptr; ideal::CurrentThread::t_threadName = _name.empty()? "Thread" : _name.c_str(); ::prctl(PR_SET_NAME, ideal::CurrentThread::t_threadName); try { _func(); ideal::CurrentThread::t_threadName = "finished"; } catch(const Exception& ex) { ideal::CurrentThread::t_threadName = "crashed"; fprintf(stderr, "exception caught in Thread %s\n", _name.c_str()); fprintf(stderr, "reason: %s\n", ex.what()); fprintf(stderr, "stack trace: %s\n", ex.stackTrace()); abort(); } catch(const std::exception& ex) { ideal::CurrentThread::t_threadName = "crashed"; fprintf(stderr, "exception caught in Thread %s\n", _name.c_str()); fprintf(stderr, "reason: %s\n", ex.what()); abort(); } catch(...) { ideal::CurrentThread::t_threadName = "crashed"; fprintf(stderr, "unknown exception caught in Thread %s\n", _name.c_str()); throw; } } public: ThreadFunc _func; std::string _name; pid_t* _tid; CountDownLatch* _latch; }; void startThread(std::shared_ptr<ThreadData> data) { data->runInThread(); } // 不可拷贝的 std::atomic<int> Thread::_numCreated(0); Thread::Thread(ThreadFunc func, const std::string& name) : _started(false), _joined(false), _tid(0), _func(std::move(func)), _name(name), _latch(1) { setDefaultName(); } Thread::~Thread() { if(_started && !_joined) { _thread.detach(); } } void Thread::setDefaultName() { int num = ++_numCreated; if(_name.empty()) { char buf[32] = {0}; snprintf(buf, sizeof(buf), "Thread%d", num); _name = buf; } } void Thread::start() { assert(!_started); _started = true; std::shared_ptr<ThreadData> data(std::make_shared<ThreadData>(_func, _name, &_tid, &_latch)); std::thread t(startThread, data); _thread = std::move(t); _latch.wait(); } void Thread::join() { assert(_started); assert(!_joined); _joined = true; _thread.join(); } }
[ "2478644416@qq.com" ]
2478644416@qq.com
5065125f23fa38e88eb8257ba38507ab80ec8995
0a7981d2508af6c160f40cf6cc5d9a96920a4020
/array/find_sub_array_sum_to_zero.cpp
421a75619e8cb3a45d9f11f1bbce53cc1ed90173
[]
no_license
applewjg/cpp
ff65ba82807935176d8c64932e0e5367b1947de0
15021fb84ce2aaa5b84cc3cf91bd0c09ecdff0e7
refs/heads/master
2016-08-06T21:27:04.363837
2015-01-11T15:48:01
2015-01-11T15:48:01
29,096,416
1
0
null
null
null
null
UTF-8
C++
false
false
779
cpp
#include <iostream> #include <hash_map> using namespace std; using namespace __gnu_cxx; /** * go over array, sum up for all elements upto the current one. put the result in a hashmap, * if any value appear more than once, there's a subarray sums to 0 */ void find_sub_array_sum_to_zero(int a[], int n) { int *s = new int[n]; s[0] = a[0]; hash_map<int, int> M; M[s[0]] = 0; for (int i=1; i<n; i++) { s[i] = s[i-1]+a[i]; if (M.find(s[i]) != M.end()) { cout << "sub array found from " << M[s[i]]+1 << " to " << i << endl; } else { M[s[i]] = i; } } delete [] s; } int main() { int a[] = {-5,1,-4,1,2,1}; find_sub_array_sum_to_zero(a, sizeof(a)/sizeof(a[0])); return 1; }
[ "wangjingui1988@163.com" ]
wangjingui1988@163.com
7d8771ec24f5a9215cb24fba60f5f81f2ee92514
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/c++/godot/2015/12/container.cpp
2ff51d22c4cf45cf34845598ddba68bf72b52bc1
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
C++
false
false
5,180
cpp
/*************************************************************************/ /* container.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2015 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "container.h" #include "scene/scene_string_names.h" #include "message_queue.h" void Container::_child_minsize_changed() { Size2 ms = get_combined_minimum_size(); if (ms.width > get_size().width || ms.height > get_size().height) minimum_size_changed(); queue_sort(); } void Container::add_child_notify(Node *p_child) { Control *control = p_child->cast_to<Control>(); if (!control) return; control->connect("size_flags_changed",this,"queue_sort"); control->connect("minimum_size_changed",this,"_child_minsize_changed"); control->connect("visibility_changed",this,"_child_minsize_changed"); queue_sort(); } void Container::move_child_notify(Node *p_child) { if (!p_child->cast_to<Control>()) return; queue_sort(); } void Container::remove_child_notify(Node *p_child) { Control *control = p_child->cast_to<Control>(); if (!control) return; control->disconnect("size_flags_changed",this,"queue_sort"); control->disconnect("minimum_size_changed",this,"_child_minsize_changed"); control->disconnect("visibility_changed",this,"_child_minsize_changed"); queue_sort(); } void Container::_sort_children() { if (!is_inside_tree()) return; notification(NOTIFICATION_SORT_CHILDREN); emit_signal(SceneStringNames::get_singleton()->sort_children); pending_sort=false; } void Container::fit_child_in_rect(Control *p_child,const Rect2& p_rect) { ERR_FAIL_COND(p_child->get_parent()!=this); Size2 minsize = p_child->get_combined_minimum_size(); Rect2 r=p_rect; if (!(p_child->get_h_size_flags()&SIZE_FILL)) { r.size.x=minsize.x; r.pos.x += Math::floor((p_rect.size.x - minsize.x)/2); } if (!(p_child->get_v_size_flags()&SIZE_FILL)) { r.size.y=minsize.y; r.pos.y += Math::floor((p_rect.size.y - minsize.y)/2); } for(int i=0;i<4;i++) p_child->set_anchor(Margin(i),ANCHOR_BEGIN); p_child->set_pos(r.pos); p_child->set_size(r.size); p_child->set_rotation(0); p_child->set_scale(Vector2(1,1)); } void Container::queue_sort() { if (!is_inside_tree()) return; if (pending_sort) return; MessageQueue::get_singleton()->push_call(this,"_sort_children"); pending_sort=true; } void Container::_notification(int p_what) { switch(p_what) { case NOTIFICATION_ENTER_TREE: { pending_sort=false; queue_sort(); } break; case NOTIFICATION_RESIZED: { queue_sort(); } break; case NOTIFICATION_THEME_CHANGED: { queue_sort(); } break; case NOTIFICATION_VISIBILITY_CHANGED: { if (is_visible()) { queue_sort(); } } break; } } void Container::_bind_methods() { ObjectTypeDB::bind_method(_MD("_sort_children"),&Container::_sort_children); ObjectTypeDB::bind_method(_MD("_child_minsize_changed"),&Container::_child_minsize_changed); ObjectTypeDB::bind_method(_MD("queue_sort"),&Container::queue_sort); ObjectTypeDB::bind_method(_MD("fit_child_in_rect","child:Control","rect"),&Container::fit_child_in_rect); BIND_CONSTANT( NOTIFICATION_SORT_CHILDREN ); ADD_SIGNAL(MethodInfo("sort_children")); } Container::Container() { pending_sort=false; }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
b0891a13d6a8adbdf022170db027f8c8e567eb17
73cfd700522885a3fec41127e1f87e1b78acd4d3
/_Include/boost/container/static_vector.hpp
6bc1276b90a0fd230691f69b6aeafed9b7b2eebb
[]
no_license
pu2oqa/muServerDeps
88e8e92fa2053960671f9f57f4c85e062c188319
92fcbe082556e11587887ab9d2abc93ec40c41e4
refs/heads/master
2023-03-15T12:37:13.995934
2019-02-04T10:07:14
2019-02-04T10:07:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
41,525
hpp
//////////////////////////////////////////////////////////////////////////////// // static_vector.hpp // Boost.Container static_vector // // Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland. // Copyright (c) 2011-2013 Andrew Hundt. // Copyright (c) 2013-2014 Ion Gaztanaga // // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONTAINER_STATIC_VECTOR_HPP #define BOOST_CONTAINER_STATIC_VECTOR_HPP #ifndef BOOST_CONFIG_HPP # include <boost/config.hpp> #endif #if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif #include <boost/container/detail/config_begin.hpp> #include <boost/container/detail/workaround.hpp> #include <boost/container/detail/type_traits.hpp> #include <boost/container/vector.hpp> #include <cstddef> #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #include <initializer_list> #endif namespace boost { namespace container { #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED namespace container_detail { template<class T, std::size_t N> class static_storage_allocator { public: typedef T value_type; static_storage_allocator() BOOST_NOEXCEPT_OR_NOTHROW {} static_storage_allocator(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} static_storage_allocator & operator=(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW { return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(&storage))); } T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW { return static_cast<T*>(static_cast<void*>(&storage)); } static const std::size_t internal_capacity = N; typedef boost::container::container_detail::version_type<static_storage_allocator, 0> version; friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return false; } friend bool operator!=(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return true; } private: typename aligned_storage<sizeof(T)*N, alignment_of<T>::value>::type storage; }; } //namespace container_detail { #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED //! //!@brief A variable-size array container with fixed capacity. //! //!static_vector is a sequence container like boost::container::vector with contiguous storage that can //!change in size, along with the static allocation, low overhead, and fixed capacity of boost::array. //! //!A static_vector is a sequence that supports random access to elements, constant time insertion and //!removal of elements at the end, and linear time insertion and removal of elements at the beginning or //!in the middle. The number of elements in a static_vector may vary dynamically up to a fixed capacity //!because elements are stored within the object itself similarly to an array. However, objects are //!initialized as they are inserted into static_vector unlike C arrays or std::array which must construct //!all elements on instantiation. The behavior of static_vector enables the use of statically allocated //!elements in cases with complex object lifetime requirements that would otherwise not be trivially //!possible. //! //!@par Error Handling //! Insertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or //! calling throw_bad_alloc() if not enabled. //! //! std::out_of_range is thrown if out of bound access is performed in <code>at()</code> if exceptions are //! enabled, throw_out_of_range() if not enabled. //! //!@tparam Value The type of element that will be stored. //!@tparam Capacity The maximum number of elements static_vector can store, fixed at compile time. template <typename Value, std::size_t Capacity> class static_vector : public vector<Value, container_detail::static_storage_allocator<Value, Capacity> > { #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED typedef vector<Value, container_detail::static_storage_allocator<Value, Capacity> > base_t; BOOST_COPYABLE_AND_MOVABLE(static_vector) template<class U, std::size_t OtherCapacity> friend class static_vector; #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED public: //! @brief The type of elements stored in the container. typedef typename base_t::value_type value_type; //! @brief The unsigned integral type used by the container. typedef typename base_t::size_type size_type; //! @brief The pointers difference type. typedef typename base_t::difference_type difference_type; //! @brief The pointer type. typedef typename base_t::pointer pointer; //! @brief The const pointer type. typedef typename base_t::const_pointer const_pointer; //! @brief The value reference type. typedef typename base_t::reference reference; //! @brief The value const reference type. typedef typename base_t::const_reference const_reference; //! @brief The iterator type. typedef typename base_t::iterator iterator; //! @brief The const iterator type. typedef typename base_t::const_iterator const_iterator; //! @brief The reverse iterator type. typedef typename base_t::reverse_iterator reverse_iterator; //! @brief The const reverse iterator. typedef typename base_t::const_reverse_iterator const_reverse_iterator; //! @brief Constructs an empty static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). static_vector() BOOST_NOEXCEPT_OR_NOTHROW : base_t() {} //! @pre <tt>count <= capacity()</tt> //! //! @brief Constructs a static_vector containing count value initialized values. //! //! @param count The number of values which will be contained in the container. //! //! @par Throws //! If Value's value initialization throws. //! //! @par Complexity //! Linear O(N). explicit static_vector(size_type count) : base_t(count) {} //! @pre <tt>count <= capacity()</tt> //! //! @brief Constructs a static_vector containing count default initialized values. //! //! @param count The number of values which will be contained in the container. //! //! @par Throws //! If Value's default initialization throws. //! //! @par Complexity //! Linear O(N). //! //! @par Note //! Non-standard extension static_vector(size_type count, default_init_t) : base_t(count, default_init_t()) {} //! @pre <tt>count <= capacity()</tt> //! //! @brief Constructs a static_vector containing count copies of value. //! //! @param count The number of copies of a values that will be contained in the container. //! @param value The value which will be used to copy construct values. //! //! @par Throws //! If Value's copy constructor throws. //! //! @par Complexity //! Linear O(N). static_vector(size_type count, value_type const& value) : base_t(count, value) {} //! @pre //! @li <tt>distance(first, last) <= capacity()</tt> //! @li Iterator must meet the \c ForwardTraversalIterator concept. //! //! @brief Constructs a static_vector containing copy of a range <tt>[first, last)</tt>. //! //! @param first The iterator to the first element in range. //! @param last The iterator to the one after the last element in range. //! //! @par Throws //! If Value's constructor taking a dereferenced Iterator throws. //! //! @par Complexity //! Linear O(N). template <typename Iterator> static_vector(Iterator first, Iterator last) : base_t(first, last) {} #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @pre //! @li <tt>distance(il.begin(), il.end()) <= capacity()</tt> //! //! @brief Constructs a static_vector containing copy of a range <tt>[il.begin(), il.end())</tt>. //! //! @param il std::initializer_list with values to initialize vector. //! //! @par Throws //! If Value's constructor taking a dereferenced std::initializer_list throws. //! //! @par Complexity //! Linear O(N). static_vector(std::initializer_list<value_type> il) : base_t(il) {} #endif //! @brief Constructs a copy of other static_vector. //! //! @param other The static_vector which content will be copied to this one. //! //! @par Throws //! If Value's copy constructor throws. //! //! @par Complexity //! Linear O(N). static_vector(static_vector const& other) : base_t(other) {} //! @pre <tt>other.size() <= capacity()</tt>. //! //! @brief Constructs a copy of other static_vector. //! //! @param other The static_vector which content will be copied to this one. //! //! @par Throws //! If Value's copy constructor throws. //! //! @par Complexity //! Linear O(N). template <std::size_t C> static_vector(static_vector<value_type, C> const& other) : base_t(other) {} //! @brief Move constructor. Moves Values stored in the other static_vector to this one. //! //! @param other The static_vector which content will be moved to this one. //! //! @par Throws //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor throws. //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor throws. //! //! @par Complexity //! Linear O(N). static_vector(BOOST_RV_REF(static_vector) other) : base_t(BOOST_MOVE_BASE(base_t, other)) {} //! @pre <tt>other.size() <= capacity()</tt> //! //! @brief Move constructor. Moves Values stored in the other static_vector to this one. //! //! @param other The static_vector which content will be moved to this one. //! //! @par Throws //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor throws. //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor throws. //! //! @par Complexity //! Linear O(N). template <std::size_t C> static_vector(BOOST_RV_REF_BEG static_vector<value_type, C> BOOST_RV_REF_END other) : base_t(BOOST_MOVE_BASE(typename static_vector<value_type BOOST_MOVE_I C>::base_t, other)) {} //! @brief Copy assigns Values stored in the other static_vector to this one. //! //! @param other The static_vector which content will be copied to this one. //! //! @par Throws //! If Value's copy constructor or copy assignment throws. //! //! @par Complexity //! Linear O(N). static_vector & operator=(BOOST_COPY_ASSIGN_REF(static_vector) other) { return static_cast<static_vector&>(base_t::operator=(static_cast<base_t const&>(other))); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @brief Copy assigns Values stored in std::initializer_list to *this. //! //! @param il The std::initializer_list which content will be copied to this one. //! //! @par Throws //! If Value's copy constructor or copy assignment throws. //! //! @par Complexity //! Linear O(N). static_vector & operator=(std::initializer_list<value_type> il) { return static_cast<static_vector&>(base_t::operator=(il)); } #endif //! @pre <tt>other.size() <= capacity()</tt> //! //! @brief Copy assigns Values stored in the other static_vector to this one. //! //! @param other The static_vector which content will be copied to this one. //! //! @par Throws //! If Value's copy constructor or copy assignment throws. //! //! @par Complexity //! Linear O(N). template <std::size_t C> static_vector & operator=(static_vector<value_type, C> const& other) { return static_cast<static_vector&>(base_t::operator= (static_cast<typename static_vector<value_type, C>::base_t const&>(other))); } //! @brief Move assignment. Moves Values stored in the other static_vector to this one. //! //! @param other The static_vector which content will be moved to this one. //! //! @par Throws //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws. //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws. //! //! @par Complexity //! Linear O(N). static_vector & operator=(BOOST_RV_REF(static_vector) other) { return static_cast<static_vector&>(base_t::operator=(BOOST_MOVE_BASE(base_t, other))); } //! @pre <tt>other.size() <= capacity()</tt> //! //! @brief Move assignment. Moves Values stored in the other static_vector to this one. //! //! @param other The static_vector which content will be moved to this one. //! //! @par Throws //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws. //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws. //! //! @par Complexity //! Linear O(N). template <std::size_t C> static_vector & operator=(BOOST_RV_REF_BEG static_vector<value_type, C> BOOST_RV_REF_END other) { return static_cast<static_vector&>(base_t::operator= (BOOST_MOVE_BASE(typename static_vector<value_type BOOST_MOVE_I C>::base_t, other))); } #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED //! @brief Destructor. Destroys Values stored in this container. //! //! @par Throws //! Nothing //! //! @par Complexity //! Linear O(N). ~static_vector(); //! @brief Swaps contents of the other static_vector and this one. //! //! @param other The static_vector which content will be swapped with this one's content. //! //! @par Throws //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws, //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws, //! //! @par Complexity //! Linear O(N). void swap(static_vector & other); //! @pre <tt>other.size() <= capacity() && size() <= other.capacity()</tt> //! //! @brief Swaps contents of the other static_vector and this one. //! //! @param other The static_vector which content will be swapped with this one's content. //! //! @par Throws //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws, //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws, //! //! @par Complexity //! Linear O(N). template <std::size_t C> void swap(static_vector<value_type, C> & other); //! @pre <tt>count <= capacity()</tt> //! //! @brief Inserts or erases elements at the end such that //! the size becomes count. New elements are value initialized. //! //! @param count The number of elements which will be stored in the container. //! //! @par Throws //! If Value's value initialization throws. //! //! @par Complexity //! Linear O(N). void resize(size_type count); //! @pre <tt>count <= capacity()</tt> //! //! @brief Inserts or erases elements at the end such that //! the size becomes count. New elements are default initialized. //! //! @param count The number of elements which will be stored in the container. //! //! @par Throws //! If Value's default initialization throws. //! //! @par Complexity //! Linear O(N). //! //! @par Note //! Non-standard extension void resize(size_type count, default_init_t); //! @pre <tt>count <= capacity()</tt> //! //! @brief Inserts or erases elements at the end such that //! the size becomes count. New elements are copy constructed from value. //! //! @param count The number of elements which will be stored in the container. //! @param value The value used to copy construct the new element. //! //! @par Throws //! If Value's copy constructor throws. //! //! @par Complexity //! Linear O(N). void resize(size_type count, value_type const& value); //! @pre <tt>count <= capacity()</tt> //! //! @brief This call has no effect because the Capacity of this container is constant. //! //! @param count The number of elements which the container should be able to contain. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Linear O(N). void reserve(size_type count) BOOST_NOEXCEPT_OR_NOTHROW; //! @pre <tt>size() < capacity()</tt> //! //! @brief Adds a copy of value at the end. //! //! @param value The value used to copy construct the new element. //! //! @par Throws //! If Value's copy constructor throws. //! //! @par Complexity //! Constant O(1). void push_back(value_type const& value); //! @pre <tt>size() < capacity()</tt> //! //! @brief Moves value to the end. //! //! @param value The value to move construct the new element. //! //! @par Throws //! If Value's move constructor throws. //! //! @par Complexity //! Constant O(1). void push_back(BOOST_RV_REF(value_type) value); //! @pre <tt>!empty()</tt> //! //! @brief Destroys last value and decreases the size. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). void pop_back(); //! @pre //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>. //! @li <tt>size() < capacity()</tt> //! //! @brief Inserts a copy of element at p. //! //! @param p The position at which the new value will be inserted. //! @param value The value used to copy construct the new element. //! //! @par Throws //! @li If Value's copy constructor or copy assignment throws //! @li If Value's move constructor or move assignment throws. //! //! @par Complexity //! Constant or linear. iterator insert(const_iterator p, value_type const& value); //! @pre //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>. //! @li <tt>size() < capacity()</tt> //! //! @brief Inserts a move-constructed element at p. //! //! @param p The position at which the new value will be inserted. //! @param value The value used to move construct the new element. //! //! @par Throws //! If Value's move constructor or move assignment throws. //! //! @par Complexity //! Constant or linear. iterator insert(const_iterator p, BOOST_RV_REF(value_type) value); //! @pre //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>. //! @li <tt>size() + count <= capacity()</tt> //! //! @brief Inserts a count copies of value at p. //! //! @param p The position at which new elements will be inserted. //! @param count The number of new elements which will be inserted. //! @param value The value used to copy construct new elements. //! //! @par Throws //! @li If Value's copy constructor or copy assignment throws. //! @li If Value's move constructor or move assignment throws. //! //! @par Complexity //! Linear O(N). iterator insert(const_iterator p, size_type count, value_type const& value); //! @pre //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>. //! @li <tt>distance(first, last) <= capacity()</tt> //! @li \c Iterator must meet the \c ForwardTraversalIterator concept. //! //! @brief Inserts a copy of a range <tt>[first, last)</tt> at p. //! //! @param p The position at which new elements will be inserted. //! @param first The iterator to the first element of a range used to construct new elements. //! @param last The iterator to the one after the last element of a range used to construct new elements. //! //! @par Throws //! @li If Value's constructor and assignment taking a dereferenced \c Iterator. //! @li If Value's move constructor or move assignment throws. //! //! @par Complexity //! Linear O(N). template <typename Iterator> iterator insert(const_iterator p, Iterator first, Iterator last); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @pre //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>. //! @li <tt>distance(il.begin(), il.end()) <= capacity()</tt> //! //! @brief Inserts a copy of a range <tt>[il.begin(), il.end())</tt> at p. //! //! @param p The position at which new elements will be inserted. //! @param il The std::initializer_list which contains elements that will be inserted. //! //! @par Throws //! @li If Value's constructor and assignment taking a dereferenced std::initializer_list iterator. //! //! @par Complexity //! Linear O(N). iterator insert(const_iterator p, std::initializer_list<value_type> il); #endif //! @pre \c p must be a valid iterator of \c *this in range <tt>[begin(), end())</tt> //! //! @brief Erases Value from p. //! //! @param p The position of the element which will be erased from the container. //! //! @par Throws //! If Value's move assignment throws. //! //! @par Complexity //! Linear O(N). iterator erase(const_iterator p); //! @pre //! @li \c first and \c last must define a valid range //! @li iterators must be in range <tt>[begin(), end()]</tt> //! //! @brief Erases Values from a range <tt>[first, last)</tt>. //! //! @param first The position of the first element of a range which will be erased from the container. //! @param last The position of the one after the last element of a range which will be erased from the container. //! //! @par Throws //! If Value's move assignment throws. //! //! @par Complexity //! Linear O(N). iterator erase(const_iterator first, const_iterator last); //! @pre <tt>distance(first, last) <= capacity()</tt> //! //! @brief Assigns a range <tt>[first, last)</tt> of Values to this container. //! //! @param first The iterator to the first element of a range used to construct new content of this container. //! @param last The iterator to the one after the last element of a range used to construct new content of this container. //! //! @par Throws //! If Value's copy constructor or copy assignment throws, //! //! @par Complexity //! Linear O(N). template <typename Iterator> void assign(Iterator first, Iterator last); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) //! @pre <tt>distance(il.begin(), il.end()) <= capacity()</tt> //! //! @brief Assigns a range <tt>[il.begin(), il.end())</tt> of Values to this container. //! //! @param first std::initializer_list with values used to construct new content of this container. //! //! @par Throws //! If Value's copy constructor or copy assignment throws, //! //! @par Complexity //! Linear O(N). void assign(std::initializer_list<value_type> il); #endif //! @pre <tt>count <= capacity()</tt> //! //! @brief Assigns a count copies of value to this container. //! //! @param count The new number of elements which will be container in the container. //! @param value The value which will be used to copy construct the new content. //! //! @par Throws //! If Value's copy constructor or copy assignment throws. //! //! @par Complexity //! Linear O(N). void assign(size_type count, value_type const& value); //! @pre <tt>size() < capacity()</tt> //! //! @brief Inserts a Value constructed with //! \c std::forward<Args>(args)... in the end of the container. //! //! @param args The arguments of the constructor of the new element which will be created at the end of the container. //! //! @par Throws //! If in-place constructor throws or Value's move constructor throws. //! //! @par Complexity //! Constant O(1). template<class ...Args> void emplace_back(Args &&...args); //! @pre //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt> //! @li <tt>size() < capacity()</tt> //! //! @brief Inserts a Value constructed with //! \c std::forward<Args>(args)... before p //! //! @param p The position at which new elements will be inserted. //! @param args The arguments of the constructor of the new element. //! //! @par Throws //! If in-place constructor throws or if Value's move constructor or move assignment throws. //! //! @par Complexity //! Constant or linear. template<class ...Args> iterator emplace(const_iterator p, Args &&...args); //! @brief Removes all elements from the container. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). void clear() BOOST_NOEXCEPT_OR_NOTHROW; //! @pre <tt>i < size()</tt> //! //! @brief Returns reference to the i-th element. //! //! @param i The element's index. //! //! @return reference to the i-th element //! from the beginning of the container. //! //! @par Throws //! \c std::out_of_range exception by default. //! //! @par Complexity //! Constant O(1). reference at(size_type i); //! @pre <tt>i < size()</tt> //! //! @brief Returns const reference to the i-th element. //! //! @param i The element's index. //! //! @return const reference to the i-th element //! from the beginning of the container. //! //! @par Throws //! \c std::out_of_range exception by default. //! //! @par Complexity //! Constant O(1). const_reference at(size_type i) const; //! @pre <tt>i < size()</tt> //! //! @brief Returns reference to the i-th element. //! //! @param i The element's index. //! //! @return reference to the i-th element //! from the beginning of the container. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). reference operator[](size_type i); //! @pre <tt>i < size()</tt> //! //! @brief Returns const reference to the i-th element. //! //! @param i The element's index. //! //! @return const reference to the i-th element //! from the beginning of the container. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). const_reference operator[](size_type i) const; //! @pre <tt>i =< size()</tt> //! //! @brief Returns a iterator to the i-th element. //! //! @param i The element's index. //! //! @return a iterator to the i-th element. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). iterator nth(size_type i); //! @pre <tt>i =< size()</tt> //! //! @brief Returns a const_iterator to the i-th element. //! //! @param i The element's index. //! //! @return a const_iterator to the i-th element. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). const_iterator nth(size_type i) const; //! @pre <tt>begin() <= p <= end()</tt> //! //! @brief Returns the index of the element pointed by p. //! //! @param i The element's index. //! //! @return The index of the element pointed by p. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). size_type index_of(iterator p); //! @pre <tt>begin() <= p <= end()</tt> //! //! @brief Returns the index of the element pointed by p. //! //! @param i The index of the element pointed by p. //! //! @return a const_iterator to the i-th element. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). size_type index_of(const_iterator p) const; //! @pre \c !empty() //! //! @brief Returns reference to the first element. //! //! @return reference to the first element //! from the beginning of the container. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). reference front(); //! @pre \c !empty() //! //! @brief Returns const reference to the first element. //! //! @return const reference to the first element //! from the beginning of the container. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). const_reference front() const; //! @pre \c !empty() //! //! @brief Returns reference to the last element. //! //! @return reference to the last element //! from the beginning of the container. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). reference back(); //! @pre \c !empty() //! //! @brief Returns const reference to the first element. //! //! @return const reference to the last element //! from the beginning of the container. //! //! @par Throws //! Nothing by default. //! //! @par Complexity //! Constant O(1). const_reference back() const; //! @brief Pointer such that <tt>[data(), data() + size())</tt> is a valid range. //! For a non-empty vector <tt>data() == &front()</tt>. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). Value * data() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Const pointer such that <tt>[data(), data() + size())</tt> is a valid range. //! For a non-empty vector <tt>data() == &front()</tt>. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const Value * data() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns iterator to the first element. //! //! @return iterator to the first element contained in the vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). iterator begin() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const iterator to the first element. //! //! @return const_iterator to the first element contained in the vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const iterator to the first element. //! //! @return const_iterator to the first element contained in the vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns iterator to the one after the last element. //! //! @return iterator pointing to the one after the last element contained in the vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). iterator end() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const iterator to the one after the last element. //! //! @return const_iterator pointing to the one after the last element contained in the vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const iterator to the one after the last element. //! //! @return const_iterator pointing to the one after the last element contained in the vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns reverse iterator to the first element of the reversed container. //! //! @return reverse_iterator pointing to the beginning //! of the reversed static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const reverse iterator to the first element of the reversed container. //! //! @return const_reverse_iterator pointing to the beginning //! of the reversed static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const reverse iterator to the first element of the reversed container. //! //! @return const_reverse_iterator pointing to the beginning //! of the reversed static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns reverse iterator to the one after the last element of the reversed container. //! //! @return reverse_iterator pointing to the one after the last element //! of the reversed static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const reverse iterator to the one after the last element of the reversed container. //! //! @return const_reverse_iterator pointing to the one after the last element //! of the reversed static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns const reverse iterator to the one after the last element of the reversed container. //! //! @return const_reverse_iterator pointing to the one after the last element //! of the reversed static_vector. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns container's capacity. //! //! @return container's capacity. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). static size_type capacity() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns container's capacity. //! //! @return container's capacity. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). static size_type max_size() BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Returns the number of stored elements. //! //! @return Number of elements contained in the container. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). size_type size() const BOOST_NOEXCEPT_OR_NOTHROW; //! @brief Queries if the container contains elements. //! //! @return true if the number of elements contained in the //! container is equal to 0. //! //! @par Throws //! Nothing. //! //! @par Complexity //! Constant O(1). bool empty() const BOOST_NOEXCEPT_OR_NOTHROW; #else friend void swap(static_vector &x, static_vector &y) { x.swap(y); } #endif // BOOST_CONTAINER_DOXYGEN_INVOKED }; #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED //! @brief Checks if contents of two static_vectors are equal. //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @return \c true if containers have the same size and elements in both containers are equal. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> bool operator== (static_vector<V, C1> const& x, static_vector<V, C2> const& y); //! @brief Checks if contents of two static_vectors are not equal. //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @return \c true if containers have different size or elements in both containers are not equal. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> bool operator!= (static_vector<V, C1> const& x, static_vector<V, C2> const& y); //! @brief Lexicographically compares static_vectors. //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @return \c true if x compares lexicographically less than y. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> bool operator< (static_vector<V, C1> const& x, static_vector<V, C2> const& y); //! @brief Lexicographically compares static_vectors. //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @return \c true if y compares lexicographically less than x. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> bool operator> (static_vector<V, C1> const& x, static_vector<V, C2> const& y); //! @brief Lexicographically compares static_vectors. //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @return \c true if y don't compare lexicographically less than x. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> bool operator<= (static_vector<V, C1> const& x, static_vector<V, C2> const& y); //! @brief Lexicographically compares static_vectors. //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @return \c true if x don't compare lexicographically less than y. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> bool operator>= (static_vector<V, C1> const& x, static_vector<V, C2> const& y); //! @brief Swaps contents of two static_vectors. //! //! This function calls static_vector::swap(). //! //! @ingroup static_vector_non_member //! //! @param x The first static_vector. //! @param y The second static_vector. //! //! @par Complexity //! Linear O(N). template<typename V, std::size_t C1, std::size_t C2> inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y); #else template<typename V, std::size_t C1, std::size_t C2> inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y , typename container_detail::enable_if_c< C1 != C2>::type * = 0) { x.swap(y); } #endif // BOOST_CONTAINER_DOXYGEN_INVOKED }} // namespace boost::container #include <boost/container/detail/config_end.hpp> #endif // BOOST_CONTAINER_STATIC_VECTOR_HPP ///////////////////////////////////////////////// // vnDev.Games - Trong.LIVE - DAO VAN TRONG // ////////////////////////////////////////////////////////////////////////////////
[ "langley.joshua@gmail.com" ]
langley.joshua@gmail.com
47d3fde5ee7dc1106dd5ff042cc04f07cb3599a5
b76b23710cfd2753654228f9a474a67fae09c880
/1/3_2_3.cpp
0413352fae9442d9fec2f28e9b5a8eb55b279607
[]
no_license
onerow2star/cplusplus_primer
a6dd2fa98008d43393c4e6c0366c694ba456a436
03912ed6e6693b788b77226a50a13610cffa8974
refs/heads/main
2023-07-29T22:38:03.231465
2021-09-30T01:38:26
2021-09-30T01:38:26
390,318,261
0
0
null
null
null
null
UTF-8
C++
false
false
1,105
cpp
#include <iostream> #include <string> // #include <cctype> // string包含过了 using std::string; using std::cin; using std::cout; using std::endl; int main() { string s("Some string!!!"); decltype (s.size()) punct_cnt = 0; for (auto c : s) if (ispunct(c)) ++punct_cnt; cout << punct_cnt << " punctuation characters in " << s <<endl; for (auto &c : s) // c是引用 不是临时变量 c = tolower(c); if (!s.empty()) s[0] = toupper(s[0]); cout << s << endl; // decltype(s.size()) 保证下标合法性 >= 0 for (decltype(s.size()) i = 0; i != s.size() && !isspace(s[i]); ++i) s[i] = toupper(s[i]); cout << s << endl; const string hexdigits = "0123456789ABCDEF"; cout << "Enter a series of numbers between 0 and 15" << " spearated by spaces. Hit ENTER when finished: " << endl; string result; string::size_type n; while(cin >> n) if (n < hexdigits.size()) result += hexdigits[n]; cout << "Your hex number is: " << result << endl; return 0; }
[ "81426915+onerow2star@users.noreply.github.com" ]
81426915+onerow2star@users.noreply.github.com
3a3bdff3fc6321f520810d30c5ee837697c3371a
7bd2820be9ddf84b79daf36f05bee30873aa5bbc
/STM/F103UsartCmsis/Src/spi.cpp
9210d4d1a3debb82056f41e4b3ade8fd69586372
[]
no_license
Annihilatorrr/Embedded
9c7259e1f6cff80c4d76cf405fa09f7d4d34274b
16479a6c37653d48466d83d323dec8c3a2b192d1
refs/heads/main
2023-03-18T00:14:14.848205
2023-03-11T22:49:04
2023-03-11T22:49:04
248,601,212
0
0
null
null
null
null
UTF-8
C++
false
false
3,938
cpp
// STM32F103 SPI1 // PA4 - (OUT) SPI1_NSS // PA5 - (OUT) SPI1_SCK // PA6 - (IN) SPI1_MISO (Master In) // PA7 - (OUT) SPI1_MOSI (Master Out) #include "stm32f1xx.h" #include "spi.h" void initSPI1(void) { RCC->APB2ENR |= (RCC_APB2ENR_AFIOEN | RCC_APB2ENR_IOPAEN | RCC_APB2ENR_SPI1EN); // NSS, 50MHz GPIOA->CRL |= GPIO_CRL_MODE4; GPIOA->CRL &= ~GPIO_CRL_CNF4; GPIOA->BSRR = GPIO_BSRR_BS4; // SCK, 50MHz GPIOA->CRL |= GPIO_CRL_MODE5; GPIOA->CRL &= ~GPIO_CRL_CNF5; GPIOA->CRL |= GPIO_CRL_CNF5_1; // MISO GPIOA->CRL &= ~GPIO_CRL_MODE6; GPIOA->CRL &= ~GPIO_CRL_CNF6; GPIOA->CRL |= GPIO_CRL_CNF6_1; GPIOA->BSRR = GPIO_BSRR_BS6; // MOSI, 50MHz GPIOA->CRL |= GPIO_CRL_MODE7; GPIOA->CRL &= ~GPIO_CRL_CNF7; GPIOA->CRL |= GPIO_CRL_CNF7_1; // SPI SPI1->CR2 = 0x0000; SPI1->CR1 = SPI_CR1_MSTR; // ������ SPI1->CR1 |= SPI_CR1_BR; // ��������� �������� SPI Baud rate = Fpclk/256 (2,4,8,16,32,64,128,256) SPI1->CR1 |= SPI_CR1_SSM; // ����������� ����� NSS SPI1->CR1 |= SPI_CR1_SSI; // ���������� ���������, ����� �� ����� NSS ������� ������� SPI1->CR1 |= SPI_CR1_SPE; // ��������� ������ ������ SPI // SPI1->CR1 &= ~SPI_CR1_CPOL; // ���������� ��������� ������� (CK to 0 when idle) // SPI1->CR1 &= ~SPI_CR1_CPHA; // ���� ��������� ������� (|= SPI_CR1_CPHA - �� ������� ������) // SPI1->CR1 |= SPI_CR1_DFF; // 16 ��� ������ // SPI1->CR1 &= ~SPI_CR1_LSBFIRST; // ������� ��� (MSB) ���������� ������ // SPI1->CR2 |= SPI_CR2_SSOE; // NSS - ������������ ��� ����� ���������� slave select } //uint8_t SPI1SendByte(uint8_t data) { // while (!(SPI1->SR & SPI_SR_TXE)); // ���������, ��� ���������� �������� ��������� (STM32F103) // SPI1->DR=data; // ����� � SPI1 // while (!(SPI1->SR & SPI_SR_RXNE)); // ���� ��������� ������ (STM32F103) // return SPI1->DR; // ������ �������� ������ //} uint8_t SPI1sendData(uint8_t rg, uint8_t dt) { SPI1_NSS_ON(); while(!(READ_BIT(SPI1->SR, SPI_SR_TXE) == (SPI_SR_TXE))) {} SPI1->DR = rg; while(!(READ_BIT(SPI1->SR, SPI_SR_RXNE) == (SPI_SR_RXNE))) {} (void) SPI1->DR; while(!(READ_BIT(SPI1->SR, SPI_SR_TXE) == (SPI_SR_TXE))) {} SPI1->DR = dt; while(!(READ_BIT(SPI1->SR, SPI_SR_RXNE) == (SPI_SR_RXNE))) {} (void) SPI1->DR; SPI1_NSS_OFF(); return SPI1->DR; } uint8_t SPI1sendData(uint8_t rg, uint8_t* dt, int count) { SPI1_NSS_ON(); while(!(READ_BIT(SPI1->SR, SPI_SR_TXE) == (SPI_SR_TXE))) {} SPI1->DR = rg; while(!(READ_BIT(SPI1->SR, SPI_SR_RXNE) == (SPI_SR_RXNE))) {} (void) SPI1->DR; for (uint8_t index = 0; index < count; index++) { while(!(READ_BIT(SPI1->SR, SPI_SR_TXE) == (SPI_SR_TXE))) {} SPI1->DR = dt[index]; while(!(READ_BIT(SPI1->SR, SPI_SR_RXNE) == (SPI_SR_RXNE))) {} (void) SPI1->DR; } SPI1_NSS_OFF(); return SPI1->DR; } void SPI1receiveData(uint8_t rg, uint8_t* dt, int count) { SPI1_NSS_ON(); while(!(READ_BIT(SPI1->SR, SPI_SR_TXE) == (SPI_SR_TXE))) {} SPI1->DR = rg; while(!(READ_BIT(SPI1->SR, SPI_SR_RXNE) == (SPI_SR_RXNE))) {} (void) SPI1->DR; --count; for (uint8_t index = 0; index < count; index++) { while(!(READ_BIT(SPI1->SR, SPI_SR_TXE) == (SPI_SR_TXE))) {} SPI1->DR = rg; while(!(READ_BIT(SPI1->SR, SPI_SR_RXNE) == (SPI_SR_RXNE))) {} dt[index] = SPI1->DR; } SPI1_NSS_OFF(); }
[ "ruslanmgaifulin@gmail.com" ]
ruslanmgaifulin@gmail.com
b72f1421b8d64c2b2f78a227ea55a0ef2d1de028
e552eda95b70c1cb97bb349251ef881632a12718
/srcRL/torch3/gradients/Exp.h
94e711f44bf0983dc391c5c18ac1687e8b40fca8
[ "BSD-3-Clause" ]
permissive
dbbz/MDDAG-Trigger
87a0130dd973f7aac5568b5f29b249280c157bc4
47f4c7d0554a3da13edb7ccb407b8e9e6c176b48
refs/heads/master
2022-10-27T08:42:29.670905
2014-06-06T08:48:54
2014-06-06T08:48:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,254
h
// Copyright (C) 2003--2004 Ronan Collobert (collober@idiap.ch) // // This file is part of Torch 3.1. // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // 3. The name of the author may not be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef EXP_INC #define EXP_INC #include "GradientMachine.h" namespace Torch { /** Exponentiel layer for #GradientMachine#. The number of inputs/outputs is the number of units for this machine. Formally speaking, $ouputs[i] = exp(inputs[i])$. @author Ronan Collobert (collober@idiap.ch) */ class Exp : public GradientMachine { public: /// Create a layer of size #n_units# Exp(int n_units); //----- virtual void frameForward(int t, real *f_inputs, real *f_outputs); virtual void frameBackward(int t, real *f_inputs, real *beta_, real *f_outputs, real *alpha_); virtual ~Exp(); }; } #endif
[ "busarobi@inf.u-szeged.hu" ]
busarobi@inf.u-szeged.hu
d91524d974e8e853a49c517f4362f53355846dae
36fb616092b30a25df027ca2a4b91d9bf327641a
/ex03/Intern.cpp
e4959bf7f8469f167982a83b445baea670198f56
[]
no_license
2LeoCode/CPP_Module_05
e6b41dca7d8cdac2f4bd09817e672ddb54c5f066
4241e32b0cac9616079db66c3d39957e5dab25b2
refs/heads/master
2023-02-23T04:58:32.669996
2021-01-27T18:06:39
2021-01-27T18:06:39
333,516,068
0
0
null
null
null
null
UTF-8
C++
false
false
1,996
cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Intern.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: lsuardi <lsuardi@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/01/24 19:33:02 by lsuardi #+# #+# */ /* Updated: 2021/01/25 01:22:40 by lsuardi ### ########.fr */ /* */ /* ************************************************************************** */ #include "Intern.hpp" Form * newShrubbery(std::string const & target) { return (new ShrubberyCreationForm(target)); } Form * newRobotomy(std::string const & target) { return (new RobotomyRequestForm(target)); } Form * newPresidential(std::string const & target) { return (new PresidentialPardonForm(target)); } Intern::Intern(void) { _knownForms[0] = &newShrubbery; _knownForms[1] = &newRobotomy; _knownForms[2] = &newPresidential; _knownNames[0] = "shrubbery creation"; _knownNames[1] = "robotomy request"; _knownNames[2] = "presidential pardon"; } Form * Intern::makeForm(std::string const & name, unsigned int const sg, unsigned int const eg) { Form * newForm; try { newForm = new Form(name, sg, eg); return (newForm); } catch (std::exception & e) { std::cout << "Cannot create form <" << name << "> because <" << e.what() << '>' << std::endl; } return (nullptr); } Form * Intern::makeForm(std::string const & which, std::string const & target) { for (int i = 0; i < 3; i++) if (_knownNames[i] == which) return ((*_knownForms[i])(target)); throw (InvalidFormException()); }
[ "leo.13suardi@outlook.com" ]
leo.13suardi@outlook.com
d9dd07badf777f73e95b680322f7fba7695cafae
cc3d4a38185d2fef4f46a6a941ad1bd219ebdf4e
/CIniReader.cpp
3f6ee127484b44e13197c45385c2daa56ccb9613
[]
no_license
y0natancohen/nvidia-current-code
12d887283dd8db048721041ffc3ad5b0d4e538cd
b6f1b7d476b70fee8276de5265b8b06547215016
refs/heads/master
2020-11-29T14:21:00.285419
2019-12-25T17:53:27
2019-12-25T17:53:27
230,136,176
0
0
null
null
null
null
UTF-8
C++
false
false
9,756
cpp
#include "CIniReader.h" #include <iostream> #include <fstream> #include <sstream> /*************************************************************************** * * Class Name: CIniReader * ****************************************************************************/ //////////////////////////////////////////////////////////////////////////// // Public implementation //////////////////////////////////////////////////////////////////////////// /*************************************************************************** * * Function Name: getReference * ****************************************************************************/ CIniReader& CIniReader::getReference() { static CIniReader m_CIniReader; return m_CIniReader; } /*************************************************************************** * * Function Name: readLine * ****************************************************************************/ EReadERR CIniReader::readLine(std::string fileName, int lineNumber, std::string &currLine) { EReadERR rv(EER_SUCCESS); std::ifstream iniFile; int linePos(0); iniFile.open(fileName, std::ios::in); if (iniFile.is_open()) { while (1) { if (getline(iniFile, currLine)) { linePos++; if (linePos > lineNumber) { break; } } else { rv = EER_EOF; break; } } } else { rv = EER_UNDEFINED_FILE; } return rv; } /*************************************************************************** * * Function Name: parseLine * ****************************************************************************/ EReadERR CIniReader::parseLine(const std::string &inputLine, std::string &retName, std::string &retString, float &retFloat, bool &retBool, cv::Rect2f &rect, EReadERR &retRead, bool &isHeader) { EReadERR rv(EER_SUCCESS); std::string importantPart; std::vector<std::size_t> pos; retName = ""; retString = ""; retFloat = 0.0; retBool = false; rect = cv::Rect(); retRead = EER_SUCCESS; isHeader = false; if (inputLine.size() != 0) { //find important part (i.e. without comment) rv = findStrImportantPart(inputLine, importantPart); if (EER_SUCCESS == rv) { // check if line is header or data line. Header is marked by [header]. isHeader = isHeaderLine(importantPart, retName); if (!isHeader) { // parse variable name and value parseStringToVals(importantPart, retName, retString, retFloat, retBool, rect, retRead); } } } else { rv = EER_EMPTY_LINE; } return rv; } //////////////////////////////////////////////////////////////////////////// // Private implementation //////////////////////////////////////////////////////////////////////////// /*************************************************************************** * * Function Name: findSubstringOccurences * ****************************************************************************/ void CIniReader::findSubstringOccurences(const std::string &inputString, const std::string &subString, std::vector<std::size_t> &positions) { size_t pos = inputString.find(subString, 0); while (pos != std::string::npos) { positions.push_back(pos); pos = inputString.find(subString, pos + 1); } } /*************************************************************************** * * Function Name: findStrImportantPart * ****************************************************************************/ EReadERR CIniReader::findStrImportantPart(const std::string &inputString, std::string &retString) { EReadERR rv(EER_SUCCESS); std::vector<std::size_t> occurences; findSubstringOccurences(inputString, std::string("#"), occurences); if (occurences.size() > 0) { if (occurences[0] != 0) { retString.assign(inputString, 0, occurences[0] - 1); } else { rv = EER_COMMENT; } } else { retString = inputString; } return rv; } /*************************************************************************** * * Function Name: isHeaderLine * ****************************************************************************/ bool CIniReader::isHeaderLine(const std::string &inputString, std::string &retString) { bool isHeader = false; std::vector<std::size_t> pos, pos1; findSubstringOccurences(inputString, std::string("["), pos); findSubstringOccurences(inputString, std::string("]"), pos1); if (pos.size() != 0 && pos1.size() != 0 ) //if both [] found in string { if ((pos[0] < pos1[0]) && (pos[0] == 0)) // if the first "[" is in the beginning { isHeader = true; retString.assign(inputString, pos[0]+1, pos1[0] - 1); } } return isHeader; } /*************************************************************************** * * Function Name: parseStringToVals * ****************************************************************************/ EReadERR CIniReader::parseStringToVals(const std::string &inputString, std::string &retName, std::string &retString, float &retFloat, bool &retBool, cv::Rect2f &rect, EReadERR &retRead) { EReadERR rv(EER_SUCCESS), rv1(EER_SUCCESS); std::vector<std::size_t> pos, spacePos; std::string equationPart; retString = ""; retFloat = 0.0; retBool = false; retRead = EER_SUCCESS; findSubstringOccurences(inputString, std::string("="), pos); findSubstringOccurences(inputString, std::string(" "), spacePos); if (spacePos.size() == 0) { findSubstringOccurences(inputString, std::string("\t"), spacePos); } if (pos.size() > 0) { retName.assign(inputString, 0, pos[0]); // convert the other side of equation to number, rectangle or value\string if (spacePos.size() == 0) { equationPart.assign(inputString, pos[0] + 1, inputString.size() - 1); } else { equationPart.assign(inputString, pos[0] + 1, (spacePos[0] - pos[0] - 1)); } // call methods rv1 = str2rect(equationPart, rect); if (EER_INVALID_PARAM == rv1) // if it isn't a rectangle { rv1 = str2bool(equationPart, retBool); if (EER_UNDEFINED_TYPE == rv1) // if it neither rect nor bool is float { rv1 = str2float(equationPart, retFloat); if (EER_SUCCESS != rv1) // if it isn't rect bool or float, it is a string { retString = equationPart; retRead = EER_ELSE; } else { retRead = EER_FLOAT; } } else { retRead = EER_BOOL; } } else { retRead = EER_RECT; } } else { rv = EER_UNDEFINED_TYPE; } return rv; } /*************************************************************************** * * Function Name: str2float * ****************************************************************************/ EReadERR CIniReader::str2float(const std::string &inString, float &outVal) { EReadERR rv(EER_SUCCESS); const char *convertedInString; convertedInString = inString.c_str(); char *end; float result; errno = 0; result = strtof(convertedInString, &end); if ((errno == ERANGE && result == INFINITY) || result > INFINITY) { rv = EER_INVALID_DIMS; } if ((errno == ERANGE && result == -INFINITY) || result < -INFINITY) { rv = EER_INVALID_DIMS; } if (*convertedInString == '\0' || *end != '\0') { rv = EER_INVALID_PARAM; } if (EER_SUCCESS != rv) { result = 0; } outVal = result; return rv; } /*************************************************************************** * * Function Name: str2rect * ****************************************************************************/ EReadERR CIniReader::str2rect(const std::string &inString, cv::Rect2f &rect) { EReadERR rv(EER_SUCCESS); std::vector<std::size_t> pos; std::string localStr; findSubstringOccurences(inString, std::string("["), pos); findSubstringOccurences(inString, std::string("]"), pos); if (pos.size() == 2) // if found only once [] { localStr.assign(inString, pos[0] + 1, pos[1] - 1); pos.clear(); findSubstringOccurences(localStr, std::string(","), pos); if (pos.size() == 3) // if there's exactly 4 parameters comma delimited { int startPoint(0), endPoint(0); float tmp(0.0); for (int i(0); i < pos.size(); i++) { if (i > 0) { startPoint = pos[i - 1] + 1; } endPoint = pos[i] - startPoint; rv = str2float(localStr.substr(startPoint, endPoint), tmp); if (EER_SUCCESS == rv) { if (i == 0) { rect.x = tmp; } if (i == 1) { rect.y = tmp; } if (i == 2) { rect.width = tmp; } } } startPoint = pos[2] + 1; endPoint = localStr.size() - startPoint; rv = str2float(localStr.substr(startPoint, endPoint), tmp); if (EER_SUCCESS == rv) { rect.height = tmp; } } else { rv = EER_UNDEFINED_TYPE; } } else { rv = EER_INVALID_PARAM; } return rv; } /*************************************************************************** * * Function Name: str2bool * ****************************************************************************/ EReadERR CIniReader::str2bool(const std::string &inString, bool &retBool) { EReadERR rv(EER_SUCCESS); if (strcmp(inString.c_str(), "true") == 0 || strcmp(inString.c_str(), "True") == 0 || strcmp(inString.c_str(), "false") == 0 || strcmp(inString.c_str(), "false") == 0) { if (strcmp(inString.c_str(), "true") == 0 || strcmp(inString.c_str(), "True") == 0) { retBool = true; } else { retBool = false; } } else { retBool = false; rv = EER_UNDEFINED_TYPE; } return rv; } CIniReader::CIniReader() { } CIniReader::~CIniReader() { }
[ "spring@spring.local" ]
spring@spring.local
d48c30fcdc1146439b8ba15169223381db82ca94
bc84e75d0384f1c71927cdc76ff7017db25eb515
/hdu2955.cpp
fa64057826f2c35850bd944f365f020b1c0d6dda
[]
no_license
LiaoPengyu/algorithm
c997d751c0709173afb2c543fff651680ae43938
85737b6d3093f5bc51404f4240a415f5d7a88a20
refs/heads/master
2021-12-13T23:48:47.515625
2021-11-30T00:19:10
2021-11-30T00:19:10
15,309,163
0
0
null
null
null
null
UTF-8
C++
false
false
671
cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 110; int T, n, m, L, S, ANS; double P, p, dp[N*N]; struct Item { int v; double p; } I[N]; int main() { scanf("%d", &T); while(T--) { scanf("%lf%d", &P, &n); ANS = L = S = 0, P = 1 - P; while(n--) { scanf("%d%lf", &m, &p); S += m; I[L].v = m; I[L++].p = 1-p; } fill(dp, dp+S+1, -1); dp[0] = 1; for(int j=0; j<L; j++) for(int i=S, k=I[j].v; i>=k; i--) if(dp[i-k]>=0) dp[i] = max(dp[i], dp[i-k]*I[j].p); for(int i=S; i; i--) if(dp[i]>=P) {ANS=i; break;} printf("%d\n", ANS); } return 0; }
[ "ariselpy@gmail.com" ]
ariselpy@gmail.com
9f38219e32b5bc55c7c8d51ad2ccdd281d7a03fb
1a1f768097a3ab9513da81d65fa751e8d1aa0b2e
/libs/sfml/include/SFML/System/Resource.hpp
a646b4264a29eaef76fad3ff5c90dc6c30fccfb7
[]
no_license
krrios/ultima
e8f87e892d47c7f102abb7ab3fbe075dd5f6cc03
09d11326e9aa96ad13e9436bb0efdec65df3acb6
refs/heads/master
2020-12-25T16:24:50.326014
2010-05-23T01:35:43
2010-05-23T01:35:43
681,292
2
0
null
null
null
null
UTF-8
C++
false
false
9,772
hpp
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// #ifndef SFML_RESOURCE_HPP #define SFML_RESOURCE_HPP //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <SFML/System/Lock.hpp> #include <SFML/System/Mutex.hpp> #include <set> namespace sf { //////////////////////////////////////////////////////////// // These two classes are defined in the same header because // they depend on each other. And as they're template classes, // they must be entirely defined in header files, which // prevents from proper separate compiling //////////////////////////////////////////////////////////// template <typename> class ResourcePtr; //////////////////////////////////////////////////////////// /// \brief Base class for resources that need to notify /// dependent classes about their destruction /// //////////////////////////////////////////////////////////// template <typename T> class Resource { protected : //////////////////////////////////////////////////////////// /// \brief Default constructor /// //////////////////////////////////////////////////////////// Resource(); //////////////////////////////////////////////////////////// /// \brief Copy constructor /// /// \param copy Instance to copy /// //////////////////////////////////////////////////////////// Resource(const Resource<T>& copy); //////////////////////////////////////////////////////////// /// \brief Destructor /// //////////////////////////////////////////////////////////// ~Resource(); //////////////////////////////////////////////////////////// /// \brief Assignment operator /// /// \param other Instance to copy /// /// \return Reference to self /// //////////////////////////////////////////////////////////// Resource<T>& operator =(const Resource<T>& other); private : friend class ResourcePtr<T>; //////////////////////////////////////////////////////////// /// \brief Connect a ResourcePtr to this resource /// /// A connected ResourcePtr will be notified of the /// destruction of this instance. /// /// \param observer ResourcePtr to connect /// //////////////////////////////////////////////////////////// void Connect(ResourcePtr<T>& observer) const; //////////////////////////////////////////////////////////// /// \brief Disconnect a ResourcePtr from this resource /// /// The disconnected ResourcePtr will no longer be notified /// if this instance is destroyed. /// /// \param observer ResourcePtr to disconnect /// //////////////////////////////////////////////////////////// void Disconnect(ResourcePtr<T>& observer) const; //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// mutable std::set<ResourcePtr<T>*> myObservers; ///< List of pointers to this resource mutable Mutex myMutex; ///< Mutex for preventing concurrent access to the pointer list }; //////////////////////////////////////////////////////////// /// \brief Safe pointer to a sf::Resource<T> /// //////////////////////////////////////////////////////////// template <typename T> class ResourcePtr { public : //////////////////////////////////////////////////////////// /// \brief Default constructor /// /// A default constructed ResourcePtr is empty (null). /// //////////////////////////////////////////////////////////// ResourcePtr(); //////////////////////////////////////////////////////////// /// \brief Construct from a raw pointer /// /// \param resource Raw pointer to the resource to wrap /// //////////////////////////////////////////////////////////// ResourcePtr(const T* resource); //////////////////////////////////////////////////////////// /// \brief Copy constructor /// /// The new ResourcePtr will share the same resource as \a copy. /// /// \param copy Instance to copy /// //////////////////////////////////////////////////////////// ResourcePtr(const ResourcePtr<T>& copy); //////////////////////////////////////////////////////////// /// \brief Destructor /// //////////////////////////////////////////////////////////// ~ResourcePtr(); //////////////////////////////////////////////////////////// /// \brief Assignment operator for a ResourcePtr parameter /// /// \param other ResourcePtr to assign /// /// \return Reference to self /// //////////////////////////////////////////////////////////// ResourcePtr<T>& operator =(const ResourcePtr<T>& other); //////////////////////////////////////////////////////////// /// \brief Assignment operator for a raw pointer parameter /// /// \param resource Resource to assign /// /// \return Reference to self /// //////////////////////////////////////////////////////////// ResourcePtr<T>& operator =(const T* resource); //////////////////////////////////////////////////////////// /// \brief Cast operator to implicitely convert the resource /// pointer to its raw pointer type (T*) /// /// This might be dangerous in the general case, but in this context /// it is safe enough to define this operator. /// /// \return Read-only pointer to the actual resource /// //////////////////////////////////////////////////////////// operator const T*() const; //////////////////////////////////////////////////////////// /// \brief Overload of unary operator * /// /// Like raw pointers, applying the * operator returns a /// reference to the pointed object. /// /// \return Reference to the pointed resource /// //////////////////////////////////////////////////////////// const T& operator *() const; //////////////////////////////////////////////////////////// /// \brief Overload of operator -> /// /// Like raw pointers, applying the -> operator returns the /// pointed object. /// /// \return Pointed resource /// //////////////////////////////////////////////////////////// const T* operator ->() const; //////////////////////////////////////////////////////////// /// \brief Function called when the observed resource /// is about to be destroyed /// /// This functions is called by the destructor of the pointed /// resource. It allows this instance to reset its internal pointer /// when the resource is destroyed, and avoid dangling pointers. /// //////////////////////////////////////////////////////////// void OnResourceDestroyed(); private : //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// const T* myResource; /// Pointer to the actual resource }; #include <SFML/System/Resource.inl> #include <SFML/System/ResourcePtr.inl> } // namespace sf #endif // SFML_RESOURCE_HPP //////////////////////////////////////////////////////////// /// \class sf::Resource /// /// sf::Resource is a base for classes that want to be /// compatible with the sf::ResourcePtr safe pointer. /// /// See sf::ResourcePtr for a complete explanation. /// /// \see sf::ResourcePtr /// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// /// \class sf::ResourcePtr /// /// sf::ResourcePtr is a special kind of smart pointer for /// resources. Its main feature is to automatically /// reset its internal pointer to 0 when the resource /// gets destroyed, so that pointers to a resource never /// become invalid when the resource is destroyed. Instead, /// it properly returns 0 when the resource no longer exists. /// /// Its usage is completely transparent, so that it is similar /// to manipulating the raw resource directly (like any smart pointer). /// /// For sf::ResourcePtr<T> to work, T must inherit from /// the sf::Resource class. /// /// These two classes are heavily used internally in SFML /// to safely handle resources and the classes that use them: /// \li sf::Image / sf::Sprite /// \li sf::Font / sf::String /// \li sf::SoundBuffer / sf::Sound /// /// sf::Resource and sf::ResourcePtr are designed for internal use, /// but if you feel like they would fit well in your implementation /// there's no problem to use them. /// /// \see sf::Resource /// ////////////////////////////////////////////////////////////
[ "kitchen.moniz@gmail.com" ]
kitchen.moniz@gmail.com
1f958a2710bd3e38d1282664d9fd8f8b330bd083
33238ea20104f9613ec0a800333877987f95e3a5
/App/src/ExtendedSettings.cpp
eff276913e7cd6c2fa0feacc710a16b7dcc8f11d
[]
no_license
ahaug/CamSync
7a4ab9523087c6bba30f223ccd119aaa69aa679e
13b97cd3a9323f35e2d6ca9fc0eaea43bc63fda7
refs/heads/master
2021-01-20T04:32:20.280844
2010-11-24T01:27:01
2010-11-24T01:27:01
1,108,216
0
1
null
null
null
null
UTF-8
C++
false
false
11,517
cpp
#include "ExtendedSettings.h" #include <QLabel> #include <QTabBar> #include <QFrame> #include <QGridLayout> #include <QPushButton> #include <QDesktopServices> #include <QUrl> #include <QDir> #include "UserDefaults.h" #include "CameraThread.h" extern CameraThread * cameraThread; ExtendedSettings::ExtendedSettings(QWidget * parent) : QTabWidget(parent) { //this->tabBar()->setExpanding(true); ignoreSignals = false; //QPushButton * quitButton = new QPushButton("X", this); //quitButton->setGeometry(800-160, 0, 160, 64); //quitButton->setFlat(true); //QObject::connect(quitButton, SIGNAL(clicked()), // cameraThread, SLOT(stop())); QFrame * visualization = new QFrame(); visualization->setFrameShape(QFrame::StyledPanel); QVBoxLayout * visLayout = new QVBoxLayout(); intensityHistogram = new QCheckBox("Show intensity histogram "); visLayout->addWidget(intensityHistogram); ruleOfThirds = new QCheckBox("Show rule of thirds guide "); visLayout->addWidget(ruleOfThirds); captureAnimation = new QCheckBox("Show capture animation "); visLayout->addWidget(captureAnimation); captureSound = new QCheckBox("Play capture sound "); visLayout->addWidget(captureSound); captureBlink = new QCheckBox("Blink LED on capture "); visLayout->addWidget(captureBlink); visLayout->addStretch(1); visualization->setLayout(visLayout); QFrame * fileManagement = new QFrame(); fileManagement->setFrameShape(QFrame::StyledPanel); QGridLayout * layout = new QGridLayout(); int row = 0; layout->addWidget(new QLabel("RAW Path:"), row, 0); rawPath = new QLineEdit(); //rawPath->setAcceptRichText(false); //rawPath->setMaximumSize(QWIDGETSIZE_MAX, 64); layout->addWidget(rawPath, row, 1); row++; layout->addWidget(new QLabel("Filename Prefix:"), row, 0); filePrefix = new QLineEdit(); //filePrefix->setMaximumSize(QWIDGETSIZE_MAX, 64); layout->addWidget(filePrefix, row, 1); row++; QGridLayout * suffixRowLayout = new QGridLayout(); suffixRowLayout->addWidget(new QLabel("Filename Suffix:"), 0, 0); timestamp = new QRadioButton("Timestamp"); index = new QRadioButton("Index"); suffixRowLayout->addWidget(timestamp, 0,0); suffixRowLayout->addWidget(index, 0,1); layout->addWidget(new QLabel("Filename Suffix:"), row, 0); layout->addLayout(suffixRowLayout, row, 1); row++; emptyTrashButton = new QPushButton("Erase Trashed Photos"); restoreTrashButton = new QPushButton("Restore Trashed Photos"); QHBoxLayout * trashRowLayout = new QHBoxLayout(); trashRowLayout->addWidget(restoreTrashButton); trashRowLayout->addWidget(emptyTrashButton); layout->addLayout(trashRowLayout, row, 0, 1, 2); row++; // Add extra spaces at the end of checkbox title due to silly bug autosizing autosaveJPGs = new QCheckBox("Autosave JPGs to N900 gallery "); autosaveJPGs->setMaximumSize(QWIDGETSIZE_MAX, 64); layout->addWidget(autosaveJPGs, row, 0, 1, 2, Qt::AlignLeft); row++; QPushButton * resetSettings = new QPushButton("Restore Defaults"); layout->addWidget(resetSettings, row, 1, Qt::AlignRight); fileManagement->setLayout(layout); QFrame * aboutFCamera = new QFrame(); aboutFCamera->setFrameShape(QFrame::StyledPanel); QVBoxLayout * aboutLayout = new QVBoxLayout(); QLabel * whatIsFCam = new QLabel( "FCamera is a completely open-source N900 camera implementation\n" "written using the FCam camera control API. We think you should be\n" "able to program your camera to behave any way you want it to.\n\n" "Don't like our exposure metering algorithm? Change it.\n" "Want a mode for doing time-lapse photography? Write it.\n" "Do you desperately want a sepia toned viewfinder? Go nuts.\n\n" "With FCamera, you can. To get started, check out our webpage at" ); whatIsFCam->setAlignment(Qt::AlignJustify); QPushButton * url = new QPushButton("http://fcam.garage.maemo.org"); QObject::connect(url, SIGNAL(clicked()), this, SLOT(launchBrowserForFCamWebsite())); url->setFlat(true); aboutLayout->addStretch(1); aboutLayout->addWidget(whatIsFCam); aboutLayout->addWidget(url); aboutLayout->addStretch(1); aboutFCamera->setLayout(aboutLayout); this->addTab(fileManagement, "File Management"); this->addTab(visualization, "Visualizations"); this->addTab(aboutFCamera, "About FCamera"); this->refreshWidgetsFromDefaults(); QObject::connect(rawPath, SIGNAL(editingFinished()), this, SLOT(settingChanged())); QObject::connect(filePrefix, SIGNAL(editingFinished()), this, SLOT(settingChanged())); QObject::connect(timestamp, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(index, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(autosaveJPGs, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(resetSettings, SIGNAL(clicked()), this, SLOT(restoreSettingsToDefault())); QObject::connect(intensityHistogram, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(ruleOfThirds, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(captureAnimation, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(captureSound, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(captureBlink, SIGNAL(toggled(bool)), this, SLOT(settingChanged())); QObject::connect(emptyTrashButton, SIGNAL(clicked()), this, SLOT(emptyTrash())); QObject::connect(restoreTrashButton, SIGNAL(clicked()), this, SLOT(restoreTrash())); } void ExtendedSettings::refreshWidgetsFromDefaults(){ UserDefaults &userDefaults = UserDefaults::instance(); if (!userDefaults["rawPath"].valid()) { userDefaults["rawPath"] = "/home/user/MyDocs/FCamera/"; } if (!userDefaults["filenamePrefix"].valid()) { userDefaults["filenamePrefix"] = "photo"; } if (!userDefaults["filenameSuffix"].valid()){ userDefaults["filenameSuffix"] = "timestamp"; } if (!userDefaults["autosaveJPGs"].valid()) { userDefaults["autosaveJPGs"] = false; } if (!userDefaults["intensityHistogram"].valid()){ userDefaults["intensityHistogram"] = true; } if (!userDefaults["ruleOfThirds"].valid()){ userDefaults["ruleOfThirds"] = false; } if (!userDefaults["captureAnimation"].valid()){ userDefaults["captureAnimation"] = true; } if (!userDefaults["captureSound"].valid()){ userDefaults["captureSound"] = false; } if (!userDefaults["captureBlink"].valid()){ userDefaults["captureBlink"] = false; } // Block signals temporarily so that all the changes get to propagate ignoreSignals = true; rawPath->setText(userDefaults["rawPath"].asString().c_str()); filePrefix->setText(userDefaults["filenamePrefix"].asString().c_str()); if (userDefaults["filenameSuffix"].asString() == "timestamp") { timestamp->setChecked(true); } else { index->setChecked(true); } autosaveJPGs->setChecked(userDefaults["autosaveJPGs"].asInt()); intensityHistogram->setChecked(userDefaults["intensityHistogram"].asInt()); ruleOfThirds->setChecked(userDefaults["ruleOfThirds"].asInt()); captureAnimation->setChecked(userDefaults["captureAnimation"].asInt()); captureSound->setChecked(userDefaults["captureSound"].asInt()); captureBlink->setChecked(userDefaults["captureBlink"].asInt()); // Reactivate signals ignoreSignals = false; this->updateTrashButtons(); userDefaults.commit(); } void ExtendedSettings::settingChanged(){ if (ignoreSignals) return; UserDefaults &userDefaults = UserDefaults::instance(); userDefaults["rawPath"] = rawPath->text().toStdString(); userDefaults["filenamePrefix"] = filePrefix->text().toStdString(); if (timestamp->isChecked()){ userDefaults["filenameSuffix"] = "timestamp"; } else { userDefaults["filenameSuffix"] = "index"; } userDefaults["autosaveJPGs"] = autosaveJPGs->isChecked(); userDefaults["intensityHistogram"] = intensityHistogram->isChecked(); userDefaults["ruleOfThirds"] = ruleOfThirds->isChecked(); userDefaults["captureAnimation"] = captureAnimation->isChecked(); userDefaults["captureSound"] = captureSound->isChecked(); userDefaults["captureBlink"] = captureBlink->isChecked(); this->updateTrashButtons(); userDefaults.commit(); } void ExtendedSettings::restoreSettingsToDefault() { UserDefaults &userDefaults = UserDefaults::instance(); userDefaults.clear(); userDefaults.commit(); //printf("after clear, defaults has %d items\n", userDefaults.count()); this->refreshWidgetsFromDefaults(); //printf("after refresh, defaults has %d items\n", userDefaults.count()); } void ExtendedSettings::launchBrowserForFCamWebsite() { QDesktopServices::openUrl(QUrl("http://fcam.garage.maemo.org")); } // Delete all trashed photos permanently. void ExtendedSettings::emptyTrash() { printf("Emptying trash...\n"); UserDefaults &userDefaults = UserDefaults::instance(); QDir library(userDefaults["rawPath"].asString().c_str()); QStringList files = library.entryList(); foreach (QString file, files) { if (file.endsWith(".trash")){ library.remove(file); } } this->updateTrashButtons(); } // Return all trashed photos to the RAW library (possibly renaming // some to avoid name conflicts.) void ExtendedSettings::restoreTrash() { printf("Restoring trash...\n"); UserDefaults &userDefaults = UserDefaults::instance(); QDir library(userDefaults["rawPath"].asString().c_str()); QStringList files = library.entryList(); foreach (QString file, files) { if (file.endsWith(".dng.trash")){ QString base = file.left(file.count() - 10); // take off ".dng.trash" QString newName = file.left(file.count() - 6); // take off ".trash" int dupeCount = 0; while (!library.rename(file, newName)) { newName = base + QString().sprintf(".%d.dng", ++dupeCount); } library.rename(base + ".dng.thumb.trash", newName + ".thumb"); emit restoredFileAtPath(userDefaults["rawPath"].asString().c_str() + newName); } } this->updateTrashButtons(); } void ExtendedSettings::updateTrashButtons() { restoreTrashButton->setEnabled(false); emptyTrashButton->setEnabled(false); UserDefaults &userDefaults = UserDefaults::instance(); QDir library(userDefaults["rawPath"].asString().c_str()); QStringList files = library.entryList(); foreach (QString file, files) { if (file.endsWith(".dng.trash")){ restoreTrashButton->setEnabled(true); emptyTrashButton->setEnabled(true); } } }
[ "Owner@.(none)" ]
Owner@.(none)
fadcc5bfee0baf470bde444ccce4f234c9e73a93
33f15972fa46fe1dee1ccaa6e7bd35bb9112a42b
/xyginext/src/util/Random.cpp
078ce6cfed0f5b86a48d69fa9262f8560598a1e2
[ "LicenseRef-scancode-warranty-disclaimer", "Zlib" ]
permissive
WeyrSDev/xygine
4be0d8dc970e9b6db53d8d7cbc991c35ae9ac83e
3c0339f899cef55dc79287a7b239b853793a248b
refs/heads/master
2021-08-23T08:53:02.440636
2017-11-25T11:13:06
2017-11-25T11:13:06
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,990
cpp
/********************************************************************* (c) Matt Marchant 2017 http://trederia.blogspot.com xygineXT - Zlib license. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. *********************************************************************/ /* Poisson Disc sampling based on article at http://devmag.org.za/2009/05/03/poisson-disk-sampling/ */ #include <xyginext/util/Random.hpp> #include <xyginext/util/Vector.hpp> using namespace xy::Util::Random; namespace { const std::size_t maxGridPoints = 3; //it's not desirable but the only way I can think to hide this class class Grid { public: Grid(const sf::FloatRect& area, std::size_t maxPoints) : m_area(area), m_maxPoints(maxPoints) { XY_ASSERT(maxPoints < sizeof(std::size_t), "max points must be less than " + std::to_string(sizeof(std::size_t))); resize(area, maxPoints); } ~Grid() = default; void addPoint(const sf::Vector2f& point) { auto x = static_cast<std::size_t>(point.x + m_cellOffset.x) >> m_maxPoints; auto y = static_cast<std::size_t>(point.y + m_cellOffset.y) >> m_maxPoints; auto idx = y * m_cellCount.x + x; if (idx < m_cells.size()) m_cells[idx].push_back(point); } void resize(std::size_t maxPoints) { m_maxPoints = maxPoints; m_cellSize = 1ULL << m_maxPoints; m_cellOffset = { static_cast<int>(std::abs(m_area.left)), static_cast<int>(std::abs(m_area.top)) }; m_cellCount = { static_cast<int>(std::ceil(m_area.width / static_cast<float>(m_cellSize))), static_cast<int>(std::ceil(m_area.height / static_cast<float>(m_cellSize))) }; m_cells.clear(); m_cells.resize(m_cellCount.x * m_cellCount.y); } void resize(const sf::FloatRect& area, std::size_t maxPoints) { m_area = area; resize(maxPoints); } bool hasNeighbour(const sf::Vector2f& point, float radius) const { const float radSqr = radius * radius; sf::Vector2i minDist ( static_cast<int>(std::max(std::min(point.x - radius, (m_area.left + m_area.width) - 1.f), m_area.left)), static_cast<int>(std::max(std::min(point.y - radius, (m_area.top + m_area.height) - 1.f), m_area.top)) ); sf::Vector2i maxDist ( static_cast<int>(std::max(std::min(point.x + radius, (m_area.left + m_area.width) - 1.f), m_area.left)), static_cast<int>(std::max(std::min(point.y + radius, (m_area.top + m_area.height) - 1.f), m_area.top)) ); sf::Vector2i minCell ( (minDist.x + m_cellOffset.x) >> m_maxPoints, (minDist.y + m_cellOffset.y) >> m_maxPoints ); sf::Vector2i maxCell ( std::min(1 + ((maxDist.x + m_cellOffset.x) >> m_maxPoints), m_cellCount.x), std::min(1 + ((maxDist.y + m_cellOffset.y) >> m_maxPoints), m_cellCount.y) ); for (auto y = minCell.y; y < maxCell.y; ++y) { for (auto x = minCell.x; x < maxCell.x; ++x) { for (const auto& cell : m_cells[y * m_cellCount.x + x]) { if (xy::Util::Vector::lengthSquared(point - cell) < radSqr) { return true; } } } } return false; } private: using Cell = std::vector<sf::Vector2f>; std::vector<Cell> m_cells; sf::Vector2i m_cellCount; sf::Vector2i m_cellOffset; sf::FloatRect m_area; std::size_t m_maxPoints; std::size_t m_cellSize; }; } std::vector<sf::Vector2f> xy::Util::Random::poissonDiscDistribution(const sf::FloatRect& area, float minDist, std::size_t maxPoints) { std::vector<sf::Vector2f> workingPoints; std::vector<sf::Vector2f> retVal; Grid grid(area, maxGridPoints); auto centre = (sf::Vector2f(area.width, area.height) / 2.f) + sf::Vector2f(area.left, area.top); workingPoints.push_back(centre); retVal.push_back(centre); grid.addPoint(centre); while (!workingPoints.empty()) { auto idx = (workingPoints.size() == 1) ? 0 : value(0, workingPoints.size() - 1); centre = workingPoints[idx]; workingPoints.erase(std::begin(workingPoints) + idx); for (auto i = 0u; i < maxPoints; ++i) { float radius = minDist * (1.f + value(0.f, 1.f)); float angle = value(-1.f, 1.f) * xy::Util::Const::PI; sf::Vector2f newPoint = centre + sf::Vector2f(std::sin(angle), std::cos(angle)) * radius; if (area.contains(newPoint) && !grid.hasNeighbour(newPoint, minDist)) { workingPoints.push_back(newPoint); retVal.push_back(newPoint); grid.addPoint(newPoint); } } } return std::move(retVal); }
[ "matty_styles@hotmail.com" ]
matty_styles@hotmail.com
807b41ead40382de2adbebbc646df69b954ec0b6
22683f5ac7397f04826b919cff9e2cebc7594027
/Assignment3/MotionSearchTools.h
5af819ff58e5fae180f70a71066fd23d554588cf
[]
no_license
xilwen/multimedia-systems-assignments
42eb61b688e1989a22cddb8ccebdb8d2f60f2c75
e9013a1892be5dedf7b37f0d270281de148a4873
refs/heads/master
2021-05-08T00:34:10.919273
2018-01-30T19:15:28
2018-01-30T19:15:28
107,758,809
0
0
null
null
null
null
UTF-8
C++
false
false
539
h
#ifndef ASSIGNMENT3_MOTIONSEARCHTOOLS_H #define ASSIGNMENT3_MOTIONSEARCHTOOLS_H #include "PGMImage.h" class MotionSearchTools { public: static double getMeanAbsoluteDifference (PGMImage &referenceFrame, PGMImage &targetFrame, unsigned int sizeOfBlock, unsigned int x, unsigned int y, unsigned int iHorizontalDisplacement, unsigned int jVerticalDisplacement); static double getSignalNoiseRatio(PGMImage &targetFrame, PGMImage &predictedFrame); }; #endif //ASSIGNMENT3_MOTIONSEARCHTOOLS_H
[ "v72807647@gmail.com" ]
v72807647@gmail.com
94c2207618e7e83b1c9222bc2678c072b5982be6
d0ca36093b690328d199be84f23c660f0b9eabf3
/platformio/stima_v4/test/nucleo_uavcan/uavcan-master/test/test_uavcan_firmware.cpp
057dd74221d944cbb70e428c375b3d9f941c08f4
[]
no_license
r-map/rmap
9bb001b7680463d9d6a1dfefb554453f722fbcf2
88e3135ef981a418bb3c7ab652bfe381b6361e05
refs/heads/master
2023-09-04T00:00:01.294693
2023-09-01T18:14:25
2023-09-01T18:14:25
39,561,369
57
61
null
2023-06-07T09:45:06
2015-07-23T10:34:48
C
UTF-8
C++
false
false
111,210
cpp
#ifdef TEST_UAVCAN_FIRMWARE // Arduino #include <Arduino.h> // Unity Test #include <Unity.h> // Libcanard #include <canard.h> #include <o1heap.h> #include "bxcan.h" #include "register.hpp" // Namespace UAVCAN #include <uavcan/_register/Access_1_0.h> #include <uavcan/_register/List_1_0.h> #include <uavcan/file/Read_1_1.h> #include <uavcan/node/ExecuteCommand_1_1.h> #include <uavcan/node/GetInfo_1_0.h> #include <uavcan/node/Heartbeat_1_0.h> #include <uavcan/node/port/List_0_1.h> #include <uavcan/pnp/NodeIDAllocationData_1_0.h> #include <uavcan/time/Synchronization_1_0.h> // Namespace RMAP #include <rmap/_module/TH_1_0.h> #include <rmap/service/_module/TH_1_0.h> // Standard Library #include <stdio.h> #include <stdlib.h> #include <time.h> #include <unistd.h> // Configurazione modulo, definizioni ed utility generiche #include "module_config.hpp" //**************************************************************************************************** //******************************** FUNCTION DECLARATIONS ********************************************* //**************************************************************************************************** void test_firmware_file_exists(void); void test_command_software_update_sent(void); void test_success_command_response(void); void file_sent_to_slave(void); //**************************************************************************************************** //**************************************************************************************************** // ******************************* ENUM STATE OF TEST ************************************************ //**************************************************************************************************** enum test_status { INIT, PROCESSING, }; //**************************************************************************************************** //**************************************************************************************************** //************************************* STATE STRUCTURE ********************************************** //**************************************************************************************************** typedef struct State { CanardMicrosecond started_at; uint32_t lastMicrosecond; uint64_t currentMicrosecond; O1HeapInstance* heap; CanardInstance canard; CanardTxQueue canard_tx_queues[CAN_REDUNDANCY_FACTOR]; // Gestione master/server e funzioni attive in RX messaggi // Master Locale struct { // Time stamp struct { CanardMicrosecond previous_tx_real; bool enable_immediate_tx_real; } timestamp; // File upload (node_id può essere differente dal master, es. yakut e lo riporto) // AGgiungo file_server_node_id struct { uint8_t server_node_id; char filename[FILE_NAME_SIZE_MAX]; bool is_firmware; bool updating; bool updating_eof; bool updating_run; byte updating_retry; uint64_t offset; uint64_t timeout_us; // Time command Remoto x Verifica deadLine Request bool is_pending; // Funzione in pending (inviato, attesa risposta o timeout) bool is_timeout; // Funzione in timeout (mancata risposta) } file; } master; // Stato dei nodi slave e servizi gestiti collegati. Possibile lettura dai registri e gestione automatica struct { // Parametri Statici da leggere da registri o altro. Comunque inviati dal Master // node_id è l'indirizzo nodo remoto sui cui gestire i servizi // node_type identifica il tipo di nodo per sapere che tipologia di gestione viene effettuata // service è il port id sul node_id remoto che risponde ai servizi relativi di request // publisher è il subject id sul node_id remoto che pubblica i dati quando attivato // Gli altri parametri sono dinamicamente gestiti durante il funzionamento del programma uint8_t node_id; uint8_t node_type; // Nodo OnLine / OffLine bool is_online; struct { uint8_t state; // Vendor specific code NodeSlave State uint8_t healt; // Uavcan healt_state remoto uint64_t timeout_us; // Time heartbeat Remoto x Verifica OffLine } heartbeat; struct { // Flag di assegnamento PNP (se TRUE, da scrivere in ROM NON VOLATILE / REGISTER) // Il nodo è stato assegnato e il pnp non deve essere eseguito per quel modulo // se false il pnp è eseguito fino a quando non rilevo un modulo compatibile // con la richiesta (MODULE_TH, MODULE_RAIN ecc...) appena ne trovo uno // Heartbeat pubblicati Rx<-(Stato nodo remoto) // Questo permette l'assegmaneto PNP di tutti i moduli in sequenza (default) // O l'aggiunta successiva previa modifica della configurazione remota bool is_assigned; // flag resettato (PNP in funzione) } pnp; // Comandi inviati da locale Tx->(Comando + Param) Rx<-(Risposta) struct { uint8_t response; // Stato di risposta ai comandi nodo uint64_t timeout_us; // Time command Remoto x Verifica deadLine Request bool is_pending; // Funzione in pending (inviato, attesa risposta o timeout) bool is_timeout; // Funzione in timeout (mancata risposta) uint8_t next_transfer_id; // Transfer ID associato alla funzione } command; // Accesso ai registri inviati da locale Tx->(Registro + Value) Rx<-(Risposta) struct { uavcan_register_Value_1_0 response; // Valore in risposta al registro x Set (R/W) uint64_t timeout_us; // Time command Remoto x Verifica deadLine Request bool is_pending; // Funzione in pending (inviato, attesa risposta o timeout) bool is_timeout; // Funzione in timeout (mancata risposta) uint8_t next_transfer_id; // Transfer ID associato alla funzione } register_access; // Accesso ai dati dello slave in servizio Tx->(Funzione) Rx<-(Dato + Stato) // Puntatore alla struttura dati relativa es. -> rmap_module_TH_1_0 ecc... struct { CanardPortID port_id; // Porta del servizio dati correlato void* module; // Dati e stato di risposta ai dati nodo uint64_t timeout_us; // Time getData Remoto x Verifica deadline Request bool is_pending; // Funzione in pending (inviato, attesa risposta o timeout) bool is_timeout; // Funzione in timeout (mancata risposta) uint8_t next_transfer_id; // Transfer ID associato alla funzione } rmap_service; // Nome file(locale) per aggiornamento file remoto e relativo stato di funzionamento struct { char filename[FILE_NAME_SIZE_MAX]; bool is_firmware; // Comunico se file in TX è un Firmware o altro uint8_t state; // Stato del file transfer (gestione switch interno) uint64_t timeout_us; // Time command Remoto x Verifica deadLine Request File bool is_pending; // Funzione in pending (inviato, attesa risposta o timeout) bool is_timeout; // Funzione in timeout (mancata risposta) } file; // Pubblicazione dei dati autonoma (struttura dati come per servizio) #ifdef USE_SUB_PUBLISH_SLAVE_DATA struct { CanardPortID subject_id; // Suject id associato alla pubblicazione uint16_t data_count; // Conteggio pubblicazioni remote autonome (SOLO x TEST) } publisher; #endif } slave[MAX_NODE_CONNECT]; // Abilitazione delle pubblicazioni falcoltative sulla rete (ON/OFF a richiesta) struct { bool port_list; } publisher_enabled; // Tranfer ID (CAN Interfaccia ID -> uint8) servizi attivi del modulo locale struct { uint8_t uavcan_node_heartbeat; uint8_t uavcan_node_port_list; uint8_t uavcan_file_read_data; uint8_t uavcan_time_synchronization; } next_transfer_id; // Flag di state struct { bool g_restart_required; // Forzatura reboot del nodo } flag; } State; //**************************************************************************************************** //**************************************************************************************************** //********************************** GLOBAL VARIABLES/CONSTANTS ************************************** //**************************************************************************************************** State state = {0}; byte queueId; // Run a trivial scheduler polling the loops that run the business logic. CanardMicrosecond monotonic_time; test_status test_state = INIT; //**************************************************************************************************** // *************************************************************************************************** // ********** Funzioni ed utility generiche per gestione UAVCAN ********** // *************************************************************************************************** // Ritorna l'indice della coda master allocata in state in funzione del nodeId fisico byte getQueueNodeFromId(State* const state, CanardNodeID nodeId) { // Cerco la corrispondenza node_id nella coda allocata master per ritorno queueID Index for (byte queueId = 0; queueId < MAX_NODE_CONNECT; queueId++) { // Se trovo il nodo che sta rispondeno nella coda degli allocati... if (state->slave[queueId].node_id == nodeId) { return queueId; } } return GENERIC_BVAL_UNDEFINED; } // Ritorna l'indice della coda master allocata in state in funzione del nodeId fisico byte getPNPValidIdFromQueueNode(State* const state, uint8_t node_type) { // Cerco la corrispondenza node_id nella coda allocata master per ritorno queueID Index for (byte queueId = 0; queueId < MAX_NODE_CONNECT; queueId++) { // Se trovo il nodo che sta pubblicando come node_type // nella coda dei nodi configurati ma non ancora allocati... if ((state->slave[queueId].node_type == node_type) && (state->slave[queueId].pnp.is_assigned == false)) { // Ritorno il NodeID configurato da remoto come default da associare return state->slave[queueId].node_id; } } return GENERIC_BVAL_UNDEFINED; } // Ritorna i uS dalle funzioni Micros di Arduino (in formato 64 BIT necessario per UAVCAN) // Non permette il reset n ei 70 minuti circa previsti per l'overflow della funzione uS a 32 Bit static CanardMicrosecond getMonotonicMicroseconds(State* const state) { uint32_t ts = micros(); if (ts > state->lastMicrosecond) { state->currentMicrosecond += (ts - state->lastMicrosecond); } else { state->currentMicrosecond += ts; state->currentMicrosecond += (0xFFFFFFFFu - state->lastMicrosecond); } state->lastMicrosecond = ts; return (uint64_t)state->currentMicrosecond; } // Ritorna unique-ID 128-bit del nodo locale. E' utilizzato in uavcan.node.GetInfo.Response e durante // plug-and-play node-ID allocation da uavcan.pnp.NodeIDAllocationData. SerialNumber, Produttore.. // Dovrebbe essere verificato in uavcan.node.GetInfo.Response per la verifica non sia cambiato Nodo. // Al momento vengono inseriti 2 BYTE fissi, altri eventuali, che Identificano il Tipo Modulo static void getUniqueID(uint8_t out[uavcan_node_GetInfo_Response_1_0_unique_id_ARRAY_CAPACITY_]) { // A real hardware node would read its unique-ID from some hardware-specific source (typically stored in ROM). // This example is a software-only node so we store the unique-ID in a (read-only) register instead. uavcan_register_Value_1_0 value = {0}; uavcan_register_Value_1_0_select_unstructured_(&value); // Crea default unique_id con NODE_TYPE_MAJOR (Tipo di nodo), MINOR (Hw relativo) // Il resto dei 128 Bit (112) vengono impostati RANDOM (potrebbero portare Manufactor, SerialNumber ecc...) // Dovrebbe essere l'ID per la verifica incrociata del corretto Node_Id dopo il PnP value.unstructured.value.elements[value.unstructured.value.count++] = (uint8_t)NODE_TYPE_MAJOR; value.unstructured.value.elements[value.unstructured.value.count++] = (uint8_t)NODE_TYPE_MINOR; for (uint8_t i = value.unstructured.value.count; i < uavcan_node_GetInfo_Response_1_0_unique_id_ARRAY_CAPACITY_; i++) { value.unstructured.value.elements[value.unstructured.value.count++] = (uint8_t)rand(); // NOLINT } registerRead("uavcan.node.unique_id", &value); memcpy(&out[0], &value.unstructured.value, uavcan_node_GetInfo_Response_1_0_unique_id_ARRAY_CAPACITY_); } // *********************************************************************************************** // *********************************************************************************************** // FUNZIONI CHIAMATE DA MAIN_LOOP DI PUBBLICAZIONE E RICHIESTE DATI E SERVIZI // *********************************************************************************************** // *********************************************************************************************** // ******* Funzioni ed utility di ritrasmissione dati sulla rete UAVCAN ********* // Wrapper per send e sendresponse con Canard static void send(State* const state, const CanardMicrosecond tx_deadline_usec, const CanardTransferMetadata* const metadata, const size_t payload_size, const void* const payload) { for (uint8_t ifidx = 0; ifidx < CAN_REDUNDANCY_FACTOR; ifidx++) { (void)canardTxPush(&state->canard_tx_queues[ifidx], &state->canard, tx_deadline_usec, metadata, payload_size, payload); } } // Risposte con inversione meta.transfer_kind alle Request static void sendResponse(State* const state, const CanardMicrosecond tx_deadline_usec, const CanardTransferMetadata* const request_metadata, const size_t payload_size, const void* const payload) { CanardTransferMetadata meta = *request_metadata; meta.transfer_kind = CanardTransferKindResponse; send(state, tx_deadline_usec, &meta, payload_size, payload); } // ******* FUNZIONI INVOCATE HANDLE CONT_LOOP EV. PREPARATORIE ********* // FileRead V1.1 static void handleFileReadBlock_1_1(State* const state, const CanardMicrosecond monotonic_time) { // ***** Ricezione di file generico dalla rete UAVCAN dal nodo chiamante ***** // Richiamo in continuazione rapida la funzione fino al riempimento del file // Alla fine processo il firmware Upload (eventuale) vero e proprio con i relativi check uavcan_file_Read_Request_1_1 remotefile = {0}; remotefile.path.path.count = strlen(state->master.file.filename); memcpy(remotefile.path.path.elements, state->master.file.filename, remotefile.path.path.count); remotefile.offset = state->master.file.offset; uint8_t serialized[uavcan_file_Read_Request_1_1_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); const int8_t err = uavcan_file_Read_Request_1_1_serialize_(&remotefile, &serialized[0], &serialized_size); if (err >= 0) { const CanardTransferMetadata meta = { .priority = CanardPriorityHigh, .transfer_kind = CanardTransferKindRequest, .port_id = uavcan_file_Read_1_1_FIXED_PORT_ID_, .remote_node_id = state->master.file.server_node_id, .transfer_id = (CanardTransferID)(state->next_transfer_id.uavcan_file_read_data++), }; send(state, monotonic_time + MEGA, &meta, serialized_size, &serialized[0]); } } // ******* FUNZIONI INVOCATE HANDLE 1 SECONDO EV. PREPARATORIE ********* static void handleSyncroLoop(State* const state, const CanardMicrosecond monotonic_time) { // ***** Trasmette alla rete UAVCAN lo stato syncronization_time del modulo ***** // Da specifica invio il timestamp dell'ultima chiamata in modo che slave sincronizzi il delta uavcan_time_Synchronization_1_0 timesyncro; timesyncro.previous_transmission_timestamp_microsecond = state->master.timestamp.previous_tx_real; state->master.timestamp.enable_immediate_tx_real = true; uint8_t serialized[uavcan_time_Synchronization_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); const int8_t err = uavcan_time_Synchronization_1_0_serialize_(&timesyncro, &serialized[0], &serialized_size); if (err >= 0) { // Traferimento immediato per sincronizzazione migliore con i nodi remoti // Aggiorno il time stamp su blocco trasmesso a priorità immediata const CanardTransferMetadata meta = { .priority = CanardPriorityImmediate, .transfer_kind = CanardTransferKindMessage, .port_id = uavcan_time_Synchronization_1_0_FIXED_PORT_ID_, .remote_node_id = CANARD_NODE_ID_UNSET, .transfer_id = (CanardTransferID)(state->next_transfer_id.uavcan_time_synchronization++), }; send(state, monotonic_time + MEGA, &meta, serialized_size, &serialized[0]); } } static void handleNormalLoop(State* const state, const CanardMicrosecond monotonic_time) { // ***** Trasmette alla rete UAVCAN lo stato haeartbeat del modulo ***** // Heartbeat Fisso anche per modulo Master (Visibile a yakut o altri tools/script gestionali) uavcan_node_Heartbeat_1_0 heartbeat = {0}; heartbeat.uptime = (uint32_t)((monotonic_time - state->started_at) / MEGA); heartbeat.mode.value = uavcan_node_Mode_1_0_OPERATIONAL; const O1HeapDiagnostics heap_diag = o1heapGetDiagnostics(state->heap); if (heap_diag.oom_count > 0) { heartbeat.health.value = uavcan_node_Health_1_0_CAUTION; } else { heartbeat.health.value = uavcan_node_Health_1_0_NOMINAL; } heartbeat.vendor_specific_status_code = VSC_SOFTWARE_NORMAL; // Comunicazione dei FLAG di Update ed altri VSC privati opzionali if (state->master.file.updating) { // heartbeat.mode.value = uavcan_node_Mode_1_0_SOFTWARE_UPDATE; heartbeat.vendor_specific_status_code = VSC_SOFTWARE_UPDATE_READ; } // A fine trasferimento completo if (state->master.file.updating_run) { // Utilizzare questo flag solo in avvio di update (YAKUT Blocca i trasferimenti) // Altrimenti ricomincia il trasferimento da capo da inizio file all'infinito... heartbeat.mode.value = uavcan_node_Mode_1_0_SOFTWARE_UPDATE; } uint8_t serialized[uavcan_node_Heartbeat_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); const int8_t err = uavcan_node_Heartbeat_1_0_serialize_(&heartbeat, &serialized[0], &serialized_size); if (err >= 0) { const CanardTransferMetadata meta = { .priority = CanardPriorityNominal, .transfer_kind = CanardTransferKindMessage, .port_id = uavcan_node_Heartbeat_1_0_FIXED_PORT_ID_, .remote_node_id = CANARD_NODE_ID_UNSET, .transfer_id = (CanardTransferID)(state->next_transfer_id.uavcan_node_heartbeat++), }; send(state, monotonic_time + MEGA, &meta, serialized_size, &serialized[0]); } } // ******* FUNZIONI INVOCATE HANDLE 10 SECONDI EV. PREPARATORIE ********* // Prepara lista sottoscrizioni (solo quelle allocate correttamente <= CANARD_SUBJECT_ID_MAX) uavcan_node_port_List_0_1. static void fillSubscriptions(const CanardTreeNode* const tree, uavcan_node_port_SubjectIDList_0_1* const obj) { if (NULL != tree) { fillSubscriptions(tree->lr[0], obj); const CanardRxSubscription* crs = (const CanardRxSubscription*)tree; if (crs->port_id <= CANARD_SUBJECT_ID_MAX) { obj->sparse_list.elements[obj->sparse_list.count++].value = crs->port_id; fillSubscriptions(tree->lr[1], obj); } } } /// This is needed only for constructing uavcan_node_port_List_0_1. static void fillServers(const CanardTreeNode* const tree, uavcan_node_port_ServiceIDList_0_1* const obj) { if (NULL != tree) { fillServers(tree->lr[0], obj); const CanardRxSubscription* crs = (const CanardRxSubscription*)tree; if (crs->port_id <= CANARD_SERVICE_ID_MAX) { (void)nunavutSetBit(&obj->mask_bitpacked_[0], sizeof(obj->mask_bitpacked_), crs->port_id, true); fillServers(tree->lr[1], obj); } } } // ************** Pubblicazione vera e propria a 20 secondi ************** static void handleSlowLoop(State* const state, const CanardMicrosecond monotonic_time) { // Publish the recommended (not required) port introspection message. No point publishing it if we're anonymous. // The message is a bit heavy on the stack (about 2 KiB) but this is not a problem for a modern MCU. // L'abilitazione del comando è facoltativa, può essere attivata/disattivata da un comando UAVCAN if ((state->publisher_enabled.port_list) && (state->canard.node_id <= CANARD_NODE_ID_MAX)) { uavcan_node_port_List_0_1 m = {0}; uavcan_node_port_List_0_1_initialize_(&m); uavcan_node_port_SubjectIDList_0_1_select_sparse_list_(&m.publishers); uavcan_node_port_SubjectIDList_0_1_select_sparse_list_(&m.subscribers); // Indicate which subjects we publish to. Don't forget to keep this updated if you add new publications! { size_t* const cnt = &m.publishers.sparse_list.count; m.publishers.sparse_list.elements[(*cnt)++].value = uavcan_node_Heartbeat_1_0_FIXED_PORT_ID_; m.publishers.sparse_list.elements[(*cnt)++].value = uavcan_node_port_List_0_1_FIXED_PORT_ID_; // Aggiungo i publisher interni validi privati } // Indicate which servers and subscribers we implement. // We could construct the list manually but it's easier and more robust to just query libcanard for that. fillSubscriptions(state->canard.rx_subscriptions[CanardTransferKindMessage], &m.subscribers); fillServers(state->canard.rx_subscriptions[CanardTransferKindRequest], &m.servers); fillServers(state->canard.rx_subscriptions[CanardTransferKindResponse], &m.clients); // For regularity. // Serialize and publish the message. Use a small buffer because we know that our message is always small. // Verificato massimo utilizzo a 156 bytes. Limitiamo il buffer a 256 Bytes (Come esempio UAVCAN) uint8_t serialized[256] = {0}; size_t serialized_size = uavcan_node_port_List_0_1_SERIALIZATION_BUFFER_SIZE_BYTES_; if (uavcan_node_port_List_0_1_serialize_(&m, &serialized[0], &serialized_size) >= 0) { const CanardTransferMetadata meta = { .priority = CanardPriorityOptional, // Mind the priority. .transfer_kind = CanardTransferKindMessage, .port_id = uavcan_node_port_List_0_1_FIXED_PORT_ID_, .remote_node_id = CANARD_NODE_ID_UNSET, .transfer_id = (CanardTransferID)(state->next_transfer_id.uavcan_node_port_list++), }; // Send a 2 secondi send(state, monotonic_time + MEGA * 2, &meta, serialized_size, &serialized[0]); } } } // ************** SEZIONE COMANDI E RICHIESTE SPECIFICHE AD UN NODO SULLA RETE ************** // ************** Invio Comando diretto ad un nodo remoto UAVCAN Cmd ************** static bool serviceSendCommand(State* const state, const CanardMicrosecond monotonic_time, byte istanza, const uint16_t cmd_request, const void* ext_param, size_t ext_lenght) { // Effettua una richiesta specifica ad un nodo della rete in formato UAVCAN uavcan_node_ExecuteCommand_Request_1_1 cmdRequest = {0}; uint8_t serialized[uavcan_node_ExecuteCommand_Request_1_1_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); // istanza -> queueId di State o istanza di nodo // Imposta il comando da inviare cmdRequest.command = cmd_request; // Verifica la presenza di parametri opzionali nel comando cmdRequest.parameter.count = ext_lenght; // Controllo conformità lunghezza messaggio e ne copio il contenuto if (ext_lenght) { memcpy(cmdRequest.parameter.elements, ext_param, ext_lenght); } // Serializzo e verifico la conformità del messaggio const int8_t err = uavcan_node_ExecuteCommand_Request_1_1_serialize_(&cmdRequest, &serialized[0], &serialized_size); if (err >= 0) { // Comando a priorità alta const CanardTransferMetadata meta = { .priority = CanardPriorityHigh, .transfer_kind = CanardTransferKindRequest, .port_id = uavcan_node_ExecuteCommand_1_1_FIXED_PORT_ID_, .remote_node_id = state->slave[istanza].node_id, .transfer_id = (CanardTransferID)(state->slave[istanza].command.next_transfer_id++), }; send(state, monotonic_time + MEGA, &meta, serialized_size, &serialized[0]); return true; } return false; } // ************** Invio richiesta dati diretto ad un nodo remoto UAVCAN Get ************** static bool serviceSendRegister(State* const state, const CanardMicrosecond monotonic_time, byte istanza, char* registerName, uavcan_register_Value_1_0 registerValue) { // Effettua la richiesta UAVCAN per l'accesso ad un registro remoto di un nodo slave // Utile per la configurazione remota completa o la modifica di un parametro dello slave uavcan_register_Access_Request_1_0 cmdRequest = {0}; uint8_t serialized[uavcan_register_Access_Request_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); // Imposta il comando da inviare ed il timer base cmdRequest.value = registerValue; cmdRequest.name.name.count = strlen(registerName); memcpy(&cmdRequest.name.name.elements[0], registerName, cmdRequest.name.name.count); // Serializzo e verifico la conformità del messaggio const int8_t err = uavcan_register_Access_Request_1_0_serialize_(&cmdRequest, &serialized[0], &serialized_size); if (err >= 0) { // Comando a priorità alta const CanardTransferMetadata meta = { .priority = CanardPriorityHigh, .transfer_kind = CanardTransferKindRequest, .port_id = uavcan_register_Access_1_0_FIXED_PORT_ID_, .remote_node_id = state->slave[istanza].node_id, .transfer_id = (CanardTransferID)(state->slave[istanza].register_access.next_transfer_id++), }; send(state, monotonic_time + MEGA, &meta, serialized_size, &serialized[0]); return true; } return false; } // ************** Invio richiesta dati diretto ad un nodo remoto UAVCAN Get ************** static bool serviceSendRequestData(State* const state, const CanardMicrosecond monotonic_time, byte istanza, byte comando, uint16_t run_sectime) { // Effettua una richiesta specifica ad un nodo della rete in formato UAVCAN // La richiesta è generica per tutti i moduli (univoca DSDL), comunque parte integrante di ogni // DSDL singola di modulo. Il PORT_ID fisso o dinamico indica il nodo remoto. // L'interpretazione è invece tipicizzata dalla risposta (DSDL specifica) rmap_service_setmode_1_0 cmdRequest = {0}; uint8_t serialized[rmap_service_module_TH_Request_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); // Imposta il comando da inviare ed il timer base cmdRequest.comando = comando; cmdRequest.run_sectime = run_sectime; // Serializzo e verifico la conformità del messaggio const int8_t err = rmap_service_setmode_1_0_serialize_(&cmdRequest, &serialized[0], &serialized_size); if (err >= 0) { // Comando a priorità alta const CanardTransferMetadata meta = { .priority = CanardPriorityHigh, .transfer_kind = CanardTransferKindRequest, .port_id = state->slave[istanza].rmap_service.port_id, .remote_node_id = state->slave[istanza].node_id, .transfer_id = (CanardTransferID)(state->slave[istanza].rmap_service.next_transfer_id++), }; send(state, monotonic_time + MEGA, &meta, serialized_size, &serialized[0]); return true; } return false; } // *************************************************************************************************** // Funzioni ed utility di ricezione dati dalla rete UAVCAN, richiamati da processReceivedTransfer() // *************************************************************************************************** // Chiamate gestioni RPC remote da master (yakut o altro servizio di controllo) static uavcan_node_ExecuteCommand_Response_1_1 processRequestExecuteCommand(State* state, const uavcan_node_ExecuteCommand_Request_1_1* req, uint8_t remote_node) { uavcan_node_ExecuteCommand_Response_1_1 resp = {0}; // req->command (Comando esterno ricevuto 2 BYTES RESERVED FFFF-FFFA) // Gli altri sono liberi per utilizzo interno applicativo con #define interne // req->parameter (array di byte MAX 255 per i parametri da request) // Risposta attuale (resp) 1 Bytes RESERVER (0..6) gli altri #define interne switch (req->command) { // **************** Comandi standard UAVCAN GENERIC_SPECIFIC_COMMAND **************** // Comando di aggiornamento Firmware compatibile con Yakut e specifice UAVCAN case uavcan_node_ExecuteCommand_Request_1_1_COMMAND_BEGIN_SOFTWARE_UPDATE: { // Nodo Server chiamante (Yakut solo Master, Yakut e Master per Slave) state->master.file.server_node_id = remote_node; // Copio la stringa nel name file firmware disponibile su state generale (per download successivo) memcpy(state->master.file.filename, req->parameter.elements, req->parameter.count); state->master.file.filename[req->parameter.count] = '\0'; // Init varaiabili di download state->master.file.is_firmware = true; state->master.file.updating = true; state->master.file.updating_eof = false; state->master.file.offset = 0; // Controlla retry continue (da mettere OFF a RX Response di FileRead) state->master.file.updating_retry = 0; // Avvio la funzione con OK resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } case uavcan_node_ExecuteCommand_Request_1_1_COMMAND_FACTORY_RESET: { registerDoFactoryReset(); resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } case uavcan_node_ExecuteCommand_Request_1_1_COMMAND_RESTART: { state->flag.g_restart_required = true; resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } case uavcan_node_ExecuteCommand_Request_1_1_COMMAND_STORE_PERSISTENT_STATES: { // If your registers are not automatically synchronized with the non-volatile storage, use this command // to commit them to the storage explicitly. Otherwise it is safe to remove it. // In this demo, the registers are stored in files, so there is nothing to do. resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } // **************** Comandi personalizzati VENDOR_SPECIFIC_COMMAND **************** // Comando di download File generico compatibile con specifice UAVCAN, (LOG/CFG altro...) case CMD_DOWNLOAD_FILE: { // Nodo Server chiamante (Yakut solo Master, Yakut e Master per Slave) state->master.file.server_node_id = remote_node; // Copio la stringa nel name file generico disponibile su state generale (per download successivo) memcpy(state->master.file.filename, req->parameter.elements, req->parameter.count); state->master.file.filename[req->parameter.count] = '\0'; // Init varaiabili di download state->master.file.is_firmware = false; state->master.file.updating = true; state->master.file.updating_eof = false; state->master.file.offset = 0; // Controlla retry continue (da mettere OFF a RX Response di FileRead) state->master.file.updating_retry = 0; // Avvio la funzione con OK resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } case CMD_ENABLE_PUBLISH_PORT_LIST: { // Abilita pubblicazione slow_loop elenco porte (Cypal facoltativo) state->publisher_enabled.port_list = true; resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } case CMD_DISABLE_PUBLISH_PORT_LIST: { // Disabilita pubblicazione slow_loop elenco porte (Cypal facoltativo) state->publisher_enabled.port_list = false; resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS; break; } default: { resp.status = uavcan_node_ExecuteCommand_Response_1_1_STATUS_BAD_COMMAND; break; } } return resp; } // Accesso ai registri UAVCAN risposta a richieste static uavcan_register_Access_Response_1_0 processRequestRegisterAccess(const uavcan_register_Access_Request_1_0* req) { char name[uavcan_register_Name_1_0_name_ARRAY_CAPACITY_ + 1] = {0}; memcpy(&name[0], req->name.name.elements, req->name.name.count); name[req->name.name.count] = '\0'; uavcan_register_Access_Response_1_0 resp = {0}; // If we're asked to write a new value, do it now: if (!uavcan_register_Value_1_0_is_empty_(&req->value)) { uavcan_register_Value_1_0_select_empty_(&resp.value); registerRead(&name[0], &resp.value); // If such register exists and it can be assigned from the request value: if (!uavcan_register_Value_1_0_is_empty_(&resp.value) && registerAssign(&resp.value, &req->value)) { registerWrite(&name[0], &resp.value); } } // Regardless of whether we've just wrote a value or not, we need to read the current one and return it. // The client will determine if the write was successful or not by comparing the request value with response. uavcan_register_Value_1_0_select_empty_(&resp.value); registerRead(&name[0], &resp.value); // Currently, all registers we implement are mutable and persistent. This is an acceptable simplification, // but more advanced implementations will need to differentiate between them to support advanced features like // exposing internal states via registers, perfcounters, etc. resp._mutable = true; resp.persistent = true; // Our node does not synchronize its time with the network so we can't populate the timestamp. resp.timestamp.microsecond = uavcan_time_SynchronizedTimestamp_1_0_UNKNOWN; return resp; } // Risposta a uavcan.node.GetInfo which Info Node (nome, versione, uniqueID di verifica ecc...) static uavcan_node_GetInfo_Response_1_0 processRequestNodeGetInfo() { uavcan_node_GetInfo_Response_1_0 resp = {0}; resp.protocol_version.major = CANARD_CYPHAL_SPECIFICATION_VERSION_MAJOR; resp.protocol_version.minor = CANARD_CYPHAL_SPECIFICATION_VERSION_MINOR; // The hardware version is not populated in this demo because it runs on no specific hardware. // An embedded node would usually determine the version by querying the hardware. resp.software_version.major = VERSION_MAJOR; resp.software_version.minor = VERSION_MINOR; resp.software_vcs_revision_id = VCS_REVISION_ID; getUniqueID(resp.unique_id); // The node name is the name of the product like a reversed Internet domain name (or like a Java package). resp.name.count = strlen(NODE_NAME); memcpy(&resp.name.elements, NODE_NAME, resp.name.count); // The software image CRC and the Certificate of Authenticity are optional so not populated in this demo. return resp; } // ****************************************************************************************** // Processo multiplo di ricezione messaggi e comandi. Gestione entrata ed uscita dei messaggi // Chiamata direttamente nel main loop in ricezione dalla coda RX // Richiama le funzioni qui sopra di preparazione e risposta alle richieste // ****************************************************************************************** static void processReceivedTransfer(State* const state, const CanardRxTransfer* const transfer) { // Gestione dei Messaggi in ingresso if (transfer->metadata.transfer_kind == CanardTransferKindMessage) { // bool Per assert mancanza handler di eventuale servizio sottoscritto bool bKindMessageProcessed = false; // Gestione dei messaggi PNP per allocazione nodi di rete (gestisco come master) if (transfer->metadata.port_id == uavcan_pnp_NodeIDAllocationData_1_0_FIXED_PORT_ID_) { // Richiesta di allocazione Nodo dalla rete con messaggio anonimo V1.0 CAN_MTU 8 bKindMessageProcessed = true; uint8_t defaultNodeId = 0; size_t size = transfer->payload_size; uavcan_pnp_NodeIDAllocationData_1_0 msg = {0}; if (uavcan_pnp_NodeIDAllocationData_1_0_deserialize_(&msg, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // Cerco nei moduli conosciuti (in HASH_UNIQUE_ID) invio il tipo modulo... // Verifico se ho un nodo ancora da configurare come da cfg del master // Il nodo deve essere compatibile con il tipo di modulo previsto da allocare switch (msg.unique_id_hash & 0xFF) { case MODULE_TYPE_TH: defaultNodeId = getPNPValidIdFromQueueNode(state, MODULE_TYPE_TH); break; case MODULE_TYPE_RAIN: defaultNodeId = getPNPValidIdFromQueueNode(state, MODULE_TYPE_RAIN); break; case MODULE_TYPE_WIND: defaultNodeId = getPNPValidIdFromQueueNode(state, MODULE_TYPE_WIND); break; case MODULE_TYPE_RADIATION: defaultNodeId = getPNPValidIdFromQueueNode(state, MODULE_TYPE_RADIATION); break; case MODULE_TYPE_VWC: defaultNodeId = getPNPValidIdFromQueueNode(state, MODULE_TYPE_VWC); break; case MODULE_TYPE_POWER: defaultNodeId = getPNPValidIdFromQueueNode(state, MODULE_TYPE_POWER); break; defualt: // PNP Non gestibile defaultNodeId = GENERIC_BVAL_UNDEFINED; break; } // Risposta immediata diretta (Se nodo ovviamente è riconosciuto...) // Non utilizziamo una Response in quanto l'allocation è sempre un messaggio anonimo // I metadati del trasporto sono come quelli riceuti del transferID quindi è un messaggio // che si comporta parzialmente come una risposta (per rilevamento remoto hash/transfer_id) if (defaultNodeId <= CANARD_NODE_ID_MAX) { // Se il nodo proposto viene confermato inizieremo a ricevere heartbeat // da quel nodeId. A questo punto in Heartbeat settiam il flag pnp.is_assigned // che conclude la procedura con esito positivo. msg.allocated_node_id.count = 1; msg.allocated_node_id.elements[0].value = defaultNodeId; // The request object is empty so we don't bother deserializing it. Just send the response. uint8_t serialized[uavcan_pnp_NodeIDAllocationData_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); const int8_t res = uavcan_pnp_NodeIDAllocationData_1_0_serialize_(&msg, &serialized[0], &serialized_size); // Preparo la pubblicazione anonima in risposta alla richiesta anonima const CanardTransferMetadata meta = { .priority = CanardPriorityNominal, .transfer_kind = CanardTransferKindMessage, .port_id = uavcan_pnp_NodeIDAllocationData_1_0_FIXED_PORT_ID_, .remote_node_id = CANARD_NODE_ID_UNSET, .transfer_id = (CanardTransferID)(transfer->metadata.transfer_id), }; send(state, getMonotonicMicroseconds(state) + MEGA, &meta, serialized_size, &serialized[0]); } } } // Gestione dei messaggi Heartbeat per stato rete (gestisco come master) else if (transfer->metadata.port_id == uavcan_node_Heartbeat_1_0_FIXED_PORT_ID_) { bKindMessageProcessed = true; size_t size = transfer->payload_size; uavcan_node_Heartbeat_1_0 msg = {0}; if (uavcan_node_Heartbeat_1_0_deserialize_(&msg, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // Processo e registro il nodo: stato, OnLine e relativi flag byte queueId = getQueueNodeFromId(state, transfer->metadata.remote_node_id); // Se nodo correttamente allocato e gestito (potrebbe essere Yakut non registrato) if (queueId != GENERIC_BVAL_UNDEFINED) { // Primo assegnamento da PNP, gestisco eventuale configurazione remota // e salvataggio del flag di assegnamento in ROM / o Register if (!state->slave[queueId].pnp.is_assigned) { // Configura i metadati... // Configura altri parametri... // Modifico il flag PNP Executed e termino la procedura PNP state->slave[queueId].pnp.is_assigned = true; // Salvo su registro lo stato uavcan_register_Value_1_0 val = {0}; char registerName[24] = "rmap.pnp.allocateID."; uavcan_register_Value_1_0_select_natural8_(&val); val.natural32.value.count = 1; val.natural32.value.elements[0] = transfer->metadata.remote_node_id; // queueId -> index Val = NodeId itoa(queueId, registerName + strlen(registerName), 10); registerWrite(registerName, &val); } // Rientro in OnLINE da OFFLine o Init // Inizializzo le variabili e gli stati necessari per Reset e corretta gestione if (!state->slave[queueId].is_online) { // Accodo i dati letti dal messaggio (Nodo -> OnLine) state->slave[queueId].is_online = true; // Metto i Flag in sicurezza, laddove dove non eventualmente gestito state->slave[queueId].command.is_pending = false; state->slave[queueId].command.is_timeout = true; state->slave[queueId].register_access.is_pending = false; state->slave[queueId].register_access.is_timeout = true; state->slave[queueId].file.is_pending = false; state->slave[queueId].file.is_timeout = true; state->slave[queueId].file.state = FILE_STATE_STANDBY; state->slave[queueId].rmap_service.is_pending = false; state->slave[queueId].rmap_service.is_timeout = true; } state->slave[queueId].heartbeat.healt = msg.health.value; state->slave[queueId].heartbeat.state = msg.vendor_specific_status_code; // Set canard_us local per controllo NodoOffline state->slave[queueId].heartbeat.timeout_us = transfer->timestamp_usec + NODE_OFFLINE_TIMEOUT_US; } } } #ifdef USE_SUB_PUBLISH_SLAVE_DATA else { // Gestione messaggi pubblicazione dati dei moduli slave (gestisco come master) // Es. popalamento dati se attivato un log specifico o show valori su display // Il comando è opzionale perchè in request/response esiste già questa possibilità // Nodo rispondente leggo dalla coda la/le pubblicazioni attivate (MAX 1 x tipologia) byte queueId = getQueueNodeFromId(state, transfer->metadata.remote_node_id); // Se nodo correttammente allocato e gestito if (queueId != GENERIC_BVAL_UNDEFINED) { // Verifico se risposta del servizio corrisponde al chiamante (eventuali + servizi sotto...) // Gestione di tutti i servizi possibili allocabili, valido per tutti i nodi if (transfer->metadata.port_id == state->slave[queueId].publisher.subject_id) { // ************* Service Modulo TH Response ************* if (state->slave[queueId].node_type == MODULE_TYPE_TH) { // Processato il messaggio con il relativo Handler. OK bKindMessageProcessed = true; // Modulo TH, leggo e deserializzo il messaggio in ingresso rmap_module_TH_1_0 msg = {0}; size_t size = transfer->payload_size; if (rmap_module_TH_1_0_deserialize_(&msg, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // TODO: vedere con Marco Pubblica, registra elimina, display... altro // Per ora salvo solo il dato ricevuto dalla struttura di state msg (count) // msg contiene i dati di blocco pubblicati state->slave[queueId].publisher.data_count++; } } // ALTRI MODULI DA INSERIRE QUA... PG, VV, RS, GAS ECC... } } } #endif } // Gestione delle richieste esterne else if (transfer->metadata.transfer_kind == CanardTransferKindRequest) { if (transfer->metadata.port_id == uavcan_node_GetInfo_1_0_FIXED_PORT_ID_) { // The request object is empty so we don't bother deserializing it. Just send the response. const uavcan_node_GetInfo_Response_1_0 resp = processRequestNodeGetInfo(); uint8_t serialized[uavcan_node_GetInfo_Response_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); const int8_t res = uavcan_node_GetInfo_Response_1_0_serialize_(&resp, &serialized[0], &serialized_size); if (res >= 0) { sendResponse(state, transfer->timestamp_usec + MEGA, &transfer->metadata, serialized_size, &serialized[0]); } } else if (transfer->metadata.port_id == uavcan_register_Access_1_0_FIXED_PORT_ID_) { uavcan_register_Access_Request_1_0 req = {0}; size_t size = transfer->payload_size; if (uavcan_register_Access_Request_1_0_deserialize_(&req, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { const uavcan_register_Access_Response_1_0 resp = processRequestRegisterAccess(&req); uint8_t serialized[uavcan_register_Access_Response_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); if (uavcan_register_Access_Response_1_0_serialize_(&resp, &serialized[0], &serialized_size) >= 0) { sendResponse(state, transfer->timestamp_usec + MEGA, &transfer->metadata, serialized_size, &serialized[0]); } } } else if (transfer->metadata.port_id == uavcan_register_List_1_0_FIXED_PORT_ID_) { uavcan_register_List_Request_1_0 req = {0}; size_t size = transfer->payload_size; if (uavcan_register_List_Request_1_0_deserialize_(&req, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { uavcan_register_List_Response_1_0 resp; resp.name = registerGetNameByIndex(req.index); uint8_t serialized[uavcan_register_List_Response_1_0_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); if (uavcan_register_List_Response_1_0_serialize_(&resp, &serialized[0], &serialized_size) >= 0) { sendResponse(state, transfer->timestamp_usec + MEGA, &transfer->metadata, serialized_size, &serialized[0]); } } } else if (transfer->metadata.port_id == uavcan_node_ExecuteCommand_1_1_FIXED_PORT_ID_) { uavcan_node_ExecuteCommand_Request_1_1 req = {0}; size_t size = transfer->payload_size; if (uavcan_node_ExecuteCommand_Request_1_1_deserialize_(&req, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { const uavcan_node_ExecuteCommand_Response_1_1 resp = processRequestExecuteCommand(state, &req, transfer->metadata.remote_node_id); uint8_t serialized[uavcan_node_ExecuteCommand_Response_1_1_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); if (uavcan_node_ExecuteCommand_Response_1_1_serialize_(&resp, &serialized[0], &serialized_size) >= 0) { sendResponse(state, transfer->timestamp_usec + MEGA, &transfer->metadata, serialized_size, &serialized[0]); } } } else if (transfer->metadata.port_id == uavcan_file_Read_1_1_FIXED_PORT_ID_) { // La funzione viene eseguita solo con UPLOAD Sequenza corretta // Serve a fare eseguire un'eventuale TimeOut su procedura non corretta // Ed evitare blocchi non coerenti... Viene gestita senza problemi // Send multiplo di File e procedure in sequenza ( Gestito TimeOut di Request ) byte queueId = getQueueNodeFromId(state, transfer->metadata.remote_node_id); // Devo essere in aghgiornamento per sicurezza!!! if (state->slave[queueId].file.state == FILE_STATE_UPLOADING) { // Update TimeOut (Comunico request OK al Master, Slave sta scaricando) // Se Slave si blocca per TimeOut, esco dalla procedura dove gestita // La gestione dei time OUT è in unica funzione x Tutti i TimeOUT state->slave[queueId].file.timeout_us = transfer->timestamp_usec + NODE_REQFILE_TIMEOUT_US; uavcan_file_Read_Request_1_1 req = {0}; size_t size = transfer->payload_size; if (uavcan_file_Read_Request_1_1_deserialize_(&req, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { uavcan_file_Read_Response_1_1 resp = {0}; byte dataBuf[uavcan_primitive_Unstructured_1_0_value_ARRAY_CAPACITY_]; // Terminatore di sicurezza req.path.path.elements[req.path.path.count] = 0; // Allego il blocco dati se presente size_t dataLen = uavcan_primitive_Unstructured_1_0_value_ARRAY_CAPACITY_; // Il Master ha finito la trasmissione, esco dalla procedura if (getDataFile((char*)&req.path.path.elements[0], state->slave[queueId].file.is_firmware, req.offset, dataBuf, &dataLen)) { resp._error.value = uavcan_file_Error_1_0_OK; if (dataLen != uavcan_primitive_Unstructured_1_0_value_ARRAY_CAPACITY_) { state->slave[queueId].file.state = FILE_STATE_UPLOAD_COMPLETE; } } else { // Ritorno un errore da interpretare a Slave resp._error.value = uavcan_file_Error_1_0_IO_ERROR; dataLen = 0; } // Preparo la risposta corretta resp.data.value.count = dataLen; memcpy(resp.data.value.elements, dataBuf, dataLen); uint8_t serialized[uavcan_file_Read_Response_1_1_SERIALIZATION_BUFFER_SIZE_BYTES_] = {0}; size_t serialized_size = sizeof(serialized); if (uavcan_file_Read_Response_1_1_serialize_(&resp, &serialized[0], &serialized_size) >= 0) { RUN_TEST(file_sent_to_slave); sendResponse(state, transfer->timestamp_usec + MEGA, &transfer->metadata, serialized_size, &serialized[0]); } } } } } // Gestione delle risposte alle richeste inviate alla rete come Master else if (transfer->metadata.transfer_kind == CanardTransferKindResponse) { // Comando inviato ad un nodo remoto, verifica della risposta e della coerenza messaggio if (transfer->metadata.port_id == uavcan_node_ExecuteCommand_1_1_FIXED_PORT_ID_) { uavcan_node_ExecuteCommand_Response_1_1 resp = {0}; size_t size = transfer->payload_size; if (uavcan_node_ExecuteCommand_Response_1_1_deserialize_(&resp, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // Ricerco idNodo nella coda degli allocati del master // Copio la risposta ricevuta nella struttura relativa e resetto il flag pending byte queueId = getQueueNodeFromId(state, transfer->metadata.remote_node_id); if (queueId != GENERIC_BVAL_UNDEFINED) { // Resetta il pending del comando del nodo verificato state->slave[queueId].command.is_pending = false; // Copia la risposta nella variabile di chiamata in state state->slave[queueId].command.response = resp.status; } } } else if (transfer->metadata.port_id == uavcan_register_Access_1_0_FIXED_PORT_ID_) { uavcan_register_Access_Response_1_0 resp = {0}; size_t size = transfer->payload_size; if (uavcan_register_Access_Response_1_0_deserialize_(&resp, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // Ricerco idNodo nella coda degli allocati del master // Copio la risposta ricevuta nella struttura relativa e resetto il flag pending byte queueId = getQueueNodeFromId(state, transfer->metadata.remote_node_id); if (queueId != GENERIC_BVAL_UNDEFINED) { // Resetta il pending del comando del nodo verificato state->slave[queueId].register_access.is_pending = false; // Copia la risposta nella variabile di chiamata in state state->slave[queueId].register_access.response = resp.value; } } } else if (transfer->metadata.port_id == uavcan_file_Read_1_1_FIXED_PORT_ID_) { uavcan_file_Read_Response_1_1 resp = {0}; size_t size = transfer->payload_size; if (uavcan_file_Read_Response_1_1_deserialize_(&resp, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // Reset pending command (Comunico request/Response Serie di comandi OK!!!) state->master.file.is_pending = false; // Azzero contestualmente le retry di controllo x gestione MAX_RETRY -> ABORT state->master.file.updating_retry = 0; // Save Data in File at Block Position (Init = Rewrite file...) putDataFile(state->master.file.filename, state->master.file.is_firmware, state->master.file.offset == 0, resp.data.value.elements, resp.data.value.count); state->master.file.offset += resp.data.value.count; if (resp.data.value.count != uavcan_primitive_Unstructured_1_0_value_ARRAY_CAPACITY_) { // Blocco con EOF!!! Fine trasferimento, nessun altro blocco disponibile state->master.file.updating_eof = true; } } } // Risposta ad un servizio (dati) dinamicamente allocato... ( deve essere ultimo else ) // Servizio di risposta alla richiesta su modulo slave, verifica della risposta e della coerenza messaggio // Per il nodo che risponde verifico i servizi attivi per la corrispondenza dinamica risposta else { // Nodo rispondente (posso avere senza problemi più servizi con stesso port_id su diversi nodi) byte queueId = getQueueNodeFromId(state, transfer->metadata.remote_node_id); // Se nodo correttammente allocato e gestito if (queueId != GENERIC_BVAL_UNDEFINED) { // Verifico se risposta del servizio corrisponde al chiamante (eventuali + servizi sotto...) // Gestione di tutti i servizi possibili allocabili, valido per tutti i nodi if (transfer->metadata.port_id == state->slave[queueId].rmap_service.port_id) { // ************* Service Modulo TH Response ************* if (state->slave[queueId].node_type == MODULE_TYPE_TH) { // Modulo TH, leggo e deserializzo il messaggio in ingresso rmap_service_module_TH_Response_1_0 resp = {0}; size_t size = transfer->payload_size; if (rmap_service_module_TH_Response_1_0_deserialize_(&resp, static_cast<uint8_t const*>(transfer->payload), &size) >= 0) { // Resetta il pending del comando del nodo verificato state->slave[queueId].rmap_service.is_pending = false; // Copia la risposta nella variabile di chiamata in state // Oppure gestire qua tutte le altre occorrenze per stima V4 // TODO: vedere con Marco Pubblica, registra elimina, display... altro // Per ora copio in una struttura di state response memcpy(state->slave[queueId].rmap_service.module, &resp, sizeof(resp)); } } // ALTRI MODULI DA INSERIRE QUA... PG, VV, RS, GAS ECC... } } } } } // ********************************************************************************************* // Inizializzazione generale HW, canard, CAN_BUS, ISR e dispositivi collegati // ********************************************************************************************* // Setup SW - Canard memory access (allocate/free) static void* canardAllocate(CanardInstance* const ins, const size_t amount) { O1HeapInstance* const heap = ((State*)ins->user_reference)->heap; return o1heapAllocate(heap, amount); } static void canardFree(CanardInstance* const ins, void* const pointer) { O1HeapInstance* const heap = ((State*)ins->user_reference)->heap; o1heapFree(heap, pointer); } // ***************** ISR READ RX CAN_BUS, BUFFER RX SETUP ISR, CALLBACK ***************** // Push data into Array of CanardFrame and relative buffer payload // Gestita come coda FIFO (In sostituzione interrupt bxCAN non funzionante correttamente) // Puntatori alla coda FiFo (Gestione CODA con define) #define bxCANRxQueueEmpty() (canard_rx_queue.wr_ptr = canard_rx_queue.rd_ptr) #define bxCANRxQueueIsEmpty() (canard_rx_queue.wr_ptr == canard_rx_queue.rd_ptr) #define bxCANRxQueueDataPresent() (canard_rx_queue.wr_ptr != canard_rx_queue.rd_ptr) // For Monitor queue Interrupt RX movement #define bxCANRxQueueElement() (canard_rx_queue.wr_ptr >= canard_rx_queue.rd_ptr ? canard_rx_queue.wr_ptr - canard_rx_queue.rd_ptr : canard_rx_queue.wr_ptr + (CAN_RX_QUEUE_CAPACITY - canard_rx_queue.rd_ptr)) #define bxCANRxQueueNextElement(x) (x + 1 < CAN_RX_QUEUE_CAPACITY ? x + 1 : 0) typedef struct Canard_rx_queue { // CanardTxQueue (Frame e Buffer x Interrupt gestione Coda FiFo) byte wr_ptr; byte rd_ptr; struct { CanardFrame frame; uint8_t buf[CANARD_MTU_MAX]; } msg[CAN_RX_QUEUE_CAPACITY]; } Canard_rx_queue; Canard_rx_queue canard_rx_queue; // Call Back Opzionale RX_FIFO0 CAN_IFACE (hcan), Usare con più servizi di INT per discriminare // Abilitabile in CAN1_RX0_IRQHandler, chiamando -> HAL_CAN_IRQHandler(&CAN_Handle) // extern "C" void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) // { // CallBack CODE Here... (quello Interno CAN1_RX0_IRQHandler) // } // INTERRUPT_HANDLER CAN RX (Non modificare extern "C", in C++ non gestirebbe l'ingresso in ISR) // Più veloce possibile ISR extern "C" void CAN1_RX0_IRQHandler(void) { // -> Chiamata opzionale di Handler Call_Back CAN_Handle // La sua chiamata in CAN1_RX0_IRQHandler abilita il CB succesivo // -> HAL_CAN_IRQHandler(&CAN_Handle); // <- HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) // In questo caso è possibile discriminare con *hcan altre opzioni/stati // In Stima V4 non è necessario altra CB, bxCANPop gestisce il MSG_IN a suo modo // Inserisco il messaggio in un BUFFER Circolare di CanardFrame che vengono gestiti // nel software al momento opportuno, senza così incorrere in perdite di dati byte testElement = canard_rx_queue.wr_ptr; testElement = bxCANRxQueueNextElement(canard_rx_queue.wr_ptr); // Leggo il messaggio già pronto per libreria CANARD (Frame) if (bxCANPop(IFACE_CAN_IDX, &canard_rx_queue.msg[testElement].frame.extended_can_id, &canard_rx_queue.msg[testElement].frame.payload_size, canard_rx_queue.msg[testElement].buf)) { if (testElement != canard_rx_queue.rd_ptr) { // Non posso registrare il dato (MAX_QUEUE) se (testElement == canard_rx_queue.rd_ptr) // raggiunto MAX Buffer. E' più importante non perdere il primo FIFO payload // Quindi non aggiungo il dato ma leggo per svuotare il Buffer FIFO // altrimenti rientro sempre in Interrupt RX e mando in stallo la CPU senza RX... // READ DATA BUFFER MSG -> // Get payload from Buffer (possibilie inizializzazione statica fissa) // Il Buffer non cambia indirizzo quindi basterebbe un'init statico di frame[x].payload canard_rx_queue.msg[testElement].frame.payload = canard_rx_queue.msg[testElement].buf; // Push data in queue (Next_WR, Data in testElement + 1 Element from RX) canard_rx_queue.wr_ptr = testElement; } } } //******************************************************************************************* // *********************************** SETUP CAN BUS IFACE ********************************** //******************************************************************************************* bool CAN_HW_Init(void) { // Definition CAN structure variable CAN_HandleTypeDef CAN_Handle; // Definition GPIO and CAN filter structure variables GPIO_InitTypeDef GPIO_InitStruct; CAN_FilterTypeDef CAN_FilterInitStruct; // GPIO Ports clock enable __HAL_RCC_GPIOA_CLK_ENABLE(); // CAN1 clock enable __HAL_RCC_CAN1_CLK_ENABLE(); #if defined(STM32L496xx) // Mapping GPIO for CAN /* Configure CAN pin: RX */ GPIO_InitStruct.Pin = GPIO_PIN_11; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF9_CAN1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /* Configure CAN pin: TX */ GPIO_InitStruct.Pin = GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; GPIO_InitStruct.Alternate = GPIO_AF9_CAN1; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); #else #error "Warning untested processor variant" #endif // Setup CAN Istance Basic CAN_Handle.Instance = CAN1; CAN_Handle.Init.Mode = CAN_MODE_NORMAL; CAN_Handle.Init.TimeTriggeredMode = DISABLE; CAN_Handle.Init.AutoBusOff = DISABLE; CAN_Handle.Init.AutoWakeUp = DISABLE; CAN_Handle.Init.AutoRetransmission = DISABLE; CAN_Handle.Init.ReceiveFifoLocked = DISABLE; CAN_Handle.Init.TransmitFifoPriority = DISABLE; // Check error initialization CAN if (HAL_CAN_Init(&CAN_Handle) != HAL_OK) { return false; } // CAN filter basic initialization CAN_FilterInitStruct.FilterIdHigh = 0x0000; CAN_FilterInitStruct.FilterIdLow = 0x0000; CAN_FilterInitStruct.FilterMaskIdHigh = 0x0000; CAN_FilterInitStruct.FilterMaskIdLow = 0x0000; CAN_FilterInitStruct.FilterFIFOAssignment = CAN_RX_FIFO0; CAN_FilterInitStruct.FilterBank = 0; CAN_FilterInitStruct.FilterMode = CAN_FILTERMODE_IDMASK; CAN_FilterInitStruct.FilterScale = CAN_FILTERSCALE_32BIT; CAN_FilterInitStruct.FilterActivation = ENABLE; // Check error initalization CAN filter if (HAL_CAN_ConfigFilter(&CAN_Handle, &CAN_FilterInitStruct) != HAL_OK) { return false; } // ******************* CANARD SETUP TIMINGS AND SPEED ******************* // CAN BITRATE Dinamico su LoadRegister (CAN_FD 2xREG natural32 0=Speed, 1=0 (Not Used)) uavcan_register_Value_1_0 val = {0}; uavcan_register_Value_1_0_select_natural32_(&val); val.natural32.value.count = 2; val.natural32.value.elements[0] = CAN_BIT_RATE; val.natural32.value.elements[1] = 0ul; // Ignored for CANARD_MTU_CAN_CLASSIC registerRead("uavcan.can.bitrate", &val); // Dynamic BIT RATE Change CAN Speed to CAN_BIT_RATE (register default/defined) BxCANTimings timings; bool result = bxCANComputeTimings(HAL_RCC_GetPCLK1Freq(), val.natural32.value.elements[0], &timings); if (!result) { val.natural32.value.count = 2; val.natural32.value.elements[0] = CAN_BIT_RATE; val.natural32.value.elements[1] = 0ul; // Ignored for CANARD_MTU_CAN_CLASSIC registerWrite("uavcan.can.bitrate", &val); result = bxCANComputeTimings(HAL_RCC_GetPCLK1Freq(), val.natural32.value.elements[0], &timings); if (!result) { return false; } } // Attivazione bxCAN sulle interfacce richieste, velocità e modalità result = bxCANConfigure(0, timings, false); if (!result) { return false; } // ******************* CANARD SETUP TIMINGS AND SPEED COMPLETE ******************* // Check error starting CAN if (HAL_CAN_Start(&CAN_Handle) != HAL_OK) { return false; } // Enable Interrupt RX Standard CallBack -> CAN1_RX0_IRQHandler if (HAL_CAN_ActivateNotification(&CAN_Handle, CAN_IT_RX_FIFO0_MSG_PENDING) != HAL_OK) { return false; } // Setup Priority e CB CAN_IRQ_RX Enable HAL_NVIC_SetPriority(CAN1_RX0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN1_RX0_IRQn); // Setup Completato return true; } /** * @brief Return false when the hardware doesn't work correctly * */ void exit_false() { TEST_ASSERT_TRUE(false); } /** * @brief Show it when the slave node continues to stay offline after a timeout period * */ void message_slave_offline() { TEST_ASSERT_TRUE_MESSAGE(false, "Slave node is offline"); } /** * @brief Print firmware file size (bytes) * */ void file_sent_to_slave() { TEST_PRINTF("Size: %d (Bytes)", getDataFileInfo(state.slave[queueId].file.filename, state.slave[queueId].file.is_firmware)); } /** * @brief Test: check if the firmware file exists * */ void test_firmware_file_exists() { TEST_ASSERT_TRUE_MESSAGE(ccFirwmareFile(state.slave[queueId].file.filename), "The file does not exist"); } /** * @brief Test: check if the command has been sent to slave * */ void test_command_software_update_sent() { TEST_ASSERT_TRUE_MESSAGE(serviceSendCommand(&state, monotonic_time, queueId, uavcan_node_ExecuteCommand_Request_1_1_COMMAND_BEGIN_SOFTWARE_UPDATE, state.slave[queueId].file.filename, strlen(state.slave[queueId].file.filename)), "Command not sent"); } /** * @brief Test: check if the slave response received from slave is correct * */ void test_success_command_response() { TEST_ASSERT_EQUAL(uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS, state.slave[queueId].command.response); } void setup() { UNITY_BEGIN(); delay(1000); // ****************************************************************************** // ******************************** START TEST ********************************** // ****************************************************************************** if (!setupSd(PIN_SPI_MOSI, PIN_SPI_MISO, PIN_SPI_SCK, PIN_SPI_SS, 18) || !CAN_HW_Init()) { RUN_TEST(exit_false); UNITY_END(); } // ****************************************************************************** // ******************************** END TEST ************************************ // ****************************************************************************** // ******************************************************************************** // FIXED REGISTER_INIT, FARE INIT OPZIONALE x REGISTRI FISSI ECC. E/O INVAR. // ******************************************************************************** #ifdef INIT_REGISTER // Inizializzazione fissa dei registri nella modalità utilizzata (prepare SD/FLASH/ROM con default Value) registerSetup(true); #else // Default dei registri nella modalità utilizzata (prepare SD/FLASH/ROM con default Value) // Creazione dei registri standard base se non esistono registerSetup(false); #endif uavcan_register_Value_1_0 val = {0}; // A simple node like this one typically does not require more than 8 KiB of heap and 4 KiB of stack. // For the background and related theory refer to the following resources: // - https://github.com/OpenCyphal/libcanard/blob/master/README.md // - https://github.com/pavel-kirienko/o1heap/blob/master/README.md // - https://forum.opencyphal.org/t/uavcanv1-libcanard-nunavut-templates-memory-usage-concerns/1118/4 _Alignas(O1HEAP_ALIGNMENT) static uint8_t heap_arena[1024 * 16] = {0}; state.heap = o1heapInit(heap_arena, sizeof(heap_arena)); // The libcanard instance requires the allocator for managing protocol states. state.canard = canardInit(&canardAllocate, &canardFree); state.canard.user_reference = &state; // Make the state reachable from the canard instance. // Default Setup servizi attivi nel modulo state.publisher_enabled.port_list = DEFAULT_PUBLISH_PORT_LIST; // ******************************************************************************** // INIT VALUE, Caricamento default e registri locali MASTER // ******************************************************************************** // Reset Slave node_id per ogni nodo collegato. Solo i nodi validi verranno gestiti for (uint8_t iCnt = 0; iCnt < MAX_NODE_CONNECT; iCnt++) { state.slave[iCnt].node_id = CANARD_NODE_ID_UNSET; state.slave[iCnt].rmap_service.port_id = UINT16_MAX; state.slave[iCnt].rmap_service.module = NULL; #ifdef USE_SUB_PUBLISH_SLAVE_DATA state.slave[iCnt].publisher.subject_id = UINT16_MAX; #endif state.slave[iCnt].file.state = FILE_STATE_STANDBY; } // Canard Master NODE ID Fixed dal defined value in module_config state.canard.node_id = (CanardNodeID)NODE_MASTER_ID; // ******************************************************************************** // READING PARAM FROM E2 MEMORY / FLASH / SDCARD // ******************************************************************************** // TODO: // Read Config Slave Node x Lettura porte e servizi. // Possibilità di utilizzo come sotto (registri) - Fixed Value adesso !!! state.slave[0].node_id = 125; state.slave[0].node_type = MODULE_TYPE_TH; state.slave[0].rmap_service.port_id = 100; #ifdef USE_SUB_PUBLISH_SLAVE_DATA // state.slave[0].subject_id = 5678; #endif state.slave[0].rmap_service.module = malloc(sizeof(rmap_service_module_TH_Response_1_0)); strcpy(state.slave[0].file.filename, "stima4.module_th-1.1.app.hex"); // ********************************************************************************** // Lettura registri, parametri per PNP Allocation Verifica locale di assegnamento CFG // ********************************************************************************** for (uint8_t iCnt = 0; iCnt < MAX_NODE_CONNECT; iCnt++) { // Lettura registro di allocazione PNP MASTER Locale avvenuta, da eseguire // Possibilità di salvare tutte le informazioni di NODO qui al suo interno // Per rendere disponibili le configurazioni in esterno (Yakut, altri) // Utilizzando la struttupra allocateID.XX (count = n° registri utili) char registerName[24] = "rmap.pnp.allocateID."; uavcan_register_Value_1_0_select_natural8_(&val); val.natural8.value.count = 1; val.natural8.value.elements[0] = CANARD_NODE_ID_UNSET; // queueId -> index Val = NodeId itoa(iCnt, registerName + strlen(registerName), 10); registerRead(registerName, &val); // Il Node_id deve essere valido e uguale a quello programmato in configurazione if ((val.natural8.value.elements[0] != CANARD_NODE_ID_UNSET) && (val.natural8.value.elements[0] == state.slave[iCnt].node_id)) { // Assegnamento PNP per nodeQueueID con state.slave[iCnt].node_id // già avvenuto. Non rispondo a eventuali messaggi PNP del tipo per quel nodo state.slave[iCnt].pnp.is_assigned = true; } } // ******************************************************************************** // ********* Lettura Registri standard UAVCAN ********* // ******************************************************************************** // The description register is optional but recommended because it helps constructing/maintaining large networks. // It simply keeps a human-readable description of the node that should be empty by default. uavcan_register_Value_1_0_select_string_(&val); val._string.value.count = 0; registerRead("uavcan.node.description", &val); // We don't need the value, we just need to ensure it exists. // Configura il trasporto dal registro standard uavcan. Default a CANARD_MTU_MAX // Inserito per compatibilità, attualmente non gestita la modifica mtu_bytes (FISSA A MTU_CLASSIC) uavcan_register_Value_1_0_select_natural16_(&val); val.natural16.value.count = 1; val.natural16.value.elements[0] = CANARD_MTU_MAX; registerRead("uavcan.can.mtu", &val); if (val.natural16.value.elements[0] != CANARD_MTU_MAX) { val.natural16.value.count = 1; val.natural16.value.elements[0] = CANARD_MTU_MAX; registerWrite("uavcan.can.mtu", &val); } for (uint8_t ifidx = 0; ifidx < CAN_REDUNDANCY_FACTOR; ifidx++) { state.canard_tx_queues[ifidx] = canardTxInit(CAN_TX_QUEUE_CAPACITY, val.natural16.value.elements[0]); } // ******************************************************************************** // AVVIA SOTTOSCRIZIONI ai messaggi per servizi RPC ecc... // ******************************************************************************** // Service servers: -> Risposta per GetNodeInfo richiesta esterna (Yakut, Altri) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindRequest, uavcan_node_GetInfo_1_0_FIXED_PORT_ID_, uavcan_node_GetInfo_Request_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service servers: -> Chiamata per ExecuteCommand richiesta esterna (Yakut, Altri) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindRequest, uavcan_node_ExecuteCommand_1_1_FIXED_PORT_ID_, uavcan_node_ExecuteCommand_Request_1_1_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service servers: -> Risposta per Accesso ai registri richiesta esterna (Yakut, Altri) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindRequest, uavcan_register_Access_1_0_FIXED_PORT_ID_, uavcan_register_Access_Request_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service servers: -> Risposta per Lista dei registri richiesta esterna (Yakut, Altri) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindMessage, uavcan_register_List_1_0_FIXED_PORT_ID_, uavcan_register_List_Request_1_0_EXTENT_BYTES_, CANARD_REGISTERLIST_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // ******* SOTTOSCRIZIONE MESSAGGI / COMANDI E SERVIZI AD UTILITA' MASTER ******** // Messaggi PNP_Allocation: -> Allocazione dei nodi standard in PlugAndPlay per i nodi conosciuti { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindMessage, uavcan_pnp_NodeIDAllocationData_1_0_FIXED_PORT_ID_, uavcan_pnp_NodeIDAllocationData_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Messaggi HEARTBEAT: -> Verifica della presenza per stato Nodi (Slave) OnLine / OffLine { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindMessage, uavcan_node_Heartbeat_1_0_FIXED_PORT_ID_, uavcan_node_Heartbeat_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service client: -> Risposta per ExecuteCommand richiesta interna (come master) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindResponse, uavcan_node_ExecuteCommand_1_1_FIXED_PORT_ID_, uavcan_node_ExecuteCommand_Response_1_1_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service client: -> Risposta per Accesso ai registri richiesta interna (come master) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindResponse, uavcan_register_Access_1_0_FIXED_PORT_ID_, uavcan_register_Access_Response_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service client: -> Risposta per Read (Receive) File local richiesta esterna (Yakut, Altri) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindResponse, uavcan_file_Read_1_1_FIXED_PORT_ID_, uavcan_file_Read_Response_1_1_EXTENT_BYTES_, CANARD_READFILE_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Service server: -> Risposta per Read (Request Slave) File read archivio (come master) { static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindRequest, uavcan_file_Read_1_1_FIXED_PORT_ID_, uavcan_file_Read_Request_1_1_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } // Allocazione dinamica delle subscription servizi request/response e pubblicazioni dei nodi remoti // in funzione delle registrazioni/istanze utilizzate nel master // Ogni subject utuilizzato per ogni nodo slave deve avere una sottoscrizione propria // Solo una sottoscrizione è possibile per singolo servizio per relativo port_id (dynamic o fixed) // La gestione di servizi con stesso port_id è assolutamente possibile e correttamente gestita // nel software. Basta solamente a livello server registrare lo stesso port_id per servizio. // La funzionailtà cosi impostata consente uno o più port_id x servizio senza problemi // Eventuali errori di allocazione possono eventualmente essere rilevati ma non ci sono problemi // sw in quanto una sottoscrizione chiamata in coda elimina una precedente (con stesso port o subjcect) for (byte queueId = 0; queueId < MAX_NODE_CONNECT; queueId++) { // ************* SERVICE ************* // Se previsto il servizio request/response con port_id valido if ((state.slave[queueId].rmap_service.module) && (state.slave[queueId].rmap_service.port_id <= CANARD_SERVICE_ID_MAX)) { // Controllo le varie tipologie di request/service per il nodo if (state.slave[queueId].node_type == MODULE_TYPE_TH) { // Alloco la stottoscrizione in funzione del tipo di modulo // Service client: -> Risposta per ServiceDataModuleTH richiesta interna (come master) static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindResponse, state.slave[queueId].rmap_service.port_id, rmap_service_module_TH_Response_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } } #ifdef USE_SUB_PUBLISH_SLAVE_DATA // ************* PUBLISH ************* // Se previsto il servizio publisher (subject_id valido) // Non alloco niente per il publish (gestione esempio display o altro debug interno da gestire) if (state.slave[queueId].publisher.subject_id <= CANARD_SUBJECT_ID_MAX) { // Controllo le varie tipologie di request/service per il nodo if (state.slave[queueId].node_type == MODULE_TYPE_TH) { // Alloco la stottoscrizione in funzione del tipo di modulo // Service client: -> Sottoscrizione per ModuleTH (come master) static CanardRxSubscription rx; const int8_t res = // canardRxSubscribe(&state.canard, CanardTransferKindMessage, state.slave[queueId].publisher.subject_id, rmap_module_TH_1_0_EXTENT_BYTES_, CANARD_DEFAULT_TRANSFER_ID_TIMEOUT_USEC, &rx); if (res < 0) NVIC_SystemReset(); } } #endif } // ******************************************************************************** // AVVIA LOOP CANARD PRINCIPALE gestione TX/RX Code -> Messaggi // ******************************************************************************** long checkTimeout = 0; bool bEventRealTimeLoop = false; bool bFileUpload = false; bool bIsResetFaultCmd = false; #define MILLIS_EVENT 10 // Set START Timetable LOOP RX/TX. state.started_at = getMonotonicMicroseconds(&state); CanardMicrosecond next_01_sec_iter_at = state.started_at + MEGA * 0.25; CanardMicrosecond next_timesyncro_msg = state.started_at + MEGA; CanardMicrosecond next_20_sec_iter_at = state.started_at + MEGA * 1.5; CanardMicrosecond test_cmd_cs_iter_at = state.started_at + MEGA * 2.5; CanardMicrosecond test_cmd_response_timeout = state.started_at + MEGA * 10; do { monotonic_time = getMonotonicMicroseconds(&state); // Check TimeLine (quasi RealTime...) if ((millis() - checkTimeout) >= MILLIS_EVENT) { // Deadline di controllo per eventi di controllo Rapidi (TimeOut, FileHandler ecc...) // Mancata risposta, nodo in Errore o Full o CanardHeapError ecc... checkTimeout = millis(); // Utilizzo per eventi quasi continuativi... Es. Send/Receive File queue... bEventRealTimeLoop = true; } // ************************************************************************ // *************** CHECK OFFLINE/DEADLINE COMMAND/STATE *************** // ************************************************************************ // TEST Check ogni RTL circa ( SOLO TEST COMANDI DA INSERIRE IN TASK_TIME ) // Deadline di controllo (checkTimeOut variabile sopra...) if (bEventRealTimeLoop) { // ********************************************************** // Per il nodo locale SERVER local_node_flag // ********************************************************** // Controllo TimeOut Comando file su modulo remoto if (state.master.file.is_pending) { if (monotonic_time > state.master.file.timeout_us) { // Setto il flag di TimeOUT che il master dovrà gestire (segnalazione BUG al Server?) state.master.file.is_timeout = true; } } // ********************************************************** // Per la coda/istanze allocate valide SLAVE remote_node_flag // ********************************************************** for (byte queueId = 0; queueId < MAX_NODE_CONNECT; queueId++) { if (state.slave[queueId].node_id <= CANARD_NODE_ID_MAX) { // Solo se nodo OnLine (Automatic OnLine su HeartBeat RX) if (state.slave[queueId].is_online) { // Controllo TimeOUT Comando diretto su modulo remoto // Mancata risposta, nodo in Errore o Full o CanardHeapError ecc... if (state.slave[queueId].command.is_pending) { if (monotonic_time > state.slave[queueId].command.timeout_us) { // Setto il flag di TimeOUT che il master dovrà gestire (segnalazione BUG al Server?) state.slave[queueId].command.is_timeout = true; } } // Controllo TimeOut Comando getData su modulo remoto // Mancata risposta, nodo in Errore o Full o CanardHeapError ecc... if (state.slave[queueId].rmap_service.is_pending) { if (monotonic_time > state.slave[queueId].rmap_service.timeout_us) { // Setto il flag di TimeOUT che il master dovrà gestire (segnalazione BUG al Server?) state.slave[queueId].rmap_service.is_timeout = true; } } // Controllo TimeOut Comando file su modulo remoto // Mancata risposta, nodo in Errore o Full o CanardHeapError ecc... if (state.slave[queueId].file.is_pending) { if (monotonic_time > state.slave[queueId].file.timeout_us) { // Setto il flag di TimeOUT che il master dovrà gestire (segnalazione BUG al Server?) state.slave[queueId].file.is_timeout = true; } } // Check eventuale Nodo OFFLINE (Ultimo comando sempre perchè posso) // Effettuare eventuali operazioni di SET,RESET Cmd in sicurezza if (monotonic_time > state.slave[queueId].heartbeat.timeout_us) { // Entro in OffLine state.slave[queueId].is_online = false; // Metto i Flag in sicurezza, laddove dove non eventualmente gestito // Eventuali altre operazioni quà su Reset Comandi state.slave[queueId].command.is_pending = false; state.slave[queueId].command.is_timeout = true; state.slave[queueId].register_access.is_pending = false; state.slave[queueId].register_access.is_timeout = true; state.slave[queueId].file.is_pending = false; state.slave[queueId].file.is_timeout = true; state.slave[queueId].file.state = FILE_STATE_STANDBY; state.slave[queueId].rmap_service.is_pending = false; state.slave[queueId].rmap_service.is_timeout = true; bIsResetFaultCmd = true; } } } } } // ************************************************************************** // CANARD UAVCAN // Scheduler temporizzato dei messaggi / comandi da inviare alla rete UAVCAN // ************************************************************************** // FILE HANDLER ( con controllo continuativo se avviato bEventRealTimeLoop ) if (bEventRealTimeLoop) { // Verifica TimeOUT Occurs per File download if (state.master.file.is_timeout) { state.master.file.is_pending = false; state.master.file.is_timeout = false; // Gestione con eventuali Retry N Volte per poi abbandonare state.master.file.updating_retry++; if (state.master.file.updating_retry >= NODE_GETFILE_MAX_RETRY) { state.master.file.updating = false; } } // Verifica file download in corso (entro se in download) if (state.master.file.updating) { // Se messaggio in pending non faccio niente è attendo la conferma del ResetPending // In caso di errore subentrerà il TimeOut e verrà essere gestita la retry if (!state.master.file.is_pending) { // Fine pending, con messaggio OK. Verifico se EOF o necessario altro blocco if (state.master.file.updating_eof) { // Nessun altro evento necessario, chiudo File e stati // procedo all'aggiornamento Firmware dopo le verifiche di conformità // Ovviamente se si tratta di un file firmware state.master.file.updating = false; // Comunico a HeartBeat (Yakut o Altri) l'avvio dell'aggiornamento (se il file è un firmware...) // Per Yakut Pubblicare un HeartBeat prima dell'Avvio quindi con il flag // state->local_node.file.updating_run = true >> HeartBeat Counica Upgrade... if (state.master.file.is_firmware) { state.master.file.updating_run = true; } // Il Firmware Upload dovrà partire necessariamente almeno dopo l'invio completo // di HeartBeat (svuotamento coda), quindi attendiamo 2/3 secondi poi via // Counque non rispondo più ai comandi di update con file.updating_run = true // FirmwareUpgrade(*NameFile)... -> Fra 2/3 secondi dopo HeartBeat } else { // Avvio prima request o nuovo blocco (Set Flag e TimeOut) // Prima request (state.local_node.file.offset == 0) // Firmmware Posizione blocco gestito automaticamente in sequenza Request/Read state.master.file.is_pending = true; state.master.file.is_timeout = false; state.master.file.timeout_us = monotonic_time + NODE_GETFILE_TIMEOUT_US; // Gestione retry (incremento su TimeOut/Error) Automatico in Init/Request-Response // Esco se raggiunga un massimo numero di retry x Frame... sopra // Get Data Block per popolare il File // Se il Buffer è pieno = 256 Caratteri è necessario continuare // Altrimenti se inferiore o (0 Compreso) il trasferimento file termina. // Se = 0 il blocco finale non viene considerato ma serve per il protocollo // Se l'ultimo buffer dovesse essere pieno discrimina l'eventualità di MaxBuf==Eof handleFileReadBlock_1_1(&state, monotonic_time); } } } } // LOOP HANDLER >> 1 SECONDO << HEARTBEAT if (monotonic_time >= next_01_sec_iter_at) { next_01_sec_iter_at += MEGA; handleNormalLoop(&state, monotonic_time); } // LOOP HANDLER >> 1 SECONDO << TIME SYNCRO (alternato 0.5 sec con Heartbeat) // Disattivo con Firware Upgrade locale... if (monotonic_time >= next_timesyncro_msg) { next_timesyncro_msg += MEGA; handleSyncroLoop(&state, monotonic_time); } // LOOP HANDLER >> 20 SECONDI PUBLISH SERVIZI << // Disattivo con Firware Upgrade locale... if (monotonic_time >= next_20_sec_iter_at) { next_20_sec_iter_at += MEGA * 20; handleSlowLoop(&state, monotonic_time); } // ******************************************************************************************** // ************************************* START TEST ******************************************* // ******************************************************************************************** if (state.slave[queueId].is_online && test_state == INIT) { bFileUpload = true; // N.B.!!! Si tratta di un file di firmware... nel TEST state.slave[queueId].file.is_firmware = true; state.slave[queueId].file.state = FILE_STATE_BEGIN_UPDATE; test_state = PROCESSING; } if (bFileUpload) { // Se vado OffLine la procedura comunque viene interrotta dall'evento di OffLine switch (state.slave[queueId].file.state) { default: // -->> FILE_STATE_STANDBY: bFileUpload = false; break; case FILE_STATE_BEGIN_UPDATE: // Avvio comando di aggiornamento Controllo coerenza Firmware se Firmware!!! // Verifico il nome File locale (che RMAP Server ha già inviato il file in HTTP...) if (state.slave[queueId].file.is_firmware) { RUN_TEST(test_firmware_file_exists); if (ccFirwmareFile(state.slave[queueId].file.filename)) { // Avvio il comando nel nodo remoto state.slave[queueId].file.state = FILE_STATE_COMMAND_SEND; } else { // Gestisco l'errore di coerenza verso il server // Comunico il problema nel file state.slave[queueId].file.state = FILE_STATE_STANDBY; } } else { state.slave[queueId].file.state = FILE_STATE_STANDBY; } break; case FILE_STATE_COMMAND_SEND: // Invio comando di aggiornamento File (in attesa in coda con switch...) // Il comando viene inviato solamente senza altri Pending di Comandi (come semaforo) if (!state.slave[queueId].command.is_pending) { // Imposta il pending del comando per verifica sequenza TX-RX e il TimeOut // Imposta la risposta del comadno A UNDEFINED (verrà settato al valore corretto in risposta) state.slave[queueId].command.is_pending = true; state.slave[queueId].command.is_timeout = false; state.slave[queueId].command.timeout_us = monotonic_time + NODE_COMMAND_TIMEOUT_US; state.slave[queueId].command.response = GENERIC_BVAL_UNDEFINED; // Il comando comunica la presenza del file di download nel remoto e avvia dowload if (state.slave[queueId].file.is_firmware) { RUN_TEST(test_command_software_update_sent); // Uavcan Firmware serviceSendCommand(&state, monotonic_time, queueId, uavcan_node_ExecuteCommand_Request_1_1_COMMAND_BEGIN_SOFTWARE_UPDATE, state.slave[queueId].file.filename, strlen(state.slave[queueId].file.filename)); } state.slave[queueId].file.state = FILE_STATE_COMMAND_WAIT; } break; case FILE_STATE_COMMAND_WAIT: // Attendo la risposta del Nodo Remoto conferma, errore o TimeOut if (state.slave[queueId].command.is_timeout) { // Counico al server l'errore di timeOut Command Update Start ed esco state.slave[queueId].file.state = FILE_STATE_STANDBY; // Se decido di uscire nella procedura di OffLine, la comunicazione // al server di eventuali errori deve essere gestita al momento dell'OffLine } else { // Attendo esecuzione del comando/risposta senza sovrapposizioni // di comandi. Come gestione semaforo. Chi invia deve gestire if (!state.slave[queueId].command.is_pending) { RUN_TEST(test_success_command_response); // La risposta si trova in command_response fon flag pending azzerrato. if (state.slave[queueId].command.response == uavcan_node_ExecuteCommand_Response_1_1_STATUS_SUCCESS) { // Sequenza terminata, avvio il file transfer !!! state.slave[queueId].file.state = FILE_STATE_UPLOADING; // Imposto il timeOUT per controllo Deadline sequenza di download // SE il client si ferma per troppo tempo incorro in TimeOut ed esco state.slave[queueId].file.timeout_us = monotonic_time + NODE_REQFILE_TIMEOUT_US; // Avvio la funzione (Slave attiva le request) // Localmente sono in gestione continua file fino a EOF o TimeOUT state.slave[queueId].file.is_pending = true; state.slave[queueId].file.is_timeout = false; // Il TimeOut deadLine è aggiornato in RX Request in automatico } else { // Counico al server l'errore per il mancato aggiornamento ed esco state.slave[queueId].file.state = FILE_STATE_STANDBY; } } } break; case FILE_STATE_UPLOADING: // Attendo la risposta del Nodo Remoto conferma, errore o TimeOut if (state.slave[queueId].file.is_timeout) { // Counico al server l'errore di timeOut Command Update Start ed esco state.slave[queueId].file.state = FILE_STATE_STANDBY; // Se decido di uscire nella procedura di OffLine, la comunicazione // al server di eventuali errori deve essere gestita al momento dell'OffLine } break; case FILE_STATE_UPLOAD_COMPLETE: // Counico al server file upload Complete ed esco (nuova procedura ready) // -> EXIT FROM FILE_STATE_STANDBY ( In procedura di SendFileBlock ) // Quando invio l'ultimo pacchetto dati valido ( Blocco < 256 Bytes ) state.slave[queueId].file.state = FILE_STATE_STANDBY; break; } } // ******************************************************************************************** // ************************************* END TEST ********************************************* // ******************************************************************************************** // Fine handler quasi RealTime... // Attendo nuovo evento per rielaborare // Utilizzato per blinking Led (TX/RX) if (bEventRealTimeLoop) { bEventRealTimeLoop = false; }; // RESET Gestione Fault di NODO TODO: Eliminare solo per verifica test bIsResetFaultCmd = false; // *************************************************************************** // Gestione Coda messaggi in trasmissione (ciclo di svuotamento messaggi) // *************************************************************************** // Transmit pending frames from the prioritized TX queues managed by libcanard. for (uint8_t ifidx = 0; ifidx < CAN_REDUNDANCY_FACTOR; ifidx++) { CanardTxQueue* const que = &state.canard_tx_queues[ifidx]; const CanardTxQueueItem* tqi = canardTxPeek(que); // Find the highest-priority frame. while (tqi != NULL) { // Delay Microsecond di sicurezza in Send (Migliora sicurezza RX Pacchetti) // Da utilizzare con CPU poco performanti in RX o con controllo Polling gestito Canard #if (CAN_DELAY_US_SEND > 0) delayMicroseconds(CAN_DELAY_US_SEND); #endif // Attempt transmission only if the frame is not yet timed out while waiting in the TX queue. // Otherwise just drop it and move on to the next one. if ((tqi->tx_deadline_usec == 0) || (tqi->tx_deadline_usec > monotonic_time)) { // Non-blocking write attempt. if (bxCANPush(0, monotonic_time, tqi->tx_deadline_usec, tqi->frame.extended_can_id, tqi->frame.payload_size, tqi->frame.payload)) { // Imposto il timestamp reale della trasmissione syncronization_time // Essendo a priorità immediata (unico) è il primo pacchetto comunque a partire // Una volta attivata la funzione setto il bool relativo e resetto all'invio if (state.master.timestamp.enable_immediate_tx_real) { // Reset var RealTimeStamp state.master.timestamp.enable_immediate_tx_real = false; // Salvo RealTimeStamp letto dal tempo monotonic // TODO: Inviare il vero timeStamp letto da RTC per syncro remoto state.master.timestamp.previous_tx_real = getMonotonicMicroseconds(&state); } state.canard.memory_free(&state.canard, canardTxPop(que, tqi)); tqi = canardTxPeek(que); } else { // Empty Queue break; } } else { // loop continuo per mancato aggiornamento monotonic_time su TIME_OUT // grandi quantità di dati trasmesse e raggiunto il TIMEOUT Subscription... // Remove frame per blocco in timeout BUG trasmission security !!! state.canard.memory_free(&state.canard, canardTxPop(que, tqi)); // Test prossimo pacchetto tqi = canardTxPeek(que); } } } // *************************************************************************** // Gestione Coda messaggi in ricezione (ciclo di caricamento messaggi) // *************************************************************************** // Gestione con Intererupt RX Only esterean (verifica dati in coda gestionale) if (bxCANRxQueueDataPresent()) { // Leggo l'elemento disponibile in coda BUFFER RX FiFo CanardFrame + Buffer byte getElement = bxCANRxQueueNextElement(canard_rx_queue.rd_ptr); canard_rx_queue.rd_ptr = getElement; // Passaggio CanardFrame Buffered alla RxAccept CANARD // DeadLine a partire da getMonotonicMicroseconds() realTime assoluto const CanardMicrosecond timestamp_usec = getMonotonicMicroseconds(&state); CanardRxTransfer transfer; const int8_t canard_result = canardRxAccept(&state.canard, timestamp_usec, &canard_rx_queue.msg[getElement].frame, IFACE_CAN_IDX, &transfer, NULL); if (canard_result > 0) { processReceivedTransfer(&state, &transfer); state.canard.memory_free(&state.canard, (void*)transfer.payload); } else if ((canard_result == 0) || (canard_result == -CANARD_ERROR_OUT_OF_MEMORY)) { (void)0; // The frame did not complete a transfer so there is nothing to do. // OOM should never occur if the heap is sized correctly. You can track OOM errors via heap API. } } } while ((!state.flag.g_restart_required) && (monotonic_time <= test_cmd_response_timeout)); if ((monotonic_time > test_cmd_response_timeout) && (test_state == INIT)) RUN_TEST(message_slave_offline); UNITY_END(); } void loop() { } #endif
[ "m.gasperini@digiteco.it" ]
m.gasperini@digiteco.it
0d77084f5fc90bcc96d7837da77838b51f9d21b1
b4f8cd7070dbee7a8926494009b8d72dcf7b9a4b
/Engine/Renderer/Images/Image.hpp
d3134e899f50ffbbd88f1cc773dd0b67106f41a2
[]
no_license
itsdrell/Guardian
70228b913cc58eeca01e7ef013790efee70c12f6
e4b95a97753bc2d4f30c1115fcd8d3be39759667
refs/heads/master
2022-12-25T07:58:32.102672
2020-10-08T07:42:22
2020-10-08T07:42:22
284,383,285
0
0
null
null
null
null
UTF-8
C++
false
false
1,976
hpp
#pragma once #include "Engine/Math/Vectors/IntVector2.hpp" #include "Engine/Core/General/Rgba.hpp" #include "Engine/Core/General/EngineCommon.hpp" //==================================================================================== // Forward Declare //==================================================================================== //==================================================================================== // Type Defs + Defines //==================================================================================== //==================================================================================== // ENUMS //==================================================================================== //==================================================================================== // Structs //==================================================================================== //==================================================================================== // Classes //==================================================================================== class Image { public: ~Image(); Image(); Image(const String& name, const IntVector2& dimension, const Rgba& color); public: unsigned char* GetColorCharPointer() const; public: String m_path; IntVector2 m_dimensions; std::vector<Rgba> m_colors; }; //==================================================================================== // Standalone C Functions //==================================================================================== //==================================================================================== // Externs //==================================================================================== //==================================================================================== // Written by Zachary Bracken : [10/6/2020] //====================================================================================
[ "ztbracken@gmail.com" ]
ztbracken@gmail.com
89e50c29e190c9801702af1ccee14bdc8f784c98
78f32dd171f0fc91f795df12ad45bc1adb5a58f7
/Dec13.cpp
1fc96f9ed095aee815768cfe807b2ac67c73e126
[]
no_license
braugord/adventofcode_2020
9e001353ad79fecc169e381a69404efe2da9b053
0c79c4526589ead7d266b61be239f9bc27332635
refs/heads/main
2023-03-11T20:29:54.775896
2021-03-01T08:58:15
2021-03-01T08:58:15
317,964,289
0
0
null
null
null
null
UTF-8
C++
false
false
2,514
cpp
#include "Advent_of_code.h" #include <string> #include <fstream> #include <sstream> #include <vector> #include <iostream> #include "BigInt.h" int Part1(int timestamp, std::vector<int>& ids) { int closest = INT_MAX; int closestIndex = 0; for (int i = 0; i < ids.size(); i++) { int departure = (timestamp / ids[i] + 1) * ids[i] - timestamp; if (departure < closest) { closest = departure; closestIndex = i; } } int result = closest * ids[closestIndex]; return result; } /* 29,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,37,x,x,x,x,x,467,x,x,x,x,x,x,x,23,x,x,x,x,13,x,x,x,17,x,19,x,x,x,x,x,x,x,x,x,x,x,443,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,41 find number N, where N % 29 == 0 N + 23 % 37 == 0 */ BigInt Part2(std::vector<int>& ids) { std::vector<BigInt> steps(ids.size()); BigInt step = ids[0]; int latestindex = 0; for (BigInt timestamp = 0; ; timestamp += step) { std::cout << timestamp << "\n"; if (timestamp % ids[0] == 0) { int offset = 1; for (int j = 1; j <= ids.size(); j++) { if (j == ids.size()) { return timestamp ; } if (ids[j] <= 0) { offset -= ids[j]; continue; } if ((timestamp + offset) % ids[j] == 0) { if (j > latestindex) { if (steps[latestindex] == 0) { steps[latestindex] = timestamp; } else { if (timestamp != steps[latestindex]) { steps[latestindex] = timestamp - steps[latestindex]; step = steps[latestindex]; } latestindex = j; } } offset++; continue; } break; } } else { } } return -1; } void Dec13::Puzzle() { std::string line = ""; std::ifstream file("Dec13_PuzzleInput.txt"); int timestamp = 0; std::vector<int> part1; std::vector<int> part2; if (file.is_open()) { std::getline(file, line); timestamp = std::stoi(line); while (std::getline(file, line)) { std::stringstream ss(line); std::string s; while (std::getline(ss, s, ',')) { if (s[0] == 'x') { if (part2[part2.size() - 1] < 0) part2[part2.size() - 1]--; else part2.push_back(-1); } else { part1.push_back(std::stoi(s)); part2.push_back(std::stoi(s)); } } } } /*int result1 = Part1(timestamp, part1); std::cout << "Part1 " << result1 << std::endl;*/ BigInt result2 = Part2(part2); std::cout << "Part2 = " << result2 << std::endl; return; }
[ "braugord@yahoo.se" ]
braugord@yahoo.se
f10451b9b7edeeed4cc111a730aa663d56464610
a94dc2dbb44228a5bc9907f07b2d273a3c469c00
/UID_CHECK.ino
5e3b5dc7c83ecc457b2eb68a34ba904e0e06a853
[ "MIT" ]
permissive
street-smart/ATMASS
7a09befc531b801f13328bbe0cc36f299e6b4812
d46ec973d01505cc4a4b78565183082717862abb
refs/heads/master
2023-04-12T06:16:47.644968
2021-05-16T16:06:12
2021-05-16T16:06:12
367,363,350
0
0
null
2021-05-16T15:53:23
2021-05-14T12:58:39
C++
UTF-8
C++
false
false
472
ino
#include <SPI.h> #include <MFRC522.h> #define SS_PIN 10 #define RST_PIN 9 MFRC522 mfrc522(SS_PIN, RST_PIN); void setup() { Serial.begin(9600); SPI.begin(); mfrc522.PCD_Init(); Serial.println("Scan PICC to see UID and type..."); } void loop() { if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } if ( ! mfrc522.PICC_ReadCardSerial()) { return; } mfrc522.PICC_DumpToSerial(&(mfrc522.uid)); }
[ "yashtdesai.19@gmail.com" ]
yashtdesai.19@gmail.com
832e3717cfcb6a44ce5c2cfd8f0cd904ec03dd83
2107cf68d6b0a763d3bf83269edec54e502a17f3
/main.cpp
d2d9d5870853d08fd8743bd8ab42af650334a2e5
[]
no_license
Team-1389-Archives/robotRIO2015-1389
cfee8837fe5498e4cefd4b217e5792ef476e4b1f
250713b7352beeaf70d6d7df82edd49f682c0d61
refs/heads/master
2020-05-19T14:59:21.750785
2015-01-17T20:14:13
2015-01-17T20:14:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
71
cpp
#include "MyRobot.h" #include "WPILib.h" START_ROBOT_CLASS(MyRobot);
[ "paullo101123@gmail.com" ]
paullo101123@gmail.com
3b3ce69ccb09d3222a7813d67f8e22e0823bca9c
6f66b1c5605063e67abd1d63f38d8fb86bf2c511
/hw4/getsym.h
1c6d8e3c0c5a764514e0c37b64a847b7eb09a181
[]
no_license
CJAPPLE5/Compile
b2d87b499831a1fa125a5ebe27f17832ee4a5337
ce7052cf19f9ec09435a4d155a6c31f47803ed34
refs/heads/master
2022-12-30T02:17:40.821283
2020-10-22T01:20:40
2020-10-22T01:20:40
306,188,023
0
0
null
null
null
null
UTF-8
C++
false
false
7,211
h
#ifndef GETSYMM #define GETSYMM #include<iostream> #include<string> #include<map> #include<string.h> #include<fstream> #include"variable.h" using namespace std; char getcharr() { char c; if (read_index == strlen(buff)) { line++; column = 0; if (fgets(buff, Maxlength, fp) == 0) { c = EOF; return c; } read_index = 0; } c = buff[read_index++]; column++; return c; } void clearToekn() { token[0] = 0; length = 0; } int isSpace() { return charr == ' '; } int isNewline() { return charr == '\n' || charr == '\r'; } int isTab() { return charr == '\t'; } int isLetter() { return (charr <= 'z' && charr >= 'a') || (charr <= 'Z' && charr >= 'A') || (charr == '_'); } int isDigit() { return (charr >= '0' && charr <= '9'); } int isColon() { return charr == ':'; } int isComma() { return charr == ','; } int isSemi() { return charr == ';'; } int isEqu() { return charr == '='; } int isPlus() { return charr == '+'; } int isMinus() { return charr == '-'; } int isDivi() { return charr == '/'; } int isStar() { return charr == '*'; } int isLpar() { return charr == '('; } int isRpar() { return charr == ')'; } int isSQua() { return charr == '\''; } int isQua() { return charr == '"'; } int isWow() { return charr == '!'; } int isLess() { return charr == '<'; } int isGre() { return charr == '>'; } int isStringElement() { return (charr == 32) || (charr == 33) || (charr >= 35 && charr <= 126); } //void error() //{ // printf("Line:%d, index:%d may has an error!\n",line,column); // printf("%c\n",charr); //} void catToken() { token[length++] = charr; token[length] = 0; } void retract(int step = 1) { read_index -= step; } char to_lower(char c) { if (c >= 'A' && c <= 'Z') { return c - 'A' + 'a'; } else { return c; } } int compare(char a[], char *b) { if (strlen(a) != strlen(b)) { return 0; } else { for(int i=0;i < strlen(a);i++) { if (to_lower(a[i]) != to_lower(b[i])) { return 0; } } return 1; } } //sb search enum types reserver() { if (compare((char*)"const",token)) { return CONSTTK; } else if (compare((char*)"int",token)) { return INTTK; } else if (compare((char*)"char",token)) { return CHARTK; } else if (compare((char*)"void",token)) { return VOIDTK; } else if(compare((char*)"main",token)) { return MAINTK; } else if (compare((char*)"if",token)) { return IFTK; } else if (compare((char*)"else",token)) { return ELSETK; } else if (compare((char*)"switch",token)) { return SWITCHTK; } else if (compare((char*)"case",token)) { return CASETK; } else if (compare((char*)"default",token)) { return DEFAULTTK; } else if (compare((char*)"while",token)) { return WHILETK; } else if (compare((char*)"for",token)) { return FORTK; } else if (compare((char*)"scanf",token)) { return SCANFTK; } else if (compare((char*)"printf",token)) { return PRINTFTK; } else if (compare((char*)"return",token)) { return RETURNTK; } else { return NOTRESERVED; } } int transNum(char * tokens) { int i = 0,num = 0,d = 1; for (i = strlen(tokens) - 1; i >= 0;i--,d*=10) { num += (tokens[i] - '0') * d; } return num; } int getsym() { clearToekn(); charr = getcharr(); while (isSpace() || isNewline() || isTab()) { /* code */ charr = getcharr(); } if(charr == EOF) { return -1; } if (isLetter()) { while (isLetter() || isDigit()) { /* code */ catToken(); charr = getcharr(); } retract(); enum types resultValue = reserver(); if (resultValue == NOTRESERVED) { symbol = IDENFR; } else { symbol = resultValue; } }//鏍囪瘑绗﹀強淇濈暀瀛? else if(isDigit()) { while (isDigit()) { /* code */ catToken(); charr = getcharr(); } retract(); num = transNum(token); symbol = INTCON; }//鏁村舰甯搁噺 else if(isSQua()){ charr = getcharr(); catToken(); charr = getcharr(); symbol = CHARCON; }//瀛楃?甯搁噺 else if(isQua()) { charr = getcharr(); while(isStringElement()) { catToken(); charr = getcharr(); } symbol = STRCON; }//瀛楃?涓? else if (isWow()) { catToken(); charr = getcharr(); if (charr == '=') { catToken(); symbol = NEQ; } else { error(); } }//!= else if (isLess()) { catToken(); charr = getcharr(); if(isEqu()) { symbol = LEQ; catToken(); } else { symbol = LSS; retract(); } }// <,<= else if (isGre()) { catToken(); charr = getcharr(); if(isEqu()) { symbol = GEQ; catToken(); } else { symbol = GRE; retract(); } }// >,>= else if(isEqu()) { catToken(); charr = getcharr(); if(isEqu()) { symbol = EQL; catToken(); } else { symbol = ASSIGN; retract(); } } else { for(int i = single_begin; i < 28; i++) { if (charr == single_reseved_names[i][0]) { catToken(); symbol = reserved[i]; break; } } } return 1; } void print_word() { /* output.append(lefts[symbol]); output.push_back(' '); output.append(token); output.push_back('\n'); */ //outfile<< lefts[symbol] <<" "<<token << endl; } void print_grammer(enum nodes node) { /* error string grammer = nodes_output[node]; output.append(grammer); output.push_back('\n'); */ /*grammer_node = VARIBALE_DESCRIP; outfile << nodes_output[grammer_node] << endl;*/ } void print_error(enum errors temp_error) { error_output << line << ' ' << 'a' + temp_error << endl; } void insert_output(string s,int insert_index) { /*output.insert(insert_index, s);*/ } void write2file() { /*outfile << output; output = string("");*/ } #endif // !1
[ "2081531631@qq.com" ]
2081531631@qq.com
70a85fef522d8334979b0b7401d0788ce8c17328
7d0672a3e8e7a30c067e27b9ce0b8b809e831489
/interactiveToyCode/xlExport.cpp
bbeeb8e66a9fd390fb927cc8b7164609d3ade985
[]
no_license
jbulow/CompFinLecture
a6a649ffa120450d63d19b071f811d9d4a836a08
7d6a24bfd6c9d32c96ec684cfca0b8654cb5549e
refs/heads/master
2022-03-26T15:55:17.679256
2019-12-20T16:50:35
2019-12-20T16:50:35
262,507,563
1
0
null
2020-05-09T06:44:58
2020-05-09T06:44:57
null
UTF-8
C++
false
false
10,310
cpp
/* Written by Antoine Savine in 2018 This code is the strict IP of Antoine Savine License to use and alter this code for personal and commercial applications is freely granted to any person or company who purchased a copy of the book Modern Computational Finance: AAD and Parallel Simulations Antoine Savine Wiley, 2018 As long as this comment is preserved at the top of the file */ // Excel export wrappers to functions in main.h #pragma warning(disable:4996) #include "toyCode.h" #define WIN32_LEAN_AND_MEAN #define NOMINMAX #include <windows.h> #include "xlcall.h" #include "xlframework.h" #include "xlOper.h" // Helpers struct NumericalParam { bool useSobol; int numPath; int seed1 = 12345; int seed2 = 1234; }; NumericalParam xl2num( const double useSobol, const double seed1, const double seed2, const double numPath) { NumericalParam num; num.numPath = static_cast<int>(numPath + EPS); if (seed1 >= 1) { num.seed1 = static_cast<int>(seed1 + EPS); } else { num.seed1 = 1234; } if (seed2 >= 1) { num.seed2 = static_cast<int>(seed2 + EPS); } else { num.seed2 = num.seed1 + 1; } num.useSobol = useSobol > EPS; return num; } // Wrappers extern "C" __declspec(dllexport) double xToyDupireBarrierMc( // model parameters double spot, FP12* spots, FP12* times, FP12* vols, double mat, double strike, double barrier, double paths, double steps, double epsilon, double useSobol, double seed1, double seed2) { FreeAllTempMemory(); // Make sure we have paths and steps if (paths <= 0.0 || steps <= 0.0) return -1; // Unpack if (spots->rows * spots->columns * times->rows * times->columns != vols->rows * vols->columns) { return -1; } vector<double> vspots = to_vector(spots); vector<double> vtimes = to_vector(times); matrix<double> vvols = to_matrix(vols); // Random Number Generator unique_ptr<RNG> rng; if (useSobol > 0.5) rng = make_unique<Sobol>(); else rng = make_unique<mrg32k3a>(seed1 > 0.5 ? int(seed1): 12345, seed2 > 0.5? int(seed2): 123456); rng->init(int(steps)); // Call and return return toyDupireBarrierMc(spot, vspots, vtimes, vvols, mat, strike, barrier, int(paths), int(steps), 100*epsilon, *rng); } extern "C" __declspec(dllexport) double xToyDupireBarrierMcV2( double spot, FP12* spots, FP12* times, FP12* vols, double mat, double strike, double barrier, double monitoring, double batches, double paths, double maxDt, double epsilon, double useSobol, double seed1, double seed2) { FreeAllTempMemory(); // Make sure we have paths and steps if (paths <= 0.0 || monitoring <= 0.0 || maxDt <= 0.0) return -1; // Unpack if (spots->rows * spots->columns * times->rows * times->columns != vols->rows * vols->columns) { return -1; } vector<double> vspots = to_vector(spots); vector<double> vtimes = to_vector(times); matrix<double> vvols = to_matrix(vols); // Random Number Generator unique_ptr<RNG> rng; if (useSobol > 0.5) rng = make_unique<Sobol>(); else rng = make_unique<mrg32k3a>(seed1 > 0.5 ? int(seed1): 12345, seed2 > 0.5? int(seed2): 123456); // Call and return return toyDupireBarrierMcV2(spot, vspots, vtimes, vvols, mat, strike, barrier, monitoring, int (batches), int(paths), maxDt, 100*epsilon, *rng); } extern "C" __declspec(dllexport) LPXLOPER12 xToyDupireBarrierMcRisks( // model parameters double spot, FP12* spots, FP12* times, FP12* vols, double mat, double strike, double barrier, double paths, double steps, double epsilon, double useSobol, double seed1, double seed2) { FreeAllTempMemory(); // Make sure we have paths and steps if (paths <= 0.0 || steps <= 0.0) TempErr12(xlerrNA); // Unpack if (spots->rows * spots->columns * times->rows * times->columns != vols->rows * vols->columns) { return TempErr12(xlerrNA); } vector<double> vspots = to_vector(spots); vector<double> vtimes = to_vector(times); matrix<double> vvols = to_matrix(vols); // Random Number Generator unique_ptr<RNG> rng; if (useSobol > 0.5) rng = make_unique<Sobol>(); else rng = make_unique<mrg32k3a>(seed1 > 0.5 ? int(seed1): 12345, seed2 > 0.5? int(seed2): 123456); rng->init(int(steps)); // Call double price, delta; matrix<double> vegas(vvols.rows(), vvols.cols()); toyDupireBarrierMcRisks(spot, vspots, vtimes, vvols, mat, strike, barrier, int(paths), int(steps), 100*epsilon, *rng, price, delta, vegas); // Pack and return LPXLOPER12 results = TempXLOPER12(); resize(results, 2 + vegas.rows()*vegas.cols(), 1); setNum(results, price, 0, 0); setNum(results, delta, 1, 0); size_t r = 2; for (int i=0; i<vegas.rows(); ++i) for (int j=0; j<vegas.cols(); ++j) { setNum(results, vegas[i][j], r, 0); ++r; } return results; } extern "C" __declspec(dllexport) LPXLOPER12 xToyDupireBarrierMcRisksV2( double spot, FP12* spots, FP12* times, FP12* vols, double mat, double strike, double barrier, double monitoring, double batches, double paths, double maxDt, double epsilon, double useSobol, double seed1, double seed2) { FreeAllTempMemory(); // Make sure we have paths and steps if (paths <= 0.0 || monitoring <= 0.0 || maxDt <= 0.0) return TempErr12(xlerrNA); // Unpack if (spots->rows * spots->columns * times->rows * times->columns != vols->rows * vols->columns) { return TempErr12(xlerrNA); } vector<double> vspots = to_vector(spots); vector<double> vtimes = to_vector(times); matrix<double> vvols = to_matrix(vols); // Random Number Generator unique_ptr<RNG> rng; if (useSobol > 0.5) rng = make_unique<Sobol>(); else rng = make_unique<mrg32k3a>(seed1 > 0.5 ? int(seed1): 12345, seed2 > 0.5? int(seed2): 123456); // Call double price, delta; matrix<double> vegas(vvols.rows(), vvols.cols()); toyDupireBarrierMcRisksV2(spot, vspots, vtimes, vvols, mat, strike, barrier, monitoring, int(batches), int(paths), maxDt, 100*epsilon, *rng, price, delta, vegas); // Pack and return LPXLOPER12 results = TempXLOPER12(); resize(results, 2 + vegas.rows()*vegas.cols(), 1); setNum(results, price, 0, 0); setNum(results, delta, 1, 0); size_t r = 2; for (int i=0; i<vegas.rows(); ++i) for (int j=0; j<vegas.cols(); ++j) { setNum(results, vegas[i][j], r, 0); ++r; } return results; } // Registers extern "C" __declspec(dllexport) int xlAutoOpen(void) { XLOPER12 xDLL; Excel12f(xlGetName, &xDLL, 0); Excel12f(xlfRegister, 0, 11, (LPXLOPER12)&xDLL, (LPXLOPER12)TempStr12(L"xToyDupireBarrierMc"), (LPXLOPER12)TempStr12(L"BBK%K%K%BBBBBBBBB"), (LPXLOPER12)TempStr12(L"xToyDupireBarrierMc"), (LPXLOPER12)TempStr12(L"spot, spots, times, vols, mat, strike, barrier, paths, steps, epsilon, useSobol, [seed1], [seed2]"), (LPXLOPER12)TempStr12(L"1"), (LPXLOPER12)TempStr12(L"myOwnCppFunctions"), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L"Toy Dupire Barrier MC"), (LPXLOPER12)TempStr12(L"")); Excel12f(xlfRegister, 0, 11, (LPXLOPER12)&xDLL, (LPXLOPER12)TempStr12(L"xToyDupireBarrierMcV2"), (LPXLOPER12)TempStr12(L"BBK%K%K%BBBBBBBBBBB"), (LPXLOPER12)TempStr12(L"xToyDupireBarrierMcV2"), (LPXLOPER12)TempStr12(L"spot, spots, times, vols, mat, strike, barrier, monitoring, batches, paths, maxDt, epsilon, useSobol, [seed1], [seed2]"), (LPXLOPER12)TempStr12(L"1"), (LPXLOPER12)TempStr12(L"myOwnCppFunctions"), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L"Toy Dupire Barrier MC - V2"), (LPXLOPER12)TempStr12(L"")); Excel12f(xlfRegister, 0, 11, (LPXLOPER12)&xDLL, (LPXLOPER12)TempStr12(L"xToyDupireBarrierMcRisks"), (LPXLOPER12)TempStr12(L"QBK%K%K%BBBBBBBBB"), (LPXLOPER12)TempStr12(L"xToyDupireBarrierMcRisks"), (LPXLOPER12)TempStr12(L"spot, spots, times, vols, mat, strike, barrier, paths, steps, epsilon, useSobol, [seed1], [seed2]"), (LPXLOPER12)TempStr12(L"1"), (LPXLOPER12)TempStr12(L"myOwnCppFunctions"), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L"Toy Dupire Barrier MC AAD risks"), (LPXLOPER12)TempStr12(L"")); Excel12f(xlfRegister, 0, 11, (LPXLOPER12)&xDLL, (LPXLOPER12)TempStr12(L"xToyDupireBarrierMcRisksV2"), (LPXLOPER12)TempStr12(L"QBK%K%K%BBBBBBBBBBB"), (LPXLOPER12)TempStr12(L"xToyDupireBarrierMcRisksV2"), (LPXLOPER12)TempStr12(L"spot, spots, times, vols, mat, strike, barrier, monitoring, batches, paths, maxDt, epsilon, useSobol, [seed1], [seed2]"), (LPXLOPER12)TempStr12(L"1"), (LPXLOPER12)TempStr12(L"myOwnCppFunctions"), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L""), (LPXLOPER12)TempStr12(L"Toy Dupire Barrier MC AAD risks"), (LPXLOPER12)TempStr12(L"")); /* Free the XLL filename */ Excel12f(xlFree, 0, 1, (LPXLOPER12)&xDLL); return 1; } extern "C" __declspec(dllexport) int xlAutoClose(void) { return 1; }
[ "asavine@users.noreply.github.com" ]
asavine@users.noreply.github.com
e3b38dd6b3d3d3383da7781645a9456205a56cd3
c26dc7928b1facac2c0912f6532076d35c19e835
/devel/include/moveit_msgs/MoveGroupActionFeedback.h
90b59f502dc9d0fd995c611ff2a14cb15e15d670
[]
no_license
mattedminster/inmoov_ros
33c29a2ea711f61f15ad5e2c53dd9db65ef6437f
e063a90b61418c3612b8df7876a633bc0dc2c428
refs/heads/master
2021-01-23T02:39:36.090746
2017-08-09T02:56:42
2017-08-09T02:56:42
85,995,826
0
0
null
2017-03-23T20:45:32
2017-03-23T20:45:32
null
UTF-8
C++
false
false
10,250
h
// Generated by gencpp from file moveit_msgs/MoveGroupActionFeedback.msg // DO NOT EDIT! #ifndef MOVEIT_MSGS_MESSAGE_MOVEGROUPACTIONFEEDBACK_H #define MOVEIT_MSGS_MESSAGE_MOVEGROUPACTIONFEEDBACK_H #include <string> #include <vector> #include <map> #include <ros/types.h> #include <ros/serialization.h> #include <ros/builtin_message_traits.h> #include <ros/message_operations.h> #include <std_msgs/Header.h> #include <actionlib_msgs/GoalStatus.h> #include <moveit_msgs/MoveGroupFeedback.h> namespace moveit_msgs { template <class ContainerAllocator> struct MoveGroupActionFeedback_ { typedef MoveGroupActionFeedback_<ContainerAllocator> Type; MoveGroupActionFeedback_() : header() , status() , feedback() { } MoveGroupActionFeedback_(const ContainerAllocator& _alloc) : header(_alloc) , status(_alloc) , feedback(_alloc) { (void)_alloc; } typedef ::std_msgs::Header_<ContainerAllocator> _header_type; _header_type header; typedef ::actionlib_msgs::GoalStatus_<ContainerAllocator> _status_type; _status_type status; typedef ::moveit_msgs::MoveGroupFeedback_<ContainerAllocator> _feedback_type; _feedback_type feedback; typedef boost::shared_ptr< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > Ptr; typedef boost::shared_ptr< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> const> ConstPtr; }; // struct MoveGroupActionFeedback_ typedef ::moveit_msgs::MoveGroupActionFeedback_<std::allocator<void> > MoveGroupActionFeedback; typedef boost::shared_ptr< ::moveit_msgs::MoveGroupActionFeedback > MoveGroupActionFeedbackPtr; typedef boost::shared_ptr< ::moveit_msgs::MoveGroupActionFeedback const> MoveGroupActionFeedbackConstPtr; // constants requiring out of line definition template<typename ContainerAllocator> std::ostream& operator<<(std::ostream& s, const ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> & v) { ros::message_operations::Printer< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> >::stream(s, "", v); return s; } } // namespace moveit_msgs namespace ros { namespace message_traits { // BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True} // {'shape_msgs': ['/opt/ros/kinetic/share/shape_msgs/cmake/../msg'], 'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'moveit_msgs': ['/home/robot/inmoov_ros/devel/share/moveit_msgs/msg', '/home/robot/inmoov_ros/src/moveit_msgs/msg'], 'trajectory_msgs': ['/opt/ros/kinetic/share/trajectory_msgs/cmake/../msg'], 'sensor_msgs': ['/opt/ros/kinetic/share/sensor_msgs/cmake/../msg'], 'object_recognition_msgs': ['/home/robot/inmoov_ros/devel/share/object_recognition_msgs/msg', '/home/robot/inmoov_ros/src/object_recognition_msgs/msg'], 'octomap_msgs': ['/opt/ros/kinetic/share/octomap_msgs/cmake/../msg'], 'geometry_msgs': ['/opt/ros/kinetic/share/geometry_msgs/cmake/../msg'], 'actionlib_msgs': ['/opt/ros/kinetic/share/actionlib_msgs/cmake/../msg']} // !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types'] template <class ContainerAllocator> struct IsFixedSize< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > : FalseType { }; template <class ContainerAllocator> struct IsFixedSize< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> const> : FalseType { }; template <class ContainerAllocator> struct IsMessage< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > : TrueType { }; template <class ContainerAllocator> struct IsMessage< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> const> : TrueType { }; template <class ContainerAllocator> struct HasHeader< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > : TrueType { }; template <class ContainerAllocator> struct HasHeader< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> const> : TrueType { }; template<class ContainerAllocator> struct MD5Sum< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > { static const char* value() { return "12232ef97486c7962f264c105aae2958"; } static const char* value(const ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator>&) { return value(); } static const uint64_t static_value1 = 0x12232ef97486c796ULL; static const uint64_t static_value2 = 0x2f264c105aae2958ULL; }; template<class ContainerAllocator> struct DataType< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > { static const char* value() { return "moveit_msgs/MoveGroupActionFeedback"; } static const char* value(const ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator>&) { return value(); } }; template<class ContainerAllocator> struct Definition< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > { static const char* value() { return "# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n\ \n\ Header header\n\ actionlib_msgs/GoalStatus status\n\ MoveGroupFeedback feedback\n\ \n\ ================================================================================\n\ MSG: std_msgs/Header\n\ # Standard metadata for higher-level stamped data types.\n\ # This is generally used to communicate timestamped data \n\ # in a particular coordinate frame.\n\ # \n\ # sequence ID: consecutively increasing ID \n\ uint32 seq\n\ #Two-integer timestamp that is expressed as:\n\ # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\ # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\ # time-handling sugar is provided by the client library\n\ time stamp\n\ #Frame this data is associated with\n\ # 0: no frame\n\ # 1: global frame\n\ string frame_id\n\ \n\ ================================================================================\n\ MSG: actionlib_msgs/GoalStatus\n\ GoalID goal_id\n\ uint8 status\n\ uint8 PENDING = 0 # The goal has yet to be processed by the action server\n\ uint8 ACTIVE = 1 # The goal is currently being processed by the action server\n\ uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing\n\ # and has since completed its execution (Terminal State)\n\ uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)\n\ uint8 ABORTED = 4 # The goal was aborted during execution by the action server due\n\ # to some failure (Terminal State)\n\ uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,\n\ # because the goal was unattainable or invalid (Terminal State)\n\ uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing\n\ # and has not yet completed execution\n\ uint8 RECALLING = 7 # The goal received a cancel request before it started executing,\n\ # but the action server has not yet confirmed that the goal is canceled\n\ uint8 RECALLED = 8 # The goal received a cancel request before it started executing\n\ # and was successfully cancelled (Terminal State)\n\ uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be\n\ # sent over the wire by an action server\n\ \n\ #Allow for the user to associate a string with GoalStatus for debugging\n\ string text\n\ \n\ \n\ ================================================================================\n\ MSG: actionlib_msgs/GoalID\n\ # The stamp should store the time at which this goal was requested.\n\ # It is used by an action server when it tries to preempt all\n\ # goals that were requested before a certain time\n\ time stamp\n\ \n\ # The id provides a way to associate feedback and\n\ # result message with specific goal requests. The id\n\ # specified must be unique.\n\ string id\n\ \n\ \n\ ================================================================================\n\ MSG: moveit_msgs/MoveGroupFeedback\n\ # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======\n\ \n\ # The internal state that the move group action currently is in\n\ string state\n\ \n\ "; } static const char* value(const ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator>&) { return value(); } }; } // namespace message_traits } // namespace ros namespace ros { namespace serialization { template<class ContainerAllocator> struct Serializer< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > { template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) { stream.next(m.header); stream.next(m.status); stream.next(m.feedback); } ROS_DECLARE_ALLINONE_SERIALIZER }; // struct MoveGroupActionFeedback_ } // namespace serialization } // namespace ros namespace ros { namespace message_operations { template<class ContainerAllocator> struct Printer< ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator> > { template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::moveit_msgs::MoveGroupActionFeedback_<ContainerAllocator>& v) { s << indent << "header: "; s << std::endl; Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); s << indent << "status: "; s << std::endl; Printer< ::actionlib_msgs::GoalStatus_<ContainerAllocator> >::stream(s, indent + " ", v.status); s << indent << "feedback: "; s << std::endl; Printer< ::moveit_msgs::MoveGroupFeedback_<ContainerAllocator> >::stream(s, indent + " ", v.feedback); } }; } // namespace message_operations } // namespace ros #endif // MOVEIT_MSGS_MESSAGE_MOVEGROUPACTIONFEEDBACK_H
[ "mattedminster@gmail.com" ]
mattedminster@gmail.com
260eac8a01c25516f5374b2a0192368d40dc82ee
ca881fb7e83b3bc212b0265bb8cdcc4437117144
/diffkemp/simpll/passes/ReduceFunctionMetadataPass.h
cef08e0bfc7de91e6839cb49bed8ae628241bc45
[ "Apache-2.0" ]
permissive
viktormalik/diffkemp
650d80bec26f40915fec7e3dc61e7921ab44f135
2db77b5759bd5b3f889d078af2932a2db1affbd8
refs/heads/master
2023-08-30T10:59:54.530544
2023-08-29T14:10:46
2023-08-30T06:38:34
114,360,782
36
14
Apache-2.0
2023-09-12T10:53:08
2017-12-15T10:53:40
C++
UTF-8
C++
false
false
1,059
h
//===---- ReduceFunctionMetadataPass.h - Removes some function metadata --===// // // SimpLL - Program simplifier for analysis of semantic difference // // // This file is published under Apache 2.0 license. See LICENSE for details. // Author: Tomas Glozar, tglozar@gmail.com //===----------------------------------------------------------------------===// /// /// \file /// This file contains the declaration of the ReduceFunctionMetadataPass pass. /// //===----------------------------------------------------------------------===// #ifndef DIFFKEMP_SIMPLL_REDUCEFUNCTIONMETADATAPASS_H #define DIFFKEMP_SIMPLL_REDUCEFUNCTIONMETADATAPASS_H #include <llvm/IR/PassManager.h> using namespace llvm; /// A pass that transforms functions returning some value to void in case their /// return value is never used. class ReduceFunctionMetadataPass : public PassInfoMixin<ReduceFunctionMetadataPass> { public: PreservedAnalyses run(Function &Fun, FunctionAnalysisManager &fam); }; #endif // DIFFKEMP_SIMPLL_REDUCEFUNCTIONMETADATAPASS_H
[ "viktor.malik@gmail.com" ]
viktor.malik@gmail.com
671748e064f0f02ce00abc83cb1a3e401c01f217
3cd474a43ace4faf66a78f472c3b316969b194b5
/Bird.h
66b0b8800de5edd8ff657d0af1f09268fdbda0f8
[]
no_license
mafagan/flappybird
5ea5bacbc1f939208e5b496f642597cf154c173a
77243ca1ab15f906571ae27239c077bf7443f87a
refs/heads/master
2021-01-21T05:05:21.413349
2014-06-08T06:26:23
2014-06-08T06:26:23
17,667,420
11
2
null
null
null
null
UTF-8
C++
false
false
171
h
#pragma once class Bird { public: Bird(); void upAccept(); void speedChange(); bool heightChange(); int getHeight(); ~Bird(); private: int height; int speed; };
[ "mahuaguan@126.com" ]
mahuaguan@126.com
dc020d940d385735c7363f1d4851c368b977e557
ef6b98c5329cdefaef1428405cdf4bbe3780d4e0
/Common/ThreadPool.cpp
a51e70a750f8a80d7b2a386fba464064950982f2
[]
no_license
Strongc/MyBase
f51479cbd50131b2b7fa4f7b0f98ba18d1bd66c9
e92699477605bdd7e0ad7191cb48b92d43be0d39
refs/heads/master
2020-04-06T06:15:35.224826
2015-08-11T02:31:03
2015-08-11T02:31:03
null
0
0
null
null
null
null
GB18030
C++
false
false
3,756
cpp
#include "ThreadPool.h" ThreadPool::ThreadPool(DWORD dwNum /*= 4*/) : _lThreadNum(0), _lRunningNum(0) { _EventComplete = CreateEvent(0, FALSE, FALSE, NULL); _EventEnd = CreateEvent(0, FALSE, FALSE, NULL); _SemaphoreCall = CreateSemaphore(0, 0, 0x7FFFFFFF, NULL); _SemaphoreDel = CreateSemaphore(0, 0, 0x7FFFFFFF, NULL); assert(_SemaphoreCall != INVALID_HANDLE_VALUE); assert(_SemaphoreDel != INVALID_HANDLE_VALUE); assert(_EventComplete != INVALID_HANDLE_VALUE); assert(_EventEnd != INVALID_HANDLE_VALUE); AdjustPoolSize(dwNum <= 0 ? 4 : dwNum); } ThreadPool::~ThreadPool() { CloseHandle(_EventEnd); CloseHandle(_EventComplete); CloseHandle(_SemaphoreCall); CloseHandle(_SemaphoreDel); threadVector.Clear(gSafeDeletePtr); } int ThreadPool::AdjustPoolSize(int iNum) { if (iNum > 0) { ThreadItem* pNew = NULL; for (int _i = 0; _i < iNum; _i++) { pNew = new ThreadItem(this); assert(pNew); pNew->_Handle = CreateThread(NULL, 0, DefaultJobProc, pNew, 0, NULL); assert(pNew->_Handle); threadVector.Push(pNew); SetThreadPriority(pNew->_Handle, THREAD_PRIORITY_NORMAL); } } else { iNum *= -1; ReleaseSemaphore(_SemaphoreDel, iNum > _lThreadNum ? _lThreadNum : iNum, NULL); } return (int)_lThreadNum; } DWORD ThreadPool::DefaultJobProc(LPVOID lpParameter /* = NULL */) { ThreadItem* pThread = static_cast<ThreadItem*>(lpParameter); assert(pThread); ThreadPool* pThreadPoolObj = pThread->_pThis; assert(pThreadPoolObj); InterlockedIncrement(&pThreadPoolObj->_lThreadNum); HANDLE hWaitHandle[3]; hWaitHandle[0] = pThreadPoolObj->_EventEnd; hWaitHandle[1] = pThreadPoolObj->_SemaphoreDel; hWaitHandle[2] = pThreadPoolObj->_SemaphoreCall; bool fHasJob = false; for (;;) { DWORD wr = WaitForMultipleObjects(3, hWaitHandle, false, INFINITE); if (wr == WAIT_OBJECT_0 || wr == WAIT_OBJECT_0 + 1) break; if (wr == WAIT_OBJECT_0 + 2) { JobItem* pJob = pThreadPoolObj->jobQueue.Pop(); if (pJob) { InterlockedIncrement(&pThreadPoolObj->_lRunningNum); pThread->_dwLastBeginTime = GetTickCount(); pThread->_dwCount++; pThread->_fIsRunning = true; pJob->_pFunc(pJob->_pParam); //运行用户作业 delete pJob; pJob = NULL; pThread->_fIsRunning = false; InterlockedDecrement(&pThreadPoolObj->_lRunningNum); } } } pThreadPoolObj->threadVector.Earse(pThread); delete pThread; pThread = NULL; InterlockedDecrement(&pThreadPoolObj->_lThreadNum); if (!pThreadPoolObj->_lThreadNum) SetEvent(pThreadPoolObj->_EventComplete); return 0; } void ThreadPool::Call(ThreadJob* pJob, void* pJobParam /* = NULL */) { CallProcParam* pNewProcParam = new CallProcParam(pJob, pJobParam); assert(pNewProcParam); JobItem* pNewJob = new JobItem(CallProc, pNewProcParam); assert(pNewJob); jobQueue.Push(pNewJob); ReleaseSemaphore(_SemaphoreCall, 1, NULL); } bool ThreadPool::IsRunning() { return _lRunningNum > 0; } bool ThreadPool::EndAndWait(DWORD dwWaitTime /* = INFINITE */) { while (_lThreadNum) { EndAThread(); } return WaitForSingleObject(_EventComplete, dwWaitTime) == WAIT_OBJECT_0; } void ThreadPool::CallProc(void* pParam) { CallProcParam* cp = static_cast<CallProcParam*>(pParam); assert(cp); if (cp) { cp->_pObj->DoJob(cp->_pParam); delete cp; } }
[ "SunHongjian@SUNHONGJIANPC.rdev.kingsoft.net" ]
SunHongjian@SUNHONGJIANPC.rdev.kingsoft.net
ca8e2851b770a5aec3cb29dc3b42166b4a28cd77
1942a0d16bd48962e72aa21fad8d034fa9521a6c
/aws-cpp-sdk-ec2/include/aws/ec2/model/ActivityStatus.h
ba9e94e2140600488c3a43cfc2a458c97e2405f9
[ "Apache-2.0", "JSON", "MIT" ]
permissive
yecol/aws-sdk-cpp
1aff09a21cfe618e272c2c06d358cfa0fb07cecf
0b1ea31e593d23b5db49ee39d0a11e5b98ab991e
refs/heads/master
2021-01-20T02:53:53.557861
2018-02-11T11:14:58
2018-02-11T11:14:58
83,822,910
0
1
null
2017-03-03T17:17:00
2017-03-03T17:17:00
null
UTF-8
C++
false
false
1,126
h
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ #pragma once #include <aws/ec2/EC2_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> namespace Aws { namespace EC2 { namespace Model { enum class ActivityStatus { NOT_SET, error, pending_fulfillment, pending_termination, fulfilled }; namespace ActivityStatusMapper { AWS_EC2_API ActivityStatus GetActivityStatusForName(const Aws::String& name); AWS_EC2_API Aws::String GetNameForActivityStatus(ActivityStatus value); } // namespace ActivityStatusMapper } // namespace Model } // namespace EC2 } // namespace Aws
[ "henso@amazon.com" ]
henso@amazon.com
21856b88e0c49c44c80343903134f8ac311984af
50c0130944350fe264aa130b02e2ef46046280b3
/cassandra/ui_displayvtk.h
05877f64ceb64e6b19a5cd7a9b316206ff7f3203
[]
no_license
glaborda/pandora
ef017beef24604c56253e4e79be4e910a110d518
24d8f4a330f08eb3f698289bc44376ec788cdcbb
refs/heads/master
2021-01-17T21:26:21.046823
2013-04-02T09:27:47
2013-04-02T09:27:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,568
h
/******************************************************************************** ** Form generated from reading UI file 'displayvtk.ui' ** ** Created: Fri Jan 25 18:08:14 2013 ** by: Qt User Interface Compiler version 4.8.1 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ #ifndef UI_DISPLAYVTK_H #define UI_DISPLAYVTK_H #include <QtCore/QVariant> #include <QtGui/QAction> #include <QtGui/QApplication> #include <QtGui/QButtonGroup> #include <QtGui/QHeaderView> #include <QtGui/QWidget> #include "QVTKWidget.h" QT_BEGIN_NAMESPACE class Ui_DisplayVTK { public: QVTKWidget *qvtkWidget; void setupUi(QWidget *DisplayVTK) { if (DisplayVTK->objectName().isEmpty()) DisplayVTK->setObjectName(QString::fromUtf8("DisplayVTK")); DisplayVTK->resize(400, 300); qvtkWidget = new QVTKWidget(DisplayVTK); qvtkWidget->setObjectName(QString::fromUtf8("qvtkWidget")); qvtkWidget->setGeometry(QRect(0, 0, 401, 311)); qvtkWidget->setMaximumSize(QSize(401, 311)); retranslateUi(DisplayVTK); QMetaObject::connectSlotsByName(DisplayVTK); } // setupUi void retranslateUi(QWidget *DisplayVTK) { DisplayVTK->setWindowTitle(QApplication::translate("DisplayVTK", "Form", 0, QApplication::UnicodeUTF8)); } // retranslateUi }; namespace Ui { class DisplayVTK: public Ui_DisplayVTK {}; } // namespace Ui QT_END_NAMESPACE #endif // UI_DISPLAYVTK_H
[ "badulaka@gmail.com" ]
badulaka@gmail.com
fdfed903060af4b39728eddcb408d359c72fd65c
57471ee8c499cd7f5c5a9d625f8c184ac416a104
/projects2/Lab09/BinarySearchTree.h
61a26b8f6bdf0b89be76bf2fb744911cc312dc05
[]
no_license
WrongSandwich/programProjects
9eaedc8d96b694f49588ae80736abf86ccd4a132
f8ecdb231b5bc0b40a5484c85b29f32a3d9b4b5e
refs/heads/master
2021-06-13T00:10:53.835947
2019-12-07T18:00:02
2019-12-07T18:00:02
147,388,713
0
0
null
null
null
null
UTF-8
C++
false
false
4,756
h
// Created by Frank M. Carrano and Tim Henry. // Copyright (c) 2013 __Pearson Education__. All rights reserved. // Modified by JRM (several changes, including making this be a two-parameter template) /** Link-based implementation of the ADT binary search tree. @file BinarySearchTree.h */ #ifndef _BINARY_SEARCH_TREE #define _BINARY_SEARCH_TREE #include "NotFoundException.h" #include "BinaryNode.h" #include "InvalidSetEntryRequest.h" // The instantiating ItemType class must have the relational operators // implemented for comparing: ItemType (on the LHS) to KeyType (on RHS). // For example, given ItemType item and KeyType aKey, it must be valid // to write: // if (item == aKey) // ... // else if (item < aKey) // ... template<typename KeyType, typename ItemType> class BinarySearchTree { private: BinaryNode<ItemType>* rootPtr; protected: //------------------------------------------------------------ // Protected Utility Methods Section: // Recursive helper methods for the public methods. //------------------------------------------------------------ // Recursively finds where the given node should be placed and // inserts it in a leaf at that point. BinaryNode<ItemType>* insertInorder(BinaryNode<ItemType>* subTreePtr, BinaryNode<ItemType>* newNode); // Removes the given target value from the tree while maintaining a // binary search tree. BinaryNode<ItemType>* removeValue(BinaryNode<ItemType>* subTreePtr, KeyType aKey, bool& success); // Removes a given node from a tree while maintaining a // binary search tree. BinaryNode<ItemType>* removeNode(BinaryNode<ItemType>* nodePtr); // Removes the leftmost node in the left subtree of the node // pointed to by nodePtr. // Sets inorderSuccessor to the value in this node. // Returns a pointer to the revised subtree. BinaryNode<ItemType>* removeLeftmostNode(BinaryNode<ItemType>* subTreePtr, ItemType& inorderSuccessor); // Returns a pointer to the node containing the given value, // or nullptr if not found. BinaryNode<ItemType>* findNode(BinaryNode<ItemType>* treePtr, KeyType aKey) const; //Recursively helps the getHeight method int getHeightHelper(BinaryNode<ItemType>* subTreePtr) const; //Recursively helps the getNumberOfNodes method int getNumberOfNodesHelper(BinaryNode<ItemType>* subTreePtr) const; void destroyTree(BinaryNode<ItemType>* subTreePtr); BinaryNode<ItemType>* copyTree(const BinaryNode<ItemType>* treePtr); // Recursive traversal helper methods: void preorder(void visit(ItemType&), BinaryNode<ItemType>* treePtr) const; void inorder(void visit(ItemType&), BinaryNode<ItemType>* treePtr) const; void postorder(void visit(ItemType&), BinaryNode<ItemType>* treePtr) const; public: //------------------------------------------------------------ // Constructor and Destructor Section. //------------------------------------------------------------ BinarySearchTree(); BinarySearchTree(const ItemType& rootItem); BinarySearchTree(const BinarySearchTree<KeyType, ItemType>& tree); virtual ~BinarySearchTree(); //------------------------------------------------------------ // Public Methods Section. //------------------------------------------------------------ bool isEmpty() const; int getHeight() const; int getNumberOfNodes() const; bool add(const ItemType& newEntry); bool remove(const KeyType& aKey); ItemType getEntry(const KeyType& aKey) const throw(NotFoundException); // An entry in a BST can be set if and only if "item == aKey". // If this is not the case, throw InvalidSetEntryRequest. // If "aKey" does not exist in the tree, throw NotFoundException. void setEntry(const KeyType& aKey, const ItemType& item) const throw(NotFoundException, InvalidSetEntryRequest); bool contains(const KeyType& aKey) const; void clear(); //------------------------------------------------------------ // Public Traversals Section. //------------------------------------------------------------ void preorderTraverse(void visit(ItemType&)) const; void inorderTraverse(void visit(ItemType&)) const; void postorderTraverse(void visit(ItemType&)) const; //------------------------------------------------------------ // Overloaded Operator Section. //------------------------------------------------------------ BinarySearchTree& operator=(const BinarySearchTree& rightHandSide); //MAY NEED TO ADD TEMPLATE }; // end BinarySearchTree #include "BinarySearchTree.cpp" #endif
[ "fishyevan@gmail.com" ]
fishyevan@gmail.com
3eac7d4c09e9f6af8cc37ac1306c7e52935cbab1
4dbaea97b6b6ba4f94f8996b60734888b163f69a
/TOJ/Election_Time.cpp
1f534950f78c6e43307ec68b2126d5167eed742b
[]
no_license
Ph0en1xGSeek/ACM
099954dedfccd6e87767acb5d39780d04932fc63
b6730843ab0455ac72b857c0dff1094df0ae40f5
refs/heads/master
2022-10-25T09:15:41.614817
2022-10-04T12:17:11
2022-10-04T12:17:11
63,936,497
2
0
null
null
null
null
UTF-8
C++
false
false
604
cpp
#include <iostream> #include <stdio.h> #include <algorithm> using namespace std; struct node { int num; int first; int second; }arr[50001]; bool cmp1(node a, node b) { return a.first > b.first; } bool cmp2(node a, node b) { return a.second > b.second; } int main() { int n, k; scanf("%d%d", &n, &k); for(int i = 1; i <= n; i++) { arr[i].num = i; scanf("%d%d", &arr[i].first, &arr[i].second); } sort(arr+1, arr+1+n, cmp1); sort(arr+1, arr+1+k, cmp2); printf("%d\n", arr[1].num); return 0; }
[ "54panguosheng@gmail.com" ]
54panguosheng@gmail.com
9e4a6749d79902fd98af5517bbb3d9547f2c7d97
e0802357779fec47b0fd9d968ee704c1962c9787
/iRGBforGoogleHome.ino
cc33a0d94da1528b5ad3e1cf929948e82fcdf093
[]
no_license
aguilaair/iRGBforGoogleHome
2a48281bcf9e3cfd9ba570daed330f1213b5ac16
e3d95156aa33cf5d1510ca6d38e71e2c24730a08
refs/heads/master
2021-07-11T13:39:13.784584
2021-03-06T14:22:52
2021-03-06T14:22:52
235,664,914
0
0
null
null
null
null
UTF-8
C++
false
false
6,289
ino
#include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266WiFiMulti.h> #include <WebSocketsClient.h> #include <ArduinoJson.h> #include <math.h> #include <EEPROM.h> ESP8266WiFiMulti WiFiMulti; WebSocketsClient webSocket; WiFiClient client; int red_light_pin = D2; int green_light_pin = D3; int blue_light_pin = D4; int red = 255; int green = 255; int blue = 255; float brightness = 1; int R_Addr = 0; int G_Addr = 5; int B_Addr = 10; int Br_Addr = 15; #define MyApiKey "xxxxxxx-xxxxxx-xxxxxxxxx-xxxxxxxx" // TODO: Change to your sinric API Key. Your API Key is displayed on sinric.com dashboard #define MySSID "xxx" // TODO: Change to your Wifi network SSID #define MyWifiPassword "xxxxx" // TODO: Change to your Wifi network password #define API_ENDPOINT "http://sinric.com" #define HEARTBEAT_INTERVAL 300000 // 5 Minutes uint64_t heartbeatTimestamp = 0; bool isConnected = false; void turnOn(String deviceId) { if (deviceId == "5exxxxxxxxxxxxxxxxxxx") // Device ID of first device { Serial.print("Turn on device id: "); Serial.println(deviceId); RGB_color(red, green, blue); } else if (deviceId == "5axxxxxxxxxxxxxxxxxxx") // Device ID of second device { Serial.print("Turn on device id: "); Serial.println(deviceId); } else { Serial.print("Turn on for unknown device id: "); Serial.println(deviceId); } } void turnOff(String deviceId) { if (deviceId == "5exxxxxxxxxxxxxxxxxx") // Device ID of first device { Serial.print("Turn off Device ID: "); Serial.println(deviceId); RGB_color(0, 0, 0); } else if (deviceId == "5axxxxxxxxxxxxxxxxxxx") // Device ID of second device { Serial.print("Turn off Device ID: "); Serial.println(deviceId); } else { Serial.print("Turn off for unknown device id: "); Serial.println(deviceId); } } void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) { switch (type) { case WStype_DISCONNECTED: isConnected = false; Serial.printf("[WSc] Webservice disconnected from sinric.com!\n"); break; case WStype_CONNECTED: { isConnected = true; Serial.printf("[WSc] Service connected to sinric.com at url: %s\n", payload); Serial.printf("Waiting for commands from sinric.com ...\n"); } break; case WStype_TEXT: { Serial.printf("[WSc] get text: %s\n", payload); /* {"deviceId":"5e28764500886b552b7519fc","action":"action.devices.commands.OnOff","value":{"on":true}} */ #if ARDUINOJSON_VERSION_MAJOR == 5 DynamicJsonBuffer jsonBuffer; JsonObject& json = jsonBuffer.parseObject((char*)payload); #endif #if ARDUINOJSON_VERSION_MAJOR == 6 DynamicJsonDocument json(1024); deserializeJson(json, (char*) payload); #endif String deviceId = json ["deviceId"]; String action = json ["action"]; if (action == "action.devices.commands.OnOff") { // Switch or Light String value = json ["value"]["on"]; if (value == "true") { turnOn(deviceId); } else { turnOff(deviceId); } } else if (action == "action.devices.commands.ColorAbsolute") { int inOLE = json ["value"]["color"]["spectrumRGB"]; Serial.println(inOLE); OLEtoRBG(inOLE); RGB_color(red, green, blue); } else if (action == "action.devices.commands.BrightnessAbsolute") { Serial.print("Brightness set to: "); brightness = json ["value"]["brightness"]; Serial.print(brightness); Serial.println("%"); brightness = brightness / 100; Serial.print("So, multiplier is: "); Serial.println(brightness); RGB_color(red, green, blue); } else if (action == "test") { Serial.println("[WSc] received test command from sinric.com"); } } break; case WStype_BIN: Serial.printf("[WSc] get binary length: %u\n", length); break; default: break; } } void OLEtoRBG(int ole) { red = round((ole / 65536) % 256); green = round((ole / 256) % 256); blue = round(ole % 256); } void RGB_color(int red_light_value, int green_light_value, int blue_light_value) { Serial.println("Setting color to: "); Serial.print(red); Serial.print(","); Serial.print(green); Serial.print(","); Serial.println(blue); Serial.print("At brightness: "); Serial.println(brightness); analogWrite(red_light_pin, (red_light_value * brightness)); analogWrite(green_light_pin, (green_light_value * brightness)); analogWrite(blue_light_pin, (blue_light_value * brightness)); EEPROM.put(R_Addr, red_light_value); EEPROM.put(G_Addr, blue_light_value); EEPROM.put(B_Addr, green_light_value); EEPROM.put(Br_Addr, brightness); } void setup() { Serial.begin(115200); pinMode(red_light_pin, OUTPUT); pinMode(green_light_pin, OUTPUT); pinMode(blue_light_pin, OUTPUT); EEPROM.get(R_Addr, red); EEPROM.get(G_Addr, green); EEPROM.get(B_Addr, blue); EEPROM.get(Br_Addr, brightness); RGB_color(red, green, blue); WiFiMulti.addAP(MySSID, MyWifiPassword); Serial.println(); Serial.print("Connecting to Wifi: "); Serial.println(MySSID); // Waiting for Wifi connect while (WiFiMulti.run() != WL_CONNECTED) { delay(500); Serial.print("."); } if (WiFiMulti.run() == WL_CONNECTED) { Serial.println(""); Serial.print("WiFi connected. "); Serial.print("IP address: "); Serial.println(WiFi.localIP()); } // server address, port and URL webSocket.begin("iot.sinric.com", 80, "/"); // event handler webSocket.onEvent(webSocketEvent); webSocket.setAuthorization("apikey", MyApiKey); // try again every 5000ms if connection has failed webSocket.setReconnectInterval(5000); // If you see 'class WebSocketsClient' has no member named 'setReconnectInterval' error update arduinoWebSockets } void loop() { webSocket.loop(); if (isConnected) { uint64_t now = millis(); // Send heartbeat in order to avoid disconnections during ISP resetting IPs over night. Thanks @MacSass if ((now - heartbeatTimestamp) > HEARTBEAT_INTERVAL) { heartbeatTimestamp = now; webSocket.sendTXT("H"); } } }
[ "eduardomoreno.eduardo@gmail.com" ]
eduardomoreno.eduardo@gmail.com
ebc88e8276e60620fa2112d25c713f1fd028f826
74521894f88ac1cab9410a099524a2cc739a8fec
/user.cpp
47cf552ad72c20e14b5530d21e5d632b672664b3
[]
no_license
llsanketll/Bookspot
c8591cc6162f720f4a7ac6855d4e6789572c7644
fc0ff08720c646ef660f655bb7611928da756621
refs/heads/master
2022-12-19T10:09:29.468379
2020-09-23T16:28:19
2020-09-23T16:28:19
277,466,962
1
9
null
2020-09-17T15:18:50
2020-07-06T07:01:36
C++
UTF-8
C++
false
false
202
cpp
#include "user.h" User::User(QString name, int spot, int startTime, bool booked) { this->username = name; this->spot = spot; this->bookStartTime = startTime; this->isBooked = booked; }
[ "sanket.lamsal@gmail.com" ]
sanket.lamsal@gmail.com
feea211acaa84f4b6f94fb2863777e21bb4af7a3
06bed8ad5fd60e5bba6297e9870a264bfa91a71d
/libPr3/Roster/longaddrvariablevalue.cpp
efd5d4d22e024d540a80ba579fd3197b1534231f
[]
no_license
allenck/DecoderPro_app
43aeb9561fe3fe9753684f7d6d76146097d78e88
226c7f245aeb6951528d970f773776d50ae2c1dc
refs/heads/master
2023-05-12T07:36:18.153909
2023-05-10T21:17:40
2023-05-10T21:17:40
61,044,197
4
3
null
null
null
null
UTF-8
C++
false
false
15,769
cpp
#include "longaddrvariablevalue.h" #include "actionlistener.h" #include <QIntValidator> #include "loggerfactory.h" //LongAddrVariableValue::LongAddrVariableValue(QObject *parent) : // VariableValue(parent) //{ //} /** * Extends VariableValue to represent a NMRA long address * @author Bob Jacobsen Copyright (C) 2001, 2002 * @version $Revision: 17977 $ * */ // /*public*/ class LongAddrVariableValue extends VariableValue // implements ActionListener, PropertyChangeListener, FocusListener { /*public*/ LongAddrVariableValue::LongAddrVariableValue(QString name, QString comment, QString cvName, bool readOnly, bool infoOnly, bool writeOnly, bool opsOnly, QString cvNum, QString mask, int minVal, int maxVal, QMap<QString, CvValue*>* v, JLabel* status, QString stdname, QObject *parent) : VariableValue(name, comment, cvName, readOnly, infoOnly, writeOnly, opsOnly, cvNum, mask, v, status, stdname, parent) { //super(name, comment, cvName, readOnly, infoOnly, writeOnly, opsOnly, cvNum, mask, v, status, stdname, parent); logit = new Logger("LongAddrVariableValue"); _maxVal = maxVal; _minVal = minVal; _value = new JTextField("0", 5); _defaultColor = _value->getBackground(); _value->setBackground(COLOR_UNKNOWN); _value->setValidator(new QIntValidator(_minVal, _maxVal)); // connect to the JTextField value, cv // _value->addActionListener(this); connect(_value, SIGNAL(editingFinished()), this, SLOT(actionPerformed())); // _value->addFocusListener(this); // connect for notification CvValue* cv = (_cvMap->value(getCvNum())); cv->addPropertyChangeListener((PropertyChangeListener*)this); connect(cv, SIGNAL(propertyChange(PropertyChangeEvent*)), this, SLOT(propertyChange(PropertyChangeEvent*))); cv->setState(CvValue::FROMFILE); CvValue* cv1 = (_cvMap->value(QString::number(getCvNum().toInt()+1))); cv1->addPropertyChangeListener((PropertyChangeListener*)this); connect(cv1, SIGNAL(propertyChange(PropertyChangeEvent*)), this, SLOT(propertyChange(PropertyChangeEvent*))); cv1->setState(CvValue::FROMFILE); oldContents = ""; _progState = 0; connect(_value, SIGNAL(editingFinished()), this, SLOT(textChanged())); } /*public*/ QVector<CvValue *> LongAddrVariableValue::usesCVs() { //return new CvValue[]{ QVector<CvValue*> list = QVector<CvValue*>(2, NULL); list.replace(0, _cvMap->value(getCvNum())); list.replace(1, _cvMap->value(QString::number(getCvNum().toInt()+1))); return list; } /*public*/ void LongAddrVariableValue::setToolTipText(QString t) { VariableValue::setToolTipText(t); // do default stuff _value->setToolTip(t); // set our value } // the connection is to cvNum and cvNum+1 /*public*/ QVariant LongAddrVariableValue::rangeVal() { return "Long address"; } void LongAddrVariableValue::enterField() { oldContents = _value->text(); } void LongAddrVariableValue::exitField() { // this _can_ be invoked after dispose, so protect if (_value != NULL && oldContents!=(_value->text())) { int newVal = (_value->text()).toInt(); int oldVal = (oldContents).toInt(); updatedTextField(); prop->firePropertyChange("Value", QVariant(oldVal), QVariant(newVal)); //emit notifyPropertyChange(new PropertyChangeEvent(this, "Value", QVariant(oldVal), QVariant(newVal))); } } void LongAddrVariableValue::updatedTextField() { if (logit->isDebugEnabled()) logit->debug("actionPerformed"); // called for new values - set the CV as needed CvValue* cv17 = _cvMap->value(getCvNum()); CvValue* cv18 = _cvMap->value(QString::number(getCvNum().toInt()+1)); // no masking involved for long address int newVal; // try { newVal = (_value->text()).toInt(); // } // catch (java.lang.NumberFormatException ex) { newVal = 0; } // no masked combining of old value required, as this fills the two CVs int newCv17 = ((newVal/256)&0x3F) | 0xc0; int newCv18 = newVal & 0xFF; cv17->setValue(newCv17); cv18->setValue(newCv18); if (logit->isDebugEnabled()) logit->debug("new value "+QString::number(newVal)+" gives CV17="+QString::number(newCv17)+" CV18="+QString::number(newCv18)); } /** ActionListener implementations */ /*public*/ void LongAddrVariableValue::actionPerformed(/*JActionEvent* e*/) { if (logit->isDebugEnabled()) logit->debug("actionPerformed"); int newVal = (_value->text()).toInt(); updatedTextField(); prop->firePropertyChange("Value", QVariant(), QVariant(newVal)); //emit notifyPropertyChange(new PropertyChangeEvent(this, "Value", QVariant(), QVariant(newVal))); } /** FocusListener implementations */ /*public*/ void LongAddrVariableValue::focusGained(/*FocusEvent*/ QEvent* e) { if (logit->isDebugEnabled()) logit->debug("focusGained"); enterField(); } /*public*/ void LongAddrVariableValue::focusLost(/*FocusEvent*/QEvent* e) { if (logit->isDebugEnabled()) logit->debug("focusLost"); exitField(); } // to complete this class, fill in the routines to handle "Value" parameter // and to read/write/hear parameter changes. /*public*/ QString LongAddrVariableValue::getValueString() { return _value->text(); } /*public*/ void LongAddrVariableValue::setIntValue(int i) { setValue(i); } /*public*/ int LongAddrVariableValue::getIntValue() { return (_value->text()).toInt(); } /*public*/ QVariant LongAddrVariableValue::getValueObject() { return (_value->text()); } /*public*/ QWidget* LongAddrVariableValue::getCommonRep() { if (getReadOnly()) { QLabel* r = new QLabel(_value->text()); updateRepresentation(r); return r; } else return _value; } /*public*/ void LongAddrVariableValue::setValue(int value) { int oldVal; // try { oldVal = (_value->text()).toInt(); // } // catch (java.lang.NumberFormatException ex) { oldVal = -999; } if (logit->isDebugEnabled()) logit->debug("setValue with new value "+QString::number(value)+" old value "+QString::number(oldVal)); _value->setText(QString::number(value)); if (oldVal != value || getState() == VariableValue::UNKNOWN) actionPerformed(/*NULL*/); prop->firePropertyChange("Value", QVariant(oldVal), QVariant(value)); //emit notifyPropertyChange(new PropertyChangeEvent(this, "Value", QVariant(oldVal), QVariant(value))); } // implement an abstract member to set colors void LongAddrVariableValue::setColor(QColor c) { if (c .isValid()) _value->setBackground(c); else _value->setBackground(_defaultColor); // prop.firePropertyChange("Value", NULL, NULL); } /*public*/ QWidget* LongAddrVariableValue::getNewRep(QString format) { return updateRepresentation(new LAVarTextField(_value->getDocument(), _value->text(), 5, this)); } /** * Notify the connected CVs of a state change from above * @param state */ /*public*/ void LongAddrVariableValue::setCvState(int state) { (_cvMap->value(getCvNum()))->setState(state); } /*public*/ bool LongAddrVariableValue::isChanged() { CvValue* cv1 = (_cvMap->value(getCvNum())); CvValue* cv2 = (_cvMap->value(QString::number(getCvNum().toInt()+1))); return (considerChanged(cv1)||considerChanged(cv2)); } /*public*/ void LongAddrVariableValue::setToRead(bool state) { (_cvMap->value(getCvNum()))->setToRead(state); (_cvMap->value(QString::number(getCvNum().toInt()+1)))->setToRead(state); } /*public*/ bool LongAddrVariableValue::isToRead() { return (_cvMap->value(getCvNum()))->isToRead() || (_cvMap->value(QString::number(getCvNum().toInt()+1)))->isToRead(); } /*public*/ void LongAddrVariableValue::setToWrite(bool state) { (_cvMap->value(getCvNum()))->setToWrite(state); (_cvMap->value(QString::number(getCvNum().toInt()+1)))->setToWrite(state); } /*public*/ bool LongAddrVariableValue::isToWrite() { return (_cvMap->value(getCvNum()))->isToWrite() || (_cvMap->value(QString::number(getCvNum().toInt()+1)))->isToWrite(); } /*public*/ void LongAddrVariableValue::readChanges() { if (isChanged()) readAll(); } /*public*/ void LongAddrVariableValue::writeChanges() { if (isChanged()) writeAll(); } /*public*/ void LongAddrVariableValue::readAll() { if (logit->isDebugEnabled()) logit->debug("longAddr read() invoked"); setToRead(false); setBusy(true); // will be reset when value changes if (_progState != IDLE) logit->warn("Programming state "+QString::number(_progState)+", not IDLE, in read()"); _progState = READING_FIRST; if (logit->isDebugEnabled()) logit->debug("invoke CV read"); (_cvMap->value(getCvNum()))->read(_status); } /*public*/ void LongAddrVariableValue::writeAll() { if (logit->isDebugEnabled()) logit->debug("write() invoked"); if (getReadOnly()) logit->error("unexpected write operation when readOnly is set"); setToWrite(false); setBusy(true); // will be reset when value changes if (_progState != IDLE) logit->warn("Programming state "+QString::number(_progState)+", not IDLE, in write()"); _progState = WRITING_FIRST; if (logit->isDebugEnabled()) logit->debug("invoke CV write"); (_cvMap->value(getCvNum()))->write(_status); } // handle incoming parameter notification /*public*/ void LongAddrVariableValue::propertyChange(PropertyChangeEvent* e) { if (logit->isDebugEnabled()) logit->debug("property changed event - name: " +e->getPropertyName()); // notification from CV; check for Value being changed if (e->getPropertyName()==("Busy") && (e->getNewValue().toBool())==(false)) { // busy transitions drive the state switch (_progState) { case IDLE: // no, just a CV update if (logit->isDebugEnabled()) logit->error("Busy goes false with state IDLE"); return; case READING_FIRST: // read first CV, now read second if (logit->isDebugEnabled()) logit->debug("Busy goes false with state READING_FIRST"); _progState = READING_SECOND; (_cvMap->value(QString::number(getCvNum().toInt()+1)))->read(_status); return; case READING_SECOND: // finally done, set not busy if (logit->isDebugEnabled()) logit->debug("Busy goes false with state READING_SECOND"); _progState = IDLE; (_cvMap->value(getCvNum()))->setState(READ); (_cvMap->value(QString::number(getCvNum().toInt()+1)))->setState(READ); VariableValue::setState(READ); setBusy(false); return; case WRITING_FIRST: // no, just a CV update if (logit->isDebugEnabled()) logit->debug("Busy goes false with state WRITING_FIRST"); _progState = WRITING_SECOND; (_cvMap->value(QString::number(getCvNum().toInt()+1)))->write(_status); return; case WRITING_SECOND: // now done with complete request if (logit->isDebugEnabled()) logit->debug("Busy goes false with state WRITING_SECOND"); _progState = IDLE; VariableValue::setState(STORED); setBusy(false); return; default: // unexpected! logit->error("Unexpected state found: "+_progState); _progState = IDLE; return; } } else if (e->getPropertyName()==("State")) { CvValue* cv = _cvMap->value(getCvNum()); if (logit->isDebugEnabled()) logit->debug("CV State changed to "+QString::number(cv->getState())); setState(cv->getState()); } else if (e->getPropertyName()==("Value")) { // update value of Variable CvValue* cv0 = _cvMap->value(getCvNum()); CvValue* cv1 = _cvMap->value(QString::number(getCvNum().toInt()+1)); int newVal = (cv0->getValue()&0x3f)*256 + cv1->getValue(); setValue(newVal); // check for duplicate done inside setVal // state change due to CV state change, so propagate that setState(cv0->getState()); // see if this was a read or write operation switch (_progState) { case IDLE: // no, just a CV update if (logit->isDebugEnabled()) logit->debug("Value changed with state IDLE"); return; case READING_FIRST: // yes, now read second if (logit->isDebugEnabled()) logit->debug("Value changed with state READING_FIRST"); return; case READING_SECOND: // now done with complete request if (logit->isDebugEnabled()) logit->debug("Value changed with state READING_SECOND"); return; default: // unexpected! logit->error("Unexpected state found: "+_progState); _progState = IDLE; return; } } } /* Internal class extends a JTextField so that its color is consistent with * an underlying variable * * @author Bob Jacobsen Copyright (C) 2001 */ //public class VarTextField extends JTextField { LAVarTextField::LAVarTextField(Document* doc, QString text, int col, LongAddrVariableValue* var) : JTextField(doc, text, col) { //super(doc, text, col); _var = var; // get the original color right setBackground(_var->_value->getBackground()); // listen for changes to ourself // addActionListener(new java.awt.event.ActionListener() { // @Override // public void actionPerformed(java.awt.event.ActionEvent e) { // thisActionPerformed(e); // } // }); connect(this, &LAVarTextField::textEdited, [=]{ thisActionPerformed(); }); // addFocusListener(new java.awt.event.FocusListener() { // @Override // public void focusGained(FocusEvent e) { // log.debug("focusGained"); // enterField(); // } connect(this, &LAVarTextField::focusGained, [=]{ if (_var->logit->isDebugEnabled()) { _var->logit->debug("focusGained"); } enterField(); }); // @Override // public void focusLost(FocusEvent e) { // log.debug("focusLost"); // exitField(); // } // }); connect(this, &LAVarTextField::focusLost, [=]{ if (_var->logit->isDebugEnabled()) { _var->logit->debug("focusLost"); } leaveField(); }); // listen for changes to original state // _var.addPropertyChangeListener(new java.beans.PropertyChangeListener() { // @Override // public void propertyChange(java.beans.PropertyChangeEvent e) { connect(this->_var->prop, &SwingPropertyChangeSupport::propertyChange, [=](PropertyChangeEvent* e) { originalPropertyChanged(e); // } }); } // LongAddrVariableValue* _var; void LAVarTextField::thisActionPerformed(/*ActionEvent* e*/) { // tell original _var->actionPerformed(/*e*/); } void LAVarTextField::originalPropertyChanged(PropertyChangeEvent* e) { // update this color from original state if (e->getPropertyName()==("State")) { // setBackground(_var->_value->getBackground()); } } //}; // clean up connections when done /*public*/ void LongAddrVariableValue::dispose() { if (logit->isDebugEnabled()) logit->debug("dispose"); // if (_value != NULL) _value->removeActionListener((ActionListener*)this); (_cvMap->value(getCvNum()))->removePropertyChangeListener((PropertyChangeListener*)this); (_cvMap->value(QString::number(getCvNum().toInt()+1)))->removePropertyChangeListener((PropertyChangeListener*)this); _value = NULL; // do something about the VarTextField } void LongAddrVariableValue::textChanged() { actionPerformed(/*NULL*/); } // initialize logging /*private*/ /*final*/ /*static*/ Logger* LongAddrVariableValue::logit = LoggerFactory::getLogger("LongAddrVariableValue");
[ "allenck@windstream.net" ]
allenck@windstream.net
6f46846db181cc003170521e7cd869dcf2ffb19e
dadaf21ce416a3de15f87e5a32bd0693cb7716e8
/Classes/UIs/Dialogs/ItemStoragePopoverDialog.cpp
8f20656d5b8d6bc9987b6dd5b938923a16d3a8a6
[]
no_license
Crasader/Cheetah
59d57994ed7ca88caa986164e782847e0638afa6
e944c150c4dbd00eccb8c222e8c68b0fb1c6ce38
refs/heads/master
2020-12-04T17:33:17.299151
2015-12-25T12:08:37
2015-12-25T12:08:37
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,317
cpp
// // ItemStoragePopoverDialog.cpp // Cheetah // // Created by Pipat Shuleepongchad on 3/4/2557 BE. // // #include "ItemStoragePopoverDialog.h" #include "ItemStorageItem.h" #include <spine/spine-cocos2dx.h> #include "../../Scenes/SceneVille.h" extern CCScene* g_currentScene; #include "../../SceneManager.h" extern SceneManager *g_sceneManager; #include "../../Services/GameContentService.h" extern GameContentService *g_gameContent; #include "../../Entities/PlayerState.h" extern PlayerState* g_playerState; #include "../../AppMacros.h" extern float sizeMultiplier; #include "../../Extensions/CCLabelHelper.h" #include "../../Helpers/CCNodeHelper.h" #include "../../Services/GameAudioService.h" extern GameAudioService* g_gameAudio; #include "../../Extensions/CCNikButton.h" USING_NS_CC; using namespace std; using namespace cocos2d::extension; //extern CCPoint screenFactor; #include "SellItemDialog.h" #include "../../Settings.h" ItemStoragePopoverDialog *ItemStoragePopoverDialog::create(IntKeyValue *item_, GDItemVO itvo_, void* root_) { ItemStoragePopoverDialog *pRet = new ItemStoragePopoverDialog(); pRet->init(item_, itvo_, root_); pRet->autorelease(); return pRet; } bool ItemStoragePopoverDialog::init(IntKeyValue *item_, GDItemVO itvo_, void* root_) { m_root = root_; item = item_; itvo = itvo_; ItemStorageDialog* _dialog = (ItemStorageDialog*)root_; CCSize _popoverSize = CCSizeZero; // 1. create all elements and sum the content size CCLabelBMFont *_titleLabel = CCLabelHelper::createBMFont(itvo.title.c_str(), kFontSizeMedium, true); CCSize _contentSize = CCNodeHelper::getContentSize(_titleLabel); _popoverSize.height += _contentSize.height + kPopOverDialogSpacing*sizeMultiplier; if (_popoverSize.width < _contentSize.width) { _popoverSize.width = _contentSize.width; } CCLabelBMFont *_descriptionLabel = CCLabelHelper::createBMFont(itvo_.description2.c_str(), kFontSizeMedium-5.0f, false, kTextColorDark, kPopOverDialogNarmalWidth*sizeMultiplier, kCCTextAlignmentCenter); _contentSize = CCNodeHelper::getContentSize(_descriptionLabel); _popoverSize.height += _contentSize.height + kPopOverDialogSpacing*sizeMultiplier; if (_popoverSize.width < _contentSize.width) { _popoverSize.width = _contentSize.width; } CCNikButton *_sellButton = NULL; if (_dialog->getPlayerState() == g_playerState) { CCSprite *sellButtonSprite = UIHelper::getSprite(UIHelper::UISprites(UIHelper::NotificationNo)); sellButtonSprite->setScale(0.75f); _sellButton = CCNikButton::create(sellButtonSprite, NULL); _sellButton->setTarget(this, menu_selector(ItemStoragePopoverDialog::sell), CCNikButtonEventTouchUpInside); CCLabelBMFont *_sellLabel = CCLabelHelper::createBMFont("Sell", kFontSizeMedium-5.0f, true); _sellLabel->setPosition(_sellButton->getContentSize()*0.5f + ccp(0.0f, 5.0f*sizeMultiplier)); _sellButton->addChild(_sellLabel); _sellButton->setTouchPriority(-2000); _contentSize = _sellButton->getContentSize(); _popoverSize.height += _contentSize.height + kPopOverDialogSpacing*sizeMultiplier; if (_popoverSize.width < _contentSize.width) { _popoverSize.width = _contentSize.width; } } _popoverSize.height -= kPopOverDialogSpacing*sizeMultiplier; _popoverSize = _popoverSize + kPopOverDialogPadding*sizeMultiplier; // 2. create a popup dialog with contentSize calculated from all elements if (!CCPopOverDialog::init(_popoverSize, CCPopoverArrowDirectionAny)) { return false; } // 3. set position of all elements regard contentSize _titleLabel->setPosition(ccp(getContentSize().width*0.5f, getContentSize().height*1.0f - kPopOverDialogPadding.height*sizeMultiplier*0.5f - CCNodeHelper::getContentSize(_titleLabel).height*0.5f)); addChild(_titleLabel); _descriptionLabel->setPosition(_titleLabel->getPosition() + ccp(0.0f, - CCNodeHelper::getContentSize(_titleLabel).height*0.5f - kPopOverDialogSpacing*sizeMultiplier - CCNodeHelper::getContentSize(_descriptionLabel).height*0.5f)); addChild(_descriptionLabel); if (_sellButton) { _sellButton->setPosition(_descriptionLabel->getPosition() + ccp(0.0f, - CCNodeHelper::getContentSize(_descriptionLabel).height*0.5f - kPopOverDialogSpacing*sizeMultiplier - _sellButton->getContentSize().height*0.5f)); addChild(_sellButton); } return true; } void ItemStoragePopoverDialog::sell(cocos2d::CCObject *sender) { g_gameAudio->playEffect(AUDIO_GENERAL_CLICK); CCSize _screenSize = CCDirector::sharedDirector()->getWinSize(); SceneVille* _scene = (SceneVille*)g_currentScene; if (_scene->modalController->getNStackView() == 1) { SellItemDialog *_dialog = SellItemDialog::create(_scene->modalController, itvo, m_root); _dialog->setPosition(_screenSize*0.5f); _scene->modalController->pushView(_dialog); dismissPopover(true); } }
[ "530071127@qq.com" ]
530071127@qq.com
cfd72b32332e03ea66ad2fbd594821791b1e9e43
31e6b95ab30e70a8757e7c006c3789f6ad201bfa
/code/engine.vc2008/xrLauncher/LaunchWindow.h
8dfc05359121c2756a3999019a8299d4143f98eb
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
DaaGvda/xray-oxygen
77e36e5773ff23c5315ea451c66c93383c3a7f1b
8535ffe98991cbfce39a2c3235bfacf31ab89523
refs/heads/master
2021-05-15T17:48:22.326481
2017-10-21T18:16:23
2017-10-21T18:16:23
107,575,144
4
4
null
2017-10-21T18:16:23
2017-10-19T17:01:54
C++
WINDOWS-1251
C++
false
false
3,589
h
#pragma once #include <msclr\marshal.h> namespace xrLauncher { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; unsigned int type_ptr; char const* params_list; /// <summary> /// Сводка для LaunchWindow /// </summary> public ref class LaunchWindow : public System::Windows::Forms::Form { public: LaunchWindow(void) { InitializeComponent(); } protected: /// <summary> /// Освободить все используемые ресурсы. /// </summary> ~LaunchWindow() { if (components) { delete components; } } private: System::Windows::Forms::Button^ button1; private: System::Windows::Forms::Button^ button3; private: System::Windows::Forms::MaskedTextBox^ textBox1; protected: private: /// <summary> /// Обязательная переменная конструктора. /// </summary> System::ComponentModel::Container ^components; #pragma region Windows Form Designer generated code /// <summary> /// Требуемый метод для поддержки конструктора — не изменяйте /// содержимое этого метода с помощью редактора кода. /// </summary> void InitializeComponent(void) { this->button1 = (gcnew System::Windows::Forms::Button()); this->button3 = (gcnew System::Windows::Forms::Button()); this->textBox1 = (gcnew System::Windows::Forms::MaskedTextBox()); this->SuspendLayout(); // // button1 // this->button1->Location = System::Drawing::Point(12, 12); this->button1->Name = L"button1"; this->button1->Size = System::Drawing::Size(91, 23); this->button1->TabIndex = 0; this->button1->Text = L"Play"; this->button1->UseVisualStyleBackColor = true; this->button1->Click += gcnew System::EventHandler(this, &LaunchWindow::button1_Click); // // button3 // this->button3->Location = System::Drawing::Point(369, 113); this->button3->Name = L"button3"; this->button3->Size = System::Drawing::Size(91, 23); this->button3->TabIndex = 2; this->button3->Text = L"Close"; this->button3->UseVisualStyleBackColor = true; this->button3->Click += gcnew System::EventHandler(this, &LaunchWindow::button3_Click); // // textBox1 // this->textBox1->Location = System::Drawing::Point(5, 115); this->textBox1->Name = L"textBox1"; this->textBox1->Size = System::Drawing::Size(358, 20); this->textBox1->TabIndex = 3; // // LaunchWindow // this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; this->ClientSize = System::Drawing::Size(462, 138); this->Controls->Add(this->textBox1); this->Controls->Add(this->button3); this->Controls->Add(this->button1); this->Name = L"LaunchWindow"; this->Text = L"LaunchWindow"; this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { type_ptr = 1; msclr::interop::marshal_context marsh; params_list = marsh.marshal_as<char const*>(textBox1->Text); this->Close(); } private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) { type_ptr = 0; this->Close(); } }; }
[ "ForserX@users.noreply.github.com" ]
ForserX@users.noreply.github.com
c20e151cd19dfa4937a5208070ab58965e8fb82c
07f1f704c24225962a36596849669a6dd05f1189
/Background.cpp
b0eeac53b202815bbd101c87f9d5ede4761227e7
[]
no_license
JumpingNinja/GameEngine
ec0175614de65622af0486bd0b80168a79ec887f
799f8cd99ca5afff0224cc75a0a944b1ed31bddb
refs/heads/master
2021-01-01T06:39:17.862403
2012-03-17T17:47:29
2012-03-17T17:47:29
3,291,279
1
0
null
null
null
null
UTF-8
C++
false
false
1,490
cpp
// // Background.cpp // GameEngine // // Created by Edu San Martin Morote on 07/02/12. // Copyright 2012 Posva Games. All rights reserved. // #include "Background.h" #include "Game.h" #include <iostream> Background::Background(float Width, float Height, short Depth) : Entity::Entity(Depth), sf::RenderTexture(), myFactor(sf::Vector2f(Width/Game::GetWidth(), Height/Game::GetHeight())) { Create(Width, Height); Clear(sf::Color::Black); Display(); } Background::Background(const sf::Texture& copyTexture, short Depth) : Entity::Entity(Depth), sf::RenderTexture(), myFactor(sf::Vector2f((Game::GetWidth()-copyTexture.GetWidth())/(Game::GetWidth()-Game::GetView().GetSize().x),(Game::GetHeight()-copyTexture.GetHeight())/(Game::GetHeight()-Game::GetView().GetSize().y))) { SetOrigin(sf::Vector2f()); SetTexture(copyTexture); } Background::Background(short Depth) : Entity::Entity(Depth), sf::RenderTexture(), myFactor(sf::Vector2f(1.f, 1.f)) {} Background::~Background() {} void Background::UpdatePosition() { SetPosition((Game::GetView().GetCenter().x-Game::GetView().GetSize().x/2.f)*(myFactor.x), (Game::GetView().GetCenter().y-Game::GetView().GetSize().y/2.f)*(myFactor.y)); } void Background::UpdateFactor() { myFactor=sf::Vector2f((Game::GetWidth()-sf::Sprite::GetTexture()->GetWidth())/(Game::GetWidth()-Game::GetView().GetSize().x),(Game::GetHeight()-sf::Sprite::GetTexture()->GetHeight())/(Game::GetHeight()-Game::GetView().GetSize().y)); }
[ "posva13@gmail.com" ]
posva13@gmail.com
e7184734dc0384dd5583df1c73b5a024b0271c54
236d33902b9d4ea23ce6c064d7677ccc5c94a8b7
/computer-graphics-kinematics/src/projected_gradient_descent.cpp
e072a8522797e3b0f7eae45ac0a6e03f27fdca73
[]
no_license
robertwyb/Computer-graphic-assignments
30e460d8ac9242e1ceb22f9e1d9136f5a78c5277
ec8411d187e23b4d8137ca91b967b691097e15d7
refs/heads/master
2020-05-18T13:52:49.397150
2019-05-01T18:06:34
2019-05-01T18:06:34
184,454,095
4
0
null
null
null
null
UTF-8
C++
false
false
667
cpp
#include "projected_gradient_descent.h" #include "line_search.h" void projected_gradient_descent( const std::function<double(const Eigen::VectorXd &)> & f, const std::function<Eigen::VectorXd(const Eigen::VectorXd &)> & grad_f, const std::function<void(Eigen::VectorXd &)> & proj_z, const int max_iters, Eigen::VectorXd & z) { ///////////////////////////////////////////////////////////////////////////// // Add your code here for (int i=0; i<max_iters; i++) { Eigen::VectorXd dz = grad_f(z); z -= line_search(f, proj_z, z, dz, 10000) * dz; proj_z(z); } ///////////////////////////////////////////////////////////////////////////// }
[ "robertwangyb@outlook.com" ]
robertwangyb@outlook.com
e3d1793c6d05b587a72edf729ca8060ba1ca4e75
2c532f1f0a2e9921d7b2015117eb852c8ce54d08
/lenet5_ap2_shift/solution1/.autopilot/db/init.pp.0.cpp.ap-line.cpp
f1417531b14464fd078a8131e5fb025895bfdfdf
[]
no_license
yagiyugo/vivado
db79d69ec368a9b5aa5a1ce9849045d01e99abd8
fc14c005f6a927eadeecbce718495063d59c15a3
refs/heads/master
2020-04-06T16:46:13.641585
2018-11-29T07:53:06
2018-11-29T07:53:06
157,632,317
0
0
null
null
null
null
UTF-8
C++
false
false
2,529,721
cpp
#pragma line 1 "lenet5_ap2_shift/source/init.cpp" #pragma line 1 "lenet5_ap2_shift/source/init.cpp" 1 #pragma line 1 "<built-in>" 1 #pragma line 1 "<built-in>" 3 #pragma line 155 "<built-in>" 3 #pragma line 1 "<command line>" 1 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_op.h" 1 /* autopilot_ssdm_op.h*/ /* #- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved. #- #- This file contains confidential and proprietary information #- of Xilinx, Inc. and is protected under U.S. and #- international copyright and other intellectual property #- laws. #- #- DISCLAIMER #- This disclaimer is not a license and does not grant any #- rights to the materials distributed herewith. Except as #- otherwise provided in a valid license issued to you by #- Xilinx, and to the maximum extent permitted by applicable #- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND #- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES #- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING #- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- #- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and #- (2) Xilinx shall not be liable (whether in contract or tort, #- including negligence, or under any other theory of #- liability) for any loss or damage of any kind or nature #- related to, arising under or in connection with these #- materials, including for any direct, or any indirect, #- special, incidental, or consequential loss or damage #- (including loss of data, profits, goodwill, or any type of #- loss or damage suffered as a result of any action brought #- by a third party) even if such damage or loss was #- reasonably foreseeable or Xilinx had been advised of the #- possibility of the same. #- #- CRITICAL APPLICATIONS #- Xilinx products are not designed or intended to be fail- #- safe, or for use in any application requiring fail-safe #- performance, such as life-support or safety devices or #- systems, Class III medical devices, nuclear facilities, #- applications related to the deployment of airbags, or any #- other applications that could lead to death, personal #- injury, or severe property or environmental damage #- (individually and collectively, "Critical #- Applications"). Customer assumes the sole risk and #- liability of any use of Xilinx products in Critical #- Applications, subject only to applicable laws and #- regulations governing limitations on product liability. #- #- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS #- PART OF THIS FILE AT ALL TIMES. #- ************************************************************************ #pragma empty_line * * $Id$ */ #pragma line 145 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_op.h" /*#define AP_SPEC_ATTR __attribute__ ((pure))*/ //adu: patched #pragma line 156 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_op.h" extern "C" { #pragma empty_line /****** SSDM Intrinsics: OPERATIONS ***/ // Interface operations #pragma empty_line //typedef unsigned int __attribute__ ((bitwidth(1))) _uint1_; typedef bool _uint1_; #pragma empty_line void _ssdm_op_IfRead(...) __attribute__ ((nothrow)); void _ssdm_op_IfWrite(...) __attribute__ ((nothrow)); _uint1_ _ssdm_op_IfNbRead(...) __attribute__ ((nothrow)); _uint1_ _ssdm_op_IfNbWrite(...) __attribute__ ((nothrow)); _uint1_ _ssdm_op_IfCanRead(...) __attribute__ ((nothrow)); _uint1_ _ssdm_op_IfCanWrite(...) __attribute__ ((nothrow)); #pragma empty_line // Stream Intrinsics void _ssdm_StreamRead(...) __attribute__ ((nothrow)); void _ssdm_StreamWrite(...) __attribute__ ((nothrow)); _uint1_ _ssdm_StreamNbRead(...) __attribute__ ((nothrow)); _uint1_ _ssdm_StreamNbWrite(...) __attribute__ ((nothrow)); _uint1_ _ssdm_StreamCanRead(...) __attribute__ ((nothrow)); _uint1_ _ssdm_StreamCanWrite(...) __attribute__ ((nothrow)); unsigned _ssdm_StreamSize(...) __attribute__ ((nothrow)); #pragma empty_line // Misc void _ssdm_op_MemShiftRead(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_Wait(...) __attribute__ ((nothrow)); void _ssdm_op_Poll(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_Return(...) __attribute__ ((nothrow)); #pragma empty_line /* SSDM Intrinsics: SPECIFICATIONS */ void _ssdm_op_SpecSynModule(...) __attribute__ ((nothrow)); void _ssdm_op_SpecTopModule(...) __attribute__ ((nothrow)); void _ssdm_op_SpecProcessDecl(...) __attribute__ ((nothrow)); void _ssdm_op_SpecProcessDef(...) __attribute__ ((nothrow)); void _ssdm_op_SpecPort(...) __attribute__ ((nothrow)); void _ssdm_op_SpecConnection(...) __attribute__ ((nothrow)); void _ssdm_op_SpecChannel(...) __attribute__ ((nothrow)); void _ssdm_op_SpecSensitive(...) __attribute__ ((nothrow)); void _ssdm_op_SpecModuleInst(...) __attribute__ ((nothrow)); void _ssdm_op_SpecPortMap(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecReset(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecPlatform(...) __attribute__ ((nothrow)); void _ssdm_op_SpecClockDomain(...) __attribute__ ((nothrow)); void _ssdm_op_SpecPowerDomain(...) __attribute__ ((nothrow)); #pragma empty_line int _ssdm_op_SpecRegionBegin(...) __attribute__ ((nothrow)); int _ssdm_op_SpecRegionEnd(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecLoopName(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecLoopTripCount(...) __attribute__ ((nothrow)); #pragma empty_line int _ssdm_op_SpecStateBegin(...) __attribute__ ((nothrow)); int _ssdm_op_SpecStateEnd(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecInterface(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecPipeline(...) __attribute__ ((nothrow)); void _ssdm_op_SpecDataflowPipeline(...) __attribute__ ((nothrow)); #pragma empty_line #pragma empty_line void _ssdm_op_SpecLatency(...) __attribute__ ((nothrow)); void _ssdm_op_SpecParallel(...) __attribute__ ((nothrow)); void _ssdm_op_SpecProtocol(...) __attribute__ ((nothrow)); void _ssdm_op_SpecOccurrence(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecResource(...) __attribute__ ((nothrow)); void _ssdm_op_SpecResourceLimit(...) __attribute__ ((nothrow)); void _ssdm_op_SpecCHCore(...) __attribute__ ((nothrow)); void _ssdm_op_SpecFUCore(...) __attribute__ ((nothrow)); void _ssdm_op_SpecIFCore(...) __attribute__ ((nothrow)); void _ssdm_op_SpecIPCore(...) __attribute__ ((nothrow)); void _ssdm_op_SpecKeepValue(...) __attribute__ ((nothrow)); void _ssdm_op_SpecMemCore(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecExt(...) __attribute__ ((nothrow)); /*void* _ssdm_op_SpecProcess(...) SSDM_SPEC_ATTR; void* _ssdm_op_SpecEdge(...) SSDM_SPEC_ATTR; */ #pragma empty_line /* Presynthesis directive functions */ void _ssdm_SpecArrayDimSize(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_RegionBegin(...) __attribute__ ((nothrow)); void _ssdm_RegionEnd(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_Unroll(...) __attribute__ ((nothrow)); void _ssdm_UnrollRegion(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_InlineAll(...) __attribute__ ((nothrow)); void _ssdm_InlineLoop(...) __attribute__ ((nothrow)); void _ssdm_Inline(...) __attribute__ ((nothrow)); void _ssdm_InlineSelf(...) __attribute__ ((nothrow)); void _ssdm_InlineRegion(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_SpecArrayMap(...) __attribute__ ((nothrow)); void _ssdm_SpecArrayPartition(...) __attribute__ ((nothrow)); void _ssdm_SpecArrayReshape(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_SpecStream(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_SpecExpr(...) __attribute__ ((nothrow)); void _ssdm_SpecExprBalance(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_SpecDependence(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_SpecLoopMerge(...) __attribute__ ((nothrow)); void _ssdm_SpecLoopFlatten(...) __attribute__ ((nothrow)); void _ssdm_SpecLoopRewind(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_SpecFuncInstantiation(...) __attribute__ ((nothrow)); void _ssdm_SpecFuncBuffer(...) __attribute__ ((nothrow)); void _ssdm_SpecFuncExtract(...) __attribute__ ((nothrow)); void _ssdm_SpecConstant(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_DataPack(...) __attribute__ ((nothrow)); void _ssdm_SpecDataPack(...) __attribute__ ((nothrow)); #pragma empty_line void _ssdm_op_SpecBitsMap(...) __attribute__ ((nothrow)); void _ssdm_op_SpecLicense(...) __attribute__ ((nothrow)); #pragma empty_line void __xilinx_ip_top(...) __attribute__ ((nothrow)); #pragma empty_line #pragma empty_line } #pragma line 413 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_op.h" /*#define _ssdm_op_WaitUntil(X) while (!(X)) _ssdm_op_Wait(1); #define _ssdm_op_Delayed(X) X */ #pragma line 427 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_op.h" // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 7 "<command line>" 2 #pragma line 1 "<built-in>" 2 #pragma line 1 "lenet5_ap2_shift/source/init.cpp" 2 #pragma line 1 "/usr/include/stdio.h" 1 3 4 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.19 Input/output <stdio.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/features.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* These are defined by the user (or the compiler) to specify the desired environment: #pragma empty_line __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _ATFILE_SOURCE Additional *at interfaces. _GNU_SOURCE All of the above, plus GNU extensions. _DEFAULT_SOURCE The default set of features (taking precedence over __STRICT_ANSI__). _REENTRANT Select additionally reentrant object. _THREAD_SAFE Same as _REENTRANT, often used by other systems. _FORTIFY_SOURCE If set to numeric value > 0 additional security measures are defined, according to level. #pragma empty_line The `-ansi' switch to the GNU C compiler, and standards conformance options such as `-std=c99', define __STRICT_ANSI__. If none of these are defined, or if _DEFAULT_SOURCE is defined, the default is to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200809L, as well as enabling miscellaneous functions from BSD and SVID. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. #pragma empty_line These are defined by this file and are used by the header files to decide what to declare or define: #pragma empty_line __USE_ISOC11 Define ISO C11 things. __USE_ISOC99 Define ISO C99 things. __USE_ISOC95 Define ISO C90 AMD1 (C95) things. __USE_POSIX Define IEEE Std 1003.1 things. __USE_POSIX2 Define IEEE Std 1003.2 things. __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. __USE_XOPEN Define XPG things. __USE_XOPEN_EXTENDED Define X/Open Unix things. __USE_UNIX98 Define Single Unix V2 things. __USE_XOPEN2K Define XPG6 things. __USE_XOPEN2KXSI Define XPG6 XSI things. __USE_XOPEN2K8 Define XPG7 things. __USE_XOPEN2K8XSI Define XPG7 XSI things. __USE_LARGEFILE Define correct standard I/O things. __USE_LARGEFILE64 Define LFS things with separate names. __USE_FILE_OFFSET64 Define 64bit interface as default. __USE_MISC Define things from 4.3BSD or System V Unix. __USE_ATFILE Define *at interfaces and AT_* constants for them. __USE_GNU Define GNU extensions. __USE_REENTRANT Define reentrant/thread-safe *_r functions. __USE_FORTIFY_LEVEL Additional security measures used, according to level. #pragma empty_line The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are defined by this file unconditionally. `__GNU_LIBRARY__' is provided only for compatibility. All new code should use the other symbols to test for features. #pragma empty_line All macros listed above as possibly being defined by this file are explicitly undefined if they are not explicitly defined. Feature-test macros that are not defined by the user or compiler but are implied by the other feature-test macros defined (or by the lack of any definitions) are defined by the file. */ #pragma empty_line #pragma empty_line /* Undefine everything, so we get a clean slate. */ #pragma line 122 "/usr/include/features.h" 3 4 /* Suppress kernel-name space pollution unless user expressedly asks for it. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Convenience macros to test the versions of glibc and gcc. Use them like this: #if __GNUC_PREREQ (2,8) ... code requiring gcc 2.8 or later ... #endif Note - they won't work for gcc1 or glibc1, since the _MINOR macros were not defined then. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not issue a warning; the expectation is that the source is being transitioned to use the new macro. */ #pragma line 156 "/usr/include/features.h" 3 4 /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #pragma line 180 "/usr/include/features.h" 3 4 /* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, define _DEFAULT_SOURCE. */ #pragma line 191 "/usr/include/features.h" 3 4 /* This is to enable the ISO C11 extension. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is to enable the ISO C99 extension. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is to enable the ISO C90 Amendment 1:1995 extension. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is to enable compatibility for ISO C++11. #pragma empty_line So far g++ does not provide a macro. Check the temporary macro for now, too. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE is defined, use POSIX.1-2008 (or another version depending on _XOPEN_SOURCE). */ #pragma line 343 "/usr/include/features.h" 3 4 /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ #pragma empty_line #pragma line 1 "/usr/include/stdc-predef.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This header is separate from features.h so that the compiler can include it implicitly at the start of every compilation. It must not itself include <features.h> or any other header that includes <features.h> because the implicit include comes before any feature test macros that may be defined in a source file before it first explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ #pragma empty_line /* glibc's intent is to support the IEC 559 math functionality, real and complex. If the GCC (4.9 and later) predefined macros specifying compiler intent are available, use them to determine whether the overall intent is to support these features; otherwise, presume an older compiler has intent to support these features and define these macros by default. */ #pragma line 52 "/usr/include/stdc-predef.h" 3 4 /* wchar_t uses Unicode 8.0.0. Version 8.0 of the Unicode Standard is synchronized with ISO/IEC 10646:2014, plus Amendment 1 (published 2015-05-15). */ #pragma empty_line #pragma empty_line /* We do not support C11 <threads.h>. */ #pragma line 346 "/usr/include/features.h" 2 3 4 #pragma empty_line /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now on. The use of this variable is deprecated. Use __GLIBC__ and __GLIBC_MINOR__ now (see below) when you want to test for a specific GNU C library version and use the values in <gnu/lib-names.h> to get the sonames of the shared libraries. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is here only because every header file already includes this one. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 /* Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* We are almost always included from features.h. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not anymore supported. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Some user header file might have defined this before. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* All functions, except those with callbacks or those that synchronize memory, are leaf functions. */ #pragma line 49 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ #pragma line 80 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ #pragma empty_line #pragma empty_line #pragma empty_line /* For these things, GCC behaves the ANSI way normally, and the non-ANSI way under -traditional. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is not a typedef so `const __ptr_t' does the right thing. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* C++ needs to know that types and declarations are C, not C++. */ #pragma line 106 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* The standard library needs the functions from the ISO C90 standard in the std namespace. At the same time we want to be safe for future changes and we include the ISO C99 code in the non-standard namespace __c99. The C++ wrapper header take case of adding the definitions to the global namespace. */ #pragma line 119 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* For compatibility we do not add the declarations into any namespace. They will end up in the global namespace which is what old code expects. */ #pragma line 131 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Fortify support. */ #pragma line 147 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Support for flexible arrays. */ #pragma empty_line /* GCC 2.97 supports C99 flexible array members. */ #pragma line 165 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* __asm__ ("xyz") is used throughout the headers to rename functions at the assembly language level. This is wrapped by the __REDIRECT macro, in order to support compilers that can do this some other way. When compilers don't support asm-names at all, we have to do preprocessor tricks instead (which don't have exactly the right semantics, but it's the best we can do). #pragma empty_line Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ #pragma line 192 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* #elif __SOME_OTHER_COMPILER__ #pragma empty_line # define __REDIRECT(name, proto, alias) name proto; \ _Pragma("let " #name " = " #alias) */ #pragma empty_line #pragma empty_line /* GCC has various useful declarations that can be made with the `__attribute__' syntax. All of the ways we use this do fine if they are omitted for compilers that don't understand it. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* At some point during the gcc 2.96 development the `malloc' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Tell the compiler which arguments to an allocation function indicate the size of the allocation. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This declaration tells the compiler that the value is constant. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #pragma line 252 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* gcc allows marking deprecated functions. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. If several `format_arg' attributes are given for the same function, in gcc-3.0 and older, all but the last one are ignored. In newer gccs, all designated arguments are considered. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* At some point during the gcc 2.97 development the `strfmon' format attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The nonull function attribute allows to mark pointer parameters which must not be NULL. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ #pragma line 305 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* Forces a function to be always inlined. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions older than 4.3 may define these macros and still not guarantee GNU inlining semantics. #pragma empty_line clang++ identifies itself as gcc-4.2, but has support for GNU inlining semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and __GNUC_GNU_INLINE__ macro definitions. */ #pragma line 346 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* __restrict is known in EGCS 1.2 and above. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 supports this. */ #pragma line 410 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 411 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 #pragma line 368 "/usr/include/features.h" 2 3 4 #pragma empty_line #pragma empty_line /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Decide whether we can define 'extern inline' functions in headers. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is here only because every header file already includes this one. Get the definitions of all the appropriate `__stub_FUNCTION' symbols. <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub that will always return failure (and set errno to ENOSYS). */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 /* This file is automatically generated. This file selects the right generated file of `__stub_FUNCTION' macros based on the architecture being compiled for. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 /* This file is automatically generated. It defines a symbol `__stub_FUNCTION' for each function in the C library which is a stub, meaning it will fail every time called, usually setting errno to ENOSYS. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 #pragma line 392 "/usr/include/features.h" 2 3 4 #pragma line 28 "/usr/include/stdio.h" 2 3 4 #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __typeof__(((int*)0)-((int*)0)) ptrdiff_t; #pragma empty_line #pragma empty_line #pragma empty_line typedef __typeof__(sizeof(int)) size_t; #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 34 "/usr/include/stdio.h" 2 3 4 #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * Never include this file directly; use <sys/types.h> instead. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 #pragma empty_line /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; #pragma empty_line /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; #pragma empty_line typedef signed long int __int64_t; typedef unsigned long int __uint64_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* quad_t is also 64 bits. */ #pragma empty_line typedef long int __quad_t; typedef unsigned long int __u_quad_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE macros for each of the OS types we define below. The definitions of those macros must use the following macros for underlying types. We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned variants of each of the following integer types on this machine. #pragma empty_line 16 -- "natural" 16-bit type (always short) 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long QUAD -- 64-bit type, always long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long #pragma empty_line We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the conventional uses of `long' or `long long' type modifiers match the types we define, even when a less-adorned type would be the same size. This matters for (somewhat) portably writing printf/scanf formats for these types, where using the appropriate l or ll format modifiers can make the typedefs and the formats match up across all GNU platforms. If we used `long' when it's 64 bits where `long long' is expected, then the compiler would warn about the formats not matching the argument types, and the programmer changing them to shut up the compiler would break the program's portability. #pragma empty_line Here we assume what is presently the case in all the GCC configurations we support: long long is always 64 bits, long is always word/address size, and int is always 32 bits. */ #pragma line 116 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 /* No need to mark the typedef with __extension__. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 /* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 26 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 /* See <bits/types.h> for the meaning of these macros. This file exists so that <bits/types.h> need not vary across different GNU platforms. */ #pragma empty_line /* X32 kernel interface is 64-bit. */ #pragma line 77 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 3 4 /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ #pragma empty_line #pragma empty_line /* Same for ino_t and ino64_t. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Number of descriptors that can fit in an `fd_set'. */ #pragma line 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 #pragma empty_line #pragma empty_line typedef unsigned long int __dev_t; /* Type of device numbers. */ typedef unsigned int __uid_t; /* Type of user identifications. */ typedef unsigned int __gid_t; /* Type of group identifications. */ typedef unsigned long int __ino_t; /* Type of file serial numbers. */ typedef unsigned long int __ino64_t; /* Type of file serial numbers (LFS).*/ typedef unsigned int __mode_t; /* Type of file attribute bitmasks. */ typedef unsigned long int __nlink_t; /* Type of file link counts. */ typedef long int __off_t; /* Type of file sizes and offsets. */ typedef long int __off64_t; /* Type of file sizes and offsets (LFS). */ typedef int __pid_t; /* Type of process identifications. */ typedef struct { int __val[2]; } __fsid_t; /* Type of file system IDs. */ typedef long int __clock_t; /* Type of CPU usage counts. */ typedef unsigned long int __rlim_t; /* Type for resource measurement. */ typedef unsigned long int __rlim64_t; /* Type for resource measurement (LFS). */ typedef unsigned int __id_t; /* General type for IDs. */ typedef long int __time_t; /* Seconds since the Epoch. */ typedef unsigned int __useconds_t; /* Count of microseconds. */ typedef long int __suseconds_t; /* Signed count of microseconds. */ #pragma empty_line typedef int __daddr_t; /* The type of a disk address. */ typedef int __key_t; /* Type of an IPC key. */ #pragma empty_line /* Clock ID used in clock and timer functions. */ typedef int __clockid_t; #pragma empty_line /* Timer ID returned by `timer_create'. */ typedef void * __timer_t; #pragma empty_line /* Type to represent block size. */ typedef long int __blksize_t; #pragma empty_line /* Types from the Large File Support interface. */ #pragma empty_line /* Type to count number of disk blocks. */ typedef long int __blkcnt_t; typedef long int __blkcnt64_t; #pragma empty_line /* Type to count file system blocks. */ typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; #pragma empty_line /* Type to count file system nodes. */ typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; #pragma empty_line /* Type of miscellaneous file system fields. */ typedef long int __fsword_t; #pragma empty_line typedef long int __ssize_t; /* Type of a byte count, or error. */ #pragma empty_line /* Signed long type used in system calls. */ typedef long int __syscall_slong_t; /* Unsigned long type used in system calls. */ typedef unsigned long int __syscall_ulong_t; #pragma empty_line /* These few don't really vary by system, they always correspond to one of the other defined types. */ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef __quad_t *__qaddr_t; typedef char *__caddr_t; #pragma empty_line /* Duplicates info from stdint.h but this is used in unistd.h. */ typedef long int __intptr_t; #pragma empty_line /* Duplicate info from sys/socket.h. */ typedef unsigned int __socklen_t; #pragma line 36 "/usr/include/stdio.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Define outside of namespace so the C++ is happy. */ struct _IO_FILE; #pragma empty_line #pragma empty_line /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; #pragma line 63 "/usr/include/stdio.h" 3 4 /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE __FILE; #pragma line 74 "/usr/include/stdio.h" 3 4 #pragma line 1 "/usr/include/libio.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner <bothner@cygnus.com>. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. #pragma empty_line As a special exception, if you link the code in this file with files compiled with a GNU compiler to produce an executable, that does not cause the resulting executable to be covered by the GNU Lesser General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. This exception applies to code released by its copyright holders in files containing the exception. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/_G_config.h" 1 3 4 /* This file is needed by libio to define various configuration parameters. These are always the same in the GNU C library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Define types for libio in terms of the standard internal type names. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 16 "/usr/include/_G_config.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/wchar.h" 1 3 4 /* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities <wchar.h> */ #pragma line 81 "/usr/include/wchar.h" 3 4 /* Conversion state information. */ typedef struct { int __count; union { #pragma empty_line unsigned int __wch; #pragma empty_line #pragma empty_line #pragma empty_line char __wchb[4]; } __value; /* Value so far. */ } __mbstate_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The rest of the file is only used if used if __need_mbstate_t is not defined. */ #pragma line 900 "/usr/include/wchar.h" 3 4 /* Undefine all __need_* constants in case we are included to get those constants but the whole file was already read. */ #pragma line 21 "/usr/include/_G_config.h" 2 3 4 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; #pragma line 45 "/usr/include/_G_config.h" 3 4 /* These library features are always available in the GNU C library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This is defined by <bits/stat.h> if `st_blksize' exists. */ #pragma line 32 "/usr/include/libio.h" 2 3 4 /* ALL of these should be defined in _G_config.h */ #pragma line 47 "/usr/include/libio.h" 3 4 /* This define avoids name pollution if we're using GNU stdarg.h */ #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stdarg.h" 1 3 4 /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __builtin_va_list va_list; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode * or -ansi is not specified, since it was not part of C90. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Hack required to make standard headers work, at least on Ubuntu */ #pragma empty_line typedef __builtin_va_list __gnuc_va_list; #pragma line 50 "/usr/include/libio.h" 2 3 4 #pragma line 86 "/usr/include/libio.h" 3 4 /* Magic numbers and bits for the _flags field. The magic numbers use the high-order bits of _flags; the remaining bits are available for variable flags. Note: The magic numbers must all be negative if stdio emulation is desired. */ #pragma line 124 "/usr/include/libio.h" 3 4 /* These are "formatting flags" matching the iostream fmtflags enum values. */ #pragma line 144 "/usr/include/libio.h" 3 4 struct _IO_jump_t; struct _IO_FILE; #pragma empty_line /* Handle lock. */ #pragma empty_line #pragma empty_line #pragma empty_line typedef void _IO_lock_t; #pragma empty_line #pragma empty_line #pragma empty_line /* A streammarker remembers a position in a buffer. */ #pragma empty_line struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; /* If _pos >= 0 it points to _buf->Gbase()+_pos. FIXME comment */ /* if _pos < 0, it points to _buf->eBptr()+_pos. FIXME comment */ int _pos; #pragma line 173 "/usr/include/libio.h" 3 4 }; #pragma empty_line /* This is the structure from the libstdc++ codecvt class. */ enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; #pragma line 241 "/usr/include/libio.h" 3 4 struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ #pragma empty_line #pragma empty_line /* The following pointers correspond to the C++ streambuf protocol. */ /* Note: Tk uses the _IO_read_ptr and _IO_read_end fields directly. */ char* _IO_read_ptr; /* Current read pointer */ char* _IO_read_end; /* End of get area. */ char* _IO_read_base; /* Start of putback+get area. */ char* _IO_write_base; /* Start of put area. */ char* _IO_write_ptr; /* Current put pointer. */ char* _IO_write_end; /* End of put area. */ char* _IO_buf_base; /* Start of reserve area. */ char* _IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ char *_IO_save_base; /* Pointer to start of non-current get area. */ char *_IO_backup_base; /* Pointer to first valid character of backup area */ char *_IO_save_end; /* Pointer to end of non-current get area. */ #pragma empty_line struct _IO_marker *_markers; #pragma empty_line struct _IO_FILE *_chain; #pragma empty_line int _fileno; #pragma empty_line #pragma empty_line #pragma empty_line int _flags2; #pragma empty_line __off_t _old_offset; /* This used to be _offset but it's too small. */ #pragma empty_line #pragma empty_line /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; #pragma empty_line /* char* _save_gptr; char* _save_egptr; */ #pragma empty_line _IO_lock_t *_lock; #pragma line 289 "/usr/include/libio.h" 3 4 __off64_t _offset; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line void *__pad1; void *__pad2; void *__pad3; void *__pad4; #pragma empty_line size_t __pad5; int _mode; /* Make sure we don't get into trouble again. */ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; #pragma empty_line }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line struct _IO_FILE_plus; #pragma empty_line extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; #pragma line 329 "/usr/include/libio.h" 3 4 /* Functions to do I/O and file management for a stream. */ #pragma empty_line /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); #pragma empty_line /* Write N bytes pointed to by BUF to COOKIE. Write all N bytes unless there is an error. Return number of bytes written. If there is an error, return 0 and do not write anything. If the file has been opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, size_t __n); #pragma empty_line /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), the current position (if W is SEEK_CUR), or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); #pragma empty_line /* Close COOKIE. */ typedef int __io_close_fn (void *__cookie); #pragma empty_line #pragma empty_line #pragma empty_line /* User-visible names for the above. */ typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; #pragma empty_line /* The structure with the cookie function pointers. */ typedef struct { __io_read_fn *read; /* Read bytes. */ __io_write_fn *write; /* Write bytes. */ __io_seek_fn *seek; /* Seek/tell file position. */ __io_close_fn *close; /* Close file. */ } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; #pragma empty_line struct _IO_cookie_file; #pragma empty_line /* Initialize one of those. */ extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); #pragma line 429 "/usr/include/libio.h" 3 4 extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) throw (); extern int _IO_ferror (_IO_FILE *__fp) throw (); #pragma empty_line extern int _IO_peekc_locked (_IO_FILE *__fp); #pragma empty_line /* This one is for Emacs. */ #pragma empty_line #pragma empty_line #pragma empty_line extern void _IO_flockfile (_IO_FILE *) throw (); extern void _IO_funlockfile (_IO_FILE *) throw (); extern int _IO_ftrylockfile (_IO_FILE *) throw (); #pragma line 459 "/usr/include/libio.h" 3 4 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, __gnuc_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, __gnuc_va_list); extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); #pragma empty_line extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); #pragma empty_line extern void _IO_free_backup_area (_IO_FILE *) throw (); #pragma line 521 "/usr/include/libio.h" 3 4 } #pragma line 75 "/usr/include/stdio.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __gnuc_va_list va_list; #pragma line 90 "/usr/include/stdio.h" 3 4 typedef __off_t off_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __off64_t off64_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __ssize_t ssize_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The type of the second argument to `fgetpos' and `fsetpos'. */ #pragma empty_line #pragma empty_line typedef _G_fpos_t fpos_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef _G_fpos64_t fpos64_t; #pragma empty_line #pragma empty_line /* The possibilities for the third argument to `setvbuf'. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Default buffer size. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* End of file character. Some things throughout the library rely on this being -1. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The possibilities for the third argument to `fseek'. These values should not be changed. */ #pragma line 150 "/usr/include/stdio.h" 3 4 /* Default path prefix for `tempnam' and `tmpnam'. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get the values: L_tmpnam How long an array of chars must be to be passed to `tmpnam'. TMP_MAX The minimum number of unique filenames generated by tmpnam (and tempnam when it uses tmpnam's name space), or tempnam (the two are separate). L_ctermid How long an array to pass to `ctermid'. L_cuserid How long an array to pass to `cuserid'. FOPEN_MAX Minimum number of files that can be open at once. FILENAME_MAX Maximum length of a filename. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 /* Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 165 "/usr/include/stdio.h" 2 3 4 #pragma empty_line #pragma empty_line /* Standard streams. */ extern struct _IO_FILE *stdin; /* Standard input stream. */ extern struct _IO_FILE *stdout; /* Standard output stream. */ extern struct _IO_FILE *stderr; /* Standard error output stream. */ /* C89/C99 say they're macros. Make them happy. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Remove file FILENAME. */ extern int remove (const char *__filename) throw (); /* Rename file OLD to NEW. */ extern int rename (const char *__old, const char *__new) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Create a temporary file and open it read/write. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ #pragma empty_line extern FILE *tmpfile (void) /* Ignore */; #pragma line 205 "/usr/include/stdio.h" 3 4 extern FILE *tmpfile64 (void) /* Ignore */; #pragma empty_line #pragma empty_line /* Generate a temporary filename. */ extern char *tmpnam (char *__s) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ extern char *tmpnam_r (char *__s) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Generate a unique temporary filename using up to five characters of PFX if it is not NULL. The directory to put this file in is searched for as follows: First the environment variable "TMPDIR" is checked. If it contains the name of a writable directory, that directory is used. If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ extern char *tempnam (const char *__dir, const char *__pfx) throw () __attribute__ ((__malloc__)) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Close STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fclose (FILE *__stream); /* Flush STREAM, or all streams if STREAM is NULL. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fflush (FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line /* Faster versions when locking is not required. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fflush_unlocked (FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line /* Close all streams. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fcloseall (void); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Open a file and create a new stream for it. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) /* Ignore */; /* Open a file, replacing an existing stream with it. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) /* Ignore */; #pragma line 297 "/usr/include/stdio.h" 3 4 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) /* Ignore */; extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Create a new stream that refers to an existing system file descriptor. */ extern FILE *fdopen (int __fd, const char *__modes) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Create a new stream that refers to a memory buffer. */ extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) throw () /* Ignore */; #pragma empty_line /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) throw (); #pragma empty_line /* Make STREAM line-buffered. */ extern void setlinebuf (FILE *__stream) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Write formatted output to STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); /* Write formatted output to stdout. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int printf (const char *__restrict __format, ...); /* Write formatted output to S. */ extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) throw (); #pragma empty_line /* Write formatted output to S from argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to stdout from argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); /* Write formatted output to S from argument list ARG. */ extern int vsprintf (char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Maximum chars of output to write in MAXLEN. */ extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 3, 4))); #pragma empty_line extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 3, 0))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__printf__, 2, 0))) /* Ignore */; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) /* Ignore */; extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Write formatted output to a file descriptor. */ extern int vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Read formatted input from STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) /* Ignore */; /* Read formatted input from stdin. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int scanf (const char *__restrict __format, ...) /* Ignore */; /* Read formatted input from S. */ extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) throw (); #pragma line 467 "/usr/include/stdio.h" 3 4 /* Read formatted input from S into argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) /* Ignore */; #pragma empty_line /* Read formatted input from stdin into argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) /* Ignore */; #pragma empty_line /* Read formatted input from S into argument list ARG. */ extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) throw () __attribute__ ((__format__ (__scanf__, 2, 0))); #pragma line 527 "/usr/include/stdio.h" 3 4 /* Read a character from STREAM. #pragma empty_line These functions are possible cancellation points and therefore not marked with __THROW. */ extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); #pragma empty_line /* Read a character from stdin. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getchar (void); #pragma empty_line #pragma empty_line /* The C standard explicitly says this is a macro, so we always do the optimization for it. */ #pragma empty_line #pragma empty_line #pragma empty_line /* These are defined in POSIX.1:1996. #pragma empty_line These functions are possible cancellation points and therefore not marked with __THROW. */ extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); #pragma empty_line #pragma empty_line #pragma empty_line /* Faster version when locking is not necessary. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetc_unlocked (FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Write a character to STREAM. #pragma empty_line These functions are possible cancellation points and therefore not marked with __THROW. #pragma empty_line These functions is a possible cancellation point and therefore not marked with __THROW. */ extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); #pragma empty_line /* Write a character to stdout. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int putchar (int __c); #pragma empty_line #pragma empty_line /* The C standard explicitly says this can be a macro, so we always do the optimization for it. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Faster version when locking is not necessary. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputc_unlocked (int __c, FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line /* These are defined in POSIX.1:1996. #pragma empty_line These functions are possible cancellation points and therefore not marked with __THROW. */ extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get a word (int) from STREAM. */ extern int getw (FILE *__stream); #pragma empty_line /* Write a word (int) to STREAM. */ extern int putw (int __w, FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get a newline-terminated string of finite length from STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. #pragma empty_line The function has been officially removed in ISO C11. This opportunity is used to also remove it from the GNU feature list. It is now only available when explicitly using an old ISO C, Unix, or POSIX standard. GCC defines _GNU_SOURCE when building C++ code and the function is still in C++11, so it is also available for C++. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *gets (char *__s) /* Ignore */ __attribute__ ((__deprecated__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This function does the same as `fgets' but does not lock the stream. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR (and null-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. #pragma empty_line These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern __ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) /* Ignore */; extern __ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) /* Ignore */; #pragma empty_line /* Like `getdelim', but reads up to a newline. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern __ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Write a string to STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputs (const char *__restrict __s, FILE *__restrict __stream); #pragma empty_line /* Write a string, followed by a newline, to stdout. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int puts (const char *__s); #pragma empty_line #pragma empty_line /* Push a character back onto the input buffer of STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int ungetc (int __c, FILE *__stream); #pragma empty_line #pragma empty_line /* Read chunks of generic data from STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) /* Ignore */; /* Write chunks of generic data to STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); #pragma empty_line #pragma empty_line #pragma empty_line /* This function does the same as `fputs' but does not lock the stream. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); #pragma empty_line #pragma empty_line #pragma empty_line /* Faster versions when locking is not necessary. #pragma empty_line These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) /* Ignore */; extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Seek to a certain position on STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseek (FILE *__stream, long int __off, int __whence); /* Return the current position of STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern long int ftell (FILE *__stream) /* Ignore */; /* Rewind to the beginning of STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern void rewind (FILE *__stream); #pragma empty_line #pragma empty_line /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with file offset. `long int' is not the right type. These definitions are originally defined in the Large File Support API. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Seek to a certain position on STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseeko (FILE *__stream, __off_t __off, int __whence); /* Return the current position of STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern __off_t ftello (FILE *__stream) /* Ignore */; #pragma line 794 "/usr/include/stdio.h" 3 4 /* Get STREAM's position. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); /* Set STREAM's position. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fsetpos (FILE *__stream, const fpos_t *__pos); #pragma line 818 "/usr/include/stdio.h" 3 4 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) /* Ignore */; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); #pragma empty_line #pragma empty_line #pragma empty_line /* Clear the error and EOF indicators for STREAM. */ extern void clearerr (FILE *__stream) throw (); /* Return the EOF indicator for STREAM. */ extern int feof (FILE *__stream) throw () /* Ignore */; /* Return the error indicator for STREAM. */ extern int ferror (FILE *__stream) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Faster versions when locking is not required. */ extern void clearerr_unlocked (FILE *__stream) throw (); extern int feof_unlocked (FILE *__stream) throw () /* Ignore */; extern int ferror_unlocked (FILE *__stream) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Print a message describing the meaning of the value of errno. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern void perror (const char *__s); #pragma empty_line #pragma empty_line /* Provide the declarations for `sys_errlist' and `sys_nerr' if they are available on this system. Even if available, these variables should not be used directly. The `strerror' function provides all the necessary functionality. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 /* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version. Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ #pragma empty_line #pragma empty_line extern int sys_nerr; extern const char *const sys_errlist[]; #pragma empty_line #pragma empty_line extern int _sys_nerr; extern const char *const _sys_errlist[]; #pragma line 854 "/usr/include/stdio.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line /* Return the system file descriptor for STREAM. */ extern int fileno (FILE *__stream) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Faster version when locking is not required. */ extern int fileno_unlocked (FILE *__stream) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Create a new stream connected to a pipe running the given command. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *popen (const char *__command, const char *__modes) /* Ignore */; #pragma empty_line /* Close a stream opened by popen and return the status of its child. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int pclose (FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the name of the current user. */ extern char *cuserid (char *__s); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line struct obstack; /* See <obstack.h>. */ #pragma empty_line /* Write formatted output to an obstack. */ extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) throw () __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, __gnuc_va_list __args) throw () __attribute__ ((__format__ (__printf__, 2, 0))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* These are defined in POSIX.1:1996. */ #pragma empty_line /* Acquire ownership of STREAM. */ extern void flockfile (FILE *__stream) throw (); #pragma empty_line /* Try to acquire ownership of STREAM but do not block if it is not possible. */ extern int ftrylockfile (FILE *__stream) throw () /* Ignore */; #pragma empty_line /* Relinquish the ownership granted for STREAM. */ extern void funlockfile (FILE *__stream) throw (); #pragma line 930 "/usr/include/stdio.h" 3 4 /* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */ #pragma line 942 "/usr/include/stdio.h" 3 4 } #pragma line 2 "lenet5_ap2_shift/source/init.cpp" 2 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed.h" 1 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int.h" 1 // -*- c++ -*- /* #- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved. #- #- This file contains confidential and proprietary information #- of Xilinx, Inc. and is protected under U.S. and #- international copyright and other intellectual property #- laws. #- #- DISCLAIMER #- This disclaimer is not a license and does not grant any #- rights to the materials distributed herewith. Except as #- otherwise provided in a valid license issued to you by #- Xilinx, and to the maximum extent permitted by applicable #- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND #- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES #- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING #- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- #- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and #- (2) Xilinx shall not be liable (whether in contract or tort, #- including negligence, or under any other theory of #- liability) for any loss or damage of any kind or nature #- related to, arising under or in connection with these #- materials, including for any direct, or any indirect, #- special, incidental, or consequential loss or damage #- (including loss of data, profits, goodwill, or any type of #- loss or damage suffered as a result of any action brought #- by a third party) even if such damage or loss was #- reasonably foreseeable or Xilinx had been advised of the #- possibility of the same. #- #- CRITICAL APPLICATIONS #- Xilinx products are not designed or intended to be fail- #- safe, or for use in any application requiring fail-safe #- performance, such as life-support or safety devices or #- systems, Class III medical devices, nuclear facilities, #- applications related to the deployment of airbags, or any #- other applications that could lead to death, personal #- injury, or severe property or environmental damage #- (individually and collectively, "Critical #- Applications"). Customer assumes the sole risk and #- liability of any use of Xilinx products in Critical #- Applications, subject only to applicable laws and #- regulations governing limitations on product liability. #- #- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS #- PART OF THIS FILE AT ALL TIMES. #- ************************************************************************ #pragma empty_line * */ #pragma line 60 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int.h" #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/hls_half.h" 1 // half - IEEE 754-based half-precision floating point library. // // Copyright (c) 2012-2013 Christian Rau <rauy@users.sourceforge.net> // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation // files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, // modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #pragma empty_line // Version 1.11.0 #pragma empty_line /// \file /// Main header file for half precision functionality. #pragma line 32 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/hls_half.h" #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 1 3 // -*- C++ -*- C forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/cmath * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c math.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: 26.5 C library // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 1 3 // Predefined symbols and macros -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/c++config.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // The current version of the C++ library in compressed ISO date format. #pragma empty_line #pragma empty_line // Macros for various attributes. // _GLIBCXX_PURE // _GLIBCXX_CONST // _GLIBCXX_NORETURN // _GLIBCXX_NOTHROW // _GLIBCXX_VISIBILITY #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Macros for visibility attributes. // _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY // _GLIBCXX_VISIBILITY #pragma line 76 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Macros for deprecated attributes. // _GLIBCXX_USE_DEPRECATED // _GLIBCXX_DEPRECATED #pragma line 91 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Macro for constexpr, to support in mixed 03/0x mode. #pragma line 102 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Macro for extern template, ie controling template linkage via use // of extern keyword on template declaration. As documented in the g++ // manual, it inhibits all implicit instantiations and is used // throughout the library to avoid multiple weak definitions for // required types that are already explicitly instantiated in the // library binary. This substantially reduces the binary size of // resulting executables. // Special case: _GLIBCXX_EXTERN_TEMPLATE == -1 disallows extern // templates only in basic_string, thus activating its debug-mode // checks even at -O0. #pragma empty_line #pragma empty_line /* Outline of libstdc++ namespaces. #pragma empty_line namespace std { namespace __debug { } namespace __parallel { } namespace __profile { } namespace __cxx1998 { } #pragma empty_line namespace __detail { } #pragma empty_line namespace rel_ops { } #pragma empty_line namespace tr1 { namespace placeholders { } namespace regex_constants { } namespace __detail { } } #pragma empty_line namespace decimal { } #pragma empty_line namespace chrono { } namespace placeholders { } namespace regex_constants { } namespace this_thread { } } #pragma empty_line namespace abi { } #pragma empty_line namespace __gnu_cxx { namespace __detail { } } #pragma empty_line For full details see: http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/namespaces.html */ namespace std { typedef long unsigned int size_t; typedef long int ptrdiff_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } #pragma empty_line #pragma empty_line // Defined if inline namespaces are used for versioning. #pragma empty_line #pragma empty_line // Inline namespace for symbol versioning. #pragma line 208 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Inline namespaces for special modes: debug, parallel, profile. #pragma line 255 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Macros for namespace scope. Either namespace std:: or the name // of some nested namespace within it corresponding to the active mode. // _GLIBCXX_STD_A // _GLIBCXX_STD_C // // Macros for opening/closing conditional namespaces. // _GLIBCXX_BEGIN_NAMESPACE_ALGO // _GLIBCXX_END_NAMESPACE_ALGO // _GLIBCXX_BEGIN_NAMESPACE_CONTAINER // _GLIBCXX_END_NAMESPACE_CONTAINER #pragma line 307 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // GLIBCXX_ABI Deprecated // Define if compatibility should be provided for -mlong-double-64. #pragma empty_line #pragma empty_line // Inline namespace for long double 128 mode. #pragma line 326 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Assert. #pragma line 352 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // Macros for race detectors. // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(A) and // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(A) should be used to explain // atomic (lock-free) synchronization to race detectors: // the race detector will infer a happens-before arc from the former to the // latter when they share the same argument pointer. // // The most frequent use case for these macros (and the only case in the // current implementation of the library) is atomic reference counting: // void _M_remove_reference() // { // _GLIBCXX_SYNCHRONIZATION_HAPPENS_BEFORE(&this->_M_refcount); // if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) // { // _GLIBCXX_SYNCHRONIZATION_HAPPENS_AFTER(&this->_M_refcount); // _M_destroy(__a); // } // } // The annotations in this example tell the race detector that all memory // accesses occurred when the refcount was positive do not race with // memory accesses which occurred after the refcount became zero. #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Macros for C linkage: define extern "C" linkage only when using C++. #pragma line 390 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 3 // First includes. #pragma empty_line // Pick up any OS-specific definitions. #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/os_defines.h" 1 3 // Specific definitions for GNU/Linux -*- C++ -*- #pragma empty_line // Copyright (C) 2000, 2001, 2002, 2003, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/os_defines.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // System-specific #define, typedefs, corrections, etc, go here. This // file will come before all others. #pragma empty_line // This keeps isanum, et al from being propagated as macros. #pragma line 394 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 2 3 #pragma empty_line // Pick up any CPU-specific definitions. #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/cpu_defines.h" 1 3 // Specific definitions for generic platforms -*- C++ -*- #pragma empty_line // Copyright (C) 2005, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/cpu_defines.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #pragma line 397 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++config.h" 2 3 #pragma empty_line // If platform uses neither visibility nor psuedo-visibility, // specify empty default for namespace annotation macros. #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Certain function definitions that are meant to be overridable from // user code are decorated with this macro. For some targets, this // macro causes these definitions to be weak. #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // The remainder of the prewritten config is automatic; all the // user hooks are listed above. #pragma empty_line // Create a boolean flag to be used to determine if --fast-math is set. #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // This marks string literals in header files to be extracted for eventual // translation. It is primarily used for messages in thrown exceptions; see // src/functexcept.cc. We use __N because the more traditional _N is used // for something else under certain OSes (see BADNAMES). #pragma empty_line #pragma empty_line // For example, <windows.h> is known to #define min and max as macros... #pragma empty_line #pragma empty_line #pragma empty_line // End of prewritten config; the settings discovered at configure time follow. /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ #pragma empty_line /* Define to 1 if you have the `acosf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `acosl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `asinf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `asinl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if the target assembler supports .symver directive. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `atan2f' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `atan2l' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `atanf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `atanl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if the target assembler supports thread-local storage. */ /* #undef _GLIBCXX_HAVE_CC_TLS */ #pragma empty_line /* Define to 1 if you have the `ceilf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `ceill' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <complex.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `cosf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `coshf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `coshl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `cosl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <dlfcn.h> header file. */ #pragma empty_line #pragma empty_line /* Define if EBADMSG exists. */ #pragma empty_line #pragma empty_line /* Define if ECANCELED exists. */ #pragma empty_line #pragma empty_line /* Define if EIDRM exists. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <endian.h> header file. */ #pragma empty_line #pragma empty_line /* Define if ENODATA exists. */ #pragma empty_line #pragma empty_line /* Define if ENOLINK exists. */ #pragma empty_line #pragma empty_line /* Define if ENOSR exists. */ #pragma empty_line #pragma empty_line /* Define if ENOSTR exists. */ #pragma empty_line #pragma empty_line /* Define if ENOTRECOVERABLE exists. */ #pragma empty_line #pragma empty_line /* Define if ENOTSUP exists. */ #pragma empty_line #pragma empty_line /* Define if EOVERFLOW exists. */ #pragma empty_line #pragma empty_line /* Define if EOWNERDEAD exists. */ #pragma empty_line #pragma empty_line /* Define if EPROTO exists. */ #pragma empty_line #pragma empty_line /* Define if ETIME exists. */ #pragma empty_line #pragma empty_line /* Define if ETXTBSY exists. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <execinfo.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `expf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `expl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `fabsf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `fabsl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <fenv.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `finite' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `finitef' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `finitel' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <float.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `floorf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `floorl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `fmodf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `fmodl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `fpclass' function. */ /* #undef _GLIBCXX_HAVE_FPCLASS */ #pragma empty_line /* Define to 1 if you have the <fp.h> header file. */ /* #undef _GLIBCXX_HAVE_FP_H */ #pragma empty_line /* Define to 1 if you have the `frexpf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `frexpl' function. */ #pragma empty_line #pragma empty_line /* Define if _Unwind_GetIPInfo is available. */ #pragma empty_line #pragma empty_line /* Define if gthr-default.h exists (meaning that threading support is enabled). */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `hypot' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `hypotf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `hypotl' function. */ #pragma empty_line #pragma empty_line /* Define if you have the iconv() function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <ieeefp.h> header file. */ /* #undef _GLIBCXX_HAVE_IEEEFP_H */ #pragma empty_line /* Define if int64_t is available in <stdint.h>. */ #pragma empty_line #pragma empty_line /* Define if int64_t is a long. */ #pragma empty_line #pragma empty_line /* Define if int64_t is a long long. */ /* #undef _GLIBCXX_HAVE_INT64_T_LONG_LONG */ #pragma empty_line /* Define to 1 if you have the <inttypes.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `isinf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `isinff' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `isinfl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `isnan' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `isnanf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `isnanl' function. */ #pragma empty_line #pragma empty_line /* Defined if iswblank exists. */ #pragma empty_line #pragma empty_line /* Define if LC_MESSAGES is available in <locale.h>. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `ldexpf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `ldexpl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <libintl.h> header file. */ #pragma empty_line #pragma empty_line /* Only used in build directory testsuite_hooks.h. */ #pragma empty_line #pragma empty_line /* Only used in build directory testsuite_hooks.h. */ #pragma empty_line #pragma empty_line /* Only used in build directory testsuite_hooks.h. */ #pragma empty_line #pragma empty_line /* Only used in build directory testsuite_hooks.h. */ #pragma empty_line #pragma empty_line /* Only used in build directory testsuite_hooks.h. */ #pragma empty_line #pragma empty_line /* Define if futex syscall is available. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <locale.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `log10f' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `log10l' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `logf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `logl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <machine/endian.h> header file. */ /* #undef _GLIBCXX_HAVE_MACHINE_ENDIAN_H */ #pragma empty_line /* Define to 1 if you have the <machine/param.h> header file. */ /* #undef _GLIBCXX_HAVE_MACHINE_PARAM_H */ #pragma empty_line /* Define if mbstate_t exists in wchar.h. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <memory.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `modf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `modff' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `modfl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <nan.h> header file. */ /* #undef _GLIBCXX_HAVE_NAN_H */ #pragma empty_line /* Define if poll is available in <poll.h>. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `powf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `powl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `qfpclass' function. */ /* #undef _GLIBCXX_HAVE_QFPCLASS */ #pragma empty_line /* Define to 1 if you have the `setenv' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sincos' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sincosf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sincosl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sinf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sinhf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sinhl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sinl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sqrtf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `sqrtl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <stdbool.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <stdint.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <stdlib.h> header file. */ #pragma empty_line #pragma empty_line /* Define if strerror_l is available in <string.h>. */ /* #undef _GLIBCXX_HAVE_STRERROR_L */ #pragma empty_line /* Define if strerror_r is available in <string.h>. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <strings.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <string.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `strtof' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `strtold' function. */ #pragma empty_line #pragma empty_line /* Define if strxfrm_l is available in <string.h>. */ #pragma empty_line #pragma empty_line /* Define to 1 if the target runtime linker supports binding the same symbol to different versions. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/filio.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_FILIO_H */ #pragma empty_line /* Define to 1 if you have the <sys/ioctl.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/ipc.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/isa_defs.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_ISA_DEFS_H */ #pragma empty_line /* Define to 1 if you have the <sys/machine.h> header file. */ /* #undef _GLIBCXX_HAVE_SYS_MACHINE_H */ #pragma empty_line /* Define to 1 if you have the <sys/param.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/resource.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/sem.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/stat.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/time.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/types.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <sys/uio.h> header file. */ #pragma empty_line #pragma empty_line /* Define if S_IFREG is available in <sys/stat.h>. */ /* #undef _GLIBCXX_HAVE_S_IFREG */ #pragma empty_line /* Define if S_IFREG is available in <sys/stat.h>. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `tanf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `tanhf' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `tanhl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `tanl' function. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <tgmath.h> header file. */ #pragma empty_line #pragma empty_line /* Define to 1 if the target supports thread-local storage. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <unistd.h> header file. */ #pragma empty_line #pragma empty_line /* Defined if vfwscanf exists. */ #pragma empty_line #pragma empty_line /* Defined if vswscanf exists. */ #pragma empty_line #pragma empty_line /* Defined if vwscanf exists. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <wchar.h> header file. */ #pragma empty_line #pragma empty_line /* Defined if wcstof exists. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the <wctype.h> header file. */ #pragma empty_line #pragma empty_line /* Define if writev is available in <sys/uio.h>. */ #pragma empty_line #pragma empty_line /* Define to 1 if you have the `_acosf' function. */ /* #undef _GLIBCXX_HAVE__ACOSF */ #pragma empty_line /* Define to 1 if you have the `_acosl' function. */ /* #undef _GLIBCXX_HAVE__ACOSL */ #pragma empty_line /* Define to 1 if you have the `_asinf' function. */ /* #undef _GLIBCXX_HAVE__ASINF */ #pragma empty_line /* Define to 1 if you have the `_asinl' function. */ /* #undef _GLIBCXX_HAVE__ASINL */ #pragma empty_line /* Define to 1 if you have the `_atan2f' function. */ /* #undef _GLIBCXX_HAVE__ATAN2F */ #pragma empty_line /* Define to 1 if you have the `_atan2l' function. */ /* #undef _GLIBCXX_HAVE__ATAN2L */ #pragma empty_line /* Define to 1 if you have the `_atanf' function. */ /* #undef _GLIBCXX_HAVE__ATANF */ #pragma empty_line /* Define to 1 if you have the `_atanl' function. */ /* #undef _GLIBCXX_HAVE__ATANL */ #pragma empty_line /* Define to 1 if you have the `_ceilf' function. */ /* #undef _GLIBCXX_HAVE__CEILF */ #pragma empty_line /* Define to 1 if you have the `_ceill' function. */ /* #undef _GLIBCXX_HAVE__CEILL */ #pragma empty_line /* Define to 1 if you have the `_cosf' function. */ /* #undef _GLIBCXX_HAVE__COSF */ #pragma empty_line /* Define to 1 if you have the `_coshf' function. */ /* #undef _GLIBCXX_HAVE__COSHF */ #pragma empty_line /* Define to 1 if you have the `_coshl' function. */ /* #undef _GLIBCXX_HAVE__COSHL */ #pragma empty_line /* Define to 1 if you have the `_cosl' function. */ /* #undef _GLIBCXX_HAVE__COSL */ #pragma empty_line /* Define to 1 if you have the `_expf' function. */ /* #undef _GLIBCXX_HAVE__EXPF */ #pragma empty_line /* Define to 1 if you have the `_expl' function. */ /* #undef _GLIBCXX_HAVE__EXPL */ #pragma empty_line /* Define to 1 if you have the `_fabsf' function. */ /* #undef _GLIBCXX_HAVE__FABSF */ #pragma empty_line /* Define to 1 if you have the `_fabsl' function. */ /* #undef _GLIBCXX_HAVE__FABSL */ #pragma empty_line /* Define to 1 if you have the `_finite' function. */ /* #undef _GLIBCXX_HAVE__FINITE */ #pragma empty_line /* Define to 1 if you have the `_finitef' function. */ /* #undef _GLIBCXX_HAVE__FINITEF */ #pragma empty_line /* Define to 1 if you have the `_finitel' function. */ /* #undef _GLIBCXX_HAVE__FINITEL */ #pragma empty_line /* Define to 1 if you have the `_floorf' function. */ /* #undef _GLIBCXX_HAVE__FLOORF */ #pragma empty_line /* Define to 1 if you have the `_floorl' function. */ /* #undef _GLIBCXX_HAVE__FLOORL */ #pragma empty_line /* Define to 1 if you have the `_fmodf' function. */ /* #undef _GLIBCXX_HAVE__FMODF */ #pragma empty_line /* Define to 1 if you have the `_fmodl' function. */ /* #undef _GLIBCXX_HAVE__FMODL */ #pragma empty_line /* Define to 1 if you have the `_fpclass' function. */ /* #undef _GLIBCXX_HAVE__FPCLASS */ #pragma empty_line /* Define to 1 if you have the `_frexpf' function. */ /* #undef _GLIBCXX_HAVE__FREXPF */ #pragma empty_line /* Define to 1 if you have the `_frexpl' function. */ /* #undef _GLIBCXX_HAVE__FREXPL */ #pragma empty_line /* Define to 1 if you have the `_hypot' function. */ /* #undef _GLIBCXX_HAVE__HYPOT */ #pragma empty_line /* Define to 1 if you have the `_hypotf' function. */ /* #undef _GLIBCXX_HAVE__HYPOTF */ #pragma empty_line /* Define to 1 if you have the `_hypotl' function. */ /* #undef _GLIBCXX_HAVE__HYPOTL */ #pragma empty_line /* Define to 1 if you have the `_isinf' function. */ /* #undef _GLIBCXX_HAVE__ISINF */ #pragma empty_line /* Define to 1 if you have the `_isinff' function. */ /* #undef _GLIBCXX_HAVE__ISINFF */ #pragma empty_line /* Define to 1 if you have the `_isinfl' function. */ /* #undef _GLIBCXX_HAVE__ISINFL */ #pragma empty_line /* Define to 1 if you have the `_isnan' function. */ /* #undef _GLIBCXX_HAVE__ISNAN */ #pragma empty_line /* Define to 1 if you have the `_isnanf' function. */ /* #undef _GLIBCXX_HAVE__ISNANF */ #pragma empty_line /* Define to 1 if you have the `_isnanl' function. */ /* #undef _GLIBCXX_HAVE__ISNANL */ #pragma empty_line /* Define to 1 if you have the `_ldexpf' function. */ /* #undef _GLIBCXX_HAVE__LDEXPF */ #pragma empty_line /* Define to 1 if you have the `_ldexpl' function. */ /* #undef _GLIBCXX_HAVE__LDEXPL */ #pragma empty_line /* Define to 1 if you have the `_log10f' function. */ /* #undef _GLIBCXX_HAVE__LOG10F */ #pragma empty_line /* Define to 1 if you have the `_log10l' function. */ /* #undef _GLIBCXX_HAVE__LOG10L */ #pragma empty_line /* Define to 1 if you have the `_logf' function. */ /* #undef _GLIBCXX_HAVE__LOGF */ #pragma empty_line /* Define to 1 if you have the `_logl' function. */ /* #undef _GLIBCXX_HAVE__LOGL */ #pragma empty_line /* Define to 1 if you have the `_modf' function. */ /* #undef _GLIBCXX_HAVE__MODF */ #pragma empty_line /* Define to 1 if you have the `_modff' function. */ /* #undef _GLIBCXX_HAVE__MODFF */ #pragma empty_line /* Define to 1 if you have the `_modfl' function. */ /* #undef _GLIBCXX_HAVE__MODFL */ #pragma empty_line /* Define to 1 if you have the `_powf' function. */ /* #undef _GLIBCXX_HAVE__POWF */ #pragma empty_line /* Define to 1 if you have the `_powl' function. */ /* #undef _GLIBCXX_HAVE__POWL */ #pragma empty_line /* Define to 1 if you have the `_qfpclass' function. */ /* #undef _GLIBCXX_HAVE__QFPCLASS */ #pragma empty_line /* Define to 1 if you have the `_sincos' function. */ /* #undef _GLIBCXX_HAVE__SINCOS */ #pragma empty_line /* Define to 1 if you have the `_sincosf' function. */ /* #undef _GLIBCXX_HAVE__SINCOSF */ #pragma empty_line /* Define to 1 if you have the `_sincosl' function. */ /* #undef _GLIBCXX_HAVE__SINCOSL */ #pragma empty_line /* Define to 1 if you have the `_sinf' function. */ /* #undef _GLIBCXX_HAVE__SINF */ #pragma empty_line /* Define to 1 if you have the `_sinhf' function. */ /* #undef _GLIBCXX_HAVE__SINHF */ #pragma empty_line /* Define to 1 if you have the `_sinhl' function. */ /* #undef _GLIBCXX_HAVE__SINHL */ #pragma empty_line /* Define to 1 if you have the `_sinl' function. */ /* #undef _GLIBCXX_HAVE__SINL */ #pragma empty_line /* Define to 1 if you have the `_sqrtf' function. */ /* #undef _GLIBCXX_HAVE__SQRTF */ #pragma empty_line /* Define to 1 if you have the `_sqrtl' function. */ /* #undef _GLIBCXX_HAVE__SQRTL */ #pragma empty_line /* Define to 1 if you have the `_tanf' function. */ /* #undef _GLIBCXX_HAVE__TANF */ #pragma empty_line /* Define to 1 if you have the `_tanhf' function. */ /* #undef _GLIBCXX_HAVE__TANHF */ #pragma empty_line /* Define to 1 if you have the `_tanhl' function. */ /* #undef _GLIBCXX_HAVE__TANHL */ #pragma empty_line /* Define to 1 if you have the `_tanl' function. */ /* #undef _GLIBCXX_HAVE__TANL */ #pragma empty_line /* Define as const if the declaration of iconv() needs const. */ #pragma empty_line #pragma empty_line /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #pragma empty_line #pragma empty_line /* Name of package */ /* #undef _GLIBCXX_PACKAGE */ #pragma empty_line /* Define to the address where bug reports for this package should be sent. */ #pragma empty_line #pragma empty_line /* Define to the full name of this package. */ #pragma empty_line #pragma empty_line /* Define to the full name and version of this package. */ #pragma empty_line #pragma empty_line /* Define to the one symbol short name of this package. */ #pragma empty_line #pragma empty_line /* Define to the home page for this package. */ #pragma empty_line #pragma empty_line /* Define to the version of this package. */ #pragma empty_line #pragma empty_line /* The size of `char', as computed by sizeof. */ /* #undef SIZEOF_CHAR */ #pragma empty_line /* The size of `int', as computed by sizeof. */ /* #undef SIZEOF_INT */ #pragma empty_line /* The size of `long', as computed by sizeof. */ /* #undef SIZEOF_LONG */ #pragma empty_line /* The size of `short', as computed by sizeof. */ /* #undef SIZEOF_SHORT */ #pragma empty_line /* The size of `void *', as computed by sizeof. */ /* #undef SIZEOF_VOID_P */ #pragma empty_line /* Define to 1 if you have the ANSI C header files. */ #pragma empty_line #pragma empty_line /* Version number of package */ /* #undef _GLIBCXX_VERSION */ #pragma empty_line /* Define if builtin atomic operations for bool are supported on this host. */ #pragma empty_line #pragma empty_line /* Define if builtin atomic operations for short are supported on this host. */ #pragma empty_line #pragma empty_line /* Define if builtin atomic operations for int are supported on this host. */ #pragma empty_line #pragma empty_line /* Define if builtin atomic operations for long long are supported on this host. */ #pragma empty_line #pragma empty_line /* Define to use concept checking code from the boost libraries. */ /* #undef _GLIBCXX_CONCEPT_CHECKS */ #pragma empty_line /* Define if a fully dynamic basic_string is wanted. */ /* #undef _GLIBCXX_FULLY_DYNAMIC_STRING */ #pragma empty_line /* Define if gthreads library is available. */ #pragma empty_line #pragma empty_line /* Define to 1 if a full hosted library is built, or 0 if freestanding. */ #pragma empty_line #pragma empty_line /* Define if compatibility should be provided for -mlong-double-64. */ #pragma empty_line /* Define if ptrdiff_t is int. */ /* #undef _GLIBCXX_PTRDIFF_T_IS_INT */ #pragma empty_line /* Define if using setrlimit to set resource limits during "make check" */ #pragma empty_line #pragma empty_line /* Define if size_t is unsigned int. */ /* #undef _GLIBCXX_SIZE_T_IS_UINT */ #pragma empty_line /* Define if the compiler is configured for setjmp/longjmp exceptions. */ /* #undef _GLIBCXX_SJLJ_EXCEPTIONS */ #pragma empty_line /* Define to the value of the EOF integer constant. */ #pragma empty_line #pragma empty_line /* Define to the value of the SEEK_CUR integer constant. */ #pragma empty_line #pragma empty_line /* Define to the value of the SEEK_END integer constant. */ #pragma empty_line #pragma empty_line /* Define to use symbol versioning in the shared library. */ #pragma empty_line #pragma empty_line /* Define to use darwin versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_DARWIN */ #pragma empty_line /* Define to use GNU versioning in the shared library. */ #pragma empty_line #pragma empty_line /* Define to use GNU namespace versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */ #pragma empty_line /* Define to use Sun versioning in the shared library. */ /* #undef _GLIBCXX_SYMVER_SUN */ #pragma empty_line /* Define if C99 functions or macros from <wchar.h>, <math.h>, <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed. */ #pragma empty_line #pragma empty_line /* Define if C99 functions in <complex.h> should be used in <complex>. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #pragma empty_line #pragma empty_line /* Define if C99 functions in <complex.h> should be used in <tr1/complex>. Using compiler builtins for these functions requires corresponding C99 library functions to be present. */ #pragma empty_line #pragma empty_line /* Define if C99 functions in <ctype.h> should be imported in <tr1/cctype> in namespace std::tr1. */ #pragma empty_line #pragma empty_line /* Define if C99 functions in <fenv.h> should be imported in <tr1/cfenv> in namespace std::tr1. */ #pragma empty_line #pragma empty_line /* Define if C99 functions in <inttypes.h> should be imported in <tr1/cinttypes> in namespace std::tr1. */ #pragma empty_line #pragma empty_line /* Define if wchar_t C99 functions in <inttypes.h> should be imported in <tr1/cinttypes> in namespace std::tr1. */ #pragma empty_line #pragma empty_line /* Define if C99 functions or macros in <math.h> should be imported in <cmath> in namespace std. */ #pragma empty_line #pragma empty_line /* Define if C99 functions or macros in <math.h> should be imported in <tr1/cmath> in namespace std::tr1. */ #pragma empty_line #pragma empty_line /* Define if C99 types in <stdint.h> should be imported in <tr1/cstdint> in namespace std::tr1. */ #pragma empty_line #pragma empty_line /* Defined if clock_gettime has monotonic clock support. */ /* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */ #pragma empty_line /* Defined if clock_gettime has realtime clock support. */ /* #undef _GLIBCXX_USE_CLOCK_REALTIME */ #pragma empty_line /* Define if ISO/IEC TR 24733 decimal floating point types are supported on this host. */ #pragma empty_line #pragma empty_line /* Defined if gettimeofday is available. */ #pragma empty_line #pragma empty_line /* Define if LFS support is available. */ #pragma empty_line #pragma empty_line /* Define if code specialized for long long should be used. */ #pragma empty_line #pragma empty_line /* Defined if nanosleep is available. */ /* #undef _GLIBCXX_USE_NANOSLEEP */ #pragma empty_line /* Define if NLS translations are to be used. */ #pragma empty_line #pragma empty_line /* Define if /dev/random and /dev/urandom are available for the random_device of TR1 (Chapter 5.1). */ #pragma empty_line #pragma empty_line /* Defined if sched_yield is available. */ /* #undef _GLIBCXX_USE_SCHED_YIELD */ #pragma empty_line /* Define if code specialized for wchar_t should be used. */ #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/cpp_type_traits.h" 1 3 // The -*- C++ -*- type traits classes for internal use in libstdc++ #pragma empty_line // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/cpp_type_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ext/type_traits} */ #pragma empty_line // Written by Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr> #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 36 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/cpp_type_traits.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line // // This file provides some compile-time information about various types. // These representations were designed, on purpose, to be constant-expressions // and not types as found in <bits/type_traits.h>. In particular, they // can be used in control structures and the optimizer hopefully will do // the obvious thing. // // Why integral expressions, and not functions nor types? // Firstly, these compile-time entities are used as template-arguments // so function return values won't work: We need compile-time entities. // We're left with types and constant integral expressions. // Secondly, from the point of view of ease of use, type-based compile-time // information is -not- *that* convenient. On has to write lots of // overloaded functions and to hope that the compiler will select the right // one. As a net effect, the overall structure isn't very clear at first // glance. // Thirdly, partial ordering and overload resolution (of function templates) // is highly costly in terms of compiler-resource. It is a Good Thing to // keep these resource consumption as least as possible. // // See valarray_array.h for a case use. // // -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06. // // Update 2005: types are also provided and <bits/type_traits.h> has been // removed. // #pragma empty_line // Forward declaration hack, should really include this from somewhere. namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _Iterator, typename _Container> class __normal_iterator; #pragma empty_line #pragma empty_line } // namespace #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line struct __true_type { }; struct __false_type { }; #pragma empty_line template<bool> struct __truth_type { typedef __false_type __type; }; #pragma empty_line template<> struct __truth_type<true> { typedef __true_type __type; }; #pragma empty_line // N.B. The conversions to bool are needed due to the issue // explained in c++/19404. template<class _Sp, class _Tp> struct __traitor { enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; typedef typename __truth_type<__value>::__type __type; }; #pragma empty_line // Compare for equality of types. template<typename, typename> struct __are_same { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line template<typename _Tp> struct __are_same<_Tp, _Tp> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // Holds if the template-argument is a void type. template<typename _Tp> struct __is_void { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line template<> struct __is_void<void> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // // Integer types // template<typename _Tp> struct __is_integer { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line // Thirteen specializations (yes there are eleven standard integer // types; <em>long long</em> and <em>unsigned long long</em> are // supported as extensions) template<> struct __is_integer<bool> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<signed char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<unsigned char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line #pragma empty_line template<> struct __is_integer<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; #pragma line 198 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/cpp_type_traits.h" 3 template<> struct __is_integer<short> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<unsigned short> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<int> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<unsigned int> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<long> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<unsigned long> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<long long> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_integer<unsigned long long> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // // Floating point types // template<typename _Tp> struct __is_floating { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line // three specializations (float, double and 'long double') template<> struct __is_floating<float> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_floating<double> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_floating<long double> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // // Pointer types // template<typename _Tp> struct __is_pointer { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line template<typename _Tp> struct __is_pointer<_Tp*> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // // Normal iterator type // template<typename _Tp> struct __is_normal_iterator { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line template<typename _Iterator, typename _Container> struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // // An arithmetic type is an integer type or a floating point type // template<typename _Tp> struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { }; #pragma empty_line // // A fundamental type is `void' or and arithmetic type // template<typename _Tp> struct __is_fundamental : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > { }; #pragma empty_line // // A scalar type is an arithmetic type or a pointer type // template<typename _Tp> struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { }; #pragma empty_line // // For use in std::copy and std::find overloads for streambuf iterators. // template<typename _Tp> struct __is_char { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line template<> struct __is_char<char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line #pragma empty_line template<> struct __is_char<wchar_t> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line #pragma empty_line template<typename _Tp> struct __is_byte { enum { __value = 0 }; typedef __false_type __type; }; #pragma empty_line template<> struct __is_byte<char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_byte<signed char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line template<> struct __is_byte<unsigned char> { enum { __value = 1 }; typedef __true_type __type; }; #pragma empty_line // // Move iterator type // template<typename _Tp> struct __is_move_iterator { enum { __value = 0 }; typedef __false_type __type; }; #pragma line 422 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/cpp_type_traits.h" 3 } // namespace #pragma line 44 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/type_traits.h" 1 3 // -*- C++ -*- #pragma empty_line // Copyright (C) 2005, 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3, or (at your option) any later // version. #pragma empty_line // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file ext/type_traits.h * This file is a GNU extension to the Standard C++ Library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 33 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/type_traits.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // Define a nested type if some predicate holds. template<bool, typename> struct __enable_if { }; #pragma empty_line template<typename _Tp> struct __enable_if<true, _Tp> { typedef _Tp __type; }; #pragma empty_line #pragma empty_line // Conditional expression for types. If true, first, if false, second. template<bool _Cond, typename _Iftrue, typename _Iffalse> struct __conditional_type { typedef _Iftrue __type; }; #pragma empty_line template<typename _Iftrue, typename _Iffalse> struct __conditional_type<false, _Iftrue, _Iffalse> { typedef _Iffalse __type; }; #pragma empty_line #pragma empty_line // Given an integral builtin type, return the corresponding unsigned type. template<typename _Tp> struct __add_unsigned { private: typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; #pragma empty_line public: typedef typename __if_type::__type __type; }; #pragma empty_line template<> struct __add_unsigned<char> { typedef unsigned char __type; }; #pragma empty_line template<> struct __add_unsigned<signed char> { typedef unsigned char __type; }; #pragma empty_line template<> struct __add_unsigned<short> { typedef unsigned short __type; }; #pragma empty_line template<> struct __add_unsigned<int> { typedef unsigned int __type; }; #pragma empty_line template<> struct __add_unsigned<long> { typedef unsigned long __type; }; #pragma empty_line template<> struct __add_unsigned<long long> { typedef unsigned long long __type; }; #pragma empty_line // Declare but don't define. template<> struct __add_unsigned<bool>; #pragma empty_line template<> struct __add_unsigned<wchar_t>; #pragma empty_line #pragma empty_line // Given an integral builtin type, return the corresponding signed type. template<typename _Tp> struct __remove_unsigned { private: typedef __enable_if<std::__is_integer<_Tp>::__value, _Tp> __if_type; #pragma empty_line public: typedef typename __if_type::__type __type; }; #pragma empty_line template<> struct __remove_unsigned<char> { typedef signed char __type; }; #pragma empty_line template<> struct __remove_unsigned<unsigned char> { typedef signed char __type; }; #pragma empty_line template<> struct __remove_unsigned<unsigned short> { typedef short __type; }; #pragma empty_line template<> struct __remove_unsigned<unsigned int> { typedef int __type; }; #pragma empty_line template<> struct __remove_unsigned<unsigned long> { typedef long __type; }; #pragma empty_line template<> struct __remove_unsigned<unsigned long long> { typedef long long __type; }; #pragma empty_line // Declare but don't define. template<> struct __remove_unsigned<bool>; #pragma empty_line template<> struct __remove_unsigned<wchar_t>; #pragma empty_line #pragma empty_line // For use in string and vstring. template<typename _Type> inline bool __is_null_pointer(_Type* __ptr) { return __ptr == 0; } #pragma empty_line template<typename _Type> inline bool __is_null_pointer(_Type) { return false; } #pragma empty_line #pragma empty_line // For complex and cmath template<typename _Tp, bool = std::__is_integer<_Tp>::__value> struct __promote { typedef double __type; }; #pragma empty_line // No nested __type member for non-integer non-floating point types, // allows this type to be used for SFINAE to constrain overloads in // <cmath> and <complex> to only the intended types. template<typename _Tp> struct __promote<_Tp, false> { }; #pragma empty_line template<> struct __promote<long double> { typedef long double __type; }; #pragma empty_line template<> struct __promote<double> { typedef double __type; }; #pragma empty_line template<> struct __promote<float> { typedef float __type; }; #pragma empty_line template<typename _Tp, typename _Up, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type> struct __promote_2 { typedef __typeof__(_Tp2() + _Up2()) __type; }; #pragma empty_line template<typename _Tp, typename _Up, typename _Vp, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type> struct __promote_3 { typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; }; #pragma empty_line template<typename _Tp, typename _Up, typename _Vp, typename _Wp, typename _Tp2 = typename __promote<_Tp>::__type, typename _Up2 = typename __promote<_Up>::__type, typename _Vp2 = typename __promote<_Vp>::__type, typename _Wp2 = typename __promote<_Wp>::__type> struct __promote_4 { typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; }; #pragma empty_line #pragma empty_line } // namespace #pragma line 45 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 2 3 #pragma line 1 "/usr/include/math.h" 1 3 4 /* Declarations for math functions. Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.12 Mathematics <math.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line /* Get machine-dependent vector math functions declarations. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/math-vector.h" 1 3 4 /* Platform-specific SIMD declarations of math functions. Copyright (C) 2014-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get default empty definitions for simd declarations. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/libm-simd-decl-stubs.h" 1 3 4 /* Empty definitions required for __MATHCALL_VEC unfolding in mathcalls.h. Copyright (C) 2014-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Needed definitions could be generated with: for func in $(grep __MATHCALL_VEC math/bits/mathcalls.h |\ sed -r "s|__MATHCALL_VEC.?\(||; s|,.*||"); do echo "#define __DECL_SIMD_${func}"; echo "#define __DECL_SIMD_${func}f"; echo "#define __DECL_SIMD_${func}l"; done */ #pragma line 26 "/usr/include/x86_64-linux-gnu/bits/math-vector.h" 2 3 4 #pragma line 32 "/usr/include/math.h" 2 3 4 #pragma empty_line /* Get machine-dependent HUGE_VAL value (returned on overflow). On all IEEE754 machines, this is +Infinity. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/huge_val.h" 1 3 4 /* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). Used by <stdlib.h> and <math.h> functions for overflow. Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* IEEE positive infinity (-HUGE_VAL is negative infinity). */ #pragma line 36 "/usr/include/math.h" 2 3 4 #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/huge_valf.h" 1 3 4 /* `HUGE_VALF' constant for IEEE 754 machines (where it is infinity). Used by <stdlib.h> and <math.h> functions for overflow. Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* IEEE positive infinity (-HUGE_VAL is negative infinity). */ #pragma line 38 "/usr/include/math.h" 2 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/huge_vall.h" 1 3 4 /* `HUGE_VALL' constant for ix86 (where it is infinity). Used by <stdlib.h> and <math.h> functions for overflow. Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 39 "/usr/include/math.h" 2 3 4 #pragma empty_line /* Get machine-dependent INFINITY value. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/inf.h" 1 3 4 /* `INFINITY' constant for IEEE 754 machines. Copyright (C) 2004-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* IEEE positive infinity. */ #pragma line 42 "/usr/include/math.h" 2 3 4 #pragma empty_line /* Get machine-dependent NAN value (returned for some domain errors). */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/nan.h" 1 3 4 /* `NAN' constant for IEEE 754 machines. Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* IEEE Not A Number. */ #pragma line 45 "/usr/include/math.h" 2 3 4 #pragma empty_line #pragma empty_line /* Get general and ISO C99 specific information. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/mathdef.h" 1 3 4 /* Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 26 "/usr/include/x86_64-linux-gnu/bits/mathdef.h" 3 4 /* The x86-64 architecture computes values with the precission of the used type. Similarly for -m32 -mfpmath=sse. */ typedef float float_t; /* `float' expressions are evaluated as `float'. */ typedef double double_t; /* `double' expressions are evaluated as `double'. */ #pragma line 41 "/usr/include/x86_64-linux-gnu/bits/mathdef.h" 3 4 /* The values returned by `ilogb' for 0 and NaN respectively. */ #pragma empty_line #pragma empty_line #pragma empty_line /* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} builtins are supported. */ #pragma line 49 "/usr/include/math.h" 2 3 4 #pragma empty_line /* The file <bits/mathcalls.h> contains the prototypes for all the actual math functions. These macros are used for those prototypes, so we can easily declare each function as both `name' and `__name', and can declare the float versions `namef' and `__namef'. */ #pragma line 83 "/usr/include/math.h" 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 /* Prototype declarations for math functions; helper file for <math.h>. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* NOTE: Because of the special way this file is used by <math.h>, this file must NOT be protected from multiple inclusion as header files usually are. #pragma empty_line This file provides prototype declarations for the math functions. Most functions are declared using the macro: #pragma empty_line __MATHCALL (NAME,[_r], (ARGS...)); #pragma empty_line This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. #pragma empty_line Functions returning other types like `int' are declared using the macro: #pragma empty_line __MATHDECL (TYPE, NAME,[_r], (ARGS...)); #pragma empty_line This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. #pragma empty_line Note that there must be no whitespace before the argument passed for NAME, to make token pasting work with -traditional. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Trigonometric functions. */ #pragma empty_line #pragma empty_line /* Arc cosine of X. */ extern double acos (double __x) throw (); extern double __acos (double __x) throw (); /* Arc sine of X. */ extern double asin (double __x) throw (); extern double __asin (double __x) throw (); /* Arc tangent of X. */ extern double atan (double __x) throw (); extern double __atan (double __x) throw (); /* Arc tangent of Y/X. */ extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); #pragma empty_line /* Cosine of X. */ extern double cos (double __x) throw (); extern double __cos (double __x) throw (); /* Sine of X. */ extern double sin (double __x) throw (); extern double __sin (double __x) throw (); /* Tangent of X. */ extern double tan (double __x) throw (); extern double __tan (double __x) throw (); #pragma empty_line /* Hyperbolic functions. */ #pragma empty_line /* Hyperbolic cosine of X. */ extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); /* Hyperbolic sine of X. */ extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); /* Hyperbolic tangent of X. */ extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Cosine and sine of X. */ extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Hyperbolic arc cosine of X. */ extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); /* Hyperbolic arc sine of X. */ extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); /* Hyperbolic arc tangent of X. */ extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Exponential and logarithmic functions. */ #pragma empty_line #pragma empty_line /* Exponential function of X. */ extern double exp (double __x) throw (); extern double __exp (double __x) throw (); #pragma empty_line /* Break VALUE into a normalized fraction and an integral power of 2. */ extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); #pragma empty_line /* X times (two to the EXP power). */ extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); #pragma empty_line /* Natural logarithm of X. */ extern double log (double __x) throw (); extern double __log (double __x) throw (); #pragma empty_line /* Base-ten logarithm of X. */ extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); #pragma empty_line /* Break VALUE into integral and fractional parts. */ extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* A function missing in all standards: compute exponent to base ten. */ extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); /* Another name occasionally used. */ extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return exp(X) - 1. */ extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); #pragma empty_line /* Return log(1 + X). */ extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); #pragma empty_line /* Return the base 2 signed integral exponent of X. */ extern double logb (double __x) throw (); extern double __logb (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Compute base-2 exponential of X. */ extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); #pragma empty_line /* Compute base-2 logarithm of X. */ extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Power functions. */ #pragma empty_line #pragma empty_line /* Return X to the Y power. */ extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); #pragma empty_line /* Return the square root of X. */ extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return `sqrt(X*X + Y*Y)'. */ extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the cube root of X. */ extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Nearest integer, absolute value, and remainder functions. */ #pragma empty_line #pragma empty_line /* Smallest integral value not less than X. */ extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Absolute value of X. */ extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Largest integer not greater than X. */ extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Floating-point modulo remainder of X/Y. */ extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); #pragma empty_line #pragma empty_line /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ extern int __isinf (double __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Return nonzero if VALUE is finite and not NaN. */ extern int __finite (double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ extern int isinf (double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is finite and not NaN. */ extern int finite (double __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Return the remainder of X/Y. */ extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); #pragma empty_line #pragma empty_line /* Return the fractional part of X after dividing out `ilogb (X)'. */ extern double significand (double __x) throw (); extern double __significand (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return X with its signed changed to Y's. */ extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return representation of qNaN for double type. */ extern double nan (const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (const char *__tagb) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is not a number. */ extern int __isnan (double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is not a number. */ extern int isnan (double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Bessel functions. */ extern double j0 (double) throw (); extern double __j0 (double) throw (); extern double j1 (double) throw (); extern double __j1 (double) throw (); extern double jn (int, double) throw (); extern double __jn (int, double) throw (); extern double y0 (double) throw (); extern double __y0 (double) throw (); extern double y1 (double) throw (); extern double __y1 (double) throw (); extern double yn (int, double) throw (); extern double __yn (int, double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Error and gamma functions. */ extern double erf (double) throw (); extern double __erf (double) throw (); extern double erfc (double) throw (); extern double __erfc (double) throw (); extern double lgamma (double) throw (); extern double __lgamma (double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* True gamma function. */ extern double tgamma (double) throw (); extern double __tgamma (double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Obsolete alias for `lgamma'. */ extern double gamma (double) throw (); extern double __gamma (double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Reentrant version of lgamma. This function uses the global variable `signgam'. The reentrant version instead takes a pointer and stores the value through it. */ extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the integer nearest X in the direction of the prevailing rounding mode. */ extern double rint (double __x) throw (); extern double __rint (double __x) throw (); #pragma empty_line /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); #pragma empty_line extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return the remainder of integer divison X / Y with infinite precision. */ extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); #pragma empty_line #pragma empty_line /* Return the binary exponent of X, which must be nonzero. */ extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); #pragma empty_line /* Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. */ extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); #pragma empty_line /* Round X to nearest integral value, rounding halfway cases away from zero. */ extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Round X to the integral value in floating-point format nearest but not larger in magnitude. */ extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. */ extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); #pragma empty_line #pragma empty_line /* Conversion functions. */ #pragma empty_line /* Round X to nearest integral value according to current rounding direction. */ extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); __extension__ extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); #pragma empty_line /* Round X to nearest integral value, rounding halfway cases away from zero. */ extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); __extension__ extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); #pragma empty_line #pragma empty_line /* Return positive difference between X and Y. */ extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); #pragma empty_line /* Return maximum numeric value from X and Y. */ extern double fmax (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmax (double __x, double __y) throw () __attribute__ ((__const__)); #pragma empty_line /* Return minimum numeric value from X and Y. */ extern double fmin (double __x, double __y) throw () __attribute__ ((__const__)); extern double __fmin (double __x, double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Classify given number. */ extern int __fpclassify (double __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Test for negative number. */ extern int __signbit (double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Multiply-add function computed as a ternary operation. */ extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Test for signaling NaN. */ extern int __issignaling (double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); #pragma line 84 "/usr/include/math.h" 2 3 4 #pragma line 93 "/usr/include/math.h" 3 4 /* Include the file of declarations again, this time using `float' instead of `double' and appending f to each function name. */ #pragma line 104 "/usr/include/math.h" 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 /* Prototype declarations for math functions; helper file for <math.h>. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* NOTE: Because of the special way this file is used by <math.h>, this file must NOT be protected from multiple inclusion as header files usually are. #pragma empty_line This file provides prototype declarations for the math functions. Most functions are declared using the macro: #pragma empty_line __MATHCALL (NAME,[_r], (ARGS...)); #pragma empty_line This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. #pragma empty_line Functions returning other types like `int' are declared using the macro: #pragma empty_line __MATHDECL (TYPE, NAME,[_r], (ARGS...)); #pragma empty_line This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. #pragma empty_line Note that there must be no whitespace before the argument passed for NAME, to make token pasting work with -traditional. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Trigonometric functions. */ #pragma empty_line #pragma empty_line /* Arc cosine of X. */ extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); /* Arc sine of X. */ extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); /* Arc tangent of X. */ extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); /* Arc tangent of Y/X. */ extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); #pragma empty_line /* Cosine of X. */ extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); /* Sine of X. */ extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); /* Tangent of X. */ extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); #pragma empty_line /* Hyperbolic functions. */ #pragma empty_line /* Hyperbolic cosine of X. */ extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); /* Hyperbolic sine of X. */ extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); /* Hyperbolic tangent of X. */ extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Cosine and sine of X. */ extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Hyperbolic arc cosine of X. */ extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); /* Hyperbolic arc sine of X. */ extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); /* Hyperbolic arc tangent of X. */ extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Exponential and logarithmic functions. */ #pragma empty_line #pragma empty_line /* Exponential function of X. */ extern float expf (float __x) throw (); extern float __expf (float __x) throw (); #pragma empty_line /* Break VALUE into a normalized fraction and an integral power of 2. */ extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); #pragma empty_line /* X times (two to the EXP power). */ extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); #pragma empty_line /* Natural logarithm of X. */ extern float logf (float __x) throw (); extern float __logf (float __x) throw (); #pragma empty_line /* Base-ten logarithm of X. */ extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); #pragma empty_line /* Break VALUE into integral and fractional parts. */ extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* A function missing in all standards: compute exponent to base ten. */ extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); /* Another name occasionally used. */ extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return exp(X) - 1. */ extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); #pragma empty_line /* Return log(1 + X). */ extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); #pragma empty_line /* Return the base 2 signed integral exponent of X. */ extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Compute base-2 exponential of X. */ extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); #pragma empty_line /* Compute base-2 logarithm of X. */ extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Power functions. */ #pragma empty_line #pragma empty_line /* Return X to the Y power. */ extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); #pragma empty_line /* Return the square root of X. */ extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return `sqrt(X*X + Y*Y)'. */ extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the cube root of X. */ extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Nearest integer, absolute value, and remainder functions. */ #pragma empty_line #pragma empty_line /* Smallest integral value not less than X. */ extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Absolute value of X. */ extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Largest integer not greater than X. */ extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Floating-point modulo remainder of X/Y. */ extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); #pragma empty_line #pragma empty_line /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ extern int __isinff (float __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Return nonzero if VALUE is finite and not NaN. */ extern int __finitef (float __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ extern int isinff (float __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is finite and not NaN. */ extern int finitef (float __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Return the remainder of X/Y. */ extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); #pragma empty_line #pragma empty_line /* Return the fractional part of X after dividing out `ilogb (X)'. */ extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return X with its signed changed to Y's. */ extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return representation of qNaN for double type. */ extern float nanf (const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (const char *__tagb) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is not a number. */ extern int __isnanf (float __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is not a number. */ extern int isnanf (float __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Bessel functions. */ extern float j0f (float) throw (); extern float __j0f (float) throw (); extern float j1f (float) throw (); extern float __j1f (float) throw (); extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); extern float y0f (float) throw (); extern float __y0f (float) throw (); extern float y1f (float) throw (); extern float __y1f (float) throw (); extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Error and gamma functions. */ extern float erff (float) throw (); extern float __erff (float) throw (); extern float erfcf (float) throw (); extern float __erfcf (float) throw (); extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* True gamma function. */ extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Obsolete alias for `lgamma'. */ extern float gammaf (float) throw (); extern float __gammaf (float) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Reentrant version of lgamma. This function uses the global variable `signgam'. The reentrant version instead takes a pointer and stores the value through it. */ extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the integer nearest X in the direction of the prevailing rounding mode. */ extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); #pragma empty_line /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); #pragma empty_line extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return the remainder of integer divison X / Y with infinite precision. */ extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); #pragma empty_line #pragma empty_line /* Return the binary exponent of X, which must be nonzero. */ extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); #pragma empty_line /* Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. */ extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); #pragma empty_line /* Round X to nearest integral value, rounding halfway cases away from zero. */ extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Round X to the integral value in floating-point format nearest but not larger in magnitude. */ extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. */ extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); #pragma empty_line #pragma empty_line /* Conversion functions. */ #pragma empty_line /* Round X to nearest integral value according to current rounding direction. */ extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); __extension__ extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); #pragma empty_line /* Round X to nearest integral value, rounding halfway cases away from zero. */ extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); __extension__ extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); #pragma empty_line #pragma empty_line /* Return positive difference between X and Y. */ extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); #pragma empty_line /* Return maximum numeric value from X and Y. */ extern float fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) throw () __attribute__ ((__const__)); #pragma empty_line /* Return minimum numeric value from X and Y. */ extern float fminf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __fminf (float __x, float __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Classify given number. */ extern int __fpclassifyf (float __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Test for negative number. */ extern int __signbitf (float __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Multiply-add function computed as a ternary operation. */ extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Test for signaling NaN. */ extern int __issignalingf (float __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); #pragma line 105 "/usr/include/math.h" 2 3 4 #pragma line 139 "/usr/include/math.h" 3 4 /* Include the file of declarations again, this time using `long double' instead of `double' and appending l to each function name. */ #pragma line 151 "/usr/include/math.h" 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/mathcalls.h" 1 3 4 /* Prototype declarations for math functions; helper file for <math.h>. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* NOTE: Because of the special way this file is used by <math.h>, this file must NOT be protected from multiple inclusion as header files usually are. #pragma empty_line This file provides prototype declarations for the math functions. Most functions are declared using the macro: #pragma empty_line __MATHCALL (NAME,[_r], (ARGS...)); #pragma empty_line This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. #pragma empty_line Functions returning other types like `int' are declared using the macro: #pragma empty_line __MATHDECL (TYPE, NAME,[_r], (ARGS...)); #pragma empty_line This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. #pragma empty_line Note that there must be no whitespace before the argument passed for NAME, to make token pasting work with -traditional. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Trigonometric functions. */ #pragma empty_line #pragma empty_line /* Arc cosine of X. */ extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); /* Arc sine of X. */ extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); /* Arc tangent of X. */ extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); /* Arc tangent of Y/X. */ extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); #pragma empty_line /* Cosine of X. */ extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); /* Sine of X. */ extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); /* Tangent of X. */ extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); #pragma empty_line /* Hyperbolic functions. */ #pragma empty_line /* Hyperbolic cosine of X. */ extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); /* Hyperbolic sine of X. */ extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); /* Hyperbolic tangent of X. */ extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Cosine and sine of X. */ extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Hyperbolic arc cosine of X. */ extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); /* Hyperbolic arc sine of X. */ extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); /* Hyperbolic arc tangent of X. */ extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Exponential and logarithmic functions. */ #pragma empty_line #pragma empty_line /* Exponential function of X. */ extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); #pragma empty_line /* Break VALUE into a normalized fraction and an integral power of 2. */ extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); #pragma empty_line /* X times (two to the EXP power). */ extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); #pragma empty_line /* Natural logarithm of X. */ extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); #pragma empty_line /* Base-ten logarithm of X. */ extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); #pragma empty_line /* Break VALUE into integral and fractional parts. */ extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* A function missing in all standards: compute exponent to base ten. */ extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); /* Another name occasionally used. */ extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return exp(X) - 1. */ extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); #pragma empty_line /* Return log(1 + X). */ extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); #pragma empty_line /* Return the base 2 signed integral exponent of X. */ extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Compute base-2 exponential of X. */ extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); #pragma empty_line /* Compute base-2 logarithm of X. */ extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Power functions. */ #pragma empty_line #pragma empty_line /* Return X to the Y power. */ extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); #pragma empty_line /* Return the square root of X. */ extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return `sqrt(X*X + Y*Y)'. */ extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the cube root of X. */ extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Nearest integer, absolute value, and remainder functions. */ #pragma empty_line #pragma empty_line /* Smallest integral value not less than X. */ extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Absolute value of X. */ extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Largest integer not greater than X. */ extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Floating-point modulo remainder of X/Y. */ extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); #pragma empty_line #pragma empty_line /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Return nonzero if VALUE is finite and not NaN. */ extern int __finitel (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ extern int isinfl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is finite and not NaN. */ extern int finitel (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Return the remainder of X/Y. */ extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); #pragma empty_line #pragma empty_line /* Return the fractional part of X after dividing out `ilogb (X)'. */ extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return X with its signed changed to Y's. */ extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return representation of qNaN for double type. */ extern long double nanl (const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (const char *__tagb) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is not a number. */ extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero if VALUE is not a number. */ extern int isnanl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Bessel functions. */ extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Error and gamma functions. */ extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* True gamma function. */ extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Obsolete alias for `lgamma'. */ extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Reentrant version of lgamma. This function uses the global variable `signgam'. The reentrant version instead takes a pointer and stores the value through it. */ extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the integer nearest X in the direction of the prevailing rounding mode. */ extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); #pragma empty_line /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return the remainder of integer divison X / Y with infinite precision. */ extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); #pragma empty_line #pragma empty_line /* Return the binary exponent of X, which must be nonzero. */ extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); #pragma empty_line /* Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. */ extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); #pragma empty_line /* Round X to nearest integral value, rounding halfway cases away from zero. */ extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Round X to the integral value in floating-point format nearest but not larger in magnitude. */ extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); #pragma empty_line /* Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. */ extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); #pragma empty_line #pragma empty_line /* Conversion functions. */ #pragma empty_line /* Round X to nearest integral value according to current rounding direction. */ extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); __extension__ extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); #pragma empty_line /* Round X to nearest integral value, rounding halfway cases away from zero. */ extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); __extension__ extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); #pragma empty_line #pragma empty_line /* Return positive difference between X and Y. */ extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); #pragma empty_line /* Return maximum numeric value from X and Y. */ extern long double fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line /* Return minimum numeric value from X and Y. */ extern long double fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Classify given number. */ extern int __fpclassifyl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line /* Test for negative number. */ extern int __signbitl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Multiply-add function computed as a ternary operation. */ extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Test for signaling NaN. */ extern int __issignalingl (long double __value) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return X times (2 to the Nth power). */ extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); #pragma line 152 "/usr/include/math.h" 2 3 4 #pragma line 167 "/usr/include/math.h" 3 4 /* This variable is used by `gamma' and `lgamma'. */ extern int signgam; #pragma empty_line #pragma empty_line #pragma empty_line /* ISO C99 defines some generic macros which work on any data type. */ #pragma empty_line #pragma empty_line /* Get the architecture specific values describing the floating-point evaluation. The following symbols will get defined: #pragma empty_line float_t floating-point type at least as wide as `float' used to evaluate `float' expressions double_t floating-point type at least as wide as `double' used to evaluate `double' expressions #pragma empty_line FLT_EVAL_METHOD Defined to 0 if `float_t' is `float' and `double_t' is `double' 1 if `float_t' and `double_t' are `double' 2 if `float_t' and `double_t' are `long double' else `float_t' and `double_t' are unspecified #pragma empty_line INFINITY representation of the infinity value of type `float' #pragma empty_line FP_FAST_FMA FP_FAST_FMAF FP_FAST_FMAL If defined it indicates that the `fma' function generally executes about as fast as a multiply and an add. This macro is defined only iff the `fma' function is implemented directly with a hardware multiply-add instructions. #pragma empty_line FP_ILOGB0 Expands to a value returned by `ilogb (0.0)'. FP_ILOGBNAN Expands to a value returned by `ilogb (NAN)'. #pragma empty_line DECIMAL_DIG Number of decimal digits supported by conversion between decimal and all internal floating-point formats. #pragma empty_line */ #pragma empty_line /* All floating-point numbers can be put in one of these categories. */ enum { FP_NAN = #pragma empty_line 0, FP_INFINITE = #pragma empty_line 1, FP_ZERO = #pragma empty_line 2, FP_SUBNORMAL = #pragma empty_line 3, FP_NORMAL = #pragma empty_line 4 }; #pragma empty_line /* GCC bug 66462 means we cannot use the math builtins with -fsignaling-nan, so disable builtins if this is enabled. When fixed in a newer GCC, the __SUPPORT_SNAN__ check may be skipped for those versions. */ #pragma empty_line /* Return number of classification appropriate for X. */ #pragma line 248 "/usr/include/math.h" 3 4 /* Return nonzero value if sign of X is negative. */ #pragma line 268 "/usr/include/math.h" 3 4 /* Return nonzero value if X is not +-Inf or NaN. */ #pragma line 282 "/usr/include/math.h" 3 4 /* Return nonzero value if X is neither zero, subnormal, Inf, nor NaN. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if X is a NaN. We could use `fpclassify' but we already have this functions `__isnan' and it is faster. */ #pragma line 304 "/usr/include/math.h" 3 4 /* Return nonzero value if X is positive or negative infinity. */ #pragma line 318 "/usr/include/math.h" 3 4 /* Bitmasks for the math_errhandling macro. */ #pragma empty_line #pragma empty_line #pragma empty_line /* By default all functions support both errno and exception handling. In gcc's fast math mode and if inline functions are defined this might not be true. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if X is a signaling NaN. */ #pragma line 346 "/usr/include/math.h" 3 4 /* Support for various different standard error handling behaviors. */ typedef enum { _IEEE_ = -1, /* According to IEEE 754/IEEE 854. */ _SVID_, /* According to System V, release 4. */ _XOPEN_, /* Nowadays also Unix98. */ _POSIX_, _ISOC_ /* Actually this is ISO C99. */ } _LIB_VERSION_TYPE; #pragma empty_line /* This variable can be changed at run-time to any of the values above to affect floating point error handling behavior (it may also be necessary to change the hardware FPU exception settings). */ extern _LIB_VERSION_TYPE _LIB_VERSION; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* In SVID error handling, `matherr' is called with this description of the exceptional condition. #pragma empty_line We have a problem when using C++ since `exception' is a reserved name in C++. */ #pragma empty_line struct __exception #pragma empty_line #pragma empty_line #pragma empty_line { int type; char *name; double arg1; double arg2; double retval; }; #pragma empty_line #pragma empty_line extern int matherr (struct __exception *__exc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Types of exceptions in the `type' field. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* SVID mode specifies returning this large value instead of infinity. */ #pragma line 411 "/usr/include/math.h" 3 4 /* Some useful constants. */ #pragma line 428 "/usr/include/math.h" 3 4 /* The above constants are not adequate for computation using `long double's. Therefore we provide as an extension constants with similar names as a GNU extension. Provide enough digits for the 128-bit IEEE quad. */ #pragma line 448 "/usr/include/math.h" 3 4 /* When compiling in strict ISO C compatible mode we must not use the inline functions since they, among other things, do not set the `errno' variable correctly. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* ISO C99 defines some macros to compare number while taking care for unordered numbers. Many FPUs provide special instructions to support these operations. Generic support in GCC for these as builtins went in before 3.0.0, but not all cpus added their patterns. We define versions that use the builtins here, and <bits/mathinline.h> will undef/redefine as appropriate for the specific GCC version in use. */ #pragma line 470 "/usr/include/math.h" 3 4 /* Get machine-dependent inline versions (if there are any). */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Define special entry points to use when the compiler got told to only expect finite results. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* If we've still got undefined comparison macros, provide defaults. */ #pragma empty_line /* Return nonzero value if X is greater than Y. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if X is greater than or equal to Y. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if X is less than Y. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if X is less than or equal to Y. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if either X is less than Y or Y is less than X. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero value if arguments are unordered. */ #pragma line 534 "/usr/include/math.h" 3 4 } #pragma line 46 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Get rid of those macros defined in <math.h> in lieu of real functions. #pragma line 76 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line inline double abs(double __x) { return __builtin_fabs(__x); } #pragma empty_line inline float abs(float __x) { return __builtin_fabsf(__x); } #pragma empty_line inline long double abs(long double __x) { return __builtin_fabsl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type abs(_Tp __x) { return __builtin_fabs(__x); } #pragma empty_line using ::acos; #pragma empty_line inline float acos(float __x) { return __builtin_acosf(__x); } #pragma empty_line inline long double acos(long double __x) { return __builtin_acosl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type acos(_Tp __x) { return __builtin_acos(__x); } #pragma empty_line using ::asin; #pragma empty_line inline float asin(float __x) { return __builtin_asinf(__x); } #pragma empty_line inline long double asin(long double __x) { return __builtin_asinl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type asin(_Tp __x) { return __builtin_asin(__x); } #pragma empty_line using ::atan; #pragma empty_line inline float atan(float __x) { return __builtin_atanf(__x); } #pragma empty_line inline long double atan(long double __x) { return __builtin_atanl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type atan(_Tp __x) { return __builtin_atan(__x); } #pragma empty_line using ::atan2; #pragma empty_line inline float atan2(float __y, float __x) { return __builtin_atan2f(__y, __x); } #pragma empty_line inline long double atan2(long double __y, long double __x) { return __builtin_atan2l(__y, __x); } #pragma empty_line template<typename _Tp, typename _Up> inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type atan2(_Tp __y, _Up __x) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return atan2(__type(__y), __type(__x)); } #pragma empty_line using ::ceil; #pragma empty_line inline float ceil(float __x) { return __builtin_ceilf(__x); } #pragma empty_line inline long double ceil(long double __x) { return __builtin_ceill(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ceil(_Tp __x) { return __builtin_ceil(__x); } #pragma empty_line using ::cos; #pragma empty_line inline float cos(float __x) { return __builtin_cosf(__x); } #pragma empty_line inline long double cos(long double __x) { return __builtin_cosl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cos(_Tp __x) { return __builtin_cos(__x); } #pragma empty_line using ::cosh; #pragma empty_line inline float cosh(float __x) { return __builtin_coshf(__x); } #pragma empty_line inline long double cosh(long double __x) { return __builtin_coshl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type cosh(_Tp __x) { return __builtin_cosh(__x); } #pragma empty_line using ::exp; #pragma empty_line inline float exp(float __x) { return __builtin_expf(__x); } #pragma empty_line inline long double exp(long double __x) { return __builtin_expl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type exp(_Tp __x) { return __builtin_exp(__x); } #pragma empty_line using ::fabs; #pragma empty_line inline float fabs(float __x) { return __builtin_fabsf(__x); } #pragma empty_line inline long double fabs(long double __x) { return __builtin_fabsl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type fabs(_Tp __x) { return __builtin_fabs(__x); } #pragma empty_line using ::floor; #pragma empty_line inline float floor(float __x) { return __builtin_floorf(__x); } #pragma empty_line inline long double floor(long double __x) { return __builtin_floorl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type floor(_Tp __x) { return __builtin_floor(__x); } #pragma empty_line using ::fmod; #pragma empty_line inline float fmod(float __x, float __y) { return __builtin_fmodf(__x, __y); } #pragma empty_line inline long double fmod(long double __x, long double __y) { return __builtin_fmodl(__x, __y); } #pragma empty_line using ::frexp; #pragma empty_line inline float frexp(float __x, int* __exp) { return __builtin_frexpf(__x, __exp); } #pragma empty_line inline long double frexp(long double __x, int* __exp) { return __builtin_frexpl(__x, __exp); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type frexp(_Tp __x, int* __exp) { return __builtin_frexp(__x, __exp); } #pragma empty_line using ::ldexp; #pragma empty_line inline float ldexp(float __x, int __exp) { return __builtin_ldexpf(__x, __exp); } #pragma empty_line inline long double ldexp(long double __x, int __exp) { return __builtin_ldexpl(__x, __exp); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type ldexp(_Tp __x, int __exp) { return __builtin_ldexp(__x, __exp); } #pragma empty_line using ::log; #pragma empty_line inline float log(float __x) { return __builtin_logf(__x); } #pragma empty_line inline long double log(long double __x) { return __builtin_logl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log(_Tp __x) { return __builtin_log(__x); } #pragma empty_line using ::log10; #pragma empty_line inline float log10(float __x) { return __builtin_log10f(__x); } #pragma empty_line inline long double log10(long double __x) { return __builtin_log10l(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type log10(_Tp __x) { return __builtin_log10(__x); } #pragma empty_line using ::modf; #pragma empty_line inline float modf(float __x, float* __iptr) { return __builtin_modff(__x, __iptr); } #pragma empty_line inline long double modf(long double __x, long double* __iptr) { return __builtin_modfl(__x, __iptr); } #pragma empty_line using ::pow; #pragma empty_line inline float pow(float __x, float __y) { return __builtin_powf(__x, __y); } #pragma empty_line inline long double pow(long double __x, long double __y) { return __builtin_powl(__x, __y); } #pragma empty_line #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 550. What should the return type of pow(float,int) be? inline double pow(double __x, int __i) { return __builtin_powi(__x, __i); } #pragma empty_line inline float pow(float __x, int __n) { return __builtin_powif(__x, __n); } #pragma empty_line inline long double pow(long double __x, int __n) { return __builtin_powil(__x, __n); } #pragma empty_line #pragma empty_line template<typename _Tp, typename _Up> inline typename __gnu_cxx::__promote_2<_Tp, _Up>::__type pow(_Tp __x, _Up __y) { typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; return pow(__type(__x), __type(__y)); } #pragma empty_line using ::sin; #pragma empty_line inline float sin(float __x) { return __builtin_sinf(__x); } #pragma empty_line inline long double sin(long double __x) { return __builtin_sinl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sin(_Tp __x) { return __builtin_sin(__x); } #pragma empty_line using ::sinh; #pragma empty_line inline float sinh(float __x) { return __builtin_sinhf(__x); } #pragma empty_line inline long double sinh(long double __x) { return __builtin_sinhl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sinh(_Tp __x) { return __builtin_sinh(__x); } #pragma empty_line using ::sqrt; #pragma empty_line inline float sqrt(float __x) { return __builtin_sqrtf(__x); } #pragma empty_line inline long double sqrt(long double __x) { return __builtin_sqrtl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type sqrt(_Tp __x) { return __builtin_sqrt(__x); } #pragma empty_line using ::tan; #pragma empty_line inline float tan(float __x) { return __builtin_tanf(__x); } #pragma empty_line inline long double tan(long double __x) { return __builtin_tanl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tan(_Tp __x) { return __builtin_tan(__x); } #pragma empty_line using ::tanh; #pragma empty_line inline float tanh(float __x) { return __builtin_tanhf(__x); } #pragma empty_line inline long double tanh(long double __x) { return __builtin_tanhl(__x); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, double>::__type tanh(_Tp __x) { return __builtin_tanh(__x); } #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // These are possible macros imported from C99-land. #pragma line 480 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma line 730 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cmath" 3 template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type fpclassify(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_fpclassify(0, 1, 4, 3, 2, __type(__f)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isfinite(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isfinite(__type(__f)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isinf(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isinf(__type(__f)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isnan(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isnan(__type(__f)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isnormal(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isnormal(__type(__f)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type signbit(_Tp __f) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_signbit(__type(__f)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isgreater(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isgreater(__type(__f1), __type(__f2)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isgreaterequal(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isgreaterequal(__type(__f1), __type(__f2)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isless(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isless(__type(__f1), __type(__f2)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type islessequal(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_islessequal(__type(__f1), __type(__f2)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type islessgreater(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_islessgreater(__type(__f1), __type(__f2)); } #pragma empty_line template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, int>::__type isunordered(_Tp __f1, _Tp __f2) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; return __builtin_isunordered(__type(__f1), __type(__f2)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma line 33 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/hls_half.h" 2 using std::fpclassify; using std::isfinite; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line using std::isinf; using std::isnan; #pragma empty_line using std::isnormal; using std::signbit; using std::isgreater; using std::isgreaterequal; using std::isless; using std::islessequal; using std::islessgreater; using std::isunordered; #pragma empty_line #pragma empty_line #pragma empty_line //#error hls_half simulation header file is not applicable for synthesis (synthesis header to be added) typedef __fp16 half; #pragma line 3272 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/hls_half.h" // implemented in lib_hlsm.cpp //extern int __signbit(half a_re); extern half half_nan(const char *tagp); // extern int __isfinite(half t_in); // extern int __isinf(half t_in); // extern int __isnan(half t_in); // extern int __isnormal(half t_in); // extern int __fpclassify(half t_in); extern half half_atan(half t); extern half half_atan2(half y, half x); extern half half_copysign(half x, half y); //extern half copysign(half x, half y); extern half half_fabs(half x); //extern half fabs(half x); extern half half_abs(half x); extern half half_fma(half x, half y, half z); extern half half_mad(half x, half y, half z); extern half half_frexp (half x, int* exp); extern half half_ldexp (half x, int exp); extern half half_fmax(half x, half y); //extern half fmax(half x, half y); extern half half_fmin(half x, half y); //extern half fmin(half x, half y); extern half half_asin(half t_in); extern half half_acos(half t_in); extern half half_sin(half t_in); extern half half_cos(half t_in); extern void half_sincos(half x, half *sin, half *cos); extern half half_sinh(half t_in); extern half half_cosh(half t_in); extern half half_sinpi(half t_in); extern half half_cospi(half t_in); extern half half_recip(half x); extern half half_sqrt(half x); extern half half_rsqrt(half x); extern half half_cbrt(half x); extern half half_hypot(half x, half y); extern half half_log(half x); extern half half_log10(half x); extern half half_log2(half x); extern half half_logb(half x); extern half half_log1p(half x); extern half half_exp(half x); extern half half_exp10(half x); extern half half_exp2(half x); extern half half_expm1(half x); extern half half_pow(half x, half y); extern half half_powr(half x, half y); extern half half_pown(half x, int y); extern half half_rootn(half x, int y); extern half half_floor(half x); //half floor(half x) extern half half_ceil(half x); //half ceil(half x) extern half half_trunc(half x); // half trunc(half x) extern half half_round(half x); //half round(half x) extern half half_nearbyint(half x); extern half half_rint(half x); extern long int half_lrint(half x); extern long long int half_llrint(half x); extern long int half_lround(half x); extern long long int half_llround(half x); extern half half_modf(half x, half *intpart); // half modf(half x, half *intpart) extern half half_fract(half x, half *intpart); extern half half_nextafter(half x, half y); extern half half_fmod(half x, half y); extern half half_remainder(half x, half y); extern half half_remquo(half x, half y, int* quo); extern half half_divide(half x, half y); #pragma empty_line #pragma empty_line // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 61 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int.h" 2 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" 1 /* -*- c++ -*-*/ /* #- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved. #- #- This file contains confidential and proprietary information #- of Xilinx, Inc. and is protected under U.S. and #- international copyright and other intellectual property #- laws. #- #- DISCLAIMER #- This disclaimer is not a license and does not grant any #- rights to the materials distributed herewith. Except as #- otherwise provided in a valid license issued to you by #- Xilinx, and to the maximum extent permitted by applicable #- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND #- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES #- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING #- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- #- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and #- (2) Xilinx shall not be liable (whether in contract or tort, #- including negligence, or under any other theory of #- liability) for any loss or damage of any kind or nature #- related to, arising under or in connection with these #- materials, including for any direct, or any indirect, #- special, incidental, or consequential loss or damage #- (including loss of data, profits, goodwill, or any type of #- loss or damage suffered as a result of any action brought #- by a third party) even if such damage or loss was #- reasonably foreseeable or Xilinx had been advised of the #- possibility of the same. #- #- CRITICAL APPLICATIONS #- Xilinx products are not designed or intended to be fail- #- safe, or for use in any application requiring fail-safe #- performance, such as life-support or safety devices or #- systems, Class III medical devices, nuclear facilities, #- applications related to the deployment of airbags, or any #- other applications that could lead to death, personal #- injury, or severe property or environmental damage #- (individually and collectively, "Critical #- Applications"). Customer assumes the sole risk and #- liability of any use of Xilinx products in Critical #- Applications, subject only to applicable laws and #- regulations governing limitations on product liability. #- #- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS #- PART OF THIS FILE AT ALL TIMES. #- ************************************************************************ #pragma empty_line * */ #pragma line 68 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iostream" 1 3 // Standard iostream objects -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2001, 2002, 2005, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/iostream * This is a Standard C++ Library header. */ #pragma empty_line // // ISO C++ 14882: 27.3 Standard iostream objects // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 37 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iostream" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ostream" 1 3 // Output streams -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/ostream * This is a Standard C++ Library header. */ #pragma empty_line // // ISO C++ 14882: 27.6.2 Output streams // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 38 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ostream" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 1 3 // Iostreams base classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, // 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/ios * This is a Standard C++ Library header. */ #pragma empty_line // // ISO C++ 14882: 27.4 Iostreams base classes // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 37 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iosfwd" 1 3 // Forwarding declarations -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/iosfwd * This is a Standard C++ Library header. */ #pragma empty_line // // ISO C++ 14882: 27.2 Forward declarations // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 38 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iosfwd" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 1 3 // String support -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, // 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/stringfwd.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ #pragma empty_line // // ISO C++ 14882: 21 Strings library // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _Alloc> class allocator; #pragma empty_line /** * @defgroup strings Strings * * @{ */ #pragma empty_line template<class _CharT> struct char_traits; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string; #pragma empty_line template<> struct char_traits<char>; #pragma empty_line typedef basic_string<char> string; /// A string of @c char #pragma empty_line #pragma empty_line template<> struct char_traits<wchar_t>; #pragma empty_line typedef basic_string<wchar_t> wstring; /// A string of @c wchar_t #pragma line 82 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stringfwd.h" 3 /** @} */ #pragma empty_line #pragma empty_line } // namespace #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iosfwd" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 1 3 // Position types -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/postypes.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iosfwd} */ #pragma empty_line // // ISO C++ 14882: 27.4.1 - Types // ISO C++ 14882: 27.4.3 - Template class fpos // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 40 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 1 3 // -*- C++ -*- forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/cwchar * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c wchar.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: 21.4 // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/wchar.h" 1 3 4 /* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities <wchar.h> */ #pragma line 31 "/usr/include/wchar.h" 3 4 /* Get FILE definition. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get va_list definition. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 /* wchar_t type related definitions. Copyright (C) 2000-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The fallback definitions, for when __WCHAR_MAX__ or __WCHAR_MIN__ are not defined, give the right value and type as long as both int and wchar_t are 32-bit types. Adding L'\0' to a constant value ensures that the type is correct; it is necessary to use (L'\0' + 0) rather than just L'\0' so that the type in C++ is the promoted version of wchar_t rather than the distinct wchar_t type itself. Because wchar_t in preprocessor #if expressions is treated as intmax_t or uintmax_t, the expression (L'\0' - 1) would have the wrong value for WCHAR_MAX in such expressions and so cannot be used to define __WCHAR_MAX in the unsigned case. */ #pragma line 42 "/usr/include/wchar.h" 2 3 4 #pragma empty_line /* Get size_t, wchar_t, wint_t and NULL from <stddef.h>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma empty_line #pragma empty_line #pragma empty_line typedef unsigned int wint_t; #pragma line 52 "/usr/include/wchar.h" 2 3 4 #pragma empty_line /* We try to get wint_t from <stddef.h>, but not all GCC versions define it there. So define it ourselves if it remains undefined. */ #pragma line 63 "/usr/include/wchar.h" 3 4 /* Work around problems with the <stddef.h> file which doesn't put wint_t in the std namespace. */ #pragma line 73 "/usr/include/wchar.h" 3 4 /* Tell the caller that we provide correct C++ prototypes. */ #pragma line 99 "/usr/include/wchar.h" 3 4 /* The rest of the file is only used if used if __need_mbstate_t is not defined. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Public type. */ typedef __mbstate_t mbstate_t; #pragma line 116 "/usr/include/wchar.h" 3 4 /* These constants might also be defined in <inttypes.h>. */ #pragma line 125 "/usr/include/wchar.h" 3 4 /* For XPG4 compliance we have to define the stuff from <wctype.h> here as well. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line /* This incomplete type is defined in <time.h> but needed here because of `wcsftime'. */ struct tm; #pragma empty_line /* XXX We have to clean this up at some point. Since tm is in the std namespace but wcsftime is in __c99 the type wouldn't be found without inserting it in the global namespace. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Copy SRC to DEST. */ extern wchar_t *wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Copy no more than N wide-characters of SRC to DEST. */ extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Append SRC onto DEST. */ extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); /* Append no more than N wide-characters of SRC onto DEST. */ extern wchar_t *wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Compare S1 and S2. */ extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare N wide-characters of S1 and S2. */ extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Compare S1 and S2, ignoring case. */ extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) throw (); #pragma empty_line /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) throw (); #pragma empty_line /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #pragma empty_line #pragma line 1 "/usr/include/xlocale.h" 1 3 4 /* Definition of locale datatype. Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. The file and this data structure is not standardized. Don't rely on it. It can go away without warning. */ typedef struct __locale_struct { /* Note: LC_ALL is not a valid index into this array. */ struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ #pragma empty_line /* To increase the speed of this solution we add some special members. */ const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; #pragma empty_line /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; } *__locale_t; #pragma empty_line /* POSIX 2008 makes locale_t official. */ typedef __locale_t locale_t; #pragma line 184 "/usr/include/wchar.h" 2 3 4 #pragma empty_line extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, __locale_t __loc) throw (); #pragma empty_line extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, __locale_t __loc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) throw (); /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #pragma empty_line /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the given locale. */ extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, __locale_t __loc) throw (); #pragma empty_line /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, size_t __n, __locale_t __loc) throw (); #pragma empty_line /* Duplicate S, returning an identical malloc'd string. */ extern wchar_t *wcsdup (const wchar_t *__s) throw () __attribute__ ((__malloc__)); #pragma empty_line #pragma empty_line #pragma empty_line /* Find the first occurrence of WC in WCS. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) throw () __attribute__ ((__pure__)); #pragma empty_line /* Find the last occurrence of WC in WCS. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This function is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line #pragma empty_line /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) throw () __attribute__ ((__pure__)); /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) throw () __attribute__ ((__pure__)); /* Find the first occurrence in WCS of any character in ACCEPT. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) throw () __attribute__ ((__pure__)); #pragma empty_line /* Find the first occurrence of NEEDLE in HAYSTACK. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line /* Divide WCS into tokens separated by characters in DELIM. */ extern wchar_t *wcstok (wchar_t *__restrict __s, const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) throw (); #pragma empty_line /* Return the number of wide characters in S. */ extern size_t wcslen (const wchar_t *__s) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line #pragma empty_line /* Another name for `wcsstr' from XPG4. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the number of wide characters in S, but at most MAXLEN. */ extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Search N wide characters of S for C. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) throw () __attribute__ ((__pure__)); #pragma empty_line #pragma empty_line /* Compare N wide characters of S1 and S2. */ extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) throw () __attribute__ ((__pure__)); #pragma empty_line /* Copy N wide characters of SRC to DEST. */ extern wchar_t *wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw (); #pragma empty_line /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) throw (); #pragma empty_line /* Set N wide characters of S to C. */ extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Determine whether C constitutes a valid (one-byte) multibyte character. */ extern wint_t btowc (int __c) throw (); #pragma empty_line /* Determine whether C corresponds to a member of the extended character set whose multibyte representation is a single byte. */ extern int wctob (wint_t __c) throw (); #pragma empty_line /* Determine whether PS points to an object representing the initial state. */ extern int mbsinit (const mbstate_t *__ps) throw () __attribute__ ((__pure__)); #pragma empty_line /* Write wide character representation of multibyte character pointed to by S to PWC. */ extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) throw (); #pragma empty_line /* Write multibyte representation of wide character WC to S. */ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) throw (); #pragma empty_line /* Return number of bytes in multibyte character pointed to by S. */ extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw (); #pragma line 409 "/usr/include/wchar.h" 3 4 /* Write wide character representation of multibyte character string SRC to DST. */ extern size_t mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); #pragma empty_line /* Write multibyte character representation of wide character string SRC to DST. */ extern size_t wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Write wide character representation of at most NMC bytes of the multibyte character string SRC to DST. */ extern size_t mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw (); #pragma empty_line /* Write multibyte character representation of at most NWC characters from the wide character string SRC to DST. */ extern size_t wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* The following functions are extensions found in X/Open CAE. */ #pragma empty_line /* Determine number of column positions required for C. */ extern int wcwidth (wchar_t __c) throw (); #pragma empty_line /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ extern int wcswidth (const wchar_t *__s, size_t __n) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Convert initial portion of the wide string NPTR to `double' representation. */ extern double wcstod (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Convert initial portion of wide string NPTR to `long int' representation. */ extern long int wcstol (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); #pragma empty_line /* Convert initial portion of wide string NPTR to `unsigned long int' representation. */ extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoll (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); #pragma empty_line /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); #pragma empty_line /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is the implementation of the internationalization handling in the upcoming ISO C++ standard library. To support this another set of the functions using locale data exist which have an additional argument. #pragma empty_line Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ #pragma empty_line /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. */ #pragma empty_line #pragma empty_line /* Special versions of the functions above which take the locale to use as an additional parameter. */ extern long int wcstol_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); #pragma empty_line extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); #pragma empty_line __extension__ extern long long int wcstoll_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); #pragma empty_line __extension__ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) throw (); #pragma empty_line extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); #pragma empty_line extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); #pragma empty_line extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ extern wchar_t *wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) throw (); #pragma empty_line /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern wchar_t *wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) throw (); #pragma empty_line #pragma empty_line /* Wide character I/O functions. */ #pragma empty_line /* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces a wide character string. */ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Select orientation for stream. */ extern int fwide (__FILE *__fp, int __mode) throw (); #pragma empty_line #pragma empty_line /* Write formatted output to STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wprintf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ extern int swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, ...) throw () /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; #pragma empty_line /* Write formatted output to S from argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwprintf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; /* Write formatted output to stdout from argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwprintf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ extern int vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; #pragma empty_line #pragma empty_line /* Read formatted input from STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from stdin. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wscanf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; /* Read formatted input from S. */ extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) throw () /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; #pragma line 688 "/usr/include/wchar.h" 3 4 /* Read formatted input from S into argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read formatted input from stdin into argument list ARG. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; /* Read formatted input from S into argument list ARG. */ extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) throw () /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; #pragma line 744 "/usr/include/wchar.h" 3 4 /* Read a character from STREAM. #pragma empty_line These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); #pragma empty_line /* Read a character from stdin. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t getwchar (void); #pragma empty_line #pragma empty_line /* Write a character to STREAM. #pragma empty_line These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); #pragma empty_line /* Write a character to stdout. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t putwchar (wchar_t __wc); #pragma empty_line #pragma empty_line /* Get a newline-terminated wide character string of finite length from STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); #pragma empty_line /* Write a string to STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputws (const wchar_t *__restrict __ws, __FILE *__restrict __stream); #pragma empty_line #pragma empty_line /* Push a character back onto the input buffer of STREAM. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t ungetwc (wint_t __wc, __FILE *__stream); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. #pragma empty_line These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); #pragma empty_line /* This is the wide character version of a GNU extension. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fgetwc_unlocked (__FILE *__stream); #pragma empty_line /* Faster version when locking is not necessary. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); #pragma empty_line /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. #pragma empty_line These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); #pragma empty_line #pragma empty_line /* This function does the same as `fgetws' but does not lock the stream. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); #pragma empty_line /* This function does the same as `fputws' but does not lock the stream. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputws_unlocked (const wchar_t *__restrict __ws, __FILE *__restrict __stream); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Format TP into S according to FORMAT. Write no more than MAXSIZE wide characters and return the number of wide characters written, or 0 if it would exceed MAXSIZE. */ extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Similar to `wcsftime' but takes the information from the provided locale and not the global locale. */ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) throw (); #pragma empty_line #pragma empty_line /* The X/Open standard demands that most of the functions defined in the <wctype.h> header must also appear here. This is probably because some X/Open members wrote their implementation before the ISO C standard was published and introduced the better solution. We have to provide these definitions for compliance reasons but we do this nonsense only if really necessary. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Define some macros helping to catch buffer overflows. */ #pragma line 894 "/usr/include/wchar.h" 3 4 } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Undefine all __need_* constants in case we are included to get those constants but the whole file was already read. */ #pragma line 46 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Need to do a bit of trickery here with mbstate_t as char_traits // assumes it is in wchar.h, regardless of wchar_t specializations. #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 3 namespace std { using ::mbstate_t; } // namespace std #pragma empty_line // Get rid of those macros defined in <wchar.h> in lieu of real functions. #pragma line 136 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line using ::wint_t; #pragma empty_line using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; using ::fputws; using ::fwide; using ::fwprintf; using ::fwscanf; using ::getwc; using ::getwchar; using ::mbrlen; using ::mbrtowc; using ::mbsinit; using ::mbsrtowcs; using ::putwc; using ::putwchar; #pragma empty_line using ::swprintf; #pragma empty_line using ::swscanf; using ::ungetwc; using ::vfwprintf; #pragma empty_line using ::vfwscanf; #pragma empty_line #pragma empty_line using ::vswprintf; #pragma empty_line #pragma empty_line using ::vswscanf; #pragma empty_line using ::vwprintf; #pragma empty_line using ::vwscanf; #pragma empty_line using ::wcrtomb; using ::wcscat; using ::wcscmp; using ::wcscoll; using ::wcscpy; using ::wcscspn; using ::wcsftime; using ::wcslen; using ::wcsncat; using ::wcsncmp; using ::wcsncpy; using ::wcsrtombs; using ::wcsspn; using ::wcstod; #pragma empty_line using ::wcstof; #pragma empty_line using ::wcstok; using ::wcstol; using ::wcstoul; using ::wcsxfrm; using ::wctob; using ::wmemcmp; using ::wmemcpy; using ::wmemmove; using ::wmemset; using ::wprintf; using ::wscanf; using ::wcschr; using ::wcspbrk; using ::wcsrchr; using ::wcsstr; using ::wmemchr; #pragma empty_line #pragma empty_line inline wchar_t* wcschr(wchar_t* __p, wchar_t __c) { return wcschr(const_cast<const wchar_t*>(__p), __c); } #pragma empty_line inline wchar_t* wcspbrk(wchar_t* __s1, const wchar_t* __s2) { return wcspbrk(const_cast<const wchar_t*>(__s1), __s2); } #pragma empty_line inline wchar_t* wcsrchr(wchar_t* __p, wchar_t __c) { return wcsrchr(const_cast<const wchar_t*>(__p), __c); } #pragma empty_line inline wchar_t* wcsstr(wchar_t* __s1, const wchar_t* __s2) { return wcsstr(const_cast<const wchar_t*>(__s1), __s2); } #pragma empty_line inline wchar_t* wmemchr(wchar_t* __p, wchar_t __c, size_t __n) { return wmemchr(const_cast<const wchar_t*>(__p), __c, __n); } #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace __gnu_cxx { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line using ::wcstold; #pragma line 258 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 3 using ::wcstoll; using ::wcstoull; #pragma empty_line } // namespace __gnu_cxx #pragma empty_line namespace std { using ::__gnu_cxx::wcstold; using ::__gnu_cxx::wcstoll; using ::__gnu_cxx::wcstoull; } // namespace #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 2 3 #pragma empty_line // XXX If <stdint.h> is really needed, make sure to define the macros // before including it, in order not to break <tr1/cstdint> (and <cstdint> // in C++0x). Reconsider all this as soon as possible... #pragma line 69 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // The types streamoff, streampos and wstreampos and the class // template fpos<> are described in clauses 21.1.2, 21.1.3, 27.1.2, // 27.2, 27.4.1, 27.4.3 and D.6. Despite all this verbiage, the // behaviour of these types is mostly implementation defined or // unspecified. The behaviour in this implementation is as noted // below. #pragma empty_line /** * @brief Type used by fpos, char_traits<char>, and char_traits<wchar_t>. * * In clauses 21.1.3.1 and 27.4.1 streamoff is described as an * implementation defined type. * Note: In versions of GCC up to and including GCC 3.3, streamoff * was typedef long. */ #pragma empty_line typedef long streamoff; #pragma line 98 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3 /// Integral type for I/O operation counts and buffer sizes. typedef ptrdiff_t streamsize; // Signed integral type #pragma empty_line /** * @brief Class representing stream positions. * * The standard places no requirements upon the template parameter StateT. * In this implementation StateT must be DefaultConstructible, * CopyConstructible and Assignable. The standard only requires that fpos * should contain a member of type StateT. In this implementation it also * contains an offset stored as a signed integer. * * @param StateT Type passed to and returned from state(). */ template<typename _StateT> class fpos { private: streamoff _M_off; _StateT _M_state; #pragma empty_line public: // The standard doesn't require that fpos objects can be default // constructed. This implementation provides a default // constructor that initializes the offset to 0 and default // constructs the state. fpos() : _M_off(0), _M_state() { } #pragma empty_line // The standard requires that fpos objects can be constructed // from streamoff objects using the constructor syntax, and // fails to give any meaningful semantics. In this // implementation implicit conversion is also allowed, and this // constructor stores the streamoff as the offset and default // constructs the state. /// Construct position from offset. fpos(streamoff __off) : _M_off(__off), _M_state() { } #pragma empty_line /// Convert to streamoff. operator streamoff() const { return _M_off; } #pragma empty_line /// Remember the value of @a st. void state(_StateT __st) { _M_state = __st; } #pragma empty_line /// Return the last set value of @a st. _StateT state() const { return _M_state; } #pragma empty_line // The standard requires that this operator must be defined, but // gives no semantics. In this implementation it just adds its // argument to the stored offset and returns *this. /// Add offset to this position. fpos& operator+=(streamoff __off) { _M_off += __off; return *this; } #pragma empty_line // The standard requires that this operator must be defined, but // gives no semantics. In this implementation it just subtracts // its argument from the stored offset and returns *this. /// Subtract offset from this position. fpos& operator-=(streamoff __off) { _M_off -= __off; return *this; } #pragma empty_line // The standard requires that this operator must be defined, but // defines its semantics only in terms of operator-. In this // implementation it constructs a copy of *this, adds the // argument to that copy using operator+= and then returns the // copy. /// Add position and offset. fpos operator+(streamoff __off) const { fpos __pos(*this); __pos += __off; return __pos; } #pragma empty_line // The standard requires that this operator must be defined, but // defines its semantics only in terms of operator+. In this // implementation it constructs a copy of *this, subtracts the // argument from that copy using operator-= and then returns the // copy. /// Subtract offset from position. fpos operator-(streamoff __off) const { fpos __pos(*this); __pos -= __off; return __pos; } #pragma empty_line // The standard requires that this operator must be defined, but // defines its semantics only in terms of operator+. In this // implementation it returns the difference between the offset // stored in *this and in the argument. /// Subtract position to return offset. streamoff operator-(const fpos& __other) const { return _M_off - __other._M_off; } }; #pragma empty_line // The standard only requires that operator== must be an // equivalence relation. In this implementation two fpos<StateT> // objects belong to the same equivalence class if the contained // offsets compare equal. /// Test if equivalent to another position. template<typename _StateT> inline bool operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) == streamoff(__rhs); } #pragma empty_line template<typename _StateT> inline bool operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) { return streamoff(__lhs) != streamoff(__rhs); } #pragma empty_line // Clauses 21.1.3.1 and 21.1.3.2 describe streampos and wstreampos // as implementation defined types, but clause 27.2 requires that // they must both be typedefs for fpos<mbstate_t> /// File position for char streams. typedef fpos<mbstate_t> streampos; /// File position for wchar_t streams. typedef fpos<mbstate_t> wstreampos; #pragma line 241 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h" 3 } // namespace #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iosfwd" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @defgroup io I/O * * Nearly all of the I/O classes are parameterized on the type of * characters they read and write. (The major exception is ios_base at * the top of the hierarchy.) This is a change from pre-Standard * streams, which were not templates. * * For ease of use and compatibility, all of the basic_* I/O-related * classes are given typedef names for both of the builtin character * widths (wide and narrow). The typedefs are the same as the * pre-Standard names, for example: * * @code * typedef basic_ifstream<char> ifstream; * @endcode * * Because properly forward-declaring these classes can be difficult, you * should not do it yourself. Instead, include the &lt;iosfwd&gt; * header, which contains only declarations of all the I/O classes as * well as the typedefs. Trying to forward-declare the typedefs * themselves (e.g., <code>class ostream;</code>) is not valid ISO C++. * * For more specific declarations, see * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html * * @{ */ class ios_base; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ios; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_streambuf; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_istream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ostream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_iostream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_stringbuf; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_istringstream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_ostringstream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_stringstream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_filebuf; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ifstream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_ofstream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class basic_fstream; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class istreambuf_iterator; #pragma empty_line template<typename _CharT, typename _Traits = char_traits<_CharT> > class ostreambuf_iterator; #pragma empty_line #pragma empty_line /// Base class for @c char streams. typedef basic_ios<char> ios; #pragma empty_line /// Base class for @c char buffers. typedef basic_streambuf<char> streambuf; #pragma empty_line /// Base class for @c char input streams. typedef basic_istream<char> istream; #pragma empty_line /// Base class for @c char output streams. typedef basic_ostream<char> ostream; #pragma empty_line /// Base class for @c char mixed input and output streams. typedef basic_iostream<char> iostream; #pragma empty_line /// Class for @c char memory buffers. typedef basic_stringbuf<char> stringbuf; #pragma empty_line /// Class for @c char input memory streams. typedef basic_istringstream<char> istringstream; #pragma empty_line /// Class for @c char output memory streams. typedef basic_ostringstream<char> ostringstream; #pragma empty_line /// Class for @c char mixed input and output memory streams. typedef basic_stringstream<char> stringstream; #pragma empty_line /// Class for @c char file buffers. typedef basic_filebuf<char> filebuf; #pragma empty_line /// Class for @c char input file streams. typedef basic_ifstream<char> ifstream; #pragma empty_line /// Class for @c char output file streams. typedef basic_ofstream<char> ofstream; #pragma empty_line /// Class for @c char mixed input and output file streams. typedef basic_fstream<char> fstream; #pragma empty_line #pragma empty_line /// Base class for @c wchar_t streams. typedef basic_ios<wchar_t> wios; #pragma empty_line /// Base class for @c wchar_t buffers. typedef basic_streambuf<wchar_t> wstreambuf; #pragma empty_line /// Base class for @c wchar_t input streams. typedef basic_istream<wchar_t> wistream; #pragma empty_line /// Base class for @c wchar_t output streams. typedef basic_ostream<wchar_t> wostream; #pragma empty_line /// Base class for @c wchar_t mixed input and output streams. typedef basic_iostream<wchar_t> wiostream; #pragma empty_line /// Class for @c wchar_t memory buffers. typedef basic_stringbuf<wchar_t> wstringbuf; #pragma empty_line /// Class for @c wchar_t input memory streams. typedef basic_istringstream<wchar_t> wistringstream; #pragma empty_line /// Class for @c wchar_t output memory streams. typedef basic_ostringstream<wchar_t> wostringstream; #pragma empty_line /// Class for @c wchar_t mixed input and output memory streams. typedef basic_stringstream<wchar_t> wstringstream; #pragma empty_line /// Class for @c wchar_t file buffers. typedef basic_filebuf<wchar_t> wfilebuf; #pragma empty_line /// Class for @c wchar_t input file streams. typedef basic_ifstream<wchar_t> wifstream; #pragma empty_line /// Class for @c wchar_t output file streams. typedef basic_ofstream<wchar_t> wofstream; #pragma empty_line /// Class for @c wchar_t mixed input and output file streams. typedef basic_fstream<wchar_t> wfstream; #pragma empty_line /** @} */ #pragma empty_line #pragma empty_line } // namespace #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/exception" 1 3 // Exception Handling support header for -*- C++ -*- #pragma empty_line // Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, // 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file exception * This is a Standard C++ Library header. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/exception" 3 #pragma empty_line #pragma GCC visibility push(default) #pragma empty_line #pragma empty_line #pragma empty_line extern "C++" { #pragma empty_line namespace std { /** * @defgroup exceptions Exceptions * @ingroup diagnostics * * Classes and functions for reporting errors via exception classes. * @{ */ #pragma empty_line /** * @brief Base class for all library exceptions. * * This is the base class for all exceptions thrown by the standard * library, and by certain language expressions. You are free to derive * your own %exception classes, or use a different hierarchy, or to * throw non-class data (e.g., fundamental types). */ class exception { public: exception() throw() { } virtual ~exception() throw(); #pragma empty_line /** Returns a C-style character string describing the general cause * of the current error. */ virtual const char* what() const throw(); }; #pragma empty_line /** If an %exception is thrown which is not listed in a function's * %exception specification, one of these may be thrown. */ class bad_exception : public exception { public: bad_exception() throw() { } #pragma empty_line // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_exception() throw(); #pragma empty_line // See comment in eh_exception.cc. virtual const char* what() const throw(); }; #pragma empty_line /// If you write a replacement %terminate handler, it must be of this type. typedef void (*terminate_handler) (); #pragma empty_line /// If you write a replacement %unexpected handler, it must be of this type. typedef void (*unexpected_handler) (); #pragma empty_line /// Takes a new handler function as an argument, returns the old function. terminate_handler set_terminate(terminate_handler) throw(); #pragma empty_line /** The runtime will call this function if %exception handling must be * abandoned for any reason. It can also be called by the user. */ void terminate() throw() __attribute__ ((__noreturn__)); #pragma empty_line /// Takes a new handler function as an argument, returns the old function. unexpected_handler set_unexpected(unexpected_handler) throw(); #pragma empty_line /** The runtime will call this function if an %exception is thrown which * violates the function's %exception specification. */ void unexpected() __attribute__ ((__noreturn__)); #pragma empty_line /** [18.6.4]/1: 'Returns true after completing evaluation of a * throw-expression until either completing initialization of the * exception-declaration in the matching handler or entering @c unexpected() * due to the throw; or after entering @c terminate() for any reason * other than an explicit call to @c terminate(). [Note: This includes * stack unwinding [15.2]. end note]' * * 2: 'When @c uncaught_exception() is true, throwing an * %exception can result in a call of @c terminate() * (15.5.1).' */ bool uncaught_exception() throw() __attribute__ ((__pure__)); #pragma empty_line // @} group exceptions } // namespace std #pragma empty_line namespace __gnu_cxx { #pragma empty_line #pragma empty_line /** * @brief A replacement for the standard terminate_handler which * prints more information about the terminating exception (if any) * on stderr. * * @ingroup exceptions * * Call * @code * std::set_terminate(__gnu_cxx::__verbose_terminate_handler) * @endcode * to use. For more info, see * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt02ch06s02.html * * In 3.4 and later, this is on by default. */ void __verbose_terminate_handler(); #pragma empty_line #pragma empty_line } // namespace #pragma empty_line } // extern "C++" #pragma empty_line #pragma GCC visibility pop #pragma line 40 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/char_traits.h" 1 3 // Character Traits for use by standard string and iostream -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/char_traits.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ #pragma empty_line // // ISO C++ 14882: 21 Strings library // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/char_traits.h" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 1 3 // Core algorithmic facilities -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, // 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/stl_algobase.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{algorithm} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/functexcept.h" 1 3 // Function-Based Exception Support -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2004, 2005, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/functexcept.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{exception} * * This header provides support for -fno-exceptions. */ #pragma empty_line // // ISO C++ 14882: 19.1 Exception classes // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/exception_defines.h" 1 3 // -fno-exceptions Support -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2006, 2007, 2008, 2009, // 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/exception_defines.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{exception} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Iff -fno-exceptions, transform error handling code to work without it. #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/functexcept.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // Helper for exception objects in <except> void __throw_bad_exception(void) __attribute__((__noreturn__)); #pragma empty_line // Helper for exception objects in <new> void __throw_bad_alloc(void) __attribute__((__noreturn__)); #pragma empty_line // Helper for exception objects in <typeinfo> void __throw_bad_cast(void) __attribute__((__noreturn__)); #pragma empty_line void __throw_bad_typeid(void) __attribute__((__noreturn__)); #pragma empty_line // Helpers for exception objects in <stdexcept> void __throw_logic_error(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_domain_error(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_invalid_argument(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_length_error(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_out_of_range(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_runtime_error(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_range_error(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_overflow_error(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_underflow_error(const char*) __attribute__((__noreturn__)); #pragma empty_line // Helpers for exception objects in <ios> void __throw_ios_failure(const char*) __attribute__((__noreturn__)); #pragma empty_line void __throw_system_error(int) __attribute__((__noreturn__)); #pragma empty_line void __throw_future_error(int) __attribute__((__noreturn__)); #pragma empty_line // Helpers for exception objects in <functional> void __throw_bad_function_call() __attribute__((__noreturn__)); #pragma empty_line #pragma empty_line } // namespace #pragma line 62 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/numeric_traits.h" 1 3 // -*- C++ -*- #pragma empty_line // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3, or (at your option) any later // version. #pragma empty_line // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file ext/numeric_traits.h * This file is a GNU extension to the Standard C++ Library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 32 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/numeric_traits.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // Compile time constants for builtin types. // Sadly std::numeric_limits member functions cannot be used for this. #pragma line 53 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/numeric_traits.h" 3 template<typename _Value> struct __numeric_traits_integer { // Only integers for initialization of member constant. static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); #pragma empty_line // NB: these two also available in std::numeric_limits as compile // time constants, but <limits> is big and we avoid including it. static const bool __is_signed = ((_Value)(-1) < 0); static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); }; #pragma empty_line template<typename _Value> const _Value __numeric_traits_integer<_Value>::__min; #pragma empty_line template<typename _Value> const _Value __numeric_traits_integer<_Value>::__max; #pragma empty_line template<typename _Value> const bool __numeric_traits_integer<_Value>::__is_signed; #pragma empty_line template<typename _Value> const int __numeric_traits_integer<_Value>::__digits; #pragma line 98 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/numeric_traits.h" 3 template<typename _Value> struct __numeric_traits_floating { // Only floating point types. See N1822. static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); #pragma empty_line // See above comment... static const bool __is_signed = true; static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); }; #pragma empty_line template<typename _Value> const int __numeric_traits_floating<_Value>::__max_digits10; #pragma empty_line template<typename _Value> const bool __numeric_traits_floating<_Value>::__is_signed; #pragma empty_line template<typename _Value> const int __numeric_traits_floating<_Value>::__digits10; #pragma empty_line template<typename _Value> const int __numeric_traits_floating<_Value>::__max_exponent10; #pragma empty_line template<typename _Value> struct __numeric_traits : public __conditional_type<std::__is_integer<_Value>::__value, __numeric_traits_integer<_Value>, __numeric_traits_floating<_Value> >::__type { }; #pragma empty_line #pragma empty_line } // namespace #pragma line 65 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h" 1 3 // Pair implementation -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/stl_pair.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{utility} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/move.h" 1 3 // Move, forward and identity for C++0x + swap -*- C++ -*- #pragma empty_line // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/move.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{utility} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/concept_check.h" 1 3 // Concept-checking control -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/concept_check.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 33 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/concept_check.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line // All places in libstdc++-v3 where these are used, or /might/ be used, or // don't need to be used, or perhaps /should/ be used, are commented with // "concept requirements" (and maybe some more text). So grep like crazy // if you're looking for additional places to use these. #pragma empty_line // Concept-checking code is off by default unless users turn it on via // configure options or editing c++config.h. #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/move.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // Used, in C++03 mode too, by allocators, etc. template<typename _Tp> inline _Tp* __addressof(_Tp& __r) { return reinterpret_cast<_Tp*> (&const_cast<char&>(reinterpret_cast<const volatile char&>(__r))); } #pragma empty_line #pragma empty_line } // namespace #pragma line 109 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/move.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @brief Swaps two values. * @ingroup mutating_algorithms * @param __a A thing of arbitrary type. * @param __b Another thing of arbitrary type. * @return Nothing. */ template<typename _Tp> inline void swap(_Tp& __a, _Tp& __b) { // concept requirements #pragma empty_line #pragma empty_line _Tp __tmp = (__a); __a = (__b); __b = (__tmp); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 809. std::swap should be overloaded for array types. template<typename _Tp, size_t _Nm> inline void swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) { for (size_t __n = 0; __n < _Nm; ++__n) swap(__a[__n], __b[__n]); } #pragma empty_line #pragma empty_line } // namespace #pragma line 61 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma line 85 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h" 3 /// Struct holding two objects of arbitrary type. template<class _T1, class _T2> struct pair { typedef _T1 first_type; /// @c first_type is the first bound type typedef _T2 second_type; /// @c second_type is the second bound type #pragma empty_line _T1 first; /// @c first is a copy of the first object _T2 second; /// @c second is a copy of the second object #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 265. std::pair::pair() effects overly restrictive /** The default constructor creates @c first and @c second using their * respective default constructors. */ pair() : first(), second() { } #pragma empty_line /** Two objects may be passed to a @c pair constructor to be copied. */ pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } #pragma empty_line /** There is also a templated copy ctor for the @c pair class itself. */ template<class _U1, class _U2> pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } #pragma line 196 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h" 3 }; #pragma empty_line /// Two pairs of the same type are equal iff their members are equal. template<class _T1, class _T2> inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first == __y.first && __x.second == __y.second; } #pragma empty_line /// <http://gcc.gnu.org/onlinedocs/libstdc++/manual/utilities.html> template<class _T1, class _T2> inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __x.first < __y.first || (!(__y.first < __x.first) && __x.second < __y.second); } #pragma empty_line /// Uses @c operator== to find the result. template<class _T1, class _T2> inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x == __y); } #pragma empty_line /// Uses @c operator< to find the result. template<class _T1, class _T2> inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return __y < __x; } #pragma empty_line /// Uses @c operator< to find the result. template<class _T1, class _T2> inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__y < __x); } #pragma empty_line /// Uses @c operator< to find the result. template<class _T1, class _T2> inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { return !(__x < __y); } #pragma line 245 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h" 3 /** * @brief A convenience wrapper for creating a pair from two objects. * @param x The first object. * @param y The second object. * @return A newly-constructed pair<> object of the appropriate type. * * The standard requires that the objects be passed by reference-to-const, * but LWG issue #181 says they should be passed by const value. We follow * the LWG by default. */ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 181. make_pair() unintended behavior #pragma line 270 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_pair.h" 3 template<class _T1, class _T2> inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma line 66 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator_base_types.h" 1 3 // Types used in iterator implementation -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/stl_iterator_base_types.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} * * This file contains all of the general iterator-related utility types, * such as iterator_traits and struct iterator. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator_base_types.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @defgroup iterators Iterators * Abstractions for uniform iterating through various underlying types. */ //@{ #pragma empty_line /** * @defgroup iterator_tags Iterator Tags * These are empty types, used to distinguish different iterators. The * distinction is not made by what they contain, but simply by what they * are. Different underlying algorithms can then be used based on the * different operations supported by different iterator types. */ //@{ /// Marking input iterators. struct input_iterator_tag { }; #pragma empty_line /// Marking output iterators. struct output_iterator_tag { }; #pragma empty_line /// Forward iterators support a superset of input iterator operations. struct forward_iterator_tag : public input_iterator_tag { }; #pragma empty_line /// Bidirectional iterators support a superset of forward iterator /// operations. struct bidirectional_iterator_tag : public forward_iterator_tag { }; #pragma empty_line /// Random-access iterators support a superset of bidirectional /// iterator operations. struct random_access_iterator_tag : public bidirectional_iterator_tag { }; //@} #pragma empty_line /** * @brief Common %iterator class. * * This class does nothing but define nested typedefs. %Iterator classes * can inherit from this class to save some work. The typedefs are then * used in specializations and overloading. * * In particular, there are no default implementations of requirements * such as @c operator++ and the like. (How could there be?) */ template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, typename _Pointer = _Tp*, typename _Reference = _Tp&> struct iterator { /// One of the @link iterator_tags tag types@endlink. typedef _Category iterator_category; /// The type "pointed to" by the iterator. typedef _Tp value_type; /// Distance between iterators is represented as this type. typedef _Distance difference_type; /// This type represents a pointer-to-value_type. typedef _Pointer pointer; /// This type represents a reference-to-value_type. typedef _Reference reference; }; #pragma empty_line /** * @brief Traits class for iterators. * * This class does nothing but define nested typedefs. The general * version simply @a forwards the nested typedefs from the Iterator * argument. Specialized versions for pointers and pointers-to-const * provide tighter, more correct semantics. */ #pragma line 162 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator_base_types.h" 3 template<typename _Iterator> struct iterator_traits { typedef typename _Iterator::iterator_category iterator_category; typedef typename _Iterator::value_type value_type; typedef typename _Iterator::difference_type difference_type; typedef typename _Iterator::pointer pointer; typedef typename _Iterator::reference reference; }; #pragma empty_line #pragma empty_line /// Partial specialization for pointer types. template<typename _Tp> struct iterator_traits<_Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef _Tp& reference; }; #pragma empty_line /// Partial specialization for const pointer types. template<typename _Tp> struct iterator_traits<const _Tp*> { typedef random_access_iterator_tag iterator_category; typedef _Tp value_type; typedef ptrdiff_t difference_type; typedef const _Tp* pointer; typedef const _Tp& reference; }; #pragma empty_line /** * This function is not a part of the C++ standard but is syntactic * sugar for internal library use only. */ template<typename _Iter> inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } #pragma empty_line //@} #pragma empty_line // If _Iterator has a base returns it otherwise _Iterator is returned // untouched template<typename _Iterator, bool _HasBase> struct _Iter_base { typedef _Iterator iterator_type; static iterator_type _S_base(_Iterator __it) { return __it; } }; #pragma empty_line template<typename _Iterator> struct _Iter_base<_Iterator, true> { typedef typename _Iterator::iterator_type iterator_type; static iterator_type _S_base(_Iterator __it) { return __it.base(); } }; #pragma empty_line #pragma empty_line } // namespace #pragma line 67 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator_base_funcs.h" 1 3 // Functions used by iterators -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/stl_iterator_base_funcs.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} * * This file contains all of the general iterator-related utility * functions, such as distance() and advance(). */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator_base_funcs.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _InputIterator> inline typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag) { // concept requirements #pragma empty_line #pragma empty_line typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { ++__first; ++__n; } return __n; } #pragma empty_line template<typename _RandomAccessIterator> inline typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag) { // concept requirements #pragma empty_line #pragma empty_line return __last - __first; } #pragma empty_line /** * @brief A generalization of pointer arithmetic. * @param first An input iterator. * @param last An input iterator. * @return The distance between them. * * Returns @c n such that first + n == last. This requires that @p last * must be reachable from @p first. Note that @c n may be negative. * * For random access iterators, this uses their @c + and @c - operations * and are constant time. For other %iterator classes they are linear time. */ template<typename _InputIterator> inline typename iterator_traits<_InputIterator>::difference_type distance(_InputIterator __first, _InputIterator __last) { // concept requirements -- taken care of in __distance return std::__distance(__first, __last, std::__iterator_category(__first)); } #pragma empty_line template<typename _InputIterator, typename _Distance> inline void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { // concept requirements #pragma empty_line while (__n--) ++__i; } #pragma empty_line template<typename _BidirectionalIterator, typename _Distance> inline void __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { // concept requirements #pragma empty_line #pragma empty_line if (__n > 0) while (__n--) ++__i; else while (__n++) --__i; } #pragma empty_line template<typename _RandomAccessIterator, typename _Distance> inline void __advance(_RandomAccessIterator& __i, _Distance __n, random_access_iterator_tag) { // concept requirements #pragma empty_line #pragma empty_line __i += __n; } #pragma empty_line /** * @brief A generalization of pointer arithmetic. * @param i An input iterator. * @param n The @a delta by which to change @p i. * @return Nothing. * * This increments @p i by @p n. For bidirectional and random access * iterators, @p n may be negative, in which case @p i is decremented. * * For random access iterators, this uses their @c + and @c - operations * and are constant time. For other %iterator classes they are linear time. */ template<typename _InputIterator, typename _Distance> inline void advance(_InputIterator& __i, _Distance __n) { // concept requirements -- taken care of in __advance typename iterator_traits<_InputIterator>::difference_type __d = __n; std::__advance(__i, __d, std::__iterator_category(__i)); } #pragma line 200 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator_base_funcs.h" 3 } // namespace #pragma line 68 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator.h" 1 3 // Iterators -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/stl_iterator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} * * This file implements reverse_iterator, back_insert_iterator, * front_insert_iterator, insert_iterator, __normal_iterator, and their * supporting functions and overloaded operators. */ #pragma line 68 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator.h" 3 namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @addtogroup iterators * @{ */ #pragma empty_line // 24.4.1 Reverse iterators /** * Bidirectional and random access iterators have corresponding reverse * %iterator adaptors that iterate through the data structure in the * opposite direction. They have the same signatures as the corresponding * iterators. The fundamental relation between a reverse %iterator and its * corresponding %iterator @c i is established by the identity: * @code * &*(reverse_iterator(i)) == &*(i - 1) * @endcode * * <em>This mapping is dictated by the fact that while there is always a * pointer past the end of an array, there might not be a valid pointer * before the beginning of an array.</em> [24.4.1]/1,2 * * Reverse iterators can be tricky and surprising at first. Their * semantics make sense, however, and the trickiness is a side effect of * the requirement that the iterators must be safe. */ template<typename _Iterator> class reverse_iterator : public iterator<typename iterator_traits<_Iterator>::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; #pragma empty_line typedef iterator_traits<_Iterator> __traits_type; #pragma empty_line public: typedef _Iterator iterator_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::pointer pointer; typedef typename __traits_type::reference reference; #pragma empty_line /** * The default constructor default-initializes member @p current. * If it is a pointer, that means it is zero-initialized. */ // _GLIBCXX_RESOLVE_LIB_DEFECTS // 235 No specification of default ctor for reverse_iterator reverse_iterator() : current() { } #pragma empty_line /** * This %iterator will move in the opposite direction that @p x does. */ explicit reverse_iterator(iterator_type __x) : current(__x) { } #pragma empty_line /** * The copy constructor is normal. */ reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } #pragma empty_line /** * A reverse_iterator across other types can be copied in the normal * fashion. */ template<typename _Iter> reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } #pragma empty_line /** * @return @c current, the %iterator used for underlying work. */ iterator_type base() const { return current; } #pragma empty_line /** * @return TODO * * @doctodo */ reference operator*() const { _Iterator __tmp = current; return *--__tmp; } #pragma empty_line /** * @return TODO * * @doctodo */ pointer operator->() const { return &(operator*()); } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator& operator++() { --current; return *this; } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator operator++(int) { reverse_iterator __tmp = *this; --current; return __tmp; } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator& operator--() { ++current; return *this; } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator operator--(int) { reverse_iterator __tmp = *this; ++current; return __tmp; } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator operator+(difference_type __n) const { return reverse_iterator(current - __n); } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator& operator+=(difference_type __n) { current -= __n; return *this; } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator operator-(difference_type __n) const { return reverse_iterator(current + __n); } #pragma empty_line /** * @return TODO * * @doctodo */ reverse_iterator& operator-=(difference_type __n) { current += __n; return *this; } #pragma empty_line /** * @return TODO * * @doctodo */ reference operator[](difference_type __n) const { return *(*this + __n); } }; #pragma empty_line //@{ /** * @param x A %reverse_iterator. * @param y A %reverse_iterator. * @return A simple bool. * * Reverse iterators forward many operations to their underlying base() * iterators. Others are implemented in terms of one another. * */ template<typename _Iterator> inline bool operator==(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } #pragma empty_line template<typename _Iterator> inline bool operator<(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() < __x.base(); } #pragma empty_line template<typename _Iterator> inline bool operator!=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } #pragma empty_line template<typename _Iterator> inline bool operator>(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y < __x; } #pragma empty_line template<typename _Iterator> inline bool operator<=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } #pragma empty_line template<typename _Iterator> inline bool operator>=(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } #pragma empty_line template<typename _Iterator> inline typename reverse_iterator<_Iterator>::difference_type operator-(const reverse_iterator<_Iterator>& __x, const reverse_iterator<_Iterator>& __y) { return __y.base() - __x.base(); } #pragma empty_line template<typename _Iterator> inline reverse_iterator<_Iterator> operator+(typename reverse_iterator<_Iterator>::difference_type __n, const reverse_iterator<_Iterator>& __x) { return reverse_iterator<_Iterator>(__x.base() - __n); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 280. Comparison of reverse_iterator to const reverse_iterator. template<typename _IteratorL, typename _IteratorR> inline bool operator==(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } #pragma empty_line template<typename _IteratorL, typename _IteratorR> inline bool operator<(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y.base() < __x.base(); } #pragma empty_line template<typename _IteratorL, typename _IteratorR> inline bool operator!=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } #pragma empty_line template<typename _IteratorL, typename _IteratorR> inline bool operator>(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return __y < __x; } #pragma empty_line template<typename _IteratorL, typename _IteratorR> inline bool operator<=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } #pragma empty_line template<typename _IteratorL, typename _IteratorR> inline bool operator>=(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } #pragma empty_line template<typename _IteratorL, typename _IteratorR> #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline typename reverse_iterator<_IteratorL>::difference_type operator-(const reverse_iterator<_IteratorL>& __x, const reverse_iterator<_IteratorR>& __y) #pragma empty_line { return __y.base() - __x.base(); } //@} #pragma empty_line // 24.4.2.2.1 back_insert_iterator /** * @brief Turns assignment into insertion. * * These are output iterators, constructed from a container-of-T. * Assigning a T to the iterator appends it to the container using * push_back. * * Tip: Using the back_inserter function to create these iterators can * save typing. */ template<typename _Container> class back_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; #pragma empty_line public: /// A nested typedef for the type of whatever container you used. typedef _Container container_type; #pragma empty_line /// The only way to create this %iterator is with a container. explicit back_insert_iterator(_Container& __x) : container(&__x) { } #pragma empty_line /** * @param value An instance of whatever type * container_type::const_reference is; presumably a * reference-to-const T for container<T>. * @return This %iterator, for chained operations. * * This kind of %iterator doesn't really have a @a position in the * container (you can think of the position as being permanently at * the end, if you like). Assigning a value to the %iterator will * always append the value to the end of the container. */ #pragma empty_line back_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_back(__value); return *this; } #pragma line 444 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator.h" 3 /// Simply returns *this. back_insert_iterator& operator*() { return *this; } #pragma empty_line /// Simply returns *this. (This %iterator does not @a move.) back_insert_iterator& operator++() { return *this; } #pragma empty_line /// Simply returns *this. (This %iterator does not @a move.) back_insert_iterator operator++(int) { return *this; } }; #pragma empty_line /** * @param x A container of arbitrary type. * @return An instance of back_insert_iterator working on @p x. * * This wrapper function helps in creating back_insert_iterator instances. * Typing the name of the %iterator requires knowing the precise full * type of the container, which can be tedious and impedes generic * programming. Using this function lets you take advantage of automatic * template parameter deduction, making the compiler match the correct * types for you. */ template<typename _Container> inline back_insert_iterator<_Container> back_inserter(_Container& __x) { return back_insert_iterator<_Container>(__x); } #pragma empty_line /** * @brief Turns assignment into insertion. * * These are output iterators, constructed from a container-of-T. * Assigning a T to the iterator prepends it to the container using * push_front. * * Tip: Using the front_inserter function to create these iterators can * save typing. */ template<typename _Container> class front_insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; #pragma empty_line public: /// A nested typedef for the type of whatever container you used. typedef _Container container_type; #pragma empty_line /// The only way to create this %iterator is with a container. explicit front_insert_iterator(_Container& __x) : container(&__x) { } #pragma empty_line /** * @param value An instance of whatever type * container_type::const_reference is; presumably a * reference-to-const T for container<T>. * @return This %iterator, for chained operations. * * This kind of %iterator doesn't really have a @a position in the * container (you can think of the position as being permanently at * the front, if you like). Assigning a value to the %iterator will * always prepend the value to the front of the container. */ #pragma empty_line front_insert_iterator& operator=(typename _Container::const_reference __value) { container->push_front(__value); return *this; } #pragma line 534 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator.h" 3 /// Simply returns *this. front_insert_iterator& operator*() { return *this; } #pragma empty_line /// Simply returns *this. (This %iterator does not @a move.) front_insert_iterator& operator++() { return *this; } #pragma empty_line /// Simply returns *this. (This %iterator does not @a move.) front_insert_iterator operator++(int) { return *this; } }; #pragma empty_line /** * @param x A container of arbitrary type. * @return An instance of front_insert_iterator working on @p x. * * This wrapper function helps in creating front_insert_iterator instances. * Typing the name of the %iterator requires knowing the precise full * type of the container, which can be tedious and impedes generic * programming. Using this function lets you take advantage of automatic * template parameter deduction, making the compiler match the correct * types for you. */ template<typename _Container> inline front_insert_iterator<_Container> front_inserter(_Container& __x) { return front_insert_iterator<_Container>(__x); } #pragma empty_line /** * @brief Turns assignment into insertion. * * These are output iterators, constructed from a container-of-T. * Assigning a T to the iterator inserts it in the container at the * %iterator's position, rather than overwriting the value at that * position. * * (Sequences will actually insert a @e copy of the value before the * %iterator's position.) * * Tip: Using the inserter function to create these iterators can * save typing. */ template<typename _Container> class insert_iterator : public iterator<output_iterator_tag, void, void, void, void> { protected: _Container* container; typename _Container::iterator iter; #pragma empty_line public: /// A nested typedef for the type of whatever container you used. typedef _Container container_type; #pragma empty_line /** * The only way to create this %iterator is with a container and an * initial position (a normal %iterator into the container). */ insert_iterator(_Container& __x, typename _Container::iterator __i) : container(&__x), iter(__i) {} #pragma empty_line /** * @param value An instance of whatever type * container_type::const_reference is; presumably a * reference-to-const T for container<T>. * @return This %iterator, for chained operations. * * This kind of %iterator maintains its own position in the * container. Assigning a value to the %iterator will insert the * value into the container at the place before the %iterator. * * The position is maintained such that subsequent assignments will * insert values immediately after one another. For example, * @code * // vector v contains A and Z * * insert_iterator i (v, ++v.begin()); * i = 1; * i = 2; * i = 3; * * // vector v contains A, 1, 2, 3, and Z * @endcode */ #pragma empty_line insert_iterator& operator=(typename _Container::const_reference __value) { iter = container->insert(iter, __value); ++iter; return *this; } #pragma line 648 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_iterator.h" 3 /// Simply returns *this. insert_iterator& operator*() { return *this; } #pragma empty_line /// Simply returns *this. (This %iterator does not @a move.) insert_iterator& operator++() { return *this; } #pragma empty_line /// Simply returns *this. (This %iterator does not @a move.) insert_iterator& operator++(int) { return *this; } }; #pragma empty_line /** * @param x A container of arbitrary type. * @return An instance of insert_iterator working on @p x. * * This wrapper function helps in creating insert_iterator instances. * Typing the name of the %iterator requires knowing the precise full * type of the container, which can be tedious and impedes generic * programming. Using this function lets you take advantage of automatic * template parameter deduction, making the compiler match the correct * types for you. */ template<typename _Container, typename _Iterator> inline insert_iterator<_Container> inserter(_Container& __x, _Iterator __i) { return insert_iterator<_Container>(__x, typename _Container::iterator(__i)); } #pragma empty_line // @} group iterators #pragma empty_line #pragma empty_line } // namespace #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // This iterator adapter is @a normal in the sense that it does not // change the semantics of any of the operators of its iterator // parameter. Its primary purpose is to convert an iterator that is // not a class, e.g. a pointer, into an iterator that is a class. // The _Container parameter exists solely so that different containers // using this template can instantiate different types, even if the // _Iterator parameter is the same. using std::iterator_traits; using std::iterator; template<typename _Iterator, typename _Container> class __normal_iterator { protected: _Iterator _M_current; #pragma empty_line typedef iterator_traits<_Iterator> __traits_type; #pragma empty_line public: typedef _Iterator iterator_type; typedef typename __traits_type::iterator_category iterator_category; typedef typename __traits_type::value_type value_type; typedef typename __traits_type::difference_type difference_type; typedef typename __traits_type::reference reference; typedef typename __traits_type::pointer pointer; #pragma empty_line __normal_iterator() : _M_current(_Iterator()) { } #pragma empty_line explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } #pragma empty_line // Allow iterator to const_iterator conversion template<typename _Iter> __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< (std::__are_same<_Iter, typename _Container::pointer>::__value), _Container>::__type>& __i) : _M_current(__i.base()) { } #pragma empty_line // Forward iterator requirements reference operator*() const { return *_M_current; } #pragma empty_line pointer operator->() const { return _M_current; } #pragma empty_line __normal_iterator& operator++() { ++_M_current; return *this; } #pragma empty_line __normal_iterator operator++(int) { return __normal_iterator(_M_current++); } #pragma empty_line // Bidirectional iterator requirements __normal_iterator& operator--() { --_M_current; return *this; } #pragma empty_line __normal_iterator operator--(int) { return __normal_iterator(_M_current--); } #pragma empty_line // Random access iterator requirements reference operator[](const difference_type& __n) const { return _M_current[__n]; } #pragma empty_line __normal_iterator& operator+=(const difference_type& __n) { _M_current += __n; return *this; } #pragma empty_line __normal_iterator operator+(const difference_type& __n) const { return __normal_iterator(_M_current + __n); } #pragma empty_line __normal_iterator& operator-=(const difference_type& __n) { _M_current -= __n; return *this; } #pragma empty_line __normal_iterator operator-(const difference_type& __n) const { return __normal_iterator(_M_current - __n); } #pragma empty_line const _Iterator& base() const { return _M_current; } }; #pragma empty_line // Note: In what follows, the left- and right-hand-side iterators are // allowed to vary in types (conceptually in cv-qualification) so that // comparison between cv-qualified and non-cv-qualified iterators be // valid. However, the greedy and unfriendly operators in std::rel_ops // will make overload resolution ambiguous (when in scope) if we don't // provide overloads whose operands are of the same type. Can someone // remind me what generic programming is about? -- Gaby #pragma empty_line // Forward iterator requirements template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } #pragma empty_line template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } #pragma empty_line // Random access iterator requirements template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline bool operator<(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() < __rhs.base(); } #pragma empty_line template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline bool operator>(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() > __rhs.base(); } #pragma empty_line template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } #pragma empty_line template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // According to the resolution of DR179 not only the various comparison // operators but also operator- must accept mixed iterator/const_iterator // parameters. template<typename _IteratorL, typename _IteratorR, typename _Container> #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline typename __normal_iterator<_IteratorL, _Container>::difference_type operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) #pragma empty_line { return __lhs.base() - __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline typename __normal_iterator<_Iterator, _Container>::difference_type operator-(const __normal_iterator<_Iterator, _Container>& __lhs, const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() - __rhs.base(); } #pragma empty_line template<typename _Iterator, typename _Container> inline __normal_iterator<_Iterator, _Container> operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n, const __normal_iterator<_Iterator, _Container>& __i) { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } #pragma empty_line #pragma empty_line } // namespace #pragma line 69 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/debug/debug.h" 1 3 // Debugging support implementation -*- C++ -*- #pragma empty_line // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file debug/debug.h * This file is a GNU debug extension to the Standard C++ Library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /** Macros and namespaces used by the implementation outside of debug * wrappers to verify certain properties. The __glibcxx_requires_xxx * macros are merely wrappers around the __glibcxx_check_xxx wrappers * when we are compiling with debug mode, but disappear when we are * in release mode so that there is no checking performed in, e.g., * the standard library algorithms. */ #pragma empty_line // Debug mode namespaces. #pragma empty_line /** * @namespace std::__debug * @brief GNU debug code, replaces standard behavior with debug behavior. */ namespace std { namespace __debug { } } #pragma empty_line /** @namespace __gnu_debug * @brief GNU debug classes for public use. */ namespace __gnu_debug { using namespace std::__debug; } #pragma line 71 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 2 3 #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // See http://gcc.gnu.org/ml/libstdc++/2004-08/msg00167.html: in a // nutshell, we are partially implementing the resolution of DR 187, // when it's safe, i.e., the value_types are equal. template<bool _BoolType> struct __iter_swap { template<typename _ForwardIterator1, typename _ForwardIterator2> static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; _ValueType1 __tmp = (*__a); *__a = (*__b); *__b = (__tmp); } }; #pragma empty_line template<> struct __iter_swap<true> { template<typename _ForwardIterator1, typename _ForwardIterator2> static void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { swap(*__a, *__b); } }; #pragma empty_line /** * @brief Swaps the contents of two iterators. * @ingroup mutating_algorithms * @param a An iterator. * @param b Another iterator. * @return Nothing. * * This function swaps the values pointed to by two iterators, not the * iterators themselves. */ template<typename _ForwardIterator1, typename _ForwardIterator2> inline void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) { typedef typename iterator_traits<_ForwardIterator1>::value_type _ValueType1; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2; #pragma empty_line // concept requirements #pragma line 135 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 typedef typename iterator_traits<_ForwardIterator1>::reference _ReferenceType1; typedef typename iterator_traits<_ForwardIterator2>::reference _ReferenceType2; std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value && __are_same<_ValueType1&, _ReferenceType1>::__value && __are_same<_ValueType2&, _ReferenceType2>::__value>:: iter_swap(__a, __b); } #pragma empty_line /** * @brief Swap the elements of two sequences. * @ingroup mutating_algorithms * @param first1 A forward iterator. * @param last1 A forward iterator. * @param first2 A forward iterator. * @return An iterator equal to @p first2+(last1-first1). * * Swaps each element in the range @p [first1,last1) with the * corresponding element in the range @p [first2,(last1-first1)). * The ranges must not overlap. */ template<typename _ForwardIterator1, typename _ForwardIterator2> _ForwardIterator2 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { // concept requirements #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line ; #pragma empty_line for (; __first1 != __last1; ++__first1, ++__first2) std::iter_swap(__first1, __first2); return __first2; } #pragma empty_line /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param a A thing of arbitrary type. * @param b Another thing of arbitrary type. * @return The lesser of the parameters. * * This is the simple classic generic implementation. It will work on * temporary expressions, since they are only evaluated once, unlike a * preprocessor macro. */ template<typename _Tp> inline const _Tp& min(const _Tp& __a, const _Tp& __b) { // concept requirements #pragma empty_line //return __b < __a ? __b : __a; if (__b < __a) return __b; return __a; } #pragma empty_line /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param a A thing of arbitrary type. * @param b Another thing of arbitrary type. * @return The greater of the parameters. * * This is the simple classic generic implementation. It will work on * temporary expressions, since they are only evaluated once, unlike a * preprocessor macro. */ template<typename _Tp> inline const _Tp& max(const _Tp& __a, const _Tp& __b) { // concept requirements #pragma empty_line //return __a < __b ? __b : __a; if (__a < __b) return __b; return __a; } #pragma empty_line /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param a A thing of arbitrary type. * @param b Another thing of arbitrary type. * @param comp A @link comparison_functors comparison functor@endlink. * @return The lesser of the parameters. * * This will work on temporary expressions, since they are only evaluated * once, unlike a preprocessor macro. */ template<typename _Tp, typename _Compare> inline const _Tp& min(const _Tp& __a, const _Tp& __b, _Compare __comp) { //return __comp(__b, __a) ? __b : __a; if (__comp(__b, __a)) return __b; return __a; } #pragma empty_line /** * @brief This does what you think it does. * @ingroup sorting_algorithms * @param a A thing of arbitrary type. * @param b Another thing of arbitrary type. * @param comp A @link comparison_functors comparison functor@endlink. * @return The greater of the parameters. * * This will work on temporary expressions, since they are only evaluated * once, unlike a preprocessor macro. */ template<typename _Tp, typename _Compare> inline const _Tp& max(const _Tp& __a, const _Tp& __b, _Compare __comp) { //return __comp(__a, __b) ? __b : __a; if (__comp(__a, __b)) return __b; return __a; } #pragma empty_line // If _Iterator is a __normal_iterator return its base (a plain pointer, // normally) otherwise return it untouched. See copy, fill, ... template<typename _Iterator> struct _Niter_base : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> { }; #pragma empty_line template<typename _Iterator> inline typename _Niter_base<_Iterator>::iterator_type __niter_base(_Iterator __it) { return std::_Niter_base<_Iterator>::_S_base(__it); } #pragma empty_line // Likewise, for move_iterator. template<typename _Iterator> struct _Miter_base : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> { }; #pragma empty_line template<typename _Iterator> inline typename _Miter_base<_Iterator>::iterator_type __miter_base(_Iterator __it) { return std::_Miter_base<_Iterator>::_S_base(__it); } #pragma empty_line // All of these auxiliary structs serve two purposes. (1) Replace // calls to copy with memmove whenever possible. (Memmove, not memcpy, // because the input and output ranges are permitted to overlap.) // (2) If we're using random access iterators, then write the loop as // a for loop with an explicit count. #pragma empty_line template<bool, bool, typename> struct __copy_move { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { for (; __first != __last; ++__result, ++__first) *__result = *__first; return __result; } }; #pragma line 319 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 template<> struct __copy_move<false, false, random_access_iterator_tag> { template<typename _II, typename _OI> static _OI __copy_m(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { *__result = *__first; ++__first; ++__result; } return __result; } }; #pragma line 357 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 template<bool _IsMove> struct __copy_move<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> static _Tp* __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); return __result + _Num; } }; #pragma empty_line template<bool _IsMove, typename _II, typename _OI> inline _OI __copy_move_a(_II __first, _II __last, _OI __result) { typedef typename iterator_traits<_II>::value_type _ValueTypeI; typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; const bool __simple = (__is_trivial(_ValueTypeI) && __is_pointer<_II>::__value && __is_pointer<_OI>::__value && __are_same<_ValueTypeI, _ValueTypeO>::__value); #pragma empty_line return std::__copy_move<_IsMove, __simple, _Category>::__copy_m(__first, __last, __result); } #pragma empty_line // Helpers for streambuf iterators (either istream or ostream). // NB: avoid including <iosfwd>, relatively large. template<typename _CharT> struct char_traits; #pragma empty_line template<typename _CharT, typename _Traits> class istreambuf_iterator; #pragma empty_line template<typename _CharT, typename _Traits> class ostreambuf_iterator; #pragma empty_line template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(_CharT*, _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); #pragma empty_line template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type __copy_move_a2(const _CharT*, const _CharT*, ostreambuf_iterator<_CharT, char_traits<_CharT> >); #pragma empty_line template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); #pragma empty_line template<bool _IsMove, typename _II, typename _OI> inline _OI __copy_move_a2(_II __first, _II __last, _OI __result) { return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } #pragma empty_line /** * @brief Copies the range [first,last) into result. * @ingroup mutating_algorithms * @param first An input iterator. * @param last An input iterator. * @param result An output iterator. * @return result + (first - last) * * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are passed, then the * loop count will be known (and therefore a candidate for compiler * optimizations such as unrolling). Result may not be contained within * [first,last); the copy_backward function should be used instead. * * Note that the end of the output range is permitted to be contained * within [first,last). */ template<typename _II, typename _OI> inline _OI copy(_II __first, _II __last, _OI __result) { // concept requirements #pragma empty_line #pragma empty_line #pragma empty_line ; #pragma empty_line return (std::__copy_move_a2<__is_move_iterator<_II>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result)); } #pragma line 494 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 template<bool, bool, typename> struct __copy_move_backward { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { while (__first != __last) *--__result = *--__last; return __result; } }; #pragma line 522 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 template<> struct __copy_move_backward<false, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> static _BI2 __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = *--__last; return __result; } }; #pragma line 552 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 template<bool _IsMove> struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> static _Tp* __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) { const ptrdiff_t _Num = __last - __first; if (_Num) __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; } }; #pragma empty_line template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) { typedef typename iterator_traits<_BI1>::value_type _ValueType1; typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; const bool __simple = (__is_trivial(_ValueType1) && __is_pointer<_BI1>::__value && __is_pointer<_BI2>::__value && __are_same<_ValueType1, _ValueType2>::__value); #pragma empty_line return std::__copy_move_backward<_IsMove, __simple, _Category>::__copy_move_b(__first, __last, __result); } #pragma empty_line template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) { return _BI2(std::__copy_move_backward_a<_IsMove> (std::__niter_base(__first), std::__niter_base(__last), std::__niter_base(__result))); } #pragma empty_line /** * @brief Copies the range [first,last) into result. * @ingroup mutating_algorithms * @param first A bidirectional iterator. * @param last A bidirectional iterator. * @param result A bidirectional iterator. * @return result - (first - last) * * The function has the same effect as copy, but starts at the end of the * range and works its way to the start, returning the start of the result. * This inline function will boil down to a call to @c memmove whenever * possible. Failing that, if random access iterators are passed, then the * loop count will be known (and therefore a candidate for compiler * optimizations such as unrolling). * * Result may not be in the range [first,last). Use copy instead. Note * that the start of the output range may overlap [first,last). */ template<typename _BI1, typename _BI2> inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { // concept requirements #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line ; #pragma empty_line return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> (std::__miter_base(__first), std::__miter_base(__last), __result)); } #pragma line 669 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_algobase.h" 3 template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { for (; __first != __last; ++__first) *__first = __value; } #pragma empty_line template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type __fill_a(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { const _Tp __tmp = __value; for (; __first != __last; ++__first) *__first = __tmp; } #pragma empty_line // Specialization: for char types we can use memset. template<typename _Tp> inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) { const _Tp __tmp = __c; __builtin_memset(__first, static_cast<unsigned char>(__tmp), __last - __first); } #pragma empty_line /** * @brief Fills the range [first,last) with copies of value. * @ingroup mutating_algorithms * @param first A forward iterator. * @param last A forward iterator. * @param value A reference-to-const of arbitrary type. * @return Nothing. * * This function fills a range with copies of the same value. For char * types filling contiguous areas of memory, this becomes an inline call * to @c memset or @c wmemset. */ template<typename _ForwardIterator, typename _Tp> inline void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { // concept requirements #pragma empty_line #pragma empty_line ; #pragma empty_line std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), __value); } #pragma empty_line template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first) *__first = __value; return __first; } #pragma empty_line template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) { const _Tp __tmp = __value; for (__decltype(__n + 0) __niter = __n; __niter > 0; --__niter, ++__first) *__first = __tmp; return __first; } #pragma empty_line template<typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) { std::__fill_a(__first, __first + __n, __c); return __first + __n; } #pragma empty_line /** * @brief Fills the range [first,first+n) with copies of value. * @ingroup mutating_algorithms * @param first An output iterator. * @param n The count of copies to perform. * @param value A reference-to-const of arbitrary type. * @return The iterator at first+n. * * This function fills a range with copies of the same value. For char * types filling contiguous areas of memory, this becomes an inline call * to @c memset or @ wmemset. * * _GLIBCXX_RESOLVE_LIB_DEFECTS * DR 865. More algorithms that throw away information */ template<typename _OI, typename _Size, typename _Tp> inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) { // concept requirements #pragma empty_line #pragma empty_line return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); } #pragma empty_line template<bool _BoolType> struct __equal { template<typename _II1, typename _II2> static bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) return false; return true; } }; #pragma empty_line template<> struct __equal<true> { template<typename _Tp> static bool equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) { return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * (__last1 - __first1)); } }; #pragma empty_line template<typename _II1, typename _II2> inline bool __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = (__is_integer<_ValueType1>::__value && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value && __are_same<_ValueType1, _ValueType2>::__value); #pragma empty_line return std::__equal<__simple>::equal(__first1, __last1, __first2); } #pragma empty_line #pragma empty_line template<typename, typename> struct __lc_rai { template<typename _II1, typename _II2> static _II1 __newlast1(_II1, _II1 __last1, _II2, _II2) { return __last1; } #pragma empty_line template<typename _II> static bool __cnd2(_II __first, _II __last) { return __first != __last; } }; #pragma empty_line template<> struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> { template<typename _RAI1, typename _RAI2> static _RAI1 __newlast1(_RAI1 __first1, _RAI1 __last1, _RAI2 __first2, _RAI2 __last2) { const typename iterator_traits<_RAI1>::difference_type __diff1 = __last1 - __first1; const typename iterator_traits<_RAI2>::difference_type __diff2 = __last2 - __first2; return __diff2 < __diff1 ? __first1 + __diff2 : __last1; } #pragma empty_line template<typename _RAI> static bool __cnd2(_RAI, _RAI) { return true; } }; #pragma empty_line template<bool _BoolType> struct __lexicographical_compare { template<typename _II1, typename _II2> static bool __lc(_II1, _II1, _II2, _II2); }; #pragma empty_line template<bool _BoolType> template<typename _II1, typename _II2> bool __lexicographical_compare<_BoolType>:: __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; #pragma empty_line __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, ++__first2) { if (*__first1 < *__first2) return true; if (*__first2 < *__first1) return false; } return __first1 == __last1 && __first2 != __last2; } #pragma empty_line template<> struct __lexicographical_compare<true> { template<typename _Tp, typename _Up> static bool __lc(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) { const size_t __len1 = __last1 - __first1; const size_t __len2 = __last2 - __first2; const int __result = __builtin_memcmp(__first1, __first2, std::min(__len1, __len2)); return __result != 0 ? __result < 0 : __len1 < __len2; } }; #pragma empty_line template<typename _II1, typename _II2> inline bool __lexicographical_compare_aux(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value); #pragma empty_line return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, __first2, __last2); } #pragma empty_line /** * @brief Finds the first position in which @a val could be inserted * without changing the ordering. * @param first An iterator. * @param last Another iterator. * @param val The search term. * @return An iterator pointing to the first element <em>not less * than</em> @a val, or end() if every element is less than * @a val. * @ingroup binary_search_algorithms */ template<typename _ForwardIterator, typename _Tp> _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __val) { typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType; typedef typename iterator_traits<_ForwardIterator>::difference_type _DistanceType; #pragma empty_line // concept requirements #pragma empty_line #pragma empty_line ; #pragma empty_line _DistanceType __len = std::distance(__first, __last); #pragma empty_line while (__len > 0) { _DistanceType __half = __len >> 1; _ForwardIterator __middle = __first; std::advance(__middle, __half); if (*__middle < __val) { __first = __middle; ++__first; __len = __len - __half - 1; } else __len = __half; } return __first; } #pragma empty_line /// This is a helper function for the sort routines and for random.tcc. // Precondition: __n > 0. template<typename _Size> inline _Size __lg(_Size __n) { _Size __k; for (__k = 0; __n != 0; __n >>= 1) ++__k; return __k - 1; } #pragma empty_line inline int __lg(int __n) { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } #pragma empty_line inline long __lg(long __n) { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } #pragma empty_line inline long long __lg(long long __n) { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms * @param first1 An input iterator. * @param last1 An input iterator. * @param first2 An input iterator. * @return A boolean true or false. * * This compares the elements of two ranges using @c == and returns true or * false depending on whether all of the corresponding elements of the * ranges are equal. */ template<typename _II1, typename _II2> inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { // concept requirements #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line ; #pragma empty_line return std::__equal_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2)); } #pragma empty_line /** * @brief Tests a range for element-wise equality. * @ingroup non_mutating_algorithms * @param first1 An input iterator. * @param last1 An input iterator. * @param first2 An input iterator. * @param binary_pred A binary predicate @link functors * functor@endlink. * @return A boolean true or false. * * This compares the elements of two ranges using the binary_pred * parameter, and returns true or * false depending on whether all of the corresponding elements of the * ranges are equal. */ template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) { // concept requirements #pragma empty_line #pragma empty_line ; #pragma empty_line for (; __first1 != __last1; ++__first1, ++__first2) if (!bool(__binary_pred(*__first1, *__first2))) return false; return true; } #pragma empty_line /** * @brief Performs @b dictionary comparison on ranges. * @ingroup sorting_algorithms * @param first1 An input iterator. * @param last1 An input iterator. * @param first2 An input iterator. * @param last2 An input iterator. * @return A boolean true or false. * * <em>Returns true if the sequence of elements defined by the range * [first1,last1) is lexicographically less than the sequence of elements * defined by the range [first2,last2). Returns false otherwise.</em> * (Quoted from [25.3.8]/1.) If the iterators are all character pointers, * then this is an inline call to @c memcmp. */ template<typename _II1, typename _II2> inline bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) { // concept requirements typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line ; ; #pragma empty_line return std::__lexicographical_compare_aux(std::__niter_base(__first1), std::__niter_base(__last1), std::__niter_base(__first2), std::__niter_base(__last2)); } #pragma empty_line /** * @brief Performs @b dictionary comparison on ranges. * @ingroup sorting_algorithms * @param first1 An input iterator. * @param last1 An input iterator. * @param first2 An input iterator. * @param last2 An input iterator. * @param comp A @link comparison_functors comparison functor@endlink. * @return A boolean true or false. * * The same as the four-parameter @c lexicographical_compare, but uses the * comp parameter instead of @c <. */ template<typename _II1, typename _II2, typename _Compare> bool lexicographical_compare(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2, _Compare __comp) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; #pragma empty_line // concept requirements #pragma empty_line #pragma empty_line ; ; #pragma empty_line __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); ++__first1, ++__first2) { if (__comp(*__first1, *__first2)) return true; if (__comp(*__first2, *__first1)) return false; } return __first1 == __last1 && __first2 != __last2; } #pragma empty_line /** * @brief Finds the places in ranges which don't match. * @ingroup non_mutating_algorithms * @param first1 An input iterator. * @param last1 An input iterator. * @param first2 An input iterator. * @return A pair of iterators pointing to the first mismatch. * * This compares the elements of two ranges using @c == and returns a pair * of iterators. The first iterator points into the first range, the * second iterator points into the second range, and the elements pointed * to by the iterators are not equal. */ template<typename _InputIterator1, typename _InputIterator2> pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { // concept requirements #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line ; #pragma empty_line while (__first1 != __last1 && *__first1 == *__first2) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } #pragma empty_line /** * @brief Finds the places in ranges which don't match. * @ingroup non_mutating_algorithms * @param first1 An input iterator. * @param last1 An input iterator. * @param first2 An input iterator. * @param binary_pred A binary predicate @link functors * functor@endlink. * @return A pair of iterators pointing to the first mismatch. * * This compares the elements of two ranges using the binary_pred * parameter, and returns a pair * of iterators. The first iterator points into the first range, the * second iterator points into the second range, and the elements pointed * to by the iterators are not equal. */ template<typename _InputIterator1, typename _InputIterator2, typename _BinaryPredicate> pair<_InputIterator1, _InputIterator2> mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { // concept requirements #pragma empty_line #pragma empty_line ; #pragma empty_line while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) { ++__first1; ++__first2; } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } #pragma empty_line #pragma empty_line } // namespace std #pragma empty_line // NB: This file is included within many other C++ includes, as a way // of getting the base algorithms. So, make sure that parallel bits // come in too if requested. #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/char_traits.h" 2 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 1 3 // -*- C++ -*- forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/cwchar * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c wchar.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: 21.4 // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/wchar.h" 1 3 4 /* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities <wchar.h> */ #pragma line 900 "/usr/include/wchar.h" 3 4 /* Undefine all __need_* constants in case we are included to get those constants but the whole file was already read. */ #pragma line 46 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwchar" 2 3 #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/char_traits.h" 2 3 #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @brief Mapping from character type to associated types. * * @note This is an implementation class for the generic version * of char_traits. It defines int_type, off_type, pos_type, and * state_type. By default these are unsigned long, streamoff, * streampos, and mbstate_t. Users who need a different set of * types, but who don't need to change the definitions of any function * defined in char_traits, can specialize __gnu_cxx::_Char_types * while leaving __gnu_cxx::char_traits alone. */ template<typename _CharT> struct _Char_types { typedef unsigned long int_type; typedef std::streampos pos_type; typedef std::streamoff off_type; typedef std::mbstate_t state_type; }; #pragma empty_line #pragma empty_line /** * @brief Base class used to implement std::char_traits. * * @note For any given actual character type, this definition is * probably wrong. (Most of the member functions are likely to be * right, but the int_type and state_type typedefs, and the eof() * member function, are likely to be wrong.) The reason this class * exists is so users can specialize it. Classes in namespace std * may not be specialized for fundamental types, but classes in * namespace __gnu_cxx may be. * * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html * for advice on how to make use of this class for @a unusual character * types. Also, check out include/ext/pod_char_traits.h. */ template<typename _CharT> struct char_traits { typedef _CharT char_type; typedef typename _Char_types<_CharT>::int_type int_type; typedef typename _Char_types<_CharT>::pos_type pos_type; typedef typename _Char_types<_CharT>::off_type off_type; typedef typename _Char_types<_CharT>::state_type state_type; #pragma empty_line static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } #pragma empty_line static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } #pragma empty_line static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } #pragma empty_line static int compare(const char_type* __s1, const char_type* __s2, std::size_t __n); #pragma empty_line static std::size_t length(const char_type* __s); #pragma empty_line static const char_type* find(const char_type* __s, std::size_t __n, const char_type& __a); #pragma empty_line static char_type* move(char_type* __s1, const char_type* __s2, std::size_t __n); #pragma empty_line static char_type* copy(char_type* __s1, const char_type* __s2, std::size_t __n); #pragma empty_line static char_type* assign(char_type* __s, std::size_t __n, char_type __a); #pragma empty_line static char_type to_char_type(const int_type& __c) { return static_cast<char_type>(__c); } #pragma empty_line static int_type to_int_type(const char_type& __c) { return static_cast<int_type>(__c); } #pragma empty_line static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } #pragma empty_line static int_type eof() { return static_cast<int_type>(-1); } #pragma empty_line static int_type not_eof(const int_type& __c) { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } }; #pragma empty_line template<typename _CharT> int char_traits<_CharT>:: compare(const char_type* __s1, const char_type* __s2, std::size_t __n) { for (std::size_t __i = 0; __i < __n; ++__i) if (lt(__s1[__i], __s2[__i])) return -1; else if (lt(__s2[__i], __s1[__i])) return 1; return 0; } #pragma empty_line template<typename _CharT> std::size_t char_traits<_CharT>:: length(const char_type* __p) { std::size_t __i = 0; while (!eq(__p[__i], char_type())) ++__i; return __i; } #pragma empty_line template<typename _CharT> const typename char_traits<_CharT>::char_type* char_traits<_CharT>:: find(const char_type* __s, std::size_t __n, const char_type& __a) { for (std::size_t __i = 0; __i < __n; ++__i) if (eq(__s[__i], __a)) return __s + __i; return 0; } #pragma empty_line template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: move(char_type* __s1, const char_type* __s2, std::size_t __n) { return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, __n * sizeof(char_type))); } #pragma empty_line template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: copy(char_type* __s1, const char_type* __s2, std::size_t __n) { // NB: Inline std::copy so no recursive dependencies. std::copy(__s2, __s2 + __n, __s1); return __s1; } #pragma empty_line template<typename _CharT> typename char_traits<_CharT>::char_type* char_traits<_CharT>:: assign(char_type* __s, std::size_t __n, char_type __a) { // NB: Inline std::fill_n so no recursive dependencies. std::fill_n(__s, __n, __a); return __s; } #pragma empty_line #pragma empty_line } // namespace #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // 21.1 /** * @brief Basis for explicit traits specializations. * * @note For any given actual character type, this definition is * probably wrong. Since this is just a thin wrapper around * __gnu_cxx::char_traits, it is possible to achieve a more * appropriate definition by specializing __gnu_cxx::char_traits. * * See http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt05ch13s03.html * for advice on how to make use of this class for @a unusual character * types. Also, check out include/ext/pod_char_traits.h. */ template<class _CharT> struct char_traits : public __gnu_cxx::char_traits<_CharT> { }; #pragma empty_line #pragma empty_line /// 21.1.3.1 char_traits specializations template<> struct char_traits<char> { typedef char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; #pragma empty_line static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } #pragma empty_line static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } #pragma empty_line static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } #pragma empty_line static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return __builtin_memcmp(__s1, __s2, __n); } #pragma empty_line static size_t length(const char_type* __s) { return __builtin_strlen(__s); } #pragma empty_line static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return static_cast<const char_type*>(__builtin_memchr(__s, __a, __n)); } #pragma empty_line static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast<char_type*>(__builtin_memmove(__s1, __s2, __n)); } #pragma empty_line static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n)); } #pragma empty_line static char_type* assign(char_type* __s, size_t __n, char_type __a) { return static_cast<char_type*>(__builtin_memset(__s, __a, __n)); } #pragma empty_line static char_type to_char_type(const int_type& __c) { return static_cast<char_type>(__c); } #pragma empty_line // To keep both the byte 0xff and the eof symbol 0xffffffff // from ending up as 0xffffffff. static int_type to_int_type(const char_type& __c) { return static_cast<int_type>(static_cast<unsigned char>(__c)); } #pragma empty_line static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } #pragma empty_line static int_type eof() { return static_cast<int_type>(-1); } #pragma empty_line static int_type not_eof(const int_type& __c) { return (__c == eof()) ? 0 : __c; } }; #pragma empty_line #pragma empty_line #pragma empty_line /// 21.1.3.2 char_traits specializations template<> struct char_traits<wchar_t> { typedef wchar_t char_type; typedef wint_t int_type; typedef streamoff off_type; typedef wstreampos pos_type; typedef mbstate_t state_type; #pragma empty_line static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } #pragma empty_line static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } #pragma empty_line static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } #pragma empty_line static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return wmemcmp(__s1, __s2, __n); } #pragma empty_line static size_t length(const char_type* __s) { return wcslen(__s); } #pragma empty_line static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return wmemchr(__s, __a, __n); } #pragma empty_line static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return wmemmove(__s1, __s2, __n); } #pragma empty_line static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return wmemcpy(__s1, __s2, __n); } #pragma empty_line static char_type* assign(char_type* __s, size_t __n, char_type __a) { return wmemset(__s, __a, __n); } #pragma empty_line static char_type to_char_type(const int_type& __c) { return char_type(__c); } #pragma empty_line static int_type to_int_type(const char_type& __c) { return int_type(__c); } #pragma empty_line static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } #pragma empty_line static int_type eof() { return static_cast<int_type>((0xffffffffu)); } #pragma empty_line static int_type not_eof(const int_type& __c) { return eq_int_type(__c, eof()) ? 0 : __c; } }; #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/localefwd.h" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/localefwd.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.1 Locales // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/localefwd.h" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++locale.h" 1 3 // Wrapper for underlying C-language localization -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/c++locale.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.8 Standard locale categories. // #pragma empty_line // Written by Benjamin Kosnik <bkoz@redhat.com> #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 40 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++locale.h" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/clocale" 1 3 // -*- C++ -*- forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file clocale * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c locale.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: 18.2.2 Implementation properties: C library // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/clocale" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/locale.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.11 Localization <locale.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 29 "/usr/include/locale.h" 2 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/locale.h" 1 3 4 /* Definition of locale category symbol values. Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 30 "/usr/include/locale.h" 2 3 4 #pragma empty_line extern "C" { #pragma empty_line /* These are the possibilities for the first argument to setlocale. The code assumes that the lowest LC_* symbol has the value zero. */ #pragma line 52 "/usr/include/locale.h" 3 4 /* Structure giving information about numeric and monetary notation. */ struct lconv { /* Numeric (non-monetary) information. */ #pragma empty_line char *decimal_point; /* Decimal point character. */ char *thousands_sep; /* Thousands separator. */ /* Each element is the number of digits in each group; elements with higher indices are farther left. An element with value CHAR_MAX means that no further grouping is done. An element with value 0 means that the previous element is used for all groups farther left. */ char *grouping; #pragma empty_line /* Monetary information. */ #pragma empty_line /* First three chars are a currency symbol from ISO 4217. Fourth char is the separator. Fifth char is '\0'. */ char *int_curr_symbol; char *currency_symbol; /* Local currency symbol. */ char *mon_decimal_point; /* Decimal point character. */ char *mon_thousands_sep; /* Thousands separator. */ char *mon_grouping; /* Like `grouping' element (above). */ char *positive_sign; /* Sign for positive values. */ char *negative_sign; /* Sign for negative values. */ char int_frac_digits; /* Int'l fractional digits. */ char frac_digits; /* Local fractional digits. */ /* 1 if currency_symbol precedes a positive value, 0 if succeeds. */ char p_cs_precedes; /* 1 iff a space separates currency_symbol from a positive value. */ char p_sep_by_space; /* 1 if currency_symbol precedes a negative value, 0 if succeeds. */ char n_cs_precedes; /* 1 iff a space separates currency_symbol from a negative value. */ char n_sep_by_space; /* Positive and negative sign positions: 0 Parentheses surround the quantity and currency_symbol. 1 The sign string precedes the quantity and currency_symbol. 2 The sign string follows the quantity and currency_symbol. 3 The sign string immediately precedes the currency_symbol. 4 The sign string immediately follows the currency_symbol. */ char p_sign_posn; char n_sign_posn; #pragma empty_line /* 1 if int_curr_symbol precedes a positive value, 0 if succeeds. */ char int_p_cs_precedes; /* 1 iff a space separates int_curr_symbol from a positive value. */ char int_p_sep_by_space; /* 1 if int_curr_symbol precedes a negative value, 0 if succeeds. */ char int_n_cs_precedes; /* 1 iff a space separates int_curr_symbol from a negative value. */ char int_n_sep_by_space; /* Positive and negative sign positions: 0 Parentheses surround the quantity and int_curr_symbol. 1 The sign string precedes the quantity and int_curr_symbol. 2 The sign string follows the quantity and int_curr_symbol. 3 The sign string immediately precedes the int_curr_symbol. 4 The sign string immediately follows the int_curr_symbol. */ char int_p_sign_posn; char int_n_sign_posn; #pragma line 120 "/usr/include/locale.h" 3 4 }; #pragma empty_line #pragma empty_line /* Set and/or return the current locale. */ extern char *setlocale (int __category, const char *__locale) throw (); #pragma empty_line /* Return the numeric/monetary information for the current locale. */ extern struct lconv *localeconv (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is the implementation of the internationalization handling in the upcoming ISO C++ standard library. To support this another set of the functions using locale data exist which have an additional argument. #pragma empty_line Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ #pragma empty_line /* Get locale datatype definition. */ #pragma empty_line #pragma empty_line /* Return a reference to a data structure representing a set of locale datasets. Unlike for the CATEGORY parameter for `setlocale' the CATEGORY_MASK parameter here uses a single bit for each category, made by OR'ing together LC_*_MASK bits above. */ extern __locale_t newlocale (int __category_mask, const char *__locale, __locale_t __base) throw (); #pragma empty_line /* These are the bits that can be set in the CATEGORY_MASK argument to `newlocale'. In the GNU implementation, LC_FOO_MASK has the value of (1 << LC_FOO), but this is not a part of the interface that callers can assume will be true. */ #pragma line 184 "/usr/include/locale.h" 3 4 /* Return a duplicate of the set of locale in DATASET. All usage counters are increased if necessary. */ extern __locale_t duplocale (__locale_t __dataset) throw (); #pragma empty_line /* Free the data associated with a locale dataset previously returned by a call to `setlocale_r'. */ extern void freelocale (__locale_t __dataset) throw (); #pragma empty_line /* Switch the current thread's locale to DATASET. If DATASET is null, instead just return the current setting. The special value LC_GLOBAL_LOCALE is the initial setting for all threads and can also be installed any time, meaning the thread uses the global settings controlled by `setlocale'. */ extern __locale_t uselocale (__locale_t __dataset) throw (); #pragma empty_line /* This value can be passed to `uselocale' and may be returned by it. Passing this value to any other function has undefined behavior. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } #pragma line 44 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/clocale" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Get rid of those macros defined in <locale.h> in lieu of real functions. #pragma empty_line #pragma empty_line #pragma empty_line namespace std { using ::lconv; using ::setlocale; using ::localeconv; } // namespace std #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++locale.h" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line extern "C" __typeof(uselocale) __uselocale; #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line typedef __locale_t __c_locale; #pragma empty_line // Convert numeric value of type double and long double to string and // return length of string. If vsnprintf is available use it, otherwise // fall back to the unsafe vsprintf which, in general, can be dangerous // and should be avoided. inline int __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), char* __out, const int __size __attribute__ ((__unused__)), const char* __fmt, ...) { #pragma empty_line __c_locale __old = __gnu_cxx::__uselocale(__cloc); #pragma line 88 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++locale.h" 3 __builtin_va_list __args; __builtin_va_start(__args, __fmt); #pragma empty_line #pragma empty_line const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line __builtin_va_end(__args); #pragma empty_line #pragma empty_line __gnu_cxx::__uselocale(__old); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return __ret; } #pragma empty_line #pragma empty_line } // namespace #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/localefwd.h" 2 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cctype" 1 3 // -*- C++ -*- forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/cctype * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c ctype.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: <ccytpe> // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cctype" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/ctype.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard 7.4: Character handling <ctype.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line /* These are all the characteristics of characters. If there get to be more than 16 distinct characteristics, many things must be changed that use `unsigned short int's. #pragma empty_line The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/endian.h" 1 3 4 /* Copyright (C) 1992-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte, and then writing down one digit for each byte, starting with the byte at the lowest address at the left, and proceeding to the byte with the highest address at the right. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This file defines `__BYTE_ORDER' for the particular machine. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 /* i386/x86_64 are little-endian. */ #pragma line 37 "/usr/include/endian.h" 2 3 4 #pragma empty_line /* Some machines may need to use a different endianness for floating point values. */ #pragma line 59 "/usr/include/endian.h" 3 4 /* Conversion interfaces. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 /* Macros to swap the order of bytes in integer values. Copyright (C) 1997-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 #pragma empty_line /* Swap bytes in 16 bit value. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Get __bswap_16. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4 /* Macros to swap the order of bytes in 16-bit integer values. Copyright (C) 2012-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 #pragma empty_line /* Swap bytes in 32 bit value. */ #pragma line 56 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 /* To swap the bytes in a word the i486 processors and up provide the `bswap' opcode. On i386 we have to use three instructions. */ #pragma line 96 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 /* Swap bytes in 64 bit value. */ #pragma line 61 "/usr/include/endian.h" 2 3 4 #pragma line 40 "/usr/include/ctype.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), /* UPPERCASE. */ _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), /* lowercase. */ _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), /* Alphabetic. */ _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), /* Numeric. */ _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), /* Hexadecimal numeric. */ _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), /* Whitespace. */ _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), /* Printing. */ _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), /* Graphical. */ _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), /* Blank (usually SPC and TAB). */ _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), /* Control character. */ _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), /* Punctuation. */ _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) /* Alphanumeric. */ }; #pragma empty_line #pragma empty_line /* These are defined in ctype-info.c. The declarations here must match those in localeinfo.h. #pragma empty_line In the thread-specific locale model (see `uselocale' in <locale.h>) we cannot use global variables for these as was done in the past. Instead, the following accessor functions return the address of each variable, which is local to the current thread if multithreaded. #pragma empty_line These point into arrays of 384, so they can be indexed by any `unsigned char' value [0,255]; by EOF (-1); or by any `signed char' value [-128,-1). ISO C requires that the ctype functions work for `unsigned char' values and for EOF; we also support negative `signed char' values for broken old programs. The case conversion arrays are of `int's rather than `unsigned char's because tolower (EOF) must be EOF, which doesn't fit into an `unsigned char'. But today more important is that the arrays are also used for multi-byte character sets. */ extern const unsigned short int **__ctype_b_loc (void) throw () __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) throw () __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) throw () __attribute__ ((__const__)); #pragma line 106 "/usr/include/ctype.h" 3 4 /* The following names are all functions: int isCHARACTERISTIC(int c); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); #pragma empty_line #pragma empty_line /* Return the lowercase version of C. */ extern int tolower (int __c) throw (); #pragma empty_line /* Return the uppercase version of C. */ extern int toupper (int __c) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* ISO C99 introduced one new function. */ #pragma empty_line #pragma empty_line #pragma empty_line extern int isblank (int) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Test C for a set of character classes according to MASK. */ extern int isctype (int __c, int __mask) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return nonzero iff C is in the ASCII set (i.e., is no more than 7 bits wide). */ extern int isascii (int __c) throw (); #pragma empty_line /* Return the part of C that is in the ASCII set (i.e., the low-order 7 bits of C). */ extern int toascii (int __c) throw (); #pragma empty_line /* These are the same as `toupper' and `tolower' except that they do not check the argument for being in the range of a `char'. */ extern int _toupper (int) throw (); extern int _tolower (int) throw (); #pragma empty_line #pragma empty_line /* This code is needed for the optimized mapping functions. */ #pragma line 244 "/usr/include/ctype.h" 3 4 /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is the implementation of the internationalization handling in the upcoming ISO C++ standard library. To support this another set of the functions using locale data exist which have an additional argument. #pragma empty_line Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ #pragma empty_line /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. */ #pragma empty_line #pragma empty_line /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The following names are all functions: int isCHARACTERISTIC(int c, locale_t *locale); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ extern int isalnum_l (int, __locale_t) throw (); extern int isalpha_l (int, __locale_t) throw (); extern int iscntrl_l (int, __locale_t) throw (); extern int isdigit_l (int, __locale_t) throw (); extern int islower_l (int, __locale_t) throw (); extern int isgraph_l (int, __locale_t) throw (); extern int isprint_l (int, __locale_t) throw (); extern int ispunct_l (int, __locale_t) throw (); extern int isspace_l (int, __locale_t) throw (); extern int isupper_l (int, __locale_t) throw (); extern int isxdigit_l (int, __locale_t) throw (); #pragma empty_line extern int isblank_l (int, __locale_t) throw (); #pragma empty_line #pragma empty_line /* Return the lowercase version of C in locale L. */ extern int __tolower_l (int __c, __locale_t __l) throw (); extern int tolower_l (int __c, __locale_t __l) throw (); #pragma empty_line /* Return the uppercase version of C. */ extern int __toupper_l (int __c, __locale_t __l) throw (); extern int toupper_l (int __c, __locale_t __l) throw (); #pragma line 347 "/usr/include/ctype.h" 3 4 } #pragma line 44 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cctype" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Get rid of those macros defined in <ctype.h> in lieu of real functions. #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cctype" 3 namespace std { using ::isalnum; using ::isalpha; using ::iscntrl; using ::isdigit; using ::isgraph; using ::islower; using ::isprint; using ::ispunct; using ::isspace; using ::isupper; using ::isxdigit; using ::tolower; using ::toupper; } // namespace std #pragma line 44 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/localefwd.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @defgroup locales Locales * * Classes and functions for internationalization and localization. */ #pragma empty_line // 22.1.1 Locale class locale; #pragma empty_line template<typename _Facet> bool has_facet(const locale&) throw(); #pragma empty_line template<typename _Facet> const _Facet& use_facet(const locale&); #pragma empty_line // 22.1.3 Convenience interfaces template<typename _CharT> bool isspace(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isprint(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool iscntrl(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isupper(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool islower(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isalpha(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isdigit(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool ispunct(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isxdigit(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isalnum(_CharT, const locale&); #pragma empty_line template<typename _CharT> bool isgraph(_CharT, const locale&); #pragma empty_line template<typename _CharT> _CharT toupper(_CharT, const locale&); #pragma empty_line template<typename _CharT> _CharT tolower(_CharT, const locale&); #pragma empty_line // 22.2.1 and 22.2.1.3 ctype class ctype_base; template<typename _CharT> class ctype; template<> class ctype<char>; #pragma empty_line template<> class ctype<wchar_t>; #pragma empty_line template<typename _CharT> class ctype_byname; // NB: Specialized for char and wchar_t in locale_facets.h. #pragma empty_line class codecvt_base; template<typename _InternT, typename _ExternT, typename _StateT> class codecvt; template<> class codecvt<char, char, mbstate_t>; #pragma empty_line template<> class codecvt<wchar_t, char, mbstate_t>; #pragma empty_line template<typename _InternT, typename _ExternT, typename _StateT> class codecvt_byname; #pragma empty_line // 22.2.2 and 22.2.3 numeric #pragma empty_line template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class num_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class num_put; #pragma empty_line template<typename _CharT> class numpunct; template<typename _CharT> class numpunct_byname; #pragma empty_line // 22.2.4 collation template<typename _CharT> class collate; template<typename _CharT> class collate_byname; #pragma empty_line // 22.2.5 date and time class time_base; template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class time_get; template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class time_get_byname; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class time_put_byname; #pragma empty_line // 22.2.6 money class money_base; #pragma empty_line template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> > class money_get; template<typename _CharT, typename _OutIter = ostreambuf_iterator<_CharT> > class money_put; #pragma empty_line template<typename _CharT, bool _Intl = false> class moneypunct; template<typename _CharT, bool _Intl = false> class moneypunct_byname; #pragma empty_line // 22.2.7 message retrieval class messages_base; template<typename _CharT> class messages; template<typename _CharT> class messages_byname; #pragma empty_line #pragma empty_line } // namespace #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ios_base.h" 1 3 // Iostreams base classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/ios_base.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ios} */ #pragma empty_line // // ISO C++ 14882: 27.4 Iostreams base classes // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ios_base.h" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h" 1 3 // Support for atomic operations -*- C++ -*- #pragma empty_line // Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file ext/atomicity.h * This file is a GNU extension to the Standard C++ Library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr.h" 1 3 /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ /* Copyright (C) 1997, 1998, 2004, 2008, 2009 Free Software Foundation, Inc. #pragma empty_line This file is part of GCC. #pragma empty_line GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. #pragma empty_line GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. #pragma empty_line Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. #pragma empty_line You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma GCC visibility push(default) #pragma empty_line #pragma empty_line /* If this file is compiled with threads support, it must #define __GTHREADS 1 to indicate that threads support is present. Also it has define function int __gthread_active_p () that returns 1 if thread system is active, 0 if not. #pragma empty_line The threads interface must define the following types: __gthread_key_t __gthread_once_t __gthread_mutex_t __gthread_recursive_mutex_t #pragma empty_line The threads interface must define the following macros: #pragma empty_line __GTHREAD_ONCE_INIT to initialize __gthread_once_t __GTHREAD_MUTEX_INIT to initialize __gthread_mutex_t to get a fast non-recursive mutex. __GTHREAD_MUTEX_INIT_FUNCTION some systems can't initialize a mutex without a function call. On such systems, define this to a function which looks like this: void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *) Don't define __GTHREAD_MUTEX_INIT in this case __GTHREAD_RECURSIVE_MUTEX_INIT __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION as above, but for a recursive mutex. #pragma empty_line The threads interface must define the following static functions: #pragma empty_line int __gthread_once (__gthread_once_t *once, void (*func) ()) #pragma empty_line int __gthread_key_create (__gthread_key_t *keyp, void (*dtor) (void *)) int __gthread_key_delete (__gthread_key_t key) #pragma empty_line void *__gthread_getspecific (__gthread_key_t key) int __gthread_setspecific (__gthread_key_t key, const void *ptr) #pragma empty_line int __gthread_mutex_destroy (__gthread_mutex_t *mutex); #pragma empty_line int __gthread_mutex_lock (__gthread_mutex_t *mutex); int __gthread_mutex_trylock (__gthread_mutex_t *mutex); int __gthread_mutex_unlock (__gthread_mutex_t *mutex); #pragma empty_line int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex); int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex); int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex); #pragma empty_line The following are supported in POSIX threads only. They are required to fix a deadlock in static initialization inside libsupc++. The header file gthr-posix.h defines a symbol __GTHREAD_HAS_COND to signify that these extra features are supported. #pragma empty_line Types: __gthread_cond_t #pragma empty_line Macros: __GTHREAD_COND_INIT __GTHREAD_COND_INIT_FUNCTION #pragma empty_line Interface: int __gthread_cond_broadcast (__gthread_cond_t *cond); int __gthread_cond_wait (__gthread_cond_t *cond, __gthread_mutex_t *mutex); int __gthread_cond_wait_recursive (__gthread_cond_t *cond, __gthread_recursive_mutex_t *mutex); #pragma empty_line All functions returning int should return zero on success or the error number. If the operation is not supported, -1 is returned. #pragma empty_line If the following are also defined, you should #define __GTHREADS_CXX0X 1 to enable the c++0x thread library. #pragma empty_line Types: __gthread_t __gthread_time_t #pragma empty_line Interface: int __gthread_create (__gthread_t *thread, void *(*func) (void*), void *args); int __gthread_join (__gthread_t thread, void **value_ptr); int __gthread_detach (__gthread_t thread); int __gthread_equal (__gthread_t t1, __gthread_t t2); __gthread_t __gthread_self (void); int __gthread_yield (void); #pragma empty_line int __gthread_mutex_timedlock (__gthread_mutex_t *m, const __gthread_time_t *abs_timeout); int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m, const __gthread_time_t *abs_time); #pragma empty_line int __gthread_cond_signal (__gthread_cond_t *cond); int __gthread_cond_timedwait (__gthread_cond_t *cond, __gthread_mutex_t *mutex, const __gthread_time_t *abs_timeout); int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond, __gthread_recursive_mutex_t *mutex, const __gthread_time_t *abs_time) #pragma empty_line Currently supported threads packages are TPF threads with -D__tpf__ POSIX/Unix98 threads with -D_PTHREADS POSIX/Unix95 threads with -D_PTHREADS95 DCE threads with -D_DCE_THREADS Solaris/UI threads with -D_SOLARIS_THREADS #pragma empty_line */ #pragma empty_line /* Check first for thread specific defines. */ #pragma line 158 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr.h" 3 /* The pe-coff weak support isn't fully compatible to ELF's weak. For static libraries it might would work, but as we need to deal with shared versions too, we disable it for mingw-targets. */ #pragma line 170 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr.h" 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 1 3 /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ /* Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. #pragma empty_line This file is part of GCC. #pragma empty_line GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. #pragma empty_line GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. #pragma empty_line Under Section 7 of GPL version 3, you are granted additional permissions described in the GCC Runtime Library Exception, version 3.1, as published by the Free Software Foundation. #pragma empty_line You should have received a copy of the GNU General Public License and a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* POSIX threads specific definitions. Easy, since the interface is just one-to-one mapping. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Some implementations of <pthread.h> require this to be defined. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/pthread.h" 1 3 4 /* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/sched.h" 1 3 4 /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get type definitions. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 29 "/usr/include/sched.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/time.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.23 Date and time <time.h> */ #pragma line 74 "/usr/include/time.h" 3 4 /* Returned by `time'. */ typedef __time_t time_t; #pragma line 118 "/usr/include/time.h" 3 4 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #pragma line 35 "/usr/include/sched.h" 2 3 4 #pragma empty_line #pragma empty_line typedef __pid_t pid_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get system specific constant and data structure definitions. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/sched.h" 1 3 4 /* Definitions of constants and data structure for POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 27 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* Scheduling algorithms. */ #pragma line 39 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* Cloning flags. */ #pragma line 71 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 /* The official definition. */ struct sched_param { int __sched_priority; }; #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line /* Clone current process. */ extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) throw (); #pragma empty_line /* Unshare the specified resources. */ extern int unshare (int __flags) throw (); #pragma empty_line /* Get index of currently used CPU. */ extern int sched_getcpu (void) throw (); #pragma empty_line /* Switch process to namespace of type NSTYPE indicated by FD. */ extern int setns (int __fd, int __nstype) throw (); #pragma empty_line #pragma empty_line #pragma empty_line } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Data structure to describe a process' schedulability. */ struct __sched_param { int __sched_priority; }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Size definition for CPU sets. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Type for array elements in 'cpu_set_t'. */ typedef unsigned long int __cpu_mask; #pragma empty_line /* Basic access functions. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Data structure to describe CPU mask. */ typedef struct { __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; } cpu_set_t; #pragma empty_line /* Access functions for CPU masks. */ #pragma line 201 "/usr/include/x86_64-linux-gnu/bits/sched.h" 3 4 extern "C" { #pragma empty_line extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) throw (); extern cpu_set_t *__sched_cpualloc (size_t __count) throw () /* Ignore */; extern void __sched_cpufree (cpu_set_t *__set) throw (); #pragma empty_line } #pragma line 44 "/usr/include/sched.h" 2 3 4 /* Define the real names for the elements of `struct sched_param'. */ #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line /* Set scheduling parameters for a process. */ extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) throw (); #pragma empty_line /* Retrieve scheduling parameters for a particular process. */ extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); #pragma empty_line /* Set scheduling algorithm and/or parameters for a process. */ extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) throw (); #pragma empty_line /* Retrieve scheduling algorithm for a particular purpose. */ extern int sched_getscheduler (__pid_t __pid) throw (); #pragma empty_line /* Yield the processor. */ extern int sched_yield (void) throw (); #pragma empty_line /* Get maximum priority value for a scheduler. */ extern int sched_get_priority_max (int __algorithm) throw (); #pragma empty_line /* Get minimum priority value for a scheduler. */ extern int sched_get_priority_min (int __algorithm) throw (); #pragma empty_line /* Get the SCHED_RR interval for the named process. */ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Access macros for `cpu_set'. */ #pragma line 117 "/usr/include/sched.h" 3 4 /* Set the CPU affinity for a task */ extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) throw (); #pragma empty_line /* Get the CPU affinity for a task */ extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) throw (); #pragma empty_line #pragma empty_line } #pragma line 24 "/usr/include/pthread.h" 2 3 4 #pragma line 1 "/usr/include/time.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.23 Date and time <time.h> */ #pragma line 29 "/usr/include/time.h" 3 4 extern "C" { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get size_t and NULL from <stddef.h>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 38 "/usr/include/time.h" 2 3 4 #pragma empty_line /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 /* System-dependent timing definitions. Linux version. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * Never include this file directly; use <time.h> instead. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* ISO/IEC 9899:1999 7.23.1: Components of time The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: <time.h> The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ #pragma line 60 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 /* Identifier for system-wide realtime clock. */ #pragma empty_line /* Monotonic system-wide clock. */ #pragma empty_line /* High-resolution timer from the CPU. */ #pragma empty_line /* Thread-specific CPU-time clock. */ #pragma empty_line /* Monotonic system-wide clock, not adjusted for frequency scaling. */ #pragma empty_line /* Identifier for system-wide realtime clock, updated only on ticks. */ #pragma empty_line /* Monotonic system-wide clock, updated only on ticks. */ #pragma empty_line /* Monotonic system-wide clock that includes time spent in suspension. */ #pragma empty_line /* Like CLOCK_REALTIME but also wakes suspended system. */ #pragma empty_line /* Like CLOCK_BOOTTIME but also wakes suspended system. */ #pragma empty_line /* Like CLOCK_REALTIME but in International Atomic Time. */ #pragma empty_line #pragma empty_line /* Flag to indicate time is absolute. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/timex.h" 1 3 4 /* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* These definitions from linux/timex.h as of 3.18. */ #pragma empty_line struct timex { unsigned int modes; /* mode selector */ __syscall_slong_t offset; /* time offset (usec) */ __syscall_slong_t freq; /* frequency offset (scaled ppm) */ __syscall_slong_t maxerror; /* maximum error (usec) */ __syscall_slong_t esterror; /* estimated error (usec) */ int status; /* clock command/status */ __syscall_slong_t constant; /* pll time constant */ __syscall_slong_t precision; /* clock precision (usec) (ro) */ __syscall_slong_t tolerance; /* clock frequency tolerance (ppm) (ro) */ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */ __syscall_slong_t tick; /* (modified) usecs between clock ticks */ __syscall_slong_t ppsfreq; /* pps frequency (scaled ppm) (ro) */ __syscall_slong_t jitter; /* pps jitter (us) (ro) */ int shift; /* interval duration (s) (shift) (ro) */ __syscall_slong_t stabil; /* pps stability (scaled ppm) (ro) */ __syscall_slong_t jitcnt; /* jitter limit exceeded (ro) */ __syscall_slong_t calcnt; /* calibration intervals (ro) */ __syscall_slong_t errcnt; /* calibration errors (ro) */ __syscall_slong_t stbcnt; /* stability limit exceeded (ro) */ #pragma empty_line int tai; /* TAI offset (ro) */ #pragma empty_line /* ??? */ int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; }; #pragma empty_line /* Mode codes (timex.mode) */ #pragma line 70 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 /* xntp 3.4 compatibility names */ #pragma line 84 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 /* Status codes (timex.status) */ #pragma line 105 "/usr/include/x86_64-linux-gnu/bits/timex.h" 3 4 /* Read-only bits */ #pragma line 89 "/usr/include/x86_64-linux-gnu/bits/time.h" 2 3 4 #pragma empty_line extern "C" { #pragma empty_line /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); #pragma empty_line } #pragma line 42 "/usr/include/time.h" 2 3 4 #pragma empty_line /* This is the obsolete POSIX.1-1988 name for the same constant. */ #pragma line 58 "/usr/include/time.h" 3 4 /* Returned by `clock'. */ typedef __clock_t clock_t; #pragma line 90 "/usr/include/time.h" 3 4 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #pragma line 102 "/usr/include/time.h" 3 4 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #pragma line 132 "/usr/include/time.h" 3 4 /* Used by other time functions. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ #pragma empty_line #pragma empty_line long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; #pragma empty_line /* We can use a simple forward declaration. */ struct sigevent; #pragma line 181 "/usr/include/time.h" 3 4 /* Time base values for timespec_get. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ extern clock_t clock (void) throw (); #pragma empty_line /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) throw (); #pragma empty_line /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) throw () __attribute__ ((__const__)); #pragma empty_line /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) throw (); #pragma empty_line #pragma empty_line /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #pragma empty_line #pragma empty_line extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) throw (); #pragma empty_line /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); #pragma empty_line /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) throw (); #pragma empty_line /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Reentrant versions of the above functions. */ #pragma empty_line /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) throw (); #pragma empty_line /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Same as above. */ extern char *tzname[2]; #pragma empty_line /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line extern int daylight; extern long int timezone; #pragma empty_line #pragma empty_line #pragma empty_line /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ #pragma empty_line /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) throw (); #pragma empty_line /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) throw (); #pragma empty_line /* Return the number of days in YEAR. */ extern int dysize (int __year) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Pause execution for a number of nanoseconds. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); #pragma empty_line #pragma empty_line /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); #pragma empty_line /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); #pragma empty_line /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) throw (); #pragma empty_line #pragma empty_line /* High-resolution sleep with the specified clock. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); #pragma empty_line /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) throw (); #pragma empty_line /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) throw (); #pragma empty_line /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) throw (); #pragma empty_line /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) throw (); #pragma empty_line /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; #pragma empty_line /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); #pragma empty_line #pragma empty_line #pragma empty_line /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. #pragma empty_line This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); #pragma empty_line #pragma empty_line } #pragma line 25 "/usr/include/pthread.h" 2 3 4 #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 /* Copyright (C) 2002-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 #pragma line 58 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 /* Thread identifiers. The structure of the attribute type is not exposed on purpose. */ typedef unsigned long int pthread_t; #pragma empty_line #pragma empty_line union pthread_attr_t { char __size[56]; long int __align; }; #pragma empty_line typedef union pthread_attr_t pthread_attr_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; #pragma line 88 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 /* Data structures for mutex handling. The structure of the attribute type is not exposed on purpose. */ typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; #pragma empty_line unsigned int __nusers; #pragma empty_line /* KIND must stay at this position in the structure to maintain binary compatibility. */ int __kind; #pragma empty_line short __spins; short __elision; __pthread_list_t __list; #pragma empty_line /* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ #pragma line 125 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 } __data; char __size[40]; long int __align; } pthread_mutex_t; #pragma empty_line typedef union { char __size[4]; int __align; } pthread_mutexattr_t; #pragma empty_line #pragma empty_line /* Data structure for conditional variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; #pragma empty_line typedef union { char __size[4]; int __align; } pthread_condattr_t; #pragma empty_line #pragma empty_line /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; #pragma empty_line #pragma empty_line /* Once-only execution */ typedef int pthread_once_t; #pragma empty_line #pragma empty_line #pragma empty_line /* Data structure for read-write lock variable handling. The structure of the attribute type is not exposed on purpose. */ typedef union { #pragma empty_line struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; int __shared; signed char __rwelision; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line unsigned char __pad1[7]; #pragma empty_line #pragma empty_line unsigned long int __pad2; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; #pragma empty_line } __data; #pragma line 220 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 char __size[56]; long int __align; } pthread_rwlock_t; #pragma empty_line typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* POSIX spinlock data type. */ typedef volatile int pthread_spinlock_t; #pragma empty_line #pragma empty_line /* POSIX barriers data type. The structure of the type is deliberately not exposed. */ typedef union { char __size[32]; long int __align; } pthread_barrier_t; #pragma empty_line typedef union { char __size[4]; int __align; } pthread_barrierattr_t; #pragma line 27 "/usr/include/pthread.h" 2 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 1 3 4 /* Copyright (C) 2001-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* Define the machine-dependent type `jmp_buf'. x86-64 version. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 27 "/usr/include/x86_64-linux-gnu/bits/setjmp.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef long int __jmp_buf[8]; #pragma line 28 "/usr/include/pthread.h" 2 3 4 #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 29 "/usr/include/pthread.h" 2 3 4 #pragma empty_line #pragma empty_line /* Detach state. */ enum { PTHREAD_CREATE_JOINABLE, #pragma empty_line PTHREAD_CREATE_DETACHED #pragma empty_line }; #pragma empty_line #pragma empty_line /* Mutex types. */ enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP #pragma empty_line , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL #pragma empty_line #pragma empty_line /* For compatibility. */ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP #pragma empty_line }; #pragma empty_line #pragma empty_line #pragma empty_line /* Robust mutex or not flags. */ enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Mutex protocols. */ enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; #pragma line 112 "/usr/include/pthread.h" 3 4 /* Read-write lock types. */ #pragma empty_line enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; #pragma empty_line /* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t has the shared field. All 64-bit architectures have the shared field in pthread_rwlock_t. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Read-write lock initializers. */ #pragma line 154 "/usr/include/pthread.h" 3 4 /* Scheduler inheritance. */ enum { PTHREAD_INHERIT_SCHED, #pragma empty_line PTHREAD_EXPLICIT_SCHED #pragma empty_line }; #pragma empty_line #pragma empty_line /* Scope handling. */ enum { PTHREAD_SCOPE_SYSTEM, #pragma empty_line PTHREAD_SCOPE_PROCESS #pragma empty_line }; #pragma empty_line #pragma empty_line /* Process shared or private flag. */ enum { PTHREAD_PROCESS_PRIVATE, #pragma empty_line PTHREAD_PROCESS_SHARED #pragma empty_line }; #pragma empty_line #pragma empty_line #pragma empty_line /* Conditional variable handling. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Cleanup buffers */ struct _pthread_cleanup_buffer { void (*__routine) (void *); /* Function to call. */ void *__arg; /* Its argument. */ int __canceltype; /* Saved cancellation type. */ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ }; #pragma empty_line /* Cancellation */ enum { PTHREAD_CANCEL_ENABLE, #pragma empty_line PTHREAD_CANCEL_DISABLE #pragma empty_line }; enum { PTHREAD_CANCEL_DEFERRED, #pragma empty_line PTHREAD_CANCEL_ASYNCHRONOUS #pragma empty_line }; #pragma empty_line #pragma empty_line #pragma empty_line /* Single execution handling. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Value returned by 'pthread_barrier_wait' for one of the threads after the required number of threads have called this function. -1 is distinct from 0 and all errno constants */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */ extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); #pragma empty_line /* Terminate calling thread. #pragma empty_line The registered cleanup handlers are called via exception handling so we cannot mark this function with __THROW.*/ extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); #pragma empty_line /* Make calling thread wait for termination of the thread TH. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_join (pthread_t __th, void **__thread_return); #pragma empty_line #pragma empty_line /* Check whether thread TH has terminated. If yes return the status of the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); #pragma empty_line /* Make calling thread wait for termination of the thread TH, but only until TIMEOUT. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); #pragma empty_line #pragma empty_line /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. The resources of TH will therefore be freed immediately when it terminates, instead of waiting for another thread to perform PTHREAD_JOIN on it. */ extern int pthread_detach (pthread_t __th) throw (); #pragma empty_line #pragma empty_line /* Obtain the identifier of the current thread. */ extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); #pragma empty_line /* Compare two thread identifiers. */ extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Thread attribute handling. */ #pragma empty_line /* Initialize thread attribute *ATTR with default attributes (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, no user-provided stack). */ extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy thread attribute *ATTR. */ extern int pthread_attr_destroy (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Get detach state attribute. */ extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set detach state attribute. */ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Get the size of the guard area created for stack overflow protection. */ extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the size of the guard area created for stack overflow protection. */ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return in *PARAM the scheduling parameters of *ATTR. */ extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, const struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Return in *POLICY the scheduling policy of *ATTR. */ extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set scheduling policy in *ATTR according to POLICY. */ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set scheduling inheritance mode in *ATTR according to INHERIT. */ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return in *SCOPE the scheduling contention scope of *ATTR. */ extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set scheduling contention scope in *ATTR according to SCOPE. */ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Return the previously set address for the stack. */ extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); #pragma empty_line /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The minimal size of the block must be PTHREAD_STACK_MIN. */ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); #pragma empty_line /* Return the currently used minimal stack size. */ extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Add information about the minimum stack size needed for the thread to be started. This size must never be less than PTHREAD_STACK_MIN and must also not exceed the system limits. */ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return the previously set address for the stack. */ extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) throw () __attribute__ ((__nonnull__ (1, 2, 3))); #pragma empty_line /* The following two interfaces are intended to replace the last two. They require setting the address as well as the size since only setting the address will make the implementation on some architectures impossible. */ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Thread created with attribute ATTR will be limited to run only on the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); #pragma empty_line /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (1, 3))); #pragma empty_line /* Get the default attributes used by pthread_create in this process. */ extern int pthread_getattr_default_np (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Set the default attributes to be used by pthread_create in this process. */ extern int pthread_setattr_default_np (const pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Functions for scheduling control. */ #pragma empty_line /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, const struct sched_param *__param) throw () __attribute__ ((__nonnull__ (3))); #pragma empty_line /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) throw () __attribute__ ((__nonnull__ (2, 3))); #pragma empty_line /* Set the scheduling priority for TARGET_THREAD. */ extern int pthread_setschedprio (pthread_t __target_thread, int __prio) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Get thread name visible in the kernel and its interfaces. */ extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line /* Set thread name visible in the kernel and its interfaces. */ extern int pthread_setname_np (pthread_t __target_thread, const char *__name) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Determine level of concurrency. */ extern int pthread_getconcurrency (void) throw (); #pragma empty_line /* Set new concurrency level to LEVEL. */ extern int pthread_setconcurrency (int __level) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Yield the processor to another thread or process. This function is similar to the POSIX `sched_yield' function but might be differently implemented in the case of a m-on-n thread implementation. */ extern int pthread_yield (void) throw (); #pragma empty_line #pragma empty_line /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, const cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); #pragma empty_line /* Get bit set in CPUSET representing the processors TH can run on. */ extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) throw () __attribute__ ((__nonnull__ (3))); #pragma empty_line #pragma empty_line #pragma empty_line /* Functions for handling initialization. */ #pragma empty_line /* Guarantee that the initialization function INIT_ROUTINE will be called only once, even if pthread_once is executed several times with the same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or extern variable initialized to PTHREAD_ONCE_INIT. #pragma empty_line The initialization functions might throw exception which is why this function is not marked with __THROW. */ extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Functions for handling cancellation. #pragma empty_line Note that these functions are explicitly not marked to not throw an exception in C++ code. If cancellation is implemented by unwinding this is necessary to have the compiler generate the unwind information. */ #pragma empty_line /* Set cancelability state of current thread to STATE, returning old state in *OLDSTATE if OLDSTATE is not NULL. */ extern int pthread_setcancelstate (int __state, int *__oldstate); #pragma empty_line /* Set cancellation state of current thread to TYPE, returning the old type in *OLDTYPE if OLDTYPE is not NULL. */ extern int pthread_setcanceltype (int __type, int *__oldtype); #pragma empty_line /* Cancel THREAD immediately or at the next possibility. */ extern int pthread_cancel (pthread_t __th); #pragma empty_line /* Test for pending cancellation for the current thread and terminate the thread as per pthread_exit(PTHREAD_CANCELED) if it has been cancelled. */ extern void pthread_testcancel (void); #pragma empty_line #pragma empty_line /* Cancellation handling with integration into exception handling. */ #pragma empty_line typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); #pragma empty_line /* No special attributes by default. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Structure to hold the cleanup handler information. */ struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; #pragma line 657 "/usr/include/pthread.h" 3 4 /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. #pragma empty_line pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ #pragma line 680 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) ; #pragma empty_line /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) ; #pragma empty_line #pragma empty_line /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ #pragma line 715 "/usr/include/pthread.h" 3 4 extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) ; #pragma empty_line /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) ; #pragma empty_line #pragma empty_line /* Internal interface to initiate cleanup. */ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __attribute__ ((__noreturn__)) #pragma empty_line __attribute__ ((__weak__)) #pragma empty_line ; #pragma empty_line #pragma empty_line /* Function used in the macros. */ struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); #pragma empty_line #pragma empty_line /* Mutex handling. */ #pragma empty_line /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy a mutex. */ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Try locking a mutex. */ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Lock a mutex. */ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Get the priority ceiling of MUTEX. */ extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the priority ceiling of MUTEX to PRIOCEILING, return old priority ceiling value in *OLD_CEILING. */ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) throw () __attribute__ ((__nonnull__ (1, 3))); #pragma empty_line #pragma empty_line #pragma empty_line /* Declare the state protected by MUTEX as consistent. */ extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Functions for handling mutex attributes. */ #pragma empty_line /* Initialize mutex attribute object ATTR with default attributes (kind is PTHREAD_MUTEX_TIMED_NP). */ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy mutex attribute object ATTR. */ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Get the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return in *KIND the mutex kind attribute in *ATTR. */ extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or PTHREAD_MUTEX_DEFAULT). */ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the mutex protocol attribute in *ATTR to PROTOCOL (either PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Get the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Set the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Functions for handling read-write locks. */ #pragma empty_line /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy read-write lock RWLOCK. */ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Acquire read lock for RWLOCK. */ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Functions for handling read-write lock attributes. */ #pragma empty_line /* Initialize attribute object ATTR with default values. */ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy attribute object ATTR. */ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Return current setting of process-shared attribute of ATTR in PSHARED. */ extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set process-shared attribute of ATTR to PSHARED. */ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Return current setting of reader/writer preference. */ extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set reader/write preference. */ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Functions for handling conditional variables. */ #pragma empty_line /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy condition variable COND. */ extern int pthread_cond_destroy (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an absolute time specification; zero is the beginning of the epoch (00:00:00 GMT, January 1, 1970). #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); #pragma empty_line /* Functions for handling condition variable attributes. */ #pragma empty_line /* Initialize condition variable attribute ATTR. */ extern int pthread_condattr_init (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy condition variable attribute ATTR. */ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Get the clock selected for the condition variable attribute ATTR. */ extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the clock selected for the condition variable attribute ATTR. */ extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Functions to handle spinlocks. */ #pragma empty_line /* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can be shared between different processes. */ extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy the spinlock LOCK. */ extern int pthread_spin_destroy (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Wait until spinlock LOCK is retrieved. */ extern int pthread_spin_lock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Try to lock spinlock LOCK. */ extern int pthread_spin_trylock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Release spinlock LOCK. */ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Functions to handle barriers. */ #pragma empty_line /* Initialize BARRIER with the attributes in ATTR. The barrier is opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, const pthread_barrierattr_t *__restrict __attr, unsigned int __count) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy a previously dynamically initialized barrier BARRIER. */ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Wait on barrier BARRIER. */ extern int pthread_barrier_wait (pthread_barrier_t *__barrier) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Initialize barrier attribute ATTR. */ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy previously dynamically initialized barrier attribute ATTR. */ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Get the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Functions for handling thread-specific data. */ #pragma empty_line /* Create a key value identifying a location in the thread-specific data area. Each thread maintains a distinct thread-specific data area. DESTR_FUNCTION, if non-NULL, is called with the value associated to that key when the key is destroyed. DESTR_FUNCTION is not called if the value associated is NULL when the key is destroyed. */ extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Destroy KEY. */ extern int pthread_key_delete (pthread_key_t __key) throw (); #pragma empty_line /* Return current value of the thread-specific data slot identified by KEY. */ extern void *pthread_getspecific (pthread_key_t __key) throw (); #pragma empty_line /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) throw () ; #pragma empty_line #pragma empty_line #pragma empty_line /* Get ID of CPU-time clock for thread THREAD_ID. */ extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Install handlers to be called when a new process is created with FORK. The PREPARE handler is called in the parent process just before performing FORK. The PARENT handler is called in the parent process just after FORK. The CHILD handler is called in the child process. Each of the three handlers can be NULL, meaning that no handler needs to be called at that point. PTHREAD_ATFORK can be called several times, in which case the PREPARE handlers are called in LIFO order (last added with PTHREAD_ATFORK, first called before FORK), and the PARENT and CHILD handlers are called in FIFO (first added, first called). */ #pragma empty_line extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) throw (); #pragma line 1159 "/usr/include/pthread.h" 3 4 } #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 2 3 #pragma line 1 "/usr/include/unistd.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * POSIX Standard: 2.10 Symbolic Constants <unistd.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line /* These may be used to determine what facilities are present at compile time. Their values can be obtained at run time from `sysconf'. */ #pragma empty_line #pragma empty_line /* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */ #pragma line 49 "/usr/include/unistd.h" 3 4 /* These are not #ifdef __USE_POSIX2 because they are in the theoretically application-owned namespace. */ #pragma empty_line #pragma empty_line #pragma empty_line /* The utilities on GNU systems also correspond to this version. */ #pragma line 66 "/usr/include/unistd.h" 3 4 /* The utilities on GNU systems also correspond to this version. */ #pragma empty_line #pragma empty_line /* This symbol was required until the 2001 edition of POSIX. */ #pragma empty_line #pragma empty_line /* If defined, the implementation supports the C Language Bindings Option. */ #pragma empty_line #pragma empty_line /* If defined, the implementation supports the C Language Development Utilities Option. */ #pragma empty_line #pragma empty_line /* If defined, the implementation supports the Software Development Utilities Option. */ #pragma empty_line #pragma empty_line /* If defined, the implementation supports the creation of locales with the localedef utility. */ #pragma empty_line #pragma empty_line /* X/Open version number to which the library conforms. It is selectable. */ #pragma line 99 "/usr/include/unistd.h" 3 4 /* Commands and utilities from XPG4 are available. */ #pragma empty_line #pragma empty_line /* We are compatible with the old published standards as well. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The X/Open Unix extensions are available. */ #pragma empty_line #pragma empty_line /* Encryption is present. */ #pragma empty_line #pragma empty_line /* The enhanced internationalization capabilities according to XPG4.2 are present. */ #pragma empty_line #pragma empty_line /* The legacy interfaces are also available. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Get values of POSIX options: #pragma empty_line If these symbols are defined, the corresponding features are always available. If not, they may be available sometimes. The current values can be obtained with `sysconf'. #pragma empty_line _POSIX_JOB_CONTROL Job control is supported. _POSIX_SAVED_IDS Processes have a saved set-user-ID and a saved set-group-ID. _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. _POSIX_TIMERS POSIX.4 clocks and timers are supported. _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. _POSIX_FSYNC The fsync function is present. _POSIX_MAPPED_FILES Mapping of files to memory is supported. _POSIX_MEMLOCK Locking of all memory is supported. _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. _POSIX_THREADS POSIX.1c pthreads are supported. _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. _POSIX_THREAD_PRIORITY_SCHEDULING POSIX.1c thread execution scheduling supported. _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. _POSIX_PII Protocol-independent interfaces are supported. _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. _POSIX_PII_INTERNET Internet family of protocols supported. _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. _POSIX_PII_OSI ISO/OSI family of protocols supported. _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. _POSIX_POLL Implementation supports `poll' function. _POSIX_SELECT Implementation supports `select' and `pselect'. #pragma empty_line _XOPEN_REALTIME X/Open realtime support is available. _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. _XOPEN_SHM Shared memory interface according to XPG4.2. #pragma empty_line _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit int, long, pointer, and off_t types. _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit int, long, and pointer and off_t with at least 64 bits. _XBS5_LP64_OFF64 Implementation provides environment with 32-bit int, and 64-bit long, pointer, and off_t types. _XBS5_LPBIG_OFFBIG Implementation provides environment with at least 32 bits int and long, pointer, and off_t with at least 64 bits. #pragma empty_line If any of these symbols is defined as -1, the corresponding option is not true for any file. If any is defined as other than -1, the corresponding option is true for all files. If a symbol is not defined at all, the value for a specific file can be obtained from `pathconf' and `fpathconf'. #pragma empty_line _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change the owner of a file. `chown' can only be used to change the group ID of a file to a group of which the calling process is a member. _POSIX_NO_TRUNC Pathname components longer than NAME_MAX generate an error. _POSIX_VDISABLE If defined, if the value of an element of the `c_cc' member of `struct termios' is _POSIX_VDISABLE, no character will have the effect associated with that element. _POSIX_SYNC_IO Synchronous I/O may be performed. _POSIX_ASYNC_IO Asynchronous I/O may be performed. _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. #pragma empty_line Support for the Large File Support interface is not generally available. If it is available the following constants are defined to one. _LFS64_LARGEFILE Low-level I/O supports large files. _LFS64_STDIO Standard I/O supports large files. */ #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/posix_opt.h" 1 3 4 /* Define POSIX options for Linux. Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Job control is supported. */ #pragma empty_line #pragma empty_line /* Processes have a saved set-user-ID and a saved set-group-ID. */ #pragma empty_line #pragma empty_line /* Priority scheduling is supported. */ #pragma empty_line #pragma empty_line /* Synchronizing file data is supported. */ #pragma empty_line #pragma empty_line /* The fsync function is present. */ #pragma empty_line #pragma empty_line /* Mapping of files to memory is supported. */ #pragma empty_line #pragma empty_line /* Locking of all memory is supported. */ #pragma empty_line #pragma empty_line /* Locking of ranges of memory is supported. */ #pragma empty_line #pragma empty_line /* Setting of memory protections is supported. */ #pragma empty_line #pragma empty_line /* Some filesystems allow all users to change file ownership. */ #pragma empty_line #pragma empty_line /* `c_cc' member of 'struct termios' structure can be disabled by using the value _POSIX_VDISABLE. */ #pragma empty_line #pragma empty_line /* Filenames are not silently truncated. */ #pragma empty_line #pragma empty_line /* X/Open realtime support is available. */ #pragma empty_line #pragma empty_line /* X/Open thread realtime support is available. */ #pragma empty_line #pragma empty_line /* XPG4.2 shared memory is supported. */ #pragma empty_line #pragma empty_line /* Tell we have POSIX threads. */ #pragma empty_line #pragma empty_line /* We have the reentrant functions described in POSIX. */ #pragma empty_line #pragma empty_line #pragma empty_line /* We provide priority scheduling for threads. */ #pragma empty_line #pragma empty_line /* We support user-defined stack sizes. */ #pragma empty_line #pragma empty_line /* We support user-defined stacks. */ #pragma empty_line #pragma empty_line /* We support priority inheritence. */ #pragma empty_line #pragma empty_line /* We support priority protection, though only for non-robust mutexes. */ #pragma empty_line #pragma empty_line #pragma empty_line /* We support priority inheritence for robust mutexes. */ #pragma empty_line #pragma empty_line /* We do not support priority protection for robust mutexes. */ #pragma empty_line #pragma empty_line #pragma empty_line /* We support POSIX.1b semaphores. */ #pragma empty_line #pragma empty_line /* Real-time signals are supported. */ #pragma empty_line #pragma empty_line /* We support asynchronous I/O. */ #pragma empty_line #pragma empty_line /* Alternative name for Unix98. */ #pragma empty_line /* Support for prioritization is also available. */ #pragma empty_line #pragma empty_line /* The LFS support in asynchronous I/O is also available. */ #pragma empty_line #pragma empty_line /* The rest of the LFS is also available. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* POSIX shared memory objects are implemented. */ #pragma empty_line #pragma empty_line /* CPU-time clocks support needs to be checked at runtime. */ #pragma empty_line #pragma empty_line /* Clock support in threads must be also checked at runtime. */ #pragma empty_line #pragma empty_line /* GNU libc provides regular expression handling. */ #pragma empty_line #pragma empty_line /* Reader/Writer locks are available. */ #pragma empty_line #pragma empty_line /* We have a POSIX shell. */ #pragma empty_line #pragma empty_line /* We support the Timeouts option. */ #pragma empty_line #pragma empty_line /* We support spinlocks. */ #pragma empty_line #pragma empty_line /* The `spawn' function family is supported. */ #pragma empty_line #pragma empty_line /* We have POSIX timers. */ #pragma empty_line #pragma empty_line /* The barrier functions are available. */ #pragma empty_line #pragma empty_line /* POSIX message queues are available. */ #pragma empty_line #pragma empty_line /* Thread process-shared synchronization is supported. */ #pragma empty_line #pragma empty_line /* The monotonic clock might be available. */ #pragma empty_line #pragma empty_line /* The clock selection interfaces are available. */ #pragma empty_line #pragma empty_line /* Advisory information interfaces are available. */ #pragma empty_line #pragma empty_line /* IPv6 support is available. */ #pragma empty_line #pragma empty_line /* Raw socket support is available. */ #pragma empty_line #pragma empty_line /* We have at least one terminal. */ #pragma empty_line #pragma empty_line /* Neither process nor thread sporadic server interfaces is available. */ #pragma empty_line #pragma empty_line #pragma empty_line /* trace.h is not available. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Typed memory objects are not available. */ #pragma line 206 "/usr/include/unistd.h" 2 3 4 #pragma empty_line /* Get the environment definitions from Unix98. */ #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/environments.h" 1 3 4 /* Copyright (C) 1999-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 /* Determine the wordsize from the preprocessor defines. */ #pragma line 11 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 3 4 /* Both x86-64 and x32 use the 64-bit system call interface. */ #pragma line 23 "/usr/include/x86_64-linux-gnu/bits/environments.h" 2 3 4 #pragma empty_line /* This header should define the following symbols under the described situations. A value `1' means that the model is always supported, `-1' means it is never supported. Undefined means it cannot be statically decided. #pragma empty_line _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type #pragma empty_line _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type #pragma empty_line The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard and are available only for compatibility. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: # undef _POSIX_V7_ILP32_OFF32 # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 # undef _XBS5_ILP32_OFFBIG and users need to check at runtime. */ #pragma empty_line /* We also have no use (for now) for an environment with bigger pointers and offsets. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* By default we have 64-bit wide `long int', pointers and `off_t'. */ #pragma line 210 "/usr/include/unistd.h" 2 3 4 #pragma empty_line #pragma empty_line /* Standard file descriptors. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* All functions that are not declared anywhere else. */ #pragma line 229 "/usr/include/unistd.h" 3 4 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 230 "/usr/include/unistd.h" 2 3 4 #pragma empty_line #pragma empty_line /* The Single Unix specification says that some more types are available here. */ #pragma empty_line typedef __gid_t gid_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __uid_t uid_t; #pragma line 258 "/usr/include/unistd.h" 3 4 typedef __useconds_t useconds_t; #pragma line 270 "/usr/include/unistd.h" 3 4 typedef __intptr_t intptr_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef __socklen_t socklen_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Values for the second argument to access. These may be OR'd together. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Test for access to NAME using the real UID and real GID. */ extern int access (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Test for access to NAME using the effective UID and GID (as normal file operations use). */ extern int euidaccess (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* An alias for `euidaccess', used by some other systems. */ extern int eaccess (const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Test for access to FILE relative to the directory FD is open on. If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess', otherwise use real IDs like `access'. */ extern int faccessat (int __fd, const char *__file, int __type, int __flag) throw () __attribute__ ((__nonnull__ (2))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Values for the WHENCE argument to lseek. */ #pragma line 324 "/usr/include/unistd.h" 3 4 /* Old BSD names for the same constants; just for compatibility. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Move FD's file position to OFFSET bytes from the beginning of the file (if WHENCE is SEEK_SET), the current position (if WHENCE is SEEK_CUR), or the end of the file (if WHENCE is SEEK_END). Return the new file position. */ #pragma empty_line extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); #pragma line 348 "/usr/include/unistd.h" 3 4 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) throw (); #pragma empty_line #pragma empty_line /* Close the file descriptor FD. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int close (int __fd); #pragma empty_line /* Read NBYTES into BUF from FD. Return the number read, -1 for errors or 0 for EOF. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t read (int __fd, void *__buf, size_t __nbytes) /* Ignore */; #pragma empty_line /* Write N bytes of BUF to FD. Return the number written, or -1. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t write (int __fd, const void *__buf, size_t __n) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) /* Ignore */; #pragma empty_line /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) /* Ignore */; #pragma line 404 "/usr/include/unistd.h" 3 4 /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) /* Ignore */; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Create a one-way communication channel (pipe). If successful, two file descriptors are stored in PIPEDES; bytes written on PIPEDES[1] can be read from PIPEDES[0]. Returns 0 if successful, -1 if not. */ extern int pipe (int __pipedes[2]) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Same as pipe but apply flags passed in FLAGS to the new file descriptors. */ extern int pipe2 (int __pipedes[2], int __flags) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. If SECONDS is zero, any currently scheduled alarm will be cancelled. The function returns the number of seconds remaining until the last alarm scheduled would have signaled, or zero if there wasn't one. There is no return value to indicate an error, but you can set `errno' to 0 and check its value after calling `alarm', and this might tell you. The signal may come late due to processor scheduling. */ extern unsigned int alarm (unsigned int __seconds) throw (); #pragma empty_line /* Make the process sleep for SECONDS seconds, or until a signal arrives and is not ignored. The function returns the number of seconds less than SECONDS which it actually slept (thus zero if it slept the full time). If a signal handler does a `longjmp' or modifies the handling of the SIGALRM signal while inside `sleep' call, the handling of the SIGALRM signal afterwards is undefined. There is no return value to indicate error, but if `sleep' returns SECONDS, it probably didn't work. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern unsigned int sleep (unsigned int __seconds); #pragma empty_line #pragma empty_line #pragma empty_line /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. Returns the number of microseconds remaining before the alarm. */ extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) throw (); #pragma empty_line /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked or ignored. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int usleep (__useconds_t __useconds); #pragma empty_line #pragma empty_line #pragma empty_line /* Suspend the process until a signal arrives. This always returns -1 and sets `errno' to EINTR. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int pause (void); #pragma empty_line #pragma empty_line /* Change the owner and group of FILE. */ extern int chown (const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line #pragma empty_line /* Change the owner and group of the file that FD is open on. */ extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Change owner and group of FILE, if it is a symbolic link the ownership of the symbolic link is changed. */ extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Change the owner and group of FILE relative to the directory FD is open on. */ extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) throw () __attribute__ ((__nonnull__ (2))) /* Ignore */; #pragma empty_line #pragma empty_line /* Change the process's working directory to PATH. */ extern int chdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line #pragma empty_line /* Change the process's working directory to the one FD is open on. */ extern int fchdir (int __fd) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Get the pathname of the current working directory, and put it in SIZE bytes of BUF. Returns NULL if the directory couldn't be determined or SIZE was too small. If successful, returns BUF. In GNU, if BUF is NULL, an array is allocated with `malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ extern char *getcwd (char *__buf, size_t __size) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ extern char *get_current_dir_name (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Put the absolute pathname of the current working directory in BUF. If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ extern char *getwd (char *__buf) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Duplicate FD, returning a new file descriptor on the same file. */ extern int dup (int __fd) throw () /* Ignore */; #pragma empty_line /* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ extern int dup2 (int __fd, int __fd2) throw (); #pragma empty_line #pragma empty_line /* Duplicate FD to FD2, closing FD2 and making it open on the same file while setting flags according to FLAGS. */ extern int dup3 (int __fd, int __fd2, int __flags) throw (); #pragma empty_line #pragma empty_line /* NULL-terminated array of "NAME=VALUE" environment variables. */ extern char **__environ; #pragma empty_line extern char **environ; #pragma empty_line #pragma empty_line #pragma empty_line /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ extern int execve (const char *__path, char *const __argv[], char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Execute the file FD refers to, overlaying the running program image. ARGV and ENVP are passed to the new program, as for `execve'. */ extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Execute PATH with arguments ARGV and environment from `environ'. */ extern int execv (const char *__path, char *const __argv[]) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ extern int execle (const char *__path, const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ extern int execl (const char *__path, const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ extern int execvp (const char *__file, char *const __argv[]) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a NULL pointer and environment from `environ'. */ extern int execlp (const char *__file, const char *__arg, ...) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ extern int execvpe (const char *__file, char *const __argv[], char *const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Add INC to priority of the current process. */ extern int nice (int __inc) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Terminate program execution with the low-order 8 bits of STATUS. */ extern void _exit (int __status) __attribute__ ((__noreturn__)); #pragma empty_line #pragma empty_line /* Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; the `_SC_*' symbols for the NAME argument to `sysconf'; and the `_CS_*' symbols for the NAME argument to `confstr'. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/confname.h" 1 3 4 /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Values for the NAME argument to `pathconf' and `fpathconf'. */ enum { _PC_LINK_MAX, #pragma empty_line _PC_MAX_CANON, #pragma empty_line _PC_MAX_INPUT, #pragma empty_line _PC_NAME_MAX, #pragma empty_line _PC_PATH_MAX, #pragma empty_line _PC_PIPE_BUF, #pragma empty_line _PC_CHOWN_RESTRICTED, #pragma empty_line _PC_NO_TRUNC, #pragma empty_line _PC_VDISABLE, #pragma empty_line _PC_SYNC_IO, #pragma empty_line _PC_ASYNC_IO, #pragma empty_line _PC_PRIO_IO, #pragma empty_line _PC_SOCK_MAXBUF, #pragma empty_line _PC_FILESIZEBITS, #pragma empty_line _PC_REC_INCR_XFER_SIZE, #pragma empty_line _PC_REC_MAX_XFER_SIZE, #pragma empty_line _PC_REC_MIN_XFER_SIZE, #pragma empty_line _PC_REC_XFER_ALIGN, #pragma empty_line _PC_ALLOC_SIZE_MIN, #pragma empty_line _PC_SYMLINK_MAX, #pragma empty_line _PC_2_SYMLINKS #pragma empty_line }; #pragma empty_line /* Values for the argument to `sysconf'. */ enum { _SC_ARG_MAX, #pragma empty_line _SC_CHILD_MAX, #pragma empty_line _SC_CLK_TCK, #pragma empty_line _SC_NGROUPS_MAX, #pragma empty_line _SC_OPEN_MAX, #pragma empty_line _SC_STREAM_MAX, #pragma empty_line _SC_TZNAME_MAX, #pragma empty_line _SC_JOB_CONTROL, #pragma empty_line _SC_SAVED_IDS, #pragma empty_line _SC_REALTIME_SIGNALS, #pragma empty_line _SC_PRIORITY_SCHEDULING, #pragma empty_line _SC_TIMERS, #pragma empty_line _SC_ASYNCHRONOUS_IO, #pragma empty_line _SC_PRIORITIZED_IO, #pragma empty_line _SC_SYNCHRONIZED_IO, #pragma empty_line _SC_FSYNC, #pragma empty_line _SC_MAPPED_FILES, #pragma empty_line _SC_MEMLOCK, #pragma empty_line _SC_MEMLOCK_RANGE, #pragma empty_line _SC_MEMORY_PROTECTION, #pragma empty_line _SC_MESSAGE_PASSING, #pragma empty_line _SC_SEMAPHORES, #pragma empty_line _SC_SHARED_MEMORY_OBJECTS, #pragma empty_line _SC_AIO_LISTIO_MAX, #pragma empty_line _SC_AIO_MAX, #pragma empty_line _SC_AIO_PRIO_DELTA_MAX, #pragma empty_line _SC_DELAYTIMER_MAX, #pragma empty_line _SC_MQ_OPEN_MAX, #pragma empty_line _SC_MQ_PRIO_MAX, #pragma empty_line _SC_VERSION, #pragma empty_line _SC_PAGESIZE, #pragma empty_line #pragma empty_line _SC_RTSIG_MAX, #pragma empty_line _SC_SEM_NSEMS_MAX, #pragma empty_line _SC_SEM_VALUE_MAX, #pragma empty_line _SC_SIGQUEUE_MAX, #pragma empty_line _SC_TIMER_MAX, #pragma empty_line #pragma empty_line /* Values for the argument to `sysconf' corresponding to _POSIX2_* symbols. */ _SC_BC_BASE_MAX, #pragma empty_line _SC_BC_DIM_MAX, #pragma empty_line _SC_BC_SCALE_MAX, #pragma empty_line _SC_BC_STRING_MAX, #pragma empty_line _SC_COLL_WEIGHTS_MAX, #pragma empty_line _SC_EQUIV_CLASS_MAX, #pragma empty_line _SC_EXPR_NEST_MAX, #pragma empty_line _SC_LINE_MAX, #pragma empty_line _SC_RE_DUP_MAX, #pragma empty_line _SC_CHARCLASS_NAME_MAX, #pragma empty_line #pragma empty_line _SC_2_VERSION, #pragma empty_line _SC_2_C_BIND, #pragma empty_line _SC_2_C_DEV, #pragma empty_line _SC_2_FORT_DEV, #pragma empty_line _SC_2_FORT_RUN, #pragma empty_line _SC_2_SW_DEV, #pragma empty_line _SC_2_LOCALEDEF, #pragma empty_line #pragma empty_line _SC_PII, #pragma empty_line _SC_PII_XTI, #pragma empty_line _SC_PII_SOCKET, #pragma empty_line _SC_PII_INTERNET, #pragma empty_line _SC_PII_OSI, #pragma empty_line _SC_POLL, #pragma empty_line _SC_SELECT, #pragma empty_line _SC_UIO_MAXIOV, #pragma empty_line _SC_IOV_MAX = _SC_UIO_MAXIOV, #pragma empty_line _SC_PII_INTERNET_STREAM, #pragma empty_line _SC_PII_INTERNET_DGRAM, #pragma empty_line _SC_PII_OSI_COTS, #pragma empty_line _SC_PII_OSI_CLTS, #pragma empty_line _SC_PII_OSI_M, #pragma empty_line _SC_T_IOV_MAX, #pragma empty_line #pragma empty_line /* Values according to POSIX 1003.1c (POSIX threads). */ _SC_THREADS, #pragma empty_line _SC_THREAD_SAFE_FUNCTIONS, #pragma empty_line _SC_GETGR_R_SIZE_MAX, #pragma empty_line _SC_GETPW_R_SIZE_MAX, #pragma empty_line _SC_LOGIN_NAME_MAX, #pragma empty_line _SC_TTY_NAME_MAX, #pragma empty_line _SC_THREAD_DESTRUCTOR_ITERATIONS, #pragma empty_line _SC_THREAD_KEYS_MAX, #pragma empty_line _SC_THREAD_STACK_MIN, #pragma empty_line _SC_THREAD_THREADS_MAX, #pragma empty_line _SC_THREAD_ATTR_STACKADDR, #pragma empty_line _SC_THREAD_ATTR_STACKSIZE, #pragma empty_line _SC_THREAD_PRIORITY_SCHEDULING, #pragma empty_line _SC_THREAD_PRIO_INHERIT, #pragma empty_line _SC_THREAD_PRIO_PROTECT, #pragma empty_line _SC_THREAD_PROCESS_SHARED, #pragma empty_line #pragma empty_line _SC_NPROCESSORS_CONF, #pragma empty_line _SC_NPROCESSORS_ONLN, #pragma empty_line _SC_PHYS_PAGES, #pragma empty_line _SC_AVPHYS_PAGES, #pragma empty_line _SC_ATEXIT_MAX, #pragma empty_line _SC_PASS_MAX, #pragma empty_line #pragma empty_line _SC_XOPEN_VERSION, #pragma empty_line _SC_XOPEN_XCU_VERSION, #pragma empty_line _SC_XOPEN_UNIX, #pragma empty_line _SC_XOPEN_CRYPT, #pragma empty_line _SC_XOPEN_ENH_I18N, #pragma empty_line _SC_XOPEN_SHM, #pragma empty_line #pragma empty_line _SC_2_CHAR_TERM, #pragma empty_line _SC_2_C_VERSION, #pragma empty_line _SC_2_UPE, #pragma empty_line #pragma empty_line _SC_XOPEN_XPG2, #pragma empty_line _SC_XOPEN_XPG3, #pragma empty_line _SC_XOPEN_XPG4, #pragma empty_line #pragma empty_line _SC_CHAR_BIT, #pragma empty_line _SC_CHAR_MAX, #pragma empty_line _SC_CHAR_MIN, #pragma empty_line _SC_INT_MAX, #pragma empty_line _SC_INT_MIN, #pragma empty_line _SC_LONG_BIT, #pragma empty_line _SC_WORD_BIT, #pragma empty_line _SC_MB_LEN_MAX, #pragma empty_line _SC_NZERO, #pragma empty_line _SC_SSIZE_MAX, #pragma empty_line _SC_SCHAR_MAX, #pragma empty_line _SC_SCHAR_MIN, #pragma empty_line _SC_SHRT_MAX, #pragma empty_line _SC_SHRT_MIN, #pragma empty_line _SC_UCHAR_MAX, #pragma empty_line _SC_UINT_MAX, #pragma empty_line _SC_ULONG_MAX, #pragma empty_line _SC_USHRT_MAX, #pragma empty_line #pragma empty_line _SC_NL_ARGMAX, #pragma empty_line _SC_NL_LANGMAX, #pragma empty_line _SC_NL_MSGMAX, #pragma empty_line _SC_NL_NMAX, #pragma empty_line _SC_NL_SETMAX, #pragma empty_line _SC_NL_TEXTMAX, #pragma empty_line #pragma empty_line _SC_XBS5_ILP32_OFF32, #pragma empty_line _SC_XBS5_ILP32_OFFBIG, #pragma empty_line _SC_XBS5_LP64_OFF64, #pragma empty_line _SC_XBS5_LPBIG_OFFBIG, #pragma empty_line #pragma empty_line _SC_XOPEN_LEGACY, #pragma empty_line _SC_XOPEN_REALTIME, #pragma empty_line _SC_XOPEN_REALTIME_THREADS, #pragma empty_line #pragma empty_line _SC_ADVISORY_INFO, #pragma empty_line _SC_BARRIERS, #pragma empty_line _SC_BASE, #pragma empty_line _SC_C_LANG_SUPPORT, #pragma empty_line _SC_C_LANG_SUPPORT_R, #pragma empty_line _SC_CLOCK_SELECTION, #pragma empty_line _SC_CPUTIME, #pragma empty_line _SC_THREAD_CPUTIME, #pragma empty_line _SC_DEVICE_IO, #pragma empty_line _SC_DEVICE_SPECIFIC, #pragma empty_line _SC_DEVICE_SPECIFIC_R, #pragma empty_line _SC_FD_MGMT, #pragma empty_line _SC_FIFO, #pragma empty_line _SC_PIPE, #pragma empty_line _SC_FILE_ATTRIBUTES, #pragma empty_line _SC_FILE_LOCKING, #pragma empty_line _SC_FILE_SYSTEM, #pragma empty_line _SC_MONOTONIC_CLOCK, #pragma empty_line _SC_MULTI_PROCESS, #pragma empty_line _SC_SINGLE_PROCESS, #pragma empty_line _SC_NETWORKING, #pragma empty_line _SC_READER_WRITER_LOCKS, #pragma empty_line _SC_SPIN_LOCKS, #pragma empty_line _SC_REGEXP, #pragma empty_line _SC_REGEX_VERSION, #pragma empty_line _SC_SHELL, #pragma empty_line _SC_SIGNALS, #pragma empty_line _SC_SPAWN, #pragma empty_line _SC_SPORADIC_SERVER, #pragma empty_line _SC_THREAD_SPORADIC_SERVER, #pragma empty_line _SC_SYSTEM_DATABASE, #pragma empty_line _SC_SYSTEM_DATABASE_R, #pragma empty_line _SC_TIMEOUTS, #pragma empty_line _SC_TYPED_MEMORY_OBJECTS, #pragma empty_line _SC_USER_GROUPS, #pragma empty_line _SC_USER_GROUPS_R, #pragma empty_line _SC_2_PBS, #pragma empty_line _SC_2_PBS_ACCOUNTING, #pragma empty_line _SC_2_PBS_LOCATE, #pragma empty_line _SC_2_PBS_MESSAGE, #pragma empty_line _SC_2_PBS_TRACK, #pragma empty_line _SC_SYMLOOP_MAX, #pragma empty_line _SC_STREAMS, #pragma empty_line _SC_2_PBS_CHECKPOINT, #pragma empty_line #pragma empty_line _SC_V6_ILP32_OFF32, #pragma empty_line _SC_V6_ILP32_OFFBIG, #pragma empty_line _SC_V6_LP64_OFF64, #pragma empty_line _SC_V6_LPBIG_OFFBIG, #pragma empty_line #pragma empty_line _SC_HOST_NAME_MAX, #pragma empty_line _SC_TRACE, #pragma empty_line _SC_TRACE_EVENT_FILTER, #pragma empty_line _SC_TRACE_INHERIT, #pragma empty_line _SC_TRACE_LOG, #pragma empty_line #pragma empty_line _SC_LEVEL1_ICACHE_SIZE, #pragma empty_line _SC_LEVEL1_ICACHE_ASSOC, #pragma empty_line _SC_LEVEL1_ICACHE_LINESIZE, #pragma empty_line _SC_LEVEL1_DCACHE_SIZE, #pragma empty_line _SC_LEVEL1_DCACHE_ASSOC, #pragma empty_line _SC_LEVEL1_DCACHE_LINESIZE, #pragma empty_line _SC_LEVEL2_CACHE_SIZE, #pragma empty_line _SC_LEVEL2_CACHE_ASSOC, #pragma empty_line _SC_LEVEL2_CACHE_LINESIZE, #pragma empty_line _SC_LEVEL3_CACHE_SIZE, #pragma empty_line _SC_LEVEL3_CACHE_ASSOC, #pragma empty_line _SC_LEVEL3_CACHE_LINESIZE, #pragma empty_line _SC_LEVEL4_CACHE_SIZE, #pragma empty_line _SC_LEVEL4_CACHE_ASSOC, #pragma empty_line _SC_LEVEL4_CACHE_LINESIZE, #pragma empty_line /* Leave room here, maybe we need a few more cache levels some day. */ #pragma empty_line _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, #pragma empty_line _SC_RAW_SOCKETS, #pragma empty_line #pragma empty_line _SC_V7_ILP32_OFF32, #pragma empty_line _SC_V7_ILP32_OFFBIG, #pragma empty_line _SC_V7_LP64_OFF64, #pragma empty_line _SC_V7_LPBIG_OFFBIG, #pragma empty_line #pragma empty_line _SC_SS_REPL_MAX, #pragma empty_line #pragma empty_line _SC_TRACE_EVENT_NAME_MAX, #pragma empty_line _SC_TRACE_NAME_MAX, #pragma empty_line _SC_TRACE_SYS_MAX, #pragma empty_line _SC_TRACE_USER_EVENT_MAX, #pragma empty_line #pragma empty_line _SC_XOPEN_STREAMS, #pragma empty_line #pragma empty_line _SC_THREAD_ROBUST_PRIO_INHERIT, #pragma empty_line _SC_THREAD_ROBUST_PRIO_PROTECT #pragma empty_line }; #pragma empty_line /* Values for the NAME argument to `confstr'. */ enum { _CS_PATH, /* The default search path. */ #pragma empty_line #pragma empty_line _CS_V6_WIDTH_RESTRICTED_ENVS, #pragma empty_line #pragma empty_line #pragma empty_line _CS_GNU_LIBC_VERSION, #pragma empty_line _CS_GNU_LIBPTHREAD_VERSION, #pragma empty_line #pragma empty_line _CS_V5_WIDTH_RESTRICTED_ENVS, #pragma empty_line #pragma empty_line #pragma empty_line _CS_V7_WIDTH_RESTRICTED_ENVS, #pragma empty_line #pragma empty_line #pragma empty_line _CS_LFS_CFLAGS = 1000, #pragma empty_line _CS_LFS_LDFLAGS, #pragma empty_line _CS_LFS_LIBS, #pragma empty_line _CS_LFS_LINTFLAGS, #pragma empty_line _CS_LFS64_CFLAGS, #pragma empty_line _CS_LFS64_LDFLAGS, #pragma empty_line _CS_LFS64_LIBS, #pragma empty_line _CS_LFS64_LINTFLAGS, #pragma empty_line #pragma empty_line _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, #pragma empty_line _CS_XBS5_ILP32_OFF32_LDFLAGS, #pragma empty_line _CS_XBS5_ILP32_OFF32_LIBS, #pragma empty_line _CS_XBS5_ILP32_OFF32_LINTFLAGS, #pragma empty_line _CS_XBS5_ILP32_OFFBIG_CFLAGS, #pragma empty_line _CS_XBS5_ILP32_OFFBIG_LDFLAGS, #pragma empty_line _CS_XBS5_ILP32_OFFBIG_LIBS, #pragma empty_line _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, #pragma empty_line _CS_XBS5_LP64_OFF64_CFLAGS, #pragma empty_line _CS_XBS5_LP64_OFF64_LDFLAGS, #pragma empty_line _CS_XBS5_LP64_OFF64_LIBS, #pragma empty_line _CS_XBS5_LP64_OFF64_LINTFLAGS, #pragma empty_line _CS_XBS5_LPBIG_OFFBIG_CFLAGS, #pragma empty_line _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, #pragma empty_line _CS_XBS5_LPBIG_OFFBIG_LIBS, #pragma empty_line _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, #pragma empty_line #pragma empty_line _CS_POSIX_V6_ILP32_OFF32_CFLAGS, #pragma empty_line _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, #pragma empty_line _CS_POSIX_V6_ILP32_OFF32_LIBS, #pragma empty_line _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, #pragma empty_line _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, #pragma empty_line _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, #pragma empty_line _CS_POSIX_V6_ILP32_OFFBIG_LIBS, #pragma empty_line _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, #pragma empty_line _CS_POSIX_V6_LP64_OFF64_CFLAGS, #pragma empty_line _CS_POSIX_V6_LP64_OFF64_LDFLAGS, #pragma empty_line _CS_POSIX_V6_LP64_OFF64_LIBS, #pragma empty_line _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, #pragma empty_line _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, #pragma empty_line _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, #pragma empty_line _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, #pragma empty_line _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, #pragma empty_line #pragma empty_line _CS_POSIX_V7_ILP32_OFF32_CFLAGS, #pragma empty_line _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, #pragma empty_line _CS_POSIX_V7_ILP32_OFF32_LIBS, #pragma empty_line _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, #pragma empty_line _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, #pragma empty_line _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, #pragma empty_line _CS_POSIX_V7_ILP32_OFFBIG_LIBS, #pragma empty_line _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, #pragma empty_line _CS_POSIX_V7_LP64_OFF64_CFLAGS, #pragma empty_line _CS_POSIX_V7_LP64_OFF64_LDFLAGS, #pragma empty_line _CS_POSIX_V7_LP64_OFF64_LIBS, #pragma empty_line _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, #pragma empty_line _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, #pragma empty_line _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, #pragma empty_line _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, #pragma empty_line _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, #pragma empty_line #pragma empty_line _CS_V6_ENV, #pragma empty_line _CS_V7_ENV #pragma empty_line }; #pragma line 613 "/usr/include/unistd.h" 2 3 4 #pragma empty_line /* Get file-specific configuration information about PATH. */ extern long int pathconf (const char *__path, int __name) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Get file-specific configuration about descriptor FD. */ extern long int fpathconf (int __fd, int __name) throw (); #pragma empty_line /* Get the value of the system variable NAME. */ extern long int sysconf (int __name) throw (); #pragma empty_line #pragma empty_line /* Get the value of the string-valued system variable NAME. */ extern size_t confstr (int __name, char *__buf, size_t __len) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Get the process ID of the calling process. */ extern __pid_t getpid (void) throw (); #pragma empty_line /* Get the process ID of the calling process's parent. */ extern __pid_t getppid (void) throw (); #pragma empty_line /* Get the process group ID of the calling process. */ extern __pid_t getpgrp (void) throw (); #pragma empty_line /* Get the process group ID of process PID. */ extern __pid_t __getpgid (__pid_t __pid) throw (); #pragma empty_line extern __pid_t getpgid (__pid_t __pid) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); #pragma empty_line #pragma empty_line /* Both System V and BSD have `setpgrp' functions, but with different calling conventions. The BSD function is the same as POSIX.1 `setpgid' (above). The System V function takes no arguments and puts the calling process in its on group like `setpgid (0, 0)'. #pragma empty_line New programs should always use `setpgid' instead. #pragma empty_line GNU provides the POSIX.1 function. */ #pragma empty_line /* Set the process group ID of the calling process to its own PID. This is exactly the same as `setpgid (0, 0)'. */ extern int setpgrp (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process are set to the process ID of the calling process, which is returned. */ extern __pid_t setsid (void) throw (); #pragma empty_line #pragma empty_line /* Return the session ID of the given process. */ extern __pid_t getsid (__pid_t __pid) throw (); #pragma empty_line #pragma empty_line /* Get the real user ID of the calling process. */ extern __uid_t getuid (void) throw (); #pragma empty_line /* Get the effective user ID of the calling process. */ extern __uid_t geteuid (void) throw (); #pragma empty_line /* Get the real group ID of the calling process. */ extern __gid_t getgid (void) throw (); #pragma empty_line /* Get the effective group ID of the calling process. */ extern __gid_t getegid (void) throw (); #pragma empty_line /* If SIZE is zero, return the number of supplementary groups the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ extern int getgroups (int __size, __gid_t __list[]) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Return nonzero iff the calling process is in group GID. */ extern int group_member (__gid_t __gid) throw (); #pragma empty_line #pragma empty_line /* Set the user ID of the calling process to UID. If the calling process is the super-user, set the real and effective user IDs, and the saved set-user-ID to UID; if not, the effective user ID is set to UID. */ extern int setuid (__uid_t __uid) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Set the real user ID of the calling process to RUID, and the effective user ID of the calling process to EUID. */ extern int setreuid (__uid_t __ruid, __uid_t __euid) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Set the effective user ID of the calling process to UID. */ extern int seteuid (__uid_t __uid) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Set the group ID of the calling process to GID. If the calling process is the super-user, set the real and effective group IDs, and the saved set-group-ID to GID; if not, the effective group ID is set to GID. */ extern int setgid (__gid_t __gid) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Set the real group ID of the calling process to RGID, and the effective group ID of the calling process to EGID. */ extern int setregid (__gid_t __rgid, __gid_t __egid) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Set the effective group ID of the calling process to GID. */ extern int setegid (__gid_t __gid) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Fetch the real user ID, effective user ID, and saved-set user ID, of the calling process. */ extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) throw (); #pragma empty_line /* Fetch the real group ID, effective group ID, and saved-set group ID, of the calling process. */ extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) throw (); #pragma empty_line /* Set the real user ID, effective user ID, and saved-set user ID, of the calling process to RUID, EUID, and SUID, respectively. */ extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) throw () /* Ignore */; #pragma empty_line /* Set the real group ID, effective group ID, and saved-set group ID, of the calling process to RGID, EGID, and SGID, respectively. */ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Clone the calling process, creating an exact copy. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t fork (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t vfork (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return the pathname of the terminal FD is open on, or NULL on errors. The returned storage is good only until the next call to this function. */ extern char *ttyname (int __fd) throw (); #pragma empty_line /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ttyname_r (int __fd, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))) /* Ignore */; #pragma empty_line /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ extern int isatty (int __fd) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return the index into the active-logins file (utmp) for the controlling terminal. */ extern int ttyslot (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Make a link to FROM named TO. */ extern int link (const char *__from, const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) /* Ignore */; #pragma empty_line #pragma empty_line /* Like link but relative paths in TO and FROM are interpreted relative to FROMFD and TOFD respectively. */ extern int linkat (int __fromfd, const char *__from, int __tofd, const char *__to, int __flags) throw () __attribute__ ((__nonnull__ (2, 4))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Make a symbolic link to FROM named TO. */ extern int symlink (const char *__from, const char *__to) throw () __attribute__ ((__nonnull__ (1, 2))) /* Ignore */; #pragma empty_line /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (1, 2))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line /* Like symlink but a relative path in TO is interpreted relative to TOFD. */ extern int symlinkat (const char *__from, int __tofd, const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) /* Ignore */; #pragma empty_line /* Like readlink but a relative PATH is interpreted relative to FD. */ extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __attribute__ ((__nonnull__ (2, 3))) /* Ignore */; #pragma empty_line #pragma empty_line /* Remove the link NAME. */ extern int unlink (const char *__name) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Remove the link NAME relative to FD. */ extern int unlinkat (int __fd, const char *__name, int __flag) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line /* Remove the directory PATH. */ extern int rmdir (const char *__path) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return the foreground process group ID of FD. */ extern __pid_t tcgetpgrp (int __fd) throw (); #pragma empty_line /* Set the foreground process group ID of FD set PGRP_ID. */ extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); #pragma empty_line #pragma empty_line /* Return the login name of the user. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *getlogin (void); #pragma empty_line /* Return at most NAME_LEN characters of the login name of the user in NAME. If it cannot be determined or some other error occurred, return the error code. Otherwise return 0. #pragma empty_line This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Set the login name returned by `getlogin'. */ extern int setlogin (const char *__name) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. */ #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/getopt.h" 1 3 4 /* Declarations for getopt. Copyright (C) 1989-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include <features.h>, but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include <ctype.h>, which will pull in <features.h> for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #pragma line 48 "/usr/include/getopt.h" 3 4 extern "C" { #pragma empty_line #pragma empty_line /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ #pragma empty_line extern char *optarg; #pragma empty_line /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. #pragma empty_line On entry to `getopt', zero means this is the first call; initialize. #pragma empty_line When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. #pragma empty_line Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ #pragma empty_line extern int optind; #pragma empty_line /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ #pragma empty_line extern int opterr; #pragma empty_line /* Set to an option character which was unrecognized. */ #pragma empty_line extern int optopt; #pragma line 122 "/usr/include/getopt.h" 3 4 /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. #pragma empty_line Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. #pragma empty_line The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. #pragma empty_line If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. #pragma empty_line The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. #pragma empty_line If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #pragma empty_line #pragma empty_line /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) throw (); #pragma line 185 "/usr/include/getopt.h" 3 4 } #pragma empty_line #pragma empty_line /* Make sure we later can get all the definitions and declarations. */ #pragma line 875 "/usr/include/unistd.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ extern int sethostname (const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ extern int sethostid (long int __id) throw () /* Ignore */; #pragma empty_line #pragma empty_line /* Get and set the NIS (aka YP) domain name, if any. Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ extern int getdomainname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; extern int setdomainname (const char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line #pragma empty_line /* Revoke access permissions to all processes currently communicating with the control terminal, and then send a SIGHUP signal to the process group of the control terminal. */ extern int vhangup (void) throw (); #pragma empty_line /* Revoke the access of all descriptors currently open on FILE. */ extern int revoke (const char *__file) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line #pragma empty_line /* Enable statistical profiling, writing samples of the PC into at most SIZE bytes of SAMPLE_BUFFER; every processor clock tick while profiling is enabled, the system examines the user PC and increments SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero, disable profiling. Returns zero on success, -1 on error. */ extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user. */ extern int acct (const char *__name) throw (); #pragma empty_line #pragma empty_line /* Successive calls return the shells listed in `/etc/shells'. */ extern char *getusershell (void) throw (); extern void endusershell (void) throw (); /* Discard cached info. */ extern void setusershell (void) throw (); /* Rewind and re-read the file. */ #pragma empty_line #pragma empty_line /* Put the program in the background, and dissociate from the controlling terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero, redirects stdin, stdout, and stderr to /dev/null. */ extern int daemon (int __nochdir, int __noclose) throw () /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user. */ extern int chroot (const char *__path) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Make all changes done to FD actually appear on disk. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ extern int fsync (int __fd); #pragma empty_line #pragma empty_line #pragma empty_line /* Make all changes done to all files on the file system associated with FD actually appear on disk. */ extern int syncfs (int __fd) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return identifier for the current host. */ extern long int gethostid (void); #pragma empty_line /* Make all changes done to all files actually appear on disk. */ extern void sync (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Return the number of bytes in a page. This is the system's page size, which is not necessarily the same as the hardware page size. */ extern int getpagesize (void) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Return the maximum number of file descriptors the current process could possibly have. */ extern int getdtablesize (void) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Truncate FILE to LENGTH bytes. */ #pragma empty_line extern int truncate (const char *__file, __off_t __length) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma line 1008 "/usr/include/unistd.h" 3 4 extern int truncate64 (const char *__file, __off64_t __length) throw () __attribute__ ((__nonnull__ (1))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Truncate the file FD is open on to LENGTH bytes. */ #pragma empty_line extern int ftruncate (int __fd, __off_t __length) throw () /* Ignore */; #pragma line 1029 "/usr/include/unistd.h" 3 4 extern int ftruncate64 (int __fd, __off64_t __length) throw () /* Ignore */; #pragma line 1038 "/usr/include/unistd.h" 3 4 /* Set the end of accessible data space (aka "the break") to ADDR. Returns zero on success and -1 for errors (with errno set). */ extern int brk (void *__addr) throw () /* Ignore */; #pragma empty_line /* Increase or decrease the end of accessible data space by DELTA bytes. If successful, returns the address the previous end of data space (i.e. the beginning of the new space, if DELTA > 0); returns (void *) -1 for errors (with errno set). */ extern void *sbrk (intptr_t __delta) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Invoke `system call' number SYSNO, passing it the remaining arguments. This is completely system-dependent, and not often useful. #pragma empty_line In Unix, `syscall' sets `errno' for all errors and most calls return -1 for errors; in many systems you cannot pass arguments or get return values for all system calls (`pipe', `fork', and `getppid' typically among them). #pragma empty_line In Mach, all system calls take normal arguments and always return an error code (zero for success). */ extern long int syscall (long int __sysno, ...) throw (); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* NOTE: These declarations also appear in <fcntl.h>; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ #pragma empty_line /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. The CMD argument is one of the following. #pragma empty_line This function is a cancellation point and therefore not marked with __THROW. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern int lockf (int __fd, int __cmd, __off_t __len) /* Ignore */; #pragma line 1094 "/usr/include/unistd.h" 3 4 extern int lockf64 (int __fd, int __cmd, __off64_t __len) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno' set to EINTR. */ #pragma line 1113 "/usr/include/unistd.h" 3 4 /* Synchronize at least the data part of a file with the underlying media. */ extern int fdatasync (int __fildes); #pragma empty_line #pragma empty_line #pragma empty_line /* XPG4.2 specifies that prototypes for the encryption functions must be defined here. */ #pragma empty_line /* Encrypt at most 8 characters from KEY using salt to perturb DES. */ extern char *crypt (const char *__key, const char *__salt) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt block in place. */ extern void encrypt (char *__glibc_block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Swab pairs bytes in the first N bytes of the area pointed to by FROM and copy the result to TO. The value of TO must not be in the range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line /* The Single Unix specification demands this prototype to be here. It is also found in <stdio.h>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Define some macros helping to catch buffer overflows. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 2 3 #pragma empty_line typedef pthread_t __gthread_t; typedef pthread_key_t __gthread_key_t; typedef pthread_once_t __gthread_once_t; typedef pthread_mutex_t __gthread_mutex_t; typedef pthread_mutex_t __gthread_recursive_mutex_t; typedef pthread_cond_t __gthread_cond_t; typedef struct timespec __gthread_time_t; #pragma empty_line /* POSIX like conditional variables are supported. Please look at comments in gthr.h for details. */ #pragma line 81 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 3 /* Typically, __gthrw_foo is a weak reference to symbol foo. */ #pragma empty_line #pragma empty_line /* On Tru64, /usr/include/pthread.h uses #pragma extern_prefix "__" to map a subset of the POSIX pthread API to mangled versions of their names. */ #pragma line 118 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 3 static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); #pragma empty_line static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); #pragma empty_line static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); #pragma empty_line static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); #pragma empty_line static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); #pragma empty_line #pragma empty_line static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); #pragma empty_line #pragma empty_line static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); #pragma empty_line static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); #pragma empty_line #pragma empty_line static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); #pragma line 183 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 3 /* On Solaris 2.6 up to 9, the libc exposes a POSIX threads interface even if -pthreads is not specified. The functions are dummies and most return an error value. However pthread_once returns 0 without invoking the routine it is passed so we cannot pretend that the interface is active if -pthreads is not specified. On Solaris 2.5.1, the interface is not exposed at all so we need to play the usual game with weak symbols. On Solaris 10 and up, a working interface is always exposed. On FreeBSD 6 and later, libc also exposes a dummy POSIX threads interface, similar to what Solaris 2.6 up to 9 does. FreeBSD >= 700014 even provides a pthread_cancel stub in libc, which means the alternate __gthread_active_p below cannot be used there. */ #pragma line 239 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_active_p (void) { static void *const __gthread_active_ptr = __extension__ (void *) &__gthrw_pthread_cancel; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return __gthread_active_ptr != 0; } #pragma line 657 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_create (__gthread_t *__threadid, void *(*__func) (void*), void *__args) { return __gthrw_pthread_create (__threadid, __null, __func, __args); } #pragma empty_line static inline int __gthread_join (__gthread_t __threadid, void **__value_ptr) { return __gthrw_pthread_join (__threadid, __value_ptr); } #pragma empty_line static inline int __gthread_detach (__gthread_t __threadid) { return __gthrw_pthread_detach (__threadid); } #pragma empty_line static inline int __gthread_equal (__gthread_t __t1, __gthread_t __t2) { return __gthrw_pthread_equal (__t1, __t2); } #pragma empty_line static inline __gthread_t __gthread_self (void) { return __gthrw_pthread_self (); } #pragma empty_line static inline int __gthread_yield (void) { return __gthrw_sched_yield (); } #pragma empty_line static inline int __gthread_once (__gthread_once_t *__once, void (*__func) (void)) { if (__gthread_active_p ()) return __gthrw_pthread_once (__once, __func); else return -1; } #pragma empty_line static inline int __gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) { return __gthrw_pthread_key_create (__key, __dtor); } #pragma empty_line static inline int __gthread_key_delete (__gthread_key_t __key) { return __gthrw_pthread_key_delete (__key); } #pragma empty_line static inline void * __gthread_getspecific (__gthread_key_t __key) { return __gthrw_pthread_getspecific (__key); } #pragma empty_line static inline int __gthread_setspecific (__gthread_key_t __key, const void *__ptr) { return __gthrw_pthread_setspecific (__key, __ptr); } #pragma empty_line static inline int __gthread_mutex_destroy (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_destroy (__mutex); else return 0; } #pragma empty_line static inline int __gthread_mutex_lock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_lock (__mutex); else return 0; } #pragma empty_line static inline int __gthread_mutex_trylock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_trylock (__mutex); else return 0; } #pragma empty_line #pragma empty_line #pragma empty_line static inline int __gthread_mutex_timedlock (__gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); else return 0; } #pragma empty_line #pragma empty_line #pragma empty_line static inline int __gthread_mutex_unlock (__gthread_mutex_t *__mutex) { if (__gthread_active_p ()) return __gthrw_pthread_mutex_unlock (__mutex); else return 0; } #pragma line 800 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr-default.h" 3 static inline int __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_lock (__mutex); } #pragma empty_line static inline int __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_trylock (__mutex); } #pragma empty_line #pragma empty_line #pragma empty_line static inline int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_mutex_timedlock (__mutex, __abs_timeout); } #pragma empty_line #pragma empty_line #pragma empty_line static inline int __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) { return __gthread_mutex_unlock (__mutex); } #pragma empty_line static inline int __gthread_cond_broadcast (__gthread_cond_t *__cond) { return __gthrw_pthread_cond_broadcast (__cond); } #pragma empty_line static inline int __gthread_cond_signal (__gthread_cond_t *__cond) { return __gthrw_pthread_cond_signal (__cond); } #pragma empty_line static inline int __gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) { return __gthrw_pthread_cond_wait (__cond, __mutex); } #pragma empty_line static inline int __gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); } #pragma empty_line static inline int __gthread_cond_wait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex) { return __gthread_cond_wait (__cond, __mutex); } #pragma empty_line static inline int __gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, __gthread_recursive_mutex_t *__mutex, const __gthread_time_t *__abs_timeout) { return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); } #pragma empty_line static inline int __gthread_cond_destroy (__gthread_cond_t* __cond) { return __gthrw_pthread_cond_destroy (__cond); } #pragma line 171 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/gthr.h" 2 3 #pragma empty_line /* Fallback to single thread definitions. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma GCC visibility pop #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/atomic_word.h" 1 3 // Low-level type for atomic operations -*- C++ -*- #pragma empty_line // Copyright (C) 2004, 2009 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file atomic_word.h * This file is a GNU extension to the Standard C++ Library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line typedef int _Atomic_word; #pragma empty_line // Define these two macros using the appropriate memory barrier for the target. // The commented out versions below are the defaults. // See ia64/atomic_word.h for an alternative approach. #pragma empty_line // This one prevents loads from being hoisted across the barrier; // in other words, this is a Load-Load acquire barrier. // This is necessary iff TARGET_RELAXED_ORDERING is defined in tm.h. // #define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory") #pragma empty_line // This one prevents stores from being sunk across the barrier; in other // words, a Store-Store release barrier. // #define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory") #pragma line 36 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h" 2 3 #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // Functions for portable atomic access. // To abstract locking primitives across all thread policies, use: // __exchange_and_add_dispatch // __atomic_add_dispatch #pragma empty_line static inline _Atomic_word __exchange_and_add(volatile _Atomic_word* __mem, int __val) { return __sync_fetch_and_add(__mem, __val); } #pragma empty_line static inline void __atomic_add(volatile _Atomic_word* __mem, int __val) { __sync_fetch_and_add(__mem, __val); } #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h" 3 static inline _Atomic_word __exchange_and_add_single(_Atomic_word* __mem, int __val) { _Atomic_word __result = *__mem; *__mem += __val; return __result; } #pragma empty_line static inline void __atomic_add_single(_Atomic_word* __mem, int __val) { *__mem += __val; } #pragma empty_line static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { #pragma empty_line if (__gthread_active_p()) return __exchange_and_add(__mem, __val); else return __exchange_and_add_single(__mem, __val); #pragma empty_line #pragma empty_line #pragma empty_line } #pragma empty_line static inline void __attribute__ ((__unused__)) __atomic_add_dispatch(_Atomic_word* __mem, int __val) { #pragma empty_line if (__gthread_active_p()) __atomic_add(__mem, __val); else __atomic_add_single(__mem, __val); #pragma empty_line #pragma empty_line #pragma empty_line } #pragma empty_line #pragma empty_line } // namespace #pragma empty_line // Even if the CPU doesn't need a memory barrier, we need to ensure // that the compiler doesn't reorder memory accesses across the // barriers. #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ios_base.h" 2 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_classes.h" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/locale_classes.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.1 Locales // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_classes.h" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 1 3 // Components for manipulating sequences of characters -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, // 2005, 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/string * This is a Standard C++ Library header. */ #pragma empty_line // // ISO C++ 14882: 21 Strings library // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 38 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/allocator.h" 1 3 // Allocators -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, // 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * Copyright (c) 1996-1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/allocator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Define the base class to std::allocator. #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++allocator.h" 1 3 // Base to std::allocator -*- C++ -*- #pragma empty_line // Copyright (C) 2004, 2005, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/c++allocator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{memory} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Define new_allocator as the base class to std::allocator. #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/new_allocator.h" 1 3 // Allocator that wraps operator new -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file ext/new_allocator.h * This file is a GNU extension to the Standard C++ Library. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/new" 1 3 // The -*- C++ -*- dynamic memory management header. #pragma empty_line // Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, // 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation #pragma empty_line // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file new * This is a Standard C++ Library header. * * The header @c new defines several functions to manage dynamic memory and * handling memory allocation errors; see * http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/new" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma GCC visibility push(default) #pragma empty_line extern "C++" { #pragma empty_line namespace std { /** * @brief Exception possibly thrown by @c new. * @ingroup exceptions * * @c bad_alloc (or classes derived from it) is used to report allocation * errors from the throwing forms of @c new. */ class bad_alloc : public exception { public: bad_alloc() throw() { } #pragma empty_line // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118 virtual ~bad_alloc() throw(); #pragma empty_line // See comment in eh_exception.cc. virtual const char* what() const throw(); }; #pragma empty_line struct nothrow_t { }; #pragma empty_line extern const nothrow_t nothrow; #pragma empty_line /** If you write your own error handler to be called by @c new, it must * be of this type. */ typedef void (*new_handler)(); #pragma empty_line /// Takes a replacement handler as the argument, returns the /// previous handler. new_handler set_new_handler(new_handler) throw(); } // namespace std #pragma empty_line //@{ /** These are replaceable signatures: * - normal single new and delete (no arguments, throw @c bad_alloc on error) * - normal array new and delete (same) * - @c nothrow single new and delete (take a @c nothrow argument, return * @c NULL on error) * - @c nothrow array new and delete (same) * * Placement new and delete signatures (take a memory address argument, * does nothing) may not be replaced by a user's program. */ void* operator new(std::size_t) throw (std::bad_alloc); void* operator new[](std::size_t) throw (std::bad_alloc); void operator delete(void*) throw(); void operator delete[](void*) throw(); void* operator new(std::size_t, const std::nothrow_t&) throw(); void* operator new[](std::size_t, const std::nothrow_t&) throw(); void operator delete(void*, const std::nothrow_t&) throw(); void operator delete[](void*, const std::nothrow_t&) throw(); #pragma empty_line // Default placement versions of operator new. inline void* operator new(std::size_t, void* __p) throw() { return __p; } inline void* operator new[](std::size_t, void* __p) throw() { return __p; } #pragma empty_line // Default placement versions of operator delete. inline void operator delete (void*, void*) throw() { } inline void operator delete[](void*, void*) throw() { } //@} } // extern "C++" #pragma empty_line #pragma GCC visibility pop #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/new_allocator.h" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line using std::size_t; using std::ptrdiff_t; #pragma empty_line /** * @brief An allocator that uses global new, as per [20.4]. * @ingroup allocators * * This is precisely the allocator defined in the C++ Standard. * - all allocation calls operator new * - all deallocation calls operator delete */ template<typename _Tp> class new_allocator { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; #pragma empty_line template<typename _Tp1> struct rebind { typedef new_allocator<_Tp1> other; }; #pragma empty_line new_allocator() throw() { } #pragma empty_line new_allocator(const new_allocator&) throw() { } #pragma empty_line template<typename _Tp1> new_allocator(const new_allocator<_Tp1>&) throw() { } #pragma empty_line ~new_allocator() throw() { } #pragma empty_line pointer address(reference __x) const { return std::__addressof(__x); } #pragma empty_line const_pointer address(const_reference __x) const { return std::__addressof(__x); } #pragma empty_line // NB: __n is permitted to be 0. The C++ standard says nothing // about what the return value is when __n == 0. pointer allocate(size_type __n, const void* = 0) { if (__n > this->max_size()) std::__throw_bad_alloc(); #pragma empty_line return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); } #pragma empty_line // __p is not permitted to be a null pointer. void deallocate(pointer __p, size_type) { ::operator delete(__p); } #pragma empty_line size_type max_size() const throw() { return size_t(-1) / sizeof(_Tp); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 402. wrong new expression in [some_] allocator::construct void construct(pointer __p, const _Tp& __val) { ::new((void *)__p) _Tp(__val); } #pragma line 117 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/new_allocator.h" 3 void destroy(pointer __p) { __p->~_Tp(); } }; #pragma empty_line template<typename _Tp> inline bool operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return true; } #pragma empty_line template<typename _Tp> inline bool operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) { return false; } #pragma empty_line #pragma empty_line } // namespace #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/c++allocator.h" 2 3 #pragma line 49 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/allocator.h" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @defgroup allocators Allocators * @ingroup memory * * Classes encapsulating memory operations. */ #pragma empty_line template<typename _Tp> class allocator; #pragma empty_line /// allocator<void> specialization. template<> class allocator<void> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; #pragma empty_line template<typename _Tp1> struct rebind { typedef allocator<_Tp1> other; }; }; #pragma empty_line /** * @brief The @a standard allocator, as per [20.4]. * @ingroup allocators * * Further details: * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt04ch11.html */ template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> { public: typedef size_t size_type; typedef ptrdiff_t difference_type; typedef _Tp* pointer; typedef const _Tp* const_pointer; typedef _Tp& reference; typedef const _Tp& const_reference; typedef _Tp value_type; #pragma empty_line template<typename _Tp1> struct rebind { typedef allocator<_Tp1> other; }; #pragma empty_line allocator() throw() { } #pragma empty_line allocator(const allocator& __a) throw() : __gnu_cxx::new_allocator<_Tp>(__a) { } #pragma empty_line template<typename _Tp1> allocator(const allocator<_Tp1>&) throw() { } #pragma empty_line ~allocator() throw() { } #pragma empty_line // Inherit everything else. }; #pragma empty_line template<typename _T1, typename _T2> inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) { return true; } #pragma empty_line template<typename _Tp> inline bool operator==(const allocator<_Tp>&, const allocator<_Tp>&) { return true; } #pragma empty_line template<typename _T1, typename _T2> inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&) { return false; } #pragma empty_line template<typename _Tp> inline bool operator!=(const allocator<_Tp>&, const allocator<_Tp>&) { return false; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class allocator<char>; extern template class allocator<wchar_t>; #pragma empty_line #pragma empty_line // Undefine. #pragma empty_line #pragma empty_line // To implement Option 3 of DR 431. template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_swap { static void _S_do_it(_Alloc&, _Alloc&) { } }; #pragma empty_line template<typename _Alloc> struct __alloc_swap<_Alloc, false> { static void _S_do_it(_Alloc& __one, _Alloc& __two) { // Precondition: swappable allocators. if (__one != __two) swap(__one, __two); } }; #pragma empty_line // Optimize for stateless allocators. template<typename _Alloc, bool = __is_empty(_Alloc)> struct __alloc_neq { static bool _S_do_it(const _Alloc&, const _Alloc&) { return false; } }; #pragma empty_line template<typename _Alloc> struct __alloc_neq<_Alloc, false> { static bool _S_do_it(const _Alloc& __one, const _Alloc& __two) { return __one != __two; } }; #pragma line 237 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/allocator.h" 3 } // namespace std #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 2 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ostream_insert.h" 1 3 // Helpers for ostream inserters -*- C++ -*- #pragma empty_line // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/ostream_insert.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ostream} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 33 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ostream_insert.h" 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/cxxabi_forced.h" 1 3 // cxxabi.h subset for cancellation -*- C++ -*- #pragma empty_line // Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/cxxabi_forced.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{cxxabi.h} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 34 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/cxxabi_forced.h" 3 #pragma empty_line #pragma GCC visibility push(default) #pragma empty_line #pragma empty_line namespace __cxxabiv1 { /** * @brief Thrown as part of forced unwinding. * @ingroup exceptions * * A magic placeholder class that can be caught by reference to * recognize forced unwinding. */ class __forced_unwind { virtual ~__forced_unwind() throw(); #pragma empty_line // Prevent catch by value. virtual void __pure_dummy() = 0; }; } #pragma empty_line #pragma empty_line #pragma GCC visibility pop #pragma line 36 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ostream_insert.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits> inline void __ostream_write(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; #pragma empty_line const streamsize __put = __out.rdbuf()->sputn(__s, __n); if (__put != __n) __out.setstate(__ios_base::badbit); } #pragma empty_line template<typename _CharT, typename _Traits> inline void __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; #pragma empty_line const _CharT __c = __out.fill(); for (; __n > 0; --__n) { const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); if (_Traits::eq_int_type(__put, _Traits::eof())) { __out.setstate(__ios_base::badbit); break; } } } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& __ostream_insert(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s, streamsize __n) { typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef typename __ostream_type::ios_base __ios_base; #pragma empty_line typename __ostream_type::sentry __cerb(__out); if (__cerb) { if (true) { const streamsize __w = __out.width(); if (__w > __n) { const bool __left = ((__out.flags() & __ios_base::adjustfield) == __ios_base::left); if (!__left) __ostream_fill(__out, __w - __n); if (__out.good()) __ostream_write(__out, __s, __n); if (__left && __out.good()) __ostream_fill(__out, __w - __n); } else __ostream_write(__out, __s, __n); __out.width(0); } if (false) { __out._M_setstate(__ios_base::badbit); ; } if (false) { __out._M_setstate(__ios_base::badbit); } } return __out; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template ostream& __ostream_insert(ostream&, const char*, streamsize); #pragma empty_line #pragma empty_line extern template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 46 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_function.h" 1 3 // Functor implementations -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file bits/stl_function.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // 20.3.1 base classes /** @defgroup functors Function Objects * @ingroup utilities * * Function objects, or @e functors, are objects with an @c operator() * defined and accessible. They can be passed as arguments to algorithm * templates and used in place of a function pointer. Not only is the * resulting expressiveness of the library increased, but the generated * code can be more efficient than what you might write by hand. When we * refer to @a functors, then, generally we include function pointers in * the description as well. * * Often, functors are only created as temporaries passed to algorithm * calls, rather than being created as named variables. * * Two examples taken from the standard itself follow. To perform a * by-element addition of two vectors @c a and @c b containing @c double, * and put the result in @c a, use * \code * transform (a.begin(), a.end(), b.begin(), a.begin(), plus<double>()); * \endcode * To negate every element in @c a, use * \code * transform(a.begin(), a.end(), a.begin(), negate<double>()); * \endcode * The addition and negation functions will be inlined directly. * * The standard functors are derived from structs named @c unary_function * and @c binary_function. These two classes contain nothing but typedefs, * to aid in generic (template) programming. If you write your own * functors, you might consider doing the same. * * @{ */ /** * This is one of the @link functors functor base classes@endlink. */ template<typename _Arg, typename _Result> struct unary_function { /// @c argument_type is the type of the argument typedef _Arg argument_type; #pragma empty_line /// @c result_type is the return type typedef _Result result_type; }; #pragma empty_line /** * This is one of the @link functors functor base classes@endlink. */ template<typename _Arg1, typename _Arg2, typename _Result> struct binary_function { /// @c first_argument_type is the type of the first argument typedef _Arg1 first_argument_type; #pragma empty_line /// @c second_argument_type is the type of the second argument typedef _Arg2 second_argument_type; #pragma empty_line /// @c result_type is the return type typedef _Result result_type; }; /** @} */ #pragma empty_line // 20.3.2 arithmetic /** @defgroup arithmetic_functors Arithmetic Classes * @ingroup functors * * Because basic math often needs to be done during an algorithm, * the library provides functors for those operations. See the * documentation for @link functors the base classes@endlink * for examples of their use. * * @{ */ /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct plus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } }; #pragma empty_line /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct minus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } }; #pragma empty_line /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct multiplies : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } }; #pragma empty_line /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct divides : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } }; #pragma empty_line /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct modulus : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } }; #pragma empty_line /// One of the @link arithmetic_functors math functors@endlink. template<typename _Tp> struct negate : public unary_function<_Tp, _Tp> { _Tp operator()(const _Tp& __x) const { return -__x; } }; /** @} */ #pragma empty_line // 20.3.3 comparisons /** @defgroup comparison_functors Comparison Classes * @ingroup functors * * The library provides six wrapper functors for all the basic comparisons * in C++, like @c <. * * @{ */ /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } }; #pragma empty_line /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct not_equal_to : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } }; #pragma empty_line /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct greater : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } }; #pragma empty_line /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct less : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } }; #pragma empty_line /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct greater_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } }; #pragma empty_line /// One of the @link comparison_functors comparison functors@endlink. template<typename _Tp> struct less_equal : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } }; /** @} */ #pragma empty_line // 20.3.4 logical operations /** @defgroup logical_functors Boolean Operations Classes * @ingroup functors * * Here are wrapper functors for Boolean operations: @c &&, @c ||, * and @c !. * * @{ */ /// One of the @link logical_functors Boolean operations functors@endlink. template<typename _Tp> struct logical_and : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } }; #pragma empty_line /// One of the @link logical_functors Boolean operations functors@endlink. template<typename _Tp> struct logical_or : public binary_function<_Tp, _Tp, bool> { bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } }; #pragma empty_line /// One of the @link logical_functors Boolean operations functors@endlink. template<typename _Tp> struct logical_not : public unary_function<_Tp, bool> { bool operator()(const _Tp& __x) const { return !__x; } }; /** @} */ #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 660. Missing Bitwise Operations. template<typename _Tp> struct bit_and : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x & __y; } }; #pragma empty_line template<typename _Tp> struct bit_or : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x | __y; } }; #pragma empty_line template<typename _Tp> struct bit_xor : public binary_function<_Tp, _Tp, _Tp> { _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x ^ __y; } }; #pragma empty_line // 20.3.5 negators /** @defgroup negators Negators * @ingroup functors * * The functions @c not1 and @c not2 each take a predicate functor * and return an instance of @c unary_negate or * @c binary_negate, respectively. These classes are functors whose * @c operator() performs the stored predicate function and then returns * the negation of the result. * * For example, given a vector of integers and a trivial predicate, * \code * struct IntGreaterThanThree * : public std::unary_function<int, bool> * { * bool operator() (int x) { return x > 3; } * }; * * std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree())); * \endcode * The call to @c find_if will locate the first index (i) of @c v for which * <code>!(v[i] > 3)</code> is true. * * The not1/unary_negate combination works on predicates taking a single * argument. The not2/binary_negate combination works on predicates which * take two arguments. * * @{ */ /// One of the @link negators negation functors@endlink. template<typename _Predicate> class unary_negate : public unary_function<typename _Predicate::argument_type, bool> { protected: _Predicate _M_pred; #pragma empty_line public: explicit unary_negate(const _Predicate& __x) : _M_pred(__x) { } #pragma empty_line bool operator()(const typename _Predicate::argument_type& __x) const { return !_M_pred(__x); } }; #pragma empty_line /// One of the @link negators negation functors@endlink. template<typename _Predicate> inline unary_negate<_Predicate> not1(const _Predicate& __pred) { return unary_negate<_Predicate>(__pred); } #pragma empty_line /// One of the @link negators negation functors@endlink. template<typename _Predicate> class binary_negate : public binary_function<typename _Predicate::first_argument_type, typename _Predicate::second_argument_type, bool> { protected: _Predicate _M_pred; #pragma empty_line public: explicit binary_negate(const _Predicate& __x) : _M_pred(__x) { } #pragma empty_line bool operator()(const typename _Predicate::first_argument_type& __x, const typename _Predicate::second_argument_type& __y) const { return !_M_pred(__x, __y); } }; #pragma empty_line /// One of the @link negators negation functors@endlink. template<typename _Predicate> inline binary_negate<_Predicate> not2(const _Predicate& __pred) { return binary_negate<_Predicate>(__pred); } /** @} */ #pragma empty_line // 20.3.7 adaptors pointers functions /** @defgroup pointer_adaptors Adaptors for pointers to functions * @ingroup functors * * The advantage of function objects over pointers to functions is that * the objects in the standard library declare nested typedefs describing * their argument and result types with uniform names (e.g., @c result_type * from the base classes @c unary_function and @c binary_function). * Sometimes those typedefs are required, not just optional. * * Adaptors are provided to turn pointers to unary (single-argument) and * binary (double-argument) functions into function objects. The * long-winded functor @c pointer_to_unary_function is constructed with a * function pointer @c f, and its @c operator() called with argument @c x * returns @c f(x). The functor @c pointer_to_binary_function does the same * thing, but with a double-argument @c f and @c operator(). * * The function @c ptr_fun takes a pointer-to-function @c f and constructs * an instance of the appropriate functor. * * @{ */ /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg, typename _Result> class pointer_to_unary_function : public unary_function<_Arg, _Result> { protected: _Result (*_M_ptr)(_Arg); #pragma empty_line public: pointer_to_unary_function() { } #pragma empty_line explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) { } #pragma empty_line _Result operator()(_Arg __x) const { return _M_ptr(__x); } }; #pragma empty_line /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg, typename _Result> inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg)) { return pointer_to_unary_function<_Arg, _Result>(__x); } #pragma empty_line /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg1, typename _Arg2, typename _Result> class pointer_to_binary_function : public binary_function<_Arg1, _Arg2, _Result> { protected: _Result (*_M_ptr)(_Arg1, _Arg2); #pragma empty_line public: pointer_to_binary_function() { } #pragma empty_line explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) : _M_ptr(__x) { } #pragma empty_line _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_ptr(__x, __y); } }; #pragma empty_line /// One of the @link pointer_adaptors adaptors for function pointers@endlink. template<typename _Arg1, typename _Arg2, typename _Result> inline pointer_to_binary_function<_Arg1, _Arg2, _Result> ptr_fun(_Result (*__x)(_Arg1, _Arg2)) { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } /** @} */ #pragma empty_line template<typename _Tp> struct _Identity : public unary_function<_Tp,_Tp> { _Tp& operator()(_Tp& __x) const { return __x; } #pragma empty_line const _Tp& operator()(const _Tp& __x) const { return __x; } }; #pragma empty_line template<typename _Pair> struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { typename _Pair::first_type& operator()(_Pair& __x) const { return __x.first; } #pragma empty_line const typename _Pair::first_type& operator()(const _Pair& __x) const { return __x.first; } #pragma line 508 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_function.h" 3 }; #pragma empty_line template<typename _Pair> struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> { typename _Pair::second_type& operator()(_Pair& __x) const { return __x.second; } #pragma empty_line const typename _Pair::second_type& operator()(const _Pair& __x) const { return __x.second; } }; #pragma empty_line // 20.3.8 adaptors pointers members /** @defgroup memory_adaptors Adaptors for pointers to members * @ingroup functors * * There are a total of 8 = 2^3 function objects in this family. * (1) Member functions taking no arguments vs member functions taking * one argument. * (2) Call through pointer vs call through reference. * (3) Const vs non-const member function. * * All of this complexity is in the function objects themselves. You can * ignore it by using the helper function mem_fun and mem_fun_ref, * which create whichever type of adaptor is appropriate. * * @{ */ /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class mem_fun_t : public unary_function<_Tp*, _Ret> { public: explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } #pragma empty_line _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } #pragma empty_line private: _Ret (_Tp::*_M_f)(); }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class const_mem_fun_t : public unary_function<const _Tp*, _Ret> { public: explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } #pragma empty_line _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } #pragma empty_line private: _Ret (_Tp::*_M_f)() const; }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) { } #pragma empty_line _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } #pragma empty_line private: _Ret (_Tp::*_M_f)(); }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp> class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> { public: explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) { } #pragma empty_line _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } #pragma empty_line private: _Ret (_Tp::*_M_f)() const; }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> { public: explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } #pragma empty_line _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } #pragma empty_line private: _Ret (_Tp::*_M_f)(_Arg); }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class const_mem_fun1_t : public binary_function<const _Tp*, _Arg, _Ret> { public: explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } #pragma empty_line _Ret operator()(const _Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } #pragma empty_line private: _Ret (_Tp::*_M_f)(_Arg) const; }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) { } #pragma empty_line _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } #pragma empty_line private: _Ret (_Tp::*_M_f)(_Arg); }; #pragma empty_line /// One of the @link memory_adaptors adaptors for member /// pointers@endlink. template<typename _Ret, typename _Tp, typename _Arg> class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> { public: explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) { } #pragma empty_line _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } #pragma empty_line private: _Ret (_Tp::*_M_f)(_Arg) const; }; #pragma empty_line // Mem_fun adaptor helper functions. There are only two: // mem_fun and mem_fun_ref. template<typename _Ret, typename _Tp> inline mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)()) { return mem_fun_t<_Ret, _Tp>(__f); } #pragma empty_line template<typename _Ret, typename _Tp> inline const_mem_fun_t<_Ret, _Tp> mem_fun(_Ret (_Tp::*__f)() const) { return const_mem_fun_t<_Ret, _Tp>(__f); } #pragma empty_line template<typename _Ret, typename _Tp> inline mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)()) { return mem_fun_ref_t<_Ret, _Tp>(__f); } #pragma empty_line template<typename _Ret, typename _Tp> inline const_mem_fun_ref_t<_Ret, _Tp> mem_fun_ref(_Ret (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } #pragma empty_line template<typename _Ret, typename _Tp, typename _Arg> inline mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } #pragma empty_line template<typename _Ret, typename _Tp, typename _Arg> inline const_mem_fun1_t<_Ret, _Tp, _Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } #pragma empty_line template<typename _Ret, typename _Tp, typename _Arg> inline mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } #pragma empty_line template<typename _Ret, typename _Tp, typename _Arg> inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } #pragma empty_line /** @} */ #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/backward/binders.h" 1 3 // Functor implementations -*- C++ -*- #pragma empty_line // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996-1998 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ #pragma empty_line /** @file backward/binders.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{functional} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // 20.3.6 binders /** @defgroup binders Binder Classes * @ingroup functors * * Binders turn functions/functors with two arguments into functors * with a single argument, storing an argument to be applied later. * For example, a variable @c B of type @c binder1st is constructed * from a functor @c f and an argument @c x. Later, B's @c * operator() is called with a single argument @c y. The return * value is the value of @c f(x,y). @c B can be @a called with * various arguments (y1, y2, ...) and will in turn call @c * f(x,y1), @c f(x,y2), ... * * The function @c bind1st is provided to save some typing. It takes the * function and an argument as parameters, and returns an instance of * @c binder1st. * * The type @c binder2nd and its creator function @c bind2nd do the same * thing, but the stored argument is passed as the second parameter instead * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a * functor whose @c operator() accepts a floating-point number, subtracts * 1.3 from it, and returns the result. (If @c bind1st had been used, * the functor would perform <em>1.3 - x</em> instead. * * Creator-wrapper functions like @c bind1st are intended to be used in * calling algorithms. Their return values will be temporary objects. * (The goal is to not require you to type names like * @c std::binder1st<std::plus<int>> for declaring a variable to hold the * return value from @c bind1st(std::plus<int>,5). * * These become more useful when combined with the composition functions. * * @{ */ /// One of the @link binders binder functors@endlink. template<typename _Operation> class binder1st : public unary_function<typename _Operation::second_argument_type, typename _Operation::result_type> { protected: _Operation op; typename _Operation::first_argument_type value; #pragma empty_line public: binder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : op(__x), value(__y) { } #pragma empty_line typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { return op(value, __x); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 109. Missing binders for non-const sequence elements typename _Operation::result_type operator()(typename _Operation::second_argument_type& __x) const { return op(value, __x); } } ; #pragma empty_line /// One of the @link binders binder functors@endlink. template<typename _Operation, typename _Tp> inline binder1st<_Operation> bind1st(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return binder1st<_Operation>(__fn, _Arg1_type(__x)); } #pragma empty_line /// One of the @link binders binder functors@endlink. template<typename _Operation> class binder2nd : public unary_function<typename _Operation::first_argument_type, typename _Operation::result_type> { protected: _Operation op; typename _Operation::second_argument_type value; #pragma empty_line public: binder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : op(__x), value(__y) { } #pragma empty_line typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { return op(__x, value); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 109. Missing binders for non-const sequence elements typename _Operation::result_type operator()(typename _Operation::first_argument_type& __x) const { return op(__x, value); } } ; #pragma empty_line /// One of the @link binders binder functors@endlink. template<typename _Operation, typename _Tp> inline binder2nd<_Operation> bind2nd(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return binder2nd<_Operation>(__fn, _Arg2_type(__x)); } /** @} */ #pragma empty_line #pragma empty_line } // namespace #pragma line 732 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/stl_function.h" 2 3 #pragma line 50 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 2 3 #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/range_access.h" 1 3 // <range_access.h> -*- C++ -*- #pragma empty_line // Copyright (C) 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/range_access.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 33 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/range_access.h" 3 #pragma line 53 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 1 3 // Components for manipulating sequences of characters -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/basic_string.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ #pragma empty_line // // ISO C++ 14882: 21 Strings library // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/initializer_list" 1 3 // std::initializer_list support -*- C++ -*- #pragma empty_line // Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. // // This file is part of GCC. // // GCC is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. // // GCC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file initializer_list * This is a Standard C++ Library header. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 33 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/initializer_list" 3 #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @class basic_string basic_string.h <string> * @brief Managing sequences of characters and character-like objects. * * @ingroup strings * @ingroup sequences * * Meets the requirements of a <a href="tables.html#65">container</a>, a * <a href="tables.html#66">reversible container</a>, and a * <a href="tables.html#67">sequence</a>. Of the * <a href="tables.html#68">optional sequence requirements</a>, only * @c push_back, @c at, and @c %array access are supported. * * @doctodo * * * Documentation? What's that? * Nathan Myers <ncm@cantrip.org>. * * A string looks like this: * * @code * [_Rep] * _M_length * [basic_string<char_type>] _M_capacity * _M_dataplus _M_refcount * _M_p ----------------> unnamed array of char_type * @endcode * * Where the _M_p points to the first character in the string, and * you cast it to a pointer-to-_Rep and subtract 1 to get a * pointer to the header. * * This approach has the enormous advantage that a string object * requires only one allocation. All the ugliness is confined * within a single %pair of inline functions, which each compile to * a single @a add instruction: _Rep::_M_data(), and * string::_M_rep(); and the allocation function which gets a * block of raw bytes and with room enough and constructs a _Rep * object at the front. * * The reason you want _M_data pointing to the character %array and * not the _Rep is so that the debugger can see the string * contents. (Probably we should add a non-inline member to get * the _Rep for the debugger to use, so users can check the actual * string length.) * * Note that the _Rep object is a POD so that you can have a * static <em>empty string</em> _Rep object already @a constructed before * static constructors have run. The reference-count encoding is * chosen so that a 0 indicates one reference, so you never try to * destroy the empty-string _Rep object. * * All but the last paragraph is considered pretty conventional * for a C++ string implementation. */ // 21.3 Template class basic_string template<typename _CharT, typename _Traits, typename _Alloc> class basic_string { typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; #pragma empty_line // Types: public: typedef _Traits traits_type; typedef typename _Traits::char_type value_type; typedef _Alloc allocator_type; typedef typename _CharT_alloc_type::size_type size_type; typedef typename _CharT_alloc_type::difference_type difference_type; typedef typename _CharT_alloc_type::reference reference; typedef typename _CharT_alloc_type::const_reference const_reference; typedef typename _CharT_alloc_type::pointer pointer; typedef typename _CharT_alloc_type::const_pointer const_pointer; typedef __gnu_cxx::__normal_iterator<pointer, basic_string> iterator; typedef __gnu_cxx::__normal_iterator<const_pointer, basic_string> const_iterator; typedef std::reverse_iterator<const_iterator> const_reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator; #pragma empty_line private: // _Rep: string representation // Invariants: // 1. String really contains _M_length + 1 characters: due to 21.3.4 // must be kept null-terminated. // 2. _M_capacity >= _M_length // Allocated memory is always (_M_capacity + 1) * sizeof(_CharT). // 3. _M_refcount has three states: // -1: leaked, one reference, no ref-copies allowed, non-const. // 0: one reference, non-const. // n>0: n + 1 references, operations require a lock, const. // 4. All fields==0 is an empty string, given the extra storage // beyond-the-end for a null terminator; thus, the shared // empty string representation needs no constructor. #pragma empty_line struct _Rep_base { size_type _M_length; size_type _M_capacity; _Atomic_word _M_refcount; }; #pragma empty_line struct _Rep : _Rep_base { // Types: typedef typename _Alloc::template rebind<char>::other _Raw_bytes_alloc; #pragma empty_line // (Public) Data members: #pragma empty_line // The maximum number of individual char_type elements of an // individual string is determined by _S_max_size. This is the // value that will be returned by max_size(). (Whereas npos // is the maximum number of bytes the allocator can allocate.) // If one was to divvy up the theoretical largest size string, // with a terminating character and m _CharT elements, it'd // look like this: // npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT) // Solving for m: // m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1 // In addition, this implementation quarters this amount. static const size_type _S_max_size; static const _CharT _S_terminal; #pragma empty_line // The following storage is init'd to 0 by the linker, resulting // (carefully) in an empty string with one reference. static size_type _S_empty_rep_storage[]; #pragma empty_line static _Rep& _S_empty_rep() { // NB: Mild hack to avoid strict-aliasing warnings. Note that // _S_empty_rep_storage is never modified and the punning should // be reasonably safe in this case. void* __p = reinterpret_cast<void*>(&_S_empty_rep_storage); return *reinterpret_cast<_Rep*>(__p); } #pragma empty_line bool _M_is_leaked() const { return this->_M_refcount < 0; } #pragma empty_line bool _M_is_shared() const { return this->_M_refcount > 0; } #pragma empty_line void _M_set_leaked() { this->_M_refcount = -1; } #pragma empty_line void _M_set_sharable() { this->_M_refcount = 0; } #pragma empty_line void _M_set_length_and_sharable(size_type __n) { #pragma empty_line if (__builtin_expect(this != &_S_empty_rep(), false)) #pragma empty_line { this->_M_set_sharable(); // One reference. this->_M_length = __n; traits_type::assign(this->_M_refdata()[__n], _S_terminal); // grrr. (per 21.3.4) // You cannot leave those LWG people alone for a second. } } #pragma empty_line _CharT* _M_refdata() throw() { return reinterpret_cast<_CharT*>(this + 1); } #pragma empty_line _CharT* _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) { return (!_M_is_leaked() && __alloc1 == __alloc2) ? _M_refcopy() : _M_clone(__alloc1); } #pragma empty_line // Create & Destroy static _Rep* _S_create(size_type, size_type, const _Alloc&); #pragma empty_line void _M_dispose(const _Alloc& __a) { #pragma empty_line if (__builtin_expect(this != &_S_empty_rep(), false)) #pragma empty_line { // Be race-detector-friendly. For more info see bits/c++config. ; if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) { ; _M_destroy(__a); } } } // XXX MT #pragma empty_line void _M_destroy(const _Alloc&) throw(); #pragma empty_line _CharT* _M_refcopy() throw() { #pragma empty_line if (__builtin_expect(this != &_S_empty_rep(), false)) #pragma empty_line __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); return _M_refdata(); } // XXX MT #pragma empty_line _CharT* _M_clone(const _Alloc&, size_type __res = 0); }; #pragma empty_line // Use empty-base optimization: http://www.cantrip.org/emptyopt.html struct _Alloc_hider : _Alloc { _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { } #pragma empty_line _CharT* _M_p; // The actual data. }; #pragma empty_line public: // Data Members (public): // NB: This is an unsigned type, and thus represents the maximum // size that the allocator can hold. /// Value returned by various member functions when they fail. static const size_type npos = static_cast<size_type>(-1); #pragma empty_line private: // Data Members (private): mutable _Alloc_hider _M_dataplus; #pragma empty_line _CharT* _M_data() const { return _M_dataplus._M_p; } #pragma empty_line _CharT* _M_data(_CharT* __p) { return (_M_dataplus._M_p = __p); } #pragma empty_line _Rep* _M_rep() const { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } #pragma empty_line // For the internal use we have functions similar to `begin'/`end' // but they do not call _M_leak. iterator _M_ibegin() const { return iterator(_M_data()); } #pragma empty_line iterator _M_iend() const { return iterator(_M_data() + this->size()); } #pragma empty_line void _M_leak() // for use in begin() & non-const op[] { if (!_M_rep()->_M_is_leaked()) _M_leak_hard(); } #pragma empty_line size_type _M_check(size_type __pos, const char* __s) const { if (__pos > this->size()) __throw_out_of_range((__s)); return __pos; } #pragma empty_line void _M_check_length(size_type __n1, size_type __n2, const char* __s) const { if (this->max_size() - (this->size() - __n1) < __n2) __throw_length_error((__s)); } #pragma empty_line // NB: _M_limit doesn't check for a bad __pos value. size_type _M_limit(size_type __pos, size_type __off) const { const bool __testoff = __off < this->size() - __pos; return __testoff ? __off : this->size() - __pos; } #pragma empty_line // True if _Rep and source do not overlap. bool _M_disjunct(const _CharT* __s) const { return (less<const _CharT*>()(__s, _M_data()) || less<const _CharT*>()(_M_data() + this->size(), __s)); } #pragma empty_line // When __n = 1 way faster than the general multichar // traits_type::copy/move/assign. static void _M_copy(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::copy(__d, __s, __n); } #pragma empty_line static void _M_move(_CharT* __d, const _CharT* __s, size_type __n) { if (__n == 1) traits_type::assign(*__d, *__s); else traits_type::move(__d, __s, __n); } #pragma empty_line static void _M_assign(_CharT* __d, size_type __n, _CharT __c) { if (__n == 1) traits_type::assign(*__d, __c); else traits_type::assign(__d, __n, __c); } #pragma empty_line // _S_copy_chars is a separate template to permit specialization // to optimize for the common case of pointers as iterators. template<class _Iterator> static void _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) { for (; __k1 != __k2; ++__k1, ++__p) traits_type::assign(*__p, *__k1); // These types are off. } #pragma empty_line static void _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } #pragma empty_line static void _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) { _S_copy_chars(__p, __k1.base(), __k2.base()); } #pragma empty_line static void _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } #pragma empty_line static void _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) { _M_copy(__p, __k1, __k2 - __k1); } #pragma empty_line static int _S_compare(size_type __n1, size_type __n2) { const difference_type __d = difference_type(__n1 - __n2); #pragma empty_line if (__d > __gnu_cxx::__numeric_traits<int>::__max) return __gnu_cxx::__numeric_traits<int>::__max; else if (__d < __gnu_cxx::__numeric_traits<int>::__min) return __gnu_cxx::__numeric_traits<int>::__min; else return int(__d); } #pragma empty_line void _M_mutate(size_type __pos, size_type __len1, size_type __len2); #pragma empty_line void _M_leak_hard(); #pragma empty_line static _Rep& _S_empty_rep() { return _Rep::_S_empty_rep(); } #pragma empty_line public: // Construct/copy/destroy: // NB: We overload ctors in some cases instead of using default // arguments, per 17.4.4.4 para. 2 item 2. #pragma empty_line /** * @brief Default constructor creates an empty string. */ basic_string() #pragma empty_line : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /** * @brief Construct an empty string using allocator @a a. */ explicit basic_string(const _Alloc& __a); #pragma empty_line // NB: per LWG issue 42, semantics different from IS: /** * @brief Construct string with copy of value of @a str. * @param str Source string. */ basic_string(const basic_string& __str); /** * @brief Construct string as copy of a substring. * @param str Source string. * @param pos Index of first character to copy from. * @param n Number of characters to copy (default remainder). */ basic_string(const basic_string& __str, size_type __pos, size_type __n = npos); /** * @brief Construct string as copy of a substring. * @param str Source string. * @param pos Index of first character to copy from. * @param n Number of characters to copy. * @param a Allocator to use. */ basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a); #pragma empty_line /** * @brief Construct string initialized by a character %array. * @param s Source character %array. * @param n Number of characters to copy. * @param a Allocator to use (default is default allocator). * * NB: @a s must have at least @a n characters, &apos;\\0&apos; * has no special meaning. */ basic_string(const _CharT* __s, size_type __n, const _Alloc& __a = _Alloc()); /** * @brief Construct string as copy of a C string. * @param s Source C string. * @param a Allocator to use (default is default allocator). */ basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); /** * @brief Construct string as multiple characters. * @param n Number of characters. * @param c Character to use. * @param a Allocator to use (default is default allocator). */ basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); #pragma line 519 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Construct string as copy of a range. * @param beg Start of range. * @param end End of range. * @param a Allocator to use (default is default allocator). */ template<class _InputIterator> basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a = _Alloc()); #pragma empty_line /** * @brief Destroy the string instance. */ ~basic_string() { _M_rep()->_M_dispose(this->get_allocator()); } #pragma empty_line /** * @brief Assign the value of @a str to this string. * @param str Source string. */ basic_string& operator=(const basic_string& __str) { return this->assign(__str); } #pragma empty_line /** * @brief Copy contents of @a s into this string. * @param s Source null-terminated string. */ basic_string& operator=(const _CharT* __s) { return this->assign(__s); } #pragma empty_line /** * @brief Set value to string of length 1. * @param c Source character. * * Assigning to a character makes this string length 1 and * (*this)[0] == @a c. */ basic_string& operator=(_CharT __c) { this->assign(1, __c); return *this; } #pragma line 593 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 // Iterators: /** * Returns a read/write iterator that points to the first character in * the %string. Unshares the string. */ iterator begin() { _M_leak(); return iterator(_M_data()); } #pragma empty_line /** * Returns a read-only (constant) iterator that points to the first * character in the %string. */ const_iterator begin() const { return const_iterator(_M_data()); } #pragma empty_line /** * Returns a read/write iterator that points one past the last * character in the %string. Unshares the string. */ iterator end() { _M_leak(); return iterator(_M_data() + this->size()); } #pragma empty_line /** * Returns a read-only (constant) iterator that points one past the * last character in the %string. */ const_iterator end() const { return const_iterator(_M_data() + this->size()); } #pragma empty_line /** * Returns a read/write reverse iterator that points to the last * character in the %string. Iteration is done in reverse element * order. Unshares the string. */ reverse_iterator rbegin() { return reverse_iterator(this->end()); } #pragma empty_line /** * Returns a read-only (constant) reverse iterator that points * to the last character in the %string. Iteration is done in * reverse element order. */ const_reverse_iterator rbegin() const { return const_reverse_iterator(this->end()); } #pragma empty_line /** * Returns a read/write reverse iterator that points to one before the * first character in the %string. Iteration is done in reverse * element order. Unshares the string. */ reverse_iterator rend() { return reverse_iterator(this->begin()); } #pragma empty_line /** * Returns a read-only (constant) reverse iterator that points * to one before the first character in the %string. Iteration * is done in reverse element order. */ const_reverse_iterator rend() const { return const_reverse_iterator(this->begin()); } #pragma line 704 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 public: // Capacity: /// Returns the number of characters in the string, not including any /// null-termination. size_type size() const { return _M_rep()->_M_length; } #pragma empty_line /// Returns the number of characters in the string, not including any /// null-termination. size_type length() const { return _M_rep()->_M_length; } #pragma empty_line /// Returns the size() of the largest possible %string. size_type max_size() const { return _Rep::_S_max_size; } #pragma empty_line /** * @brief Resizes the %string to the specified number of characters. * @param n Number of characters the %string should contain. * @param c Character to fill any new elements. * * This function will %resize the %string to the specified * number of characters. If the number is smaller than the * %string's current size the %string is truncated, otherwise * the %string is extended and new elements are %set to @a c. */ void resize(size_type __n, _CharT __c); #pragma empty_line /** * @brief Resizes the %string to the specified number of characters. * @param n Number of characters the %string should contain. * * This function will resize the %string to the specified length. If * the new size is smaller than the %string's current size the %string * is truncated, otherwise the %string is extended and new characters * are default-constructed. For basic types such as char, this means * setting them to 0. */ void resize(size_type __n) { this->resize(__n, _CharT()); } #pragma line 762 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * Returns the total number of characters that the %string can hold * before needing to allocate more memory. */ size_type capacity() const { return _M_rep()->_M_capacity; } #pragma empty_line /** * @brief Attempt to preallocate enough memory for specified number of * characters. * @param res_arg Number of characters required. * @throw std::length_error If @a res_arg exceeds @c max_size(). * * This function attempts to reserve enough memory for the * %string to hold the specified number of characters. If the * number requested is more than max_size(), length_error is * thrown. * * The advantage of this function is that if optimal code is a * necessity and the user can determine the string length that will be * required, the user can reserve the memory in %advance, and thus * prevent a possible reallocation of memory and copying of %string * data. */ void reserve(size_type __res_arg = 0); #pragma empty_line /** * Erases the string, making it empty. */ void clear() { _M_mutate(0, this->size(), 0); } #pragma empty_line /** * Returns true if the %string is empty. Equivalent to * <code>*this == ""</code>. */ bool empty() const { return this->size() == 0; } #pragma empty_line // Element access: /** * @brief Subscript access to the data contained in the %string. * @param pos The index of the character to access. * @return Read-only (constant) reference to the character. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) */ const_reference operator[] (size_type __pos) const { ; return _M_data()[__pos]; } #pragma empty_line /** * @brief Subscript access to the data contained in the %string. * @param pos The index of the character to access. * @return Read/write reference to the character. * * This operator allows for easy, array-style, data access. * Note that data access with this operator is unchecked and * out_of_range lookups are not defined. (For checked lookups * see at().) Unshares the string. */ reference operator[](size_type __pos) { // allow pos == size() as v3 extension: ; // but be strict in pedantic mode: ; _M_leak(); return _M_data()[__pos]; } #pragma empty_line /** * @brief Provides access to the data contained in the %string. * @param n The index of the character to access. * @return Read-only (const) reference to the character. * @throw std::out_of_range If @a n is an invalid index. * * This function provides for safer data access. The parameter is * first checked that it is in the range of the string. The function * throws out_of_range if the check fails. */ const_reference at(size_type __n) const { if (__n >= this->size()) __throw_out_of_range(("basic_string::at")); return _M_data()[__n]; } #pragma line 896 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Provides access to the data contained in the %string. * @param n The index of the character to access. * @return Read/write reference to the character. * @throw std::out_of_range If @a n is an invalid index. * * This function provides for safer data access. The parameter is * first checked that it is in the range of the string. The function * throws out_of_range if the check fails. Success results in * unsharing the string. */ reference at(size_type __n) { if (__n >= size()) __throw_out_of_range(("basic_string::at")); _M_leak(); return _M_data()[__n]; } #pragma empty_line // Modifiers: /** * @brief Append a string to this string. * @param str The string to append. * @return Reference to this string. */ basic_string& operator+=(const basic_string& __str) { return this->append(__str); } #pragma empty_line /** * @brief Append a C string. * @param s The C string to append. * @return Reference to this string. */ basic_string& operator+=(const _CharT* __s) { return this->append(__s); } #pragma empty_line /** * @brief Append a character. * @param c The character to append. * @return Reference to this string. */ basic_string& operator+=(_CharT __c) { this->push_back(__c); return *this; } #pragma line 958 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Append a string to this string. * @param str The string to append. * @return Reference to this string. */ basic_string& append(const basic_string& __str); #pragma empty_line /** * @brief Append a substring. * @param str The string to append. * @param pos Index of the first character of str to append. * @param n The number of characters to append. * @return Reference to this string. * @throw std::out_of_range if @a pos is not a valid index. * * This function appends @a n characters from @a str starting at @a pos * to this string. If @a n is is larger than the number of available * characters in @a str, the remainder of @a str is appended. */ basic_string& append(const basic_string& __str, size_type __pos, size_type __n); #pragma empty_line /** * @brief Append a C substring. * @param s The C string to append. * @param n The number of characters to append. * @return Reference to this string. */ basic_string& append(const _CharT* __s, size_type __n); #pragma empty_line /** * @brief Append a C string. * @param s The C string to append. * @return Reference to this string. */ basic_string& append(const _CharT* __s) { ; return this->append(__s, traits_type::length(__s)); } #pragma empty_line /** * @brief Append multiple characters. * @param n The number of characters to append. * @param c The character to use. * @return Reference to this string. * * Appends n copies of c to this string. */ basic_string& append(size_type __n, _CharT __c); #pragma line 1024 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Append a range of characters. * @param first Iterator referencing the first character to append. * @param last Iterator marking the end of the range. * @return Reference to this string. * * Appends characters in the range [first,last) to this string. */ template<class _InputIterator> basic_string& append(_InputIterator __first, _InputIterator __last) { return this->replace(_M_iend(), _M_iend(), __first, __last); } #pragma empty_line /** * @brief Append a single character. * @param c Character to append. */ void push_back(_CharT __c) { const size_type __len = 1 + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); traits_type::assign(_M_data()[this->size()], __c); _M_rep()->_M_set_length_and_sharable(__len); } #pragma empty_line /** * @brief Set value to contents of another string. * @param str Source string to use. * @return Reference to this string. */ basic_string& assign(const basic_string& __str); #pragma line 1076 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Set value to a substring of a string. * @param str The string to use. * @param pos Index of the first character of str. * @param n Number of characters to use. * @return Reference to this string. * @throw std::out_of_range if @a pos is not a valid index. * * This function sets this string to the substring of @a str consisting * of @a n characters at @a pos. If @a n is is larger than the number * of available characters in @a str, the remainder of @a str is used. */ basic_string& assign(const basic_string& __str, size_type __pos, size_type __n) { return this->assign(__str._M_data() + __str._M_check(__pos, "basic_string::assign"), __str._M_limit(__pos, __n)); } #pragma empty_line /** * @brief Set value to a C substring. * @param s The C string to use. * @param n Number of characters to use. * @return Reference to this string. * * This function sets the value of this string to the first @a n * characters of @a s. If @a n is is larger than the number of * available characters in @a s, the remainder of @a s is used. */ basic_string& assign(const _CharT* __s, size_type __n); #pragma empty_line /** * @brief Set value to contents of a C string. * @param s The C string to use. * @return Reference to this string. * * This function sets the value of this string to the value of @a s. * The data is copied, so there is no dependence on @a s once the * function returns. */ basic_string& assign(const _CharT* __s) { ; return this->assign(__s, traits_type::length(__s)); } #pragma empty_line /** * @brief Set value to multiple characters. * @param n Length of the resulting string. * @param c The character to use. * @return Reference to this string. * * This function sets the value of this string to @a n copies of * character @a c. */ basic_string& assign(size_type __n, _CharT __c) { return _M_replace_aux(size_type(0), this->size(), __n, __c); } #pragma empty_line /** * @brief Set value to a range of characters. * @param first Iterator referencing the first character to append. * @param last Iterator marking the end of the range. * @return Reference to this string. * * Sets value of string to characters in the range [first,last). */ template<class _InputIterator> basic_string& assign(_InputIterator __first, _InputIterator __last) { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } #pragma line 1160 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Insert multiple characters. * @param p Iterator referencing location in string to insert at. * @param n Number of characters to insert * @param c The character to insert. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts @a n copies of character @a c starting at the position * referenced by iterator @a p. If adding characters causes the length * to exceed max_size(), length_error is thrown. The value of the * string doesn't change if an error is thrown. */ void insert(iterator __p, size_type __n, _CharT __c) { this->replace(__p, __p, __n, __c); } #pragma empty_line /** * @brief Insert a range of characters. * @param p Iterator referencing location in string to insert at. * @param beg Start of range. * @param end End of range. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts characters in range [beg,end). If adding characters causes * the length to exceed max_size(), length_error is thrown. The value * of the string doesn't change if an error is thrown. */ template<class _InputIterator> void insert(iterator __p, _InputIterator __beg, _InputIterator __end) { this->replace(__p, __p, __beg, __end); } #pragma line 1207 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 /** * @brief Insert value of a string. * @param pos1 Iterator referencing location in string to insert at. * @param str The string to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts value of @a str starting at @a pos1. If adding characters * causes the length to exceed max_size(), length_error is thrown. The * value of the string doesn't change if an error is thrown. */ basic_string& insert(size_type __pos1, const basic_string& __str) { return this->insert(__pos1, __str, size_type(0), __str.size()); } #pragma empty_line /** * @brief Insert a substring. * @param pos1 Iterator referencing location in string to insert at. * @param str The string to insert. * @param pos2 Start of characters in str to insert. * @param n Number of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos1 > size() or * @a pos2 > @a str.size(). * * Starting at @a pos1, insert @a n character of @a str beginning with * @a pos2. If adding characters causes the length to exceed * max_size(), length_error is thrown. If @a pos1 is beyond the end of * this string or @a pos2 is beyond the end of @a str, out_of_range is * thrown. The value of the string doesn't change if an error is * thrown. */ basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n) { return this->insert(__pos1, __str._M_data() + __str._M_check(__pos2, "basic_string::insert"), __str._M_limit(__pos2, __n)); } #pragma empty_line /** * @brief Insert a C substring. * @param pos Iterator referencing location in string to insert at. * @param s The C string to insert. * @param n The number of characters to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Inserts the first @a n characters of @a s starting at @a pos. If * adding characters causes the length to exceed max_size(), * length_error is thrown. If @a pos is beyond end(), out_of_range is * thrown. The value of the string doesn't change if an error is * thrown. */ basic_string& insert(size_type __pos, const _CharT* __s, size_type __n); #pragma empty_line /** * @brief Insert a C string. * @param pos Iterator referencing location in string to insert at. * @param s The C string to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Inserts the first @a n characters of @a s starting at @a pos. If * adding characters causes the length to exceed max_size(), * length_error is thrown. If @a pos is beyond end(), out_of_range is * thrown. The value of the string doesn't change if an error is * thrown. */ basic_string& insert(size_type __pos, const _CharT* __s) { ; return this->insert(__pos, __s, traits_type::length(__s)); } #pragma empty_line /** * @brief Insert multiple characters. * @param pos Index in string to insert at. * @param n Number of characters to insert * @param c The character to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Inserts @a n copies of character @a c starting at index @a pos. If * adding characters causes the length to exceed max_size(), * length_error is thrown. If @a pos > length(), out_of_range is * thrown. The value of the string doesn't change if an error is * thrown. */ basic_string& insert(size_type __pos, size_type __n, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), size_type(0), __n, __c); } #pragma empty_line /** * @brief Insert one character. * @param p Iterator referencing position in string to insert at. * @param c The character to insert. * @return Iterator referencing newly inserted char. * @throw std::length_error If new length exceeds @c max_size(). * * Inserts character @a c at position referenced by @a p. If adding * character causes the length to exceed max_size(), length_error is * thrown. If @a p is beyond end of string, out_of_range is thrown. * The value of the string doesn't change if an error is thrown. */ iterator insert(iterator __p, _CharT __c) { ; const size_type __pos = __p - _M_ibegin(); _M_replace_aux(__pos, size_type(0), size_type(1), __c); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } #pragma empty_line /** * @brief Remove characters. * @param pos Index of first character to remove (default 0). * @param n Number of characters to remove (default remainder). * @return Reference to this string. * @throw std::out_of_range If @a pos is beyond the end of this * string. * * Removes @a n characters from this string starting at @a pos. The * length of the string is reduced by @a n. If there are < @a n * characters to remove, the remainder of the string is truncated. If * @a p is beyond end of string, out_of_range is thrown. The value of * the string doesn't change if an error is thrown. */ basic_string& erase(size_type __pos = 0, size_type __n = npos) { _M_mutate(_M_check(__pos, "basic_string::erase"), _M_limit(__pos, __n), size_type(0)); return *this; } #pragma empty_line /** * @brief Remove one character. * @param position Iterator referencing the character to remove. * @return iterator referencing same location after removal. * * Removes the character at @a position from this string. The value * of the string doesn't change if an error is thrown. */ iterator erase(iterator __position) { #pragma empty_line ; const size_type __pos = __position - _M_ibegin(); _M_mutate(__pos, size_type(1), size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } #pragma empty_line /** * @brief Remove a range of characters. * @param first Iterator referencing the first character to remove. * @param last Iterator referencing the end of the range. * @return Iterator referencing location of first after removal. * * Removes the characters in the range [first,last) from this string. * The value of the string doesn't change if an error is thrown. */ iterator erase(iterator __first, iterator __last); #pragma empty_line /** * @brief Replace characters with value from another string. * @param pos Index of first character to replace. * @param n Number of characters to be replaced. * @param str String to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos is beyond the end of this * string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos,pos+n) from this string. * In place, the value of @a str is inserted. If @a pos is beyond end * of string, out_of_range is thrown. If the length of the result * exceeds max_size(), length_error is thrown. The value of the string * doesn't change if an error is thrown. */ basic_string& replace(size_type __pos, size_type __n, const basic_string& __str) { return this->replace(__pos, __n, __str._M_data(), __str.size()); } #pragma empty_line /** * @brief Replace characters with value from another string. * @param pos1 Index of first character to replace. * @param n1 Number of characters to be replaced. * @param str String to insert. * @param pos2 Index of first character of str to use. * @param n2 Number of characters from str to use. * @return Reference to this string. * @throw std::out_of_range If @a pos1 > size() or @a pos2 > * str.size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos1,pos1 + n) from this * string. In place, the value of @a str is inserted. If @a pos is * beyond end of string, out_of_range is thrown. If the length of the * result exceeds max_size(), length_error is thrown. The value of the * string doesn't change if an error is thrown. */ basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) { return this->replace(__pos1, __n1, __str._M_data() + __str._M_check(__pos2, "basic_string::replace"), __str._M_limit(__pos2, __n2)); } #pragma empty_line /** * @brief Replace characters with value of a C substring. * @param pos Index of first character to replace. * @param n1 Number of characters to be replaced. * @param s C string to insert. * @param n2 Number of characters from @a s to use. * @return Reference to this string. * @throw std::out_of_range If @a pos1 > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos,pos + n1) from this string. * In place, the first @a n2 characters of @a s are inserted, or all * of @a s if @a n2 is too large. If @a pos is beyond end of string, * out_of_range is thrown. If the length of result exceeds max_size(), * length_error is thrown. The value of the string doesn't change if * an error is thrown. */ basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2); #pragma empty_line /** * @brief Replace characters with value of a C string. * @param pos Index of first character to replace. * @param n1 Number of characters to be replaced. * @param s C string to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos,pos + n1) from this string. * In place, the characters of @a s are inserted. If @a pos is beyond * end of string, out_of_range is thrown. If the length of result * exceeds max_size(), length_error is thrown. The value of the string * doesn't change if an error is thrown. */ basic_string& replace(size_type __pos, size_type __n1, const _CharT* __s) { ; return this->replace(__pos, __n1, __s, traits_type::length(__s)); } #pragma empty_line /** * @brief Replace characters with multiple characters. * @param pos Index of first character to replace. * @param n1 Number of characters to be replaced. * @param n2 Number of characters to insert. * @param c Character to insert. * @return Reference to this string. * @throw std::out_of_range If @a pos > size(). * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [pos,pos + n1) from this string. * In place, @a n2 copies of @a c are inserted. If @a pos is beyond * end of string, out_of_range is thrown. If the length of result * exceeds max_size(), length_error is thrown. The value of the string * doesn't change if an error is thrown. */ basic_string& replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), _M_limit(__pos, __n1), __n2, __c); } #pragma empty_line /** * @brief Replace range of characters with string. * @param i1 Iterator referencing start of range to replace. * @param i2 Iterator referencing end of range to replace. * @param str String value to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [i1,i2). In place, the value of * @a str is inserted. If the length of result exceeds max_size(), * length_error is thrown. The value of the string doesn't change if * an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, const basic_string& __str) { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } #pragma empty_line /** * @brief Replace range of characters with C substring. * @param i1 Iterator referencing start of range to replace. * @param i2 Iterator referencing end of range to replace. * @param s C string value to insert. * @param n Number of characters from s to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [i1,i2). In place, the first @a * n characters of @a s are inserted. If the length of result exceeds * max_size(), length_error is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) { #pragma empty_line ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); } #pragma empty_line /** * @brief Replace range of characters with C string. * @param i1 Iterator referencing start of range to replace. * @param i2 Iterator referencing end of range to replace. * @param s C string value to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [i1,i2). In place, the * characters of @a s are inserted. If the length of result exceeds * max_size(), length_error is thrown. The value of the string doesn't * change if an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, const _CharT* __s) { ; return this->replace(__i1, __i2, __s, traits_type::length(__s)); } #pragma empty_line /** * @brief Replace range of characters with multiple characters * @param i1 Iterator referencing start of range to replace. * @param i2 Iterator referencing end of range to replace. * @param n Number of characters to insert. * @param c Character to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [i1,i2). In place, @a n copies * of @a c are inserted. If the length of result exceeds max_size(), * length_error is thrown. The value of the string doesn't change if * an error is thrown. */ basic_string& replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) { #pragma empty_line ; return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); } #pragma empty_line /** * @brief Replace range of characters with range. * @param i1 Iterator referencing start of range to replace. * @param i2 Iterator referencing end of range to replace. * @param k1 Iterator referencing start of range to insert. * @param k2 Iterator referencing end of range to insert. * @return Reference to this string. * @throw std::length_error If new length exceeds @c max_size(). * * Removes the characters in the range [i1,i2). In place, characters * in the range [k1,k2) are inserted. If the length of result exceeds * max_size(), length_error is thrown. The value of the string doesn't * change if an error is thrown. */ template<class _InputIterator> basic_string& replace(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2) { #pragma empty_line ; ; typedef typename std::__is_integer<_InputIterator>::__type _Integral; return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); } #pragma empty_line // Specializations for the common case of pointer and iterator: // useful to avoid the overhead of temporary buffering in _M_replace. basic_string& replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) { #pragma empty_line ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } #pragma empty_line basic_string& replace(iterator __i1, iterator __i2, const _CharT* __k1, const _CharT* __k2) { #pragma empty_line ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1, __k2 - __k1); } #pragma empty_line basic_string& replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) { #pragma empty_line ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } #pragma empty_line basic_string& replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2) { #pragma empty_line ; ; return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __k1.base(), __k2 - __k1); } #pragma line 1663 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 private: template<class _Integer> basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, _Integer __val, __true_type) { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } #pragma empty_line template<class _InputIterator> basic_string& _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type); #pragma empty_line basic_string& _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c); #pragma empty_line basic_string& _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2); #pragma empty_line // _S_construct_aux is used to implement the 21.3.1 para 15 which // requires special behaviour if _InIter is an integral type template<class _InIterator> static _CharT* _S_construct_aux(_InIterator __beg, _InIterator __end, const _Alloc& __a, __false_type) { typedef typename iterator_traits<_InIterator>::iterator_category _Tag; return _S_construct(__beg, __end, __a, _Tag()); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 438. Ambiguity in the "do the right thing" clause template<class _Integer> static _CharT* _S_construct_aux(_Integer __beg, _Integer __end, const _Alloc& __a, __true_type) { return _S_construct_aux_2(static_cast<size_type>(__beg), __end, __a); } #pragma empty_line static _CharT* _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) { return _S_construct(__req, __c, __a); } #pragma empty_line template<class _InIterator> static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) { typedef typename std::__is_integer<_InIterator>::__type _Integral; return _S_construct_aux(__beg, __end, __a, _Integral()); } #pragma empty_line // For Input Iterators, used in istreambuf_iterators, etc. template<class _InIterator> static _CharT* _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag); #pragma empty_line // For forward_iterators up to random_access_iterators, used for // string::iterator, _CharT*, etc. template<class _FwdIterator> static _CharT* _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, forward_iterator_tag); #pragma empty_line static _CharT* _S_construct(size_type __req, _CharT __c, const _Alloc& __a); #pragma empty_line public: #pragma empty_line /** * @brief Copy substring into C string. * @param s C string to copy value into. * @param n Number of characters to copy. * @param pos Index of first character to copy. * @return Number of characters actually copied * @throw std::out_of_range If pos > size(). * * Copies up to @a n characters starting at @a pos into the C string @a * s. If @a pos is %greater than size(), out_of_range is thrown. */ size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const; #pragma empty_line /** * @brief Swap contents with another string. * @param s String to swap with. * * Exchanges the contents of this string with that of @a s in constant * time. */ void swap(basic_string& __s); #pragma empty_line // String operations: /** * @brief Return const pointer to null-terminated contents. * * This is a handle to internal data. Do not modify or dire things may * happen. */ const _CharT* c_str() const { return _M_data(); } #pragma empty_line /** * @brief Return const pointer to contents. * * This is a handle to internal data. Do not modify or dire things may * happen. */ const _CharT* data() const { return _M_data(); } #pragma empty_line /** * @brief Return copy of allocator used to construct this string. */ allocator_type get_allocator() const { return _M_dataplus; } #pragma empty_line /** * @brief Find position of a C substring. * @param s C string to locate. * @param pos Index of character to search from. * @param n Number of characters from @a s to search for. * @return Index of start of first occurrence. * * Starting from @a pos, searches forward for the first @a n characters * in @a s within this string. If found, returns the index where it * begins. If not found, returns npos. */ size_type find(const _CharT* __s, size_type __pos, size_type __n) const; #pragma empty_line /** * @brief Find position of a string. * @param str String to locate. * @param pos Index of character to search from (default 0). * @return Index of start of first occurrence. * * Starting from @a pos, searches forward for value of @a str within * this string. If found, returns the index where it begins. If not * found, returns npos. */ size_type find(const basic_string& __str, size_type __pos = 0) const { return this->find(__str.data(), __pos, __str.size()); } #pragma empty_line /** * @brief Find position of a C string. * @param s C string to locate. * @param pos Index of character to search from (default 0). * @return Index of start of first occurrence. * * Starting from @a pos, searches forward for the value of @a s within * this string. If found, returns the index where it begins. If not * found, returns npos. */ size_type find(const _CharT* __s, size_type __pos = 0) const { ; return this->find(__s, __pos, traits_type::length(__s)); } #pragma empty_line /** * @brief Find position of a character. * @param c Character to locate. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for @a c within this string. * If found, returns the index where it was found. If not found, * returns npos. */ size_type find(_CharT __c, size_type __pos = 0) const; #pragma empty_line /** * @brief Find last position of a string. * @param str String to locate. * @param pos Index of character to search back from (default end). * @return Index of start of last occurrence. * * Starting from @a pos, searches backward for value of @a str within * this string. If found, returns the index where it begins. If not * found, returns npos. */ size_type rfind(const basic_string& __str, size_type __pos = npos) const { return this->rfind(__str.data(), __pos, __str.size()); } #pragma empty_line /** * @brief Find last position of a C substring. * @param s C string to locate. * @param pos Index of character to search back from. * @param n Number of characters from s to search for. * @return Index of start of last occurrence. * * Starting from @a pos, searches backward for the first @a n * characters in @a s within this string. If found, returns the index * where it begins. If not found, returns npos. */ size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const; #pragma empty_line /** * @brief Find last position of a C string. * @param s C string to locate. * @param pos Index of character to start search at (default end). * @return Index of start of last occurrence. * * Starting from @a pos, searches backward for the value of @a s within * this string. If found, returns the index where it begins. If not * found, returns npos. */ size_type rfind(const _CharT* __s, size_type __pos = npos) const { ; return this->rfind(__s, __pos, traits_type::length(__s)); } #pragma empty_line /** * @brief Find last position of a character. * @param c Character to locate. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for @a c within this string. * If found, returns the index where it was found. If not found, * returns npos. */ size_type rfind(_CharT __c, size_type __pos = npos) const; #pragma empty_line /** * @brief Find position of a character of string. * @param str String containing characters to locate. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for one of the characters of * @a str within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_first_of(const basic_string& __str, size_type __pos = 0) const { return this->find_first_of(__str.data(), __pos, __str.size()); } #pragma empty_line /** * @brief Find position of a character of C substring. * @param s String containing characters to locate. * @param pos Index of character to search from. * @param n Number of characters from s to search for. * @return Index of first occurrence. * * Starting from @a pos, searches forward for one of the first @a n * characters of @a s within this string. If found, returns the index * where it was found. If not found, returns npos. */ size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; #pragma empty_line /** * @brief Find position of a character of C string. * @param s String containing characters to locate. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for one of the characters of * @a s within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_first_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_of(__s, __pos, traits_type::length(__s)); } #pragma empty_line /** * @brief Find position of a character. * @param c Character to locate. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for the character @a c within * this string. If found, returns the index where it was found. If * not found, returns npos. * * Note: equivalent to find(c, pos). */ size_type find_first_of(_CharT __c, size_type __pos = 0) const { return this->find(__c, __pos); } #pragma empty_line /** * @brief Find last position of a character of string. * @param str String containing characters to locate. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for one of the characters of * @a str within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_last_of(const basic_string& __str, size_type __pos = npos) const { return this->find_last_of(__str.data(), __pos, __str.size()); } #pragma empty_line /** * @brief Find last position of a character of C substring. * @param s C string containing characters to locate. * @param pos Index of character to search back from. * @param n Number of characters from s to search for. * @return Index of last occurrence. * * Starting from @a pos, searches backward for one of the first @a n * characters of @a s within this string. If found, returns the index * where it was found. If not found, returns npos. */ size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; #pragma empty_line /** * @brief Find last position of a character of C string. * @param s C string containing characters to locate. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for one of the characters of * @a s within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_last_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_of(__s, __pos, traits_type::length(__s)); } #pragma empty_line /** * @brief Find last position of a character. * @param c Character to locate. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for @a c within this string. * If found, returns the index where it was found. If not found, * returns npos. * * Note: equivalent to rfind(c, pos). */ size_type find_last_of(_CharT __c, size_type __pos = npos) const { return this->rfind(__c, __pos); } #pragma empty_line /** * @brief Find position of a character not in string. * @param str String containing characters to avoid. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for a character not contained * in @a str within this string. If found, returns the index where it * was found. If not found, returns npos. */ size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const { return this->find_first_not_of(__str.data(), __pos, __str.size()); } #pragma empty_line /** * @brief Find position of a character not in C substring. * @param s C string containing characters to avoid. * @param pos Index of character to search from. * @param n Number of characters from s to consider. * @return Index of first occurrence. * * Starting from @a pos, searches forward for a character not contained * in the first @a n characters of @a s within this string. If found, * returns the index where it was found. If not found, returns npos. */ size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const; #pragma empty_line /** * @brief Find position of a character not in C string. * @param s C string containing characters to avoid. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for a character not contained * in @a s within this string. If found, returns the index where it * was found. If not found, returns npos. */ size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const { ; return this->find_first_not_of(__s, __pos, traits_type::length(__s)); } #pragma empty_line /** * @brief Find position of a different character. * @param c Character to avoid. * @param pos Index of character to search from (default 0). * @return Index of first occurrence. * * Starting from @a pos, searches forward for a character other than @a c * within this string. If found, returns the index where it was found. * If not found, returns npos. */ size_type find_first_not_of(_CharT __c, size_type __pos = 0) const; #pragma empty_line /** * @brief Find last position of a character not in string. * @param str String containing characters to avoid. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a str within this string. If found, returns the index * where it was found. If not found, returns npos. */ size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const { return this->find_last_not_of(__str.data(), __pos, __str.size()); } #pragma empty_line /** * @brief Find last position of a character not in C substring. * @param s C string containing characters to avoid. * @param pos Index of character to search back from. * @param n Number of characters from s to consider. * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in the first @a n characters of @a s within this string. * If found, returns the index where it was found. If not found, * returns npos. */ size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const; /** * @brief Find last position of a character not in C string. * @param s C string containing characters to avoid. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character not * contained in @a s within this string. If found, returns the index * where it was found. If not found, returns npos. */ size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const { ; return this->find_last_not_of(__s, __pos, traits_type::length(__s)); } #pragma empty_line /** * @brief Find last position of a different character. * @param c Character to avoid. * @param pos Index of character to search back from (default end). * @return Index of last occurrence. * * Starting from @a pos, searches backward for a character other than * @a c within this string. If found, returns the index where it was * found. If not found, returns npos. */ size_type find_last_not_of(_CharT __c, size_type __pos = npos) const; #pragma empty_line /** * @brief Get a substring. * @param pos Index of first character (default 0). * @param n Number of characters in substring (default remainder). * @return The new string. * @throw std::out_of_range If pos > size(). * * Construct and return a new string using the @a n characters starting * at @a pos. If the string is too short, use the remainder of the * characters. If @a pos is beyond the end of the string, out_of_range * is thrown. */ basic_string substr(size_type __pos = 0, size_type __n = npos) const { return basic_string(*this, _M_check(__pos, "basic_string::substr"), __n); } #pragma empty_line /** * @brief Compare to a string. * @param str String to compare against. * @return Integer < 0, 0, or > 0. * * Returns an integer < 0 if this string is ordered before @a str, 0 if * their values are equivalent, or > 0 if this string is ordered after * @a str. Determines the effective length rlen of the strings to * compare as the smallest of size() and str.size(). The function * then compares the two strings by calling traits::compare(data(), * str.data(),rlen). If the result of the comparison is nonzero returns * it, otherwise the shorter one is ordered first. */ int compare(const basic_string& __str) const { const size_type __size = this->size(); const size_type __osize = __str.size(); const size_type __len = std::min(__size, __osize); #pragma empty_line int __r = traits_type::compare(_M_data(), __str.data(), __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } #pragma empty_line /** * @brief Compare substring to a string. * @param pos Index of first character of substring. * @param n Number of characters in substring. * @param str String to compare against. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a n characters starting * at @a pos. Returns an integer < 0 if the substring is ordered * before @a str, 0 if their values are equivalent, or > 0 if the * substring is ordered after @a str. Determines the effective length * rlen of the strings to compare as the smallest of the length of the * substring and @a str.size(). The function then compares the two * strings by calling traits::compare(substring.data(),str.data(),rlen). * If the result of the comparison is nonzero returns it, otherwise the * shorter one is ordered first. */ int compare(size_type __pos, size_type __n, const basic_string& __str) const; #pragma empty_line /** * @brief Compare substring to a substring. * @param pos1 Index of first character of substring. * @param n1 Number of characters in substring. * @param str String to compare against. * @param pos2 Index of first character of substring of str. * @param n2 Number of characters in substring of str. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a n1 characters starting * at @a pos1. Form the substring of @a str from the @a n2 characters * starting at @a pos2. Returns an integer < 0 if this substring is * ordered before the substring of @a str, 0 if their values are * equivalent, or > 0 if this substring is ordered after the substring * of @a str. Determines the effective length rlen of the strings * to compare as the smallest of the lengths of the substrings. The * function then compares the two strings by calling * traits::compare(substring.data(),str.substr(pos2,n2).data(),rlen). * If the result of the comparison is nonzero returns it, otherwise the * shorter one is ordered first. */ int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const; #pragma empty_line /** * @brief Compare to a C string. * @param s C string to compare against. * @return Integer < 0, 0, or > 0. * * Returns an integer < 0 if this string is ordered before @a s, 0 if * their values are equivalent, or > 0 if this string is ordered after * @a s. Determines the effective length rlen of the strings to * compare as the smallest of size() and the length of a string * constructed from @a s. The function then compares the two strings * by calling traits::compare(data(),s,rlen). If the result of the * comparison is nonzero returns it, otherwise the shorter one is * ordered first. */ int compare(const _CharT* __s) const; #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 5 String::compare specification questionable /** * @brief Compare substring to a C string. * @param pos Index of first character of substring. * @param n1 Number of characters in substring. * @param s C string to compare against. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a n1 characters starting * at @a pos. Returns an integer < 0 if the substring is ordered * before @a s, 0 if their values are equivalent, or > 0 if the * substring is ordered after @a s. Determines the effective length * rlen of the strings to compare as the smallest of the length of the * substring and the length of a string constructed from @a s. The * function then compares the two string by calling * traits::compare(substring.data(),s,rlen). If the result of the * comparison is nonzero returns it, otherwise the shorter one is * ordered first. */ int compare(size_type __pos, size_type __n1, const _CharT* __s) const; #pragma empty_line /** * @brief Compare substring against a character %array. * @param pos1 Index of first character of substring. * @param n1 Number of characters in substring. * @param s character %array to compare against. * @param n2 Number of characters of s. * @return Integer < 0, 0, or > 0. * * Form the substring of this string from the @a n1 characters starting * at @a pos1. Form a string from the first @a n2 characters of @a s. * Returns an integer < 0 if this substring is ordered before the string * from @a s, 0 if their values are equivalent, or > 0 if this substring * is ordered after the string from @a s. Determines the effective * length rlen of the strings to compare as the smallest of the length * of the substring and @a n2. The function then compares the two * strings by calling traits::compare(substring.data(),s,rlen). If the * result of the comparison is nonzero returns it, otherwise the shorter * one is ordered first. * * NB: s must have at least n2 characters, &apos;\\0&apos; has * no special meaning. */ int compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const; }; #pragma empty_line // operator+ /** * @brief Concatenate two strings. * @param lhs First string. * @param rhs Last string. * @return New string with value of @a lhs followed by @a rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } #pragma empty_line /** * @brief Concatenate C string and string. * @param lhs First string. * @param rhs Last string. * @return New string with value of @a lhs followed by @a rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT,_Traits,_Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); #pragma empty_line /** * @brief Concatenate character and string. * @param lhs First string. * @param rhs Last string. * @return New string with @a lhs followed by @a rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT,_Traits,_Alloc> operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); #pragma empty_line /** * @brief Concatenate string and C string. * @param lhs First string. * @param rhs Last string. * @return New string with @a lhs followed by @a rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { basic_string<_CharT, _Traits, _Alloc> __str(__lhs); __str.append(__rhs); return __str; } #pragma empty_line /** * @brief Concatenate string and character. * @param lhs First string. * @param rhs Last string. * @return New string with @a lhs followed by @a rhs. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_string<_CharT, _Traits, _Alloc> operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str(__lhs); __str.append(__size_type(1), __rhs); return __str; } #pragma line 2417 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.h" 3 // operator == /** * @brief Test equivalence of two strings. * @param lhs First string. * @param rhs Second string. * @return True if @a lhs.compare(@a rhs) == 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) == 0; } #pragma empty_line template<typename _CharT> inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type operator==(const basic_string<_CharT>& __lhs, const basic_string<_CharT>& __rhs) { return (__lhs.size() == __rhs.size() && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), __lhs.size())); } #pragma empty_line /** * @brief Test equivalence of C string and string. * @param lhs C string. * @param rhs String. * @return True if @a rhs.compare(@a lhs) == 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) == 0; } #pragma empty_line /** * @brief Test equivalence of string and C string. * @param lhs String. * @param rhs C string. * @return True if @a lhs.compare(@a rhs) == 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) == 0; } #pragma empty_line // operator != /** * @brief Test difference of two strings. * @param lhs First string. * @param rhs Second string. * @return True if @a lhs.compare(@a rhs) != 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } #pragma empty_line /** * @brief Test difference of C string and string. * @param lhs C string. * @param rhs String. * @return True if @a rhs.compare(@a lhs) != 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return !(__lhs == __rhs); } #pragma empty_line /** * @brief Test difference of string and C string. * @param lhs String. * @param rhs C string. * @return True if @a lhs.compare(@a rhs) != 0. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return !(__lhs == __rhs); } #pragma empty_line // operator < /** * @brief Test if string precedes string. * @param lhs First string. * @param rhs Second string. * @return True if @a lhs precedes @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) < 0; } #pragma empty_line /** * @brief Test if string precedes C string. * @param lhs String. * @param rhs C string. * @return True if @a lhs precedes @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) < 0; } #pragma empty_line /** * @brief Test if C string precedes string. * @param lhs C string. * @param rhs String. * @return True if @a lhs precedes @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) > 0; } #pragma empty_line // operator > /** * @brief Test if string follows string. * @param lhs First string. * @param rhs Second string. * @return True if @a lhs follows @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) > 0; } #pragma empty_line /** * @brief Test if string follows C string. * @param lhs String. * @param rhs C string. * @return True if @a lhs follows @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) > 0; } #pragma empty_line /** * @brief Test if C string follows string. * @param lhs C string. * @param rhs String. * @return True if @a lhs follows @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) < 0; } #pragma empty_line // operator <= /** * @brief Test if string doesn't follow string. * @param lhs First string. * @param rhs Second string. * @return True if @a lhs doesn't follow @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) <= 0; } #pragma empty_line /** * @brief Test if string doesn't follow C string. * @param lhs String. * @param rhs C string. * @return True if @a lhs doesn't follow @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) <= 0; } #pragma empty_line /** * @brief Test if C string doesn't follow string. * @param lhs C string. * @param rhs String. * @return True if @a lhs doesn't follow @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator<=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) >= 0; } #pragma empty_line // operator >= /** * @brief Test if string doesn't precede string. * @param lhs First string. * @param rhs Second string. * @return True if @a lhs doesn't precede @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __lhs.compare(__rhs) >= 0; } #pragma empty_line /** * @brief Test if string doesn't precede C string. * @param lhs String. * @param rhs C string. * @return True if @a lhs doesn't precede @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) { return __lhs.compare(__rhs) >= 0; } #pragma empty_line /** * @brief Test if C string doesn't precede string. * @param lhs C string. * @param rhs String. * @return True if @a lhs doesn't precede @a rhs. False otherwise. */ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { return __rhs.compare(__lhs) <= 0; } #pragma empty_line /** * @brief Swap contents of two strings. * @param lhs First string. * @param rhs Second string. * * Exchanges the contents of @a lhs and @a rhs in constant time. */ template<typename _CharT, typename _Traits, typename _Alloc> inline void swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, basic_string<_CharT, _Traits, _Alloc>& __rhs) { __lhs.swap(__rhs); } #pragma empty_line /** * @brief Read stream into a string. * @param is Input stream. * @param str Buffer to store into. * @return Reference to the input stream. * * Stores characters from @a is into @a str until whitespace is found, the * end of the stream is encountered, or str.max_size() is reached. If * is.width() is non-zero, that is the limit on the number of characters * stored into @a str. Any previous contents of @a str are erased. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str); #pragma empty_line template<> basic_istream<char>& operator>>(basic_istream<char>& __is, basic_string<char>& __str); #pragma empty_line /** * @brief Write string to a stream. * @param os Output stream. * @param str String to write out. * @return Reference to the output stream. * * Output characters of @a str into os following the same rules as for * writing a C string. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const basic_string<_CharT, _Traits, _Alloc>& __str) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 586. string inserter not a formatted function return __ostream_insert(__os, __str.data(), __str.size()); } #pragma empty_line /** * @brief Read a line from stream into a string. * @param is Input stream. * @param str Buffer to store into. * @param delim Character marking end of line. * @return Reference to the input stream. * * Stores characters from @a is into @a str until @a delim is found, the * end of the stream is encountered, or str.max_size() is reached. If * is.width() is non-zero, that is the limit on the number of characters * stored into @a str. Any previous contents of @a str are erased. If @a * delim was encountered, it is extracted but not stored into @a str. */ template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); #pragma empty_line /** * @brief Read a line from stream into a string. * @param is Input stream. * @param str Buffer to store into. * @return Reference to the input stream. * * Stores characters from is into @a str until &apos;\n&apos; is * found, the end of the stream is encountered, or str.max_size() * is reached. If is.width() is non-zero, that is the limit on the * number of characters stored into @a str. Any previous contents * of @a str are erased. If end of line was encountered, it is * extracted but not stored into @a str. */ template<typename _CharT, typename _Traits, typename _Alloc> inline basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __is, basic_string<_CharT, _Traits, _Alloc>& __str) { return getline(__is, __str, __is.widen('\n')); } #pragma empty_line template<> basic_istream<char>& getline(basic_istream<char>& __in, basic_string<char>& __str, char __delim); #pragma empty_line #pragma empty_line template<> basic_istream<wchar_t>& getline(basic_istream<wchar_t>& __in, basic_string<wchar_t>& __str, wchar_t __delim); #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma line 54 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.tcc" 1 3 // Components for manipulating sequences of characters -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/basic_string.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{string} */ #pragma empty_line // // ISO C++ 14882: 21 Strings library // #pragma empty_line // Written by Jason Merrill based upon the specification by Takanori Adachi // in ANSI X3J16/94-0013R2. Rewritten by Nathan Myers to ISO-14882. #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.tcc" 3 #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> const _CharT basic_string<_CharT, _Traits, _Alloc>:: _Rep::_S_terminal = _CharT(); #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> const typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::npos; #pragma empty_line // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string) // at static init time (before static ctors are run). template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / sizeof(size_type)]; #pragma empty_line // NB: This is the special case for Input Iterators, used in // istreambuf_iterators, etc. // Input Iterators have a cost structure very different from // pointers, calling for a different coding style. template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InIterator> _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, input_iterator_tag) { #pragma empty_line if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); #pragma empty_line // Avoid reallocation for common case. _CharT __buf[128]; size_type __len = 0; while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) { __buf[__len++] = *__beg; ++__beg; } _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); _M_copy(__r->_M_refdata(), __buf, __len); if (true) { while (__beg != __end) { if (__len == __r->_M_capacity) { // Allocate more space. _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); __r->_M_destroy(__a); __r = __another; } __r->_M_refdata()[__len++] = *__beg; ++__beg; } } if (false) { __r->_M_destroy(__a); ; } __r->_M_set_length_and_sharable(__len); return __r->_M_refdata(); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> template <typename _InIterator> _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, forward_iterator_tag) { #pragma empty_line if (__beg == __end && __a == _Alloc()) return _S_empty_rep()._M_refdata(); #pragma empty_line // NB: Not required, but considered best practice. if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) __throw_logic_error(("basic_string::_S_construct null not valid")); #pragma empty_line const size_type __dnew = static_cast<size_type>(std::distance(__beg, __end)); // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); if (true) { _S_copy_chars(__r->_M_refdata(), __beg, __end); } if (false) { __r->_M_destroy(__a); ; } __r->_M_set_length_and_sharable(__dnew); return __r->_M_refdata(); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> _CharT* basic_string<_CharT, _Traits, _Alloc>:: _S_construct(size_type __n, _CharT __c, const _Alloc& __a) { #pragma empty_line if (__n == 0 && __a == _Alloc()) return _S_empty_rep()._M_refdata(); #pragma empty_line // Check for out_of_range and length_error exceptions. _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); if (__n) _M_assign(__r->_M_refdata(), __n, __c); #pragma empty_line __r->_M_set_length_and_sharable(__n); return __r->_M_refdata(); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str) : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), __str.get_allocator()), __str.get_allocator()) { } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _Alloc& __a) : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) { } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, _Alloc()), _Alloc()) { } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const basic_string& __str, size_type __pos, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__str._M_data() + __str._M_check(__pos, "basic_string::basic_string"), __str._M_data() + __str._M_limit(__pos, __n) + __pos, __a), __a) { } #pragma empty_line // TBD: DPG annotate template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) { } #pragma empty_line // TBD: DPG annotate template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(const _CharT* __s, const _Alloc& __a) : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : __s + npos, __a), __a) { } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>:: basic_string(size_type __n, _CharT __c, const _Alloc& __a) : _M_dataplus(_S_construct(__n, __c, __a), __a) { } #pragma empty_line // TBD: DPG annotate template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>:: basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) : _M_dataplus(_S_construct(__beg, __end, __a), __a) { } #pragma line 241 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_string.tcc" 3 template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const basic_string& __str) { if (_M_rep() != __str._M_rep()) { // XXX MT const allocator_type __a = this->get_allocator(); _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: assign(const _CharT* __s, size_type __n) { ; _M_check_length(this->size(), __n, "basic_string::assign"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(size_type(0), this->size(), __s, __n); else { // Work in-place. const size_type __pos = __s - _M_data(); if (__pos >= __n) _M_copy(_M_data(), __s, __n); else if (__pos) _M_move(_M_data(), __s, __n); _M_rep()->_M_set_length_and_sharable(__n); return *this; } } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(size_type __n, _CharT __c) { if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_assign(_M_data() + this->size(), __n, __c); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const _CharT* __s, size_type __n) { ; if (__n) { _M_check_length(size_type(0), __n, "basic_string::append"); const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) { if (_M_disjunct(__s)) this->reserve(__len); else { const size_type __off = __s - _M_data(); this->reserve(__len); __s = _M_data() + __off; } } _M_copy(_M_data() + this->size(), __s, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str) { const size_type __size = __str.size(); if (__size) { const size_type __len = __size + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data(), __size); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: append(const basic_string& __str, size_type __pos, size_type __n) { __str._M_check(__pos, "basic_string::append"); __n = __str._M_limit(__pos, __n); if (__n) { const size_type __len = __n + this->size(); if (__len > this->capacity() || _M_rep()->_M_is_shared()) this->reserve(__len); _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); _M_rep()->_M_set_length_and_sharable(__len); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: insert(size_type __pos, const _CharT* __s, size_type __n) { ; _M_check(__pos, "basic_string::insert"); _M_check_length(size_type(0), __n, "basic_string::insert"); if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, size_type(0), __s, __n); else { // Work in-place. const size_type __off = __s - _M_data(); _M_mutate(__pos, 0, __n); __s = _M_data() + __off; _CharT* __p = _M_data() + __pos; if (__s + __n <= __p) _M_copy(__p, __s, __n); else if (__s >= __p) _M_copy(__p, __s + __n, __n); else { const size_type __nleft = __p - __s; _M_copy(__p, __s, __nleft); _M_copy(__p + __nleft, __p + __n, __n - __nleft); } return *this; } } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::iterator basic_string<_CharT, _Traits, _Alloc>:: erase(iterator __first, iterator __last) { #pragma empty_line ; #pragma empty_line // NB: This isn't just an optimization (bail out early when // there is nothing to do, really), it's also a correctness // issue vs MT, see libstdc++/40518. const size_type __size = __last - __first; if (__size) { const size_type __pos = __first - _M_ibegin(); _M_mutate(__pos, __size, size_type(0)); _M_rep()->_M_set_leaked(); return iterator(_M_data() + __pos); } else return __first; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: replace(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) { ; _M_check(__pos, "basic_string::replace"); __n1 = _M_limit(__pos, __n1); _M_check_length(__n1, __n2, "basic_string::replace"); bool __left; if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) return _M_replace_safe(__pos, __n1, __s, __n2); else if ((__left = __s + __n2 <= _M_data() + __pos) || _M_data() + __pos + __n1 <= __s) { // Work in-place: non-overlapping case. size_type __off = __s - _M_data(); __left ? __off : (__off += __n2 - __n1); _M_mutate(__pos, __n1, __n2); _M_copy(_M_data() + __pos, _M_data() + __off, __n2); return *this; } else { // Todo: overlapping case. const basic_string __tmp(__s, __n2); return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); } } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_destroy(const _Alloc& __a) throw () { const size_type __size = sizeof(_Rep_base) + (this->_M_capacity + 1) * sizeof(_CharT); _Raw_bytes_alloc(__a).deallocate(reinterpret_cast<char*>(this), __size); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_leak_hard() { #pragma empty_line if (_M_rep() == &_S_empty_rep()) return; #pragma empty_line if (_M_rep()->_M_is_shared()) _M_mutate(0, 0, 0); _M_rep()->_M_set_leaked(); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: _M_mutate(size_type __pos, size_type __len1, size_type __len2) { const size_type __old_size = this->size(); const size_type __new_size = __old_size + __len2 - __len1; const size_type __how_much = __old_size - __pos - __len1; #pragma empty_line if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) { // Must reallocate. const allocator_type __a = get_allocator(); _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); #pragma empty_line if (__pos) _M_copy(__r->_M_refdata(), _M_data(), __pos); if (__how_much) _M_copy(__r->_M_refdata() + __pos + __len2, _M_data() + __pos + __len1, __how_much); #pragma empty_line _M_rep()->_M_dispose(__a); _M_data(__r->_M_refdata()); } else if (__how_much && __len1 != __len2) { // Work in-place. _M_move(_M_data() + __pos + __len2, _M_data() + __pos + __len1, __how_much); } _M_rep()->_M_set_length_and_sharable(__new_size); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: reserve(size_type __res) { if (__res != this->capacity() || _M_rep()->_M_is_shared()) { // Make sure we don't shrink below the current size if (__res < this->size()) __res = this->size(); const allocator_type __a = get_allocator(); _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); _M_rep()->_M_dispose(__a); _M_data(__tmp); } } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: swap(basic_string& __s) { if (_M_rep()->_M_is_leaked()) _M_rep()->_M_set_sharable(); if (__s._M_rep()->_M_is_leaked()) __s._M_rep()->_M_set_sharable(); if (this->get_allocator() == __s.get_allocator()) { _CharT* __tmp = _M_data(); _M_data(__s._M_data()); __s._M_data(__tmp); } // The code below can usually be optimized away. else { const basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator()); const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), this->get_allocator()); *this = __tmp2; __s = __tmp1; } } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::_Rep* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _S_create(size_type __capacity, size_type __old_capacity, const _Alloc& __alloc) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 83. String::npos vs. string::max_size() if (__capacity > _S_max_size) __throw_length_error(("basic_string::_S_create")); #pragma empty_line // The standard places no restriction on allocating more memory // than is strictly needed within this layer at the moment or as // requested by an explicit application call to reserve(). #pragma empty_line // Many malloc implementations perform quite poorly when an // application attempts to allocate memory in a stepwise fashion // growing each allocation size by only 1 char. Additionally, // it makes little sense to allocate less linear memory than the // natural blocking size of the malloc implementation. // Unfortunately, we would need a somewhat low-level calculation // with tuned parameters to get this perfect for any particular // malloc implementation. Fortunately, generalizations about // common features seen among implementations seems to suffice. #pragma empty_line // __pagesize need not match the actual VM page size for good // results in practice, thus we pick a common value on the low // side. __malloc_header_size is an estimate of the amount of // overhead per memory allocation (in practice seen N * sizeof // (void*) where N is 0, 2 or 4). According to folklore, // picking this value on the high side is better than // low-balling it (especially when this algorithm is used with // malloc implementations that allocate memory blocks rounded up // to a size which is a power of 2). const size_type __pagesize = 4096; const size_type __malloc_header_size = 4 * sizeof(void*); #pragma empty_line // The below implements an exponential growth policy, necessary to // meet amortized linear time requirements of the library: see // http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html. // It's active for allocations requiring an amount of memory above // system pagesize. This is consistent with the requirements of the // standard: http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) __capacity = 2 * __old_capacity; #pragma empty_line // NB: Need an array of char_type[__capacity], plus a terminating // null char_type() element, plus enough for the _Rep data structure. // Whew. Seemingly so needy, yet so elemental. size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); #pragma empty_line const size_type __adj_size = __size + __malloc_header_size; if (__adj_size > __pagesize && __capacity > __old_capacity) { const size_type __extra = __pagesize - __adj_size % __pagesize; __capacity += __extra / sizeof(_CharT); // Never allocate a string bigger than _S_max_size. if (__capacity > _S_max_size) __capacity = _S_max_size; __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); } #pragma empty_line // NB: Might throw, but no worries about a leak, mate: _Rep() // does not throw. void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); _Rep *__p = new (__place) _Rep; __p->_M_capacity = __capacity; // ABI compatibility - 3.4.x set in _S_create both // _M_refcount and _M_length. All callers of _S_create // in basic_string.tcc then set just _M_length. // In 4.0.x and later both _M_refcount and _M_length // are initialized in the callers, unfortunately we can // have 3.4.x compiled code with _S_create callers inlined // calling 4.0.x+ _S_create. __p->_M_set_sharable(); return __p; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> _CharT* basic_string<_CharT, _Traits, _Alloc>::_Rep:: _M_clone(const _Alloc& __alloc, size_type __res) { // Requested capacity of the clone. const size_type __requested_cap = this->_M_length + __res; _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, __alloc); if (this->_M_length) _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); #pragma empty_line __r->_M_set_length_and_sharable(this->_M_length); return __r->_M_refdata(); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> void basic_string<_CharT, _Traits, _Alloc>:: resize(size_type __n, _CharT __c) { const size_type __size = this->size(); _M_check_length(__size, __n, "basic_string::resize"); if (__size < __n) this->append(__n - __size, __c); else if (__n < __size) this->erase(__n); // else nothing (in particular, avoid calling _M_mutate() unnecessarily.) } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> template<typename _InputIterator> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, _InputIterator __k2, __false_type) { const basic_string __s(__k1, __k2); const size_type __n1 = __i2 - __i1; _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), __s.size()); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, _CharT __c) { _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); _M_mutate(__pos1, __n1, __n2); if (__n2) _M_assign(_M_data() + __pos1, __n2, __c); return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>:: _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) { _M_mutate(__pos1, __n1, __n2); if (__n2) _M_copy(_M_data() + __pos1, __s, __n2); return *this; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { ; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; const __size_type __len = _Traits::length(__lhs); __string_type __str; __str.reserve(__len + __rhs.size()); __str.append(__lhs, __len); __str.append(__rhs); return __str; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_string<_CharT, _Traits, _Alloc> operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) { typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __string_type::size_type __size_type; __string_type __str; const __size_type __len = __rhs.size(); __str.reserve(__len + 1); __str.append(__size_type(1), __lhs); __str.append(__rhs); return __str; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: copy(_CharT* __s, size_type __n, size_type __pos) const { _M_check(__pos, "basic_string::copy"); __n = _M_limit(__pos, __n); ; if (__n) _M_copy(__s, _M_data() + __pos, __n); // 21.3.5.7 par 3: do not append null. (good.) return __n; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); const _CharT* __data = _M_data(); #pragma empty_line if (__n == 0) return __pos <= __size ? __pos : npos; #pragma empty_line if (__n <= __size) { for (; __pos <= __size - __n; ++__pos) if (traits_type::eq(__data[__pos], __s[0]) && traits_type::compare(__data + __pos + 1, __s + 1, __n - 1) == 0) return __pos; } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find(_CharT __c, size_type __pos) const { size_type __ret = npos; const size_type __size = this->size(); if (__pos < __size) { const _CharT* __data = _M_data(); const size_type __n = __size - __pos; const _CharT* __p = traits_type::find(__data + __pos, __n, __c); if (__p) __ret = __p - __data; } return __ret; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(const _CharT* __s, size_type __pos, size_type __n) const { ; const size_type __size = this->size(); if (__n <= __size) { __pos = std::min(size_type(__size - __n), __pos); const _CharT* __data = _M_data(); do { if (traits_type::compare(__data + __pos, __s, __n) == 0) return __pos; } while (__pos-- > 0); } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: rfind(_CharT __c, size_type __pos) const { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; for (++__size; __size-- > 0; ) if (traits_type::eq(_M_data()[__size], __c)) return __size; } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_of(const _CharT* __s, size_type __pos, size_type __n) const { ; for (; __n && __pos < this->size(); ++__pos) { const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); if (__p) return __pos; } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_of(const _CharT* __s, size_type __pos, size_type __n) const { ; size_type __size = this->size(); if (__size && __n) { if (--__size > __pos) __size = __pos; do { if (traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size-- != 0); } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const { ; for (; __pos < this->size(); ++__pos) if (!traits_type::find(__s, __n, _M_data()[__pos])) return __pos; return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_first_not_of(_CharT __c, size_type __pos) const { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) return __pos; return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const { ; size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::find(__s, __n, _M_data()[__size])) return __size; } while (__size--); } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: find_last_not_of(_CharT __c, size_type __pos) const { size_type __size = this->size(); if (__size) { if (--__size > __pos) __size = __pos; do { if (!traits_type::eq(_M_data()[__size], __c)) return __size; } while (__size--); } return npos; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n, const basic_string& __str) const { _M_check(__pos, "basic_string::compare"); __n = _M_limit(__pos, __n); const size_type __osize = __str.size(); const size_type __len = std::min(__n, __osize); int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); if (!__r) __r = _S_compare(__n, __osize); return __r; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2) const { _M_check(__pos1, "basic_string::compare"); __str._M_check(__pos2, "basic_string::compare"); __n1 = _M_limit(__pos1, __n1); __n2 = __str._M_limit(__pos2, __n2); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos1, __str.data() + __pos2, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> int basic_string<_CharT, _Traits, _Alloc>:: compare(const _CharT* __s) const { ; const size_type __size = this->size(); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__size, __osize); int __r = traits_type::compare(_M_data(), __s, __len); if (!__r) __r = _S_compare(__size, __osize); return __r; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __osize = traits_type::length(__s); const size_type __len = std::min(__n1, __osize); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __osize); return __r; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> int basic_string <_CharT, _Traits, _Alloc>:: compare(size_type __pos, size_type __n1, const _CharT* __s, size_type __n2) const { ; _M_check(__pos, "basic_string::compare"); __n1 = _M_limit(__pos, __n1); const size_type __len = std::min(__n1, __n2); int __r = traits_type::compare(_M_data() + __pos, __s, __len); if (!__r) __r = _S_compare(__n1, __n2); return __r; } #pragma empty_line // 21.3.7.9 basic_string::getline and operators template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; typedef ctype<_CharT> __ctype_type; typedef typename __ctype_type::ctype_base __ctype_base; #pragma empty_line __size_type __extracted = 0; typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { if (true) { // Avoid reallocation for common case. __str.erase(); _CharT __buf[128]; __size_type __len = 0; const streamsize __w = __in.width(); const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size(); const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); #pragma empty_line while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !__ct.is(__ctype_base::space, _Traits::to_char_type(__c))) { if (__len == sizeof(__buf) / sizeof(_CharT)) { __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); __len = 0; } __buf[__len++] = _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } __str.append(__buf, __len); #pragma empty_line if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; __in.width(0); } if (false) { __in._M_setstate(__ios_base::badbit); ; } if (false) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> // might cause endless loop __in._M_setstate(__ios_base::badbit); } } // 211. operator>>(istream&, string&) doesn't set failbit if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> basic_istream<_CharT, _Traits>& getline(basic_istream<_CharT, _Traits>& __in, basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_string<_CharT, _Traits, _Alloc> __string_type; typedef typename __istream_type::ios_base __ios_base; typedef typename __istream_type::int_type __int_type; typedef typename __string_type::size_type __size_type; #pragma empty_line __size_type __extracted = 0; const __size_type __n = __str.max_size(); typename __ios_base::iostate __err = __ios_base::goodbit; typename __istream_type::sentry __cerb(__in, true); if (__cerb) { if (true) { __str.erase(); const __int_type __idelim = _Traits::to_int_type(__delim); const __int_type __eof = _Traits::eof(); __int_type __c = __in.rdbuf()->sgetc(); #pragma empty_line while (__extracted < __n && !_Traits::eq_int_type(__c, __eof) && !_Traits::eq_int_type(__c, __idelim)) { __str += _Traits::to_char_type(__c); ++__extracted; __c = __in.rdbuf()->snextc(); } #pragma empty_line if (_Traits::eq_int_type(__c, __eof)) __err |= __ios_base::eofbit; else if (_Traits::eq_int_type(__c, __idelim)) { ++__extracted; __in.rdbuf()->sbumpc(); } else __err |= __ios_base::failbit; } if (false) { __in._M_setstate(__ios_base::badbit); ; } if (false) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 91. Description of operator>> and getline() for string<> // might cause endless loop __in._M_setstate(__ios_base::badbit); } } if (!__extracted) __err |= __ios_base::failbit; if (__err) __in.setstate(__err); return __in; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class basic_string<char>; extern template basic_istream<char>& operator>>(basic_istream<char>&, string&); extern template basic_ostream<char>& operator<<(basic_ostream<char>&, const string&); extern template basic_istream<char>& getline(basic_istream<char>&, string&, char); extern template basic_istream<char>& getline(basic_istream<char>&, string&); #pragma empty_line #pragma empty_line extern template class basic_string<wchar_t>; extern template basic_istream<wchar_t>& operator>>(basic_istream<wchar_t>&, wstring&); extern template basic_ostream<wchar_t>& operator<<(basic_ostream<wchar_t>&, const wstring&); extern template basic_istream<wchar_t>& getline(basic_istream<wchar_t>&, wstring&, wchar_t); extern template basic_istream<wchar_t>& getline(basic_istream<wchar_t>&, wstring&); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 55 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/string" 2 3 #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_classes.h" 2 3 #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // 22.1.1 Class locale /** * @brief Container class for localization functionality. * @ingroup locales * * The locale class is first a class wrapper for C library locales. It is * also an extensible container for user-defined localization. A locale is * a collection of facets that implement various localization features such * as money, time, and number printing. * * Constructing C++ locales does not change the C library locale. * * This library supports efficient construction and copying of locales * through a reference counting implementation of the locale class. */ class locale { public: // Types: /// Definition of locale::category. typedef int category; #pragma empty_line // Forward decls and friends: class facet; class id; class _Impl; #pragma empty_line friend class facet; friend class _Impl; #pragma empty_line template<typename _Facet> friend bool has_facet(const locale&) throw(); #pragma empty_line template<typename _Facet> friend const _Facet& use_facet(const locale&); #pragma empty_line template<typename _Cache> friend struct __use_cache; #pragma empty_line //@{ /** * @brief Category values. * * The standard category values are none, ctype, numeric, collate, time, * monetary, and messages. They form a bitmask that supports union and * intersection. The category all is the union of these values. * * NB: Order must match _S_facet_categories definition in locale.cc */ static const category none = 0; static const category ctype = 1L << 0; static const category numeric = 1L << 1; static const category collate = 1L << 2; static const category time = 1L << 3; static const category monetary = 1L << 4; static const category messages = 1L << 5; static const category all = (ctype | numeric | collate | time | monetary | messages); //@} #pragma empty_line // Construct/copy/destroy: #pragma empty_line /** * @brief Default constructor. * * Constructs a copy of the global locale. If no locale has been * explicitly set, this is the C locale. */ locale() throw(); #pragma empty_line /** * @brief Copy constructor. * * Constructs a copy of @a other. * * @param other The locale to copy. */ locale(const locale& __other) throw(); #pragma empty_line /** * @brief Named locale constructor. * * Constructs a copy of the named C library locale. * * @param s Name of the locale to construct. * @throw std::runtime_error if s is null or an undefined locale. */ explicit locale(const char* __s); #pragma empty_line /** * @brief Construct locale with facets from another locale. * * Constructs a copy of the locale @a base. The facets specified by @a * cat are replaced with those from the locale named by @a s. If base is * named, this locale instance will also be named. * * @param base The locale to copy. * @param s Name of the locale to use facets from. * @param cat Set of categories defining the facets to use from s. * @throw std::runtime_error if s is null or an undefined locale. */ locale(const locale& __base, const char* __s, category __cat); #pragma empty_line /** * @brief Construct locale with facets from another locale. * * Constructs a copy of the locale @a base. The facets specified by @a * cat are replaced with those from the locale @a add. If @a base and @a * add are named, this locale instance will also be named. * * @param base The locale to copy. * @param add The locale to use facets from. * @param cat Set of categories defining the facets to use from add. */ locale(const locale& __base, const locale& __add, category __cat); #pragma empty_line /** * @brief Construct locale with another facet. * * Constructs a copy of the locale @a other. The facet @f is added to * @other, replacing an existing facet of type Facet if there is one. If * @f is null, this locale is a copy of @a other. * * @param other The locale to copy. * @param f The facet to add in. */ template<typename _Facet> locale(const locale& __other, _Facet* __f); #pragma empty_line /// Locale destructor. ~locale() throw(); #pragma empty_line /** * @brief Assignment operator. * * Set this locale to be a copy of @a other. * * @param other The locale to copy. * @return A reference to this locale. */ const locale& operator=(const locale& __other) throw(); #pragma empty_line /** * @brief Construct locale with another facet. * * Constructs and returns a new copy of this locale. Adds or replaces an * existing facet of type Facet from the locale @a other into the new * locale. * * @param Facet The facet type to copy from other * @param other The locale to copy from. * @return Newly constructed locale. * @throw std::runtime_error if other has no facet of type Facet. */ template<typename _Facet> locale combine(const locale& __other) const; #pragma empty_line // Locale operations: /** * @brief Return locale name. * @return Locale name or "*" if unnamed. */ string name() const; #pragma empty_line /** * @brief Locale equality. * * @param other The locale to compare against. * @return True if other and this refer to the same locale instance, are * copies, or have the same name. False otherwise. */ bool operator==(const locale& __other) const throw(); #pragma empty_line /** * @brief Locale inequality. * * @param other The locale to compare against. * @return ! (*this == other) */ bool operator!=(const locale& __other) const throw() { return !(this->operator==(__other)); } #pragma empty_line /** * @brief Compare two strings according to collate. * * Template operator to compare two strings using the compare function of * the collate facet in this locale. One use is to provide the locale to * the sort function. For example, a vector v of strings could be sorted * according to locale loc by doing: * @code * std::sort(v.begin(), v.end(), loc); * @endcode * * @param s1 First string to compare. * @param s2 Second string to compare. * @return True if collate<Char> facet compares s1 < s2, else false. */ template<typename _Char, typename _Traits, typename _Alloc> bool operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, const basic_string<_Char, _Traits, _Alloc>& __s2) const; #pragma empty_line // Global locale objects: /** * @brief Set global locale * * This function sets the global locale to the argument and returns a * copy of the previous global locale. If the argument has a name, it * will also call std::setlocale(LC_ALL, loc.name()). * * @param locale The new locale to make global. * @return Copy of the old global locale. */ static locale global(const locale&); #pragma empty_line /** * @brief Return reference to the C locale. */ static const locale& classic(); #pragma empty_line private: // The (shared) implementation _Impl* _M_impl; #pragma empty_line // The "C" reference locale static _Impl* _S_classic; #pragma empty_line // Current global locale static _Impl* _S_global; #pragma empty_line // Names of underlying locale categories. // NB: locale::global() has to know how to modify all the // underlying categories, not just the ones required by the C++ // standard. static const char* const* const _S_categories; #pragma empty_line // Number of standard categories. For C++, these categories are // collate, ctype, monetary, numeric, time, and messages. These // directly correspond to ISO C99 macros LC_COLLATE, LC_CTYPE, // LC_MONETARY, LC_NUMERIC, and LC_TIME. In addition, POSIX (IEEE // 1003.1-2001) specifies LC_MESSAGES. // In addition to the standard categories, the underlying // operating system is allowed to define extra LC_* // macros. For GNU systems, the following are also valid: // LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT, // and LC_IDENTIFICATION. enum { _S_categories_size = 6 + 6 }; #pragma empty_line #pragma empty_line static __gthread_once_t _S_once; #pragma empty_line #pragma empty_line explicit locale(_Impl*) throw(); #pragma empty_line static void _S_initialize(); #pragma empty_line static void _S_initialize_once() throw(); #pragma empty_line static category _S_normalize_category(category); #pragma empty_line void _M_coalesce(const locale& __base, const locale& __add, category __cat); }; #pragma empty_line #pragma empty_line // 22.1.1.1.2 Class locale::facet /** * @brief Localization functionality base class. * @ingroup locales * * The facet class is the base class for a localization feature, such as * money, time, and number printing. It provides common support for facets * and reference management. * * Facets may not be copied or assigned. */ class locale::facet { private: friend class locale; friend class locale::_Impl; #pragma empty_line mutable _Atomic_word _M_refcount; #pragma empty_line // Contains data from the underlying "C" library for the classic locale. static __c_locale _S_c_locale; #pragma empty_line // String literal for the name of the classic locale. static const char _S_c_name[2]; #pragma empty_line #pragma empty_line static __gthread_once_t _S_once; #pragma empty_line #pragma empty_line static void _S_initialize_once(); #pragma empty_line protected: /** * @brief Facet constructor. * * This is the constructor provided by the standard. If refs is 0, the * facet is destroyed when the last referencing locale is destroyed. * Otherwise the facet will never be destroyed. * * @param refs The initial value for reference count. */ explicit facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) { } #pragma empty_line /// Facet destructor. virtual ~facet(); #pragma empty_line static void _S_create_c_locale(__c_locale& __cloc, const char* __s, __c_locale __old = 0); #pragma empty_line static __c_locale _S_clone_c_locale(__c_locale& __cloc) throw(); #pragma empty_line static void _S_destroy_c_locale(__c_locale& __cloc); #pragma empty_line static __c_locale _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); #pragma empty_line // Returns data from the underlying "C" library data for the // classic locale. static __c_locale _S_get_c_locale(); #pragma empty_line __attribute__ ((__const__)) static const char* _S_get_c_name() throw(); #pragma empty_line private: void _M_add_reference() const throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } #pragma empty_line void _M_remove_reference() const throw() { // Be race-detector-friendly. For more info see bits/c++config. ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { ; if (true) { delete this; } if (false) { } } } #pragma empty_line facet(const facet&); // Not defined. #pragma empty_line facet& operator=(const facet&); // Not defined. }; #pragma empty_line #pragma empty_line // 22.1.1.1.3 Class locale::id /** * @brief Facet ID class. * @ingroup locales * * The ID class provides facets with an index used to identify them. * Every facet class must define a public static member locale::id, or be * derived from a facet that provides this member, otherwise the facet * cannot be used in a locale. The locale::id ensures that each class * type gets a unique identifier. */ class locale::id { private: friend class locale; friend class locale::_Impl; #pragma empty_line template<typename _Facet> friend const _Facet& use_facet(const locale&); #pragma empty_line template<typename _Facet> friend bool has_facet(const locale&) throw(); #pragma empty_line // NB: There is no accessor for _M_index because it may be used // before the constructor is run; the effect of calling a member // function (even an inline) would be undefined. mutable size_t _M_index; #pragma empty_line // Last id number assigned. static _Atomic_word _S_refcount; #pragma empty_line void operator=(const id&); // Not defined. #pragma empty_line id(const id&); // Not defined. #pragma empty_line public: // NB: This class is always a static data member, and thus can be // counted on to be zero-initialized. /// Constructor. id() { } #pragma empty_line size_t _M_id() const throw(); }; #pragma empty_line #pragma empty_line // Implementation object for locale. class locale::_Impl { public: // Friends. friend class locale; friend class locale::facet; #pragma empty_line template<typename _Facet> friend bool has_facet(const locale&) throw(); #pragma empty_line template<typename _Facet> friend const _Facet& use_facet(const locale&); #pragma empty_line template<typename _Cache> friend struct __use_cache; #pragma empty_line private: // Data Members. _Atomic_word _M_refcount; const facet** _M_facets; size_t _M_facets_size; const facet** _M_caches; char** _M_names; static const locale::id* const _S_id_ctype[]; static const locale::id* const _S_id_numeric[]; static const locale::id* const _S_id_collate[]; static const locale::id* const _S_id_time[]; static const locale::id* const _S_id_monetary[]; static const locale::id* const _S_id_messages[]; static const locale::id* const* const _S_facet_categories[]; #pragma empty_line void _M_add_reference() throw() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } #pragma empty_line void _M_remove_reference() throw() { // Be race-detector-friendly. For more info see bits/c++config. ; if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) { ; if (true) { delete this; } if (false) { } } } #pragma empty_line _Impl(const _Impl&, size_t); _Impl(const char*, size_t); _Impl(size_t) throw(); #pragma empty_line ~_Impl() throw(); #pragma empty_line _Impl(const _Impl&); // Not defined. #pragma empty_line void operator=(const _Impl&); // Not defined. #pragma empty_line bool _M_check_same_name() { bool __ret = true; if (_M_names[1]) // We must actually compare all the _M_names: can be all equal! for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; return __ret; } #pragma empty_line void _M_replace_categories(const _Impl*, category); #pragma empty_line void _M_replace_category(const _Impl*, const locale::id* const*); #pragma empty_line void _M_replace_facet(const _Impl*, const locale::id*); #pragma empty_line void _M_install_facet(const locale::id*, const facet*); #pragma empty_line template<typename _Facet> void _M_init_facet(_Facet* __facet) { _M_install_facet(&_Facet::id, __facet); } #pragma empty_line void _M_install_cache(const facet*, size_t); }; #pragma empty_line #pragma empty_line /** * @brief Test for the presence of a facet. * * has_facet tests the locale argument for the presence of the facet type * provided as the template parameter. Facets derived from the facet * parameter will also return true. * * @param Facet The facet type to test the presence of. * @param locale The locale to test. * @return true if locale contains a facet of type Facet, else false. */ template<typename _Facet> bool has_facet(const locale& __loc) throw(); #pragma empty_line /** * @brief Return a facet. * * use_facet looks for and returns a reference to a facet of type Facet * where Facet is the template parameter. If has_facet(locale) is true, * there is a suitable facet to return. It throws std::bad_cast if the * locale doesn't contain a facet of type Facet. * * @param Facet The facet type to access. * @param locale The locale to use. * @return Reference to facet of type Facet. * @throw std::bad_cast if locale doesn't contain a facet of type Facet. */ template<typename _Facet> const _Facet& use_facet(const locale& __loc); #pragma empty_line #pragma empty_line /** * @brief Facet for localized string comparison. * * This facet encapsulates the code to compare strings in a localized * manner. * * The collate template uses protected virtual functions to provide * the actual results. The public accessors forward the call to * the virtual functions. These virtual functions are hooks for * developers to implement the behavior they require from the * collate facet. */ template<typename _CharT> class collate : public locale::facet { public: // Types: //@{ /// Public typedefs typedef _CharT char_type; typedef basic_string<_CharT> string_type; //@} #pragma empty_line protected: // Underlying "C" library locale information saved from // initialization, needed by collate_byname as well. __c_locale _M_c_locale_collate; #pragma empty_line public: /// Numpunct facet id. static locale::id id; #pragma empty_line /** * @brief Constructor performs initialization. * * This is the constructor provided by the standard. * * @param refs Passed to the base facet class. */ explicit collate(size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) { } #pragma empty_line /** * @brief Internal constructor. Not for general use. * * This is a constructor for use by the library itself to set up new * locales. * * @param cloc The C locale. * @param refs Passed to the base facet class. */ explicit collate(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) { } #pragma empty_line /** * @brief Compare two strings. * * This function compares two strings and returns the result by calling * collate::do_compare(). * * @param lo1 Start of string 1. * @param hi1 End of string 1. * @param lo2 Start of string 2. * @param hi2 End of string 2. * @return 1 if string1 > string2, -1 if string1 < string2, else 0. */ int compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } #pragma empty_line /** * @brief Transform string to comparable form. * * This function is a wrapper for strxfrm functionality. It takes the * input string and returns a modified string that can be directly * compared to other transformed strings. In the C locale, this * function just returns a copy of the input string. In some other * locales, it may replace two chars with one, change a char for * another, etc. It does so by returning collate::do_transform(). * * @param lo Start of string. * @param hi End of string. * @return Transformed string_type. */ string_type transform(const _CharT* __lo, const _CharT* __hi) const { return this->do_transform(__lo, __hi); } #pragma empty_line /** * @brief Return hash of a string. * * This function computes and returns a hash on the input string. It * does so by returning collate::do_hash(). * * @param lo Start of string. * @param hi End of string. * @return Hash value. */ long hash(const _CharT* __lo, const _CharT* __hi) const { return this->do_hash(__lo, __hi); } #pragma empty_line // Used to abstract out _CharT bits in virtual member functions, below. int _M_compare(const _CharT*, const _CharT*) const throw(); #pragma empty_line size_t _M_transform(_CharT*, const _CharT*, size_t) const throw(); #pragma empty_line protected: /// Destructor. virtual ~collate() { _S_destroy_c_locale(_M_c_locale_collate); } #pragma empty_line /** * @brief Compare two strings. * * This function is a hook for derived classes to change the value * returned. @see compare(). * * @param lo1 Start of string 1. * @param hi1 End of string 1. * @param lo2 Start of string 2. * @param hi2 End of string 2. * @return 1 if string1 > string2, -1 if string1 < string2, else 0. */ virtual int do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const; #pragma empty_line /** * @brief Transform string to comparable form. * * This function is a hook for derived classes to change the value * returned. * * @param lo1 Start of string 1. * @param hi1 End of string 1. * @param lo2 Start of string 2. * @param hi2 End of string 2. * @return 1 if string1 > string2, -1 if string1 < string2, else 0. */ virtual string_type do_transform(const _CharT* __lo, const _CharT* __hi) const; #pragma empty_line /** * @brief Return hash of a string. * * This function computes and returns a hash on the input string. This * function is a hook for derived classes to change the value returned. * * @param lo Start of string. * @param hi End of string. * @return Hash value. */ virtual long do_hash(const _CharT* __lo, const _CharT* __hi) const; }; #pragma empty_line template<typename _CharT> locale::id collate<_CharT>::id; #pragma empty_line // Specializations. template<> int collate<char>::_M_compare(const char*, const char*) const throw(); #pragma empty_line template<> size_t collate<char>::_M_transform(char*, const char*, size_t) const throw(); #pragma empty_line #pragma empty_line template<> int collate<wchar_t>::_M_compare(const wchar_t*, const wchar_t*) const throw(); #pragma empty_line template<> size_t collate<wchar_t>::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); #pragma empty_line #pragma empty_line /// class collate_byname [22.2.4.2]. template<typename _CharT> class collate_byname : public collate<_CharT> { public: //@{ /// Public typedefs typedef _CharT char_type; typedef basic_string<_CharT> string_type; //@} #pragma empty_line explicit collate_byname(const char* __s, size_t __refs = 0) : collate<_CharT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { this->_S_destroy_c_locale(this->_M_c_locale_collate); this->_S_create_c_locale(this->_M_c_locale_collate, __s); } } #pragma empty_line protected: virtual ~collate_byname() { } }; #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_classes.tcc" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/locale_classes.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.1 Locales // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 37 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_classes.tcc" 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _Facet> locale:: locale(const locale& __other, _Facet* __f) { _M_impl = new _Impl(*__other._M_impl, 1); #pragma empty_line if (true) { _M_impl->_M_install_facet(&_Facet::id, __f); } if (false) { _M_impl->_M_remove_reference(); ; } delete [] _M_impl->_M_names[0]; _M_impl->_M_names[0] = 0; // Unnamed. } #pragma empty_line template<typename _Facet> locale locale:: combine(const locale& __other) const { _Impl* __tmp = new _Impl(*_M_impl, 1); if (true) { __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); } if (false) { __tmp->_M_remove_reference(); ; } return locale(__tmp); } #pragma empty_line template<typename _CharT, typename _Traits, typename _Alloc> bool locale:: operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, const basic_string<_CharT, _Traits, _Alloc>& __s2) const { typedef std::collate<_CharT> __collate_type; const __collate_type& __collate = use_facet<__collate_type>(*this); return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), __s2.data(), __s2.data() + __s2.length()) < 0); } #pragma empty_line #pragma empty_line template<typename _Facet> bool has_facet(const locale& __loc) throw() { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; return (__i < __loc._M_impl->_M_facets_size #pragma empty_line && dynamic_cast<const _Facet*>(__facets[__i])); #pragma empty_line #pragma empty_line #pragma empty_line } #pragma empty_line template<typename _Facet> const _Facet& use_facet(const locale& __loc) { const size_t __i = _Facet::id._M_id(); const locale::facet** __facets = __loc._M_impl->_M_facets; if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) __throw_bad_cast(); #pragma empty_line return dynamic_cast<const _Facet&>(*__facets[__i]); #pragma empty_line #pragma empty_line #pragma empty_line } #pragma empty_line #pragma empty_line // Generic version does nothing. template<typename _CharT> int collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () { return 0; } #pragma empty_line // Generic version does nothing. template<typename _CharT> size_t collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () { return 0; } #pragma empty_line template<typename _CharT> int collate<_CharT>:: do_compare(const _CharT* __lo1, const _CharT* __hi1, const _CharT* __lo2, const _CharT* __hi2) const { // strcoll assumes zero-terminated strings so we make a copy // and then put a zero at the end. const string_type __one(__lo1, __hi1); const string_type __two(__lo2, __hi2); #pragma empty_line const _CharT* __p = __one.c_str(); const _CharT* __pend = __one.data() + __one.length(); const _CharT* __q = __two.c_str(); const _CharT* __qend = __two.data() + __two.length(); #pragma empty_line // strcoll stops when it sees a nul character so we break // the strings into zero-terminated substrings and pass those // to strcoll. for (;;) { const int __res = _M_compare(__p, __q); if (__res) return __res; #pragma empty_line __p += char_traits<_CharT>::length(__p); __q += char_traits<_CharT>::length(__q); if (__p == __pend && __q == __qend) return 0; else if (__p == __pend) return -1; else if (__q == __qend) return 1; #pragma empty_line __p++; __q++; } } #pragma empty_line template<typename _CharT> typename collate<_CharT>::string_type collate<_CharT>:: do_transform(const _CharT* __lo, const _CharT* __hi) const { string_type __ret; #pragma empty_line // strxfrm assumes zero-terminated strings so we make a copy const string_type __str(__lo, __hi); #pragma empty_line const _CharT* __p = __str.c_str(); const _CharT* __pend = __str.data() + __str.length(); #pragma empty_line size_t __len = (__hi - __lo) * 2; #pragma empty_line _CharT* __c = new _CharT[__len]; #pragma empty_line if (true) { // strxfrm stops when it sees a nul character so we break // the string into zero-terminated substrings and pass those // to strxfrm. for (;;) { // First try a buffer perhaps big enough. size_t __res = _M_transform(__c, __p, __len); // If the buffer was not large enough, try again with the // correct size. if (__res >= __len) { __len = __res + 1; delete [] __c, __c = 0; __c = new _CharT[__len]; __res = _M_transform(__c, __p, __len); } #pragma empty_line __ret.append(__c, __res); __p += char_traits<_CharT>::length(__p); if (__p == __pend) break; #pragma empty_line __p++; __ret.push_back(_CharT()); } } if (false) { delete [] __c; ; } #pragma empty_line delete [] __c; #pragma empty_line return __ret; } #pragma empty_line template<typename _CharT> long collate<_CharT>:: do_hash(const _CharT* __lo, const _CharT* __hi) const { unsigned long __val = 0; for (; __lo < __hi; ++__lo) __val = *__lo + ((__val << 7) | (__val >> (__gnu_cxx::__numeric_traits<unsigned long>:: __digits - 7))); return static_cast<long>(__val); } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class collate<char>; extern template class collate_byname<char>; #pragma empty_line extern template const collate<char>& use_facet<collate<char> >(const locale&); #pragma empty_line extern template bool has_facet<collate<char> >(const locale&); #pragma empty_line #pragma empty_line extern template class collate<wchar_t>; extern template class collate_byname<wchar_t>; #pragma empty_line extern template const collate<wchar_t>& use_facet<collate<wchar_t> >(const locale&); #pragma empty_line extern template bool has_facet<collate<wchar_t> >(const locale&); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 823 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_classes.h" 2 3 #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ios_base.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // The following definitions of bitmask types are enums, not ints, // as permitted (but not required) in the standard, in order to provide // better type safety in iostream calls. A side effect is that // expressions involving them are no longer compile-time constants. enum _Ios_Fmtflags { _S_boolalpha = 1L << 0, _S_dec = 1L << 1, _S_fixed = 1L << 2, _S_hex = 1L << 3, _S_internal = 1L << 4, _S_left = 1L << 5, _S_oct = 1L << 6, _S_right = 1L << 7, _S_scientific = 1L << 8, _S_showbase = 1L << 9, _S_showpoint = 1L << 10, _S_showpos = 1L << 11, _S_skipws = 1L << 12, _S_unitbuf = 1L << 13, _S_uppercase = 1L << 14, _S_adjustfield = _S_left | _S_right | _S_internal, _S_basefield = _S_dec | _S_oct | _S_hex, _S_floatfield = _S_scientific | _S_fixed, _S_ios_fmtflags_end = 1L << 16 }; #pragma empty_line inline _Ios_Fmtflags operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast<int>(__a) & static_cast<int>(__b)); } #pragma empty_line inline _Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast<int>(__a) | static_cast<int>(__b)); } #pragma empty_line inline _Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) { return _Ios_Fmtflags(static_cast<int>(__a) ^ static_cast<int>(__b)); } #pragma empty_line inline _Ios_Fmtflags operator~(_Ios_Fmtflags __a) { return _Ios_Fmtflags(~static_cast<int>(__a)); } #pragma empty_line inline const _Ios_Fmtflags& operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a | __b; } #pragma empty_line inline const _Ios_Fmtflags& operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a & __b; } #pragma empty_line inline const _Ios_Fmtflags& operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) { return __a = __a ^ __b; } #pragma empty_line #pragma empty_line enum _Ios_Openmode { _S_app = 1L << 0, _S_ate = 1L << 1, _S_bin = 1L << 2, _S_in = 1L << 3, _S_out = 1L << 4, _S_trunc = 1L << 5, _S_ios_openmode_end = 1L << 16 }; #pragma empty_line inline _Ios_Openmode operator&(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast<int>(__a) & static_cast<int>(__b)); } #pragma empty_line inline _Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast<int>(__a) | static_cast<int>(__b)); } #pragma empty_line inline _Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode __b) { return _Ios_Openmode(static_cast<int>(__a) ^ static_cast<int>(__b)); } #pragma empty_line inline _Ios_Openmode operator~(_Ios_Openmode __a) { return _Ios_Openmode(~static_cast<int>(__a)); } #pragma empty_line inline const _Ios_Openmode& operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a | __b; } #pragma empty_line inline const _Ios_Openmode& operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a & __b; } #pragma empty_line inline const _Ios_Openmode& operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) { return __a = __a ^ __b; } #pragma empty_line #pragma empty_line enum _Ios_Iostate { _S_goodbit = 0, _S_badbit = 1L << 0, _S_eofbit = 1L << 1, _S_failbit = 1L << 2, _S_ios_iostate_end = 1L << 16 }; #pragma empty_line inline _Ios_Iostate operator&(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast<int>(__a) & static_cast<int>(__b)); } #pragma empty_line inline _Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast<int>(__a) | static_cast<int>(__b)); } #pragma empty_line inline _Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) { return _Ios_Iostate(static_cast<int>(__a) ^ static_cast<int>(__b)); } #pragma empty_line inline _Ios_Iostate operator~(_Ios_Iostate __a) { return _Ios_Iostate(~static_cast<int>(__a)); } #pragma empty_line inline const _Ios_Iostate& operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a | __b; } #pragma empty_line inline const _Ios_Iostate& operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a & __b; } #pragma empty_line inline const _Ios_Iostate& operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) { return __a = __a ^ __b; } #pragma empty_line #pragma empty_line enum _Ios_Seekdir { _S_beg = 0, _S_cur = 1, _S_end = 2, _S_ios_seekdir_end = 1L << 16 }; #pragma empty_line // 27.4.2 Class ios_base /** * @brief The base of the I/O class hierarchy. * @ingroup io * * This class defines everything that can be defined about I/O that does * not depend on the type of characters being input or output. Most * people will only see @c ios_base when they need to specify the full * name of the various I/O flags (e.g., the openmodes). */ class ios_base { public: #pragma empty_line /** * @brief These are thrown to indicate problems with io. * @ingroup exceptions * * 27.4.2.1.1 Class ios_base::failure */ class failure : public exception { public: // _GLIBCXX_RESOLVE_LIB_DEFECTS // 48. Use of non-existent exception constructor explicit failure(const string& __str) throw(); #pragma empty_line // This declaration is not useless: // http://gcc.gnu.org/onlinedocs/gcc-4.3.2/gcc/Vague-Linkage.html virtual ~failure() throw(); #pragma empty_line virtual const char* what() const throw(); #pragma empty_line private: string _M_msg; }; #pragma empty_line // 27.4.2.1.2 Type ios_base::fmtflags /** * @brief This is a bitmask type. * * @c @a _Ios_Fmtflags is implementation-defined, but it is valid to * perform bitwise operations on these values and expect the Right * Thing to happen. Defined objects of type fmtflags are: * - boolalpha * - dec * - fixed * - hex * - internal * - left * - oct * - right * - scientific * - showbase * - showpoint * - showpos * - skipws * - unitbuf * - uppercase * - adjustfield * - basefield * - floatfield */ typedef _Ios_Fmtflags fmtflags; #pragma empty_line /// Insert/extract @c bool in alphabetic rather than numeric format. static const fmtflags boolalpha = _S_boolalpha; #pragma empty_line /// Converts integer input or generates integer output in decimal base. static const fmtflags dec = _S_dec; #pragma empty_line /// Generate floating-point output in fixed-point notation. static const fmtflags fixed = _S_fixed; #pragma empty_line /// Converts integer input or generates integer output in hexadecimal base. static const fmtflags hex = _S_hex; #pragma empty_line /// Adds fill characters at a designated internal point in certain /// generated output, or identical to @c right if no such point is /// designated. static const fmtflags internal = _S_internal; #pragma empty_line /// Adds fill characters on the right (final positions) of certain /// generated output. (I.e., the thing you print is flush left.) static const fmtflags left = _S_left; #pragma empty_line /// Converts integer input or generates integer output in octal base. static const fmtflags oct = _S_oct; #pragma empty_line /// Adds fill characters on the left (initial positions) of certain /// generated output. (I.e., the thing you print is flush right.) static const fmtflags right = _S_right; #pragma empty_line /// Generates floating-point output in scientific notation. static const fmtflags scientific = _S_scientific; #pragma empty_line /// Generates a prefix indicating the numeric base of generated integer /// output. static const fmtflags showbase = _S_showbase; #pragma empty_line /// Generates a decimal-point character unconditionally in generated /// floating-point output. static const fmtflags showpoint = _S_showpoint; #pragma empty_line /// Generates a + sign in non-negative generated numeric output. static const fmtflags showpos = _S_showpos; #pragma empty_line /// Skips leading white space before certain input operations. static const fmtflags skipws = _S_skipws; #pragma empty_line /// Flushes output after each output operation. static const fmtflags unitbuf = _S_unitbuf; #pragma empty_line /// Replaces certain lowercase letters with their uppercase equivalents /// in generated output. static const fmtflags uppercase = _S_uppercase; #pragma empty_line /// A mask of left|right|internal. Useful for the 2-arg form of @c setf. static const fmtflags adjustfield = _S_adjustfield; #pragma empty_line /// A mask of dec|oct|hex. Useful for the 2-arg form of @c setf. static const fmtflags basefield = _S_basefield; #pragma empty_line /// A mask of scientific|fixed. Useful for the 2-arg form of @c setf. static const fmtflags floatfield = _S_floatfield; #pragma empty_line // 27.4.2.1.3 Type ios_base::iostate /** * @brief This is a bitmask type. * * @c @a _Ios_Iostate is implementation-defined, but it is valid to * perform bitwise operations on these values and expect the Right * Thing to happen. Defined objects of type iostate are: * - badbit * - eofbit * - failbit * - goodbit */ typedef _Ios_Iostate iostate; #pragma empty_line /// Indicates a loss of integrity in an input or output sequence (such /// as an irrecoverable read error from a file). static const iostate badbit = _S_badbit; #pragma empty_line /// Indicates that an input operation reached the end of an input sequence. static const iostate eofbit = _S_eofbit; #pragma empty_line /// Indicates that an input operation failed to read the expected /// characters, or that an output operation failed to generate the /// desired characters. static const iostate failbit = _S_failbit; #pragma empty_line /// Indicates all is well. static const iostate goodbit = _S_goodbit; #pragma empty_line // 27.4.2.1.4 Type ios_base::openmode /** * @brief This is a bitmask type. * * @c @a _Ios_Openmode is implementation-defined, but it is valid to * perform bitwise operations on these values and expect the Right * Thing to happen. Defined objects of type openmode are: * - app * - ate * - binary * - in * - out * - trunc */ typedef _Ios_Openmode openmode; #pragma empty_line /// Seek to end before each write. static const openmode app = _S_app; #pragma empty_line /// Open and seek to end immediately after opening. static const openmode ate = _S_ate; #pragma empty_line /// Perform input and output in binary mode (as opposed to text mode). /// This is probably not what you think it is; see /// http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch27s02.html static const openmode binary = _S_bin; #pragma empty_line /// Open for input. Default for @c ifstream and fstream. static const openmode in = _S_in; #pragma empty_line /// Open for output. Default for @c ofstream and fstream. static const openmode out = _S_out; #pragma empty_line /// Open for input. Default for @c ofstream. static const openmode trunc = _S_trunc; #pragma empty_line // 27.4.2.1.5 Type ios_base::seekdir /** * @brief This is an enumerated type. * * @c @a _Ios_Seekdir is implementation-defined. Defined values * of type seekdir are: * - beg * - cur, equivalent to @c SEEK_CUR in the C standard library. * - end, equivalent to @c SEEK_END in the C standard library. */ typedef _Ios_Seekdir seekdir; #pragma empty_line /// Request a seek relative to the beginning of the stream. static const seekdir beg = _S_beg; #pragma empty_line /// Request a seek relative to the current position within the sequence. static const seekdir cur = _S_cur; #pragma empty_line /// Request a seek relative to the current end of the sequence. static const seekdir end = _S_end; #pragma empty_line // Annex D.6 typedef int io_state; typedef int open_mode; typedef int seek_dir; #pragma empty_line typedef std::streampos streampos; typedef std::streamoff streamoff; #pragma empty_line // Callbacks; /** * @brief The set of events that may be passed to an event callback. * * erase_event is used during ~ios() and copyfmt(). imbue_event is used * during imbue(). copyfmt_event is used during copyfmt(). */ enum event { erase_event, imbue_event, copyfmt_event }; #pragma empty_line /** * @brief The type of an event callback function. * @param event One of the members of the event enum. * @param ios_base Reference to the ios_base object. * @param int The integer provided when the callback was registered. * * Event callbacks are user defined functions that get called during * several ios_base and basic_ios functions, specifically imbue(), * copyfmt(), and ~ios(). */ typedef void (*event_callback) (event, ios_base&, int); #pragma empty_line /** * @brief Add the callback __fn with parameter __index. * @param __fn The function to add. * @param __index The integer to pass to the function when invoked. * * Registers a function as an event callback with an integer parameter to * be passed to the function when invoked. Multiple copies of the * function are allowed. If there are multiple callbacks, they are * invoked in the order they were registered. */ void register_callback(event_callback __fn, int __index); #pragma empty_line protected: streamsize _M_precision; streamsize _M_width; fmtflags _M_flags; iostate _M_exception; iostate _M_streambuf_state; #pragma empty_line // 27.4.2.6 Members for callbacks // 27.4.2.6 ios_base callbacks struct _Callback_list { // Data Members _Callback_list* _M_next; ios_base::event_callback _M_fn; int _M_index; _Atomic_word _M_refcount; // 0 means one reference. #pragma empty_line _Callback_list(ios_base::event_callback __fn, int __index, _Callback_list* __cb) : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } #pragma empty_line void _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } #pragma empty_line // 0 => OK to delete. int _M_remove_reference() { // Be race-detector-friendly. For more info see bits/c++config. ; int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); if (__res == 0) { ; } return __res; } }; #pragma empty_line _Callback_list* _M_callbacks; #pragma empty_line void _M_call_callbacks(event __ev) throw(); #pragma empty_line void _M_dispose_callbacks(void) throw(); #pragma empty_line // 27.4.2.5 Members for iword/pword storage struct _Words { void* _M_pword; long _M_iword; _Words() : _M_pword(0), _M_iword(0) { } }; #pragma empty_line // Only for failed iword/pword calls. _Words _M_word_zero; #pragma empty_line // Guaranteed storage. // The first 5 iword and pword slots are reserved for internal use. enum { _S_local_word_size = 8 }; _Words _M_local_word[_S_local_word_size]; #pragma empty_line // Allocated storage. int _M_word_size; _Words* _M_word; #pragma empty_line _Words& _M_grow_words(int __index, bool __iword); #pragma empty_line // Members for locale and locale caching. locale _M_ios_locale; #pragma empty_line void _M_init() throw(); #pragma empty_line public: #pragma empty_line // 27.4.2.1.6 Class ios_base::Init // Used to initialize standard streams. In theory, g++ could use // -finit-priority to order this stuff correctly without going // through these machinations. class Init { friend class ios_base; public: Init(); ~Init(); #pragma empty_line private: static _Atomic_word _S_refcount; static bool _S_synced_with_stdio; }; #pragma empty_line // [27.4.2.2] fmtflags state functions /** * @brief Access to format flags. * @return The format control flags for both input and output. */ fmtflags flags() const { return _M_flags; } #pragma empty_line /** * @brief Setting new format flags all at once. * @param fmtfl The new flags to set. * @return The previous format control flags. * * This function overwrites all the format flags with @a fmtfl. */ fmtflags flags(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags = __fmtfl; return __old; } #pragma empty_line /** * @brief Setting new format flags. * @param fmtfl Additional flags to set. * @return The previous format control flags. * * This function sets additional flags in format control. Flags that * were previously set remain set. */ fmtflags setf(fmtflags __fmtfl) { fmtflags __old = _M_flags; _M_flags |= __fmtfl; return __old; } #pragma empty_line /** * @brief Setting new format flags. * @param fmtfl Additional flags to set. * @param mask The flags mask for @a fmtfl. * @return The previous format control flags. * * This function clears @a mask in the format flags, then sets * @a fmtfl @c & @a mask. An example mask is @c ios_base::adjustfield. */ fmtflags setf(fmtflags __fmtfl, fmtflags __mask) { fmtflags __old = _M_flags; _M_flags &= ~__mask; _M_flags |= (__fmtfl & __mask); return __old; } #pragma empty_line /** * @brief Clearing format flags. * @param mask The flags to unset. * * This function clears @a mask in the format flags. */ void unsetf(fmtflags __mask) { _M_flags &= ~__mask; } #pragma empty_line /** * @brief Flags access. * @return The precision to generate on certain output operations. * * Be careful if you try to give a definition of @a precision here; see * DR 189. */ streamsize precision() const { return _M_precision; } #pragma empty_line /** * @brief Changing flags. * @param prec The new precision value. * @return The previous value of precision(). */ streamsize precision(streamsize __prec) { streamsize __old = _M_precision; _M_precision = __prec; return __old; } #pragma empty_line /** * @brief Flags access. * @return The minimum field width to generate on output operations. * * <em>Minimum field width</em> refers to the number of characters. */ streamsize width() const { return _M_width; } #pragma empty_line /** * @brief Changing flags. * @param wide The new width value. * @return The previous value of width(). */ streamsize width(streamsize __wide) { streamsize __old = _M_width; _M_width = __wide; return __old; } #pragma empty_line // [27.4.2.4] ios_base static members /** * @brief Interaction with the standard C I/O objects. * @param sync Whether to synchronize or not. * @return True if the standard streams were previously synchronized. * * The synchronization referred to is @e only that between the standard * C facilities (e.g., stdout) and the standard C++ objects (e.g., * cout). User-declared streams are unaffected. See * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch28s02.html */ static bool sync_with_stdio(bool __sync = true); #pragma empty_line // [27.4.2.3] ios_base locale functions /** * @brief Setting a new locale. * @param loc The new locale. * @return The previous locale. * * Sets the new locale for this stream, and then invokes each callback * with imbue_event. */ locale imbue(const locale& __loc) throw(); #pragma empty_line /** * @brief Locale access * @return A copy of the current locale. * * If @c imbue(loc) has previously been called, then this function * returns @c loc. Otherwise, it returns a copy of @c std::locale(), * the global C++ locale. */ locale getloc() const { return _M_ios_locale; } #pragma empty_line /** * @brief Locale access * @return A reference to the current locale. * * Like getloc above, but returns a reference instead of * generating a copy. */ const locale& _M_getloc() const { return _M_ios_locale; } #pragma empty_line // [27.4.2.5] ios_base storage functions /** * @brief Access to unique indices. * @return An integer different from all previous calls. * * This function returns a unique integer every time it is called. It * can be used for any purpose, but is primarily intended to be a unique * index for the iword and pword functions. The expectation is that an * application calls xalloc in order to obtain an index in the iword and * pword arrays that can be used without fear of conflict. * * The implementation maintains a static variable that is incremented and * returned on each invocation. xalloc is guaranteed to return an index * that is safe to use in the iword and pword arrays. */ static int xalloc() throw(); #pragma empty_line /** * @brief Access to integer array. * @param __ix Index into the array. * @return A reference to an integer associated with the index. * * The iword function provides access to an array of integers that can be * used for any purpose. The array grows as required to hold the * supplied index. All integers in the array are initialized to 0. * * The implementation reserves several indices. You should use xalloc to * obtain an index that is safe to use. Also note that since the array * can grow dynamically, it is not safe to hold onto the reference. */ long& iword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, true); return __word._M_iword; } #pragma empty_line /** * @brief Access to void pointer array. * @param __ix Index into the array. * @return A reference to a void* associated with the index. * * The pword function provides access to an array of pointers that can be * used for any purpose. The array grows as required to hold the * supplied index. All pointers in the array are initialized to 0. * * The implementation reserves several indices. You should use xalloc to * obtain an index that is safe to use. Also note that since the array * can grow dynamically, it is not safe to hold onto the reference. */ void*& pword(int __ix) { _Words& __word = (__ix < _M_word_size) ? _M_word[__ix] : _M_grow_words(__ix, false); return __word._M_pword; } #pragma empty_line // Destructor /** * Invokes each callback with erase_event. Destroys local storage. * * Note that the ios_base object for the standard streams never gets * destroyed. As a result, any callbacks registered with the standard * streams will not get invoked with erase_event (unless copyfmt is * used). */ virtual ~ios_base(); #pragma empty_line protected: ios_base() throw (); #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 50. Copy constructor and assignment operator of ios_base private: ios_base(const ios_base&); #pragma empty_line ios_base& operator=(const ios_base&); }; #pragma empty_line // [27.4.5.1] fmtflags manipulators /// Calls base.setf(ios_base::boolalpha). inline ios_base& boolalpha(ios_base& __base) { __base.setf(ios_base::boolalpha); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::boolalpha). inline ios_base& noboolalpha(ios_base& __base) { __base.unsetf(ios_base::boolalpha); return __base; } #pragma empty_line /// Calls base.setf(ios_base::showbase). inline ios_base& showbase(ios_base& __base) { __base.setf(ios_base::showbase); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::showbase). inline ios_base& noshowbase(ios_base& __base) { __base.unsetf(ios_base::showbase); return __base; } #pragma empty_line /// Calls base.setf(ios_base::showpoint). inline ios_base& showpoint(ios_base& __base) { __base.setf(ios_base::showpoint); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::showpoint). inline ios_base& noshowpoint(ios_base& __base) { __base.unsetf(ios_base::showpoint); return __base; } #pragma empty_line /// Calls base.setf(ios_base::showpos). inline ios_base& showpos(ios_base& __base) { __base.setf(ios_base::showpos); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::showpos). inline ios_base& noshowpos(ios_base& __base) { __base.unsetf(ios_base::showpos); return __base; } #pragma empty_line /// Calls base.setf(ios_base::skipws). inline ios_base& skipws(ios_base& __base) { __base.setf(ios_base::skipws); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::skipws). inline ios_base& noskipws(ios_base& __base) { __base.unsetf(ios_base::skipws); return __base; } #pragma empty_line /// Calls base.setf(ios_base::uppercase). inline ios_base& uppercase(ios_base& __base) { __base.setf(ios_base::uppercase); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::uppercase). inline ios_base& nouppercase(ios_base& __base) { __base.unsetf(ios_base::uppercase); return __base; } #pragma empty_line /// Calls base.setf(ios_base::unitbuf). inline ios_base& unitbuf(ios_base& __base) { __base.setf(ios_base::unitbuf); return __base; } #pragma empty_line /// Calls base.unsetf(ios_base::unitbuf). inline ios_base& nounitbuf(ios_base& __base) { __base.unsetf(ios_base::unitbuf); return __base; } #pragma empty_line // [27.4.5.2] adjustfield manipulators /// Calls base.setf(ios_base::internal, ios_base::adjustfield). inline ios_base& internal(ios_base& __base) { __base.setf(ios_base::internal, ios_base::adjustfield); return __base; } #pragma empty_line /// Calls base.setf(ios_base::left, ios_base::adjustfield). inline ios_base& left(ios_base& __base) { __base.setf(ios_base::left, ios_base::adjustfield); return __base; } #pragma empty_line /// Calls base.setf(ios_base::right, ios_base::adjustfield). inline ios_base& right(ios_base& __base) { __base.setf(ios_base::right, ios_base::adjustfield); return __base; } #pragma empty_line // [27.4.5.3] basefield manipulators /// Calls base.setf(ios_base::dec, ios_base::basefield). inline ios_base& dec(ios_base& __base) { __base.setf(ios_base::dec, ios_base::basefield); return __base; } #pragma empty_line /// Calls base.setf(ios_base::hex, ios_base::basefield). inline ios_base& hex(ios_base& __base) { __base.setf(ios_base::hex, ios_base::basefield); return __base; } #pragma empty_line /// Calls base.setf(ios_base::oct, ios_base::basefield). inline ios_base& oct(ios_base& __base) { __base.setf(ios_base::oct, ios_base::basefield); return __base; } #pragma empty_line // [27.4.5.4] floatfield manipulators /// Calls base.setf(ios_base::fixed, ios_base::floatfield). inline ios_base& fixed(ios_base& __base) { __base.setf(ios_base::fixed, ios_base::floatfield); return __base; } #pragma empty_line /// Calls base.setf(ios_base::scientific, ios_base::floatfield). inline ios_base& scientific(ios_base& __base) { __base.setf(ios_base::scientific, ios_base::floatfield); return __base; } #pragma empty_line #pragma empty_line } // namespace #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/streambuf" 1 3 // Stream buffer classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/streambuf * This is a Standard C++ Library header. */ #pragma empty_line // // ISO C++ 14882: 27.5 Stream buffers // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 37 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/streambuf" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits> streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, basic_streambuf<_CharT, _Traits>*, bool&); #pragma empty_line /** * @brief The actual work of input and output (interface). * @ingroup io * * This is a base class. Derived stream buffers each control a * pair of character sequences: one for input, and one for output. * * Section [27.5.1] of the standard describes the requirements and * behavior of stream buffer classes. That section (three paragraphs) * is reproduced here, for simplicity and accuracy. * * -# Stream buffers can impose various constraints on the sequences * they control. Some constraints are: * - The controlled input sequence can be not readable. * - The controlled output sequence can be not writable. * - The controlled sequences can be associated with the contents of * other representations for character sequences, such as external * files. * - The controlled sequences can support operations @e directly to or * from associated sequences. * - The controlled sequences can impose limitations on how the * program can read characters from a sequence, write characters to * a sequence, put characters back into an input sequence, or alter * the stream position. * . * -# Each sequence is characterized by three pointers which, if non-null, * all point into the same @c charT array object. The array object * represents, at any moment, a (sub)sequence of characters from the * sequence. Operations performed on a sequence alter the values * stored in these pointers, perform reads and writes directly to or * from associated sequences, and alter <em>the stream position</em> and * conversion state as needed to maintain this subsequence relationship. * The three pointers are: * - the <em>beginning pointer</em>, or lowest element address in the * array (called @e xbeg here); * - the <em>next pointer</em>, or next element address that is a * current candidate for reading or writing (called @e xnext here); * - the <em>end pointer</em>, or first element address beyond the * end of the array (called @e xend here). * . * -# The following semantic constraints shall always apply for any set * of three pointers for a sequence, using the pointer names given * immediately above: * - If @e xnext is not a null pointer, then @e xbeg and @e xend shall * also be non-null pointers into the same @c charT array, as * described above; otherwise, @e xbeg and @e xend shall also be null. * - If @e xnext is not a null pointer and @e xnext < @e xend for an * output sequence, then a <em>write position</em> is available. * In this case, @e *xnext shall be assignable as the next element * to write (to put, or to store a character value, into the sequence). * - If @e xnext is not a null pointer and @e xbeg < @e xnext for an * input sequence, then a <em>putback position</em> is available. * In this case, @e xnext[-1] shall have a defined value and is the * next (preceding) element to store a character that is put back * into the input sequence. * - If @e xnext is not a null pointer and @e xnext< @e xend for an * input sequence, then a <em>read position</em> is available. * In this case, @e *xnext shall have a defined value and is the * next element to read (to get, or to obtain a character value, * from the sequence). */ template<typename _CharT, typename _Traits> class basic_streambuf { public: //@{ /** * These are standard types. They permit a standardized way of * referring to names of (or names dependant on) the template * parameters, which are specific to the implementation. */ typedef _CharT char_type; typedef _Traits traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; //@} #pragma empty_line //@{ /// This is a non-standard type. typedef basic_streambuf<char_type, traits_type> __streambuf_type; //@} #pragma empty_line friend class basic_ios<char_type, traits_type>; friend class basic_istream<char_type, traits_type>; friend class basic_ostream<char_type, traits_type>; friend class istreambuf_iterator<char_type, traits_type>; friend class ostreambuf_iterator<char_type, traits_type>; #pragma empty_line friend streamsize __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); #pragma empty_line template<bool _IsMove, typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); #pragma empty_line template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); #pragma empty_line template<typename _CharT2, typename _Traits2> friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); #pragma empty_line template<typename _CharT2, typename _Traits2, typename _Alloc> friend basic_istream<_CharT2, _Traits2>& operator>>(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&); #pragma empty_line template<typename _CharT2, typename _Traits2, typename _Alloc> friend basic_istream<_CharT2, _Traits2>& getline(basic_istream<_CharT2, _Traits2>&, basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); #pragma empty_line protected: //@{ /** * This is based on _IO_FILE, just reordered to be more consistent, * and is intended to be the most minimal abstraction for an * internal buffer. * - get == input == read * - put == output == write */ char_type* _M_in_beg; // Start of get area. char_type* _M_in_cur; // Current read area. char_type* _M_in_end; // End of get area. char_type* _M_out_beg; // Start of put area. char_type* _M_out_cur; // Current put area. char_type* _M_out_end; // End of put area. #pragma empty_line /// Current locale setting. locale _M_buf_locale; #pragma empty_line public: /// Destructor deallocates no buffer space. virtual ~basic_streambuf() { } #pragma empty_line // [27.5.2.2.1] locales /** * @brief Entry point for imbue(). * @param loc The new locale. * @return The previous locale. * * Calls the derived imbue(loc). */ locale pubimbue(const locale &__loc) { locale __tmp(this->getloc()); this->imbue(__loc); _M_buf_locale = __loc; return __tmp; } #pragma empty_line /** * @brief Locale access. * @return The current locale in effect. * * If pubimbue(loc) has been called, then the most recent @c loc * is returned. Otherwise the global locale in effect at the time * of construction is returned. */ locale getloc() const { return _M_buf_locale; } #pragma empty_line // [27.5.2.2.2] buffer management and positioning //@{ /** * @brief Entry points for derived buffer functions. * * The public versions of @c pubfoo dispatch to the protected * derived @c foo member functions, passing the arguments (if any) * and returning the result unchanged. */ __streambuf_type* pubsetbuf(char_type* __s, streamsize __n) { return this->setbuf(__s, __n); } #pragma empty_line pos_type pubseekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekoff(__off, __way, __mode); } #pragma empty_line pos_type pubseekpos(pos_type __sp, ios_base::openmode __mode = ios_base::in | ios_base::out) { return this->seekpos(__sp, __mode); } #pragma empty_line int pubsync() { return this->sync(); } //@} #pragma empty_line // [27.5.2.2.3] get area /** * @brief Looking ahead into the stream. * @return The number of characters available. * * If a read position is available, returns the number of characters * available for reading before the buffer must be refilled. * Otherwise returns the derived @c showmanyc(). */ streamsize in_avail() { const streamsize __ret = this->egptr() - this->gptr(); return __ret ? __ret : this->showmanyc(); } #pragma empty_line /** * @brief Getting the next character. * @return The next character, or eof. * * Calls @c sbumpc(), and if that function returns * @c traits::eof(), so does this function. Otherwise, @c sgetc(). */ int_type snextc() { int_type __ret = traits_type::eof(); if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), __ret), true)) __ret = this->sgetc(); return __ret; } #pragma empty_line /** * @brief Getting the next character. * @return The next character, or eof. * * If the input read position is available, returns that character * and increments the read pointer, otherwise calls and returns * @c uflow(). */ int_type sbumpc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } else __ret = this->uflow(); return __ret; } #pragma empty_line /** * @brief Getting the next character. * @return The next character, or eof. * * If the input read position is available, returns that character, * otherwise calls and returns @c underflow(). Does not move the * read position after fetching the character. */ int_type sgetc() { int_type __ret; if (__builtin_expect(this->gptr() < this->egptr(), true)) __ret = traits_type::to_int_type(*this->gptr()); else __ret = this->underflow(); return __ret; } #pragma empty_line /** * @brief Entry point for xsgetn. * @param s A buffer area. * @param n A count. * * Returns xsgetn(s,n). The effect is to fill @a s[0] through * @a s[n-1] with characters from the input sequence, if possible. */ streamsize sgetn(char_type* __s, streamsize __n) { return this->xsgetn(__s, __n); } #pragma empty_line // [27.5.2.2.4] putback /** * @brief Pushing characters back into the input stream. * @param c The character to push back. * @return The previous character, if possible. * * Similar to sungetc(), but @a c is pushed onto the stream * instead of <em>the previous character.</em> If successful, * the next character fetched from the input stream will be @a * c. */ int_type sputbackc(char_type __c) { int_type __ret; const bool __testpos = this->eback() < this->gptr(); if (__builtin_expect(!__testpos || !traits_type::eq(__c, this->gptr()[-1]), false)) __ret = this->pbackfail(traits_type::to_int_type(__c)); else { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } return __ret; } #pragma empty_line /** * @brief Moving backwards in the input stream. * @return The previous character, if possible. * * If a putback position is available, this function decrements * the input pointer and returns that character. Otherwise, * calls and returns pbackfail(). The effect is to @a unget * the last character @a gotten. */ int_type sungetc() { int_type __ret; if (__builtin_expect(this->eback() < this->gptr(), true)) { this->gbump(-1); __ret = traits_type::to_int_type(*this->gptr()); } else __ret = this->pbackfail(); return __ret; } #pragma empty_line // [27.5.2.2.5] put area /** * @brief Entry point for all single-character output functions. * @param c A character to output. * @return @a c, if possible. * * One of two public output functions. * * If a write position is available for the output sequence (i.e., * the buffer is not full), stores @a c in that position, increments * the position, and returns @c traits::to_int_type(c). If a write * position is not available, returns @c overflow(c). */ int_type sputc(char_type __c) { int_type __ret; if (__builtin_expect(this->pptr() < this->epptr(), true)) { *this->pptr() = __c; this->pbump(1); __ret = traits_type::to_int_type(__c); } else __ret = this->overflow(traits_type::to_int_type(__c)); return __ret; } #pragma empty_line /** * @brief Entry point for all single-character output functions. * @param s A buffer read area. * @param n A count. * * One of two public output functions. * * * Returns xsputn(s,n). The effect is to write @a s[0] through * @a s[n-1] to the output sequence, if possible. */ streamsize sputn(const char_type* __s, streamsize __n) { return this->xsputn(__s, __n); } #pragma empty_line protected: /** * @brief Base constructor. * * Only called from derived constructors, and sets up all the * buffer data to zero, including the pointers described in the * basic_streambuf class description. Note that, as a result, * - the class starts with no read nor write positions available, * - this is not an error */ basic_streambuf() : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), _M_out_end(0), _M_buf_locale(locale()) { } #pragma empty_line // [27.5.2.3.1] get area access //@{ /** * @brief Access to the get area. * * These functions are only available to other protected functions, * including derived classes. * * - eback() returns the beginning pointer for the input sequence * - gptr() returns the next pointer for the input sequence * - egptr() returns the end pointer for the input sequence */ char_type* eback() const { return _M_in_beg; } #pragma empty_line char_type* gptr() const { return _M_in_cur; } #pragma empty_line char_type* egptr() const { return _M_in_end; } //@} #pragma empty_line /** * @brief Moving the read position. * @param n The delta by which to move. * * This just advances the read position without returning any data. */ void gbump(int __n) { _M_in_cur += __n; } #pragma empty_line /** * @brief Setting the three read area pointers. * @param gbeg A pointer. * @param gnext A pointer. * @param gend A pointer. * @post @a gbeg == @c eback(), @a gnext == @c gptr(), and * @a gend == @c egptr() */ void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) { _M_in_beg = __gbeg; _M_in_cur = __gnext; _M_in_end = __gend; } #pragma empty_line // [27.5.2.3.2] put area access //@{ /** * @brief Access to the put area. * * These functions are only available to other protected functions, * including derived classes. * * - pbase() returns the beginning pointer for the output sequence * - pptr() returns the next pointer for the output sequence * - epptr() returns the end pointer for the output sequence */ char_type* pbase() const { return _M_out_beg; } #pragma empty_line char_type* pptr() const { return _M_out_cur; } #pragma empty_line char_type* epptr() const { return _M_out_end; } //@} #pragma empty_line /** * @brief Moving the write position. * @param n The delta by which to move. * * This just advances the write position without returning any data. */ void pbump(int __n) { _M_out_cur += __n; } #pragma empty_line /** * @brief Setting the three write area pointers. * @param pbeg A pointer. * @param pend A pointer. * @post @a pbeg == @c pbase(), @a pbeg == @c pptr(), and * @a pend == @c epptr() */ void setp(char_type* __pbeg, char_type* __pend) { _M_out_beg = _M_out_cur = __pbeg; _M_out_end = __pend; } #pragma empty_line // [27.5.2.4] virtual functions // [27.5.2.4.1] locales /** * @brief Changes translations. * @param loc A new locale. * * Translations done during I/O which depend on the current * locale are changed by this call. The standard adds, * <em>Between invocations of this function a class derived * from streambuf can safely cache results of calls to locale * functions and to members of facets so obtained.</em> * * @note Base class version does nothing. */ virtual void imbue(const locale&) { } #pragma empty_line // [27.5.2.4.2] buffer management and positioning /** * @brief Manipulates the buffer. * * Each derived class provides its own appropriate behavior. See * the next-to-last paragraph of * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html * for more on this function. * * @note Base class version does nothing, returns @c this. */ virtual basic_streambuf<char_type,_Traits>* setbuf(char_type*, streamsize) { return this; } #pragma empty_line /** * @brief Alters the stream positions. * * Each derived class provides its own appropriate behavior. * @note Base class version does nothing, returns a @c pos_type * that represents an invalid stream position. */ virtual pos_type seekoff(off_type, ios_base::seekdir, ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } #pragma empty_line /** * @brief Alters the stream positions. * * Each derived class provides its own appropriate behavior. * @note Base class version does nothing, returns a @c pos_type * that represents an invalid stream position. */ virtual pos_type seekpos(pos_type, ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out) { return pos_type(off_type(-1)); } #pragma empty_line /** * @brief Synchronizes the buffer arrays with the controlled sequences. * @return -1 on failure. * * Each derived class provides its own appropriate behavior, * including the definition of @a failure. * @note Base class version does nothing, returns zero. */ virtual int sync() { return 0; } #pragma empty_line // [27.5.2.4.3] get area /** * @brief Investigating the data available. * @return An estimate of the number of characters available in the * input sequence, or -1. * * <em>If it returns a positive value, then successive calls to * @c underflow() will not return @c traits::eof() until at * least that number of characters have been supplied. If @c * showmanyc() returns -1, then calls to @c underflow() or @c * uflow() will fail.</em> [27.5.2.4.3]/1 * * @note Base class version does nothing, returns zero. * @note The standard adds that <em>the intention is not only that the * calls [to underflow or uflow] will not return @c eof() but * that they will return immediately.</em> * @note The standard adds that <em>the morphemes of @c showmanyc are * @b es-how-many-see, not @b show-manic.</em> */ virtual streamsize showmanyc() { return 0; } #pragma empty_line /** * @brief Multiple character extraction. * @param s A buffer area. * @param n Maximum number of characters to assign. * @return The number of characters assigned. * * Fills @a s[0] through @a s[n-1] with characters from the input * sequence, as if by @c sbumpc(). Stops when either @a n characters * have been copied, or when @c traits::eof() would be copied. * * It is expected that derived classes provide a more efficient * implementation by overriding this definition. */ virtual streamsize xsgetn(char_type* __s, streamsize __n); #pragma empty_line /** * @brief Fetches more data from the controlled sequence. * @return The first character from the <em>pending sequence</em>. * * Informally, this function is called when the input buffer is * exhausted (or does not exist, as buffering need not actually be * done). If a buffer exists, it is @a refilled. In either case, the * next available character is returned, or @c traits::eof() to * indicate a null pending sequence. * * For a formal definition of the pending sequence, see a good text * such as Langer & Kreft, or [27.5.2.4.3]/7-14. * * A functioning input streambuf can be created by overriding only * this function (no buffer area will be used). For an example, see * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25.html * * @note Base class version does nothing, returns eof(). */ virtual int_type underflow() { return traits_type::eof(); } #pragma empty_line /** * @brief Fetches more data from the controlled sequence. * @return The first character from the <em>pending sequence</em>. * * Informally, this function does the same thing as @c underflow(), * and in fact is required to call that function. It also returns * the new character, like @c underflow() does. However, this * function also moves the read position forward by one. */ virtual int_type uflow() { int_type __ret = traits_type::eof(); const bool __testeof = traits_type::eq_int_type(this->underflow(), __ret); if (!__testeof) { __ret = traits_type::to_int_type(*this->gptr()); this->gbump(1); } return __ret; } #pragma empty_line // [27.5.2.4.4] putback /** * @brief Tries to back up the input sequence. * @param c The character to be inserted back into the sequence. * @return eof() on failure, <em>some other value</em> on success * @post The constraints of @c gptr(), @c eback(), and @c pptr() * are the same as for @c underflow(). * * @note Base class version does nothing, returns eof(). */ virtual int_type pbackfail(int_type /* __c */ = traits_type::eof()) { return traits_type::eof(); } #pragma empty_line // Put area: /** * @brief Multiple character insertion. * @param s A buffer area. * @param n Maximum number of characters to write. * @return The number of characters written. * * Writes @a s[0] through @a s[n-1] to the output sequence, as if * by @c sputc(). Stops when either @a n characters have been * copied, or when @c sputc() would return @c traits::eof(). * * It is expected that derived classes provide a more efficient * implementation by overriding this definition. */ virtual streamsize xsputn(const char_type* __s, streamsize __n); #pragma empty_line /** * @brief Consumes data from the buffer; writes to the * controlled sequence. * @param c An additional character to consume. * @return eof() to indicate failure, something else (usually * @a c, or not_eof()) * * Informally, this function is called when the output buffer * is full (or does not exist, as buffering need not actually * be done). If a buffer exists, it is @a consumed, with * <em>some effect</em> on the controlled sequence. * (Typically, the buffer is written out to the sequence * verbatim.) In either case, the character @a c is also * written out, if @a c is not @c eof(). * * For a formal definition of this function, see a good text * such as Langer & Kreft, or [27.5.2.4.5]/3-7. * * A functioning output streambuf can be created by overriding only * this function (no buffer area will be used). * * @note Base class version does nothing, returns eof(). */ virtual int_type overflow(int_type /* __c */ = traits_type::eof()) { return traits_type::eof(); } #pragma empty_line #pragma empty_line // Annex D.6 public: /** * @brief Tosses a character. * * Advances the read pointer, ignoring the character that would have * been read. * * See http://gcc.gnu.org/ml/libstdc++/2002-05/msg00168.html */ void stossc() { if (this->gptr() < this->egptr()) this->gbump(1); else this->uflow(); } #pragma empty_line #pragma empty_line // Also used by specializations for char and wchar_t in src. void __safe_gbump(streamsize __n) { _M_in_cur += __n; } #pragma empty_line void __safe_pbump(streamsize __n) { _M_out_cur += __n; } #pragma empty_line private: // _GLIBCXX_RESOLVE_LIB_DEFECTS // Side effect of DR 50. basic_streambuf(const __streambuf_type& __sb) : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), _M_buf_locale(__sb._M_buf_locale) { } #pragma empty_line __streambuf_type& operator=(const __streambuf_type&) { return *this; }; }; #pragma empty_line // Explicit specialization declarations, defined in src/streambuf.cc. template<> streamsize __copy_streambufs_eof(basic_streambuf<char>* __sbin, basic_streambuf<char>* __sbout, bool& __ineof); #pragma empty_line template<> streamsize __copy_streambufs_eof(basic_streambuf<wchar_t>* __sbin, basic_streambuf<wchar_t>* __sbout, bool& __ineof); #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/streambuf.tcc" 1 3 // Stream buffer classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/streambuf.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{streambuf} */ #pragma empty_line // // ISO C++ 14882: 27.5 Stream buffers // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 38 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/streambuf.tcc" 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits> streamsize basic_streambuf<_CharT, _Traits>:: xsgetn(char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->egptr() - this->gptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(__s, this->gptr(), __len); __ret += __len; __s += __len; this->__safe_gbump(__len); } #pragma empty_line if (__ret < __n) { const int_type __c = this->uflow(); if (!traits_type::eq_int_type(__c, traits_type::eof())) { traits_type::assign(*__s++, traits_type::to_char_type(__c)); ++__ret; } else break; } } return __ret; } #pragma empty_line template<typename _CharT, typename _Traits> streamsize basic_streambuf<_CharT, _Traits>:: xsputn(const char_type* __s, streamsize __n) { streamsize __ret = 0; while (__ret < __n) { const streamsize __buf_len = this->epptr() - this->pptr(); if (__buf_len) { const streamsize __remaining = __n - __ret; const streamsize __len = std::min(__buf_len, __remaining); traits_type::copy(this->pptr(), __s, __len); __ret += __len; __s += __len; this->__safe_pbump(__len); } #pragma empty_line if (__ret < __n) { int_type __c = this->overflow(traits_type::to_int_type(*__s)); if (!traits_type::eq_int_type(__c, traits_type::eof())) { ++__ret; ++__s; } else break; } } return __ret; } #pragma empty_line // Conceivably, this could be used to implement buffer-to-buffer // copies, if this was ever desired in an un-ambiguous way by the // standard. template<typename _CharT, typename _Traits> streamsize __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout, bool& __ineof) { streamsize __ret = 0; __ineof = true; typename _Traits::int_type __c = __sbin->sgetc(); while (!_Traits::eq_int_type(__c, _Traits::eof())) { __c = __sbout->sputc(_Traits::to_char_type(__c)); if (_Traits::eq_int_type(__c, _Traits::eof())) { __ineof = false; break; } ++__ret; __c = __sbin->snextc(); } return __ret; } #pragma empty_line template<typename _CharT, typename _Traits> inline streamsize __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbout) { bool __ineof; return __copy_streambufs_eof(__sbin, __sbout, __ineof); } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class basic_streambuf<char>; extern template streamsize __copy_streambufs(basic_streambuf<char>*, basic_streambuf<char>*); extern template streamsize __copy_streambufs_eof(basic_streambuf<char>*, basic_streambuf<char>*, bool&); #pragma empty_line #pragma empty_line extern template class basic_streambuf<wchar_t>; extern template streamsize __copy_streambufs(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*); extern template streamsize __copy_streambufs_eof(basic_streambuf<wchar_t>*, basic_streambuf<wchar_t>*, bool&); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 808 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/streambuf" 2 3 #pragma line 44 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_ios.h" 1 3 // Iostreams base classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/basic_ios.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ios} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_ios.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/locale_facets.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.1 Locales // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 3 #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwctype" 1 3 // -*- C++ -*- forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/cwctype * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c wctype.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: <cwctype> // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwctype" 3 #pragma line 51 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwctype" 3 #pragma line 1 "/usr/include/wctype.h" 1 3 4 /* Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.25 * Wide character classification and mapping utilities <wctype.h> */ #pragma line 31 "/usr/include/wctype.h" 3 4 /* Get wint_t from <wchar.h>. */ #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/wchar.h" 1 3 4 /* Copyright (C) 1995-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities <wchar.h> */ #pragma line 900 "/usr/include/wchar.h" 3 4 /* Undefine all __need_* constants in case we are included to get those constants but the whole file was already read. */ #pragma line 34 "/usr/include/wctype.h" 2 3 4 #pragma empty_line /* Constant expression of type `wint_t' whose value does not correspond to any member of the extended character set. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The following part is also used in the <wcsmbs.h> header when compiled in the Unix98 compatibility mode. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Scalar type that can hold values which represent locale-specific character classifications. */ typedef unsigned long int wctype_t; #pragma empty_line #pragma empty_line #pragma empty_line /* The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ #pragma line 71 "/usr/include/wctype.h" 3 4 enum { __ISwupper = 0, /* UPPERCASE. */ __ISwlower = 1, /* lowercase. */ __ISwalpha = 2, /* Alphabetic. */ __ISwdigit = 3, /* Numeric. */ __ISwxdigit = 4, /* Hexadecimal numeric. */ __ISwspace = 5, /* Whitespace. */ __ISwprint = 6, /* Printing. */ __ISwgraph = 7, /* Graphical. */ __ISwblank = 8, /* Blank (usually SPC and TAB). */ __ISwcntrl = 9, /* Control character. */ __ISwpunct = 10, /* Punctuation. */ __ISwalnum = 11, /* Alphanumeric. */ #pragma empty_line _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), /* UPPERCASE. */ _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), /* lowercase. */ _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), /* Alphabetic. */ _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), /* Numeric. */ _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), /* Hexadecimal numeric. */ _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), /* Whitespace. */ _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), /* Printing. */ _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), /* Graphical. */ _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), /* Blank (usually SPC and TAB). */ _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), /* Control character. */ _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), /* Punctuation. */ _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) /* Alphanumeric. */ }; #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line /* * Wide-character classification functions: 7.15.2.1. */ #pragma empty_line /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ extern int iswalnum (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswalpha (wint_t __wc) throw (); #pragma empty_line /* Test for any control wide character. */ extern int iswcntrl (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character that corresponds to a decimal-digit character. */ extern int iswdigit (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ extern int iswgraph (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswlower (wint_t __wc) throw (); #pragma empty_line /* Test for any printing wide character. */ extern int iswprint (wint_t __wc) throw (); #pragma empty_line /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ extern int iswpunct (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ extern int iswspace (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswupper (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ extern int iswxdigit (wint_t __wc) throw (); #pragma empty_line /* Test for any wide character that corresponds to a standard blank wide character or a locale-specific set of wide characters for which `iswalnum' is false. */ #pragma empty_line extern int iswblank (wint_t __wc) throw (); #pragma empty_line #pragma empty_line /* * Extensible wide-character classification functions: 7.15.2.2. */ #pragma empty_line /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ extern wctype_t wctype (const char *__property) throw (); #pragma empty_line /* Determine whether the wide-character WC has the property described by DESC. */ extern int iswctype (wint_t __wc, wctype_t __desc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* * Wide-character case-mapping functions: 7.15.3.1. */ #pragma empty_line #pragma empty_line /* Scalar type that can hold values which represent locale-specific character mappings. */ typedef const __int32_t *wctrans_t; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Converts an uppercase letter to the corresponding lowercase letter. */ extern wint_t towlower (wint_t __wc) throw (); #pragma empty_line /* Converts an lowercase letter to the corresponding uppercase letter. */ extern wint_t towupper (wint_t __wc) throw (); #pragma empty_line #pragma empty_line } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The remaining definitions and declarations must not appear in the <wchar.h> header. */ #pragma empty_line #pragma empty_line /* * Extensible wide-character mapping functions: 7.15.3.2. */ #pragma empty_line extern "C" { #pragma empty_line #pragma empty_line /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ extern wctrans_t wctrans (const char *__property) throw (); #pragma empty_line /* Map the wide character WC using the mapping described by DESC. */ extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* Declare the interface to extended locale model. */ #pragma empty_line #pragma empty_line /* Test for any wide character for which `iswalpha' or `iswdigit' is true. */ extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character for which `iswupper' or 'iswlower' is true, or any wide character that is one of a locale-specific set of wide-characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any control wide character. */ extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character that corresponds to a decimal-digit character. */ extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character for which `iswprint' is true and `iswspace' is false. */ extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character that corresponds to a lowercase letter or is one of a locale-specific set of wide characters for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any printing wide character. */ extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any printing wide character that is one of a locale-specific et of wide characters for which neither `iswspace' nor `iswalnum' is true. */ extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character that corresponds to a locale-specific set of wide characters for which none of `iswalnum', `iswgraph', or `iswpunct' is true. */ extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character that corresponds to an uppercase letter or is one of a locale-specific set of wide character for which none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */ extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character that corresponds to a hexadecimal-digit character equivalent to that performed be the functions described in the previous subclause. */ extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Test for any wide character that corresponds to a standard blank wide character or a locale-specific set of wide characters for which `iswalnum' is false. */ extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ extern wctype_t wctype_l (const char *__property, __locale_t __locale) throw (); #pragma empty_line /* Determine whether the wide-character WC has the property described by DESC. */ extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) throw (); #pragma empty_line #pragma empty_line /* * Wide-character case-mapping functions. */ #pragma empty_line /* Converts an uppercase letter to the corresponding lowercase letter. */ extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Converts an lowercase letter to the corresponding uppercase letter. */ extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); #pragma empty_line /* Construct value that describes a mapping between wide characters identified by the string argument PROPERTY. */ extern wctrans_t wctrans_l (const char *__property, __locale_t __locale) throw (); #pragma empty_line /* Map the wide character WC using the mapping described by DESC. */ extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, __locale_t __locale) throw (); #pragma empty_line #pragma empty_line #pragma empty_line } #pragma line 52 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwctype" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Get rid of those macros defined in <wctype.h> in lieu of real functions. #pragma line 81 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cwctype" 3 namespace std { using ::wctrans_t; using ::wctype_t; using ::wint_t; #pragma empty_line using ::iswalnum; using ::iswalpha; #pragma empty_line using ::iswblank; #pragma empty_line using ::iswcntrl; using ::iswctype; using ::iswdigit; using ::iswgraph; using ::iswlower; using ::iswprint; using ::iswpunct; using ::iswspace; using ::iswupper; using ::iswxdigit; using ::towctrans; using ::towlower; using ::towupper; using ::wctrans; using ::wctype; } // namespace #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cctype" 1 3 // -*- C++ -*- forwarding header. #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file include/cctype * This is a Standard C++ Library file. You should @c \#include this file * in your programs, rather than any of the @a *.h implementation files. * * This is the C++ version of the Standard C Library header @c ctype.h, * and its contents are (mostly) the same as that header, but are all * contained in the namespace @c std (except for names which are defined * as macros in C). */ #pragma empty_line // // ISO C++ 14882: <ccytpe> // #pragma empty_line #pragma empty_line #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/cctype" 3 #pragma line 42 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/ctype_base.h" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2009, 2010 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/ctype_base.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.1 Locales // #pragma empty_line // Information as gleaned from /usr/include/ctype.h #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /// @brief Base class for ctype. struct ctype_base { // Non-standard typedefs. typedef const int* __to_type; #pragma empty_line // NB: Offsets into ctype<char>::_M_table force a particular size // on the mask type. Because of this, we don't use an enum. typedef unsigned short mask; static const mask upper = _ISupper; static const mask lower = _ISlower; static const mask alpha = _ISalpha; static const mask digit = _ISdigit; static const mask xdigit = _ISxdigit; static const mask space = _ISspace; static const mask print = _ISprint; static const mask graph = _ISalpha | _ISdigit | _ISpunct; static const mask cntrl = _IScntrl; static const mask punct = _ISpunct; static const mask alnum = _ISalpha | _ISdigit; }; #pragma empty_line #pragma empty_line } // namespace #pragma line 43 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 2 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/streambuf_iterator.h" 1 3 // Streambuf iterators #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/streambuf_iterator.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{iterator} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/streambuf_iterator.h" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @addtogroup iterators * @{ */ #pragma empty_line // 24.5.3 Template class istreambuf_iterator /// Provides input iterator semantics for streambufs. template<typename _CharT, typename _Traits> class istreambuf_iterator : public iterator<input_iterator_tag, _CharT, typename _Traits::off_type, _CharT*, _CharT&> { public: // Types: //@{ /// Public typedefs typedef _CharT char_type; typedef _Traits traits_type; typedef typename _Traits::int_type int_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_istream<_CharT, _Traits> istream_type; //@} #pragma empty_line template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); #pragma empty_line template<bool _IsMove, typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, _CharT2*>::__type __copy_move_a2(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, _CharT2*); #pragma empty_line template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, istreambuf_iterator<_CharT2> >::__type find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, const _CharT2&); #pragma empty_line private: // 24.5.3 istreambuf_iterator // p 1 // If the end of stream is reached (streambuf_type::sgetc() // returns traits_type::eof()), the iterator becomes equal to // the "end of stream" iterator value. // NB: This implementation assumes the "end of stream" value // is EOF, or -1. mutable streambuf_type* _M_sbuf; mutable int_type _M_c; #pragma empty_line public: /// Construct end of input stream iterator. istreambuf_iterator() throw() : _M_sbuf(0), _M_c(traits_type::eof()) { } #pragma empty_line /// Construct start of input stream iterator. istreambuf_iterator(istream_type& __s) throw() : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } #pragma empty_line /// Construct start of streambuf iterator. istreambuf_iterator(streambuf_type* __s) throw() : _M_sbuf(__s), _M_c(traits_type::eof()) { } #pragma empty_line /// Return the current character pointed to by iterator. This returns /// streambuf.sgetc(). It cannot be assigned. NB: The result of /// operator*() on an end of stream is undefined. char_type operator*() const { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return traits_type::to_char_type(_M_get()); } #pragma empty_line /// Advance the iterator. Calls streambuf.sbumpc(). istreambuf_iterator& operator++() { #pragma empty_line #pragma empty_line ; if (_M_sbuf) { _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return *this; } #pragma empty_line /// Advance the iterator. Calls streambuf.sbumpc(). istreambuf_iterator operator++(int) { #pragma empty_line #pragma empty_line ; #pragma empty_line istreambuf_iterator __old = *this; if (_M_sbuf) { __old._M_c = _M_sbuf->sbumpc(); _M_c = traits_type::eof(); } return __old; } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 110 istreambuf_iterator::equal not const // NB: there is also number 111 (NAD, Future) pending on this function. /// Return true both iterators are end or both are not end. bool equal(const istreambuf_iterator& __b) const { return _M_at_eof() == __b._M_at_eof(); } #pragma empty_line private: int_type _M_get() const { const int_type __eof = traits_type::eof(); int_type __ret = __eof; if (_M_sbuf) { if (!traits_type::eq_int_type(_M_c, __eof)) __ret = _M_c; else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), __eof)) _M_c = __ret; else _M_sbuf = 0; } return __ret; } #pragma empty_line bool _M_at_eof() const { const int_type __eof = traits_type::eof(); return traits_type::eq_int_type(_M_get(), __eof); } }; #pragma empty_line template<typename _CharT, typename _Traits> inline bool operator==(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return __a.equal(__b); } #pragma empty_line template<typename _CharT, typename _Traits> inline bool operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, const istreambuf_iterator<_CharT, _Traits>& __b) { return !__a.equal(__b); } #pragma empty_line /// Provides output iterator semantics for streambufs. template<typename _CharT, typename _Traits> class ostreambuf_iterator : public iterator<output_iterator_tag, void, void, void, void> { public: // Types: //@{ /// Public typedefs typedef _CharT char_type; typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> streambuf_type; typedef basic_ostream<_CharT, _Traits> ostream_type; //@} #pragma empty_line template<typename _CharT2> friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, ostreambuf_iterator<_CharT2> >::__type copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, ostreambuf_iterator<_CharT2>); #pragma empty_line private: streambuf_type* _M_sbuf; bool _M_failed; #pragma empty_line public: /// Construct output iterator from ostream. ostreambuf_iterator(ostream_type& __s) throw () : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } #pragma empty_line /// Construct output iterator from streambuf. ostreambuf_iterator(streambuf_type* __s) throw () : _M_sbuf(__s), _M_failed(!_M_sbuf) { } #pragma empty_line /// Write character to streambuf. Calls streambuf.sputc(). ostreambuf_iterator& operator=(_CharT __c) { if (!_M_failed && _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) _M_failed = true; return *this; } #pragma empty_line /// Return *this. ostreambuf_iterator& operator*() { return *this; } #pragma empty_line /// Return *this. ostreambuf_iterator& operator++(int) { return *this; } #pragma empty_line /// Return *this. ostreambuf_iterator& operator++() { return *this; } #pragma empty_line /// Return true if previous operator=() failed. bool failed() const throw() { return _M_failed; } #pragma empty_line ostreambuf_iterator& _M_put(const _CharT* __ws, streamsize __len) { if (__builtin_expect(!_M_failed, true) && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, false)) _M_failed = true; return *this; } }; #pragma empty_line // Overloads for streambuf iterators. template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type copy(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, ostreambuf_iterator<_CharT> __result) { if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) { bool __ineof; __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); if (!__ineof) __result._M_failed = true; } return __result; } #pragma empty_line template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(_CharT* __first, _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } #pragma empty_line template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, ostreambuf_iterator<_CharT> >::__type __copy_move_a2(const _CharT* __first, const _CharT* __last, ostreambuf_iterator<_CharT> __result) { const streamsize __num = __last - __first; if (__num > 0) __result._M_put(__first, __num); return __result; } #pragma empty_line template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, _CharT* __result) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; #pragma empty_line if (__first._M_sbuf && !__last._M_sbuf) { streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof())) { const streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { traits_type::copy(__result, __sb->gptr(), __n); __sb->__safe_gbump(__n); __result += __n; __c = __sb->underflow(); } else { *__result++ = traits_type::to_char_type(__c); __c = __sb->snextc(); } } } return __result; } #pragma empty_line template<typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, istreambuf_iterator<_CharT> >::__type find(istreambuf_iterator<_CharT> __first, istreambuf_iterator<_CharT> __last, const _CharT& __val) { typedef istreambuf_iterator<_CharT> __is_iterator_type; typedef typename __is_iterator_type::traits_type traits_type; typedef typename __is_iterator_type::streambuf_type streambuf_type; typedef typename traits_type::int_type int_type; #pragma empty_line if (__first._M_sbuf && !__last._M_sbuf) { const int_type __ival = traits_type::to_int_type(__val); streambuf_type* __sb = __first._M_sbuf; int_type __c = __sb->sgetc(); while (!traits_type::eq_int_type(__c, traits_type::eof()) && !traits_type::eq_int_type(__c, __ival)) { streamsize __n = __sb->egptr() - __sb->gptr(); if (__n > 1) { const _CharT* __p = traits_type::find(__sb->gptr(), __n, __val); if (__p) __n = __p - __sb->gptr(); __sb->__safe_gbump(__n); __c = __sb->sgetc(); } else __c = __sb->snextc(); } #pragma empty_line if (!traits_type::eq_int_type(__c, traits_type::eof())) __first._M_c = __c; else __first._M_sbuf = 0; } return __first; } #pragma empty_line // @} group iterators #pragma empty_line #pragma empty_line } // namespace #pragma line 50 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // NB: Don't instantiate required wchar_t facets if no wchar_t support. #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // Convert string to numeric value of type _Tp and store results. // NB: This is specialized for all required types, there is no // generic definition. template<typename _Tp> void __convert_to_v(const char*, _Tp&, ios_base::iostate&, const __c_locale&) throw(); #pragma empty_line // Explicit specializations for required types. template<> void __convert_to_v(const char*, float&, ios_base::iostate&, const __c_locale&) throw(); #pragma empty_line template<> void __convert_to_v(const char*, double&, ios_base::iostate&, const __c_locale&) throw(); #pragma empty_line template<> void __convert_to_v(const char*, long double&, ios_base::iostate&, const __c_locale&) throw(); #pragma empty_line // NB: __pad is a struct, rather than a function, so it can be // partially-specialized. template<typename _CharT, typename _Traits> struct __pad { static void _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen); }; #pragma empty_line // Used by both numeric and monetary facets. // Inserts "group separator" characters into an array of characters. // It's recursive, one iteration per group. It moves the characters // in the buffer this way: "xxxx12345" -> "12,345xxx". Call this // only with __gsize != 0. template<typename _CharT> _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last); #pragma empty_line // This template permits specializing facet output code for // ostreambuf_iterator. For ostreambuf_iterator, sputn is // significantly more efficient than incrementing iterators. template<typename _CharT> inline ostreambuf_iterator<_CharT> __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) { __s._M_put(__ws, __len); return __s; } #pragma empty_line // This is the unspecialized form of the template. template<typename _CharT, typename _OutIter> inline _OutIter __write(_OutIter __s, const _CharT* __ws, int __len) { for (int __j = 0; __j < __len; __j++, ++__s) *__s = __ws[__j]; return __s; } #pragma empty_line #pragma empty_line // 22.2.1.1 Template class ctype // Include host and configuration specific ctype enums for ctype_base. #pragma empty_line /** * @brief Common base for ctype facet * * This template class provides implementations of the public functions * that forward to the protected virtual functions. * * This template also provides abstract stubs for the protected virtual * functions. */ template<typename _CharT> class __ctype_abstract_base : public locale::facet, public ctype_base { public: // Types: /// Typedef for the template parameter typedef _CharT char_type; #pragma empty_line /** * @brief Test char_type classification. * * This function finds a mask M for @a c and compares it to mask @a m. * It does so by returning the value of ctype<char_type>::do_is(). * * @param c The char_type to compare the mask of. * @param m The mask to compare against. * @return (M & m) != 0. */ bool is(mask __m, char_type __c) const { return this->do_is(__m, __c); } #pragma empty_line /** * @brief Return a mask array. * * This function finds the mask for each char_type in the range [lo,hi) * and successively writes it to vec. vec must have as many elements * as the char array. It does so by returning the value of * ctype<char_type>::do_is(). * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param vec Pointer to an array of mask storage. * @return @a hi. */ const char_type* is(const char_type *__lo, const char_type *__hi, mask *__vec) const { return this->do_is(__lo, __hi, __vec); } #pragma empty_line /** * @brief Find char_type matching a mask * * This function searches for and returns the first char_type c in * [lo,hi) for which is(m,c) is true. It does so by returning * ctype<char_type>::do_scan_is(). * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to matching char_type if found, else @a hi. */ const char_type* scan_is(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_is(__m, __lo, __hi); } #pragma empty_line /** * @brief Find char_type not matching a mask * * This function searches for and returns the first char_type c in * [lo,hi) for which is(m,c) is false. It does so by returning * ctype<char_type>::do_scan_not(). * * @param m The mask to compare against. * @param lo Pointer to first char in range. * @param hi Pointer to end of range. * @return Pointer to non-matching char if found, else @a hi. */ const char_type* scan_not(mask __m, const char_type* __lo, const char_type* __hi) const { return this->do_scan_not(__m, __lo, __hi); } #pragma empty_line /** * @brief Convert to uppercase. * * This function converts the argument to uppercase if possible. * If not possible (for example, '2'), returns the argument. It does * so by returning ctype<char_type>::do_toupper(). * * @param c The char_type to convert. * @return The uppercase char_type if convertible, else @a c. */ char_type toupper(char_type __c) const { return this->do_toupper(__c); } #pragma empty_line /** * @brief Convert array to uppercase. * * This function converts each char_type in the range [lo,hi) to * uppercase if possible. Other elements remain untouched. It does so * by returning ctype<char_type>:: do_toupper(lo, hi). * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } #pragma empty_line /** * @brief Convert to lowercase. * * This function converts the argument to lowercase if possible. If * not possible (for example, '2'), returns the argument. It does so * by returning ctype<char_type>::do_tolower(c). * * @param c The char_type to convert. * @return The lowercase char_type if convertible, else @a c. */ char_type tolower(char_type __c) const { return this->do_tolower(__c); } #pragma empty_line /** * @brief Convert array to lowercase. * * This function converts each char_type in the range [lo,hi) to * lowercase if possible. Other elements remain untouched. It does so * by returning ctype<char_type>:: do_tolower(lo, hi). * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } #pragma empty_line /** * @brief Widen char to char_type * * This function converts the char argument to char_type using the * simplest reasonable transformation. It does so by returning * ctype<char_type>::do_widen(c). * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @return The converted char_type. */ char_type widen(char __c) const { return this->do_widen(__c); } #pragma empty_line /** * @brief Widen array to char_type * * This function converts each char in the input to char_type using the * simplest reasonable transformation. It does so by returning * ctype<char_type>::do_widen(c). * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param to Pointer to the destination array. * @return @a hi. */ const char* widen(const char* __lo, const char* __hi, char_type* __to) const { return this->do_widen(__lo, __hi, __to); } #pragma empty_line /** * @brief Narrow char_type to char * * This function converts the char_type to char using the simplest * reasonable transformation. If the conversion fails, dfault is * returned instead. It does so by returning * ctype<char_type>::do_narrow(c). * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char_type to convert. * @param dfault Char to return if conversion fails. * @return The converted char. */ char narrow(char_type __c, char __dfault) const { return this->do_narrow(__c, __dfault); } #pragma empty_line /** * @brief Narrow array to char array * * This function converts each char_type in the input to char using the * simplest reasonable transformation and writes the results to the * destination array. For any char_type in the input that cannot be * converted, @a dfault is used instead. It does so by returning * ctype<char_type>::do_narrow(lo, hi, dfault, to). * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param dfault Char to use if conversion fails. * @param to Pointer to the destination array. * @return @a hi. */ const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char *__to) const { return this->do_narrow(__lo, __hi, __dfault, __to); } #pragma empty_line protected: explicit __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } #pragma empty_line virtual ~__ctype_abstract_base() { } #pragma empty_line /** * @brief Test char_type classification. * * This function finds a mask M for @a c and compares it to mask @a m. * * do_is() is a hook for a derived facet to change the behavior of * classifying. do_is() must always return the same result for the * same input. * * @param c The char_type to find the mask of. * @param m The mask to compare against. * @return (M & m) != 0. */ virtual bool do_is(mask __m, char_type __c) const = 0; #pragma empty_line /** * @brief Return a mask array. * * This function finds the mask for each char_type in the range [lo,hi) * and successively writes it to vec. vec must have as many elements * as the input. * * do_is() is a hook for a derived facet to change the behavior of * classifying. do_is() must always return the same result for the * same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param vec Pointer to an array of mask storage. * @return @a hi. */ virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const = 0; #pragma empty_line /** * @brief Find char_type matching mask * * This function searches for and returns the first char_type c in * [lo,hi) for which is(m,c) is true. * * do_scan_is() is a hook for a derived facet to change the behavior of * match searching. do_is() must always return the same result for the * same input. * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to a matching char_type if found, else @a hi. */ virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const = 0; #pragma empty_line /** * @brief Find char_type not matching mask * * This function searches for and returns a pointer to the first * char_type c of [lo,hi) for which is(m,c) is false. * * do_scan_is() is a hook for a derived facet to change the behavior of * match searching. do_is() must always return the same result for the * same input. * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to a non-matching char_type if found, else @a hi. */ virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const = 0; #pragma empty_line /** * @brief Convert to uppercase. * * This virtual function converts the char_type argument to uppercase * if possible. If not possible (for example, '2'), returns the * argument. * * do_toupper() is a hook for a derived facet to change the behavior of * uppercasing. do_toupper() must always return the same result for * the same input. * * @param c The char_type to convert. * @return The uppercase char_type if convertible, else @a c. */ virtual char_type do_toupper(char_type) const = 0; #pragma empty_line /** * @brief Convert array to uppercase. * * This virtual function converts each char_type in the range [lo,hi) * to uppercase if possible. Other elements remain untouched. * * do_toupper() is a hook for a derived facet to change the behavior of * uppercasing. do_toupper() must always return the same result for * the same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const = 0; #pragma empty_line /** * @brief Convert to lowercase. * * This virtual function converts the argument to lowercase if * possible. If not possible (for example, '2'), returns the argument. * * do_tolower() is a hook for a derived facet to change the behavior of * lowercasing. do_tolower() must always return the same result for * the same input. * * @param c The char_type to convert. * @return The lowercase char_type if convertible, else @a c. */ virtual char_type do_tolower(char_type) const = 0; #pragma empty_line /** * @brief Convert array to lowercase. * * This virtual function converts each char_type in the range [lo,hi) * to lowercase if possible. Other elements remain untouched. * * do_tolower() is a hook for a derived facet to change the behavior of * lowercasing. do_tolower() must always return the same result for * the same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const = 0; #pragma empty_line /** * @brief Widen char * * This virtual function converts the char to char_type using the * simplest reasonable transformation. * * do_widen() is a hook for a derived facet to change the behavior of * widening. do_widen() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @return The converted char_type */ virtual char_type do_widen(char) const = 0; #pragma empty_line /** * @brief Widen char array * * This function converts each char in the input to char_type using the * simplest reasonable transformation. * * do_widen() is a hook for a derived facet to change the behavior of * widening. do_widen() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start range. * @param hi Pointer to end of range. * @param to Pointer to the destination array. * @return @a hi. */ virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const = 0; #pragma empty_line /** * @brief Narrow char_type to char * * This virtual function converts the argument to char using the * simplest reasonable transformation. If the conversion fails, dfault * is returned instead. * * do_narrow() is a hook for a derived facet to change the behavior of * narrowing. do_narrow() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char_type to convert. * @param dfault Char to return if conversion fails. * @return The converted char. */ virtual char do_narrow(char_type, char __dfault) const = 0; #pragma empty_line /** * @brief Narrow char_type array to char * * This virtual function converts each char_type in the range [lo,hi) to * char using the simplest reasonable transformation and writes the * results to the destination array. For any element in the input that * cannot be converted, @a dfault is used instead. * * do_narrow() is a hook for a derived facet to change the behavior of * narrowing. do_narrow() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param dfault Char to use if conversion fails. * @param to Pointer to the destination array. * @return @a hi. */ virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const = 0; }; #pragma empty_line /** * @brief Primary class template ctype facet. * @ingroup locales * * This template class defines classification and conversion functions for * character sets. It wraps cctype functionality. Ctype gets used by * streams for many I/O operations. * * This template provides the protected virtual functions the developer * will have to replace in a derived class or specialization to make a * working facet. The public functions that access them are defined in * __ctype_abstract_base, to allow for implementation flexibility. See * ctype<wchar_t> for an example. The functions are documented in * __ctype_abstract_base. * * Note: implementations are provided for all the protected virtual * functions, but will likely not be useful. */ template<typename _CharT> class ctype : public __ctype_abstract_base<_CharT> { public: // Types: typedef _CharT char_type; typedef typename __ctype_abstract_base<_CharT>::mask mask; #pragma empty_line /// The facet id for ctype<char_type> static locale::id id; #pragma empty_line explicit ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } #pragma empty_line protected: virtual ~ctype(); #pragma empty_line virtual bool do_is(mask __m, char_type __c) const; #pragma empty_line virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; #pragma empty_line virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; #pragma empty_line virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; #pragma empty_line virtual char_type do_toupper(char_type __c) const; #pragma empty_line virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; #pragma empty_line virtual char_type do_tolower(char_type __c) const; #pragma empty_line virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; #pragma empty_line virtual char_type do_widen(char __c) const; #pragma empty_line virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; #pragma empty_line virtual char do_narrow(char_type, char __dfault) const; #pragma empty_line virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const; }; #pragma empty_line template<typename _CharT> locale::id ctype<_CharT>::id; #pragma empty_line /** * @brief The ctype<char> specialization. * @ingroup locales * * This class defines classification and conversion functions for * the char type. It gets used by char streams for many I/O * operations. The char specialization provides a number of * optimizations as well. */ template<> class ctype<char> : public locale::facet, public ctype_base { public: // Types: /// Typedef for the template parameter char. typedef char char_type; #pragma empty_line protected: // Data Members: __c_locale _M_c_locale_ctype; bool _M_del; __to_type _M_toupper; __to_type _M_tolower; const mask* _M_table; mutable char _M_widen_ok; mutable char _M_widen[1 + static_cast<unsigned char>(-1)]; mutable char _M_narrow[1 + static_cast<unsigned char>(-1)]; mutable char _M_narrow_ok; // 0 uninitialized, 1 init, // 2 memcpy can't be used #pragma empty_line public: /// The facet id for ctype<char> static locale::id id; /// The size of the mask table. It is SCHAR_MAX + 1. static const size_t table_size = 1 + static_cast<unsigned char>(-1); #pragma empty_line /** * @brief Constructor performs initialization. * * This is the constructor provided by the standard. * * @param table If non-zero, table is used as the per-char mask. * Else classic_table() is used. * @param del If true, passes ownership of table to this facet. * @param refs Passed to the base facet class. */ explicit ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); #pragma empty_line /** * @brief Constructor performs static initialization. * * This constructor is used to construct the initial C locale facet. * * @param cloc Handle to C locale data. * @param table If non-zero, table is used as the per-char mask. * @param del If true, passes ownership of table to this facet. * @param refs Passed to the base facet class. */ explicit ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, size_t __refs = 0); #pragma empty_line /** * @brief Test char classification. * * This function compares the mask table[c] to @a m. * * @param c The char to compare the mask of. * @param m The mask to compare against. * @return True if m & table[c] is true, false otherwise. */ inline bool is(mask __m, char __c) const; #pragma empty_line /** * @brief Return a mask array. * * This function finds the mask for each char in the range [lo, hi) and * successively writes it to vec. vec must have as many elements as * the char array. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param vec Pointer to an array of mask storage. * @return @a hi. */ inline const char* is(const char* __lo, const char* __hi, mask* __vec) const; #pragma empty_line /** * @brief Find char matching a mask * * This function searches for and returns the first char in [lo,hi) for * which is(m,char) is true. * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to a matching char if found, else @a hi. */ inline const char* scan_is(mask __m, const char* __lo, const char* __hi) const; #pragma empty_line /** * @brief Find char not matching a mask * * This function searches for and returns a pointer to the first char * in [lo,hi) for which is(m,char) is false. * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to a non-matching char if found, else @a hi. */ inline const char* scan_not(mask __m, const char* __lo, const char* __hi) const; #pragma empty_line /** * @brief Convert to uppercase. * * This function converts the char argument to uppercase if possible. * If not possible (for example, '2'), returns the argument. * * toupper() acts as if it returns ctype<char>::do_toupper(c). * do_toupper() must always return the same result for the same input. * * @param c The char to convert. * @return The uppercase char if convertible, else @a c. */ char_type toupper(char_type __c) const { return this->do_toupper(__c); } #pragma empty_line /** * @brief Convert array to uppercase. * * This function converts each char in the range [lo,hi) to uppercase * if possible. Other chars remain untouched. * * toupper() acts as if it returns ctype<char>:: do_toupper(lo, hi). * do_toupper() must always return the same result for the same input. * * @param lo Pointer to first char in range. * @param hi Pointer to end of range. * @return @a hi. */ const char_type* toupper(char_type *__lo, const char_type* __hi) const { return this->do_toupper(__lo, __hi); } #pragma empty_line /** * @brief Convert to lowercase. * * This function converts the char argument to lowercase if possible. * If not possible (for example, '2'), returns the argument. * * tolower() acts as if it returns ctype<char>::do_tolower(c). * do_tolower() must always return the same result for the same input. * * @param c The char to convert. * @return The lowercase char if convertible, else @a c. */ char_type tolower(char_type __c) const { return this->do_tolower(__c); } #pragma empty_line /** * @brief Convert array to lowercase. * * This function converts each char in the range [lo,hi) to lowercase * if possible. Other chars remain untouched. * * tolower() acts as if it returns ctype<char>:: do_tolower(lo, hi). * do_tolower() must always return the same result for the same input. * * @param lo Pointer to first char in range. * @param hi Pointer to end of range. * @return @a hi. */ const char_type* tolower(char_type* __lo, const char_type* __hi) const { return this->do_tolower(__lo, __hi); } #pragma empty_line /** * @brief Widen char * * This function converts the char to char_type using the simplest * reasonable transformation. For an underived ctype<char> facet, the * argument will be returned unchanged. * * This function works as if it returns ctype<char>::do_widen(c). * do_widen() must always return the same result for the same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @return The converted character. */ char_type widen(char __c) const { if (_M_widen_ok) return _M_widen[static_cast<unsigned char>(__c)]; this->_M_widen_init(); return this->do_widen(__c); } #pragma empty_line /** * @brief Widen char array * * This function converts each char in the input to char using the * simplest reasonable transformation. For an underived ctype<char> * facet, the argument will be copied unchanged. * * This function works as if it returns ctype<char>::do_widen(c). * do_widen() must always return the same result for the same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to first char in range. * @param hi Pointer to end of range. * @param to Pointer to the destination array. * @return @a hi. */ const char* widen(const char* __lo, const char* __hi, char_type* __to) const { if (_M_widen_ok == 1) { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_widen_ok) _M_widen_init(); return this->do_widen(__lo, __hi, __to); } #pragma empty_line /** * @brief Narrow char * * This function converts the char to char using the simplest * reasonable transformation. If the conversion fails, dfault is * returned instead. For an underived ctype<char> facet, @a c * will be returned unchanged. * * This function works as if it returns ctype<char>::do_narrow(c). * do_narrow() must always return the same result for the same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @param dfault Char to return if conversion fails. * @return The converted character. */ char narrow(char_type __c, char __dfault) const { if (_M_narrow[static_cast<unsigned char>(__c)]) return _M_narrow[static_cast<unsigned char>(__c)]; const char __t = do_narrow(__c, __dfault); if (__t != __dfault) _M_narrow[static_cast<unsigned char>(__c)] = __t; return __t; } #pragma empty_line /** * @brief Narrow char array * * This function converts each char in the input to char using the * simplest reasonable transformation and writes the results to the * destination array. For any char in the input that cannot be * converted, @a dfault is used instead. For an underived ctype<char> * facet, the argument will be copied unchanged. * * This function works as if it returns ctype<char>::do_narrow(lo, hi, * dfault, to). do_narrow() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param dfault Char to use if conversion fails. * @param to Pointer to the destination array. * @return @a hi. */ const char_type* narrow(const char_type* __lo, const char_type* __hi, char __dfault, char *__to) const { if (__builtin_expect(_M_narrow_ok == 1, true)) { __builtin_memcpy(__to, __lo, __hi - __lo); return __hi; } if (!_M_narrow_ok) _M_narrow_init(); return this->do_narrow(__lo, __hi, __dfault, __to); } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 695. ctype<char>::classic_table() not accessible. /// Returns a pointer to the mask table provided to the constructor, or /// the default from classic_table() if none was provided. const mask* table() const throw() { return _M_table; } #pragma empty_line /// Returns a pointer to the C locale mask table. static const mask* classic_table() throw(); protected: #pragma empty_line /** * @brief Destructor. * * This function deletes table() if @a del was true in the * constructor. */ virtual ~ctype(); #pragma empty_line /** * @brief Convert to uppercase. * * This virtual function converts the char argument to uppercase if * possible. If not possible (for example, '2'), returns the argument. * * do_toupper() is a hook for a derived facet to change the behavior of * uppercasing. do_toupper() must always return the same result for * the same input. * * @param c The char to convert. * @return The uppercase char if convertible, else @a c. */ virtual char_type do_toupper(char_type) const; #pragma empty_line /** * @brief Convert array to uppercase. * * This virtual function converts each char in the range [lo,hi) to * uppercase if possible. Other chars remain untouched. * * do_toupper() is a hook for a derived facet to change the behavior of * uppercasing. do_toupper() must always return the same result for * the same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; #pragma empty_line /** * @brief Convert to lowercase. * * This virtual function converts the char argument to lowercase if * possible. If not possible (for example, '2'), returns the argument. * * do_tolower() is a hook for a derived facet to change the behavior of * lowercasing. do_tolower() must always return the same result for * the same input. * * @param c The char to convert. * @return The lowercase char if convertible, else @a c. */ virtual char_type do_tolower(char_type) const; #pragma empty_line /** * @brief Convert array to lowercase. * * This virtual function converts each char in the range [lo,hi) to * lowercase if possible. Other chars remain untouched. * * do_tolower() is a hook for a derived facet to change the behavior of * lowercasing. do_tolower() must always return the same result for * the same input. * * @param lo Pointer to first char in range. * @param hi Pointer to end of range. * @return @a hi. */ virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; #pragma empty_line /** * @brief Widen char * * This virtual function converts the char to char using the simplest * reasonable transformation. For an underived ctype<char> facet, the * argument will be returned unchanged. * * do_widen() is a hook for a derived facet to change the behavior of * widening. do_widen() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @return The converted character. */ virtual char_type do_widen(char __c) const { return __c; } #pragma empty_line /** * @brief Widen char array * * This function converts each char in the range [lo,hi) to char using * the simplest reasonable transformation. For an underived * ctype<char> facet, the argument will be copied unchanged. * * do_widen() is a hook for a derived facet to change the behavior of * widening. do_widen() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param to Pointer to the destination array. * @return @a hi. */ virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const { __builtin_memcpy(__dest, __lo, __hi - __lo); return __hi; } #pragma empty_line /** * @brief Narrow char * * This virtual function converts the char to char using the simplest * reasonable transformation. If the conversion fails, dfault is * returned instead. For an underived ctype<char> facet, @a c will be * returned unchanged. * * do_narrow() is a hook for a derived facet to change the behavior of * narrowing. do_narrow() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @param dfault Char to return if conversion fails. * @return The converted char. */ virtual char do_narrow(char_type __c, char) const { return __c; } #pragma empty_line /** * @brief Narrow char array to char array * * This virtual function converts each char in the range [lo,hi) to * char using the simplest reasonable transformation and writes the * results to the destination array. For any char in the input that * cannot be converted, @a dfault is used instead. For an underived * ctype<char> facet, the argument will be copied unchanged. * * do_narrow() is a hook for a derived facet to change the behavior of * narrowing. do_narrow() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param dfault Char to use if conversion fails. * @param to Pointer to the destination array. * @return @a hi. */ virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char, char* __dest) const { __builtin_memcpy(__dest, __lo, __hi - __lo); return __hi; } #pragma empty_line private: void _M_narrow_init() const; void _M_widen_init() const; }; #pragma empty_line #pragma empty_line /** * @brief The ctype<wchar_t> specialization. * @ingroup locales * * This class defines classification and conversion functions for the * wchar_t type. It gets used by wchar_t streams for many I/O operations. * The wchar_t specialization provides a number of optimizations as well. * * ctype<wchar_t> inherits its public methods from * __ctype_abstract_base<wchar_t>. */ template<> class ctype<wchar_t> : public __ctype_abstract_base<wchar_t> { public: // Types: /// Typedef for the template parameter wchar_t. typedef wchar_t char_type; typedef wctype_t __wmask_type; #pragma empty_line protected: __c_locale _M_c_locale_ctype; #pragma empty_line // Pre-computed narrowed and widened chars. bool _M_narrow_ok; char _M_narrow[128]; wint_t _M_widen[1 + static_cast<unsigned char>(-1)]; #pragma empty_line // Pre-computed elements for do_is. mask _M_bit[16]; __wmask_type _M_wmask[16]; #pragma empty_line public: // Data Members: /// The facet id for ctype<wchar_t> static locale::id id; #pragma empty_line /** * @brief Constructor performs initialization. * * This is the constructor provided by the standard. * * @param refs Passed to the base facet class. */ explicit ctype(size_t __refs = 0); #pragma empty_line /** * @brief Constructor performs static initialization. * * This constructor is used to construct the initial C locale facet. * * @param cloc Handle to C locale data. * @param refs Passed to the base facet class. */ explicit ctype(__c_locale __cloc, size_t __refs = 0); #pragma empty_line protected: __wmask_type _M_convert_to_wmask(const mask __m) const throw(); #pragma empty_line /// Destructor virtual ~ctype(); #pragma empty_line /** * @brief Test wchar_t classification. * * This function finds a mask M for @a c and compares it to mask @a m. * * do_is() is a hook for a derived facet to change the behavior of * classifying. do_is() must always return the same result for the * same input. * * @param c The wchar_t to find the mask of. * @param m The mask to compare against. * @return (M & m) != 0. */ virtual bool do_is(mask __m, char_type __c) const; #pragma empty_line /** * @brief Return a mask array. * * This function finds the mask for each wchar_t in the range [lo,hi) * and successively writes it to vec. vec must have as many elements * as the input. * * do_is() is a hook for a derived facet to change the behavior of * classifying. do_is() must always return the same result for the * same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param vec Pointer to an array of mask storage. * @return @a hi. */ virtual const char_type* do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; #pragma empty_line /** * @brief Find wchar_t matching mask * * This function searches for and returns the first wchar_t c in * [lo,hi) for which is(m,c) is true. * * do_scan_is() is a hook for a derived facet to change the behavior of * match searching. do_is() must always return the same result for the * same input. * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to a matching wchar_t if found, else @a hi. */ virtual const char_type* do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; #pragma empty_line /** * @brief Find wchar_t not matching mask * * This function searches for and returns a pointer to the first * wchar_t c of [lo,hi) for which is(m,c) is false. * * do_scan_is() is a hook for a derived facet to change the behavior of * match searching. do_is() must always return the same result for the * same input. * * @param m The mask to compare against. * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return Pointer to a non-matching wchar_t if found, else @a hi. */ virtual const char_type* do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const; #pragma empty_line /** * @brief Convert to uppercase. * * This virtual function converts the wchar_t argument to uppercase if * possible. If not possible (for example, '2'), returns the argument. * * do_toupper() is a hook for a derived facet to change the behavior of * uppercasing. do_toupper() must always return the same result for * the same input. * * @param c The wchar_t to convert. * @return The uppercase wchar_t if convertible, else @a c. */ virtual char_type do_toupper(char_type) const; #pragma empty_line /** * @brief Convert array to uppercase. * * This virtual function converts each wchar_t in the range [lo,hi) to * uppercase if possible. Other elements remain untouched. * * do_toupper() is a hook for a derived facet to change the behavior of * uppercasing. do_toupper() must always return the same result for * the same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ virtual const char_type* do_toupper(char_type* __lo, const char_type* __hi) const; #pragma empty_line /** * @brief Convert to lowercase. * * This virtual function converts the argument to lowercase if * possible. If not possible (for example, '2'), returns the argument. * * do_tolower() is a hook for a derived facet to change the behavior of * lowercasing. do_tolower() must always return the same result for * the same input. * * @param c The wchar_t to convert. * @return The lowercase wchar_t if convertible, else @a c. */ virtual char_type do_tolower(char_type) const; #pragma empty_line /** * @brief Convert array to lowercase. * * This virtual function converts each wchar_t in the range [lo,hi) to * lowercase if possible. Other elements remain untouched. * * do_tolower() is a hook for a derived facet to change the behavior of * lowercasing. do_tolower() must always return the same result for * the same input. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @return @a hi. */ virtual const char_type* do_tolower(char_type* __lo, const char_type* __hi) const; #pragma empty_line /** * @brief Widen char to wchar_t * * This virtual function converts the char to wchar_t using the * simplest reasonable transformation. For an underived ctype<wchar_t> * facet, the argument will be cast to wchar_t. * * do_widen() is a hook for a derived facet to change the behavior of * widening. do_widen() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The char to convert. * @return The converted wchar_t. */ virtual char_type do_widen(char) const; #pragma empty_line /** * @brief Widen char array to wchar_t array * * This function converts each char in the input to wchar_t using the * simplest reasonable transformation. For an underived ctype<wchar_t> * facet, the argument will be copied, casting each element to wchar_t. * * do_widen() is a hook for a derived facet to change the behavior of * widening. do_widen() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start range. * @param hi Pointer to end of range. * @param to Pointer to the destination array. * @return @a hi. */ virtual const char* do_widen(const char* __lo, const char* __hi, char_type* __dest) const; #pragma empty_line /** * @brief Narrow wchar_t to char * * This virtual function converts the argument to char using * the simplest reasonable transformation. If the conversion * fails, dfault is returned instead. For an underived * ctype<wchar_t> facet, @a c will be cast to char and * returned. * * do_narrow() is a hook for a derived facet to change the * behavior of narrowing. do_narrow() must always return the * same result for the same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param c The wchar_t to convert. * @param dfault Char to return if conversion fails. * @return The converted char. */ virtual char do_narrow(char_type, char __dfault) const; #pragma empty_line /** * @brief Narrow wchar_t array to char array * * This virtual function converts each wchar_t in the range [lo,hi) to * char using the simplest reasonable transformation and writes the * results to the destination array. For any wchar_t in the input that * cannot be converted, @a dfault is used instead. For an underived * ctype<wchar_t> facet, the argument will be copied, casting each * element to char. * * do_narrow() is a hook for a derived facet to change the behavior of * narrowing. do_narrow() must always return the same result for the * same input. * * Note: this is not what you want for codepage conversions. See * codecvt for that. * * @param lo Pointer to start of range. * @param hi Pointer to end of range. * @param dfault Char to use if conversion fails. * @param to Pointer to the destination array. * @return @a hi. */ virtual const char_type* do_narrow(const char_type* __lo, const char_type* __hi, char __dfault, char* __dest) const; #pragma empty_line // For use at construction time only. void _M_initialize_ctype() throw(); }; #pragma empty_line #pragma empty_line /// class ctype_byname [22.2.1.2]. template<typename _CharT> class ctype_byname : public ctype<_CharT> { public: typedef typename ctype<_CharT>::mask mask; #pragma empty_line explicit ctype_byname(const char* __s, size_t __refs = 0); #pragma empty_line protected: virtual ~ctype_byname() { }; }; #pragma empty_line /// 22.2.1.4 Class ctype_byname specializations. template<> class ctype_byname<char> : public ctype<char> { public: explicit ctype_byname(const char* __s, size_t __refs = 0); #pragma empty_line protected: virtual ~ctype_byname(); }; #pragma empty_line #pragma empty_line template<> class ctype_byname<wchar_t> : public ctype<wchar_t> { public: explicit ctype_byname(const char* __s, size_t __refs = 0); #pragma empty_line protected: virtual ~ctype_byname(); }; #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma empty_line // Include host and configuration specific ctype inlines. #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/x86_64-unknown-linux-gnu/bits/ctype_inline.h" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 2000, 2002, 2009, 2010 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/ctype_inline.h * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line // // ISO C++ 14882: 22.1 Locales // #pragma empty_line // ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) // functions go in ctype.cc #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line bool ctype<char>:: is(mask __m, char __c) const { return _M_table[static_cast<unsigned char>(__c)] & __m; } #pragma empty_line const char* ctype<char>:: is(const char* __low, const char* __high, mask* __vec) const { while (__low < __high) *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; return __high; } #pragma empty_line const char* ctype<char>:: scan_is(mask __m, const char* __low, const char* __high) const { while (__low < __high && !(_M_table[static_cast<unsigned char>(*__low)] & __m)) ++__low; return __low; } #pragma empty_line const char* ctype<char>:: scan_not(mask __m, const char* __low, const char* __high) const { while (__low < __high && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0) ++__low; return __low; } #pragma empty_line #pragma empty_line } // namespace #pragma line 1512 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // 22.2.2 The numeric category. class __num_base { public: // NB: Code depends on the order of _S_atoms_out elements. // Below are the indices into _S_atoms_out. enum { _S_ominus, _S_oplus, _S_ox, _S_oX, _S_odigits, _S_odigits_end = _S_odigits + 16, _S_oudigits = _S_odigits_end, _S_oudigits_end = _S_oudigits + 16, _S_oe = _S_odigits + 14, // For scientific notation, 'e' _S_oE = _S_oudigits + 14, // For scientific notation, 'E' _S_oend = _S_oudigits_end }; #pragma empty_line // A list of valid numeric literals for output. This array // contains chars that will be passed through the current locale's // ctype<_CharT>.widen() and then used to render numbers. // For the standard "C" locale, this is // "-+xX0123456789abcdef0123456789ABCDEF". static const char* _S_atoms_out; #pragma empty_line // String literal of acceptable (narrow) input, for num_get. // "-+xX0123456789abcdefABCDEF" static const char* _S_atoms_in; #pragma empty_line enum { _S_iminus, _S_iplus, _S_ix, _S_iX, _S_izero, _S_ie = _S_izero + 14, _S_iE = _S_izero + 20, _S_iend = 26 }; #pragma empty_line // num_put // Construct and return valid scanf format for floating point types. static void _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); }; #pragma empty_line template<typename _CharT> struct __numpunct_cache : public locale::facet { const char* _M_grouping; size_t _M_grouping_size; bool _M_use_grouping; const _CharT* _M_truename; size_t _M_truename_size; const _CharT* _M_falsename; size_t _M_falsename_size; _CharT _M_decimal_point; _CharT _M_thousands_sep; #pragma empty_line // A list of valid numeric literals for output: in the standard // "C" locale, this is "-+xX0123456789abcdef0123456789ABCDEF". // This array contains the chars after having been passed // through the current locale's ctype<_CharT>.widen(). _CharT _M_atoms_out[__num_base::_S_oend]; #pragma empty_line // A list of valid numeric literals for input: in the standard // "C" locale, this is "-+xX0123456789abcdefABCDEF" // This array contains the chars after having been passed // through the current locale's ctype<_CharT>.widen(). _CharT _M_atoms_in[__num_base::_S_iend]; #pragma empty_line bool _M_allocated; #pragma empty_line __numpunct_cache(size_t __refs = 0) : facet(__refs), _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), _M_truename(0), _M_truename_size(0), _M_falsename(0), _M_falsename_size(0), _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), _M_allocated(false) { } #pragma empty_line ~__numpunct_cache(); #pragma empty_line void _M_cache(const locale& __loc); #pragma empty_line private: __numpunct_cache& operator=(const __numpunct_cache&); #pragma empty_line explicit __numpunct_cache(const __numpunct_cache&); }; #pragma empty_line template<typename _CharT> __numpunct_cache<_CharT>::~__numpunct_cache() { if (_M_allocated) { delete [] _M_grouping; delete [] _M_truename; delete [] _M_falsename; } } #pragma empty_line /** * @brief Primary class template numpunct. * @ingroup locales * * This facet stores several pieces of information related to printing and * scanning numbers, such as the decimal point character. It takes a * template parameter specifying the char type. The numpunct facet is * used by streams for many I/O operations involving numbers. * * The numpunct template uses protected virtual functions to provide the * actual results. The public accessors forward the call to the virtual * functions. These virtual functions are hooks for developers to * implement the behavior they require from a numpunct facet. */ template<typename _CharT> class numpunct : public locale::facet { public: // Types: //@{ /// Public typedefs typedef _CharT char_type; typedef basic_string<_CharT> string_type; //@} typedef __numpunct_cache<_CharT> __cache_type; #pragma empty_line protected: __cache_type* _M_data; #pragma empty_line public: /// Numpunct facet id. static locale::id id; #pragma empty_line /** * @brief Numpunct constructor. * * @param refs Refcount to pass to the base class. */ explicit numpunct(size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_numpunct(); } #pragma empty_line /** * @brief Internal constructor. Not for general use. * * This is a constructor for use by the library itself to set up the * predefined locale facets. * * @param cache __numpunct_cache object. * @param refs Refcount to pass to the base class. */ explicit numpunct(__cache_type* __cache, size_t __refs = 0) : facet(__refs), _M_data(__cache) { _M_initialize_numpunct(); } #pragma empty_line /** * @brief Internal constructor. Not for general use. * * This is a constructor for use by the library itself to set up new * locales. * * @param cloc The C locale. * @param refs Refcount to pass to the base class. */ explicit numpunct(__c_locale __cloc, size_t __refs = 0) : facet(__refs), _M_data(0) { _M_initialize_numpunct(__cloc); } #pragma empty_line /** * @brief Return decimal point character. * * This function returns a char_type to use as a decimal point. It * does so by returning returning * numpunct<char_type>::do_decimal_point(). * * @return @a char_type representing a decimal point. */ char_type decimal_point() const { return this->do_decimal_point(); } #pragma empty_line /** * @brief Return thousands separator character. * * This function returns a char_type to use as a thousands * separator. It does so by returning returning * numpunct<char_type>::do_thousands_sep(). * * @return char_type representing a thousands separator. */ char_type thousands_sep() const { return this->do_thousands_sep(); } #pragma empty_line /** * @brief Return grouping specification. * * This function returns a string representing groupings for the * integer part of a number. Groupings indicate where thousands * separators should be inserted in the integer part of a number. * * Each char in the return string is interpret as an integer * rather than a character. These numbers represent the number * of digits in a group. The first char in the string * represents the number of digits in the least significant * group. If a char is negative, it indicates an unlimited * number of digits for the group. If more chars from the * string are required to group a number, the last char is used * repeatedly. * * For example, if the grouping() returns "\003\002" and is * applied to the number 123456789, this corresponds to * 12,34,56,789. Note that if the string was "32", this would * put more than 50 digits into the least significant group if * the character set is ASCII. * * The string is returned by calling * numpunct<char_type>::do_grouping(). * * @return string representing grouping specification. */ string grouping() const { return this->do_grouping(); } #pragma empty_line /** * @brief Return string representation of bool true. * * This function returns a string_type containing the text * representation for true bool variables. It does so by calling * numpunct<char_type>::do_truename(). * * @return string_type representing printed form of true. */ string_type truename() const { return this->do_truename(); } #pragma empty_line /** * @brief Return string representation of bool false. * * This function returns a string_type containing the text * representation for false bool variables. It does so by calling * numpunct<char_type>::do_falsename(). * * @return string_type representing printed form of false. */ string_type falsename() const { return this->do_falsename(); } #pragma empty_line protected: /// Destructor. virtual ~numpunct(); #pragma empty_line /** * @brief Return decimal point character. * * Returns a char_type to use as a decimal point. This function is a * hook for derived classes to change the value returned. * * @return @a char_type representing a decimal point. */ virtual char_type do_decimal_point() const { return _M_data->_M_decimal_point; } #pragma empty_line /** * @brief Return thousands separator character. * * Returns a char_type to use as a thousands separator. This function * is a hook for derived classes to change the value returned. * * @return @a char_type representing a thousands separator. */ virtual char_type do_thousands_sep() const { return _M_data->_M_thousands_sep; } #pragma empty_line /** * @brief Return grouping specification. * * Returns a string representing groupings for the integer part of a * number. This function is a hook for derived classes to change the * value returned. @see grouping() for details. * * @return String representing grouping specification. */ virtual string do_grouping() const { return _M_data->_M_grouping; } #pragma empty_line /** * @brief Return string representation of bool true. * * Returns a string_type containing the text representation for true * bool variables. This function is a hook for derived classes to * change the value returned. * * @return string_type representing printed form of true. */ virtual string_type do_truename() const { return _M_data->_M_truename; } #pragma empty_line /** * @brief Return string representation of bool false. * * Returns a string_type containing the text representation for false * bool variables. This function is a hook for derived classes to * change the value returned. * * @return string_type representing printed form of false. */ virtual string_type do_falsename() const { return _M_data->_M_falsename; } #pragma empty_line // For use at construction time only. void _M_initialize_numpunct(__c_locale __cloc = 0); }; #pragma empty_line template<typename _CharT> locale::id numpunct<_CharT>::id; #pragma empty_line template<> numpunct<char>::~numpunct(); #pragma empty_line template<> void numpunct<char>::_M_initialize_numpunct(__c_locale __cloc); #pragma empty_line #pragma empty_line template<> numpunct<wchar_t>::~numpunct(); #pragma empty_line template<> void numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc); #pragma empty_line #pragma empty_line /// class numpunct_byname [22.2.3.2]. template<typename _CharT> class numpunct_byname : public numpunct<_CharT> { public: typedef _CharT char_type; typedef basic_string<_CharT> string_type; #pragma empty_line explicit numpunct_byname(const char* __s, size_t __refs = 0) : numpunct<_CharT>(__refs) { if (__builtin_strcmp(__s, "C") != 0 && __builtin_strcmp(__s, "POSIX") != 0) { __c_locale __tmp; this->_S_create_c_locale(__tmp, __s); this->_M_initialize_numpunct(__tmp); this->_S_destroy_c_locale(__tmp); } } #pragma empty_line protected: virtual ~numpunct_byname() { } }; #pragma empty_line #pragma empty_line #pragma empty_line /** * @brief Primary class template num_get. * @ingroup locales * * This facet encapsulates the code to parse and return a number * from a string. It is used by the istream numeric extraction * operators. * * The num_get template uses protected virtual functions to provide the * actual results. The public accessors forward the call to the virtual * functions. These virtual functions are hooks for developers to * implement the behavior they require from the num_get facet. */ template<typename _CharT, typename _InIter> class num_get : public locale::facet { public: // Types: //@{ /// Public typedefs typedef _CharT char_type; typedef _InIter iter_type; //@} #pragma empty_line /// Numpunct facet id. static locale::id id; #pragma empty_line /** * @brief Constructor performs initialization. * * This is the constructor provided by the standard. * * @param refs Passed to the base facet class. */ explicit num_get(size_t __refs = 0) : facet(__refs) { } #pragma empty_line /** * @brief Numeric parsing. * * Parses the input stream into the bool @a v. It does so by calling * num_get::do_get(). * * If ios_base::boolalpha is set, attempts to read * ctype<CharT>::truename() or ctype<CharT>::falsename(). Sets * @a v to true or false if successful. Sets err to * ios_base::failbit if reading the string fails. Sets err to * ios_base::eofbit if the stream is emptied. * * If ios_base::boolalpha is not set, proceeds as with reading a long, * except if the value is 1, sets @a v to true, if the value is 0, sets * @a v to false, and otherwise set err to ios_base::failbit. * * @param in Start of input stream. * @param end End of input stream. * @param io Source of locale and flags. * @param err Error flags to set. * @param v Value to format and insert. * @return Iterator after reading. */ iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line //@{ /** * @brief Numeric parsing. * * Parses the input stream into the integral variable @a v. It does so * by calling num_get::do_get(). * * Parsing is affected by the flag settings in @a io. * * The basic parse is affected by the value of io.flags() & * ios_base::basefield. If equal to ios_base::oct, parses like the * scanf %o specifier. Else if equal to ios_base::hex, parses like %X * specifier. Else if basefield equal to 0, parses like the %i * specifier. Otherwise, parses like %d for signed and %u for unsigned * types. The matching type length modifier is also used. * * Digit grouping is interpreted according to numpunct::grouping() and * numpunct::thousands_sep(). If the pattern of digit groups isn't * consistent, sets err to ios_base::failbit. * * If parsing the string yields a valid value for @a v, @a v is set. * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered. * Sets err to ios_base::eofbit if the stream is emptied. * * @param in Start of input stream. * @param end End of input stream. * @param io Source of locale and flags. * @param err Error flags to set. * @param v Value to format and insert. * @return Iterator after reading. */ iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line //@} #pragma empty_line //@{ /** * @brief Numeric parsing. * * Parses the input stream into the integral variable @a v. It does so * by calling num_get::do_get(). * * The input characters are parsed like the scanf %g specifier. The * matching type length modifier is also used. * * The decimal point character used is numpunct::decimal_point(). * Digit grouping is interpreted according to numpunct::grouping() and * numpunct::thousands_sep(). If the pattern of digit groups isn't * consistent, sets err to ios_base::failbit. * * If parsing the string yields a valid value for @a v, @a v is set. * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered. * Sets err to ios_base::eofbit if the stream is emptied. * * @param in Start of input stream. * @param end End of input stream. * @param io Source of locale and flags. * @param err Error flags to set. * @param v Value to format and insert. * @return Iterator after reading. */ iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { return this->do_get(__in, __end, __io, __err, __v); } //@} #pragma empty_line /** * @brief Numeric parsing. * * Parses the input stream into the pointer variable @a v. It does so * by calling num_get::do_get(). * * The input characters are parsed like the scanf %p specifier. * * Digit grouping is interpreted according to numpunct::grouping() and * numpunct::thousands_sep(). If the pattern of digit groups isn't * consistent, sets err to ios_base::failbit. * * Note that the digit grouping effect for pointers is a bit ambiguous * in the standard and shouldn't be relied on. See DR 344. * * If parsing the string yields a valid value for @a v, @a v is set. * Otherwise, sets err to ios_base::failbit and leaves @a v unaltered. * Sets err to ios_base::eofbit if the stream is emptied. * * @param in Start of input stream. * @param end End of input stream. * @param io Source of locale and flags. * @param err Error flags to set. * @param v Value to format and insert. * @return Iterator after reading. */ iter_type get(iter_type __in, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { return this->do_get(__in, __end, __io, __err, __v); } #pragma empty_line protected: /// Destructor. virtual ~num_get() { } #pragma empty_line iter_type _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, string&) const; #pragma empty_line template<typename _ValueT> iter_type _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, _ValueT&) const; #pragma empty_line template<typename _CharT2> typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type _M_find(const _CharT2*, size_t __len, _CharT2 __c) const { int __ret = -1; if (__len <= 10) { if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) __ret = __c - _CharT2('0'); } else { if (__c >= _CharT2('0') && __c <= _CharT2('9')) __ret = __c - _CharT2('0'); else if (__c >= _CharT2('a') && __c <= _CharT2('f')) __ret = 10 + (__c - _CharT2('a')); else if (__c >= _CharT2('A') && __c <= _CharT2('F')) __ret = 10 + (__c - _CharT2('A')); } return __ret; } #pragma empty_line template<typename _CharT2> typename __gnu_cxx::__enable_if<!__is_char<_CharT2>::__value, int>::__type _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const { int __ret = -1; const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); if (__q) { __ret = __q - __zero; if (__ret > 15) __ret -= 6; } return __ret; } #pragma empty_line //@{ /** * @brief Numeric parsing. * * Parses the input stream into the variable @a v. This function is a * hook for derived classes to change the value returned. @see get() * for more details. * * @param in Start of input stream. * @param end End of input stream. * @param io Source of locale and flags. * @param err Error flags to set. * @param v Value to format and insert. * @return Iterator after reading. */ virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; #pragma empty_line virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } #pragma empty_line virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned short& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } #pragma empty_line virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned int& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } #pragma empty_line virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } #pragma empty_line #pragma empty_line virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } #pragma empty_line virtual iter_type do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, unsigned long long& __v) const { return _M_extract_int(__beg, __end, __io, __err, __v); } #pragma empty_line #pragma empty_line virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, float&) const; #pragma empty_line virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, double&) const; #pragma empty_line // XXX GLIBCXX_ABI Deprecated #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, long double&) const; #pragma empty_line #pragma empty_line virtual iter_type do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, void*&) const; #pragma empty_line // XXX GLIBCXX_ABI Deprecated #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line //@} }; #pragma empty_line template<typename _CharT, typename _InIter> locale::id num_get<_CharT, _InIter>::id; #pragma empty_line #pragma empty_line /** * @brief Primary class template num_put. * @ingroup locales * * This facet encapsulates the code to convert a number to a string. It is * used by the ostream numeric insertion operators. * * The num_put template uses protected virtual functions to provide the * actual results. The public accessors forward the call to the virtual * functions. These virtual functions are hooks for developers to * implement the behavior they require from the num_put facet. */ template<typename _CharT, typename _OutIter> class num_put : public locale::facet { public: // Types: //@{ /// Public typedefs typedef _CharT char_type; typedef _OutIter iter_type; //@} #pragma empty_line /// Numpunct facet id. static locale::id id; #pragma empty_line /** * @brief Constructor performs initialization. * * This is the constructor provided by the standard. * * @param refs Passed to the base facet class. */ explicit num_put(size_t __refs = 0) : facet(__refs) { } #pragma empty_line /** * @brief Numeric formatting. * * Formats the boolean @a v and inserts it into a stream. It does so * by calling num_put::do_put(). * * If ios_base::boolalpha is set, writes ctype<CharT>::truename() or * ctype<CharT>::falsename(). Otherwise formats @a v as an int. * * @param s Stream to write to. * @param io Source of locale and flags. * @param fill Char_type to use for filling. * @param v Value to format and insert. * @return Iterator after writing. */ iter_type put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line //@{ /** * @brief Numeric formatting. * * Formats the integral value @a v and inserts it into a * stream. It does so by calling num_put::do_put(). * * Formatting is affected by the flag settings in @a io. * * The basic format is affected by the value of io.flags() & * ios_base::basefield. If equal to ios_base::oct, formats like the * printf %o specifier. Else if equal to ios_base::hex, formats like * %x or %X with ios_base::uppercase unset or set respectively. * Otherwise, formats like %d, %ld, %lld for signed and %u, %lu, %llu * for unsigned values. Note that if both oct and hex are set, neither * will take effect. * * If ios_base::showpos is set, '+' is output before positive values. * If ios_base::showbase is set, '0' precedes octal values (except 0) * and '0[xX]' precedes hex values. * * Thousands separators are inserted according to numpunct::grouping() * and numpunct::thousands_sep(). The decimal point character used is * numpunct::decimal_point(). * * If io.width() is non-zero, enough @a fill characters are inserted to * make the result at least that wide. If * (io.flags() & ios_base::adjustfield) == ios_base::left, result is * padded at the end. If ios_base::internal, then padding occurs * immediately after either a '+' or '-' or after '0x' or '0X'. * Otherwise, padding occurs at the beginning. * * @param s Stream to write to. * @param io Source of locale and flags. * @param fill Char_type to use for filling. * @param v Value to format and insert. * @return Iterator after writing. */ iter_type put(iter_type __s, ios_base& __f, char_type __fill, long __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line iter_type put(iter_type __s, ios_base& __f, char_type __fill, unsigned long __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line #pragma empty_line iter_type put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line iter_type put(iter_type __s, ios_base& __f, char_type __fill, unsigned long long __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line //@} #pragma empty_line //@{ /** * @brief Numeric formatting. * * Formats the floating point value @a v and inserts it into a stream. * It does so by calling num_put::do_put(). * * Formatting is affected by the flag settings in @a io. * * The basic format is affected by the value of io.flags() & * ios_base::floatfield. If equal to ios_base::fixed, formats like the * printf %f specifier. Else if equal to ios_base::scientific, formats * like %e or %E with ios_base::uppercase unset or set respectively. * Otherwise, formats like %g or %G depending on uppercase. Note that * if both fixed and scientific are set, the effect will also be like * %g or %G. * * The output precision is given by io.precision(). This precision is * capped at numeric_limits::digits10 + 2 (different for double and * long double). The default precision is 6. * * If ios_base::showpos is set, '+' is output before positive values. * If ios_base::showpoint is set, a decimal point will always be * output. * * Thousands separators are inserted according to numpunct::grouping() * and numpunct::thousands_sep(). The decimal point character used is * numpunct::decimal_point(). * * If io.width() is non-zero, enough @a fill characters are inserted to * make the result at least that wide. If * (io.flags() & ios_base::adjustfield) == ios_base::left, result is * padded at the end. If ios_base::internal, then padding occurs * immediately after either a '+' or '-' or after '0x' or '0X'. * Otherwise, padding occurs at the beginning. * * @param s Stream to write to. * @param io Source of locale and flags. * @param fill Char_type to use for filling. * @param v Value to format and insert. * @return Iterator after writing. */ iter_type put(iter_type __s, ios_base& __f, char_type __fill, double __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line iter_type put(iter_type __s, ios_base& __f, char_type __fill, long double __v) const { return this->do_put(__s, __f, __fill, __v); } //@} #pragma empty_line /** * @brief Numeric formatting. * * Formats the pointer value @a v and inserts it into a stream. It * does so by calling num_put::do_put(). * * This function formats @a v as an unsigned long with ios_base::hex * and ios_base::showbase set. * * @param s Stream to write to. * @param io Source of locale and flags. * @param fill Char_type to use for filling. * @param v Value to format and insert. * @return Iterator after writing. */ iter_type put(iter_type __s, ios_base& __f, char_type __fill, const void* __v) const { return this->do_put(__s, __f, __fill, __v); } #pragma empty_line protected: template<typename _ValueT> iter_type _M_insert_float(iter_type, ios_base& __io, char_type __fill, char __mod, _ValueT __v) const; #pragma empty_line void _M_group_float(const char* __grouping, size_t __grouping_size, char_type __sep, const char_type* __p, char_type* __new, char_type* __cs, int& __len) const; #pragma empty_line template<typename _ValueT> iter_type _M_insert_int(iter_type, ios_base& __io, char_type __fill, _ValueT __v) const; #pragma empty_line void _M_group_int(const char* __grouping, size_t __grouping_size, char_type __sep, ios_base& __io, char_type* __new, char_type* __cs, int& __len) const; #pragma empty_line void _M_pad(char_type __fill, streamsize __w, ios_base& __io, char_type* __new, const char_type* __cs, int& __len) const; #pragma empty_line /// Destructor. virtual ~num_put() { }; #pragma empty_line //@{ /** * @brief Numeric formatting. * * These functions do the work of formatting numeric values and * inserting them into a stream. This function is a hook for derived * classes to change the value returned. * * @param s Stream to write to. * @param io Source of locale and flags. * @param fill Char_type to use for filling. * @param v Value to format and insert. * @return Iterator after writing. */ virtual iter_type do_put(iter_type, ios_base&, char_type __fill, bool __v) const; #pragma empty_line virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const { return _M_insert_int(__s, __io, __fill, __v); } #pragma empty_line virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long __v) const { return _M_insert_int(__s, __io, __fill, __v); } #pragma empty_line #pragma empty_line virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } #pragma empty_line virtual iter_type do_put(iter_type __s, ios_base& __io, char_type __fill, unsigned long long __v) const { return _M_insert_int(__s, __io, __fill, __v); } #pragma empty_line #pragma empty_line virtual iter_type do_put(iter_type, ios_base&, char_type __fill, double __v) const; #pragma empty_line // XXX GLIBCXX_ABI Deprecated #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line virtual iter_type do_put(iter_type, ios_base&, char_type __fill, long double __v) const; #pragma empty_line #pragma empty_line virtual iter_type do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; #pragma empty_line // XXX GLIBCXX_ABI Deprecated #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line //@} }; #pragma empty_line template <typename _CharT, typename _OutIter> locale::id num_put<_CharT, _OutIter>::id; #pragma empty_line #pragma empty_line #pragma empty_line // Subclause convenience interfaces, inlines. // NB: These are inline because, when used in a loop, some compilers // can hoist the body out of the loop; then it's just as fast as the // C is*() function. #pragma empty_line /// Convenience interface to ctype.is(ctype_base::space, __c). template<typename _CharT> inline bool isspace(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::space, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::print, __c). template<typename _CharT> inline bool isprint(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::print, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::cntrl, __c). template<typename _CharT> inline bool iscntrl(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::cntrl, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::upper, __c). template<typename _CharT> inline bool isupper(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::upper, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::lower, __c). template<typename _CharT> inline bool islower(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::lower, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::alpha, __c). template<typename _CharT> inline bool isalpha(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alpha, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::digit, __c). template<typename _CharT> inline bool isdigit(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::digit, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::punct, __c). template<typename _CharT> inline bool ispunct(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::punct, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::xdigit, __c). template<typename _CharT> inline bool isxdigit(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::xdigit, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::alnum, __c). template<typename _CharT> inline bool isalnum(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::alnum, __c); } #pragma empty_line /// Convenience interface to ctype.is(ctype_base::graph, __c). template<typename _CharT> inline bool isgraph(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).is(ctype_base::graph, __c); } #pragma empty_line /// Convenience interface to ctype.toupper(__c). template<typename _CharT> inline _CharT toupper(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).toupper(__c); } #pragma empty_line /// Convenience interface to ctype.tolower(__c). template<typename _CharT> inline _CharT tolower(_CharT __c, const locale& __loc) { return use_facet<ctype<_CharT> >(__loc).tolower(__c); } #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.tcc" 1 3 // Locale support -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/locale_facets.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{locale} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 35 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.tcc" 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // Routine to access a cache for the facet. If the cache didn't // exist before, it gets constructed on the fly. template<typename _Facet> struct __use_cache { const _Facet* operator() (const locale& __loc) const; }; #pragma empty_line // Specializations. template<typename _CharT> struct __use_cache<__numpunct_cache<_CharT> > { const __numpunct_cache<_CharT>* operator() (const locale& __loc) const { const size_t __i = numpunct<_CharT>::id._M_id(); const locale::facet** __caches = __loc._M_impl->_M_caches; if (!__caches[__i]) { __numpunct_cache<_CharT>* __tmp = 0; if (true) { __tmp = new __numpunct_cache<_CharT>; __tmp->_M_cache(__loc); } if (false) { delete __tmp; ; } __loc._M_impl->_M_install_cache(__tmp, __i); } return static_cast<const __numpunct_cache<_CharT>*>(__caches[__i]); } }; #pragma empty_line template<typename _CharT> void __numpunct_cache<_CharT>::_M_cache(const locale& __loc) { _M_allocated = true; #pragma empty_line const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc); #pragma empty_line char* __grouping = 0; _CharT* __truename = 0; _CharT* __falsename = 0; if (true) { _M_grouping_size = __np.grouping().size(); __grouping = new char[_M_grouping_size]; __np.grouping().copy(__grouping, _M_grouping_size); _M_grouping = __grouping; _M_use_grouping = (_M_grouping_size && static_cast<signed char>(_M_grouping[0]) > 0 && (_M_grouping[0] != __gnu_cxx::__numeric_traits<char>::__max)); #pragma empty_line _M_truename_size = __np.truename().size(); __truename = new _CharT[_M_truename_size]; __np.truename().copy(__truename, _M_truename_size); _M_truename = __truename; #pragma empty_line _M_falsename_size = __np.falsename().size(); __falsename = new _CharT[_M_falsename_size]; __np.falsename().copy(__falsename, _M_falsename_size); _M_falsename = __falsename; #pragma empty_line _M_decimal_point = __np.decimal_point(); _M_thousands_sep = __np.thousands_sep(); #pragma empty_line const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__loc); __ct.widen(__num_base::_S_atoms_out, __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); __ct.widen(__num_base::_S_atoms_in, __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); } if (false) { delete [] __grouping; delete [] __truename; delete [] __falsename; ; } } #pragma empty_line // Used by both numeric and monetary facets. // Check to make sure that the __grouping_tmp string constructed in // money_get or num_get matches the canonical grouping for a given // locale. // __grouping_tmp is parsed L to R // 1,222,444 == __grouping_tmp of "\1\3\3" // __grouping is parsed R to L // 1,222,444 == __grouping of "\3" == "\3\3\3" __attribute__ ((__pure__)) bool __verify_grouping(const char* __grouping, size_t __grouping_size, const string& __grouping_tmp) throw (); #pragma empty_line #pragma empty_line #pragma empty_line template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, string& __xtrc) const { typedef char_traits<_CharT> __traits_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); #pragma empty_line // True if __beg becomes equal to __end. bool __testeof = __beg == __end; #pragma empty_line // First check for sign. if (!__testeof) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { __xtrc += __plus ? '+' : '-'; if (++__beg != __end) __c = *__beg; else __testeof = true; } } #pragma empty_line // Next, look for leading zeros. bool __found_mantissa = false; int __sep_pos = 0; while (!__testeof) { if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero]) { if (!__found_mantissa) { __xtrc += '0'; __found_mantissa = true; } ++__sep_pos; #pragma empty_line if (++__beg != __end) __c = *__beg; else __testeof = true; } else break; } #pragma empty_line // Only need acceptable digits for floating point numbers. bool __found_dec = false; bool __found_sci = false; string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); const char_type* __lit_zero = __lit + __num_base::_S_izero; #pragma empty_line if (!__lc->_M_allocated) // "C" locale while (!__testeof) { const int __digit = _M_find(__lit_zero, 10, __c); if (__digit != -1) { __xtrc += '0' + __digit; __found_mantissa = true; } else if (__c == __lc->_M_decimal_point && !__found_dec && !__found_sci) { __xtrc += '.'; __found_dec = true; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { // Scientific notation. __xtrc += 'e'; __found_sci = true; #pragma empty_line // Remove optional plus or minus sign, if they exist. if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if (__plus || __c == __lit[__num_base::_S_iminus]) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; #pragma empty_line if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { // According to 22.2.2.1.2, p8-9, first look for thousands_sep // and decimal_point. if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { if (!__found_dec && !__found_sci) { // NB: Thousands separator at the beginning of a string // is a no-no, as is two consecutive thousands separators. if (__sep_pos) { __found_grouping += static_cast<char>(__sep_pos); __sep_pos = 0; } else { // NB: __convert_to_v will not assign __v and will // set the failbit. __xtrc.clear(); break; } } else break; } else if (__c == __lc->_M_decimal_point) { if (!__found_dec && !__found_sci) { // If no grouping chars are seen, no grouping check // is applied. Therefore __found_grouping is adjusted // only if decimal_point comes after some thousands_sep. if (__found_grouping.size()) __found_grouping += static_cast<char>(__sep_pos); __xtrc += '.'; __found_dec = true; } else break; } else { const char_type* __q = __traits_type::find(__lit_zero, 10, __c); if (__q) { __xtrc += '0' + (__q - __lit_zero); __found_mantissa = true; ++__sep_pos; } else if ((__c == __lit[__num_base::_S_ie] || __c == __lit[__num_base::_S_iE]) && !__found_sci && __found_mantissa) { // Scientific notation. if (__found_grouping.size() && !__found_dec) __found_grouping += static_cast<char>(__sep_pos); __xtrc += 'e'; __found_sci = true; #pragma empty_line // Remove optional plus or minus sign, if they exist. if (++__beg != __end) { __c = *__beg; const bool __plus = __c == __lit[__num_base::_S_iplus]; if ((__plus || __c == __lit[__num_base::_S_iminus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) __xtrc += __plus ? '+' : '-'; else continue; } else { __testeof = true; break; } } else break; } #pragma empty_line if (++__beg != __end) __c = *__beg; else __testeof = true; } #pragma empty_line // Digit grouping is checked. If grouping and found_grouping don't // match, then get very very upset, and set failbit. if (__found_grouping.size()) { // Add the ending grouping if a decimal or 'e'/'E' wasn't found. if (!__found_dec && !__found_sci) __found_grouping += static_cast<char>(__sep_pos); #pragma empty_line if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } #pragma empty_line return __beg; } #pragma empty_line template<typename _CharT, typename _InIter> template<typename _ValueT> _InIter num_get<_CharT, _InIter>:: _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, ios_base::iostate& __err, _ValueT& __v) const { typedef char_traits<_CharT> __traits_type; using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_in; char_type __c = char_type(); #pragma empty_line // NB: Iff __basefield == 0, __base can change based on contents. const ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield; const bool __oct = __basefield == ios_base::oct; int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); #pragma empty_line // True if __beg becomes equal to __end. bool __testeof = __beg == __end; #pragma empty_line // First check for sign. bool __negative = false; if (!__testeof) { __c = *__beg; __negative = __c == __lit[__num_base::_S_iminus]; if ((__negative || __c == __lit[__num_base::_S_iplus]) && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) && !(__c == __lc->_M_decimal_point)) { if (++__beg != __end) __c = *__beg; else __testeof = true; } } #pragma empty_line // Next, look for leading zeros and check required digits // for base formats. bool __found_zero = false; int __sep_pos = 0; while (!__testeof) { if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) || __c == __lc->_M_decimal_point) break; else if (__c == __lit[__num_base::_S_izero] && (!__found_zero || __base == 10)) { __found_zero = true; ++__sep_pos; if (__basefield == 0) __base = 8; if (__base == 8) __sep_pos = 0; } else if (__found_zero && (__c == __lit[__num_base::_S_ix] || __c == __lit[__num_base::_S_iX])) { if (__basefield == 0) __base = 16; if (__base == 16) { __found_zero = false; __sep_pos = 0; } else break; } else break; #pragma empty_line if (++__beg != __end) { __c = *__beg; if (!__found_zero) break; } else __testeof = true; } #pragma empty_line // At this point, base is determined. If not hex, only allow // base digits as valid input. const size_t __len = (__base == 16 ? __num_base::_S_iend - __num_base::_S_izero : __base); #pragma empty_line // Extract. string __found_grouping; if (__lc->_M_use_grouping) __found_grouping.reserve(32); bool __testfail = false; bool __testoverflow = false; const __unsigned_type __max = (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) ? -__gnu_cxx::__numeric_traits<_ValueT>::__min : __gnu_cxx::__numeric_traits<_ValueT>::__max; const __unsigned_type __smax = __max / __base; __unsigned_type __result = 0; int __digit = 0; const char_type* __lit_zero = __lit + __num_base::_S_izero; #pragma empty_line if (!__lc->_M_allocated) // "C" locale while (!__testeof) { __digit = _M_find(__lit_zero, __len, __c); if (__digit == -1) break; #pragma empty_line if (__result > __smax) __testoverflow = true; else { __result *= __base; __testoverflow |= __result > __max - __digit; __result += __digit; ++__sep_pos; } #pragma empty_line if (++__beg != __end) __c = *__beg; else __testeof = true; } else while (!__testeof) { // According to 22.2.2.1.2, p8-9, first look for thousands_sep // and decimal_point. if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) { // NB: Thousands separator at the beginning of a string // is a no-no, as is two consecutive thousands separators. if (__sep_pos) { __found_grouping += static_cast<char>(__sep_pos); __sep_pos = 0; } else { __testfail = true; break; } } else if (__c == __lc->_M_decimal_point) break; else { const char_type* __q = __traits_type::find(__lit_zero, __len, __c); if (!__q) break; #pragma empty_line __digit = __q - __lit_zero; if (__digit > 15) __digit -= 6; if (__result > __smax) __testoverflow = true; else { __result *= __base; __testoverflow |= __result > __max - __digit; __result += __digit; ++__sep_pos; } } #pragma empty_line if (++__beg != __end) __c = *__beg; else __testeof = true; } #pragma empty_line // Digit grouping is checked. If grouping and found_grouping don't // match, then get very very upset, and set failbit. if (__found_grouping.size()) { // Add the ending grouping. __found_grouping += static_cast<char>(__sep_pos); #pragma empty_line if (!std::__verify_grouping(__lc->_M_grouping, __lc->_M_grouping_size, __found_grouping)) __err = ios_base::failbit; } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 23. Num_get overflow result. if ((!__sep_pos && !__found_zero && !__found_grouping.size()) || __testfail) { __v = 0; __err = ios_base::failbit; } else if (__testoverflow) { if (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; else __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; __err = ios_base::failbit; } else __v = __negative ? -__result : __result; #pragma empty_line if (__testeof) __err |= ios_base::eofbit; return __beg; } #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 17. Bad bool parsing template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, bool& __v) const { if (!(__io.flags() & ios_base::boolalpha)) { // Parse bool values as long. // NB: We can't just call do_get(long) here, as it might // refer to a derived class. long __l = -1; __beg = _M_extract_int(__beg, __end, __io, __err, __l); if (__l == 0 || __l == 1) __v = bool(__l); else { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 23. Num_get overflow result. __v = true; __err = ios_base::failbit; if (__beg == __end) __err |= ios_base::eofbit; } } else { // Parse bool values as alphanumeric. typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); #pragma empty_line bool __testf = true; bool __testt = true; bool __donef = __lc->_M_falsename_size == 0; bool __donet = __lc->_M_truename_size == 0; bool __testeof = false; size_t __n = 0; while (!__donef || !__donet) { if (__beg == __end) { __testeof = true; break; } #pragma empty_line const char_type __c = *__beg; #pragma empty_line if (!__donef) __testf = __c == __lc->_M_falsename[__n]; #pragma empty_line if (!__testf && __donet) break; #pragma empty_line if (!__donet) __testt = __c == __lc->_M_truename[__n]; #pragma empty_line if (!__testt && __donef) break; #pragma empty_line if (!__testt && !__testf) break; #pragma empty_line ++__n; ++__beg; #pragma empty_line __donef = !__testf || __n >= __lc->_M_falsename_size; __donet = !__testt || __n >= __lc->_M_truename_size; } if (__testf && __n == __lc->_M_falsename_size && __n) { __v = false; if (__testt && __n == __lc->_M_truename_size) __err = ios_base::failbit; else __err = __testeof ? ios_base::eofbit : ios_base::goodbit; } else if (__testt && __n == __lc->_M_truename_size && __n) { __v = true; __err = __testeof ? ios_base::eofbit : ios_base::goodbit; } else { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 23. Num_get overflow result. __v = false; __err = ios_base::failbit; if (__testeof) __err |= ios_base::eofbit; } } return __beg; } #pragma empty_line template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, float& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } #pragma empty_line template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } #pragma line 731 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.tcc" 3 template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, long double& __v) const { string __xtrc; __xtrc.reserve(32); __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); if (__beg == __end) __err |= ios_base::eofbit; return __beg; } #pragma empty_line template<typename _CharT, typename _InIter> _InIter num_get<_CharT, _InIter>:: do_get(iter_type __beg, iter_type __end, ios_base& __io, ios_base::iostate& __err, void*& __v) const { // Prepare for hex formatted input. typedef ios_base::fmtflags fmtflags; const fmtflags __fmt = __io.flags(); __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); #pragma empty_line typedef __gnu_cxx::__conditional_type<(sizeof(void*) <= sizeof(unsigned long)), unsigned long, unsigned long long>::__type _UIntPtrType; #pragma empty_line _UIntPtrType __ul; __beg = _M_extract_int(__beg, __end, __io, __err, __ul); #pragma empty_line // Reset from hex formatted input. __io.flags(__fmt); #pragma empty_line __v = reinterpret_cast<void*>(__ul); return __beg; } #pragma empty_line // For use by integer and floating-point types after they have been // converted into a char_type string. template<typename _CharT, typename _OutIter> void num_put<_CharT, _OutIter>:: _M_pad(_CharT __fill, streamsize __w, ios_base& __io, _CharT* __new, const _CharT* __cs, int& __len) const { // [22.2.2.2.2] Stage 3. // If necessary, pad. __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, __cs, __w, __len); __len = static_cast<int>(__w); } #pragma empty_line #pragma empty_line #pragma empty_line template<typename _CharT, typename _ValueT> int __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, ios_base::fmtflags __flags, bool __dec) { _CharT* __buf = __bufend; if (__builtin_expect(__dec, true)) { // Decimal. do { *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; __v /= 10; } while (__v != 0); } else if ((__flags & ios_base::basefield) == ios_base::oct) { // Octal. do { *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; __v >>= 3; } while (__v != 0); } else { // Hex. const bool __uppercase = __flags & ios_base::uppercase; const int __case_offset = __uppercase ? __num_base::_S_oudigits : __num_base::_S_odigits; do { *--__buf = __lit[(__v & 0xf) + __case_offset]; __v >>= 4; } while (__v != 0); } return __bufend - __buf; } #pragma empty_line #pragma empty_line #pragma empty_line template<typename _CharT, typename _OutIter> void num_put<_CharT, _OutIter>:: _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, ios_base&, _CharT* __new, _CharT* __cs, int& __len) const { _CharT* __p = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __len); __len = __p - __new; } #pragma empty_line template<typename _CharT, typename _OutIter> template<typename _ValueT> _OutIter num_put<_CharT, _OutIter>:: _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, _ValueT __v) const { using __gnu_cxx::__add_unsigned; typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); const _CharT* __lit = __lc->_M_atoms_out; const ios_base::fmtflags __flags = __io.flags(); #pragma empty_line // Long enough to hold hex, dec, and octal representations. const int __ilen = 5 * sizeof(_ValueT); _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __ilen)); #pragma empty_line // [22.2.2.2.2] Stage 1, numeric conversion to character. // Result is returned right-justified in the buffer. const ios_base::fmtflags __basefield = __flags & ios_base::basefield; const bool __dec = (__basefield != ios_base::oct && __basefield != ios_base::hex); const __unsigned_type __u = ((__v > 0 || !__dec) ? __unsigned_type(__v) : -__unsigned_type(__v)); int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); __cs += __ilen - __len; #pragma empty_line // Add grouping, if necessary. if (__lc->_M_use_grouping) { // Grouping can add (almost) as many separators as the number // of digits + space is reserved for numeric base or sign. _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__len + 1) * 2)); _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); __cs = __cs2 + 2; } #pragma empty_line // Complete Stage 1, prepend numeric base or sign. if (__builtin_expect(__dec, true)) { // Decimal. if (__v >= 0) { if (bool(__flags & ios_base::showpos) && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) *--__cs = __lit[__num_base::_S_oplus], ++__len; } else *--__cs = __lit[__num_base::_S_ominus], ++__len; } else if (bool(__flags & ios_base::showbase) && __v) { if (__basefield == ios_base::oct) *--__cs = __lit[__num_base::_S_odigits], ++__len; else { // 'x' or 'X' const bool __uppercase = __flags & ios_base::uppercase; *--__cs = __lit[__num_base::_S_ox + __uppercase]; // '0' *--__cs = __lit[__num_base::_S_odigits]; __len += 2; } } #pragma empty_line // Pad. const streamsize __w = __io.width(); if (__w > static_cast<streamsize>(__len)) { _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __cs3, __cs, __len); __cs = __cs3; } __io.width(0); #pragma empty_line // [22.2.2.2.2] Stage 4. // Write resulting, fully-formatted string to output iterator. return std::__write(__s, __cs, __len); } #pragma empty_line template<typename _CharT, typename _OutIter> void num_put<_CharT, _OutIter>:: _M_group_float(const char* __grouping, size_t __grouping_size, _CharT __sep, const _CharT* __p, _CharT* __new, _CharT* __cs, int& __len) const { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 282. What types does numpunct grouping refer to? // Add grouping, if necessary. const int __declen = __p ? __p - __cs : __len; _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, __grouping_size, __cs, __cs + __declen); #pragma empty_line // Tack on decimal part. int __newlen = __p2 - __new; if (__p) { char_traits<_CharT>::copy(__p2, __p, __len - __declen); __newlen += __len - __declen; } __len = __newlen; } #pragma empty_line // The following code uses vsnprintf (or vsprintf(), when // _GLIBCXX_USE_C99 is not defined) to convert floating point values // for insertion into a stream. An optimization would be to replace // them with code that works directly on a wide buffer and then use // __pad to do the padding. It would be good to replace them anyway // to gain back the efficiency that C++ provides by knowing up front // the type of the values to insert. Also, sprintf is dangerous // since may lead to accidental buffer overruns. This // implementation follows the C++ standard fairly directly as // outlined in 22.2.2.2 [lib.locale.num.put] template<typename _CharT, typename _OutIter> template<typename _ValueT> _OutIter num_put<_CharT, _OutIter>:: _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, _ValueT __v) const { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); #pragma empty_line // Use default precision if out of range. const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); #pragma empty_line const int __max_digits = __gnu_cxx::__numeric_traits<_ValueT>::__digits10; #pragma empty_line // [22.2.2.2.2] Stage 1, numeric conversion to character. int __len; // Long enough for the max format spec. char __fbuf[16]; __num_base::_S_format_float(__io, __fbuf, __mod); #pragma empty_line #pragma empty_line // First try a buffer perhaps big enough (most probably sufficient // for non-ios_base::fixed outputs) int __cs_size = __max_digits * 3; char* __cs = static_cast<char*>(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); #pragma empty_line // If the buffer was not large enough, try again with the correct size. if (__len >= __cs_size) { __cs_size = __len + 1; __cs = static_cast<char*>(__builtin_alloca(__cs_size)); __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf, __prec, __v); } #pragma line 1026 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.tcc" 3 // [22.2.2.2.2] Stage 2, convert to char_type, using correct // numpunct.decimal_point() values for '.' and adding grouping. const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); #pragma empty_line _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len)); __ctype.widen(__cs, __cs + __len, __ws); #pragma empty_line // Replace decimal point. _CharT* __wp = 0; const char* __p = char_traits<char>::find(__cs, __len, '.'); if (__p) { __wp = __ws + (__p - __cs); *__wp = __lc->_M_decimal_point; } #pragma empty_line // Add grouping, if necessary. // N.B. Make sure to not group things like 2e20, i.e., no decimal // point, scientific notation. if (__lc->_M_use_grouping && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' && __cs[1] >= '0' && __cs[2] >= '0'))) { // Grouping can add (almost) as many separators as the // number of digits, but no more. _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len * 2)); #pragma empty_line streamsize __off = 0; if (__cs[0] == '-' || __cs[0] == '+') { __off = 1; __ws2[0] = __ws[0]; __len -= 1; } #pragma empty_line _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, __lc->_M_thousands_sep, __wp, __ws2 + __off, __ws + __off, __len); __len += __off; #pragma empty_line __ws = __ws2; } #pragma empty_line // Pad. const streamsize __w = __io.width(); if (__w > static_cast<streamsize>(__len)) { _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w)); _M_pad(__fill, __w, __io, __ws3, __ws, __len); __ws = __ws3; } __io.width(0); #pragma empty_line // [22.2.2.2.2] Stage 4. // Write resulting, fully-formatted string to output iterator. return std::__write(__s, __ws, __len); } #pragma empty_line template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const { const ios_base::fmtflags __flags = __io.flags(); if ((__flags & ios_base::boolalpha) == 0) { const long __l = __v; __s = _M_insert_int(__s, __io, __fill, __l); } else { typedef __numpunct_cache<_CharT> __cache_type; __use_cache<__cache_type> __uc; const locale& __loc = __io._M_getloc(); const __cache_type* __lc = __uc(__loc); #pragma empty_line const _CharT* __name = __v ? __lc->_M_truename : __lc->_M_falsename; int __len = __v ? __lc->_M_truename_size : __lc->_M_falsename_size; #pragma empty_line const streamsize __w = __io.width(); if (__w > static_cast<streamsize>(__len)) { const streamsize __plen = __w - __len; _CharT* __ps = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __plen)); #pragma empty_line char_traits<_CharT>::assign(__ps, __plen, __fill); __io.width(0); #pragma empty_line if ((__flags & ios_base::adjustfield) == ios_base::left) { __s = std::__write(__s, __name, __len); __s = std::__write(__s, __ps, __plen); } else { __s = std::__write(__s, __ps, __plen); __s = std::__write(__s, __name, __len); } return __s; } __io.width(0); __s = std::__write(__s, __name, __len); } return __s; } #pragma empty_line template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const { return _M_insert_float(__s, __io, __fill, char(), __v); } #pragma line 1153 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.tcc" 3 template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, long double __v) const { return _M_insert_float(__s, __io, __fill, 'L', __v); } #pragma empty_line template<typename _CharT, typename _OutIter> _OutIter num_put<_CharT, _OutIter>:: do_put(iter_type __s, ios_base& __io, char_type __fill, const void* __v) const { const ios_base::fmtflags __flags = __io.flags(); const ios_base::fmtflags __fmt = ~(ios_base::basefield | ios_base::uppercase); __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); #pragma empty_line typedef __gnu_cxx::__conditional_type<(sizeof(const void*) <= sizeof(unsigned long)), unsigned long, unsigned long long>::__type _UIntPtrType; #pragma empty_line __s = _M_insert_int(__s, __io, __fill, reinterpret_cast<_UIntPtrType>(__v)); __io.flags(__flags); return __s; } #pragma empty_line #pragma empty_line #pragma empty_line // Construct correctly padded string, as per 22.2.2.2.2 // Assumes // __newlen > __oldlen // __news is allocated for __newlen size #pragma empty_line // NB: Of the two parameters, _CharT can be deduced from the // function arguments. The other (_Traits) has to be explicitly specified. template<typename _CharT, typename _Traits> void __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds, streamsize __newlen, streamsize __oldlen) { const size_t __plen = static_cast<size_t>(__newlen - __oldlen); const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; #pragma empty_line // Padding last. if (__adjust == ios_base::left) { _Traits::copy(__news, __olds, __oldlen); _Traits::assign(__news + __oldlen, __plen, __fill); return; } #pragma empty_line size_t __mod = 0; if (__adjust == ios_base::internal) { // Pad after the sign, if there is one. // Pad after 0[xX], if there is one. // Who came up with these rules, anyway? Jeeze. const locale& __loc = __io._M_getloc(); const ctype<_CharT>& __ctype = use_facet<ctype<_CharT> >(__loc); #pragma empty_line if (__ctype.widen('-') == __olds[0] || __ctype.widen('+') == __olds[0]) { __news[0] = __olds[0]; __mod = 1; ++__news; } else if (__ctype.widen('0') == __olds[0] && __oldlen > 1 && (__ctype.widen('x') == __olds[1] || __ctype.widen('X') == __olds[1])) { __news[0] = __olds[0]; __news[1] = __olds[1]; __mod = 2; __news += 2; } // else Padding first. } _Traits::assign(__news, __plen, __fill); _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); } #pragma empty_line template<typename _CharT> _CharT* __add_grouping(_CharT* __s, _CharT __sep, const char* __gbeg, size_t __gsize, const _CharT* __first, const _CharT* __last) { size_t __idx = 0; size_t __ctr = 0; #pragma empty_line while (__last - __first > __gbeg[__idx] && static_cast<signed char>(__gbeg[__idx]) > 0 && __gbeg[__idx] != __gnu_cxx::__numeric_traits<char>::__max) { __last -= __gbeg[__idx]; __idx < __gsize - 1 ? ++__idx : ++__ctr; } #pragma empty_line while (__first != __last) *__s++ = *__first++; #pragma empty_line while (__ctr--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } #pragma empty_line while (__idx--) { *__s++ = __sep; for (char __i = __gbeg[__idx]; __i > 0; --__i) *__s++ = *__first++; } #pragma empty_line return __s; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class numpunct<char>; extern template class numpunct_byname<char>; extern template class num_get<char>; extern template class num_put<char>; extern template class ctype_byname<char>; #pragma empty_line extern template const ctype<char>& use_facet<ctype<char> >(const locale&); #pragma empty_line extern template const numpunct<char>& use_facet<numpunct<char> >(const locale&); #pragma empty_line extern template const num_put<char>& use_facet<num_put<char> >(const locale&); #pragma empty_line extern template const num_get<char>& use_facet<num_get<char> >(const locale&); #pragma empty_line extern template bool has_facet<ctype<char> >(const locale&); #pragma empty_line extern template bool has_facet<numpunct<char> >(const locale&); #pragma empty_line extern template bool has_facet<num_put<char> >(const locale&); #pragma empty_line extern template bool has_facet<num_get<char> >(const locale&); #pragma empty_line #pragma empty_line extern template class numpunct<wchar_t>; extern template class numpunct_byname<wchar_t>; extern template class num_get<wchar_t>; extern template class num_put<wchar_t>; extern template class ctype_byname<wchar_t>; #pragma empty_line extern template const ctype<wchar_t>& use_facet<ctype<wchar_t> >(const locale&); #pragma empty_line extern template const numpunct<wchar_t>& use_facet<numpunct<wchar_t> >(const locale&); #pragma empty_line extern template const num_put<wchar_t>& use_facet<num_put<wchar_t> >(const locale&); #pragma empty_line extern template const num_get<wchar_t>& use_facet<num_get<wchar_t> >(const locale&); #pragma empty_line extern template bool has_facet<ctype<wchar_t> >(const locale&); #pragma empty_line extern template bool has_facet<numpunct<wchar_t> >(const locale&); #pragma empty_line extern template bool has_facet<num_put<wchar_t> >(const locale&); #pragma empty_line extern template bool has_facet<num_get<wchar_t> >(const locale&); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace #pragma line 2608 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/locale_facets.h" 2 3 #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_ios.h" 2 3 #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _Facet> inline const _Facet& __check_facet(const _Facet* __f) { if (!__f) __throw_bad_cast(); return *__f; } #pragma empty_line // 27.4.5 Template class basic_ios /** * @brief Virtual base class for all stream classes. * @ingroup io * * Most of the member functions called dispatched on stream objects * (e.g., @c std::cout.foo(bar);) are consolidated in this class. */ template<typename _CharT, typename _Traits> class basic_ios : public ios_base { public: //@{ /** * These are standard types. They permit a standardized way of * referring to names of (or names dependant on) the template * parameters, which are specific to the implementation. */ typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; //@} #pragma empty_line //@{ /** * These are non-standard types. */ typedef ctype<_CharT> __ctype_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; //@} #pragma empty_line // Data members: protected: basic_ostream<_CharT, _Traits>* _M_tie; mutable char_type _M_fill; mutable bool _M_fill_init; basic_streambuf<_CharT, _Traits>* _M_streambuf; #pragma empty_line // Cached use_facet<ctype>, which is based on the current locale info. const __ctype_type* _M_ctype; // For ostream. const __num_put_type* _M_num_put; // For istream. const __num_get_type* _M_num_get; #pragma empty_line public: //@{ /** * @brief The quick-and-easy status check. * * This allows you to write constructs such as * <code>if (!a_stream) ...</code> and <code>while (a_stream) ...</code> */ operator void*() const { return this->fail() ? 0 : const_cast<basic_ios*>(this); } #pragma empty_line bool operator!() const { return this->fail(); } //@} #pragma empty_line /** * @brief Returns the error state of the stream buffer. * @return A bit pattern (well, isn't everything?) * * See std::ios_base::iostate for the possible bit values. Most * users will call one of the interpreting wrappers, e.g., good(). */ iostate rdstate() const { return _M_streambuf_state; } #pragma empty_line /** * @brief [Re]sets the error state. * @param state The new state flag(s) to set. * * See std::ios_base::iostate for the possible bit values. Most * users will not need to pass an argument. */ void clear(iostate __state = goodbit); #pragma empty_line /** * @brief Sets additional flags in the error state. * @param state The additional state flag(s) to set. * * See std::ios_base::iostate for the possible bit values. */ void setstate(iostate __state) { this->clear(this->rdstate() | __state); } #pragma empty_line // Flip the internal state on for the proper state bits, then re // throws the propagated exception if bit also set in // exceptions(). void _M_setstate(iostate __state) { // 27.6.1.2.1 Common requirements. // Turn this on without causing an ios::failure to be thrown. _M_streambuf_state |= __state; if (this->exceptions() & __state) ; } #pragma empty_line /** * @brief Fast error checking. * @return True if no error flags are set. * * A wrapper around rdstate. */ bool good() const { return this->rdstate() == 0; } #pragma empty_line /** * @brief Fast error checking. * @return True if the eofbit is set. * * Note that other iostate flags may also be set. */ bool eof() const { return (this->rdstate() & eofbit) != 0; } #pragma empty_line /** * @brief Fast error checking. * @return True if either the badbit or the failbit is set. * * Checking the badbit in fail() is historical practice. * Note that other iostate flags may also be set. */ bool fail() const { return (this->rdstate() & (badbit | failbit)) != 0; } #pragma empty_line /** * @brief Fast error checking. * @return True if the badbit is set. * * Note that other iostate flags may also be set. */ bool bad() const { return (this->rdstate() & badbit) != 0; } #pragma empty_line /** * @brief Throwing exceptions on errors. * @return The current exceptions mask. * * This changes nothing in the stream. See the one-argument version * of exceptions(iostate) for the meaning of the return value. */ iostate exceptions() const { return _M_exception; } #pragma empty_line /** * @brief Throwing exceptions on errors. * @param except The new exceptions mask. * * By default, error flags are set silently. You can set an * exceptions mask for each stream; if a bit in the mask becomes set * in the error flags, then an exception of type * std::ios_base::failure is thrown. * * If the error flag is already set when the exceptions mask is * added, the exception is immediately thrown. Try running the * following under GCC 3.1 or later: * @code * #include <iostream> * #include <fstream> * #include <exception> * * int main() * { * std::set_terminate (__gnu_cxx::__verbose_terminate_handler); * * std::ifstream f ("/etc/motd"); * * std::cerr << "Setting badbit\n"; * f.setstate (std::ios_base::badbit); * * std::cerr << "Setting exception mask\n"; * f.exceptions (std::ios_base::badbit); * } * @endcode */ void exceptions(iostate __except) { _M_exception = __except; this->clear(_M_streambuf_state); } #pragma empty_line // Constructor/destructor: /** * @brief Constructor performs initialization. * * The parameter is passed by derived streams. */ explicit basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { this->init(__sb); } #pragma empty_line /** * @brief Empty. * * The destructor does nothing. More specifically, it does not * destroy the streambuf held by rdbuf(). */ virtual ~basic_ios() { } #pragma empty_line // Members: /** * @brief Fetches the current @e tied stream. * @return A pointer to the tied stream, or NULL if the stream is * not tied. * * A stream may be @e tied (or synchronized) to a second output * stream. When this stream performs any I/O, the tied stream is * first flushed. For example, @c std::cin is tied to @c std::cout. */ basic_ostream<_CharT, _Traits>* tie() const { return _M_tie; } #pragma empty_line /** * @brief Ties this stream to an output stream. * @param tiestr The output stream. * @return The previously tied output stream, or NULL if the stream * was not tied. * * This sets up a new tie; see tie() for more. */ basic_ostream<_CharT, _Traits>* tie(basic_ostream<_CharT, _Traits>* __tiestr) { basic_ostream<_CharT, _Traits>* __old = _M_tie; _M_tie = __tiestr; return __old; } #pragma empty_line /** * @brief Accessing the underlying buffer. * @return The current stream buffer. * * This does not change the state of the stream. */ basic_streambuf<_CharT, _Traits>* rdbuf() const { return _M_streambuf; } #pragma empty_line /** * @brief Changing the underlying buffer. * @param sb The new stream buffer. * @return The previous stream buffer. * * Associates a new buffer with the current stream, and clears the * error state. * * Due to historical accidents which the LWG refuses to correct, the * I/O library suffers from a design error: this function is hidden * in derived classes by overrides of the zero-argument @c rdbuf(), * which is non-virtual for hysterical raisins. As a result, you * must use explicit qualifications to access this function via any * derived class. For example: * * @code * std::fstream foo; // or some other derived type * std::streambuf* p = .....; * * foo.ios::rdbuf(p); // ios == basic_ios<char> * @endcode */ basic_streambuf<_CharT, _Traits>* rdbuf(basic_streambuf<_CharT, _Traits>* __sb); #pragma empty_line /** * @brief Copies fields of __rhs into this. * @param __rhs The source values for the copies. * @return Reference to this object. * * All fields of __rhs are copied into this object except that rdbuf() * and rdstate() remain unchanged. All values in the pword and iword * arrays are copied. Before copying, each callback is invoked with * erase_event. After copying, each (new) callback is invoked with * copyfmt_event. The final step is to copy exceptions(). */ basic_ios& copyfmt(const basic_ios& __rhs); #pragma empty_line /** * @brief Retrieves the @a empty character. * @return The current fill character. * * It defaults to a space (' ') in the current locale. */ char_type fill() const { if (!_M_fill_init) { _M_fill = this->widen(' '); _M_fill_init = true; } return _M_fill; } #pragma empty_line /** * @brief Sets a new @a empty character. * @param ch The new character. * @return The previous fill character. * * The fill character is used to fill out space when P+ characters * have been requested (e.g., via setw), Q characters are actually * used, and Q<P. It defaults to a space (' ') in the current locale. */ char_type fill(char_type __ch) { char_type __old = this->fill(); _M_fill = __ch; return __old; } #pragma empty_line // Locales: /** * @brief Moves to a new locale. * @param loc The new locale. * @return The previous locale. * * Calls @c ios_base::imbue(loc), and if a stream buffer is associated * with this stream, calls that buffer's @c pubimbue(loc). * * Additional l10n notes are at * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html */ locale imbue(const locale& __loc); #pragma empty_line /** * @brief Squeezes characters. * @param c The character to narrow. * @param dfault The character to narrow. * @return The narrowed character. * * Maps a character of @c char_type to a character of @c char, * if possible. * * Returns the result of * @code * std::use_facet<ctype<char_type> >(getloc()).narrow(c,dfault) * @endcode * * Additional l10n notes are at * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html */ char narrow(char_type __c, char __dfault) const { return __check_facet(_M_ctype).narrow(__c, __dfault); } #pragma empty_line /** * @brief Widens characters. * @param c The character to widen. * @return The widened character. * * Maps a character of @c char to a character of @c char_type. * * Returns the result of * @code * std::use_facet<ctype<char_type> >(getloc()).widen(c) * @endcode * * Additional l10n notes are at * http://gcc.gnu.org/onlinedocs/libstdc++/manual/localization.html */ char_type widen(char __c) const { return __check_facet(_M_ctype).widen(__c); } #pragma empty_line protected: // 27.4.5.1 basic_ios constructors /** * @brief Empty. * * The default constructor does nothing and is not normally * accessible to users. */ basic_ios() : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) { } #pragma empty_line /** * @brief All setup is performed here. * * This is called from the public constructor. It is not virtual and * cannot be redefined. */ void init(basic_streambuf<_CharT, _Traits>* __sb); #pragma empty_line void _M_cache_locale(const locale& __loc); }; #pragma empty_line #pragma empty_line } // namespace #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_ios.tcc" 1 3 // basic_ios member functions -*- C++ -*- #pragma empty_line // Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, // 2009, 2010, 2011 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/basic_ios.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ios} */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 34 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_ios.tcc" 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits> void basic_ios<_CharT, _Traits>::clear(iostate __state) { if (this->rdbuf()) _M_streambuf_state = __state; else _M_streambuf_state = __state | badbit; if (this->exceptions() & this->rdstate()) __throw_ios_failure(("basic_ios::clear")); } #pragma empty_line template<typename _CharT, typename _Traits> basic_streambuf<_CharT, _Traits>* basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) { basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; _M_streambuf = __sb; this->clear(); return __old; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ios<_CharT, _Traits>& basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 292. effects of a.copyfmt (a) if (this != &__rhs) { // Per 27.1.1, do not call imbue, yet must trash all caches // associated with imbue() #pragma empty_line // Alloc any new word array first, so if it fails we have "rollback". _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? _M_local_word : new _Words[__rhs._M_word_size]; #pragma empty_line // Bump refs before doing callbacks, for safety. _Callback_list* __cb = __rhs._M_callbacks; if (__cb) __cb->_M_add_reference(); _M_call_callbacks(erase_event); if (_M_word != _M_local_word) { delete [] _M_word; _M_word = 0; } _M_dispose_callbacks(); #pragma empty_line // NB: Don't want any added during above. _M_callbacks = __cb; for (int __i = 0; __i < __rhs._M_word_size; ++__i) __words[__i] = __rhs._M_word[__i]; _M_word = __words; _M_word_size = __rhs._M_word_size; #pragma empty_line this->flags(__rhs.flags()); this->width(__rhs.width()); this->precision(__rhs.precision()); this->tie(__rhs.tie()); this->fill(__rhs.fill()); _M_ios_locale = __rhs.getloc(); _M_cache_locale(_M_ios_locale); #pragma empty_line _M_call_callbacks(copyfmt_event); #pragma empty_line // The next is required to be the last assignment. this->exceptions(__rhs.exceptions()); } return *this; } #pragma empty_line // Locales: template<typename _CharT, typename _Traits> locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) { locale __old(this->getloc()); ios_base::imbue(__loc); _M_cache_locale(__loc); if (this->rdbuf() != 0) this->rdbuf()->pubimbue(__loc); return __old; } #pragma empty_line template<typename _CharT, typename _Traits> void basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) { // NB: This may be called more than once on the same object. ios_base::_M_init(); #pragma empty_line // Cache locale data and specific facets used by iostreams. _M_cache_locale(_M_ios_locale); #pragma empty_line // NB: The 27.4.4.1 Postconditions Table specifies requirements // after basic_ios::init() has been called. As part of this, // fill() must return widen(' ') any time after init() has been // called, which needs an imbued ctype facet of char_type to // return without throwing an exception. Unfortunately, // ctype<char_type> is not necessarily a required facet, so // streams with char_type != [char, wchar_t] will not have it by // default. Because of this, the correct value for _M_fill is // constructed on the first call of fill(). That way, // unformatted input and output with non-required basic_ios // instantiations is possible even without imbuing the expected // ctype<char_type> facet. _M_fill = _CharT(); _M_fill_init = false; #pragma empty_line _M_tie = 0; _M_exception = goodbit; _M_streambuf = __sb; _M_streambuf_state = __sb ? goodbit : badbit; } #pragma empty_line template<typename _CharT, typename _Traits> void basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) { if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) _M_ctype = &use_facet<__ctype_type>(__loc); else _M_ctype = 0; #pragma empty_line if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) _M_num_put = &use_facet<__num_put_type>(__loc); else _M_num_put = 0; #pragma empty_line if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) _M_num_get = &use_facet<__num_get_type>(__loc); else _M_num_get = 0; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class basic_ios<char>; #pragma empty_line #pragma empty_line extern template class basic_ios<wchar_t>; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 473 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/basic_ios.h" 2 3 #pragma line 45 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ios" 2 3 #pragma line 40 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ostream" 2 3 #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // [27.6.2.1] Template class basic_ostream /** * @brief Controlling output. * @ingroup io * * This is the base class for all output streams. It provides text * formatting of all builtin types, and communicates with any class * derived from basic_streambuf to do the actual output. */ template<typename _CharT, typename _Traits> class basic_ostream : virtual public basic_ios<_CharT, _Traits> { public: // Types (inherited from basic_ios (27.4.4)): typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; #pragma empty_line // Non-standard Types: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > __num_put_type; typedef ctype<_CharT> __ctype_type; #pragma empty_line // [27.6.2.2] constructor/destructor /** * @brief Base constructor. * * This ctor is almost never called by the user directly, rather from * derived classes' initialization lists, which pass a pointer to * their own stream buffer. */ explicit basic_ostream(__streambuf_type* __sb) { this->init(__sb); } #pragma empty_line /** * @brief Base destructor. * * This does very little apart from providing a virtual base dtor. */ virtual ~basic_ostream() { } #pragma empty_line // [27.6.2.3] prefix/suffix class sentry; friend class sentry; #pragma empty_line // [27.6.2.5] formatted output // [27.6.2.5.3] basic_ostream::operator<< //@{ /** * @brief Interface for manipulators. * * Manipulators such as @c std::endl and @c std::hex use these * functions in constructs like "std::cout << std::endl". For more * information, see the iomanip header. */ __ostream_type& operator<<(__ostream_type& (*__pf)(__ostream_type&)) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 60. What is a formatted input function? // The inserters for manipulators are *not* formatted output functions. return __pf(*this); } #pragma empty_line __ostream_type& operator<<(__ios_type& (*__pf)(__ios_type&)) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 60. What is a formatted input function? // The inserters for manipulators are *not* formatted output functions. __pf(*this); return *this; } #pragma empty_line __ostream_type& operator<<(ios_base& (*__pf) (ios_base&)) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 60. What is a formatted input function? // The inserters for manipulators are *not* formatted output functions. __pf(*this); return *this; } //@} #pragma empty_line // [27.6.2.5.2] arithmetic inserters /** * @name Arithmetic Inserters * * All the @c operator<< functions (aka <em>formatted output * functions</em>) have some common behavior. Each starts by * constructing a temporary object of type std::basic_ostream::sentry. * This can have several effects, concluding with the setting of a * status flag; see the sentry documentation for more. * * If the sentry status is good, the function tries to generate * whatever data is appropriate for the type of the argument. * * If an exception is thrown during insertion, ios_base::badbit * will be turned on in the stream's error state without causing an * ios_base::failure to be thrown. The original exception will then * be rethrown. */ //@{ /** * @brief Basic arithmetic inserters * @param A variable of builtin type. * @return @c *this if successful * * These functions use the stream's current locale (specifically, the * @c num_get facet) to perform numeric formatting. */ __ostream_type& operator<<(long __n) { return _M_insert(__n); } #pragma empty_line __ostream_type& operator<<(unsigned long __n) { return _M_insert(__n); } #pragma empty_line __ostream_type& operator<<(bool __n) { return _M_insert(__n); } #pragma empty_line __ostream_type& operator<<(short __n); #pragma empty_line __ostream_type& operator<<(unsigned short __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 117. basic_ostream uses nonexistent num_put member functions. return _M_insert(static_cast<unsigned long>(__n)); } #pragma empty_line __ostream_type& operator<<(int __n); #pragma empty_line __ostream_type& operator<<(unsigned int __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 117. basic_ostream uses nonexistent num_put member functions. return _M_insert(static_cast<unsigned long>(__n)); } #pragma empty_line #pragma empty_line __ostream_type& operator<<(long long __n) { return _M_insert(__n); } #pragma empty_line __ostream_type& operator<<(unsigned long long __n) { return _M_insert(__n); } #pragma empty_line #pragma empty_line __ostream_type& operator<<(double __f) { return _M_insert(__f); } #pragma empty_line __ostream_type& operator<<(float __f) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 117. basic_ostream uses nonexistent num_put member functions. return _M_insert(static_cast<double>(__f)); } #pragma empty_line __ostream_type& operator<<(long double __f) { return _M_insert(__f); } #pragma empty_line __ostream_type& operator<<(const void* __p) { return _M_insert(__p); } #pragma empty_line /** * @brief Extracting from another streambuf. * @param sb A pointer to a streambuf * * This function behaves like one of the basic arithmetic extractors, * in that it also constructs a sentry object and has the same error * handling behavior. * * If @a sb is NULL, the stream will set failbit in its error state. * * Characters are extracted from @a sb and inserted into @c *this * until one of the following occurs: * * - the input stream reaches end-of-file, * - insertion into the output sequence fails (in this case, the * character that would have been inserted is not extracted), or * - an exception occurs while getting a character from @a sb, which * sets failbit in the error state * * If the function inserts no characters, failbit is set. */ __ostream_type& operator<<(__streambuf_type* __sb); //@} #pragma empty_line // [27.6.2.6] unformatted output functions /** * @name Unformatted Output Functions * * All the unformatted output functions have some common behavior. * Each starts by constructing a temporary object of type * std::basic_ostream::sentry. This has several effects, concluding * with the setting of a status flag; see the sentry documentation * for more. * * If the sentry status is good, the function tries to generate * whatever data is appropriate for the type of the argument. * * If an exception is thrown during insertion, ios_base::badbit * will be turned on in the stream's error state. If badbit is on in * the stream's exceptions mask, the exception will be rethrown * without completing its actions. */ //@{ /** * @brief Simple insertion. * @param c The character to insert. * @return *this * * Tries to insert @a c. * * @note This function is not overloaded on signed char and * unsigned char. */ __ostream_type& put(char_type __c); #pragma empty_line // Core write functionality, without sentry. void _M_write(const char_type* __s, streamsize __n) { const streamsize __put = this->rdbuf()->sputn(__s, __n); if (__put != __n) this->setstate(ios_base::badbit); } #pragma empty_line /** * @brief Character string insertion. * @param s The array to insert. * @param n Maximum number of characters to insert. * @return *this * * Characters are copied from @a s and inserted into the stream until * one of the following happens: * * - @a n characters are inserted * - inserting into the output sequence fails (in this case, badbit * will be set in the stream's error state) * * @note This function is not overloaded on signed char and * unsigned char. */ __ostream_type& write(const char_type* __s, streamsize __n); //@} #pragma empty_line /** * @brief Synchronizing the stream buffer. * @return *this * * If @c rdbuf() is a null pointer, changes nothing. * * Otherwise, calls @c rdbuf()->pubsync(), and if that returns -1, * sets badbit. */ __ostream_type& flush(); #pragma empty_line // [27.6.2.4] seek members /** * @brief Getting the current write position. * @return A file position object. * * If @c fail() is not false, returns @c pos_type(-1) to indicate * failure. Otherwise returns @c rdbuf()->pubseekoff(0,cur,out). */ pos_type tellp(); #pragma empty_line /** * @brief Changing the current write position. * @param pos A file position object. * @return *this * * If @c fail() is not true, calls @c rdbuf()->pubseekpos(pos). If * that function fails, sets failbit. */ __ostream_type& seekp(pos_type); #pragma empty_line /** * @brief Changing the current write position. * @param off A file offset object. * @param dir The direction in which to seek. * @return *this * * If @c fail() is not true, calls @c rdbuf()->pubseekoff(off,dir). * If that function fails, sets failbit. */ __ostream_type& seekp(off_type, ios_base::seekdir); #pragma empty_line protected: basic_ostream() { this->init(0); } #pragma empty_line template<typename _ValueT> __ostream_type& _M_insert(_ValueT __v); }; #pragma empty_line /** * @brief Performs setup work for output streams. * * Objects of this class are created before all of the standard * inserters are run. It is responsible for <em>exception-safe prefix and * suffix operations</em>. */ template <typename _CharT, typename _Traits> class basic_ostream<_CharT, _Traits>::sentry { // Data Members. bool _M_ok; basic_ostream<_CharT, _Traits>& _M_os; #pragma empty_line public: /** * @brief The constructor performs preparatory work. * @param os The output stream to guard. * * If the stream state is good (@a os.good() is true), then if the * stream is tied to another output stream, @c is.tie()->flush() * is called to synchronize the output sequences. * * If the stream state is still good, then the sentry state becomes * true (@a okay). */ explicit sentry(basic_ostream<_CharT, _Traits>& __os); #pragma empty_line /** * @brief Possibly flushes the stream. * * If @c ios_base::unitbuf is set in @c os.flags(), and * @c std::uncaught_exception() is true, the sentry destructor calls * @c flush() on the output stream. */ ~sentry() { // XXX MT if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) { // Can't call flush directly or else will get into recursive lock. if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) _M_os.setstate(ios_base::badbit); } } #pragma empty_line /** * @brief Quick status checking. * @return The sentry state. * * For ease of use, sentries may be converted to booleans. The * return value is that of the sentry state (true == okay). */ #pragma empty_line #pragma empty_line #pragma empty_line operator bool() const { return _M_ok; } }; #pragma empty_line // [27.6.2.5.4] character insertion templates //@{ /** * @brief Character inserters * @param out An output stream. * @param c A character. * @return out * * Behaves like one of the formatted arithmetic inserters described in * std::basic_ostream. After constructing a sentry object with good * status, this function inserts a single character and any required * padding (as determined by [22.2.2.2.2]). @c out.width(0) is then * called. * * If @a c is of type @c char and the character type of the stream is not * @c char, the character is widened before insertion. */ template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) { return __ostream_insert(__out, &__c, 1); } #pragma empty_line template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) { return (__out << __out.widen(__c)); } #pragma empty_line // Specialization template <class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, char __c) { return __ostream_insert(__out, &__c, 1); } #pragma empty_line // Signed and unsigned template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, signed char __c) { return (__out << static_cast<char>(__c)); } #pragma empty_line template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) { return (__out << static_cast<char>(__c)); } //@} #pragma empty_line //@{ /** * @brief String inserters * @param out An output stream. * @param s A character string. * @return out * @pre @a s must be a non-NULL pointer * * Behaves like one of the formatted arithmetic inserters described in * std::basic_ostream. After constructing a sentry object with good * status, this function inserts @c traits::length(s) characters starting * at @a s, widened if necessary, followed by any required padding (as * determined by [22.2.2.2.2]). @c out.width(0) is then called. */ template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast<streamsize>(_Traits::length(__s))); return __out; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits> & operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); #pragma empty_line // Partial specializations template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else __ostream_insert(__out, __s, static_cast<streamsize>(_Traits::length(__s))); return __out; } #pragma empty_line // Signed and unsigned template<class _Traits> inline basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) { return (__out << reinterpret_cast<const char*>(__s)); } #pragma empty_line template<class _Traits> inline basic_ostream<char, _Traits> & operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) { return (__out << reinterpret_cast<const char*>(__s)); } //@} #pragma empty_line // [27.6.2.7] standard basic_ostream manipulators /** * @brief Write a newline and flush the stream. * * This manipulator is often mistakenly used when a simple newline is * desired, leading to poor buffering performance. See * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch25s02.html * for more on this subject. */ template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) { return flush(__os.put(__os.widen('\n'))); } #pragma empty_line /** * @brief Write a null character into the output sequence. * * <em>Null character</em> is @c CharT() by definition. For CharT of @c char, * this correctly writes the ASCII @c NUL character string terminator. */ template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& ends(basic_ostream<_CharT, _Traits>& __os) { return __os.put(_CharT()); } #pragma empty_line /** * @brief Flushes the output stream. * * This manipulator simply calls the stream's @c flush() member function. */ template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& flush(basic_ostream<_CharT, _Traits>& __os) { return __os.flush(); } #pragma line 585 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ostream" 3 } // namespace #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ostream.tcc" 1 3 // ostream classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/ostream.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{ostream} */ #pragma empty_line // // ISO C++ 14882: 27.6.2 Output streams // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/ostream.tcc" 3 #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>::sentry:: sentry(basic_ostream<_CharT, _Traits>& __os) : _M_ok(false), _M_os(__os) { // XXX MT if (__os.tie() && __os.good()) __os.tie()->flush(); #pragma empty_line if (__os.good()) _M_ok = true; else __os.setstate(ios_base::failbit); } #pragma empty_line template<typename _CharT, typename _Traits> template<typename _ValueT> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: _M_insert(_ValueT __v) { sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const __num_put_type& __np = __check_facet(this->_M_num_put); if (__np.put(*this, *this, this->fill(), __v).failed()) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(short __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 117. basic_ostream uses nonexistent num_put member functions. const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast<long>(static_cast<unsigned short>(__n))); else return _M_insert(static_cast<long>(__n)); } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(int __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 117. basic_ostream uses nonexistent num_put member functions. const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; if (__fmt == ios_base::oct || __fmt == ios_base::hex) return _M_insert(static_cast<long>(static_cast<unsigned int>(__n))); else return _M_insert(static_cast<long>(__n)); } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: operator<<(__streambuf_type* __sbin) { ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this); if (__cerb && __sbin) { if (true) { if (!__copy_streambufs(__sbin, this->rdbuf())) __err |= ios_base::failbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::failbit); } } else if (!__sbin) __err |= ios_base::badbit; if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: put(char_type __c) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 60. What is a formatted input function? // basic_ostream::put(char_type) is an unformatted output function. // DR 63. Exception-handling policy for unformatted output. // Unformatted output functions should catch exceptions thrown // from streambuf members. sentry __cerb(*this); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __put = this->rdbuf()->sputc(__c); if (traits_type::eq_int_type(__put, traits_type::eof())) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: write(const _CharT* __s, streamsize __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 60. What is a formatted input function? // basic_ostream::write(const char_type*, streamsize) is an // unformatted output function. // DR 63. Exception-handling policy for unformatted output. // Unformatted output functions should catch exceptions thrown // from streambuf members. sentry __cerb(*this); if (__cerb) { if (true) { _M_write(__s, __n); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: flush() { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR 60. What is a formatted input function? // basic_ostream::flush() is *not* an unformatted output function. ios_base::iostate __err = ios_base::goodbit; if (true) { if (this->rdbuf() && this->rdbuf()->pubsync() == -1) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> typename basic_ostream<_CharT, _Traits>::pos_type basic_ostream<_CharT, _Traits>:: tellp() { pos_type __ret = pos_type(-1); if (true) { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } return __ret; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(pos_type __pos) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 136. seekp, seekg setting wrong streams? const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::out); #pragma empty_line // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& basic_ostream<_CharT, _Traits>:: seekp(off_type __off, ios_base::seekdir __dir) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 136. seekp, seekg setting wrong streams? const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::out); #pragma empty_line // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) { if (!__s) __out.setstate(ios_base::badbit); else { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 167. Improper use of traits_type::length() const size_t __clen = char_traits<char>::length(__s); if (true) { struct __ptr_guard { _CharT *__p; __ptr_guard (_CharT *__ip): __p(__ip) { } ~__ptr_guard() { delete[] __p; } _CharT* __get() { return __p; } } __pg (new _CharT[__clen]); #pragma empty_line _CharT *__ws = __pg.__get(); for (size_t __i = 0; __i < __clen; ++__i) __ws[__i] = __out.widen(__s[__i]); __ostream_insert(__out, __ws, __clen); } if (false) { __out._M_setstate(ios_base::badbit); ; } if (false) { __out._M_setstate(ios_base::badbit); } } return __out; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class basic_ostream<char>; extern template ostream& endl(ostream&); extern template ostream& ends(ostream&); extern template ostream& flush(ostream&); extern template ostream& operator<<(ostream&, char); extern template ostream& operator<<(ostream&, unsigned char); extern template ostream& operator<<(ostream&, signed char); extern template ostream& operator<<(ostream&, const char*); extern template ostream& operator<<(ostream&, const unsigned char*); extern template ostream& operator<<(ostream&, const signed char*); #pragma empty_line extern template ostream& ostream::_M_insert(long); extern template ostream& ostream::_M_insert(unsigned long); extern template ostream& ostream::_M_insert(bool); #pragma empty_line extern template ostream& ostream::_M_insert(long long); extern template ostream& ostream::_M_insert(unsigned long long); #pragma empty_line extern template ostream& ostream::_M_insert(double); extern template ostream& ostream::_M_insert(long double); extern template ostream& ostream::_M_insert(const void*); #pragma empty_line #pragma empty_line extern template class basic_ostream<wchar_t>; extern template wostream& endl(wostream&); extern template wostream& ends(wostream&); extern template wostream& flush(wostream&); extern template wostream& operator<<(wostream&, wchar_t); extern template wostream& operator<<(wostream&, char); extern template wostream& operator<<(wostream&, const wchar_t*); extern template wostream& operator<<(wostream&, const char*); #pragma empty_line extern template wostream& wostream::_M_insert(long); extern template wostream& wostream::_M_insert(unsigned long); extern template wostream& wostream::_M_insert(bool); #pragma empty_line extern template wostream& wostream::_M_insert(long long); extern template wostream& wostream::_M_insert(unsigned long long); #pragma empty_line extern template wostream& wostream::_M_insert(double); extern template wostream& wostream::_M_insert(long double); extern template wostream& wostream::_M_insert(const void*); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 588 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ostream" 2 3 #pragma line 40 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iostream" 2 3 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/istream" 1 3 // Input streams -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line // // ISO C++ 14882: 27.6.1 Input streams // #pragma empty_line /** @file include/istream * This is a Standard C++ Library header. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 38 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/istream" 3 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line // [27.6.1.1] Template class basic_istream /** * @brief Controlling input. * @ingroup io * * This is the base class for all input streams. It provides text * formatting of all builtin types, and communicates with any class * derived from basic_streambuf to do the actual input. */ template<typename _CharT, typename _Traits> class basic_istream : virtual public basic_ios<_CharT, _Traits> { public: // Types (inherited from basic_ios (27.4.4)): typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; #pragma empty_line // Non-standard Types: typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_ios<_CharT, _Traits> __ios_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > __num_get_type; typedef ctype<_CharT> __ctype_type; #pragma empty_line protected: // Data Members: /** * The number of characters extracted in the previous unformatted * function; see gcount(). */ streamsize _M_gcount; #pragma empty_line public: // [27.6.1.1.1] constructor/destructor /** * @brief Base constructor. * * This ctor is almost never called by the user directly, rather from * derived classes' initialization lists, which pass a pointer to * their own stream buffer. */ explicit basic_istream(__streambuf_type* __sb) : _M_gcount(streamsize(0)) { this->init(__sb); } #pragma empty_line /** * @brief Base destructor. * * This does very little apart from providing a virtual base dtor. */ virtual ~basic_istream() { _M_gcount = streamsize(0); } #pragma empty_line // [27.6.1.1.2] prefix/suffix class sentry; friend class sentry; #pragma empty_line // [27.6.1.2] formatted input // [27.6.1.2.3] basic_istream::operator>> //@{ /** * @brief Interface for manipulators. * * Manipulators such as @c std::ws and @c std::dec use these * functions in constructs like * <code>std::cin >> std::ws</code>. * For more information, see the iomanip header. */ __istream_type& operator>>(__istream_type& (*__pf)(__istream_type&)) { return __pf(*this); } #pragma empty_line __istream_type& operator>>(__ios_type& (*__pf)(__ios_type&)) { __pf(*this); return *this; } #pragma empty_line __istream_type& operator>>(ios_base& (*__pf)(ios_base&)) { __pf(*this); return *this; } //@} #pragma empty_line // [27.6.1.2.2] arithmetic extractors /** * @name Arithmetic Extractors * * All the @c operator>> functions (aka <em>formatted input * functions</em>) have some common behavior. Each starts by * constructing a temporary object of type std::basic_istream::sentry * with the second argument (noskipws) set to false. This has several * effects, concluding with the setting of a status flag; see the * sentry documentation for more. * * If the sentry status is good, the function tries to extract * whatever data is appropriate for the type of the argument. * * If an exception is thrown during extraction, ios_base::badbit * will be turned on in the stream's error state without causing an * ios_base::failure to be thrown. The original exception will then * be rethrown. */ //@{ /** * @brief Basic arithmetic extractors * @param A variable of builtin type. * @return @c *this if successful * * These functions use the stream's current locale (specifically, the * @c num_get facet) to parse the input data. */ __istream_type& operator>>(bool& __n) { return _M_extract(__n); } #pragma empty_line __istream_type& operator>>(short& __n); #pragma empty_line __istream_type& operator>>(unsigned short& __n) { return _M_extract(__n); } #pragma empty_line __istream_type& operator>>(int& __n); #pragma empty_line __istream_type& operator>>(unsigned int& __n) { return _M_extract(__n); } #pragma empty_line __istream_type& operator>>(long& __n) { return _M_extract(__n); } #pragma empty_line __istream_type& operator>>(unsigned long& __n) { return _M_extract(__n); } #pragma empty_line #pragma empty_line __istream_type& operator>>(long long& __n) { return _M_extract(__n); } #pragma empty_line __istream_type& operator>>(unsigned long long& __n) { return _M_extract(__n); } #pragma empty_line #pragma empty_line __istream_type& operator>>(float& __f) { return _M_extract(__f); } #pragma empty_line __istream_type& operator>>(double& __f) { return _M_extract(__f); } #pragma empty_line __istream_type& operator>>(long double& __f) { return _M_extract(__f); } #pragma empty_line __istream_type& operator>>(void*& __p) { return _M_extract(__p); } #pragma empty_line /** * @brief Extracting into another streambuf. * @param sb A pointer to a streambuf * * This function behaves like one of the basic arithmetic extractors, * in that it also constructs a sentry object and has the same error * handling behavior. * * If @a sb is NULL, the stream will set failbit in its error state. * * Characters are extracted from this stream and inserted into the * @a sb streambuf until one of the following occurs: * * - the input stream reaches end-of-file, * - insertion into the output buffer fails (in this case, the * character that would have been inserted is not extracted), or * - an exception occurs (and in this case is caught) * * If the function inserts no characters, failbit is set. */ __istream_type& operator>>(__streambuf_type* __sb); //@} #pragma empty_line // [27.6.1.3] unformatted input /** * @brief Character counting * @return The number of characters extracted by the previous * unformatted input function dispatched for this stream. */ streamsize gcount() const { return _M_gcount; } #pragma empty_line /** * @name Unformatted Input Functions * * All the unformatted input functions have some common behavior. * Each starts by constructing a temporary object of type * std::basic_istream::sentry with the second argument (noskipws) * set to true. This has several effects, concluding with the * setting of a status flag; see the sentry documentation for more. * * If the sentry status is good, the function tries to extract * whatever data is appropriate for the type of the argument. * * The number of characters extracted is stored for later retrieval * by gcount(). * * If an exception is thrown during extraction, ios_base::badbit * will be turned on in the stream's error state without causing an * ios_base::failure to be thrown. The original exception will then * be rethrown. */ //@{ /** * @brief Simple extraction. * @return A character, or eof(). * * Tries to extract a character. If none are available, sets failbit * and returns traits::eof(). */ int_type get(); #pragma empty_line /** * @brief Simple extraction. * @param c The character in which to store data. * @return *this * * Tries to extract a character and store it in @a c. If none are * available, sets failbit and returns traits::eof(). * * @note This function is not overloaded on signed char and * unsigned char. */ __istream_type& get(char_type& __c); #pragma empty_line /** * @brief Simple multiple-character extraction. * @param s Pointer to an array. * @param n Maximum number of characters to store in @a s. * @param delim A "stop" character. * @return *this * * Characters are extracted and stored into @a s until one of the * following happens: * * - @c n-1 characters are stored * - the input sequence reaches EOF * - the next character equals @a delim, in which case the character * is not extracted * * If no characters are stored, failbit is set in the stream's error * state. * * In any case, a null character is stored into the next location in * the array. * * @note This function is not overloaded on signed char and * unsigned char. */ __istream_type& get(char_type* __s, streamsize __n, char_type __delim); #pragma empty_line /** * @brief Simple multiple-character extraction. * @param s Pointer to an array. * @param n Maximum number of characters to store in @a s. * @return *this * * Returns @c get(s,n,widen(&apos;\\n&apos;)). */ __istream_type& get(char_type* __s, streamsize __n) { return this->get(__s, __n, this->widen('\n')); } #pragma empty_line /** * @brief Extraction into another streambuf. * @param sb A streambuf in which to store data. * @param delim A "stop" character. * @return *this * * Characters are extracted and inserted into @a sb until one of the * following happens: * * - the input sequence reaches EOF * - insertion into the output buffer fails (in this case, the * character that would have been inserted is not extracted) * - the next character equals @a delim (in this case, the character * is not extracted) * - an exception occurs (and in this case is caught) * * If no characters are stored, failbit is set in the stream's error * state. */ __istream_type& get(__streambuf_type& __sb, char_type __delim); #pragma empty_line /** * @brief Extraction into another streambuf. * @param sb A streambuf in which to store data. * @return *this * * Returns @c get(sb,widen(&apos;\\n&apos;)). */ __istream_type& get(__streambuf_type& __sb) { return this->get(__sb, this->widen('\n')); } #pragma empty_line /** * @brief String extraction. * @param s A character array in which to store the data. * @param n Maximum number of characters to extract. * @param delim A "stop" character. * @return *this * * Extracts and stores characters into @a s until one of the * following happens. Note that these criteria are required to be * tested in the order listed here, to allow an input line to exactly * fill the @a s array without setting failbit. * * -# the input sequence reaches end-of-file, in which case eofbit * is set in the stream error state * -# the next character equals @c delim, in which case the character * is extracted (and therefore counted in @c gcount()) but not stored * -# @c n-1 characters are stored, in which case failbit is set * in the stream error state * * If no characters are extracted, failbit is set. (An empty line of * input should therefore not cause failbit to be set.) * * In any case, a null character is stored in the next location in * the array. */ __istream_type& getline(char_type* __s, streamsize __n, char_type __delim); #pragma empty_line /** * @brief String extraction. * @param s A character array in which to store the data. * @param n Maximum number of characters to extract. * @return *this * * Returns @c getline(s,n,widen(&apos;\\n&apos;)). */ __istream_type& getline(char_type* __s, streamsize __n) { return this->getline(__s, __n, this->widen('\n')); } #pragma empty_line /** * @brief Discarding characters * @param n Number of characters to discard. * @param delim A "stop" character. * @return *this * * Extracts characters and throws them away until one of the * following happens: * - if @a n @c != @c std::numeric_limits<int>::max(), @a n * characters are extracted * - the input sequence reaches end-of-file * - the next character equals @a delim (in this case, the character * is extracted); note that this condition will never occur if * @a delim equals @c traits::eof(). * * NB: Provide three overloads, instead of the single function * (with defaults) mandated by the Standard: this leads to a * better performing implementation, while still conforming to * the Standard. */ __istream_type& ignore(); #pragma empty_line __istream_type& ignore(streamsize __n); #pragma empty_line __istream_type& ignore(streamsize __n, int_type __delim); #pragma empty_line /** * @brief Looking ahead in the stream * @return The next character, or eof(). * * If, after constructing the sentry object, @c good() is false, * returns @c traits::eof(). Otherwise reads but does not extract * the next input character. */ int_type peek(); #pragma empty_line /** * @brief Extraction without delimiters. * @param s A character array. * @param n Maximum number of characters to store. * @return *this * * If the stream state is @c good(), extracts characters and stores * them into @a s until one of the following happens: * - @a n characters are stored * - the input sequence reaches end-of-file, in which case the error * state is set to @c failbit|eofbit. * * @note This function is not overloaded on signed char and * unsigned char. */ __istream_type& read(char_type* __s, streamsize __n); #pragma empty_line /** * @brief Extraction until the buffer is exhausted, but no more. * @param s A character array. * @param n Maximum number of characters to store. * @return The number of characters extracted. * * Extracts characters and stores them into @a s depending on the * number of characters remaining in the streambuf's buffer, * @c rdbuf()->in_avail(), called @c A here: * - if @c A @c == @c -1, sets eofbit and extracts no characters * - if @c A @c == @c 0, extracts no characters * - if @c A @c > @c 0, extracts @c min(A,n) * * The goal is to empty the current buffer, and to not request any * more from the external input sequence controlled by the streambuf. */ streamsize readsome(char_type* __s, streamsize __n); #pragma empty_line /** * @brief Unextracting a single character. * @param c The character to push back into the input stream. * @return *this * * If @c rdbuf() is not null, calls @c rdbuf()->sputbackc(c). * * If @c rdbuf() is null or if @c sputbackc() fails, sets badbit in * the error state. * * @note This function first clears eofbit. Since no characters * are extracted, the next call to @c gcount() will return 0, * as required by DR 60. */ __istream_type& putback(char_type __c); #pragma empty_line /** * @brief Unextracting the previous character. * @return *this * * If @c rdbuf() is not null, calls @c rdbuf()->sungetc(c). * * If @c rdbuf() is null or if @c sungetc() fails, sets badbit in * the error state. * * @note This function first clears eofbit. Since no characters * are extracted, the next call to @c gcount() will return 0, * as required by DR 60. */ __istream_type& unget(); #pragma empty_line /** * @brief Synchronizing the stream buffer. * @return 0 on success, -1 on failure * * If @c rdbuf() is a null pointer, returns -1. * * Otherwise, calls @c rdbuf()->pubsync(), and if that returns -1, * sets badbit and returns -1. * * Otherwise, returns 0. * * @note This function does not count the number of characters * extracted, if any, and therefore does not affect the next * call to @c gcount(). */ int sync(); #pragma empty_line /** * @brief Getting the current read position. * @return A file position object. * * If @c fail() is not false, returns @c pos_type(-1) to indicate * failure. Otherwise returns @c rdbuf()->pubseekoff(0,cur,in). * * @note This function does not count the number of characters * extracted, if any, and therefore does not affect the next * call to @c gcount(). At variance with putback, unget and * seekg, eofbit is not cleared first. */ pos_type tellg(); #pragma empty_line /** * @brief Changing the current read position. * @param pos A file position object. * @return *this * * If @c fail() is not true, calls @c rdbuf()->pubseekpos(pos). If * that function fails, sets failbit. * * @note This function first clears eofbit. It does not count the * number of characters extracted, if any, and therefore does * not affect the next call to @c gcount(). */ __istream_type& seekg(pos_type); #pragma empty_line /** * @brief Changing the current read position. * @param off A file offset object. * @param dir The direction in which to seek. * @return *this * * If @c fail() is not true, calls @c rdbuf()->pubseekoff(off,dir). * If that function fails, sets failbit. * * @note This function first clears eofbit. It does not count the * number of characters extracted, if any, and therefore does * not affect the next call to @c gcount(). */ __istream_type& seekg(off_type, ios_base::seekdir); //@} #pragma empty_line protected: basic_istream() : _M_gcount(streamsize(0)) { this->init(0); } #pragma empty_line template<typename _ValueT> __istream_type& _M_extract(_ValueT& __v); }; #pragma empty_line // Explicit specialization declarations, defined in src/istream.cc. template<> basic_istream<char>& basic_istream<char>:: getline(char_type* __s, streamsize __n, char_type __delim); #pragma empty_line template<> basic_istream<char>& basic_istream<char>:: ignore(streamsize __n); #pragma empty_line template<> basic_istream<char>& basic_istream<char>:: ignore(streamsize __n, int_type __delim); #pragma empty_line #pragma empty_line template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: getline(char_type* __s, streamsize __n, char_type __delim); #pragma empty_line template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: ignore(streamsize __n); #pragma empty_line template<> basic_istream<wchar_t>& basic_istream<wchar_t>:: ignore(streamsize __n, int_type __delim); #pragma empty_line #pragma empty_line /** * @brief Performs setup work for input streams. * * Objects of this class are created before all of the standard * extractors are run. It is responsible for <em>exception-safe * prefix and suffix operations,</em> although only prefix actions * are currently required by the standard. */ template<typename _CharT, typename _Traits> class basic_istream<_CharT, _Traits>::sentry { // Data Members. bool _M_ok; #pragma empty_line public: /// Easy access to dependant types. typedef _Traits traits_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::__ctype_type __ctype_type; typedef typename _Traits::int_type __int_type; #pragma empty_line /** * @brief The constructor performs all the work. * @param is The input stream to guard. * @param noskipws Whether to consume whitespace or not. * * If the stream state is good (@a is.good() is true), then the * following actions are performed, otherwise the sentry state * is false (<em>not okay</em>) and failbit is set in the * stream state. * * The sentry's preparatory actions are: * * -# if the stream is tied to an output stream, @c is.tie()->flush() * is called to synchronize the output sequence * -# if @a noskipws is false, and @c ios_base::skipws is set in * @c is.flags(), the sentry extracts and discards whitespace * characters from the stream. The currently imbued locale is * used to determine whether each character is whitespace. * * If the stream state is still good, then the sentry state becomes * true (@a okay). */ explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); #pragma empty_line /** * @brief Quick status checking. * @return The sentry state. * * For ease of use, sentries may be converted to booleans. The * return value is that of the sentry state (true == okay). */ #pragma empty_line #pragma empty_line #pragma empty_line operator bool() const { return _M_ok; } }; #pragma empty_line // [27.6.1.2.3] character extraction templates //@{ /** * @brief Character extractors * @param in An input stream. * @param c A character reference. * @return in * * Behaves like one of the formatted arithmetic extractors described in * std::basic_istream. After constructing a sentry object with good * status, this function extracts a character (if one is available) and * stores it in @a c. Otherwise, sets failbit in the input stream. */ template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); #pragma empty_line template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) { return (__in >> reinterpret_cast<char&>(__c)); } #pragma empty_line template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, signed char& __c) { return (__in >> reinterpret_cast<char&>(__c)); } //@} #pragma empty_line //@{ /** * @brief Character string extractors * @param in An input stream. * @param s A pointer to a character array. * @return in * * Behaves like one of the formatted arithmetic extractors described in * std::basic_istream. After constructing a sentry object with good * status, this function extracts up to @c n characters and stores them * into the array starting at @a s. @c n is defined as: * * - if @c width() is greater than zero, @c n is width() otherwise * - @c n is <em>the number of elements of the largest array of * * - @c char_type that can store a terminating @c eos.</em> * - [27.6.1.2.3]/6 * * Characters are extracted and stored until one of the following happens: * - @c n-1 characters are stored * - EOF is reached * - the next character is whitespace according to the current locale * - the next character is a null byte (i.e., @c charT() ) * * @c width(0) is then called for the input stream. * * If no characters are extracted, sets failbit. */ template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); #pragma empty_line // Explicit specialization declaration, defined in src/istream.cc. template<> basic_istream<char>& operator>>(basic_istream<char>& __in, char* __s); #pragma empty_line template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) { return (__in >> reinterpret_cast<char*>(__s)); } #pragma empty_line template<class _Traits> inline basic_istream<char, _Traits>& operator>>(basic_istream<char, _Traits>& __in, signed char* __s) { return (__in >> reinterpret_cast<char*>(__s)); } //@} #pragma empty_line // 27.6.1.5 Template class basic_iostream /** * @brief Merging istream and ostream capabilities. * @ingroup io * * This class multiply inherits from the input and output stream classes * simply to provide a single interface. */ template<typename _CharT, typename _Traits> class basic_iostream : public basic_istream<_CharT, _Traits>, public basic_ostream<_CharT, _Traits> { public: // _GLIBCXX_RESOLVE_LIB_DEFECTS // 271. basic_iostream missing typedefs // Types (inherited): typedef _CharT char_type; typedef typename _Traits::int_type int_type; typedef typename _Traits::pos_type pos_type; typedef typename _Traits::off_type off_type; typedef _Traits traits_type; #pragma empty_line // Non-standard Types: typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_ostream<_CharT, _Traits> __ostream_type; #pragma empty_line /** * @brief Constructor does nothing. * * Both of the parent classes are initialized with the same * streambuf pointer passed to this constructor. */ explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) : __istream_type(__sb), __ostream_type(__sb) { } #pragma empty_line /** * @brief Destructor does nothing. */ virtual ~basic_iostream() { } #pragma empty_line protected: basic_iostream() : __istream_type(), __ostream_type() { } }; #pragma empty_line // [27.6.1.4] standard basic_istream manipulators /** * @brief Quick and easy way to eat whitespace * * This manipulator extracts whitespace characters, stopping when the * next character is non-whitespace, or when the input sequence is empty. * If the sequence is empty, @c eofbit is set in the stream, but not * @c failbit. * * The current locale is used to distinguish whitespace characters. * * Example: * @code * MyClass mc; * * std::cin >> std::ws >> mc; * @endcode * will skip leading whitespace before calling operator>> on cin and your * object. Note that the same effect can be achieved by creating a * std::basic_istream::sentry inside your definition of operator>>. */ template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __is); #pragma line 856 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/istream" 3 } // namespace #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/istream.tcc" 1 3 // istream classes -*- C++ -*- #pragma empty_line // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 3, or (at your option) // any later version. #pragma empty_line // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #pragma empty_line // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. #pragma empty_line // You should have received a copy of the GNU General Public License and // a copy of the GCC Runtime Library Exception along with this program; // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. #pragma empty_line /** @file bits/istream.tcc * This is an internal header file, included by other library headers. * Do not attempt to use it directly. @headername{istream} */ #pragma empty_line // // ISO C++ 14882: 27.6.1 Input streams // #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/bits/istream.tcc" 3 #pragma empty_line #pragma empty_line #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>::sentry:: sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) { ios_base::iostate __err = ios_base::goodbit; if (__in.good()) { if (__in.tie()) __in.tie()->flush(); if (!__noskip && bool(__in.flags() & ios_base::skipws)) { const __int_type __eof = traits_type::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); #pragma empty_line const __ctype_type& __ct = __check_facet(__in._M_ctype); while (!traits_type::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, traits_type::to_char_type(__c))) __c = __sb->snextc(); #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 195. Should basic_istream::sentry's constructor ever // set eofbit? if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } } #pragma empty_line if (__in.good() && __err == ios_base::goodbit) _M_ok = true; else { __err |= ios_base::failbit; __in.setstate(__err); } } #pragma empty_line template<typename _CharT, typename _Traits> template<typename _ValueT> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: _M_extract(_ValueT& __v) { sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __v); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(short& __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 118. basic_istream uses nonexistent num_get member functions. sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { long __l; const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __l); #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 696. istream::operator>>(int&) broken. if (__l < __gnu_cxx::__numeric_traits<short>::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<short>::__min; } else if (__l > __gnu_cxx::__numeric_traits<short>::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<short>::__max; } else __n = short(__l); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(int& __n) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 118. basic_istream uses nonexistent num_get member functions. sentry __cerb(*this, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { long __l; const __num_get_type& __ng = __check_facet(this->_M_num_get); __ng.get(*this, 0, *this, __err, __l); #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 696. istream::operator>>(int&) broken. if (__l < __gnu_cxx::__numeric_traits<int>::__min) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<int>::__min; } else if (__l > __gnu_cxx::__numeric_traits<int>::__max) { __err |= ios_base::failbit; __n = __gnu_cxx::__numeric_traits<int>::__max; } else __n = int(__l); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: operator>>(__streambuf_type* __sbout) { ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, false); if (__cerb && __sbout) { if (true) { bool __ineof; if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) __err |= ios_base::failbit; if (__ineof) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::failbit); ; } if (false) { this->_M_setstate(ios_base::failbit); } } else if (!__sbout) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: get(void) { const int_type __eof = traits_type::eof(); int_type __c = __eof; _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { __c = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 if (!traits_type::eq_int_type(__c, __eof)) _M_gcount = 1; else __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return __c; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type& __c) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __cb = this->rdbuf()->sbumpc(); // 27.6.1.1 paragraph 3 if (!traits_type::eq_int_type(__cb, traits_type::eof())) { _M_gcount = 1; __c = traits_type::to_char_type(__cb); } else __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); #pragma empty_line while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); ++_M_gcount; __c = __sb->snextc(); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 243. get and getline when sentry reports failure. if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: get(__streambuf_type& __sb, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __this_sb = this->rdbuf(); int_type __c = __this_sb->sgetc(); char_type __c2 = traits_type::to_char_type(__c); #pragma empty_line while (!traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim) && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) { ++_M_gcount; __c = __this_sb->snextc(); __c2 = traits_type::to_char_type(__c); } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: getline(char_type* __s, streamsize __n, char_type __delim) { _M_gcount = 0; ios_base::iostate __err = ios_base::goodbit; sentry __cerb(*this, true); if (__cerb) { if (true) { const int_type __idelim = traits_type::to_int_type(__delim); const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); #pragma empty_line while (_M_gcount + 1 < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __idelim)) { *__s++ = traits_type::to_char_type(__c); __c = __sb->snextc(); ++_M_gcount; } if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else { if (traits_type::eq_int_type(__c, __idelim)) { __sb->sbumpc(); ++_M_gcount; } else __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } // _GLIBCXX_RESOLVE_LIB_DEFECTS // 243. get and getline when sentry reports failure. if (__n > 0) *__s = char_type(); if (!_M_gcount) __err |= ios_base::failbit; if (__err) this->setstate(__err); return *this; } #pragma empty_line // We provide three overloads, since the first two are much simpler // than the general case. Also, the latter two can thus adopt the // same "batchy" strategy used by getline above. template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(void) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); #pragma empty_line if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) __err |= ios_base::eofbit; else _M_gcount = 1; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); #pragma empty_line // N.B. On LFS-enabled platforms streamsize is still 32 bits // wide: if we want to implement the standard mandated behavior // for n == max() (see 27.6.1.3/24) we are at risk of signed // integer overflow: thus these contortions. Also note that, // by definition, when more than 2G chars are actually ignored, // _M_gcount (the return value of gcount, that is) cannot be // really correct, being unavoidably too small. bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max && !traits_type::eq_int_type(__c, __eof)) { _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__min; __large_ignore = true; } else break; } #pragma empty_line if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; #pragma empty_line if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: ignore(streamsize __n, int_type __delim) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb && __n > 0) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); int_type __c = __sb->sgetc(); #pragma empty_line // See comment above. bool __large_ignore = false; while (true) { while (_M_gcount < __n && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { ++_M_gcount; __c = __sb->snextc(); } if (__n == __gnu_cxx::__numeric_traits<streamsize>::__max && !traits_type::eq_int_type(__c, __eof) && !traits_type::eq_int_type(__c, __delim)) { _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__min; __large_ignore = true; } else break; } #pragma empty_line if (__large_ignore) _M_gcount = __gnu_cxx::__numeric_traits<streamsize>::__max; #pragma empty_line if (traits_type::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; else if (traits_type::eq_int_type(__c, __delim)) { if (_M_gcount < __gnu_cxx::__numeric_traits<streamsize>::__max) ++_M_gcount; __sb->sbumpc(); } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> typename basic_istream<_CharT, _Traits>::int_type basic_istream<_CharT, _Traits>:: peek(void) { int_type __c = traits_type::eof(); _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { __c = this->rdbuf()->sgetc(); if (traits_type::eq_int_type(__c, traits_type::eof())) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __c; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: read(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { _M_gcount = this->rdbuf()->sgetn(__s, __n); if (_M_gcount != __n) __err |= (ios_base::eofbit | ios_base::failbit); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> streamsize basic_istream<_CharT, _Traits>:: readsome(char_type* __s, streamsize __n) { _M_gcount = 0; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { // Cannot compare int_type with streamsize generically. const streamsize __num = this->rdbuf()->in_avail(); if (__num > 0) _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); else if (__num == -1) __err |= ios_base::eofbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return _M_gcount; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: putback(char_type __c) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 60. What is a formatted input function? _M_gcount = 0; // Clear eofbit per N3168. this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: unget(void) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // 60. What is a formatted input function? _M_gcount = 0; // Clear eofbit per N3168. this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const int_type __eof = traits_type::eof(); __streambuf_type* __sb = this->rdbuf(); if (!__sb || traits_type::eq_int_type(__sb->sungetc(), __eof)) __err |= ios_base::badbit; } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> int basic_istream<_CharT, _Traits>:: sync(void) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. int __ret = -1; sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { __streambuf_type* __sb = this->rdbuf(); if (__sb) { if (__sb->pubsync() == -1) __err |= ios_base::badbit; else __ret = 0; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return __ret; } #pragma empty_line template<typename _CharT, typename _Traits> typename basic_istream<_CharT, _Traits>::pos_type basic_istream<_CharT, _Traits>:: tellg(void) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. pos_type __ret = pos_type(-1); sentry __cerb(*this, true); if (__cerb) { if (true) { if (!this->fail()) __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in); } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } } return __ret; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(pos_type __pos) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. // Clear eofbit per N3168. this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { // 136. seekp, seekg setting wrong streams? const pos_type __p = this->rdbuf()->pubseekpos(__pos, ios_base::in); #pragma empty_line // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>:: seekg(off_type __off, ios_base::seekdir __dir) { // _GLIBCXX_RESOLVE_LIB_DEFECTS // DR60. Do not change _M_gcount. // Clear eofbit per N3168. this->clear(this->rdstate() & ~ios_base::eofbit); sentry __cerb(*this, true); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { if (!this->fail()) { // 136. seekp, seekg setting wrong streams? const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, ios_base::in); #pragma empty_line // 129. Need error indication from seekp() and seekg() if (__p == pos_type(off_type(-1))) __err |= ios_base::failbit; } } if (false) { this->_M_setstate(ios_base::badbit); ; } if (false) { this->_M_setstate(ios_base::badbit); } if (__err) this->setstate(__err); } return *this; } #pragma empty_line // 27.6.1.2.3 Character extraction templates template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef typename __istream_type::int_type __int_type; #pragma empty_line typename __istream_type::sentry __cerb(__in, false); if (__cerb) { ios_base::iostate __err = ios_base::goodbit; if (true) { const __int_type __cb = __in.rdbuf()->sbumpc(); if (!_Traits::eq_int_type(__cb, _Traits::eof())) __c = _Traits::to_char_type(__cb); else __err |= (ios_base::eofbit | ios_base::failbit); } if (false) { __in._M_setstate(ios_base::badbit); ; } if (false) { __in._M_setstate(ios_base::badbit); } if (__err) __in.setstate(__err); } return __in; } #pragma empty_line template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef typename _Traits::int_type int_type; typedef _CharT char_type; typedef ctype<_CharT> __ctype_type; #pragma empty_line streamsize __extracted = 0; ios_base::iostate __err = ios_base::goodbit; typename __istream_type::sentry __cerb(__in, false); if (__cerb) { if (true) { // Figure out how many characters to extract. streamsize __num = __in.width(); if (__num <= 0) __num = __gnu_cxx::__numeric_traits<streamsize>::__max; #pragma empty_line const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); #pragma empty_line const int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); int_type __c = __sb->sgetc(); #pragma empty_line while (__extracted < __num - 1 && !_Traits::eq_int_type(__c, __eof) && !__ct.is(ctype_base::space, _Traits::to_char_type(__c))) { *__s++ = _Traits::to_char_type(__c); ++__extracted; __c = __sb->snextc(); } if (_Traits::eq_int_type(__c, __eof)) __err |= ios_base::eofbit; #pragma empty_line // _GLIBCXX_RESOLVE_LIB_DEFECTS // 68. Extractors for char* should store null at end *__s = char_type(); __in.width(0); } if (false) { __in._M_setstate(ios_base::badbit); ; } if (false) { __in._M_setstate(ios_base::badbit); } } if (!__extracted) __err |= ios_base::failbit; if (__err) __in.setstate(__err); return __in; } #pragma empty_line // 27.6.1.4 Standard basic_istream manipulators template<typename _CharT, typename _Traits> basic_istream<_CharT, _Traits>& ws(basic_istream<_CharT, _Traits>& __in) { typedef basic_istream<_CharT, _Traits> __istream_type; typedef basic_streambuf<_CharT, _Traits> __streambuf_type; typedef typename __istream_type::int_type __int_type; typedef ctype<_CharT> __ctype_type; #pragma empty_line const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); const __int_type __eof = _Traits::eof(); __streambuf_type* __sb = __in.rdbuf(); __int_type __c = __sb->sgetc(); #pragma empty_line while (!_Traits::eq_int_type(__c, __eof) && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) __c = __sb->snextc(); #pragma empty_line if (_Traits::eq_int_type(__c, __eof)) __in.setstate(ios_base::eofbit); return __in; } #pragma empty_line // Inhibit implicit instantiations for required instantiations, // which are defined via explicit instantiations elsewhere. #pragma empty_line extern template class basic_istream<char>; extern template istream& ws(istream&); extern template istream& operator>>(istream&, char&); extern template istream& operator>>(istream&, char*); extern template istream& operator>>(istream&, unsigned char&); extern template istream& operator>>(istream&, signed char&); extern template istream& operator>>(istream&, unsigned char*); extern template istream& operator>>(istream&, signed char*); #pragma empty_line extern template istream& istream::_M_extract(unsigned short&); extern template istream& istream::_M_extract(unsigned int&); extern template istream& istream::_M_extract(long&); extern template istream& istream::_M_extract(unsigned long&); extern template istream& istream::_M_extract(bool&); #pragma empty_line extern template istream& istream::_M_extract(long long&); extern template istream& istream::_M_extract(unsigned long long&); #pragma empty_line extern template istream& istream::_M_extract(float&); extern template istream& istream::_M_extract(double&); extern template istream& istream::_M_extract(long double&); extern template istream& istream::_M_extract(void*&); #pragma empty_line extern template class basic_iostream<char>; #pragma empty_line #pragma empty_line extern template class basic_istream<wchar_t>; extern template wistream& ws(wistream&); extern template wistream& operator>>(wistream&, wchar_t&); extern template wistream& operator>>(wistream&, wchar_t*); #pragma empty_line extern template wistream& wistream::_M_extract(unsigned short&); extern template wistream& wistream::_M_extract(unsigned int&); extern template wistream& wistream::_M_extract(long&); extern template wistream& wistream::_M_extract(unsigned long&); extern template wistream& wistream::_M_extract(bool&); #pragma empty_line extern template wistream& wistream::_M_extract(long long&); extern template wistream& wistream::_M_extract(unsigned long long&); #pragma empty_line extern template wistream& wistream::_M_extract(float&); extern template wistream& wistream::_M_extract(double&); extern template wistream& wistream::_M_extract(long double&); extern template wistream& wistream::_M_extract(void*&); #pragma empty_line extern template class basic_iostream<wchar_t>; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line } // namespace std #pragma line 859 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/istream" 2 3 #pragma line 41 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/gcc/lib/gcc/x86_64-unknown-linux-gnu/4.6.3/../../../../include/c++/4.6.3/iostream" 2 3 #pragma empty_line namespace std __attribute__ ((__visibility__ ("default"))) { #pragma empty_line #pragma empty_line /** * @name Standard Stream Objects * * The &lt;iostream&gt; header declares the eight <em>standard stream * objects</em>. For other declarations, see * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html * and the @link iosfwd I/O forward declarations @endlink * * They are required by default to cooperate with the global C * library's @c FILE streams, and to be available during program * startup and termination. For more information, see the HOWTO * linked to above. */ //@{ extern istream cin; /// Linked to standard input extern ostream cout; /// Linked to standard output extern ostream cerr; /// Linked to standard error (unbuffered) extern ostream clog; /// Linked to standard error (buffered) #pragma empty_line #pragma empty_line extern wistream wcin; /// Linked to standard input extern wostream wcout; /// Linked to standard output extern wostream wcerr; /// Linked to standard error (unbuffered) extern wostream wclog; /// Linked to standard error (buffered) #pragma empty_line //@} #pragma empty_line // For construction of filebuffers for cout, cin, cerr, clog et. al. static ios_base::Init __ioinit; #pragma empty_line #pragma empty_line } // namespace #pragma line 69 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" 2 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/limits.h" 1 3 /*===---- limits.h - Standard header for integer sizes --------------------===*\ * * Copyright (c) 2009 Chris Lattner * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * \*===----------------------------------------------------------------------===*/ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The system's limits.h may, in turn, try to #include_next GCC's limits.h. Avert this #include_next madness. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* System headers include a number of constants from POSIX in <limits.h>. Include it if we're hosted. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/limits.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define the correct value. */ #pragma empty_line #pragma empty_line #pragma empty_line /* If we are not using GNU CC we have to define all the symbols ourself. Otherwise use gcc's definitions (see below). */ #pragma line 116 "/usr/include/limits.h" 3 4 /* Get the compiler's limits.h, which defines almost all the ISO constants. #pragma empty_line We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The <limits.h> files in some gcc versions don't define LLONG_MIN, LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for ages are available. */ #pragma line 142 "/usr/include/limits.h" 3 4 /* POSIX adds things to <limits.h>. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> * * Never include this file directly; use <limits.h> instead. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* These are the standard-mandated minimum values. */ #pragma empty_line /* Minimum number of operations in one list I/O call. */ #pragma empty_line #pragma empty_line /* Minimal number of outstanding asynchronous I/O operations. */ #pragma empty_line #pragma empty_line /* Maximum length of arguments to `execve', including environment. */ #pragma empty_line #pragma empty_line /* Maximum simultaneous processes per real user ID. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Minimal number of timer expiration overruns. */ #pragma empty_line #pragma empty_line /* Maximum length of a host name (not including the terminating null) as returned from the GETHOSTNAME function. */ #pragma empty_line #pragma empty_line /* Maximum link count of a file. */ #pragma empty_line #pragma empty_line /* Maximum length of login name. */ #pragma empty_line #pragma empty_line /* Number of bytes in a terminal canonical input queue. */ #pragma empty_line #pragma empty_line /* Number of bytes for which space will be available in a terminal input queue. */ #pragma empty_line #pragma empty_line /* Maximum number of message queues open for a process. */ #pragma empty_line #pragma empty_line /* Maximum number of supported message priorities. */ #pragma empty_line #pragma empty_line /* Number of bytes in a filename. */ #pragma empty_line #pragma empty_line /* Number of simultaneous supplementary group IDs per process. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Number of files one process can have open at once. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Number of descriptors that a process may examine with `pselect' or `select'. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Number of bytes in a pathname. */ #pragma empty_line #pragma empty_line /* Number of bytes than can be written atomically to a pipe. */ #pragma empty_line #pragma empty_line /* The number of repeated occurrences of a BRE permitted by the REGEXEC and REGCOMP functions when using the interval notation. */ #pragma empty_line #pragma empty_line /* Minimal number of realtime signals reserved for the application. */ #pragma empty_line #pragma empty_line /* Number of semaphores a process can have. */ #pragma empty_line #pragma empty_line /* Maximal value of a semaphore. */ #pragma empty_line #pragma empty_line /* Number of pending realtime signals. */ #pragma empty_line #pragma empty_line /* Largest value of a `ssize_t'. */ #pragma empty_line #pragma empty_line /* Number of streams a process can have open at once. */ #pragma empty_line #pragma empty_line /* The number of bytes in a symbolic link. */ #pragma empty_line #pragma empty_line /* The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop. */ #pragma empty_line #pragma empty_line /* Number of timer for a process. */ #pragma empty_line #pragma empty_line /* Maximum number of characters in a tty name. */ #pragma empty_line #pragma empty_line /* Maximum length of a timezone name (element of `tzname'). */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Maximum number of connections that can be queued on a socket. */ #pragma empty_line #pragma empty_line /* Maximum number of bytes that can be buffered on a socket for send or receive. */ #pragma empty_line #pragma empty_line /* Maximum number of elements in an `iovec' array. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Maximum clock resolution in nanoseconds. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Get the implementation-specific values for the above. */ #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 1 3 4 /* Minimum guaranteed maximum values for system limits. Linux version. Copyright (C) 1993-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A similar thing is true for OPEN_MAX: the limit can be changed at runtime and therefore the macro must not be defined. Remove this after including the header if necessary. */ #pragma line 37 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 3 4 /* The kernel sources contain a file with all the needed information. */ #pragma empty_line #pragma line 1 "/usr/include/linux/limits.h" 1 3 4 #pragma line 39 "/usr/include/x86_64-linux-gnu/bits/local_lim.h" 2 3 4 #pragma empty_line /* Have to remove NR_OPEN? */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Have to remove LINK_MAX? */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Have to remove OPEN_MAX? */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Have to remove ARG_MAX? */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The number of data keys per process. */ #pragma empty_line /* This is the value this implementation supports. */ #pragma empty_line #pragma empty_line /* Controlling the iterations of destructors for thread-specific data. */ #pragma empty_line /* Number of iterations this implementation does. */ #pragma empty_line #pragma empty_line /* The number of threads per process. */ #pragma empty_line /* We have no predefined limit on the number of threads. */ #pragma empty_line #pragma empty_line /* Maximum amount by which a process can descrease its asynchronous I/O priority level. */ #pragma empty_line #pragma empty_line /* Minimum size for a thread. We are free to choose a reasonable value. */ #pragma empty_line #pragma empty_line /* Maximum number of timer expiration overruns. */ #pragma empty_line #pragma empty_line /* Maximum tty name length. */ #pragma empty_line #pragma empty_line /* Maximum login name length. This is arbitrary. */ #pragma empty_line #pragma empty_line /* Maximum host name length. */ #pragma empty_line #pragma empty_line /* Maximum message queue priority level. */ #pragma empty_line #pragma empty_line /* Maximum value the semaphore can have. */ #pragma line 161 "/usr/include/x86_64-linux-gnu/bits/posix1_lim.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This value is a guaranteed minimum maximum. The current maximum can be got from `sysconf'. */ #pragma line 144 "/usr/include/limits.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * Never include this file directly; include <limits.h> instead. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ #pragma empty_line #pragma empty_line /* The maximum number of elements allowed in an array by the `bc' utility. */ #pragma empty_line #pragma empty_line /* The maximum `scale' value allowed by the `bc' utility. */ #pragma empty_line #pragma empty_line /* The maximum length of a string constant accepted by the `bc' utility. */ #pragma empty_line #pragma empty_line /* The maximum number of weights that can be assigned to an entry of the LC_COLLATE `order' keyword in the locale definition file. */ #pragma empty_line #pragma empty_line /* The maximum number of expressions that can be nested within parentheses by the `expr' utility. */ #pragma empty_line #pragma empty_line /* The maximum length, in bytes, of an input line. */ #pragma empty_line #pragma empty_line /* The maximum number of repeated occurrences of a regular expression permitted when using the interval notation `\{M,N\}'. */ #pragma empty_line #pragma empty_line /* The maximum number of bytes in a character class name. We have no fixed limit, 2048 is a high number. */ #pragma empty_line #pragma empty_line #pragma empty_line /* These values are implementation-specific, and may vary within the implementation. Their precise values can be obtained from sysconf. */ #pragma line 87 "/usr/include/x86_64-linux-gnu/bits/posix2_lim.h" 3 4 /* This value is defined like this in regex.h. */ #pragma line 148 "/usr/include/limits.h" 2 3 4 #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 1 3 4 /* Copyright (C) 1996-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * Never include this file directly; use <limits.h> instead. */ #pragma empty_line /* Additional definitions from X/Open Portability Guide, Issue 4, Version 2 System Interfaces and Headers, 4.16 <limits.h> #pragma empty_line Please note only the values which are not greater than the minimum stated in the standard document are listed. The `sysconf' functions should be used to obtain the actual value. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 /* Copyright (C) 1994-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma line 34 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 2 3 4 #pragma empty_line /* We do not provide fixed values for #pragma empty_line ARG_MAX Maximum length of argument to the `exec' function including environment data. #pragma empty_line ATEXIT_MAX Maximum number of functions that may be registered with `atexit'. #pragma empty_line CHILD_MAX Maximum number of simultaneous processes per real user ID. #pragma empty_line OPEN_MAX Maximum number of files that one process can have open at anyone time. #pragma empty_line PAGESIZE PAGE_SIZE Size of bytes of a page. #pragma empty_line PASS_MAX Maximum number of significant bytes in a password. #pragma empty_line We only provide a fixed limit for #pragma empty_line IOV_MAX Maximum number of `iovec' structures that one process has available for use with `readv' or writev'. #pragma empty_line if this is indeed fixed by the underlying system. */ #pragma empty_line #pragma empty_line /* Maximum number of `iovec' structures that one process has available for use with `readv' or writev'. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Maximum value of `digit' in calls to the `printf' and `scanf' functions. We have no limit, so return a reasonable value. */ #pragma empty_line #pragma empty_line /* Maximum number of bytes in a `LANG' name. We have no limit. */ #pragma empty_line #pragma empty_line /* Maximum message number. We have no limit. */ #pragma empty_line #pragma empty_line /* Maximum number of bytes in N-to-1 collation mapping. We have no limit. */ #pragma empty_line #pragma empty_line /* Maximum set number. We have no limit. */ #pragma empty_line #pragma empty_line /* Maximum number of bytes in a message. We have no limit. */ #pragma empty_line #pragma empty_line /* Default process priority. */ #pragma empty_line #pragma empty_line #pragma empty_line /* Number of bits in a word of type `int'. */ #pragma line 119 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 /* Number of bits in a word of type `long int'. */ #pragma line 131 "/usr/include/x86_64-linux-gnu/bits/xopen_lim.h" 3 4 /* Safe assumption. */ #pragma line 152 "/usr/include/limits.h" 2 3 4 #pragma line 39 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/limits.h" 2 3 #pragma empty_line #pragma empty_line /* Many system headers try to "help us out" by defining these. No really, we know how big each datatype is. */ #pragma line 60 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/limits.h" 3 /* C90/99 5.2.4.2.1 */ #pragma line 90 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/limits.h" 3 /* C99 5.2.4.2.1: Added long long. */ #pragma line 102 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/limits.h" 3 /* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad that we don't have something like #pragma poison that could be used to deprecate a macro - the code should just use LLONG_MAX and friends. */ #pragma line 74 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" 2 #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* for safety*/ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* for safety*/ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /*for safety*/ #pragma line 111 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" typedef unsigned long long ap_ulong; typedef signed long long ap_slong; #pragma line 129 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" /*support SC mode*/ #pragma line 147 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" extern "C" void _ssdm_string2bits(...); //#ifdef C99STRING #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Basic AP data types. ---------------------------------------------------------------- */ template<int _AP_N, bool _AP_S> struct ssdm_int; #pragma line 184 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_dt.def" 1 #pragma empty_line #pragma empty_line template<> struct ssdm_int<1 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<2 + 1024 * 0,true> { int V __attribute__ ((bitwidth(2 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<2 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<2 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(2 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<2 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<3 + 1024 * 0,true> { int V __attribute__ ((bitwidth(3 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<3 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<3 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(3 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<3 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<4 + 1024 * 0,true> { int V __attribute__ ((bitwidth(4 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<4 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<4 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(4 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<4 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<5 + 1024 * 0,true> { int V __attribute__ ((bitwidth(5 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<5 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<5 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(5 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<5 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<6 + 1024 * 0,true> { int V __attribute__ ((bitwidth(6 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<6 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<6 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(6 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<6 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<7 + 1024 * 0,true> { int V __attribute__ ((bitwidth(7 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<7 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<7 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(7 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<7 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<8 + 1024 * 0,true> { int V __attribute__ ((bitwidth(8 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<8 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<8 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(8 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<8 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<9 + 1024 * 0,true> { int V __attribute__ ((bitwidth(9 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<9 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<9 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(9 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<9 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<10 + 1024 * 0,true> { int V __attribute__ ((bitwidth(10 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<10 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<10 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(10 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<10 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<11 + 1024 * 0,true> { int V __attribute__ ((bitwidth(11 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<11 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<11 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(11 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<11 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<12 + 1024 * 0,true> { int V __attribute__ ((bitwidth(12 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<12 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<12 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(12 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<12 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<13 + 1024 * 0,true> { int V __attribute__ ((bitwidth(13 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<13 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<13 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(13 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<13 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<14 + 1024 * 0,true> { int V __attribute__ ((bitwidth(14 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<14 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<14 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(14 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<14 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<15 + 1024 * 0,true> { int V __attribute__ ((bitwidth(15 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<15 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<15 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(15 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<15 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<16 + 1024 * 0,true> { int V __attribute__ ((bitwidth(16 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<16 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<16 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(16 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<16 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<17 + 1024 * 0,true> { int V __attribute__ ((bitwidth(17 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<17 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<17 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(17 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<17 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<18 + 1024 * 0,true> { int V __attribute__ ((bitwidth(18 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<18 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<18 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(18 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<18 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<19 + 1024 * 0,true> { int V __attribute__ ((bitwidth(19 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<19 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<19 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(19 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<19 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<20 + 1024 * 0,true> { int V __attribute__ ((bitwidth(20 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<20 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<20 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(20 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<20 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<21 + 1024 * 0,true> { int V __attribute__ ((bitwidth(21 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<21 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<21 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(21 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<21 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<22 + 1024 * 0,true> { int V __attribute__ ((bitwidth(22 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<22 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<22 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(22 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<22 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<23 + 1024 * 0,true> { int V __attribute__ ((bitwidth(23 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<23 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<23 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(23 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<23 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<24 + 1024 * 0,true> { int V __attribute__ ((bitwidth(24 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<24 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<24 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(24 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<24 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<25 + 1024 * 0,true> { int V __attribute__ ((bitwidth(25 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<25 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<25 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(25 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<25 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<26 + 1024 * 0,true> { int V __attribute__ ((bitwidth(26 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<26 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<26 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(26 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<26 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<27 + 1024 * 0,true> { int V __attribute__ ((bitwidth(27 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<27 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<27 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(27 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<27 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<28 + 1024 * 0,true> { int V __attribute__ ((bitwidth(28 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<28 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<28 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(28 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<28 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<29 + 1024 * 0,true> { int V __attribute__ ((bitwidth(29 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<29 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<29 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(29 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<29 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<30 + 1024 * 0,true> { int V __attribute__ ((bitwidth(30 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<30 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<30 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(30 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<30 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<31 + 1024 * 0,true> { int V __attribute__ ((bitwidth(31 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<31 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<31 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(31 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<31 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<32 + 1024 * 0,true> { int V __attribute__ ((bitwidth(32 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<32 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<32 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(32 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<32 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<33 + 1024 * 0,true> { int V __attribute__ ((bitwidth(33 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<33 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<33 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(33 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<33 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<34 + 1024 * 0,true> { int V __attribute__ ((bitwidth(34 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<34 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<34 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(34 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<34 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<35 + 1024 * 0,true> { int V __attribute__ ((bitwidth(35 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<35 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<35 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(35 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<35 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<36 + 1024 * 0,true> { int V __attribute__ ((bitwidth(36 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<36 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<36 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(36 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<36 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<37 + 1024 * 0,true> { int V __attribute__ ((bitwidth(37 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<37 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<37 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(37 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<37 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<38 + 1024 * 0,true> { int V __attribute__ ((bitwidth(38 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<38 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<38 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(38 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<38 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<39 + 1024 * 0,true> { int V __attribute__ ((bitwidth(39 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<39 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<39 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(39 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<39 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<40 + 1024 * 0,true> { int V __attribute__ ((bitwidth(40 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<40 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<40 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(40 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<40 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<41 + 1024 * 0,true> { int V __attribute__ ((bitwidth(41 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<41 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<41 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(41 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<41 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<42 + 1024 * 0,true> { int V __attribute__ ((bitwidth(42 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<42 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<42 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(42 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<42 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<43 + 1024 * 0,true> { int V __attribute__ ((bitwidth(43 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<43 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<43 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(43 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<43 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<44 + 1024 * 0,true> { int V __attribute__ ((bitwidth(44 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<44 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<44 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(44 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<44 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<45 + 1024 * 0,true> { int V __attribute__ ((bitwidth(45 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<45 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<45 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(45 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<45 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<46 + 1024 * 0,true> { int V __attribute__ ((bitwidth(46 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<46 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<46 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(46 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<46 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<47 + 1024 * 0,true> { int V __attribute__ ((bitwidth(47 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<47 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<47 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(47 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<47 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<48 + 1024 * 0,true> { int V __attribute__ ((bitwidth(48 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<48 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<48 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(48 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<48 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<49 + 1024 * 0,true> { int V __attribute__ ((bitwidth(49 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<49 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<49 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(49 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<49 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<50 + 1024 * 0,true> { int V __attribute__ ((bitwidth(50 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<50 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<50 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(50 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<50 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<51 + 1024 * 0,true> { int V __attribute__ ((bitwidth(51 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<51 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<51 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(51 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<51 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<52 + 1024 * 0,true> { int V __attribute__ ((bitwidth(52 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<52 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<52 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(52 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<52 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<53 + 1024 * 0,true> { int V __attribute__ ((bitwidth(53 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<53 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<53 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(53 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<53 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<54 + 1024 * 0,true> { int V __attribute__ ((bitwidth(54 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<54 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<54 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(54 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<54 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<55 + 1024 * 0,true> { int V __attribute__ ((bitwidth(55 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<55 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<55 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(55 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<55 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<56 + 1024 * 0,true> { int V __attribute__ ((bitwidth(56 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<56 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<56 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(56 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<56 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<57 + 1024 * 0,true> { int V __attribute__ ((bitwidth(57 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<57 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<57 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(57 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<57 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<58 + 1024 * 0,true> { int V __attribute__ ((bitwidth(58 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<58 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<58 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(58 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<58 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<59 + 1024 * 0,true> { int V __attribute__ ((bitwidth(59 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<59 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<59 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(59 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<59 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<60 + 1024 * 0,true> { int V __attribute__ ((bitwidth(60 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<60 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<60 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(60 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<60 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<61 + 1024 * 0,true> { int V __attribute__ ((bitwidth(61 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<61 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<61 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(61 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<61 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<62 + 1024 * 0,true> { int V __attribute__ ((bitwidth(62 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<62 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<62 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(62 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<62 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<63 + 1024 * 0,true> { int V __attribute__ ((bitwidth(63 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<63 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<63 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(63 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<63 + 1024 * 0 , false>() { }; }; #pragma empty_line #pragma empty_line template<> struct ssdm_int<64 + 1024 * 0,true> { int V __attribute__ ((bitwidth(64 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<64 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<64 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(64 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<64 + 1024 * 0 , false>() { }; }; #pragma empty_line #pragma empty_line /*#if AUTOPILOT_VERSION >= 1 */ #pragma empty_line template<> struct ssdm_int<65 + 1024 * 0,true> { int V __attribute__ ((bitwidth(65 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<65 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<65 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(65 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<65 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<66 + 1024 * 0,true> { int V __attribute__ ((bitwidth(66 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<66 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<66 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(66 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<66 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<67 + 1024 * 0,true> { int V __attribute__ ((bitwidth(67 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<67 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<67 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(67 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<67 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<68 + 1024 * 0,true> { int V __attribute__ ((bitwidth(68 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<68 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<68 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(68 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<68 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<69 + 1024 * 0,true> { int V __attribute__ ((bitwidth(69 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<69 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<69 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(69 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<69 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<70 + 1024 * 0,true> { int V __attribute__ ((bitwidth(70 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<70 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<70 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(70 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<70 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<71 + 1024 * 0,true> { int V __attribute__ ((bitwidth(71 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<71 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<71 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(71 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<71 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<72 + 1024 * 0,true> { int V __attribute__ ((bitwidth(72 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<72 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<72 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(72 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<72 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<73 + 1024 * 0,true> { int V __attribute__ ((bitwidth(73 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<73 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<73 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(73 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<73 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<74 + 1024 * 0,true> { int V __attribute__ ((bitwidth(74 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<74 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<74 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(74 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<74 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<75 + 1024 * 0,true> { int V __attribute__ ((bitwidth(75 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<75 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<75 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(75 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<75 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<76 + 1024 * 0,true> { int V __attribute__ ((bitwidth(76 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<76 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<76 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(76 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<76 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<77 + 1024 * 0,true> { int V __attribute__ ((bitwidth(77 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<77 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<77 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(77 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<77 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<78 + 1024 * 0,true> { int V __attribute__ ((bitwidth(78 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<78 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<78 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(78 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<78 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<79 + 1024 * 0,true> { int V __attribute__ ((bitwidth(79 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<79 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<79 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(79 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<79 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<80 + 1024 * 0,true> { int V __attribute__ ((bitwidth(80 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<80 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<80 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(80 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<80 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<81 + 1024 * 0,true> { int V __attribute__ ((bitwidth(81 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<81 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<81 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(81 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<81 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<82 + 1024 * 0,true> { int V __attribute__ ((bitwidth(82 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<82 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<82 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(82 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<82 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<83 + 1024 * 0,true> { int V __attribute__ ((bitwidth(83 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<83 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<83 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(83 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<83 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<84 + 1024 * 0,true> { int V __attribute__ ((bitwidth(84 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<84 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<84 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(84 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<84 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<85 + 1024 * 0,true> { int V __attribute__ ((bitwidth(85 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<85 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<85 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(85 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<85 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<86 + 1024 * 0,true> { int V __attribute__ ((bitwidth(86 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<86 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<86 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(86 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<86 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<87 + 1024 * 0,true> { int V __attribute__ ((bitwidth(87 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<87 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<87 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(87 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<87 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<88 + 1024 * 0,true> { int V __attribute__ ((bitwidth(88 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<88 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<88 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(88 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<88 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<89 + 1024 * 0,true> { int V __attribute__ ((bitwidth(89 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<89 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<89 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(89 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<89 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<90 + 1024 * 0,true> { int V __attribute__ ((bitwidth(90 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<90 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<90 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(90 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<90 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<91 + 1024 * 0,true> { int V __attribute__ ((bitwidth(91 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<91 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<91 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(91 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<91 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<92 + 1024 * 0,true> { int V __attribute__ ((bitwidth(92 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<92 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<92 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(92 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<92 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<93 + 1024 * 0,true> { int V __attribute__ ((bitwidth(93 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<93 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<93 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(93 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<93 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<94 + 1024 * 0,true> { int V __attribute__ ((bitwidth(94 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<94 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<94 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(94 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<94 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<95 + 1024 * 0,true> { int V __attribute__ ((bitwidth(95 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<95 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<95 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(95 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<95 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<96 + 1024 * 0,true> { int V __attribute__ ((bitwidth(96 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<96 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<96 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(96 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<96 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<97 + 1024 * 0,true> { int V __attribute__ ((bitwidth(97 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<97 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<97 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(97 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<97 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<98 + 1024 * 0,true> { int V __attribute__ ((bitwidth(98 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<98 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<98 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(98 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<98 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<99 + 1024 * 0,true> { int V __attribute__ ((bitwidth(99 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<99 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<99 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(99 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<99 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<100 + 1024 * 0,true> { int V __attribute__ ((bitwidth(100 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<100 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<100 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(100 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<100 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<101 + 1024 * 0,true> { int V __attribute__ ((bitwidth(101 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<101 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<101 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(101 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<101 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<102 + 1024 * 0,true> { int V __attribute__ ((bitwidth(102 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<102 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<102 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(102 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<102 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<103 + 1024 * 0,true> { int V __attribute__ ((bitwidth(103 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<103 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<103 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(103 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<103 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<104 + 1024 * 0,true> { int V __attribute__ ((bitwidth(104 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<104 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<104 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(104 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<104 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<105 + 1024 * 0,true> { int V __attribute__ ((bitwidth(105 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<105 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<105 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(105 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<105 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<106 + 1024 * 0,true> { int V __attribute__ ((bitwidth(106 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<106 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<106 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(106 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<106 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<107 + 1024 * 0,true> { int V __attribute__ ((bitwidth(107 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<107 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<107 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(107 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<107 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<108 + 1024 * 0,true> { int V __attribute__ ((bitwidth(108 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<108 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<108 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(108 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<108 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<109 + 1024 * 0,true> { int V __attribute__ ((bitwidth(109 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<109 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<109 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(109 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<109 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<110 + 1024 * 0,true> { int V __attribute__ ((bitwidth(110 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<110 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<110 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(110 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<110 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<111 + 1024 * 0,true> { int V __attribute__ ((bitwidth(111 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<111 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<111 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(111 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<111 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<112 + 1024 * 0,true> { int V __attribute__ ((bitwidth(112 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<112 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<112 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(112 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<112 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<113 + 1024 * 0,true> { int V __attribute__ ((bitwidth(113 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<113 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<113 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(113 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<113 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<114 + 1024 * 0,true> { int V __attribute__ ((bitwidth(114 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<114 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<114 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(114 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<114 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<115 + 1024 * 0,true> { int V __attribute__ ((bitwidth(115 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<115 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<115 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(115 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<115 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<116 + 1024 * 0,true> { int V __attribute__ ((bitwidth(116 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<116 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<116 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(116 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<116 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<117 + 1024 * 0,true> { int V __attribute__ ((bitwidth(117 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<117 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<117 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(117 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<117 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<118 + 1024 * 0,true> { int V __attribute__ ((bitwidth(118 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<118 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<118 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(118 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<118 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<119 + 1024 * 0,true> { int V __attribute__ ((bitwidth(119 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<119 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<119 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(119 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<119 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<120 + 1024 * 0,true> { int V __attribute__ ((bitwidth(120 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<120 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<120 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(120 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<120 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<121 + 1024 * 0,true> { int V __attribute__ ((bitwidth(121 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<121 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<121 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(121 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<121 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<122 + 1024 * 0,true> { int V __attribute__ ((bitwidth(122 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<122 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<122 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(122 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<122 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<123 + 1024 * 0,true> { int V __attribute__ ((bitwidth(123 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<123 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<123 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(123 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<123 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<124 + 1024 * 0,true> { int V __attribute__ ((bitwidth(124 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<124 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<124 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(124 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<124 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<125 + 1024 * 0,true> { int V __attribute__ ((bitwidth(125 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<125 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<125 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(125 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<125 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<126 + 1024 * 0,true> { int V __attribute__ ((bitwidth(126 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<126 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<126 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(126 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<126 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<127 + 1024 * 0,true> { int V __attribute__ ((bitwidth(127 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<127 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<127 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(127 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<127 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<128 + 1024 * 0,true> { int V __attribute__ ((bitwidth(128 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<128 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<128 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(128 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<128 + 1024 * 0 , false>() { }; }; #pragma empty_line /*#endif*/ #pragma empty_line #pragma empty_line /*#ifdef EXTENDED_GCC*/ #pragma empty_line template<> struct ssdm_int<129 + 1024 * 0,true> { int V __attribute__ ((bitwidth(129 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<129 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<129 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(129 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<129 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<130 + 1024 * 0,true> { int V __attribute__ ((bitwidth(130 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<130 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<130 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(130 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<130 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<131 + 1024 * 0,true> { int V __attribute__ ((bitwidth(131 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<131 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<131 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(131 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<131 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<132 + 1024 * 0,true> { int V __attribute__ ((bitwidth(132 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<132 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<132 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(132 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<132 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<133 + 1024 * 0,true> { int V __attribute__ ((bitwidth(133 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<133 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<133 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(133 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<133 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<134 + 1024 * 0,true> { int V __attribute__ ((bitwidth(134 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<134 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<134 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(134 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<134 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<135 + 1024 * 0,true> { int V __attribute__ ((bitwidth(135 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<135 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<135 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(135 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<135 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<136 + 1024 * 0,true> { int V __attribute__ ((bitwidth(136 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<136 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<136 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(136 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<136 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<137 + 1024 * 0,true> { int V __attribute__ ((bitwidth(137 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<137 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<137 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(137 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<137 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<138 + 1024 * 0,true> { int V __attribute__ ((bitwidth(138 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<138 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<138 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(138 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<138 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<139 + 1024 * 0,true> { int V __attribute__ ((bitwidth(139 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<139 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<139 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(139 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<139 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<140 + 1024 * 0,true> { int V __attribute__ ((bitwidth(140 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<140 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<140 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(140 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<140 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<141 + 1024 * 0,true> { int V __attribute__ ((bitwidth(141 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<141 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<141 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(141 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<141 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<142 + 1024 * 0,true> { int V __attribute__ ((bitwidth(142 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<142 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<142 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(142 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<142 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<143 + 1024 * 0,true> { int V __attribute__ ((bitwidth(143 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<143 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<143 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(143 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<143 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<144 + 1024 * 0,true> { int V __attribute__ ((bitwidth(144 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<144 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<144 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(144 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<144 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<145 + 1024 * 0,true> { int V __attribute__ ((bitwidth(145 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<145 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<145 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(145 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<145 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<146 + 1024 * 0,true> { int V __attribute__ ((bitwidth(146 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<146 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<146 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(146 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<146 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<147 + 1024 * 0,true> { int V __attribute__ ((bitwidth(147 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<147 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<147 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(147 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<147 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<148 + 1024 * 0,true> { int V __attribute__ ((bitwidth(148 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<148 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<148 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(148 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<148 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<149 + 1024 * 0,true> { int V __attribute__ ((bitwidth(149 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<149 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<149 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(149 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<149 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<150 + 1024 * 0,true> { int V __attribute__ ((bitwidth(150 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<150 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<150 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(150 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<150 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<151 + 1024 * 0,true> { int V __attribute__ ((bitwidth(151 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<151 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<151 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(151 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<151 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<152 + 1024 * 0,true> { int V __attribute__ ((bitwidth(152 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<152 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<152 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(152 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<152 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<153 + 1024 * 0,true> { int V __attribute__ ((bitwidth(153 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<153 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<153 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(153 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<153 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<154 + 1024 * 0,true> { int V __attribute__ ((bitwidth(154 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<154 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<154 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(154 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<154 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<155 + 1024 * 0,true> { int V __attribute__ ((bitwidth(155 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<155 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<155 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(155 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<155 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<156 + 1024 * 0,true> { int V __attribute__ ((bitwidth(156 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<156 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<156 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(156 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<156 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<157 + 1024 * 0,true> { int V __attribute__ ((bitwidth(157 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<157 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<157 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(157 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<157 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<158 + 1024 * 0,true> { int V __attribute__ ((bitwidth(158 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<158 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<158 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(158 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<158 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<159 + 1024 * 0,true> { int V __attribute__ ((bitwidth(159 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<159 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<159 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(159 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<159 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<160 + 1024 * 0,true> { int V __attribute__ ((bitwidth(160 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<160 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<160 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(160 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<160 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<161 + 1024 * 0,true> { int V __attribute__ ((bitwidth(161 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<161 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<161 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(161 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<161 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<162 + 1024 * 0,true> { int V __attribute__ ((bitwidth(162 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<162 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<162 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(162 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<162 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<163 + 1024 * 0,true> { int V __attribute__ ((bitwidth(163 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<163 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<163 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(163 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<163 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<164 + 1024 * 0,true> { int V __attribute__ ((bitwidth(164 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<164 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<164 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(164 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<164 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<165 + 1024 * 0,true> { int V __attribute__ ((bitwidth(165 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<165 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<165 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(165 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<165 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<166 + 1024 * 0,true> { int V __attribute__ ((bitwidth(166 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<166 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<166 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(166 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<166 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<167 + 1024 * 0,true> { int V __attribute__ ((bitwidth(167 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<167 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<167 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(167 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<167 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<168 + 1024 * 0,true> { int V __attribute__ ((bitwidth(168 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<168 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<168 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(168 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<168 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<169 + 1024 * 0,true> { int V __attribute__ ((bitwidth(169 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<169 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<169 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(169 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<169 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<170 + 1024 * 0,true> { int V __attribute__ ((bitwidth(170 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<170 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<170 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(170 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<170 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<171 + 1024 * 0,true> { int V __attribute__ ((bitwidth(171 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<171 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<171 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(171 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<171 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<172 + 1024 * 0,true> { int V __attribute__ ((bitwidth(172 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<172 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<172 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(172 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<172 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<173 + 1024 * 0,true> { int V __attribute__ ((bitwidth(173 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<173 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<173 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(173 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<173 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<174 + 1024 * 0,true> { int V __attribute__ ((bitwidth(174 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<174 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<174 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(174 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<174 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<175 + 1024 * 0,true> { int V __attribute__ ((bitwidth(175 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<175 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<175 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(175 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<175 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<176 + 1024 * 0,true> { int V __attribute__ ((bitwidth(176 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<176 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<176 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(176 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<176 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<177 + 1024 * 0,true> { int V __attribute__ ((bitwidth(177 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<177 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<177 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(177 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<177 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<178 + 1024 * 0,true> { int V __attribute__ ((bitwidth(178 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<178 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<178 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(178 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<178 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<179 + 1024 * 0,true> { int V __attribute__ ((bitwidth(179 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<179 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<179 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(179 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<179 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<180 + 1024 * 0,true> { int V __attribute__ ((bitwidth(180 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<180 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<180 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(180 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<180 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<181 + 1024 * 0,true> { int V __attribute__ ((bitwidth(181 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<181 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<181 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(181 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<181 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<182 + 1024 * 0,true> { int V __attribute__ ((bitwidth(182 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<182 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<182 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(182 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<182 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<183 + 1024 * 0,true> { int V __attribute__ ((bitwidth(183 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<183 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<183 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(183 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<183 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<184 + 1024 * 0,true> { int V __attribute__ ((bitwidth(184 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<184 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<184 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(184 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<184 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<185 + 1024 * 0,true> { int V __attribute__ ((bitwidth(185 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<185 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<185 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(185 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<185 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<186 + 1024 * 0,true> { int V __attribute__ ((bitwidth(186 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<186 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<186 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(186 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<186 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<187 + 1024 * 0,true> { int V __attribute__ ((bitwidth(187 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<187 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<187 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(187 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<187 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<188 + 1024 * 0,true> { int V __attribute__ ((bitwidth(188 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<188 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<188 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(188 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<188 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<189 + 1024 * 0,true> { int V __attribute__ ((bitwidth(189 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<189 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<189 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(189 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<189 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<190 + 1024 * 0,true> { int V __attribute__ ((bitwidth(190 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<190 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<190 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(190 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<190 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<191 + 1024 * 0,true> { int V __attribute__ ((bitwidth(191 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<191 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<191 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(191 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<191 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<192 + 1024 * 0,true> { int V __attribute__ ((bitwidth(192 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<192 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<192 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(192 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<192 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<193 + 1024 * 0,true> { int V __attribute__ ((bitwidth(193 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<193 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<193 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(193 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<193 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<194 + 1024 * 0,true> { int V __attribute__ ((bitwidth(194 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<194 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<194 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(194 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<194 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<195 + 1024 * 0,true> { int V __attribute__ ((bitwidth(195 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<195 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<195 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(195 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<195 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<196 + 1024 * 0,true> { int V __attribute__ ((bitwidth(196 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<196 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<196 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(196 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<196 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<197 + 1024 * 0,true> { int V __attribute__ ((bitwidth(197 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<197 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<197 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(197 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<197 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<198 + 1024 * 0,true> { int V __attribute__ ((bitwidth(198 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<198 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<198 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(198 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<198 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<199 + 1024 * 0,true> { int V __attribute__ ((bitwidth(199 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<199 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<199 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(199 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<199 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<200 + 1024 * 0,true> { int V __attribute__ ((bitwidth(200 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<200 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<200 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(200 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<200 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<201 + 1024 * 0,true> { int V __attribute__ ((bitwidth(201 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<201 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<201 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(201 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<201 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<202 + 1024 * 0,true> { int V __attribute__ ((bitwidth(202 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<202 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<202 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(202 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<202 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<203 + 1024 * 0,true> { int V __attribute__ ((bitwidth(203 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<203 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<203 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(203 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<203 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<204 + 1024 * 0,true> { int V __attribute__ ((bitwidth(204 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<204 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<204 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(204 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<204 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<205 + 1024 * 0,true> { int V __attribute__ ((bitwidth(205 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<205 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<205 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(205 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<205 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<206 + 1024 * 0,true> { int V __attribute__ ((bitwidth(206 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<206 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<206 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(206 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<206 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<207 + 1024 * 0,true> { int V __attribute__ ((bitwidth(207 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<207 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<207 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(207 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<207 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<208 + 1024 * 0,true> { int V __attribute__ ((bitwidth(208 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<208 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<208 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(208 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<208 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<209 + 1024 * 0,true> { int V __attribute__ ((bitwidth(209 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<209 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<209 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(209 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<209 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<210 + 1024 * 0,true> { int V __attribute__ ((bitwidth(210 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<210 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<210 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(210 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<210 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<211 + 1024 * 0,true> { int V __attribute__ ((bitwidth(211 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<211 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<211 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(211 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<211 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<212 + 1024 * 0,true> { int V __attribute__ ((bitwidth(212 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<212 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<212 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(212 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<212 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<213 + 1024 * 0,true> { int V __attribute__ ((bitwidth(213 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<213 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<213 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(213 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<213 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<214 + 1024 * 0,true> { int V __attribute__ ((bitwidth(214 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<214 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<214 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(214 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<214 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<215 + 1024 * 0,true> { int V __attribute__ ((bitwidth(215 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<215 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<215 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(215 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<215 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<216 + 1024 * 0,true> { int V __attribute__ ((bitwidth(216 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<216 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<216 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(216 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<216 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<217 + 1024 * 0,true> { int V __attribute__ ((bitwidth(217 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<217 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<217 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(217 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<217 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<218 + 1024 * 0,true> { int V __attribute__ ((bitwidth(218 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<218 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<218 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(218 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<218 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<219 + 1024 * 0,true> { int V __attribute__ ((bitwidth(219 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<219 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<219 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(219 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<219 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<220 + 1024 * 0,true> { int V __attribute__ ((bitwidth(220 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<220 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<220 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(220 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<220 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<221 + 1024 * 0,true> { int V __attribute__ ((bitwidth(221 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<221 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<221 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(221 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<221 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<222 + 1024 * 0,true> { int V __attribute__ ((bitwidth(222 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<222 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<222 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(222 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<222 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<223 + 1024 * 0,true> { int V __attribute__ ((bitwidth(223 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<223 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<223 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(223 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<223 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<224 + 1024 * 0,true> { int V __attribute__ ((bitwidth(224 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<224 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<224 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(224 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<224 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<225 + 1024 * 0,true> { int V __attribute__ ((bitwidth(225 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<225 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<225 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(225 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<225 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<226 + 1024 * 0,true> { int V __attribute__ ((bitwidth(226 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<226 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<226 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(226 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<226 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<227 + 1024 * 0,true> { int V __attribute__ ((bitwidth(227 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<227 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<227 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(227 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<227 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<228 + 1024 * 0,true> { int V __attribute__ ((bitwidth(228 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<228 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<228 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(228 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<228 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<229 + 1024 * 0,true> { int V __attribute__ ((bitwidth(229 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<229 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<229 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(229 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<229 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<230 + 1024 * 0,true> { int V __attribute__ ((bitwidth(230 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<230 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<230 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(230 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<230 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<231 + 1024 * 0,true> { int V __attribute__ ((bitwidth(231 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<231 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<231 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(231 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<231 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<232 + 1024 * 0,true> { int V __attribute__ ((bitwidth(232 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<232 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<232 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(232 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<232 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<233 + 1024 * 0,true> { int V __attribute__ ((bitwidth(233 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<233 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<233 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(233 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<233 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<234 + 1024 * 0,true> { int V __attribute__ ((bitwidth(234 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<234 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<234 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(234 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<234 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<235 + 1024 * 0,true> { int V __attribute__ ((bitwidth(235 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<235 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<235 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(235 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<235 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<236 + 1024 * 0,true> { int V __attribute__ ((bitwidth(236 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<236 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<236 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(236 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<236 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<237 + 1024 * 0,true> { int V __attribute__ ((bitwidth(237 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<237 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<237 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(237 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<237 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<238 + 1024 * 0,true> { int V __attribute__ ((bitwidth(238 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<238 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<238 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(238 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<238 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<239 + 1024 * 0,true> { int V __attribute__ ((bitwidth(239 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<239 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<239 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(239 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<239 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<240 + 1024 * 0,true> { int V __attribute__ ((bitwidth(240 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<240 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<240 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(240 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<240 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<241 + 1024 * 0,true> { int V __attribute__ ((bitwidth(241 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<241 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<241 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(241 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<241 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<242 + 1024 * 0,true> { int V __attribute__ ((bitwidth(242 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<242 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<242 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(242 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<242 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<243 + 1024 * 0,true> { int V __attribute__ ((bitwidth(243 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<243 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<243 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(243 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<243 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<244 + 1024 * 0,true> { int V __attribute__ ((bitwidth(244 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<244 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<244 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(244 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<244 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<245 + 1024 * 0,true> { int V __attribute__ ((bitwidth(245 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<245 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<245 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(245 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<245 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<246 + 1024 * 0,true> { int V __attribute__ ((bitwidth(246 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<246 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<246 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(246 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<246 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<247 + 1024 * 0,true> { int V __attribute__ ((bitwidth(247 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<247 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<247 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(247 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<247 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<248 + 1024 * 0,true> { int V __attribute__ ((bitwidth(248 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<248 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<248 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(248 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<248 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<249 + 1024 * 0,true> { int V __attribute__ ((bitwidth(249 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<249 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<249 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(249 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<249 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<250 + 1024 * 0,true> { int V __attribute__ ((bitwidth(250 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<250 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<250 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(250 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<250 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<251 + 1024 * 0,true> { int V __attribute__ ((bitwidth(251 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<251 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<251 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(251 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<251 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<252 + 1024 * 0,true> { int V __attribute__ ((bitwidth(252 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<252 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<252 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(252 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<252 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<253 + 1024 * 0,true> { int V __attribute__ ((bitwidth(253 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<253 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<253 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(253 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<253 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<254 + 1024 * 0,true> { int V __attribute__ ((bitwidth(254 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<254 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<254 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(254 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<254 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<255 + 1024 * 0,true> { int V __attribute__ ((bitwidth(255 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<255 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<255 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(255 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<255 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<256 + 1024 * 0,true> { int V __attribute__ ((bitwidth(256 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<256 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<256 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(256 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<256 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<257 + 1024 * 0,true> { int V __attribute__ ((bitwidth(257 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<257 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<257 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(257 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<257 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<258 + 1024 * 0,true> { int V __attribute__ ((bitwidth(258 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<258 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<258 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(258 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<258 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<259 + 1024 * 0,true> { int V __attribute__ ((bitwidth(259 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<259 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<259 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(259 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<259 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<260 + 1024 * 0,true> { int V __attribute__ ((bitwidth(260 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<260 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<260 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(260 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<260 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<261 + 1024 * 0,true> { int V __attribute__ ((bitwidth(261 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<261 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<261 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(261 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<261 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<262 + 1024 * 0,true> { int V __attribute__ ((bitwidth(262 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<262 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<262 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(262 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<262 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<263 + 1024 * 0,true> { int V __attribute__ ((bitwidth(263 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<263 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<263 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(263 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<263 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<264 + 1024 * 0,true> { int V __attribute__ ((bitwidth(264 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<264 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<264 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(264 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<264 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<265 + 1024 * 0,true> { int V __attribute__ ((bitwidth(265 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<265 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<265 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(265 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<265 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<266 + 1024 * 0,true> { int V __attribute__ ((bitwidth(266 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<266 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<266 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(266 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<266 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<267 + 1024 * 0,true> { int V __attribute__ ((bitwidth(267 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<267 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<267 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(267 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<267 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<268 + 1024 * 0,true> { int V __attribute__ ((bitwidth(268 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<268 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<268 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(268 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<268 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<269 + 1024 * 0,true> { int V __attribute__ ((bitwidth(269 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<269 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<269 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(269 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<269 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<270 + 1024 * 0,true> { int V __attribute__ ((bitwidth(270 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<270 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<270 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(270 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<270 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<271 + 1024 * 0,true> { int V __attribute__ ((bitwidth(271 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<271 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<271 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(271 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<271 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<272 + 1024 * 0,true> { int V __attribute__ ((bitwidth(272 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<272 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<272 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(272 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<272 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<273 + 1024 * 0,true> { int V __attribute__ ((bitwidth(273 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<273 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<273 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(273 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<273 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<274 + 1024 * 0,true> { int V __attribute__ ((bitwidth(274 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<274 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<274 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(274 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<274 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<275 + 1024 * 0,true> { int V __attribute__ ((bitwidth(275 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<275 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<275 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(275 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<275 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<276 + 1024 * 0,true> { int V __attribute__ ((bitwidth(276 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<276 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<276 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(276 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<276 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<277 + 1024 * 0,true> { int V __attribute__ ((bitwidth(277 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<277 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<277 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(277 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<277 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<278 + 1024 * 0,true> { int V __attribute__ ((bitwidth(278 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<278 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<278 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(278 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<278 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<279 + 1024 * 0,true> { int V __attribute__ ((bitwidth(279 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<279 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<279 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(279 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<279 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<280 + 1024 * 0,true> { int V __attribute__ ((bitwidth(280 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<280 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<280 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(280 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<280 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<281 + 1024 * 0,true> { int V __attribute__ ((bitwidth(281 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<281 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<281 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(281 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<281 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<282 + 1024 * 0,true> { int V __attribute__ ((bitwidth(282 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<282 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<282 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(282 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<282 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<283 + 1024 * 0,true> { int V __attribute__ ((bitwidth(283 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<283 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<283 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(283 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<283 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<284 + 1024 * 0,true> { int V __attribute__ ((bitwidth(284 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<284 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<284 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(284 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<284 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<285 + 1024 * 0,true> { int V __attribute__ ((bitwidth(285 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<285 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<285 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(285 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<285 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<286 + 1024 * 0,true> { int V __attribute__ ((bitwidth(286 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<286 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<286 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(286 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<286 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<287 + 1024 * 0,true> { int V __attribute__ ((bitwidth(287 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<287 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<287 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(287 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<287 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<288 + 1024 * 0,true> { int V __attribute__ ((bitwidth(288 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<288 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<288 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(288 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<288 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<289 + 1024 * 0,true> { int V __attribute__ ((bitwidth(289 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<289 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<289 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(289 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<289 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<290 + 1024 * 0,true> { int V __attribute__ ((bitwidth(290 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<290 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<290 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(290 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<290 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<291 + 1024 * 0,true> { int V __attribute__ ((bitwidth(291 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<291 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<291 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(291 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<291 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<292 + 1024 * 0,true> { int V __attribute__ ((bitwidth(292 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<292 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<292 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(292 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<292 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<293 + 1024 * 0,true> { int V __attribute__ ((bitwidth(293 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<293 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<293 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(293 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<293 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<294 + 1024 * 0,true> { int V __attribute__ ((bitwidth(294 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<294 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<294 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(294 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<294 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<295 + 1024 * 0,true> { int V __attribute__ ((bitwidth(295 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<295 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<295 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(295 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<295 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<296 + 1024 * 0,true> { int V __attribute__ ((bitwidth(296 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<296 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<296 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(296 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<296 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<297 + 1024 * 0,true> { int V __attribute__ ((bitwidth(297 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<297 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<297 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(297 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<297 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<298 + 1024 * 0,true> { int V __attribute__ ((bitwidth(298 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<298 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<298 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(298 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<298 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<299 + 1024 * 0,true> { int V __attribute__ ((bitwidth(299 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<299 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<299 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(299 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<299 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<300 + 1024 * 0,true> { int V __attribute__ ((bitwidth(300 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<300 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<300 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(300 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<300 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<301 + 1024 * 0,true> { int V __attribute__ ((bitwidth(301 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<301 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<301 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(301 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<301 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<302 + 1024 * 0,true> { int V __attribute__ ((bitwidth(302 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<302 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<302 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(302 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<302 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<303 + 1024 * 0,true> { int V __attribute__ ((bitwidth(303 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<303 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<303 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(303 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<303 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<304 + 1024 * 0,true> { int V __attribute__ ((bitwidth(304 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<304 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<304 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(304 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<304 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<305 + 1024 * 0,true> { int V __attribute__ ((bitwidth(305 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<305 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<305 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(305 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<305 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<306 + 1024 * 0,true> { int V __attribute__ ((bitwidth(306 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<306 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<306 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(306 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<306 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<307 + 1024 * 0,true> { int V __attribute__ ((bitwidth(307 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<307 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<307 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(307 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<307 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<308 + 1024 * 0,true> { int V __attribute__ ((bitwidth(308 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<308 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<308 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(308 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<308 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<309 + 1024 * 0,true> { int V __attribute__ ((bitwidth(309 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<309 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<309 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(309 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<309 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<310 + 1024 * 0,true> { int V __attribute__ ((bitwidth(310 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<310 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<310 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(310 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<310 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<311 + 1024 * 0,true> { int V __attribute__ ((bitwidth(311 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<311 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<311 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(311 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<311 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<312 + 1024 * 0,true> { int V __attribute__ ((bitwidth(312 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<312 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<312 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(312 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<312 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<313 + 1024 * 0,true> { int V __attribute__ ((bitwidth(313 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<313 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<313 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(313 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<313 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<314 + 1024 * 0,true> { int V __attribute__ ((bitwidth(314 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<314 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<314 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(314 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<314 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<315 + 1024 * 0,true> { int V __attribute__ ((bitwidth(315 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<315 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<315 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(315 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<315 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<316 + 1024 * 0,true> { int V __attribute__ ((bitwidth(316 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<316 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<316 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(316 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<316 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<317 + 1024 * 0,true> { int V __attribute__ ((bitwidth(317 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<317 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<317 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(317 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<317 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<318 + 1024 * 0,true> { int V __attribute__ ((bitwidth(318 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<318 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<318 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(318 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<318 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<319 + 1024 * 0,true> { int V __attribute__ ((bitwidth(319 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<319 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<319 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(319 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<319 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<320 + 1024 * 0,true> { int V __attribute__ ((bitwidth(320 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<320 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<320 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(320 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<320 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<321 + 1024 * 0,true> { int V __attribute__ ((bitwidth(321 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<321 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<321 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(321 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<321 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<322 + 1024 * 0,true> { int V __attribute__ ((bitwidth(322 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<322 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<322 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(322 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<322 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<323 + 1024 * 0,true> { int V __attribute__ ((bitwidth(323 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<323 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<323 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(323 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<323 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<324 + 1024 * 0,true> { int V __attribute__ ((bitwidth(324 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<324 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<324 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(324 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<324 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<325 + 1024 * 0,true> { int V __attribute__ ((bitwidth(325 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<325 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<325 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(325 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<325 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<326 + 1024 * 0,true> { int V __attribute__ ((bitwidth(326 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<326 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<326 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(326 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<326 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<327 + 1024 * 0,true> { int V __attribute__ ((bitwidth(327 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<327 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<327 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(327 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<327 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<328 + 1024 * 0,true> { int V __attribute__ ((bitwidth(328 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<328 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<328 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(328 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<328 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<329 + 1024 * 0,true> { int V __attribute__ ((bitwidth(329 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<329 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<329 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(329 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<329 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<330 + 1024 * 0,true> { int V __attribute__ ((bitwidth(330 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<330 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<330 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(330 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<330 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<331 + 1024 * 0,true> { int V __attribute__ ((bitwidth(331 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<331 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<331 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(331 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<331 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<332 + 1024 * 0,true> { int V __attribute__ ((bitwidth(332 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<332 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<332 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(332 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<332 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<333 + 1024 * 0,true> { int V __attribute__ ((bitwidth(333 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<333 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<333 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(333 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<333 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<334 + 1024 * 0,true> { int V __attribute__ ((bitwidth(334 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<334 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<334 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(334 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<334 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<335 + 1024 * 0,true> { int V __attribute__ ((bitwidth(335 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<335 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<335 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(335 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<335 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<336 + 1024 * 0,true> { int V __attribute__ ((bitwidth(336 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<336 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<336 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(336 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<336 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<337 + 1024 * 0,true> { int V __attribute__ ((bitwidth(337 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<337 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<337 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(337 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<337 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<338 + 1024 * 0,true> { int V __attribute__ ((bitwidth(338 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<338 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<338 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(338 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<338 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<339 + 1024 * 0,true> { int V __attribute__ ((bitwidth(339 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<339 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<339 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(339 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<339 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<340 + 1024 * 0,true> { int V __attribute__ ((bitwidth(340 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<340 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<340 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(340 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<340 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<341 + 1024 * 0,true> { int V __attribute__ ((bitwidth(341 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<341 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<341 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(341 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<341 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<342 + 1024 * 0,true> { int V __attribute__ ((bitwidth(342 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<342 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<342 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(342 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<342 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<343 + 1024 * 0,true> { int V __attribute__ ((bitwidth(343 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<343 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<343 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(343 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<343 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<344 + 1024 * 0,true> { int V __attribute__ ((bitwidth(344 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<344 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<344 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(344 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<344 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<345 + 1024 * 0,true> { int V __attribute__ ((bitwidth(345 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<345 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<345 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(345 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<345 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<346 + 1024 * 0,true> { int V __attribute__ ((bitwidth(346 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<346 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<346 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(346 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<346 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<347 + 1024 * 0,true> { int V __attribute__ ((bitwidth(347 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<347 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<347 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(347 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<347 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<348 + 1024 * 0,true> { int V __attribute__ ((bitwidth(348 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<348 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<348 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(348 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<348 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<349 + 1024 * 0,true> { int V __attribute__ ((bitwidth(349 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<349 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<349 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(349 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<349 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<350 + 1024 * 0,true> { int V __attribute__ ((bitwidth(350 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<350 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<350 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(350 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<350 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<351 + 1024 * 0,true> { int V __attribute__ ((bitwidth(351 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<351 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<351 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(351 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<351 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<352 + 1024 * 0,true> { int V __attribute__ ((bitwidth(352 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<352 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<352 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(352 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<352 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<353 + 1024 * 0,true> { int V __attribute__ ((bitwidth(353 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<353 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<353 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(353 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<353 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<354 + 1024 * 0,true> { int V __attribute__ ((bitwidth(354 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<354 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<354 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(354 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<354 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<355 + 1024 * 0,true> { int V __attribute__ ((bitwidth(355 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<355 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<355 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(355 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<355 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<356 + 1024 * 0,true> { int V __attribute__ ((bitwidth(356 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<356 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<356 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(356 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<356 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<357 + 1024 * 0,true> { int V __attribute__ ((bitwidth(357 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<357 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<357 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(357 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<357 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<358 + 1024 * 0,true> { int V __attribute__ ((bitwidth(358 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<358 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<358 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(358 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<358 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<359 + 1024 * 0,true> { int V __attribute__ ((bitwidth(359 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<359 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<359 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(359 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<359 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<360 + 1024 * 0,true> { int V __attribute__ ((bitwidth(360 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<360 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<360 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(360 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<360 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<361 + 1024 * 0,true> { int V __attribute__ ((bitwidth(361 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<361 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<361 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(361 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<361 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<362 + 1024 * 0,true> { int V __attribute__ ((bitwidth(362 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<362 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<362 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(362 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<362 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<363 + 1024 * 0,true> { int V __attribute__ ((bitwidth(363 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<363 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<363 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(363 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<363 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<364 + 1024 * 0,true> { int V __attribute__ ((bitwidth(364 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<364 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<364 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(364 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<364 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<365 + 1024 * 0,true> { int V __attribute__ ((bitwidth(365 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<365 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<365 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(365 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<365 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<366 + 1024 * 0,true> { int V __attribute__ ((bitwidth(366 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<366 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<366 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(366 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<366 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<367 + 1024 * 0,true> { int V __attribute__ ((bitwidth(367 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<367 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<367 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(367 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<367 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<368 + 1024 * 0,true> { int V __attribute__ ((bitwidth(368 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<368 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<368 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(368 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<368 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<369 + 1024 * 0,true> { int V __attribute__ ((bitwidth(369 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<369 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<369 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(369 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<369 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<370 + 1024 * 0,true> { int V __attribute__ ((bitwidth(370 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<370 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<370 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(370 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<370 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<371 + 1024 * 0,true> { int V __attribute__ ((bitwidth(371 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<371 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<371 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(371 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<371 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<372 + 1024 * 0,true> { int V __attribute__ ((bitwidth(372 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<372 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<372 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(372 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<372 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<373 + 1024 * 0,true> { int V __attribute__ ((bitwidth(373 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<373 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<373 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(373 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<373 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<374 + 1024 * 0,true> { int V __attribute__ ((bitwidth(374 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<374 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<374 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(374 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<374 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<375 + 1024 * 0,true> { int V __attribute__ ((bitwidth(375 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<375 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<375 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(375 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<375 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<376 + 1024 * 0,true> { int V __attribute__ ((bitwidth(376 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<376 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<376 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(376 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<376 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<377 + 1024 * 0,true> { int V __attribute__ ((bitwidth(377 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<377 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<377 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(377 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<377 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<378 + 1024 * 0,true> { int V __attribute__ ((bitwidth(378 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<378 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<378 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(378 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<378 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<379 + 1024 * 0,true> { int V __attribute__ ((bitwidth(379 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<379 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<379 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(379 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<379 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<380 + 1024 * 0,true> { int V __attribute__ ((bitwidth(380 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<380 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<380 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(380 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<380 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<381 + 1024 * 0,true> { int V __attribute__ ((bitwidth(381 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<381 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<381 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(381 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<381 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<382 + 1024 * 0,true> { int V __attribute__ ((bitwidth(382 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<382 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<382 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(382 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<382 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<383 + 1024 * 0,true> { int V __attribute__ ((bitwidth(383 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<383 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<383 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(383 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<383 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<384 + 1024 * 0,true> { int V __attribute__ ((bitwidth(384 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<384 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<384 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(384 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<384 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<385 + 1024 * 0,true> { int V __attribute__ ((bitwidth(385 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<385 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<385 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(385 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<385 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<386 + 1024 * 0,true> { int V __attribute__ ((bitwidth(386 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<386 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<386 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(386 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<386 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<387 + 1024 * 0,true> { int V __attribute__ ((bitwidth(387 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<387 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<387 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(387 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<387 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<388 + 1024 * 0,true> { int V __attribute__ ((bitwidth(388 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<388 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<388 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(388 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<388 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<389 + 1024 * 0,true> { int V __attribute__ ((bitwidth(389 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<389 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<389 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(389 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<389 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<390 + 1024 * 0,true> { int V __attribute__ ((bitwidth(390 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<390 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<390 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(390 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<390 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<391 + 1024 * 0,true> { int V __attribute__ ((bitwidth(391 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<391 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<391 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(391 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<391 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<392 + 1024 * 0,true> { int V __attribute__ ((bitwidth(392 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<392 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<392 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(392 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<392 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<393 + 1024 * 0,true> { int V __attribute__ ((bitwidth(393 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<393 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<393 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(393 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<393 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<394 + 1024 * 0,true> { int V __attribute__ ((bitwidth(394 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<394 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<394 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(394 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<394 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<395 + 1024 * 0,true> { int V __attribute__ ((bitwidth(395 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<395 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<395 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(395 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<395 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<396 + 1024 * 0,true> { int V __attribute__ ((bitwidth(396 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<396 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<396 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(396 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<396 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<397 + 1024 * 0,true> { int V __attribute__ ((bitwidth(397 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<397 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<397 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(397 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<397 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<398 + 1024 * 0,true> { int V __attribute__ ((bitwidth(398 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<398 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<398 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(398 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<398 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<399 + 1024 * 0,true> { int V __attribute__ ((bitwidth(399 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<399 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<399 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(399 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<399 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<400 + 1024 * 0,true> { int V __attribute__ ((bitwidth(400 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<400 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<400 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(400 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<400 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<401 + 1024 * 0,true> { int V __attribute__ ((bitwidth(401 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<401 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<401 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(401 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<401 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<402 + 1024 * 0,true> { int V __attribute__ ((bitwidth(402 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<402 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<402 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(402 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<402 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<403 + 1024 * 0,true> { int V __attribute__ ((bitwidth(403 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<403 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<403 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(403 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<403 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<404 + 1024 * 0,true> { int V __attribute__ ((bitwidth(404 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<404 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<404 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(404 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<404 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<405 + 1024 * 0,true> { int V __attribute__ ((bitwidth(405 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<405 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<405 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(405 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<405 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<406 + 1024 * 0,true> { int V __attribute__ ((bitwidth(406 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<406 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<406 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(406 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<406 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<407 + 1024 * 0,true> { int V __attribute__ ((bitwidth(407 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<407 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<407 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(407 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<407 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<408 + 1024 * 0,true> { int V __attribute__ ((bitwidth(408 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<408 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<408 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(408 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<408 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<409 + 1024 * 0,true> { int V __attribute__ ((bitwidth(409 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<409 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<409 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(409 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<409 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<410 + 1024 * 0,true> { int V __attribute__ ((bitwidth(410 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<410 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<410 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(410 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<410 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<411 + 1024 * 0,true> { int V __attribute__ ((bitwidth(411 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<411 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<411 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(411 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<411 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<412 + 1024 * 0,true> { int V __attribute__ ((bitwidth(412 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<412 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<412 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(412 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<412 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<413 + 1024 * 0,true> { int V __attribute__ ((bitwidth(413 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<413 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<413 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(413 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<413 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<414 + 1024 * 0,true> { int V __attribute__ ((bitwidth(414 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<414 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<414 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(414 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<414 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<415 + 1024 * 0,true> { int V __attribute__ ((bitwidth(415 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<415 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<415 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(415 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<415 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<416 + 1024 * 0,true> { int V __attribute__ ((bitwidth(416 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<416 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<416 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(416 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<416 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<417 + 1024 * 0,true> { int V __attribute__ ((bitwidth(417 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<417 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<417 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(417 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<417 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<418 + 1024 * 0,true> { int V __attribute__ ((bitwidth(418 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<418 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<418 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(418 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<418 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<419 + 1024 * 0,true> { int V __attribute__ ((bitwidth(419 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<419 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<419 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(419 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<419 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<420 + 1024 * 0,true> { int V __attribute__ ((bitwidth(420 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<420 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<420 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(420 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<420 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<421 + 1024 * 0,true> { int V __attribute__ ((bitwidth(421 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<421 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<421 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(421 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<421 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<422 + 1024 * 0,true> { int V __attribute__ ((bitwidth(422 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<422 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<422 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(422 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<422 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<423 + 1024 * 0,true> { int V __attribute__ ((bitwidth(423 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<423 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<423 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(423 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<423 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<424 + 1024 * 0,true> { int V __attribute__ ((bitwidth(424 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<424 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<424 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(424 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<424 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<425 + 1024 * 0,true> { int V __attribute__ ((bitwidth(425 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<425 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<425 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(425 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<425 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<426 + 1024 * 0,true> { int V __attribute__ ((bitwidth(426 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<426 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<426 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(426 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<426 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<427 + 1024 * 0,true> { int V __attribute__ ((bitwidth(427 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<427 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<427 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(427 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<427 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<428 + 1024 * 0,true> { int V __attribute__ ((bitwidth(428 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<428 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<428 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(428 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<428 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<429 + 1024 * 0,true> { int V __attribute__ ((bitwidth(429 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<429 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<429 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(429 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<429 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<430 + 1024 * 0,true> { int V __attribute__ ((bitwidth(430 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<430 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<430 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(430 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<430 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<431 + 1024 * 0,true> { int V __attribute__ ((bitwidth(431 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<431 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<431 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(431 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<431 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<432 + 1024 * 0,true> { int V __attribute__ ((bitwidth(432 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<432 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<432 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(432 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<432 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<433 + 1024 * 0,true> { int V __attribute__ ((bitwidth(433 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<433 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<433 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(433 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<433 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<434 + 1024 * 0,true> { int V __attribute__ ((bitwidth(434 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<434 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<434 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(434 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<434 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<435 + 1024 * 0,true> { int V __attribute__ ((bitwidth(435 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<435 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<435 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(435 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<435 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<436 + 1024 * 0,true> { int V __attribute__ ((bitwidth(436 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<436 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<436 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(436 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<436 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<437 + 1024 * 0,true> { int V __attribute__ ((bitwidth(437 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<437 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<437 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(437 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<437 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<438 + 1024 * 0,true> { int V __attribute__ ((bitwidth(438 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<438 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<438 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(438 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<438 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<439 + 1024 * 0,true> { int V __attribute__ ((bitwidth(439 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<439 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<439 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(439 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<439 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<440 + 1024 * 0,true> { int V __attribute__ ((bitwidth(440 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<440 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<440 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(440 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<440 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<441 + 1024 * 0,true> { int V __attribute__ ((bitwidth(441 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<441 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<441 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(441 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<441 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<442 + 1024 * 0,true> { int V __attribute__ ((bitwidth(442 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<442 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<442 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(442 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<442 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<443 + 1024 * 0,true> { int V __attribute__ ((bitwidth(443 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<443 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<443 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(443 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<443 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<444 + 1024 * 0,true> { int V __attribute__ ((bitwidth(444 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<444 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<444 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(444 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<444 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<445 + 1024 * 0,true> { int V __attribute__ ((bitwidth(445 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<445 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<445 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(445 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<445 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<446 + 1024 * 0,true> { int V __attribute__ ((bitwidth(446 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<446 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<446 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(446 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<446 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<447 + 1024 * 0,true> { int V __attribute__ ((bitwidth(447 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<447 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<447 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(447 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<447 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<448 + 1024 * 0,true> { int V __attribute__ ((bitwidth(448 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<448 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<448 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(448 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<448 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<449 + 1024 * 0,true> { int V __attribute__ ((bitwidth(449 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<449 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<449 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(449 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<449 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<450 + 1024 * 0,true> { int V __attribute__ ((bitwidth(450 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<450 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<450 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(450 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<450 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<451 + 1024 * 0,true> { int V __attribute__ ((bitwidth(451 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<451 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<451 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(451 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<451 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<452 + 1024 * 0,true> { int V __attribute__ ((bitwidth(452 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<452 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<452 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(452 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<452 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<453 + 1024 * 0,true> { int V __attribute__ ((bitwidth(453 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<453 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<453 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(453 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<453 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<454 + 1024 * 0,true> { int V __attribute__ ((bitwidth(454 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<454 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<454 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(454 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<454 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<455 + 1024 * 0,true> { int V __attribute__ ((bitwidth(455 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<455 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<455 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(455 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<455 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<456 + 1024 * 0,true> { int V __attribute__ ((bitwidth(456 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<456 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<456 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(456 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<456 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<457 + 1024 * 0,true> { int V __attribute__ ((bitwidth(457 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<457 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<457 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(457 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<457 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<458 + 1024 * 0,true> { int V __attribute__ ((bitwidth(458 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<458 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<458 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(458 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<458 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<459 + 1024 * 0,true> { int V __attribute__ ((bitwidth(459 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<459 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<459 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(459 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<459 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<460 + 1024 * 0,true> { int V __attribute__ ((bitwidth(460 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<460 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<460 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(460 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<460 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<461 + 1024 * 0,true> { int V __attribute__ ((bitwidth(461 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<461 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<461 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(461 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<461 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<462 + 1024 * 0,true> { int V __attribute__ ((bitwidth(462 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<462 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<462 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(462 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<462 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<463 + 1024 * 0,true> { int V __attribute__ ((bitwidth(463 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<463 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<463 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(463 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<463 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<464 + 1024 * 0,true> { int V __attribute__ ((bitwidth(464 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<464 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<464 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(464 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<464 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<465 + 1024 * 0,true> { int V __attribute__ ((bitwidth(465 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<465 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<465 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(465 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<465 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<466 + 1024 * 0,true> { int V __attribute__ ((bitwidth(466 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<466 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<466 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(466 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<466 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<467 + 1024 * 0,true> { int V __attribute__ ((bitwidth(467 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<467 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<467 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(467 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<467 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<468 + 1024 * 0,true> { int V __attribute__ ((bitwidth(468 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<468 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<468 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(468 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<468 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<469 + 1024 * 0,true> { int V __attribute__ ((bitwidth(469 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<469 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<469 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(469 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<469 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<470 + 1024 * 0,true> { int V __attribute__ ((bitwidth(470 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<470 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<470 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(470 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<470 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<471 + 1024 * 0,true> { int V __attribute__ ((bitwidth(471 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<471 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<471 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(471 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<471 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<472 + 1024 * 0,true> { int V __attribute__ ((bitwidth(472 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<472 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<472 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(472 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<472 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<473 + 1024 * 0,true> { int V __attribute__ ((bitwidth(473 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<473 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<473 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(473 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<473 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<474 + 1024 * 0,true> { int V __attribute__ ((bitwidth(474 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<474 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<474 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(474 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<474 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<475 + 1024 * 0,true> { int V __attribute__ ((bitwidth(475 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<475 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<475 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(475 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<475 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<476 + 1024 * 0,true> { int V __attribute__ ((bitwidth(476 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<476 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<476 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(476 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<476 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<477 + 1024 * 0,true> { int V __attribute__ ((bitwidth(477 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<477 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<477 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(477 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<477 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<478 + 1024 * 0,true> { int V __attribute__ ((bitwidth(478 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<478 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<478 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(478 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<478 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<479 + 1024 * 0,true> { int V __attribute__ ((bitwidth(479 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<479 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<479 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(479 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<479 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<480 + 1024 * 0,true> { int V __attribute__ ((bitwidth(480 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<480 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<480 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(480 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<480 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<481 + 1024 * 0,true> { int V __attribute__ ((bitwidth(481 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<481 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<481 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(481 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<481 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<482 + 1024 * 0,true> { int V __attribute__ ((bitwidth(482 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<482 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<482 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(482 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<482 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<483 + 1024 * 0,true> { int V __attribute__ ((bitwidth(483 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<483 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<483 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(483 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<483 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<484 + 1024 * 0,true> { int V __attribute__ ((bitwidth(484 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<484 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<484 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(484 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<484 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<485 + 1024 * 0,true> { int V __attribute__ ((bitwidth(485 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<485 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<485 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(485 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<485 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<486 + 1024 * 0,true> { int V __attribute__ ((bitwidth(486 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<486 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<486 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(486 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<486 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<487 + 1024 * 0,true> { int V __attribute__ ((bitwidth(487 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<487 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<487 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(487 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<487 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<488 + 1024 * 0,true> { int V __attribute__ ((bitwidth(488 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<488 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<488 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(488 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<488 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<489 + 1024 * 0,true> { int V __attribute__ ((bitwidth(489 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<489 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<489 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(489 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<489 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<490 + 1024 * 0,true> { int V __attribute__ ((bitwidth(490 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<490 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<490 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(490 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<490 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<491 + 1024 * 0,true> { int V __attribute__ ((bitwidth(491 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<491 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<491 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(491 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<491 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<492 + 1024 * 0,true> { int V __attribute__ ((bitwidth(492 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<492 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<492 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(492 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<492 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<493 + 1024 * 0,true> { int V __attribute__ ((bitwidth(493 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<493 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<493 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(493 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<493 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<494 + 1024 * 0,true> { int V __attribute__ ((bitwidth(494 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<494 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<494 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(494 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<494 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<495 + 1024 * 0,true> { int V __attribute__ ((bitwidth(495 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<495 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<495 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(495 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<495 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<496 + 1024 * 0,true> { int V __attribute__ ((bitwidth(496 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<496 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<496 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(496 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<496 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<497 + 1024 * 0,true> { int V __attribute__ ((bitwidth(497 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<497 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<497 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(497 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<497 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<498 + 1024 * 0,true> { int V __attribute__ ((bitwidth(498 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<498 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<498 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(498 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<498 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<499 + 1024 * 0,true> { int V __attribute__ ((bitwidth(499 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<499 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<499 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(499 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<499 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<500 + 1024 * 0,true> { int V __attribute__ ((bitwidth(500 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<500 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<500 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(500 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<500 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<501 + 1024 * 0,true> { int V __attribute__ ((bitwidth(501 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<501 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<501 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(501 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<501 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<502 + 1024 * 0,true> { int V __attribute__ ((bitwidth(502 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<502 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<502 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(502 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<502 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<503 + 1024 * 0,true> { int V __attribute__ ((bitwidth(503 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<503 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<503 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(503 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<503 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<504 + 1024 * 0,true> { int V __attribute__ ((bitwidth(504 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<504 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<504 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(504 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<504 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<505 + 1024 * 0,true> { int V __attribute__ ((bitwidth(505 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<505 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<505 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(505 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<505 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<506 + 1024 * 0,true> { int V __attribute__ ((bitwidth(506 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<506 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<506 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(506 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<506 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<507 + 1024 * 0,true> { int V __attribute__ ((bitwidth(507 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<507 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<507 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(507 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<507 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<508 + 1024 * 0,true> { int V __attribute__ ((bitwidth(508 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<508 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<508 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(508 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<508 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<509 + 1024 * 0,true> { int V __attribute__ ((bitwidth(509 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<509 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<509 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(509 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<509 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<510 + 1024 * 0,true> { int V __attribute__ ((bitwidth(510 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<510 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<510 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(510 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<510 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<511 + 1024 * 0,true> { int V __attribute__ ((bitwidth(511 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<511 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<511 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(511 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<511 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<512 + 1024 * 0,true> { int V __attribute__ ((bitwidth(512 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<512 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<512 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(512 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<512 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<513 + 1024 * 0,true> { int V __attribute__ ((bitwidth(513 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<513 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<513 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(513 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<513 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<514 + 1024 * 0,true> { int V __attribute__ ((bitwidth(514 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<514 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<514 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(514 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<514 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<515 + 1024 * 0,true> { int V __attribute__ ((bitwidth(515 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<515 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<515 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(515 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<515 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<516 + 1024 * 0,true> { int V __attribute__ ((bitwidth(516 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<516 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<516 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(516 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<516 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<517 + 1024 * 0,true> { int V __attribute__ ((bitwidth(517 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<517 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<517 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(517 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<517 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<518 + 1024 * 0,true> { int V __attribute__ ((bitwidth(518 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<518 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<518 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(518 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<518 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<519 + 1024 * 0,true> { int V __attribute__ ((bitwidth(519 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<519 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<519 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(519 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<519 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<520 + 1024 * 0,true> { int V __attribute__ ((bitwidth(520 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<520 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<520 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(520 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<520 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<521 + 1024 * 0,true> { int V __attribute__ ((bitwidth(521 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<521 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<521 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(521 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<521 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<522 + 1024 * 0,true> { int V __attribute__ ((bitwidth(522 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<522 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<522 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(522 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<522 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<523 + 1024 * 0,true> { int V __attribute__ ((bitwidth(523 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<523 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<523 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(523 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<523 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<524 + 1024 * 0,true> { int V __attribute__ ((bitwidth(524 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<524 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<524 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(524 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<524 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<525 + 1024 * 0,true> { int V __attribute__ ((bitwidth(525 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<525 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<525 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(525 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<525 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<526 + 1024 * 0,true> { int V __attribute__ ((bitwidth(526 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<526 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<526 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(526 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<526 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<527 + 1024 * 0,true> { int V __attribute__ ((bitwidth(527 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<527 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<527 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(527 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<527 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<528 + 1024 * 0,true> { int V __attribute__ ((bitwidth(528 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<528 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<528 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(528 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<528 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<529 + 1024 * 0,true> { int V __attribute__ ((bitwidth(529 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<529 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<529 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(529 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<529 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<530 + 1024 * 0,true> { int V __attribute__ ((bitwidth(530 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<530 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<530 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(530 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<530 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<531 + 1024 * 0,true> { int V __attribute__ ((bitwidth(531 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<531 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<531 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(531 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<531 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<532 + 1024 * 0,true> { int V __attribute__ ((bitwidth(532 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<532 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<532 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(532 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<532 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<533 + 1024 * 0,true> { int V __attribute__ ((bitwidth(533 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<533 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<533 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(533 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<533 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<534 + 1024 * 0,true> { int V __attribute__ ((bitwidth(534 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<534 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<534 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(534 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<534 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<535 + 1024 * 0,true> { int V __attribute__ ((bitwidth(535 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<535 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<535 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(535 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<535 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<536 + 1024 * 0,true> { int V __attribute__ ((bitwidth(536 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<536 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<536 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(536 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<536 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<537 + 1024 * 0,true> { int V __attribute__ ((bitwidth(537 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<537 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<537 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(537 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<537 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<538 + 1024 * 0,true> { int V __attribute__ ((bitwidth(538 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<538 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<538 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(538 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<538 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<539 + 1024 * 0,true> { int V __attribute__ ((bitwidth(539 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<539 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<539 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(539 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<539 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<540 + 1024 * 0,true> { int V __attribute__ ((bitwidth(540 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<540 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<540 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(540 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<540 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<541 + 1024 * 0,true> { int V __attribute__ ((bitwidth(541 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<541 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<541 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(541 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<541 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<542 + 1024 * 0,true> { int V __attribute__ ((bitwidth(542 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<542 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<542 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(542 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<542 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<543 + 1024 * 0,true> { int V __attribute__ ((bitwidth(543 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<543 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<543 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(543 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<543 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<544 + 1024 * 0,true> { int V __attribute__ ((bitwidth(544 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<544 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<544 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(544 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<544 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<545 + 1024 * 0,true> { int V __attribute__ ((bitwidth(545 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<545 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<545 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(545 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<545 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<546 + 1024 * 0,true> { int V __attribute__ ((bitwidth(546 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<546 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<546 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(546 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<546 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<547 + 1024 * 0,true> { int V __attribute__ ((bitwidth(547 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<547 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<547 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(547 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<547 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<548 + 1024 * 0,true> { int V __attribute__ ((bitwidth(548 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<548 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<548 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(548 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<548 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<549 + 1024 * 0,true> { int V __attribute__ ((bitwidth(549 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<549 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<549 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(549 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<549 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<550 + 1024 * 0,true> { int V __attribute__ ((bitwidth(550 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<550 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<550 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(550 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<550 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<551 + 1024 * 0,true> { int V __attribute__ ((bitwidth(551 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<551 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<551 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(551 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<551 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<552 + 1024 * 0,true> { int V __attribute__ ((bitwidth(552 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<552 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<552 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(552 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<552 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<553 + 1024 * 0,true> { int V __attribute__ ((bitwidth(553 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<553 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<553 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(553 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<553 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<554 + 1024 * 0,true> { int V __attribute__ ((bitwidth(554 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<554 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<554 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(554 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<554 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<555 + 1024 * 0,true> { int V __attribute__ ((bitwidth(555 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<555 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<555 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(555 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<555 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<556 + 1024 * 0,true> { int V __attribute__ ((bitwidth(556 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<556 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<556 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(556 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<556 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<557 + 1024 * 0,true> { int V __attribute__ ((bitwidth(557 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<557 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<557 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(557 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<557 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<558 + 1024 * 0,true> { int V __attribute__ ((bitwidth(558 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<558 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<558 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(558 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<558 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<559 + 1024 * 0,true> { int V __attribute__ ((bitwidth(559 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<559 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<559 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(559 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<559 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<560 + 1024 * 0,true> { int V __attribute__ ((bitwidth(560 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<560 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<560 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(560 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<560 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<561 + 1024 * 0,true> { int V __attribute__ ((bitwidth(561 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<561 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<561 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(561 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<561 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<562 + 1024 * 0,true> { int V __attribute__ ((bitwidth(562 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<562 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<562 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(562 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<562 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<563 + 1024 * 0,true> { int V __attribute__ ((bitwidth(563 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<563 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<563 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(563 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<563 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<564 + 1024 * 0,true> { int V __attribute__ ((bitwidth(564 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<564 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<564 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(564 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<564 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<565 + 1024 * 0,true> { int V __attribute__ ((bitwidth(565 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<565 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<565 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(565 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<565 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<566 + 1024 * 0,true> { int V __attribute__ ((bitwidth(566 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<566 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<566 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(566 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<566 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<567 + 1024 * 0,true> { int V __attribute__ ((bitwidth(567 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<567 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<567 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(567 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<567 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<568 + 1024 * 0,true> { int V __attribute__ ((bitwidth(568 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<568 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<568 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(568 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<568 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<569 + 1024 * 0,true> { int V __attribute__ ((bitwidth(569 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<569 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<569 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(569 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<569 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<570 + 1024 * 0,true> { int V __attribute__ ((bitwidth(570 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<570 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<570 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(570 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<570 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<571 + 1024 * 0,true> { int V __attribute__ ((bitwidth(571 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<571 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<571 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(571 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<571 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<572 + 1024 * 0,true> { int V __attribute__ ((bitwidth(572 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<572 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<572 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(572 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<572 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<573 + 1024 * 0,true> { int V __attribute__ ((bitwidth(573 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<573 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<573 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(573 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<573 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<574 + 1024 * 0,true> { int V __attribute__ ((bitwidth(574 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<574 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<574 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(574 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<574 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<575 + 1024 * 0,true> { int V __attribute__ ((bitwidth(575 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<575 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<575 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(575 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<575 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<576 + 1024 * 0,true> { int V __attribute__ ((bitwidth(576 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<576 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<576 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(576 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<576 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<577 + 1024 * 0,true> { int V __attribute__ ((bitwidth(577 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<577 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<577 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(577 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<577 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<578 + 1024 * 0,true> { int V __attribute__ ((bitwidth(578 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<578 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<578 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(578 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<578 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<579 + 1024 * 0,true> { int V __attribute__ ((bitwidth(579 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<579 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<579 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(579 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<579 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<580 + 1024 * 0,true> { int V __attribute__ ((bitwidth(580 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<580 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<580 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(580 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<580 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<581 + 1024 * 0,true> { int V __attribute__ ((bitwidth(581 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<581 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<581 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(581 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<581 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<582 + 1024 * 0,true> { int V __attribute__ ((bitwidth(582 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<582 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<582 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(582 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<582 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<583 + 1024 * 0,true> { int V __attribute__ ((bitwidth(583 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<583 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<583 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(583 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<583 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<584 + 1024 * 0,true> { int V __attribute__ ((bitwidth(584 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<584 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<584 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(584 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<584 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<585 + 1024 * 0,true> { int V __attribute__ ((bitwidth(585 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<585 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<585 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(585 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<585 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<586 + 1024 * 0,true> { int V __attribute__ ((bitwidth(586 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<586 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<586 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(586 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<586 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<587 + 1024 * 0,true> { int V __attribute__ ((bitwidth(587 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<587 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<587 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(587 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<587 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<588 + 1024 * 0,true> { int V __attribute__ ((bitwidth(588 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<588 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<588 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(588 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<588 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<589 + 1024 * 0,true> { int V __attribute__ ((bitwidth(589 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<589 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<589 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(589 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<589 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<590 + 1024 * 0,true> { int V __attribute__ ((bitwidth(590 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<590 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<590 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(590 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<590 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<591 + 1024 * 0,true> { int V __attribute__ ((bitwidth(591 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<591 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<591 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(591 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<591 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<592 + 1024 * 0,true> { int V __attribute__ ((bitwidth(592 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<592 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<592 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(592 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<592 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<593 + 1024 * 0,true> { int V __attribute__ ((bitwidth(593 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<593 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<593 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(593 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<593 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<594 + 1024 * 0,true> { int V __attribute__ ((bitwidth(594 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<594 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<594 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(594 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<594 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<595 + 1024 * 0,true> { int V __attribute__ ((bitwidth(595 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<595 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<595 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(595 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<595 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<596 + 1024 * 0,true> { int V __attribute__ ((bitwidth(596 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<596 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<596 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(596 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<596 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<597 + 1024 * 0,true> { int V __attribute__ ((bitwidth(597 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<597 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<597 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(597 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<597 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<598 + 1024 * 0,true> { int V __attribute__ ((bitwidth(598 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<598 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<598 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(598 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<598 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<599 + 1024 * 0,true> { int V __attribute__ ((bitwidth(599 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<599 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<599 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(599 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<599 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<600 + 1024 * 0,true> { int V __attribute__ ((bitwidth(600 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<600 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<600 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(600 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<600 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<601 + 1024 * 0,true> { int V __attribute__ ((bitwidth(601 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<601 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<601 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(601 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<601 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<602 + 1024 * 0,true> { int V __attribute__ ((bitwidth(602 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<602 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<602 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(602 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<602 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<603 + 1024 * 0,true> { int V __attribute__ ((bitwidth(603 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<603 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<603 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(603 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<603 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<604 + 1024 * 0,true> { int V __attribute__ ((bitwidth(604 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<604 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<604 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(604 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<604 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<605 + 1024 * 0,true> { int V __attribute__ ((bitwidth(605 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<605 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<605 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(605 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<605 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<606 + 1024 * 0,true> { int V __attribute__ ((bitwidth(606 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<606 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<606 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(606 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<606 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<607 + 1024 * 0,true> { int V __attribute__ ((bitwidth(607 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<607 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<607 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(607 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<607 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<608 + 1024 * 0,true> { int V __attribute__ ((bitwidth(608 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<608 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<608 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(608 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<608 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<609 + 1024 * 0,true> { int V __attribute__ ((bitwidth(609 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<609 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<609 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(609 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<609 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<610 + 1024 * 0,true> { int V __attribute__ ((bitwidth(610 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<610 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<610 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(610 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<610 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<611 + 1024 * 0,true> { int V __attribute__ ((bitwidth(611 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<611 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<611 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(611 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<611 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<612 + 1024 * 0,true> { int V __attribute__ ((bitwidth(612 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<612 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<612 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(612 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<612 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<613 + 1024 * 0,true> { int V __attribute__ ((bitwidth(613 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<613 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<613 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(613 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<613 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<614 + 1024 * 0,true> { int V __attribute__ ((bitwidth(614 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<614 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<614 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(614 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<614 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<615 + 1024 * 0,true> { int V __attribute__ ((bitwidth(615 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<615 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<615 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(615 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<615 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<616 + 1024 * 0,true> { int V __attribute__ ((bitwidth(616 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<616 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<616 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(616 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<616 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<617 + 1024 * 0,true> { int V __attribute__ ((bitwidth(617 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<617 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<617 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(617 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<617 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<618 + 1024 * 0,true> { int V __attribute__ ((bitwidth(618 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<618 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<618 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(618 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<618 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<619 + 1024 * 0,true> { int V __attribute__ ((bitwidth(619 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<619 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<619 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(619 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<619 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<620 + 1024 * 0,true> { int V __attribute__ ((bitwidth(620 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<620 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<620 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(620 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<620 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<621 + 1024 * 0,true> { int V __attribute__ ((bitwidth(621 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<621 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<621 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(621 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<621 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<622 + 1024 * 0,true> { int V __attribute__ ((bitwidth(622 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<622 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<622 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(622 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<622 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<623 + 1024 * 0,true> { int V __attribute__ ((bitwidth(623 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<623 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<623 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(623 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<623 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<624 + 1024 * 0,true> { int V __attribute__ ((bitwidth(624 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<624 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<624 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(624 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<624 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<625 + 1024 * 0,true> { int V __attribute__ ((bitwidth(625 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<625 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<625 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(625 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<625 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<626 + 1024 * 0,true> { int V __attribute__ ((bitwidth(626 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<626 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<626 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(626 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<626 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<627 + 1024 * 0,true> { int V __attribute__ ((bitwidth(627 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<627 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<627 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(627 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<627 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<628 + 1024 * 0,true> { int V __attribute__ ((bitwidth(628 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<628 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<628 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(628 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<628 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<629 + 1024 * 0,true> { int V __attribute__ ((bitwidth(629 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<629 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<629 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(629 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<629 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<630 + 1024 * 0,true> { int V __attribute__ ((bitwidth(630 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<630 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<630 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(630 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<630 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<631 + 1024 * 0,true> { int V __attribute__ ((bitwidth(631 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<631 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<631 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(631 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<631 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<632 + 1024 * 0,true> { int V __attribute__ ((bitwidth(632 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<632 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<632 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(632 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<632 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<633 + 1024 * 0,true> { int V __attribute__ ((bitwidth(633 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<633 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<633 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(633 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<633 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<634 + 1024 * 0,true> { int V __attribute__ ((bitwidth(634 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<634 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<634 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(634 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<634 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<635 + 1024 * 0,true> { int V __attribute__ ((bitwidth(635 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<635 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<635 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(635 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<635 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<636 + 1024 * 0,true> { int V __attribute__ ((bitwidth(636 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<636 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<636 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(636 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<636 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<637 + 1024 * 0,true> { int V __attribute__ ((bitwidth(637 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<637 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<637 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(637 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<637 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<638 + 1024 * 0,true> { int V __attribute__ ((bitwidth(638 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<638 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<638 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(638 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<638 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<639 + 1024 * 0,true> { int V __attribute__ ((bitwidth(639 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<639 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<639 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(639 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<639 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<640 + 1024 * 0,true> { int V __attribute__ ((bitwidth(640 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<640 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<640 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(640 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<640 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<641 + 1024 * 0,true> { int V __attribute__ ((bitwidth(641 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<641 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<641 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(641 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<641 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<642 + 1024 * 0,true> { int V __attribute__ ((bitwidth(642 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<642 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<642 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(642 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<642 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<643 + 1024 * 0,true> { int V __attribute__ ((bitwidth(643 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<643 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<643 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(643 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<643 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<644 + 1024 * 0,true> { int V __attribute__ ((bitwidth(644 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<644 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<644 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(644 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<644 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<645 + 1024 * 0,true> { int V __attribute__ ((bitwidth(645 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<645 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<645 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(645 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<645 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<646 + 1024 * 0,true> { int V __attribute__ ((bitwidth(646 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<646 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<646 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(646 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<646 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<647 + 1024 * 0,true> { int V __attribute__ ((bitwidth(647 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<647 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<647 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(647 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<647 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<648 + 1024 * 0,true> { int V __attribute__ ((bitwidth(648 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<648 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<648 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(648 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<648 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<649 + 1024 * 0,true> { int V __attribute__ ((bitwidth(649 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<649 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<649 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(649 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<649 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<650 + 1024 * 0,true> { int V __attribute__ ((bitwidth(650 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<650 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<650 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(650 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<650 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<651 + 1024 * 0,true> { int V __attribute__ ((bitwidth(651 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<651 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<651 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(651 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<651 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<652 + 1024 * 0,true> { int V __attribute__ ((bitwidth(652 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<652 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<652 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(652 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<652 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<653 + 1024 * 0,true> { int V __attribute__ ((bitwidth(653 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<653 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<653 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(653 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<653 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<654 + 1024 * 0,true> { int V __attribute__ ((bitwidth(654 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<654 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<654 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(654 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<654 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<655 + 1024 * 0,true> { int V __attribute__ ((bitwidth(655 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<655 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<655 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(655 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<655 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<656 + 1024 * 0,true> { int V __attribute__ ((bitwidth(656 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<656 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<656 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(656 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<656 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<657 + 1024 * 0,true> { int V __attribute__ ((bitwidth(657 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<657 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<657 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(657 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<657 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<658 + 1024 * 0,true> { int V __attribute__ ((bitwidth(658 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<658 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<658 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(658 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<658 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<659 + 1024 * 0,true> { int V __attribute__ ((bitwidth(659 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<659 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<659 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(659 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<659 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<660 + 1024 * 0,true> { int V __attribute__ ((bitwidth(660 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<660 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<660 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(660 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<660 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<661 + 1024 * 0,true> { int V __attribute__ ((bitwidth(661 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<661 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<661 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(661 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<661 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<662 + 1024 * 0,true> { int V __attribute__ ((bitwidth(662 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<662 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<662 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(662 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<662 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<663 + 1024 * 0,true> { int V __attribute__ ((bitwidth(663 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<663 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<663 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(663 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<663 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<664 + 1024 * 0,true> { int V __attribute__ ((bitwidth(664 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<664 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<664 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(664 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<664 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<665 + 1024 * 0,true> { int V __attribute__ ((bitwidth(665 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<665 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<665 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(665 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<665 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<666 + 1024 * 0,true> { int V __attribute__ ((bitwidth(666 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<666 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<666 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(666 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<666 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<667 + 1024 * 0,true> { int V __attribute__ ((bitwidth(667 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<667 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<667 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(667 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<667 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<668 + 1024 * 0,true> { int V __attribute__ ((bitwidth(668 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<668 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<668 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(668 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<668 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<669 + 1024 * 0,true> { int V __attribute__ ((bitwidth(669 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<669 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<669 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(669 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<669 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<670 + 1024 * 0,true> { int V __attribute__ ((bitwidth(670 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<670 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<670 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(670 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<670 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<671 + 1024 * 0,true> { int V __attribute__ ((bitwidth(671 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<671 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<671 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(671 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<671 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<672 + 1024 * 0,true> { int V __attribute__ ((bitwidth(672 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<672 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<672 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(672 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<672 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<673 + 1024 * 0,true> { int V __attribute__ ((bitwidth(673 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<673 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<673 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(673 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<673 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<674 + 1024 * 0,true> { int V __attribute__ ((bitwidth(674 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<674 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<674 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(674 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<674 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<675 + 1024 * 0,true> { int V __attribute__ ((bitwidth(675 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<675 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<675 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(675 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<675 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<676 + 1024 * 0,true> { int V __attribute__ ((bitwidth(676 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<676 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<676 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(676 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<676 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<677 + 1024 * 0,true> { int V __attribute__ ((bitwidth(677 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<677 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<677 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(677 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<677 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<678 + 1024 * 0,true> { int V __attribute__ ((bitwidth(678 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<678 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<678 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(678 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<678 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<679 + 1024 * 0,true> { int V __attribute__ ((bitwidth(679 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<679 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<679 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(679 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<679 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<680 + 1024 * 0,true> { int V __attribute__ ((bitwidth(680 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<680 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<680 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(680 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<680 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<681 + 1024 * 0,true> { int V __attribute__ ((bitwidth(681 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<681 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<681 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(681 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<681 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<682 + 1024 * 0,true> { int V __attribute__ ((bitwidth(682 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<682 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<682 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(682 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<682 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<683 + 1024 * 0,true> { int V __attribute__ ((bitwidth(683 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<683 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<683 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(683 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<683 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<684 + 1024 * 0,true> { int V __attribute__ ((bitwidth(684 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<684 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<684 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(684 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<684 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<685 + 1024 * 0,true> { int V __attribute__ ((bitwidth(685 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<685 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<685 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(685 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<685 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<686 + 1024 * 0,true> { int V __attribute__ ((bitwidth(686 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<686 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<686 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(686 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<686 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<687 + 1024 * 0,true> { int V __attribute__ ((bitwidth(687 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<687 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<687 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(687 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<687 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<688 + 1024 * 0,true> { int V __attribute__ ((bitwidth(688 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<688 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<688 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(688 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<688 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<689 + 1024 * 0,true> { int V __attribute__ ((bitwidth(689 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<689 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<689 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(689 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<689 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<690 + 1024 * 0,true> { int V __attribute__ ((bitwidth(690 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<690 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<690 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(690 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<690 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<691 + 1024 * 0,true> { int V __attribute__ ((bitwidth(691 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<691 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<691 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(691 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<691 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<692 + 1024 * 0,true> { int V __attribute__ ((bitwidth(692 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<692 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<692 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(692 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<692 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<693 + 1024 * 0,true> { int V __attribute__ ((bitwidth(693 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<693 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<693 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(693 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<693 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<694 + 1024 * 0,true> { int V __attribute__ ((bitwidth(694 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<694 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<694 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(694 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<694 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<695 + 1024 * 0,true> { int V __attribute__ ((bitwidth(695 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<695 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<695 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(695 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<695 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<696 + 1024 * 0,true> { int V __attribute__ ((bitwidth(696 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<696 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<696 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(696 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<696 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<697 + 1024 * 0,true> { int V __attribute__ ((bitwidth(697 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<697 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<697 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(697 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<697 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<698 + 1024 * 0,true> { int V __attribute__ ((bitwidth(698 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<698 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<698 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(698 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<698 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<699 + 1024 * 0,true> { int V __attribute__ ((bitwidth(699 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<699 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<699 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(699 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<699 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<700 + 1024 * 0,true> { int V __attribute__ ((bitwidth(700 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<700 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<700 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(700 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<700 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<701 + 1024 * 0,true> { int V __attribute__ ((bitwidth(701 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<701 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<701 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(701 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<701 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<702 + 1024 * 0,true> { int V __attribute__ ((bitwidth(702 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<702 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<702 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(702 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<702 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<703 + 1024 * 0,true> { int V __attribute__ ((bitwidth(703 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<703 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<703 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(703 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<703 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<704 + 1024 * 0,true> { int V __attribute__ ((bitwidth(704 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<704 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<704 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(704 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<704 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<705 + 1024 * 0,true> { int V __attribute__ ((bitwidth(705 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<705 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<705 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(705 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<705 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<706 + 1024 * 0,true> { int V __attribute__ ((bitwidth(706 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<706 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<706 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(706 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<706 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<707 + 1024 * 0,true> { int V __attribute__ ((bitwidth(707 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<707 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<707 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(707 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<707 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<708 + 1024 * 0,true> { int V __attribute__ ((bitwidth(708 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<708 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<708 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(708 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<708 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<709 + 1024 * 0,true> { int V __attribute__ ((bitwidth(709 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<709 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<709 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(709 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<709 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<710 + 1024 * 0,true> { int V __attribute__ ((bitwidth(710 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<710 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<710 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(710 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<710 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<711 + 1024 * 0,true> { int V __attribute__ ((bitwidth(711 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<711 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<711 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(711 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<711 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<712 + 1024 * 0,true> { int V __attribute__ ((bitwidth(712 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<712 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<712 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(712 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<712 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<713 + 1024 * 0,true> { int V __attribute__ ((bitwidth(713 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<713 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<713 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(713 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<713 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<714 + 1024 * 0,true> { int V __attribute__ ((bitwidth(714 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<714 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<714 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(714 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<714 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<715 + 1024 * 0,true> { int V __attribute__ ((bitwidth(715 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<715 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<715 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(715 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<715 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<716 + 1024 * 0,true> { int V __attribute__ ((bitwidth(716 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<716 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<716 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(716 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<716 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<717 + 1024 * 0,true> { int V __attribute__ ((bitwidth(717 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<717 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<717 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(717 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<717 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<718 + 1024 * 0,true> { int V __attribute__ ((bitwidth(718 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<718 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<718 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(718 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<718 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<719 + 1024 * 0,true> { int V __attribute__ ((bitwidth(719 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<719 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<719 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(719 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<719 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<720 + 1024 * 0,true> { int V __attribute__ ((bitwidth(720 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<720 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<720 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(720 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<720 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<721 + 1024 * 0,true> { int V __attribute__ ((bitwidth(721 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<721 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<721 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(721 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<721 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<722 + 1024 * 0,true> { int V __attribute__ ((bitwidth(722 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<722 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<722 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(722 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<722 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<723 + 1024 * 0,true> { int V __attribute__ ((bitwidth(723 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<723 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<723 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(723 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<723 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<724 + 1024 * 0,true> { int V __attribute__ ((bitwidth(724 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<724 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<724 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(724 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<724 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<725 + 1024 * 0,true> { int V __attribute__ ((bitwidth(725 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<725 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<725 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(725 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<725 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<726 + 1024 * 0,true> { int V __attribute__ ((bitwidth(726 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<726 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<726 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(726 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<726 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<727 + 1024 * 0,true> { int V __attribute__ ((bitwidth(727 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<727 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<727 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(727 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<727 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<728 + 1024 * 0,true> { int V __attribute__ ((bitwidth(728 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<728 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<728 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(728 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<728 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<729 + 1024 * 0,true> { int V __attribute__ ((bitwidth(729 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<729 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<729 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(729 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<729 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<730 + 1024 * 0,true> { int V __attribute__ ((bitwidth(730 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<730 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<730 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(730 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<730 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<731 + 1024 * 0,true> { int V __attribute__ ((bitwidth(731 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<731 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<731 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(731 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<731 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<732 + 1024 * 0,true> { int V __attribute__ ((bitwidth(732 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<732 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<732 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(732 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<732 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<733 + 1024 * 0,true> { int V __attribute__ ((bitwidth(733 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<733 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<733 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(733 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<733 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<734 + 1024 * 0,true> { int V __attribute__ ((bitwidth(734 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<734 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<734 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(734 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<734 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<735 + 1024 * 0,true> { int V __attribute__ ((bitwidth(735 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<735 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<735 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(735 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<735 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<736 + 1024 * 0,true> { int V __attribute__ ((bitwidth(736 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<736 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<736 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(736 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<736 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<737 + 1024 * 0,true> { int V __attribute__ ((bitwidth(737 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<737 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<737 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(737 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<737 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<738 + 1024 * 0,true> { int V __attribute__ ((bitwidth(738 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<738 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<738 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(738 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<738 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<739 + 1024 * 0,true> { int V __attribute__ ((bitwidth(739 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<739 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<739 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(739 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<739 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<740 + 1024 * 0,true> { int V __attribute__ ((bitwidth(740 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<740 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<740 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(740 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<740 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<741 + 1024 * 0,true> { int V __attribute__ ((bitwidth(741 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<741 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<741 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(741 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<741 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<742 + 1024 * 0,true> { int V __attribute__ ((bitwidth(742 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<742 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<742 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(742 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<742 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<743 + 1024 * 0,true> { int V __attribute__ ((bitwidth(743 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<743 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<743 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(743 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<743 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<744 + 1024 * 0,true> { int V __attribute__ ((bitwidth(744 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<744 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<744 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(744 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<744 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<745 + 1024 * 0,true> { int V __attribute__ ((bitwidth(745 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<745 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<745 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(745 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<745 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<746 + 1024 * 0,true> { int V __attribute__ ((bitwidth(746 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<746 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<746 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(746 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<746 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<747 + 1024 * 0,true> { int V __attribute__ ((bitwidth(747 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<747 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<747 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(747 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<747 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<748 + 1024 * 0,true> { int V __attribute__ ((bitwidth(748 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<748 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<748 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(748 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<748 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<749 + 1024 * 0,true> { int V __attribute__ ((bitwidth(749 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<749 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<749 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(749 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<749 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<750 + 1024 * 0,true> { int V __attribute__ ((bitwidth(750 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<750 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<750 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(750 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<750 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<751 + 1024 * 0,true> { int V __attribute__ ((bitwidth(751 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<751 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<751 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(751 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<751 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<752 + 1024 * 0,true> { int V __attribute__ ((bitwidth(752 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<752 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<752 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(752 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<752 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<753 + 1024 * 0,true> { int V __attribute__ ((bitwidth(753 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<753 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<753 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(753 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<753 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<754 + 1024 * 0,true> { int V __attribute__ ((bitwidth(754 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<754 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<754 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(754 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<754 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<755 + 1024 * 0,true> { int V __attribute__ ((bitwidth(755 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<755 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<755 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(755 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<755 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<756 + 1024 * 0,true> { int V __attribute__ ((bitwidth(756 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<756 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<756 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(756 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<756 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<757 + 1024 * 0,true> { int V __attribute__ ((bitwidth(757 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<757 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<757 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(757 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<757 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<758 + 1024 * 0,true> { int V __attribute__ ((bitwidth(758 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<758 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<758 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(758 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<758 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<759 + 1024 * 0,true> { int V __attribute__ ((bitwidth(759 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<759 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<759 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(759 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<759 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<760 + 1024 * 0,true> { int V __attribute__ ((bitwidth(760 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<760 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<760 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(760 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<760 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<761 + 1024 * 0,true> { int V __attribute__ ((bitwidth(761 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<761 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<761 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(761 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<761 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<762 + 1024 * 0,true> { int V __attribute__ ((bitwidth(762 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<762 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<762 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(762 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<762 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<763 + 1024 * 0,true> { int V __attribute__ ((bitwidth(763 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<763 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<763 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(763 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<763 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<764 + 1024 * 0,true> { int V __attribute__ ((bitwidth(764 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<764 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<764 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(764 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<764 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<765 + 1024 * 0,true> { int V __attribute__ ((bitwidth(765 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<765 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<765 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(765 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<765 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<766 + 1024 * 0,true> { int V __attribute__ ((bitwidth(766 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<766 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<766 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(766 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<766 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<767 + 1024 * 0,true> { int V __attribute__ ((bitwidth(767 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<767 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<767 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(767 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<767 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<768 + 1024 * 0,true> { int V __attribute__ ((bitwidth(768 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<768 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<768 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(768 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<768 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<769 + 1024 * 0,true> { int V __attribute__ ((bitwidth(769 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<769 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<769 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(769 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<769 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<770 + 1024 * 0,true> { int V __attribute__ ((bitwidth(770 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<770 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<770 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(770 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<770 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<771 + 1024 * 0,true> { int V __attribute__ ((bitwidth(771 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<771 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<771 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(771 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<771 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<772 + 1024 * 0,true> { int V __attribute__ ((bitwidth(772 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<772 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<772 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(772 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<772 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<773 + 1024 * 0,true> { int V __attribute__ ((bitwidth(773 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<773 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<773 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(773 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<773 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<774 + 1024 * 0,true> { int V __attribute__ ((bitwidth(774 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<774 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<774 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(774 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<774 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<775 + 1024 * 0,true> { int V __attribute__ ((bitwidth(775 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<775 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<775 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(775 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<775 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<776 + 1024 * 0,true> { int V __attribute__ ((bitwidth(776 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<776 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<776 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(776 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<776 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<777 + 1024 * 0,true> { int V __attribute__ ((bitwidth(777 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<777 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<777 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(777 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<777 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<778 + 1024 * 0,true> { int V __attribute__ ((bitwidth(778 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<778 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<778 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(778 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<778 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<779 + 1024 * 0,true> { int V __attribute__ ((bitwidth(779 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<779 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<779 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(779 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<779 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<780 + 1024 * 0,true> { int V __attribute__ ((bitwidth(780 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<780 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<780 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(780 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<780 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<781 + 1024 * 0,true> { int V __attribute__ ((bitwidth(781 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<781 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<781 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(781 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<781 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<782 + 1024 * 0,true> { int V __attribute__ ((bitwidth(782 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<782 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<782 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(782 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<782 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<783 + 1024 * 0,true> { int V __attribute__ ((bitwidth(783 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<783 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<783 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(783 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<783 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<784 + 1024 * 0,true> { int V __attribute__ ((bitwidth(784 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<784 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<784 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(784 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<784 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<785 + 1024 * 0,true> { int V __attribute__ ((bitwidth(785 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<785 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<785 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(785 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<785 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<786 + 1024 * 0,true> { int V __attribute__ ((bitwidth(786 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<786 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<786 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(786 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<786 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<787 + 1024 * 0,true> { int V __attribute__ ((bitwidth(787 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<787 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<787 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(787 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<787 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<788 + 1024 * 0,true> { int V __attribute__ ((bitwidth(788 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<788 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<788 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(788 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<788 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<789 + 1024 * 0,true> { int V __attribute__ ((bitwidth(789 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<789 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<789 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(789 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<789 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<790 + 1024 * 0,true> { int V __attribute__ ((bitwidth(790 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<790 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<790 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(790 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<790 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<791 + 1024 * 0,true> { int V __attribute__ ((bitwidth(791 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<791 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<791 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(791 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<791 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<792 + 1024 * 0,true> { int V __attribute__ ((bitwidth(792 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<792 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<792 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(792 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<792 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<793 + 1024 * 0,true> { int V __attribute__ ((bitwidth(793 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<793 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<793 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(793 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<793 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<794 + 1024 * 0,true> { int V __attribute__ ((bitwidth(794 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<794 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<794 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(794 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<794 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<795 + 1024 * 0,true> { int V __attribute__ ((bitwidth(795 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<795 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<795 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(795 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<795 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<796 + 1024 * 0,true> { int V __attribute__ ((bitwidth(796 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<796 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<796 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(796 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<796 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<797 + 1024 * 0,true> { int V __attribute__ ((bitwidth(797 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<797 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<797 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(797 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<797 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<798 + 1024 * 0,true> { int V __attribute__ ((bitwidth(798 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<798 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<798 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(798 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<798 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<799 + 1024 * 0,true> { int V __attribute__ ((bitwidth(799 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<799 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<799 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(799 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<799 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<800 + 1024 * 0,true> { int V __attribute__ ((bitwidth(800 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<800 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<800 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(800 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<800 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<801 + 1024 * 0,true> { int V __attribute__ ((bitwidth(801 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<801 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<801 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(801 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<801 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<802 + 1024 * 0,true> { int V __attribute__ ((bitwidth(802 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<802 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<802 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(802 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<802 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<803 + 1024 * 0,true> { int V __attribute__ ((bitwidth(803 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<803 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<803 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(803 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<803 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<804 + 1024 * 0,true> { int V __attribute__ ((bitwidth(804 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<804 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<804 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(804 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<804 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<805 + 1024 * 0,true> { int V __attribute__ ((bitwidth(805 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<805 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<805 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(805 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<805 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<806 + 1024 * 0,true> { int V __attribute__ ((bitwidth(806 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<806 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<806 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(806 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<806 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<807 + 1024 * 0,true> { int V __attribute__ ((bitwidth(807 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<807 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<807 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(807 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<807 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<808 + 1024 * 0,true> { int V __attribute__ ((bitwidth(808 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<808 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<808 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(808 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<808 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<809 + 1024 * 0,true> { int V __attribute__ ((bitwidth(809 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<809 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<809 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(809 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<809 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<810 + 1024 * 0,true> { int V __attribute__ ((bitwidth(810 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<810 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<810 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(810 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<810 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<811 + 1024 * 0,true> { int V __attribute__ ((bitwidth(811 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<811 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<811 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(811 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<811 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<812 + 1024 * 0,true> { int V __attribute__ ((bitwidth(812 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<812 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<812 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(812 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<812 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<813 + 1024 * 0,true> { int V __attribute__ ((bitwidth(813 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<813 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<813 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(813 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<813 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<814 + 1024 * 0,true> { int V __attribute__ ((bitwidth(814 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<814 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<814 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(814 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<814 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<815 + 1024 * 0,true> { int V __attribute__ ((bitwidth(815 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<815 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<815 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(815 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<815 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<816 + 1024 * 0,true> { int V __attribute__ ((bitwidth(816 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<816 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<816 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(816 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<816 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<817 + 1024 * 0,true> { int V __attribute__ ((bitwidth(817 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<817 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<817 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(817 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<817 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<818 + 1024 * 0,true> { int V __attribute__ ((bitwidth(818 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<818 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<818 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(818 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<818 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<819 + 1024 * 0,true> { int V __attribute__ ((bitwidth(819 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<819 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<819 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(819 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<819 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<820 + 1024 * 0,true> { int V __attribute__ ((bitwidth(820 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<820 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<820 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(820 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<820 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<821 + 1024 * 0,true> { int V __attribute__ ((bitwidth(821 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<821 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<821 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(821 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<821 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<822 + 1024 * 0,true> { int V __attribute__ ((bitwidth(822 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<822 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<822 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(822 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<822 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<823 + 1024 * 0,true> { int V __attribute__ ((bitwidth(823 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<823 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<823 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(823 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<823 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<824 + 1024 * 0,true> { int V __attribute__ ((bitwidth(824 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<824 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<824 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(824 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<824 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<825 + 1024 * 0,true> { int V __attribute__ ((bitwidth(825 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<825 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<825 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(825 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<825 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<826 + 1024 * 0,true> { int V __attribute__ ((bitwidth(826 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<826 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<826 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(826 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<826 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<827 + 1024 * 0,true> { int V __attribute__ ((bitwidth(827 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<827 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<827 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(827 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<827 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<828 + 1024 * 0,true> { int V __attribute__ ((bitwidth(828 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<828 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<828 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(828 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<828 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<829 + 1024 * 0,true> { int V __attribute__ ((bitwidth(829 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<829 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<829 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(829 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<829 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<830 + 1024 * 0,true> { int V __attribute__ ((bitwidth(830 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<830 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<830 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(830 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<830 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<831 + 1024 * 0,true> { int V __attribute__ ((bitwidth(831 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<831 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<831 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(831 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<831 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<832 + 1024 * 0,true> { int V __attribute__ ((bitwidth(832 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<832 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<832 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(832 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<832 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<833 + 1024 * 0,true> { int V __attribute__ ((bitwidth(833 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<833 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<833 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(833 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<833 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<834 + 1024 * 0,true> { int V __attribute__ ((bitwidth(834 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<834 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<834 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(834 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<834 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<835 + 1024 * 0,true> { int V __attribute__ ((bitwidth(835 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<835 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<835 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(835 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<835 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<836 + 1024 * 0,true> { int V __attribute__ ((bitwidth(836 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<836 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<836 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(836 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<836 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<837 + 1024 * 0,true> { int V __attribute__ ((bitwidth(837 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<837 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<837 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(837 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<837 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<838 + 1024 * 0,true> { int V __attribute__ ((bitwidth(838 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<838 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<838 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(838 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<838 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<839 + 1024 * 0,true> { int V __attribute__ ((bitwidth(839 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<839 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<839 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(839 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<839 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<840 + 1024 * 0,true> { int V __attribute__ ((bitwidth(840 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<840 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<840 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(840 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<840 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<841 + 1024 * 0,true> { int V __attribute__ ((bitwidth(841 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<841 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<841 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(841 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<841 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<842 + 1024 * 0,true> { int V __attribute__ ((bitwidth(842 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<842 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<842 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(842 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<842 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<843 + 1024 * 0,true> { int V __attribute__ ((bitwidth(843 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<843 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<843 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(843 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<843 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<844 + 1024 * 0,true> { int V __attribute__ ((bitwidth(844 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<844 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<844 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(844 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<844 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<845 + 1024 * 0,true> { int V __attribute__ ((bitwidth(845 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<845 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<845 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(845 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<845 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<846 + 1024 * 0,true> { int V __attribute__ ((bitwidth(846 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<846 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<846 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(846 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<846 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<847 + 1024 * 0,true> { int V __attribute__ ((bitwidth(847 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<847 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<847 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(847 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<847 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<848 + 1024 * 0,true> { int V __attribute__ ((bitwidth(848 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<848 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<848 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(848 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<848 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<849 + 1024 * 0,true> { int V __attribute__ ((bitwidth(849 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<849 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<849 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(849 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<849 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<850 + 1024 * 0,true> { int V __attribute__ ((bitwidth(850 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<850 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<850 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(850 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<850 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<851 + 1024 * 0,true> { int V __attribute__ ((bitwidth(851 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<851 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<851 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(851 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<851 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<852 + 1024 * 0,true> { int V __attribute__ ((bitwidth(852 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<852 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<852 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(852 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<852 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<853 + 1024 * 0,true> { int V __attribute__ ((bitwidth(853 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<853 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<853 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(853 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<853 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<854 + 1024 * 0,true> { int V __attribute__ ((bitwidth(854 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<854 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<854 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(854 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<854 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<855 + 1024 * 0,true> { int V __attribute__ ((bitwidth(855 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<855 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<855 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(855 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<855 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<856 + 1024 * 0,true> { int V __attribute__ ((bitwidth(856 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<856 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<856 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(856 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<856 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<857 + 1024 * 0,true> { int V __attribute__ ((bitwidth(857 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<857 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<857 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(857 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<857 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<858 + 1024 * 0,true> { int V __attribute__ ((bitwidth(858 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<858 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<858 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(858 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<858 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<859 + 1024 * 0,true> { int V __attribute__ ((bitwidth(859 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<859 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<859 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(859 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<859 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<860 + 1024 * 0,true> { int V __attribute__ ((bitwidth(860 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<860 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<860 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(860 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<860 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<861 + 1024 * 0,true> { int V __attribute__ ((bitwidth(861 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<861 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<861 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(861 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<861 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<862 + 1024 * 0,true> { int V __attribute__ ((bitwidth(862 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<862 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<862 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(862 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<862 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<863 + 1024 * 0,true> { int V __attribute__ ((bitwidth(863 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<863 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<863 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(863 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<863 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<864 + 1024 * 0,true> { int V __attribute__ ((bitwidth(864 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<864 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<864 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(864 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<864 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<865 + 1024 * 0,true> { int V __attribute__ ((bitwidth(865 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<865 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<865 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(865 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<865 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<866 + 1024 * 0,true> { int V __attribute__ ((bitwidth(866 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<866 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<866 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(866 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<866 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<867 + 1024 * 0,true> { int V __attribute__ ((bitwidth(867 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<867 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<867 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(867 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<867 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<868 + 1024 * 0,true> { int V __attribute__ ((bitwidth(868 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<868 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<868 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(868 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<868 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<869 + 1024 * 0,true> { int V __attribute__ ((bitwidth(869 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<869 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<869 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(869 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<869 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<870 + 1024 * 0,true> { int V __attribute__ ((bitwidth(870 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<870 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<870 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(870 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<870 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<871 + 1024 * 0,true> { int V __attribute__ ((bitwidth(871 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<871 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<871 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(871 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<871 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<872 + 1024 * 0,true> { int V __attribute__ ((bitwidth(872 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<872 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<872 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(872 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<872 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<873 + 1024 * 0,true> { int V __attribute__ ((bitwidth(873 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<873 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<873 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(873 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<873 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<874 + 1024 * 0,true> { int V __attribute__ ((bitwidth(874 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<874 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<874 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(874 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<874 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<875 + 1024 * 0,true> { int V __attribute__ ((bitwidth(875 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<875 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<875 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(875 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<875 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<876 + 1024 * 0,true> { int V __attribute__ ((bitwidth(876 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<876 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<876 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(876 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<876 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<877 + 1024 * 0,true> { int V __attribute__ ((bitwidth(877 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<877 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<877 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(877 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<877 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<878 + 1024 * 0,true> { int V __attribute__ ((bitwidth(878 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<878 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<878 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(878 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<878 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<879 + 1024 * 0,true> { int V __attribute__ ((bitwidth(879 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<879 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<879 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(879 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<879 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<880 + 1024 * 0,true> { int V __attribute__ ((bitwidth(880 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<880 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<880 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(880 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<880 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<881 + 1024 * 0,true> { int V __attribute__ ((bitwidth(881 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<881 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<881 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(881 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<881 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<882 + 1024 * 0,true> { int V __attribute__ ((bitwidth(882 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<882 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<882 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(882 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<882 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<883 + 1024 * 0,true> { int V __attribute__ ((bitwidth(883 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<883 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<883 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(883 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<883 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<884 + 1024 * 0,true> { int V __attribute__ ((bitwidth(884 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<884 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<884 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(884 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<884 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<885 + 1024 * 0,true> { int V __attribute__ ((bitwidth(885 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<885 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<885 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(885 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<885 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<886 + 1024 * 0,true> { int V __attribute__ ((bitwidth(886 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<886 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<886 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(886 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<886 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<887 + 1024 * 0,true> { int V __attribute__ ((bitwidth(887 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<887 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<887 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(887 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<887 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<888 + 1024 * 0,true> { int V __attribute__ ((bitwidth(888 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<888 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<888 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(888 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<888 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<889 + 1024 * 0,true> { int V __attribute__ ((bitwidth(889 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<889 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<889 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(889 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<889 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<890 + 1024 * 0,true> { int V __attribute__ ((bitwidth(890 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<890 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<890 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(890 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<890 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<891 + 1024 * 0,true> { int V __attribute__ ((bitwidth(891 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<891 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<891 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(891 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<891 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<892 + 1024 * 0,true> { int V __attribute__ ((bitwidth(892 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<892 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<892 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(892 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<892 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<893 + 1024 * 0,true> { int V __attribute__ ((bitwidth(893 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<893 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<893 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(893 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<893 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<894 + 1024 * 0,true> { int V __attribute__ ((bitwidth(894 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<894 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<894 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(894 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<894 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<895 + 1024 * 0,true> { int V __attribute__ ((bitwidth(895 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<895 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<895 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(895 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<895 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<896 + 1024 * 0,true> { int V __attribute__ ((bitwidth(896 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<896 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<896 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(896 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<896 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<897 + 1024 * 0,true> { int V __attribute__ ((bitwidth(897 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<897 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<897 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(897 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<897 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<898 + 1024 * 0,true> { int V __attribute__ ((bitwidth(898 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<898 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<898 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(898 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<898 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<899 + 1024 * 0,true> { int V __attribute__ ((bitwidth(899 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<899 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<899 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(899 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<899 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<900 + 1024 * 0,true> { int V __attribute__ ((bitwidth(900 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<900 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<900 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(900 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<900 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<901 + 1024 * 0,true> { int V __attribute__ ((bitwidth(901 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<901 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<901 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(901 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<901 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<902 + 1024 * 0,true> { int V __attribute__ ((bitwidth(902 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<902 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<902 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(902 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<902 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<903 + 1024 * 0,true> { int V __attribute__ ((bitwidth(903 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<903 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<903 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(903 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<903 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<904 + 1024 * 0,true> { int V __attribute__ ((bitwidth(904 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<904 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<904 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(904 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<904 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<905 + 1024 * 0,true> { int V __attribute__ ((bitwidth(905 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<905 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<905 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(905 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<905 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<906 + 1024 * 0,true> { int V __attribute__ ((bitwidth(906 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<906 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<906 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(906 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<906 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<907 + 1024 * 0,true> { int V __attribute__ ((bitwidth(907 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<907 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<907 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(907 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<907 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<908 + 1024 * 0,true> { int V __attribute__ ((bitwidth(908 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<908 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<908 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(908 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<908 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<909 + 1024 * 0,true> { int V __attribute__ ((bitwidth(909 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<909 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<909 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(909 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<909 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<910 + 1024 * 0,true> { int V __attribute__ ((bitwidth(910 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<910 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<910 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(910 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<910 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<911 + 1024 * 0,true> { int V __attribute__ ((bitwidth(911 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<911 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<911 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(911 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<911 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<912 + 1024 * 0,true> { int V __attribute__ ((bitwidth(912 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<912 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<912 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(912 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<912 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<913 + 1024 * 0,true> { int V __attribute__ ((bitwidth(913 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<913 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<913 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(913 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<913 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<914 + 1024 * 0,true> { int V __attribute__ ((bitwidth(914 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<914 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<914 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(914 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<914 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<915 + 1024 * 0,true> { int V __attribute__ ((bitwidth(915 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<915 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<915 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(915 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<915 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<916 + 1024 * 0,true> { int V __attribute__ ((bitwidth(916 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<916 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<916 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(916 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<916 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<917 + 1024 * 0,true> { int V __attribute__ ((bitwidth(917 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<917 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<917 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(917 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<917 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<918 + 1024 * 0,true> { int V __attribute__ ((bitwidth(918 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<918 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<918 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(918 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<918 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<919 + 1024 * 0,true> { int V __attribute__ ((bitwidth(919 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<919 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<919 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(919 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<919 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<920 + 1024 * 0,true> { int V __attribute__ ((bitwidth(920 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<920 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<920 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(920 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<920 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<921 + 1024 * 0,true> { int V __attribute__ ((bitwidth(921 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<921 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<921 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(921 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<921 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<922 + 1024 * 0,true> { int V __attribute__ ((bitwidth(922 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<922 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<922 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(922 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<922 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<923 + 1024 * 0,true> { int V __attribute__ ((bitwidth(923 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<923 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<923 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(923 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<923 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<924 + 1024 * 0,true> { int V __attribute__ ((bitwidth(924 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<924 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<924 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(924 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<924 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<925 + 1024 * 0,true> { int V __attribute__ ((bitwidth(925 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<925 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<925 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(925 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<925 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<926 + 1024 * 0,true> { int V __attribute__ ((bitwidth(926 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<926 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<926 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(926 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<926 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<927 + 1024 * 0,true> { int V __attribute__ ((bitwidth(927 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<927 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<927 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(927 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<927 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<928 + 1024 * 0,true> { int V __attribute__ ((bitwidth(928 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<928 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<928 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(928 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<928 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<929 + 1024 * 0,true> { int V __attribute__ ((bitwidth(929 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<929 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<929 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(929 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<929 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<930 + 1024 * 0,true> { int V __attribute__ ((bitwidth(930 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<930 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<930 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(930 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<930 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<931 + 1024 * 0,true> { int V __attribute__ ((bitwidth(931 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<931 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<931 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(931 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<931 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<932 + 1024 * 0,true> { int V __attribute__ ((bitwidth(932 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<932 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<932 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(932 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<932 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<933 + 1024 * 0,true> { int V __attribute__ ((bitwidth(933 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<933 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<933 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(933 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<933 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<934 + 1024 * 0,true> { int V __attribute__ ((bitwidth(934 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<934 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<934 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(934 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<934 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<935 + 1024 * 0,true> { int V __attribute__ ((bitwidth(935 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<935 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<935 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(935 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<935 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<936 + 1024 * 0,true> { int V __attribute__ ((bitwidth(936 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<936 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<936 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(936 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<936 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<937 + 1024 * 0,true> { int V __attribute__ ((bitwidth(937 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<937 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<937 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(937 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<937 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<938 + 1024 * 0,true> { int V __attribute__ ((bitwidth(938 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<938 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<938 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(938 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<938 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<939 + 1024 * 0,true> { int V __attribute__ ((bitwidth(939 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<939 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<939 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(939 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<939 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<940 + 1024 * 0,true> { int V __attribute__ ((bitwidth(940 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<940 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<940 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(940 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<940 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<941 + 1024 * 0,true> { int V __attribute__ ((bitwidth(941 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<941 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<941 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(941 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<941 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<942 + 1024 * 0,true> { int V __attribute__ ((bitwidth(942 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<942 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<942 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(942 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<942 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<943 + 1024 * 0,true> { int V __attribute__ ((bitwidth(943 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<943 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<943 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(943 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<943 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<944 + 1024 * 0,true> { int V __attribute__ ((bitwidth(944 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<944 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<944 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(944 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<944 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<945 + 1024 * 0,true> { int V __attribute__ ((bitwidth(945 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<945 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<945 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(945 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<945 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<946 + 1024 * 0,true> { int V __attribute__ ((bitwidth(946 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<946 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<946 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(946 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<946 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<947 + 1024 * 0,true> { int V __attribute__ ((bitwidth(947 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<947 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<947 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(947 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<947 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<948 + 1024 * 0,true> { int V __attribute__ ((bitwidth(948 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<948 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<948 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(948 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<948 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<949 + 1024 * 0,true> { int V __attribute__ ((bitwidth(949 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<949 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<949 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(949 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<949 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<950 + 1024 * 0,true> { int V __attribute__ ((bitwidth(950 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<950 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<950 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(950 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<950 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<951 + 1024 * 0,true> { int V __attribute__ ((bitwidth(951 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<951 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<951 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(951 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<951 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<952 + 1024 * 0,true> { int V __attribute__ ((bitwidth(952 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<952 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<952 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(952 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<952 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<953 + 1024 * 0,true> { int V __attribute__ ((bitwidth(953 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<953 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<953 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(953 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<953 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<954 + 1024 * 0,true> { int V __attribute__ ((bitwidth(954 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<954 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<954 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(954 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<954 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<955 + 1024 * 0,true> { int V __attribute__ ((bitwidth(955 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<955 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<955 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(955 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<955 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<956 + 1024 * 0,true> { int V __attribute__ ((bitwidth(956 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<956 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<956 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(956 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<956 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<957 + 1024 * 0,true> { int V __attribute__ ((bitwidth(957 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<957 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<957 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(957 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<957 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<958 + 1024 * 0,true> { int V __attribute__ ((bitwidth(958 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<958 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<958 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(958 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<958 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<959 + 1024 * 0,true> { int V __attribute__ ((bitwidth(959 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<959 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<959 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(959 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<959 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<960 + 1024 * 0,true> { int V __attribute__ ((bitwidth(960 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<960 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<960 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(960 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<960 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<961 + 1024 * 0,true> { int V __attribute__ ((bitwidth(961 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<961 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<961 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(961 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<961 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<962 + 1024 * 0,true> { int V __attribute__ ((bitwidth(962 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<962 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<962 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(962 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<962 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<963 + 1024 * 0,true> { int V __attribute__ ((bitwidth(963 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<963 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<963 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(963 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<963 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<964 + 1024 * 0,true> { int V __attribute__ ((bitwidth(964 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<964 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<964 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(964 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<964 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<965 + 1024 * 0,true> { int V __attribute__ ((bitwidth(965 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<965 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<965 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(965 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<965 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<966 + 1024 * 0,true> { int V __attribute__ ((bitwidth(966 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<966 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<966 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(966 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<966 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<967 + 1024 * 0,true> { int V __attribute__ ((bitwidth(967 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<967 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<967 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(967 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<967 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<968 + 1024 * 0,true> { int V __attribute__ ((bitwidth(968 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<968 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<968 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(968 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<968 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<969 + 1024 * 0,true> { int V __attribute__ ((bitwidth(969 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<969 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<969 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(969 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<969 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<970 + 1024 * 0,true> { int V __attribute__ ((bitwidth(970 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<970 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<970 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(970 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<970 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<971 + 1024 * 0,true> { int V __attribute__ ((bitwidth(971 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<971 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<971 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(971 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<971 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<972 + 1024 * 0,true> { int V __attribute__ ((bitwidth(972 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<972 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<972 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(972 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<972 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<973 + 1024 * 0,true> { int V __attribute__ ((bitwidth(973 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<973 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<973 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(973 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<973 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<974 + 1024 * 0,true> { int V __attribute__ ((bitwidth(974 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<974 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<974 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(974 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<974 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<975 + 1024 * 0,true> { int V __attribute__ ((bitwidth(975 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<975 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<975 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(975 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<975 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<976 + 1024 * 0,true> { int V __attribute__ ((bitwidth(976 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<976 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<976 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(976 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<976 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<977 + 1024 * 0,true> { int V __attribute__ ((bitwidth(977 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<977 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<977 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(977 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<977 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<978 + 1024 * 0,true> { int V __attribute__ ((bitwidth(978 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<978 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<978 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(978 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<978 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<979 + 1024 * 0,true> { int V __attribute__ ((bitwidth(979 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<979 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<979 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(979 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<979 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<980 + 1024 * 0,true> { int V __attribute__ ((bitwidth(980 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<980 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<980 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(980 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<980 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<981 + 1024 * 0,true> { int V __attribute__ ((bitwidth(981 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<981 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<981 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(981 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<981 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<982 + 1024 * 0,true> { int V __attribute__ ((bitwidth(982 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<982 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<982 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(982 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<982 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<983 + 1024 * 0,true> { int V __attribute__ ((bitwidth(983 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<983 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<983 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(983 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<983 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<984 + 1024 * 0,true> { int V __attribute__ ((bitwidth(984 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<984 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<984 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(984 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<984 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<985 + 1024 * 0,true> { int V __attribute__ ((bitwidth(985 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<985 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<985 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(985 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<985 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<986 + 1024 * 0,true> { int V __attribute__ ((bitwidth(986 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<986 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<986 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(986 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<986 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<987 + 1024 * 0,true> { int V __attribute__ ((bitwidth(987 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<987 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<987 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(987 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<987 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<988 + 1024 * 0,true> { int V __attribute__ ((bitwidth(988 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<988 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<988 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(988 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<988 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<989 + 1024 * 0,true> { int V __attribute__ ((bitwidth(989 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<989 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<989 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(989 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<989 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<990 + 1024 * 0,true> { int V __attribute__ ((bitwidth(990 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<990 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<990 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(990 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<990 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<991 + 1024 * 0,true> { int V __attribute__ ((bitwidth(991 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<991 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<991 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(991 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<991 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<992 + 1024 * 0,true> { int V __attribute__ ((bitwidth(992 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<992 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<992 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(992 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<992 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<993 + 1024 * 0,true> { int V __attribute__ ((bitwidth(993 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<993 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<993 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(993 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<993 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<994 + 1024 * 0,true> { int V __attribute__ ((bitwidth(994 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<994 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<994 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(994 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<994 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<995 + 1024 * 0,true> { int V __attribute__ ((bitwidth(995 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<995 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<995 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(995 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<995 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<996 + 1024 * 0,true> { int V __attribute__ ((bitwidth(996 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<996 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<996 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(996 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<996 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<997 + 1024 * 0,true> { int V __attribute__ ((bitwidth(997 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<997 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<997 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(997 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<997 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<998 + 1024 * 0,true> { int V __attribute__ ((bitwidth(998 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<998 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<998 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(998 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<998 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<999 + 1024 * 0,true> { int V __attribute__ ((bitwidth(999 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<999 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<999 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(999 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<999 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1000 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1000 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1000 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1000 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1000 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1000 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1001 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1001 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1001 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1001 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1001 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1001 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1002 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1002 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1002 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1002 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1002 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1002 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1003 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1003 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1003 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1003 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1003 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1003 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1004 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1004 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1004 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1004 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1004 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1004 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1005 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1005 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1005 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1005 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1005 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1005 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1006 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1006 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1006 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1006 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1006 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1006 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1007 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1007 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1007 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1007 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1007 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1007 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1008 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1008 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1008 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1008 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1008 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1008 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1009 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1009 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1009 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1009 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1009 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1009 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1010 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1010 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1010 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1010 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1010 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1010 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1011 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1011 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1011 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1011 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1011 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1011 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1012 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1012 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1012 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1012 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1012 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1012 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1013 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1013 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1013 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1013 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1013 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1013 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1014 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1014 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1014 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1014 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1014 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1014 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1015 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1015 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1015 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1015 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1015 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1015 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1016 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1016 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1016 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1016 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1016 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1016 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1017 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1017 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1017 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1017 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1017 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1017 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1018 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1018 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1018 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1018 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1018 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1018 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1019 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1019 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1019 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1019 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1019 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1019 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1020 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1020 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1020 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1020 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1020 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1020 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1021 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1021 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1021 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1021 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1021 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1021 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1022 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1022 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1022 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1022 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1022 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1022 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1023 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1023 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1023 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1023 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1023 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1023 + 1024 * 0 , false>() { }; }; template<> struct ssdm_int<1024 + 1024 * 0,true> { int V __attribute__ ((bitwidth(1024 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1024 + 1024 * 0 ,true>() { }; }; template<> struct ssdm_int<1024 + 1024 * 0, false> { unsigned int V __attribute__ ((bitwidth(1024 + 1024 * 0))); inline __attribute__((always_inline)) ssdm_int<1024 + 1024 * 0 , false>() { }; }; #pragma line 185 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" 2 #pragma line 603 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" enum BaseMode { SC_BIN=2, SC_OCT=8, SC_DEC=10, SC_HEX=16 }; #pragma line 646 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" 1 /* autopilot_ssdm_bits.h */ /* #- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved. #- #- This file contains confidential and proprietary information #- of Xilinx, Inc. and is protected under U.S. and #- international copyright and other intellectual property #- laws. #- #- DISCLAIMER #- This disclaimer is not a license and does not grant any #- rights to the materials distributed herewith. Except as #- otherwise provided in a valid license issued to you by #- Xilinx, and to the maximum extent permitted by applicable #- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND #- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES #- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING #- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- #- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and #- (2) Xilinx shall not be liable (whether in contract or tort, #- including negligence, or under any other theory of #- liability) for any loss or damage of any kind or nature #- related to, arising under or in connection with these #- materials, including for any direct, or any indirect, #- special, incidental, or consequential loss or damage #- (including loss of data, profits, goodwill, or any type of #- loss or damage suffered as a result of any action brought #- by a third party) even if such damage or loss was #- reasonably foreseeable or Xilinx had been advised of the #- possibility of the same. #- #- CRITICAL APPLICATIONS #- Xilinx products are not designed or intended to be fail- #- safe, or for use in any application requiring fail-safe #- performance, such as life-support or safety devices or #- systems, Class III medical devices, nuclear facilities, #- applications related to the deployment of airbags, or any #- other applications that could lead to death, personal #- injury, or severe property or environmental damage #- (individually and collectively, "Critical #- Applications"). Customer assumes the sole risk and #- liability of any use of Xilinx products in Critical #- Applications, subject only to applicable laws and #- regulations governing limitations on product liability. #- #- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS #- PART OF THIS FILE AT ALL TIMES. #- ************************************************************************ #pragma empty_line * * $Id$ */ #pragma line 98 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" /* -- Concatination ----------------*/ #pragma line 108 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" /* -- Bit get/set ----------------*/ #pragma line 129 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" /* -- Part get/set ----------------*/ #pragma empty_line /* GetRange: Notice that the order of the range indices comply with SystemC standards. */ #pragma line 143 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" /* SetRange: Notice that the order of the range indices comply with SystemC standards. */ #pragma line 156 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" /* -- Reduce operations ----------------*/ #pragma line 192 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" /* -- String-Integer conversions ----------------*/ #pragma line 358 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/etc/autopilot_ssdm_bits.h" // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 647 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" 2 #pragma empty_line #pragma empty_line /* Forward declaration.*/ template<int _AP_W, bool _AP_S, bool _AP_C = (_AP_W <= 64)> struct ap_int_base; template<int _AP_W, bool _AP_S> struct ap_range_ref; template<int _AP_W, bool _AP_S> struct ap_bit_ref; template<int _AP_W> struct ap_uint; template<int _AP_W1, typename _AP_T1, int _AP_W2, typename _AP_T2> struct ap_concat_ref; #pragma empty_line enum ap_q_mode { SC_RND, // rounding to plus infinity SC_RND_ZERO, // rounding to zero SC_RND_MIN_INF, // rounding to minus infinity SC_RND_INF, // rounding to infinity SC_RND_CONV, // convergent rounding SC_TRN, // truncation SC_TRN_ZERO // truncation to zero #pragma empty_line }; enum ap_o_mode { SC_SAT, // saturation SC_SAT_ZERO, // saturation to zero SC_SAT_SYM, // symmetrical saturation SC_WRAP, // wrap-around (*) SC_WRAP_SM // sign magnitude wrap-around (*) }; template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct ap_fixed_base; template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_range_ref; template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_bit_ref; #pragma empty_line #pragma empty_line #pragma empty_line /* Concatination reference. ---------------------------------------------------------------- */ template<int _AP_W1, typename _AP_T1, int _AP_W2, typename _AP_T2> struct ap_concat_ref { enum { _AP_WR = _AP_W1+_AP_W2, }; #pragma empty_line _AP_T1& mbv1; _AP_T2& mbv2; #pragma empty_line inline __attribute__((always_inline)) ap_concat_ref(const ap_concat_ref<_AP_W1, _AP_T1, _AP_W2, _AP_T2>& ref): mbv1(ref.mbv1), mbv2(ref.mbv2) {} #pragma empty_line inline __attribute__((always_inline)) ap_concat_ref( _AP_T1& bv1, _AP_T2& bv2) : mbv1(bv1), mbv2(bv2) { } #pragma empty_line #pragma empty_line template <int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref& operator = (const ap_int_base<_AP_W3, _AP_S3>& val) { ap_int_base<_AP_W1+_AP_W2, false> vval(val); int W_ref1 = mbv1.length(); int W_ref2 = mbv2.length(); ap_int_base<_AP_W1,false> Part1; Part1.V = ({ typeof(vval.V) __Result__ = 0; typeof(vval.V) __Val2__ = vval.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), W_ref2, W_ref1+W_ref2-1); __Result__; }); mbv1.set(Part1); ap_int_base<_AP_W2,false> Part2; Part2.V = ({ typeof(vval.V) __Result__ = 0; typeof(vval.V) __Val2__ = vval.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, W_ref2-1); __Result__; }); mbv2.set(Part2); return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_concat_ref& operator = (unsigned long long val) { ap_int_base<_AP_W1+_AP_W2, false> tmpVal(val); return operator = (tmpVal); } #pragma empty_line /*template<typename _AP_T3> INLINE ap_concat_ref& operator = ( const _AP_T3& val) { ap_int_base<_AP_W1+_AP_W2, false> tmpVal(val); return operator=<_AP_W1+_AP_W2,false>(tmpVal); }*/ template<int _AP_W3, typename _AP_T3, int _AP_W4, typename _AP_T4> inline __attribute__((always_inline)) ap_concat_ref& operator = (const ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,_AP_T4>& val) { ap_int_base<_AP_W1+_AP_W2, false> tmpVal(val); return operator = (tmpVal); } #pragma empty_line inline __attribute__((always_inline)) ap_concat_ref& operator = (const ap_concat_ref<_AP_W1,_AP_T1,_AP_W2,_AP_T2>& val) { ap_int_base<_AP_W1+_AP_W2, false> tmpVal(val); return operator = (tmpVal); } template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref& operator = (const ap_bit_ref<_AP_W3, _AP_S3>& val) { ap_int_base<_AP_W1+_AP_W2, false> tmpVal(val); return operator = (tmpVal); } template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref& operator = (const ap_range_ref<_AP_W3, _AP_S3>& val) { ap_int_base<_AP_W1+_AP_W2, false> tmpVal(val); return operator = (tmpVal); } #pragma empty_line template<int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3> inline __attribute__((always_inline)) ap_concat_ref& operator= (const af_range_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3>& val) { return operator = ((const ap_int_base<_AP_W3, false>)(val)); } #pragma empty_line template<int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3> inline __attribute__((always_inline)) ap_concat_ref& operator= (const ap_fixed_base<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3>& val) { return operator = (val.to_ap_int_base()); } #pragma empty_line template<int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3> inline __attribute__((always_inline)) ap_concat_ref& operator= (const af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3>& val) { return operator=((unsigned long long)(bool)(val)); } inline __attribute__((always_inline)) operator ap_int_base<_AP_WR, false> () const { return get(); } #pragma empty_line inline __attribute__((always_inline)) operator unsigned long long () const { return get().to_uint64(); } #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_range_ref<_AP_W3, _AP_S3> > operator, (const ap_range_ref<_AP_W3, _AP_S3>& a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_range_ref<_AP_W3, _AP_S3> >(*this, const_cast<ap_range_ref<_AP_W3, _AP_S3>& >(a2)); } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> > operator, (ap_int_base<_AP_W3, _AP_S3>& a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> >(*this, a2); } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> > operator, (volatile ap_int_base<_AP_W3, _AP_S3>& a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> >(*this, const_cast<ap_int_base<_AP_W3, _AP_S3>& >(a2)); } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> > operator, (const ap_int_base<_AP_W3, _AP_S3>& a2) { ap_int_base<_AP_W3,_AP_S3> op(a2); return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> >(*this, const_cast<ap_int_base<_AP_W3, _AP_S3>& >(op)); } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> > operator, (const volatile ap_int_base<_AP_W3, _AP_S3>& a2) { ap_int_base<_AP_W3,_AP_S3> op(a2); return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, ap_int_base<_AP_W3, _AP_S3> >(*this, const_cast<ap_int_base<_AP_W3, _AP_S3>& >(op)); } template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, 1, ap_bit_ref<_AP_W3, _AP_S3> > operator, (const ap_bit_ref<_AP_W3, _AP_S3>& a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, 1, ap_bit_ref<_AP_W3, _AP_S3> >(*this, const_cast<ap_bit_ref<_AP_W3, _AP_S3>& >(a2)); } #pragma empty_line template<int _AP_W3, typename _AP_T3, int _AP_W4, typename _AP_T4> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3+_AP_W4, ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,_AP_T4> > operator, (const ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,_AP_T4>& a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3+_AP_W4, ap_concat_ref<_AP_W3,_AP_T3,_AP_W4,_AP_T4> >( *this, const_cast<ap_concat_ref<_AP_W3,_AP_T3, _AP_W4,_AP_T4>& >(a2)); } #pragma empty_line template <int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, af_range_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> > operator, (const af_range_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> &a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, _AP_W3, af_range_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> >(*this, const_cast<af_range_ref< _AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3>& >(a2)); } #pragma empty_line template <int _AP_W3, int _AP_I3, bool _AP_S3, ap_q_mode _AP_Q3, ap_o_mode _AP_O3, int _AP_N3> inline __attribute__((always_inline)) ap_concat_ref<_AP_WR, ap_concat_ref, 1, af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> > operator, (const af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> &a2) { return ap_concat_ref<_AP_WR, ap_concat_ref, 1, af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3> >(*this, const_cast<af_bit_ref<_AP_W3, _AP_I3, _AP_S3, _AP_Q3, _AP_O3, _AP_N3>& >(a2)); } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_int_base<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3> operator & (const ap_int_base<_AP_W3,_AP_S3>& a2) { return get() & a2; } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_int_base<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3> operator | (const ap_int_base<_AP_W3,_AP_S3>& a2) { return get() | a2; } #pragma empty_line template<int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) ap_int_base<((_AP_WR) > (_AP_W3) ? (_AP_WR) : (_AP_W3)), _AP_S3> operator ^ (const ap_int_base<_AP_W3,_AP_S3>& a2) { return get() ^ a2; } #pragma line 881 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" inline __attribute__((always_inline)) ap_int_base<_AP_WR,false> get() const { ap_int_base<_AP_WR,false> tmpVal(0); int W_ref1 = mbv1.length(); int W_ref2 = mbv2.length(); tmpVal.V = ({ typeof(tmpVal.V) __Result__ = 0; typeof(tmpVal.V) __Val2__ = tmpVal.V; typeof((ap_int_base<_AP_W2,false>(mbv2)).V) __Repl2__ = (ap_int_base<_AP_W2,false>(mbv2)).V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, W_ref2-1); __Result__; }); #pragma empty_line tmpVal.V = ({ typeof(tmpVal.V) __Result__ = 0; typeof(tmpVal.V) __Val2__ = tmpVal.V; typeof((ap_int_base<_AP_W1,false>(mbv1)).V) __Repl2__ = (ap_int_base<_AP_W1,false>(mbv1)).V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), W_ref2, W_ref1+W_ref2-1); __Result__; }); #pragma empty_line return tmpVal; } #pragma empty_line template <int _AP_W3> inline __attribute__((always_inline)) void set(const ap_int_base<_AP_W3, false>& val) { ap_int_base<_AP_W1+_AP_W2, false> vval(val); int W_ref1 = mbv1.length(); int W_ref2 = mbv2.length(); ap_int_base<_AP_W1,false> tmpVal1; tmpVal1.V = ({ typeof(vval.V) __Result__ = 0; typeof(vval.V) __Val2__ = vval.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), W_ref2, W_ref1+W_ref2-1); __Result__; }); mbv1.set(tmpVal1); ap_int_base<_AP_W2, false> tmpVal2; tmpVal2.V=({ typeof(vval.V) __Result__ = 0; typeof(vval.V) __Val2__ = vval.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, W_ref2-1); __Result__; }); mbv2.set(tmpVal2); } #pragma empty_line inline __attribute__((always_inline)) int length() const { return mbv1.length() + mbv2.length(); } }; #pragma line 920 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" /* Range (slice) reference. ---------------------------------------------------------------- */ template<int _AP_W, bool _AP_S> struct ap_range_ref { ap_int_base<_AP_W,_AP_S> &d_bv; int l_index; int h_index; #pragma empty_line public: inline __attribute__((always_inline)) ap_range_ref(const ap_range_ref<_AP_W, _AP_S>& ref): d_bv(ref.d_bv), l_index(ref.l_index), h_index(ref.h_index) {} #pragma empty_line inline __attribute__((always_inline)) ap_range_ref(ap_int_base<_AP_W,_AP_S>* bv, int h, int l) : d_bv(*bv), l_index(l), h_index(h) { /*AP_ASSERT(h >= l, "Range must be (High, Low)");*/ } #pragma empty_line inline __attribute__((always_inline)) operator ap_int_base<_AP_W, false> () const { ap_int_base<_AP_W,false> ret; ret.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; }); return ret; } #pragma empty_line inline __attribute__((always_inline)) operator unsigned long long () const { return to_uint64(); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref& operator = (unsigned long long val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref& operator = (const ap_int_base<_AP_W2,_AP_S2>& val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref& operator= (const ap_range_ref<_AP_W2,_AP_S2>& val) { return operator=((const ap_int_base<_AP_W2, false>)val); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref& operator= (const ap_range_ref<_AP_W, _AP_S>& val) { return operator=((const ap_int_base<_AP_W, false>)val); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_range_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=((const ap_int_base<_AP_W2, false>)(val)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_range_ref& operator= (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=(val.to_ap_int_base()); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_range_ref& operator= (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=((unsigned long long)(bool)(val)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref& operator= (const ap_bit_ref<_AP_W2, _AP_S2>& val) { return operator=((unsigned long long)(bool)(val)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_range_ref& operator= (const ap_concat_ref<_AP_W2, _AP_T3, _AP_W3, _AP_T3>& val) { return operator=((const ap_int_base<_AP_W2 + _AP_W3, false>)(val)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_range_ref<_AP_W2,_AP_S2> > operator, (const ap_range_ref<_AP_W2,_AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, ap_range_ref<_AP_W2,_AP_S2> >(*this, const_cast<ap_range_ref<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > operator, (ap_int_base<_AP_W2,_AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, a2); } #pragma empty_line inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,_AP_W,ap_int_base<_AP_W,_AP_S> > operator, (ap_int_base<_AP_W,_AP_S> &a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W, ap_int_base<_AP_W,_AP_S> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > operator, (volatile ap_int_base<_AP_W2,_AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > operator, (const ap_int_base<_AP_W2,_AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > operator, (const volatile ap_int_base<_AP_W2,_AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_range_ref,1,ap_bit_ref<_AP_W2,_AP_S2> > operator, (const ap_bit_ref<_AP_W2,_AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_range_ref, 1, ap_bit_ref<_AP_W2,_AP_S2> >(*this, const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_range_ref, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> a2) { return ap_concat_ref<_AP_W, ap_range_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_range_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_range_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<_AP_W, ap_range_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_bit_ref<_AP_W2,_AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == (const ap_range_ref<_AP_W2, _AP_S2>& op2) { ap_int_base<_AP_W, false> lop(*this); ap_int_base<_AP_W2, false> hop(op2); return lop == hop; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != (const ap_range_ref<_AP_W2, _AP_S2>& op2) { return !(operator == (op2)); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < (const ap_range_ref<_AP_W2, _AP_S2>& op2) { ap_int_base<_AP_W, false> lop (*this); #pragma empty_line ap_int_base<_AP_W2, false> hop (op2); return lop < hop; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= (const ap_range_ref<_AP_W2, _AP_S2>& op2) { ap_int_base<_AP_W, false> lop (*this); #pragma empty_line ap_int_base<_AP_W2, false> hop (op2); return lop <= hop; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > (const ap_range_ref<_AP_W2, _AP_S2>& op2) { return !(operator <= (op2)); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= (const ap_range_ref<_AP_W2, _AP_S2>& op2) { return !(operator < (op2)); } #pragma empty_line template <int _AP_W3> inline __attribute__((always_inline)) void set(const ap_int_base<_AP_W3, false>& val) { d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(val.V) __Repl2__ = val.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); } #pragma empty_line inline __attribute__((always_inline)) int length() const { return h_index >= l_index ? h_index - l_index + 1 : l_index - h_index + 1; } #pragma empty_line inline __attribute__((always_inline)) int to_int() const { return (int)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) unsigned to_uint() const { return (unsigned)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) long to_long() const { return (long)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) unsigned long to_ulong() const { return (unsigned long)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) ap_slong to_int64() const { return (ap_slong)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) ap_ulong to_uint64() const { return (ap_ulong)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) bool and_reduce() const { bool ret = true; bool reverse = l_index > h_index; unsigned low = reverse ? h_index : l_index; unsigned high = reverse ? l_index : h_index; for (unsigned i = low; i != high; ++i) { _ssdm_Unroll(0,0,0, ""); ret &= (bool)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); __Result__; })); } return ret; } inline __attribute__((always_inline)) bool or_reduce() const { bool ret = false; bool reverse = l_index > h_index; unsigned low = reverse ? h_index : l_index; unsigned high = reverse ? l_index : h_index; for (unsigned i = low; i != high; ++i) { _ssdm_Unroll(0,0,0, ""); ret |= (bool)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); __Result__; })); } return ret; } inline __attribute__((always_inline)) bool xor_reduce() const { bool ret = false; bool reverse = l_index > h_index; unsigned low = reverse ? h_index : l_index; unsigned high = reverse ? l_index : h_index; for (unsigned i = low; i != high; ++i) { _ssdm_Unroll(0,0,0, ""); ret ^= (bool)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); __Result__; })); } return ret; } }; #pragma empty_line #pragma empty_line /* Bit reference. ---------------------------------------------------------------- */ template<int _AP_W, bool _AP_S> struct ap_bit_ref { ap_int_base<_AP_W, _AP_S>& d_bv; int d_index; #pragma empty_line public: inline __attribute__((always_inline)) ap_bit_ref(const ap_bit_ref<_AP_W, _AP_S>& ref): d_bv(ref.d_bv), d_index(ref.d_index) {} #pragma empty_line inline __attribute__((always_inline)) ap_bit_ref(ap_int_base<_AP_W,_AP_S>* bv, int index=0) : d_bv(*bv), d_index(index) { } inline __attribute__((always_inline)) operator bool () const { return ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); } inline __attribute__((always_inline)) bool to_bool() const { return ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); } #pragma empty_line inline __attribute__((always_inline)) ap_bit_ref& operator = ( unsigned long long val ) { d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(val) __Repl2__ = !!val; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), d_index, d_index); __Result__; }); return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref& operator = ( const ap_int_base<_AP_W2,_AP_S2> &val ) { return operator =((unsigned long long)(val.V != 0)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref& operator = ( const ap_range_ref<_AP_W2,_AP_S2> &val ) { return operator =(val.operator ap_int_base<_AP_W2, false>()); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref& operator = (const ap_bit_ref<_AP_W2,_AP_S2>& val) { return operator =((unsigned long long) (bool) val); } #pragma empty_line inline __attribute__((always_inline)) ap_bit_ref& operator = (const ap_bit_ref<_AP_W,_AP_S>& val) { return operator =((unsigned long long) (bool) val); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_bit_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=((const ap_int_base<_AP_W2, false>)(val)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_bit_ref& operator= (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=((unsigned long long)(bool)(val)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_bit_ref& operator= (const ap_concat_ref<_AP_W2, _AP_T3, _AP_W3, _AP_T3>& val) { return operator=((const ap_int_base<_AP_W2 + _AP_W3, false>)(val)); } #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& a2) { return ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, a2); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> > operator, (volatile ap_int_base<_AP_W2, _AP_S2>& a2) { return ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> > operator, (const ap_int_base<_AP_W2, _AP_S2>& a2) { ap_int_base<_AP_W2,_AP_S2> op(a2); return ap_concat_ref<1,ap_bit_ref,_AP_W2,ap_int_base<_AP_W2, _AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(op)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_int_base<_AP_W2,_AP_S2> > operator, (const volatile ap_int_base<_AP_W2, _AP_S2>& a2) { ap_int_base<_AP_W2,_AP_S2> op(a2); return ap_concat_ref<1,ap_bit_ref,_AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, const_cast< ap_int_base<_AP_W2, _AP_S2>& >(op)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_range_ref<_AP_W2,_AP_S2> > operator, (const ap_range_ref<_AP_W2, _AP_S2> &a2) { return ap_concat_ref<1, ap_bit_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(*this, const_cast<ap_range_ref<_AP_W2, _AP_S2> &>(a2)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, 1, ap_bit_ref<_AP_W2,_AP_S2> > operator, (const ap_bit_ref<_AP_W2, _AP_S2> &a2) { return ap_concat_ref<1, ap_bit_ref, 1, ap_bit_ref<_AP_W2,_AP_S2> >(*this, const_cast<ap_bit_ref<_AP_W2,_AP_S2>& >(a2)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3> > operator, (const ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3> &a2) { return ap_concat_ref<1,ap_bit_ref,_AP_W2+_AP_W3,ap_concat_ref<_AP_W2, _AP_T2,_AP_W3,_AP_T3> >(*this, const_cast<ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3> &>(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<1, ap_bit_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<1, ap_bit_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<1, ap_bit_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == (const ap_bit_ref<_AP_W2, _AP_S2>& op) { return get() == op.get(); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != (const ap_bit_ref<_AP_W2, _AP_S2>& op) { return get() != op.get(); } #pragma empty_line inline __attribute__((always_inline)) bool get() const { return ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); } #pragma empty_line inline __attribute__((always_inline)) bool get() { return ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); } #pragma empty_line template <int _AP_W3> inline __attribute__((always_inline)) void set(const ap_int_base<_AP_W3, false>& val) { operator = (val); } #pragma empty_line inline __attribute__((always_inline)) bool operator ~() const { bool bit = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); return bit ? false : true; } #pragma empty_line inline __attribute__((always_inline)) int length() const { return 1; } }; #pragma empty_line template <int _AP_N, bool _AP_S> struct retval; #pragma empty_line template <int _AP_N> struct retval<_AP_N, true> { typedef ap_slong Type; }; template <int _AP_N> struct retval<_AP_N, false> { typedef ap_ulong Type; }; #pragma empty_line template<> struct retval<1, true> { typedef signed char Type; }; template<> struct retval<1, false> { typedef unsigned char Type; }; template<> struct retval<2, true> { typedef short Type; }; template<> struct retval<2, false> { typedef unsigned short Type; }; template<> struct retval<3, true> { typedef int Type; }; template<> struct retval<3, false> { typedef unsigned int Type; }; template<> struct retval<4, true> { typedef int Type; }; template<> struct retval<4, false> { typedef unsigned int Type; }; #pragma empty_line /* ---------------------------------------------------------------- ap_int_base: AutoPilot integer/Arbitrary precision integer. ---------------------------------------------------------------- */ #pragma empty_line template<int _AP_W, bool _AP_S> struct ap_int_base <_AP_W, _AP_S, true>: public ssdm_int<_AP_W,_AP_S> { #pragma empty_line public: typedef ssdm_int<_AP_W, _AP_S> Base; #pragma empty_line typedef typename retval< (_AP_W + 7)/8, _AP_S>::Type RetType; #pragma empty_line static const int width = _AP_W; #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> struct RType { enum { mult_w = _AP_W+_AP_W2, mult_s = _AP_S||_AP_S2, plus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1, plus_s = _AP_S||_AP_S2, minus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1, minus_s = true, div_w = _AP_W+_AP_S2, div_s = _AP_S||_AP_S2, mod_w = ((_AP_W) < (_AP_W2+(!_AP_S2&&_AP_S)) ? (_AP_W) : (_AP_W2+(!_AP_S2&&_AP_S))), mod_s = _AP_S, logic_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2))), logic_s = _AP_S||_AP_S2 }; #pragma empty_line typedef ap_int_base<mult_w, mult_s> mult; typedef ap_int_base<plus_w, plus_s> plus; typedef ap_int_base<minus_w, minus_s> minus; typedef ap_int_base<logic_w, logic_s> logic; typedef ap_int_base<div_w, div_s> div; typedef ap_int_base<mod_w, mod_s> mod; typedef ap_int_base<_AP_W, _AP_S> arg1; typedef bool reduce; }; #pragma empty_line /* Constructors. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base() { /* #ifdef __SC_COMPATIBLE__ Base::V = 0; #endif */ } #pragma empty_line //INLINE ap_int_base(const ap_int_base& op) { Base::V = op.V; } //INLINE ap_int_base(const volatile ap_int_base& op) { Base::V = op.V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const ap_int_base<_AP_W2,_AP_S2> &op) { Base::V = op.V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const volatile ap_int_base<_AP_W2,_AP_S2> &op) { Base::V = op.V; } #pragma empty_line /* For C++ basic data types.*/ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) explicit ap_int_base(bool op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(signed char op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned char op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(short op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned short op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(int op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned int op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(long op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned long op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(ap_slong op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(ap_ulong op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(half op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(float op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(double op) { Base::V = op; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base(const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op) { Base::V = op.to_ap_int_base().V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const ap_range_ref<_AP_W2,_AP_S2>& ref) { Base::V = ref.operator ap_int_base<_AP_W2, false>().V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const ap_bit_ref<_AP_W2,_AP_S2>& ref) { Base::V = ref.operator bool(); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base(const ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>& ref) { const ap_int_base<ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>::_AP_WR,false> tmp = ref.get(); Base::V = tmp.V; } #pragma empty_line /* This constructor is not usable yet, because the second parameter of __builtin_bit_from_string(...) is required to be a constant C string. */ inline __attribute__((always_inline)) ap_int_base(const char* str) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), 10, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base(const char* str, signed char radix) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), radix, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &val) { Base::V = (val.operator ap_int_base<_AP_W2, false> ()).V; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &val) { Base::V = val.operator bool (); } #pragma empty_line inline __attribute__((always_inline)) ap_int_base read() volatile { ; ap_int_base ret; ret.V = Base::V; return ret; } inline __attribute__((always_inline)) void write(const ap_int_base<_AP_W, _AP_S>& op2) volatile { ; Base::V = op2.V; } #pragma empty_line /* Another form of "write".*/ #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) void operator = (const volatile ap_int_base<_AP_W2,_AP_S2>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const volatile ap_int_base<_AP_W, _AP_S>& op2) volatile { Base::V = op2.V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) void operator = (const ap_int_base<_AP_W2,_AP_S2>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const ap_int_base<_AP_W, _AP_S>& op2) volatile { Base::V = op2.V; } #pragma line 1567 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const volatile ap_int_base<_AP_W2,_AP_S2>& op2) { Base::V = op2.V; return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_int_base<_AP_W2,_AP_S2>& op2) { Base::V = op2.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base& operator = (const volatile ap_int_base<_AP_W,_AP_S>& op2) { Base::V = op2.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base& operator = (const ap_int_base<_AP_W,_AP_S>& op2) { Base::V = op2.V; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (const char* str) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), 10, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0,true); Base::V = Result; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base& set(const char* str, signed char radix) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), radix, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; return *this; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_int_base& operator = (signed char op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (unsigned char op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (short op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (unsigned short op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (int op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (unsigned int op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (ap_slong op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (ap_ulong op) { Base::V = op; return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_bit_ref<_AP_W2, _AP_S2>& op2) { Base::V = (bool) op2; return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_range_ref<_AP_W2, _AP_S2>& op2) { Base::V = (ap_int_base<_AP_W2, false>(op2)).V; return *this; } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>& op2) { Base::V = op2.get().V; return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { Base::V = op.to_ap_int_base().V; return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base& operator = (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { Base::V = (bool) op; return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base& operator = (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { Base::V = ((const ap_int_base<_AP_W2, false>)(op)).V; return *this; } #pragma empty_line inline __attribute__((always_inline)) operator RetType() const { return (RetType)(Base::V); } #pragma empty_line #pragma empty_line /* Explicit conversions to C interger types. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) bool to_bool() const {return (bool)(Base::V);} inline __attribute__((always_inline)) unsigned char to_uchar() const {return (unsigned char)(Base::V);} inline __attribute__((always_inline)) signed char to_char() const {return (signed char)(Base::V);} inline __attribute__((always_inline)) unsigned short to_ushort() const {return (unsigned short)(Base::V);} inline __attribute__((always_inline)) short to_short() const {return (short)(Base::V);} inline __attribute__((always_inline)) int to_int() const { return (int)(Base::V); } inline __attribute__((always_inline)) unsigned to_uint() const { return (unsigned)(Base::V); } inline __attribute__((always_inline)) long to_long() const { return (long)(Base::V); } inline __attribute__((always_inline)) unsigned long to_ulong() const { return (unsigned long)(Base::V); } inline __attribute__((always_inline)) ap_slong to_int64() const { return (ap_slong)(Base::V); } inline __attribute__((always_inline)) ap_ulong to_uint64() const { return (ap_ulong)(Base::V); } inline __attribute__((always_inline)) double to_double() const { return (double)(Base::V); } #pragma line 1686 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" inline __attribute__((always_inline)) int length() const { return _AP_W; } inline __attribute__((always_inline)) int length() const volatile { return _AP_W; } #pragma empty_line /*INLINE operator ap_ulong () { return (ap_ulong)(Base::V); }*/ #pragma empty_line /*Reverse the contents of ap_int_base instance. I.e. LSB becomes MSB and vise versa*/ inline __attribute__((always_inline)) ap_int_base& reverse () { Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, 0); __Result__; }); return *this; } #pragma empty_line /*Return true if the value of ap_int_base instance is zero*/ inline __attribute__((always_inline)) bool iszero () const { return Base::V == 0 ; } #pragma empty_line /*Return true if the value of ap_int_base instance is zero*/ inline __attribute__((always_inline)) bool is_zero () const { return Base::V == 0 ; } #pragma empty_line /* x < 0 */ inline __attribute__((always_inline)) bool sign () const { if (_AP_S && ({ typeof(const_cast<ap_int_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_int_base*>(this)->V) __Val2__ = const_cast<ap_int_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); })) return true; else return false; } #pragma empty_line /* x[i] = 0 */ inline __attribute__((always_inline)) void clear(int i) { ; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(0) __Repl2__ = !!0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line /* x[i] = !x[i]*/ inline __attribute__((always_inline)) void invert(int i) { ; bool val = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); (bool)(__Result__ & 1); }); if (val) Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(0) __Repl2__ = !!0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); else Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(1) __Repl2__ = !!1; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) bool test (int i) const { ; return ({ typeof(const_cast<ap_int_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_int_base*>(this)->V) __Val2__ = const_cast<ap_int_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); (bool)(__Result__ & 1); }); } #pragma empty_line //Set the ith bit into 1 inline __attribute__((always_inline)) void set (int i) { ; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(1) __Repl2__ = !!1; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line //Set the ith bit into v inline __attribute__((always_inline)) void set (int i, bool v) { ; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(v) __Repl2__ = !!v; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line //This is used for sc_lv and sc_bv, which is implemented by sc_uint //Rotate an ap_int_base object n places to the left inline __attribute__((always_inline)) void lrotate(int n) { ; typeof(Base::V) l_p = Base::V << n; typeof(Base::V) r_p = Base::V >> (_AP_W - n); Base::V = l_p | r_p; } #pragma empty_line //This is used for sc_lv and sc_bv, which is implemented by sc_uint //Rotate an ap_int_base object n places to the right inline __attribute__((always_inline)) void rrotate(int n) { ; typeof(Base::V) l_p = Base::V << (_AP_W - n); typeof(Base::V) r_p = Base::V >> n; Base::V = l_p | r_p; } #pragma empty_line //Set the ith bit into v inline __attribute__((always_inline)) void set_bit (int i, bool v) { Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(v) __Repl2__ = !!v; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line //Get the value of ith bit inline __attribute__((always_inline)) bool get_bit (int i) const { return (bool)({ typeof(const_cast<ap_int_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_int_base*>(this)->V) __Val2__ = const_cast<ap_int_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); (bool)(__Result__ & 1); }); } #pragma empty_line //complements every bit inline __attribute__((always_inline)) void b_not() { Base::V = ~Base::V; } #pragma empty_line // Count the number of zeros from the most significant bit // to the first one bit. Note this is only for ap_fixed_base whose // _AP_W <= 64, otherwise will incur assertion. inline __attribute__((always_inline)) int countLeadingZeros() { if (_AP_W <= 32) { ap_int_base<32, false> t(-1ULL); t.range(_AP_W-1, 0) = this->range(0, _AP_W-1); return __builtin_ctz(t.V); } else if (_AP_W <= 64) { ap_int_base<64, false> t(-1ULL); t.range(_AP_W-1, 0) = this->range(0, _AP_W-1); return __builtin_ctzll(t.V); } else { enum { __N = (_AP_W+63)/64 }; int NZeros = 0; int i = 0; bool hitNonZero = false; for (i=0; i<__N-1; ++i) { ap_int_base<64, false> t; t.range(0, 63) = this->range(_AP_W - i*64 - 64, _AP_W - i*64 - 1); NZeros += hitNonZero?0:__builtin_clzll(t.V); hitNonZero |= (t.to_uint64() != 0); } if (!hitNonZero) { ap_int_base<64, false> t(-1ULL); t.range(63-(_AP_W-1)%64, 63) = this->range(0, (_AP_W-1)%64); NZeros += __builtin_clzll(t.V); } return NZeros; } } #pragma line 1820 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" /* Arithmetic assign. ---------------------------------------------------------------- */ template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator *= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V *= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator += ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V += op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator -= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V -= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator /= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V /= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator %= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V %= op2.V; return *this; } #pragma empty_line /* Bitwise assign: and, or, xor. ---------------------------------------------------------------- */ template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator &= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V &= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator |= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V |= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator ^= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V ^= op2.V; return *this; } #pragma empty_line #pragma empty_line /* Prefix increment, decrement. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base& operator ++() { operator+=((ap_int_base<1,false>) 1); return *this; } inline __attribute__((always_inline)) ap_int_base& operator --() { operator-=((ap_int_base<1,false>) 1); return *this; } #pragma empty_line /* Postfix increment, decrement ---------------------------------------------------------------- */ inline __attribute__((always_inline)) const ap_int_base operator ++(int) { ap_int_base t = *this; operator+=((ap_int_base<1,false>) 1); return t; } inline __attribute__((always_inline)) const ap_int_base operator --(int) { ap_int_base t = *this; operator-=((ap_int_base<1,false>) 1); return t; } #pragma empty_line /* Unary arithmetic. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base operator +() const { return *this; } /* Not (!) ---------------------------------------------------------------- */ inline __attribute__((always_inline)) bool operator ! () const { return Base::V == 0; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base<((64) < (_AP_W + 1) ? (64) : (_AP_W + 1)), true> operator -() const { return ((ap_int_base<1,false>) 0) - *this; } #pragma empty_line /* Shift (result constrained by left operand). ---------------------------------------------------------------- */ #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator << ( const ap_int_base<_AP_W2,true> &op2 ) const { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator >> (sh); } else return operator << (sh); } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator << ( const ap_int_base<_AP_W2,false> &op2 ) const { ap_int_base r ; r.V = Base::V << op2.to_uint(); return r; } #pragma empty_line #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator >> ( const ap_int_base<_AP_W2,true> &op2 ) const { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator << (sh); } return operator >> (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator >> ( const ap_int_base<_AP_W2,false> &op2 ) const { ap_int_base r; r.V = Base::V >> op2.to_uint(); return r; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base operator << ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) const { return *this << (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base operator >> ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) const { return *this >> (op2.operator ap_int_base<_AP_W2, false>()); } #pragma empty_line #pragma empty_line /* Shift assign ---------------------------------------------------------------- */ template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator <<= ( const ap_int_base<_AP_W2,true> &op2 ) { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator >>= (sh); } else return operator <<= (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator <<= ( const ap_int_base<_AP_W2,false> &op2 ) { Base::V <<= op2.to_uint(); return *this; } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator >>= ( const ap_int_base<_AP_W2,true> &op2 ) { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator <<= (sh); } return operator >>= (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator >>= ( const ap_int_base<_AP_W2,false> &op2 ) { Base::V >>= op2.to_uint(); return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator <<= ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) { return *this <<= (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator >>= ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) { return *this >>= (op2.operator ap_int_base<_AP_W2, false>()); } #pragma empty_line /* Comparisons. ---------------------------------------------------------------- */ template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V == op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return !(Base::V == op2.V); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V < op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V >= op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V > op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V <= op2.V; } #pragma empty_line #pragma empty_line /* Bit and Part Select ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> range (int Hi, int Lo) { ; return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> operator () (int Hi, int Lo) { ; return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> range (int Hi, int Lo) const { ; return ap_range_ref<_AP_W,_AP_S>(const_cast<ap_int_base*>(this), Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> operator () (int Hi, int Lo) const { return this->range(Hi, Lo); } #pragma line 2044 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> operator [] (int index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index ); return bvh; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> operator [] (const ap_int_base<_AP_W2,_AP_S2> &index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index.to_int() ); return bvh; } #pragma empty_line inline __attribute__((always_inline)) bool operator [] (int index) const { ; ; ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_int_base*>(this), index); return br.to_bool(); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator [] (const ap_int_base<_AP_W2,_AP_S2>& index) const { ; ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_int_base*>(this), index.to_int()); return br.to_bool(); } #pragma empty_line inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> bit (int index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index ); return bvh; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> bit (const ap_int_base<_AP_W2,_AP_S2> &index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index.to_int() ); return bvh; } #pragma empty_line inline __attribute__((always_inline)) bool bit (int index) const { ; ; ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_int_base*>(this), index); return br.to_bool(); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool bit (const ap_int_base<_AP_W2,_AP_S2>& index) const { ; ap_bit_ref<_AP_W,_AP_S> br = bit(index); return br.to_bool(); } #pragma line 2107 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_int_base,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > concat(const ap_int_base<_AP_W2,_AP_S2>& a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_int_base,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > concat(ap_int_base<_AP_W2,_AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> > operator, (const ap_range_ref<_AP_W2, _AP_S2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast< ap_range_ref<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> > operator, (ap_range_ref<_AP_W2, _AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (const ap_int_base<_AP_W2, _AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (const ap_int_base<_AP_W2, _AP_S2>& a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> > operator, (const ap_bit_ref<_AP_W2, _AP_S2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> > operator, (ap_bit_ref<_AP_W2, _AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(a2)); } #pragma empty_line template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, a2); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S> operator & (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) { return *this & a2.get(); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S> operator | (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) { return *this | a2.get(); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S> operator ^ (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) { return *this ^ a2.get(); } #pragma empty_line template <int _AP_W3> inline __attribute__((always_inline)) void set(const ap_int_base<_AP_W3, false>& val) { Base::V = val.V; } #pragma empty_line /* Reduce operations. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) bool and_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_and_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nand_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_nand_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool or_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nor_reduce() { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); })); } inline __attribute__((always_inline)) bool xor_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool xnor_reduce() { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); })); } #pragma empty_line inline __attribute__((always_inline)) bool and_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_and_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nand_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_nand_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool or_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nor_reduce() const { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); })); } inline __attribute__((always_inline)) bool xor_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool xnor_reduce() const { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); })); } #pragma empty_line /* Output as a string. ---------------------------------------------------------------- */ void to_string(char* str, int len, BaseMode mode, bool sign = false) const { for (int i = 0; i <= len; ++i) str[i] = '\0'; if (mode == SC_BIN) { int size = ((_AP_W) < (len) ? (_AP_W) : (len)); for (int bit = size; bit > 0; --bit) { if (({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), bit-1, bit-1); (bool)(__Result__ & 1); })) str[size-bit] = '1'; else str[size-bit] = '0'; } } /*else if (mode == AP_HEX) { typeof(Base::V) tmpV = Base::V; int idx = 0; int size = AP_MIN((_AP_W+3)/4, len); while (idx < size) { char hexb = tmpV & 0xF; if (hexb > 9) hexb = hexb - 10 + 'a'; else hexb += '0'; str[size-1-idx] = hexb; tmpV >> 4; idx ++; } } */ else if (mode == SC_OCT || mode == SC_DEC) { ; } else { ; } } #pragma empty_line inline __attribute__((always_inline)) char* to_string(BaseMode mode, bool sign=false) const { return 0; } #pragma empty_line inline __attribute__((always_inline)) char* to_string(signed char mode, bool sign=false) const { return to_string(BaseMode(mode), sign); } }; template<int _AP_W, bool _AP_S> struct ap_int_base<_AP_W, _AP_S, false> : public ssdm_int<_AP_W,_AP_S> { #pragma empty_line public: typedef ssdm_int<_AP_W, _AP_S> Base; typedef typename retval<8, _AP_S>::Type RetType; static const int width = _AP_W; #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> struct RType { enum { mult_w = _AP_W+_AP_W2, mult_s = _AP_S||_AP_S2, plus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1, plus_s = _AP_S||_AP_S2, minus_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2)))+1, minus_s = true, div_w = _AP_W+_AP_S2, div_s = _AP_S||_AP_S2, mod_w = ((_AP_W) < (_AP_W2+(!_AP_S2&&_AP_S)) ? (_AP_W) : (_AP_W2+(!_AP_S2&&_AP_S))), mod_s = _AP_S, logic_w = ((_AP_W+(_AP_S2&&!_AP_S)) > (_AP_W2+(_AP_S&&!_AP_S2)) ? (_AP_W+(_AP_S2&&!_AP_S)) : (_AP_W2+(_AP_S&&!_AP_S2))), logic_s = _AP_S||_AP_S2 }; #pragma empty_line typedef ap_int_base<mult_w, mult_s> mult; typedef ap_int_base<plus_w, plus_s> plus; typedef ap_int_base<minus_w, minus_s> minus; typedef ap_int_base<logic_w, logic_s> logic; typedef ap_int_base<div_w, div_s> div; typedef ap_int_base<mod_w, mod_s> mod; typedef ap_int_base<_AP_W, _AP_S> arg1; typedef bool reduce; }; #pragma empty_line /* Constructors. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base() { /* #ifdef __SC_COMPATIBLE__ Base::V = 0; #endif */ } #pragma empty_line //INLINE ap_int_base(const ap_int_base& op) { Base::V = op.V; } //INLINE ap_int_base(const volatile ap_int_base& op) { Base::V = op.V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const ap_int_base<_AP_W2,_AP_S2> &op) { Base::V = op.V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const volatile ap_int_base<_AP_W2,_AP_S2> &op) { Base::V = op.V; } #pragma empty_line /* For C++ basic data types.*/ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) explicit ap_int_base(bool op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(signed char op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned char op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(short op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned short op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(int op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned int op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(long op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(unsigned long op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(ap_slong op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(ap_ulong op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(half op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(float op) { Base::V = op; } inline __attribute__((always_inline)) explicit ap_int_base(double op) { Base::V = op; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base(const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op) { Base::V = op.to_ap_int_base().V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const ap_range_ref<_AP_W2,_AP_S2>& ref) { Base::V = ref.operator ap_int_base<_AP_W2, false>().V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base(const ap_bit_ref<_AP_W2,_AP_S2>& ref) { Base::V = ref.operator bool(); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base(const ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>& ref) { const ap_int_base<ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>::_AP_WR,false> tmp = ref.get(); Base::V = tmp.V; } #pragma empty_line /* This constructor is not usable yet, because the second parameter of __builtin_bit_from_string(...) is required to be a constant C string. */ inline __attribute__((always_inline)) ap_int_base(const char* str) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), 10, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base(const char* str, signed char radix) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), radix, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &val) { Base::V = (val.operator ap_int_base<_AP_W2, false> ()).V; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &val) { Base::V = val.operator bool (); } #pragma empty_line inline __attribute__((always_inline)) ap_int_base read() volatile { ; ap_int_base ret; ret.V = Base::V; return ret; } inline __attribute__((always_inline)) void write(const ap_int_base<_AP_W, _AP_S>& op2) volatile { ; Base::V = op2.V; } #pragma empty_line /* Another form of "write".*/ #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) void operator = (const volatile ap_int_base<_AP_W2,_AP_S2>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const volatile ap_int_base<_AP_W, _AP_S>& op2) volatile { Base::V = op2.V; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) void operator = (const ap_int_base<_AP_W2,_AP_S2>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const ap_int_base<_AP_W, _AP_S>& op2) volatile { Base::V = op2.V; } #pragma line 2509 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const volatile ap_int_base<_AP_W2,_AP_S2>& op2) { Base::V = op2.V; return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_int_base<_AP_W2,_AP_S2>& op2) { Base::V = op2.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base& operator = (const volatile ap_int_base<_AP_W,_AP_S>& op2) { Base::V = op2.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base& operator = (const ap_int_base<_AP_W,_AP_S>& op2) { Base::V = op2.V; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (const char* str) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), 10, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int_base& set(const char* str, signed char radix) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), radix, _AP_W, _AP_S, SC_TRN, SC_WRAP, 0, true); Base::V = Result; return *this; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_int_base& operator = (char op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (unsigned char op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (short op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (unsigned short op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (int op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (unsigned int op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (ap_slong op) { Base::V = op; return *this; } inline __attribute__((always_inline)) ap_int_base& operator = (ap_ulong op) { Base::V = op; return *this; } #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_bit_ref<_AP_W2, _AP_S2>& op2) { Base::V = (bool) op2; return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_range_ref<_AP_W2, _AP_S2>& op2) { Base::V = (ap_int_base<_AP_W2, false>(op2)).V; return *this; } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_concat_ref<_AP_W2,_AP_T2,_AP_W3,_AP_T3>& op2) { Base::V = op2.get().V; return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base& operator = (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { Base::V = op.to_ap_int_base().V; return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base& operator = (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { Base::V = (bool) op; return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int_base& operator = (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { Base::V = ((const ap_int_base<_AP_W2, false>)(op)).V; return *this; } #pragma empty_line inline __attribute__((always_inline)) operator RetType() const { return (RetType)(Base::V); } #pragma empty_line #pragma empty_line /* Explicit conversions to C interger types. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) bool to_bool() const {return (bool)(Base::V);} inline __attribute__((always_inline)) bool to_uchar() const {return (unsigned char)(Base::V);} inline __attribute__((always_inline)) bool to_char() const {return (char)(Base::V);} inline __attribute__((always_inline)) bool to_ushort() const {return (unsigned short)(Base::V);} inline __attribute__((always_inline)) bool to_short() const {return (short)(Base::V);} inline __attribute__((always_inline)) int to_int() const { return (int)(Base::V); } inline __attribute__((always_inline)) unsigned to_uint() const { return (unsigned)(Base::V); } inline __attribute__((always_inline)) long to_long() const { return (long)(Base::V); } inline __attribute__((always_inline)) unsigned long to_ulong() const { return (unsigned long)(Base::V); } inline __attribute__((always_inline)) ap_slong to_int64() const { return (ap_slong)(Base::V); } inline __attribute__((always_inline)) ap_ulong to_uint64() const { return (ap_ulong)(Base::V); } inline __attribute__((always_inline)) double to_double() const { return (double)(Base::V); } #pragma line 2628 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" inline __attribute__((always_inline)) int length() const { return _AP_W; } inline __attribute__((always_inline)) int length() const volatile { return _AP_W; } #pragma empty_line /*INLINE operator ap_ulong () { return (ap_ulong)(Base::V); }*/ #pragma empty_line /*Reverse the contents of ap_int_base instance. I.e. LSB becomes MSB and vise versa*/ inline __attribute__((always_inline)) ap_int_base& reverse () { Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, 0); __Result__; }); return *this; } #pragma empty_line /*Return true if the value of ap_int_base instance is zero*/ inline __attribute__((always_inline)) bool iszero () const { return Base::V == 0 ; } #pragma empty_line /*Return true if the value of ap_int_base instance is zero*/ inline __attribute__((always_inline)) bool is_zero () const { return Base::V == 0 ; } #pragma empty_line /* x < 0 */ inline __attribute__((always_inline)) bool sign () const { if (_AP_S && ({ typeof(const_cast<ap_int_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_int_base*>(this)->V) __Val2__ = const_cast<ap_int_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); })) return true; else return false; } #pragma empty_line /* x[i] = 0 */ inline __attribute__((always_inline)) void clear(int i) { ; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(0) __Repl2__ = !!0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line /* x[i] = !x[i]*/ inline __attribute__((always_inline)) void invert(int i) { ; bool val = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); (bool)(__Result__ & 1); }); if (val) Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(0) __Repl2__ = !!0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); else Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(1) __Repl2__ = !!1; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) bool test (int i) const { ; return ({ typeof(const_cast<ap_int_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_int_base*>(this)->V) __Val2__ = const_cast<ap_int_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); (bool)(__Result__ & 1); }); } #pragma empty_line //Set the ith bit into 1 inline __attribute__((always_inline)) void set (int i) { ; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(1) __Repl2__ = !!1; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line //Set the ith bit into v inline __attribute__((always_inline)) void set (int i, bool v) { ; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(v) __Repl2__ = !!v; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line //This is used for sc_lv and sc_bv, which is implemented by sc_uint //Rotate an ap_int_base object n places to the left inline __attribute__((always_inline)) void lrotate(int n) { ; typeof(Base::V) l_p = Base::V << n; typeof(Base::V) r_p = Base::V >> (_AP_W - n); Base::V = l_p | r_p; } #pragma empty_line //This is used for sc_lv and sc_bv, which is implemented by sc_uint //Rotate an ap_int_base object n places to the right inline __attribute__((always_inline)) void rrotate(int n) { ; typeof(Base::V) l_p = Base::V << (_AP_W - n); typeof(Base::V) r_p = Base::V >> n; Base::V = l_p | r_p; } #pragma empty_line //Set the ith bit into v inline __attribute__((always_inline)) void set_bit (int i, bool v) { Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(v) __Repl2__ = !!v; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), i, i); __Result__; }); } #pragma empty_line //Get the value of ith bit inline __attribute__((always_inline)) bool get_bit (int i) const { return (bool)({ typeof(const_cast<ap_int_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_int_base*>(this)->V) __Val2__ = const_cast<ap_int_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), i, i); (bool)(__Result__ & 1); }); } #pragma empty_line //complements every bit inline __attribute__((always_inline)) void b_not() { Base::V = ~Base::V; } #pragma empty_line // Count the number of zeros from the most significant bit // to the first one bit. Note this is only for ap_fixed_base whose // _AP_W <= 64, otherwise will incur assertion. inline __attribute__((always_inline)) int countLeadingZeros() { if (_AP_W <= 32) { ap_int_base<32, false> t(-1ULL); t.range(_AP_W-1, 0) = this->range(0, _AP_W-1); return __builtin_ctz(t.V); } else if (_AP_W <= 64) { ap_int_base<64, false> t(-1ULL); t.range(_AP_W-1, 0) = this->range(0, _AP_W-1); return __builtin_ctzll(t.V); } else { enum { __N = (_AP_W+63)/64 }; int NZeros = 0; unsigned i = 0; bool hitNonZero = false; for (i=0; i<__N-1; ++i) { ap_int_base<64, false> t; t.range(0, 63) = this->range(_AP_W - i*64 - 64, _AP_W - i*64 - 1); NZeros += hitNonZero?0:__builtin_clzll(t.V); hitNonZero |= (t.to_uint64() != 0); } if (!hitNonZero) { ap_int_base<64, false> t(-1ULL); t.range(63-(_AP_W-1)%64, 63) = this->range(0, (_AP_W-1)%64); NZeros += __builtin_clzll(t.V); } return NZeros; } } #pragma line 2762 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" /* Arithmetic assign. ---------------------------------------------------------------- */ template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator *= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V *= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator += ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V += op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator -= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V -= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator /= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V /= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator %= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V %= op2.V; return *this; } #pragma empty_line /* Bitwise assign: and, or, xor. ---------------------------------------------------------------- */ template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator &= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V &= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator |= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V |= op2.V; return *this; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator ^= ( const ap_int_base<_AP_W2,_AP_S2> &op2) { ; Base::V ^= op2.V; return *this; } #pragma empty_line #pragma empty_line /* Prefix increment, decrement. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base& operator ++() { operator+=((ap_int_base<1,false>) 1); return *this; } inline __attribute__((always_inline)) ap_int_base& operator --() { operator-=((ap_int_base<1,false>) 1); return *this; } #pragma empty_line /* Postfix increment, decrement ---------------------------------------------------------------- */ inline __attribute__((always_inline)) const ap_int_base operator ++(int) { ap_int_base t = *this; operator+=((ap_int_base<1,false>) 1); return t; } inline __attribute__((always_inline)) const ap_int_base operator --(int) { ap_int_base t = *this; operator-=((ap_int_base<1,false>) 1); return t; } #pragma empty_line /* Unary arithmetic. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base operator +() const{ return *this; } #pragma empty_line inline __attribute__((always_inline)) typename RType<1,false>::minus operator -() const { return ((ap_int_base<1,false>) 0) - *this; } #pragma empty_line /* Not (!) ---------------------------------------------------------------- */ inline __attribute__((always_inline)) bool operator ! () const { return Base::V == 0; } #pragma empty_line /* Bitwise (arithmetic) unary: complement ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_int_base<_AP_W+!_AP_S, true> operator ~() const { ap_int_base<_AP_W+!_AP_S, true> r; r.V = ~Base::V; return r; } #pragma empty_line /* Shift (result constrained by left operand). ---------------------------------------------------------------- */ template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator << ( const ap_int_base<_AP_W2,true> &op2 ) const { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator >> (sh); } else return operator << (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator << ( const ap_int_base<_AP_W2,false> &op2 ) const { ap_int_base r ; r.V = Base::V << op2.to_uint(); return r; } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator >> ( const ap_int_base<_AP_W2,true> &op2 ) const { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator << (sh); } return operator >> (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base operator >> ( const ap_int_base<_AP_W2,false> &op2 ) const { ap_int_base r; r.V = Base::V >> op2.to_uint(); return r; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base operator << ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) const { return *this << (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base operator >> ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) const { return *this >> (op2.operator ap_int_base<_AP_W2, false>()); } #pragma empty_line /* Shift assign ---------------------------------------------------------------- */ template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator <<= ( const ap_int_base<_AP_W2,true> &op2 ) { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; return operator >>= (sh); } else return operator <<= (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator <<= ( const ap_int_base<_AP_W2,false> &op2 ) { Base::V <<= op2.to_uint(); return *this; } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator >>= ( const ap_int_base<_AP_W2,true> &op2 ) { bool isNeg = op2[_AP_W2 - 1]; ap_int_base<_AP_W2, false> sh = op2; if (isNeg) { sh = -op2; operator <<= (sh); } return operator >>= (sh); } template<int _AP_W2> inline __attribute__((always_inline)) ap_int_base& operator >>= ( const ap_int_base<_AP_W2,false> &op2 ) { Base::V >>= op2.to_uint(); return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator <<= ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) { return *this <<= (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base& operator >>= ( const ap_range_ref<_AP_W2,_AP_S2>& op2 ) { return *this >>= (op2.operator ap_int_base<_AP_W2, false>()); } #pragma empty_line /* Comparisons. ---------------------------------------------------------------- */ template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V == op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return !(Base::V == op2.V); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V < op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V >= op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V > op2.V; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W2,_AP_S2> &op2) const { return Base::V <= op2.V; } #pragma empty_line #pragma empty_line /* Bit and Part Select ---------------------------------------------------------------- */ inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> range (int Hi, int Lo) { ; return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> operator () (int Hi, int Lo) { ; return ap_range_ref<_AP_W,_AP_S>(this, Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> range (int Hi, int Lo) const { ; return ap_range_ref<_AP_W,_AP_S>(const_cast<ap_int_base*>(this), Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) ap_range_ref<_AP_W,_AP_S> operator () (int Hi, int Lo) const { return this->range(Hi, Lo); } #pragma line 2991 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> operator [] (int index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index ); return bvh; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> operator [] (const ap_int_base<_AP_W2,_AP_S2> &index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index.to_int() ); return bvh; } #pragma empty_line inline __attribute__((always_inline)) bool operator [] (int index) const { ; ; ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_int_base*>(this), index); return br.to_bool(); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator [] (const ap_int_base<_AP_W2,_AP_S2>& index) const { ; ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_int_base*>(this), index.to_int()); return br.to_bool(); } #pragma empty_line inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> bit (int index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index ); return bvh; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W,_AP_S> bit (const ap_int_base<_AP_W2,_AP_S2> &index) { ; ; ap_bit_ref<_AP_W,_AP_S> bvh( this, index.to_int() ); return bvh; } #pragma empty_line inline __attribute__((always_inline)) bool bit (int index) const { ; ; ap_bit_ref<_AP_W,_AP_S> br(const_cast<ap_int_base*>(this), index); return br.to_bool(); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool bit (const ap_int_base<_AP_W2,_AP_S2>& index) const { ; ap_bit_ref<_AP_W,_AP_S> br = bit(index); return br.to_bool(); } #pragma line 3054 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_int_base,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > concat(const ap_int_base<_AP_W2,_AP_S2>& a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W,ap_int_base,_AP_W2,ap_int_base<_AP_W2,_AP_S2> > concat(ap_int_base<_AP_W2,_AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2,_AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> > operator, (const ap_range_ref<_AP_W2, _AP_S2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast< ap_range_ref<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> > operator, (ap_range_ref<_AP_W2, _AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (const ap_int_base<_AP_W2, _AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(*this, const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (const ap_int_base<_AP_W2, _AP_S2>& a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_int_base<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> > operator, (const ap_bit_ref<_AP_W2, _AP_S2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(a2)); } #pragma empty_line template <int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> > operator, (ap_bit_ref<_AP_W2, _AP_S2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, 1, ap_bit_ref<_AP_W2, _AP_S2> >(*this, a2); } #pragma empty_line template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(a2)); } #pragma empty_line template <int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2+_AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, a2); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) const { return ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(const_cast<ap_int_base<_AP_W, _AP_S>& >(*this), const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(a2)); } #pragma empty_line template <int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &a2) { return ap_concat_ref<_AP_W, ap_int_base, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, a2); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S> operator & (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) { return *this & a2.get(); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S> operator | (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) { return *this | a2.get(); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int_base<((_AP_W2+_AP_W3) > (_AP_W) ? (_AP_W2+_AP_W3) : (_AP_W)), _AP_S> operator ^ (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& a2) { return *this ^ a2.get(); } #pragma empty_line template <int _AP_W3> inline __attribute__((always_inline)) void set(const ap_int_base<_AP_W3, false>& val) { Base::V = val.V; } #pragma empty_line /* Reduce operations. ---------------------------------------------------------------- */ inline __attribute__((always_inline)) bool and_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_and_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nand_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_nand_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool or_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nor_reduce() { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); })); } inline __attribute__((always_inline)) bool xor_reduce() { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool xnor_reduce() { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); })); } #pragma empty_line inline __attribute__((always_inline)) bool and_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_and_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nand_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_nand_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool or_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool nor_reduce() const { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_or_reduce((void*)(&__what2__)); })); } inline __attribute__((always_inline)) bool xor_reduce() const { return ({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); }); } inline __attribute__((always_inline)) bool xnor_reduce() const { return !(({ typeof(Base::V) __what2__ = Base::V; __builtin_bit_xor_reduce((void*)(&__what2__)); })); } #pragma empty_line /* Output as a string. ---------------------------------------------------------------- */ void to_string(char* str, int len, BaseMode mode, bool sign = false) const { for (int i = 0; i <= len; ++i) str[i] = '\0'; if (mode == SC_BIN) { int size = ((_AP_W) < (len) ? (_AP_W) : (len)); for (int bit = size; bit > 0; --bit) { if (({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), bit-1, bit-1); (bool)(__Result__ & 1); })) str[size-bit] = '1'; else str[size-bit] = '0'; } } /*else if (mode == AP_HEX) { typeof(Base::V) tmpV = Base::V; int idx = 0; int size = AP_MIN((_AP_W+3)/4, len); while (idx < size) { char hexb = tmpV & 0xF; if (hexb > 9) hexb = hexb - 10 + 'a'; else hexb += '0'; str[size-1-idx] = hexb; tmpV >> 4; idx ++; } } */ else if (mode == SC_OCT || mode == SC_DEC) { ; } else { ; } } #pragma empty_line inline __attribute__((always_inline)) char* to_string(BaseMode mode, bool sign=false) const { return 0; } #pragma empty_line inline __attribute__((always_inline)) char* to_string(signed char mode, bool sign=false) const { return to_string(BaseMode(mode), sign); } }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Output streaming. ---------------------------------------------------------------- */ #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) std::ostream& operator << (std::ostream &os, const ap_int_base<_AP_W,_AP_S> &x) { //os << x.to_string(AP_DEC); return os; } #pragma empty_line /* Input streaming. ...................................................... */ template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) std::istream& operator >> (std::istream& in, ap_int_base<_AP_W,_AP_S> &op) { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return in; } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) std::ostream& operator << (std::ostream &os, const ap_range_ref<_AP_W,_AP_S> &x) { //os << x.to_string(AP_DEC); return os; } #pragma empty_line /* Input streaming. ...................................................... */ template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) std::istream& operator >> (std::istream& in, ap_range_ref<_AP_W,_AP_S> &op) { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return in; } #pragma empty_line #pragma empty_line #pragma empty_line /*Binary Arithmetic. ---------------------------------------------------------------- */ #pragma line 3368 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::mult operator * (const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::mult lhs(op); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::mult rhs(op2); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::mult r ; r.V = lhs.V * rhs.V; return r; } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::plus operator + (const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::plus lhs(op); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::plus rhs(op2); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::plus r ; r.V = lhs.V + rhs.V; return r; } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::minus operator - (const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::minus lhs(op); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::minus rhs(op2); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::minus r ; r.V = lhs.V - rhs.V; return r; } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::div r ; r.V = op.V / op2.V; return r; } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::mod r ; r.V = op.V % op2.V; return r; } #pragma empty_line /* Bitwise and, or, xor. ---------------------------------------------------------------- */ template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic operator & (const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic lhs(op); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic rhs(op2); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic r ; r.V = lhs.V & rhs.V; return r; } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic operator | (const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic lhs(op); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic rhs(op2); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic r ; r.V = lhs.V | rhs.V; return r; } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic operator ^ (const ap_int_base<_AP_W,_AP_S> &op, const ap_int_base<_AP_W2,_AP_S2> &op2) { ; typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic lhs(op); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic rhs(op2); typename ap_int_base<_AP_W, _AP_S>::template RType<_AP_W2,_AP_S2>::logic r ; r.V = lhs.V ^ rhs.V; return r; } #pragma empty_line #pragma empty_line //FIXME #pragma empty_line //char a[100]; //char* ptr = a; //ap_int<2> n = 3; //char* ptr2 = ptr + n*2; //avoid ambiguous errors #pragma line 3403 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline __attribute__((always_inline)) PTR_TYPE* operator + (PTR_TYPE* i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline __attribute__((always_inline)) PTR_TYPE* operator + (const ap_int_base<_AP_W,_AP_S> &op, PTR_TYPE* i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return op2 + i_op; } template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline __attribute__((always_inline)) PTR_TYPE* operator - (PTR_TYPE* i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } template<typename PTR_TYPE, int _AP_W, bool _AP_S> inline __attribute__((always_inline)) PTR_TYPE* operator - (const ap_int_base<_AP_W,_AP_S> &op, PTR_TYPE* i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return op2 - i_op; } #pragma empty_line //float OP ap_int //when ap_int<wa>'s width > 64, then trunc ap_int<w> to ap_int<64> #pragma line 3428 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator * (half i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator * (const ap_int_base<_AP_W,_AP_S> &op, half i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator / (half i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator / (const ap_int_base<_AP_W,_AP_S> &op, half i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator + (half i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator + (const ap_int_base<_AP_W,_AP_S> &op, half i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator - (half i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) half operator - (const ap_int_base<_AP_W,_AP_S> &op, half i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator * (float i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator * (const ap_int_base<_AP_W,_AP_S> &op, float i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator / (float i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator / (const ap_int_base<_AP_W,_AP_S> &op, float i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator + (float i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator + (const ap_int_base<_AP_W,_AP_S> &op, float i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator - (float i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) float operator - (const ap_int_base<_AP_W,_AP_S> &op, float i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator * (double i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator * (const ap_int_base<_AP_W,_AP_S> &op, double i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op * op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator / (double i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator / (const ap_int_base<_AP_W,_AP_S> &op, double i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op / op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator + (double i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator + (const ap_int_base<_AP_W,_AP_S> &op, double i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op + op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator - (double i_op, const ap_int_base<_AP_W,_AP_S> &op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) double operator - (const ap_int_base<_AP_W,_AP_S> &op, double i_op) { typename ap_int_base<_AP_W,_AP_S>::RetType op2 = op; return i_op - op2; } #pragma empty_line /* Operators mixing Integers with AP_Int ---------------------------------------------------------------- */ // partially specialize template argument _AP_C in order that: // for _AP_W > 64, we will explicitly convert operand with native data type // into corresponding ap_private // for _AP_W <= 64, we will implicitly convert operand with ap_private into // (unsigned) long long #pragma line 3462 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::mult operator * (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op * ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::plus operator + (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op + ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::minus operator - (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op - ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::div operator / (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op / ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::mod operator % (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op % ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::logic operator & (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op & ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::logic operator | (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op | ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::logic operator ^ (bool i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<1,false>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, bool i_op) { return op ^ ap_int_base<1,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mult operator * (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op * ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::plus operator + (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op + ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::minus operator - (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op - ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::div operator / (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op / ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mod operator % (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op % ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator & (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op & ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator | (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op | ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator ^ (char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, char i_op) { return op ^ ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mult operator * (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op * ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::plus operator + (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op + ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::minus operator - (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op - ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::div operator / (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op / ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mod operator % (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op % ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator & (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op & ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator | (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op | ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator ^ (signed char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,true>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, signed char i_op) { return op ^ ap_int_base<8,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::mult operator * (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op * ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::plus operator + (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op + ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::minus operator - (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op - ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::div operator / (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op / ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::mod operator % (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op % ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::logic operator & (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op & ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::logic operator | (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op | ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::logic operator ^ (unsigned char i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<8,false>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char i_op) { return op ^ ap_int_base<8,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::mult operator * (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op * ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::plus operator + (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op + ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::minus operator - (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op - ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::div operator / (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op / ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::mod operator % (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op % ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::logic operator & (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op & ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::logic operator | (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op | ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::logic operator ^ (short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,true>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, short i_op) { return op ^ ap_int_base<16,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::mult operator * (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op * ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::plus operator + (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op + ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::minus operator - (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op - ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::div operator / (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op / ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::mod operator % (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op % ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::logic operator & (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op & ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::logic operator | (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op | ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::logic operator ^ (unsigned short i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<16,false>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short i_op) { return op ^ ap_int_base<16,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::mult operator * (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op * ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::plus operator + (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op + ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::minus operator - (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op - ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::div operator / (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op / ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::mod operator % (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op % ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::logic operator & (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op & ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::logic operator | (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op | ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::logic operator ^ (int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,true>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, int i_op) { return op ^ ap_int_base<32,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::mult operator * (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op * ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::plus operator + (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op + ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::minus operator - (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op - ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::div operator / (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op / ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::mod operator % (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op % ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::logic operator & (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op & ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::logic operator | (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op | ap_int_base<32,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::logic operator ^ (unsigned int i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<32,false>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int i_op) { return op ^ ap_int_base<32,false>(i_op); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mult operator * (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op * ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::plus operator + (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op + ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::minus operator - (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op - ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::div operator / (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op / ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mod operator % (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op % ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator & (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op & ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator | (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op | ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator ^ (long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, long i_op) { return op ^ ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mult operator * (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op * ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::plus operator + (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op + ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::minus operator - (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op - ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::div operator / (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op / ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mod operator % (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op % ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator & (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op & ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator | (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op | ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator ^ (unsigned long i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long i_op) { return op ^ ap_int_base<64,false>(i_op); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mult operator * (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op * ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::plus operator + (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op + ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::minus operator - (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op - ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::div operator / (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op / ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mod operator % (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op % ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator & (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op & ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator | (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op | ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator ^ (ap_slong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,true>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong i_op) { return op ^ ap_int_base<64,true>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mult operator * (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) * (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mult operator * ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op * ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::plus operator + (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) + (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::plus operator + ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op + ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::minus operator - (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) - (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::minus operator - ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op - ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::div operator / (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) / (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::div operator / ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op / ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mod operator % (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) % (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::mod operator % ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op % ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator & (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) & (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator & ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op & ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator | (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) | (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator | ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op | ap_int_base<64,false>(i_op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator ^ (ap_ulong i_op, const ap_int_base<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(i_op) ^ (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,_AP_S>::template RType<64,false>::logic operator ^ ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong i_op) { return op ^ ap_int_base<64,false>(i_op); } #pragma line 3498 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( bool i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<1,false>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator == (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( bool i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<1,false>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator != (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( bool i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<1,false>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator > (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( bool i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<1,false>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator >= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( bool i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<1,false>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator < (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( bool i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<1,false>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator <= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator == (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator != (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator > (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator >= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator < (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator <= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( signed char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator == (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( signed char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator != (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( signed char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator > (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( signed char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator >= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( signed char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator < (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( signed char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,true>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator <= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,false>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator == (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,false>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator != (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,false>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator > (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,false>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator >= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,false>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator < (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned char i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<8,false>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator <= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,true>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator == (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,true>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator != (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,true>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator > (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,true>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator >= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,true>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator < (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,true>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator <= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,false>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator == (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,false>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator != (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,false>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator > (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,false>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator >= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,false>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator < (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned short i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<16,false>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator <= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,true>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator == (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,true>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator != (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,true>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator > (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,true>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator >= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,true>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator < (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,true>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator <= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,false>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator == (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,false>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator != (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,false>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator > (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,false>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator >= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,false>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator < (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned int i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<32,false>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator <= (ap_int_base<32,false>(op2)); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator != (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned long i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator <= (ap_int_base<64,false>(op2)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( ap_slong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( ap_slong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( ap_slong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( ap_slong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( ap_slong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( ap_slong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,true>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( ap_ulong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator == (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( ap_ulong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator != (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator != (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( ap_ulong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator > (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( ap_ulong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator >= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( ap_ulong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator < (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( ap_ulong i_op, const ap_int_base<_AP_W,_AP_S, false> &op) { return ap_int_base<64,false>(i_op).operator <= (op); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator <= (ap_int_base<64,false>(op2)); } #pragma line 3534 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator += (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator -= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator *= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator /= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator %= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator >>= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator <<= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator &= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator |= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, bool op2) { return op.operator ^= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator += (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator -= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator *= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator /= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator %= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator >>= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator <<= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator &= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator |= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, char op2) { return op.operator ^= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator += (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator -= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator *= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator /= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator %= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator >>= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator <<= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator &= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator |= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, signed char op2) { return op.operator ^= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator += (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator -= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator *= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator /= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator %= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator >>= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator <<= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator &= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator |= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, unsigned char op2) { return op.operator ^= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator += (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator -= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator *= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator /= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator %= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator >>= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator <<= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator &= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator |= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, short op2) { return op.operator ^= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator += (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator -= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator *= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator /= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator %= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator >>= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator <<= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator &= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator |= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, unsigned short op2) { return op.operator ^= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator += (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator -= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator *= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator /= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator %= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator >>= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator <<= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator &= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator |= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, int op2) { return op.operator ^= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator += (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator -= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator *= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator /= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator %= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator >>= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator <<= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator &= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator |= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, unsigned int op2) { return op.operator ^= (ap_int_base<32,false>(op2)); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator += (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator -= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator *= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator /= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator %= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator >>= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator <<= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator &= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator |= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, long op2) { return op.operator ^= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator += (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator -= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator *= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator /= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator %= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator >>= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator <<= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator &= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator |= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, unsigned long op2) { return op.operator ^= (ap_int_base<64,false>(op2)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator += (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator -= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator *= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator /= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator %= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator >>= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator <<= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator &= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator |= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, ap_slong op2) { return op.operator ^= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator += ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator += (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator -= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator -= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator *= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator *= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator /= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator /= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator %= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator %= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator >>= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator >>= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator <<= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator <<= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator &= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator &= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator |= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator |= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W,_AP_S> &operator ^= ( ap_int_base<_AP_W,_AP_S> &op, ap_ulong op2) { return op.operator ^= (ap_int_base<64,false>(op2)); } #pragma line 3574 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, bool op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, bool op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, char op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, char op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, signed char op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, signed char op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, unsigned char op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, unsigned char op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, short op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, short op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, unsigned short op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, unsigned short op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, int op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, int op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, unsigned int op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, unsigned int op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } #pragma empty_line template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, long op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, long op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, unsigned long op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, unsigned long op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, ap_slong op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, ap_slong op2) { ap_int_base<_AP_W, _AP_S> r; if (true) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator << (const ap_int_base<_AP_W, _AP_S>& op, ap_ulong op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V << op2) : (op.V >> (-op2)); else r.V = op.V << op2; return r; } template <int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<_AP_W, _AP_S> operator >> (const ap_int_base<_AP_W, _AP_S>& op, ap_ulong op2) { ap_int_base<_AP_W, _AP_S> r; if (false) r.V = op2 >= 0 ? (op.V >> op2) : (op.V << (-op2)); else r.V = op.V >> op2; return r; } #pragma line 3628 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator += ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator += (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator += ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator += (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator -= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator -= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator -= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator -= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator *= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator *= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator *= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator *= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator /= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator /= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator /= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator /= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator %= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator %= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator %= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator %= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator >>= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >>= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator >>= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator >>= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator <<= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <<= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator <<= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator <<= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator &= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator &= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator &= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator &= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator |= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator |= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator |= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator |= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator ^= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator ^= (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_range_ref<_AP_W1,_AP_S1>& operator ^= ( ap_range_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<_AP_W1, false> tmp(op1); tmp.operator ^= (op2); op1 = tmp; return op1; } #pragma empty_line template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1,false>(op1).operator == (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator == (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1,false>(op1).operator != (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator != (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1,false>(op1).operator > (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator > (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1,false>(op1).operator >= (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >= (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1,false>(op1).operator < (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator < (op2.operator ap_int_base<_AP_W2, false>()); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1,false>(op1).operator <= (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <= (op2.operator ap_int_base<_AP_W2, false>()); } #pragma empty_line template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::plus operator + ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) + (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::plus operator + ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 + (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::minus operator - ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) - (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::minus operator - ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 - (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mult operator * ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) * (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mult operator * ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 * (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::div operator / ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) / (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::div operator / ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 / (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mod operator % ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) % (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::mod operator % ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 % (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator >> ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) >> (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator >> ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 >> (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator << ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) << (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::arg1 operator << ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 << (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator & ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) & (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator & ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 & (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator | ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) | (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator | ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 | (ap_int_base<_AP_W2, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator ^ ( const ap_range_ref<_AP_W1,_AP_S1>& op1, const ap_int_base<_AP_W2,_AP_S2>& op2) { return ap_int_base<_AP_W1, false>(op1) ^ (op2); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<_AP_W2,_AP_S2>::logic operator ^ ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_range_ref<_AP_W2,_AP_S2>& op2) { return op1 ^ (ap_int_base<_AP_W2, false>(op2)); } #pragma line 3684 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator += ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator += (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator += ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator += (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator -= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator -= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator -= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator -= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator *= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator *= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator *= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator *= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator /= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator /= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator /= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator /= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator %= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator %= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator %= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator %= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator >>= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >>= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator >>= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator >>= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator <<= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <<= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator <<= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator <<= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator &= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator &= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator &= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator &= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator |= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator |= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator |= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator |= (op2); op1 = tmp; return op1; } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W1,_AP_S1>& operator ^= ( ap_int_base<_AP_W1,_AP_S1>& op1, ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator ^= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_bit_ref<_AP_W1,_AP_S1>& operator ^= ( ap_bit_ref<_AP_W1,_AP_S1>& op1, ap_int_base<_AP_W2,_AP_S2>& op2) { ap_int_base<1, false> tmp(op1); tmp.operator ^= (op2); op1 = tmp; return op1; } #pragma empty_line template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator == (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator != (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator > (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator >= (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator < (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1.operator <= (ap_int_base<1, false>(op2)); } #pragma empty_line template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::plus operator + ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 + (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::minus operator - ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 - (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::mult operator * ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 * (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::div operator / ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 / (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::mod operator % ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 % (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::arg1 operator >> ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 >> (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::arg1 operator << ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 << (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::logic operator & ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 & (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::logic operator | ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 | (ap_int_base<1, false>(op2)); } template<int _AP_W1, bool _AP_S1, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W1,_AP_S1>::template RType<1,false>::logic operator ^ ( const ap_int_base<_AP_W1,_AP_S1>& op1, const ap_bit_ref<_AP_W2,_AP_S2>& op2) { return op1 ^ (ap_int_base<1, false>(op2)); } #pragma line 3731 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" // Make the line shorter than 5000 chars #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<32,false>(op2)); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<64,false>(op2)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) > op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator > ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 > (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator > ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) < op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator < ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 < (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator < ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) >= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator >= ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 >= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator >= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) <= op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator <= ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 <= (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator <= ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator <= (ap_int_base<64,false>(op2)); } #pragma empty_line // Make the line shorter than 5000 chars #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, bool op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( bool op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, bool op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, char op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, signed char op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( signed char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, signed char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned char op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned char op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, short op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned short op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned short op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, int op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned int op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned int op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<32,false>(op2)); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, long op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( unsigned long op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, unsigned long op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<64,false>(op2)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( ap_slong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_slong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) == op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator == ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 == (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator == ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( const ap_bit_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (bool(op)) != op2; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) bool operator != ( ap_ulong op2, const ap_bit_ref<_AP_W,_AP_S> &op) { return op2 != (bool(op)); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) bool operator != ( const ap_concat_ref<_AP_W,_AP_T, _AP_W1, _AP_T1> &op, ap_ulong op2) { return (ap_int_base<_AP_W + _AP_W1, false>(op)).operator != (ap_int_base<64,false>(op2)); } #pragma line 3798 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::plus operator + ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::minus operator - ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::mult operator * ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::div operator / ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::mod operator % ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::plus operator + ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::minus operator - ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::mult operator * ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::div operator / ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::mod operator % ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::plus operator + ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::minus operator - ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::mult operator * ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::div operator / ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::mod operator % ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::plus operator + ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::minus operator - ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::mult operator * ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::div operator / ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::mod operator % ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::plus operator + ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::minus operator - ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::mult operator * ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::div operator / ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::mod operator % ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::plus operator + ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::minus operator - ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::mult operator * ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::div operator / ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::mod operator % ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::plus operator + ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::minus operator - ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::mult operator * ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::div operator / ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::mod operator % ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::plus operator + ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::minus operator - ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::mult operator * ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::div operator / ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::mod operator % ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) % (ap_int_base<_AP_W, false>(op)); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::plus operator + ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::minus operator - ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::mult operator * ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::div operator / ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::mod operator % ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::plus operator + ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::minus operator - ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::mult operator * ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::div operator / ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::mod operator % ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) % (ap_int_base<_AP_W, false>(op)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::plus operator + ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::minus operator - ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::mult operator * ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::div operator / ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::mod operator % ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) % (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::plus operator + ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) + (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::plus operator + ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) + (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::minus operator - ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) - (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::minus operator - ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) - (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::mult operator * ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) * (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::mult operator * ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) * (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::div operator / ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) / (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::div operator / ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) / (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::mod operator % ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) % (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::mod operator % ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) % (ap_int_base<_AP_W, false>(op)); } #pragma line 3823 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::arg1 operator >> ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::arg1 operator << ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::logic operator & ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::logic operator | ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<1,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<1,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<1,false>::template RType<_AP_W,false>::logic operator ^ ( bool op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<1,false>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::arg1 operator >> ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::arg1 operator << ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::logic operator & ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::logic operator | ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,(-127 -1) != 0>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, char op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<8,(-127 -1) != 0>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,(-127 -1) != 0>::template RType<_AP_W,false>::logic operator ^ ( char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,(-127 -1) != 0>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::arg1 operator >> ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::arg1 operator << ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::logic operator & ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::logic operator | ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<8,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,true>::template RType<_AP_W,false>::logic operator ^ ( signed char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,true>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::arg1 operator << ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::logic operator & ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::logic operator | ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<8,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<8,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<8,false>::template RType<_AP_W,false>::logic operator ^ ( unsigned char op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<8,false>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::arg1 operator >> ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::arg1 operator << ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::logic operator & ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::logic operator | ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, short op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<16,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,true>::template RType<_AP_W,false>::logic operator ^ ( short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,true>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::arg1 operator << ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::logic operator & ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::logic operator | ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<16,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<16,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<16,false>::template RType<_AP_W,false>::logic operator ^ ( unsigned short op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<16,false>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::arg1 operator >> ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::arg1 operator << ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::logic operator & ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::logic operator | ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, int op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<32,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,true>::template RType<_AP_W,false>::logic operator ^ ( int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,true>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::arg1 operator << ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::logic operator & ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::logic operator | ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<32,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<32,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<32,false>::template RType<_AP_W,false>::logic operator ^ ( unsigned int op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<32,false>(op2) ^ (ap_int_base<_AP_W, false>(op)); } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::arg1 operator >> ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::arg1 operator << ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::logic operator & ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::logic operator | ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, long op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::logic operator ^ ( long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::arg1 operator >> ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::arg1 operator << ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::logic operator & ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::logic operator | ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::logic operator ^ ( unsigned long op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) ^ (ap_int_base<_AP_W, false>(op)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::arg1 operator >> ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::arg1 operator << ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::logic operator & ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::logic operator | ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,true>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<64,true>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,true>::template RType<_AP_W,false>::logic operator ^ ( ap_slong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,true>(op2) ^ (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::arg1 operator >> ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) >> (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::arg1 operator >> ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) >> (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::arg1 operator << ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) << (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::arg1 operator << ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) << (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::logic operator & ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) & (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::logic operator & ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) & (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::logic operator | ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) | (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::logic operator | ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) | (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<_AP_W,false>::template RType<64,false>::logic operator ^ ( const ap_range_ref<_AP_W,_AP_S> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)) ^ (ap_int_base<64,false>(op2)); } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) typename ap_int_base<64,false>::template RType<_AP_W,false>::logic operator ^ ( ap_ulong op2, const ap_range_ref<_AP_W,_AP_S> &op) { return ap_int_base<64,false>(op2) ^ (ap_int_base<_AP_W, false>(op)); } #pragma line 3848 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::plus operator + (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) + (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::minus operator - (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) - (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::mult operator * (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) * (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::div operator / (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) / (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::mod operator % (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) % (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::arg1 operator >> (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) >> (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::arg1 operator << (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) << (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::logic operator & (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) & (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::logic operator | (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) | (ap_int_base<_AP_W2, false>(rhs)); } template<int _AP_W, bool _AP_S, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_int_base<_AP_W, false>::template RType<_AP_W2, false>::logic operator ^ (const ap_range_ref<_AP_W,_AP_S> &lhs, const ap_range_ref<_AP_W2,_AP_S2> &rhs) { return ap_int_base<_AP_W, false>(lhs) ^ (ap_int_base<_AP_W2, false>(rhs)); } #pragma empty_line //************************************************************************ // Implement // ap_private<M+N> = ap_concat_ref<M> OP ap_concat_ref<N> // for operators +, -, *, /, %, >>, <<, &, |, ^ // Without these operators the operands are converted to int64 and // larger results lose informations (higher order bits). // // operand OP // / | // left-concat right-concat // / | / | // <LW1,LT1> <LW2,LT2> <RW1,RT1> <RW2,RT2> // // _AP_LW1, _AP_LT1 (width and type of left-concat's left side) // _AP_LW2, _AP_LT2 (width and type of left-concat's right side) // Similarly for RHS of operand OP: _AP_RW1, AP_RW2, _AP_RT1, _AP_RT2 // // In Verilog 2001 result of concatenation is always unsigned even // when both sides are signed. //************************************************************************ #pragma line 3893 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::plus operator + (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() + rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::minus operator - (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() - rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::mult operator * (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() * rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::div operator / (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() / rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::mod operator % (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() % rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::arg1 operator >> (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() >> rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::arg1 operator << (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() << rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::logic operator & (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() & rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::logic operator | (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() | rhs.get(); } template<int _AP_LW1,typename _AP_LT1,int _AP_LW2,typename _AP_LT2, int _AP_RW1,typename _AP_RT1,int _AP_RW2,typename _AP_RT2> inline __attribute__((always_inline)) typename ap_int_base<_AP_LW1+_AP_LW2,false>::template RType<_AP_RW1+_AP_RW2,false>::logic operator ^ (const ap_concat_ref<_AP_LW1,_AP_LT1,_AP_LW2,_AP_LT2>& lhs, const ap_concat_ref<_AP_RW1,_AP_RT1,_AP_RW2,_AP_RT2>& rhs) { return lhs.get() ^ rhs.get(); } #pragma empty_line #pragma empty_line //************************************************************************ #pragma line 4048 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 1, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, bool op2) { ap_int_base<1 + _AP_W, false> val(op2); ap_int_base<1 + _AP_W, false> ret(op1); ret <<= 1; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 1, false > operator, (bool op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<1 + _AP_W, false> val(op1); ap_int_base<1 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 1; ret >>= 1; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 1, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, bool op2) { ap_int_base<1 + _AP_W, false> val(op2); ap_int_base<1 + _AP_W, false> ret(op1); ret <<= 1; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 1, false > operator, (bool op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<1 + _AP_W, false> val(op1); ap_int_base<1 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<1 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, bool op2) { ap_int_base<1 + 1, false> val(op2); val[1] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<1 + 1, false > operator, (bool op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<1 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 1, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, bool op2) { ap_int_base<1 + _AP_W + _AP_W2, false> val(op2); ap_int_base<1 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 1; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 1, false > operator, (bool op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<1 + _AP_W + _AP_W2, false> val(op1); ap_int_base<1 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 1, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, bool op2) { ap_int_base<1 + _AP_W, false> val(op2); ap_int_base<1 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 1; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 1, false > operator, (bool op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<1 + _AP_W, false> val(op1); ap_int_base<1 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 1, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, bool op2) { ap_int_base<1 + 1, false> val(op2); val[1] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 1, false> operator, (bool op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<1 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if ((-127 -1) != 0) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (char op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if ((-127 -1) != 0) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, char op2) { ap_int_base<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, char op2) { ap_int_base<8 + _AP_W + _AP_W2, (-127 -1) != 0> val(op2); ap_int_base<8 + _AP_W + _AP_W2, (-127 -1) != 0> ret(op1); if ((-127 -1) != 0) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<8 + _AP_W + _AP_W2, (-127 -1) != 0> val(op1); ap_int_base<8 + _AP_W + _AP_W2, (-127 -1) != 0> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); if ((-127 -1) != 0) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, char op2) { ap_int_base<8 + 1, (-127 -1) != 0> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + 1, (-127 -1) != 0> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, signed char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (signed char op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, signed char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (signed char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, signed char op2) { ap_int_base<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (signed char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, signed char op2) { ap_int_base<8 + _AP_W + _AP_W2, true> val(op2); ap_int_base<8 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (signed char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<8 + _AP_W + _AP_W2, true> val(op1); ap_int_base<8 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, signed char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (signed char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, signed char op2) { ap_int_base<8 + 1, true> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (signed char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, unsigned char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (unsigned char op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 8; ret >>= 8; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); ret <<= 8; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (unsigned char op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned char op2) { ap_int_base<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<8 + 1, false > operator, (unsigned char op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned char op2) { ap_int_base<8 + _AP_W + _AP_W2, false> val(op2); ap_int_base<8 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 8; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 8, false > operator, (unsigned char op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<8 + _AP_W + _AP_W2, false> val(op1); ap_int_base<8 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned char op2) { ap_int_base<8 + _AP_W, false> val(op2); ap_int_base<8 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 8; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 8, false > operator, (unsigned char op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + _AP_W, false> val(op1); ap_int_base<8 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned char op2) { ap_int_base<8 + 1, false> val(op2); val[8] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 8, false> operator, (unsigned char op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<8 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, short op2) { ap_int_base<16 + _AP_W, false> val(op2); ap_int_base<16 + _AP_W, false> ret(op1); ret <<= 16; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (short op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<16 + _AP_W, false> val(op1); ap_int_base<16 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 16; ret >>= 16; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, short op2) { ap_int_base<16 + _AP_W, false> val(op2); ap_int_base<16 + _AP_W, false> ret(op1); ret <<= 16; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (short op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<16 + _AP_W, false> val(op1); ap_int_base<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<16 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, short op2) { ap_int_base<16 + 1, false> val(op2); val[16] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<16 + 1, false > operator, (short op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<16 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 16, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, short op2) { ap_int_base<16 + _AP_W + _AP_W2, true> val(op2); ap_int_base<16 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 16; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 16, false > operator, (short op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<16 + _AP_W + _AP_W2, true> val(op1); ap_int_base<16 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, short op2) { ap_int_base<16 + _AP_W, false> val(op2); ap_int_base<16 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 16; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (short op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<16 + _AP_W, false> val(op1); ap_int_base<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 16, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, short op2) { ap_int_base<16 + 1, true> val(op2); val[16] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 16, false> operator, (short op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<16 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, unsigned short op2) { ap_int_base<16 + _AP_W, false> val(op2); ap_int_base<16 + _AP_W, false> ret(op1); ret <<= 16; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (unsigned short op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<16 + _AP_W, false> val(op1); ap_int_base<16 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 16; ret >>= 16; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned short op2) { ap_int_base<16 + _AP_W, false> val(op2); ap_int_base<16 + _AP_W, false> ret(op1); ret <<= 16; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (unsigned short op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<16 + _AP_W, false> val(op1); ap_int_base<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<16 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned short op2) { ap_int_base<16 + 1, false> val(op2); val[16] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<16 + 1, false > operator, (unsigned short op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<16 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 16, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned short op2) { ap_int_base<16 + _AP_W + _AP_W2, false> val(op2); ap_int_base<16 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 16; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 16, false > operator, (unsigned short op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<16 + _AP_W + _AP_W2, false> val(op1); ap_int_base<16 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned short op2) { ap_int_base<16 + _AP_W, false> val(op2); ap_int_base<16 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 16; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 16, false > operator, (unsigned short op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<16 + _AP_W, false> val(op1); ap_int_base<16 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 16, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned short op2) { ap_int_base<16 + 1, false> val(op2); val[16] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 16, false> operator, (unsigned short op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<16 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, int op2) { ap_int_base<32 + _AP_W, false> val(op2); ap_int_base<32 + _AP_W, false> ret(op1); ret <<= 32; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (int op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<32 + _AP_W, false> val(op1); ap_int_base<32 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 32; ret >>= 32; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, int op2) { ap_int_base<32 + _AP_W, false> val(op2); ap_int_base<32 + _AP_W, false> ret(op1); ret <<= 32; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (int op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<32 + _AP_W, false> val(op1); ap_int_base<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<32 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, int op2) { ap_int_base<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<32 + 1, false > operator, (int op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 32, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, int op2) { ap_int_base<32 + _AP_W + _AP_W2, true> val(op2); ap_int_base<32 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 32; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 32, false > operator, (int op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<32 + _AP_W + _AP_W2, true> val(op1); ap_int_base<32 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, int op2) { ap_int_base<32 + _AP_W, false> val(op2); ap_int_base<32 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 32; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (int op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<32 + _AP_W, false> val(op1); ap_int_base<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 32, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, int op2) { ap_int_base<32 + 1, true> val(op2); val[32] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 32, false> operator, (int op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<32 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, unsigned int op2) { ap_int_base<32 + _AP_W, false> val(op2); ap_int_base<32 + _AP_W, false> ret(op1); ret <<= 32; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (unsigned int op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<32 + _AP_W, false> val(op1); ap_int_base<32 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 32; ret >>= 32; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned int op2) { ap_int_base<32 + _AP_W, false> val(op2); ap_int_base<32 + _AP_W, false> ret(op1); ret <<= 32; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (unsigned int op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<32 + _AP_W, false> val(op1); ap_int_base<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<32 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned int op2) { ap_int_base<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<32 + 1, false > operator, (unsigned int op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 32, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned int op2) { ap_int_base<32 + _AP_W + _AP_W2, false> val(op2); ap_int_base<32 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 32; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 32, false > operator, (unsigned int op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<32 + _AP_W + _AP_W2, false> val(op1); ap_int_base<32 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned int op2) { ap_int_base<32 + _AP_W, false> val(op2); ap_int_base<32 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 32; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 32, false > operator, (unsigned int op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<32 + _AP_W, false> val(op1); ap_int_base<32 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 32, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned int op2) { ap_int_base<32 + 1, false> val(op2); val[32] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 32, false> operator, (unsigned int op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<32 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, long op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (long op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 64; ret >>= 64; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, long op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (long op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, long op2) { ap_int_base<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (long op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, long op2) { ap_int_base<64 + _AP_W + _AP_W2, true> val(op2); ap_int_base<64 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 64; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (long op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<64 + _AP_W + _AP_W2, true> val(op1); ap_int_base<64 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, long op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 64; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (long op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, long op2) { ap_int_base<64 + 1, true> val(op2); val[64] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (long op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, unsigned long op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (unsigned long op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 64; ret >>= 64; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, unsigned long op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (unsigned long op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, unsigned long op2) { ap_int_base<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (unsigned long op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, unsigned long op2) { ap_int_base<64 + _AP_W + _AP_W2, false> val(op2); ap_int_base<64 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 64; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (unsigned long op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<64 + _AP_W + _AP_W2, false> val(op1); ap_int_base<64 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned long op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 64; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (unsigned long op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, unsigned long op2) { ap_int_base<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (unsigned long op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, ap_slong op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (ap_slong op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 64; ret >>= 64; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, ap_slong op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (true) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (ap_slong op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, ap_slong op2) { ap_int_base<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (ap_slong op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, ap_slong op2) { ap_int_base<64 + _AP_W + _AP_W2, true> val(op2); ap_int_base<64 + _AP_W + _AP_W2, true> ret(op1); if (true) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 64; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (ap_slong op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<64 + _AP_W + _AP_W2, true> val(op1); ap_int_base<64 + _AP_W + _AP_W2, true> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_slong op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); if (true) { val <<= _AP_W; val >>= _AP_W; } ret <<= 64; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (ap_slong op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_slong op2) { ap_int_base<64 + 1, true> val(op2); val[64] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (ap_slong op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + 1, true> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_int_base<_AP_W, _AP_S> &op1, ap_ulong op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret;} template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (ap_ulong op1, const ap_int_base<_AP_W, _AP_S>& op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); if (_AP_S) { ret <<= 64; ret >>= 64; } ret |= val << _AP_W; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const ap_range_ref<_AP_W, _AP_S> &op1, ap_ulong op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); ret <<= 64; if (false) { val <<= _AP_W; val >>= _AP_W; } ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (ap_ulong op1, const ap_range_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (const ap_bit_ref<_AP_W, _AP_S> &op1, ap_ulong op2) { ap_int_base<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, bool _AP_S> inline __attribute__((always_inline)) ap_int_base<64 + 1, false > operator, (ap_ulong op1, const ap_bit_ref<_AP_W, _AP_S> &op2) { ap_int_base<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op1, ap_ulong op2) { ap_int_base<64 + _AP_W + _AP_W2, false> val(op2); ap_int_base<64 + _AP_W + _AP_W2, false> ret(op1); if (false) { val <<= _AP_W + _AP_W2; val >>= _AP_W + _AP_W2; } ret <<= 64; ret |= val; return ret; }template<int _AP_W, typename _AP_T, int _AP_W2, typename _AP_T2> inline __attribute__((always_inline)) ap_int_base<_AP_W + _AP_W2 + 64, false > operator, (ap_ulong op1, const ap_concat_ref<_AP_W, _AP_T, _AP_W2, _AP_T2> &op2) { ap_int_base<64 + _AP_W + _AP_W2, false> val(op1); ap_int_base<64 + _AP_W + _AP_W2, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; }template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_ulong op2) { ap_int_base<64 + _AP_W, false> val(op2); ap_int_base<64 + _AP_W, false> ret(op1); if (false) { val <<= _AP_W; val >>= _AP_W; } ret <<= 64; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< _AP_W + 64, false > operator, (ap_ulong op1, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + _AP_W, false> val(op1); ap_int_base<64 + _AP_W, false> ret(op2); int len = op2.length(); val <<= len; ret |= val; return ret; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op1, ap_ulong op2) { ap_int_base<64 + 1, false> val(op2); val[64] = op1; return val; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N > inline __attribute__((always_inline)) ap_int_base< 1 + 64, false> operator, (ap_ulong op1, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op2) { ap_int_base<64 + 1, false> val(op1); val <<= 1; val[0] = op2; return val; } #pragma line 4074 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int_syn.h" template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned int rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_ulong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator << (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_slong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) << ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned long rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, unsigned int rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_ulong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); } template<int _AP_W, typename _AP_T, int _AP_W1, typename _AP_T1> inline __attribute__((always_inline)) ap_uint<_AP_W+_AP_W1> operator >> (const ap_concat_ref<_AP_W, _AP_T, _AP_W1, _AP_T1> lhs, ap_slong rhs) { return ((ap_uint<_AP_W+_AP_W1>)lhs.get()) >> ((int)rhs); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 62 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int.h" 2 #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" 1 // -*- c++ -*- #pragma empty_line /* #- (c) Copyright 2011-2017 Xilinx, Inc. All rights reserved. #- #- This file contains confidential and proprietary information #- of Xilinx, Inc. and is protected under U.S. and #- international copyright and other intellectual property #- laws. #- #- DISCLAIMER #- This disclaimer is not a license and does not grant any #- rights to the materials distributed herewith. Except as #- otherwise provided in a valid license issued to you by #- Xilinx, and to the maximum extent permitted by applicable #- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND #- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES #- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING #- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON- #- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and #- (2) Xilinx shall not be liable (whether in contract or tort, #- including negligence, or under any other theory of #- liability) for any loss or damage of any kind or nature #- related to, arising under or in connection with these #- materials, including for any direct, or any indirect, #- special, incidental, or consequential loss or damage #- (including loss of data, profits, goodwill, or any type of #- loss or damage suffered as a result of any action brought #- by a third party) even if such damage or loss was #- reasonably foreseeable or Xilinx had been advised of the #- possibility of the same. #- #- CRITICAL APPLICATIONS #- Xilinx products are not designed or intended to be fail- #- safe, or for use in any application requiring fail-safe #- performance, such as life-support or safety devices or #- systems, Class III medical devices, nuclear facilities, #- applications related to the deployment of airbags, or any #- other applications that could lead to death, personal #- injury, or severe property or environmental damage #- (individually and collectively, "Critical #- Applications"). Customer assumes the sole risk and #- liability of any use of Xilinx products in Critical #- Applications, subject only to applicable laws and #- regulations governing limitations on product liability. #- #- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS #- PART OF THIS FILE AT ALL TIMES. #- ************************************************************************ #pragma empty_line * */ #pragma line 62 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" /// ap_fixed_base // ----------------------------------------------------------------------------- //#include <math.h> #pragma line 81 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" //enum ap_q_mode { SC_TRN, SC_RND, SC_TRN_ZERO, SC_RND_ZERO, // SC_RND_INF, SC_RND_MIN_INF, SC_RND_CONV }; #pragma empty_line //enum ap_o_mode { SC_WRAP, SC_SAT, SC_SAT_ZERO, SC_SAT_SYM,SC_WRAP_SM }; #pragma empty_line /// Forward declaration. template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct ap_fixed_base; #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_bit_ref { ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& d_bv; int d_index; #pragma empty_line public: inline __attribute__((always_inline)) af_bit_ref(const af_bit_ref<_AP_W,_AP_I,_AP_S, _AP_Q,_AP_O,_AP_N>&ref): d_bv(ref.d_bv), d_index(ref.d_index) {} #pragma empty_line inline __attribute__((always_inline)) af_bit_ref(ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>* bv, int index = 0) : d_bv(*bv), d_index(index) {} inline __attribute__((always_inline)) operator bool () const { return ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); } #pragma empty_line inline __attribute__((always_inline)) af_bit_ref& operator = (unsigned long long val) { d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(val) __Repl2__ = !!val; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), d_index, d_index); __Result__; }); return *this; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_bit_ref& operator = (const ap_int_base<_AP_W2,_AP_S2>& val) { return operator =(val.to_uint64()); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) af_bit_ref& operator = (const af_bit_ref<_AP_W2,_AP_I2, _AP_S2,_AP_Q2,_AP_O2,_AP_N2>& val) { return operator =((unsigned long long) (bool) val); } #pragma empty_line inline __attribute__((always_inline)) af_bit_ref& operator = (const af_bit_ref<_AP_W,_AP_I, _AP_S,_AP_Q,_AP_O,_AP_N>& val) { return operator =((unsigned long long) (bool) val); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_bit_ref& operator = ( const ap_bit_ref<_AP_W2, _AP_S2> &val) { return operator =((unsigned long long) (bool) val); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_bit_ref& operator = ( const ap_range_ref<_AP_W2,_AP_S2>& val) { return operator =((const ap_int_base<_AP_W2, false>) val); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) af_bit_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=((const ap_int_base<_AP_W2, false>)(val)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) af_bit_ref& operator= (const ap_concat_ref<_AP_W2, _AP_T3, _AP_W3, _AP_T3>& val) { return operator=((const ap_int_base<_AP_W2 + _AP_W3, false>)(val)); } #pragma empty_line template<int _AP_W2, int _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, af_bit_ref, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& op) { return ap_concat_ref<1, af_bit_ref, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(*this, op); } #pragma empty_line template<int _AP_W2, int _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, af_bit_ref, 1, ap_bit_ref<_AP_W2, _AP_S2> > operator, (const ap_bit_ref<_AP_W2, _AP_S2> &op) { return ap_concat_ref<1, af_bit_ref, 1, ap_bit_ref<_AP_W2, _AP_S2> >(*this, const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(op)); } #pragma empty_line template<int _AP_W2, int _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<1, af_bit_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> > operator, (const ap_range_ref<_AP_W2, _AP_S2> &op) { return ap_concat_ref<1, af_bit_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(*this, const_cast< ap_range_ref<_AP_W2, _AP_S2>& >(op)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<1, af_bit_ref, _AP_W2 + _AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> op) { return ap_concat_ref<1, af_bit_ref, _AP_W2 + _AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& > (op)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<1, af_bit_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &op) { return ap_concat_ref<1, af_bit_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(op)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<1, af_bit_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &op) { return ap_concat_ref<1, af_bit_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(op)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator == (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { return get() == op.get(); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator != (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { return get() != op.get(); } #pragma empty_line inline __attribute__((always_inline)) bool get() const { return ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); } #pragma empty_line inline __attribute__((always_inline)) bool operator ~ () const { bool bit = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), d_index, d_index); (bool)(__Result__ & 1); }); return bit ? false : true; } #pragma empty_line inline __attribute__((always_inline)) int length() const { return 1; } #pragma empty_line }; /* Range (slice) reference. ---------------------------------------------------------------- */ template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct af_range_ref { ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& d_bv; int l_index; int h_index; #pragma empty_line public: inline __attribute__((always_inline)) af_range_ref(const af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q,_AP_O, _AP_N>&ref): d_bv(ref.d_bv), l_index(ref.l_index), h_index(ref.h_index) {} #pragma empty_line inline __attribute__((always_inline)) af_range_ref(ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>* bv , int h, int l) : d_bv(*bv), l_index(l), h_index(h) { } #pragma empty_line inline __attribute__((always_inline)) operator ap_int_base<_AP_W,false> () const { ap_int_base<_AP_W, false> ret; ret.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; }); return ret; } #pragma empty_line inline __attribute__((always_inline)) operator unsigned long long () const { ap_int_base<_AP_W, false> ret; ret.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; }); return ret.to_uint64(); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) af_range_ref& operator = (const char val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const signed char val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const short val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const unsigned short val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const int val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const unsigned int val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const long val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const unsigned long val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const long long val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } inline __attribute__((always_inline)) af_range_ref& operator = (const unsigned long long val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_range_ref& operator = (const ap_int_base<_AP_W2,_AP_S2>& val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } #pragma empty_line inline __attribute__((always_inline)) af_range_ref& operator = (const char* val) { ap_int_base<_AP_W, false> loc(val); d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(loc.V) __Repl2__ = loc.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); return *this; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) af_range_ref& operator= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { ap_int_base<_AP_W2, false> tmp(val); return operator=(tmp); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) af_range_ref& operator= (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=(val.to_ap_int_base()); } #pragma empty_line inline __attribute__((always_inline)) af_range_ref& operator= (const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& val) { ap_int_base<_AP_W, false> tmp(val); return operator=(tmp); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_range_ref& operator= (const ap_range_ref<_AP_W2, _AP_S2>& val) { return operator=((ap_int_base<_AP_W2, false>)val); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) af_range_ref& operator= (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& val) { return operator=((unsigned long long)(bool)(val)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_range_ref& operator= (const ap_bit_ref<_AP_W2, _AP_S2>& val) { return operator=((unsigned long long)(bool)(val)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) af_range_ref& operator= (const ap_concat_ref<_AP_W2, _AP_T3, _AP_W3, _AP_T3>& val) { return operator=((const ap_int_base<_AP_W2 + _AP_W3, false>)(val)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == (const ap_range_ref<_AP_W2, _AP_S2>& op2) { ap_int_base<_AP_W, false> lop (*this); ap_int_base<_AP_W2, false> rop (op2); return lop == rop; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != (const ap_range_ref<_AP_W2, _AP_S2>& op2) { return !(operator == (op2)); } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < (const ap_range_ref<_AP_W2, _AP_S2>& op2) { ap_int_base<_AP_W, false> lop(*this); ap_int_base<_AP_W2, false> rop(op2); return lop < rop; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= (const ap_range_ref<_AP_W2, _AP_S2>& op2) { ap_int_base<_AP_W, false> lop(*this); ap_int_base<_AP_W2, false> rop(op2); return lop <= rop; } template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > (const ap_range_ref<_AP_W2, _AP_S2>& op2) { return !(operator <= (op2)); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= (const ap_range_ref<_AP_W2, _AP_S2>& op2) { return !(operator < (op2)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator == (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,_AP_Q2, _AP_O2, _AP_N2>& op2) { ap_int_base<_AP_W, false> lop (*this); ap_int_base<_AP_W2, false> rop (op2); return lop == rop; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator != (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,_AP_Q2, _AP_O2, _AP_N2>& op2) { return !(operator == (op2)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator < (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,_AP_Q2, _AP_O2, _AP_N2>& op2) { ap_int_base<_AP_W, false> lop (*this); ap_int_base<_AP_W2, false> rop (op2); return lop < rop; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator <= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,_AP_Q2, _AP_O2, _AP_N2>& op2) { ap_int_base<_AP_W, false> lop( *this); ap_int_base<_AP_W2, false> rop (op2); return lop <= rop; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator > (const af_range_ref<_AP_W2, _AP_I2, _AP_S2,_AP_Q2, _AP_O2, _AP_N2>& op2) { return !(operator <= (op2)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator >= (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) { return !(operator < (op2)); } #pragma empty_line template <int _AP_W3> inline __attribute__((always_inline)) void set(const ap_int_base<_AP_W3, false>& val) { d_bv.V = ({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; typeof(val.V) __Repl2__ = val.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), l_index, h_index); __Result__; }); } #pragma empty_line template<int _AP_W2, int _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, af_range_ref, _AP_W2, ap_int_base<_AP_W2, _AP_S2> > operator, (ap_int_base<_AP_W2, _AP_S2>& op) { return ap_concat_ref<_AP_W, af_range_ref, _AP_W2, ap_int_base<_AP_W2, _AP_S2> >(*this, op); } #pragma empty_line template<int _AP_W2, int _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, af_range_ref, 1, ap_bit_ref<_AP_W2, _AP_S2> > operator, (const ap_bit_ref<_AP_W2, _AP_S2> &op) { return ap_concat_ref<_AP_W, af_range_ref, 1, ap_bit_ref<_AP_W2, _AP_S2> >(*this, const_cast<ap_bit_ref<_AP_W2, _AP_S2>& >(op)); } #pragma empty_line template<int _AP_W2, int _AP_S2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, af_range_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> > operator, (const ap_range_ref<_AP_W2, _AP_S2> &op) { return ap_concat_ref<_AP_W, af_range_ref, _AP_W2, ap_range_ref<_AP_W2, _AP_S2> >(*this, const_cast<ap_range_ref<_AP_W2, _AP_S2>& >(op)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, af_range_ref, _AP_W2 + _AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> > operator, (const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op) { return ap_concat_ref<_AP_W, af_range_ref, _AP_W2 + _AP_W3, ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3> >(*this, const_cast<ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& >(op)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, af_range_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &op) { return ap_concat_ref<_AP_W, af_range_ref, _AP_W2, af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(op)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_concat_ref<_AP_W, af_range_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> > operator, (const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &op) { return ap_concat_ref<_AP_W, af_range_ref, 1, af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> >(*this, const_cast<af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& >(op)); } #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) int length() const { return h_index >= l_index ? h_index - l_index + 1 : l_index - h_index + 1; } #pragma empty_line inline __attribute__((always_inline)) int to_int() const { return (int)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) unsigned to_uint() const { return (unsigned)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) long to_long() const { return (long)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) unsigned long to_ulong() const { return (unsigned long)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) ap_slong to_int64() const { return (ap_slong)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } inline __attribute__((always_inline)) ap_ulong to_uint64() const { return (ap_ulong)(({ typeof(d_bv.V) __Result__ = 0; typeof(d_bv.V) __Val2__ = d_bv.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), l_index, h_index); __Result__; })); } }; #pragma empty_line // ----------------------------------------------------------------------------- /// ap_fixed_base: AutoPilot fixed point. // ----------------------------------------------------------------------------- template<int _AP_W, int _AP_I, bool _AP_S=true, ap_q_mode _AP_Q=SC_TRN, ap_o_mode _AP_O=SC_WRAP, int _AP_N=0> struct ap_fixed_base : ssdm_int<_AP_W, _AP_S> { #pragma empty_line public: typedef ssdm_int<_AP_W, _AP_S> Base; #pragma empty_line static const int width = _AP_W; static const int iwidth = _AP_I; static const ap_q_mode qmode = _AP_Q; static const ap_o_mode omode = _AP_O; #pragma empty_line /*__attribute__((weak))*/ void overflow_adjust(bool underflow, bool overflow,bool lD, bool sign) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line #pragma empty_line if (!underflow && !overflow) return; if (_AP_O==SC_WRAP) { if (_AP_N == 0) return; if (_AP_S) { //signed SC_WRAP //n_bits == 1 Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(sign) __Repl2__ = !!sign; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), _AP_W - 1, _AP_W - 1); __Result__; }); if (_AP_N > 1) { //n_bits > 1 ap_int_base<_AP_W, false> mask(-1); if (sign) mask.V = 0; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(mask.V) __Repl2__ = mask.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), _AP_W - _AP_N, _AP_W - 2); __Result__; }); #pragma empty_line } } else { //unsigned SC_WRAP ap_int_base<_AP_W, false> mask(-1); Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(mask.V) __Repl2__ = mask.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), _AP_W - _AP_N, _AP_W - 1); __Result__; }); #pragma empty_line } } else if (_AP_O==SC_SAT_ZERO) { Base::V = 0; } else if (_AP_O == SC_WRAP_SM && _AP_S) { bool Ro = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); }); if (_AP_N == 0) { if (lD != Ro) { Base::V = ~Base::V; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(lD) __Repl2__ = !!lD; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), _AP_W - 1, _AP_W - 1); __Result__; }); } } else { if (_AP_N == 1 && sign != Ro) { Base::V = ~Base::V; } else if (_AP_N > 1) { bool lNo = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - _AP_N, _AP_W - _AP_N); (bool)(__Result__ & 1); }); if (lNo == sign) Base::V = ~Base::V; ap_int_base<_AP_W, false> mask(-1); if (sign) mask.V = 0; Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(mask.V) __Repl2__ = mask.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), _AP_W - _AP_N, _AP_W - 2); __Result__; }); #pragma empty_line } Base::V = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; typeof(sign) __Repl2__ = !!sign; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), _AP_W - 1, _AP_W - 1); __Result__; }); #pragma empty_line } } else { if (_AP_S) { if (overflow) { Base::V = 1; Base::V <<= _AP_W - 1; Base::V = ~Base::V; } else if (underflow) { Base::V = 1; Base::V <<= _AP_W - 1; if (_AP_O==SC_SAT_SYM) Base::V |= 1; } } else { if (overflow) Base::V = ~(ap_int_base<_AP_W,false>(0).V); else if (underflow) Base::V = 0; } } } #pragma empty_line /*__attribute__((weak))*/ bool quantization_adjust(bool qb, bool r, bool s) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line bool carry=(bool)({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W-1, _AP_W-1); (bool)(__Result__ & 1); }); if (_AP_Q==SC_TRN) return false; if (_AP_Q==SC_RND_ZERO) qb &= s || r; else if (_AP_Q==SC_RND_MIN_INF) qb &= r; else if (_AP_Q==SC_RND_INF) qb &= !s || r; else if (_AP_Q==SC_RND_CONV) qb &= ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, 0); (bool)(__Result__ & 1); }) || r; else if (_AP_Q==SC_TRN_ZERO) qb = s && ( qb || r ); Base::V += qb; //return qb; return carry&&(!(bool)({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W-1, _AP_W-1); (bool)(__Result__ & 1); })); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2> struct RType { enum { _AP_F=_AP_W-_AP_I, F2=_AP_W2-_AP_I2, mult_w = _AP_W+_AP_W2, mult_i = _AP_I+_AP_I2, mult_s = _AP_S||_AP_S2, plus_w = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1+((_AP_F) > (F2) ? (_AP_F) : (F2)), plus_i = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1, plus_s = _AP_S||_AP_S2, minus_w = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1+((_AP_F) > (F2) ? (_AP_F) : (F2)), minus_i = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+1, minus_s = true, #pragma empty_line div_w = _AP_W + ((_AP_W2 - _AP_I2) > (0) ? (_AP_W2 - _AP_I2) : (0)) + _AP_S2, #pragma empty_line #pragma empty_line #pragma empty_line div_i = _AP_I + _AP_W2 -_AP_I2 + _AP_S2, div_s = _AP_S||_AP_S2, logic_w = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2)))+((_AP_F) > (F2) ? (_AP_F) : (F2)), logic_i = ((_AP_I+(_AP_S2&&!_AP_S)) > (_AP_I2+(_AP_S&&!_AP_S2)) ? (_AP_I+(_AP_S2&&!_AP_S)) : (_AP_I2+(_AP_S&&!_AP_S2))), logic_s = _AP_S||_AP_S2 }; #pragma empty_line typedef ap_fixed_base<mult_w, mult_i, mult_s> mult; typedef ap_fixed_base<plus_w, plus_i, plus_s> plus; typedef ap_fixed_base<minus_w, minus_i, minus_s> minus; typedef ap_fixed_base<logic_w, logic_i, logic_s> logic; typedef ap_fixed_base<div_w, div_i, div_s> div; typedef ap_fixed_base<_AP_W, _AP_I, _AP_S> arg1; }; #pragma empty_line /// Constructors. // ------------------------------------------------------------------------- inline __attribute__((always_inline)) ap_fixed_base() { ; /* #ifdef __SC_COMPATIBLE__ Base::V = 0; #endif */ } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> /*__attribute__((weak))*/ ap_fixed_base (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2> &op) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line enum { N2=_AP_W2, _AP_F=_AP_W-_AP_I, F2=_AP_W2-_AP_I2, QUAN_INC = F2>_AP_F && !(_AP_Q==SC_TRN || (_AP_Q==SC_TRN_ZERO && !_AP_S2)) }; bool carry = false; #pragma empty_line #pragma empty_line #pragma empty_line // handle quantization unsigned sh_amt = (F2 > _AP_F) ? F2 - _AP_F : _AP_F - F2; bool signbit = ({ typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Result__ = 0; typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Val2__ = (const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V); __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W2-1, _AP_W2-1); (bool)(__Result__ & 1); }); #pragma empty_line bool isneg = signbit && _AP_S2; if (F2 == _AP_F) Base::V = op.V; else if (F2 > _AP_F) { if (sh_amt < _AP_W2) Base::V = op.V >> sh_amt; else { static int AllOnesInt = -1; if (isneg) Base::V = AllOnesInt; else Base::V = 0; } if (_AP_Q!=SC_TRN && !(_AP_Q==SC_TRN_ZERO && !_AP_S2)) { bool qbit = ({ typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Result__ = 0; typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Val2__ = (const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V); __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), F2-_AP_F-1, F2-_AP_F-1); (bool)(__Result__ & 1); }); #pragma empty_line bool qb = (F2-_AP_F > _AP_W2) ? _AP_S2 && signbit : qbit; #pragma empty_line bool r = (F2 > _AP_F+1) ? ({ typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Result__ = 0; typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Val2__ = (const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V); __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, F2-_AP_F-2<_AP_W2?F2-_AP_F-2:_AP_W2-1); __Result__; })!=0 : false; #pragma empty_line #pragma empty_line carry = quantization_adjust(qb, r, _AP_S2 && signbit); } } else { // no quantization Base::V = op.V; if (sh_amt < _AP_W) Base::V = Base::V << sh_amt; else Base::V = 0; } #pragma empty_line // handle overflow/underflow if ((_AP_O != SC_WRAP || _AP_N != 0) && ((!_AP_S && _AP_S2) || _AP_I-_AP_S < _AP_I2-_AP_S2+(QUAN_INC || (_AP_S2 && _AP_O==SC_SAT_SYM)))) { // saturation bool deleted_zeros = _AP_S2?true:!carry, deleted_ones = true; bool neg_src = isneg; bool lD = false; #pragma empty_line bool newsignbit = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W-1, _AP_W-1); (bool)(__Result__ & 1); }); int pos1 = F2 - _AP_F + _AP_W; int pos2 = F2 - _AP_F + _AP_W + 1; if (pos1 < _AP_W2 && pos1 >= 0) lD = ({ typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Result__ = 0; typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V)) __Val2__ = (const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*>(&op)->V); __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), pos1, pos1); (bool)(__Result__ & 1); }); #pragma empty_line #pragma empty_line #pragma empty_line if(pos1 < _AP_W2) { bool Range1_all_ones = true; bool Range1_all_zeros = true; bool Range2_all_ones = true; ap_int_base<_AP_W2,false> Range1(0); ap_int_base<_AP_W2,false> Range2(0); ap_int_base<_AP_W2,false> all_ones(-1); #pragma empty_line if (pos2 < _AP_W2 && pos2 >= 0) { Range2.V = ({ typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*> (&op)->V)) __Result__ = 0; typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*> (&op)->V)) __Val2__ = (const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*> (&op)->V); __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), pos2, _AP_W2-1); __Result__; }); #pragma empty_line #pragma empty_line Range2_all_ones = Range2 == (all_ones >> pos2); } else if (pos2 < 0) Range2_all_ones = false; #pragma empty_line if (pos1 >= 0 && pos2 < _AP_W2) { Range1.V = ({ typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*> (&op)->V)) __Result__ = 0; typeof((const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*> (&op)->V)) __Val2__ = (const_cast<ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>*> (&op)->V); __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), pos1, _AP_W2-1); __Result__; }); #pragma empty_line #pragma empty_line #pragma empty_line Range1_all_ones = Range1 == (all_ones >> pos1); Range1_all_zeros = !Range1.V ; } else if (pos2 == _AP_W2) { Range1_all_ones = lD; Range1_all_zeros = !lD; } else if (pos1 < 0) { Range1_all_zeros = !op.V; Range1_all_ones = false; } #pragma empty_line #pragma empty_line deleted_zeros = deleted_zeros && (carry ? Range1_all_ones: Range1_all_zeros); deleted_ones = carry ? Range2_all_ones && (pos1 < 0 || !lD): Range1_all_ones; neg_src = isneg && !(carry&&Range1_all_ones); } else neg_src = isneg && newsignbit; bool neg_trg = _AP_S && newsignbit; bool overflow = (neg_trg || !deleted_zeros) && !isneg; bool underflow = (!neg_trg || !deleted_ones) && neg_src; if ((_AP_O == SC_SAT_SYM) && _AP_S2 && _AP_S) underflow |= neg_src && (_AP_W > 1 ? ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, _AP_W - 2); __Result__; }) == 0 : true); #pragma empty_line overflow_adjust(underflow, overflow, lD, neg_src); } } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base(const volatile ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> &op) { *this = const_cast<ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>&>(op); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base (const ap_int_base<_AP_W2,_AP_S2>& op) { ; ap_fixed_base<_AP_W2,_AP_W2,_AP_S2> f_op; f_op.V = op.V; *this = f_op; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base( bool b ) { *this = (ap_fixed_base<1, 1, false>) b; } inline __attribute__((always_inline)) ap_fixed_base( char b ) { *this = (ap_fixed_base<8, 8, true>) b; } inline __attribute__((always_inline)) ap_fixed_base( signed char b ) { *this = (ap_fixed_base<8, 8, true>) b; } inline __attribute__((always_inline)) ap_fixed_base( unsigned char b ) { *this = (ap_fixed_base<8, 8, false>) b; } inline __attribute__((always_inline)) ap_fixed_base( signed short b ) { *this = (ap_fixed_base<16, 16, true>) b; } inline __attribute__((always_inline)) ap_fixed_base( unsigned short b ) { *this = (ap_fixed_base<16, 16, false>) b; } inline __attribute__((always_inline)) ap_fixed_base( signed int b ) { *this = (ap_fixed_base<32, 32, true>) b; } inline __attribute__((always_inline)) ap_fixed_base( unsigned int b ) { *this = (ap_fixed_base<32, 32, false>) b; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base( signed long b ) { *this = (ap_fixed_base<64, 64, true>) b; } inline __attribute__((always_inline)) ap_fixed_base( unsigned long b ) { *this = (ap_fixed_base<64, 64, false>) b; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base( ap_slong b ) { *this = (ap_fixed_base<64, 64, true>) b; } inline __attribute__((always_inline)) ap_fixed_base( ap_ulong b ) { *this = (ap_fixed_base<64, 64, false>) b; } inline __attribute__((always_inline)) ap_fixed_base(const char* str) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), 10, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N, true); Base::V = Result; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base(const char* str, signed char radix) { typeof(Base::V) Result; _ssdm_string2bits((void*)(&Result), (const char*)(str), radix, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N, true); Base::V = Result; } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base(const ap_bit_ref<_AP_W2, _AP_S2>& op) { *this = ((bool)op); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base(const ap_range_ref<_AP_W2, _AP_S2>& op) { *this = (ap_int_base<_AP_W2, false>(op)); } #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_fixed_base(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op) { *this = (ap_int_base<_AP_W2 + _AP_W3, false>(op)); #pragma empty_line } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { *this = (bool(op)); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { *this = (ap_int_base<_AP_W2, false>(op)); } #pragma empty_line // helper function. inline __attribute__((always_inline)) unsigned long long doubleToRawBits(double pf) const { union { unsigned long long __L; double __D; } LD; LD.__D = pf; return LD.__L; } inline __attribute__((always_inline)) unsigned int floatToRawBits(float pf) const { union { unsigned int __L; float __D; } LD; LD.__D = pf; return LD.__L; } inline __attribute__((always_inline)) unsigned short halfToRawBits(half pf) const { union { unsigned short __L; half __D; } LD; LD.__D = pf; return LD.__L; } #pragma empty_line inline __attribute__((always_inline)) double rawBitsToDouble(unsigned long long pi) const { union { unsigned long long __L; double __D; } LD; LD.__L = pi; return LD.__D; } #pragma empty_line inline __attribute__((always_inline)) float rawBitsToFloat (unsigned int pi) const { union { unsigned int __L; float __D; } LD; LD.__L = pi; return LD.__D; } #pragma empty_line inline __attribute__((always_inline)) half rawBitsToHalf (unsigned short pi) const { union { unsigned short __L; half __D; } LD; LD.__L = pi; return LD.__D; } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base(double d) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line ap_int_base<64,false> ireg; ireg.V = doubleToRawBits(d); bool isneg = ({ typeof(ireg.V) __Result__ = 0; typeof(ireg.V) __Val2__ = ireg.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 63, 63); (bool)(__Result__ & 1); }); #pragma empty_line ap_int_base<11 + 1, true> exp; ap_int_base<11, false> exp_tmp; exp_tmp.V = ({ typeof(ireg.V) __Result__ = 0; typeof(ireg.V) __Val2__ = ireg.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 52, 52 + 11 -1); __Result__; }); #pragma empty_line exp = exp_tmp - ((1<<(11 -1))-1); ap_int_base<52 + 2, true> man; man.V = ({ typeof(ireg.V) __Result__ = 0; typeof(ireg.V) __Val2__ = ireg.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, 52 - 1); __Result__; }); //do not support NaN #pragma empty_line ; man.V = ({ typeof(man.V) __Result__ = 0; typeof(man.V) __Val2__ = man.V; typeof(1) __Repl2__ = !!1; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 52, 52); __Result__; }); if(isneg) man = -man; if ( (ireg.V & 0x7fffffffffffffffLL)==0 ) { Base::V = 0; } else { int _AP_W2=52 +2, _AP_I2=exp.V+2, _AP_F=_AP_W-_AP_I, F2=_AP_W2-_AP_I2; bool _AP_S2 = true, QUAN_INC = F2>_AP_F && !(_AP_Q==SC_TRN || (_AP_Q==SC_TRN_ZERO && !_AP_S2)); bool carry = false; // handle quantization unsigned sh_amt = (F2 > _AP_F) ? F2 - _AP_F : _AP_F - F2; if (F2 == _AP_F) Base::V = man.V; else if (F2 > _AP_F) { if (sh_amt < 52 + 2) Base::V = man.V >> sh_amt; else { static int AllOnesInt = -1; if (isneg) Base::V = AllOnesInt; else Base::V = 0; } if ((_AP_Q != SC_TRN) && !((_AP_Q == SC_TRN_ZERO) && !_AP_S2)) { #pragma empty_line bool qb = (F2-_AP_F > _AP_W2) ? isneg : (bool) ({ typeof(man.V) __Result__ = 0; typeof(man.V) __Val2__ = man.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), F2 - _AP_F - 1, F2 - _AP_F - 1); (bool)(__Result__ & 1); }); bool r = (F2 > _AP_F + 1) ? ({ typeof(man.V) __Result__ = 0; typeof(man.V) __Val2__ = man.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, (F2 - _AP_F - 2 < _AP_W2) ? (F2 - _AP_F - 2): (_AP_W2 - 1)); __Result__; }) != #pragma empty_line 0 : false; carry = quantization_adjust(qb, r, isneg); } } else { // no quantization Base::V = man.V; if (sh_amt < _AP_W) Base::V = Base::V << sh_amt; else Base::V = 0; } // handle overflow/underflow if ((_AP_O != SC_WRAP || _AP_N != 0) && ((!_AP_S && _AP_S2) || _AP_I - _AP_S < _AP_I2 - _AP_S2 + (QUAN_INC || (_AP_S2 && (_AP_O == SC_SAT_SYM)))) ) { // saturation bool deleted_zeros = _AP_S2?true:!carry, deleted_ones = true; bool neg_src = isneg; bool lD = false; int pos1 =F2 - _AP_F + _AP_W; int pos2 =F2 - _AP_F + _AP_W + 1; bool newsignbit = ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); }); if (pos1 < _AP_W2 && pos1 >= 0) //lD = _ssdm_op_get_bit(man.V, pos1); lD = (man.V >> pos1) & 1; if (pos1 < _AP_W2 ) { bool Range1_all_ones = true; bool Range1_all_zeros = true; bool Range2_all_ones = true; ap_int_base<52 +2,false> Range2; ap_int_base<52 +2,false> all_ones(-1); #pragma empty_line if (pos2 >= 0 && pos2 < _AP_W2) { //Range2.V = _ssdm_op_get_range(man.V, // pos2, _AP_W2 - 1); Range2.V = man.V; Range2.V >>= pos2; Range2_all_ones = Range2 == (all_ones >> pos2); } else if (pos2 < 0) Range2_all_ones = false; if (pos1 >= 0 && pos2 < _AP_W2) { Range1_all_ones = Range2_all_ones && lD; Range1_all_zeros = !Range2.V && !lD; } else if (pos2 == _AP_W2) { Range1_all_ones = lD; Range1_all_zeros = !lD; } else if (pos1 < 0) { Range1_all_zeros = !man.V; Range1_all_ones = false; } #pragma empty_line deleted_zeros = deleted_zeros && (carry ? Range1_all_ones: Range1_all_zeros); deleted_ones = carry ? Range2_all_ones && ( pos1 < 0 || !lD): Range1_all_ones; neg_src=isneg && !(carry&&Range1_all_ones); } else neg_src = isneg && newsignbit; bool neg_trg = _AP_S && newsignbit; bool overflow = (neg_trg || !deleted_zeros) && !isneg; bool underflow =(!neg_trg || !deleted_ones) && neg_src; if ((_AP_O == SC_SAT_SYM) && _AP_S2 && _AP_S) underflow |= neg_src && (_AP_W > 1 ? ({ typeof(Base::V) __Result__ = 0; typeof(Base::V) __Val2__ = Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, _AP_W - 2); __Result__; }) == 0 : true); overflow_adjust(underflow, overflow, lD, neg_src); } } } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base(float d) { *this = ap_fixed_base(double(d)); } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base(half d) { *this = ap_fixed_base(double(d)); } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base& operator=(const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) { Base::V = op.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base& operator=(const volatile ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) { Base::V = op.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) void operator=(const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) volatile { Base::V = op.V; } #pragma empty_line inline __attribute__((always_inline)) void operator=(const volatile ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) volatile { Base::V = op.V; } #pragma empty_line // Set this ap_fixed_base with a bits string. That means the ssdm_int::V // inside this ap_fixed_base is assigned by bv. // Note the input parameter should be a fixed-point formatted bit string. inline __attribute__((always_inline)) ap_fixed_base& setBits(unsigned long long bv) { Base::V = bv; return *this; } // Return a ap_fixed_base object whose ssdm_int::V is assigned by bv. // Note the input parameter should be a fixed-point formatted bit string. static inline __attribute__((always_inline)) ap_fixed_base bitsToFixed(unsigned long long bv) { ap_fixed_base Tmp; Tmp.V = bv; return Tmp; } #pragma empty_line // Explicit conversion functions to ap_int_base that captures // all integer bits (bits are truncated) inline __attribute__((always_inline)) ap_int_base<((_AP_I) > (1) ? (_AP_I) : (1)),_AP_S> to_ap_int_base(bool Cnative = true) const { //return ap_int_base<AP_MAX(_AP_I,1),_AP_S>(_AP_I > 1 ? // _ssdm_op_get_range(const_cast<ap_fixed_base*>(this)->Base::V,_AP_W-_AP_I,_AP_W-1) : 0); ap_int_base<((_AP_I) > (1) ? (_AP_I) : (1)),_AP_S> ret(0); if(_AP_I > 0 && _AP_I <= _AP_W) ret.V = ({ typeof(const_cast< ap_fixed_base*>(this)->Base::V) __Result__ = 0; typeof(const_cast< ap_fixed_base*>(this)->Base::V) __Val2__ = const_cast< ap_fixed_base*>(this)->Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - _AP_I, _AP_W - 1); __Result__; }); #pragma empty_line #pragma empty_line else if (_AP_I > _AP_W) { ret.V = ({ typeof(const_cast< ap_fixed_base*>(this)->Base::V) __Result__ = 0; typeof(const_cast< ap_fixed_base*>(this)->Base::V) __Val2__ = const_cast< ap_fixed_base*>(this)->Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, _AP_W - 1); __Result__; }); #pragma empty_line unsigned int shift = _AP_I - _AP_W; ret.V <<= shift; } if (Cnative) { //Follow C native data type, conversion from double to int if (_AP_S && ({ typeof(const_cast< ap_fixed_base*>(this)->Base::V) __Result__ = 0; typeof(const_cast< ap_fixed_base*>(this)->Base::V) __Val2__ = const_cast< ap_fixed_base*>(this)->Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); }) #pragma empty_line && (_AP_I < _AP_W) && (({ typeof(const_cast<ap_fixed_base*>(this)->Base::V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->Base::V) __Val2__ = const_cast<ap_fixed_base*>(this)->Base::V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 0, _AP_I >= 0 ? _AP_W - _AP_I - 1: _AP_W - 1); __Result__; }) != 0)) #pragma empty_line #pragma empty_line ret.V += 1; } else { //Follow OSCI library, conversion from sc_fixed to sc_int } return ret; }; #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) operator ap_int_base<_AP_W2,_AP_S2> () const { return (ap_int_base<_AP_W2,_AP_S2>)to_ap_int_base(); } #pragma empty_line // Explicit conversion function to C built-in integral type. inline __attribute__((always_inline)) int to_int() const { return to_ap_int_base().to_int(); } inline __attribute__((always_inline)) unsigned to_uint() const { return to_ap_int_base().to_uint(); } inline __attribute__((always_inline)) ap_slong to_int64() const { return to_ap_int_base().to_int64(); } inline __attribute__((always_inline)) ap_ulong to_uint64() const { return to_ap_int_base().to_uint64(); } /*__attribute__((weak))*/ double to_double() const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line if (_AP_W - _AP_I > 0 && _AP_W <= 64) { if (!Base::V) return 0; double dp = Base::V; ap_int_base<64,true> res; res.V = doubleToRawBits(dp); ap_int_base<11, true> exp; exp.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 52, 62); __Result__; }); exp -= _AP_W - _AP_I; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(exp.V) __Repl2__ = exp.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 52, 62); __Result__; }); dp = rawBitsToDouble(res.to_int64()); return dp; } else if (_AP_I - _AP_W >= 0 && _AP_I <= 64) { ap_int_base<((1) > (_AP_I) ? (1) : (_AP_I)), _AP_S> temp; temp.V = Base::V; temp <<= _AP_I - _AP_W; double dp = temp.V; return dp; } else { if (!Base::V) return 0; ap_int_base<64,true> res; res.V = 0; bool isneg = _AP_S ? ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); }) : false; #pragma empty_line ap_int_base<_AP_W+_AP_S,_AP_S> tmp; tmp.V = Base::V; if (isneg) tmp.V = -Base::V; #pragma empty_line res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(isneg) __Repl2__ = !!isneg; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 63, 63); __Result__; }); int j = _AP_W+_AP_S-1-tmp.countLeadingZeros(); #pragma empty_line int exp = _AP_I-(_AP_W-j); res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(exp + ((1<<(11 -1))-1)) __Repl2__ = exp + ((1<<(11 -1))-1); __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 52, 62); __Result__; }); if (j == 0) res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(0) __Repl2__ = 0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, 52 - 1); __Result__; }); else { ap_int_base<52,false> man; man.V = ({ typeof(tmp.V) __Result__ = 0; typeof(tmp.V) __Val2__ = tmp.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), j > 52 ? j - 52 : 0, j - 1); __Result__; }); #pragma empty_line man.V <<= 52 > j ? 52 -j : 0; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(man.V) __Repl2__ = man.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, 52 - 1); __Result__; }); } double dp = rawBitsToDouble(res.to_int64()); return dp; } #pragma empty_line } #pragma empty_line /*__attribute__((weak))*/ float to_float() const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line if (_AP_W - _AP_I > 0 && _AP_W <= 64) { if (!Base::V) return 0; float dp = Base::V; ap_int_base<32,true> res; res.V = floatToRawBits(dp); ap_int_base<8, true> exp; exp.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 23, 30); __Result__; }); exp -= _AP_W - _AP_I; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(exp.V) __Repl2__ = exp.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 23, 30); __Result__; }); dp = rawBitsToFloat(res.to_int()); return dp; } else if (_AP_I - _AP_W >= 0 && _AP_I <= 64) { ap_int_base<((1) > (_AP_I) ? (1) : (_AP_I)), _AP_S> temp; temp.V = Base::V; temp <<= _AP_I - _AP_W; float dp = temp.V; return dp; } else { if (!Base::V) return 0; ap_int_base<32,true> res; res.V = 0; bool isneg = _AP_S ? ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); }) : false; #pragma empty_line ap_int_base<_AP_W+_AP_S,_AP_S> tmp; tmp.V = Base::V; if (isneg) tmp.V = -Base::V; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(isneg) __Repl2__ = !!isneg; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 31, 31); __Result__; }); int j = _AP_W+_AP_S-1-tmp.countLeadingZeros(); #pragma empty_line int exp = _AP_I-(_AP_W-j); res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(exp + ((1<<(8 -1))-1)) __Repl2__ = exp + ((1<<(8 -1))-1); __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 23, 30); __Result__; }); if (j == 0) res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(0) __Repl2__ = 0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, 23 - 1); __Result__; }); else { ap_int_base<23,false> man; man.V = ({ typeof(tmp.V) __Result__ = 0; typeof(tmp.V) __Val2__ = tmp.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), j > 23 ? j - 23 : 0, j - 1); __Result__; }); #pragma empty_line man.V <<= 23 > j ? 23 -j: 0; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(man.V) __Repl2__ = man.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, 23 - 1); __Result__; }); } return rawBitsToFloat(res.to_int()); } } inline __attribute__((always_inline)) half to_half() const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line if (_AP_W - _AP_I > 0 && _AP_W <= 64) { if (!Base::V) return 0; half dp = Base::V; ap_int_base<16,true> res; res.V = halfToRawBits(dp); ap_int_base<5, true> exp; exp.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), 10, 14); __Result__; }); exp -= _AP_W - _AP_I; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(exp.V) __Repl2__ = exp.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 10, 14); __Result__; }); dp = rawBitsToHalf(res.to_int()); return dp; } else if (_AP_I - _AP_W >= 0 && _AP_I <= 64) { ap_int_base<((1) > (_AP_I) ? (1) : (_AP_I)), _AP_S> temp; temp.V = Base::V; temp <<= _AP_I - _AP_W; half dp = temp.V; return dp; } else { if (!Base::V) return 0; ap_int_base<16,true> res; res.V = 0; bool isneg = _AP_S ? ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); }) : false; #pragma empty_line ap_int_base<_AP_W+_AP_S,_AP_S> tmp; tmp.V = Base::V; if (isneg) tmp.V = -Base::V; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(isneg) __Repl2__ = !!isneg; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 31, 31); __Result__; }); int j = _AP_W+_AP_S-1-tmp.countLeadingZeros(); #pragma empty_line int exp = _AP_I-(_AP_W-j); res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(exp + ((1<<(5 -1))-1)) __Repl2__ = exp + ((1<<(5 -1))-1); __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 10, 14); __Result__; }); if (j == 0) res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(0) __Repl2__ = 0; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, 10 - 1); __Result__; }); else { ap_int_base<10,false> man; man.V = ({ typeof(tmp.V) __Result__ = 0; typeof(tmp.V) __Val2__ = tmp.V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), j > 10 ? j - 10 : 0, j - 1); __Result__; }); #pragma empty_line man.V <<= 10 > j ? 10 -j: 0; res.V = ({ typeof(res.V) __Result__ = 0; typeof(res.V) __Val2__ = res.V; typeof(man.V) __Repl2__ = man.V; __builtin_bit_part_set((void*)(&__Result__), (void*)(&__Val2__), (void*)(&__Repl2__), 0, 10 - 1); __Result__; }); } return rawBitsToHalf(res.to_int()); } } #pragma empty_line inline __attribute__((always_inline)) operator double () const { return to_double(); } #pragma empty_line inline __attribute__((always_inline)) operator float () const { return to_float(); } inline __attribute__((always_inline)) operator half () const { return to_half(); } inline __attribute__((always_inline)) operator char () const { return (char) to_int(); } #pragma empty_line inline __attribute__((always_inline)) operator signed char () const { return (signed char) to_int(); } #pragma empty_line inline __attribute__((always_inline)) operator unsigned char () const { return (unsigned char) to_uint(); } #pragma empty_line inline __attribute__((always_inline)) operator short () const { return (short) to_int(); } #pragma empty_line inline __attribute__((always_inline)) operator unsigned short () const { return (unsigned short) to_uint(); } #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) operator int () const { return to_int(); } #pragma empty_line inline __attribute__((always_inline)) operator unsigned int () const { return to_uint(); } #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) operator long () const { return (long)to_int64(); } #pragma empty_line inline __attribute__((always_inline)) operator unsigned long () const { return (unsigned long) to_uint64(); } #pragma line 1322 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" inline __attribute__((always_inline)) operator unsigned long long () const { return to_uint64(); } #pragma empty_line inline __attribute__((always_inline)) operator long long () const { return to_int64(); } #pragma empty_line inline __attribute__((always_inline)) int length() const { return _AP_W; }; // Count the number of zeros from the most significant bit // to the first one bit. Note this is only for ap_fixed_base whose // _AP_W <= 64, otherwise will incur assertion. inline __attribute__((always_inline)) int countLeadingZeros() { if (_AP_W <= 32) { ap_int_base<32, false> t(-1ULL); t.range(_AP_W-1, 0) = this->range(0, _AP_W-1); return __builtin_ctz(t.V); } else if (_AP_W <= 64) { ap_int_base<64, false> t(-1ULL); t.range(_AP_W-1, 0) = this->range(0, _AP_W-1); return __builtin_ctzll(t.V); } else { enum { __N = (_AP_W+63)/64 }; int NZeros = 0; unsigned i = 0; bool hitNonZero = false; for (i=0; i<__N-1; ++i) { ap_int_base<64, false> t; t.range(0, 63) = this->range(_AP_W - i*64 - 64, _AP_W - i*64 - 1); NZeros += hitNonZero?0:__builtin_clzll(t.V); hitNonZero |= (t != 0); } if (!hitNonZero) { ap_int_base<64, false> t(-1ULL); t.range(63-(_AP_W-1)%64, 63) = this->range(0, (_AP_W-1)%64); NZeros += __builtin_clzll(t.V); } return NZeros; } } #pragma empty_line // Arithmetic : Binary // ------------------------------------------------------------------------- template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::mult operator *(const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { typename RType<_AP_W2,_AP_I2,_AP_S2>::mult r; ap_int_base<_AP_W+_AP_W2,_AP_S> OP1; OP1.V = Base::V; ap_int_base<_AP_W+_AP_W2,_AP_S2> OP2; OP2.V = op2.V ; r.V = OP1.V * OP2.V; return r; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::div operator /(const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { typename RType<_AP_W2,_AP_I2,_AP_S2>::div r; #pragma empty_line ap_fixed_base<_AP_W + ((_AP_W2 - _AP_I2) > (0) ? (_AP_W2 - _AP_I2) : (0)), _AP_I, _AP_S> t(*this); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line r.V = t.V / op2.V; //r = double(to_double() / op2.to_double()); return r; } #pragma line 1406 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::plus operator + (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { ; enum { _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 }; ; typename RType<_AP_W2,_AP_I2,_AP_S2>::plus r, lhs(*this), rhs(op2); ; r.V = lhs.V + rhs.V; return r; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::minus operator - (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { ; enum { _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 }; ; typename RType<_AP_W2,_AP_I2,_AP_S2>::minus r, lhs(*this), rhs(op2); ; r.V = lhs.V - rhs.V; return r; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::logic operator & (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { ; enum { _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 }; ; typename RType<_AP_W2,_AP_I2,_AP_S2>::logic r, lhs(*this), rhs(op2); ; r.V = lhs.V & rhs.V; return r; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::logic operator | (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { ; enum { _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 }; ; typename RType<_AP_W2,_AP_I2,_AP_S2>::logic r, lhs(*this), rhs(op2); ; r.V = lhs.V | rhs.V; return r; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) typename RType<_AP_W2,_AP_I2,_AP_S2>::logic operator ^ (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { ; enum { _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 }; ; typename RType<_AP_W2,_AP_I2,_AP_S2>::logic r, lhs(*this), rhs(op2); ; r.V = lhs.V ^ rhs.V; return r; } #pragma empty_line #pragma empty_line // Arithmetic : assign // ------------------------------------------------------------------------- #pragma line 1424 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator += (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator + (op2); return *this; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator -= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator - (op2); return *this; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator *= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator * (op2); return *this; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator /= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator / (op2); return *this; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator &= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator & (op2); return *this; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator |= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator | (op2); return *this; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator ^= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2,_AP_N2>& op2) { ; *this = operator ^ (op2); return *this; } #pragma empty_line #pragma empty_line // Prefix increment, decrement. // ------------------------------------------------------------------------- inline __attribute__((always_inline)) ap_fixed_base& operator ++() { operator+=(ap_fixed_base<_AP_W-_AP_I+1,1,false>(1)); return *this; } inline __attribute__((always_inline)) ap_fixed_base& operator --() { operator-=(ap_fixed_base<_AP_W-_AP_I+1,1,false>(1)); return *this; } #pragma empty_line // Postfix increment, decrement // ------------------------------------------------------------------------- inline __attribute__((always_inline)) const ap_fixed_base operator ++(int) { ap_fixed_base t(*this); operator++(); return t; } inline __attribute__((always_inline)) const ap_fixed_base operator --(int) { ap_fixed_base t(*this); operator--(); return t; } #pragma empty_line // Unary arithmetic. // ------------------------------------------------------------------------- inline __attribute__((always_inline)) ap_fixed_base operator +() { return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base<_AP_W + 1, _AP_I + 1, true> operator -() const { ap_fixed_base<_AP_W + 1, _AP_I + 1, true> ret(*this); ret.V = - ret.V; return ret; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,true,_AP_Q,_AP_O,_AP_N> getNeg() { ap_fixed_base<_AP_W,_AP_I,true,_AP_Q,_AP_O,_AP_N> Tmp(*this); Tmp.V = -Tmp.V; return Tmp; } #pragma empty_line // Not (!) // ------------------------------------------------------------------------- inline __attribute__((always_inline)) bool operator !() const { return Base::V == 0; } #pragma empty_line // Bitwise complement // ------------------------------------------------------------------------- inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I, _AP_S> operator ~() const { ap_fixed_base<_AP_W, _AP_I, _AP_S> ret; ret.V=~Base::V; return ret; } #pragma empty_line // Shift // ------------------------------------------------------------------------- template<int _AP_SHIFT> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I + _AP_SHIFT, _AP_S> lshift () const { ap_fixed_base<_AP_W, _AP_I + _AP_SHIFT, _AP_S> r; r.V = Base::V; return r; } #pragma empty_line template<int _AP_SHIFT> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I - _AP_SHIFT, _AP_S> rshift () const { ap_fixed_base<_AP_W, _AP_I - _AP_SHIFT, _AP_S> r; r.V = Base::V; return r; } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base operator << (int sh) const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line ap_fixed_base r; bool isNeg = sh & 0x80000000; sh = isNeg ? -sh : sh; if (isNeg) r.V = Base::V >> sh; else r.V = Base::V << sh; #pragma line 1555 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return r; #pragma empty_line } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base operator << (const ap_int_base<_AP_W2,true>& op2) const { int sh = op2.to_int(); return operator << (sh); } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base operator << (unsigned int sh) const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line ap_fixed_base r; r.V = Base::V << sh; #pragma line 1600 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return r; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base operator << (const ap_int_base<_AP_W2,false>& op2) const { unsigned int sh = op2.to_uint(); return operator << (sh); } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base operator >> (int sh) const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line ap_fixed_base r; bool isNeg = sh & 0x80000000; sh = isNeg ? -sh : sh; if (isNeg) r.V = Base::V << sh; else r.V = Base::V >> sh; #pragma line 1658 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return r; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base operator >> (const ap_int_base<_AP_W2,true>& op2) const { int sh = op2.to_int(); return operator >> (sh); } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base operator >> (unsigned sh) const { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line ap_fixed_base r; r.V = Base::V >> sh; #pragma line 1690 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return r; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base operator >> (const ap_int_base<_AP_W2,false>& op2) const { unsigned int sh = op2.to_uint(); return operator >> (sh); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base operator >> (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) { return operator >> (op2.to_ap_int_base()); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base operator << (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) { return operator << (op2.to_ap_int_base()); } #pragma empty_line #pragma empty_line #pragma empty_line // Shift assign // ------------------------------------------------------------------------- /*__attribute__((weak))*/ ap_fixed_base& operator <<= (int sh) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line if (sh == 0) return *this; bool isNeg = sh & 0x80000000; sh = isNeg ? -sh : sh; #pragma line 1759 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" if (isNeg) Base::V >>= sh; else Base::V <<= sh; #pragma line 1773 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return *this; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base& operator <<= (const ap_int_base<_AP_W2,true>& op2) { int sh = op2.to_int(); return operator <<= (sh); } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base& operator <<= (unsigned int sh) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma line 1808 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" Base::V <<= sh; #pragma line 1820 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return *this; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base& operator <<= (const ap_int_base<_AP_W2,false>& op2) { unsigned int sh = op2.to_uint(); return operator <<= (sh); } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base& operator >>= (int sh) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma empty_line if (sh == 0) return *this; bool isNeg = sh & 0x80000000; sh = isNeg ? -sh : sh; #pragma line 1868 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" if (isNeg) Base::V <<= sh; else Base::V >>= sh; #pragma line 1882 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" return *this; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base& operator >>= (const ap_int_base<_AP_W2,true>& op2) { int sh = op2.to_int(); return operator >>= (sh); } #pragma empty_line /*__attribute__((weak))*/ ap_fixed_base& operator >>= (unsigned int sh) { #pragma empty_line _ssdm_InlineSelf(0, ""); #pragma line 1912 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" Base::V >>= sh; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return *this; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed_base& operator >>= (const ap_int_base<_AP_W2,false>& op2) { unsigned int sh = op2.to_uint(); return operator >>= (sh); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator >>= (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) { return operator >>= (op2.to_ap_int_base()); } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed_base& operator <<= (const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op2) { return operator <<= (op2.to_ap_int_base()); } #pragma empty_line // Comparisons. // ------------------------------------------------------------------------- #pragma line 1959 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator == (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { const int _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 ; if (_AP_F == F2) return Base::V == op2.V; else if (_AP_F > F2) return Base::V == ap_fixed_base<((_AP_W2+_AP_F-F2) > (1) ? (_AP_W2+_AP_F-F2) : (1)),_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>(op2).V; else return ap_fixed_base<((_AP_W+F2-_AP_F+1) > (1) ? (_AP_W+F2-_AP_F+1) : (1)),_AP_I+1,_AP_S,_AP_Q,_AP_O, _AP_N>(*this).V == op2.V; return false; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator != (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { const int _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 ; if (_AP_F == F2) return Base::V != op2.V; else if (_AP_F > F2) return Base::V != ap_fixed_base<((_AP_W2+_AP_F-F2) > (1) ? (_AP_W2+_AP_F-F2) : (1)),_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>(op2).V; else return ap_fixed_base<((_AP_W+F2-_AP_F+1) > (1) ? (_AP_W+F2-_AP_F+1) : (1)),_AP_I+1,_AP_S,_AP_Q,_AP_O, _AP_N>(*this).V != op2.V; return false; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator > (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { const int _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 ; if (_AP_F == F2) return Base::V > op2.V; else if (_AP_F > F2) return Base::V > ap_fixed_base<((_AP_W2+_AP_F-F2) > (1) ? (_AP_W2+_AP_F-F2) : (1)),_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>(op2).V; else return ap_fixed_base<((_AP_W+F2-_AP_F+1) > (1) ? (_AP_W+F2-_AP_F+1) : (1)),_AP_I+1,_AP_S,_AP_Q,_AP_O, _AP_N>(*this).V > op2.V; return false; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator >= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { const int _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 ; if (_AP_F == F2) return Base::V >= op2.V; else if (_AP_F > F2) return Base::V >= ap_fixed_base<((_AP_W2+_AP_F-F2) > (1) ? (_AP_W2+_AP_F-F2) : (1)),_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>(op2).V; else return ap_fixed_base<((_AP_W+F2-_AP_F+1) > (1) ? (_AP_W+F2-_AP_F+1) : (1)),_AP_I+1,_AP_S,_AP_Q,_AP_O, _AP_N>(*this).V >= op2.V; return false; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator < (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { const int _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 ; if (_AP_F == F2) return Base::V < op2.V; else if (_AP_F > F2) return Base::V < ap_fixed_base<((_AP_W2+_AP_F-F2) > (1) ? (_AP_W2+_AP_F-F2) : (1)),_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>(op2).V; else return ap_fixed_base<((_AP_W+F2-_AP_F+1) > (1) ? (_AP_W+F2-_AP_F+1) : (1)),_AP_I+1,_AP_S,_AP_Q,_AP_O, _AP_N>(*this).V < op2.V; return false; } template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) bool operator <= (const ap_fixed_base<_AP_W2,_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>& op2) const { const int _AP_F = _AP_W-_AP_I, F2 = _AP_W2-_AP_I2 ; if (_AP_F == F2) return Base::V <= op2.V; else if (_AP_F > F2) return Base::V <= ap_fixed_base<((_AP_W2+_AP_F-F2) > (1) ? (_AP_W2+_AP_F-F2) : (1)),_AP_I2,_AP_S2,_AP_Q2,_AP_O2, _AP_N2>(op2).V; else return ap_fixed_base<((_AP_W+F2-_AP_F+1) > (1) ? (_AP_W+F2-_AP_F+1) : (1)),_AP_I+1,_AP_S,_AP_Q,_AP_O, _AP_N>(*this).V <= op2.V; return false; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) bool operator == (double d) const { return to_double() == d; } inline __attribute__((always_inline)) bool operator != (double d) const { return to_double() != d; } inline __attribute__((always_inline)) bool operator > (double d) const { return to_double() > d; } inline __attribute__((always_inline)) bool operator >= (double d) const { return to_double() >= d; } inline __attribute__((always_inline)) bool operator < (double d) const { return to_double() < d; } inline __attribute__((always_inline)) bool operator <= (double d) const { return to_double() <= d; } #pragma empty_line // Bit and Slice Select inline __attribute__((always_inline)) af_bit_ref<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N> operator[] (unsigned index) { ; return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>(this, index); } #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N> operator [] (const ap_int_base<_AP_W2,_AP_S2>& index) { ; ; return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>(this, index.to_int()); } #pragma empty_line inline __attribute__((always_inline)) bool operator [] (unsigned index) const { ; return ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), index, index); (bool)(__Result__ & 1); }); } #pragma empty_line inline __attribute__((always_inline)) af_bit_ref<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N> bit(unsigned index) { ; return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>(this, index); } #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N> bit (const ap_int_base<_AP_W2,_AP_S2>& index) { ; ; return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>(this, index.to_int()); } #pragma empty_line inline __attribute__((always_inline)) bool bit (unsigned index) const { ; return ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), index, index); (bool)(__Result__ & 1); }); } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N> get_bit (const ap_int_base<_AP_W2, true>& index) { ; ; return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>(this, index.to_int() + _AP_W - _AP_I); } #pragma empty_line inline __attribute__((always_inline)) bool get_bit (int index) const { ; ; return ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), index + _AP_W - _AP_I, index + _AP_W - _AP_I); (bool)(__Result__ & 1); }); } #pragma empty_line inline __attribute__((always_inline)) af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N> get_bit (int index) { ; ; return af_bit_ref<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>(this, index + _AP_W - _AP_I); } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) bool get_bit (const ap_int_base<_AP_W2, true>& index) const { ; ; return ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), index.to_int() + _AP_W - _AP_I, index.to_int() + _AP_W - _AP_I); (bool)(__Result__ & 1); }); } #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N> range(int Hi, int Lo) { ; return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> operator () (int Hi, int Lo) { ; return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> range(int Hi, int Lo) const { ; return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(const_cast< ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>*>(this), Hi, Lo); } #pragma empty_line template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N> range(const ap_int_base<_AP_W2, _AP_S2> &HiIdx, const ap_int_base<_AP_W3, _AP_S3> &LoIdx) { int Hi = HiIdx.to_int(); int Lo = LoIdx.to_int(); ; return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo); } #pragma empty_line template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N> operator () (const ap_int_base<_AP_W2, _AP_S2> &HiIdx, const ap_int_base<_AP_W3, _AP_S3> &LoIdx) { int Hi = HiIdx.to_int(); int Lo = LoIdx.to_int(); ; return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(this, Hi, Lo); } #pragma empty_line template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N> range(const ap_int_base<_AP_W2, _AP_S2> &HiIdx, const ap_int_base<_AP_W3, _AP_S3> &LoIdx) const { int Hi = HiIdx.to_int(); int Lo = LoIdx.to_int(); ; return af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>(const_cast< ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>*>(this), Hi, Lo); } #pragma empty_line template<int _AP_W2, bool _AP_S2, int _AP_W3, bool _AP_S3> inline __attribute__((always_inline)) af_range_ref<_AP_W,_AP_I,_AP_S, _AP_Q, _AP_O, _AP_N> operator () (const ap_int_base<_AP_W2, _AP_S2> &HiIdx, const ap_int_base<_AP_W3, _AP_S3> &LoIdx) const { int Hi = HiIdx.to_int(); int Lo = LoIdx.to_int(); return this->range(Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> operator () (int Hi, int Lo) const { return this->range(Hi, Lo); } #pragma empty_line inline __attribute__((always_inline)) af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> range() { return this->range(_AP_W - 1, 0); } #pragma empty_line inline __attribute__((always_inline)) af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> range() const { return this->range(_AP_W - 1, 0); } #pragma empty_line inline __attribute__((always_inline)) bool is_zero () const { return Base::V == 0; } #pragma empty_line inline __attribute__((always_inline)) bool is_neg () const { if (_AP_S && ({ typeof(const_cast<ap_fixed_base*>(this)->V) __Result__ = 0; typeof(const_cast<ap_fixed_base*>(this)->V) __Val2__ = const_cast<ap_fixed_base*>(this)->V; __builtin_bit_part_select((void*)(&__Result__), (void*)(&__Val2__), _AP_W - 1, _AP_W - 1); (bool)(__Result__ & 1); })) return true; return false; } #pragma empty_line inline __attribute__((always_inline)) int wl () const { return _AP_W; } #pragma empty_line inline __attribute__((always_inline)) int iwl () const { return _AP_I; } #pragma empty_line inline __attribute__((always_inline)) ap_q_mode q_mode () const { return _AP_Q; } #pragma empty_line inline __attribute__((always_inline)) ap_o_mode o_mode () const { return _AP_O; } #pragma empty_line inline __attribute__((always_inline)) int n_bits () const { return _AP_N; } #pragma empty_line inline __attribute__((always_inline)) char* to_string(BaseMode mode) { return 0; } #pragma empty_line inline __attribute__((always_inline)) char* to_string(signed char mode) { return to_string(BaseMode(mode)); } }; #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) void b_not(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op) { ret.V = ~ op.V; } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) void b_and(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op1, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op2) { ret.V = op1.V & op2.V; } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) void b_or(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op1, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op2) { ret.V = op1.V | op2.V; } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) void b_xor(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op1, const ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& op2) { ret.V = op1.V ^ op2.V; } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) void neg(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op) { ap_fixed_base<_AP_W2+!_AP_S2, _AP_I2+!_AP_S2, true, _AP_Q2, _AP_O2, _AP_N2> Tmp; Tmp.V = - op.V; ret = Tmp; } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) void lshift(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op, int i) { ap_fixed_base<_AP_W2 - _AP_I2 + ((_AP_I) > (_AP_I2) ? (_AP_I) : (_AP_I2)), ((_AP_I) > (_AP_I2) ? (_AP_I) : (_AP_I2)), _AP_S2, _AP_Q2, _AP_O2, _AP_N2> Tmp; Tmp.V = op.V; Tmp.V <<= i; ret = Tmp; } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) void rshift(ap_fixed_base<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N>& ret, const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op, int i) { ap_fixed_base<_AP_I2 + ((_AP_W - _AP_I) > (_AP_W2 - _AP_I2) ? (_AP_W - _AP_I) : (_AP_W2 - _AP_I2)), _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2> Tmp; const int val = _AP_W - _AP_I - (_AP_W2 - _AP_I2); Tmp.V = op.V; if (val > 0) Tmp.V <<= val; Tmp.V >>= i; ret = Tmp; } #pragma line 2232 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<> inline __attribute__((always_inline)) ap_fixed_base<1,1,true,SC_TRN,SC_WRAP>::ap_fixed_base(bool i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<1,1,false,SC_TRN,SC_WRAP>::ap_fixed_base(bool i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<8,8,true,SC_TRN,SC_WRAP>::ap_fixed_base(char i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<8,8,false,SC_TRN,SC_WRAP>::ap_fixed_base(char i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<8,8,true,SC_TRN,SC_WRAP>::ap_fixed_base(signed char i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<8,8,false,SC_TRN,SC_WRAP>::ap_fixed_base(signed char i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<8,8,true,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned char i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<8,8,false,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned char i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<16,16,true,SC_TRN,SC_WRAP>::ap_fixed_base(signed short i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<16,16,false,SC_TRN,SC_WRAP>::ap_fixed_base(signed short i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<16,16,true,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned short i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<16,16,false,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned short i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<32,32,true,SC_TRN,SC_WRAP>::ap_fixed_base(signed int i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<32,32,false,SC_TRN,SC_WRAP>::ap_fixed_base(signed int i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<32,32,true,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned int i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<32,32,false,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned int i_op) { Base::V = i_op; } #pragma empty_line template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,true,SC_TRN,SC_WRAP>::ap_fixed_base(long i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,false,SC_TRN,SC_WRAP>::ap_fixed_base(long i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,true,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned long i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,false,SC_TRN,SC_WRAP>::ap_fixed_base(unsigned long i_op) { Base::V = i_op; } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,true,SC_TRN,SC_WRAP>::ap_fixed_base(ap_slong i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,false,SC_TRN,SC_WRAP>::ap_fixed_base(ap_slong i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,true,SC_TRN,SC_WRAP>::ap_fixed_base(ap_ulong i_op) { Base::V = i_op; } template<> inline __attribute__((always_inline)) ap_fixed_base<64,64,false,SC_TRN,SC_WRAP>::ap_fixed_base(ap_ulong i_op) { Base::V = i_op; } #pragma empty_line #pragma empty_line /// Output streamimg. // ----------------------------------------------------------------------------- template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) std::ostream& operator << (std::ostream& os, const ap_fixed_base<_AP_W,_AP_I, _AP_S,_AP_Q,_AP_O, _AP_N>& x) { // os << x.to_double(); return os; } #pragma empty_line /// Input streamimg. // ----------------------------------------------------------------------------- template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) std::istream& operator >> (std::istream& in, ap_fixed_base<_AP_W,_AP_I, _AP_S,_AP_Q,_AP_O, _AP_N>& x) { #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line return in; } #pragma empty_line #pragma empty_line #pragma empty_line /// Operators mixing Integers with ap_fixed_base // ----------------------------------------------------------------------------- #pragma line 2350 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator + (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::plus operator + ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator - (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::minus operator - ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator * (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::mult operator * ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator / (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::div operator / ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator >> (ap_int_base<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator << (ap_int_base<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator & (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator & ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator | (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator | ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator ^ (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<1,1,false>::logic operator ^ ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator == (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator != (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator > (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator >= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator < (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator <= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( bool i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<1,1,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator += (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator -= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator *= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator /= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator >>= (ap_int_base<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, bool i_op) { return op.operator <<= (ap_int_base<1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator &= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator |= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, bool i_op) { return op.operator ^= (ap_fixed_base<1,1,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator + (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator - (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator * (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator / (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator >> (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator << (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator & (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator | (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator ^ (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator == (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator != (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator > (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator >= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator < (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator <= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator += (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator -= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator *= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator /= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator >>= (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, char i_op) { return op.operator <<= (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator &= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator |= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, char i_op) { return op.operator ^= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator + (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::plus operator + ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator - (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::minus operator - ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator * (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::mult operator * ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator / (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::div operator / ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator >> (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator << (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator & (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator & ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator | (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator | ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator ^ (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,true>::logic operator ^ ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator == (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator != (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator > (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator >= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator < (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator <= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( signed char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator += (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator -= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator *= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator /= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator >>= (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed char i_op) { return op.operator <<= (ap_int_base<8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator &= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator |= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed char i_op) { return op.operator ^= (ap_fixed_base<8,8,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator + (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::plus operator + ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator - (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::minus operator - ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator * (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::mult operator * ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator / (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::div operator / ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator >> (ap_int_base<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator << (ap_int_base<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator & (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator & ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator | (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator | ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator ^ (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<8,8,false>::logic operator ^ ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator == (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator != (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator > (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator >= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator < (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator <= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned char i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<8,8,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator += (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator -= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator *= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator /= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator >>= (ap_int_base<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned char i_op) { return op.operator <<= (ap_int_base<8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator &= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator |= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned char i_op) { return op.operator ^= (ap_fixed_base<8,8,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator + (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::plus operator + ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator - (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::minus operator - ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator * (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::mult operator * ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator / (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::div operator / ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator >> (ap_int_base<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator << (ap_int_base<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator & (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator & ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator | (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator | ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator ^ (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,true>::logic operator ^ ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator == (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator != (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator > (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator >= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator < (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator <= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( signed short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator += (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator -= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator *= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator /= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator >>= (ap_int_base<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, signed short i_op) { return op.operator <<= (ap_int_base<16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator &= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator |= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, signed short i_op) { return op.operator ^= (ap_fixed_base<16,16,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator + (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::plus operator + ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator - (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::minus operator - ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator * (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::mult operator * ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator / (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::div operator / ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator >> (ap_int_base<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator << (ap_int_base<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator & (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator & ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator | (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator | ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator ^ (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<16,16,false>::logic operator ^ ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator == (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator != (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator > (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator >= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator < (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator <= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned short i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<16,16,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator += (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator -= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator *= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator /= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator >>= (ap_int_base<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned short i_op) { return op.operator <<= (ap_int_base<16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator &= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator |= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned short i_op) { return op.operator ^= (ap_fixed_base<16,16,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator + (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::plus operator + ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator - (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::minus operator - ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator * (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::mult operator * ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator / (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::div operator / ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator >> (ap_int_base<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator << (ap_int_base<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator & (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator & ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator | (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator | ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator ^ (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,true>::logic operator ^ ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator == (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator != (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator > (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator >= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator < (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator <= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator += (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator -= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator *= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator /= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator >>= (ap_int_base<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, int i_op) { return op.operator <<= (ap_int_base<32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator &= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator |= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, int i_op) { return op.operator ^= (ap_fixed_base<32,32,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator + (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::plus operator + ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator - (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::minus operator - ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator * (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::mult operator * ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator / (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::div operator / ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator >> (ap_int_base<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator << (ap_int_base<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator & (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator & ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator | (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator | ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator ^ (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<32,32,false>::logic operator ^ ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator == (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator != (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator > (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator >= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator < (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator <= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned int i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<32,32,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator += (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator -= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator *= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator /= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator >>= (ap_int_base<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned int i_op) { return op.operator <<= (ap_int_base<32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator &= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator |= (ap_fixed_base<32,32,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned int i_op) { return op.operator ^= (ap_fixed_base<32,32,false>(i_op)); } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator + (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::plus operator + ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator - (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::minus operator - ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator * (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::mult operator * ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator / (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::div operator / ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator >> (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator << (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator & (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator & ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator | (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator | ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator ^ (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator ^ ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator == (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator != (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator > (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator >= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator < (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator <= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator += (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator -= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator *= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator /= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator >>= (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, long i_op) { return op.operator <<= (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator &= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator |= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, long i_op) { return op.operator ^= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator + (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::plus operator + ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator - (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::minus operator - ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator * (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::mult operator * ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator / (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::div operator / ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator >> (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator << (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator & (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator & ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator | (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator | ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator ^ (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator ^ ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator == (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator != (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator > (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator >= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator < (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator <= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned long i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator += (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator -= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator *= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator /= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator >>= (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, unsigned long i_op) { return op.operator <<= (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator &= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator |= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, unsigned long i_op) { return op.operator ^= (ap_fixed_base<64,64,false>(i_op)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator + (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::plus operator + ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator - (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::minus operator - ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator * (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::mult operator * ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator / (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::div operator / ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator >> (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator << (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator & (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator & ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator | (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator | ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator ^ (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,true>::logic operator ^ ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator == (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator != (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator > (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator >= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator < (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator <= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( ap_slong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,true>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator += (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator -= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator *= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator /= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator >>= (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_slong i_op) { return op.operator <<= (ap_int_base<64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator &= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator |= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_slong i_op) { return op.operator ^= (ap_fixed_base<64,64,true>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::plus operator + ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator + (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::plus operator + ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::minus operator - ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator - (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::minus operator - ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::mult operator * ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator * (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::mult operator * ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::div operator / ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator / (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::div operator / ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::arg1 operator >> ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator >> (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::arg1 operator << ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator << (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator & ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator & (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator & ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator | ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator | (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator | ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator ^ ( const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator ^ (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W,_AP_I,_AP_S>::template RType<64,64,false>::logic operator ^ ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator == (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator != (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator > (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator >= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator < (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator <= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( ap_ulong i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op) { return ap_fixed_base<64,64,false>(i_op).operator <= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator += (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator -= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator *= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator /= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator >>= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator >>= (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& operator <<= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator <<= (ap_int_base<64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator &= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator |= (ap_fixed_base<64,64,false>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q, _AP_O, _AP_N>& op, ap_ulong i_op) { return op.operator ^= (ap_fixed_base<64,64,false>(i_op)); } #pragma line 2400 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::plus operator + ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator + (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::plus operator + ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator + (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::minus operator - ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator - (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::minus operator - ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator - (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::mult operator * ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator * (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::mult operator * ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator * (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::div operator / ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator / (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::div operator / ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator / (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::logic operator & ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator & (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::logic operator & ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator & (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::logic operator | ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator | (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::logic operator | ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator | (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>::template RType<_AP_W,_AP_I,_AP_S>::logic operator ^ ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator ^ (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) typename ap_fixed_base<_AP_W, _AP_I, _AP_S>::template RType<_AP_W2,_AP_W2,_AP_S2>::logic operator ^ ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator ^ (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator == ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator == (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator != ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator != (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator > ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator > (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator >= ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator >= (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator < ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator < (op); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator <= ( ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op) { return ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op).operator <= (op); } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator += ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator += (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator += ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator += (op.to_ap_int_base()); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator -= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator -= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator -= ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator -= (op.to_ap_int_base()); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator *= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator *= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator *= ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator *= (op.to_ap_int_base()); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator /= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator /= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator /= ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator /= (op.to_ap_int_base()); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator &= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator &= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator &= ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator &= (op.to_ap_int_base()); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator |= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator |= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator |= ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator |= (op.to_ap_int_base()); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& operator ^= ( ap_fixed_base<_AP_W, _AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op, const ap_int_base<_AP_W2,_AP_S2>& i_op) { return op.operator ^= (ap_fixed_base<_AP_W2,_AP_W2,_AP_S2>(i_op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int_base<_AP_W2,_AP_S2>& operator ^= ( ap_int_base<_AP_W2,_AP_S2>& i_op, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op) { return i_op.operator ^= (op.to_ap_int_base()); } #pragma empty_line // Relational Operators with double template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) { return op2.operator == (op1); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op2) { return op2.operator != (op1); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op2) { return op2.operator < (op1); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O, _AP_N>& op2) { return op2.operator <= (op1); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op2) { return op2.operator > (op1); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( double op1, const ap_fixed_base<_AP_W,_AP_I,_AP_S,_AP_Q,_AP_O,_AP_N>& op2) { return op2.operator >= (op1); } #pragma line 2485 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<1,false>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<1,false>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<1,false>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<1,false>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<1,false>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<1,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( bool op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<1,false>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, bool op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( bool op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, char op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<8,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( signed char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,true>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, signed char op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( signed char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,false>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,false>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,false>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,false>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,false>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<8,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned char op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<8,false>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned char op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned char op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,true>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,true>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,true>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,true>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,true>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<16,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,true>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, short op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,false>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,false>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,false>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,false>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,false>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<16,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned short op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<16,false>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned short op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned short op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, int op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned int op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned int op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned int op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<32,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,true>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, long op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<32,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned long op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<32,false>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, unsigned long op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( unsigned long op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,true>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,true>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,true>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,true>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,true>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<64,true>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( ap_slong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,true>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_slong op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( ap_slong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator > (ap_int_base<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,false>(op2).operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) > op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator > ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 > (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator < (ap_int_base<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,false>(op2).operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) < op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator < ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 < (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (ap_int_base<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,false>(op2).operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) >= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator >= ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 >= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (ap_int_base<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,false>(op2).operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) <= op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator <= ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 <= (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator == (ap_int_base<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,false>(op2).operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) == op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator == ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 == (bool(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (ap_int_base<_AP_W, false>(op)).operator != (ap_int_base<64,false>(op2)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( ap_ulong op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return ap_int_base<64,false>(op2).operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, ap_ulong op2) { return (bool(op)) != op2; } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> inline __attribute__((always_inline)) bool operator != ( ap_ulong op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2 != (bool(op)); } #pragma line 2525 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed_syn.h" template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S> &op2) { return (ap_int_base<_AP_W, false>(op)).operator > (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > (const ap_int_base<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator > (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S2> &op2) { return (ap_int_base<1, false>(op)).operator > (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator > ( const ap_int_base<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator > (ap_int_base<1,false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S> &op2) { return (ap_int_base<_AP_W, false>(op)).operator < (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < (const ap_int_base<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator < (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S2> &op2) { return (ap_int_base<1, false>(op)).operator < (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator < ( const ap_int_base<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator < (ap_int_base<1,false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S> &op2) { return (ap_int_base<_AP_W, false>(op)).operator >= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= (const ap_int_base<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator >= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S2> &op2) { return (ap_int_base<1, false>(op)).operator >= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator >= ( const ap_int_base<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator >= (ap_int_base<1,false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S> &op2) { return (ap_int_base<_AP_W, false>(op)).operator <= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= (const ap_int_base<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator <= (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S2> &op2) { return (ap_int_base<1, false>(op)).operator <= (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator <= ( const ap_int_base<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator <= (ap_int_base<1,false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S> &op2) { return (ap_int_base<_AP_W, false>(op)).operator == (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == (const ap_int_base<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator == (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S2> &op2) { return (ap_int_base<1, false>(op)).operator == (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator == ( const ap_int_base<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator == (ap_int_base<1,false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const af_range_ref<_AP_W,_AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S> &op2) { return (ap_int_base<_AP_W, false>(op)).operator != (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != (const ap_int_base<_AP_W2, _AP_S2> &op2, const af_range_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator != (ap_int_base<_AP_W, false>(op)); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op, const ap_int_base<_AP_W2, _AP_S2> &op2) { return (ap_int_base<1, false>(op)).operator != (op2); } template<int _AP_W, int _AP_I, bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N, int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) bool operator != ( const ap_int_base<_AP_W2, _AP_S2> &op2, const af_bit_ref<_AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N> &op) { return op2.operator != (ap_int_base<1,false>(op)); } #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 63 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_int.h" 2 //Forward declaration template<int _AP_W, int _AP_I, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct ap_fixed; template<int _AP_W, int _AP_I, ap_q_mode _AP_Q, ap_o_mode _AP_O, int _AP_N> struct ap_ufixed; template<int _AP_W> struct ap_int; template<int _AP_W> struct ap_uint; #pragma empty_line //AP_INT //-------------------------------------------------------- template<int _AP_W> struct ap_int: ap_int_base<_AP_W, true> { typedef ap_int_base<_AP_W, true> Base; //Constructor inline __attribute__((always_inline)) ap_int(): Base() {} template<int _AP_W2> inline __attribute__((always_inline)) ap_int(const ap_int<_AP_W2> &op) {Base::V = op.V;} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_int(const volatile ap_int<_AP_W2> &op) {Base::V = op.V;} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_int(const ap_uint<_AP_W2> &op) { Base::V = op.V;} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_int(const volatile ap_uint<_AP_W2> &op) { Base::V = op.V;} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int(const ap_range_ref<_AP_W2, _AP_S2>& ref):Base(ref) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int(const ap_bit_ref<_AP_W2, _AP_S2>& ref):Base(ref) {} #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_int(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& ref):Base(ref) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_int(const ap_int_base<_AP_W2, _AP_S2>& op){ Base::V = op.V; } #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_int(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_int(bool val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(signed char val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(unsigned char val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(short val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(unsigned short val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(int val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(unsigned int val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(long val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(unsigned long val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(unsigned long long val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(long long val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(half val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(float val) {Base::V = val; } inline __attribute__((always_inline)) ap_int(double val) {Base::V = val; } #pragma empty_line inline __attribute__((always_inline)) ap_int(const char* str):Base(str) {} inline __attribute__((always_inline)) ap_int(const char* str, signed char radix):Base(str, radix) {} //Assignment //Assignment //Another form of "write" inline __attribute__((always_inline)) void operator = (const ap_int<_AP_W>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const volatile ap_int<_AP_W>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) ap_int& operator = (const volatile ap_int<_AP_W>& op2) { Base::V = op2.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_int& operator = (const ap_int<_AP_W>& op2) { Base::V = op2.V; return *this; } }; #pragma empty_line //AP_UINT //--------------------------------------------------------------- template<int _AP_W> struct ap_uint: ap_int_base<_AP_W, false> { typedef ap_int_base<_AP_W, false> Base; //Constructor inline __attribute__((always_inline)) ap_uint(): Base() {} template<int _AP_W2> inline __attribute__((always_inline)) ap_uint(const ap_uint<_AP_W2> &op) { Base::V = op.V; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_uint(const ap_int<_AP_W2> &op) { Base::V = op.V;} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_uint(const volatile ap_uint<_AP_W2> &op) { Base::V = op.V; } #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_uint(const volatile ap_int<_AP_W2> &op) { Base::V = op.V;} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_uint(const ap_range_ref<_AP_W2, _AP_S2>& ref):Base(ref) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_uint(const ap_bit_ref<_AP_W2, _AP_S2>& ref):Base(ref) {} #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_uint(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& ref):Base(ref) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op) :Base((ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>)op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_uint(const ap_int_base<_AP_W2, _AP_S2>& op){ Base::V = op.V;} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_uint(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_uint(bool val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(signed char val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(unsigned char val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(short val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(unsigned short val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(int val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(unsigned int val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(long val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(unsigned long val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(unsigned long long val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(long long val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(half val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(float val) { Base::V = val; } inline __attribute__((always_inline)) ap_uint(double val) { Base::V = val; } #pragma empty_line inline __attribute__((always_inline)) ap_uint(const char* str):Base(str) {} inline __attribute__((always_inline)) ap_uint(const char* str, signed char radix):Base(str, radix) {} //Assignment //Another form of "write" inline __attribute__((always_inline)) void operator = (const ap_uint<_AP_W>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const volatile ap_uint<_AP_W>& op2) volatile { Base::V = op2.V; } #pragma empty_line inline __attribute__((always_inline)) ap_uint& operator = (const volatile ap_uint<_AP_W>& op2) { Base::V = op2.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_uint& operator = (const ap_uint<_AP_W>& op2) { Base::V = op2.V; return *this; } }; #pragma empty_line #pragma empty_line //AP_FIXED //--------------------------------------------------------------------- template<int _AP_W, int _AP_I, ap_q_mode _AP_Q = SC_TRN, ap_o_mode _AP_O = SC_WRAP, int _AP_N = 0> struct ap_fixed: ap_fixed_base<_AP_W, _AP_I, true, _AP_Q, _AP_O, _AP_N> { typedef ap_fixed_base<_AP_W, _AP_I, true, _AP_Q, _AP_O, _AP_N> Base; //Constructor inline __attribute__((always_inline)) ap_fixed():Base() {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed(const ap_int<_AP_W2>& op): Base(ap_int_base<_AP_W2, true>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed(const ap_uint<_AP_W2>& op): Base(ap_int_base<_AP_W2, false>(op)) {} template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed(const volatile ap_int<_AP_W2>& op): Base(ap_int_base<_AP_W2, true>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_fixed(const volatile ap_uint<_AP_W2>& op): Base(ap_int_base<_AP_W2, false>(op)) {} template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed(const ap_bit_ref<_AP_W2, _AP_S2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed(const ap_range_ref<_AP_W2, _AP_S2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_fixed(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op): Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_fixed(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_fixed(const ap_int_base<_AP_W2, _AP_S2>& op): Base(op) {} #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_fixed(bool v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(signed char v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(unsigned char v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(short v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(unsigned short v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(int v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(unsigned int v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(long v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(unsigned long v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(unsigned long long v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(long long v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(half v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(float v):Base(v) {} inline __attribute__((always_inline)) ap_fixed(double v):Base(v) {} #pragma empty_line inline __attribute__((always_inline)) ap_fixed(const char* str):Base(str) {} inline __attribute__((always_inline)) ap_fixed(const char* str, signed char radix):Base(str, radix) {} #pragma empty_line //Assignment inline __attribute__((always_inline)) ap_fixed& operator = (const ap_fixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) { Base::V = op.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_fixed& operator = (const volatile ap_fixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) { Base::V = op.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const ap_fixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) volatile { Base::V = op.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const volatile ap_fixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) volatile { Base::V = op.V; } #pragma empty_line #pragma empty_line #pragma empty_line }; //AP_UFIXED //------------------------------------------------------------------- template<int _AP_W, int _AP_I, ap_q_mode _AP_Q = SC_TRN, ap_o_mode _AP_O = SC_WRAP, int _AP_N = 0> struct ap_ufixed: ap_fixed_base<_AP_W, _AP_I, false, _AP_Q, _AP_O, _AP_N> { typedef ap_fixed_base<_AP_W, _AP_I, false, _AP_Q, _AP_O, _AP_N> Base; //Constructor inline __attribute__((always_inline)) ap_ufixed():Base() {} #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_ufixed(const ap_int<_AP_W2>& op): Base(ap_int_base<_AP_W2, true>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_ufixed(const ap_uint<_AP_W2>& op): Base(ap_int_base<_AP_W2, false>(op)) {} template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const volatile ap_fixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line #pragma empty_line template<int _AP_W2, int _AP_I2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const volatile ap_ufixed<_AP_W2, _AP_I2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(ap_fixed_base<_AP_W2, _AP_I2, false, _AP_Q2, _AP_O2, _AP_N2>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_ufixed(const volatile ap_int<_AP_W2>& op): Base(ap_int_base<_AP_W2, true>(op)) {} #pragma empty_line template<int _AP_W2> inline __attribute__((always_inline)) ap_ufixed(const volatile ap_uint<_AP_W2>& op): Base(ap_int_base<_AP_W2, false>(op)) {} template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const ap_fixed_base<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op):Base(op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_ufixed(const ap_bit_ref<_AP_W2, _AP_S2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_ufixed(const ap_range_ref<_AP_W2, _AP_S2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, typename _AP_T2, int _AP_W3, typename _AP_T3> inline __attribute__((always_inline)) ap_ufixed(const ap_concat_ref<_AP_W2, _AP_T2, _AP_W3, _AP_T3>& op): Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const af_bit_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, int _AP_I2, bool _AP_S2, ap_q_mode _AP_Q2, ap_o_mode _AP_O2, int _AP_N2> inline __attribute__((always_inline)) ap_ufixed(const af_range_ref<_AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2>& op): Base(op) {} #pragma empty_line template<int _AP_W2, bool _AP_S2> inline __attribute__((always_inline)) ap_ufixed(const ap_int_base<_AP_W2, _AP_S2>& op): Base(op) {} #pragma empty_line #pragma empty_line #pragma empty_line inline __attribute__((always_inline)) ap_ufixed(bool v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(signed char v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(unsigned char v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(short v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(unsigned short v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(int v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(unsigned int v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(long v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(unsigned long v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(unsigned long long v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(long long v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(half v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(float v):Base(v) {} inline __attribute__((always_inline)) ap_ufixed(double v):Base(v) {} #pragma empty_line inline __attribute__((always_inline)) ap_ufixed(const char* str):Base(str) {} inline __attribute__((always_inline)) ap_ufixed(const char* str, signed char radix):Base(str, radix) {} #pragma empty_line //Assignment inline __attribute__((always_inline)) ap_ufixed& operator = (const ap_ufixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) { Base::V = op.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) ap_ufixed& operator = (const volatile ap_ufixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) { Base::V = op.V; return *this; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const ap_ufixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) volatile { Base::V = op.V; } #pragma empty_line inline __attribute__((always_inline)) void operator = (const volatile ap_ufixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N>& op) volatile { Base::V = op.V; } #pragma empty_line }; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 2 "/opt/Xilinx/Vivado_HLS/2017.2/common/technology/autopilot/ap_fixed.h" 2 #pragma empty_line #pragma empty_line // 67d7842dbbe25473c3c32b93c0da8047785f30d78e8a024de1b57352245f9689 #pragma line 3 "lenet5_ap2_shift/source/init.cpp" 2 #pragma line 1 "/usr/include/string.h" 1 3 4 /* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. #pragma empty_line The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. #pragma empty_line The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. #pragma empty_line You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ #pragma empty_line /* * ISO C99 Standard: 7.21 String handling <string.h> */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern "C" { #pragma empty_line /* Get size_t and NULL from <stddef.h>. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma line 1 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 1 3 4 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #pragma line 56 "/opt/Xilinx/Vivado_HLS/2017.2/lnx64/tools/clang/bin/../lib/clang/3.1/include/stddef.h" 3 4 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #pragma line 33 "/usr/include/string.h" 2 3 4 #pragma empty_line /* Tell the caller that we provide correct C++ prototypes. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern void *memmove (void *__dest, const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ #pragma empty_line extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Set N bytes of S to C. */ extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Compare N bytes of S1 and S2. */ extern int memcmp (const void *__s1, const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Search N bytes of S for C. */ #pragma line 92 "/usr/include/string.h" 3 4 extern void *memchr (const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Search in S for C. This is similar to `memchr' but there is no length limit. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern void *rawmemchr (const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Search N bytes of S for the final occurrence of C. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern void *memrchr (const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Copy SRC to DEST. */ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); /* Copy no more than N characters of SRC to DEST. */ extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Append SRC onto DEST. */ extern char *strcat (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); /* Append no more than N characters from SRC onto DEST. */ extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Compare S1 and S2. */ extern int strcmp (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Compare N characters of S1 and S2. */ extern int strncmp (const char *__s1, const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Compare the collated forms of S1 and S2. */ extern int strcoll (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line #pragma empty_line /* The following functions are equivalent to the both above but they take the locale they use for the collation as an extra argument. This is not standardsized but something like will come. */ #pragma empty_line #pragma empty_line /* Compare the collated forms of S1 and S2 using rules from L. */ extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); #pragma empty_line #pragma empty_line #pragma empty_line /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ #pragma empty_line extern char *strndup (const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Duplicate S, returning an identical alloca'd string. */ #pragma line 194 "/usr/include/string.h" 3 4 /* Return an alloca'd copy of at most N bytes of string. */ #pragma line 207 "/usr/include/string.h" 3 4 /* Find the first occurrence of C in S. */ #pragma line 231 "/usr/include/string.h" 3 4 extern char *strchr (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Find the last occurrence of C in S. */ #pragma line 258 "/usr/include/string.h" 3 4 extern char *strrchr (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern char *strchrnul (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn (const char *__s, const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ extern size_t strspn (const char *__s, const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); /* Find the first occurrence in S of any character in ACCEPT. */ #pragma line 310 "/usr/include/string.h" 3 4 extern char *strpbrk (const char *__s, const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Find the first occurrence of NEEDLE in HAYSTACK. */ #pragma line 337 "/usr/include/string.h" 3 4 extern char *strstr (const char *__haystack, const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Divide S into tokens separated by characters in DELIM. */ extern char *strtok (char *__restrict __s, const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); #pragma empty_line #pragma empty_line /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); #pragma empty_line extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); #pragma empty_line #pragma empty_line #pragma empty_line /* Similar to `strstr' but this function ignores the case of both strings. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern char *strcasestr (const char *__haystack, const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); #pragma empty_line /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return the length of S. */ extern size_t strlen (const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ extern size_t strnlen (const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Return a string describing the meaning of the `errno' code in ERRNUM. */ extern char *strerror (int __errnum) throw (); #pragma empty_line #pragma empty_line /* Reentrant version of `strerror'. There are 2 flavors of `strerror_r', GNU which returns the string and may or may not use the supplied temporary buffer and POSIX one which fills the string into the buffer. To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L without -D_GNU_SOURCE is needed, otherwise the GNU version is preferred. */ #pragma line 431 "/usr/include/string.h" 3 4 /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))) /* Ignore */; #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line /* Translate error number to string according to the locale L. */ extern char *strerror_l (int __errnum, __locale_t __l) throw (); #pragma empty_line #pragma empty_line #pragma empty_line /* We define this function always since `bzero' is sometimes needed when the namespace rules does not allow this. */ extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ extern void bcopy (const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Set N bytes of S to 0. */ extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Compare N bytes of S1 and S2 (same as memcmp). */ extern int bcmp (const void *__s1, const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Find the first occurrence of C in S (same as strchr). */ #pragma line 484 "/usr/include/string.h" 3 4 extern char *index (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Find the last occurrence of C in S (same as strrchr). */ #pragma line 512 "/usr/include/string.h" 3 4 extern char *rindex (const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ extern int ffs (int __i) throw () __attribute__ ((__const__)); #pragma empty_line /* The following two functions are non-standard but necessary for non-32 bit platforms. */ #pragma empty_line extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); #pragma empty_line #pragma empty_line /* Compare S1 and S2, ignoring case. */ extern int strcasecmp (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Again versions of a few functions which use the given locale instead of the global one. */ extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); #pragma empty_line extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); #pragma empty_line #pragma empty_line #pragma empty_line /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) throw (); #pragma empty_line /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line #pragma empty_line #pragma empty_line /* Compare S1 and S2 as strings holding name & indices/version numbers. */ extern int strverscmp (const char *__s1, const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); #pragma empty_line /* Sautee STRING briskly. */ extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line /* Frobnicate N bytes of S. */ extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); #pragma empty_line #pragma empty_line /* Return the file name within directory of FILENAME. We don't declare the function if the `basename' macro is available (defined in <libgen.h>) which makes the XPG version of this function available. */ #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line #pragma empty_line extern char *basename (const char *__filename) throw () __attribute__ ((__nonnull__ (1))); #pragma line 658 "/usr/include/string.h" 3 4 } #pragma line 4 "lenet5_ap2_shift/source/init.cpp" 2 #pragma line 1 "lenet5_ap2_shift/source/extern.h" 1 extern ap_fixed<30,10> in[32][32][10000]; extern int tag[10000]; extern int result; extern int fc_weight[4][400][400][2]; //[層][縦][横][データの種類] extern ap_fixed<30,10> fc_bias[4][120]; extern int conv_weight[3][16][6][5][5][2]; //[層][チャネル][サンプル][縦][横][データの種類] extern ap_fixed<30,10> conv_bias[3][16]; extern ap_fixed<30,10> fc_dot[3][120]; extern ap_fixed<30,10> conv_dot[3][16][28][28]; //[層][チャネル][サンプル][縦][横] extern ap_fixed<30,10> pool_dot[3][16][14][14]; //[層][チャネル][サンプル][縦][横] extern ap_fixed<30,10> fc_in[400]; #pragma line 5 "lenet5_ap2_shift/source/init.cpp" 2 #pragma line 1 "lenet5_ap2_shift/source/define.h" 1 #pragma line 6 "lenet5_ap2_shift/source/init.cpp" 2 #pragma empty_line FILE *fp; #pragma empty_line char fname[256]; char data_dir[] = "/home/yagiyugo/vivado/lenet5_ap2_shift/mnist_test_data/"; char param_dir[] = "/home/yagiyugo/vivado/lenet5_ap2_shift/param_txt/"; char fix[16]; #pragma empty_line double f_in; int i_in0, i_in1; #pragma empty_line void load_test_data(){ for(int i=1; i<=5; i++){ sprintf(fname, "%s%s%d%s", data_dir, "data", i, ".txt"); if ((fp = fopen(fname, "r")) == __null) { fprintf(stderr, "%s is not open.\n", fname); _exit(1); } for(int j=0; j<2000; j++){ for(int k=0; k<32; k++){ for(int l=0; l<32; l++){ if(k<2 || l<2 || k>29 || l>29){ in[k][l][(i-1)*2000+j]=0; } else{ fscanf(fp,"%lf", &f_in); in[k][l][(i-1)*2000+j]=ap_fixed<30,2>(f_in); } } } } fclose(fp); sprintf(fname, "%s%s%d%s", data_dir, "tag", i, ".txt"); if ((fp = fopen(fname, "r")) == __null) { fprintf(stderr, "%s is not open.\n", fname); _exit(1); } for(int j=0; j<2000; j++){ fscanf(fp,"%lf", &f_in); tag[(i-1)*2000+j]=int(f_in); } fclose(fp); } } #pragma empty_line void load_fc_weight(int num, int row, int column){ sprintf(fname, "%s%s%s%d%s", param_dir, fix, "fc", num, "_weight.txt"); if ((fp = fopen(fname, "r")) == __null) { fprintf(stderr, "%s is not open.\n", fname); _exit(1); } for(int i=0; i<row; i++){ for(int j=0; j<column; j++){ fscanf(fp, "%d %d", &i_in0, &i_in1); fc_weight[num][i][j][0]=i_in0; fc_weight[num][i][j][1]=i_in1; } } fclose(fp); } #pragma empty_line void load_conv_weight(int lay_num, int channel, int sample, int row, int column){ sprintf(fname, "%s%s%s%d%s", param_dir, fix, "conv", lay_num, "_weight.txt"); if ((fp = fopen(fname, "r")) == __null) { fprintf(stderr, "%s is not open.\n", fname); _exit(1); } for(int i=0; i<channel; i++){ for(int j=0; j<sample; j++){ for(int k=0; k<row; k++){ for(int l=0; l<column; l++){ fscanf(fp, "%d %d", &i_in0, &i_in1); conv_weight[lay_num][i][j][k][l][0]=i_in0; conv_weight[lay_num][i][j][k][l][1]=i_in1; } } } } fclose(fp); } #pragma empty_line void load_fc_bias(int lay_num, int row){ sprintf(fname, "%s%s%s%d%s", param_dir, "fixed_", "fc", lay_num, "_bias.txt"); if ((fp = fopen(fname, "r")) == __null) { fprintf(stderr, "%s is not open.\n", fname); _exit(1); } for(int i=0; i<row; i++){ fscanf(fp, "%lf", &f_in); fc_bias[lay_num][i]=(ap_fixed<30,10>)(f_in); } fclose(fp); } #pragma empty_line void load_conv_bias(int lay_num, int row){ sprintf(fname, "%s%s%s%d%s", param_dir, "fixed_", "conv", lay_num, "_bias.txt"); if ((fp = fopen(fname, "r")) == __null) { fprintf(stderr, "%s is not open.\n", fname); _exit(1); } for(int i=0; i<row; i++){ fscanf(fp, "%lf", &f_in); conv_bias[lay_num][i]=(ap_fixed<30,10>)(f_in); } fclose(fp); } #pragma empty_line void init(){ #pragma empty_line if(1 /*1:use fixed parameter 0:use float parameter*/==1) strcpy(fix, "shift_"); else strcpy(fix,""); #pragma empty_line load_test_data(); #pragma empty_line load_conv_weight(1, 6, 1, 5, 5); load_conv_bias(1, 6); load_conv_weight(2, 16, 6, 5, 5); load_conv_bias(2, 16); #pragma empty_line load_fc_weight(1, 400, 120); load_fc_bias(1, 120); load_fc_weight(2, 120, 84); load_fc_bias(2, 84); load_fc_weight(3, 84, 10); load_fc_bias(3, 10); #pragma empty_line }
[ "yagiyugo@gmail.com" ]
yagiyugo@gmail.com
1e275fab2f1a57dfa6df6ccb0f9dbbded553f9ba
2536df6e1fb9505fb03cee0cb9d4624a5f20efca
/lib/alsa_sink_impl.cc
3d79cb989804ad207c8923fd7127194f9f00fc4d
[]
no_license
ast/gr-tujasdr
b35501676d55a5adf55f2abca2dc6245d54d9e4d
589fb6d59e75ca9eab68de39121445b11e4e2ef3
refs/heads/master
2020-05-14T16:25:56.183116
2019-04-23T13:55:47
2019-04-23T13:55:47
181,871,680
0
0
null
null
null
null
UTF-8
C++
false
false
6,245
cc
/* -*- c++ -*- */ /* * Copyright 2018 <+YOU OR YOUR COMPANY+>. * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, * Boston, MA 02110-1301, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <gnuradio/io_signature.h> #include <stdexcept> #include <cstdint> #include "tujavolk.h" #include "alsa_sink_impl.h" namespace gr { namespace tujasdr { alsa_sink::sptr alsa_sink::make(unsigned int sample_rate, const std::string device_name, unsigned int frames_per_period) { return gnuradio::get_initial_sptr (new alsa_sink_impl(sample_rate, device_name, frames_per_period)); } /* * The private constructor */ alsa_sink_impl::alsa_sink_impl(unsigned int sample_rate, const std::string device_name, unsigned int frames_per_period) : d_pcm_handle(NULL), d_periods(2), // reasonable defaults d_frames_per_period(1188), // seems to be good defaults d_channels(2), d_sample_rate(sample_rate), d_max_periods_work(1), d_buf(NULL), gr::sync_block("alsa_sink", gr::io_signature::make(1, 1, sizeof(gr_complex)), // input gr::io_signature::make(0, 0, 0)) // output { d_pcm_handle = alsa_pcm_handle(device_name.c_str(), d_channels, d_sample_rate, d_periods, d_frames_per_period, SND_PCM_FORMAT_S32, SND_PCM_STREAM_PLAYBACK); if (d_pcm_handle == NULL) { throw std::runtime_error("alsa_pcm_handle"); } size_t alignment = volk_get_alignment(); d_buf = (sample32_t*)volk_malloc(sizeof(sample32_t) * d_frames_per_period * d_max_periods_work, alignment); assert(d_buf != NULL); // this is helpful for throughput set_output_multiple(d_frames_per_period); } /* * Our virtual destructor. */ alsa_sink_impl::~alsa_sink_impl() { snd_pcm_close(d_pcm_handle); volk_free(d_buf); } bool alsa_sink_impl::start() { int err = 0; snd_pcm_state_t snd_state = snd_pcm_state(d_pcm_handle); switch (snd_state) { case SND_PCM_STATE_OPEN: // not setup correctly throw std::runtime_error("SND_PCM_STATE_OPEN"); case SND_PCM_STATE_SETUP: // not prepared err = snd_pcm_prepare(d_pcm_handle); if(err < 0) throw std::runtime_error(snd_strerror(err)); // fallthrough case SND_PCM_STATE_PREPARED: // Good, we will autostart in work break; case SND_PCM_STATE_RUNNING: break; case SND_PCM_STATE_XRUN: break; case SND_PCM_STATE_DRAINING: break; case SND_PCM_STATE_PAUSED: break; case SND_PCM_STATE_SUSPENDED: break; case SND_PCM_STATE_DISCONNECTED: break; } return true; } bool alsa_sink_impl::stop() { // Stop immediately and drop buffer contents printf("stop\n"); snd_pcm_drop(d_pcm_handle); return true; } int alsa_sink_impl::work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) { // One complex input const gr_complex *in = (const gr_complex *) input_items[0]; const float scaling_factor = INT32_MAX; snd_pcm_sframes_t n_err; // printf("alsa_sink_impl::work: %d\n", noutput_items); if (noutput_items > d_frames_per_period * d_max_periods_work) { noutput_items = d_frames_per_period * d_max_periods_work; } // x2 because this function works on floats // This function clips the output volk_32f_s32f_convert_32i_neon((int32_t*)d_buf, (const float*)in, scaling_factor, 2 * noutput_items); // Write to ALSA n_err = snd_pcm_writei(d_pcm_handle, (int32_t*)d_buf, noutput_items); if (n_err < 0) { n_err = snd_pcm_recover(d_pcm_handle, (int )n_err, 0); GR_LOG_INFO(d_logger, "work: recovered from overrun"); if (n_err < 0) { // if we could not recover throw an error throw std::runtime_error(snd_strerror((int) n_err)); } else { // Let GNURadio call us again return 0; } } // Tell runtime system how many output items we consumed?. return noutput_items; } } /* namespace tujasdr */ } /* namespace gr */
[ "albin.stigo@gmail.com" ]
albin.stigo@gmail.com
6555042b5f2807207663ad1a05fce9a54859ba12
c9eed8dbbd0c934a8d5253bd015a7721450bd0dc
/Fibonacci/Fibonacci/main.cpp
64150e63ea2e091b07196cb2f2a3557a91d6d85f
[]
no_license
Konstilio/JavaAlgosToCPP
6517409e9594058144d7bded90283a99a7da63af
8a4ba041b2bf18e779c866805299cfb4a6cec5cb
refs/heads/master
2020-04-11T20:51:07.228256
2018-12-24T13:40:45
2018-12-24T13:40:45
162,085,384
0
0
null
null
null
null
UTF-8
C++
false
false
448
cpp
// // main.cpp // Fibonacci // // Created by Aleksander Konstantinov on 12/16/18. // Copyright © 2018 Oleksandr Konstantinov. All rights reserved. // #include <iostream> #include "FibonacciAlgorithm.h" using std::cout; int main(int argc, const char * argv[]) { FibonacciAlgorithm fibonacciAlgorithm; cout << fibonacciAlgorithm.fibonacciMemorize(10) << '\n'; cout << fibonacciAlgorithm.naiveFibonacci(10) << '\n'; return 0; }
[ "iamkonst17@gmail.com" ]
iamkonst17@gmail.com
3e7e790d58a855c1bc10c18f02ac4e8fe1736e9e
a458ffc46d445c956d4459a42568aee9a0db7ec9
/model/src/Move.cpp
36781ddfa861941f1f0ed1dee7f96ec18ed9f5da
[]
no_license
accolver/chess
ab193270df58f30aa4c38acda7f0a7044f1ad2bb
c907bb686ce8d1f0cee4c476f594de611acbde47
refs/heads/master
2020-05-19T22:33:59.535203
2013-06-27T00:20:59
2013-06-27T00:20:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,965
cpp
#include "Move.h" //------------------------------------------------------------------------------------------------ Move::Move() { Reset(); } //------------------------------------------------------------------------------------------------ Move::~Move() { } //------------------------------------------------------------------------------------------------ void Move::Reset() { Position e(-1, -1); SetEnd(e); } //------------------------------------------------------------------------------------------------ void Move::SetStart(Position p) { start = p; } //------------------------------------------------------------------------------------------------ Position Move::GetStart() { return start; } //------------------------------------------------------------------------------------------------ void Move::SetEnd(Position p) { end = p; } //------------------------------------------------------------------------------------------------ Position Move::GetEnd() { return end; } //------------------------------------------------------------------------------------------------ void Move::SetColor(PC c) { color = c; } //------------------------------------------------------------------------------------------------ PC Move::GetColor() { return color; } //------------------------------------------------------------------------------------------------ void Move::SetType(Type t) { type = t; } //------------------------------------------------------------------------------------------------ Type Move::GetType() { return type; } //------------------------------------------------------------------------------------------------ void Move::SetCaptured(Type t) { capturedPiece = t; } //------------------------------------------------------------------------------------------------ Type Move::GetCaptured() { return capturedPiece; } //------------------------------------------------------------------------------------------------
[ "accolver@gmail.com" ]
accolver@gmail.com
da293470da4d007e6784c6ee72dcf0ddb3113a02
1688e45840888fe3e6adc45d4d241ed5a91c0c14
/chap14/IntArray01/IntArrayTest.cpp
d1ad59c947c3231ee4b705bafe67a9461cde962b
[]
no_license
yoshinGO/introduction_cplus
ff76e55a4047d3819d8d92e981319d87074b11d2
3260130699554811e570eb47e58bd91e491fae5b
refs/heads/master
2020-03-27T23:40:58.337244
2018-09-22T23:56:36
2018-09-22T23:56:36
147,338,025
0
0
null
2018-09-22T23:52:46
2018-09-04T11:49:36
C++
UTF-8
C++
false
false
395
cpp
//整数配列クラスIntArray(第1版)の利用例 #include <iostream> #include "IntArray.h" using namespace std; int main() { int n; cout << "要素数を入力せよ:"; cin >> n; IntArray x(n); //要素数nの配列 for(int i = 0; i < x.size(); i++) x[i] = i; for(int i = 0; i < x.size(); i++) cout << "x[" << i << "] = " << x[i] << '\n'; }
[ "kamemygenki0124@gmail.com" ]
kamemygenki0124@gmail.com
9466c01f678889bed4d845110bd29862a219e189
296992b2ac454754ca15da53117aa07128ba54b4
/BearScriptUI/Language Document.cpp
dd791b903a86120bfdbafd4dd55d40777666c1d3
[]
no_license
get-over-here/X-Studio
0893e7edce4780caa4dfdbce84ba6af467863887
66ae0ed8c2e017e32d60de979abf44997511510e
refs/heads/master
2022-10-22T22:27:11.495043
2020-06-11T15:30:16
2020-06-11T15:30:16
271,582,106
0
0
null
2020-06-11T15:29:45
2020-06-11T15:29:44
null
WINDOWS-1252
C++
false
false
48,734
cpp
// // Language Document Base.cpp : Implements the creation and display of language document windows // // NB: Best viewed with tab size of 3 characters and Visual Studio's 'XML Doc Comment' syntax colouring // set to a colour that highly contrasts the 'C/C++ comment' syntax colouring // #include "stdafx.h" /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// CONSTANTS / GLOBALS /// //////////////////////////////////////////////////////////////////////////////////////////////////// #define COLUMN_ID 0 // Page ID column #define COLUMN_TEXT 1 // Text column #define COLUMN_TITLE 1 // Title column #define COLUMN_DESCRIPTION 2 // Description column // onException: Display #define ON_EXCEPTION() displayException(pException); /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// CREATION / DESTRUCTION /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// Function name : createLanguageDialogControls // Description : Creates the Workspace and ListViews // // LANGUAGE_DOCUMENT* pDocument : [in] LanguaegDocument // // Return Value : TRUE if successful, otherwise FALSE // BOOL createLanguageDialogControls(LANGUAGE_DOCUMENT* pDocument) { DWORD dwListStyle = WS_BORDER WITH WS_CHILD WITH WS_TABSTOP WITH (LVS_OWNERDATA WITH LVS_SHOWSELALWAYS WITH LVS_REPORT WITH LVS_SINGLESEL WITH LVS_NOSORTHEADER); LISTVIEW_COLUMNS oPageListView = { 2, IDS_LANGUAGE_PAGE_COLUMN_ID, 60, 140, NULL, NULL, NULL }, oStringListView = { 2, IDS_LANGUAGE_STRING_COLUMN_ID, 70, 600, NULL, NULL, NULL }; PANE_PROPERTIES oPaneData; // New pane properties PANE* pTargetPane; // Workspace pane being targetted for a split RECT rcClient; // Dialog client rectangle SIZE siClient; // Size of dialog rectangle // Prepare GetClientRect(pDocument->hWnd, &rcClient); utilConvertRectangleToSize(&rcClient, &siClient); /// [PAGE LIST] Create ListView pDocument->hPageList = CreateWindow(szGroupedListViewClass, TEXT("GamePage List"), dwListStyle, 0, 0, siClient.cx, siClient.cy, pDocument->hWnd, (HMENU)IDC_PAGE_LIST, getAppInstance(), NULL); ERROR_CHECK("Creating GamePage listview", pDocument->hPageList); initReportModeListView(pDocument->hPageList, &oPageListView, FALSE); ListView_SetBkColor(pDocument->hPageList, getThemeSysColour(TEXT("TAB"), COLOR_WINDOW)); // Define ListView groups for (UINT iGroup = 0; iGroup < LANGUAGE_GROUP_COUNT; iGroup++) GroupedListView_AddGroup(pDocument->hPageList, createGroupedListViewGroup(iGroup, IDS_FIRST_LANGUAGE_GROUP + iGroup)); /// [STRING LIST] Create ListView pDocument->hStringList = CreateWindow(WC_LISTVIEW, TEXT("GameString List"), dwListStyle, 0, 0, siClient.cx, siClient.cy, pDocument->hWnd, (HMENU)IDC_STRING_LIST, getAppInstance(), NULL); ERROR_CHECK("Creating GameString listview", pDocument->hStringList); initReportModeListView(pDocument->hStringList, &oStringListView, FALSE); SubclassWindow(pDocument->hStringList, wndprocCustomListView); ListView_SetBkColor(pDocument->hStringList, getThemeSysColour(TEXT("TAB"), COLOR_WINDOW)); /// [RICH EDIT] Create RichEdit Dialog pDocument->hRichTextDialog = loadDialog(TEXT("RICHTEXT_DIALOG"), pDocument->hWnd, dlgprocRichTextDialog, (LPARAM)pDocument); ERROR_CHECK("Creating RichEdit Dialog", pDocument->hRichTextDialog); /// [WORKSPACE] pDocument->hWorkspace = createWorkspace(pDocument->hWnd, &rcClient, pDocument->hPageList, getTabThemeColour()); // Add GameString | GamePage split if (findWorkspacePaneByHandle(pDocument->hWorkspace, pDocument->hPageList, NULL, NULL, pTargetPane)) { setWorkspacePaneProperties(&oPaneData, FALSE, NULL, 0.25f); insertWorkspaceWindow(pDocument->hWorkspace, pTargetPane, pDocument->hStringList, RIGHT, &oPaneData); // Add GameString -- RichText split if (findWorkspacePaneByHandle(pDocument->hWorkspace, pDocument->hStringList, NULL, NULL, pTargetPane)) { setWorkspacePaneProperties(&oPaneData, FALSE, NULL, 0.70f); insertWorkspaceWindow(pDocument->hWorkspace, pTargetPane, pDocument->hRichTextDialog, BOTTOM, &oPaneData); } } return pDocument->hWorkspace AND pDocument->hPageList AND pDocument->hStringList AND pDocument->hRichEdit; } /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// HELPERS /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// Function name : findLanguageDocumentGameStringByIndex // Description : Finds in a string within the current Page // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // CONST UINT iIndex : [in] Index of the desired GameString // GAME_STRING* &pOutput : [out] GameString, if found // // Return Value : TRUE if found, FALSE otherwise // BOOL findLanguageDocumentGameStringByIndex(LANGUAGE_DOCUMENT* pDocument, CONST UINT iIndex, GAME_STRING* &pOutput) { // Query tree return findObjectInAVLTreeByIndex(pDocument->pPageStringsByID, iIndex, (LPARAM&)pOutput); } /// Function name : findLanguageDocumentGamePageByID // Description : Find the page within the underlying LanguageFile // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // CONST UINT iIndex : [in] PageID of the desired GameString // GAME_PAGE* &pOutput : [out] GamePage, if found // // Return Value : TRUE if found, FALSE otherwise // BOOL findLanguageDocumentGamePageByID(LANGUAGE_DOCUMENT* pDocument, CONST UINT iPageID, GAME_PAGE* &pOutput) { // Query tree return findGamePageInTreeByID(getLanguageDocumentGamePageTree(pDocument), iPageID, pOutput); } /// Function name : findLanguageDocumentGamePageByIndex // Description : Find the page within the underlying LanguageFile // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // CONST UINT iIndex : [in] Index of the desired GameString // GAME_PAGE* &pOutput : [out] GamePage, if found // // Return Value : TRUE if found, FALSE otherwise // BOOL findLanguageDocumentGamePageByIndex(LANGUAGE_DOCUMENT* pDocument, CONST UINT iIndex, GAME_PAGE* &pOutput) { // Query tree return findObjectInAVLTreeByIndex(getLanguageDocumentGamePageTree(pDocument), iIndex, (LPARAM&)pOutput); } /// Function name : getLanguageDocumentGameStringTree // Description : Retrieve the entire GameStrings tree for a language document. If the document is displaying // the main language file then this returns the global game data strings tree. // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // // Return Value : GameStrings tree ordered by ID // AVL_TREE* getLanguageDocumentGameStringTree(LANGUAGE_DOCUMENT* pDocument) { return pDocument->pLanguageFile ? pDocument->pLanguageFile->pGameStringsByID : getGameData()->pGameStringsByID; } /// Function name : getLanguageDocumentGamePageTree // Description : Retrieve the GamePages tree for a language document. If the document is displaying the main // language file then this returns the global game data GamePages tree. // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // // Return Value : GamePages tree ordered by ID // AVL_TREE* getLanguageDocumentGamePageTree(LANGUAGE_DOCUMENT* pDocument) { return pDocument->pLanguageFile ? pDocument->pLanguageFile->pGamePagesByID : getGameData()->pGamePagesByID; } /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// FUNCTIONS /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// Function name : deleteLanguageDocumentGamePage // Description : Destroys the specified GamePage and all strings with it's PageID // // LANGUAGE_DOCUMENT* pDocument : [in] Document // GAME_PAGE* pPage : [in/out] GamePage to destroy // VOID deleteLanguageDocumentGamePage(LANGUAGE_DOCUMENT* pDocument, GAME_PAGE* pPage) { AVL_TREE_OPERATION* pOperation = createAVLTreeOperation(treeprocDeleteGameStringPageID, ATT_INORDER); AVL_TREE* pPageStrings = generateLanguagePageStringsTree(pDocument, pPage); /// Delete all strings with input PageID pOperation->pOutputTree = getLanguageDocumentGameStringTree(pDocument); performOperationOnAVLTree(pPageStrings, pOperation); /// Delete GamePage destroyObjectInAVLTreeByValue(getLanguageDocumentGamePageTree(pDocument), pPage->iPageID, NULL); // Re-Index Page tree performAVLTreeIndexing(getLanguageDocumentGamePageTree(pDocument)); // Update PageList Count /// REM: ListView_SetItemCount(pDocument->hPageList, getTreeNodeCount(getLanguageDocumentGamePageTree(pDocument))); updateLanguageDocumentPageGroups(pDocument); // Cleanup deleteAVLTree(pPageStrings); deleteAVLTreeOperation(pOperation); } /// Function name : deleteLanguageDocumentGameString // Description : Destroys the specified GameString // // LANGUAGE_DOCUMENT* pDocument : [in] Document // GAME_STRING* pString : [in/out] GameString to destroy // VOID deleteLanguageDocumentGameString(LANGUAGE_DOCUMENT* pDocument, GAME_STRING* &pString) { /// Delete string removeObjectFromAVLTreeByValue(pDocument->pPageStringsByID, pString->iID, NULL, (LPARAM&)pString); destroyObjectInAVLTreeByValue(getLanguageDocumentGameStringTree(pDocument), pString->iPageID, pString->iID); pString = NULL; /// Update ListView performAVLTreeIndexing(pDocument->pPageStringsByID); ListView_SetItemCount(pDocument->hStringList, getTreeNodeCount(pDocument->pPageStringsByID)); } /// Function name : getMenuItemState // Description : Retrieves item state for a context menu command // // LANGUAGE_DOCUMENT* pDocument : [in] Language document // const UINT id : [in] Command ID // const BOOL textColumn : [in] Whether user clicked the 'text' column // // Return Value : TRUE/FALSE // BOOL getMenuItemState(LANGUAGE_DOCUMENT* pDocument, const UINT id, const BOOL textColumn) { BOOL bStringSelection = ListView_GetSelected(pDocument->hStringList) != -1, bPageSelection = ListView_GetSelected(pDocument->hPageList) != -1, bGameData = pDocument->bVirtual; switch (id) { /// [PAGES] case IDM_GAMEPAGE_EDIT: return !bGameData AND bPageSelection; // Require selection case IDM_GAMEPAGE_DELETE: return !bGameData AND bPageSelection; // Require selection case IDM_GAMEPAGE_INSERT: return !bGameData; // Ensure not game data /// [STRINGS] case IDM_GAMESTRING_VIEW_ERROR: return pDocument->bFormattingError; // Require formatting error case IDM_GAMESTRING_INSERT: return bPageSelection AND !bGameData; // Require selected page case IDM_GAMESTRING_DELETE: return bStringSelection AND !bGameData; // Require selection // [EDIT STRING] Require selection + not game data. NB: Enable for text column, even game data --> shows the 'View Formatting' dialog case IDM_GAMESTRING_EDIT: return bStringSelection AND (textColumn OR !bGameData); // default: return FALSE; } } /// Function name : generateLanguagePageStringsTree // Description : Create a GameString tree containing only strings for a specified page // // LANGUAGE_DOCUMENT* pDocument : [in] Document // CONST GAME_PAGE* pGamePage : [in] Page // // Return Value : New AVL tree, you are responsible for destroying it // AVL_TREE* generateLanguagePageStringsTree(LANGUAGE_DOCUMENT* pDocument, CONST GAME_PAGE* pGamePage) { AVL_TREE_OPERATION* pOperation = createAVLTreeOperation(treeprocGeneratePageStrings, ATT_INORDER); AVL_TREE* pOutputTree = createAVLTree(extractGameStringNode, NULL, createAVLTreeSortKey(AK_ID, AO_ASCENDING), NULL, NULL); // Shallow Copy // Prepare pOperation->xFirstInput = pGamePage->iPageID; pOperation->pOutputTree = pOutputTree; /// Copy strings with matching PageID, Index resultant tree performOperationOnAVLTree(getLanguageDocumentGameStringTree(pDocument), pOperation); performAVLTreeIndexing(pOutputTree); // Cleanup and return tree deleteAVLTreeOperation(pOperation); return pOutputTree; } /// Function name : identifyLanguagePageStringNextID // Description : Calculates the next ID available in the current page // // LANGUAGE_DOCUMENT* pDocument : [in] Document // // Return Value : Next ID // UINT identifyLanguagePageStringNextID(LANGUAGE_DOCUMENT* pDocument) { GAME_STRING* pLastString; // Lookup last string (Sorted by ID) findLanguageDocumentGameStringByIndex(pDocument, getTreeNodeCount(pDocument->pPageStringsByID) - 1, pLastString); // Return 1 or next available ID return (!pLastString ? 1 : pLastString->iID + 1); //AVL_TREE_OPERATION* pOperation = createAVLTreeOperation(treeprocFindFreeGameStringID, ATT_INORDER); //UINT iResult; //// [CHECK] Ensure PageStrings exist //ASSERT(pDocument->pPageStringsByID); ///// Calculate next availble ID //iResult = performOperationOnAVLTree(pDocument->pPageStringsByID, pOperation); //// Cleanup //deleteAVLTreeOperation(pOperation); //return iResult; } /// Function name : insertLanguageDocumentGamePage // Description : Add a new GamePage to a Language document's LanguageFile and GamePage ListView // // LANGUAGE_DOCUMENT* pDocument : [in] Langage document // GAME_PAGE* pGamePage : [in] New GamePage to append. This is now owned by the document and must not be deleted // // Return Value : TRUE // BOOL insertLanguageDocumentGamePage(LANGUAGE_DOCUMENT* pDocument, GAME_PAGE* pGamePage) { // [CHECK] Ensure document isn't virtual ASSERT(!pDocument->bVirtual); // Insert into LanguageFile/GameData GamePage tree and re-index it insertObjectIntoAVLTree(getLanguageDocumentGamePageTree(pDocument), (LPARAM)pGamePage); performAVLTreeIndexing(getLanguageDocumentGamePageTree(pDocument)); // Update the GamePage ListView item count ///REM: ListView_SetItemCount(pDocument->hPageList, getLanguageDocumentGamePageTree(pDocument)->iCount); updateLanguageDocumentPageGroups(pDocument); return TRUE; } /// Function name : insertLanguageDocumentGameString // Description : Insert a new GameString into the current page // // LANGUAGE_DOCUMENT* pDocument : [in] Language document // GAME_STRING* pGameString : [in] GameString to insert // // Return Value : TRUE // BOOL insertLanguageDocumentGameString(LANGUAGE_DOCUMENT* pDocument, GAME_STRING* pGameString) { // [CHECK] Ensure document isn't virtual ASSERT(!pDocument->bVirtual); /// Insert into underlying GameString tree insertObjectIntoAVLTree(getLanguageDocumentGameStringTree(pDocument), (LPARAM)pGameString); // Re-create current page strings deleteAVLTree(pDocument->pPageStringsByID); pDocument->pPageStringsByID = generateLanguagePageStringsTree(pDocument, pDocument->pCurrentPage); /// Update the string ListView ListView_SetItemCount(pDocument->hStringList, getTreeNodeCount(pDocument->pPageStringsByID)); // Return TRUE return TRUE; } /// Function name : modifyLanguageDocumentGamePageID // Description : Changes the PageID of all strings within a specified page. If successful, the input Page is destroyed // // LANGUAGE_DOCUMENT* pDocument : [in] Document // GAME_PAGE* pOldPage : [in/out] Current Page // GAME_PAGE* pNewPage : [in] New Page to store strings under // VOID modifyLanguageDocumentGamePageID(LANGUAGE_DOCUMENT* pDocument, GAME_PAGE* pOldPage, GAME_PAGE* pNewPage) { AVL_TREE_OPERATION* pOperation = createAVLTreeOperation(treeprocModifyGameStringPageID, ATT_INORDER); AVL_TREE* pPageStrings = generateLanguagePageStringsTree(pDocument, pOldPage); // Prepare pOperation->xFirstInput = pNewPage->iPageID; pOperation->pOutputTree = getLanguageDocumentGameStringTree(pDocument); /// Modify PageID of all strings within target page if (performOperationOnAVLTree(pPageStrings, pOperation) == 0) // [ALL MOVED] Delete old Page destroyObjectInAVLTreeByValue(getLanguageDocumentGamePageTree(pDocument), pOldPage->iPageID, NULL); /// Insert new Page into List and Tree insertLanguageDocumentGamePage(pDocument, pNewPage); // Updates PageList Count / Re-indexes PageList tree // Cleanup deleteAVLTree(pPageStrings); deleteAVLTreeOperation(pOperation); } /// Function name : modifyLanguageDocumentGameStringID // Description : Changes the StringID of a string in the current page // // LANGUAGE_DOCUMENT* pDocument : [in] Document // GAME_STRING* pString : [in] Target String // const UINT iNewID : [in] New ID for string // VOID modifyLanguageDocumentGameStringID(LANGUAGE_DOCUMENT* pDocument, GAME_STRING* pString, const UINT iNewID) { // [CHECK] Ensure desired ID is available if (!validateLanguagePageStringID(pDocument, iNewID)) return; /// Re-Insert string under new ID removeObjectFromAVLTreeByValue(getLanguageDocumentGameStringTree(pDocument), pString->iPageID, pString->iID, (LPARAM&)pString); pString->iID = iNewID; insertObjectIntoAVLTree(getLanguageDocumentGameStringTree(pDocument), (LPARAM)pString); // Re-create current page strings deleteAVLTree(pDocument->pPageStringsByID); pDocument->pPageStringsByID = generateLanguagePageStringsTree(pDocument, pDocument->pCurrentPage); /// Redraw current page ListView_RedrawItems(pDocument->hStringList, 0, getTreeNodeCount(pDocument->pPageStringsByID)); } /// Function name : updateLanguageDocumentPageGroups // Description : Refreshes the size of each group in the Grouped PageList // // LANGUAGE_DOCUMENT* pDocument : [in] Document // VOID updateLanguageDocumentPageGroups(LANGUAGE_DOCUMENT* pDocument) { AVL_TREE_GROUP_COUNTER* pGroupCounter = createAVLTreeGroupCounter(LANGUAGE_GROUP_COUNT); // Count each performAVLTreeGroupCount(getLanguageDocumentGamePageTree(pDocument), pGroupCounter, AK_GROUP); /// Set new group sizes for (UINT iGroupID = 0; iGroupID < LANGUAGE_GROUP_COUNT; iGroupID++) GroupedListView_SetGroupCount(pDocument->hPageList, iGroupID, getAVLTreeGroupCount(pGroupCounter, iGroupID)); // Cleanup deleteAVLTreeGroupCounter(pGroupCounter); } /// Function name : treeprocDeleteGameStringPageID // Description : Destroys the equivilent GameString in the source tree // // AVL_TREE_NODE* pNode : [in] GameString in copy tree // AVL_TREE_OPERATION* pData : [in] pOutputTree : source tree // VOID treeprocDeleteGameStringPageID(AVL_TREE_NODE* pNode, AVL_TREE_OPERATION* pData) { GAME_STRING* pString = extractPointerFromTreeNode(pNode, GAME_STRING); /// Destroy string destroyObjectInAVLTreeByValue(pData->pOutputTree, pString->iPageID, pString->iID); } /// Function name : treeprocFindFreeGameStringID // Description : Finds the next available StringID // // AVL_TREE_NODE* pNode : [in] GameString in copy tree // AVL_TREE_OPERATION* pData : [in] Not used // /// RESCINDED: Not necessary - next free StringID can be calculated by looking up last PageString // VOID treeprocFindFreeGameStringID(AVL_TREE_NODE* pNode, AVL_TREE_OPERATION* pData) { GAME_STRING* pString = extractPointerFromTreeNode(pNode, GAME_STRING); // [CHECK] Calculate next available ID if (pString->iID >= (UINT)pData->xOutput) pData->bResult = pString->iID + 1; } /// Function name : treeprocGeneratePageStrings // Description : Performs a shallow copy of GameStrings with specific PageID // // AVL_TREE_NODE* pNode : [in/out] GameString node // AVL_TREE_OPERATION* pOperationData : [in] xFirstInput -- Page ID to copy // pOutputTree -- Destination tree // VOID treeprocGeneratePageStrings(AVL_TREE_NODE* pNode, AVL_TREE_OPERATION* pOperationData) { GAME_STRING* pGameString = extractPointerFromTreeNode(pNode, GAME_STRING); /// Compare PageID against the input PageID if (pGameString->iPageID == pOperationData->xFirstInput) // [SUCCESS] Insert into destination tree insertObjectIntoAVLTree(pOperationData->pOutputTree, (LPARAM&)pGameString); } /// Function name : treeprocModifyGameStringPageID // Description : Re-Inserts a GameString under a new PageID // // AVL_TREE_NODE* pNode : [in] GameString in copy tree // AVL_TREE_OPERATION* pData : [in] xFirstInput : new PageID // pOutputTree : source tree // VOID treeprocModifyGameStringPageID(AVL_TREE_NODE* pNode, AVL_TREE_OPERATION* pData) { GAME_STRING* pString = extractPointerFromTreeNode(pNode, GAME_STRING); UINT iNewPageID = pData->xFirstInput; // Create copy with new PageID GAME_STRING* pNewString = createGameString(pString->szText, pString->iID, iNewPageID, pString->eType); /// Attempt to insert copy if (insertObjectIntoAVLTree(pData->pOutputTree, (LPARAM)pNewString)) // [SUCCESS] Remove original destroyObjectInAVLTreeByValue(pData->pOutputTree, pString->iPageID, pString->iID); else { // [FAILED] Delete copy deleteGameString(pNewString); pData->bResult++; } } /// Function name : validateLanguageButtonID // Description : Validates a potential button ID // // LANGUAGE_DOCUMENT* pDocument : [in] Document // CONST TCHAR* szID : [in] ID to test // // Return Value : TRUE if available, FALSE if taken/invalid // BOOL validateLanguageButtonID(LANGUAGE_DOCUMENT* pDocument, CONST TCHAR* szID) { LANGUAGE_BUTTON* pButton; // [CHECK] Ensure no symbols if (utilFindCharacterInSet(szID, "`¬!\"£$%^&*()_[]@#~?<>;,/|\\")) return FALSE; // [CHECK] Ensure unique return !findObjectInAVLTreeByValue(pDocument->pButtonsByID, (LPARAM)szID, NULL, (LPARAM&)pButton); } /// Function name : validateLanguagePageStringID // Description : Determines whether a string ID for the current page is available // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // const UINT iStringID : [in] String ID // // Return Value : TRUE if available, FALSE if taken // BOOL validateLanguagePageStringID(LANGUAGE_DOCUMENT* pDocument, const UINT iStringID) { GAME_STRING* pConflict; // Query tree return !findObjectInAVLTreeByValue(getLanguageDocumentGameStringTree(pDocument), pDocument->pCurrentPage->iPageID, iStringID, (LPARAM&)pConflict); } /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// MESSAGE HANDLERS /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// Function name : onLanguageDocument_ContextMenu // Description : Display the Language document popup menu // // SCRIPT_DOCUMENT* pDocument : [in] ScriptDocument window data // CONST POINT* ptCursor : [in] Cursor position in screen co-ordinates // HWND hCtrl : [in] Control sending the message // VOID onLanguageDocument_ContextMenu(LANGUAGE_DOCUMENT* pDocument, CONST POINT* ptCursor, HWND hCtrl) { UINT iPageIDs[] = { IDM_GAMEPAGE_EDIT, IDM_GAMEPAGE_DELETE, IDM_GAMEPAGE_INSERT }, iStringIDs[] = { IDM_GAMESTRING_INSERT, IDM_GAMESTRING_DELETE, IDM_GAMESTRING_EDIT, IDM_GAMESTRING_VIEW_ERROR }; CUSTOM_MENU* pCustomMenu; CONST TCHAR* szItemText; LVHITTESTINFO& oHitTest = pDocument->oStringClick; BOOL bStringSelection = ListView_GetSelected(pDocument->hStringList) != -1, bPageSelection = ListView_GetSelected(pDocument->hPageList) != -1, bGameData = pDocument->bVirtual; // Prepare CONSOLE_COMMAND(); // Examine control switch (GetWindowID(hCtrl)) { /// [PAGE/STRING LIST] case IDC_PAGE_LIST: case IDC_STRING_LIST: /// Create CustomMenu pCustomMenu = createCustomMenu(TEXT("LANGUAGE_MENU"), TRUE, GetWindowID(hCtrl) == IDC_PAGE_LIST ? IDM_GAMEPAGE_POPUP : IDM_GAMESTRING_POPUP); CONSOLE("bStringSelection=%d bPageSelection=%d bGameData=%d", bStringSelection, bPageSelection, bGameData); // [PAGES LIST] if (GetWindowID(hCtrl) == IDC_PAGE_LIST) { /// Enable/Disable menu items for (UINT i = 0; i < 3; i++) EnableMenuItem(pCustomMenu->hPopup, iPageIDs[i], getMenuItemState(pDocument, iPageIDs[i], FALSE) ? MF_ENABLED : MF_DISABLED); } else { // Perform sub-item HitTest oHitTest.pt = *ptCursor; ScreenToClient(pDocument->hStringList, &oHitTest.pt); ListView_SubItemHitTest(pDocument->hStringList, &oHitTest); /// Enable/Disable menu items for (UINT i = 0; i < 4; i++) EnableMenuItem(pCustomMenu->hPopup, iStringIDs[i], getMenuItemState(pDocument, iStringIDs[i], oHitTest.iSubItem == COLUMN_TEXT) ? MF_ENABLED : MF_DISABLED); /// [EDIT] Set item text 'Edit ID/Edit Formatting/View Formatting' szItemText = (oHitTest.iSubItem == COLUMN_ID ? TEXT("Edit ID") : (bGameData ? TEXT("View Formatting") : TEXT("Edit Formatting"))); setCustomMenuItemText(pCustomMenu->hPopup, IDM_GAMESTRING_EDIT, FALSE, szItemText); /// [PROPERTIES] Check/Uncheck appropriately CheckMenuItem(pCustomMenu->hPopup, IDM_GAMESTRING_PROPERTIES, (getMainWindowData()->hPropertiesSheet ? MF_CHECKED : MF_UNCHECKED)); } // Display the pop-up menu TrackPopupMenu(pCustomMenu->hPopup, TPM_LEFTALIGN WITH TPM_TOPALIGN WITH TPM_LEFTBUTTON, ptCursor->x, ptCursor->y, NULL, pDocument->hWnd, NULL); deleteCustomMenu(pCustomMenu); } } /// Function name : onLanguageDocument_Command // Description : Language Document menu item processing // // LANGUAGE_DOCUMENT* pDocument : [in] Language document // CONST UINT iControlID : [in] Source control // CONST UINT iNotification : [in] Notifcation code // HWND hControl : [in] Control window handle // // Return type : TRUE if processed, FALSE otherwise // BOOL onLanguageDocument_Command(LANGUAGE_DOCUMENT* pDocument, CONST UINT iControlID, CONST UINT iNotification, HWND hControl) { GAME_STRING* pNewString; GAME_PAGE* pNewPage; BOOL bResult = TRUE; // Examine source switch (iControlID) { // [PAGE CHANGED] case IDM_GAMEPAGE_EDIT: case IDM_GAMEPAGE_INSERT: case IDM_GAMEPAGE_DELETE: switch (iControlID) { /// [EDIT PAGE] Edit selected Page case IDM_GAMEPAGE_EDIT: CONSOLE_MENU(IDM_GAMEPAGE_EDIT); // Display 'Insert/Edit page dialog' if (pNewPage = displayInsertPageDialog(pDocument, pDocument->pCurrentPage, getAppWindow())) onLanguageDocument_EditPage(pDocument, pDocument->pCurrentPage, pNewPage); else { CONSOLE("User aborted GamePage edit dialog"); return TRUE; // [ABORTED] Do not modify document } break; /// [INSERT PAGE] Create/Insert new Page case IDM_GAMEPAGE_INSERT: CONSOLE_MENU(IDM_GAMEPAGE_INSERT); // Display 'Insert/Edit page dialog' if (pNewPage = displayInsertPageDialog(pDocument, NULL, getAppWindow())) onLanguageDocument_InsertPage(pDocument, pNewPage); else { CONSOLE("User aborted Insert GamePage dialog"); return TRUE; // [ABORTED] Do not modify document } break; /// [DELETE PAGE] case IDM_GAMEPAGE_DELETE: CONSOLE_MENU(IDM_GAMEPAGE_DELETE); onLanguageDocument_DeletePage(pDocument, pDocument->pCurrentPage); break; } // [DOCUMENT CHANGED] sendDocumentUpdated(AW_DOCUMENTS_CTRL); break; // [STRING] case IDM_GAMESTRING_INSERT: case IDM_GAMESTRING_EDIT: case IDM_GAMESTRING_DELETE: switch (iControlID) { /// [INSERT STRING] case IDM_GAMESTRING_INSERT: CONSOLE_MENU(IDM_GAMESTRING_INSERT); // Display 'Insert String' dialog if (pNewString = displayInsertStringDialog(pDocument, getAppWindow())) onLanguageDocument_InsertString(pDocument, pNewString); else { CONSOLE("User aborted Insert GameString dialog"); return TRUE; // Do not modify document } break; /// [EDIT STRING] case IDM_GAMESTRING_EDIT: CONSOLE_MENU(IDM_GAMESTRING_EDIT); onLanguageDocument_EditString(pDocument, pDocument->pCurrentString); return TRUE; // Document modified only if edit is committed /// [DELETE STRING] case IDM_GAMESTRING_DELETE: CONSOLE_MENU(IDM_GAMESTRING_DELETE); onLanguageDocument_DeleteString(pDocument, pDocument->pCurrentString); break; } // [DOCUMENT CHANGED] sendDocumentUpdated(AW_DOCUMENTS_CTRL); break; /// [FORMATTING ERROR] case IDM_GAMESTRING_VIEW_ERROR: CONSOLE_MENU(IDM_GAMESTRING_VIEW_ERROR); onLanguageDocument_ViewFormattingError(pDocument); break; /// [PROPERTIES] -- Invoke the document properties dialog case IDM_GAMESTRING_PROPERTIES: sendAppMessage(AW_MAIN, WM_COMMAND, IDM_VIEW_DOCUMENT_PROPERTIES, NULL); break; default: return FALSE; } // Return result return bResult; } /// Function name : onLanguageDocument_Create // Description : Initialises the LanguageDocument controls and the LanguageDocument convenience pointers. // // LANGUAGE_DOCUMENT* pDocument : [in] LanguageDocument data // HWND hWnd : [in] Document window handle // VOID onLanguageDocument_Create(LANGUAGE_DOCUMENT* pDocument, HWND hWnd) { TRY { /// Associate data with dialog SetWindowLong(hWnd, 0, (LONG)pDocument); pDocument->hWnd = hWnd; // Create document convenience pointer pDocument->pLanguageFile = (LANGUAGE_FILE*)pDocument->pGameFile; pDocument->pFormatErrors = createErrorQueue(); /// Create child windows if (createLanguageDialogControls(pDocument)) { // Ensure LanguageFile's GamePages are indexed performAVLTreeIndexing(getLanguageDocumentGamePageTree(pDocument)); /// Display Pages updateLanguageDocumentPageGroups(pDocument); ListView_SetItemState(pDocument->hPageList, 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); // Causes strings to be generated + displayed /// [DEBUG] Test RichText algorithms //testRichTextConversion(pDocument->hWnd, getLanguageDocumentGameStringTree(pDocument)); // Show child windows ShowWindow(pDocument->hPageList, SW_SHOWNORMAL); ShowWindow(pDocument->hStringList, SW_SHOWNORMAL); ShowWindow(pDocument->hRichEdit, SW_SHOWNORMAL); } } CATCH0(""); } /// Function name : onLanguageDocument_Destroy // Description : Cleanup the language document's data // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // VOID onLanguageDocument_Destroy(LANGUAGE_DOCUMENT* pDocument) { TRY { /// [GAMESTRINGS] Delete GameStrings tree if (pDocument->pPageStringsByID) deleteAVLTree(pDocument->pPageStringsByID); /// [MESSAGE] Delete current message, if any if (pDocument->pCurrentMessage) deleteLanguageMessage(pDocument->pCurrentMessage); /// [CONTROLS] Destroy workspace utilDeleteWindow(pDocument->hWorkspace); // ErrorQueue deleteErrorQueue(pDocument->pFormatErrors); } CATCH0(""); } /// Function name : onLanguageDocument_KeyDown // Description : Invokes Insert/Delete on selected string/page // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // NMHDR* pMessage : [in] Listview notification header // UINT iKey : [in] Key pressed // BOOL onLanguageDocument_KeyDown(LANGUAGE_DOCUMENT* pDocument, NMHDR* pMessage, UINT iKey) { UINT id = NULL; // Convert source-ctrl & key-press into command ID switch (pMessage->idFrom) { case IDC_STRING_LIST: switch (iKey) { case VK_DELETE: id = IDM_GAMESTRING_DELETE; break; case VK_INSERT: id = IDM_GAMESTRING_INSERT; break; } break; case IDC_PAGE_LIST: switch (iKey) { case VK_DELETE: id = IDM_GAMEPAGE_DELETE; break; case VK_INSERT: id = IDM_GAMEPAGE_INSERT; break; } break; } // If enabled, invoke command if (id && getMenuItemState(pDocument, id, FALSE)) return onLanguageDocument_Command(pDocument, id, NULL, pMessage->hwndFrom); return FALSE; } /// Function name : onLanguageDocument_Notify // Description : Language document dialog WM_NOTIFY processing // // LANGUAGE_DOCUMENT* pDocument : [in] Language document window data // NMHDR* pMessage : [in] WM_NOTIFY message data // // Return Value : TRUE if message processed, FALSE if not // BOOL onLanguageDocument_Notify(LANGUAGE_DOCUMENT* pDocument, NMHDR* pMessage) { NMLISTVIEW* pListItem; BOOL bResult = TRUE; // Examine source switch (pMessage->idFrom) { case IDC_STRING_LIST: case IDC_PAGE_LIST: // Examine notification switch (pMessage->code) { /// [REQUEST DATA] case LVN_GETDISPINFO: onLanguageDocument_RequestData(pDocument, pMessage->idFrom, (NMLVDISPINFO*)pMessage); break; /// [ITEM CHANGED] case LVN_ITEMCHANGED: pListItem = (NMLISTVIEW*)pMessage; // [SELECTION CHANGED] if ((pListItem->uNewState & LVIS_SELECTED) OR (pListItem->uOldState & LVIS_SELECTED)) { if (pMessage->idFrom == IDC_PAGE_LIST) onLanguageDocument_PageSelectionChanged(pDocument, pListItem->iItem, pListItem->uNewState & LVIS_SELECTED); else onLanguageDocument_StringSelectionChanged(pDocument, pListItem->iItem, pListItem->uNewState & LVIS_SELECTED); } break; /// [EDIT STRING ID] case LVN_BEGINLABELEDIT: onLanguageDocument_EditStringBegin(pDocument, (NMLVDISPINFO*)pMessage); break; /// [EDIT STRING ID] case LVN_ENDLABELEDIT: bResult = onLanguageDocument_EditStringEnd(pDocument, (NMLVDISPINFO*)pMessage); break; /// [CUSTOM DRAW] Pass to CustomListView / GroupedListView handler case NM_CUSTOMDRAW: bResult = (pMessage->idFrom == IDC_STRING_LIST ? onCustomDrawListView(pDocument->hWnd, pMessage->hwndFrom, (NMLVCUSTOMDRAW*)pMessage) : onCustomDraw_GroupedListView(pDocument->hWnd, pMessage->hwndFrom, (NMLVCUSTOMDRAW*)pMessage)); break; /// [KEY PRESS] case LVN_KEYDOWN: bResult = onLanguageDocument_KeyDown(pDocument, pMessage, reinterpret_cast<NMLVKEYDOWN*>(pMessage)->wVKey); break; // [UNHANDLED] default: bResult = FALSE; break; } break; // [UNHANDLED] default: bResult = FALSE; break; } // Return result return bResult; } BOOL generateLanguageDisplayString(const GAME_STRING* pSource, LANGUAGE_MESSAGE*& pOutput) { SUBSTRING* pSubString = createSubString(pSource->szText); TCHAR* szDisplay = utilCreateEmptyString(1024); BOOL bResult; /// Generate 'Display' source with comments removed while (findNextSubStringSimple(pSource, pSubString)) { // Examine type switch (pSubString->eType) { /// [MISSION, TEXT] Append to output case SST_MISSION: case SST_LOOKUP: case SST_TEXT: StringCchCat(szDisplay, 1024, pSubString->szText); break; /// [COMMENTS] Ignore case SST_COMMENT: // [SPECIAL CASE] Allow 'opening bracket' operator if (utilCompareString(pSubString->szText, "(")) StringCchCat(szDisplay, 1024, pSubString->szText); break; } } /// Generate RichText 'Display' source //generateConvertedString(szDisplay, SCF_CONDENSE_BRACKET|SCF_CONDENSE_CURLY_BRACKET, szConverted); bResult = generateRichTextFromSourceText(szDisplay, lstrlen(szDisplay), (RICH_TEXT*&)pOutput, RTT_LANGUAGE_MESSAGE, ST_DISPLAY, NULL); // Cleanup and return RichText deleteSubString(pSubString); utilDeleteString(szDisplay); //utilSafeDeleteString(szConverted); return bResult; } /// Function name : onLanguageDocument_RequestData // Description : Supply item data for the GamePages ListView // // LANGUAGE_DOCUMENT* pDocument : [in] Language document data // CONST UINT iControlID : [in] ID of the control requesting data (Always IDC_PAGE_LIST) // NMLVDISPINFO* pHeader : [in/out] Item to display / Item data // // Return type : TRUE // BOOL onLanguageDocument_RequestData(LANGUAGE_DOCUMENT* pDocument, CONST UINT iControlID, NMLVDISPINFO* pHeader) { LANGUAGE_MESSAGE* pMessage; GAME_STRING* pGameString = NULL; GAME_PAGE* pGamePage = NULL; LVITEM& oOutput = pHeader->item; // Prepare // Examine switch (iControlID) { /// [GAME PAGE] case IDC_PAGE_LIST: // [CHECK] Lookup item if (findLanguageDocumentGamePageByIndex(pDocument, oOutput.iItem, pGamePage)) { // [IMAGE] Provide Voiced/NotVoiced icon if (oOutput.mask INCLUDES LVIF_IMAGE) oOutput.iImage = getAppImageTreeIconIndex(ITS_SMALL, pGamePage->bVoice ? TEXT("VOICED_YES_ICON") : TEXT("VOICED_NO_ICON")); // [TEXT] Provide appropriate text if (oOutput.mask INCLUDES LVIF_TEXT) { /// [PAGE ID] -- Supply the PageID and determine the icon from whether the page is voiced or not if (oOutput.iSubItem == COLUMN_ID) StringCchPrintf(oOutput.pszText, oOutput.cchTextMax, TEXT("%u"), pGamePage->iPageID); else { /// [TITLE/DESCRIPTION] Supply text or use placeholder CONST TCHAR* szText = (oOutput.iSubItem == COLUMN_TITLE ? pGamePage->szTitle : pGamePage->szDescription); // [CHECK] Supply text if (lstrlen(szText)) StringCchCopyConvert(oOutput.pszText, oOutput.cchTextMax, SPC_LANGUAGE_INTERNAL_TO_DISPLAY, szText); else { // [FAILED] Display placeholder in grey StringCchCopy(oOutput.pszText, oOutput.cchTextMax, TEXT("[None]")); oOutput.lParam = (LPARAM)GetSysColor(COLOR_GRAYTEXT); oOutput.mask |= LVIF_COLOUR_TEXT; } } } } break; /// [GAME STRING] case IDC_STRING_LIST: // [CHECK] Lookup item if (findLanguageDocumentGameStringByIndex(pDocument, oOutput.iItem, pGameString)) { // [IMAGE] Provide string's GameVersion icon if (oOutput.mask INCLUDES LVIF_IMAGE) oOutput.iImage = getAppImageTreeIconIndex(ITS_SMALL, identifyGameVersionIconID(pGameString->eVersion)); // [TEXT] Provide column text if (oOutput.mask INCLUDES LVIF_TEXT AND (oOutput.lParam == LVIP_CUSTOM_DRAW)) // [FIX] Ignore LVN_GETDISPINFO that does not originate from CustomDraw handler (Received from unknown window once per click) { // Attempt to generate RichText from source if (!generateLanguageDisplayString(pGameString, pMessage)) { // [ERROR] Display text in red oOutput.lParam = RGB(255,0,0); oOutput.mask |= LVIF_COLOUR_TEXT; } /// [STRING ID] if (oOutput.iSubItem == COLUMN_ID) StringCchPrintf(oOutput.pszText, oOutput.cchTextMax, TEXT("%u"), pGameString->iID); /// [VALID TEXT] Supply and pass ownership to ListView else if (utilExcludes(oOutput.mask, LVIF_COLOUR_TEXT)) { oOutput.lParam = (LPARAM)pMessage; oOutput.mask |= LVIF_RICHTEXT | LVIF_DESTROYTEXT; } else /// [INVALID TEXT] Output verbatim StringCchCopy(oOutput.pszText, oOutput.cchTextMax, pGameString->szText); // Cleanup if (utilExcludes(oOutput.mask, LVIF_DESTROYTEXT)) deleteLanguageMessage(pMessage); } } break; } /// [ERROR] Provide error string if (!pGameString AND !pGamePage) setMissingListViewItem(&oOutput, ListView_GetItemCount(GetDlgItem(pDocument->hWnd, iControlID)) ); return TRUE; } /// Function name : onLanguageDocument_Resize // Description : Resizes a language document and repositions it's child windows // // LANGUAGE_DOCUMENT* pDocument : [in] Language document // CONST SIZE* pNewSize : [in] New window size // VOID onLanguageDocument_Resize(LANGUAGE_DOCUMENT* pDocument, CONST SIZE* pNewSize) { // Resize workspace SetWindowPos(pDocument->hWorkspace, NULL, NULL, NULL, pNewSize->cx, pNewSize->cy, SWP_NOMOVE WITH SWP_NOZORDER); // Resize ListView columns ListView_SetColumnWidth(pDocument->hStringList, COLUMN_TEXT, LVSCW_AUTOSIZE_USEHEADER); //ListView_SetColumnWidth(pDocument->hPageList, COLUMN_TITLE, LVSCW_AUTOSIZE_USEHEADER); } /// Function name : onScriptDocumentSaveComplete // Description : Marks the document as 'un-modified' if successful // // LANGUAGE_DOCUMENT* pDocument : [in] Language document // DOCUMENT_OPERATION* pOperationData : [in] Generation Operation Data // VOID onLanguageDocument_SaveComplete(LANGUAGE_DOCUMENT* pDocument, DOCUMENT_OPERATION* pOperationData) { // [SUCCESSFUL] Document saved successfully if (isOperationSuccessful(pOperationData)) { /// [UN-MODIFIED] Remove 'modified' flag setDocumentModifiedFlag(pDocument, FALSE); } } /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// WINDOW PROCEDURE /// //////////////////////////////////////////////////////////////////////////////////////////////////// /// Function name : dlgprocLanguageDocument // Description : Language document dialog procedure // // LRESULT wndprocLanguageDocument(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) { DOCUMENT_OPERATION* pOperationData; LANGUAGE_DOCUMENT* pDocument; CREATESTRUCT* pCreationData; LRESULT iResult; POINT ptCursor; SIZE siWindow; TRY { // Get document data pDocument = (LANGUAGE_DOCUMENT*)GetWindowLong(hWnd, 0); iResult = 0; switch (iMessage) { /// [CREATION] case WM_CREATE: // Prepare pCreationData = (CREATESTRUCT*)lParam; pDocument = (LANGUAGE_DOCUMENT*)pCreationData->lpCreateParams; // Init dialog onLanguageDocument_Create(pDocument, hWnd); break; /// [DESTRUCTION] case WM_DESTROY: onLanguageDocument_Destroy(pDocument); break; /// [COMMAND PROCESSING] case WM_COMMAND: if (!onLanguageDocument_Command(pDocument, LOWORD(wParam), HIWORD(wParam), (HWND)lParam)) // [UNHANDLED] Call default window proc iResult = DefWindowProc(hWnd, iMessage, wParam, lParam); break; /// [NOTIFICATION] case WM_NOTIFY: if ((iResult = onLanguageDocument_Notify(pDocument, (NMHDR*)lParam)) == FALSE) // [UNHANDLED] Call default window proc iResult = DefWindowProc(hWnd, iMessage, wParam, lParam); break; /// [RESIZE] - Resize tab to the size of the tab control case WM_SIZE: // Prepare siWindow.cx = LOWORD(lParam); siWindow.cy = HIWORD(lParam); // Resize onLanguageDocument_Resize(pDocument, &siWindow); break; /// [CONTEXT MENU] case WM_CONTEXTMENU: ptCursor.x = GET_X_LPARAM(lParam); ptCursor.y = GET_Y_LPARAM(lParam); onLanguageDocument_ContextMenu(pDocument, &ptCursor, (HWND)wParam); break; /// [MENU ITEM HOVER] Forward messages from CodeEdit up the chain to the Main window case WM_MENUSELECT: sendAppMessage(AW_MAIN, WM_MENUSELECT, wParam, lParam); break; /// [GET MENU CMD STATE] case UM_GET_MENU_ITEM_STATE: iResult = onLanguageDocument_GetMenuItemState(pDocument, wParam, (UINT*)lParam); break; /// [FOCUS] case WM_SETFOCUS: SetFocus(pDocument->hPageList); break; /// [CUSTOM MENU/CUSTOM COMBO] case WM_DRAWITEM: onWindow_DrawItem((DRAWITEMSTRUCT*)lParam); break; case WM_MEASUREITEM: onWindow_MeasureItem(hWnd, (MEASUREITEMSTRUCT*)lParam); break; case WM_DELETEITEM: onWindow_DeleteItem((DELETEITEMSTRUCT*)lParam); break; /// [THEME CHANGED] case WM_THEMECHANGED: ListView_SetBkColor(pDocument->hPageList, getThemeSysColour(TEXT("TAB"), COLOR_WINDOW)); ListView_SetBkColor(pDocument->hStringList, getThemeSysColour(TEXT("TAB"), COLOR_WINDOW)); setWorkspaceBackgroundColour(pDocument->hWorkspace, getTabThemeColour()); break; /// [HELP] Display help file case WM_HELP: onLanguageDocument_Help(pDocument, (HELPINFO*)lParam); break; /// [DOCUMENT PROPERTY CHANGED] case UN_PROPERTY_UPDATED: onLanguageDocument_PropertyChanged(pDocument, wParam); break; /// [DOCUMENT SAVED] case UN_OPERATION_COMPLETE: pOperationData = (DOCUMENT_OPERATION*)lParam; // [SAVE] if (pOperationData->eType == OT_SAVE_LANGUAGE_FILE) onLanguageDocument_SaveComplete(pDocument, pOperationData); break; // [UNHANDLED] default: iResult = DefWindowProc(hWnd, iMessage, wParam, lParam); break; } // [FOCUS HANDLER] updateMainWindowToolBar(iMessage, wParam, lParam); // Return result return iResult; } /// [EXCEPTION HANDLER] CATCH4("iMessage=%d wParam=%d lParam=%d Document='%s'", iMessage, wParam, lParam, pDocument ? pDocument->szFullPath : NULL); return 0; }
[ "nicholas.crowley@gmail.com" ]
nicholas.crowley@gmail.com
bd137f3b7d671b84651828d627bdcdc1f4513d8f
8751230f16a776e5a61754c7d38c0c2380efbf42
/src/appleseed/foundation/math/population.h
40c98d968bae1959c00baf7c66768f2e15d7cbba
[ "MIT" ]
permissive
willzhou/appleseed
0b5dc66480809c92b358264de6e9f628a5758922
ea08888796006387c800c23b63a8ca7bb3c9b675
refs/heads/master
2021-01-20T23:16:42.617460
2012-05-31T08:29:22
2012-05-31T08:29:22
4,506,046
2
0
null
null
null
null
UTF-8
C++
false
false
5,442
h
// // This source file is part of appleseed. // Visit http://appleseedhq.net/ for additional information and resources. // // This software is released under the MIT license. // // Copyright (c) 2010-2012 Francois Beaune, Jupiter Jazz Limited // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // #ifndef APPLESEED_FOUNDATION_MATH_POPULATION_H #define APPLESEED_FOUNDATION_MATH_POPULATION_H // Standard headers. #include <cmath> #include <cstddef> #include <limits> namespace foundation { // // Compute statistical properties of a population of values. // template <typename T> class Population { public: // Value and population type. typedef T ValueType; typedef Population<T> PopulationType; // Constructor. Population(); // empty population // Insert a new value into the population. void insert(const ValueType& val); // Return the size of the population. size_t get_size() const; // Return various properties of the population defined so far. ValueType get_min() const; // minimum value ValueType get_max() const; // maximum value double get_avg() const; // average value double get_dev() const; // standard deviation private: size_t m_size; // size of the population ValueType m_min; // minimum value ValueType m_max; // maximum value double m_avg; // average value double m_s; // s = n*(standard deviation)^2 }; // // Population class implementation. // template <typename T> inline Population<T>::Population() : m_size(0) , m_min(std::numeric_limits<ValueType>::max()) , m_max(std::numeric_limits<ValueType>::min()) , m_avg(0.0) , m_s(0.0) { } template <typename T> inline void Population<T>::insert(const ValueType& val) { // // For a given population of n values { x1, x2, ..., xn }, the minimum value, // the maximum value, the mean (or average) value and the standard deviation // of the population are defined as follow: // // minimum value min { x1, x2, ..., xn } // maximum value max { x1, x2, ..., xn } // mean value sum(xi, i=1..n) / n // standard deviation sqrt( sum((xi-mean)^2, i=1..n) / n ) // // To update the mean value when a new value x is included into the population, // we write // // mean_{n+1} = mean_n + delta // // and solve this equation for delta, which yields // // delta = (x - mean_n) / (n + 1) // // The equations and the algorithm to update the standard deviation are // detailed in the references. // // References: // // http://en.wikipedia.org/wiki/Standard_deviation // http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance // // Update the minimum value. if (m_min > val) m_min = val; // Update the maximum value. if (m_max < val) m_max = val; const double double_val = static_cast<double>(val); // Compute residual value. const double residual = double_val - m_avg; // Compute the new size of the population. const size_t new_size = m_size + 1; // Compute the new mean value of the population. const double new_avg = m_avg + residual / new_size; // Update s. m_s += residual * (double_val - new_avg); // Update the mean value of the population. m_avg = new_avg; // Update the size of the population. m_size = new_size; } template <typename T> inline size_t Population<T>::get_size() const { return m_size; } template <typename T> inline T Population<T>::get_min() const { return m_size > 0 ? m_min : ValueType(0); } template <typename T> inline T Population<T>::get_max() const { return m_size > 0 ? m_max : ValueType(0); } template <typename T> inline double Population<T>::get_avg() const { return m_avg; } template <typename T> inline double Population<T>::get_dev() const { // // Since // // s = n*(standard deviation)^2 // // the standard deviation is equal to // // sigma = sqrt(s/n) // return m_size > 0 ? std::sqrt(m_s / m_size) : 0.0; } } // namespace foundation #endif // !APPLESEED_FOUNDATION_MATH_POPULATION_H
[ "beaune@aist.enst.fr" ]
beaune@aist.enst.fr
c0bbc9cbe675a7d3b1394b3ebc7503a0b29aab55
057f2783821562579dea238c1073d0ba0839b402
/OCR/OCR/.localhistory/OCR/1481754732$ocr.cpp
240be8e1eafb43728507c695dc5241372251b383
[]
no_license
KrzysztofKozubek/Projects
6cafb2585796c907e8a818da4b51c97197ccbd11
66ef23fbc8a6e6cf3b6ef837b390d7f2113a9847
refs/heads/master
2023-02-07T12:24:49.155221
2022-10-08T18:39:58
2022-10-08T18:39:58
163,520,516
0
0
null
2023-02-04T17:46:12
2018-12-29T15:18:18
null
WINDOWS-1250
C++
false
false
20,535
cpp
#include "ocr.h" // TODO: 1. wyrownanie katu 2. erozja i dylatacja (moze filtr) pozbycie sie szumu // zmiana organizacji // OCR::OCR(QWidget *parent) : QMainWindow(parent) { /* Kontrast & Jasność & Obrót */ ui.setupUi(this); this->image = imread("lena.jpg", 1); showImage = image.clone(); connect(ui.HSContrast1, SIGNAL(sliderReleased()), this, SLOT(changeContrasOrBrightness())); connect(ui.HSBrightness1, SIGNAL(sliderReleased()), this, SLOT(changeContrasOrBrightness())); connect(ui.HSRotate1, SIGNAL(sliderReleased()), this, SLOT(rotate())); connect(ui.BConfirmChange1, SIGNAL(clicked()), this, SLOT(confirmChange())); connect(ui.BLoadImage1, SIGNAL(clicked()), this, SLOT(loadImage())); connect(ui.BSaveImage1, SIGNAL(clicked()), this, SLOT(saveImage())); connect(ui.BLoadImage3, SIGNAL(clicked()), this, SLOT(loadImage2())); connect(ui.HSBinaryElement3, SIGNAL(sliderReleased()), this, SLOT(preProcessing())); connect(ui.HSBinaryKernel3, SIGNAL(sliderReleased()), this, SLOT(preProcessing())); connect(ui.HSErodeElement3, SIGNAL(sliderReleased()), this, SLOT(preProcessing())); connect(ui.HSErodeKernel3, SIGNAL(sliderReleased()), this, SLOT(preProcessing())); connect(ui.BRightImageRow2, SIGNAL(clicked()), this, SLOT(SegmentationIncreaseIndexImageRow())); connect(ui.BLeftImageRow2, SIGNAL(clicked()), this, SLOT(SegmentationReduceIndexImageRow())); connect(ui.BRightImageCell2, SIGNAL(clicked()), this, SLOT(SegmentationIncreaseIndexImageCell())); connect(ui.BLeftImageCell2, SIGNAL(clicked()), this, SLOT(SegmentationReduceIndexImageCell())); connect(ui.BSaveImages2, SIGNAL(clicked()), this, SLOT(saveEffect())); connect(ui.BRightImageCell4, SIGNAL(clicked()), this, SLOT(SegmentationIncreaseIndexImageSign())); connect(ui.BLeftImageCell4, SIGNAL(clicked()), this, SLOT(SegmentationReduceIndexImageSign())); displayImage(this->image.clone()); /* END Kontrast & Jasność & Obrót END */ /* Przetwarzanie wstpne */ // 12 11 6 this->imageSign = imread("digit//digits05.jpg", 0); this->imageSignO = imageSign.clone(); preProcessing(); MomentsLoadImage(); /* END Przetwarzanie wstpene */ /* END Segmentation END */ } OCR::~OCR() {} #pragma region void OCR::displayImageInLabel(Mat image, QLabel* label) { cvtColor(image, image, CV_GRAY2RGB); Size size(100, 100); QImage imdisplay((uchar*)image.data, image.cols, image.rows, image.step, QImage::Format_RGB888); QImage img2 = imdisplay.scaled(300, 1000, Qt::KeepAspectRatio); label->setPixmap(QPixmap::fromImage(img2)); } Mat OCR::loadImageFrom(QString pathToImage, int flag = 1) { return imread(QStringToString(pathToImage), flag); } #pragma endregion Unversal method #pragma region void OCR::rotate() { Mat tmp = image.clone(); CPreProcessing::rotate(tmp, ui.HSRotate1->value()); displayImage(tmp); } void OCR::changeContrasOrBrightness() { Mat tmp = image.clone(); CPreProcessing::changeContrasOrBrightness(tmp, ui.HSContrast1->value(), ui.HSBrightness1->value()); displayImage(tmp); } void OCR::displayImage(Mat image) { cvtColor(image, image, CV_BGR2RGB); QImage imdisplay((uchar*)image.data, image.cols, image.rows, image.step, QImage::Format_RGB888); ui.LImage1->setPixmap(QPixmap::fromImage(imdisplay)); } void OCR::confirmChange() { image.release(); image = showImage.clone(); } void OCR::loadImage() { Mat tmp = imread(QStringToString(ui.LEPathImageLoad1->text()), 1); if (!tmp.empty()) { image.release(); showImage.release(); image = tmp.clone(); showImage = tmp.clone(); displayImage(image); } } void OCR::saveImage() { imwrite(QStringToString(ui.LEPathImageSave1->text()), image); } #pragma endregion Tab Contrast & Brightness & Rotate #pragma region void OCR::loadImage2() { displayImageInLabel(loadImageFrom(ui.LEPathImageLoad3->text()), ui.LImage3); } void OCR::preProcessing() { Mat tmp = imageSignO.clone(); imageSign = tmp.clone(); //Find value skip int skipL = CPreProcessing::getSkipLValue(imageSign.clone()); CPreProcessing::cutImage(imageSign, skipL, 20, 0, 0); int skipT = CPreProcessing::getSkipTValue(imageSign.clone()); CPreProcessing::cutImage(imageSign, 0, skipT, 0, 0); int skipR = 250; int skipB = 0; CPreProcessing::cutImage(imageSign, 0, 0, skipR, skipB); //CPreProcessing::dilate(imageSign, 2, 2); //imshow("Z", imageSign); //waitKey(); int size = 5; GaussianBlur(imageSign.clone(), imageSign, Size(size, size), 0,0); //Binary //threshold(tmp, imageSign, ui.HSBinaryKernel3->value(), 255, ui.HSBinaryElement3->value()); CPreProcessing::toBinary(imageSign, ui.HSBinaryKernel3->value(), 0,0,0,0); //Change angle CPreProcessing::autoRotate(imageSign, skipT); //Erode || Dilate //CPreProcessing::dilate(imageSign, ui.HSErodeElement3->value(), ui.HSErodeKernel3->value()); displayImageInLabel(imageSign.clone(), ui.LImage3); SegmentationRow(imageSign.clone()); } #pragma endregion Przetwarzanie wstępne #pragma region void OCR::SegmentationLoadImage() { Mat tmp = imread(QStringToString(ui.LEPathImageLoad3->text()), 1); if (!tmp.empty()) { image.release(); showImage.release(); image = tmp.clone(); showImage = tmp.clone(); displayImage(image); } } void OCR::SegmentationSaveImage() { imwrite(QStringToString(ui.LEPathImageSave1->text()), image); } void OCR::SegmentationRow(Mat image) { Mat tmp = imageSign.clone(); int LIMIT_VALUE_LIGHT_BIT = 42; vImageSignRow.clear(); int cols = image.cols; int rows = image.rows; int cutStart = 0, cutEnd = 0; //information about level cutting int fromCut = 0, toCut = 0; //save position column double sum = 0; for (int y = 0; y < rows - 1; y++) { sum = CPreProcessing::advRow(image, y, 15); if (LIMIT_VALUE_LIGHT_BIT >= sum) { if (cutStart == 0) fromCut = y; if (cutStart == 1 && cutEnd == 0) { toCut = y; cutEnd = 1; } if (cutStart == 1 && cutEnd == 1) { tmp = image.clone(); CPreProcessing::cutImage(tmp, 0, fromCut, 0, tmp.rows - toCut); CPreProcessing::removeBlackBackground(tmp); vImageSignRow.push_back(tmp); tmp.release(); cutStart = toCut = cutEnd = 0; fromCut = y; } } else { if (cutStart == 0) cutStart = 1; } } indexImageRow = 0; SegmentationLoadImageRow(); } void OCR::SegmentationMaxSize(Mat& image) { int left, right, top, bottom, sum; left = right = top = bottom = sum = 0; Mat tmp = image.clone(); for (int x = 0; x < tmp.cols; x++) { sum = CPreProcessing::advCol(tmp, x, 1); if (sum > 10) { left = x; x = tmp.cols; } } for (int x = tmp.cols - 1; x > 0; x--) { sum = CPreProcessing::advCol(tmp, x, 1); if (sum > 10) { right = x; x = 0; } } for (int y = 0; y < tmp.rows; y++) { sum = CPreProcessing::advRow(tmp, y, 1); if (sum > 10) { top = y; y = image.cols; } } for (int y = tmp.rows - 1; y > 0 ; y--) { sum = CPreProcessing::advRow(tmp, y, 1); if (sum > 10) { bottom = y; y = 0; } } CPreProcessing::cutImage(tmp, left, top, tmp.cols - right, tmp.rows - bottom); cv::resize(tmp, image, Size(130, 130)); } void szkielet(Mat image) { cv::Mat skel(image.size(), CV_8UC1, cv::Scalar(0)); cv::Mat temp; cv::Mat eroded; cv::Mat element = cv::getStructuringElement(cv::MORPH_CROSS, cv::Size(3, 3)); bool done; do { cv::erode(image, eroded, element); cv::dilate(eroded, temp, element); // temp = open(img) cv::subtract(image, temp, temp); cv::bitwise_or(skel, temp, skel); eroded.copyTo(image); done = (cv::countNonZero(image) == 0); } while (!done); } void OCR::SegmentationCell(Mat image) { int LIMIT_VALUE_LIGHT_BIT = 100; Mat tmp; vImageSignCell.clear(); int cols = image.cols; int rows = image.rows; int cutStart = 0, cutEnd = 0; //information about level cutting int fromCut = 0, toCut = 0; //save position column int size = 65; string help; int sum = 0; for (int y = 0; y < cols - 1; y++) { sum = CPreProcessing::advCol(image, y, 5); if (LIMIT_VALUE_LIGHT_BIT <= sum) { if (cutStart == 0) fromCut = y; if (cutStart == 1 && cutEnd == 0) { toCut = y; cutEnd = 1; } if (cutStart == 1 && cutEnd == 1) { tmp = image.clone(); CPreProcessing::cutImage(tmp, fromCut, 0, tmp.cols - toCut, 0); CPreProcessing::cutImage(tmp, (tmp.cols / 2) - size, (tmp.rows / 2) - size, (tmp.cols / 2) - size, (tmp.rows / 2) - size); CPreProcessing::getCenterWeightImage(tmp); SegmentationMaxSize(tmp); szkielet(tmp); vImageSignCell.push_back(tmp); tmp.release(); cutStart = toCut = cutEnd = 0; fromCut = y; } } else { if (cutStart == 0) cutStart = 1; } } indexImageCell = 0; SegmentationLoadImageCell(); } void OCR::SegmentationIncreaseIndexImageRow() { if (indexImageRow < vImageSignRow.size()-1) { indexImageRow++; SegmentationLoadImageRow(); } } void OCR::SegmentationReduceIndexImageRow() { if (indexImageRow > 0) { indexImageRow--; SegmentationLoadImageRow(); } } void OCR::SegmentationIncreaseIndexImageCell() { if (indexImageCell < vImageSignCell.size()-1) { indexImageCell++; SegmentationLoadImageCell(); } } void OCR::SegmentationReduceIndexImageCell() { if (indexImageCell > 0) { indexImageCell--; SegmentationLoadImageCell(); } } void OCR::SegmentationLoadImageRow() { ui.LImageRow2->clear(); if(indexImageRow < vImageSignRow.size()){ Mat image = vImageSignRow[indexImageRow].clone(); QImage imdisplay((uchar*)image.data, image.cols, image.rows, image.step, QImage::Format_Grayscale8); QImage img2 = imdisplay.scaled(600, 1000, Qt::KeepAspectRatio); ui.LImageRow2->setPixmap(QPixmap::fromImage(img2)); SegmentationCell(vImageSignRow[indexImageRow].clone()); } } void OCR::SegmentationLoadImageCell() { if(indexImageCell < vImageSignCell.size()){ ui.LImageCell2->clear(); Mat image = vImageSignCell[indexImageCell].clone(); QImage imdisplay((uchar*)image.data, image.cols, image.rows, image.step, QImage::Format_Grayscale8); QImage img2 = imdisplay.scaled(400, 1000, Qt::KeepAspectRatio); ui.LImageCell2->setPixmap(QPixmap::fromImage(imdisplay)); } } void OCR::SegmentationReduceIndexImageSign() { if (indexImageSign > 0) { indexImageSign--; ui.LImageCell4->clear(); Mat image = vImageSign[indexImageSign].clone(); QImage imdisplay((uchar*)image.data, image.cols, image.rows, image.step, QImage::Format_Grayscale8); QImage img2 = imdisplay.scaled(400, 1000, Qt::KeepAspectRatio); ui.LImageCell4->setPixmap(QPixmap::fromImage(imdisplay)); ui.TB4->setText(StringToQString(CWindows::getNLineFromFile("SCRIPTS//Classifier//NVF_Training.txt", indexImageSign))); ui.TB4->setText(StringToQString(CWindows::getNLineFromFile("SCRIPTS//Classifier//NVF_Test_I.txt", indexImageSign))); } } void OCR::SegmentationIncreaseIndexImageSign() { if (indexImageSign < vImageSign.size()) { indexImageSign++; ui.LImageCell4->clear(); Mat image = vImageSign[indexImageSign].clone(); QImage imdisplay((uchar*)image.data, image.cols, image.rows, image.step, QImage::Format_Grayscale8); QImage img2 = imdisplay.scaled(400, 1000, Qt::KeepAspectRatio); ui.LImageCell4->setPixmap(QPixmap::fromImage(imdisplay)); ui.TB4->setText(StringToQString(CWindows::getNLineFromFile("SCRIPTS//Classifier//NVF_Training.txt", indexImageSign))); } } void OCR::createCombinationMoments() { vImageSign.clear(); vector<string> vImage = CWindows::getListFileFrom("digits//"); for each(string var in vImage) vImageSign.push_back(imread("digits//" + var, 0)); for (int without = 0; without < 31; without++) { int* label = new int[vImageSign.size()]; float** data = new float*[vImageSign.size()]; for (int i = 0; i < vImageSign.size(); i++) data[i] = countMoment(vImageSign[i], without); for (int i = 0; i < vImageSign.size(); i++) label[i] = atoi(vImage[i].substr(vImage[i].size() - 5, vImage[i].size() - 4).c_str()); CWindows::saveVectorToFile(label, data, "SCRIPTS//Data//NVF_Training" + itos(without) + ".txt" , vImageSign.size(), 1); GenerationSkryptLibsvm(); vImage.clear(); } SegmentationIncreaseIndexImageSign(); } float* OCR::countMoment(Mat image, int without) { float* trainingData = new float[30]; double hu[7]; int i = 0; Moments m = moments(image); HuMoments(m, hu); if(without != i) trainingData[i] = m.m00; i++; if (without != i) trainingData[i] = m.m10; i++; if (without != i) trainingData[i] = m.m01; i++; if (without != i) trainingData[i] = m.m20; i++; if (without != i) trainingData[i] = m.m11; i++; if (without != i) trainingData[i] = m.m02; i++; if (without != i) trainingData[i] = m.m30; i++; if (without != i) trainingData[i] = m.m21; i++; if (without != i) trainingData[i] = m.m12; i++; if (without != i) trainingData[i] = m.m03; i++; if (without != i) trainingData[i] = m.mu20; i++; if (without != i) trainingData[i] = m.mu11; i++; if (without != i) trainingData[i] = m.mu02; i++; if (without != i) trainingData[i] = m.mu30; i++; if (without != i) trainingData[i] = m.mu21; i++; if (without != i) trainingData[i] = m.mu12; i++; if (without != i) trainingData[i] = m.mu03; i++; if (without != i) trainingData[i] = m.nu20; i++; if (without != i) trainingData[i] = m.nu11; i++; if (without != i) trainingData[i] = m.nu02; i++; if (without != i) trainingData[i] = m.nu30; i++; if (without != i) trainingData[i] = m.nu21; i++; if (without != i) trainingData[i] = m.nu12; i++; if (without != i) trainingData[i] = m.nu03; i++; if (without != i) trainingData[i] = hu[0]; i++; if (without != i) trainingData[i] = hu[1]; i++; if (without != i) trainingData[i] = hu[2]; i++; if (without != i) trainingData[i] = hu[3]; i++; if (without != i) trainingData[i] = hu[4]; i++; if (without != i) trainingData[i] = hu[5]; i++; if (without != i) trainingData[i] = hu[6]; i++; return trainingData; } void OCR::MomentsLoadImage() { //createCombinationMoments(); vImageSign.clear(); vector<string> vImage = CWindows::getListFileFrom("digits//"); for each(string var in vImage) vImageSign.push_back(imread("digits//" + var, 0)); int* label = new int[vImageSign.size()]; float** data = new float*[vImageSign.size()]; for (int i = 0; i < vImageSign.size(); i++) data[i] = countMoment(vImageSign[i]); for (int i = 0; i < vImageSign.size(); i++) label[i] = atoi(vImage[i].substr(vImage[i].size()-5, vImage[i].size()-4).c_str()); CWindows::saveVectorToFile(label, data, "SCRIPTS//Classifier//NVF_Training.txt", vImageSign.size(), 1); GenerationSkryptLibsvm(); vImage.clear(); SegmentationIncreaseIndexImageSign(); } void OCR::GenerationSkryptLibsvm() { /* Path to main dictionary */ const string PATH_SCRIPTS = "SCRIPTS\\"; const string PATH_SET = "SET\\"; const string PATH_ALL_PLATE = PATH_SET + "NLP\\"; const string PATH_CAM_PLATE = PATH_SET + "NLP_Camera\\"; /* Path to dictionary libsvm */ const string PATH_LIBSVM = PATH_SCRIPTS + "libsvm\\"; const string PATH_CLASSIFIER = PATH_SCRIPTS + "Classifier\\"; /* Path to dictionary training data */ const string PATH_TRAINING = PATH_SET + "Training\\"; /* Path to dictionary test data */ const string PATH_SET_ONE = PATH_SET + "Test_I\\"; const string PATH_SET_TWO = PATH_SET + "Test_II\\"; /* FILE TO SAVE ANSWER CLASSIFIER */ const string RESULT_FILE = PATH_CLASSIFIER + "Result.txt"; /* PATH FILE TO TRAINING AND CALASSIFICATION */ const string PATH_VF_TRAINING = PATH_CLASSIFIER + "VF_Training.txt"; const string PATH_VF_TEST_I = PATH_CLASSIFIER + "VF_Test_I.txt"; const string PATH_VF_TEST_II = PATH_CLASSIFIER + "VF_Test_II.txt"; const string PATH_NVF_TRAINING = PATH_CLASSIFIER + "NVF_Training.txt"; const string PATH_NVF_TEST_I = PATH_CLASSIFIER + "NVF_Test_I.txt"; const string PATH_NVF_TEST_II = PATH_CLASSIFIER + "NVF_Test_II.txt"; /* NAME NEED FILE TO TRAINING AND CALASSIFICATION */ const string VF_TRAINING = "VF_Training.txt"; const string VF_TEST_I = "VF_Test_I.txt"; const string VF_TEST_II = "VF_Test_II.txt"; const string NVF_TRAINING = "NVF_Training.txt"; const string NVF_TEST_I = "NVF_Test_I.txt"; const string NVF_TEST_II = "NVF_Test_II.txt"; /* PATH MODEL FILE TO PREDICT */ const string PATH_MODEL_LINEAR = PATH_CLASSIFIER + "Model_Linear.model"; const string PATH_MODEL_RBF = PATH_CLASSIFIER + "Model_RBF"; /* MODEL FILE TO PREDICT */ const string MODEL_LINEAR = "Model_Linear.model"; const string MODEL_RBF = "Model_RBF"; /* Name skripts to find best parameters (grid search) */ const string GS_LINEAR = PATH_SCRIPTS + "GS_Linear.bat"; const string GS_RBF = PATH_SCRIPTS + "GS_RBF.bat"; /* CREAETE GRID SEARCH */ //Linear CWindows::createFile(GS_LINEAR); CWindows::insertToFile(GS_LINEAR, "@echo OFF"); CWindows::insertToFile(GS_LINEAR, "SET \"svm=0\""); CWindows::insertToFile(GS_LINEAR, "SET \"kernel=0\""); for (int c = 1; c < 10000; c *= 2) { CWindows::insertToFile(GS_LINEAR, "..\\" + PATH_LIBSVM + "svm-train.exe -s %svm% -t %kernel% -c " + itos(c) + " -q ..\\" + PATH_NVF_TRAINING + " ..\\" + PATH_MODEL_LINEAR); CWindows::insertToFile(GS_LINEAR, "..\\" + PATH_LIBSVM + "svm-train.exe -s %svm% -t %kernel% -c " + itos(c) + " -v 5 -q ..\\" + PATH_NVF_TRAINING + " ..\\" + PATH_MODEL_LINEAR + " >> LinearResult.txt"); CWindows::insertToFile(GS_LINEAR, "echo Kernel = Linear, Test = I, C = " + itos(c) + ": >> LinearResult.txt"); CWindows::insertToFile(GS_LINEAR, "..\\" + PATH_LIBSVM + "svm-predict.exe ..\\" + PATH_NVF_TEST_I + " ..\\" + PATH_MODEL_LINEAR + " ..\\" + RESULT_FILE + " >> LinearResult.txt"); } //RBF CWindows::createFile(GS_RBF); CWindows::insertToFile(GS_RBF, "@echo OFF"); CWindows::insertToFile(GS_RBF, "SET \"svm=0\""); CWindows::insertToFile(GS_RBF, "SET \"kernel=2\""); for (int c = 1; c < 10000; c *= 2) { for (double g = 0.001953125; g < 10; g *= 2) { CWindows::insertToFile(GS_RBF, "..\\" + PATH_LIBSVM + "svm-train.exe -s %svm% -t %kernel% -c " + itos(c) + " -g " + itos(g) + " -q ..\\" + PATH_NVF_TRAINING + " ..\\" + PATH_MODEL_RBF); CWindows::insertToFile(GS_RBF, "..\\" + PATH_LIBSVM + "svm-train.exe -s %svm% -t %kernel% -c " + itos(c) + " -g " + itos(g) + " -v 5 -q ..\\" + PATH_NVF_TRAINING + " ..\\" + PATH_MODEL_RBF + " >>RBFResult.txt"); CWindows::insertToFile(GS_RBF, "echo Kernel = RBF, Test = I, C = " + itos(c) + ", g = " + itos(g) + ": >> RBFResult.txt"); CWindows::insertToFile(GS_RBF, "..\\" + PATH_LIBSVM + "svm-predict.exe ..\\" + PATH_NVF_TEST_I + " ..\\" + PATH_MODEL_RBF + " ..\\" + RESULT_FILE + " >> RBFResult.txt"); } } /* END CREAETE GRID SEARCH */ } float* OCR::countMoment(Mat image) { //vector<float>* trainingData = new vector<float>(); float* trainingData = new float[31]; double hu[7]; Moments m = moments(image); HuMoments(m, hu); trainingData[0]=m.m00; trainingData[1]=m.m10; trainingData[2]=m.m01; trainingData[3]=m.m20; trainingData[4]=m.m11; trainingData[5]=m.m02; trainingData[6]=m.m30; trainingData[7]=m.m21; trainingData[8]=m.m12; trainingData[9]=m.m03; trainingData[10]=m.mu20; trainingData[11]=m.mu11; trainingData[12]=m.mu02; trainingData[13]=m.mu30; trainingData[14]=m.mu21; trainingData[15]=m.mu12; trainingData[16]=m.mu03; trainingData[17]=m.nu20; trainingData[18]=m.nu11; trainingData[19]=m.nu02; trainingData[20]=m.nu30; trainingData[21]=m.nu21; trainingData[22]=m.nu12; trainingData[23]=m.nu03; trainingData[24]=hu[0]; trainingData[25]=hu[1]; trainingData[26]=hu[2]; trainingData[27]=hu[3]; trainingData[28]=hu[4]; trainingData[29]=hu[5]; trainingData[30]=hu[6]; return trainingData; } void OCR::saveEffect() { //Nazewnictwo znaków digit0_<user>_<probka> //<user> = {0..20} //<probka> = {0..9} /* images ~ it's whole image */ /* vImageSignRow ~ it's row image */ /* vImageSignCell ~ it's cell image */ vector<Mat> images; vector<string> vSImages = CWindows::getListFileFrom("digit//"); for each (string var in vSImages) images.push_back(imread("digit//" + var, 0)); int digit = 0; int user = 0; int sample = 0; string fileName; for each (Mat im in images) { this->imageSign = im.clone(); this->imageSignO = im.clone(); preProcessing(); digit = 0; for each (Mat imRow in vImageSignRow) { SegmentationCell(imRow); sample = 0; for each (Mat imCell in vImageSignCell) { fileName = "digits//digit" + (itos(user)) + "_" + (itos(digit)) + "_" + (itos(sample)) + ".jpg"; imwrite(fileName, imCell); sample++; } digit++; } user++; } vSImages.clear(); MomentsLoadImage(); } #pragma endregion Segmentation
[ "krzysztof.kozubek135@gmail.com" ]
krzysztof.kozubek135@gmail.com
66d0e04ab16c891030ee5ff8409aea5717962dd0
b4b4e324cbc6159a02597aa66f52cb8e1bc43bc1
/C++ code/Uva Online Judge/Q1339(2).cpp
ff6cf316865b0b651125504f325c2aeb0d2f981b
[]
no_license
fsps60312/old-C-code
5d0ffa0796dde5ab04c839e1dc786267b67de902
b4be562c873afe9eacb45ab14f61c15b7115fc07
refs/heads/master
2022-11-30T10:55:25.587197
2017-06-03T16:23:03
2017-06-03T16:23:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
436
cpp
#include<cstdio> #include<algorithm> using namespace std; bool c1[26],c2[26]; char s1[101],s2[101]; bool isans() { for(int i=0;i<26;i++)c1[i]=c2[i]=0; for(int i=0;s1[i];i++)c1[s1[i]-'A']++,c2[s2[i]-'A']++; sort(c1,c1+26); sort(c2,c2+26); for(int i=0;i<26;i++) { if(c1[i]!=c2[i])return false; } return true; } int main() { while(scanf("%s%s",s1,s2)==2) { if(isans())printf("YES\n"); else printf("NO\n"); } return 0; }
[ "fsps60312@yahoo.com.tw" ]
fsps60312@yahoo.com.tw
20a7f3663292cb3b9ec0abe614baad9ec6924ddd
d0fb46aecc3b69983e7f6244331a81dff42d9595
/live/include/alibabacloud/live/model/LeaveMessageGroupResult.h
190ff8aca87f2d2eda610cc438ded332b9adb2e3
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-cpp-sdk
3d8d051d44ad00753a429817dd03957614c0c66a
e862bd03c844bcb7ccaa90571bceaa2802c7f135
refs/heads/master
2023-08-29T11:54:00.525102
2023-08-29T03:32:48
2023-08-29T03:32:48
115,379,460
104
82
NOASSERTION
2023-09-14T06:13:33
2017-12-26T02:53:27
C++
UTF-8
C++
false
false
1,431
h
/* * Copyright 2009-2017 Alibaba Cloud All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ALIBABACLOUD_LIVE_MODEL_LEAVEMESSAGEGROUPRESULT_H_ #define ALIBABACLOUD_LIVE_MODEL_LEAVEMESSAGEGROUPRESULT_H_ #include <string> #include <vector> #include <utility> #include <alibabacloud/core/ServiceResult.h> #include <alibabacloud/live/LiveExport.h> namespace AlibabaCloud { namespace Live { namespace Model { class ALIBABACLOUD_LIVE_EXPORT LeaveMessageGroupResult : public ServiceResult { public: struct Result { bool success; }; LeaveMessageGroupResult(); explicit LeaveMessageGroupResult(const std::string &payload); ~LeaveMessageGroupResult(); Result getResult()const; protected: void parse(const std::string &payload); private: Result result_; }; } } } #endif // !ALIBABACLOUD_LIVE_MODEL_LEAVEMESSAGEGROUPRESULT_H_
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3c2a50005d6dc313f6f7d019532054e6c50455a8
91015480741ec59dda36712d71e7e6f0704bc516
/mindspore/core/ops/erf.cc
6430607eea2dbe8a34f2a21c5325097c1da41b8c
[ "Apache-2.0", "Libpng", "LGPL-3.0-only", "AGPL-3.0-only", "MPL-1.1", "BSD-3-Clause-Open-MPI", "LicenseRef-scancode-mit-nagy", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-python-cwi", "LGPL-2.1-only", "OpenSSL", "LicenseRef-scanco...
permissive
Ming-blue/mindspore
b5dfa6af7876b00163ccfa2e18512678026c232b
9ec8bc233c76c9903a2f7be5dfc134992e4bf757
refs/heads/master
2023-06-23T23:35:38.143983
2021-07-14T07:36:40
2021-07-14T07:36:40
286,421,966
1
0
Apache-2.0
2020-08-10T08:41:45
2020-08-10T08:41:45
null
UTF-8
C++
false
false
771
cc
/** * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <memory> #include "ops/erf.h" namespace mindspore { namespace ops { REGISTER_PRIMITIVE_C(kNameErf, Erf); } // namespace ops } // namespace mindspore
[ "liuyu195@huawei.com" ]
liuyu195@huawei.com
21bcaccc9962c134cf25a8167bb2cbaa42edc511
ac0bdcf8c0d0d36b1478af9740ced62c3fb952d0
/mqtt-JSON/mqtt-JSON.ino
ff49a73a1c6d5870ac9c1608109d020d5b25b7c4
[]
no_license
hamote505/ESP8266-FastLED
9c18119f5507f11dd42e57e7e5cf4108d1ea3e6d
53e388d76c36380bad9b4af864cf44c5c97ef3eb
refs/heads/master
2022-04-22T06:05:55.021364
2020-04-04T12:58:36
2020-04-04T12:58:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,226
ino
/* * File: mqtt-JSON.ino * * By: Andrew Tuline * * Date: July, 2019 * * This program demonstrates using non-blocking MQTT JSON messaging to blink the internal LED of an ESP8266 based WeMOS D1 Mini. * * The Android client is an application called 'IoT MQTT Panel'. There's a Pro version which I ended up buying. * * * * Tested working configurations include: * * 1) ESP8266 running PubSubclient DHCP'ed to my home network, cloudMQTT.com as the broker and IoT MQTT Panel as the publisher/client on my Android. * 2) ESP8266 running PubSubClient DHCP'ed to my home network, MQTT Broker App on my Android and IoT MQTT Panel as the publisher/client on my Android. * 3) ESP8266 running PubSubClient DHCP'ed to my home network, Mosquitto running on my Windows workstation and IoT MQTT Panel as the publisher/client on my Android. Only works when I'm at home. * 4) ESP8266 running PubSubClient DHCP'ed to my tethered Android (as 192.168.43.1), MQTT Broker App on my Android and IoT MQTT Panel as the publisher/client on my Android. * * * Topic Prefix: JSON/ * * Topic Function Widget Topic Value(s) Description * -------------- ------ ----- ------- --------------------------- * * Toggle LED Switch LED1 0, 1 Turn the internal LED off an don * Kist a test Button JSON1 JSON data Just transmit a JSON string to be de-serialized by the ESP8266. * * */ #include <ESP8266WiFi.h> // Should be included when you install the ESP8266. #include <PubSubClient.h> // https://github.com/knolleary/pubsubclient #include <ArduinoJson.h> // https://github.com/bblanchon/ArduinoJson // WiFi Authentication ------------------------------------------------------------------------- const char* ssid = "SM-G965W4004"; // WiFi configuration for Android tethering network. The Android IP address is hard coded at 192.168.43.1. const char* password = "afng2036"; // MQTT Authentication ------------------------------------------------------------------------- // My Phone as a tethered device (working) // MQTT Broker application on Android credentials - using the Android tethered WiFi. const char* mqttServer = "192.168.43.1"; const int mqttPort = 1883; const char* mqttUser = "wmabzsy"; const char* mqttPassword = "GT8Do3vkgWP5"; const char* mqttID ="12"; // Must be UNIQUE for EVERY display!!! const char *prefixtopic = "JSON/"; const char *subscribetopic[] = {"LED1", "JSON1"}; // Topics that we will subscribe to. char message_buff[100]; WiFiClient espClient; PubSubClient client(espClient); void setup() { Serial.begin(115200); pinMode(BUILTIN_LED, OUTPUT); client.setServer(mqttServer, mqttPort); // Initialize MQTT service. Just once is required. client.setCallback(callback); // Define the callback service to check with the server. Just once is required. } // setup() void loop() { networking(); } // loop() void callback(char *topic, byte *payload, unsigned int length) { StaticJsonDocument<256> doc; // Allocate memory for the doc array. deserializeJson(doc, payload, length); // Convert JSON string to something useable. Serial.print("Message arrived: ["); Serial.print(topic); Serial.println("]"); // Prints out anything that's arrived from broker and from the topic that we've subscribed to. int i; for (i = 0; i < length; i++) message_buff[i] = payload[i]; message_buff[i] = '\0'; // We copy payload to message_buff because we can't make a string out of payload. String msgString = String(message_buff); // Finally, converting our payload to a string so we can compare it. // Serial.print("Message: "); Serial.println(msgString); if (strcmp(topic, "JSON/LED1") == 0) { // Returns 0 if the strings are equal, so we have received our topic. if (msgString == "1") { // Payload of our topic is '1', so we'll turn on the LED. digitalWrite(BUILTIN_LED, LOW); // PIN HIGH will switch ON the relay } if (msgString == "0") { // Payload of our topic is '0', so we'll turn off the LED. digitalWrite(BUILTIN_LED, HIGH); // PIN LOW will switch OFF the relay } } // if LED1 if (strcmp(topic, "JSON/JSON1") == 0) { // Returns 0 if the strings are equal, so we have received our topic. const char *name = doc["name"]; Serial.print("name: "); Serial.println(name); uint16_t age = doc["age"]; Serial.print("age: "); Serial.println(age); const char *city = doc["city"]; Serial.print("city: "); Serial.println(city); } // if JSON/JSON1 } // callback() void networking() { // Asynchronous network connect routine with MQTT connect and re-connect. The trick is to make it re-connect when something breaks. static long lastReconnectAttempt = 0; static bool wifistart = false; // State variables for asynchronous wifi & mqtt connection. static bool wificonn = false; if (wifistart == false) { WiFi.begin(ssid, password); // Initialize WiFi on the ESP8266. We don't care about actual status. wifistart = true; } if (WiFi.status() == WL_CONNECTED && wificonn == false) { Serial.print("IP address:\t"); Serial.println(WiFi.localIP()); // This should just print once. wificonn = true; } if (WiFi.status() != WL_CONNECTED) wificonn = false; // Toast the connection if we've lost it. if (!client.connected() && WiFi.status() == WL_CONNECTED) { // Non-blocking re-connect to the broker. This was challenging. if (millis() - lastReconnectAttempt > 5000) { lastReconnectAttempt = millis(); if (reconnect()) { // Attempt to reconnect. lastReconnectAttempt = 0; } } } else { client.loop(); } } // networking() boolean reconnect() { // Here is where we actually connect/re-connect to the MQTT broker and subscribe to our topics. if (client.connect(mqttID, mqttUser, mqttPassword )) { Serial.println("MQTT connected."); // client.publish("LED1", "Hello from ESP8266!"); // Sends topic and payload to the MQTT broker. for (int i = 0; i < (sizeof(subscribetopic)/sizeof(int)); i++) { // Subscribes to list of topics from the MQTT broker. This whole loop is well above my pay grade. String mypref = prefixtopic; // But first, we need to get our prefix. mypref.concat(subscribetopic[i]); // Concatenate prefix and the topic together with a little bit of pfm. client.subscribe((char *) mypref.c_str()); // Now, let's subscribe to that concatenated and converted mess. Serial.println(mypref); // Let's print out each subscribed topic, just to be safe. } } // if client.connected() return client.connected(); } // reconnect()
[ "atuline@gmail.com" ]
atuline@gmail.com
55664be57b2b22ec6477df1d9bb15ab244b1ab69
0bc7b397335dc5621a7ec9f27d9f283faa05d7e2
/ASTNodes/ASTIntegerNode.h
9f5720325cc797b1a515ef9f134cff9e5cc5a932
[]
no_license
University-Code-Projects/CPS-2000-Compiler-Theory-2
d7653b41f41a2a3a39895b90ae39f07b8161c09e
7c47f867c1f25603a7370fe039e2f100eab93eac
refs/heads/master
2020-03-21T13:58:47.104729
2016-05-20T19:10:07
2016-05-20T19:10:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
425
h
// // Created by cps200x on 5/12/16. // #ifndef ASSIGNMENT_5_ASTINTEGERNODE_H #define ASSIGNMENT_5_ASTINTEGERNODE_H #include "ASTExpressionNode.h" class ASTIntegerNode : public ASTExpressionNode{ public: int value; ASTIntegerNode(int num){ value = num; } virtual ~ASTIntegerNode(){} virtual void Accept(Visitor *v){ v->visit(this); } }; #endif //ASSIGNMENT_5_ASTINTEGERNODE_H
[ "jonathanborg1996@gmail.com" ]
jonathanborg1996@gmail.com
6999c8244776769f755fbb47bbdf3da94860b561
b2a53f7a14ff97c45634d59c82d5fe59a3abb310
/uiservicetab/vimpstengine/tsrc/vimpstengine_ut/inc/t_vimpstenginerequest.h
40c3160b1feb2c70735cc06b0aaa3e1b173ffc52
[]
no_license
SymbianSource/oss.FCL.sf.app.conversations
faf84f8ad33f2a39618339df2539a40f8fefb676
6bd308a746e80ed6d8a87acc123d163873ece9af
refs/heads/master
2021-01-09T20:56:28.513888
2010-06-24T17:07:00
2010-06-24T17:07:00
65,732,546
0
0
null
null
null
null
UTF-8
C++
false
false
1,169
h
/* * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: t_vimpstenginerequest.h * */ #ifndef _T_VIMPSTEngineRequest_H_ #define _T_VIMPSTEngineRequest_H_ // EXTERNAL INCLUDES #include <CEUnitTestSuiteClass.h> #include "cvimpstenginerequest.h" //Forward declarations class CVIMPSTEngineRequest; class T_VIMPSTEngineRequest : public CEUnitTestSuiteClass { public: static T_VIMPSTEngineRequest* NewLC(); ~T_VIMPSTEngineRequest(); private: void ConstructL(); void SetupL(); void Teardown(); void TestAllFunctionsL(); private: T_VIMPSTEngineRequest() {}; private: CVIMPSTEngineRequest* iRequest; EUNIT_DECLARE_TEST_TABLE; }; #endif // _T_CSCPUtility_H_ // end of file
[ "kirill.dremov@nokia.com" ]
kirill.dremov@nokia.com
ceedb8fe04634407117876809856c061d5fabed2
f29d89b8f15fae5000a681cf5e4d544ebd0dfff3
/Reazi/src/Reazi/Layer.h
da0bd77b7b05ed82baf0b578c89ab7381fab0844
[]
no_license
PassWorld44/Reazi
74bd1782f2b9a9e6f0d7f296eccaa40b680aa2b7
0dcddc6c767d6ca4207a664d7e5eeee38d66b96a
refs/heads/master
2023-03-08T17:49:29.139521
2021-02-27T11:56:03
2021-02-27T11:56:03
265,594,844
1
0
null
null
null
null
UTF-8
C++
false
false
460
h
#pragma once #include "rzpch.h" #include "Reazi/Core.h" #include "Reazi/events/Event.h" #include <string> namespace Reazi { class REAZI_API Layer { public: Layer(const std::string& name = "Layer"); virtual ~Layer(); virtual void onAttach() {} virtual void onDetach() {} virtual void onUpdate() {} virtual void onEvent(Event& e) {} inline const std::string& getName() { return m_debugName; } protected: std::string m_debugName; }; }
[ "emile.bondu@gmail.com" ]
emile.bondu@gmail.com