hexsha
stringlengths
40
40
size
int64
7
1.05M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
269
max_stars_repo_name
stringlengths
5
109
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
sequencelengths
1
9
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
269
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
sequencelengths
1
9
max_issues_count
int64
1
48.5k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
269
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
sequencelengths
1
9
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
7
1.05M
avg_line_length
float64
1.21
330k
max_line_length
int64
6
990k
alphanum_fraction
float64
0.01
0.99
author_id
stringlengths
2
40
02ce4870a09d197ce3e39c6df8148ffd464344a3
92,211
cpp
C++
dev/Code/CryEngine/CrySoundSystem/implementations/CryAudioImplWwise/AudioSystemImpl_wwise.cpp
raghnarx/lumberyard
1c52b941dcb7d94341fcf21275fe71ff67173ada
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Code/CryEngine/CrySoundSystem/implementations/CryAudioImplWwise/AudioSystemImpl_wwise.cpp
29e7e280-0d1c-4bba-98fe-f7cd3ca7500a/lumberyard
1c52b941dcb7d94341fcf21275fe71ff67173ada
[ "AML" ]
null
null
null
dev/Code/CryEngine/CrySoundSystem/implementations/CryAudioImplWwise/AudioSystemImpl_wwise.cpp
29e7e280-0d1c-4bba-98fe-f7cd3ca7500a/lumberyard
1c52b941dcb7d94341fcf21275fe71ff67173ada
[ "AML" ]
4
2019-08-05T07:25:46.000Z
2020-12-07T05:12:55.000Z
/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ // Original file Copyright Crytek GMBH or its affiliates, used under license. #include "StdAfx.h" #include "AudioSystemImpl_wwise.h" #include <AzCore/std/containers/set.h> #include <IAudioSystem.h> #include <AudioSourceManager.h> #include <AudioSystemImplCVars.h> #include <Common_wwise.h> #include <FileIOHandler_wwise.h> #include <AK/SoundEngine/Common/AkSoundEngine.h> // Sound engine #include <AK/MusicEngine/Common/AkMusicEngine.h> // Music Engine #include <AK/SoundEngine/Common/AkMemoryMgr.h> // Memory Manager #include <AK/SoundEngine/Common/AkModule.h> // Default memory and stream managers #include <PluginRegistration_wwise.h> // Registration of default set of plugins, customize this header to your needs. #if defined(AZ_RESTRICTED_PLATFORM) #undef AZ_RESTRICTED_SECTION #define AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_1 1 #define AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_2 2 #define AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_3 3 #define AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_4 4 #endif #if !defined(WWISE_FOR_RELEASE) #include <AK/Comm/AkCommunication.h> // Communication between Wwise and the game (excluded in release build) #include <AK/Tools/Common/AkMonitorError.h> #include <AK/Tools/Common/AkPlatformFuncs.h> #endif // WWISE_FOR_RELEASE #if defined(AK_MAX_AUX_PER_OBJ) #define LY_MAX_AUX_PER_OBJ AK_MAX_AUX_PER_OBJ #else #define LY_MAX_AUX_PER_OBJ (4) #endif ///////////////////////////////////////////////////////////////////////////////// // MEMORY HOOKS SETUP // // ##### IMPORTANT ##### // // These custom alloc/free functions are declared as "extern" in AkMemoryMgr.h // and MUST be defined by the game developer. ///////////////////////////////////////////////////////////////////////////////// namespace AK { void* AllocHook(size_t in_size) { return azmalloc(in_size, AUDIO_MEMORY_ALIGNMENT, Audio::AudioImplAllocator, "AudioWwise"); } void FreeHook(void* in_ptr) { azfree(in_ptr, Audio::AudioImplAllocator); } void* VirtualAllocHook(void* in_pMemAddress, size_t in_size, DWORD in_dwAllocationType, DWORD in_dwProtect) { //return VirtualAlloc(in_pMemAddress, in_size, in_dwAllocationType, in_dwProtect); return azmalloc(in_size, AUDIO_MEMORY_ALIGNMENT, Audio::AudioImplAllocator, "AudioWwise"); } void VirtualFreeHook(void* in_pMemAddress, size_t in_size, DWORD in_dwFreeType) { //VirtualFree(in_pMemAddress, in_size, in_dwFreeType); azfree(in_pMemAddress, Audio::AudioImplAllocator); } #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_1 #if defined(AZ_PLATFORM_XENIA) #include "Xenia/AudioSystemImpl_wwise_cpp_xenia.inl" #elif defined(AZ_PLATFORM_PROVO) #include "Provo/AudioSystemImpl_wwise_cpp_provo.inl" #endif #endif } namespace Audio { const char* const CAudioSystemImpl_wwise::sWwiseImplSubPath = "wwise/"; const char* const CAudioSystemImpl_wwise::sWwiseEventTag = "WwiseEvent"; const char* const CAudioSystemImpl_wwise::sWwiseRtpcTag = "WwiseRtpc"; const char* const CAudioSystemImpl_wwise::sWwiseSwitchTag = "WwiseSwitch"; const char* const CAudioSystemImpl_wwise::sWwiseStateTag = "WwiseState"; const char* const CAudioSystemImpl_wwise::sWwiseRtpcSwitchTag = "WwiseRtpc"; const char* const CAudioSystemImpl_wwise::sWwiseFileTag = "WwiseFile"; const char* const CAudioSystemImpl_wwise::sWwiseAuxBusTag = "WwiseAuxBus"; const char* const CAudioSystemImpl_wwise::sWwiseValueTag = "WwiseValue"; const char* const CAudioSystemImpl_wwise::sWwiseNameAttribute = "wwise_name"; const char* const CAudioSystemImpl_wwise::sWwiseValueAttribute = "wwise_value"; const char* const CAudioSystemImpl_wwise::sWwiseMutiplierAttribute = "atl_mult"; const char* const CAudioSystemImpl_wwise::sWwiseShiftAttribute = "atl_shift"; const char* const CAudioSystemImpl_wwise::sWwiseLocalisedAttribute = "wwise_localised"; const char* const CAudioSystemImpl_wwise::sWwiseGlobalAudioObjectName = "LY-GlobalAudioObject"; const float CAudioSystemImpl_wwise::sObstructionOcclusionMin = 0.0f; const float CAudioSystemImpl_wwise::sObstructionOcclusionMax = 1.0f; /////////////////////////////////////////////////////////////////////////////////////////////////// // AK callbacks void WwiseEventCallback(AkCallbackType eType, AkCallbackInfo* pCallbackInfo) { if (eType == AK_EndOfEvent) { auto const pEventData = static_cast<SATLEventData_wwise*>(pCallbackInfo->pCookie); if (pEventData) { SAudioRequest oRequest; SAudioCallbackManagerRequestData<eACMRT_REPORT_FINISHED_EVENT> oRequestData(pEventData->nATLID, true); oRequest.nFlags = eARF_THREAD_SAFE_PUSH; oRequest.pData = &oRequestData; AudioSystemThreadSafeRequestBus::Broadcast(&AudioSystemThreadSafeRequestBus::Events::PushRequestThreadSafe, oRequest); if (pEventData->nSourceId != INVALID_AUDIO_SOURCE_ID) { AkPlayingID playingId = AudioSourceManager::Get().FindPlayingSource(pEventData->nSourceId); AudioSourceManager::Get().DeactivateSource(playingId); } } } else if (eType == AK_Duration) { auto durationInfo = static_cast<AkDurationCallbackInfo*>(pCallbackInfo); auto const eventData = static_cast<SATLEventData_wwise*>(pCallbackInfo->pCookie); if (durationInfo && eventData) { AudioTriggerNotificationBus::QueueEvent(eventData->m_triggerId, &AudioTriggerNotificationBus::Events::ReportDurationInfo, eventData->nATLID, durationInfo->fDuration, durationInfo->fEstimatedDuration); } } } static bool audioDeviceInitializationEvent = false; void AudioDeviceCallback( AK::IAkGlobalPluginContext* context, AkUniqueID audioDeviceSharesetId, AkUInt32 deviceId, AK::AkAudioDeviceEvent deviceEvent, AKRESULT inAkResult ) { if (deviceEvent == AK::AkAudioDeviceEvent_Initialization) { audioDeviceInitializationEvent = true; } } /////////////////////////////////////////////////////////////////////////////////////////////////// void PrepareEventCallback( AkUniqueID nAkEventID, const void* pBankPtr, AKRESULT eLoadResult, AkMemPoolId nMenmPoolID, void* pCookie) { auto const pEventData = static_cast<SATLEventData_wwise*>(pCookie); if (pEventData) { pEventData->nAKID = nAkEventID; SAudioRequest oRequest; SAudioCallbackManagerRequestData<eACMRT_REPORT_FINISHED_EVENT> oRequestData(pEventData->nATLID, eLoadResult == AK_Success); oRequest.nFlags = eARF_THREAD_SAFE_PUSH; oRequest.pData = &oRequestData; AudioSystemThreadSafeRequestBus::Broadcast(&AudioSystemThreadSafeRequestBus::Events::PushRequestThreadSafe, oRequest); } } /////////////////////////////////////////////////////////////////////////////////////////////////// #if !defined(WWISE_FOR_RELEASE) static void ErrorMonitorCallback( AK::Monitor::ErrorCode in_eErrorCode, ///< Error code number value const AkOSChar* in_pszError, ///< Message or error string to be displayed AK::Monitor::ErrorLevel in_eErrorLevel, ///< Specifies whether it should be displayed as a message or an error AkPlayingID in_playingID, ///< Related Playing ID if applicable, AK_INVALID_PLAYING_ID otherwise AkGameObjectID in_gameObjID ///< Related Game Object ID if applicable, AK_INVALID_GAME_OBJECT otherwise ) { char* sTemp = nullptr; CONVERT_OSCHAR_TO_CHAR(in_pszError, sTemp); g_audioImplLogger_wwise.Log( ((in_eErrorLevel & AK::Monitor::ErrorLevel_Error) != 0) ? eALT_ERROR : eALT_COMMENT, "<Wwise> %s ErrorCode: %d PlayingID: %u GameObjID: %" PRISIZE_T, sTemp, in_eErrorCode, in_playingID, in_gameObjID); } #endif // WWISE_FOR_RELEASE static int GetAssetType(const SATLSourceData* sourceData) { if (!sourceData) { return eAAT_NONE; } return sourceData->m_sourceInfo.m_codecType == eACT_STREAM_PCM ? eAAT_STREAM : eAAT_SOURCE; } static int GetAkCodecID(EAudioCodecType codecType) { switch (codecType) { case eACT_AAC: return AKCODECID_AAC; case eACT_ADPCM: return AKCODECID_ADPCM; case eACT_PCM: return AKCODECID_PCM; case eACT_VORBIS: return AKCODECID_VORBIS; case eACT_XMA: return AKCODECID_XMA; case eACT_XWMA: return AKCODECID_XWMA; case eACT_STREAM_PCM: default: AZ_Assert(codecType, "Codec not supported"); return AKCODECID_VORBIS; } } /////////////////////////////////////////////////////////////////////////////////////////////////// CAudioSystemImpl_wwise::CAudioSystemImpl_wwise() : m_globalGameObjectID(static_cast<AkGameObjectID>(GLOBAL_AUDIO_OBJECT_ID)) , m_defaultListenerGameObjectID(AK_INVALID_GAME_OBJECT) , m_nInitBankID(AK_INVALID_BANK_ID) #if !defined(WWISE_FOR_RELEASE) , m_bCommSystemInitialized(false) #endif // !WWISE_FOR_RELEASE { m_sRegularSoundBankFolder = WWISE_IMPL_BANK_FULL_PATH; m_sLocalizedSoundBankFolder = m_sRegularSoundBankFolder; #if defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) m_fullImplString = AZStd::string::format("%s (%s)", WWISE_IMPL_VERSION_STRING, m_sRegularSoundBankFolder.c_str()); #endif // INCLUDE_WWISE_IMPL_PRODUCTION_CODE AudioSystemImplementationRequestBus::Handler::BusConnect(); AudioSystemImplementationNotificationBus::Handler::BusConnect(); } /////////////////////////////////////////////////////////////////////////////////////////////////// CAudioSystemImpl_wwise::~CAudioSystemImpl_wwise() { AudioSystemImplementationRequestBus::Handler::BusDisconnect(); AudioSystemImplementationNotificationBus::Handler::BusDisconnect(); } /////////////////////////////////////////////////////////////////////////////////////////////////// // AZ::Component /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::Init() { } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::Activate() { } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::Deactivate() { } /////////////////////////////////////////////////////////////////////////////////////////////////// // AudioSystemImplementationNotificationBus /////////////////////////////////////////////////////////////////////////////////////////////////// #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_4 #if defined(AZ_PLATFORM_XENIA) #include "Xenia/AudioSystemImpl_wwise_cpp_xenia.inl" #elif defined(AZ_PLATFORM_PROVO) #include "Provo/AudioSystemImpl_wwise_cpp_provo.inl" #endif #elif !defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) #define AUDIOSYSTEMIMPL_WWISE_CPP_TRAIT_USE_SUSPEND #elif defined(AZ_PLATFORM_ANDROID) || defined(AZ_PLATFORM_APPLE_IOS) #define AUDIOSYSTEMIMPL_WWISE_CPP_TRAIT_USE_SUSPEND #endif /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::OnAudioSystemLoseFocus() { #if defined(AUDIOSYSTEMIMPL_WWISE_CPP_TRAIT_USE_SUSPEND) AKRESULT akResult = AK::SoundEngine::Suspend(); if (!IS_WWISE_OK(akResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise failed to Suspend, AKRESULT = %d\n", akResult); } #endif // AUDIOSYSTEMIMPL_WWISE_CPP_TRAIT_USE_SUSPEND } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::OnAudioSystemGetFocus() { #if defined(AUDIOSYSTEMIMPL_WWISE_CPP_TRAIT_USE_SUSPEND) AKRESULT akResult = AK::SoundEngine::WakeupFromSuspend(); if (!IS_WWISE_OK(akResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise failed to WakeupFromSuspend, AKRESULT = %d\n", akResult); } #endif // AUDIOSYSTEMIMPL_WWISE_CPP_TRAIT_USE_SUSPEND } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::OnAudioSystemMuteAll() { // With Wwise we drive this via events. } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::OnAudioSystemUnmuteAll() { // With Wwise we drive this via events. } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::OnAudioSystemRefresh() { AKRESULT eResult = AK_Fail; if (m_nInitBankID != AK_INVALID_BANK_ID) { eResult = AK::SoundEngine::UnloadBank(m_nInitBankID, nullptr); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise failed to unload Init.bnk, returned the AKRESULT: %d", eResult); AZ_Assert(false, "<Wwise> Failed to unload Init.bnk!"); } } eResult = AK::SoundEngine::LoadBank(AKTEXT("init.bnk"), AK_DEFAULT_POOL_ID, m_nInitBankID); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise failed to load Init.bnk, returned the AKRESULT: %d", eResult); m_nInitBankID = AK_INVALID_BANK_ID; AZ_Assert(false, "<Wwise> Failed to load Init.bnk!"); } } /////////////////////////////////////////////////////////////////////////////////////////////////// // AudioSystemImplementationRequestBus /////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::Update(const float fUpdateIntervalMS) { if (AK::SoundEngine::IsInitialized()) { #if defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) AKRESULT eResult = AK_Fail; static int nEnableOutputCapture = 0; if (g_audioImplCVars_wwise.m_nEnableOutputCapture == 1 && nEnableOutputCapture == 0) { // This file ends up in the cache folder // Need to disable this on LTX, it produces garbage output. But there's no way to "IsLTX()" yet. eResult = AK::SoundEngine::StartOutputCapture(AKTEXT("../wwise_audio_capture.wav")); AZ_Assert(IS_WWISE_OK(eResult), "AK::SoundEngine::StartOutputCapture failed!"); nEnableOutputCapture = g_audioImplCVars_wwise.m_nEnableOutputCapture; } else if (g_audioImplCVars_wwise.m_nEnableOutputCapture == 0 && nEnableOutputCapture == 1) { eResult = AK::SoundEngine::StopOutputCapture(); AZ_Assert(IS_WWISE_OK(eResult), "AK::SoundEngine::StopOutputCapture failed!"); nEnableOutputCapture = g_audioImplCVars_wwise.m_nEnableOutputCapture; } if (audioDeviceInitializationEvent) { AkChannelConfig channelConfig = AK::SoundEngine::GetSpeakerConfiguration(); int surroundSpeakers = channelConfig.uNumChannels; int lfeSpeakers = 0; if (AK::HasLFE(channelConfig.uChannelMask)) { --surroundSpeakers; ++lfeSpeakers; } m_speakerConfigString = AZStd::string::format("Output: %d.%d", surroundSpeakers, lfeSpeakers); m_fullImplString = AZStd::string::format("%s (%s) %s", WWISE_IMPL_VERSION_STRING, m_sRegularSoundBankFolder.c_str(), m_speakerConfigString.c_str()); audioDeviceInitializationEvent = false; } #endif // INCLUDE_WWISE_IMPL_PRODUCTION_CODE AK::SoundEngine::RenderAudio(); } } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::Initialize() { // If something fails so severely during initialization that we need to fall back to the NULL implementation // we will need to shut down what has been initialized so far. Therefore make sure to call Shutdown() before returning eARS_FAILURE! AkMemSettings oMemSettings; oMemSettings.uMaxNumPools = 20; AKRESULT eResult = AK::MemoryMgr::Init(&oMemSettings); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::MemoryMgr::Init() returned AKRESULT %d", eResult); ShutDown(); return eARS_FAILURE; } const AkMemPoolId nPrepareMemPoolID = AK::MemoryMgr::CreatePool(nullptr, g_audioImplCVars_wwise.m_nPrepareEventMemoryPoolSize << 10, 16, AkMalloc, 16); if (nPrepareMemPoolID == AK_INVALID_POOL_ID) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::MemoryMgr::CreatePool() PrepareEventMemoryPool failed!\n"); ShutDown(); return eARS_FAILURE; } eResult = AK::MemoryMgr::SetPoolName(nPrepareMemPoolID, "PrepareEventMemoryPool"); if (eResult != AK_Success) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::MemoryMgr::SetPoolName() could not set name of event prepare memory pool!\n"); ShutDown(); return eARS_FAILURE; } eResult = AK::SoundEngine::RegisterAudioDeviceStatusCallback(AudioDeviceCallback); if (eResult != AK_Success) { g_audioImplLogger_wwise.Log(eALT_WARNING, "AK::SoundEngine::RegisterAudioDeviceStatusCallback failed!\n"); } AkStreamMgrSettings oStreamSettings; AK::StreamMgr::GetDefaultSettings(oStreamSettings); oStreamSettings.uMemorySize = g_audioImplCVars_wwise.m_nStreamManagerMemoryPoolSize << 10; // 64 KiB is the default value! if (AK::StreamMgr::Create(oStreamSettings) == nullptr) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::StreamMgr::Create() failed!\n"); ShutDown(); return eARS_FAILURE; } AkDeviceSettings oDeviceSettings; AK::StreamMgr::GetDefaultDeviceSettings(oDeviceSettings); oDeviceSettings.uIOMemorySize = g_audioImplCVars_wwise.m_nStreamDeviceMemoryPoolSize << 10; // 2 MiB is the default value! #if defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_2 #if defined(AZ_PLATFORM_XENIA) #include "Xenia/AudioSystemImpl_wwise_cpp_xenia.inl" #elif defined(AZ_PLATFORM_PROVO) #include "Provo/AudioSystemImpl_wwise_cpp_provo.inl" #endif #endif eResult = m_oFileIOHandler.Init(oDeviceSettings); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "m_oFileIOHandler.Init() returned AKRESULT %d", eResult); ShutDown(); return eARS_FAILURE; } CryFixedStringT<MAX_AUDIO_FILE_PATH_LENGTH> sTemp(WWISE_IMPL_BASE_PATH); const AkOSChar* pTemp = nullptr; CONVERT_CHAR_TO_OSCHAR(sTemp.c_str(), pTemp); m_oFileIOHandler.SetBankPath(pTemp); AkInitSettings oInitSettings; AK::SoundEngine::GetDefaultInitSettings(oInitSettings); oInitSettings.uDefaultPoolSize = g_audioImplCVars_wwise.m_nSoundEngineDefaultMemoryPoolSize << 10; oInitSettings.uCommandQueueSize = g_audioImplCVars_wwise.m_nCommandQueueMemoryPoolSize << 10; #if defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) oInitSettings.uMonitorPoolSize = g_audioImplCVars_wwise.m_nMonitorMemoryPoolSize << 10; oInitSettings.uMonitorQueuePoolSize = g_audioImplCVars_wwise.m_nMonitorQueueMemoryPoolSize << 10; #endif // INCLUDE_WWISE_IMPL_PRODUCTION_CODE oInitSettings.uPrepareEventMemoryPoolID = nPrepareMemPoolID; oInitSettings.bEnableGameSyncPreparation = false;//TODO: ??? AkPlatformInitSettings oPlatformInitSettings; AK::SoundEngine::GetDefaultPlatformInitSettings(oPlatformInitSettings); oPlatformInitSettings.uLEngineDefaultPoolSize = g_audioImplCVars_wwise.m_nLowerEngineDefaultPoolSize << 10; #if defined(AZ_PLATFORM_WINDOWS) // Turn off XAudio2 output type due to rare startup crashes. Prefers WASAPI or DirectSound. oPlatformInitSettings.eAudioAPI = static_cast<AkAudioAPI>(oPlatformInitSettings.eAudioAPI & ~AkAPI_XAudio2); oPlatformInitSettings.threadBankManager.dwAffinityMask = 0; oPlatformInitSettings.threadLEngine.dwAffinityMask = 0; oPlatformInitSettings.threadMonitor.dwAffinityMask = 0; #define AZ_RESTRICTED_SECTION_IMPLEMENTED #elif defined(AZ_RESTRICTED_PLATFORM) #define AZ_RESTRICTED_SECTION AUDIOSYSTEMIMPL_WWISE_CPP_SECTION_3 #if defined(AZ_PLATFORM_XENIA) #include "Xenia/AudioSystemImpl_wwise_cpp_xenia.inl" #elif defined(AZ_PLATFORM_PROVO) #include "Provo/AudioSystemImpl_wwise_cpp_provo.inl" #endif #endif #if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED) #undef AZ_RESTRICTED_SECTION_IMPLEMENTED #elif defined(AZ_PLATFORM_APPLE_OSX) #elif defined(AZ_PLATFORM_APPLE_IOS) || defined(AZ_PLATFORM_APPLE_TV) oInitSettings.uDefaultPoolSize = 1.5 * 1024 * 1024; oPlatformInitSettings.uLEngineDefaultPoolSize = 1.5 * 1024 * 1024; #elif defined(AZ_PLATFORM_ANDROID) JNIEnv* jniEnv = AZ::Android::AndroidEnv::Get()->GetJniEnv(); jobject javaActivity = AZ::Android::AndroidEnv::Get()->GetActivityRef(); JavaVM* javaVM = nullptr; if (jniEnv) { jniEnv->GetJavaVM(&javaVM); } oPlatformInitSettings.pJavaVM = javaVM; oPlatformInitSettings.jNativeActivity = javaActivity; #elif defined(AZ_PLATFORM_LINUX_X64) #else #error "Unsupported platform." #endif eResult = AK::SoundEngine::Init(&oInitSettings, &oPlatformInitSettings); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::SoundEngine::Init() returned AKRESULT %d", eResult); ShutDown(); return eARS_FAILURE; } AkMusicSettings oMusicInit; AK::MusicEngine::GetDefaultInitSettings(oMusicInit); eResult = AK::MusicEngine::Init(&oMusicInit); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::MusicEngine::Init() returned AKRESULT %d", eResult); ShutDown(); return eARS_FAILURE; } #if !defined(WWISE_FOR_RELEASE) if (g_audioImplCVars_wwise.m_nEnableCommSystem == 1) { m_bCommSystemInitialized = true; AkCommSettings oCommSettings; AK::Comm::GetDefaultInitSettings(oCommSettings); eResult = AK::Comm::Init(oCommSettings); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::Comm::Init() returned AKRESULT %d. Communication between the Wwise authoring application and the game will not be possible\n", eResult); m_bCommSystemInitialized = false; } eResult = AK::Monitor::SetLocalOutput(AK::Monitor::ErrorLevel_All, ErrorMonitorCallback); if (!IS_WWISE_OK(eResult)) { AK::Comm::Term(); g_audioImplLogger_wwise.Log(eALT_ERROR, "AK::Monitor::SetLocalOutput() returned AKRESULT %d", eResult); m_bCommSystemInitialized = false; } } #endif // !WWISE_FOR_RELEASE // Initialize the AudioSourceManager AudioSourceManager::Get().Initialize(); // Register the DummyGameObject used for the events that don't need a location in the game world eResult = AK::SoundEngine::RegisterGameObj(m_globalGameObjectID, sWwiseGlobalAudioObjectName); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_WARNING, "AK::SoundEngine::RegisterGameObject() failed for '%s' with AKRESULT %d", sWwiseGlobalAudioObjectName, eResult); } // Load Init.bnk before making the system available to the users eResult = AK::SoundEngine::LoadBank(AKTEXT("init.bnk"), AK_DEFAULT_POOL_ID, m_nInitBankID); if (!IS_WWISE_OK(eResult)) { // This does not qualify for a fallback to the NULL implementation! // Still notify the user about this failure! g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise failed to load Init.bnk, returned the AKRESULT: %d", eResult); m_nInitBankID = AK_INVALID_BANK_ID; } #if defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) // Set up memory pool information... AkInt32 numPools = AK::MemoryMgr::GetNumPools(); m_debugMemoryPoolInfo.reserve(numPools); g_audioImplLogger_wwise.Log(eALT_COMMENT, "Number of AK Memory Pools: %d", numPools); for (AkInt32 poolId = 0; poolId < numPools; ++poolId) { eResult = AK::MemoryMgr::CheckPoolId(poolId); if (IS_WWISE_OK(eResult)) { AudioImplMemoryPoolInfo poolInfo; AkOSChar* poolName = AK::MemoryMgr::GetPoolName(poolId); char* nameTemp = nullptr; CONVERT_OSCHAR_TO_CHAR(poolName, nameTemp); AKPLATFORM::SafeStrCpy(poolInfo.m_poolName, nameTemp, AZ_ARRAY_SIZE(poolInfo.m_poolName)); poolInfo.m_poolId = poolId; g_audioImplLogger_wwise.Log(eALT_COMMENT, "Found Wwise Memory Pool: %d - '%s'", poolId, poolInfo.m_poolName); m_debugMemoryPoolInfo.push_back(poolInfo); } } #endif // INCLUDE_WWISE_IMPL_PRODUCTION_CODE return eARS_SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::ShutDown() { AKRESULT eResult = AK_Fail; #if !defined(WWISE_FOR_RELEASE) if (m_bCommSystemInitialized) { AK::Comm::Term(); eResult = AK::Monitor::SetLocalOutput(0, nullptr); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_WARNING, "AK::Monitor::SetLocalOutput() returned AKRESULT %d", eResult); } m_bCommSystemInitialized = false; } #endif // !WWISE_FOR_RELEASE eResult = AK::SoundEngine::UnregisterAudioDeviceStatusCallback(); if (eResult != AK_Success) { g_audioImplLogger_wwise.Log(eALT_WARNING, "AK::SoundEngine::UnregisterAudioDeviceStatusCallback failed!\n"); } // Shutdown the AudioSourceManager AudioSourceManager::Get().Shutdown(); AK::MusicEngine::Term(); if (AK::SoundEngine::IsInitialized()) { // UnRegister the DummyGameObject eResult = AK::SoundEngine::UnregisterGameObj(m_globalGameObjectID); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_WARNING, "AK::SoundEngine::UnregisterGameObject() failed for '%s' with AKRESULT %d", sWwiseGlobalAudioObjectName, eResult); } eResult = AK::SoundEngine::ClearBanks(); if (!IS_WWISE_OK(eResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "Failed to clear sound banks!"); } AK::SoundEngine::Term(); } // Terminate the streaming device and streaming manager // CAkFilePackageLowLevelIOBlocking::Term() destroys its associated streaming device // that lives in the Stream Manager, and unregisters itself as the File Location Resolver. if (AK::IAkStreamMgr::Get()) { m_oFileIOHandler.ShutDown(); AK::IAkStreamMgr::Get()->Destroy(); } // Terminate the Memory Manager if (AK::MemoryMgr::IsInitialized()) { eResult = AK::MemoryMgr::DestroyPool(0); AK::MemoryMgr::Term(); } return eARS_SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::Release() { azdestroy(this, Audio::AudioImplAllocator, CAudioSystemImpl_wwise); if (AZ::AllocatorInstance<Audio::AudioImplAllocator>::IsReady()) { AZ::AllocatorInstance<Audio::AudioImplAllocator>::Destroy(); } g_audioImplCVars_wwise.UnregisterVariables(); return eARS_SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::StopAllSounds() { AK::SoundEngine::StopAll(); return eARS_SUCCESS; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::RegisterAudioObject( IATLAudioObjectData* const pObjectData, const char* const sObjectName) { if (pObjectData) { auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pObjectData); const AKRESULT eAKResult = AK::SoundEngine::RegisterGameObj(pAKObjectData->nAKID, sObjectName); const bool bAKSuccess = IS_WWISE_OK(eAKResult); if (!bAKSuccess) { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise RegisterGameObj failed with AKRESULT: %d", eAKResult); } return BoolToARS(bAKSuccess); } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise RegisterGameObj failed, pObjectData was null"); return eARS_FAILURE; } } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::UnregisterAudioObject(IATLAudioObjectData* const pObjectData) { if (pObjectData) { auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pObjectData); const AKRESULT eAKResult = AK::SoundEngine::UnregisterGameObj(pAKObjectData->nAKID); const bool bAKSuccess = IS_WWISE_OK(eAKResult); if (!bAKSuccess) { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise UnregisterGameObj failed with AKRESULT: %d", eAKResult); } return BoolToARS(bAKSuccess); } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise UnregisterGameObj failed, pObjectData was null"); return eARS_FAILURE; } } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::ResetAudioObject(IATLAudioObjectData* const pObjectData) { if (pObjectData) { auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pObjectData); pAKObjectData->cEnvironmentImplAmounts.clear(); pAKObjectData->bNeedsToUpdateEnvironments = false; return eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Resetting Audio object failed, pObjectData was null"); return eARS_FAILURE; } } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::UpdateAudioObject(IATLAudioObjectData* const pObjectData) { EAudioRequestStatus eResult = eARS_FAILURE; if (pObjectData) { auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pObjectData); if (pAKObjectData->bNeedsToUpdateEnvironments) { eResult = PostEnvironmentAmounts(pAKObjectData); } } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::PrepareTriggerSync( IATLAudioObjectData* const pAudioObjectData, const IATLTriggerImplData* const pTriggerData) { return PrepUnprepTriggerSync(pTriggerData, true); } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::UnprepareTriggerSync( IATLAudioObjectData* const pAudioObjectData, const IATLTriggerImplData* const pTriggerData) { return PrepUnprepTriggerSync(pTriggerData, false); } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::PrepareTriggerAsync( IATLAudioObjectData* const pAudioObjectData, const IATLTriggerImplData* const pTriggerData, IATLEventData* const pEventData) { return PrepUnprepTriggerAsync(pTriggerData, pEventData, true); } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::UnprepareTriggerAsync( IATLAudioObjectData* const pAudioObjectData, const IATLTriggerImplData* const pTriggerData, IATLEventData* const pEventData) { return PrepUnprepTriggerAsync(pTriggerData, pEventData, false); } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::ActivateTrigger( IATLAudioObjectData* const pAudioObjectData, const IATLTriggerImplData* const pTriggerData, IATLEventData* const pEventData, const SATLSourceData* const pSourceData) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); auto const pAKTriggerImplData = static_cast<const SATLTriggerImplData_wwise*>(pTriggerData); auto const pAKEventData = static_cast<SATLEventData_wwise*>(pEventData); if (pAKObjectData && pAKTriggerImplData && pAKEventData) { AkGameObjectID nAKObjectID = AK_INVALID_GAME_OBJECT; if (pAKObjectData->bHasPosition) { nAKObjectID = pAKObjectData->nAKID; PostEnvironmentAmounts(pAKObjectData); } else { nAKObjectID = m_globalGameObjectID; } AkPlayingID nAKPlayingID = AK_INVALID_PLAYING_ID; switch (GetAssetType(pSourceData)) { case eAAT_SOURCE: { AZ_Assert(pSourceData, "SourceData not provided for source type!"); auto sTemp = AZStd::string::format("%s%d/%d/%d.wem", WWISE_IMPL_EXTERNAL_PATH, pSourceData->m_sourceInfo.m_collectionId, pSourceData->m_sourceInfo.m_languageId, pSourceData->m_sourceInfo.m_fileId); AkOSChar* pTemp = nullptr; CONVERT_CHAR_TO_OSCHAR(sTemp.c_str(), pTemp); AkExternalSourceInfo sources[1]; sources[0].iExternalSrcCookie = static_cast<AkUInt32>(pSourceData->m_sourceInfo.m_sourceId); sources[0].szFile = pTemp; sources[0].idCodec = GetAkCodecID(pSourceData->m_sourceInfo.m_codecType); nAKPlayingID = AK::SoundEngine::PostEvent( pAKTriggerImplData->nAKID, nAKObjectID, AK_EndOfEvent | AK_Duration, &WwiseEventCallback, pAKEventData, 1, sources); if (nAKPlayingID != AK_INVALID_PLAYING_ID) { pAKEventData->audioEventState = eAES_PLAYING; pAKEventData->nAKID = nAKPlayingID; eResult = eARS_SUCCESS; } else { // if Posting an Event failed, try to prepare it, if it isn't prepared already g_audioImplLogger_wwise.Log(eALT_WARNING, "Failed to Post Wwise event %u with external source '%s'", pAKTriggerImplData->nAKID, sTemp.c_str()); } break; } case eAAT_STREAM: //[[fallthrough]] case eAAT_NONE: //[[fallthrough]] default: { nAKPlayingID = AK::SoundEngine::PostEvent( pAKTriggerImplData->nAKID, nAKObjectID, AK_EndOfEvent | AK_Duration, &WwiseEventCallback, pAKEventData); if (nAKPlayingID != AK_INVALID_PLAYING_ID) { if (pSourceData) { TAudioSourceId sourceId = pSourceData->m_sourceInfo.m_sourceId; if (sourceId != INVALID_AUDIO_SOURCE_ID) { // Activate the audio input source (associates sourceId w/ playingId)... AudioSourceManager::Get().ActivateSource(sourceId, nAKPlayingID); pAKEventData->nSourceId = sourceId; } } pAKEventData->audioEventState = eAES_PLAYING; pAKEventData->nAKID = nAKPlayingID; eResult = eARS_SUCCESS; } else { // if Posting an Event failed, try to prepare it, if it isn't prepared already g_audioImplLogger_wwise.Log(eALT_WARNING, "Failed to Post Wwise event %u", pAKTriggerImplData->nAKID); } break; } } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData, ATLTriggerData or EventData passed to the Wwise implementation of ActivateTrigger."); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::StopEvent( IATLAudioObjectData* const pAudioObjectData, const IATLEventData* const pEventData) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKEventData = static_cast<const SATLEventData_wwise*>(pEventData); if (pAKEventData) { switch (pAKEventData->audioEventState) { case eAES_PLAYING: { AK::SoundEngine::StopPlayingID(pAKEventData->nAKID, 10); eResult = eARS_SUCCESS; break; } default: { g_audioImplLogger_wwise.Log(eALT_ERROR, "Stopping an event of this type is not supported yet"); break; } } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid EventData passed to the Wwise implementation of StopEvent."); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::StopAllEvents(IATLAudioObjectData* const pAudioObjectData) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); if (pAKObjectData) { const AkGameObjectID nAKObjectID = pAKObjectData->bHasPosition ? pAKObjectData->nAKID : m_globalGameObjectID; AK::SoundEngine::StopAll(nAKObjectID); eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData passed to the Wwise implementation of StopAllEvents."); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetPosition( IATLAudioObjectData* const pAudioObjectData, const SATLWorldPosition& sWorldPosition) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); if (pAKObjectData) { AkSoundPosition sAkSoundPos; ATLTransformToAkTransform(sWorldPosition, sAkSoundPos); const AKRESULT eAKResult = AK::SoundEngine::SetPosition(pAKObjectData->nAKID, sAkSoundPos); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise SetPosition failed with AKRESULT: %d", eAKResult); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData passed to the Wwise implementation of SetPosition."); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetMultiplePositions( IATLAudioObjectData* const pAudioObjectData, const MultiPositionParams& multiPositionParams) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); if (pAKObjectData) { AZStd::vector<AkSoundPosition> akPositions; AZStd::for_each(multiPositionParams.m_positions.begin(), multiPositionParams.m_positions.end(), [&akPositions](const auto& position) { akPositions.emplace_back(AZVec3ToAkTransform(position)); } ); AK::SoundEngine::MultiPositionType type = AK::SoundEngine::MultiPositionType_MultiDirections; // default 'Blended' if (multiPositionParams.m_type == MultiPositionBehaviorType::Separate) { type = AK::SoundEngine::MultiPositionType_MultiSources; } const AKRESULT akResult = AK::SoundEngine::SetMultiplePositions(pAKObjectData->nAKID, akPositions.data(), static_cast<AkUInt16>(akPositions.size()), type); if (IS_WWISE_OK(akResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise SetMultiplePositions failed with AKRESULT: %d\n", akResult); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData passed to the Wwise implementation of SetMultiplePositions."); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetEnvironment( IATLAudioObjectData* const pAudioObjectData, const IATLEnvironmentImplData* const pEnvironmentImplData, const float fAmount) { static const float sEnvEpsilon = 0.0001f; EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); auto const pAKEnvironmentData = static_cast<const SATLEnvironmentImplData_wwise*>(pEnvironmentImplData); if (pAKObjectData && pAKEnvironmentData) { switch (pAKEnvironmentData->eType) { case eWAET_AUX_BUS: { const float fCurrentAmount = stl::find_in_map( pAKObjectData->cEnvironmentImplAmounts, pAKEnvironmentData->nAKBusID, -1.0f); if ((fCurrentAmount == -1.0f) || (fabs(fCurrentAmount - fAmount) > sEnvEpsilon)) { pAKObjectData->cEnvironmentImplAmounts[pAKEnvironmentData->nAKBusID] = fAmount; pAKObjectData->bNeedsToUpdateEnvironments = true; } eResult = eARS_SUCCESS; break; } case eWAET_RTPC: { auto fAKValue = static_cast<AkRtpcValue>(pAKEnvironmentData->fMult * fAmount + pAKEnvironmentData->fShift); const AKRESULT eAKResult = AK::SoundEngine::SetRTPCValue(pAKEnvironmentData->nAKRtpcID, fAKValue, pAKObjectData->nAKID); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to set the Rtpc %u to value %f on object %u in SetEnvironement()", pAKEnvironmentData->nAKRtpcID, fAKValue, pAKObjectData->nAKID); } break; } default: { AZ_Assert(false, "<Wwise> Unknown AudioEnvironmentImplementation type!"); } } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData or EnvironmentData passed to the Wwise implementation of SetEnvironment"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetRtpc( IATLAudioObjectData* const pAudioObjectData, const IATLRtpcImplData* const pRtpcData, const float fValue) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); auto const pAKRtpcData = static_cast<const SATLRtpcImplData_wwise*>(pRtpcData); if (pAKObjectData && pAKRtpcData) { auto fAKValue = static_cast<AkRtpcValue>(pAKRtpcData->m_fMult * fValue + pAKRtpcData->m_fShift); const AKRESULT eAKResult = AK::SoundEngine::SetRTPCValue(pAKRtpcData->nAKID, fAKValue, pAKObjectData->nAKID); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to set the Rtpc %" PRISIZE_T " to value %f on object %" PRISIZE_T, pAKRtpcData->nAKID, static_cast<AkRtpcValue>(fValue), pAKObjectData->nAKID); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData or RtpcData passed to the Wwise implementation of SetRtpc"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetSwitchState( IATLAudioObjectData* const pAudioObjectData, const IATLSwitchStateImplData* const pSwitchStateData) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); auto const pAKSwitchStateData = static_cast<const SATLSwitchStateImplData_wwise*>(pSwitchStateData); if (pAKObjectData && pAKSwitchStateData) { switch (pAKSwitchStateData->eType) { case eWST_SWITCH: { const AkGameObjectID nAKObjectID = pAKObjectData->bHasPosition ? pAKObjectData->nAKID : m_globalGameObjectID; const AKRESULT eAKResult = AK::SoundEngine::SetSwitch( pAKSwitchStateData->nAKSwitchID, pAKSwitchStateData->nAKStateID, nAKObjectID); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to set the switch group %" PRISIZE_T " to state %" PRISIZE_T " on object %" PRISIZE_T, pAKSwitchStateData->nAKSwitchID, pAKSwitchStateData->nAKStateID, nAKObjectID); } break; } case eWST_STATE: { const AKRESULT eAKResult = AK::SoundEngine::SetState( pAKSwitchStateData->nAKSwitchID, pAKSwitchStateData->nAKStateID); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to set the state group %" PRISIZE_T "to state %" PRISIZE_T, pAKSwitchStateData->nAKSwitchID, pAKSwitchStateData->nAKStateID); } break; } case eWST_RTPC: { const AkGameObjectID nAKObjectID = pAKObjectData->nAKID; const AKRESULT eAKResult = AK::SoundEngine::SetRTPCValue( pAKSwitchStateData->nAKSwitchID, static_cast<AkRtpcValue>(pAKSwitchStateData->fRtpcValue), nAKObjectID); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to set the Rtpc %" PRISIZE_T " to value %f on object %" PRISIZE_T, pAKSwitchStateData->nAKSwitchID, static_cast<AkRtpcValue>(pAKSwitchStateData->fRtpcValue), nAKObjectID); } break; } case eWST_NONE: { break; } default: { g_audioImplLogger_wwise.Log(eALT_WARNING, "Unknown EWwiseSwitchType: %" PRISIZE_T, pAKSwitchStateData->eType); AZ_Assert(false, "<Wwise> Unknown EWwiseSwitchType"); break; } } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData or RtpcData passed to the Wwise implementation of SetRtpc"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetObstructionOcclusion( IATLAudioObjectData* const pAudioObjectData, const float fObstruction, const float fOcclusion) { if (fObstruction < sObstructionOcclusionMin || fObstruction > sObstructionOcclusionMax) { g_audioImplLogger_wwise.Log( eALT_WARNING, "Obstruction value %f is out of range, fObstruction should be between %f and %f.", fObstruction, sObstructionOcclusionMin, sObstructionOcclusionMax); } if (fOcclusion < sObstructionOcclusionMin || fOcclusion > sObstructionOcclusionMax) { g_audioImplLogger_wwise.Log( eALT_WARNING, "Occlusion value %f is out of range, fOcclusion should be between %f and %f " PRISIZE_T, fOcclusion, sObstructionOcclusionMin, sObstructionOcclusionMax); } EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); if (pAKObjectData) { const AKRESULT eAKResult = AK::SoundEngine::SetObjectObstructionAndOcclusion( pAKObjectData->nAKID, m_defaultListenerGameObjectID, // only set the obstruction/occlusion for the default listener for now static_cast<AkReal32>(fObstruction), static_cast<AkReal32>(fOcclusion)); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to set Obstruction %f and Occlusion %f on object %" PRISIZE_T, fObstruction, fOcclusion, pAKObjectData->nAKID); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData passed to the Wwise implementation of SetObjectObstructionAndOcclusion"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::SetListenerPosition( IATLListenerData* const pListenerData, const SATLWorldPosition& oNewPosition) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKListenerData = static_cast<SATLListenerData_wwise*>(pListenerData); if (pAKListenerData) { AkListenerPosition oAKListenerPos; ATLTransformToAkTransform(oNewPosition, oAKListenerPos); const AKRESULT eAKResult = AK::SoundEngine::SetPosition(pAKListenerData->nAKListenerObjectId, oAKListenerPos); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise SetListenerPosition failed with AKRESULT: %" PRISIZE_T, eAKResult); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid ATLListenerData passed to the Wwise implementation of SetListenerPosition"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::ResetRtpc(IATLAudioObjectData* const pAudioObjectData, const IATLRtpcImplData* const pRtpcData) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); auto const pAKRtpcData = static_cast<const SATLRtpcImplData_wwise*>(pRtpcData); if (pAKObjectData && pAKRtpcData) { const AKRESULT eAKResult = AK::SoundEngine::ResetRTPCValue(pAKRtpcData->nAKID, pAKObjectData->nAKID); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise failed to reset the Rtpc %" PRISIZE_T " on object %" PRISIZE_T, pAKRtpcData->nAKID, pAKObjectData->nAKID); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioObjectData or RtpcData passed to the Wwise implementation of ResetRtpc"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::RegisterInMemoryFile(SATLAudioFileEntryInfo* const pFileEntryInfo) { EAudioRequestStatus eRegisterResult = eARS_FAILURE; if (pFileEntryInfo) { auto const pFileDataWwise = static_cast<SATLAudioFileEntryData_wwise*>(pFileEntryInfo->pImplData); if (pFileDataWwise) { AkBankID nBankID = AK_INVALID_BANK_ID; const AKRESULT eAKResult = AK::SoundEngine::LoadBank( pFileEntryInfo->pFileData, static_cast<AkUInt32>(pFileEntryInfo->nSize), nBankID); if (IS_WWISE_OK(eAKResult)) { pFileDataWwise->nAKBankID = nBankID; eRegisterResult = eARS_SUCCESS; } else { pFileDataWwise->nAKBankID = AK_INVALID_BANK_ID; g_audioImplLogger_wwise.Log(eALT_ERROR, "Failed to load file %s\n", pFileEntryInfo->sFileName); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioFileEntryData passed to the Wwise implementation of RegisterInMemoryFile"); } } return eRegisterResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::UnregisterInMemoryFile(SATLAudioFileEntryInfo* const pFileEntryInfo) { EAudioRequestStatus eResult = eARS_FAILURE; if (pFileEntryInfo) { auto const pFileDataWwise = static_cast<SATLAudioFileEntryData_wwise*>(pFileEntryInfo->pImplData); if (pFileDataWwise) { const AKRESULT eAKResult = AK::SoundEngine::UnloadBank(pFileDataWwise->nAKBankID, pFileEntryInfo->pFileData); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise Failed to unregister in memory file %s\n", pFileEntryInfo->sFileName); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid AudioFileEntryData passed to the Wwise implementation of UnregisterInMemoryFile"); } } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::ParseAudioFileEntry(const XmlNodeRef pAudioFileEntryNode, SATLAudioFileEntryInfo* const pFileEntryInfo) { static CryFixedStringT<MAX_AUDIO_FILE_PATH_LENGTH> sPath; EAudioRequestStatus eResult = eARS_FAILURE; if (pFileEntryInfo && azstricmp(pAudioFileEntryNode->getTag(), sWwiseFileTag) == 0) { const char* const sWwiseAudioFileEntryName = pAudioFileEntryNode->getAttr(sWwiseNameAttribute); if (sWwiseAudioFileEntryName && sWwiseAudioFileEntryName[0] != '\0') { const char* const sWwiseLocalised = pAudioFileEntryNode->getAttr(sWwiseLocalisedAttribute); pFileEntryInfo->bLocalized = (sWwiseLocalised != nullptr) && (azstricmp(sWwiseLocalised, "true") == 0); pFileEntryInfo->sFileName = sWwiseAudioFileEntryName; pFileEntryInfo->nMemoryBlockAlignment = AK_BANK_PLATFORM_DATA_ALIGNMENT; pFileEntryInfo->pImplData = azcreate(SATLAudioFileEntryData_wwise, (), Audio::AudioImplAllocator, "ATLAudioFileEntryData_wwise"); eResult = eARS_SUCCESS; } else { pFileEntryInfo->sFileName = nullptr; pFileEntryInfo->nMemoryBlockAlignment = 0; pFileEntryInfo->pImplData = nullptr; } } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioFileEntryData(IATLAudioFileEntryData* const pOldAudioFileEntry) { azdestroy(pOldAudioFileEntry, Audio::AudioImplAllocator, SATLAudioFileEntryData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// const char* const CAudioSystemImpl_wwise::GetAudioFileLocation(SATLAudioFileEntryInfo* const pFileEntryInfo) { const char* sResult = nullptr; if (pFileEntryInfo) { sResult = pFileEntryInfo->bLocalized ? m_sLocalizedSoundBankFolder.c_str() : m_sRegularSoundBankFolder.c_str(); } return sResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// SATLAudioObjectData_wwise* CAudioSystemImpl_wwise::NewGlobalAudioObjectData(const TAudioObjectID nObjectID) { AZ_UNUSED(nObjectID); auto pNewObjectData = azcreate(SATLAudioObjectData_wwise, (AK_INVALID_GAME_OBJECT, false), Audio::AudioImplAllocator, "ATLAudioObjectData_wwise-Global"); return pNewObjectData; } /////////////////////////////////////////////////////////////////////////////////////////////////// SATLAudioObjectData_wwise* CAudioSystemImpl_wwise::NewAudioObjectData(const TAudioObjectID nObjectID) { auto pNewObjectData = azcreate(SATLAudioObjectData_wwise, (static_cast<AkGameObjectID>(nObjectID), true), Audio::AudioImplAllocator, "ATLAudioObjectData_wwise"); return pNewObjectData; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioObjectData(IATLAudioObjectData* const pOldObjectData) { azdestroy(pOldObjectData, Audio::AudioImplAllocator, SATLAudioObjectData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// SATLListenerData_wwise* CAudioSystemImpl_wwise::NewDefaultAudioListenerObjectData(const TATLIDType nListenerID) { auto pNewObject = azcreate(SATLListenerData_wwise, (static_cast<AkGameObjectID>(nListenerID)), Audio::AudioImplAllocator, "ATLListenerData_wwise-Default"); if (pNewObject) { auto listenerName = AZStd::string::format("DefaultAudioListener(%" PRISIZE_T ")", pNewObject->nAKListenerObjectId); AKRESULT eAKResult = AK::SoundEngine::RegisterGameObj(pNewObject->nAKListenerObjectId, listenerName.c_str()); if (IS_WWISE_OK(eAKResult)) { eAKResult = AK::SoundEngine::SetDefaultListeners(&pNewObject->nAKListenerObjectId, 1); if (IS_WWISE_OK(eAKResult)) { m_defaultListenerGameObjectID = pNewObject->nAKListenerObjectId; } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise failed in SetDefaultListeners to set AkGameObjectID %" PRISIZE_T " as default with AKRESULT: %d", pNewObject->nAKListenerObjectId, eAKResult); } } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise failed in RegisterGameObj registering a DefaultAudioListener with AKRESULT: %d", eAKResult); } } return pNewObject; } /////////////////////////////////////////////////////////////////////////////////////////////////// SATLListenerData_wwise* CAudioSystemImpl_wwise::NewAudioListenerObjectData(const TATLIDType nListenerID) { auto pNewObject = azcreate(SATLListenerData_wwise, (static_cast<AkGameObjectID>(nListenerID)), Audio::AudioImplAllocator, "ATLListenerData_wwise"); if (pNewObject) { auto listenerName = AZStd::string::format("AudioListener(%" PRISIZE_T ")", pNewObject->nAKListenerObjectId); AKRESULT eAKResult = AK::SoundEngine::RegisterGameObj(pNewObject->nAKListenerObjectId, listenerName.c_str()); if (!IS_WWISE_OK(eAKResult)) { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise failed in RegisterGameObj registering an AudioListener with AKRESULT: %d", eAKResult); } } return pNewObject; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioListenerObjectData(IATLListenerData* const pOldListenerData) { auto listenerData = static_cast<SATLListenerData_wwise*>(pOldListenerData); if (listenerData) { AKRESULT eAKResult = AK::SoundEngine::UnregisterGameObj(listenerData->nAKListenerObjectId); if (IS_WWISE_OK(eAKResult)) { if (listenerData->nAKListenerObjectId == m_defaultListenerGameObjectID) { m_defaultListenerGameObjectID = AK_INVALID_GAME_OBJECT; } } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise failed in UnregisterGameObj unregistering an AudioListener(%" PRISIZE_T ") with AKRESULT: %d", listenerData->nAKListenerObjectId, eAKResult); } } azdestroy(pOldListenerData, Audio::AudioImplAllocator, SATLListenerData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// SATLEventData_wwise* CAudioSystemImpl_wwise::NewAudioEventData(const TAudioEventID nEventID) { auto pNewEvent = azcreate(SATLEventData_wwise, (nEventID), Audio::AudioImplAllocator, "ATLEventData_wwise"); return pNewEvent; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioEventData(IATLEventData* const pOldEventData) { azdestroy(pOldEventData, Audio::AudioImplAllocator, SATLEventData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::ResetAudioEventData(IATLEventData* const pEventData) { auto const pAKEventData = static_cast<SATLEventData_wwise*>(pEventData); if (pAKEventData) { pAKEventData->audioEventState = eAES_NONE; pAKEventData->nAKID = AK_INVALID_UNIQUE_ID; pAKEventData->nSourceId = INVALID_AUDIO_SOURCE_ID; } } /////////////////////////////////////////////////////////////////////////////////////////////////// const SATLTriggerImplData_wwise* CAudioSystemImpl_wwise::NewAudioTriggerImplData(const XmlNodeRef pAudioTriggerImplNode) { SATLTriggerImplData_wwise* pNewTriggerImpl = nullptr; if (azstricmp(pAudioTriggerImplNode->getTag(), sWwiseEventTag) == 0) { const char* const sWwiseEventName = pAudioTriggerImplNode->getAttr(sWwiseNameAttribute); const AkUniqueID nAKID = AK::SoundEngine::GetIDFromString(sWwiseEventName);//Does not check if the string represents an event!!!! if (nAKID != AK_INVALID_UNIQUE_ID) { pNewTriggerImpl = azcreate(SATLTriggerImplData_wwise, (nAKID), Audio::AudioImplAllocator, "ATLTriggerImplData_wwise"); } else { AZ_Assert(false, "<Wwise> Failed to get a unique ID from string '%s'.", sWwiseEventName); } } return pNewTriggerImpl; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioTriggerImplData(const IATLTriggerImplData* const pOldTriggerImplData) { azdestroy(const_cast<IATLTriggerImplData*>(pOldTriggerImplData), Audio::AudioImplAllocator, SATLTriggerImplData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// const SATLRtpcImplData_wwise* CAudioSystemImpl_wwise::NewAudioRtpcImplData(const XmlNodeRef pAudioRtpcNode) { SATLRtpcImplData_wwise* pNewRtpcImpl = nullptr; AkRtpcID nAKRtpcID = AK_INVALID_RTPC_ID; float fMult = 1.0f; float fShift = 0.0f; ParseRtpcImpl(pAudioRtpcNode, nAKRtpcID, fMult, fShift); if (nAKRtpcID != AK_INVALID_RTPC_ID) { pNewRtpcImpl = azcreate(SATLRtpcImplData_wwise, (nAKRtpcID, fMult, fShift), Audio::AudioImplAllocator, "ATLRtpcImplData_wwise"); } return pNewRtpcImpl; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioRtpcImplData(const IATLRtpcImplData* const pOldRtpcImplData) { azdestroy(const_cast<IATLRtpcImplData*>(pOldRtpcImplData), Audio::AudioImplAllocator, SATLRtpcImplData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// const SATLSwitchStateImplData_wwise* CAudioSystemImpl_wwise::NewAudioSwitchStateImplData(const XmlNodeRef pAudioSwitchNode) { const char* const sWwiseSwitchNodeTag = pAudioSwitchNode->getTag(); const SATLSwitchStateImplData_wwise* pNewSwitchImpl = nullptr; if (azstricmp(sWwiseSwitchNodeTag, sWwiseSwitchTag) == 0) { pNewSwitchImpl = ParseWwiseSwitchOrState(pAudioSwitchNode, eWST_SWITCH); } else if (azstricmp(sWwiseSwitchNodeTag, sWwiseStateTag) == 0) { pNewSwitchImpl = ParseWwiseSwitchOrState(pAudioSwitchNode, eWST_STATE); } else if (azstricmp(sWwiseSwitchNodeTag, sWwiseRtpcSwitchTag) == 0) { pNewSwitchImpl = ParseWwiseRtpcSwitch(pAudioSwitchNode); } else { // Unknown Wwise switch tag! g_audioImplLogger_wwise.Log(eALT_WARNING, "Unknown Wwise Switch Tag: %s" PRISIZE_T, sWwiseSwitchNodeTag); AZ_Assert(false, "<Wwise> Unknown Wwise Switch Tag."); } return pNewSwitchImpl; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioSwitchStateImplData(const IATLSwitchStateImplData* const pOldAudioSwitchStateImplData) { azdestroy(const_cast<IATLSwitchStateImplData*>(pOldAudioSwitchStateImplData), Audio::AudioImplAllocator, SATLSwitchStateImplData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// const SATLEnvironmentImplData_wwise* CAudioSystemImpl_wwise::NewAudioEnvironmentImplData(const XmlNodeRef pAudioEnvironmentNode) { SATLEnvironmentImplData_wwise* pNewEnvironmentImpl = nullptr; if (azstricmp(pAudioEnvironmentNode->getTag(), sWwiseAuxBusTag) == 0) { const char* const sWwiseAuxBusName = pAudioEnvironmentNode->getAttr(sWwiseNameAttribute); const AkUniqueID nAKBusID = AK::SoundEngine::GetIDFromString(sWwiseAuxBusName); //Does not check if the string represents an event!!!! if (nAKBusID != AK_INVALID_AUX_ID) { pNewEnvironmentImpl = azcreate(SATLEnvironmentImplData_wwise, (eWAET_AUX_BUS, static_cast<AkAuxBusID>(nAKBusID)), Audio::AudioImplAllocator, "ATLEnvironmentImplData_wwise"); } else { AZ_Assert(false, "<Wwise> Unknown Aux Bus ID."); } } else if (azstricmp(pAudioEnvironmentNode->getTag(), sWwiseRtpcTag) == 0) { AkRtpcID nAKRtpcID = AK_INVALID_RTPC_ID; float fMult = 1.0f; float fShift = 0.0f; ParseRtpcImpl(pAudioEnvironmentNode, nAKRtpcID, fMult, fShift); if (nAKRtpcID != AK_INVALID_RTPC_ID) { pNewEnvironmentImpl = azcreate(SATLEnvironmentImplData_wwise, (eWAET_RTPC, nAKRtpcID, fMult, fShift), Audio::AudioImplAllocator, "ATLEnvironmentImplData_wwise"); } else { AZ_Assert(false, "<Wwise> Unknown RTPC ID."); } } return pNewEnvironmentImpl; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DeleteAudioEnvironmentImplData(const IATLEnvironmentImplData* const pOldEnvironmentImplData) { azdestroy(const_cast<IATLEnvironmentImplData*>(pOldEnvironmentImplData), Audio::AudioImplAllocator, SATLEnvironmentImplData_wwise); } /////////////////////////////////////////////////////////////////////////////////////////////////// const char* const CAudioSystemImpl_wwise::GetImplementationNameString() const { #if defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) return m_fullImplString.c_str(); #else return nullptr; #endif // INCLUDE_WWISE_IMPL_PRODUCTION_CODE } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::GetMemoryInfo(SAudioImplMemoryInfo& oMemoryInfo) const { oMemoryInfo.nPrimaryPoolSize = AZ::AllocatorInstance<Audio::AudioImplAllocator>::Get().Capacity(); oMemoryInfo.nPrimaryPoolUsedSize = AZ::AllocatorInstance<Audio::AudioImplAllocator>::Get().NumAllocatedBytes(); oMemoryInfo.nPrimaryPoolAllocations = 0; #if defined(PROVIDE_WWISE_IMPL_SECONDARY_POOL) oMemoryInfo.nSecondaryPoolSize = g_audioImplMemoryPoolSecondary_wwise.MemSize(); oMemoryInfo.nSecondaryPoolUsedSize = oMemoryInfo.nSecondaryPoolSize - g_audioImplMemoryPoolSecondary_wwise.MemFree(); oMemoryInfo.nSecondaryPoolAllocations = g_audioImplMemoryPoolSecondary_wwise.FragmentCount(); #else oMemoryInfo.nSecondaryPoolSize = 0; oMemoryInfo.nSecondaryPoolUsedSize = 0; oMemoryInfo.nSecondaryPoolAllocations = 0; #endif // PROVIDE_WWISE_IMPL_SECONDARY_POOL } /////////////////////////////////////////////////////////////////////////////////////////////////// AZStd::vector<AudioImplMemoryPoolInfo> CAudioSystemImpl_wwise::GetMemoryPoolInfo() { #if defined(INCLUDE_WWISE_IMPL_PRODUCTION_CODE) // Update pools... for (auto& poolInfo : m_debugMemoryPoolInfo) { AKRESULT akResult = AK::MemoryMgr::CheckPoolId(poolInfo.m_poolId); if (IS_WWISE_OK(akResult)) { AK::MemoryMgr::PoolStats poolStats; akResult = AK::MemoryMgr::GetPoolStats(poolInfo.m_poolId, poolStats); if (IS_WWISE_OK(akResult)) { poolInfo.m_memoryReserved = poolStats.uReserved; poolInfo.m_memoryUsed = poolStats.uUsed; poolInfo.m_peakUsed = poolStats.uPeakUsed; poolInfo.m_numAllocs = poolStats.uAllocs; poolInfo.m_numFrees = poolStats.uFrees; } } } // return the pool infos... return m_debugMemoryPoolInfo; #else return AZStd::vector<AudioImplMemoryPoolInfo>(); #endif // INCLUDE_WWISE_IMPL_PRODUCTION_CODE } /////////////////////////////////////////////////////////////////////////////////////////////////// bool CAudioSystemImpl_wwise::CreateAudioSource(const SAudioInputConfig& sourceConfig) { return AudioSourceManager::Get().CreateSource(sourceConfig); } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::DestroyAudioSource(TAudioSourceId sourceId) { AudioSourceManager::Get().DestroySource(sourceId); } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::SetPanningMode(PanningMode mode) { AkPanningRule panningRule; switch (mode) { case PanningMode::Speakers: panningRule = AkPanningRule_Speakers; break; case PanningMode::Headphones: panningRule = AkPanningRule_Headphones; break; default: return; } AKRESULT akResult = AK::SoundEngine::SetPanningRule(panningRule); if (!IS_WWISE_OK(akResult)) { g_audioImplLogger_wwise.Log(eALT_ERROR, "Wwise failed to set Panning Rule to [%s]\n", panningRule == AkPanningRule_Speakers ? "Speakers" : "Headphones"); } } /////////////////////////////////////////////////////////////////////////////////////////////////// const SATLSwitchStateImplData_wwise* CAudioSystemImpl_wwise::ParseWwiseSwitchOrState( XmlNodeRef pNode, EWwiseSwitchType eType) { SATLSwitchStateImplData_wwise* pSwitchStateImpl = nullptr; const char* const sWwiseSwitchNodeName = pNode->getAttr(sWwiseNameAttribute); if (sWwiseSwitchNodeName && (sWwiseSwitchNodeName[0] != '\0') && (pNode->getChildCount() == 1)) { const XmlNodeRef pValueNode(pNode->getChild(0)); if (pValueNode && azstricmp(pValueNode->getTag(), sWwiseValueTag) == 0) { const char* sWwiseSwitchStateName = pValueNode->getAttr(sWwiseNameAttribute); if (sWwiseSwitchStateName && (sWwiseSwitchStateName[0] != '\0')) { const AkUniqueID nAKSwitchID = AK::SoundEngine::GetIDFromString(sWwiseSwitchNodeName); const AkUniqueID nAKSwitchStateID = AK::SoundEngine::GetIDFromString(sWwiseSwitchStateName); pSwitchStateImpl = azcreate(SATLSwitchStateImplData_wwise, (eType, nAKSwitchID, nAKSwitchStateID), Audio::AudioImplAllocator, "ATLSwitchStateImplData_wwise"); } } } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "A Wwise Switch or State %s inside ATLSwitchState needs to have exactly one WwiseValue.", sWwiseSwitchNodeName); } return pSwitchStateImpl; } /////////////////////////////////////////////////////////////////////////////////////////////////// const SATLSwitchStateImplData_wwise* CAudioSystemImpl_wwise::ParseWwiseRtpcSwitch(XmlNodeRef pNode) { SATLSwitchStateImplData_wwise* pSwitchStateImpl = nullptr; const char* const sWwiseRtpcNodeName = pNode->getAttr(sWwiseNameAttribute); if (sWwiseRtpcNodeName && sWwiseRtpcNodeName[0] != '\0' && pNode->getChildCount() == 0) { float fRtpcValue = 0.f; if (pNode->getAttr(sWwiseValueAttribute, fRtpcValue)) { const AkUniqueID nAKRtpcID = AK::SoundEngine::GetIDFromString(sWwiseRtpcNodeName); pSwitchStateImpl = azcreate(SATLSwitchStateImplData_wwise, (eWST_RTPC, nAKRtpcID, nAKRtpcID, fRtpcValue), Audio::AudioImplAllocator, "ATLSwitchStateImplData_wwise"); } } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "A Wwise Rtpc '%s' inside ATLSwitchState shouldn't have any children.", sWwiseRtpcNodeName); } return pSwitchStateImpl; } /////////////////////////////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::ParseRtpcImpl(XmlNodeRef pNode, AkRtpcID& rAkRtpcID, float& rMult, float& rShift) { SATLRtpcImplData_wwise* pNewRtpcImpl = nullptr; if (azstricmp(pNode->getTag(), sWwiseRtpcTag) == 0) { const char* const sWwiseRtpcName = pNode->getAttr(sWwiseNameAttribute); rAkRtpcID = static_cast<AkRtpcID>(AK::SoundEngine::GetIDFromString(sWwiseRtpcName)); if (rAkRtpcID != AK_INVALID_RTPC_ID) { //the Wwise name is supplied pNode->getAttr(sWwiseMutiplierAttribute, rMult); pNode->getAttr(sWwiseShiftAttribute, rShift); } else { // Invalid Wwise RTPC name! AZ_Assert(false, "<Wwise> Invalid RTPC name: '%s'", sWwiseRtpcName); } } else { // Unknown Wwise RTPC tag! AZ_Assert(false, "<Wwise> Unknown RTPC tag: '%s'", sWwiseRtpcTag); } } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::PrepUnprepTriggerSync( const IATLTriggerImplData* const pTriggerData, bool bPrepare) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKTriggerImplData = static_cast<const SATLTriggerImplData_wwise*>(pTriggerData); if (pAKTriggerImplData) { AkUniqueID nImplAKID = pAKTriggerImplData->nAKID; const AKRESULT eAKResult = AK::SoundEngine::PrepareEvent( bPrepare ? AK::SoundEngine::Preparation_Load : AK::SoundEngine::Preparation_Unload, &nImplAKID, 1); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise PrepareEvent with %s failed for Wwise event %" PRISIZE_T " with AKRESULT: %" PRISIZE_T, bPrepare ? "Preparation_Load" : "Preparation_Unload", nImplAKID, eAKResult); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid ATLTriggerData or EventData passed to the Wwise implementation of %sTriggerSync", bPrepare ? "Prepare" : "Unprepare"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::PrepUnprepTriggerAsync( const IATLTriggerImplData* const pTriggerData, IATLEventData* const pEventData, bool bPrepare) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKTriggerImplData = static_cast<const SATLTriggerImplData_wwise*>(pTriggerData); auto const pAKEventData = static_cast<SATLEventData_wwise*>(pEventData); if (pAKTriggerImplData && pAKEventData) { AkUniqueID nImplAKID = pAKTriggerImplData->nAKID; const AKRESULT eAKResult = AK::SoundEngine::PrepareEvent( bPrepare ? AK::SoundEngine::Preparation_Load : AK::SoundEngine::Preparation_Unload, &nImplAKID, 1, &PrepareEventCallback, pAKEventData); if (IS_WWISE_OK(eAKResult)) { pAKEventData->nAKID = nImplAKID; pAKEventData->audioEventState = eAES_UNLOADING; eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log( eALT_WARNING, "Wwise PrepareEvent with %s failed for Wwise event %" PRISIZE_T " with AKRESULT: %d", bPrepare ? "Preparation_Load" : "Preparation_Unload", nImplAKID, eAKResult); } } else { g_audioImplLogger_wwise.Log(eALT_ERROR, "Invalid ATLTriggerData or EventData passed to the Wwise implementation of %sTriggerAsync", bPrepare ? "Prepare" : "Unprepare"); } return eResult; } /////////////////////////////////////////////////////////////////////////////////////////////////// bool CAudioSystemImpl_wwise::SEnvPairCompare::operator()(const AZStd::pair<const AkAuxBusID, float>& pair1, const AZStd::pair<const AkAuxBusID, float>& pair2) const { return (pair1.second > pair2.second); } /////////////////////////////////////////////////////////////////////////////////////////////////// EAudioRequestStatus CAudioSystemImpl_wwise::PostEnvironmentAmounts(IATLAudioObjectData* const pAudioObjectData) { EAudioRequestStatus eResult = eARS_FAILURE; auto const pAKObjectData = static_cast<SATLAudioObjectData_wwise*>(pAudioObjectData); if (pAKObjectData) { AkAuxSendValue aAuxValues[LY_MAX_AUX_PER_OBJ]; uint32 nAuxCount = 0; SATLAudioObjectData_wwise::TEnvironmentImplMap::iterator iEnvPair = pAKObjectData->cEnvironmentImplAmounts.begin(); const SATLAudioObjectData_wwise::TEnvironmentImplMap::const_iterator iEnvStart = pAKObjectData->cEnvironmentImplAmounts.begin(); const SATLAudioObjectData_wwise::TEnvironmentImplMap::const_iterator iEnvEnd = pAKObjectData->cEnvironmentImplAmounts.end(); if (pAKObjectData->cEnvironmentImplAmounts.size() <= LY_MAX_AUX_PER_OBJ) { for (; iEnvPair != iEnvEnd; ++nAuxCount) { const float fAmount = iEnvPair->second; aAuxValues[nAuxCount].auxBusID = iEnvPair->first; aAuxValues[nAuxCount].fControlValue = fAmount; aAuxValues[nAuxCount].listenerID = m_defaultListenerGameObjectID; // TODO: Expand api to allow specify listeners // If an amount is zero, we still want to send it to the middleware, but we also want to remove it from the map. if (fAmount == 0.0f) { iEnvPair = pAKObjectData->cEnvironmentImplAmounts.erase(iEnvPair); } else { ++iEnvPair; } } } else { // sort the environments in order of decreasing amounts and take the first LY_MAX_AUX_PER_OBJ worth using TEnvPairSet = AZStd::set<SATLAudioObjectData_wwise::TEnvironmentImplMap::value_type, SEnvPairCompare, Audio::AudioImplStdAllocator>; TEnvPairSet cEnvPairs(iEnvStart, iEnvEnd); TEnvPairSet::const_iterator iSortedEnvPair = cEnvPairs.begin(); const TEnvPairSet::const_iterator iSortedEnvEnd = cEnvPairs.end(); for (; (iSortedEnvPair != iSortedEnvEnd) && (nAuxCount < LY_MAX_AUX_PER_OBJ); ++iSortedEnvPair, ++nAuxCount) { aAuxValues[nAuxCount].auxBusID = iSortedEnvPair->first; aAuxValues[nAuxCount].fControlValue = iSortedEnvPair->second; aAuxValues[nAuxCount].listenerID = m_defaultListenerGameObjectID; // TODO: Expand api to allow specify listeners } // remove all Environments with 0.0 amounts while (iEnvPair != iEnvEnd) { if (iEnvPair->second == 0.0f) { iEnvPair = pAKObjectData->cEnvironmentImplAmounts.erase(iEnvPair); } else { ++iEnvPair; } } } AZ_Assert(nAuxCount <= LY_MAX_AUX_PER_OBJ, "WwiseImpl PostEnvironmentAmounts - Exceeded the allowed number of aux environments that can be set!"); const AKRESULT eAKResult = AK::SoundEngine::SetGameObjectAuxSendValues(pAKObjectData->nAKID, aAuxValues, nAuxCount); if (IS_WWISE_OK(eAKResult)) { eResult = eARS_SUCCESS; } else { g_audioImplLogger_wwise.Log(eALT_WARNING, "Wwise SetGameObjectAuxSendValues failed on object %" PRISIZE_T " with AKRESULT: %d", pAKObjectData->nAKID, eAKResult); } pAKObjectData->bNeedsToUpdateEnvironments = false; } return eResult; } ////////////////////////////////////////////////////////////////////////// const char* const CAudioSystemImpl_wwise::GetImplSubPath() const { return sWwiseImplSubPath; } ////////////////////////////////////////////////////////////////////////// void CAudioSystemImpl_wwise::SetLanguage(const char* const sLanguage) { if (sLanguage) { CryFixedStringT<MAX_AUDIO_FILE_NAME_LENGTH> sLanguageFolder; if (azstricmp(sLanguage, "english") == 0) { sLanguageFolder = "english(us)"; } else { sLanguageFolder = sLanguage;// TODO: handle the other possible language variations } sLanguageFolder += "/"; m_sLocalizedSoundBankFolder = m_sRegularSoundBankFolder; m_sLocalizedSoundBankFolder += sLanguageFolder.c_str(); const AkOSChar* pTemp = nullptr; CONVERT_CHAR_TO_OSCHAR(sLanguageFolder.c_str(), pTemp); m_oFileIOHandler.SetLanguageFolder(pTemp); } } } // namespace Audio
41.368775
216
0.567329
raghnarx
02cf532d01e690c3f2cad14f25bdb78d6a67a00a
901
hpp
C++
eagleeye/engine/nano/dataflow/edge.hpp
jianzfb/eagleeye
e28810033eb656b181b6291ca702da825c4946c2
[ "Apache-2.0" ]
12
2020-09-21T02:24:11.000Z
2022-03-10T03:02:03.000Z
eagleeye/engine/nano/dataflow/edge.hpp
jianzfb/eagleeye
e28810033eb656b181b6291ca702da825c4946c2
[ "Apache-2.0" ]
1
2020-11-30T08:22:50.000Z
2020-11-30T08:22:50.000Z
eagleeye/engine/nano/dataflow/edge.hpp
jianzfb/eagleeye
e28810033eb656b181b6291ca702da825c4946c2
[ "Apache-2.0" ]
3
2020-03-16T12:10:55.000Z
2021-07-20T09:58:15.000Z
#ifndef _EAGLEEYE_EDGE_H_ #define _EAGLEEYE_EDGE_H_ #include "eagleeye/common/EagleeyeMacro.h" #include <atomic> #include <memory> namespace eagleeye{ namespace dataflow { class Node; class Edge { public: Edge(Node & prev,int prev_slot, Node & next, int next_slot) noexcept : prev_(prev), next_(next), prev_slot_(prev_slot), next_slot_(next_slot) { lock_ = false; } Node & next() noexcept { return next_; } Node & prev() noexcept { return prev_; } int pre_slot() noexcept{ return prev_slot_; } int next_slot() noexcept{ return next_slot_; } bool lock() noexcept { bool f = lock_; lock_ = true; return f; } void unlock() noexcept { lock_ = false; } bool is_locked() const noexcept { return lock_; } private: std::atomic_bool lock_; Node & prev_; int prev_slot_; Node & next_; int next_slot_; }; } } #endif
15.534483
76
0.654828
jianzfb
02d11b00ed9f12293827bdb5794aa8c352b25e60
11,728
cpp
C++
Lab1/task/Source.cpp
ChernichenkoStephan/ProductionPractices
c3bd544d0cac56a801923e705a685fd2f9fcf247
[ "MIT" ]
null
null
null
Lab1/task/Source.cpp
ChernichenkoStephan/ProductionPractices
c3bd544d0cac56a801923e705a685fd2f9fcf247
[ "MIT" ]
null
null
null
Lab1/task/Source.cpp
ChernichenkoStephan/ProductionPractices
c3bd544d0cac56a801923e705a685fd2f9fcf247
[ "MIT" ]
null
null
null
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; /* g++ -w -o out Source.cpp && ./out g++ -o out Source.cpp */ int main() { srand(time(NULL)); int n1, m1, n2, m2, k, l = 2; system("chcp 1251"); cout << "��� ������������ ���������" << endl << "�������� ������������ ������ ������� ���������\n\n"; /////////////////////////////////////////////////////////////////////////////// ////////////////////���� �������� ������� �������������//////////////////////// /////////////////////////////////////////////////////////////////////////////// do { cout << "������� ������� ������ �������\n"; cin >> n1 >> m1; } while (n1 <= 0 || m1 <= 0); do { cout << "������� ������� ������ �������\n"; cin >> n2 >> m2; } while (n2 <= 0 || m2 <= 0); int** M1 = new int* [n1]; for (int i = 0; i < n1; i++) M1[i] = new int[m1]; int** M2 = new int* [n2]; for (int i = 0; i < n2; i++) M2[i] = new int[m2]; /////////////////////////////////////////////////////////////////////////////// ////////////////����� ������� ���������� � ���������� ������/////////////////// /////////////////////////////////////////////////////////////////////////////// do { cout << "�������� ������ ���������� ������\n" << "1 - ������� \n2 - ��������� �������\n"; cin >> k; } while (k < 1 || k > 2); switch (k) { case 1: for (int i = 0; i < n1; i++) for (int j = 0; j < m1; j++) cin >> M1[i][j]; for (int i = 0; i < n2; i++) for (int j = 0; j < m2; j++) cin >> M2[i][j]; cout << "\n������� 1\n\n"; for (int i = 0; i < n1; i++) { for (int j = 0; j < m1; j++) cout << M1[i][j] << " "; cout << endl; } cout << "\n������� 2\n\n"; for (int i = 0; i < n2; i++) { for (int j = 0; j < m2; j++) cout << M2[i][j] << " "; cout << endl; } break; case 2: for (int i = 0; i < n1; i++) for (int j = 0; j < m1; j++) M1[i][j] = rand() % 10; for (int i = 0; i < n2; i++) for (int j = 0; j < m2; j++) M2[i][j] = rand() % 10; cout << "\n������� 1\n\n"; for (int i = 0; i < n1; i++) { for (int j = 0; j < m1; j++) cout << M1[i][j] << " "; cout << endl; } cout << "\n������� 2\n\n"; for (int i = 0; i < n2; i++) { for (int j = 0; j < m2; j++) cout << M2[i][j] << " "; cout << endl; } break; } /////////////////////////////////////////////////////////////////////////////// /////////////////���������� ������ � ���������� �������//////////////////////// /////////////////////////////////////////////////////////////////////////////// while (l < n1 || l < n2 || l < m1 || l < m2) l *= 2; int** M3 = new int* [l]; for (int i = 0; i < l; i++) { M3[i] = new int[l]; for (int j = 0; j < l; j++) M3[i][j] = 0; } int** M4 = new int* [l]; for (int i = 0; i < l; i++) { M4[i] = new int[l]; for (int j = 0; j < l; j++) M4[i][j] = 0; } for (int i = 0; i < n1; i++) { for (int j = 0; j < m1; j++) M3[i][j] = M1[i][j]; } for (int i = 0; i < n2; i++) { for (int j = 0; j < m2; j++) M4[i][j] = M2[i][j]; } cout << "����������� �������\n"; cout << "\n������� 1\n\n"; for (int i = 0; i < l; i++) { for (int j = 0; j < l; j++) cout << M3[i][j] << " "; cout << endl; } cout << "\n������� 2\n\n"; for (int i = 0; i < l; i++) { for (int j = 0; j < l; j++) cout << M4[i][j] << " "; cout << endl; } /////////////////////////////////////////////////////////////////////////////// ///////////////��������� ������ �� ���������� � �� ����������////////////////// /////////////////////////////////////////////////////////////////////////////// int** mat1 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat1[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat1[i][j] = M3[i][j]; } int** mat2 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat2[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat2[i][j] = M3[i][j + l / 2]; } int** mat3 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat3[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat3[i][j] = M3[i + l / 2][j]; } int** mat4 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat4[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat4[i][j] = M3[i + l / 2][j + l / 2]; } int** mat5 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat5[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat5[i][j] = M4[i][j]; } int** mat6 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat6[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat6[i][j] = M4[i][j + l / 2]; } int** mat7 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat7[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat7[i][j] = M4[i + l / 2][j]; } int** mat8 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat8[i] = new int[l / 2]; for (int j = 0; j < l / 2; j++) mat8[i][j] = M4[i + l / 2][j + l / 2]; } /////////////////////////////////////////////////////////////////////////////// ////////////////////////�������� ������������� ������////////////////////////// /////////////////////////////////////////////////////////////////////////////// int** p1 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p1[i] = new int[l / 2]; } int** p2 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p2[i] = new int[l / 2]; } int** p3 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p3[i] = new int[l / 2]; } int** p4 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p4[i] = new int[l / 2]; } int** p5 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p5[i] = new int[l / 2]; } int** p6 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p6[i] = new int[l / 2]; } int** p7 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { p7[i] = new int[l / 2]; } /////////////////////////////////////////////////////////////////////////////// ////////////////////���������� �������� ������������� ������/////////////////// /////////////////////////////////////////////////////////////////////////////// for (int i = 0; i < l / 2; i++) { for (int j = 0; j < l / 2; j++) { p1[i][j] = 0; for (int z = 0; z < l / 2; z++) { p1[i][j] += (mat1[i][z] + mat4[i][z]) * (mat5[z][j] + mat8[z][j]); } p2[i][j] = 0; for (int z = 0; z < l / 2; z++) { p2[i][j] += (mat3[i][z] + mat4[i][z]) * mat5[z][j]; } p3[i][j] = 0; for (int z = 0; z < l / 2; z++) { p3[i][j] += mat1[i][z] * (mat6[z][j] - mat8[z][j]); } p4[i][j] = 0; for (int z = 0; z < l / 2; z++) { p4[i][j] += mat4[i][z] * (mat7[z][j] - mat5[z][j]); } p5[i][j] = 0; for (int z = 0; z < l / 2; z++) { p5[i][j] += (mat1[i][z] + mat2[i][z]) * mat8[z][j]; } p6[i][j] = 0; for (int z = 0; z < l / 2; z++) { p6[i][j] += (mat3[i][z] - mat1[i][z]) * (mat5[z][j] + mat6[z][j]); } p7[i][j] = 0; for (int z = 0; z < l / 2; z++) { p7[i][j] += (mat2[i][z] - mat4[i][z]) * (mat7[z][j] + mat8[z][j]); } } } /////////////////////////////////////////////////////////////////////////////// ///////////////////////�������� ��������������� ������///////////////////////// /////////////////////////////////////////////////////////////////////////////// int** mat9 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat9[i] = new int[l / 2]; } int** mat10 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat10[i] = new int[l / 2]; } int** mat11 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat11[i] = new int[l / 2]; } int** mat12 = new int* [l / 2]; for (int i = 0; i < l / 2; i++) { mat12[i] = new int[l / 2]; } /////////////////////////////////////////////////////////////////////////////// ////////////������� �������� ��������������� ������ �� �������������/////////// /////////////////////////////////////////////////////////////////////////////// for (int i = 0; i < l / 2; i++) { for (int j = 0; j < l / 2; j++) { mat9[i][j] = p1[i][j] + p4[i][j] - p5[i][j] + p7[i][j]; mat10[i][j] = p3[i][j] + p5[i][j]; mat11[i][j] = p2[i][j] + p4[i][j]; mat12[i][j] = p1[i][j] - p2[i][j] + p3[i][j] + p6[i][j]; } } /////////////////////////////////////////////////////////////////////////////// ///////////////////�������� �������������� �������///////////////////////////// /////////////////////////////////////////////////////////////////////////////// int** M5 = new int* [l]; for (int i = 0; i < l; i++) { M5[i] = new int[l]; } /////////////////////////////////////////////////////////////////////////////// ///////��������� ���������� �� ��������������� ������ � ��������������///////// /////////////////////////////////////////////////////////////////////////////// for (int i = 0; i < l / 2; i++) { for (int j = 0; j < l / 2; j++) { M5[i][j] = mat9[i][j]; M5[i][j + l / 2] = mat10[i][j]; M5[i + l / 2][j] = mat11[i][j]; M5[i + l / 2][j + l / 2] = mat12[i][j]; } } /////////////////////////////////////////////////////////////////////////////// ////////////////������������ ������ �������������� �������///////////////////// /////////////////////////////////////////////////////////////////////////////// int x = 0, f = 100, s = 100; for (int i = 0; i < l; i++) { x = 0; for (int j = 0; j < l; j++) { if (M5[i][j] != 0) { x++; f = 100; } } if (x == 0 && i < f) { f = i; } } for (int i = 0; i < l; i++) { x = 0; for (int j = 0; j < l; j++) { if (M5[j][i] != 0) { x++; s = 100; } } if (x == 0 && i < s) { s = i; } } int** M6 = new int* [f]; for (int i = 0; i < f; i++) { M6[i] = new int[s]; for (int j = 0; j < s; j++) M6[i][j] = M5[i][j]; } /////////////////////////////////////////////////////////////////////////////// ///////////////////����� �������������� �������//////////////////////////////// /////////////////////////////////////////////////////////////////////////////// cout << "\n�������������� �������\n\n"; for (int i = 0; i < f; i++) { for (int j = 0; j < s; j++) cout << M6[i][j] << " "; cout << endl; } system("pause"); /////////////////////////////////////////////////////////////////////////////// /////////////////////������� ������������ ������/////////////////////////////// /////////////////////////////////////////////////////////////////////////////// for (int i = 0; i < n1; i++) delete[] M1[i]; for (int i = 0; i < n2; i++) delete[] M2[i]; for (int i = 0; i < l; i++) { delete[] M3[i]; delete[] M4[i]; delete[] M5[i]; } for (int i = 0; i < f; i++) delete[] M6[i]; for (int i = 0; i < l / 2; i++) { delete[] mat1[i]; delete[] mat2[i]; delete[] mat3[i]; delete[] mat4[i]; delete[] mat5[i]; delete[] mat6[i]; delete[] mat7[i]; delete[] mat8[i]; delete[] mat9[i]; delete[] mat10[i]; delete[] mat11[i]; delete[] mat12[i]; delete[] p1[i]; delete[] p2[i]; delete[] p3[i]; delete[] p4[i]; delete[] p5[i]; delete[] p6[i]; delete[] p7[i]; } delete[] M1, M2, M3, M4, M5, M6; delete[] mat1, mat2, mat3, mat4, mat5, mat6, mat7, mat8, mat9, mat10, mat11, mat12; delete[] p1, p2, p3, p4, p5, p6, p7; return 0; }
25.11349
85
0.255286
ChernichenkoStephan
02d180afd06642b3b4302d112e23071fd11023cd
29,393
cpp
C++
dep/acelite/ace/SOCK_Dgram_Mcast.cpp
forgottenlands/ForgottenCore406
5dbbef6b3b0b17c277fde85e40ec9fdab0b51ad1
[ "OpenSSL" ]
42
2015-01-05T10:00:07.000Z
2022-02-18T14:51:33.000Z
dep/acelite/ace/SOCK_Dgram_Mcast.cpp
Frankenhooker/ArkCORE
0a7be7fc0b67e9ef3de421ab5de6012eac7dec6d
[ "OpenSSL" ]
null
null
null
dep/acelite/ace/SOCK_Dgram_Mcast.cpp
Frankenhooker/ArkCORE
0a7be7fc0b67e9ef3de421ab5de6012eac7dec6d
[ "OpenSSL" ]
31
2015-01-09T02:04:29.000Z
2021-09-01T13:20:20.000Z
// $Id: SOCK_Dgram_Mcast.cpp 92580 2010-11-15 09:48:02Z johnnyw $ #include "ace/SOCK_Dgram_Mcast.h" #include "ace/OS_Memory.h" #include "ace/OS_NS_string.h" #include "ace/OS_NS_errno.h" #include "ace/os_include/net/os_if.h" #include "ace/os_include/arpa/os_inet.h" #if defined (__linux__) && defined (ACE_HAS_IPV6) #include "ace/OS_NS_sys_socket.h" #endif #if defined (ACE_HAS_IPV6) && defined (ACE_WIN32) #include /**/ <iphlpapi.h> #endif #if !defined (__ACE_INLINE__) #include "ace/SOCK_Dgram_Mcast.inl" #endif /* __ACE_INLINE__ */ #include "ace/Log_Msg.h" // This is a workaround for platforms with non-standard // definitions of the ip_mreq structure #if ! defined (IMR_MULTIADDR) #define IMR_MULTIADDR imr_multiaddr #endif /* ! defined (IMR_MULTIADDR) */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Helper (inline) functions. class ACE_SDM_helpers { public: // Convert ACE_INET_Addr to string, using local formatting rules. static void addr_to_string (const ACE_INET_Addr &ip_addr, ACE_TCHAR *ret_string, // results here. size_t len, int clip_portnum) // clip port# info? { if (ip_addr.addr_to_string (ret_string, len, 1) == -1) ACE_OS::strcpy (ret_string, ACE_TEXT ("<?>")); else { ACE_TCHAR *pc = ACE_OS::strrchr (ret_string, ACE_TEXT (':')); if (clip_portnum && pc) *pc = ACE_TEXT ('\0'); // clip port# info. } } // op== for ip_mreq structs. static int is_equal (const ip_mreq &m1, const ip_mreq &m2) { return m1.IMR_MULTIADDR.s_addr == m2.IMR_MULTIADDR.s_addr && m1.imr_interface.s_addr == m2.imr_interface.s_addr; } }; ACE_ALLOC_HOOK_DEFINE (ACE_SOCK_Dgram_Mcast) void ACE_SOCK_Dgram_Mcast::dump (void) const { #if defined (ACE_HAS_DUMP) ACE_TRACE ("ACE_SOCK_Dgram_Mcast::dump"); ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); # if defined (ACE_SOCK_DGRAM_MCAST_DUMPABLE) ACE_TCHAR addr_string[MAXNAMELEN + 1]; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\nOptions: bindaddr=%s, nulliface=%s\n"), ACE_BIT_ENABLED (this->opts_, OPT_BINDADDR_YES) ? ACE_TEXT ("<Bound>") : ACE_TEXT ("<Not Bound>"), ACE_BIT_ENABLED (this->opts_, OPT_NULLIFACE_ALL) ? ACE_TEXT ("<All Ifaces>") : ACE_TEXT ("<Default Iface>"))); // Show default send addr, port#, and interface. ACE_SDM_helpers::addr_to_string (this->send_addr_, addr_string, sizeof addr_string, 0); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Send addr=%s iface=%s\n"), addr_string, this->send_net_if_ ? this->send_net_if_ : ACE_TEXT ("<default>"))); // Show list of subscribed addresses. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Subscription list:\n"))); ACE_MT (ACE_GUARD (ACE_SDM_LOCK, guard, this->subscription_list_lock_)); subscription_list_iter_t iter (this->subscription_list_); for ( ; !iter.done (); iter.advance ()) { ACE_TCHAR iface_string[MAXNAMELEN + 1]; ip_mreq *pm = iter.next (); // Get subscribed address (w/out port# info - not relevant). ACE_INET_Addr ip_addr (static_cast<u_short> (0), ACE_NTOHL (pm->IMR_MULTIADDR.s_addr)); ACE_SDM_helpers::addr_to_string (ip_addr, addr_string, sizeof addr_string, 1); // Get interface address/specification. ACE_INET_Addr if_addr (static_cast<u_short> (0), ACE_NTOHL (pm->imr_interface.s_addr)); ACE_SDM_helpers::addr_to_string (if_addr, iface_string, sizeof iface_string, 1); if (ACE_OS::strcmp (iface_string, ACE_TEXT ("0.0.0.0")) == 0) // Receives on system default iface. (Note that null_iface_opt_ // option processing has already occurred.) ACE_OS::strcpy (iface_string, ACE_TEXT ("<default>")); // Dump info. ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\taddr=%s iface=%s\n"), addr_string, iface_string)); } # endif /* ACE_SOCK_DGRAM_MCAST_DUMPABLE */ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); #endif /* ACE_HAS_DUMP */ } // Constructor. ACE_SOCK_Dgram_Mcast::ACE_SOCK_Dgram_Mcast (ACE_SOCK_Dgram_Mcast::options opts) : opts_ (opts), send_net_if_ (0) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::ACE_SOCK_Dgram_Mcast"); } // Destructor. ACE_SOCK_Dgram_Mcast::~ACE_SOCK_Dgram_Mcast (void) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::~ACE_SOCK_Dgram_Mcast"); // Free memory and optionally unsubscribe from currently subscribed group(s). delete [] this->send_net_if_; this->clear_subs_list (); } int ACE_SOCK_Dgram_Mcast::open (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if, int reuse_addr) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::open"); // Only perform the <open> initialization if we haven't been opened // earlier. // No sanity check? We should probably flag an error if the user // makes multiple calls to open(). if (this->get_handle () != ACE_INVALID_HANDLE) return 0; // Invoke lower-layer ::open. if (ACE_SOCK::open (SOCK_DGRAM, mcast_addr.get_type (), 0, // always use 0 reuse_addr) == -1) return -1; return this->open_i (mcast_addr, net_if, reuse_addr); } int ACE_SOCK_Dgram_Mcast::open_i (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if, int reuse_addr) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::open_i"); // ACE_SOCK::open calls this if reuse_addr is set, so we only need to // process port reuse option. if (reuse_addr) { #if defined (SO_REUSEPORT) int one = 1; if (this->ACE_SOCK::set_option (SOL_SOCKET, SO_REUSEPORT, &one, sizeof one) == -1) return -1; #endif /* SO_REUSEPORT */ } // Create an address/port# to bind the socket to. Use mcast_addr to // initialize bind_addy to pick up the correct protocol family. If // OPT_BINDADDR_YES is set, then we're done. Else use mcast_addr's // port number and use the "any" address. ACE_INET_Addr bind_addy (mcast_addr); if (ACE_BIT_DISABLED (this->opts_, OPT_BINDADDR_YES)) { #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == PF_INET6) { if (bind_addy.set (mcast_addr.get_port_number (), "::", 1, AF_INET6) == -1) return -1; } else // Bind to "any" address and explicit port#. if (bind_addy.set (mcast_addr.get_port_number ()) == -1) return -1; #else // Bind to "any" address and explicit port#. if (bind_addy.set (mcast_addr.get_port_number ()) == -1) return -1; #endif /* ACE_HAS_IPV6 */ } // Bind to the address (which may be INADDR_ANY) and port# (which may be 0) if (ACE_SOCK_Dgram::shared_open (bind_addy, bind_addy.get_type ()) == -1) return -1; // Cache the actual bound address (which may be INADDR_ANY) // and the actual bound port# (which will be a valid, non-zero port#). ACE_INET_Addr bound_addy; if (this->get_local_addr (bound_addy) == -1) { // (Unexpected failure - should be bound to something) if (bound_addy.set (bind_addy) == -1) { // (Shouldn't happen - bind_addy is a valid addy; punt.) return -1; } } this->send_addr_ = mcast_addr; this->send_addr_.set_port_number (bound_addy.get_port_number ()); if (net_if) { if (this->set_nic (net_if, mcast_addr.get_type ())) return -1; this->send_net_if_ = new ACE_TCHAR[ACE_OS::strlen (net_if) + 1]; ACE_OS::strcpy (this->send_net_if_, net_if); } return 0; } int ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if, int reuse_addr) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::subscribe_ifs"); if (ACE_BIT_ENABLED (this->opts_, OPT_NULLIFACE_ALL) && net_if == 0) { #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == AF_INET6) { size_t nr_subscribed = 0; # if defined(__linux__) struct if_nameindex *intf = 0; intf = ACE_OS::if_nameindex (); if (intf == 0) return -1; int index = 0; while (intf[index].if_index != 0 || intf[index].if_name != 0) { if (this->join (mcast_addr, reuse_addr, ACE_TEXT_CHAR_TO_TCHAR(intf[index].if_name)) == 0) ++nr_subscribed; ++index; } ACE_OS::if_freenameindex (intf); # elif defined (ACE_WIN32) IP_ADAPTER_ADDRESSES tmp_addrs; // Initial call to determine actual memory size needed DWORD dwRetVal; ULONG bufLen = 0; if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6, 0, 0, &tmp_addrs, &bufLen)) != ERROR_BUFFER_OVERFLOW) return -1; // With output bufferlength 0 this can't be right. // Get required output buffer and retrieve info for real. PIP_ADAPTER_ADDRESSES pAddrs; char *buf; ACE_NEW_RETURN (buf, char[bufLen], -1); pAddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES> (buf); if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6, 0, 0, pAddrs, &bufLen)) != NO_ERROR) { delete[] buf; // clean up return -1; } while (pAddrs) { if (this->join (mcast_addr, reuse_addr, ACE_TEXT_CHAR_TO_TCHAR(pAddrs->AdapterName)) == 0) ++nr_subscribed; pAddrs = pAddrs->Next; } delete[] buf; // clean up # endif /* ACE_WIN32 */ if (nr_subscribed == 0) { errno = ENODEV; return -1; } return 1; } else { // Subscribe on all local multicast-capable network interfaces, by // doing recursive calls with specific interfaces. ACE_INET_Addr *if_addrs = 0; size_t if_cnt; if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) return -1; size_t nr_subscribed = 0; if (if_cnt < 2) { if (this->join (mcast_addr, reuse_addr, ACE_TEXT ("0.0.0.0")) == 0) ++nr_subscribed; } else { // Iterate through all the interfaces, figure out which ones // offer multicast service, and subscribe to them. while (if_cnt > 0) { --if_cnt; // Convert to 0-based for indexing, next loop check. if (if_addrs[if_cnt].get_type () != AF_INET || if_addrs[if_cnt].is_loopback ()) continue; char addr_buf[INET6_ADDRSTRLEN]; if (this->join (mcast_addr, reuse_addr, ACE_TEXT_CHAR_TO_TCHAR (if_addrs[if_cnt].get_host_addr (addr_buf, INET6_ADDRSTRLEN))) == 0) ++nr_subscribed; } } delete [] if_addrs; if (nr_subscribed == 0) { errno = ENODEV; return -1; } // 1 indicates a "short-circuit" return. This handles the // recursive behavior of checking all the interfaces. return 1; } #else // Subscribe on all local multicast-capable network interfaces, by // doing recursive calls with specific interfaces. ACE_INET_Addr *if_addrs = 0; size_t if_cnt; if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) return -1; size_t nr_subscribed = 0; if (if_cnt < 2) { if (this->join (mcast_addr, reuse_addr, ACE_TEXT ("0.0.0.0")) == 0) ++nr_subscribed; } else { // Iterate through all the interfaces, figure out which ones // offer multicast service, and subscribe to them. while (if_cnt > 0) { --if_cnt; // Convert to 0-based for indexing, next loop check. if (if_addrs[if_cnt].is_loopback ()) continue; char addr_buf[INET6_ADDRSTRLEN]; if (this->join (mcast_addr, reuse_addr, ACE_TEXT_CHAR_TO_TCHAR (if_addrs[if_cnt].get_host_addr (addr_buf, INET6_ADDRSTRLEN))) == 0) ++nr_subscribed; } } delete [] if_addrs; if (nr_subscribed == 0) { errno = ENODEV; return -1; } // 1 indicates a "short-circuit" return. This handles the // recursive behavior of checking all the interfaces. return 1; #endif /* ACE_HAS_IPV6 */ } #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == AF_INET6) { if (this->make_multicast_ifaddr6 (0, mcast_addr, net_if) == -1) return -1; } else { // Validate passed multicast addr and iface specifications. if (this->make_multicast_ifaddr (0, mcast_addr, net_if) == -1) return -1; } #else // Validate passed multicast addr and iface specifications. if (this->make_multicast_ifaddr (0, mcast_addr, net_if) == -1) return -1; #endif /* ACE_HAS_IPV6 */ return 0; } int ACE_SOCK_Dgram_Mcast::join (const ACE_INET_Addr &mcast_addr, int reuse_addr, const ACE_TCHAR *net_if) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::join"); ACE_INET_Addr subscribe_addr = mcast_addr; // If port# is 0, insert bound port# if it is set. (To satisfy lower-level // port# validation.) u_short def_port_number = this->send_addr_.get_port_number (); if (subscribe_addr.get_port_number () == 0 && def_port_number != 0) { subscribe_addr.set_port_number (def_port_number); } // Check for port# different than bound port#. u_short sub_port_number = mcast_addr.get_port_number (); if (sub_port_number != 0 && def_port_number != 0 && sub_port_number != def_port_number) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("Subscribed port# (%u) different than bound ") ACE_TEXT ("port# (%u).\n"), (u_int) sub_port_number, (u_int) def_port_number)); errno = ENXIO; return -1; } // If bind_addr_opt_ is enabled, check for address different than // bound address. ACE_INET_Addr tmp_addr (this->send_addr_); tmp_addr.set_port_number (mcast_addr.get_port_number ()); // force equal port numbers if (ACE_BIT_ENABLED (this->opts_, OPT_BINDADDR_YES) && !this->send_addr_.is_any () && this->send_addr_ != mcast_addr) { ACE_TCHAR sub_addr_string[MAXNAMELEN + 1]; ACE_TCHAR bound_addr_string[MAXNAMELEN + 1]; ACE_SDM_helpers::addr_to_string (mcast_addr, sub_addr_string, sizeof sub_addr_string, 1); ACE_SDM_helpers::addr_to_string (this->send_addr_, bound_addr_string, sizeof bound_addr_string, 1); ACE_ERROR ((LM_ERROR, ACE_TEXT ("Subscribed address (%s) different than ") ACE_TEXT ("bound address (%s).\n"), sub_addr_string, bound_addr_string)); errno = ENXIO; return -1; } // Attempt subscription. int result = this->subscribe_i (subscribe_addr, reuse_addr, net_if); #if defined (ACE_SOCK_DGRAM_MCAST_DUMPABLE) if (result == 0) { // Add this addr/iface info to the list of subscriptions. // (Assumes this is unique addr/iface combo - most systems don't allow // re-sub to same addr/iface.) ip_mreq *pmreq = new ip_mreq; // (should not fail) if (this->make_multicast_ifaddr (pmreq, subscribe_addr, net_if) != -1) { ACE_MT (ACE_GUARD_RETURN (ACE_SDM_LOCK, guard, this->subscription_list_lock_, -1)); this->subscription_list_.insert_tail (pmreq); return 0; } // this still isn't really right. If ACE_GUARD_RETURN fails, we leak. // Need to add one of Chris' fancy ace auto pointers (bound?). delete pmreq; } #endif /* ACE_SOCK_DGRAM_MCAST_DUMPABLE */ return result >= 0 ? 0 : result; } // Attempt subscribe and return status. int ACE_SOCK_Dgram_Mcast::subscribe_i (const ACE_INET_Addr &mcast_addr, int reuse_addr, const ACE_TCHAR *net_if) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::subscribe_i"); ip_mreq mreq; #if defined (ACE_HAS_IPV6) ipv6_mreq mreq6; #endif /* __linux__ && ACE_HAS_IPV6 */ // Open the socket IFF this is the first ::subscribe and ::open // was not explicitly invoked. if (this->open (mcast_addr, net_if, reuse_addr) == -1) return -1; // Only do this if net_if == 0, i.e., INADDR_ANY if (net_if == 0) { int result = this->subscribe_ifs (mcast_addr, net_if, reuse_addr); // Check for error or "short-circuit" return. if (result != 0) return result; } #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == AF_INET6) { if (this->make_multicast_ifaddr6 (&mreq6, mcast_addr, net_if) == -1) return -1; // Tell IP stack to pass messages sent to this group. else if (this->ACE_SOCK::set_option (IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq6, sizeof mreq6) == -1) return -1; return 0; } // Fall through for IPv4 case #endif /* ACE_HAS_IPV6 */ // Create multicast addr/if struct. if (this->make_multicast_ifaddr (&mreq, mcast_addr, net_if) == -1) return -1; // Tell IP stack to pass messages sent to this group. else if (this->ACE_SOCK::set_option (IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof mreq) == -1) return -1; return 0; } int ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::unsubscribe_ifs"); if (ACE_BIT_ENABLED (this->opts_, OPT_NULLIFACE_ALL) && net_if == 0) { #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == AF_INET6) { size_t nr_unsubscribed = 0; # if defined(__linux__) struct if_nameindex *intf; intf = ACE_OS::if_nameindex (); if (intf == 0) return -1; int index = 0; while (intf[index].if_index != 0 || intf[index].if_name != 0) { if (this->leave (mcast_addr, ACE_TEXT_CHAR_TO_TCHAR(intf[index].if_name)) == 0) ++nr_unsubscribed; ++index; } ACE_OS::if_freenameindex (intf); # elif defined (ACE_WIN32) IP_ADAPTER_ADDRESSES tmp_addrs; // Initial call to determine actual memory size needed DWORD dwRetVal; ULONG bufLen = 0; if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6, 0, 0, &tmp_addrs, &bufLen)) != ERROR_BUFFER_OVERFLOW) return -1; // With output bufferlength 0 this can't be right. // Get required output buffer and retrieve info for real. PIP_ADAPTER_ADDRESSES pAddrs; char *buf; ACE_NEW_RETURN (buf, char[bufLen], -1); pAddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES> (buf); if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6, 0, 0, pAddrs, &bufLen)) != NO_ERROR) { delete[] buf; // clean up return -1; } while (pAddrs) { if (this->leave (mcast_addr, ACE_TEXT_CHAR_TO_TCHAR(pAddrs->AdapterName)) == 0) ++nr_unsubscribed; pAddrs = pAddrs->Next; } delete[] buf; // clean up # endif /* ACE_WIN32 */ if (nr_unsubscribed == 0) { errno = ENODEV; return -1; } return 1; } else { // Unsubscribe on all local multicast-capable network interfaces, by // doing recursive calls with specific interfaces. ACE_INET_Addr *if_addrs = 0; size_t if_cnt; // NOTE - <get_ip_interfaces> doesn't always get all of the // interfaces. In particular, it may not get a PPP interface. This // is a limitation of the way <get_ip_interfaces> works with // old versions of MSVC. The reliable way of getting the interface // list is available only with MSVC 5 and newer. if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) return -1; size_t nr_unsubscribed = 0; if (if_cnt < 2) { if (this->leave (mcast_addr, ACE_TEXT ("0.0.0.0")) == 0) ++nr_unsubscribed; } else { while (if_cnt > 0) { --if_cnt; // Convert to 0-based for indexing, next loop check if (if_addrs[if_cnt].get_type () != AF_INET || if_addrs[if_cnt].is_loopback ()) continue; char addr_buf[INET6_ADDRSTRLEN]; if (this->leave (mcast_addr, ACE_TEXT_CHAR_TO_TCHAR (if_addrs[if_cnt].get_host_addr (addr_buf, INET6_ADDRSTRLEN))) == 0) ++nr_unsubscribed; } } delete [] if_addrs; if (nr_unsubscribed == 0) { errno = ENODEV; return -1; } return 1; } #else /* ACE_HAS_IPV6 */ // Unsubscribe on all local multicast-capable network interfaces, by // doing recursive calls with specific interfaces. ACE_INET_Addr *if_addrs = 0; size_t if_cnt; // NOTE - <get_ip_interfaces> doesn't always get all of the // interfaces. In particular, it may not get a PPP interface. This // is a limitation of the way <get_ip_interfaces> works with // old versions of MSVC. The reliable way of getting the interface list // is available only with MSVC 5 and newer. if (ACE::get_ip_interfaces (if_cnt, if_addrs) != 0) return -1; size_t nr_unsubscribed = 0; if (if_cnt < 2) { if (this->leave (mcast_addr, ACE_TEXT ("0.0.0.0")) == 0) ++nr_unsubscribed; } else { while (if_cnt > 0) { --if_cnt; // Convert to 0-based for indexing, next loop check if (if_addrs[if_cnt].is_loopback ()) continue; char addr_buf[INET6_ADDRSTRLEN]; if (this->leave (mcast_addr, ACE_TEXT_CHAR_TO_TCHAR (if_addrs[if_cnt].get_host_addr (addr_buf, INET6_ADDRSTRLEN))) == 0) ++nr_unsubscribed; } } delete [] if_addrs; if (nr_unsubscribed == 0) { errno = ENODEV; return -1; } return 1; #endif /* !ACE_HAS_IPV6 */ } return 0; } int ACE_SOCK_Dgram_Mcast::leave (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::leave"); // Unsubscribe. int result = this->unsubscribe_i (mcast_addr, net_if); #if defined (ACE_SOCK_DGRAM_MCAST_DUMPABLE) // (Unconditionally) Remove this addr/if from subscription list. // (Addr/if is removed even if unsubscribe failed) ip_mreq tgt_mreq; if (this->make_multicast_ifaddr (&tgt_mreq, mcast_addr, net_if) != -1) { ACE_MT (ACE_GUARD_RETURN (ACE_SDM_LOCK, guard, this->subscription_list_lock_, -1)); subscription_list_iter_t iter (this->subscription_list_); for (; !iter.done (); iter.advance ()) { ip_mreq *pm = iter.next (); if (ACE_SDM_helpers::is_equal (*pm, tgt_mreq)) { iter.remove (); delete pm; break; } } } #endif /* ACE_SOCK_DGRAM_MCAST_DUMPABLE */ return result >= 0 ? 0 : result; } // Attempt unsubscribe and return status. int ACE_SOCK_Dgram_Mcast::unsubscribe_i (const ACE_INET_Addr &mcast_addr, const ACE_TCHAR *net_if) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::unsubscribe_i"); int result = this->unsubscribe_ifs (mcast_addr, net_if); // Check for error or "short-circuit" return. if (result != 0) return result; #if defined (ACE_HAS_IPV6) if (mcast_addr.get_type () == AF_INET6) { // Validate addr/if specifications and create addr/if struct. ipv6_mreq mreq; if (this->make_multicast_ifaddr6 (&mreq, mcast_addr, net_if) == -1) { return -1; } // Tell network device driver to stop reading datagrams with the // <mcast_addr>. else if (ACE_SOCK::set_option (IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mreq, sizeof mreq) == -1) { return -1; } } else // IPv4 { // Validate addr/if specifications and create addr/if struct. ip_mreq mreq; if (this->make_multicast_ifaddr (&mreq, mcast_addr, net_if) == -1) { return -1; } // Tell network device driver to stop reading datagrams with the // <mcast_addr>. else if (ACE_SOCK::set_option (IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof mreq) == -1) { return -1; } } #else // Validate addr/if specifications and create addr/if struct. ip_mreq mreq; if (this->make_multicast_ifaddr (&mreq, mcast_addr, net_if) == -1) { return -1; } // Tell network device driver to stop reading datagrams with the // <mcast_addr>. // Note, this is not IPv6 friendly... else if (ACE_SOCK::set_option (IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof mreq) == -1) { return -1; } #endif /* ACE_HAS_IPV6 */ return 0; } int ACE_SOCK_Dgram_Mcast::clear_subs_list (void) { ACE_TRACE ("ACE_SOCK_Dgram_Mcast::clear_subs_list"); int result = 0; #if defined (ACE_SOCK_DGRAM_MCAST_DUMPABLE) ACE_MT (ACE_GUARD_RETURN (ACE_SDM_LOCK, guard, this->subscription_list_lock_, -1)); subscription_list_iter_t iter (this->subscription_list_); for (; !iter.done (); /*Hack: Do _not_ ::advance after remove*/) { ip_mreq *pm = iter.next (); iter.remove (); delete pm; } #endif /* ACE_SOCK_DGRAM_MCAST_DUMPABLE */ return result; } ACE_END_VERSIONED_NAMESPACE_DECL
31.983678
105
0.532746
forgottenlands
02d2c027ad40ad44e9b0183dcfbda42297b28a2c
2,225
cpp
C++
3rdParty/iresearch/core/search/bitset_doc_iterator.cpp
snykiotcubedev/arangodb-3.7.6
fce8f85f1c2f070c8e6a8e76d17210a2117d3833
[ "Apache-2.0" ]
null
null
null
3rdParty/iresearch/core/search/bitset_doc_iterator.cpp
snykiotcubedev/arangodb-3.7.6
fce8f85f1c2f070c8e6a8e76d17210a2117d3833
[ "Apache-2.0" ]
109
2022-01-06T07:05:24.000Z
2022-03-21T01:39:35.000Z
3rdParty/iresearch/core/search/bitset_doc_iterator.cpp
snykiotcubedev/arangodb-3.7.6
fce8f85f1c2f070c8e6a8e76d17210a2117d3833
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2017 ArangoDB GmbH, Cologne, Germany /// /// 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. /// /// Copyright holder is ArangoDB GmbH, Cologne, Germany /// /// @author Andrey Abramov //////////////////////////////////////////////////////////////////////////////// #include "bitset_doc_iterator.hpp" #include "formats/empty_term_reader.hpp" #include "utils/bitset.hpp" #include "utils/math_utils.hpp" namespace iresearch { attribute* bitset_doc_iterator::get_mutable(type_info::type_id id) noexcept { if (type<document>::id() == id) { return &doc_; } return type<cost>::id() == id ? &cost_ : nullptr; } bool bitset_doc_iterator::next() noexcept { while (!word_) { if (next_ >= end_) { if (refill(&begin_, &end_)) { reset(); continue; } doc_.value = doc_limits::eof(); word_ = 0; return false; } word_ = *next_++; base_ += bits_required<word_t>(); } const doc_id_t delta = math::math_traits<word_t>::ctz(word_); irs::unset_bit(word_, delta); doc_.value = base_ + delta; return true; } doc_id_t bitset_doc_iterator::seek(doc_id_t target) noexcept { while (1) { next_ = begin_ + bitset::word(target); if (next_ >= end_) { if (refill(&begin_, &end_)) { reset(); continue; } doc_.value = doc_limits::eof(); word_ = 0; return doc_.value; } break; } base_ = doc_id_t(std::distance(begin_, next_) * bits_required<word_t>()); word_ = (*next_++) & ((~word_t(0)) << bitset::bit(target)); next(); return doc_.value; } } // ROOT
24.184783
80
0.593258
snykiotcubedev
02d2de8629626de6b798c45d57cec46020ad9d3d
28,047
cc
C++
Simulation/OMNeT++/inet/src/inet/linklayer/bmac/BMacLayer.cc
StarStuffSteve/masters-research-project
47c1874913d0961508f033ca9a1144850eb8f8b7
[ "Apache-2.0" ]
1
2017-03-13T15:51:22.000Z
2017-03-13T15:51:22.000Z
Simulation/OMNeT++/inet/src/inet/linklayer/bmac/BMacLayer.cc
StarStuffSteve/masters-research-project
47c1874913d0961508f033ca9a1144850eb8f8b7
[ "Apache-2.0" ]
null
null
null
Simulation/OMNeT++/inet/src/inet/linklayer/bmac/BMacLayer.cc
StarStuffSteve/masters-research-project
47c1874913d0961508f033ca9a1144850eb8f8b7
[ "Apache-2.0" ]
null
null
null
// // This program 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 3 of the License, or // (at your option) any later version. // // This program 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. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see http://www.gnu.org/licenses/. // #include "inet/common/INETUtils.h" #include "inet/common/INETMath.h" #include "inet/networklayer/common/InterfaceEntry.h" #include "inet/common/ModuleAccess.h" #include "inet/linklayer/contract/IMACProtocolControlInfo.h" #include "inet/linklayer/common/SimpleLinkLayerControlInfo.h" #include "inet/linklayer/bmac/BMacLayer.h" namespace inet { Define_Module(BMacLayer); void BMacLayer::initialize(int stage) { MACProtocolBase::initialize(stage); if (stage == INITSTAGE_LOCAL) { queueLength = hasPar("queueLength") ? par("queueLength") : 10; animation = hasPar("animation") ? par("animation") : true; slotDuration = hasPar("slotDuration") ? par("slotDuration") : 1.; bitrate = hasPar("bitrate") ? par("bitrate") : 15360.; headerLength = hasPar("headerLength") ? par("headerLength") : 10.; checkInterval = hasPar("checkInterval") ? par("checkInterval") : 0.1; useMacAcks = hasPar("useMACAcks") ? par("useMACAcks") : false; maxTxAttempts = hasPar("maxTxAttempts") ? par("maxTxAttempts") : 2; EV_DETAIL << "headerLength: " << headerLength << ", bitrate: " << bitrate << endl; nbTxDataPackets = 0; nbTxPreambles = 0; nbRxDataPackets = 0; nbRxPreambles = 0; nbMissedAcks = 0; nbRecvdAcks = 0; nbDroppedDataPackets = 0; nbTxAcks = 0; txAttempts = 0; lastDataPktDestAddr = MACAddress::BROADCAST_ADDRESS; lastDataPktSrcAddr = MACAddress::BROADCAST_ADDRESS; macState = INIT; initializeMACAddress(); registerInterface(); cModule *radioModule = getModuleFromPar<cModule>(par("radioModule"), this); radioModule->subscribe(IRadio::radioModeChangedSignal, this); radioModule->subscribe(IRadio::transmissionStateChangedSignal, this); radio = check_and_cast<IRadio *>(radioModule); // init the dropped packet info WATCH(macState); } else if (stage == INITSTAGE_LINK_LAYER) { wakeup = new cMessage("wakeup"); wakeup->setKind(BMAC_WAKE_UP); data_timeout = new cMessage("data_timeout"); data_timeout->setKind(BMAC_DATA_TIMEOUT); data_timeout->setSchedulingPriority(100); data_tx_over = new cMessage("data_tx_over"); data_tx_over->setKind(BMAC_DATA_TX_OVER); stop_preambles = new cMessage("stop_preambles"); stop_preambles->setKind(BMAC_STOP_PREAMBLES); send_preamble = new cMessage("send_preamble"); send_preamble->setKind(BMAC_SEND_PREAMBLE); ack_tx_over = new cMessage("ack_tx_over"); ack_tx_over->setKind(BMAC_ACK_TX_OVER); cca_timeout = new cMessage("cca_timeout"); cca_timeout->setKind(BMAC_CCA_TIMEOUT); cca_timeout->setSchedulingPriority(100); send_ack = new cMessage("send_ack"); send_ack->setKind(BMAC_SEND_ACK); start_bmac = new cMessage("start_bmac"); start_bmac->setKind(BMAC_START_BMAC); ack_timeout = new cMessage("ack_timeout"); ack_timeout->setKind(BMAC_ACK_TIMEOUT); resend_data = new cMessage("resend_data"); resend_data->setKind(BMAC_RESEND_DATA); resend_data->setSchedulingPriority(100); scheduleAt(0.0, start_bmac); } } BMacLayer::~BMacLayer() { cancelAndDelete(wakeup); cancelAndDelete(data_timeout); cancelAndDelete(data_tx_over); cancelAndDelete(stop_preambles); cancelAndDelete(send_preamble); cancelAndDelete(ack_tx_over); cancelAndDelete(cca_timeout); cancelAndDelete(send_ack); cancelAndDelete(start_bmac); cancelAndDelete(ack_timeout); cancelAndDelete(resend_data); for (auto & elem : macQueue) { delete (elem); } macQueue.clear(); } void BMacLayer::finish() { recordScalar("nbTxDataPackets", nbTxDataPackets); recordScalar("nbTxPreambles", nbTxPreambles); recordScalar("nbRxDataPackets", nbRxDataPackets); recordScalar("nbRxPreambles", nbRxPreambles); recordScalar("nbMissedAcks", nbMissedAcks); recordScalar("nbRecvdAcks", nbRecvdAcks); recordScalar("nbTxAcks", nbTxAcks); recordScalar("nbDroppedDataPackets", nbDroppedDataPackets); //recordScalar("timeSleep", timeSleep); //recordScalar("timeRX", timeRX); //recordScalar("timeTX", timeTX); } void BMacLayer::initializeMACAddress() { const char *addrstr = par("address"); if (!strcmp(addrstr, "auto")) { // assign automatic address address = MACAddress::generateAutoAddress(); // change module parameter from "auto" to concrete address par("address").setStringValue(address.str().c_str()); } else { address.setAddress(addrstr); } } InterfaceEntry *BMacLayer::createInterfaceEntry() { InterfaceEntry *e = new InterfaceEntry(this); // data rate e->setDatarate(bitrate); // generate a link-layer address to be used as interface token for IPv6 e->setMACAddress(address); e->setInterfaceToken(address.formInterfaceIdentifier()); // capabilities e->setMtu(par("mtu").longValue()); e->setMulticast(false); e->setBroadcast(true); return e; } /** * Check whether the queue is not full: if yes, print a warning and drop the * packet. Then initiate sending of the packet, if the node is sleeping. Do * nothing, if node is working. */ void BMacLayer::handleUpperPacket(cPacket *msg) { bool pktAdded = addToQueue(msg); if (!pktAdded) return; // force wakeup now if (wakeup->isScheduled() && (macState == SLEEP)) { cancelEvent(wakeup); scheduleAt(simTime() + dblrand() * 0.1f, wakeup); } } /** * Send one short preamble packet immediately. */ void BMacLayer::sendPreamble() { BMacFrame *preamble = new BMacFrame(); preamble->setSrcAddr(address); preamble->setDestAddr(MACAddress::BROADCAST_ADDRESS); preamble->setKind(BMAC_PREAMBLE); preamble->setBitLength(headerLength); //attach signal and send down attachSignal(preamble); sendDown(preamble); nbTxPreambles++; } /** * Send one short preamble packet immediately. */ void BMacLayer::sendMacAck() { BMacFrame *ack = new BMacFrame(); ack->setSrcAddr(address); ack->setDestAddr(lastDataPktSrcAddr); ack->setKind(BMAC_ACK); ack->setBitLength(headerLength); //attach signal and send down attachSignal(ack); sendDown(ack); nbTxAcks++; //endSimulation(); } /** * Handle own messages: * BMAC_WAKEUP: wake up the node, check the channel for some time. * BMAC_CHECK_CHANNEL: if the channel is free, check whether there is something * in the queue and switch the radio to TX. When switched to TX, the node will * start sending preambles for a full slot duration. If the channel is busy, * stay awake to receive message. Schedule a timeout to handle false alarms. * BMAC_SEND_PREAMBLES: sending of preambles over. Next time the data packet * will be send out (single one). * BMAC_TIMEOUT_DATA: timeout the node after a false busy channel alarm. Go * back to sleep. */ void BMacLayer::handleSelfMessage(cMessage *msg) { switch (macState) { case INIT: if (msg->getKind() == BMAC_START_BMAC) { EV_DETAIL << "State INIT, message BMAC_START, new state SLEEP" << endl; changeDisplayColor(BLACK); radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); macState = SLEEP; scheduleAt(simTime() + dblrand() * slotDuration, wakeup); return; } break; case SLEEP: if (msg->getKind() == BMAC_WAKE_UP) { EV_DETAIL << "State SLEEP, message BMAC_WAKEUP, new state CCA" << endl; scheduleAt(simTime() + checkInterval, cca_timeout); radio->setRadioMode(IRadio::RADIO_MODE_RECEIVER); changeDisplayColor(GREEN); macState = CCA; return; } break; case CCA: if (msg->getKind() == BMAC_CCA_TIMEOUT) { // channel is clear // something waiting in eth queue? if (macQueue.size() > 0) { EV_DETAIL << "State CCA, message CCA_TIMEOUT, new state" " SEND_PREAMBLE" << endl; macState = SEND_PREAMBLE; radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER); changeDisplayColor(YELLOW); scheduleAt(simTime() + slotDuration, stop_preambles); return; } // if not, go back to sleep and wake up after a full period else { EV_DETAIL << "State CCA, message CCA_TIMEOUT, new state SLEEP" << endl; scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); return; } } // during CCA, we received a preamble. Go to state WAIT_DATA and // schedule the timeout. if (msg->getKind() == BMAC_PREAMBLE) { nbRxPreambles++; EV_DETAIL << "State CCA, message BMAC_PREAMBLE received, new state" " WAIT_DATA" << endl; macState = WAIT_DATA; cancelEvent(cca_timeout); scheduleAt(simTime() + slotDuration + checkInterval, data_timeout); delete msg; return; } // this case is very, very, very improbable, but let's do it. // if in CCA and the node receives directly the data packet, switch to // state WAIT_DATA and re-send the message if (msg->getKind() == BMAC_DATA) { nbRxDataPackets++; EV_DETAIL << "State CCA, message BMAC_DATA, new state WAIT_DATA" << endl; macState = WAIT_DATA; cancelEvent(cca_timeout); scheduleAt(simTime() + slotDuration + checkInterval, data_timeout); scheduleAt(simTime(), msg); return; } //in case we get an ACK, we simply dicard it, because it means the end //of another communication if (msg->getKind() == BMAC_ACK) { EV_DETAIL << "State CCA, message BMAC_ACK, new state CCA" << endl; delete msg; return; } break; case SEND_PREAMBLE: if (msg->getKind() == BMAC_SEND_PREAMBLE) { EV_DETAIL << "State SEND_PREAMBLE, message BMAC_SEND_PREAMBLE, new" " state SEND_PREAMBLE" << endl; sendPreamble(); scheduleAt(simTime() + 0.5f * checkInterval, send_preamble); macState = SEND_PREAMBLE; return; } // simply change the state to SEND_DATA if (msg->getKind() == BMAC_STOP_PREAMBLES) { EV_DETAIL << "State SEND_PREAMBLE, message BMAC_STOP_PREAMBLES, new" " state SEND_DATA" << endl; macState = SEND_DATA; txAttempts = 1; return; } break; case SEND_DATA: if ((msg->getKind() == BMAC_SEND_PREAMBLE) || (msg->getKind() == BMAC_RESEND_DATA)) { EV_DETAIL << "State SEND_DATA, message BMAC_SEND_PREAMBLE or" " BMAC_RESEND_DATA, new state WAIT_TX_DATA_OVER" << endl; // send the data packet sendDataPacket(); macState = WAIT_TX_DATA_OVER; return; } break; case WAIT_TX_DATA_OVER: if (msg->getKind() == BMAC_DATA_TX_OVER) { if ((useMacAcks) && !lastDataPktDestAddr.isBroadcast()) { EV_DETAIL << "State WAIT_TX_DATA_OVER, message BMAC_DATA_TX_OVER," " new state WAIT_ACK" << endl; macState = WAIT_ACK; radio->setRadioMode(IRadio::RADIO_MODE_RECEIVER); changeDisplayColor(GREEN); scheduleAt(simTime() + checkInterval, ack_timeout); } else { EV_DETAIL << "State WAIT_TX_DATA_OVER, message BMAC_DATA_TX_OVER," " new state SLEEP" << endl; delete macQueue.front(); macQueue.pop_front(); // if something in the queue, wakeup soon. if (macQueue.size() > 0) scheduleAt(simTime() + dblrand() * checkInterval, wakeup); else scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); } return; } break; case WAIT_ACK: if (msg->getKind() == BMAC_ACK_TIMEOUT) { // No ACK received. try again or drop. if (txAttempts < maxTxAttempts) { EV_DETAIL << "State WAIT_ACK, message BMAC_ACK_TIMEOUT, new state" " SEND_DATA" << endl; txAttempts++; macState = SEND_PREAMBLE; scheduleAt(simTime() + slotDuration, stop_preambles); radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER); changeDisplayColor(YELLOW); } else { EV_DETAIL << "State WAIT_ACK, message BMAC_ACK_TIMEOUT, new state" " SLEEP" << endl; //drop the packet cMessage *mac = macQueue.front(); macQueue.pop_front(); emit(NF_LINK_BREAK, mac); delete mac; // if something in the queue, wakeup soon. if (macQueue.size() > 0) scheduleAt(simTime() + dblrand() * checkInterval, wakeup); else scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); nbMissedAcks++; } return; } //ignore and other packets if ((msg->getKind() == BMAC_DATA) || (msg->getKind() == BMAC_PREAMBLE)) { EV_DETAIL << "State WAIT_ACK, message BMAC_DATA or BMAC_PREMABLE, new" " state WAIT_ACK" << endl; delete msg; return; } if (msg->getKind() == BMAC_ACK) { EV_DETAIL << "State WAIT_ACK, message BMAC_ACK" << endl; BMacFrame *mac = static_cast<BMacFrame *>(msg); const MACAddress src = mac->getSrcAddr(); // the right ACK is received.. EV_DETAIL << "We are waiting for ACK from : " << lastDataPktDestAddr << ", and ACK came from : " << src << endl; if (src == lastDataPktDestAddr) { EV_DETAIL << "New state SLEEP" << endl; nbRecvdAcks++; lastDataPktDestAddr = MACAddress::BROADCAST_ADDRESS; cancelEvent(ack_timeout); delete macQueue.front(); macQueue.pop_front(); // if something in the queue, wakeup soon. if (macQueue.size() > 0) scheduleAt(simTime() + dblrand() * checkInterval, wakeup); else scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); lastDataPktDestAddr = MACAddress::BROADCAST_ADDRESS; } delete msg; return; } break; case WAIT_DATA: if (msg->getKind() == BMAC_PREAMBLE) { //nothing happens EV_DETAIL << "State WAIT_DATA, message BMAC_PREAMBLE, new state" " WAIT_DATA" << endl; nbRxPreambles++; delete msg; return; } if (msg->getKind() == BMAC_ACK) { //nothing happens EV_DETAIL << "State WAIT_DATA, message BMAC_ACK, new state WAIT_DATA" << endl; delete msg; return; } if (msg->getKind() == BMAC_DATA) { nbRxDataPackets++; BMacFrame *mac = static_cast<BMacFrame *>(msg); const MACAddress& dest = mac->getDestAddr(); const MACAddress& src = mac->getSrcAddr(); if ((dest == address) || dest.isBroadcast()) { EV_DETAIL << "Local delivery " << mac << endl; sendUp(decapsMsg(mac)); } else { EV_DETAIL << "Received " << mac << " is not for us, dropping frame." << endl; delete msg; msg = nullptr; mac = nullptr; } cancelEvent(data_timeout); if ((useMacAcks) && (dest == address)) { EV_DETAIL << "State WAIT_DATA, message BMAC_DATA, new state" " SEND_ACK" << endl; macState = SEND_ACK; lastDataPktSrcAddr = src; radio->setRadioMode(IRadio::RADIO_MODE_TRANSMITTER); changeDisplayColor(YELLOW); } else { EV_DETAIL << "State WAIT_DATA, message BMAC_DATA, new state SLEEP" << endl; // if something in the queue, wakeup soon. if (macQueue.size() > 0) scheduleAt(simTime() + dblrand() * checkInterval, wakeup); else scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); } return; } if (msg->getKind() == BMAC_DATA_TIMEOUT) { EV_DETAIL << "State WAIT_DATA, message BMAC_DATA_TIMEOUT, new state" " SLEEP" << endl; // if something in the queue, wakeup soon. if (macQueue.size() > 0) scheduleAt(simTime() + dblrand() * checkInterval, wakeup); else scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); return; } break; case SEND_ACK: if (msg->getKind() == BMAC_SEND_ACK) { EV_DETAIL << "State SEND_ACK, message BMAC_SEND_ACK, new state" " WAIT_ACK_TX" << endl; // send now the ack packet sendMacAck(); macState = WAIT_ACK_TX; return; } break; case WAIT_ACK_TX: if (msg->getKind() == BMAC_ACK_TX_OVER) { EV_DETAIL << "State WAIT_ACK_TX, message BMAC_ACK_TX_OVER, new state" " SLEEP" << endl; // ack sent, go to sleep now. // if something in the queue, wakeup soon. if (macQueue.size() > 0) scheduleAt(simTime() + dblrand() * checkInterval, wakeup); else scheduleAt(simTime() + slotDuration, wakeup); macState = SLEEP; radio->setRadioMode(IRadio::RADIO_MODE_SLEEP); changeDisplayColor(BLACK); lastDataPktSrcAddr = MACAddress::BROADCAST_ADDRESS; return; } break; } throw cRuntimeError("Undefined event of type %d in state %d (radio mode %d, radio reception state %d, radio transmission state %d)!", msg->getKind(), macState, radio->getRadioMode(), radio->getReceptionState(), radio->getTransmissionState()); } /** * Handle BMAC preambles and received data packets. */ void BMacLayer::handleLowerPacket(cPacket *msg) { if (msg->hasBitError()) { EV << "Received " << msg << " contains bit errors or collision, dropping it\n"; delete msg; return; } else // simply pass the massage as self message, to be processed by the FSM. handleSelfMessage(msg); } void BMacLayer::sendDataPacket() { nbTxDataPackets++; BMacFrame *pkt = macQueue.front()->dup(); attachSignal(pkt); lastDataPktDestAddr = pkt->getDestAddr(); pkt->setKind(BMAC_DATA); sendDown(pkt); } void BMacLayer::receiveSignal(cComponent *source, simsignal_t signalID, long value DETAILS_ARG) { Enter_Method_Silent(); if (signalID == IRadio::radioModeChangedSignal) { IRadio::RadioMode radioMode = (IRadio::RadioMode)value; if (radioMode == IRadio::RADIO_MODE_TRANSMITTER) { // we just switched to TX after CCA, so simply send the first // sendPremable self message if (macState == SEND_PREAMBLE) scheduleAt(simTime(), send_preamble); else if (macState == SEND_ACK) scheduleAt(simTime(), send_ack); // we were waiting for acks, but none came. we switched to TX and now // need to resend data else if (macState == SEND_DATA) scheduleAt(simTime(), resend_data); } } // Transmission of one packet is over else if (signalID == IRadio::transmissionStateChangedSignal) { IRadio::TransmissionState newRadioTransmissionState = (IRadio::TransmissionState)value; if (transmissionState == IRadio::TRANSMISSION_STATE_TRANSMITTING && newRadioTransmissionState == IRadio::TRANSMISSION_STATE_IDLE) { if (macState == WAIT_TX_DATA_OVER) scheduleAt(simTime(), data_tx_over); else if (macState == WAIT_ACK_TX) scheduleAt(simTime(), ack_tx_over); } transmissionState = newRadioTransmissionState; } } /** * Encapsulates the received network-layer packet into a BMacFrame and set all * needed header fields. */ bool BMacLayer::addToQueue(cMessage *msg) { if (macQueue.size() >= queueLength) { // queue is full, message has to be deleted EV_DETAIL << "New packet arrived, but queue is FULL, so new packet is" " deleted\n"; emit(packetFromUpperDroppedSignal, msg); nbDroppedDataPackets++; return false; } BMacFrame *macPkt = encapsMsg((cPacket *)msg); macQueue.push_back(macPkt); EV_DETAIL << "Max queue length: " << queueLength << ", packet put in queue" "\n queue size: " << macQueue.size() << " macState: " << macState << endl; return true; } void BMacLayer::flushQueue() { // TODO: macQueue.clear(); } void BMacLayer::clearQueue() { macQueue.clear(); } void BMacLayer::attachSignal(BMacFrame *macPkt) { //calc signal duration simtime_t duration = macPkt->getBitLength() / bitrate; //create and initialize control info with new signal macPkt->setDuration(duration); } /** * Change the color of the node for animation purposes. */ void BMacLayer::changeDisplayColor(BMAC_COLORS color) { if (!animation) return; cDisplayString& dispStr = findContainingNode(this)->getDisplayString(); //b=40,40,rect,black,black,2" if (color == GREEN) dispStr.setTagArg("b", 3, "green"); //dispStr.parse("b=40,40,rect,green,green,2"); if (color == BLUE) dispStr.setTagArg("b", 3, "blue"); //dispStr.parse("b=40,40,rect,blue,blue,2"); if (color == RED) dispStr.setTagArg("b", 3, "red"); //dispStr.parse("b=40,40,rect,red,red,2"); if (color == BLACK) dispStr.setTagArg("b", 3, "black"); //dispStr.parse("b=40,40,rect,black,black,2"); if (color == YELLOW) dispStr.setTagArg("b", 3, "yellow"); //dispStr.parse("b=40,40,rect,yellow,yellow,2"); } /*void BMacLayer::changeMacState(States newState) { switch (macState) { case RX: timeRX += (simTime() - lastTime); break; case TX: timeTX += (simTime() - lastTime); break; case SLEEP: timeSleep += (simTime() - lastTime); break; case CCA: timeRX += (simTime() - lastTime); } lastTime = simTime(); switch (newState) { case CCA: changeDisplayColor(GREEN); break; case TX: changeDisplayColor(BLUE); break; case SLEEP: changeDisplayColor(BLACK); break; case RX: changeDisplayColor(YELLOW); break; } macState = newState; }*/ cPacket *BMacLayer::decapsMsg(BMacFrame *msg) { cPacket *m = msg->decapsulate(); setUpControlInfo(m, msg->getSrcAddr()); // delete the macPkt delete msg; EV_DETAIL << " message decapsulated " << endl; return m; } BMacFrame *BMacLayer::encapsMsg(cPacket *netwPkt) { BMacFrame *pkt = new BMacFrame(netwPkt->getName(), netwPkt->getKind()); pkt->setBitLength(headerLength); // copy dest address from the Control Info attached to the network // message by the network layer IMACProtocolControlInfo *cInfo = check_and_cast<IMACProtocolControlInfo *>(netwPkt->removeControlInfo()); EV_DETAIL << "CInfo removed, mac addr=" << cInfo->getDestinationAddress() << endl; pkt->setDestAddr(cInfo->getDestinationAddress()); //delete the control info delete cInfo; //set the src address to own mac address (nic module getId()) pkt->setSrcAddr(address); //encapsulate the network packet pkt->encapsulate(netwPkt); EV_DETAIL << "pkt encapsulated\n"; return pkt; } /** * Attaches a "control info" (MacToNetw) structure (object) to the message pMsg. */ cObject *BMacLayer::setUpControlInfo(cMessage *const pMsg, const MACAddress& pSrcAddr) { SimpleLinkLayerControlInfo *const cCtrlInfo = new SimpleLinkLayerControlInfo(); cCtrlInfo->setSrc(pSrcAddr); cCtrlInfo->setInterfaceId(interfaceEntry->getInterfaceId()); pMsg->setControlInfo(cCtrlInfo); return cCtrlInfo; } } // namespace inet
36.519531
139
0.563162
StarStuffSteve
02d405e120039570fa69a9d5976388c2d4f8c6c0
839
hpp
C++
libs/fnd/tuple/include/bksge/fnd/tuple/tuple_sort_type.hpp
myoukaku/bksge
0f8b60e475a3f1709723906e4796b5e60decf06e
[ "MIT" ]
4
2018-06-10T13:35:32.000Z
2021-06-03T14:27:41.000Z
libs/fnd/tuple/include/bksge/fnd/tuple/tuple_sort_type.hpp
myoukaku/bksge
0f8b60e475a3f1709723906e4796b5e60decf06e
[ "MIT" ]
566
2017-01-31T05:36:09.000Z
2022-02-09T05:04:37.000Z
libs/fnd/tuple/include/bksge/fnd/tuple/tuple_sort_type.hpp
myoukaku/bksge
0f8b60e475a3f1709723906e4796b5e60decf06e
[ "MIT" ]
1
2018-07-05T04:40:53.000Z
2018-07-05T04:40:53.000Z
/** * @file tuple_sort_type.hpp * * @brief tuple_sort_type の定義 * * @author myoukaku */ #ifndef BKSGE_FND_TUPLE_TUPLE_SORT_TYPE_HPP #define BKSGE_FND_TUPLE_TUPLE_SORT_TYPE_HPP #include <bksge/fnd/tuple/fwd/tuple_sort_type_fwd.hpp> #include <bksge/fnd/type_traits/bool_constant.hpp> namespace bksge { /** * @brief Tupleの要素をCompareに従って並べ替えたTuple型を取得する * * Compareを指定しなかったときは、 * Tupleの各要素をTとすると、T::valueが昇順になるように並べ替える。 */ template <typename Tuple, typename Compare> struct tuple_sort_type; /** * @brief tuple_sort_type でデフォルトで使われる比較演算 */ struct value_less { template <typename T1, typename T2> using type = bksge::bool_constant<(T1::value < T2::value)>; }; } // namespace bksge #include <bksge/fnd/tuple/inl/tuple_sort_type_inl.hpp> #endif // BKSGE_FND_TUPLE_TUPLE_SORT_TYPE_HPP
20.463415
61
0.72944
myoukaku
02db2d20c68010573dd0c6b7d4ec63c9c7df75c2
135
hxx
C++
src/Providers/UNIXProviders/CertificateAuthority/UNIX_CertificateAuthority_HPUX.hxx
brunolauze/openpegasus-providers-old
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
[ "MIT" ]
1
2020-10-12T09:00:09.000Z
2020-10-12T09:00:09.000Z
src/Providers/UNIXProviders/CertificateAuthority/UNIX_CertificateAuthority_HPUX.hxx
brunolauze/openpegasus-providers-old
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
[ "MIT" ]
null
null
null
src/Providers/UNIXProviders/CertificateAuthority/UNIX_CertificateAuthority_HPUX.hxx
brunolauze/openpegasus-providers-old
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
[ "MIT" ]
null
null
null
#ifdef PEGASUS_OS_HPUX #ifndef __UNIX_CERTIFICATEAUTHORITY_PRIVATE_H #define __UNIX_CERTIFICATEAUTHORITY_PRIVATE_H #endif #endif
11.25
45
0.859259
brunolauze
02dc2055b349786bb8ad10b4a80f7ab9db515591
1,528
cpp
C++
firmware/src/LUTFunction.cpp
BrianBalke/bldc-controller
0288769a21869b079a17aa79d8df6618bfc3d43a
[ "MIT" ]
14
2019-04-10T07:42:13.000Z
2019-12-11T08:58:39.000Z
firmware/src/LUTFunction.cpp
BrianBalke/bldc-controller
0288769a21869b079a17aa79d8df6618bfc3d43a
[ "MIT" ]
8
2020-07-24T06:51:55.000Z
2021-05-24T04:24:32.000Z
firmware/src/LUTFunction.cpp
BrianBalke/bldc-controller
0288769a21869b079a17aa79d8df6618bfc3d43a
[ "MIT" ]
16
2020-03-06T20:21:56.000Z
2022-03-22T16:59:14.000Z
#include "LUTFunction.hpp" #include <stdint.h> #include <cmath> namespace motor_driver { namespace math { template <typename T> float LUTFunction<T>::lookup(float arg) const { float norm_arg = (arg - x_first_) / (x_last_ - x_first_); float norm_arg_integral = std::floor(norm_arg); float norm_arg_fraction = norm_arg - norm_arg_integral; size_t flip_index = (static_cast<int>(norm_arg_integral) % periodicity_.repetition_count + periodicity_.repetition_count) % periodicity_.repetition_count; switch (periodicity_.repetition_flips[flip_index]) { case LFFlipType::NONE: default: return lookupReduced(norm_arg_fraction); case LFFlipType::HORIZONTAL: return lookupReduced(1.0f - norm_arg_fraction); case LFFlipType::VERTICAL: return -lookupReduced(norm_arg_fraction); case LFFlipType::BOTH: return -lookupReduced(1.0f - norm_arg_fraction); } } template <typename T> float LUTFunction<T>::lookupReduced(float reduced_arg) const { if (reduced_arg <= 0.0f) { return y_[0]; } else if (reduced_arg >= 1.0f) { return y_[y_len_ - 1]; } else { float integral = std::floor(reduced_arg * (y_len_ - 1)); float fraction = reduced_arg * (y_len_ - 1) - integral; size_t index_before = (size_t)integral; // Linear interpolation. return (y_[index_before] * (1.0f - fraction) + y_[index_before + 1] * fraction); } } template class LUTFunction<float>; template class LUTFunction<int8_t>; } // namespace math } // namespace motor_driver
28.830189
76
0.706806
BrianBalke
02e1573b9440bf259520e82979dbafa8e3864373
54,742
cc
C++
src/bin/perfdhcp/command_options.cc
piskyscan/kea
72c0a679a1101aada8d22c98abf7bde615fa7a11
[ "Apache-2.0" ]
null
null
null
src/bin/perfdhcp/command_options.cc
piskyscan/kea
72c0a679a1101aada8d22c98abf7bde615fa7a11
[ "Apache-2.0" ]
null
null
null
src/bin/perfdhcp/command_options.cc
piskyscan/kea
72c0a679a1101aada8d22c98abf7bde615fa7a11
[ "Apache-2.0" ]
null
null
null
// Copyright (C) 2012-2020 Internet Systems Consortium, Inc. ("ISC") // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include <config.h> #include <perfdhcp/command_options.h> #include <exceptions/exceptions.h> #include <dhcp/iface_mgr.h> #include <dhcp/duid.h> #include <dhcp/option.h> #include <cfgrpt/config_report.h> #include <util/encode/hex.h> #include <asiolink/io_error.h> #include <boost/lexical_cast.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <sstream> #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <unistd.h> #include <fstream> #include <thread> #include <getopt.h> #ifdef HAVE_OPTRESET extern int optreset; #endif using namespace std; using namespace isc; using namespace isc::dhcp; namespace isc { namespace perfdhcp { // Refer to config_report so it will be embedded in the binary const char* const* perfdhcp_config_report = isc::detail::config_report; CommandOptions::LeaseType::LeaseType() : type_(ADDRESS) { } CommandOptions::LeaseType::LeaseType(const Type lease_type) : type_(lease_type) { } bool CommandOptions::LeaseType::is(const Type lease_type) const { return (lease_type == type_); } bool CommandOptions::LeaseType::includes(const Type lease_type) const { return (is(ADDRESS_AND_PREFIX) || (lease_type == type_)); } void CommandOptions::LeaseType::set(const Type lease_type) { type_ = lease_type; } void CommandOptions::LeaseType::fromCommandLine(const std::string& cmd_line_arg) { if (cmd_line_arg == "address-only") { type_ = ADDRESS; } else if (cmd_line_arg == "prefix-only") { type_ = PREFIX; } else if (cmd_line_arg == "address-and-prefix") { type_ = ADDRESS_AND_PREFIX; } else { isc_throw(isc::InvalidParameter, "value of lease-type: -e<lease-type>," " must be one of the following: 'address-only' or" " 'prefix-only'"); } } std::string CommandOptions::LeaseType::toText() const { switch (type_) { case ADDRESS: return ("address-only (IA_NA option added to the client's request)"); case PREFIX: return ("prefix-only (IA_PD option added to the client's request)"); case ADDRESS_AND_PREFIX: return ("address-and-prefix (Both IA_NA and IA_PD options added to the" " client's request)"); default: isc_throw(Unexpected, "internal error: undefined lease type code when" " returning textual representation of the lease type"); } } void CommandOptions::reset() { // Default mac address used in DHCP messages // if -b mac=<mac-address> was not specified uint8_t mac[6] = { 0x0, 0xC, 0x1, 0x2, 0x3, 0x4 }; // Default packet drop time if -D<drop-time> parameter // was not specified double dt[2] = { 1., 1. }; // We don't use constructor initialization list because we // will need to reset all members many times to perform unit tests ipversion_ = 0; exchange_mode_ = DORA_SARR; lease_type_.set(LeaseType::ADDRESS); rate_ = 0; renew_rate_ = 0; release_rate_ = 0; report_delay_ = 0; clean_report_ = false; clean_report_separator_ = ""; clients_num_ = 0; mac_template_.assign(mac, mac + 6); duid_template_.clear(); base_.clear(); addr_unique_ = false; mac_list_file_.clear(); mac_list_.clear(); giaddr_list_file_.clear(); giaddr_list_.clear(); multi_subnet_ = false; num_request_.clear(); exit_wait_time_ = 0; period_ = 0; wait_for_elapsed_time_ = -1; increased_elapsed_time_ = -1; drop_time_set_ = 0; drop_time_.assign(dt, dt + 2); max_drop_.clear(); max_pdrop_.clear(); localname_.clear(); is_interface_ = false; preload_ = 0; local_port_ = 0; remote_port_ = 0; seeded_ = false; seed_ = 0; broadcast_ = false; rapid_commit_ = false; use_first_ = false; template_file_.clear(); rnd_offset_.clear(); xid_offset_.clear(); elp_offset_ = -1; sid_offset_ = -1; rip_offset_ = -1; diags_.clear(); wrapped_.clear(); server_name_.clear(); v6_relay_encapsulation_level_ = 0; generateDuidTemplate(); extra_opts_.clear(); if (std::thread::hardware_concurrency() == 1) { single_thread_mode_ = true; } else { single_thread_mode_ = false; } scenario_ = Scenario::BASIC; } bool CommandOptions::parse(int argc, char** const argv, bool print_cmd_line) { // Reset internal variables used by getopt // to eliminate undefined behavior when // parsing different command lines multiple times #ifdef __GLIBC__ // Warning: non-portable code. This is due to a bug in glibc's // getopt() which keeps internal state about an old argument vector // (argc, argv) from last call and tries to scan them when a new // argument vector (argc, argv) is passed. As the old vector may not // be main()'s arguments, but heap allocated and may have been freed // since, this becomes a use after free and results in random // behavior. According to the NOTES section in glibc getopt()'s // manpage, setting optind=0 resets getopt()'s state. Though this is // not required in our usage of getopt(), the bug still happens // unless we set optind=0. // // Setting optind=0 is non-portable code. optind = 0; #else optind = 1; #endif // optreset is declared on BSD systems and is used to reset internal // state of getopt(). When parsing command line arguments multiple // times with getopt() the optreset must be set to 1 every time before // parsing starts. Failing to do so will result in random behavior of // getopt(). #ifdef HAVE_OPTRESET optreset = 1; #endif opterr = 0; // Reset values of class members reset(); // Informs if program has been run with 'h' or 'v' option. bool help_or_version_mode = initialize(argc, argv, print_cmd_line); if (!help_or_version_mode) { validate(); } return (help_or_version_mode); } const int LONG_OPT_SCENARIO = 300; bool CommandOptions::initialize(int argc, char** argv, bool print_cmd_line) { int opt = 0; // Subsequent options returned by getopt() std::string drop_arg; // Value of -D<value>argument size_t percent_loc = 0; // Location of % sign in -D<value> double drop_percent = 0; // % value (1..100) in -D<value%> int num_drops = 0; // Max number of drops specified in -D<value> int num_req = 0; // Max number of dropped // requests in -n<max-drops> int offset_arg = 0; // Temporary variable holding offset arguments std::string sarg; // Temporary variable for string args std::ostringstream stream; stream << "perfdhcp"; int num_mac_list_files = 0; int num_subnet_list_files = 0; struct option long_options[] = { {"scenario", required_argument, 0, LONG_OPT_SCENARIO}, {0, 0, 0, 0} }; // In this section we collect argument values from command line // they will be tuned and validated elsewhere while((opt = getopt_long(argc, argv, "huv46A:r:t:R:b:n:p:d:D:l:P:a:L:N:M:s:iBc1" "J:T:X:O:o:E:S:I:x:W:w:e:f:F:g:C:y:Y:", long_options, NULL)) != -1) { stream << " -" << static_cast<char>(opt); if (optarg) { stream << " " << optarg; } switch (opt) { case '1': use_first_ = true; break; // Simulate DHCPv6 relayed traffic. case 'A': // @todo: At the moment we only support simulating a single relay // agent. In the future we should extend it to up to 32. // See comment in https://github.com/isc-projects/kea/pull/22#issuecomment-243405600 v6_relay_encapsulation_level_ = static_cast<uint8_t>(positiveInteger("-A<encapsulation-level> must" " be a positive integer")); if (v6_relay_encapsulation_level_ != 1) { isc_throw(isc::InvalidParameter, "-A only supports 1 at the moment."); } break; case 'u': addr_unique_ = true; break; case '4': check(ipversion_ == 6, "IP version already set to 6"); ipversion_ = 4; break; case '6': check(ipversion_ == 4, "IP version already set to 4"); ipversion_ = 6; break; case 'b': check(base_.size() > 3, "-b<value> already specified," " unexpected occurrence of 5th -b<value>"); base_.push_back(optarg); decodeBase(base_.back()); break; case 'B': broadcast_ = true; break; case 'c': rapid_commit_ = true; break; case 'C': clean_report_ = true; clean_report_separator_ = optarg; break; case 'd': check(drop_time_set_ > 1, "maximum number of drops already specified, " "unexpected 3rd occurrence of -d<value>"); try { drop_time_[drop_time_set_] = boost::lexical_cast<double>(optarg); } catch (const boost::bad_lexical_cast&) { isc_throw(isc::InvalidParameter, "value of drop time: -d<value>" " must be positive number"); } check(drop_time_[drop_time_set_] <= 0., "drop-time must be a positive number"); drop_time_set_ = true; break; case 'D': drop_arg = std::string(optarg); percent_loc = drop_arg.find('%'); check(max_pdrop_.size() > 1 || max_drop_.size() > 1, "values of maximum drops: -D<value> already " "specified, unexpected 3rd occurrence of -D<value>"); if ((percent_loc) != std::string::npos) { try { drop_percent = boost::lexical_cast<double>(drop_arg.substr(0, percent_loc)); } catch (const boost::bad_lexical_cast&) { isc_throw(isc::InvalidParameter, "value of drop percentage: -D<value%>" " must be 0..100"); } check((drop_percent <= 0) || (drop_percent >= 100), "value of drop percentage: -D<value%> must be 0..100"); max_pdrop_.push_back(drop_percent); } else { num_drops = positiveInteger("value of max drops number:" " -D<value> must be a positive integer"); max_drop_.push_back(num_drops); } break; case 'e': initLeaseType(); break; case 'E': elp_offset_ = nonNegativeInteger("value of time-offset: -E<value>" " must not be a negative integer"); break; case 'f': renew_rate_ = positiveInteger("value of the renew rate: -f<renew-rate>" " must be a positive integer"); break; case 'F': release_rate_ = positiveInteger("value of the release rate:" " -F<release-rate> must be a" " positive integer"); break; case 'g': { auto optarg_text = std::string(optarg); if (optarg_text == "single") { single_thread_mode_ = true; } else if (optarg_text == "multi") { single_thread_mode_ = false; } else { isc_throw(InvalidParameter, "value of thread mode (-g) '" << optarg << "' is wrong - should be '-g single' or '-g multi'"); } break; } case 'h': usage(); return (true); case 'i': exchange_mode_ = DO_SA; break; case 'I': rip_offset_ = positiveInteger("value of ip address offset:" " -I<value> must be a" " positive integer"); break; case 'J': check(num_subnet_list_files >= 1, "only one -J option can be specified"); num_subnet_list_files++; giaddr_list_file_ = std::string(optarg); loadGiaddr(); break; case 'l': localname_ = std::string(optarg); initIsInterface(); break; case 'L': local_port_ = nonNegativeInteger("value of local port:" " -L<value> must not be a" " negative integer"); check(local_port_ > static_cast<int>(std::numeric_limits<uint16_t>::max()), "local-port must be lower than " + boost::lexical_cast<std::string>(std::numeric_limits<uint16_t>::max())); break; case 'N': remote_port_ = nonNegativeInteger("value of remote port:" " -L<value> must not be a" " negative integer"); check(remote_port_ > static_cast<int>(std::numeric_limits<uint16_t>::max()), "remote-port must be lower than " + boost::lexical_cast<std::string>(std::numeric_limits<uint16_t>::max())); break; case 'M': check(num_mac_list_files >= 1, "only one -M option can be specified"); num_mac_list_files++; mac_list_file_ = std::string(optarg); loadMacs(); break; case 'W': exit_wait_time_ = nonNegativeInteger("value of exist wait time: " "-W<value> must not be a " "negative integer"); break; case 'n': num_req = positiveInteger("value of num-request:" " -n<value> must be a positive integer"); if (num_request_.size() >= 2) { isc_throw(isc::InvalidParameter, "value of maximum number of requests: -n<value> " "already specified, unexpected 3rd occurrence" " of -n<value>"); } num_request_.push_back(num_req); break; case 'O': if (rnd_offset_.size() < 2) { offset_arg = positiveInteger("value of random offset: " "-O<value> must be greater than 3"); } else { isc_throw(isc::InvalidParameter, "random offsets already specified," " unexpected 3rd occurrence of -O<value>"); } check(offset_arg < 3, "value of random random-offset:" " -O<value> must be greater than 3 "); rnd_offset_.push_back(offset_arg); break; case 'o': { // we must know how to contruct the option: whether it's v4 or v6. check( (ipversion_ != 4) && (ipversion_ != 6), "-4 or -6 must be explicitly specified before -o is used."); // custom option (expected format: code,hexstring) std::string opt_text = std::string(optarg); size_t coma_loc = opt_text.find(','); check(coma_loc == std::string::npos, "-o option must provide option code, a coma and hexstring for" " the option content, e.g. -o60,646f63736973 for sending option" " 60 (class-id) with the value 'docsis'"); int code = 0; // Try to parse the option code try { code = boost::lexical_cast<int>(opt_text.substr(0,coma_loc)); check(code <= 0, "Option code can't be negative"); } catch (const boost::bad_lexical_cast&) { isc_throw(InvalidParameter, "Invalid option code specified for " "-o option, expected format: -o<integer>,<hexstring>"); } // Now try to interpret the hexstring opt_text = opt_text.substr(coma_loc + 1); std::vector<uint8_t> bin; try { isc::util::encode::decodeHex(opt_text, bin); } catch (const BadValue& e) { isc_throw(InvalidParameter, "Error during encoding option -o:" << e.what()); } // Create and remember the option. OptionPtr opt(new Option(ipversion_ == 4 ? Option::V4 : Option::V6, code, bin)); extra_opts_.insert(make_pair(code, opt)); break; } case 'p': period_ = positiveInteger("value of test period:" " -p<value> must be a positive integer"); break; case 'P': preload_ = nonNegativeInteger("number of preload packets:" " -P<value> must not be " "a negative integer"); break; case 'r': rate_ = positiveInteger("value of rate:" " -r<value> must be a positive integer"); break; case 'R': initClientsNum(); break; case 's': seed_ = static_cast<unsigned int> (nonNegativeInteger("value of seed:" " -s <seed> must be non-negative integer")); seeded_ = seed_ > 0 ? true : false; break; case 'S': sid_offset_ = positiveInteger("value of server id offset:" " -S<value> must be a" " positive integer"); break; case 't': report_delay_ = positiveInteger("value of report delay:" " -t<value> must be a" " positive integer"); break; case 'T': if (template_file_.size() < 2) { sarg = nonEmptyString("template file name not specified," " expected -T<filename>"); template_file_.push_back(sarg); } else { isc_throw(isc::InvalidParameter, "template files are already specified," " unexpected 3rd -T<filename> occurrence"); } break; case 'v': version(); return (true); case 'w': wrapped_ = nonEmptyString("command for wrapped mode:" " -w<command> must be specified"); break; case 'x': diags_ = nonEmptyString("value of diagnostics selectors:" " -x<value> must be specified"); break; case 'X': if (xid_offset_.size() < 2) { offset_arg = positiveInteger("value of transaction id:" " -X<value> must be a" " positive integer"); } else { isc_throw(isc::InvalidParameter, "transaction ids already specified," " unexpected 3rd -X<value> occurrence"); } xid_offset_.push_back(offset_arg); break; case 'Y': wait_for_elapsed_time_ = nonNegativeInteger("value of time:" " -Y<value> must be a non negative integer"); break; case 'y': increased_elapsed_time_ = positiveInteger("value of time:" " -y<value> must be a positive integer"); break; case LONG_OPT_SCENARIO: { auto optarg_text = std::string(optarg); if (optarg_text == "basic") { scenario_ = Scenario::BASIC; } else if (optarg_text == "avalanche") { scenario_ = Scenario::AVALANCHE; } else { isc_throw(InvalidParameter, "scenario value '" << optarg << "' is wrong - should be 'basic' or 'avalanche'"); } break; } default: isc_throw(isc::InvalidParameter, "wrong command line option"); } } // If the IP version was not specified in the // command line, assume IPv4. if (ipversion_ == 0) { ipversion_ = 4; } // If template packet files specified for both DISCOVER/SOLICIT // and REQUEST/REPLY exchanges make sure we have transaction id // and random duid offsets for both exchanges. We will duplicate // value specified as -X<value> and -R<value> for second // exchange if user did not specified otherwise. if (template_file_.size() > 1) { if (xid_offset_.size() == 1) { xid_offset_.push_back(xid_offset_[0]); } if (rnd_offset_.size() == 1) { rnd_offset_.push_back(rnd_offset_[0]); } } // Get server argument // NoteFF02::1:2 and FF02::1:3 are defined in RFC 8415 as // All_DHCP_Relay_Agents_and_Servers and All_DHCP_Servers // addresses check(optind < argc -1, "extra arguments?"); if (optind == argc - 1) { server_name_ = argv[optind]; stream << " " << server_name_; // Decode special cases if ((ipversion_ == 4) && (server_name_.compare("all") == 0)) { broadcast_ = true; // Use broadcast address as server name. server_name_ = DHCP_IPV4_BROADCAST_ADDRESS; } else if ((ipversion_ == 6) && (server_name_.compare("all") == 0)) { server_name_ = ALL_DHCP_RELAY_AGENTS_AND_SERVERS; } else if ((ipversion_ == 6) && (server_name_.compare("servers") == 0)) { server_name_ = ALL_DHCP_SERVERS; } } if (!getCleanReport()) { if (print_cmd_line) { std::cout << "Running: " << stream.str() << std::endl; } if (scenario_ == Scenario::BASIC) { std::cout << "Scenario: basic." << std::endl; } else if (scenario_ == Scenario::AVALANCHE) { std::cout << "Scenario: avalanche." << std::endl; } if (!isSingleThreaded()) { std::cout << "Multi-thread mode enabled." << std::endl; } } // Handle the local '-l' address/interface if (!localname_.empty()) { if (server_name_.empty()) { if (is_interface_ && (ipversion_ == 4)) { broadcast_ = true; server_name_ = DHCP_IPV4_BROADCAST_ADDRESS; } else if (is_interface_ && (ipversion_ == 6)) { server_name_ = ALL_DHCP_RELAY_AGENTS_AND_SERVERS; } } } if (server_name_.empty()) { isc_throw(InvalidParameter, "without an interface, server is required"); } // If DUID is not specified from command line we need to // generate one. if (duid_template_.empty()) { generateDuidTemplate(); } return (false); } void CommandOptions::initClientsNum() { const std::string errmsg = "value of -R <value> must be non-negative integer"; try { // Declare clients_num as as 64-bit signed value to // be able to detect negative values provided // by user. We would not detect negative values // if we casted directly to unsigned value. long long clients_num = boost::lexical_cast<long long>(optarg); check(clients_num < 0, errmsg); clients_num_ = boost::lexical_cast<uint32_t>(optarg); } catch (const boost::bad_lexical_cast&) { isc_throw(isc::InvalidParameter, errmsg); } } void CommandOptions::initIsInterface() { is_interface_ = false; if (!localname_.empty()) { dhcp::IfaceMgr& iface_mgr = dhcp::IfaceMgr::instance(); if (iface_mgr.getIface(localname_) != NULL) { is_interface_ = true; } } } void CommandOptions::decodeBase(const std::string& base) { std::string b(base); boost::algorithm::to_lower(b); // Currently we only support mac and duid if ((b.substr(0, 4) == "mac=") || (b.substr(0, 6) == "ether=")) { decodeMacBase(b); } else if (b.substr(0, 5) == "duid=") { decodeDuid(b); } else { isc_throw(isc::InvalidParameter, "base value not provided as -b<value>," " expected -b mac=<mac> or -b duid=<duid>"); } } void CommandOptions::decodeMacBase(const std::string& base) { // Strip string from mac= size_t found = base.find('='); static const char* errmsg = "expected -b<base> format for" " mac address is -b mac=00::0C::01::02::03::04 or" " -b mac=00:0C:01:02:03:04"; check(found == std::string::npos, errmsg); // Decode mac address to vector of uint8_t std::istringstream s1(base.substr(found + 1)); std::string token; mac_template_.clear(); // Get pieces of MAC address separated with : (or even ::) while (std::getline(s1, token, ':')) { // Convert token to byte value using std::istringstream if (token.length() > 0) { unsigned int ui = 0; try { // Do actual conversion ui = convertHexString(token); } catch (const isc::InvalidParameter&) { isc_throw(isc::InvalidParameter, "invalid characters in MAC provided"); } // If conversion succeeded store byte value mac_template_.push_back(ui); } } // MAC address must consist of 6 octets, otherwise it is invalid check(mac_template_.size() != 6, errmsg); } void CommandOptions::decodeDuid(const std::string& base) { // Strip argument from duid= std::vector<uint8_t> duid_template; size_t found = base.find('='); check(found == std::string::npos, "expected -b<base>" " format for duid is -b duid=<duid>"); std::string b = base.substr(found + 1); // DUID must have even number of digits and must not be longer than 64 bytes check(b.length() & 1, "odd number of hexadecimal digits in duid"); check(b.length() > 128, "duid too large"); check(b.length() == 0, "no duid specified"); // Turn pairs of hexadecimal digits into vector of octets for (size_t i = 0; i < b.length(); i += 2) { unsigned int ui = 0; try { // Do actual conversion ui = convertHexString(b.substr(i, 2)); } catch (const isc::InvalidParameter&) { isc_throw(isc::InvalidParameter, "invalid characters in DUID provided," " expected hex digits"); } duid_template.push_back(static_cast<uint8_t>(ui)); } // @todo Get rid of this limitation when we manage add support // for DUIDs other than LLT. Shorter DUIDs may be useful for // server testing purposes. check(duid_template.size() < 6, "DUID must be at least 6 octets long"); // Assign the new duid only if successfully generated. std::swap(duid_template, duid_template_); } void CommandOptions::generateDuidTemplate() { using namespace boost::posix_time; // Duid template will be most likely generated only once but // it is ok if it is called more then once so we simply // regenerate it and discard previous value. duid_template_.clear(); const uint8_t duid_template_len = 14; duid_template_.resize(duid_template_len); // The first four octets consist of DUID LLT and hardware type. duid_template_[0] = static_cast<uint8_t>(static_cast<uint16_t>(isc::dhcp::DUID::DUID_LLT) >> 8); duid_template_[1] = static_cast<uint8_t>(static_cast<uint16_t>(isc::dhcp::DUID::DUID_LLT) & 0xff); duid_template_[2] = HWTYPE_ETHERNET >> 8; duid_template_[3] = HWTYPE_ETHERNET & 0xff; // As described in RFC 8415: 'the time value is the time // that the DUID is generated represented in seconds // since midnight (UTC), January 1, 2000, modulo 2^32.' ptime now = microsec_clock::universal_time(); ptime duid_epoch(from_iso_string("20000101T000000")); time_period period(duid_epoch, now); uint32_t duration_sec = htonl(period.length().total_seconds()); memcpy(&duid_template_[4], &duration_sec, 4); // Set link layer address (6 octets). This value may be // randomized before sending a packet to simulate different // clients. memcpy(&duid_template_[8], &mac_template_[0], 6); } uint8_t CommandOptions::convertHexString(const std::string& text) const { unsigned int ui = 0; // First, check if we are dealing with hexadecimal digits only for (size_t i = 0; i < text.length(); ++i) { if (!std::isxdigit(text[i])) { isc_throw(isc::InvalidParameter, "The following digit: " << text[i] << " in " << text << "is not hexadecimal"); } } // If we are here, we have valid string to convert to octet std::istringstream text_stream(text); text_stream >> std::hex >> ui >> std::dec; // Check if for some reason we have overflow - this should never happen! if (ui > 0xFF) { isc_throw(isc::InvalidParameter, "Can't convert more than" " two hex digits to byte"); } return ui; } bool CommandOptions::validateIP(const std::string& line) { try { asiolink::IOAddress ip_address_ = isc::asiolink::IOAddress(line); // let's silence not used warning (void) ip_address_; } catch (const isc::asiolink::IOError& e) { return (true); } giaddr_list_.push_back(line); multi_subnet_ = true; return (false); } void CommandOptions::loadGiaddr() { std::string line; std::ifstream infile(giaddr_list_file_.c_str()); size_t cnt = 0; while (std::getline(infile, line)) { cnt++; stringstream tmp; tmp << "invalid address in line: "<< cnt; check(validateIP(line), tmp.str()); } } void CommandOptions::loadMacs() { std::string line; std::ifstream infile(mac_list_file_.c_str()); size_t cnt = 0; while (std::getline(infile, line)) { cnt++; stringstream tmp; tmp << "invalid mac in input line " << cnt; // Let's print more meaningful error that contains line with error. check(decodeMacString(line), tmp.str()); } } bool CommandOptions::decodeMacString(const std::string& line) { // decode mac string into a vector of uint8_t returns true in case of error. std::istringstream s(line); std::string token; std::vector<uint8_t> mac; while(std::getline(s, token, ':')) { // Convert token to byte value using std::istringstream if (token.length() > 0) { unsigned int ui = 0; try { // Do actual conversion ui = convertHexString(token); } catch (const isc::InvalidParameter&) { return (true); } // If conversion succeeded store byte value mac.push_back(ui); } } mac_list_.push_back(mac); return (false); } void CommandOptions::validate() { check((getIpVersion() != 4) && (isBroadcast() != 0), "-B is not compatible with IPv6 (-6)"); check((getIpVersion() != 6) && (isRapidCommit() != 0), "-6 (IPv6) must be set to use -c"); check(getIpVersion() == 4 && isUseRelayedV6(), "Can't use -4 with -A, it's a V6 only option."); check((getIpVersion() != 6) && (getReleaseRate() != 0), "-F<release-rate> may be used with -6 (IPv6) only"); check((getExchangeMode() == DO_SA) && (getNumRequests().size() > 1), "second -n<num-request> is not compatible with -i"); check((getIpVersion() == 4) && !getLeaseType().is(LeaseType::ADDRESS), "-6 option must be used if lease type other than '-e address-only'" " is specified"); check(!getTemplateFiles().empty() && !getLeaseType().is(LeaseType::ADDRESS), "template files may be only used with '-e address-only'"); check((getExchangeMode() == DO_SA) && (getDropTime()[1] != 1.), "second -d<drop-time> is not compatible with -i"); check((getExchangeMode() == DO_SA) && ((getMaxDrop().size() > 1) || (getMaxDropPercentage().size() > 1)), "second -D<max-drop> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (isUseFirst()), "-1 is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getTemplateFiles().size() > 1), "second -T<template-file> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getTransactionIdOffset().size() > 1), "second -X<xid-offset> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getRandomOffset().size() > 1), "second -O<random-offset is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getElapsedTimeOffset() >= 0), "-E<time-offset> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getServerIdOffset() >= 0), "-S<srvid-offset> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getRequestedIpOffset() >= 0), "-I<ip-offset> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getRenewRate() != 0), "-f<renew-rate> is not compatible with -i"); check((getExchangeMode() == DO_SA) && (getReleaseRate() != 0), "-F<release-rate> is not compatible with -i"); check((getExchangeMode() != DO_SA) && (isRapidCommit() != 0), "-i must be set to use -c"); check((getRate() != 0) && (getRenewRate() + getReleaseRate() > getRate()), "The sum of Renew rate (-f<renew-rate>) and Release rate" " (-F<release-rate>) must not be greater than the exchange" " rate specified as -r<rate>"); check((getRate() == 0) && (getRenewRate() != 0), "Renew rate specified as -f<renew-rate> must not be specified" " when -r<rate> parameter is not specified"); check((getRate() == 0) && (getReleaseRate() != 0), "Release rate specified as -F<release-rate> must not be specified" " when -r<rate> parameter is not specified"); check((getTemplateFiles().size() < getTransactionIdOffset().size()), "-T<template-file> must be set to use -X<xid-offset>"); check((getTemplateFiles().size() < getRandomOffset().size()), "-T<template-file> must be set to use -O<random-offset>"); check((getTemplateFiles().size() < 2) && (getElapsedTimeOffset() >= 0), "second/request -T<template-file> must be set to use -E<time-offset>"); check((getTemplateFiles().size() < 2) && (getServerIdOffset() >= 0), "second/request -T<template-file> must be set to " "use -S<srvid-offset>"); check((getTemplateFiles().size() < 2) && (getRequestedIpOffset() >= 0), "second/request -T<template-file> must be set to " "use -I<ip-offset>"); check((!getMacListFile().empty() && base_.size() > 0), "Can't use -b with -M option"); check((getWaitForElapsedTime() == -1 && getIncreaseElapsedTime() != -1), "Option -y can't be used without -Y"); check((getWaitForElapsedTime() != -1 && getIncreaseElapsedTime() == -1), "Option -Y can't be used without -y"); auto nthreads = std::thread::hardware_concurrency(); if (nthreads == 1 && isSingleThreaded() == false) { std::cout << "WARNING: Currently system can run only 1 thread in parallel." << std::endl << "WARNING: Better results are achieved when run in single-threaded mode." << std::endl << "WARNING: To switch use -g single option." << std::endl; } else if (nthreads > 1 && isSingleThreaded()) { std::cout << "WARNING: Currently system can run more than 1 thread in parallel." << std::endl << "WARNING: Better results are achieved when run in multi-threaded mode." << std::endl << "WARNING: To switch use -g multi option." << std::endl; } if (scenario_ == Scenario::AVALANCHE) { check(getClientsNum() <= 0, "in case of avalanche scenario number\nof clients must be specified" " using -R option explicitly"); // in case of AVALANCHE drops ie. long responses should not be observed by perfdhcp double dt[2] = { 1000.0, 1000.0 }; drop_time_.assign(dt, dt + 2); if (drop_time_set_) { std::cout << "INFO: in avalanche scenario drop time is ignored" << std::endl; } } } void CommandOptions::check(bool condition, const std::string& errmsg) const { // The same could have been done with macro or just if statement but // we prefer functions to macros here std::ostringstream stream; stream << errmsg << "\n"; if (condition) { isc_throw(isc::InvalidParameter, errmsg); } } int CommandOptions::positiveInteger(const std::string& errmsg) const { try { int value = boost::lexical_cast<int>(optarg); check(value <= 0, errmsg); return (value); } catch (const boost::bad_lexical_cast&) { isc_throw(InvalidParameter, errmsg); } } int CommandOptions::nonNegativeInteger(const std::string& errmsg) const { try { int value = boost::lexical_cast<int>(optarg); check(value < 0, errmsg); return (value); } catch (const boost::bad_lexical_cast&) { isc_throw(InvalidParameter, errmsg); } } std::string CommandOptions::nonEmptyString(const std::string& errmsg) const { std::string sarg = optarg; if (sarg.length() == 0) { isc_throw(isc::InvalidParameter, errmsg); } return sarg; } void CommandOptions::initLeaseType() { std::string lease_type_arg = optarg; lease_type_.fromCommandLine(lease_type_arg); } void CommandOptions::printCommandLine() const { std::cout << "IPv" << static_cast<int>(ipversion_) << std::endl; if (exchange_mode_ == DO_SA) { if (ipversion_ == 4) { std::cout << "DISCOVER-OFFER only" << std::endl; } else { std::cout << "SOLICIT-ADVERTISE only" << std::endl; } } std::cout << "lease-type=" << getLeaseType().toText() << std::endl; if (rate_ != 0) { std::cout << "rate[1/s]=" << rate_ << std::endl; } if (getRenewRate() != 0) { std::cout << "renew-rate[1/s]=" << getRenewRate() << std::endl; } if (getReleaseRate() != 0) { std::cout << "release-rate[1/s]=" << getReleaseRate() << std::endl; } if (report_delay_ != 0) { std::cout << "report[s]=" << report_delay_ << std::endl; } if (clients_num_ != 0) { std::cout << "clients=" << clients_num_ << std::endl; } for (size_t i = 0; i < base_.size(); ++i) { std::cout << "base[" << i << "]=" << base_[i] << std::endl; } for (size_t i = 0; i < num_request_.size(); ++i) { std::cout << "num-request[" << i << "]=" << num_request_[i] << std::endl; } if (period_ != 0) { std::cout << "test-period=" << period_ << std::endl; } for (size_t i = 0; i < drop_time_.size(); ++i) { std::cout << "drop-time[" << i << "]=" << drop_time_[i] << std::endl; } for (size_t i = 0; i < max_drop_.size(); ++i) { std::cout << "max-drop{" << i << "]=" << max_drop_[i] << std::endl; } for (size_t i = 0; i < max_pdrop_.size(); ++i) { std::cout << "max-pdrop{" << i << "]=" << max_pdrop_[i] << std::endl; } if (preload_ != 0) { std::cout << "preload=" << preload_ << std::endl; } if (getLocalPort() != 0) { std::cout << "local-port=" << local_port_ << std::endl; } if (getRemotePort() != 0) { std::cout << "remote-port=" << remote_port_ << std::endl; } if (seeded_) { std::cout << "seed=" << seed_ << std::endl; } if (broadcast_) { std::cout << "broadcast" << std::endl; } if (rapid_commit_) { std::cout << "rapid-commit" << std::endl; } if (use_first_) { std::cout << "use-first" << std::endl; } if (!mac_list_file_.empty()) { std::cout << "mac-list-file=" << mac_list_file_ << std::endl; } for (size_t i = 0; i < template_file_.size(); ++i) { std::cout << "template-file[" << i << "]=" << template_file_[i] << std::endl; } for (size_t i = 0; i < xid_offset_.size(); ++i) { std::cout << "xid-offset[" << i << "]=" << xid_offset_[i] << std::endl; } if (elp_offset_ != 0) { std::cout << "elp-offset=" << elp_offset_ << std::endl; } for (size_t i = 0; i < rnd_offset_.size(); ++i) { std::cout << "rnd-offset[" << i << "]=" << rnd_offset_[i] << std::endl; } if (sid_offset_ != 0) { std::cout << "sid-offset=" << sid_offset_ << std::endl; } if (rip_offset_ != 0) { std::cout << "rip-offset=" << rip_offset_ << std::endl; } if (!diags_.empty()) { std::cout << "diagnostic-selectors=" << diags_ << std::endl; } if (!wrapped_.empty()) { std::cout << "wrapped=" << wrapped_ << std::endl; } if (!localname_.empty()) { if (is_interface_) { std::cout << "interface=" << localname_ << std::endl; } else { std::cout << "local-addr=" << localname_ << std::endl; } } if (!server_name_.empty()) { std::cout << "server=" << server_name_ << std::endl; } if (single_thread_mode_) { std::cout << "single-thread-mode" << std::endl; } else { std::cout << "multi-thread-mode" << std::endl; } } void CommandOptions::usage() const { std::cout << "perfdhcp [-huv] [-4|-6] [-A<encapsulation-level>] [-e<lease-type>]\n" " [-r<rate>] [-f<renew-rate>]\n" " [-F<release-rate>] [-t<report>] [-C<separator>] [-R<range>]\n" " [-b<base>] [-n<num-request>] [-p<test-period>] [-d<drop-time>]\n" " [-D<max-drop>] [-l<local-addr|interface>] [-P<preload>]\n" " [-L<local-port>] [-N<remote-port>]\n" " [-o<code,hexstring>] [-s<seed>] [-i] [-B] [-W<late-exit-delay>]\n" " [-c] [-1] [-M<mac-list-file>] [-T<template-file>]\n" " [-X<xid-offset>] [-O<random-offset] [-E<time-offset>]\n" " [-S<srvid-offset>] [-I<ip-offset>] [-x<diagnostic-selector>]\n" " [-w<wrapped>] [server]\n" "\n" "The [server] argument is the name/address of the DHCP server to\n" "contact. For DHCPv4 operation, exchanges are initiated by\n" "transmitting a DHCP DISCOVER to this address.\n" "\n" "For DHCPv6 operation, exchanges are initiated by transmitting a DHCP\n" "SOLICIT to this address. In the DHCPv6 case, the special name 'all'\n" "can be used to refer to All_DHCP_Relay_Agents_and_Servers (the\n" "multicast address FF02::1:2), or the special name 'servers' to refer\n" "to All_DHCP_Servers (the multicast address FF05::1:3). The [server]\n" "argument is optional only in the case that -l is used to specify an\n" "interface, in which case [server] defaults to 'all'.\n" "\n" "The default is to perform a single 4-way exchange, effectively pinging\n" "the server.\n" "The -r option is used to set up a performance test, without\n" "it exchanges are initiated as fast as possible.\n" "The other scenario is an avalanche which is selected by\n" "--scenario avalanche. It first sends as many Discovery or Solicit\n" "messages as request in -R option then back off mechanism is used for\n" "each simulated client until all requests are answered. At the end\n" "time of whole scenario is reported.\n" "\n" "Options:\n" "-1: Take the server-ID option from the first received message.\n" "-4: DHCPv4 operation (default). This is incompatible with the -6 option.\n" "-6: DHCPv6 operation. This is incompatible with the -4 option.\n" "-u: Enable checking address uniqueness. Lease valid lifetime\n" " should not be shorter than test duration.\n" "-b<base>: The base mac, duid, IP, etc, used to simulate different\n" " clients. This can be specified multiple times, each instance is\n" " in the <type>=<value> form, for instance:\n" " (and default) mac=00:0c:01:02:03:04.\n" "-d<drop-time>: Specify the time after which a request is treated as\n" " having been lost. The value is given in seconds and may contain a\n" " fractional component. The default is 1 second.\n" "-e<lease-type>: A type of lease being requested from the server. It\n" " may be one of the following: address-only, prefix-only or\n" " address-and-prefix. The address-only indicates that the regular\n" " address (v4 or v6) will be requested. The prefix-only indicates\n" " that the IPv6 prefix will be requested. The address-and-prefix\n" " indicates that both IPv6 address and prefix will be requested.\n" " The '-e prefix-only' and -'e address-and-prefix' must not be\n" " used with -4.\n" "-E<time-offset>: Offset of the (DHCPv4) secs field / (DHCPv6)\n" " elapsed-time option in the (second/request) template.\n" " The value 0 disables it.\n" "-f<renew-rate>: Rate at which DHCPv4 or DHCPv6 renew requests are sent\n" " to a server. This value is only valid when used in conjunction\n" " with the exchange rate (given by -r<rate>). Furthermore the sum of\n" " this value and the release-rate (given by -F<rate) must be equal\n" " to or less than the exchange rate.\n" "-g: Select thread mode: 'single' or 'multi'. In multi-thread mode packets\n" " are received in separate thread. This allows better utilisation of CPUs.\n" " If more than 1 CPU is present then multi-thread mode is the default,\n" " otherwise single-thread is the default.\n" "-h: Print this help.\n" "-i: Do only the initial part of an exchange: DO or SA, depending on\n" " whether -6 is given.\n" "-I<ip-offset>: Offset of the (DHCPv4) IP address in the requested-IP\n" " option / (DHCPv6) IA_NA option in the (second/request) template.\n" "-J<giaddr-list-file>: Text file that include multiple addresses.\n" " If provided perfdhcp will choose randomly one of addresses for each\n" " exchange.\n" "-l<local-addr|interface>: For DHCPv4 operation, specify the local\n" " hostname/address to use when communicating with the server. By\n" " default, the interface address through which traffic would\n" " normally be routed to the server is used.\n" " For DHCPv6 operation, specify the name of the network interface\n" " via which exchanges are initiated.\n" "-L<local-port>: Specify the local port to use\n" " (the value 0 means to use the default).\n" "-M<mac-list-file>: A text file containing a list of MAC addresses,\n" " one per line. If provided, a MAC address will be chosen randomly\n" " from this list for every new exchange. In the DHCPv6 case, MAC\n" " addresses are used to generate DUID-LLs. This parameter must not be\n" " used in conjunction with the -b parameter.\n" "-N<remote-port>: Specify the remote port to use\n" " (the value 0 means to use the default).\n" "-o<code,hexstring>: Send custom option with the specified code and the\n" " specified buffer in hexstring format.\n" "-O<random-offset>: Offset of the last octet to randomize in the template.\n" "-P<preload>: Initiate first <preload> exchanges back to back at startup.\n" "-r<rate>: Initiate <rate> DORA/SARR (or if -i is given, DO/SA)\n" " exchanges per second. A periodic report is generated showing the\n" " number of exchanges which were not completed, as well as the\n" " average response latency. The program continues until\n" " interrupted, at which point a final report is generated.\n" "-R<range>: Specify how many different clients are used. With 1\n" " (the default), all requests seem to come from the same client.\n" "-s<seed>: Specify the seed for randomization, making it repeatable.\n" "--scenario <name>: where name is 'basic' (default) or 'avalanche'.\n" "-S<srvid-offset>: Offset of the server-ID option in the\n" " (second/request) template.\n" "-T<template-file>: The name of a file containing the template to use\n" " as a stream of hexadecimal digits.\n" "-v: Report the version number of this program.\n" "-W<time>: Specifies exit-wait-time parameter, that makes perfdhcp wait\n" " for <time> us after an exit condition has been met to receive all\n" " packets without sending any new packets. Expressed in microseconds.\n" "-w<wrapped>: Command to call with start/stop at the beginning/end of\n" " the program.\n" "-x<diagnostic-selector>: Include extended diagnostics in the output.\n" " <diagnostic-selector> is a string of single-keywords specifying\n" " the operations for which verbose output is desired. The selector\n" " keyletters are:\n" " * 'a': print the decoded command line arguments\n" " * 'e': print the exit reason\n" " * 'i': print rate processing details\n" " * 's': print first server-id\n" " * 't': when finished, print timers of all successful exchanges\n" " * 'T': when finished, print templates\n" "-X<xid-offset>: Transaction ID (aka. xid) offset in the template.\n" "-Y<time>: time in seconds after which perfdhcp will start sending\n" " messages with increased elapsed time option.\n" "-y<time>: period of time in seconds in which perfdhcp will be sending\n" " messages with increased elapsed time option.\n" "DHCPv4 only options:\n" "-B: Force broadcast handling.\n" "\n" "DHCPv6 only options:\n" "-c: Add a rapid commit option (exchanges will be SA).\n" "-F<release-rate>: Rate at which IPv6 Release requests are sent to\n" " a server. This value is only valid when used in conjunction with\n" " the exchange rate (given by -r<rate>). Furthermore the sum of\n" " this value and the renew-rate (given by -f<rate) must be equal\n" " to or less than the exchange rate.\n" "-A<encapsulation-level>: Specifies that relayed traffic must be\n" " generated. The argument specifies the level of encapsulation, i.e.\n" " how many relay agents are simulated. Currently the only supported\n" " <encapsulation-level> value is 1, which means that the generated\n" " traffic is an equivalent of the traffic passing through a single\n" " relay agent.\n" "\n" "The remaining options are typically used in conjunction with -r:\n" "\n" "-D<max-drop>: Abort the test immediately if max-drop requests have\n" " been dropped. max-drop must be a positive integer. If max-drop\n" " includes the suffix '%', it specifies a maximum percentage of\n" " requests that may be dropped before abort. In this case, testing\n" " of the threshold begins after 10 requests have been expected to\n" " be received.\n" "-n<num-request>: Initiate <num-request> transactions. No report is\n" " generated until all transactions have been initiated/waited-for,\n" " after which a report is generated and the program terminates.\n" "-p<test-period>: Send requests for the given test period, which is\n" " specified in the same manner as -d. This can be used as an\n" " alternative to -n, or both options can be given, in which case the\n" " testing is completed when either limit is reached.\n" "-t<report>: Delay in seconds between two periodic reports.\n" "-C<separator>: Output reduced, an argument is a separator for periodic\n" " (-t) reports generated in easy parsable mode. Data output won't be\n" " changed, remain identical as in -t option.\n" "\n" "Errors:\n" "- tooshort: received a too short message\n" "- orphans: received a message which doesn't match an exchange\n" " (duplicate, late or not related)\n" "- locallimit: reached to local system limits when sending a message.\n" "\n" "Exit status:\n" "The exit status is:\n" "0 on complete success.\n" "1 for a general error.\n" "2 if an error is found in the command line arguments.\n" "3 if there are no general failures in operation, but one or more\n" " exchanges are not successfully completed.\n"; } void CommandOptions::version() const { std::cout << "VERSION: " << VERSION << std::endl; } } // namespace perfdhcp } // namespace isc
40.370206
139
0.564101
piskyscan
02e35b35354239e1a7ac3fa5e1e1a8095133d691
2,841
cpp
C++
app/rtkget_qt/getoptdlg.cpp
mws-rmain/RTKLIB
3cd1f799b04da433f29473332c250b0518aa762c
[ "BSD-2-Clause" ]
2
2021-11-06T07:23:27.000Z
2021-11-07T14:29:21.000Z
app/rtkget_qt/getoptdlg.cpp
mws-rmain/RTKLIB
3cd1f799b04da433f29473332c250b0518aa762c
[ "BSD-2-Clause" ]
null
null
null
app/rtkget_qt/getoptdlg.cpp
mws-rmain/RTKLIB
3cd1f799b04da433f29473332c250b0518aa762c
[ "BSD-2-Clause" ]
3
2020-09-28T02:42:26.000Z
2020-09-28T09:01:08.000Z
//--------------------------------------------------------------------------- #include "getoptdlg.h" #include "getmain.h" #include <QFileDialog> #include <QShowEvent> #include <QIntValidator> #include <QCompleter> #include <QFileSystemModel> extern MainForm *mainForm; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- DownOptDialog::DownOptDialog(QWidget* parent) : QDialog(parent) { setupUi(this); QCompleter *fileCompleter=new QCompleter(this); QFileSystemModel *fileModel=new QFileSystemModel(fileCompleter); fileModel->setRootPath(""); fileCompleter->setModel(fileModel); UrlFile->setCompleter(fileCompleter); LogFile->setCompleter(fileCompleter); connect(BtnCancel,SIGNAL(clicked(bool)),this,SLOT(reject())); connect(BtnLogFile,SIGNAL(clicked(bool)),this,SLOT(BtnLogFileClick())); connect(BtnOk,SIGNAL(clicked(bool)),this,SLOT(BtnOkClick())); connect(BtnUrlFile,SIGNAL(clicked(bool)),this,SLOT(BtnUrlFileClick())); NCol->setValidator(new QIntValidator(0,9999)); } //--------------------------------------------------------------------------- void DownOptDialog::BtnUrlFileClick() { UrlFile->setText(QDir::toNativeSeparators(QFileDialog::getOpenFileName(this,tr("GNSS Data URL File")))); } //--------------------------------------------------------------------------- void DownOptDialog::BtnLogFileClick() { LogFile->setText(QDir::toNativeSeparators(QFileDialog::getSaveFileName(this,tr("Download Log File")))); } //--------------------------------------------------------------------------- void DownOptDialog::showEvent(QShowEvent *event) { if (event->spontaneous()) return; HoldErr ->setChecked(mainForm->HoldErr); HoldList ->setChecked(mainForm->HoldList); NCol ->setText(QString::number(mainForm->NCol)); Proxy ->setText(mainForm->ProxyAddr); UrlFile ->setText(mainForm->UrlFile); LogFile ->setText(mainForm->LogFile); LogAppend->setChecked(mainForm->LogAppend); DateFormat->setCurrentIndex(mainForm->DateFormat); TraceLevel->setCurrentIndex(mainForm->TraceLevel); } //--------------------------------------------------------------------------- void DownOptDialog::BtnOkClick() { mainForm->HoldErr =HoldErr ->isChecked(); mainForm->HoldList =HoldList ->isChecked(); mainForm->NCol =NCol ->text().toInt(); mainForm->ProxyAddr=Proxy ->text(); mainForm->UrlFile =UrlFile ->text(); mainForm->LogFile =LogFile ->text(); mainForm->LogAppend=LogAppend->isChecked(); mainForm->DateFormat=DateFormat->currentIndex(); mainForm->TraceLevel=TraceLevel->currentIndex(); accept(); } //---------------------------------------------------------------------------
36.423077
108
0.55931
mws-rmain
02e51ae1940317f8e02b1331ef02dc27354018cb
2,358
hpp
C++
include/Aether/utils/SDL2_gfx_ext.hpp
NightYoshi370/Aether
87d2b81f5d3143e39c363a9c81c195d440d7a4e8
[ "MIT" ]
9
2020-05-06T20:23:22.000Z
2022-01-19T10:37:46.000Z
include/Aether/utils/SDL2_gfx_ext.hpp
NightYoshi370/Aether
87d2b81f5d3143e39c363a9c81c195d440d7a4e8
[ "MIT" ]
11
2020-03-22T03:40:50.000Z
2020-06-09T00:53:13.000Z
include/Aether/utils/SDL2_gfx_ext.hpp
NightYoshi370/Aether
87d2b81f5d3143e39c363a9c81c195d440d7a4e8
[ "MIT" ]
6
2020-05-03T06:59:36.000Z
2020-07-15T04:21:59.000Z
#ifndef SDL2_GFX_EXT #define SDL2_GFX_EXT #include <SDL2/SDL.h> int thickEllipseRGBA(SDL_Renderer * renderer, Sint16 xc, Sint16 yc, Sint16 xr, Sint16 yr, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 thick); int thickArcRGBA(SDL_Renderer * renderer, Sint16 xc, Sint16 yc, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 thick); int thickCircleRGBA(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 thick); int thickEllipseColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color, Uint8 thick); int thickArcColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color, Uint8 thick); int thickCircleColor(SDL_Renderer * renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color, Uint8 thick); int aaFilledEllipseRGBA(SDL_Renderer * renderer, float cx, float cy, float rx, float ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int aaFilledEllipseColor(SDL_Renderer * renderer, float cx, float cy, float rx, float ry, Uint32 color); int aaFilledPolygonRGBA(SDL_Renderer * renderer, const double * vx, const double * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int aaFilledPolygonColor(SDL_Renderer * renderer, const double * vx, const double * vy, int n, Uint32 color); int aaFilledPieRGBA(SDL_Renderer * renderer, float cx, float cy, float rx, float ry, float start, float end, Uint32 chord, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int aaFilledPieColor(SDL_Renderer * renderer, float cx, float cy, float rx, float ry, float start, float end, Uint32 chord, Uint32 color); int aaArcRGBA(SDL_Renderer * renderer, float cx, float cy, float rx, float ry, float start, float end, float thick, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int aaArcColor(SDL_Renderer * renderer, float cx, float cy, float rx, float ry, float start, float end, float thick, Uint32 color); int aaBezierRGBA(SDL_Renderer * renderer, double *x, double *y, int n, int s, float thick, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int aaBezierColor(SDL_Renderer * renderer, double *x, double *y, int n, int s, float thick, int color); int aaFilledPolyBezierRGBA(SDL_Renderer * renderer, double *x, double *y, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a); int aaFilledPolyBezierColor(SDL_Renderer * renderer, double *x, double *y, int n, int s, int color); #endif
94.32
159
0.751484
NightYoshi370
02e636df583bd7fd127a07153f3b4695dc27f1d2
2,933
cpp
C++
CinemaMaps.cpp
Natan-holanda/POO-UFC
c2a856695f3f1070ade028f70b6fcf9e1018d482
[ "MIT" ]
null
null
null
CinemaMaps.cpp
Natan-holanda/POO-UFC
c2a856695f3f1070ade028f70b6fcf9e1018d482
[ "MIT" ]
null
null
null
CinemaMaps.cpp
Natan-holanda/POO-UFC
c2a856695f3f1070ade028f70b6fcf9e1018d482
[ "MIT" ]
null
null
null
#include <iostream> #include <string> #include <map> #include <vector> #include <sstream> #include <algorithm> using namespace std; class Cliente { std::string nome; int id; int pos; public : Cliente (std::string nome = "", int id = 0, int pos = 0) { this->nome = nome; this->id = id; this->pos = pos; } std::string getNome() { return nome; } int getId() { return id; } int getPos() { return pos; } void setNome(std::string nome) { this->nome = nome; } void setId(int id) { this->id = id; } void setPos(int pos) { this->pos = pos; } std::string toString() { std::string texto{this->nome + ":" + std::to_string(this->id) + ":" + std::to_string(this->pos) + " "}; return texto; } }; class Cinema { map <int, Cliente> cadeiras; public: Cinema (int capacidade = 0) { for(int i = 0; i < capacidade; i++) { cadeiras[i] = Cliente("", 0, i); } } void init(int capacidade) { for (int i = 0; i < capacidade; i++) { cadeiras[i] = Cliente("", 0, i); } } void reservar(Cliente cliente) { auto it = cadeiras.find(cliente.getPos()); if(it->second.getNome() == "") { cadeiras[cliente.getPos()] = cliente; } else { cout << "fail : cadeira ocupada" << endl; } } void cancelar(string name) { for(auto it = cadeiras.begin(); it != cadeiras.end(); it++) { if(it->second.getNome() == name) { cadeiras[it->first] = Cliente("", 0, it->first); return; } } cout << "fail : cliente nao esta no cinema" << endl; } void imprimir() { cout << "["; for(auto it = cadeiras.begin(); it != cadeiras.end(); it++) { if(it->second.getNome() != "") { cout << it->second.toString(); }else{ cout << "- "; } } cout << "]" << endl; } }; int main() { Cinema cinema; Cliente cliente; while (true) { string line; getline(cin, line); stringstream ss(line); string command; ss >> command; if(command == "reservar") { string nome; int id; int pos; ss >> nome >> id >> pos; cliente = Cliente(nome, id, pos); cinema.reservar(cliente); } else if(command == "cancelar") { string nome; ss >> nome; cinema.cancelar(nome); } else if(command == "show") { cinema.imprimir(); } else if(command == "end") { break; }else if(command == "init") { int capacidade; ss >> capacidade; cinema.init(capacidade); } } }
25.068376
111
0.458575
Natan-holanda
02e7d5d02e81380481cac3ffe38520d690fe2867
2,799
hpp
C++
rest-server/src/services/logger_interface.hpp
OS-WASABI/CADG
b214edff82d4238e51569a42a6bdfab6806d768f
[ "BSD-3-Clause" ]
null
null
null
rest-server/src/services/logger_interface.hpp
OS-WASABI/CADG
b214edff82d4238e51569a42a6bdfab6806d768f
[ "BSD-3-Clause" ]
22
2018-10-26T17:30:24.000Z
2019-04-15T23:38:18.000Z
rest-server/src/services/logger_interface.hpp
OS-WASABI/CADG
b214edff82d4238e51569a42a6bdfab6806d768f
[ "BSD-3-Clause" ]
1
2019-03-23T16:02:17.000Z
2019-03-23T16:02:17.000Z
/// An interface logging. /** * This defines the interface for a logger. A logger handles general application * logging as well as network logging. * * Copyright 2018 Vaniya Agrawal, Ross Arcemont, Kristofer Hoadley, Shawn Hulce, Michael McCulley * * @file logger_interface.hpp * @authors Kristofer Hoadley * @date November, 2018 */ #ifndef LOGGER_INTERFACE_H #define LOGGER_INTERFACE_H #include <string> #include <vector> #include <cpprest/http_msg.h> #include <cpprest/http_listener.h> using namespace web; using namespace http; namespace cadg_rest { /** * LoggerInterface defines several ways to log information, as well as netowrk activity. * This interface must be defines in an inheriting class. */ class LoggerInterface { public: /// Generic log method. /** * @param log_level the log level [ALL, DEBUG, INFO, WARN, ERR, FATAL, OFF]. * @param message what to log. */ virtual void Log(int log_level, std::string message) = 0; /// Generic log method for logging method calls. /** * For use within a calling method of a calling class. * @param log_level The log level [ALL, DEBUG, INFO, WARN, ERR, FATAL, OFF]. * @param message The message to log. * @param calling_class The class that is calling the method. * @param calling_method The method that is being called. */ virtual void Log(int log_level, std::string message, std::string calling_class, std::string calling_method) = 0; /// Generic log method for logging method calls. /** * For use within a calling method (that contains arguments) within a calling class. * * @param log_level The log level [ALL, DEBUG, INFO, WARN, ERR, FATAL, OFF]. * @param message The message to log. * @param calling_class The class that is calling the method. * @param calling_method The method that is being called. * @param args The method arguments. * */ virtual void Log(int log_level, std::string message, std::string calling_class, std::string calling_method, std::vector<std::string> args) = 0; /// Generic log method for logging method calls. /** * For use within an http endpoint * @param message The http request message to log. * @param endpoint The http request endpoint url to log. * @param verbosity How much detail to log, higher is more. Currently only * verbosity of 0 and 1 are defined. */ virtual void LogNetworkActivity(http_request message, std::string endpoint, int verbosity = 0) = 0; /** * Set the logging level. * @param log_level the log level [ALL, DEBUG, INFO, WARN, ERR, FATAL, OFF] */ virtual void LogLevel(int log_level) = 0; }; } #endif // LOGGER_INTERFACE_H
37.824324
103
0.674169
OS-WASABI
02ea0b29a0cc34befee3e8e9b63b5e3ff4a7ed27
1,267
hpp
C++
infra/stream/LimitedInputStream.hpp
oguzcanphilips/embeddedinfralib
f1b083d61a34d123d34ab7cd51267377aa2f7855
[ "Unlicense" ]
1
2021-05-18T07:21:59.000Z
2021-05-18T07:21:59.000Z
infra/stream/LimitedInputStream.hpp
oguzcanphilips/embeddedinfralib
f1b083d61a34d123d34ab7cd51267377aa2f7855
[ "Unlicense" ]
null
null
null
infra/stream/LimitedInputStream.hpp
oguzcanphilips/embeddedinfralib
f1b083d61a34d123d34ab7cd51267377aa2f7855
[ "Unlicense" ]
null
null
null
#ifndef INFRA_LIMITED_INPUT_STREAM_HPP #define INFRA_LIMITED_INPUT_STREAM_HPP #include "infra/stream/InputStream.hpp" namespace infra { class LimitedStreamReader : public StreamReader { public: LimitedStreamReader(StreamReader& input, uint32_t length); LimitedStreamReader(const LimitedStreamReader& other); public: virtual void Extract(ByteRange range, StreamErrorPolicy& errorPolicy) override; virtual uint8_t Peek(StreamErrorPolicy& errorPolicy) override; virtual ConstByteRange ExtractContiguousRange(std::size_t max) override; virtual ConstByteRange PeekContiguousRange(std::size_t start) override; virtual bool Empty() const override; virtual std::size_t Available() const override; private: StreamReader& input; uint32_t length; }; class LimitedTextInputStream : public TextInputStream::WithReader<LimitedStreamReader> { public: using TextInputStream::WithReader<LimitedStreamReader>::WithReader; }; class LimitedDataInputStream : public DataInputStream::WithReader<LimitedStreamReader> { public: using DataInputStream::WithReader<LimitedStreamReader>::WithReader; }; } #endif
28.795455
87
0.719021
oguzcanphilips
02eb0c24bccfa926ae99a65c1b81051a05d09128
5,145
hpp
C++
include/memoria/core/types/typehash.hpp
victor-smirnov/memoria
c36a957c63532176b042b411b1646c536e71a658
[ "BSL-1.0", "Apache-2.0", "OLDAP-2.8", "BSD-3-Clause" ]
2
2021-07-30T16:54:24.000Z
2021-09-08T15:48:17.000Z
include/memoria/core/types/typehash.hpp
victor-smirnov/memoria
c36a957c63532176b042b411b1646c536e71a658
[ "BSL-1.0", "Apache-2.0", "OLDAP-2.8", "BSD-3-Clause" ]
null
null
null
include/memoria/core/types/typehash.hpp
victor-smirnov/memoria
c36a957c63532176b042b411b1646c536e71a658
[ "BSL-1.0", "Apache-2.0", "OLDAP-2.8", "BSD-3-Clause" ]
2
2020-03-14T15:15:25.000Z
2020-06-15T11:26:56.000Z
// Copyright 2011 Victor Smirnov // // 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. #pragma once #include <memoria/core/types.hpp> #include <memoria/core/types/typelist.hpp> #include <memoria/core/tools/bitmap.hpp> #include <memoria/core/types/static_md5.hpp> #include <tuple> namespace memoria { static constexpr uint8_t SHORT_TYPEHASH_LENGTH_BASE = 250; struct TypeHashes { enum {SCALAR = 1, ARRAY, CONST_VALUE}; }; // Type Code value 0 means 'no code' template <> struct TypeHash<int8_t>: UInt64Value<1> {}; template <> struct TypeHash<uint8_t>: UInt64Value<2> {}; template <> struct TypeHash<int16_t>: UInt64Value<3> {}; template <> struct TypeHash<uint16_t>: UInt64Value<4> {}; template <> struct TypeHash<int32_t>: UInt64Value<5> {}; template <> struct TypeHash<uint32_t>: UInt64Value<6> {}; template <> struct TypeHash<int64_t>: UInt64Value<7> {}; template <> struct TypeHash<uint64_t>: UInt64Value<8> {}; template <> struct TypeHash<float>: UInt64Value<9> {}; template <> struct TypeHash<double>: UInt64Value<10> {}; template <> struct TypeHash<void>: UInt64Value<11> {}; // Core datatypes: 20 - 39 // LinkedData: 40 - 44 // Reserved for Linked Data : 250 - 255 template < template <typename> class Profile, typename T > struct TypeHash<Profile<T>> { // FIXME need template assigning unique code to the each profile level using VList = UInt64List<100, TypeHash<T>::Value>; static constexpr uint64_t Value = md5::Md5Sum<VList>::Type::Value64; }; template <uint64_t Base, uint64_t ... Values> static constexpr uint64_t HashHelper = md5::Md5Sum<UInt64List<Base, Values...>>::Type::Value64; template <typename T, T V> struct TypeHash<ConstValue<T, V>> { static const uint64_t Value = HashHelper<TypeHashV<T>, TypeHashes::CONST_VALUE, V>; }; template <typename T, size_t Size> struct TypeHash<T[Size]> { static const uint64_t Value = HashHelper<TypeHashV<T>, TypeHashes::ARRAY, Size>; }; template <typename Key, typename Value> struct TypeHash<CowMap<Key, Value>>: UInt64Value< HashHelper<1104, TypeHashV<Key>, TypeHashV<Value>> > {}; template <typename T, Granularity gr> struct TypeHash<VLen<gr, T>>: UInt64Value< HashHelper<1113, TypeHashV<T>, static_cast<uint64_t>(gr)> > {}; template <> struct TypeHash<Root>: UInt64Value<1400> {}; template <int32_t BitsPerSymbol, bool Dense> struct TypeHash<Sequence<BitsPerSymbol, Dense>>: UInt64Value<HashHelper<1500, BitsPerSymbol, Dense>> {}; template <typename T, Indexed sr> struct TypeHash<FLabel<T, sr> >: UInt64Value<HashHelper<1610, (uint64_t)sr>> {}; template <int32_t BitsPerSymbol> struct TypeHash<FBLabel<BitsPerSymbol>>: UInt64Value<HashHelper<1620, BitsPerSymbol>> {}; template <typename T, Indexed sr, Granularity gr> struct TypeHash<VLabel<T, gr, sr> >: UInt64Value<HashHelper<1630, (uint64_t)sr, (uint64_t)gr>> {}; template <typename... LabelDescriptors> struct TypeHash<LabeledTree<LabelDescriptors...>> { private: using ValueList = typename TypeToValueList<TypeList<LabelDescriptors...>>::Type; using TaggedValueList = MergeValueLists<UInt64Value<1600>, ValueList>; public: static const uint64_t Value = md5::Md5Sum<TaggedValueList>::Type::Value64; }; template <typename... LabelDescriptors> struct TypeHash<LabeledTree<TypeList<LabelDescriptors...>>>: TypeHash<LabeledTree<LabelDescriptors...>> {}; template <typename CtrName> struct TypeHash<CtrWrapper<CtrName>>: UInt32Value<HashHelper<1700, TypeHashV<CtrName>>> {}; template <> struct TypeHash<WT>: UInt64Value<1800> {}; template <> struct TypeHash<VTree>: UInt64Value<1900> {}; template <typename... List> struct TypeHash<TypeList<List...>> { private: using ValueList = typename TypeToValueList<TypeList<List...>>::Type; using TaggedValueList = MergeValueLists<UInt64Value<2000>, ValueList>; public: static const uint64_t Value = md5::Md5Sum<TaggedValueList>::Result::Value64; }; template <typename... List> struct TypeHash<std::tuple<List...>> { private: using ValueList = typename TypeToValueList<TypeList<List...>>::Type; using TaggedValueList = MergeValueLists<UInt64Value<2001>, ValueList>; public: static const uint64_t Value = md5::Md5Sum<TaggedValueList>::Result::Value64; }; template <typename Key, typename Value> struct TypeHash<Table<Key, Value, PackedDataTypeSize::FIXED>>: UInt64Value < HashHelper<3098, TypeHashV<Key>, TypeHashV<Value>> > {}; template <typename Key, typename Value> struct TypeHash<Table<Key, Value, PackedDataTypeSize::VARIABLE>>: UInt64Value < HashHelper<3099, TypeHashV<Key>, TypeHashV<Value>> > {}; }
29.067797
107
0.727114
victor-smirnov
02ee7972294d1553333cb4cf01e0c191fd4dbac0
1,328
cpp
C++
Ouroboros/Source/oMemory/memcmp4.cpp
jiangzhu1212/oooii
fc00ff81e74adaafd9c98ba7c055f55d95a36e3b
[ "MIT" ]
null
null
null
Ouroboros/Source/oMemory/memcmp4.cpp
jiangzhu1212/oooii
fc00ff81e74adaafd9c98ba7c055f55d95a36e3b
[ "MIT" ]
null
null
null
Ouroboros/Source/oMemory/memcmp4.cpp
jiangzhu1212/oooii
fc00ff81e74adaafd9c98ba7c055f55d95a36e3b
[ "MIT" ]
null
null
null
// Copyright (c) 2014 Antony Arciuolo. See License.txt regarding use. #include "memduff.h" namespace ouro { bool memcmp4(const void* mem, long value, size_t bytes) { // Compares a run of memory against a constant value. // this compares a full int value rather than a char value. // First move mem up to long alignment const int32_t* body; const int8_t* prefix, *postfix; size_t prefix_nbytes, postfix_nbytes; detail::init_duffs_device_pointers_const(mem, bytes, &prefix, &prefix_nbytes, &body, &postfix, &postfix_nbytes); byte_swizzle32 s; s.as_int = value; // Duff's device up to alignment: http://en.wikipedia.org/wiki/Duff's_device switch (prefix_nbytes) { case 3: if (*prefix++ != s.as_char[3]) return false; case 2: if (*prefix++ != s.as_char[2]) return false; case 1: if (*prefix++ != s.as_char[1]) return false; default: break; } // Do aligned assignment while (body < (int32_t*)postfix) if (*body++ != value) return false; // Duff's device final bytes: http://en.wikipedia.org/wiki/Duff's_device switch (postfix_nbytes) { case 3: if (*postfix++ != s.as_char[3]) return false; case 2: if (*postfix++ != s.as_char[2]) return false; case 1: if (*postfix++ != s.as_char[1]) return false; default: break; } return true; } }
27.102041
114
0.662651
jiangzhu1212
02f6134e7c0329203cce9b5369b63d189093b5ad
50,126
cpp
C++
LAVFilters/decoder/LAVVideo/decoders/dxva2dec.cpp
lcmftianci/licodeanalysis
62e2722eba1b75ef82f7c1328585873d08bb41cc
[ "Apache-2.0" ]
2
2019-11-17T14:01:21.000Z
2019-12-24T14:29:45.000Z
LAVFilters/decoder/LAVVideo/decoders/dxva2dec.cpp
lcmftianci/licodeanalysis
62e2722eba1b75ef82f7c1328585873d08bb41cc
[ "Apache-2.0" ]
null
null
null
LAVFilters/decoder/LAVVideo/decoders/dxva2dec.cpp
lcmftianci/licodeanalysis
62e2722eba1b75ef82f7c1328585873d08bb41cc
[ "Apache-2.0" ]
3
2019-08-28T14:37:01.000Z
2020-06-17T16:46:32.000Z
/* * Copyright (C) 2011-2019 Hendrik Leppkes * http://www.1f0.de * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Basic concept based on VLC DXVA2 decoder, licensed under GPLv2 */ #include "stdafx.h" #include "dxva2dec.h" #include "dxva2/dxva_common.h" #include "dxva2/DXVA2SurfaceAllocator.h" #include "moreuuids.h" #include "Media.h" #include <Shlwapi.h> #include <dxva2api.h> #include <evr.h> #include "libavcodec/dxva2.h" #include "gpu_memcpy_sse4.h" #include <ppl.h> //////////////////////////////////////////////////////////////////////////////// // Constructor //////////////////////////////////////////////////////////////////////////////// ILAVDecoder *CreateDecoderDXVA2() { return new CDecDXVA2(); } ILAVDecoder *CreateDecoderDXVA2Native() { CDecDXVA2 *dec = new CDecDXVA2(); dec->SetNativeMode(TRUE); return dec; } HRESULT VerifyD3D9Device(DWORD & dwIndex, DWORD dwDeviceId) { HRESULT hr = S_OK; IDirect3D9 * pD3D = Direct3DCreate9(D3D_SDK_VERSION); if (!pD3D) return E_FAIL; D3DADAPTER_IDENTIFIER9 d3dai = { 0 }; // Check the combination of adapter and device id hr = pD3D->GetAdapterIdentifier(dwIndex, 0, &d3dai); if (hr == D3D_OK && d3dai.DeviceId == dwDeviceId) goto done; // find an adapter with the specified device id for (UINT i = 0; i < pD3D->GetAdapterCount(); i++) { hr = pD3D->GetAdapterIdentifier(i, 0, &d3dai); if (hr == D3D_OK && d3dai.DeviceId == dwDeviceId) { dwIndex = i; goto done; } } // fail otherwise hr = E_FAIL; done: SafeRelease(&pD3D); return hr; } // List of PCI Device ID of ATI cards with UVD or UVD+ decoding block. static DWORD UVDDeviceID [] = { 0x94C7, // ATI Radeon HD 2350 0x94C1, // ATI Radeon HD 2400 XT 0x94CC, // ATI Radeon HD 2400 Series 0x958A, // ATI Radeon HD 2600 X2 Series 0x9588, // ATI Radeon HD 2600 XT 0x9405, // ATI Radeon HD 2900 GT 0x9400, // ATI Radeon HD 2900 XT 0x9611, // ATI Radeon 3100 Graphics 0x9610, // ATI Radeon HD 3200 Graphics 0x9614, // ATI Radeon HD 3300 Graphics 0x95C0, // ATI Radeon HD 3400 Series (and others) 0x95C5, // ATI Radeon HD 3400 Series (and others) 0x95C4, // ATI Radeon HD 3400 Series (and others) 0x94C3, // ATI Radeon HD 3410 0x9589, // ATI Radeon HD 3600 Series (and others) 0x9598, // ATI Radeon HD 3600 Series (and others) 0x9591, // ATI Radeon HD 3600 Series (and others) 0x9501, // ATI Radeon HD 3800 Series (and others) 0x9505, // ATI Radeon HD 3800 Series (and others) 0x9507, // ATI Radeon HD 3830 0x9513, // ATI Radeon HD 3850 X2 0x950F, // ATI Radeon HD 3850 X2 0x0000 }; static int IsAMDUVD(DWORD dwDeviceId) { for (int i = 0; UVDDeviceID[i] != 0; i++) { if (UVDDeviceID[i] == dwDeviceId) return 1; } return 0; } //////////////////////////////////////////////////////////////////////////////// // DXVA2 decoder implementation //////////////////////////////////////////////////////////////////////////////// static void (*CopyFrameNV12)(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) = nullptr; static void CopyFrameNV12_fallback(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { const size_t size = imageHeight * pitch; memcpy(pY, pSourceData, size); memcpy(pUV, pSourceData + (surfaceHeight * pitch), size >> 1); } static void CopyFrameNV12_fallback_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { const size_t halfSize = (imageHeight * pitch) >> 1; Concurrency::parallel_for(0, 3, [&](int i) { if (i < 2) memcpy(pY + (halfSize * i), pSourceData + (halfSize * i), halfSize); else memcpy(pUV, pSourceData + (surfaceHeight * pitch), halfSize); }); } static void CopyFrameNV12_SSE4(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { const size_t size = imageHeight * pitch; gpu_memcpy(pY, pSourceData, size); gpu_memcpy(pUV, pSourceData + (surfaceHeight * pitch), size >> 1); } static void CopyFrameNV12_SSE4_MT(const BYTE *pSourceData, BYTE *pY, BYTE *pUV, size_t surfaceHeight, size_t imageHeight, size_t pitch) { const size_t halfSize = (imageHeight * pitch) >> 1; Concurrency::parallel_for(0, 3, [&](int i) { if (i < 2) gpu_memcpy(pY + (halfSize * i), pSourceData + (halfSize * i), halfSize); else gpu_memcpy(pUV, pSourceData + (surfaceHeight * pitch), halfSize); }); } CDecDXVA2::CDecDXVA2(void) : CDecAvcodec() { ZeroMemory(&dx, sizeof(dx)); ZeroMemory(&m_pSurfaces, sizeof(m_pSurfaces)); ZeroMemory(&m_pRawSurface, sizeof(m_pRawSurface)); ZeroMemory(&m_FrameQueue, sizeof(m_FrameQueue)); ZeroMemory(&m_DXVAVideoDecoderConfig, sizeof(m_DXVAVideoDecoderConfig)); } CDecDXVA2::~CDecDXVA2(void) { DestroyDecoder(true); if (m_pDXVA2Allocator) m_pDXVA2Allocator->DecoderDestruct(); } STDMETHODIMP CDecDXVA2::DestroyDecoder(bool bFull, bool bNoAVCodec) { for (int i = 0; i < DXVA2_QUEUE_SURFACES; i++) { ReleaseFrame(&m_FrameQueue[i]); } m_pCallback->ReleaseAllDXVAResources(); for (int i = 0; i < m_NumSurfaces; i++) { SafeRelease(&m_pSurfaces[i].d3d); } m_NumSurfaces = 0; SafeRelease(&m_pDecoder); if (!bNoAVCodec) { CDecAvcodec::DestroyDecoder(); } if (bFull) { FreeD3DResources(); } return S_OK; } STDMETHODIMP CDecDXVA2::FreeD3DResources() { SafeRelease(&m_pDXVADecoderService); if (m_pD3DDevMngr && m_hDevice != INVALID_HANDLE_VALUE) m_pD3DDevMngr->CloseDeviceHandle(m_hDevice); m_hDevice = INVALID_HANDLE_VALUE; SafeRelease(&m_pD3DDevMngr); SafeRelease(&m_pD3DDev); SafeRelease(&m_pD3D); if (dx.d3dlib) { FreeLibrary(dx.d3dlib); dx.d3dlib = nullptr; } if (dx.dxva2lib) { FreeLibrary(dx.dxva2lib); dx.dxva2lib = nullptr; } return S_OK; } STDMETHODIMP CDecDXVA2::InitAllocator(IMemAllocator **ppAlloc) { HRESULT hr = S_OK; if (!m_bNative) return E_NOTIMPL; m_pDXVA2Allocator = new CDXVA2SurfaceAllocator(this, &hr); if (!m_pDXVA2Allocator) { return E_OUTOFMEMORY; } if (FAILED(hr)) { SAFE_DELETE(m_pDXVA2Allocator); return hr; } return m_pDXVA2Allocator->QueryInterface(__uuidof(IMemAllocator), (void **)ppAlloc); } STDMETHODIMP CDecDXVA2::PostConnect(IPin *pPin) { HRESULT hr = S_OK; if (!m_bNative && m_pD3DDevMngr) return S_OK; DbgLog((LOG_TRACE, 10, L"CDecDXVA2::PostConnect()")); IMFGetService *pGetService = nullptr; hr = pPin->QueryInterface(__uuidof(IMFGetService), (void**)&pGetService); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> IMFGetService not available")); goto done; } // Release old D3D resources, we're about to re-init m_pCallback->ReleaseAllDXVAResources(); FreeD3DResources(); // Get the Direct3D device manager. hr = pGetService->GetService(MR_VIDEO_ACCELERATION_SERVICE, __uuidof(IDirect3DDeviceManager9), (void**)&m_pD3DDevMngr); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> D3D Device Manager not available")); goto done; } hr = SetD3DDeviceManager(m_pD3DDevMngr); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> Setting D3D Device Manager failed")); goto done; } if (m_bNative) { if (!m_pDecoder) { // If this is the first call, re-align surfaces, as the requirements may only be known now m_dwSurfaceWidth = dxva_align_dimensions(m_pAVCtx->codec_id, m_pAVCtx->coded_width); m_dwSurfaceHeight = dxva_align_dimensions(m_pAVCtx->codec_id, m_pAVCtx->coded_height); } CMediaType mt = m_pCallback->GetOutputMediaType(); if ( (m_eSurfaceFormat == FOURCC_NV12 && mt.subtype != MEDIASUBTYPE_NV12) || (m_eSurfaceFormat == FOURCC_P010 && mt.subtype != MEDIASUBTYPE_P010) || (m_eSurfaceFormat == FOURCC_P016 && mt.subtype != MEDIASUBTYPE_P016)) { DbgLog((LOG_ERROR, 10, L"-> Connection is not the appropriate pixel format for DXVA2 Native")); hr = E_FAIL; goto done; } hr = DXVA2NotifyEVR(); } done: SafeRelease(&pGetService); if (FAILED(hr)) { FreeD3DResources(); } return hr; } HRESULT CDecDXVA2::DXVA2NotifyEVR() { HRESULT hr = S_OK; IMFGetService *pGetService = nullptr; IDirectXVideoMemoryConfiguration *pVideoConfig = nullptr; hr = m_pCallback->GetOutputPin()->GetConnected()->QueryInterface(&pGetService); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> IMFGetService not available")); goto done; } // Configure EVR for receiving DXVA2 samples hr = pGetService->GetService(MR_VIDEO_ACCELERATION_SERVICE, __uuidof(IDirectXVideoMemoryConfiguration), (void**)&pVideoConfig); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> IDirectXVideoMemoryConfiguration not available")); goto done; } // Notify the EVR about the format we're sending DXVA2_SurfaceType surfaceType; for (DWORD iTypeIndex = 0; ; iTypeIndex++) { hr = pVideoConfig->GetAvailableSurfaceTypeByIndex(iTypeIndex, &surfaceType); if (FAILED(hr)) { hr = S_OK; break; } if (surfaceType == DXVA2_SurfaceType_DecoderRenderTarget) { hr = pVideoConfig->SetSurfaceType(DXVA2_SurfaceType_DecoderRenderTarget); break; } } done: SafeRelease(&pGetService); SafeRelease(&pVideoConfig); return hr; } STDMETHODIMP CDecDXVA2::LoadDXVA2Functions() { // Load D3D9 library dx.d3dlib = LoadLibrary(L"d3d9.dll"); if (dx.d3dlib == nullptr) { DbgLog((LOG_TRACE, 10, L"-> Loading d3d9.dll failed")); return E_FAIL; } dx.direct3DCreate9Ex = (pDirect3DCreate9Ex *)GetProcAddress(dx.d3dlib, "Direct3DCreate9Ex"); // Load DXVA2 library dx.dxva2lib = LoadLibrary(L"dxva2.dll"); if (dx.dxva2lib == nullptr) { DbgLog((LOG_TRACE, 10, L"-> Loading dxva2.dll failed")); return E_FAIL; } dx.createDeviceManager = (pCreateDeviceManager9 *)GetProcAddress(dx.dxva2lib, "DXVA2CreateDirect3DDeviceManager9"); if (dx.createDeviceManager == nullptr) { DbgLog((LOG_TRACE, 10, L"-> DXVA2CreateDirect3DDeviceManager9 unavailable")); return E_FAIL; } return S_OK; } #define VEND_ID_ATI 0x1002 #define VEND_ID_NVIDIA 0x10DE #define VEND_ID_INTEL 0x8086 static const struct { unsigned id; char name[32]; } vendors [] = { { VEND_ID_ATI, "ATI" }, { VEND_ID_NVIDIA, "NVIDIA" }, { VEND_ID_INTEL, "Intel" }, { 0, "" } }; HRESULT CDecDXVA2::CreateD3DDeviceManager(IDirect3DDevice9 *pDevice, UINT *pReset, IDirect3DDeviceManager9 **ppManager) { UINT resetToken = 0; IDirect3DDeviceManager9 *pD3DManager = nullptr; HRESULT hr = dx.createDeviceManager(&resetToken, &pD3DManager); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> DXVA2CreateDirect3DDeviceManager9 failed")); goto done; } hr = pD3DManager->ResetDevice(pDevice, resetToken); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> ResetDevice failed")); goto done; } *ppManager = pD3DManager; (*ppManager)->AddRef(); *pReset = resetToken; done: SafeRelease(&pD3DManager); return hr; } HRESULT CDecDXVA2::CreateDXVAVideoService(IDirect3DDeviceManager9 *pManager, IDirectXVideoDecoderService **ppService) { HRESULT hr = S_OK; IDirectXVideoDecoderService *pService = nullptr; hr = pManager->OpenDeviceHandle(&m_hDevice); if (FAILED(hr)) { m_hDevice = INVALID_HANDLE_VALUE; DbgLog((LOG_ERROR, 10, L"-> OpenDeviceHandle failed")); goto done; } hr = pManager->GetVideoService(m_hDevice, IID_IDirectXVideoDecoderService, (void**)&pService); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> Acquiring VideoDecoderService failed")); goto done; } (*ppService) = pService; done: return hr; } HRESULT CDecDXVA2::FindVideoServiceConversion(AVCodecID codec, int profile, GUID *input, D3DFORMAT *output) { HRESULT hr = S_OK; UINT count = 0; GUID *input_list = nullptr; /* Gather the format supported by the decoder */ hr = m_pDXVADecoderService->GetDecoderDeviceGuids(&count, &input_list); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> GetDecoderDeviceGuids failed with hr: %X", hr)); goto done; } DbgLog((LOG_TRACE, 10, L"-> Enumerating supported DXVA2 modes (count: %d)", count)); for(unsigned i = 0; i < count; i++) { const GUID *g = &input_list[i]; const dxva_mode_t *mode = get_dxva_mode_from_guid(g); if (mode) { DbgLog((LOG_TRACE, 10, L" -> %S", mode->name)); } else { DbgLog((LOG_TRACE, 10, L" -> Unknown GUID (%s)", WStringFromGUID(*g).c_str())); } } /* Iterate over our priority list */ for (unsigned i = 0; dxva_modes[i].name; i++) { const dxva_mode_t *mode = &dxva_modes[i]; if (!check_dxva_mode_compatibility(mode, codec, profile)) continue; BOOL supported = FALSE; for (const GUID *g = &input_list[0]; !supported && g < &input_list[count]; g++) { supported = IsEqualGUID(*mode->guid, *g); } if (!supported) continue; DbgLog((LOG_TRACE, 10, L"-> Trying to use '%S'", mode->name)); UINT out_count = 0; D3DFORMAT *out_list = nullptr; hr = m_pDXVADecoderService->GetDecoderRenderTargets(*mode->guid, &out_count, &out_list); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Retrieving render targets failed with hr: %X", hr)); continue; } BOOL matchingFormat = FALSE; D3DFORMAT format = D3DFMT_UNKNOWN; DbgLog((LOG_TRACE, 10, L"-> Enumerating render targets (count: %d)", out_count)); for (unsigned j = 0; j < out_count; j++) { const D3DFORMAT f = out_list[j]; DbgLog((LOG_TRACE, 10, L" -> %d is supported (%4.4S)", f, (const char *)&f)); if (mode->high_bit_depth && (f == FOURCC_P010 || f == FOURCC_P016)) { matchingFormat = TRUE; format = f; } else if (!mode->high_bit_depth && f == FOURCC_NV12) { matchingFormat = TRUE; format = f; } } if (matchingFormat) { DbgLog((LOG_TRACE, 10, L"-> Found matching output format, finished setup")); *input = *mode->guid; *output = format; SAFE_CO_FREE(out_list); SAFE_CO_FREE(input_list); return S_OK; } SAFE_CO_FREE(out_list); } done: SAFE_CO_FREE(input_list); return E_FAIL; } HRESULT CDecDXVA2::InitD3DAdapterIdentifier(UINT lAdapter) { ASSERT(m_pD3D); D3DADAPTER_IDENTIFIER9 d3dai = { 0 }; HRESULT hr = m_pD3D->GetAdapterIdentifier(lAdapter, 0, &d3dai); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Querying of adapter identifier %d failed with hr: %X", lAdapter, hr)); return E_FAIL; } const char *vendor = "Unknown"; for (int i = 0; vendors[i].id != 0; i++) { if (vendors[i].id == d3dai.VendorId) { vendor = vendors[i].name; break; } } DbgLog((LOG_TRACE, 10, L"-> Running on adapter %d, %S, vendor 0x%04X(%S), device 0x%04X", lAdapter, d3dai.Description, d3dai.VendorId, vendor, d3dai.DeviceId)); m_dwVendorId = d3dai.VendorId; m_dwDeviceId = d3dai.DeviceId; return S_OK; } /** * This function is only called in non-native mode * Its responsibility is to initialize D3D, create a device and a device manager * and call SetD3DDeviceManager with it. */ HRESULT CDecDXVA2::InitD3D(UINT lAdapter) { HRESULT hr = S_OK; m_pD3D = Direct3DCreate9(D3D_SDK_VERSION); if (!m_pD3D) { DbgLog((LOG_ERROR, 10, L"-> Failed to acquire IDirect3D9")); return E_FAIL; } // populate the adapter identifier values hr = InitD3DAdapterIdentifier(lAdapter); // if the requested adapter failed, try again if (FAILED(hr) && lAdapter != D3DADAPTER_DEFAULT) { lAdapter = D3DADAPTER_DEFAULT; hr = InitD3DAdapterIdentifier(lAdapter); } if (FAILED(hr)) { return hr; } D3DPRESENT_PARAMETERS d3dpp = { 0 }; D3DDISPLAYMODE d3ddm = { 0 }; m_pD3D->GetAdapterDisplayMode(lAdapter, &d3ddm); d3dpp.Windowed = TRUE; d3dpp.BackBufferWidth = 640; d3dpp.BackBufferHeight = 480; d3dpp.BackBufferCount = 0; d3dpp.BackBufferFormat = d3ddm.Format; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.Flags = D3DPRESENTFLAG_VIDEO; hr = m_pD3D->CreateDevice(lAdapter, D3DDEVTYPE_HAL, GetShellWindow(), D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED | D3DCREATE_FPU_PRESERVE, &d3dpp, &m_pD3DDev); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of device failed with hr: %X", hr)); return E_FAIL; } return S_OK; } HRESULT CDecDXVA2::InitD3DEx(UINT lAdapter) { HRESULT hr = S_OK; if (dx.direct3DCreate9Ex == nullptr) { DbgLog((LOG_ERROR, 10, L"-> Direct3DCreate9Ex not available")); return E_NOINTERFACE; } IDirect3D9Ex *pD3D9Ex = nullptr; hr = dx.direct3DCreate9Ex(D3D_SDK_VERSION, &pD3D9Ex); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"-> Failed to acquire IDirect3D9Ex")); return E_NOINTERFACE; } m_pD3D = dynamic_cast<IDirect3D9*>(pD3D9Ex); // populate the adapter identifier values hr = InitD3DAdapterIdentifier(lAdapter); // if the requested adapter failed, try again if (FAILED(hr) && lAdapter != D3DADAPTER_DEFAULT) { lAdapter = D3DADAPTER_DEFAULT; hr = InitD3DAdapterIdentifier(lAdapter); } if (FAILED(hr)) { SafeRelease(&m_pD3D); return hr; } D3DPRESENT_PARAMETERS d3dpp = { 0 }; D3DDISPLAYMODEEX d3ddm = { 0 }; d3ddm.Size = sizeof(D3DDISPLAYMODEEX); pD3D9Ex->GetAdapterDisplayModeEx(lAdapter, &d3ddm, NULL); d3dpp.Windowed = TRUE; d3dpp.BackBufferWidth = 640; d3dpp.BackBufferHeight = 480; d3dpp.BackBufferCount = 0; d3dpp.BackBufferFormat = d3ddm.Format; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.Flags = D3DPRESENTFLAG_VIDEO; IDirect3DDevice9Ex *pD3D9DeviceEx = nullptr; hr = pD3D9Ex->CreateDeviceEx(lAdapter, D3DDEVTYPE_HAL, GetShellWindow(), D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_MULTITHREADED | D3DCREATE_FPU_PRESERVE, &d3dpp, NULL, &pD3D9DeviceEx); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of device failed with hr: %X", hr)); SafeRelease(&m_pD3D); return E_FAIL; } m_pD3DDev = dynamic_cast<IDirect3DDevice9*>(pD3D9DeviceEx); return S_OK; } HRESULT CDecDXVA2::RetrieveVendorId(IDirect3DDeviceManager9 *pDevManager) { HANDLE hDevice = 0; IDirect3D9 *pD3D = nullptr; IDirect3DDevice9 *pDevice = nullptr; HRESULT hr = pDevManager->OpenDeviceHandle(&hDevice); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Failed to open device handle with hr: %X", hr)); goto done; } hr = pDevManager->LockDevice(hDevice, &pDevice, TRUE); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Failed to lock device with hr: %X", hr)); goto done; } hr = pDevice->GetDirect3D(&pD3D); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Failed to get D3D object hr: %X", hr)); goto done; } D3DDEVICE_CREATION_PARAMETERS devParams; hr = pDevice->GetCreationParameters(&devParams); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Failed to get device creation params hr: %X", hr)); goto done; } D3DADAPTER_IDENTIFIER9 adIdentifier; hr = pD3D->GetAdapterIdentifier(devParams.AdapterOrdinal, 0, &adIdentifier); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Failed to get adapter identified hr: %X", hr)); goto done; } m_dwVendorId = adIdentifier.VendorId; m_dwDeviceId = adIdentifier.DeviceId; memcpy(m_cDeviceName, adIdentifier.Description, sizeof(m_cDeviceName)); done: SafeRelease(&pD3D); SafeRelease(&pDevice); if (hDevice && hDevice != INVALID_HANDLE_VALUE) { pDevManager->UnlockDevice(hDevice, FALSE); pDevManager->CloseDeviceHandle(hDevice); } return hr; } HRESULT CDecDXVA2::CheckHWCompatConditions(GUID decoderGuid) { if (m_dwSurfaceWidth == 0 || m_dwSurfaceHeight == 0) return E_UNEXPECTED; int width_mbs = m_dwSurfaceWidth / 16; int height_mbs = m_dwSurfaceHeight / 16; int max_ref_frames_dpb41 = min(11, 32768 / (width_mbs * height_mbs)); if (m_dwVendorId == VEND_ID_ATI) { if (IsAMDUVD(m_dwDeviceId)) { if (m_pAVCtx->codec_id == AV_CODEC_ID_H264 && m_pAVCtx->refs > max_ref_frames_dpb41) { DbgLog((LOG_TRACE, 10, L"-> Too many reference frames for AMD UVD/UVD+ H.264 decoder")); return E_FAIL; } else if ((m_pAVCtx->codec_id == AV_CODEC_ID_VC1 || m_pAVCtx->codec_id == AV_CODEC_ID_MPEG2VIDEO) && (m_dwSurfaceWidth > 1920 || m_dwSurfaceHeight > 1200)) { DbgLog((LOG_TRACE, 10, L"-> VC-1 Resolutions above FullHD are not supported by the UVD/UVD+ decoder")); return E_FAIL; } else if (m_pAVCtx->codec_id == AV_CODEC_ID_WMV3) { DbgLog((LOG_TRACE, 10, L"-> AMD UVD/UVD+ is currently not compatible with WMV3")); return E_FAIL; } } } else if (m_dwVendorId == VEND_ID_INTEL) { if (decoderGuid == DXVADDI_Intel_ModeH264_E && m_pAVCtx->codec_id == AV_CODEC_ID_H264 && m_pAVCtx->refs > max_ref_frames_dpb41) { DbgLog((LOG_TRACE, 10, L"-> Too many reference frames for Intel H.264 decoder implementation")); return E_FAIL; } } return S_OK; } /** * Called from both native and non-native mode * Initialize all the common DXVA2 interfaces and device handles */ HRESULT CDecDXVA2::SetD3DDeviceManager(IDirect3DDeviceManager9 *pDevManager) { HRESULT hr = S_OK; ASSERT(pDevManager); m_pD3DDevMngr = pDevManager; RetrieveVendorId(pDevManager); // This should really be null here, but since we're overwriting it, make sure its actually released SafeRelease(&m_pDXVADecoderService); hr = CreateDXVAVideoService(m_pD3DDevMngr, &m_pDXVADecoderService); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of DXVA2 Decoder Service failed with hr: %X", hr)); goto done; } // If the decoder was initialized already, check if we can use this device if (m_pAVCtx) { DbgLog((LOG_TRACE, 10, L"-> Checking hardware for format support...")); GUID input = GUID_NULL; D3DFORMAT output; hr = FindVideoServiceConversion(m_pAVCtx->codec_id, m_pAVCtx->profile, &input, &output); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> No decoder device available that can decode codec '%S' to a matching output", avcodec_get_name(m_pAVCtx->codec_id))); goto done; } m_eSurfaceFormat = output; if (FAILED(CheckHWCompatConditions(input))) { hr = E_FAIL; goto done; } DXVA2_VideoDesc desc; ZeroMemory(&desc, sizeof(desc)); desc.SampleWidth = m_dwSurfaceWidth; desc.SampleHeight = m_dwSurfaceHeight; desc.Format = output; DXVA2_ConfigPictureDecode config; hr = FindDecoderConfiguration(input, &desc, &config); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> No decoder configuration available for codec '%S'", avcodec_get_name(m_pAVCtx->codec_id))); goto done; } LPDIRECT3DSURFACE9 pSurfaces[DXVA2_MAX_SURFACES] = {0}; UINT numSurfaces = max(config.ConfigMinRenderTargetBuffCount, 1); hr = m_pDXVADecoderService->CreateSurface(m_dwSurfaceWidth, m_dwSurfaceHeight, numSurfaces, output, D3DPOOL_DEFAULT, 0, DXVA2_VideoDecoderRenderTarget, pSurfaces, nullptr); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of surfaces failed with hr: %X", hr)); goto done; } IDirectXVideoDecoder *decoder = nullptr; hr = m_pDXVADecoderService->CreateVideoDecoder(input, &desc, &config, pSurfaces, numSurfaces, &decoder); // Release resources, decoder and surfaces SafeRelease(&decoder); int i = DXVA2_MAX_SURFACES; while (i > 0) { SafeRelease(&pSurfaces[--i]); } if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of decoder failed with hr: %X", hr)); goto done; } } done: return hr; } // ILAVDecoder STDMETHODIMP CDecDXVA2::Init() { DbgLog((LOG_TRACE, 10, L"CDecDXVA2::Init(): Trying to open DXVA2 decoder")); HRESULT hr = S_OK; // Initialize all D3D interfaces in non-native mode if (!m_bNative) { // load DLLs and functions if (FAILED(hr = LoadDXVA2Functions())) { DbgLog((LOG_ERROR, 10, L"-> Failed to load DXVA2 DLL functions")); return E_FAIL; } // determin the adapter the user requested UINT lAdapter = m_pSettings->GetHWAccelDeviceIndex(HWAccel_DXVA2CopyBack, nullptr); if (lAdapter == LAVHWACCEL_DEVICE_DEFAULT) lAdapter = D3DADAPTER_DEFAULT; DWORD dwDeviceIndex = m_pCallback->GetGPUDeviceIndex(); if (dwDeviceIndex != DWORD_MAX) { lAdapter = (UINT)dwDeviceIndex; } // initialize D3D hr = InitD3DEx(lAdapter); if (hr == E_NOINTERFACE) { // D3D9Ex failed, try plain D3D hr = InitD3D(lAdapter); } if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> D3D Initialization failed with hr: %X", hr)); return hr; } // create device manager for the device hr = CreateD3DDeviceManager(m_pD3DDev, &m_pD3DResetToken, &m_pD3DDevMngr); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of Device manager failed with hr: %X", hr)); return E_FAIL; } // set it as the active device manager hr = SetD3DDeviceManager(m_pD3DDevMngr); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> SetD3DDeviceManager failed with hr: %X", hr)); return E_FAIL; } if (CopyFrameNV12 == nullptr) { int cpu_flags = av_get_cpu_flags(); if (cpu_flags & AV_CPU_FLAG_SSE4) { DbgLog((LOG_TRACE, 10, L"-> Using SSE4 frame copy")); if (m_dwVendorId == VEND_ID_INTEL) CopyFrameNV12 = CopyFrameNV12_SSE4_MT; else CopyFrameNV12 = CopyFrameNV12_SSE4; } else { DbgLog((LOG_TRACE, 10, L"-> Using fallback frame copy")); if (m_dwVendorId == VEND_ID_INTEL) CopyFrameNV12 = CopyFrameNV12_fallback_MT; else CopyFrameNV12 = CopyFrameNV12_fallback; } } } // Init the ffmpeg parts // This is our main software decoder, unable to fail! CDecAvcodec::Init(); return S_OK; } STDMETHODIMP CDecDXVA2::InitDecoder(AVCodecID codec, const CMediaType *pmt) { HRESULT hr = S_OK; DbgLog((LOG_TRACE, 10, L"CDecDXVA2::InitDecoder(): Initializing DXVA2 decoder")); // Hack-ish check to avoid re-creating the full decoder when only the aspect ratio changes. // Re-creating the DXVA2 decoder can lead to issues like missing frames or a several second delay if (m_pDecoder) { CMediaType mediaTypeCheck = m_MediaType; if (mediaTypeCheck.formattype == FORMAT_VideoInfo2 && pmt->formattype == FORMAT_VideoInfo2) { VIDEOINFOHEADER2 *vih2Old = (VIDEOINFOHEADER2 *)mediaTypeCheck.Format(); VIDEOINFOHEADER2 *vih2New = (VIDEOINFOHEADER2 *)pmt->Format(); vih2Old->dwPictAspectRatioX = vih2New->dwPictAspectRatioX; vih2Old->dwPictAspectRatioY = vih2New->dwPictAspectRatioY; if (mediaTypeCheck == *pmt) { DbgLog((LOG_TRACE, 10, L"-> Skipping re-init because media type is unchanged.")); m_MediaType = *pmt; // flush the decoder so we can resume decoding properly (before a re-init, EndOfStream would be called, making this necessary) avcodec_flush_buffers(m_pAVCtx); return S_OK; } } } DestroyDecoder(false); m_DisplayDelay = DXVA2_QUEUE_SURFACES; // Intel GPUs don't like the display and performance goes way down, so disable it. if (m_dwVendorId == VEND_ID_INTEL) m_DisplayDelay = 0; // Reduce display delay for DVD decoding for lower decode latency if (m_pCallback->GetDecodeFlags() & LAV_VIDEO_DEC_FLAG_DVD) m_DisplayDelay /= 2; m_bFailHWDecode = FALSE; DbgLog((LOG_TRACE, 10, L"-> Creation of DXVA2 decoder successfull, initializing ffmpeg")); hr = CDecAvcodec::InitDecoder(codec, pmt); if (FAILED(hr)) { return hr; } // If we have a DXVA Decoder, check if its capable // If we don't have one yet, it may be handed to us later, and compat is checked at that point GUID input = GUID_NULL; D3DFORMAT output = D3DFMT_UNKNOWN; if (m_pDXVADecoderService) { hr = FindVideoServiceConversion(codec, m_pAVCtx->profile, &input, &output); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> No decoder device available that can decode codec '%S' to a matching output", avcodec_get_name(codec))); return E_FAIL; } } else { bool bHighBitdepth = (m_pAVCtx->codec_id == AV_CODEC_ID_HEVC && (m_pAVCtx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 || m_pAVCtx->profile == FF_PROFILE_HEVC_MAIN_10)) || (m_pAVCtx->codec_id == AV_CODEC_ID_VP9 && (m_pAVCtx->sw_pix_fmt == AV_PIX_FMT_YUV420P10 || m_pAVCtx->profile == FF_PROFILE_VP9_2)); if (bHighBitdepth) output = (D3DFORMAT)FOURCC_P010; else output = (D3DFORMAT)FOURCC_NV12; } if (check_dxva_codec_profile(m_pAVCtx->codec_id, m_pAVCtx->pix_fmt, m_pAVCtx->profile, AV_PIX_FMT_DXVA2_VLD)) { DbgLog((LOG_TRACE, 10, L"-> Incompatible profile detected, falling back to software decoding")); return E_FAIL; } m_dwSurfaceWidth = dxva_align_dimensions(m_pAVCtx->codec_id, m_pAVCtx->coded_width); m_dwSurfaceHeight = dxva_align_dimensions(m_pAVCtx->codec_id, m_pAVCtx->coded_height); m_eSurfaceFormat = output; m_DecoderPixelFormat = m_pAVCtx->sw_pix_fmt; if (FAILED(CheckHWCompatConditions(input))) { return E_FAIL; } m_MediaType = *pmt; return S_OK; } STDMETHODIMP_(long) CDecDXVA2::GetBufferCount(long *pMaxBuffers) { long buffers = 0; // Native decoding should use 16 buffers to enable seamless codec changes if (m_bNative) buffers = 16; else { // Buffers based on max ref frames if (m_nCodecId == AV_CODEC_ID_H264 || m_nCodecId == AV_CODEC_ID_HEVC) buffers = 16; else buffers = 2; } // 4 extra buffers for handling and safety buffers += 4; if (!m_bNative) { buffers += m_DisplayDelay; } if (m_pCallback->GetDecodeFlags() & LAV_VIDEO_DEC_FLAG_DVD) { buffers += 4; } if (pMaxBuffers) { // cap at 127, because it needs to fit into the 7-bit DXVA structs *pMaxBuffers = 127; // VC-1 and VP9 decoding has stricter requirements (decoding flickers otherwise) if (m_nCodecId == AV_CODEC_ID_VC1 || m_nCodecId == AV_CODEC_ID_VP9) *pMaxBuffers = 32; } return buffers; } HRESULT CDecDXVA2::FindDecoderConfiguration(const GUID &input, const DXVA2_VideoDesc *pDesc, DXVA2_ConfigPictureDecode *pConfig) { CheckPointer(pConfig, E_INVALIDARG); CheckPointer(pDesc, E_INVALIDARG); HRESULT hr = S_OK; UINT cfg_count = 0; DXVA2_ConfigPictureDecode *cfg_list = nullptr; hr = m_pDXVADecoderService->GetDecoderConfigurations(input, pDesc, nullptr, &cfg_count, &cfg_list); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> GetDecoderConfigurations failed with hr: %X", hr)); return E_FAIL; } DbgLog((LOG_TRACE, 10, L"-> We got %d decoder configurations", cfg_count)); int best_score = 0; DXVA2_ConfigPictureDecode best_cfg; for (unsigned i = 0; i < cfg_count; i++) { DXVA2_ConfigPictureDecode *cfg = &cfg_list[i]; int score; if (cfg->ConfigBitstreamRaw == 1) score = 1; else if (m_pAVCtx->codec_id == AV_CODEC_ID_H264 && cfg->ConfigBitstreamRaw == 2) score = 2; else continue; if (IsEqualGUID(cfg->guidConfigBitstreamEncryption, DXVA2_NoEncrypt)) score += 16; if (score > best_score) { best_score = score; best_cfg = *cfg; } } SAFE_CO_FREE(cfg_list); if (best_score <= 0) { DbgLog((LOG_TRACE, 10, L"-> No matching configuration available")); return E_FAIL; } *pConfig = best_cfg; return S_OK; } HRESULT CDecDXVA2::CreateDXVA2Decoder(int nSurfaces, IDirect3DSurface9 **ppSurfaces) { DbgLog((LOG_TRACE, 10, L"-> CDecDXVA2::CreateDXVA2Decoder")); HRESULT hr = S_OK; LPDIRECT3DSURFACE9 pSurfaces[DXVA2_MAX_SURFACES]; if (!m_pDXVADecoderService) return E_FAIL; DestroyDecoder(false, true); GUID input = GUID_NULL; D3DFORMAT output; FindVideoServiceConversion(m_pAVCtx->codec_id, m_pAVCtx->profile, &input, &output); if (!nSurfaces) { m_dwSurfaceWidth = dxva_align_dimensions(m_pAVCtx->codec_id, m_pAVCtx->coded_width); m_dwSurfaceHeight = dxva_align_dimensions(m_pAVCtx->codec_id, m_pAVCtx->coded_height); m_eSurfaceFormat = output; m_DecoderPixelFormat = m_pAVCtx->sw_pix_fmt; m_NumSurfaces = GetBufferCount(); hr = m_pDXVADecoderService->CreateSurface(m_dwSurfaceWidth, m_dwSurfaceHeight, m_NumSurfaces - 1, output, D3DPOOL_DEFAULT, 0, DXVA2_VideoDecoderRenderTarget, pSurfaces, nullptr); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> Creation of surfaces failed with hr: %X", hr)); m_NumSurfaces = 0; return E_FAIL; } ppSurfaces = pSurfaces; } else { m_NumSurfaces = nSurfaces; for (int i = 0; i < m_NumSurfaces; i++) { ppSurfaces[i]->AddRef(); } } if (m_NumSurfaces <= 0) { DbgLog((LOG_TRACE, 10, L"-> No surfaces? No good!")); return E_FAIL; } // get the device, for ColorFill() to init the surfaces in black IDirect3DDevice9 *pDev = nullptr; ppSurfaces[0]->GetDevice(&pDev); for (int i = 0; i < m_NumSurfaces; i++) { m_pSurfaces[i].index = i; m_pSurfaces[i].d3d = ppSurfaces[i]; m_pSurfaces[i].age = UINT64_MAX; m_pSurfaces[i].used = false; // fill the surface in black, to avoid the "green screen" in case the first frame fails to decode. if (pDev) pDev->ColorFill(ppSurfaces[i], NULL, D3DCOLOR_XYUV(0, 128, 128)); } // and done with the device SafeRelease(&pDev); DbgLog((LOG_TRACE, 10, L"-> Successfully created %d surfaces (%dx%d)", m_NumSurfaces, m_dwSurfaceWidth, m_dwSurfaceHeight)); DXVA2_VideoDesc desc; ZeroMemory(&desc, sizeof(desc)); desc.SampleWidth = m_dwSurfaceWidth; desc.SampleHeight = m_dwSurfaceHeight; desc.Format = output; hr = FindDecoderConfiguration(input, &desc, &m_DXVAVideoDecoderConfig); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> FindDecoderConfiguration failed with hr: %X", hr)); return hr; } IDirectXVideoDecoder *decoder = nullptr; hr = m_pDXVADecoderService->CreateVideoDecoder(input, &desc, &m_DXVAVideoDecoderConfig, ppSurfaces, m_NumSurfaces, &decoder); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"-> CreateVideoDecoder failed with hr: %X", hr)); return E_FAIL; } m_pDecoder = decoder; m_guidDecoderDevice = input; /* fill hwaccel_context */ FillHWContext((dxva_context *)m_pAVCtx->hwaccel_context); memset(m_pRawSurface, 0, sizeof(m_pRawSurface)); for (int i = 0; i < m_NumSurfaces; i++) { m_pRawSurface[i] = m_pSurfaces[i].d3d; } return S_OK; } HRESULT CDecDXVA2::FillHWContext(dxva_context *ctx) { ctx->cfg = &m_DXVAVideoDecoderConfig; ctx->decoder = m_pDecoder; ctx->surface = m_pRawSurface; ctx->surface_count = m_NumSurfaces; if (m_dwVendorId == VEND_ID_INTEL && m_guidDecoderDevice == DXVADDI_Intel_ModeH264_E) ctx->workaround = FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO; else if (m_dwVendorId == VEND_ID_ATI && IsAMDUVD(m_dwDeviceId)) ctx->workaround = FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG; else ctx->workaround = 0; return S_OK; } enum AVPixelFormat CDecDXVA2::get_dxva2_format(struct AVCodecContext *c, const enum AVPixelFormat * pix_fmts) { CDecDXVA2 *pDec = (CDecDXVA2 *)c->opaque; const enum AVPixelFormat *p; for (p = pix_fmts; *p != -1; p++) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(*p); if (!desc || !(desc->flags & AV_PIX_FMT_FLAG_HWACCEL)) break; if (*p == AV_PIX_FMT_DXVA2_VLD) { HRESULT hr = pDec->ReInitDXVA2Decoder(c); if (FAILED(hr)) { pDec->m_bFailHWDecode = TRUE; continue; } else { break; } } } return *p; } typedef struct SurfaceWrapper { LPDIRECT3DSURFACE9 surface; IMediaSample *sample; CDecDXVA2 *pDec; IDirectXVideoDecoder *pDXDecoder; } SurfaceWrapper; void CDecDXVA2::free_dxva2_buffer(void *opaque, uint8_t *data) { SurfaceWrapper *sw = (SurfaceWrapper *)opaque; CDecDXVA2 *pDec = sw->pDec; LPDIRECT3DSURFACE9 pSurface = sw->surface; for (int i = 0; i < pDec->m_NumSurfaces; i++) { if (pDec->m_pSurfaces[i].d3d == pSurface) { pDec->m_pSurfaces[i].used = false; break; } } SafeRelease(&pSurface); SafeRelease(&sw->pDXDecoder); SafeRelease(&sw->sample); delete sw; } HRESULT CDecDXVA2::ReInitDXVA2Decoder(AVCodecContext *c) { HRESULT hr = S_OK; // Don't allow decoder creation during first init if (m_bInInit) return S_FALSE; if (!m_pDecoder || dxva_align_dimensions(c->codec_id, c->coded_width) != m_dwSurfaceWidth || dxva_align_dimensions(c->codec_id, c->coded_height) != m_dwSurfaceHeight || m_DecoderPixelFormat != c->sw_pix_fmt) { DbgLog((LOG_TRACE, 10, L"No DXVA2 Decoder or image dimensions changed -> Re-Allocating resources")); if (!m_pDecoder && m_bNative && !m_pDXVA2Allocator) { ASSERT(0); hr = E_FAIL; } else if (m_bNative) { // shortcut to update only the Decoder Pixel Format if needed if (m_pDecoder && m_DecoderPixelFormat == AV_PIX_FMT_NONE && m_DecoderPixelFormat != c->sw_pix_fmt) { GUID input; D3DFORMAT output; FindVideoServiceConversion(c->codec_id, c->profile, &input, &output); if (output == m_eSurfaceFormat) { m_DecoderPixelFormat = c->sw_pix_fmt; return ReInitDXVA2Decoder(c); } } avcodec_flush_buffers(c); m_dwSurfaceWidth = dxva_align_dimensions(c->codec_id, c->coded_width); m_dwSurfaceHeight = dxva_align_dimensions(c->codec_id, c->coded_height); m_DecoderPixelFormat = c->sw_pix_fmt; GUID input; FindVideoServiceConversion(c->codec_id, c->profile, &input, &m_eSurfaceFormat); // Re-Commit the allocator (creates surfaces and new decoder) hr = m_pDXVA2Allocator->Decommit(); if (m_pDXVA2Allocator->DecommitInProgress()) { DbgLog((LOG_TRACE, 10, L"WARNING! DXVA2 Allocator is still busy, trying to flush downstream")); m_pCallback->ReleaseAllDXVAResources(); m_pCallback->GetOutputPin()->GetConnected()->BeginFlush(); m_pCallback->GetOutputPin()->GetConnected()->EndFlush(); if (m_pDXVA2Allocator->DecommitInProgress()) { DbgLog((LOG_TRACE, 10, L"WARNING! Flush had no effect, decommit of the allocator still not complete")); } else { DbgLog((LOG_TRACE, 10, L"Flush was successfull, decommit completed!")); } } hr = m_pDXVA2Allocator->Commit(); } else if (!m_bNative) { FlushDisplayQueue(TRUE); hr = CreateDXVA2Decoder(); } } return hr; } int CDecDXVA2::get_dxva2_buffer(struct AVCodecContext *c, AVFrame *pic, int flags) { CDecDXVA2 *pDec = (CDecDXVA2 *)c->opaque; IMediaSample *pSample = nullptr; HRESULT hr = S_OK; if (pic->format != AV_PIX_FMT_DXVA2_VLD || (c->codec_id == AV_CODEC_ID_H264 && !H264_CHECK_PROFILE(c->profile)) || (c->codec_id == AV_CODEC_ID_HEVC && !HEVC_CHECK_PROFILE(c->profile)) || (c->codec_id == AV_CODEC_ID_VP9 && !VP9_CHECK_PROFILE(c->profile))) { DbgLog((LOG_ERROR, 10, L"DXVA2 buffer request, but not dxva2 pixfmt or unsupported profile")); pDec->m_bFailHWDecode = TRUE; return -1; } hr = pDec->ReInitDXVA2Decoder(c); if (FAILED(hr)) { pDec->m_bFailHWDecode = TRUE; return -1; } if (FAILED(pDec->m_pD3DDevMngr->TestDevice(pDec->m_hDevice))) { DbgLog((LOG_ERROR, 10, L"Device Lost")); } int i; if (pDec->m_bNative) { if (!pDec->m_pDXVA2Allocator) return -1; hr = pDec->m_pDXVA2Allocator->GetBuffer(&pSample, nullptr, nullptr, 0); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"DXVA2Allocator returned error, hr: 0x%x", hr)); return -1; } ILAVDXVA2Sample *pLavDXVA2 = nullptr; hr = pSample->QueryInterface(&pLavDXVA2); if (FAILED(hr)) { DbgLog((LOG_ERROR, 10, L"Sample is no LAV DXVA2 sample?????")); SafeRelease(&pSample); return -1; } i = pLavDXVA2->GetDXSurfaceId(); SafeRelease(&pLavDXVA2); } else { int old, old_unused; for (i = 0, old = 0, old_unused = -1; i < pDec->m_NumSurfaces; i++) { d3d_surface_t *surface = &pDec->m_pSurfaces[i]; if (!surface->used && (old_unused == -1 || surface->age < pDec->m_pSurfaces[old_unused].age)) old_unused = i; if (surface->age < pDec->m_pSurfaces[old].age) old = i; } if (old_unused == -1) { DbgLog((LOG_TRACE, 10, L"No free surface, using oldest")); i = old; } else { i = old_unused; } } LPDIRECT3DSURFACE9 pSurface = pDec->m_pSurfaces[i].d3d; if (!pSurface) { DbgLog((LOG_ERROR, 10, L"There is a sample, but no D3D Surace? WTF?")); SafeRelease(&pSample); return -1; } pDec->m_pSurfaces[i].age = pDec->m_CurrentSurfaceAge++; pDec->m_pSurfaces[i].used = true; memset(pic->data, 0, sizeof(pic->data)); memset(pic->linesize, 0, sizeof(pic->linesize)); memset(pic->buf, 0, sizeof(pic->buf)); pic->data[0] = pic->data[3] = (uint8_t *)pSurface; pic->data[4] = (uint8_t *)pSample; SurfaceWrapper *surfaceWrapper = new SurfaceWrapper(); surfaceWrapper->pDec = pDec; surfaceWrapper->sample = pSample; surfaceWrapper->surface = pSurface; surfaceWrapper->surface->AddRef(); surfaceWrapper->pDXDecoder = pDec->m_pDecoder; surfaceWrapper->pDXDecoder->AddRef(); pic->buf[0] = av_buffer_create(nullptr, 0, free_dxva2_buffer, surfaceWrapper, 0); return 0; } HRESULT CDecDXVA2::AdditionaDecoderInit() { /* Create ffmpeg dxva_context, but only fill it if we have a decoder already. */ dxva_context *ctx = (dxva_context *)av_mallocz(sizeof(dxva_context)); if (m_pDecoder) { FillHWContext(ctx); } m_pAVCtx->thread_count = 1; m_pAVCtx->hwaccel_context = ctx; m_pAVCtx->get_format = get_dxva2_format; m_pAVCtx->get_buffer2 = get_dxva2_buffer; m_pAVCtx->opaque = this; m_pAVCtx->slice_flags |= SLICE_FLAG_ALLOW_FIELD; // disable error conealment in hwaccel mode, it doesn't work either way m_pAVCtx->error_concealment = 0; av_opt_set_int(m_pAVCtx, "enable_er", 0, AV_OPT_SEARCH_CHILDREN); return S_OK; } HRESULT CDecDXVA2::PostDecode() { if (m_bFailHWDecode) { DbgLog((LOG_TRACE, 10, L"::PostDecode(): HW Decoder failed, falling back to software decoding")); return E_FAIL; } return S_OK; } STDMETHODIMP CDecDXVA2::FlushFromAllocator() { if (m_pAVCtx && avcodec_is_open(m_pAVCtx)) avcodec_flush_buffers(m_pAVCtx); FlushDisplayQueue(FALSE); return S_OK; } STDMETHODIMP CDecDXVA2::Flush() { CDecAvcodec::Flush(); FlushDisplayQueue(FALSE); #ifdef DEBUG int used = 0; for (int i = 0; i < m_NumSurfaces; i++) { d3d_surface_t *s = &m_pSurfaces[i]; if (s->used) { used++; } } if (used > 0) { DbgLog((LOG_TRACE, 10, L"WARNING! %d frames still in use after flush", used)); } #endif // This solves an issue with corruption after seeks on AMD systems, see JIRA LAV-5 if (m_dwVendorId == VEND_ID_ATI && m_nCodecId == AV_CODEC_ID_H264 && m_pDecoder) { if (m_bNative && m_pDXVA2Allocator) { // The allocator needs to be locked because flushes can happen async to other graph events // and in the worst case the allocator is decommited while we're using it. CAutoLock allocatorLock(m_pDXVA2Allocator); if (m_pDXVA2Allocator->IsCommited()) CreateDXVA2Decoder(m_NumSurfaces, m_pRawSurface); } else if(!m_bNative) CreateDXVA2Decoder(); } return S_OK; } STDMETHODIMP CDecDXVA2::FlushDisplayQueue(BOOL bDeliver) { for (int i=0; i < m_DisplayDelay; ++i) { if (m_FrameQueue[m_FrameQueuePosition]) { if (bDeliver) { DeliverDXVA2Frame(m_FrameQueue[m_FrameQueuePosition]); m_FrameQueue[m_FrameQueuePosition] = nullptr; } else { ReleaseFrame(&m_FrameQueue[m_FrameQueuePosition]); } } m_FrameQueuePosition = (m_FrameQueuePosition + 1) % m_DisplayDelay; } return S_OK; } STDMETHODIMP CDecDXVA2::EndOfStream() { CDecAvcodec::EndOfStream(); // Flush display queue FlushDisplayQueue(TRUE); return S_OK; } HRESULT CDecDXVA2::HandleDXVA2Frame(LAVFrame *pFrame) { if (pFrame->flags & LAV_FRAME_FLAG_FLUSH) { if (!m_bNative) { FlushDisplayQueue(TRUE); } Deliver(pFrame); return S_OK; } if (m_bNative || m_DisplayDelay == 0) { DeliverDXVA2Frame(pFrame); } else { LAVFrame *pQueuedFrame = m_FrameQueue[m_FrameQueuePosition]; m_FrameQueue[m_FrameQueuePosition] = pFrame; m_FrameQueuePosition = (m_FrameQueuePosition + 1) % m_DisplayDelay; if (pQueuedFrame) { DeliverDXVA2Frame(pQueuedFrame); } } return S_OK; } HRESULT CDecDXVA2::DeliverDXVA2Frame(LAVFrame *pFrame) { if (m_bNative) { if (!pFrame->data[0] || !pFrame->data[3]) { DbgLog((LOG_ERROR, 10, L"No sample or surface for DXVA2 frame?!?!")); ReleaseFrame(&pFrame); return S_FALSE; } GetPixelFormat(&pFrame->format, &pFrame->bpp); Deliver(pFrame); } else { if (m_bDirect) { DeliverDirect(pFrame); } else { if (CopyFrame(pFrame)) Deliver(pFrame); else ReleaseFrame(&pFrame); } } return S_OK; } STDMETHODIMP CDecDXVA2::GetPixelFormat(LAVPixelFormat *pPix, int *pBpp) { // Output is always NV12 or P010 if (pPix) { if (m_bNative) *pPix = LAVPixFmt_DXVA2; else *pPix = (m_eSurfaceFormat == FOURCC_P010 || m_eSurfaceFormat == FOURCC_P016) ? LAVPixFmt_P016 : LAVPixFmt_NV12; } if (pBpp) *pBpp = (m_eSurfaceFormat == FOURCC_P016) ? 16 : ((m_eSurfaceFormat == FOURCC_P010) ? 10 : 8); return S_OK; } __forceinline bool CDecDXVA2::CopyFrame(LAVFrame *pFrame) { HRESULT hr; LPDIRECT3DSURFACE9 pSurface = (LPDIRECT3DSURFACE9)pFrame->data[3]; GetPixelFormat(&pFrame->format, &pFrame->bpp); D3DSURFACE_DESC surfaceDesc; pSurface->GetDesc(&surfaceDesc); D3DLOCKED_RECT LockedRect; hr = pSurface->LockRect(&LockedRect, nullptr, D3DLOCK_READONLY); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"pSurface->LockRect failed (hr: %X)", hr)); return false; } // Store AVFrame-based buffers, and reset pFrame LAVFrame tmpFrame = *pFrame; pFrame->destruct = nullptr; pFrame->priv_data = nullptr; // side-data shall not be copied to tmpFrame tmpFrame.side_data = nullptr; tmpFrame.side_data_count = 0; // Allocate memory buffers hr = AllocLAVFrameBuffers(pFrame, (pFrame->format == LAVPixFmt_P016) ? (LockedRect.Pitch >> 1) : LockedRect.Pitch); if (FAILED(hr)) { pSurface->UnlockRect(); *pFrame = tmpFrame; return false; } // Copy surface onto memory buffers CopyFrameNV12((BYTE *)LockedRect.pBits, pFrame->data[0], pFrame->data[1], surfaceDesc.Height, pFrame->height, LockedRect.Pitch); pSurface->UnlockRect(); // Free AVFrame based buffers, now that we're done FreeLAVFrameBuffers(&tmpFrame); return true; } static bool direct_lock(LAVFrame * pFrame, LAVDirectBuffer *pBuffer) { ASSERT(pFrame && pBuffer); HRESULT hr; LPDIRECT3DSURFACE9 pSurface = (LPDIRECT3DSURFACE9)pFrame->data[3]; D3DSURFACE_DESC surfaceDesc; pSurface->GetDesc(&surfaceDesc); D3DLOCKED_RECT LockedRect; hr = pSurface->LockRect(&LockedRect, nullptr, D3DLOCK_READONLY); if (FAILED(hr)) { DbgLog((LOG_TRACE, 10, L"pSurface->LockRect failed (hr: %X)", hr)); return false; } memset(pBuffer, 0, sizeof(*pBuffer)); pBuffer->data[0] = (BYTE *)LockedRect.pBits; pBuffer->data[1] = pBuffer->data[0] + surfaceDesc.Height * LockedRect.Pitch; pBuffer->stride[0] = LockedRect.Pitch; pBuffer->stride[1] = LockedRect.Pitch; return true; } static void direct_unlock(LAVFrame * pFrame) { ASSERT(pFrame); LPDIRECT3DSURFACE9 pSurface = (LPDIRECT3DSURFACE9)pFrame->data[3]; pSurface->UnlockRect(); } bool CDecDXVA2::DeliverDirect(LAVFrame *pFrame) { GetPixelFormat(&pFrame->format, &pFrame->bpp); pFrame->direct = true; pFrame->direct_lock = direct_lock; pFrame->direct_unlock = direct_unlock; Deliver(pFrame); return true; } STDMETHODIMP_(DWORD) CDecDXVA2::GetHWAccelNumDevices() { if (m_bNative) return 0; if (!m_pD3D) return 0; return m_pD3D->GetAdapterCount(); } STDMETHODIMP CDecDXVA2::GetHWAccelDeviceInfo(DWORD dwIndex, BSTR *pstrDeviceName, DWORD *dwDeviceIdentifier) { if (m_bNative) return E_UNEXPECTED; if (!m_pD3D) return E_NOINTERFACE; D3DADAPTER_IDENTIFIER9 d3dai = { 0 }; HRESULT err = m_pD3D->GetAdapterIdentifier(dwIndex, 0, &d3dai); if (err != D3D_OK) return E_INVALIDARG; if (pstrDeviceName) { int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, d3dai.Description, -1, nullptr, 0); if (len == 0) return E_FAIL; *pstrDeviceName = SysAllocStringLen(nullptr, len); MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, d3dai.Description, -1, *pstrDeviceName, len); } if (dwDeviceIdentifier) *dwDeviceIdentifier = d3dai.DeviceId; return S_OK; } STDMETHODIMP CDecDXVA2::GetHWAccelActiveDevice(BSTR *pstrDeviceName) { CheckPointer(pstrDeviceName, E_POINTER); if (strlen(m_cDeviceName) == 0) return E_UNEXPECTED; int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, m_cDeviceName, -1, nullptr, 0); if (len == 0) return E_FAIL; *pstrDeviceName = SysAllocStringLen(nullptr, len); MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, m_cDeviceName, -1, *pstrDeviceName, len); return S_OK; }
29.961745
211
0.677353
lcmftianci
02f6a8f9b10969bde216f003eec631b6db4be7fe
4,637
cpp
C++
src/JSEUILabel.cpp
imzcy/JavaScriptExecutable
723a13f433aafad84faa609f62955ce826063c66
[ "MIT" ]
3
2015-03-18T03:12:27.000Z
2020-11-19T10:40:12.000Z
src/JSEUILabel.cpp
imzcy/JavaScriptExecutable
723a13f433aafad84faa609f62955ce826063c66
[ "MIT" ]
null
null
null
src/JSEUILabel.cpp
imzcy/JavaScriptExecutable
723a13f433aafad84faa609f62955ce826063c66
[ "MIT" ]
null
null
null
#include "JSE.h" #include "JSEUILabel.h" using namespace v8; namespace JSE { namespace UI { void JSEUILabel::SetMethods(Isolate *&isolate, Handle<FunctionTemplate> &tpl) { tpl->SetClassName(String::NewFromUtf8(isolate, "Label")); JSE_UI_SET_ACCESSOR(tpl, "left", Get_left, Set_left); JSE_UI_SET_ACCESSOR(tpl, "top", Get_top, Set_top); JSE_UI_SET_ACCESSOR(tpl, "width", Get_width, Set_width); JSE_UI_SET_ACCESSOR(tpl, "height", Get_height, Set_height); JSE_UI_SET_ACCESSOR(tpl, "visible", Get_visible, Set_visible); JSE_UI_SET_ACCESSOR(tpl, "text", Get_text, Set_text); } void JSEUILabel::SetEvents(JSEUILabel *self, JSEUILabelImpl *selfImpl) { //JSE_UI_SET_EVENTS(self, On_click(), selfImpl, clicked()); connect(selfImpl, SIGNAL(clicked()), self, SLOT(On_click())); } void JSEUILabel::Set_left(Local<String> prop, Local<Value> value, const PropertyCallbackInfo<void> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); int left = value->Int32Value(); labelImpl->move(left, labelImpl->pos().y()); info.GetReturnValue().Set(left); } void JSEUILabel::Get_left(Local<String> prop, const PropertyCallbackInfo<Value> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); info.GetReturnValue().Set(labelImpl->pos().x()); } void JSEUILabel::Set_top(Local<String> prop, Local<Value> value, const PropertyCallbackInfo<void> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); int top = value->Int32Value(); labelImpl->move(labelImpl->pos().x(), top); info.GetReturnValue().Set(top); } void JSEUILabel::Get_top(Local<String> prop, const PropertyCallbackInfo<Value> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); info.GetReturnValue().Set(labelImpl->pos().y()); } void JSEUILabel::Set_width(Local<String> prop, Local<Value> value, const PropertyCallbackInfo<void> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); int width = value->Int32Value(); labelImpl->resize(width, labelImpl->size().height()); } void JSEUILabel::Get_width(Local<String> prop, const PropertyCallbackInfo<Value> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); info.GetReturnValue().Set(labelImpl->size().width()); } void JSEUILabel::Set_height(Local<String> prop, Local<Value> value, const PropertyCallbackInfo<void> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); int height = value->Int32Value(); labelImpl->resize(labelImpl->size().width(), height); } void JSEUILabel::Get_height(Local<String> prop, const PropertyCallbackInfo<Value> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); info.GetReturnValue().Set(labelImpl->size().height()); } void JSEUILabel::Set_visible(Local<String> prop, Local<Value> value, const PropertyCallbackInfo<void> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); bool visible = value->BooleanValue(); if (visible) { labelImpl->show(); } else { labelImpl->hide(); } } void JSEUILabel::Get_visible(Local<String> prop, const PropertyCallbackInfo<Value> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); info.GetReturnValue().Set(labelImpl->isVisible()); } void JSEUILabel::Set_text(Local<String> prop, Local<Value> value, const PropertyCallbackInfo<void> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); labelImpl->setText(*String::Utf8Value(value->ToString())); } void JSEUILabel::Get_text(Local<String> prop, const PropertyCallbackInfo<Value> &info) { Isolate *isolate = Isolate::GetCurrent(); HandleScope scope(isolate); JSEUILabelImpl *labelImpl = GetImpl(info); std::string labelText = labelImpl->text().toStdString(); info.GetReturnValue().Set(String::NewFromUtf8(isolate, labelText.c_str())); } }}
27.276471
108
0.704119
imzcy
02f7deae038905e176a07113de95cd7fd55d963d
3,260
cc
C++
src/libxtp/grids/regular_grid.cc
rubengerritsen/xtp
af4db53ca99853280d0e2ddc7f3c41bce8ae6e91
[ "Apache-2.0" ]
null
null
null
src/libxtp/grids/regular_grid.cc
rubengerritsen/xtp
af4db53ca99853280d0e2ddc7f3c41bce8ae6e91
[ "Apache-2.0" ]
null
null
null
src/libxtp/grids/regular_grid.cc
rubengerritsen/xtp
af4db53ca99853280d0e2ddc7f3c41bce8ae6e91
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2009-2020 The VOTCA Development Team * (http://www.votca.org) * * 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. * */ // Local VOTCA includes #include "votca/xtp/regular_grid.h" #include "votca/xtp/qmmolecule.h" #include "votca/xtp/radial_euler_maclaurin_rule.h" #include "votca/xtp/sphere_lebedev_rule.h" namespace votca { namespace xtp { void Regular_Grid::GridSetup(const Eigen::Array3d& stepsizes, const Eigen::Array3d& padding, const QMMolecule& atoms, const AOBasis& basis) { std::pair<Eigen::Vector3d, Eigen::Vector3d> extension = atoms.CalcSpatialMinMax(); Eigen::Array3d min = extension.first.array(); Eigen::Array3d max = extension.second.array(); Eigen::Array3d doublesteps = (max - min + 2 * padding) / stepsizes + 1.0; Eigen::Array<votca::Index, 3, 1> steps = (doublesteps.ceil()).cast<Index>(); // needed to symmetrize grid around molecule Eigen::Array3d padding_sym = (doublesteps - steps.cast<double>()) * stepsizes * 0.5 + padding; GridSetup(steps, padding_sym, atoms, basis); } void Regular_Grid::GridSetup(const Eigen::Array<Index, 3, 1>& steps, const Eigen::Array3d& padding, const QMMolecule& atoms, const AOBasis& basis) { std::pair<Eigen::Vector3d, Eigen::Vector3d> extension = atoms.CalcSpatialMinMax(); Eigen::Array3d min = extension.first.array(); Eigen::Array3d max = extension.second.array(); startingpoint_ = min - padding; stepsizes_ = (max - min + 2 * padding) / (steps - 1).cast<double>(); steps_ = steps; const Index gridboxsize = 500; GridBox gridbox; for (Index i = 0; i < steps.x(); i++) { double x = startingpoint_.x() + double(i) * stepsizes_.x(); for (Index j = 0; j < steps.y(); j++) { double y = startingpoint_.y() + double(j) * stepsizes_.y(); for (Index k = 0; k < steps.z(); k++) { double z = startingpoint_.z() + double(k) * stepsizes_.z(); GridContainers::Cartesian_gridpoint point; point.grid_weight = 1.0; point.grid_pos = Eigen::Vector3d(x, y, z); gridbox.addGridPoint(point); if (gridbox.size() == gridboxsize) { grid_boxes_.push_back(gridbox); gridbox = GridBox(); } } } } if (gridbox.size() > 0) { grid_boxes_.push_back(gridbox); } #pragma omp parallel for for (Index i = 0; i < getBoxesSize(); i++) { grid_boxes_[i].FindSignificantShells(basis); grid_boxes_[i].PrepareForIntegration(); } totalgridsize_ = 0; for (auto& box : grid_boxes_) { totalgridsize_ += box.size(); } } } // namespace xtp } // namespace votca
34.680851
78
0.636503
rubengerritsen
02f8bbc0d7d583e213b9f02c8795387551ab968b
929
cpp
C++
0138. Copy List with Random Pointer/solution_o1.cpp
Pluto-Zy/LeetCode
3bb39fc5c000b344fd8727883b095943bd29c247
[ "MIT" ]
null
null
null
0138. Copy List with Random Pointer/solution_o1.cpp
Pluto-Zy/LeetCode
3bb39fc5c000b344fd8727883b095943bd29c247
[ "MIT" ]
null
null
null
0138. Copy List with Random Pointer/solution_o1.cpp
Pluto-Zy/LeetCode
3bb39fc5c000b344fd8727883b095943bd29c247
[ "MIT" ]
null
null
null
/* // Definition for a Node. class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; */ class Solution { public: Node* copyRandomList(Node* head) { if (!head) return nullptr; // 在每个节点后复制一个新节点 for (Node* cur = head; cur; cur = cur->next->next) { Node* temp = new Node(cur->val); temp->next = cur->next; cur->next = temp; } // 连接 random 指针 for (Node* cur = head; cur; cur = cur->next->next) { cur->next->random = cur->random ? cur->random->next : nullptr; } // 剥离结果 Node* result = new Node(0); for (Node* cur = head, *result_head = result; cur; cur = cur->next, result_head = result_head->next) { result_head->next = cur->next; cur->next = cur->next->next; result_head->next->next = nullptr; } return result->next; } };
22.658537
106
0.543595
Pluto-Zy
02fc52df9f9d4341ec35fa32645fab1aab4fd47a
5,956
cpp
C++
src/cbb/power_of_2.test.cpp
connorsmacd/Cbb
494a8d822b1d7ac19b3714439d9bcdcb2e5079d7
[ "MIT" ]
null
null
null
src/cbb/power_of_2.test.cpp
connorsmacd/Cbb
494a8d822b1d7ac19b3714439d9bcdcb2e5079d7
[ "MIT" ]
null
null
null
src/cbb/power_of_2.test.cpp
connorsmacd/Cbb
494a8d822b1d7ac19b3714439d9bcdcb2e5079d7
[ "MIT" ]
null
null
null
#define CATCH_CONFIG_MAIN #include <catch2/catch.hpp> #include <cbb/power_of_2_constants.hpp> using namespace cbb; using namespace ieme::fraction_literals; TEST_CASE("power_of_2 construction", "[power_of_2]") { SECTION("default") { STATIC_REQUIRE(power_of_2().get_exponent() == 0); } SECTION("from exponent") { STATIC_REQUIRE(power_of_2(power_of_2::from_exponent, -2).get_exponent() == -2); } SECTION("from fraction") { SECTION("> 1") { STATIC_REQUIRE(power_of_2(fraction(8)).get_exponent() == 3); } SECTION("1") { STATIC_REQUIRE(power_of_2(fraction(1)).get_exponent() == 0); } SECTION("< 1") { STATIC_REQUIRE(power_of_2(1 / 16_fr).get_exponent() == -4); } } } TEST_CASE("power_of_2::get_value", "[power_of_2]") { STATIC_REQUIRE(numbers::one_8th.get_value() == 1 / 8_fr); STATIC_REQUIRE(numbers::_1.get_value() == 1); STATIC_REQUIRE(numbers::_32.get_value() == 32); } TEST_CASE("power_of_2 comparison operators", "[power_of_2]") { SECTION("equality") { STATIC_REQUIRE(numbers::one_half == numbers::one_half); STATIC_REQUIRE_FALSE(numbers::one_half != numbers::one_half); STATIC_REQUIRE(numbers::one_half == 1 / 2_fr); STATIC_REQUIRE_FALSE(numbers::one_half != 1 / 2_fr); STATIC_REQUIRE(1 / 2_fr == numbers::one_half); STATIC_REQUIRE_FALSE(1 / 2_fr != numbers::one_half); STATIC_REQUIRE(numbers::_4 == 4); STATIC_REQUIRE_FALSE(numbers::_4 != 4); STATIC_REQUIRE(4 == numbers::_4); STATIC_REQUIRE_FALSE(4 != numbers::_4); STATIC_REQUIRE_FALSE(numbers::one_half == numbers::one_quarter); STATIC_REQUIRE(numbers::one_half != numbers::one_quarter); STATIC_REQUIRE_FALSE(numbers::one_half == 1 / 3_fr); STATIC_REQUIRE(numbers::one_half != 1 / 3_fr); STATIC_REQUIRE_FALSE(1 / 3_fr == numbers::one_half); STATIC_REQUIRE(1 / 3_fr != numbers::one_half); STATIC_REQUIRE_FALSE(numbers::_4 == 5); STATIC_REQUIRE(numbers::_4 != 5); STATIC_REQUIRE_FALSE(-2 == numbers::_4); STATIC_REQUIRE(-2 != numbers::_4); } SECTION("order") { STATIC_REQUIRE_FALSE(numbers::one_16th < numbers::one_16th); STATIC_REQUIRE(numbers::one_16th <= numbers::one_16th); STATIC_REQUIRE_FALSE(numbers::one_16th > numbers::one_16th); STATIC_REQUIRE(numbers::one_16th >= numbers::one_16th); STATIC_REQUIRE_FALSE(numbers::one_16th < 1 / 16_fr); STATIC_REQUIRE(numbers::one_16th <= 1 / 16_fr); STATIC_REQUIRE_FALSE(numbers::one_16th > 1 / 16_fr); STATIC_REQUIRE(numbers::one_16th >= 1 / 16_fr); STATIC_REQUIRE_FALSE(1 / 16_fr < numbers::one_16th); STATIC_REQUIRE(1 / 16_fr <= numbers::one_16th); STATIC_REQUIRE_FALSE(1 / 16_fr > numbers::one_16th); STATIC_REQUIRE(1 / 16_fr >= numbers::one_16th); STATIC_REQUIRE(numbers::one_16th < numbers::one_8th); STATIC_REQUIRE(numbers::one_16th <= numbers::one_8th); STATIC_REQUIRE_FALSE(numbers::one_16th > numbers::one_8th); STATIC_REQUIRE_FALSE(numbers::one_16th >= numbers::one_8th); STATIC_REQUIRE(numbers::one_16th < 1 / 15_fr); STATIC_REQUIRE(numbers::one_16th <= 1 / 15_fr); STATIC_REQUIRE_FALSE(numbers::one_16th > 1 / 15_fr); STATIC_REQUIRE_FALSE(numbers::one_16th >= 1 / 15_fr); STATIC_REQUIRE(1 / 9_fr < numbers::one_8th); STATIC_REQUIRE(1 / 9_fr <= numbers::one_8th); STATIC_REQUIRE_FALSE(1 / 9_fr > numbers::one_8th); STATIC_REQUIRE_FALSE(1 / 9_fr >= numbers::one_8th); STATIC_REQUIRE_FALSE(numbers::one_8th < numbers::one_16th); STATIC_REQUIRE_FALSE(numbers::one_8th <= numbers::one_16th); STATIC_REQUIRE(numbers::one_8th > numbers::one_16th); STATIC_REQUIRE(numbers::one_8th >= numbers::one_16th); STATIC_REQUIRE_FALSE(numbers::one_8th < 1 / 9_fr); STATIC_REQUIRE_FALSE(numbers::one_8th <= 1 / 9_fr); STATIC_REQUIRE(numbers::one_8th > 1 / 9_fr); STATIC_REQUIRE(numbers::one_8th >= 1 / 9_fr); STATIC_REQUIRE_FALSE(1 / 15_fr < numbers::one_16th); STATIC_REQUIRE_FALSE(1 / 15_fr <= numbers::one_16th); STATIC_REQUIRE(1 / 15_fr > numbers::one_16th); STATIC_REQUIRE(1 / 15_fr >= numbers::one_16th); } } TEST_CASE("power_of_2 arithmetic operators", "[power_of_2]") { SECTION("unary operator+") { STATIC_REQUIRE(+numbers::_2 == numbers::_2); } SECTION("unary operator-") { STATIC_REQUIRE(-numbers::one_8th == -1 / 8_fr); } SECTION("binary operator+") { STATIC_REQUIRE(numbers::one_8th + numbers::one_half == 5 / 8_fr); STATIC_REQUIRE(numbers::one_8th + 3 / 4_fr == 7 / 8_fr); STATIC_REQUIRE(1 / 4_fr + numbers::one_8th == 3 / 8_fr); } SECTION("binary operator-") { STATIC_REQUIRE(numbers::one_half - numbers::one_8th == 3 / 8_fr); STATIC_REQUIRE(numbers::one_8th - 1 / 3_fr == -5 / 24_fr); STATIC_REQUIRE(1 / 4_fr - numbers::_1 == -3 / 4_fr); } SECTION("operator*") { STATIC_REQUIRE(numbers::_16 * numbers::one_quarter == numbers::_4); STATIC_REQUIRE(numbers::_16 * 1 / 3_fr == 16 / 3_fr); STATIC_REQUIRE(1 / 5_fr * numbers::one_half == 1 / 10_fr); } SECTION("operator/") { STATIC_REQUIRE(numbers::_16 / numbers::one_half == numbers::_32); STATIC_REQUIRE(numbers::_8 / (1 / 3_fr) == 24); STATIC_REQUIRE(1 / 5_fr / numbers::one_quarter == 4 / 5_fr); } SECTION("operator%") { STATIC_REQUIRE(numbers::_8 % numbers::_2 == 0); STATIC_REQUIRE(numbers::one_8th % numbers::_4 == numbers::one_8th); STATIC_REQUIRE(numbers::_8 % (3 / 7_fr) == 2 / 7_fr); STATIC_REQUIRE(3 / 11_fr % numbers::one_16th == 1 / 44_fr); } SECTION("operator*=") { static constexpr auto p = [&]() { auto p = numbers::one_half; p *= numbers::_8; return p; }(); STATIC_REQUIRE(p == numbers::_4); } SECTION("operator/=") { static constexpr auto p = [&]() { auto p = numbers::_8; p /= numbers::_2; return p; }(); STATIC_REQUIRE(p == numbers::_4); } }
30.860104
80
0.660678
connorsmacd
02fdd9d7db3de78875bf306b76b89691409e5d26
4,504
cpp
C++
sdk_core/src/third_party/FastCRC/FastCRCsw.cpp
elapidae/Livox-SDK
c51d62ab2a6ce7dd8efb059da6600b755ea75a39
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause" ]
345
2019-01-16T02:19:08.000Z
2022-03-27T14:23:04.000Z
sdk_core/src/third_party/FastCRC/FastCRCsw.cpp
elapidae/Livox-SDK
c51d62ab2a6ce7dd8efb059da6600b755ea75a39
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause" ]
152
2019-01-31T06:53:01.000Z
2022-03-30T18:34:02.000Z
sdk_core/src/third_party/FastCRC/FastCRCsw.cpp
elapidae/Livox-SDK
c51d62ab2a6ce7dd8efb059da6600b755ea75a39
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause" ]
171
2019-01-24T09:54:32.000Z
2022-03-25T22:18:55.000Z
/* FastCRC library code is placed under the MIT license * Copyright (c) 2014,2015,2016 Frank Bosing * * 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. */ // // Thanks to: // - Catalogue of parametrised CRC algorithms, CRC RevEng // http://reveng.sourceforge.net/crc-catalogue/ // // - Danjel McGougan (CRC-Table-Generator) // // // modify from FastCRC library @ 2018/11/20 // #include "../include/third_party/FastCRC/FastCRC.h" #include "FastCRC_tables.hpp" // ================= 16-BIT CRC =================== /** Constructor */ FastCRC16::FastCRC16(uint16_t seed) { seed_ = seed; } #define crc_n4(crc, data, table) crc ^= data; \ crc = (table[(crc & 0xff) + 0x300]) ^ \ (table[((crc >> 8) & 0xff) + 0x200]) ^ \ (table[((data >> 16) & 0xff) + 0x100]) ^ \ (table[data >> 24]); /** MCRF4XX * equivalent to _crc_ccitt_update() in crc16.h from avr_libc * @param data Pointer to Data * @param datalen Length of Data * @return CRC value */ uint16_t FastCRC16::mcrf4xx_calc(const uint8_t *data, uint16_t len) { uint16_t crc = seed_; while (((uintptr_t)data & 3) && len) { crc = (crc >> 8) ^ crc_table_mcrf4xx[(crc & 0xff) ^ *data++]; len--; } while (len >= 16) { len -= 16; crc_n4(crc, ((uint32_t *)data)[0], crc_table_mcrf4xx); crc_n4(crc, ((uint32_t *)data)[1], crc_table_mcrf4xx); crc_n4(crc, ((uint32_t *)data)[2], crc_table_mcrf4xx); crc_n4(crc, ((uint32_t *)data)[3], crc_table_mcrf4xx); data += 16; } while (len--) { crc = (crc >> 8) ^ crc_table_mcrf4xx[(crc & 0xff) ^ *data++]; } //seed = crc; return crc; } // ================= 32-BIT CRC =================== /** Constructor */ FastCRC32::FastCRC32(uint32_t seed) { seed_ = seed; } #define crc_n4d(crc, data, table) crc ^= data; \ crc = (table[(crc & 0xff) + 0x300]) ^ \ (table[((crc >> 8) & 0xff) + 0x200]) ^ \ (table[((crc >> 16) & 0xff) + 0x100]) ^ \ (table[(crc >> 24) & 0xff]); #define crcsm_n4d(crc, data, table) crc ^= data; \ crc = (crc >> 8) ^ (table[crc & 0xff]); \ crc = (crc >> 8) ^ (table[crc & 0xff]); \ crc = (crc >> 8) ^ (table[crc & 0xff]); \ crc = (crc >> 8) ^ (table[crc & 0xff]); /** CRC32 * Alias CRC-32/ADCCP, PKZIP, Ethernet, 802.3 * @param data Pointer to Data * @param datalen Length of Data * @return CRC value */ #if CRC_BIGTABLES #define CRC_TABLE_CRC32 crc_table_crc32_big #else #define CRC_TABLE_CRC32 crc_table_crc32 #endif uint32_t FastCRC32::crc32_calc(const uint8_t *data, uint16_t len) { uint32_t crc = seed_^0xffffffff; while (((uintptr_t)data & 3) && len) { crc = (crc >> 8) ^ CRC_TABLE_CRC32[(crc & 0xff) ^ *data++]; len--; } while (len >= 16) { len -= 16; #if CRC_BIGTABLES crc_n4d(crc, ((uint32_t *)data)[0], CRC_TABLE_CRC32); crc_n4d(crc, ((uint32_t *)data)[1], CRC_TABLE_CRC32); crc_n4d(crc, ((uint32_t *)data)[2], CRC_TABLE_CRC32); crc_n4d(crc, ((uint32_t *)data)[3], CRC_TABLE_CRC32); #else crcsm_n4d(crc, ((uint32_t *)data)[0], CRC_TABLE_CRC32); crcsm_n4d(crc, ((uint32_t *)data)[1], CRC_TABLE_CRC32); crcsm_n4d(crc, ((uint32_t *)data)[2], CRC_TABLE_CRC32); crcsm_n4d(crc, ((uint32_t *)data)[3], CRC_TABLE_CRC32); #endif data += 16; } while (len--) { crc = (crc >> 8) ^ CRC_TABLE_CRC32[(crc & 0xff) ^ *data++]; } //seed = crc; crc ^= 0xffffffff; return crc; }
29.058065
73
0.620337
elapidae
f301d325055aa027df3128f876c75b953d67701e
13,341
cpp
C++
zodiacgraph/plug.cpp
IEEM-HsKA/Automotive-Security-Threat-Modelling-Tool
e3b2ea5a188b11aaa4bb329edcc0d3d1b47ae07b
[ "MIT" ]
1
2021-12-08T13:27:22.000Z
2021-12-08T13:27:22.000Z
zodiacgraph/plug.cpp
IEEM-HsKA/Automotive-Security-Threat-Modelling-Tool
e3b2ea5a188b11aaa4bb329edcc0d3d1b47ae07b
[ "MIT" ]
null
null
null
zodiacgraph/plug.cpp
IEEM-HsKA/Automotive-Security-Threat-Modelling-Tool
e3b2ea5a188b11aaa4bb329edcc0d3d1b47ae07b
[ "MIT" ]
null
null
null
#include "plug.h" #include <QGraphicsSceneMouseEvent> #include <QPainter> #include <QStyleOptionGraphicsItem> #include <QtMath> // for M_PI, qRadiansToDegrees #include "drawedge.h" #include "node.h" #include "perimeter.h" #include "plugedge.h" #include "pluglabel.h" #include "scene.h" #include "utils.h" static QGraphicsItem *getRootItemOf(QGraphicsItem *item); namespace zodiac { qreal Plug::s_width = 12.; QColor Plug::s_inColor = QColor("#728872"); QColor Plug::s_outColor = QColor("#887272"); QColor Plug::s_highlightColor = QColor("#d1d7db"); bool Plug::s_toggleNodeExpansionOnEdgeCreation = true; Qt::MouseButton Plug::s_drawEdgeButton = Qt::LeftButton; Node *Plug::s_dragTargetNode = nullptr; Plug *Plug::s_dragTargetPlug = nullptr; Plug *Plug::s_edgeDrawingPlug = nullptr; Plug::Plug(Node *parent, const QString &name, PlugDirection direction) : QGraphicsObject(parent), m_name(name), m_direction(direction), m_node(parent), m_arclength(0.1), m_normal(QVector2D(1., 0.)), m_shape(QPainterPath()), m_isHighlighted(false), m_edges(QSet<PlugEdge *>()), m_label(nullptr), m_connectedPlugs(QSet<Plug *>()) { // the perimeter needs to stack behind the node core setFlag(ItemStacksBehindParent); setCacheMode(DeviceCoordinateCache); // the plug doesn't do anything with them, but needs to be enabled so they get // send up to the node setAcceptHoverEvents(true); // only becomes visible as the node core expands setVisible(false); // create a label for this plug m_label = new PlugLabel(this); // initialize the members of this plug with default values setHighlight(false); } void Plug::addEdge(PlugEdge *edge) { // make sure the edge actually connects to this plug Plug *startPlug = edge->getStartPlug(); Plug *endPlug = edge->getEndPlug(); bool isValid = (((startPlug == this) || (endPlug == this)) // edge contains this plug && (!m_edges.contains(edge)) // edge is not already connected && (!m_connectedPlugs.contains( startPlug)) // other plug is not already connected && (!m_connectedPlugs.contains(endPlug)) // " - " && (m_direction == PlugDirection::IN ? m_edges.count() == 0 : true)); // if incoming, not yet connected #ifdef QT_DEBUG Q_ASSERT(isValid); #else if (!isValid) { return; } #endif // store the edge and the other plug m_edges.insert(edge); if (startPlug == this) { m_connectedPlugs.insert(endPlug); } else { m_connectedPlugs.insert(startPlug); } } void Plug::removeEdge(PlugEdge *edge) { #ifdef QT_DEBUG Q_ASSERT(m_edges.contains(edge)); #else if (!m_edges.contains(edge)) { return; } #endif // remove the edge m_edges.remove(edge); // remove the plug Plug *startPlug = edge->getStartPlug(); Plug *endPlug = edge->getEndPlug(); if (m_connectedPlugs.contains(startPlug)) { m_connectedPlugs.remove(startPlug); } else { Q_ASSERT(m_connectedPlugs.contains(endPlug)); m_connectedPlugs.remove(endPlug); } } void Plug::defineShape(QVector2D normal, qreal arclength) { // return early, if nothing has changed if (qFuzzyCompare(normal.x(), m_normal.x()) && qFuzzyCompare(normal.y(), m_normal.y()) && qFuzzyCompare(arclength, m_arclength)) { return; } m_normal = normal; m_arclength = qAbs(arclength); updateShape(); } void Plug::updateEdges() const { foreach (PlugEdge *edge, m_edges) { edge->plugHasChanged(); } } void Plug::updateExpansion(qreal expansion) { // use visibility toggle to adjust edge stretch if necessary setVisible(expansion != 0.0); // update position qreal targetDistance = m_node->getPerimeterRadius() - (m_direction == PlugDirection::IN ? s_width : 0.); QPointF pos = (m_normal * expansion * targetDistance).toPointF(); setPos(pos); // update label tranparency m_label->setOpacity(expansion); // update any connected edges updateEdges(); } void Plug::setHighlight(bool highlight) { m_isHighlighted = highlight; m_label->setHighlight(highlight); update(); } QVector2D Plug::getTargetNormal() const { // reset and return early, if there are no plugs to target if (m_connectedPlugs.isEmpty()) { return QVector2D(0, 0); } // get the average direction to all connected plugs (plus their respective // normal) QVector2D averageDirection(0, 0); QVector2D thisPos(m_node->scenePos()); for (Plug *plug : m_connectedPlugs) { QVector2D otherPos(plug->scenePos()); otherPos += plug->m_normal * plug->getNode()->getPerimeterRadius(); averageDirection += (otherPos - thisPos).normalized(); } return averageDirection.normalized(); } void Plug::aquireDrawEdge() { #ifdef QT_DEBUG Q_ASSERT(s_edgeDrawingPlug == nullptr); #else if (s_edgeDrawingPlug != nullptr) { return; } #endif s_edgeDrawingPlug = this; m_node->getScene()->getDrawEdge()->setReverse(m_direction == PlugDirection::IN); } void Plug::advanceDrawEdge(const QPointF &scenePos) { // due to some weird Qt event handling race conditions, this function is very // occassionaly called on a Plug that is no longer the edge drawing plug. in // this case, simply ignore the call. if (s_edgeDrawingPlug != this) { Q_ASSERT(s_edgeDrawingPlug == nullptr); return; } // make sure the draw edge is visible as soon as the mouse moves (but no // sooner) DrawEdge *drawEdge = m_node->getScene()->getDrawEdge(); drawEdge->setVisible(true); // find the topmost node under the mouse cursor Node *targetNode = nullptr; QGraphicsItem *plugNode = parentItem(); // the parent item of this plug is always its node for (QGraphicsItem *currentItem : scene()->items(scenePos)) { QGraphicsItem *rootItem = getRootItemOf(currentItem); if ((!rootItem) || (rootItem == plugNode)) { continue; } targetNode = qobject_cast<Node *>(rootItem->toGraphicsObject()); if (targetNode) { break; } } // if we found a node and if it is not already the dragTargetNode, collapse // the old node and expand the current if (targetNode) { bool isDrawingReverse = drawEdge->isReversed(); if (s_dragTargetNode != targetNode) { if (s_dragTargetNode) { s_dragTargetNode->softResetExpansion(); } s_dragTargetNode = targetNode; targetNode->softSetExpansion(isDrawingReverse ? NodeExpansion::OUT : NodeExpansion::IN); } // highlight the closest plug Plug *closestPlug = targetNode->getClosestPlugTo( targetNode->mapFromScene(scenePos), isDrawingReverse ? PlugDirection::OUT : PlugDirection::IN); if (closestPlug) { if ((closestPlug != this) && (s_dragTargetPlug != closestPlug)) { closestPlug->setHighlight(true); if (s_dragTargetPlug) { s_dragTargetPlug->setHighlight(false); } s_dragTargetPlug = closestPlug; } // reset the target plug, if the node item has none } else if (s_dragTargetPlug) { s_dragTargetPlug->setHighlight(false); s_dragTargetPlug = nullptr; } // if you found none but there is still an active dragTargetNode, collapse // it } else if (s_dragTargetNode) { s_dragTargetNode->softResetExpansion(); s_dragTargetNode = nullptr; // also reset the target plug if (s_dragTargetPlug) { s_dragTargetPlug->setHighlight(false); s_dragTargetPlug = nullptr; } } // update the draw edge drawEdge->fromPlugToPoint(this, scenePos); } void Plug::releaseDrawEdge() { // due to some weird Qt event handling race conditions, this function is very // occassionaly called on a Plug that is no longer the edge drawing plug. in // this case, simply ignore the call. if (s_edgeDrawingPlug != this) { Q_ASSERT(s_edgeDrawingPlug == nullptr); return; } // if requested, expand the outgoing plugs of the target node if there is any if (s_toggleNodeExpansionOnEdgeCreation && s_dragTargetNode) { s_dragTargetNode->softSetExpansion(NodeExpansion::OUT); } // release the draw edge Scene *nodeScene = m_node->getScene(); DrawEdge *drawEdge = nodeScene->getDrawEdge(); drawEdge->setVisible(false); s_edgeDrawingPlug = nullptr; s_dragTargetNode = nullptr; // if there is a plug targeted at the moment of release, add an edge if (s_dragTargetPlug) { if (drawEdge->isReversed()) { nodeScene->createEdge(s_dragTargetPlug, this); } else { nodeScene->createEdge(this, s_dragTargetPlug); } s_dragTargetPlug->setHighlight(false); s_dragTargetPlug = nullptr; } } void Plug::updateEdgeLabels() { for (PlugEdge *edge : m_edges) { edge->updateLabelText(); } } void Plug::updateStyle() { updateShape(); m_label->updateStyle(); update(); } qreal Plug::getArrangementPriority() { qreal factor = 0.; for (Plug *connectedPlug : m_connectedPlugs) { factor += connectedPlug->getEdgeCount(); } factor *= 0.5; return factor + getEdgeCount(); } QRectF Plug::boundingRect() const { return m_shape.boundingRect(); } void Plug::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget * /* widget */) { painter->setClipRect(option->exposedRect); // define the pen to draw this plug QBrush brush(Qt::SolidPattern); if (m_isHighlighted) { brush.setColor(s_highlightColor); } else { if (m_direction == PlugDirection::IN) { brush.setColor(s_inColor); } else { brush.setColor(s_outColor); } } // draw the plug painter->setPen(Qt::NoPen); painter->setBrush(brush); painter->drawPath(m_shape); } QPainterPath Plug::shape() const { return m_shape; } void Plug::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { // only highlight, if this is not a connected, incoming plug if (mayReceiveInput()) { setHighlight(true); } QGraphicsObject::hoverEnterEvent(event); } void Plug::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { setHighlight(false); QGraphicsObject::hoverLeaveEvent(event); } void Plug::mousePressEvent(QGraphicsSceneMouseEvent *event) { // only react to the draw edge button and only if this is not a connected // incoming plug if ((event->buttons() & s_drawEdgeButton) && mayReceiveInput()) { aquireDrawEdge(); event->accept(); } } void Plug::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { advanceDrawEdge(event->scenePos()); return QGraphicsObject::mouseMoveEvent(event); } void Plug::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { releaseDrawEdge(); return QGraphicsItem::mouseReleaseEvent(event); } void Plug::setName(const QString &name) { if (name == m_name) { return; } m_name = name; updateEdgeLabels(); updateStyle(); emit plugRenamed(m_name); } void Plug::updateShape() { prepareGeometryChange(); // update the path traced by the plug // the path is created in-place, meaning it does not need to be rotated // as it turns out, rotating stuff (especially with labels attached that also // rotate) is a MAYOR performance killer qreal perimeterRadius = m_node->getPerimeterRadius() - (m_direction == PlugDirection::IN ? s_width : 0.); qreal arclength = qRadiansToDegrees(m_arclength); qreal arcpos = qRadiansToDegrees(atan2(-m_normal.y(), m_normal.x())); QPointF rectOffset = QPointF(-m_normal.x() * perimeterRadius, -m_normal.y() * perimeterRadius); QRectF outsideRect = quadrat(perimeterRadius + (s_width / 2.)); outsideRect.translate(rectOffset); QRectF insideRect = quadrat(perimeterRadius - (s_width / 2.)); insideRect.translate(rectOffset); QPainterPath path; path.arcMoveTo(outsideRect, arcpos + (arclength / 2.)); path.arcTo(outsideRect, arcpos + (arclength / 2.), -arclength); path.arcTo(insideRect, arcpos - (arclength / 2.), 0.); path.arcTo(insideRect, arcpos - (arclength / 2.), arclength); path.closeSubpath(); path = path.simplified(); m_shape.swap(path); m_label->updateShape(); } bool Plug::mayReceiveInput() { const NodeExpansion nodeState = m_node->getExpansionState(); if (m_direction == PlugDirection::IN) { return ((m_edges.count() == 0) && ((nodeState == NodeExpansion::IN) || (nodeState == NodeExpansion::BOTH))); } else { return ((nodeState == NodeExpansion::OUT) || (nodeState == NodeExpansion::BOTH)); } } } // namespace zodiac /////////////////////////////////////////////////////////////////////////////////////////////////// // // HELPER // /// /// \brief Finds the root item in the ancestry of this item /// /// Ignores items that do not accept hover events. /// /// \param [in] item Item for which to search to root item. /// /// \return The pointer to the root item of the one given or the /// null pointer. /// static QGraphicsItem *getRootItemOf(QGraphicsItem *item) { for (QGraphicsItem *childItem = item; childItem != nullptr; childItem = childItem->parentItem()) { if (childItem->acceptHoverEvents()) { item = childItem; } else { // do not traverse past items that do not accept mouse hover events // (like labels) return nullptr; } } return item; }
29.580931
99
0.673188
IEEM-HsKA
f3042e91410e62719a0f494a6f58c2247191ffe1
2,007
hpp
C++
ext/src/javax/swing/Action.hpp
pebble2015/cpoi
6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6
[ "Apache-2.0" ]
null
null
null
ext/src/javax/swing/Action.hpp
pebble2015/cpoi
6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6
[ "Apache-2.0" ]
null
null
null
ext/src/javax/swing/Action.hpp
pebble2015/cpoi
6dcc0c5e13e3e722b4ef9fd0baffbf62bf71ead6
[ "Apache-2.0" ]
null
null
null
// Generated from /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/rt.jar #pragma once #include <fwd-POI.hpp> #include <java/beans/fwd-POI.hpp> #include <java/lang/fwd-POI.hpp> #include <javax/swing/fwd-POI.hpp> #include <java/awt/event/ActionListener.hpp> struct javax::swing::Action : public virtual ::java::awt::event::ActionListener { private: static ::java::lang::String* ACCELERATOR_KEY_; static ::java::lang::String* ACTION_COMMAND_KEY_; static ::java::lang::String* DEFAULT_; static ::java::lang::String* DISPLAYED_MNEMONIC_INDEX_KEY_; static ::java::lang::String* LARGE_ICON_KEY_; static ::java::lang::String* LONG_DESCRIPTION_; static ::java::lang::String* MNEMONIC_KEY_; static ::java::lang::String* NAME_; static ::java::lang::String* SELECTED_KEY_; static ::java::lang::String* SHORT_DESCRIPTION_; static ::java::lang::String* SMALL_ICON_; public: virtual void addPropertyChangeListener(::java::beans::PropertyChangeListener* listener) = 0; virtual ::java::lang::Object* getValue(::java::lang::String* key) = 0; virtual bool isEnabled() = 0; virtual void putValue(::java::lang::String* key, ::java::lang::Object* value) = 0; virtual void removePropertyChangeListener(::java::beans::PropertyChangeListener* listener) = 0; virtual void setEnabled(bool b) = 0; // Generated static ::java::lang::Class *class_(); static ::java::lang::String*& ACCELERATOR_KEY(); static ::java::lang::String*& ACTION_COMMAND_KEY(); static ::java::lang::String*& DEFAULT(); static ::java::lang::String*& DISPLAYED_MNEMONIC_INDEX_KEY(); static ::java::lang::String*& LARGE_ICON_KEY(); static ::java::lang::String*& LONG_DESCRIPTION(); static ::java::lang::String*& MNEMONIC_KEY(); static ::java::lang::String*& NAME(); static ::java::lang::String*& SELECTED_KEY(); static ::java::lang::String*& SHORT_DESCRIPTION(); static ::java::lang::String*& SMALL_ICON(); };
39.352941
99
0.691081
pebble2015
f3054f24f5c217346d346593114e97f462aee9fb
327
cpp
C++
contains-duplicate/contains-duplicate.cpp
deb-dutta-01/Leetcode_Practise
3c577e0eb8fb1ce6b145e19083372b2989143f0d
[ "Apache-2.0" ]
null
null
null
contains-duplicate/contains-duplicate.cpp
deb-dutta-01/Leetcode_Practise
3c577e0eb8fb1ce6b145e19083372b2989143f0d
[ "Apache-2.0" ]
null
null
null
contains-duplicate/contains-duplicate.cpp
deb-dutta-01/Leetcode_Practise
3c577e0eb8fb1ce6b145e19083372b2989143f0d
[ "Apache-2.0" ]
null
null
null
class Solution { public: bool containsDuplicate(vector<int>& nums) { unordered_set<int> res; for(int num:nums){ if(res.find(num) == res.end()){ res.insert(num); } else return true; } return false; } };
20.4375
47
0.428135
deb-dutta-01
f3056323c7da80c5632d6798e7657bc4eafb2e40
3,895
hpp
C++
ql/methods/finitedifferences/operators/triplebandlinearop.hpp
autoantwort/QuantLib
3261dde01de1b9c7ceb6c0cd1a2920da6e38eb3c
[ "BSD-3-Clause" ]
1
2021-02-27T22:25:54.000Z
2021-02-27T22:25:54.000Z
ql/methods/finitedifferences/operators/triplebandlinearop.hpp
autoantwort/QuantLib
3261dde01de1b9c7ceb6c0cd1a2920da6e38eb3c
[ "BSD-3-Clause" ]
16
2020-11-23T08:00:31.000Z
2022-03-28T07:57:41.000Z
ql/methods/finitedifferences/operators/triplebandlinearop.hpp
fabianfh/QuantLib
44230ddeb91629015ff6ff9aa079b07912dd2002
[ "BSD-3-Clause" ]
1
2016-11-01T13:51:45.000Z
2016-11-01T13:51:45.000Z
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2008 Andreas Gaida Copyright (C) 2008 Ralph Schreyer Copyright (C) 2008 Klaus Spanderen Copyright (C) 2014 Johannes Göttker-Schnetmann This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email <[email protected]>. The license is also available online at <http://quantlib.org/license.shtml>. This program 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 license for more details. */ /*! \file triplebandlinearop.hpp \brief general triple band linear operator */ #ifndef quantlib_triple_band_linear_op_hpp #define quantlib_triple_band_linear_op_hpp #include <ql/methods/finitedifferences/operators/fdmlinearop.hpp> #if !defined(QL_USE_STD_UNIQUE_PTR) #include <boost/shared_array.hpp> #endif #include <memory> namespace QuantLib { class FdmMesher; class TripleBandLinearOp : public FdmLinearOp { public: TripleBandLinearOp(Size direction, const ext::shared_ptr<FdmMesher>& mesher); TripleBandLinearOp(const TripleBandLinearOp& m); TripleBandLinearOp(TripleBandLinearOp&& m) QL_NOEXCEPT; #ifdef QL_USE_DISPOSABLE TripleBandLinearOp(const Disposable<TripleBandLinearOp>& m); #endif TripleBandLinearOp& operator=(const TripleBandLinearOp& m); TripleBandLinearOp& operator=(TripleBandLinearOp&& m) QL_NOEXCEPT; #ifdef QL_USE_DISPOSABLE TripleBandLinearOp& operator=(const Disposable<TripleBandLinearOp>& m); #endif Disposable<Array> apply(const Array& r) const override; Disposable<Array> solve_splitting(const Array& r, Real a, Real b = 1.0) const; Disposable<TripleBandLinearOp> mult(const Array& u) const; // interpret u as the diagonal of a diagonal matrix, multiplied on LHS Disposable<TripleBandLinearOp> multR(const Array& u) const; // interpret u as the diagonal of a diagonal matrix, multiplied on RHS Disposable<TripleBandLinearOp> add(const TripleBandLinearOp& m) const; Disposable<TripleBandLinearOp> add(const Array& u) const; // some very basic linear algebra routines void axpyb(const Array& a, const TripleBandLinearOp& x, const TripleBandLinearOp& y, const Array& b); void swap(TripleBandLinearOp& m); #if !defined(QL_NO_UBLAS_SUPPORT) Disposable<SparseMatrix> toMatrix() const override; #endif protected: TripleBandLinearOp() = default; Size direction_; #if !defined(QL_USE_STD_UNIQUE_PTR) boost::shared_array<Size> i0_, i2_; boost::shared_array<Size> reverseIndex_; boost::shared_array<Real> lower_, diag_, upper_; #else std::unique_ptr<Size[]> i0_, i2_; std::unique_ptr<Size[]> reverseIndex_; std::unique_ptr<Real[]> lower_, diag_, upper_; #endif ext::shared_ptr<FdmMesher> mesher_; }; inline TripleBandLinearOp::TripleBandLinearOp(TripleBandLinearOp&& m) QL_NOEXCEPT { swap(m); } inline TripleBandLinearOp& TripleBandLinearOp::operator=(const TripleBandLinearOp& m) { TripleBandLinearOp tmp(m); swap(tmp); return *this; } inline TripleBandLinearOp& TripleBandLinearOp::operator=(TripleBandLinearOp&& m) QL_NOEXCEPT { swap(m); return *this; } } #endif
34.469027
98
0.691913
autoantwort
f305fe08d9bca25526b9ca438afbff6c37ddddea
650
cpp
C++
src/errors.cpp
miniriley2012/flags
3f001f16100e66bbd9aa4a07661900466318f972
[ "MIT" ]
null
null
null
src/errors.cpp
miniriley2012/flags
3f001f16100e66bbd9aa4a07661900466318f972
[ "MIT" ]
null
null
null
src/errors.cpp
miniriley2012/flags
3f001f16100e66bbd9aa4a07661900466318f972
[ "MIT" ]
null
null
null
// // Created by Riley Quinn on 6/14/20. // #include "flags/errors.hpp" std::string flags::errors::make_option_error_str(const option_error err, const std::string &option_name) { switch (err) { case undefined: { return "Undefined option '" + option_name + "'."; } case missing_value: return "Missing value for '" + option_name + "'."; case missing_required: return "Missing required option '" + option_name + "'."; case validation_error: return "Validation failed for '" + option_name + "'."; default: return "undefined error"; } }
29.545455
106
0.58
miniriley2012
f307086c0b7891029d7533d424657dcc26b150b8
2,257
cpp
C++
Roguelike/Code/Game/PursueBehavior.cpp
cugone/Roguelike
0f53a1ae2a37e683773c1707ce4aeb056973af13
[ "MIT" ]
null
null
null
Roguelike/Code/Game/PursueBehavior.cpp
cugone/Roguelike
0f53a1ae2a37e683773c1707ce4aeb056973af13
[ "MIT" ]
4
2021-05-04T03:21:49.000Z
2021-10-06T05:21:24.000Z
Roguelike/Code/Game/PursueBehavior.cpp
cugone/Roguelike
0f53a1ae2a37e683773c1707ce4aeb056973af13
[ "MIT" ]
2
2020-01-19T00:50:34.000Z
2021-04-01T07:51:02.000Z
#include "Game/PursueBehavior.hpp" #include "Engine/Math/MathUtils.hpp" #include "Game/Actor.hpp" #include "Game/Command.hpp" #include "Game/RestCommand.hpp" #include "Game/MoveCommand.hpp" #include "Game/MoveNorthCommand.hpp" #include "Game/MoveSouthCommand.hpp" #include "Game/MoveEastCommand.hpp" #include "Game/MoveWestCommand.hpp" #include "Game/MoveNorthEastCommand.hpp" #include "Game/MoveNorthWestCommand.hpp" #include "Game/MoveSouthEastCommand.hpp" #include "Game/MoveSouthWestCommand.hpp" #include "Game/Map.hpp" #include "Game/Pathfinder.hpp" PursueBehavior::PursueBehavior() noexcept : PursueBehavior(nullptr) {} PursueBehavior::PursueBehavior(Actor* target) noexcept : Behavior(target) { SetName("pursue"); SetTarget(target); } void PursueBehavior::InitializePathfinding() { auto* target = GetTarget(); if(target) { pather = target->map->GetPathfinder(); pather->Initialize(IntVector2{target->map->CalcMaxDimensions()}); } } void PursueBehavior::SetTarget(Actor* target) noexcept { Behavior::SetTarget(target); InitializePathfinding(); } void PursueBehavior::Act(Actor* actor) noexcept { const auto viable = [this, actor](const IntVector2& a)->bool { const auto coords = IntVector3{a, 0}; const auto* map = actor->map; return map->IsTilePassable(coords); }; const auto h = [](const IntVector2& a, const IntVector2& b) { return MathUtils::CalculateManhattanDistance(a, b); }; const auto d = [this](const IntVector2& a, const IntVector2& b) { const auto va = Vector2{a} + Vector2{0.5f, 0.5f}; const auto vb = Vector2{b} + Vector2{0.5f, 0.5f}; return MathUtils::CalcDistance(va, vb); }; const auto& my_loc = actor->GetPosition(); const auto& target_loc = GetTarget()->GetPosition(); pather->AStar(my_loc, target_loc, viable, h, d); const auto path = pather->GetResult(); for(auto& node : path) { const auto coords = IntVector3{node->coords, 0}; const auto* amap = actor->map; auto* tile = amap->GetTile(coords); if(tile) { tile->color = Rgba::White; } } } float PursueBehavior::CalculateUtility() noexcept { return 0.0f; }
28.935897
73
0.671245
cugone
f30996556ecddf8e348c2fe2bbfb2caa636bfef6
3,200
cpp
C++
util/scanner_sim/servescanner.cpp
cdla/murfi2
45dba5eb90e7f573f01706a50e584265f0f8ffa7
[ "Apache-2.0" ]
7
2015-02-10T17:00:49.000Z
2021-07-27T22:09:43.000Z
util/scanner_sim/servescanner.cpp
cdla/murfi2
45dba5eb90e7f573f01706a50e584265f0f8ffa7
[ "Apache-2.0" ]
11
2015-02-22T19:15:53.000Z
2021-08-04T17:26:18.000Z
util/scanner_sim/servescanner.cpp
cdla/murfi2
45dba5eb90e7f573f01706a50e584265f0f8ffa7
[ "Apache-2.0" ]
8
2015-07-06T22:31:51.000Z
2019-04-22T21:22:07.000Z
#include"ace/SOCK_Stream.h" #include"ace/SOCK_Connector.h" #include"ace/SOCK_Stream.h" #include<iostream> #include<cstring> #include<cstdio> #include"../../src/io/RtExternalSenderImageInfo.h" using namespace std; // noise proerties bool noise = false; unsigned short max_noise = 50; int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { int num2send = argc > 1 ? atoi(argv[1]) : -1; char *data = (char*) calloc(EXTERNALSENDERSIZEOF,1); FILE* fp = fopen("scan_dat.hdr","rb"); fread(data, EXTERNALSENDERSIZEOF, 1, fp); fclose(fp); // make the image info to send RtExternalImageInfo *ei = new RtExternalImageInfo(data, EXTERNALSENDERSIZEOF); char *send = (char*) calloc(EXTERNALSENDERSIZEOF,1); // make the test data to send // int i, numPix = ei->nCol * ei->nLin, // imageDataSize = numPix * sizeof(unsigned short); // unsigned short *img = new unsigned short[numPix]; // fp = fopen("scanner_testimg.dat","rb"); // fread(img, sizeof(unsigned short), ei->nCol * ei->nLin, fp); // fclose(fp); // unsigned short *imgnoisy = new unsigned short[numPix]; int i; delete ei; // Local server address. ACE_INET_Addr my_addr ( argc > 2 ? atoi(argv[2]) : 15000, argc > 1 ? argv[1] : "localhost"); // Data transfer object. ACE_SOCK_Stream stream; // Initialize the connector. ACE_SOCK_Connector connector; // keep making new connections int numImg = 20; for(i = 1; (num2send < 0 || i <= num2send) && connector.connect (stream, my_addr) != -1; i++) { char fn[100]; sprintf(fn,"testimg/img%05d.dat",(i-1)%numImg+1); //sprintf(fn,"testimg/img00001.dat",(i-1)%numImg+1); //sprintf(fn,"scanner_testimg.dat"); cout << "loading image " << fn << " to send" << endl; fp = fopen(fn,"rb"); int w, h, c; fread(&w, sizeof(int), 1, fp); fread(&h, sizeof(int), 1, fp); fread(&c, sizeof(int), 1, fp); int numPix = w*h, imageDataSize = numPix * sizeof(unsigned short); unsigned short *img = new unsigned short[numPix]; unsigned short *imgnoisy = new unsigned short[numPix]; fread(img, sizeof(unsigned short), w*h, fp); fclose(fp); ei = new RtExternalImageInfo(data, EXTERNALSENDERSIZEOF); ei->nCol = h; ei->nLin = w; ei->iAcquisitionNumber = i; cout << "sending img " << ei->iAcquisitionNumber << endl; send = ei->convertToScannerDataArray(); //data = ei.convertToScannerDataArray(); cout << "sending info of size " << ei->iSizeOfRtExternalImageInfo << endl; stream.send_n (send, ei->iSizeOfRtExternalImageInfo); //free(data); cout << "sending img of size " << imageDataSize << endl; // add some noise to the image if(noise) { memcpy(imgnoisy, img, sizeof(unsigned short)* ei->nCol * ei->nLin); for(int i = 0; i < ei->nCol * ei->nLin; i++) { unsigned short val; while (max_noise <= (val = rand() / (RAND_MAX/max_noise))); imgnoisy[i] = imgnoisy[i] + val; } stream.send_n (imgnoisy, imageDataSize); } else { stream.send_n (img, imageDataSize); } usleep(2000000); stream.close(); delete ei; delete img; delete imgnoisy; } free(data); free(send); return 0; }
25.19685
80
0.633125
cdla
f30d9ac3cad16ec92c2833349edb4f175231e7b3
984
hpp
C++
modules/core/src/Slot/gmSlotInputList.hpp
GraphMIC/GraphMIC
8fc2aeb0143ee1292c6757f010fc9e8c68823e2b
[ "BSD-3-Clause" ]
43
2016-04-11T11:34:05.000Z
2022-03-31T03:37:57.000Z
modules/core/src/Slot/gmSlotInputList.hpp
kevinlq/GraphMIC
8fc2aeb0143ee1292c6757f010fc9e8c68823e2b
[ "BSD-3-Clause" ]
1
2016-05-17T12:58:16.000Z
2016-05-17T12:58:16.000Z
modules/core/src/Slot/gmSlotInputList.hpp
kevinlq/GraphMIC
8fc2aeb0143ee1292c6757f010fc9e8c68823e2b
[ "BSD-3-Clause" ]
14
2016-05-13T20:23:16.000Z
2021-12-20T10:33:19.000Z
#pragma once #include <QAbstractListModel> namespace gm { namespace Slot { class InputBase; class GM_CORE_EXPORT InputList : public QAbstractListModel { Q_OBJECT public: enum Roles { Slot = Qt::UserRole + 1, }; private: QList<InputBase*> m_slots; QHash<QString, InputBase*> m_slotMap; public: InputList(); auto getSlots() -> QList<InputBase*>; auto addSlot(InputBase*) -> void; auto getSlot(const QString&) -> InputBase*; auto removeSlot(const QString&) -> void; auto rowCount(const QModelIndex &parent = QModelIndex()) const -> int; auto data(const QModelIndex &index, int role) const -> QVariant; auto roleNames() const -> QHash<int, QByteArray>; auto moveToMain() -> void; ~InputList(); }; } }
27.333333
82
0.521341
GraphMIC
f314a4ce2b04e7ebe935165e14b5e2cc73bf4a5a
1,239
cpp
C++
test/unit/scaled_int/rounding/elastic/int.cpp
JuanluMorales/cnl
fb0ad2be9315471809bea58643c8c90729644cd7
[ "BSL-1.0" ]
523
2017-07-27T02:43:25.000Z
2022-03-24T21:27:22.000Z
test/unit/scaled_int/rounding/elastic/int.cpp
JuanluMorales/cnl
fb0ad2be9315471809bea58643c8c90729644cd7
[ "BSL-1.0" ]
377
2017-07-28T04:09:46.000Z
2022-03-19T12:20:11.000Z
test/unit/scaled_int/rounding/elastic/int.cpp
JuanluMorales/cnl
fb0ad2be9315471809bea58643c8c90729644cd7
[ "BSL-1.0" ]
63
2017-08-16T14:43:40.000Z
2022-03-21T16:07:02.000Z
// Copyright John McFarlane 2015 - 2016. // Distributed under 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) #include <cnl/_impl/config.h> #include <cnl/elastic_integer.h> #include <cnl/rounding_integer.h> #include <cnl/scaled_integer.h> #include <string> #include <gtest/gtest.h> namespace { template<int Digits, int Exponent> using scaled_integer_rounding_elastic_integer = cnl::scaled_integer< cnl::rounding_integer<cnl::elastic_integer<Digits>>, cnl::power<Exponent>>; TEST(scaled_integer_rounding_elastic_integer, to_chars) // NOLINT { auto expected = std::string{"25.25"}; auto actual = std::string{ cnl::to_chars_static(scaled_integer_rounding_elastic_integer<24, -20>{25.25}).chars.data()}; ASSERT_EQ(expected, actual); } #if defined(CNL_IOSTREAMS_ENABLED) TEST(scaled_integer_rounding_elastic_integer, ostream) // NOLINT { testing::internal::CaptureStdout(); std::cout << scaled_integer_rounding_elastic_integer<24, -20>{25.25}; ASSERT_EQ("25.25", testing::internal::GetCapturedStdout()); } #endif }
32.605263
108
0.687651
JuanluMorales
f317bf26c62298afacd2d8b80beba4b56eba5d40
9,281
cpp
C++
GTE/Samples/Geometrics/ConformalMapping/ConformalMappingWindow3.cpp
tranthaiphi/GeometricTools
451e412a0715dbb4fcafbe486ca33d84a404b78d
[ "BSL-1.0" ]
452
2020-09-16T02:23:30.000Z
2022-03-27T23:11:38.000Z
GTE/Samples/Geometrics/ConformalMapping/ConformalMappingWindow3.cpp
tranthaiphi/GeometricTools
451e412a0715dbb4fcafbe486ca33d84a404b78d
[ "BSL-1.0" ]
34
2020-10-11T03:56:17.000Z
2022-03-04T17:29:34.000Z
GTE/Samples/Geometrics/ConformalMapping/ConformalMappingWindow3.cpp
tranthaiphi/GeometricTools
451e412a0715dbb4fcafbe486ca33d84a404b78d
[ "BSL-1.0" ]
91
2020-09-28T16:59:40.000Z
2022-03-25T16:20:06.000Z
// David Eberly, Geometric Tools, Redmond WA 98052 // Copyright (c) 1998-2021 // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt // https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // Version: 4.0.2019.08.13 #include "ConformalMappingWindow3.h" #include <Graphics/VertexColorEffect.h> #include <Mathematics/ConformalMapGenus0.h> #include <Mathematics/MeshCurvature.h> ConformalMappingWindow3::ConformalMappingWindow3(Parameters& parameters) : Window3(parameters), mExtreme(10.0f) { if (!SetEnvironment()) { parameters.created = false; return; } mEngine->SetClearColor({ 0.4f, 0.5f, 0.6f, 1.0f }); mWireState = std::make_shared<RasterizerState>(); mWireState->fillMode = RasterizerState::FILL_WIREFRAME; InitializeCamera(60.0f, GetAspectRatio(), 0.1f, 100.0f, 0.01f, 0.01f, { 0.0f, 0.0f, -6.5f }, { 0.0f, 0.0f, 1.0f }, { 0.0f, 1.0f, 0.0f }); CreateScene(); mPVWMatrices.Update(); } void ConformalMappingWindow3::OnIdle() { mTimer.Measure(); if (mCameraRig.Move()) { mPVWMatrices.Update(); } mEngine->ClearBuffers(); mEngine->Draw(mMesh); mEngine->Draw(mSphere); mEngine->Draw(8, mYSize - 8, { 0.0f, 0.0f, 0.0f, 1.0f }, mTimer.GetFPS()); mEngine->DisplayColorBuffer(0); mTimer.UpdateFrameCount(); } bool ConformalMappingWindow3::OnCharPress(unsigned char key, int x, int y) { switch (key) { case 'w': if (mEngine->GetRasterizerState() == mWireState) { mEngine->SetDefaultRasterizerState(); } else { mEngine->SetRasterizerState(mWireState); } return true; case 'm': // Rotate only the brain mesh. mTrackBall.Set(mMeshNode); mTrackBall.Update(); return true; case 's': // Rotate only the sphere mesh. mTrackBall.Set(mSphereNode); mTrackBall.Update(); return true; case 'b': // Rotate both the brain and sphere meshes simultaneously. mTrackBall.Set(mScene); mTrackBall.Update(); return true; } return Window3::OnCharPress(key, x, y); } bool ConformalMappingWindow3::SetEnvironment() { std::string path = GetGTEPath(); if (path == "") { return false; } mEnvironment.Insert(path + "/Samples/Data/"); if (mEnvironment.GetPath("Brain_V4098_T8192.binary") == "") { LogError("Cannot find file Brain_V4098_T8192.binary"); return false; } return true; } void ConformalMappingWindow3::LoadBrain(std::vector<Vector3<float>>& positions, std::vector<Vector4<float>>& colors, std::vector<unsigned int>& indices) { // Load the brain mesh, which has the topology of a sphere. unsigned int const numPositions = NUM_BRAIN_VERTICES; unsigned int const numTriangles = NUM_BRAIN_TRIANGLES; positions.resize(numPositions); colors.resize(numPositions); indices.resize(3 * numTriangles); std::string path = mEnvironment.GetPath("Brain_V4098_T8192.binary"); std::ifstream input(path, std::ios::binary); input.read((char*)positions.data(), positions.size() * sizeof(positions[0])); input.read((char*)indices.data(), indices.size() * sizeof(indices[0])); input.close(); // Scale the data to the cube [-10,10]^3 for numerical preconditioning // of the conformal mapping. float minValue = positions[0][0], maxValue = minValue; for (unsigned int i = 0; i < numPositions; ++i) { auto const& position = positions[i]; for (int j = 0; j < 3; ++j) { if (position[j] < minValue) { minValue = position[j]; } else if (position[j] > maxValue) { maxValue = position[j]; } } } float halfRange = 0.5f * (maxValue - minValue); float mult = mExtreme / halfRange; for (unsigned int i = 0; i < numPositions; ++i) { auto& position = positions[i]; for (int j = 0; j < 3; ++j) { position[j] = -mExtreme + mult * (position[j] - minValue); } } // Assign vertex colors according to mean curvature. MeshCurvature<float>mc; mc(positions, indices, 1e-06f); auto const& minCurvatures = mc.GetMinCurvatures(); auto const& maxCurvatures = mc.GetMaxCurvatures(); std::vector<float> meanCurvatures(numPositions); float minMeanCurvature = minCurvatures[0] + maxCurvatures[0]; float maxMeanCurvature = minMeanCurvature; for (unsigned int i = 0; i < numPositions; ++i) { meanCurvatures[i] = minCurvatures[i] + maxCurvatures[i]; if (meanCurvatures[i] < minMeanCurvature) { minMeanCurvature = meanCurvatures[i]; } else if (meanCurvatures[i] > maxMeanCurvature) { maxMeanCurvature = meanCurvatures[i]; } } for (unsigned int i = 0; i < numPositions; ++i) { auto& color = colors[i]; if (meanCurvatures[i] > 0.0f) { color[0] = 0.5f * (1.0f + meanCurvatures[i] / maxMeanCurvature); color[1] = color[0]; color[2] = 0.0f; } else if (meanCurvatures[i] < 0.0f) { color[0] = 0.0f; color[1] = 0.0f; color[2] = 0.5f * (1.0f - meanCurvatures[i] / minMeanCurvature); } else { color[0] = 0.0f; color[1] = 0.0f; color[2] = 0.0f; } color[3] = 1.0f; } } void ConformalMappingWindow3::CreateScene() { // Load and preprocess the brain data set. std::vector<Vector3<float>> positions; std::vector<Vector4<float>> colors; std::vector<unsigned int> indices; LoadBrain(positions, colors, indices); // Create the brain mesh. VertexFormat vformat; vformat.Bind(VA_POSITION, DF_R32G32B32_FLOAT, 0); vformat.Bind(VA_COLOR, DF_R32G32B32A32_FLOAT, 0); auto vbuffer = std::make_shared<VertexBuffer>(vformat, NUM_BRAIN_VERTICES); auto vertices = vbuffer->Get<Vertex>(); for (int i = 0; i < NUM_BRAIN_VERTICES; ++i) { vertices[i].position = positions[i]; vertices[i].color = colors[i]; } auto ibuffer = std::make_shared<IndexBuffer>(IP_TRIMESH, NUM_BRAIN_TRIANGLES, sizeof(unsigned int)); std::memcpy(ibuffer->GetData(), indices.data(), ibuffer->GetNumBytes()); auto effect = std::make_shared<VertexColorEffect>(mProgramFactory); mMesh = std::make_shared<Visual>(vbuffer, ibuffer, effect); mMesh->UpdateModelBound(); mPVWMatrices.Subscribe(mMesh->worldTransform, effect->GetPVWMatrixConstant()); // Select the first triangle as the puncture triangle and use red // vertex colors for it. int punctureTriangle = 100; Vector4<float> red{ 1.0f, 0.0f, 0.0f, 1.0f }; vertices[indices[3 * punctureTriangle + 0]].color = red; vertices[indices[3 * punctureTriangle + 1]].color = red; vertices[indices[3 * punctureTriangle + 2]].color = red; // Conformally map the mesh to a sphere. ConformalMapGenus0<float> cm; cm(NUM_BRAIN_VERTICES, positions.data(), NUM_BRAIN_TRIANGLES, ibuffer->Get<int>(), punctureTriangle); auto const& sphereCoordinates = cm.GetSphereCoordinates(); vbuffer = std::make_shared<VertexBuffer>(vformat, NUM_BRAIN_VERTICES); vertices = vbuffer->Get<Vertex>(); for (int i = 0; i < NUM_BRAIN_VERTICES; ++i) { vertices[i].position = sphereCoordinates[i]; vertices[i].color = colors[i]; } vertices[indices[3 * punctureTriangle + 0]].color = red; vertices[indices[3 * punctureTriangle + 1]].color = red; vertices[indices[3 * punctureTriangle + 2]].color = red; effect = std::make_shared<VertexColorEffect>(mProgramFactory); mSphere = std::make_shared<Visual>(vbuffer, ibuffer, effect); mSphere->UpdateModelBound(); mPVWMatrices.Subscribe(mSphere->worldTransform, effect->GetPVWMatrixConstant()); // Create a subtree for the mesh. This allows for the trackball to // manipulate only the mesh. mScene = std::make_shared<Node>(); mMeshNode = std::make_shared<Node>(); mMeshNode->localTransform.SetTranslation(2.0f, 0.0f, 0.0f); mMeshNode->localTransform.SetUniformScale(1.0f / mExtreme); auto meshParent = std::make_shared<Node>(); meshParent->localTransform.SetTranslation(-mMesh->modelBound.GetCenter()); // Create a subtree for the sphere. This allows for the trackball to // manipulate only the sphere. mSphereNode = std::make_shared<Node>(); mSphereNode->localTransform.SetTranslation(-2.0f, 0.0f, 0.0f); auto sphereParent = std::make_shared<Node>(); sphereParent->localTransform.SetTranslation(-mSphere->modelBound.GetCenter()); // Create the scene graph. The trackball manipulates the entire scene // graph initially. mScene->AttachChild(mMeshNode); mScene->AttachChild(mSphereNode); mMeshNode->AttachChild(meshParent); meshParent->AttachChild(mMesh); mSphereNode->AttachChild(sphereParent); sphereParent->AttachChild(mSphere); mTrackBall.Set(mScene); mTrackBall.Update(); }
32.911348
104
0.631721
tranthaiphi
f318f5cc1e8c211864502d9b9fe50847e1a62e6b
2,319
cpp
C++
06. Functions/08. pass_by_reference.cpp
ManthanUgemuge/Deep-Dive-in-CPP-Abdul-Bari
36aacdca116628264724cc2624d64fcb1e0c1148
[ "MIT" ]
1
2022-02-15T21:11:42.000Z
2022-02-15T21:11:42.000Z
06. Functions/08. pass_by_reference.cpp
ManthanUgemuge/Deep-Dive-in-CPP-Abdul-Bari
36aacdca116628264724cc2624d64fcb1e0c1148
[ "MIT" ]
null
null
null
06. Functions/08. pass_by_reference.cpp
ManthanUgemuge/Deep-Dive-in-CPP-Abdul-Bari
36aacdca116628264724cc2624d64fcb1e0c1148
[ "MIT" ]
null
null
null
#include <iostream> using namespace std; void swap(int &a, int &b) { int temp; temp = a; a = b; b = temp; } int main() { int x = 10, y = 20; cout << "Value of actual parameters x and y before swap(x,y) :\nx = " << x << "\ty = " << y << endl; cout << "Address of actual parameters x and y before swap(x,y) :\nx = " << &x << "\ty = " << &y << endl; swap(x, y); cout << "Output of actual parameters after swap(x,y) :\nx = " << x << "\ty = " << y << endl; // Aww yeah! Swap happens. cout << "Address of actual parameters x and y after swap(x,y) :\nx = " << &x << "\ty = " << &y << endl; return 0; } /* References are nickname to a variable and has to be initialized at the declaration time and can't be null. We do very minor changes to the code and it is almost same as if it was call by value code. We do not make any changes where we call the function inside main. Instead in the function definition we take in int &a i.e. reference variables instead of int variables. Syntax is same as call by value only at the definition of the function we use & ampersand. In call by reference changes can be done to actual parameters. Due to & being used i.e. reference variables being taken in function definition when we pass x and y inside main to the function new activation record is not created instead x and y are also identified by the name a and b at memory &x and &y. When we use call by reference what happens at machine code generation phase is that where we call swap function inside the main there machine code of swap function will be copied. Machine code of function will be copied inside the main function at the place of function call. It becomes part of main function and as a result during call by reference even if it seems another function directly modifying main function in reality before that happens another function becomes a part of main function. Temp is also created in the activation record of the main function itself and will be there as long as the swap funcion code is being executed. Use call by reference when you want actual parameters to be modified. Loops inside call by references can lead to warnings as perfect copying of code by compiler might not happen. Using call by reference makes the function being called as in-line function. */
48.3125
123
0.718413
ManthanUgemuge
f31cc9af2c3e6b9b69ab7e2eb9da1b00e442a37e
16,903
cpp
C++
folly/net/TcpInfo.cpp
Aoikiseki/folly
df3633c731d08bab0173039a050a30853fb47212
[ "Apache-2.0" ]
19,046
2015-01-01T17:01:10.000Z
2022-03-31T23:01:43.000Z
folly/net/TcpInfo.cpp
Aoikiseki/folly
df3633c731d08bab0173039a050a30853fb47212
[ "Apache-2.0" ]
1,493
2015-01-11T15:47:13.000Z
2022-03-28T18:13:58.000Z
folly/net/TcpInfo.cpp
Aoikiseki/folly
df3633c731d08bab0173039a050a30853fb47212
[ "Apache-2.0" ]
4,818
2015-01-01T12:28:16.000Z
2022-03-31T16:22:10.000Z
/* * Copyright (c) Facebook, Inc. and its affiliates. * * 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 <glog/logging.h> #include <folly/net/TcpInfo.h> #include <folly/portability/Sockets.h> #if defined(__linux__) #include <linux/sockios.h> #include <sys/ioctl.h> #endif namespace folly { namespace { constexpr std::array< folly::StringPiece, static_cast<std::underlying_type_t<TcpInfo::CongestionControlName>>( TcpInfo::CongestionControlName::NumCcTypes)> kCcNames{ "UNKNOWN", "CUBIC", "BIC", "DCTCP", "DCTCP_RENO", "BBR", "RENO", "DCTCP_CUBIC", "VEGAS"}; static_assert( kCcNames.size() == static_cast<std::underlying_type_t<TcpInfo::CongestionControlName>>( TcpInfo::CongestionControlName::NumCcTypes), "kCcNames and folly::TcpInfo::CongestionControlName should have " "the same number of values"); } // namespace using ms = std::chrono::milliseconds; using us = std::chrono::microseconds; TcpInfo::IoctlDispatcher* TcpInfo::IoctlDispatcher::getDefaultInstance() { static TcpInfo::IoctlDispatcher dispatcher = {}; return &dispatcher; } int TcpInfo::IoctlDispatcher::ioctl(int fd, unsigned long request, void* argp) { #if defined(__linux__) return ::ioctl(fd, request, argp); #else return -1; // no cross platform for ioctl operations #endif } Expected<TcpInfo, std::errc> TcpInfo::initFromFd( const NetworkSocket& fd, const TcpInfo::LookupOptions& options, netops::Dispatcher& netopsDispatcher, IoctlDispatcher& ioctlDispatcher) { #ifndef FOLLY_HAVE_TCP_INFO return folly::makeUnexpected(std::errc::invalid_argument); #else if (NetworkSocket() == fd) { return folly::makeUnexpected(std::errc::invalid_argument); } // try to get TCP_INFO TcpInfo info = {}; socklen_t len = sizeof(TcpInfo::tcp_info); auto ret = netopsDispatcher.getsockopt( fd, IPPROTO_TCP, folly::detail::tcp_info_sock_opt, (void*)&info.tcpInfo, &len); if (ret < 0) { int errnoCopy = errno; VLOG(4) << "Error calling getsockopt(): " << folly::errnoStr(errnoCopy); return folly::makeUnexpected(static_cast<std::errc>(errnoCopy)); } info.tcpInfoBytesRead = len; // if enabled, try to get information about the congestion control algo if (options.getCcInfo) { initCcInfoFromFd(fd, info, netopsDispatcher); } // if enabled, try to get memory buffers if (options.getMemInfo) { initMemInfoFromFd(fd, info, ioctlDispatcher); } return info; #endif } /** * * Accessor definitions. * */ Optional<std::chrono::microseconds> TcpInfo::minrtt() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) const auto ptr = getFieldAsPtr(&tcp_info::tcpi_min_rtt); return (ptr) ? us(*CHECK_NOTNULL(ptr)) : folly::Optional<us>(); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<std::chrono::microseconds> TcpInfo::srtt() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) const auto ptr = getFieldAsPtr(&tcp_info::tcpi_rtt); return (ptr) ? us(*CHECK_NOTNULL(ptr)) // __linux__ stores in us : folly::Optional<us>(); #elif defined(__APPLE__) const auto ptr = getFieldAsPtr(&tcp_info::tcpi_srtt); return (ptr) ? us(ms(*CHECK_NOTNULL(ptr))) // __APPLE__ stores in ms : folly::Optional<us>(); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bytesSent() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_bytes_sent); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_txbytes); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bytesReceived() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_bytes_received); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_rxbytes); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bytesRetransmitted() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_bytes_retrans); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_txretransmitbytes); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bytesNotSent() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_notsent_bytes); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bytesAcked() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_bytes_acked); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::packetsSent() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_segs_out); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_txpackets); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::packetsWithDataSent() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_data_segs_out); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::packetsReceived() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_segs_in); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_rxpackets); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::packetsWithDataReceived() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_data_segs_in); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::packetsRetransmitted() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_total_retrans); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_txretransmitpackets); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::packetsInFlight() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) // tcp_packets_in_flight is defined in kernel as: // (tp->packets_out - tcp_left_out(tp) + tp->retrans_out) // // tcp_left_out is defined as: // (tp->sacked_out + tp->lost_out) // // mapping from tcp_info fields to tcp_sock fields: // info->tcpi_unacked = tp->packets_out; // info->tcpi_retrans = tp->retrans_out; // info->tcpi_sacked = tp->sacked_out; // info->tcpi_lost = tp->lost_out; const auto packetsOutOpt = getFieldAsOptUInt64(&tcp_info::tcpi_unacked); const auto retransOutOpt = getFieldAsOptUInt64(&tcp_info::tcpi_retrans); const auto sackedOutOpt = getFieldAsOptUInt64(&tcp_info::tcpi_sacked); const auto lostOutOpt = getFieldAsOptUInt64(&tcp_info::tcpi_lost); if (packetsOutOpt && retransOutOpt && sackedOutOpt && lostOutOpt) { return (*packetsOutOpt - (*sackedOutOpt + *lostOutOpt) + *retransOutOpt); } return folly::none; #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::cwndInPackets() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_snd_cwnd); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_snd_cwnd); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::cwndInBytes() const { const auto cwndInPacketsOpt = cwndInPackets(); const auto mssOpt = mss(); if (cwndInPacketsOpt && mssOpt) { return cwndInPacketsOpt.value() * mssOpt.value(); } return folly::none; } Optional<uint64_t> TcpInfo::ssthresh() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_snd_ssthresh); #elif defined(__APPLE__) return getFieldAsOptUInt64(&tcp_info::tcpi_snd_ssthresh); #else return folly::none; #endif } Optional<uint64_t> TcpInfo::mss() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return tcpInfo.tcpi_snd_mss; #elif defined(__APPLE__) return tcpInfo.tcpi_maxseg; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::deliveryRateBitsPerSecond() const { return bytesPerSecondToBitsPerSecond(deliveryRateBytesPerSecond()); } Optional<uint64_t> TcpInfo::deliveryRateBytesPerSecond() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&tcp_info::tcpi_delivery_rate); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<bool> TcpInfo::deliveryRateAppLimited() const { #ifndef FOLLY_HAVE_TCP_INFO return folly::none; #elif defined(__linux__) // have to check if delivery rate is available for two reasons // (1) can't use getTcpInfoFieldAsPtr on bit-field // (2) tcpi_delivery_rate_app_limited was added in earlier part of tcp_info // to take advantage of 1-byte gap; must check if we have the delivery // rate field to determine if the app limited field is available if (deliveryRateBytesPerSecond().has_value()) { return tcpInfo.tcpi_delivery_rate_app_limited; } return folly::none; #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<std::string> TcpInfo::ccNameRaw() const { #ifndef FOLLY_HAVE_TCP_CC_INFO return folly::none; #elif defined(__linux__) return maybeCcNameRaw; #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<TcpInfo::CongestionControlName> TcpInfo::ccNameEnum() const { #ifndef FOLLY_HAVE_TCP_CC_INFO return folly::none; #elif defined(__linux__) return maybeCcEnum; #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<folly::StringPiece> TcpInfo::ccNameEnumAsStr() const { const auto maybeCcNameEnum = ccNameEnum(); if (!maybeCcNameEnum.has_value()) { return folly::none; } const auto ccEnumAsInt = static_cast<std::underlying_type_t<CongestionControlName>>( maybeCcNameEnum.value()); CHECK_GE( static_cast<std::underlying_type_t<TcpInfo::CongestionControlName>>( TcpInfo::CongestionControlName::NumCcTypes), ccEnumAsInt); CHECK_GE(kCcNames.size(), ccEnumAsInt); return kCcNames[ccEnumAsInt]; } Optional<uint64_t> TcpInfo::bbrBwBitsPerSecond() const { return bytesPerSecondToBitsPerSecond(bbrBwBytesPerSecond()); } Optional<uint64_t> TcpInfo::bbrBwBytesPerSecond() const { #ifndef FOLLY_HAVE_TCP_CC_INFO return folly::none; #elif defined(__linux__) auto bbrBwLoOpt = getFieldAsOptUInt64(&folly::TcpInfo::tcp_bbr_info::bbr_bw_lo); auto bbrBwHiOpt = getFieldAsOptUInt64(&folly::TcpInfo::tcp_bbr_info::bbr_bw_hi); if (bbrBwLoOpt && bbrBwHiOpt) { return ((int64_t)*bbrBwHiOpt << 32) + *bbrBwLoOpt; } return folly::none; #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<std::chrono::microseconds> TcpInfo::bbrMinrtt() const { #ifndef FOLLY_HAVE_TCP_CC_INFO return folly::none; #elif defined(__linux__) auto opt = getFieldAsOptUInt64(&folly::TcpInfo::tcp_bbr_info::bbr_min_rtt); return (opt) ? us(*opt) : folly::Optional<us>(); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bbrPacingGain() const { #ifndef FOLLY_HAVE_TCP_CC_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&folly::TcpInfo::tcp_bbr_info::bbr_pacing_gain); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<uint64_t> TcpInfo::bbrCwndGain() const { #ifndef FOLLY_HAVE_TCP_CC_INFO return folly::none; #elif defined(__linux__) return getFieldAsOptUInt64(&folly::TcpInfo::tcp_bbr_info::bbr_cwnd_gain); #elif defined(__APPLE__) return folly::none; #else return folly::none; #endif } Optional<size_t> TcpInfo::sendBufInUseBytes() const { return maybeSendBufInUseBytes; } Optional<size_t> TcpInfo::recvBufInUseBytes() const { return maybeRecvBufInUseBytes; } void TcpInfo::initCcInfoFromFd( const NetworkSocket& fd, TcpInfo& wrappedInfo, netops::Dispatcher& netopsDispatcher) { #ifndef FOLLY_HAVE_TCP_CC_INFO return; // platform not supported #elif defined(__linux__) if (NetworkSocket() == fd) { return; } // identification strings returned by Linux Kernel for TCP_CONGESTION static constexpr auto kLinuxCcNameStrReno = "reno"; static constexpr auto kLinuxCcNameStrCubic = "cubic"; static constexpr auto kLinuxCcNameStrBic = "bic"; static constexpr auto kLinuxCcNameStrBbr = "bbr"; static constexpr auto kLinuxCcNameStrVegas = "vegas"; static constexpr auto kLinuxCcNameStrDctcp = "dctcp"; static constexpr auto kLinuxCcNameStrDctcpReno = "dctcp_reno"; static constexpr auto kLinuxCcNameStrDctcpCubic = "dctcp_cubic"; std::array<char, (unsigned int)kLinuxTcpCaNameMax> tcpCongestion{{0}}; socklen_t optlen = tcpCongestion.size(); if (netopsDispatcher.getsockopt( fd, IPPROTO_TCP, TCP_CONGESTION, tcpCongestion.data(), &optlen) < 0) { VLOG(4) << "Error calling getsockopt(): " << folly::errnoStr(errno); return; } { auto ccStr = std::string(tcpCongestion.data()); if (ccStr == kLinuxCcNameStrReno) { wrappedInfo.maybeCcEnum = CongestionControlName::RENO; } else if (ccStr == kLinuxCcNameStrCubic) { wrappedInfo.maybeCcEnum = CongestionControlName::CUBIC; } else if (ccStr == kLinuxCcNameStrBic) { wrappedInfo.maybeCcEnum = CongestionControlName::BIC; } else if (ccStr == kLinuxCcNameStrBbr) { wrappedInfo.maybeCcEnum = CongestionControlName::BBR; } else if (ccStr == kLinuxCcNameStrVegas) { wrappedInfo.maybeCcEnum = CongestionControlName::VEGAS; } else if (ccStr == kLinuxCcNameStrDctcp) { wrappedInfo.maybeCcEnum = CongestionControlName::DCTCP; } else if (ccStr == kLinuxCcNameStrDctcpReno) { wrappedInfo.maybeCcEnum = CongestionControlName::DCTCP_RENO; } else if (ccStr == kLinuxCcNameStrDctcpCubic) { wrappedInfo.maybeCcEnum = CongestionControlName::DCTCP_CUBIC; } else { wrappedInfo.maybeCcEnum = CongestionControlName::UNKNOWN; } wrappedInfo.maybeCcNameRaw.emplace(std::move(ccStr)); } // get TCP_CC_INFO if supported for the congestion control algorithm switch (wrappedInfo.maybeCcEnum.value_or(CongestionControlName::UNKNOWN)) { case CongestionControlName::UNKNOWN: case CongestionControlName::RENO: case CongestionControlName::CUBIC: case CongestionControlName::BIC: return; // no TCP_CC_INFO for these congestion controls, exit out case CongestionControlName::BBR: case CongestionControlName::VEGAS: case CongestionControlName::DCTCP: case CongestionControlName::DCTCP_RENO: case CongestionControlName::DCTCP_CUBIC: break; // supported, proceed case CongestionControlName::NumCcTypes: LOG(FATAL) << "CongestionControlName::NumCcTypes is not a valid CC type"; } tcp_cc_info ccInfo = {}; socklen_t len = sizeof(tcp_cc_info); const int ret = netopsDispatcher.getsockopt( fd, IPPROTO_TCP, TCP_CC_INFO, (void*)&ccInfo, &len); if (ret < 0) { int errnoCopy = errno; VLOG(4) << "Error calling getsockopt(): " << folly::errnoStr(errnoCopy); return; } wrappedInfo.maybeCcInfo = ccInfo; wrappedInfo.tcpCcInfoBytesRead = len; #else return; #endif } void TcpInfo::initMemInfoFromFd( const NetworkSocket& fd, TcpInfo& wrappedInfo, IoctlDispatcher& ioctlDispatcher) { #if defined(__linux__) if (NetworkSocket() == fd) { return; } size_t val = 0; if (ioctlDispatcher.ioctl(fd.toFd(), SIOCOUTQ, &val) == 0) { wrappedInfo.maybeSendBufInUseBytes = val; } if (ioctlDispatcher.ioctl(fd.toFd(), SIOCINQ, &val) == 0) { wrappedInfo.maybeRecvBufInUseBytes = val; } #endif } } // namespace folly
28.649153
80
0.734308
Aoikiseki
f31f8ab0fb06f8dc72dfcefe3fe18cc450c766e3
668
cpp
C++
test/pre_reserch/plag_original_codes/05_045_plag.cpp
xryuseix/SA-Plag
167f7a2b2fa81ff00fd5263772a74c2c5c61941d
[ "MIT" ]
13
2021-01-20T19:53:16.000Z
2021-11-14T16:30:32.000Z
test/training_data/plag_original_codes/05_045_plag.cpp
xryuseix/SA-Plag
167f7a2b2fa81ff00fd5263772a74c2c5c61941d
[ "MIT" ]
null
null
null
test/training_data/plag_original_codes/05_045_plag.cpp
xryuseix/SA-Plag
167f7a2b2fa81ff00fd5263772a74c2c5c61941d
[ "MIT" ]
null
null
null
// 引用元 : https://atcoder.jp/contests/abc121/submissions/12412105 // 得点 : 300 // コード長 : 553 // 実行時間 : 77 #include <bits/stdc++.h> using namespace std; using lli = long long int; using ll = long long ; using ld=long double; using d= double; int main() { int n,m; cin>>n>>m; vector<pair<ll,ll>> p(n); for(int i=0;i<n;i++){ cin>>p[i].first>>p[i].second; } sort(p.begin(),p.end()); lli ans=0; for(int i=0;i<n;i++){ if(m>=p[i].second){ ans+=p[i].first*p[i].second; m-=p[i].second; } else if(m<p[i].second){ ans+=m*p[i].first; m=0; } } cout<<ans; return 0; }
18.054054
65
0.505988
xryuseix
f32468a1a872663e2cbb24395756fcc4acba7944
616,154
cpp
C++
tests/cuda2.2/tests/Particles/radixsort_kernel.cu.cpp
florianjacob/gpuocelot
fa63920ee7c5f9a86e264cd8acd4264657cbd190
[ "BSD-3-Clause" ]
221
2015-03-29T02:05:49.000Z
2022-03-25T01:45:36.000Z
tests/cuda2.2/tests/Particles/radixsort_kernel.cu.cpp
mprevot/gpuocelot
d9277ef05a110e941aef77031382d0260ff115ef
[ "BSD-3-Clause" ]
106
2015-03-29T01:28:42.000Z
2022-02-15T19:38:23.000Z
tests/cuda2.2/tests/Particles/radixsort_kernel.cu.cpp
mprevot/gpuocelot
d9277ef05a110e941aef77031382d0260ff115ef
[ "BSD-3-Clause" ]
83
2015-07-10T23:09:57.000Z
2022-03-25T03:01:00.000Z
# 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.cpp" # 1 "<built-in>" # 1 "<command-line>" # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.cpp" # 1 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" # 46 "/usr/local/cuda/bin/../include/device_types.h" # 149 "/usr/lib/gcc/i686-linux-gnu/4.4.5/include/stddef.h" 3 typedef long ptrdiff_t; # 211 "/usr/lib/gcc/i686-linux-gnu/4.4.5/include/stddef.h" 3 typedef unsigned long size_t; # 1 "/usr/local/cuda/bin/../include/crt/host_runtime.h" 1 3 # 69 "/usr/local/cuda/bin/../include/crt/host_runtime.h" 3 # 1 "/usr/local/cuda/bin/../include/builtin_types.h" 1 3 # 42 "/usr/local/cuda/bin/../include/builtin_types.h" 3 # 1 "/usr/local/cuda/bin/../include/device_types.h" 1 3 # 46 "/usr/local/cuda/bin/../include/device_types.h" 3 enum cudaRoundMode { cudaRoundNearest, cudaRoundZero, cudaRoundPosInf, cudaRoundMinInf }; # 43 "/usr/local/cuda/bin/../include/builtin_types.h" 2 3 # 1 "/usr/local/cuda/bin/../include/driver_types.h" 1 3 # 96 "/usr/local/cuda/bin/../include/driver_types.h" 3 enum cudaError { cudaSuccess = 0, cudaErrorMissingConfiguration = 1, cudaErrorMemoryAllocation = 2, cudaErrorInitializationError = 3, # 131 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorLaunchFailure = 4, # 140 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorPriorLaunchFailure = 5, # 150 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorLaunchTimeout = 6, # 159 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorLaunchOutOfResources = 7, cudaErrorInvalidDeviceFunction = 8, # 174 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorInvalidConfiguration = 9, cudaErrorInvalidDevice = 10, cudaErrorInvalidValue = 11, cudaErrorInvalidPitchValue = 12, cudaErrorInvalidSymbol = 13, cudaErrorMapBufferObjectFailed = 14, cudaErrorUnmapBufferObjectFailed = 15, cudaErrorInvalidHostPointer = 16, cudaErrorInvalidDevicePointer = 17, cudaErrorInvalidTexture = 18, cudaErrorInvalidTextureBinding = 19, cudaErrorInvalidChannelDescriptor = 20, cudaErrorInvalidMemcpyDirection = 21, # 255 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorAddressOfConstant = 22, # 264 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorTextureFetchFailed = 23, # 273 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorTextureNotBound = 24, # 282 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorSynchronizationError = 25, cudaErrorInvalidFilterSetting = 26, cudaErrorInvalidNormSetting = 27, cudaErrorMixedDeviceExecution = 28, cudaErrorCudartUnloading = 29, cudaErrorUnknown = 30, cudaErrorNotYetImplemented = 31, # 330 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorMemoryValueTooLarge = 32, cudaErrorInvalidResourceHandle = 33, cudaErrorNotReady = 34, cudaErrorInsufficientDriver = 35, # 365 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorSetOnActiveProcess = 36, cudaErrorInvalidSurface = 37, cudaErrorNoDevice = 38, cudaErrorECCUncorrectable = 39, cudaErrorSharedObjectSymbolNotFound = 40, cudaErrorSharedObjectInitFailed = 41, cudaErrorUnsupportedLimit = 42, cudaErrorDuplicateVariableName = 43, cudaErrorDuplicateTextureName = 44, cudaErrorDuplicateSurfaceName = 45, # 426 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorDevicesUnavailable = 46, cudaErrorInvalidKernelImage = 47, cudaErrorNoKernelImageForDevice = 48, # 448 "/usr/local/cuda/bin/../include/driver_types.h" 3 cudaErrorIncompatibleDriverContext = 49, cudaErrorStartupFailure = 0x7f, cudaErrorApiFailureBase = 10000 }; enum cudaChannelFormatKind { cudaChannelFormatKindSigned = 0, cudaChannelFormatKindUnsigned = 1, cudaChannelFormatKindFloat = 2, cudaChannelFormatKindNone = 3 }; struct cudaChannelFormatDesc { int x; int y; int z; int w; enum cudaChannelFormatKind f; }; struct cudaArray; enum cudaMemcpyKind { cudaMemcpyHostToHost = 0, cudaMemcpyHostToDevice = 1, cudaMemcpyDeviceToHost = 2, cudaMemcpyDeviceToDevice = 3 }; struct cudaPitchedPtr { void *ptr; size_t pitch; size_t xsize; size_t ysize; }; struct cudaExtent { size_t width; size_t height; size_t depth; }; struct cudaPos { size_t x; size_t y; size_t z; }; struct cudaMemcpy3DParms { struct cudaArray *srcArray; struct cudaPos srcPos; struct cudaPitchedPtr srcPtr; struct cudaArray *dstArray; struct cudaPos dstPos; struct cudaPitchedPtr dstPtr; struct cudaExtent extent; enum cudaMemcpyKind kind; }; struct cudaGraphicsResource; enum cudaGraphicsRegisterFlags { cudaGraphicsRegisterFlagsNone = 0 }; enum cudaGraphicsMapFlags { cudaGraphicsMapFlagsNone = 0, cudaGraphicsMapFlagsReadOnly = 1, cudaGraphicsMapFlagsWriteDiscard = 2 }; enum cudaGraphicsCubeFace { cudaGraphicsCubeFacePositiveX = 0x00, cudaGraphicsCubeFaceNegativeX = 0x01, cudaGraphicsCubeFacePositiveY = 0x02, cudaGraphicsCubeFaceNegativeY = 0x03, cudaGraphicsCubeFacePositiveZ = 0x04, cudaGraphicsCubeFaceNegativeZ = 0x05 }; struct cudaFuncAttributes { size_t sharedSizeBytes; size_t constSizeBytes; size_t localSizeBytes; int maxThreadsPerBlock; int numRegs; int ptxVersion; int binaryVersion; int __cudaReserved[6]; }; enum cudaFuncCache { cudaFuncCachePreferNone = 0, cudaFuncCachePreferShared = 1, cudaFuncCachePreferL1 = 2 }; enum cudaComputeMode { cudaComputeModeDefault = 0, cudaComputeModeExclusive = 1, cudaComputeModeProhibited = 2 }; enum cudaLimit { cudaLimitStackSize = 0x00, cudaLimitPrintfFifoSize = 0x01, cudaLimitMallocHeapSize = 0x02 }; struct cudaDeviceProp { char name[256]; size_t totalGlobalMem; size_t sharedMemPerBlock; int regsPerBlock; int warpSize; size_t memPitch; int maxThreadsPerBlock; int maxThreadsDim[3]; int maxGridSize[3]; int clockRate; size_t totalConstMem; int major; int minor; size_t textureAlignment; int deviceOverlap; int multiProcessorCount; int kernelExecTimeoutEnabled; int integrated; int canMapHostMemory; int computeMode; int maxTexture1D; int maxTexture2D[2]; int maxTexture3D[3]; int maxTexture2DArray[3]; size_t surfaceAlignment; int concurrentKernels; int ECCEnabled; int pciBusID; int pciDeviceID; int tccDriver; int __cudaReserved[21]; }; # 768 "/usr/local/cuda/bin/../include/driver_types.h" 3 typedef enum cudaError cudaError_t; typedef struct CUstream_st *cudaStream_t; typedef struct CUevent_st *cudaEvent_t; typedef struct cudaGraphicsResource *cudaGraphicsResource_t; typedef struct CUuuid_st cudaUUID_t; # 44 "/usr/local/cuda/bin/../include/builtin_types.h" 2 3 # 1 "/usr/local/cuda/bin/../include/surface_types.h" 1 3 # 63 "/usr/local/cuda/bin/../include/surface_types.h" 3 enum cudaSurfaceBoundaryMode { cudaBoundaryModeZero = 0, cudaBoundaryModeClamp = 1, cudaBoundaryModeTrap = 2 }; enum cudaSurfaceFormatMode { cudaFormatModeForced = 0, cudaFormatModeAuto = 1 }; struct surfaceReference { struct cudaChannelFormatDesc channelDesc; }; # 45 "/usr/local/cuda/bin/../include/builtin_types.h" 2 3 # 1 "/usr/local/cuda/bin/../include/texture_types.h" 1 3 # 63 "/usr/local/cuda/bin/../include/texture_types.h" 3 enum cudaTextureAddressMode { cudaAddressModeWrap = 0, cudaAddressModeClamp = 1, cudaAddressModeMirror = 2, cudaAddressModeBorder = 3 }; enum cudaTextureFilterMode { cudaFilterModePoint = 0, cudaFilterModeLinear = 1 }; enum cudaTextureReadMode { cudaReadModeElementType = 0, cudaReadModeNormalizedFloat = 1 }; struct textureReference { int normalized; enum cudaTextureFilterMode filterMode; enum cudaTextureAddressMode addressMode[3]; struct cudaChannelFormatDesc channelDesc; int __cudaReserved[16]; }; # 46 "/usr/local/cuda/bin/../include/builtin_types.h" 2 3 # 1 "/usr/local/cuda/bin/../include/vector_types.h" 1 3 # 45 "/usr/local/cuda/bin/../include/vector_types.h" 3 # 1 "/usr/local/cuda/bin/../include/builtin_types.h" 1 3 # 46 "/usr/local/cuda/bin/../include/builtin_types.h" 3 # 1 "/usr/local/cuda/bin/../include/vector_types.h" 1 3 # 46 "/usr/local/cuda/bin/../include/builtin_types.h" 2 3 # 46 "/usr/local/cuda/bin/../include/vector_types.h" 2 3 # 1 "/usr/local/cuda/bin/../include/host_defines.h" 1 3 # 47 "/usr/local/cuda/bin/../include/vector_types.h" 2 3 # 75 "/usr/local/cuda/bin/../include/vector_types.h" 3 struct char1 { signed char x; }; struct uchar1 { unsigned char x; }; struct __attribute__((aligned(2))) char2 { signed char x, y; }; struct __attribute__((aligned(2))) uchar2 { unsigned char x, y; }; struct char3 { signed char x, y, z; }; struct uchar3 { unsigned char x, y, z; }; struct __attribute__((aligned(4))) char4 { signed char x, y, z, w; }; struct __attribute__((aligned(4))) uchar4 { unsigned char x, y, z, w; }; struct short1 { short x; }; struct ushort1 { unsigned short x; }; struct __attribute__((aligned(4))) short2 { short x, y; }; struct __attribute__((aligned(4))) ushort2 { unsigned short x, y; }; struct short3 { short x, y, z; }; struct ushort3 { unsigned short x, y, z; }; struct __attribute__((aligned(8))) short4 { short x; short y; short z; short w; }; struct __attribute__((aligned(8))) ushort4 { unsigned short x; unsigned short y; unsigned short z; unsigned short w; }; struct int1 { int x; }; struct uint1 { unsigned int x; }; struct __attribute__((aligned(8))) int2 { int x; int y; }; struct __attribute__((aligned(8))) uint2 { unsigned int x; unsigned int y; }; struct int3 { int x, y, z; }; struct uint3 { unsigned int x, y, z; }; struct __attribute__((aligned(16))) int4 { int x, y, z, w; }; struct __attribute__((aligned(16))) uint4 { unsigned int x, y, z, w; }; struct long1 { long int x; }; struct ulong1 { unsigned long x; }; # 229 "/usr/local/cuda/bin/../include/vector_types.h" 3 struct __attribute__((aligned(2*sizeof(long int)))) long2 { long int x, y; }; struct __attribute__((aligned(2*sizeof(unsigned long int)))) ulong2 { unsigned long int x, y; }; struct long3 { long int x, y, z; }; struct ulong3 { unsigned long int x, y, z; }; struct __attribute__((aligned(16))) long4 { long int x, y, z, w; }; struct __attribute__((aligned(16))) ulong4 { unsigned long int x, y, z, w; }; struct float1 { float x; }; struct __attribute__((aligned(8))) float2 { float x; float y; }; struct float3 { float x, y, z; }; struct __attribute__((aligned(16))) float4 { float x, y, z, w; }; struct longlong1 { long long int x; }; struct ulonglong1 { unsigned long long int x; }; struct __attribute__((aligned(16))) longlong2 { long long int x, y; }; struct __attribute__((aligned(16))) ulonglong2 { unsigned long long int x, y; }; struct longlong3 { long long int x, y, z; }; struct ulonglong3 { unsigned long long int x, y, z; }; struct __attribute__((aligned(16))) longlong4 { long long int x, y, z ,w; }; struct __attribute__((aligned(16))) ulonglong4 { unsigned long long int x, y, z, w; }; struct double1 { double x; }; struct __attribute__((aligned(16))) double2 { double x, y; }; struct double3 { double x, y, z; }; struct __attribute__((aligned(16))) double4 { double x, y, z, w; }; # 366 "/usr/local/cuda/bin/../include/vector_types.h" 3 typedef struct char1 char1; typedef struct uchar1 uchar1; typedef struct char2 char2; typedef struct uchar2 uchar2; typedef struct char3 char3; typedef struct uchar3 uchar3; typedef struct char4 char4; typedef struct uchar4 uchar4; typedef struct short1 short1; typedef struct ushort1 ushort1; typedef struct short2 short2; typedef struct ushort2 ushort2; typedef struct short3 short3; typedef struct ushort3 ushort3; typedef struct short4 short4; typedef struct ushort4 ushort4; typedef struct int1 int1; typedef struct uint1 uint1; typedef struct int2 int2; typedef struct uint2 uint2; typedef struct int3 int3; typedef struct uint3 uint3; typedef struct int4 int4; typedef struct uint4 uint4; typedef struct long1 long1; typedef struct ulong1 ulong1; typedef struct long2 long2; typedef struct ulong2 ulong2; typedef struct long3 long3; typedef struct ulong3 ulong3; typedef struct long4 long4; typedef struct ulong4 ulong4; typedef struct float1 float1; typedef struct float2 float2; typedef struct float3 float3; typedef struct float4 float4; typedef struct longlong1 longlong1; typedef struct ulonglong1 ulonglong1; typedef struct longlong2 longlong2; typedef struct ulonglong2 ulonglong2; typedef struct longlong3 longlong3; typedef struct ulonglong3 ulonglong3; typedef struct longlong4 longlong4; typedef struct ulonglong4 ulonglong4; typedef struct double1 double1; typedef struct double2 double2; typedef struct double3 double3; typedef struct double4 double4; # 469 "/usr/local/cuda/bin/../include/vector_types.h" 3 struct dim3 { unsigned int x, y, z; dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {} dim3(uint3 v) : x(v.x), y(v.y), z(v.z) {} operator uint3(void) { uint3 t; t.x = x; t.y = y; t.z = z; return t; } }; typedef struct dim3 dim3; # 46 "/usr/local/cuda/bin/../include/builtin_types.h" 2 3 # 70 "/usr/local/cuda/bin/../include/crt/host_runtime.h" 2 3 # 1 "/usr/local/cuda/bin/../include/crt/storage_class.h" 1 3 # 71 "/usr/local/cuda/bin/../include/crt/host_runtime.h" 2 3 # 213 "/usr/lib/gcc/i686-linux-gnu/4.4.5/include/stddef.h" 2 3 # 96 "/usr/local/cuda/bin/../include/driver_types.h" # 466 "/usr/local/cuda/bin/../include/driver_types.h" # 478 "/usr/local/cuda/bin/../include/driver_types.h" # 491 "/usr/local/cuda/bin/../include/driver_types.h" # 497 "/usr/local/cuda/bin/../include/driver_types.h" # 510 "/usr/local/cuda/bin/../include/driver_types.h" # 523 "/usr/local/cuda/bin/../include/driver_types.h" # 535 "/usr/local/cuda/bin/../include/driver_types.h" # 546 "/usr/local/cuda/bin/../include/driver_types.h" # 564 "/usr/local/cuda/bin/../include/driver_types.h" # 570 "/usr/local/cuda/bin/../include/driver_types.h" # 579 "/usr/local/cuda/bin/../include/driver_types.h" # 590 "/usr/local/cuda/bin/../include/driver_types.h" # 603 "/usr/local/cuda/bin/../include/driver_types.h" # 656 "/usr/local/cuda/bin/../include/driver_types.h" # 667 "/usr/local/cuda/bin/../include/driver_types.h" # 678 "/usr/local/cuda/bin/../include/driver_types.h" # 689 "/usr/local/cuda/bin/../include/driver_types.h" # 768 "/usr/local/cuda/bin/../include/driver_types.h" # 774 "/usr/local/cuda/bin/../include/driver_types.h" # 780 "/usr/local/cuda/bin/../include/driver_types.h" # 786 "/usr/local/cuda/bin/../include/driver_types.h" # 792 "/usr/local/cuda/bin/../include/driver_types.h" # 63 "/usr/local/cuda/bin/../include/surface_types.h" # 74 "/usr/local/cuda/bin/../include/surface_types.h" # 84 "/usr/local/cuda/bin/../include/surface_types.h" # 63 "/usr/local/cuda/bin/../include/texture_types.h" # 75 "/usr/local/cuda/bin/../include/texture_types.h" # 85 "/usr/local/cuda/bin/../include/texture_types.h" # 95 "/usr/local/cuda/bin/../include/texture_types.h" # 75 "/usr/local/cuda/bin/../include/vector_types.h" # 81 "/usr/local/cuda/bin/../include/vector_types.h" # 87 "/usr/local/cuda/bin/../include/vector_types.h" # 93 "/usr/local/cuda/bin/../include/vector_types.h" # 99 "/usr/local/cuda/bin/../include/vector_types.h" # 105 "/usr/local/cuda/bin/../include/vector_types.h" # 111 "/usr/local/cuda/bin/../include/vector_types.h" # 117 "/usr/local/cuda/bin/../include/vector_types.h" # 123 "/usr/local/cuda/bin/../include/vector_types.h" # 129 "/usr/local/cuda/bin/../include/vector_types.h" # 135 "/usr/local/cuda/bin/../include/vector_types.h" # 141 "/usr/local/cuda/bin/../include/vector_types.h" # 147 "/usr/local/cuda/bin/../include/vector_types.h" # 153 "/usr/local/cuda/bin/../include/vector_types.h" # 159 "/usr/local/cuda/bin/../include/vector_types.h" # 162 "/usr/local/cuda/bin/../include/vector_types.h" # 165 "/usr/local/cuda/bin/../include/vector_types.h" # 171 "/usr/local/cuda/bin/../include/vector_types.h" # 177 "/usr/local/cuda/bin/../include/vector_types.h" # 180 "/usr/local/cuda/bin/../include/vector_types.h" # 183 "/usr/local/cuda/bin/../include/vector_types.h" # 189 "/usr/local/cuda/bin/../include/vector_types.h" # 195 "/usr/local/cuda/bin/../include/vector_types.h" # 201 "/usr/local/cuda/bin/../include/vector_types.h" # 207 "/usr/local/cuda/bin/../include/vector_types.h" # 213 "/usr/local/cuda/bin/../include/vector_types.h" # 229 "/usr/local/cuda/bin/../include/vector_types.h" # 235 "/usr/local/cuda/bin/../include/vector_types.h" # 243 "/usr/local/cuda/bin/../include/vector_types.h" # 249 "/usr/local/cuda/bin/../include/vector_types.h" # 255 "/usr/local/cuda/bin/../include/vector_types.h" # 261 "/usr/local/cuda/bin/../include/vector_types.h" # 267 "/usr/local/cuda/bin/../include/vector_types.h" # 273 "/usr/local/cuda/bin/../include/vector_types.h" # 276 "/usr/local/cuda/bin/../include/vector_types.h" # 282 "/usr/local/cuda/bin/../include/vector_types.h" # 288 "/usr/local/cuda/bin/../include/vector_types.h" # 294 "/usr/local/cuda/bin/../include/vector_types.h" # 300 "/usr/local/cuda/bin/../include/vector_types.h" # 306 "/usr/local/cuda/bin/../include/vector_types.h" # 312 "/usr/local/cuda/bin/../include/vector_types.h" # 318 "/usr/local/cuda/bin/../include/vector_types.h" # 324 "/usr/local/cuda/bin/../include/vector_types.h" # 330 "/usr/local/cuda/bin/../include/vector_types.h" # 336 "/usr/local/cuda/bin/../include/vector_types.h" # 342 "/usr/local/cuda/bin/../include/vector_types.h" # 348 "/usr/local/cuda/bin/../include/vector_types.h" # 354 "/usr/local/cuda/bin/../include/vector_types.h" # 366 "/usr/local/cuda/bin/../include/vector_types.h" # 368 "/usr/local/cuda/bin/../include/vector_types.h" # 370 "/usr/local/cuda/bin/../include/vector_types.h" # 372 "/usr/local/cuda/bin/../include/vector_types.h" # 374 "/usr/local/cuda/bin/../include/vector_types.h" # 376 "/usr/local/cuda/bin/../include/vector_types.h" # 378 "/usr/local/cuda/bin/../include/vector_types.h" # 380 "/usr/local/cuda/bin/../include/vector_types.h" # 382 "/usr/local/cuda/bin/../include/vector_types.h" # 384 "/usr/local/cuda/bin/../include/vector_types.h" # 386 "/usr/local/cuda/bin/../include/vector_types.h" # 388 "/usr/local/cuda/bin/../include/vector_types.h" # 390 "/usr/local/cuda/bin/../include/vector_types.h" # 392 "/usr/local/cuda/bin/../include/vector_types.h" # 394 "/usr/local/cuda/bin/../include/vector_types.h" # 396 "/usr/local/cuda/bin/../include/vector_types.h" # 398 "/usr/local/cuda/bin/../include/vector_types.h" # 400 "/usr/local/cuda/bin/../include/vector_types.h" # 402 "/usr/local/cuda/bin/../include/vector_types.h" # 404 "/usr/local/cuda/bin/../include/vector_types.h" # 406 "/usr/local/cuda/bin/../include/vector_types.h" # 408 "/usr/local/cuda/bin/../include/vector_types.h" # 410 "/usr/local/cuda/bin/../include/vector_types.h" # 412 "/usr/local/cuda/bin/../include/vector_types.h" # 414 "/usr/local/cuda/bin/../include/vector_types.h" # 416 "/usr/local/cuda/bin/../include/vector_types.h" # 418 "/usr/local/cuda/bin/../include/vector_types.h" # 420 "/usr/local/cuda/bin/../include/vector_types.h" # 422 "/usr/local/cuda/bin/../include/vector_types.h" # 424 "/usr/local/cuda/bin/../include/vector_types.h" # 426 "/usr/local/cuda/bin/../include/vector_types.h" # 428 "/usr/local/cuda/bin/../include/vector_types.h" # 430 "/usr/local/cuda/bin/../include/vector_types.h" # 432 "/usr/local/cuda/bin/../include/vector_types.h" # 434 "/usr/local/cuda/bin/../include/vector_types.h" # 436 "/usr/local/cuda/bin/../include/vector_types.h" # 438 "/usr/local/cuda/bin/../include/vector_types.h" # 440 "/usr/local/cuda/bin/../include/vector_types.h" # 442 "/usr/local/cuda/bin/../include/vector_types.h" # 444 "/usr/local/cuda/bin/../include/vector_types.h" # 446 "/usr/local/cuda/bin/../include/vector_types.h" # 448 "/usr/local/cuda/bin/../include/vector_types.h" # 450 "/usr/local/cuda/bin/../include/vector_types.h" # 452 "/usr/local/cuda/bin/../include/vector_types.h" # 454 "/usr/local/cuda/bin/../include/vector_types.h" # 456 "/usr/local/cuda/bin/../include/vector_types.h" # 458 "/usr/local/cuda/bin/../include/vector_types.h" # 460 "/usr/local/cuda/bin/../include/vector_types.h" # 469 "/usr/local/cuda/bin/../include/vector_types.h" # 480 "/usr/local/cuda/bin/../include/vector_types.h" # 115 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadExit(); # 131 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadSynchronize(); # 183 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadSetLimit(cudaLimit, size_t); # 207 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadGetLimit(size_t *, cudaLimit); # 237 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadGetCacheConfig(cudaFuncCache *); # 278 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaThreadSetCacheConfig(cudaFuncCache); # 330 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetLastError(); # 373 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaPeekAtLastError(); # 387 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" const char *cudaGetErrorString(cudaError_t); # 418 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetDeviceCount(int *); # 536 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetDeviceProperties(cudaDeviceProp *, int); # 555 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaChooseDevice(int *, const cudaDeviceProp *); # 579 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDevice(int); # 597 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetDevice(int *); # 626 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetValidDevices(int *, int); # 677 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDeviceFlags(unsigned); # 703 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamCreate(cudaStream_t *); # 719 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamDestroy(cudaStream_t); # 753 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamWaitEvent(cudaStream_t, cudaEvent_t, unsigned); # 771 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamSynchronize(cudaStream_t); # 789 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaStreamQuery(cudaStream_t); # 821 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventCreate(cudaEvent_t *); # 852 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventCreateWithFlags(cudaEvent_t *, unsigned); # 885 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventRecord(cudaEvent_t, cudaStream_t = 0); # 914 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventQuery(cudaEvent_t); # 946 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventSynchronize(cudaEvent_t); # 966 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventDestroy(cudaEvent_t); # 1007 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaEventElapsedTime(float *, cudaEvent_t, cudaEvent_t); # 1046 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaConfigureCall(dim3, dim3, size_t = (0), cudaStream_t = 0); # 1073 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetupArgument(const void *, size_t, size_t); # 1119 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaFuncSetCacheConfig(const char *, cudaFuncCache); # 1154 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaLaunch(const char *); # 1187 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaFuncGetAttributes(cudaFuncAttributes *, const char *); # 1209 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDoubleForDevice(double *); # 1231 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaSetDoubleForHost(double *); # 1263 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMalloc(void **, size_t); # 1292 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMallocHost(void **, size_t); # 1331 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMallocPitch(void **, size_t *, size_t, size_t); # 1370 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMallocArray(cudaArray **, const cudaChannelFormatDesc *, size_t, size_t = (0), unsigned = (0)); # 1394 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaFree(void *); # 1414 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaFreeHost(void *); # 1436 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaFreeArray(cudaArray *); # 1495 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostAlloc(void **, size_t, unsigned); # 1522 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostGetDevicePointer(void **, void *, unsigned); # 1541 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaHostGetFlags(unsigned *, void *); # 1576 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMalloc3D(cudaPitchedPtr *, cudaExtent); # 1626 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMalloc3DArray(cudaArray **, const cudaChannelFormatDesc *, cudaExtent, unsigned = (0)); # 1723 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms *); # 1828 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms *, cudaStream_t = 0); # 1847 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemGetInfo(size_t *, size_t *); # 1880 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy(void *, const void *, size_t, cudaMemcpyKind); # 1913 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToArray(cudaArray *, size_t, size_t, const void *, size_t, cudaMemcpyKind); # 1946 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromArray(void *, const cudaArray *, size_t, size_t, size_t, cudaMemcpyKind); # 1981 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyArrayToArray(cudaArray *, size_t, size_t, const cudaArray *, size_t, size_t, size_t, cudaMemcpyKind = cudaMemcpyDeviceToDevice); # 2023 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2D(void *, size_t, const void *, size_t, size_t, size_t, cudaMemcpyKind); # 2064 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DToArray(cudaArray *, size_t, size_t, const void *, size_t, size_t, size_t, cudaMemcpyKind); # 2105 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DFromArray(void *, size_t, const cudaArray *, size_t, size_t, size_t, size_t, cudaMemcpyKind); # 2144 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DArrayToArray(cudaArray *, size_t, size_t, const cudaArray *, size_t, size_t, size_t, size_t, cudaMemcpyKind = cudaMemcpyDeviceToDevice); # 2179 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToSymbol(const char *, const void *, size_t, size_t = (0), cudaMemcpyKind = cudaMemcpyHostToDevice); # 2213 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromSymbol(void *, const char *, size_t, size_t = (0), cudaMemcpyKind = cudaMemcpyDeviceToHost); # 2256 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyAsync(void *, const void *, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2298 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToArrayAsync(cudaArray *, size_t, size_t, const void *, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2340 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromArrayAsync(void *, const cudaArray *, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2391 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DAsync(void *, size_t, const void *, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2441 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DToArrayAsync(cudaArray *, size_t, size_t, const void *, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2491 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpy2DFromArrayAsync(void *, size_t, const cudaArray *, size_t, size_t, size_t, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2535 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyToSymbolAsync(const char *, const void *, size_t, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2578 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemcpyFromSymbolAsync(void *, const char *, size_t, size_t, cudaMemcpyKind, cudaStream_t = 0); # 2600 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset(void *, int, size_t); # 2626 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset2D(void *, size_t, int, size_t, size_t); # 2665 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset3D(cudaPitchedPtr, int, cudaExtent); # 2692 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemsetAsync(void *, int, size_t, cudaStream_t = 0); # 2724 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset2DAsync(void *, size_t, int, size_t, size_t, cudaStream_t = 0); # 2769 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaMemset3DAsync(cudaPitchedPtr, int, cudaExtent, cudaStream_t = 0); # 2796 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetSymbolAddress(void **, const char *); # 2819 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetSymbolSize(size_t *, const char *); # 2865 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t); # 2897 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t, unsigned); # 2932 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsMapResources(int, cudaGraphicsResource_t *, cudaStream_t = 0); # 2963 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsUnmapResources(int, cudaGraphicsResource_t *, cudaStream_t = 0); # 2992 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsResourceGetMappedPointer(void **, size_t *, cudaGraphicsResource_t); # 3026 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray **, cudaGraphicsResource_t, unsigned, unsigned); # 3059 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc *, const cudaArray *); # 3094 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaChannelFormatDesc cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind); # 3136 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindTexture(size_t *, const textureReference *, const void *, const cudaChannelFormatDesc *, size_t = (((2147483647) * 2U) + 1U)); # 3179 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindTexture2D(size_t *, const textureReference *, const void *, const cudaChannelFormatDesc *, size_t, size_t, size_t); # 3207 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindTextureToArray(const textureReference *, const cudaArray *, const cudaChannelFormatDesc *); # 3228 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaUnbindTexture(const textureReference *); # 3253 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetTextureAlignmentOffset(size_t *, const textureReference *); # 3277 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetTextureReference(const textureReference **, const char *); # 3310 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaBindSurfaceToArray(const surfaceReference *, const cudaArray *, const cudaChannelFormatDesc *); # 3328 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetSurfaceReference(const surfaceReference **, const char *); # 3355 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaDriverGetVersion(int *); # 3372 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaRuntimeGetVersion(int *); # 3377 "/usr/local/cuda/bin/../include/cuda_runtime_api.h" extern "C" cudaError_t cudaGetExportTable(const void **, const cudaUUID_t *); # 93 "/usr/local/cuda/bin/../include/channel_descriptor.h" template< class T> inline cudaChannelFormatDesc cudaCreateChannelDesc() # 94 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 95 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(0, 0, 0, 0, cudaChannelFormatKindNone); # 96 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 98 "/usr/local/cuda/bin/../include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf() # 99 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 100 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 102 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 103 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 105 "/usr/local/cuda/bin/../include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf1() # 106 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 107 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 109 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 110 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 112 "/usr/local/cuda/bin/../include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf2() # 113 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 114 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 116 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat); # 117 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 119 "/usr/local/cuda/bin/../include/channel_descriptor.h" static inline cudaChannelFormatDesc cudaCreateChannelDescHalf4() # 120 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 121 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 123 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat); # 124 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 126 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char> () # 127 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 128 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(char)) * 8); # 133 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 135 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 137 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< signed char> () # 138 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 139 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 141 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 142 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 144 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< unsigned char> () # 145 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 146 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 148 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 149 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 151 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char1> () # 152 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 153 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 155 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 156 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 158 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uchar1> () # 159 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 160 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 162 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 163 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 165 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char2> () # 166 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 167 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 169 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned); # 170 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 172 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uchar2> () # 173 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 174 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 176 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned); # 177 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 179 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< char4> () # 180 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 181 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(signed char)) * 8); # 183 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned); # 184 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 186 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uchar4> () # 187 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 188 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned char)) * 8); # 190 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned); # 191 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 193 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short> () # 194 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 195 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 197 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 198 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 200 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< unsigned short> () # 201 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 202 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 204 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 205 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 207 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short1> () # 208 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 209 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 211 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 212 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 214 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< ushort1> () # 215 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 216 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 218 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 219 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 221 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short2> () # 222 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 223 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 225 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned); # 226 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 228 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< ushort2> () # 229 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 230 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 232 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned); # 233 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 235 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< short4> () # 236 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 237 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(short)) * 8); # 239 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned); # 240 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 242 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< ushort4> () # 243 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 244 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned short)) * 8); # 246 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned); # 247 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 249 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int> () # 250 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 251 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 253 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 254 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 256 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< unsigned> () # 257 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 258 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 260 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 261 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 263 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int1> () # 264 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 265 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 267 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindSigned); # 268 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 270 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uint1> () # 271 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 272 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 274 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindUnsigned); # 275 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 277 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int2> () # 278 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 279 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 281 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindSigned); # 282 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 284 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uint2> () # 285 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 286 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 288 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindUnsigned); # 289 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 291 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< int4> () # 292 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 293 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(int)) * 8); # 295 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindSigned); # 296 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 298 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< uint4> () # 299 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 300 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(unsigned)) * 8); # 302 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindUnsigned); # 303 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 365 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float> () # 366 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 367 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 369 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 370 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 372 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float1> () # 373 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 374 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 376 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, 0, 0, 0, cudaChannelFormatKindFloat); # 377 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 379 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float2> () # 380 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 381 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 383 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, 0, 0, cudaChannelFormatKindFloat); # 384 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 386 "/usr/local/cuda/bin/../include/channel_descriptor.h" template<> inline cudaChannelFormatDesc cudaCreateChannelDesc< float4> () # 387 "/usr/local/cuda/bin/../include/channel_descriptor.h" { # 388 "/usr/local/cuda/bin/../include/channel_descriptor.h" int e = (((int)sizeof(float)) * 8); # 390 "/usr/local/cuda/bin/../include/channel_descriptor.h" return cudaCreateChannelDesc(e, e, e, e, cudaChannelFormatKindFloat); # 391 "/usr/local/cuda/bin/../include/channel_descriptor.h" } # 65 "/usr/local/cuda/bin/../include/driver_functions.h" static inline cudaPitchedPtr make_cudaPitchedPtr(void *d, size_t p, size_t xsz, size_t ysz) # 66 "/usr/local/cuda/bin/../include/driver_functions.h" { # 67 "/usr/local/cuda/bin/../include/driver_functions.h" cudaPitchedPtr s; # 69 "/usr/local/cuda/bin/../include/driver_functions.h" (s.ptr) = d; # 70 "/usr/local/cuda/bin/../include/driver_functions.h" (s.pitch) = p; # 71 "/usr/local/cuda/bin/../include/driver_functions.h" (s.xsize) = xsz; # 72 "/usr/local/cuda/bin/../include/driver_functions.h" (s.ysize) = ysz; # 74 "/usr/local/cuda/bin/../include/driver_functions.h" return s; # 75 "/usr/local/cuda/bin/../include/driver_functions.h" } # 92 "/usr/local/cuda/bin/../include/driver_functions.h" static inline cudaPos make_cudaPos(size_t x, size_t y, size_t z) # 93 "/usr/local/cuda/bin/../include/driver_functions.h" { # 94 "/usr/local/cuda/bin/../include/driver_functions.h" cudaPos p; # 96 "/usr/local/cuda/bin/../include/driver_functions.h" (p.x) = x; # 97 "/usr/local/cuda/bin/../include/driver_functions.h" (p.y) = y; # 98 "/usr/local/cuda/bin/../include/driver_functions.h" (p.z) = z; # 100 "/usr/local/cuda/bin/../include/driver_functions.h" return p; # 101 "/usr/local/cuda/bin/../include/driver_functions.h" } # 118 "/usr/local/cuda/bin/../include/driver_functions.h" static inline cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) # 119 "/usr/local/cuda/bin/../include/driver_functions.h" { # 120 "/usr/local/cuda/bin/../include/driver_functions.h" cudaExtent e; # 122 "/usr/local/cuda/bin/../include/driver_functions.h" (e.width) = w; # 123 "/usr/local/cuda/bin/../include/driver_functions.h" (e.height) = h; # 124 "/usr/local/cuda/bin/../include/driver_functions.h" (e.depth) = d; # 126 "/usr/local/cuda/bin/../include/driver_functions.h" return e; # 127 "/usr/local/cuda/bin/../include/driver_functions.h" } # 55 "/usr/local/cuda/bin/../include/vector_functions.h" static inline char1 make_char1(signed char x) # 56 "/usr/local/cuda/bin/../include/vector_functions.h" { # 57 "/usr/local/cuda/bin/../include/vector_functions.h" char1 t; (t.x) = x; return t; # 58 "/usr/local/cuda/bin/../include/vector_functions.h" } # 60 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uchar1 make_uchar1(unsigned char x) # 61 "/usr/local/cuda/bin/../include/vector_functions.h" { # 62 "/usr/local/cuda/bin/../include/vector_functions.h" uchar1 t; (t.x) = x; return t; # 63 "/usr/local/cuda/bin/../include/vector_functions.h" } # 65 "/usr/local/cuda/bin/../include/vector_functions.h" static inline char2 make_char2(signed char x, signed char y) # 66 "/usr/local/cuda/bin/../include/vector_functions.h" { # 67 "/usr/local/cuda/bin/../include/vector_functions.h" char2 t; (t.x) = x; (t.y) = y; return t; # 68 "/usr/local/cuda/bin/../include/vector_functions.h" } # 70 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uchar2 make_uchar2(unsigned char x, unsigned char y) # 71 "/usr/local/cuda/bin/../include/vector_functions.h" { # 72 "/usr/local/cuda/bin/../include/vector_functions.h" uchar2 t; (t.x) = x; (t.y) = y; return t; # 73 "/usr/local/cuda/bin/../include/vector_functions.h" } # 75 "/usr/local/cuda/bin/../include/vector_functions.h" static inline char3 make_char3(signed char x, signed char y, signed char z) # 76 "/usr/local/cuda/bin/../include/vector_functions.h" { # 77 "/usr/local/cuda/bin/../include/vector_functions.h" char3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 78 "/usr/local/cuda/bin/../include/vector_functions.h" } # 80 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) # 81 "/usr/local/cuda/bin/../include/vector_functions.h" { # 82 "/usr/local/cuda/bin/../include/vector_functions.h" uchar3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 83 "/usr/local/cuda/bin/../include/vector_functions.h" } # 85 "/usr/local/cuda/bin/../include/vector_functions.h" static inline char4 make_char4(signed char x, signed char y, signed char z, signed char w) # 86 "/usr/local/cuda/bin/../include/vector_functions.h" { # 87 "/usr/local/cuda/bin/../include/vector_functions.h" char4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 88 "/usr/local/cuda/bin/../include/vector_functions.h" } # 90 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) # 91 "/usr/local/cuda/bin/../include/vector_functions.h" { # 92 "/usr/local/cuda/bin/../include/vector_functions.h" uchar4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 93 "/usr/local/cuda/bin/../include/vector_functions.h" } # 95 "/usr/local/cuda/bin/../include/vector_functions.h" static inline short1 make_short1(short x) # 96 "/usr/local/cuda/bin/../include/vector_functions.h" { # 97 "/usr/local/cuda/bin/../include/vector_functions.h" short1 t; (t.x) = x; return t; # 98 "/usr/local/cuda/bin/../include/vector_functions.h" } # 100 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ushort1 make_ushort1(unsigned short x) # 101 "/usr/local/cuda/bin/../include/vector_functions.h" { # 102 "/usr/local/cuda/bin/../include/vector_functions.h" ushort1 t; (t.x) = x; return t; # 103 "/usr/local/cuda/bin/../include/vector_functions.h" } # 105 "/usr/local/cuda/bin/../include/vector_functions.h" static inline short2 make_short2(short x, short y) # 106 "/usr/local/cuda/bin/../include/vector_functions.h" { # 107 "/usr/local/cuda/bin/../include/vector_functions.h" short2 t; (t.x) = x; (t.y) = y; return t; # 108 "/usr/local/cuda/bin/../include/vector_functions.h" } # 110 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ushort2 make_ushort2(unsigned short x, unsigned short y) # 111 "/usr/local/cuda/bin/../include/vector_functions.h" { # 112 "/usr/local/cuda/bin/../include/vector_functions.h" ushort2 t; (t.x) = x; (t.y) = y; return t; # 113 "/usr/local/cuda/bin/../include/vector_functions.h" } # 115 "/usr/local/cuda/bin/../include/vector_functions.h" static inline short3 make_short3(short x, short y, short z) # 116 "/usr/local/cuda/bin/../include/vector_functions.h" { # 117 "/usr/local/cuda/bin/../include/vector_functions.h" short3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 118 "/usr/local/cuda/bin/../include/vector_functions.h" } # 120 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) # 121 "/usr/local/cuda/bin/../include/vector_functions.h" { # 122 "/usr/local/cuda/bin/../include/vector_functions.h" ushort3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 123 "/usr/local/cuda/bin/../include/vector_functions.h" } # 125 "/usr/local/cuda/bin/../include/vector_functions.h" static inline short4 make_short4(short x, short y, short z, short w) # 126 "/usr/local/cuda/bin/../include/vector_functions.h" { # 127 "/usr/local/cuda/bin/../include/vector_functions.h" short4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 128 "/usr/local/cuda/bin/../include/vector_functions.h" } # 130 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) # 131 "/usr/local/cuda/bin/../include/vector_functions.h" { # 132 "/usr/local/cuda/bin/../include/vector_functions.h" ushort4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 133 "/usr/local/cuda/bin/../include/vector_functions.h" } # 135 "/usr/local/cuda/bin/../include/vector_functions.h" static inline int1 make_int1(int x) # 136 "/usr/local/cuda/bin/../include/vector_functions.h" { # 137 "/usr/local/cuda/bin/../include/vector_functions.h" int1 t; (t.x) = x; return t; # 138 "/usr/local/cuda/bin/../include/vector_functions.h" } # 140 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uint1 make_uint1(unsigned x) # 141 "/usr/local/cuda/bin/../include/vector_functions.h" { # 142 "/usr/local/cuda/bin/../include/vector_functions.h" uint1 t; (t.x) = x; return t; # 143 "/usr/local/cuda/bin/../include/vector_functions.h" } # 145 "/usr/local/cuda/bin/../include/vector_functions.h" static inline int2 make_int2(int x, int y) # 146 "/usr/local/cuda/bin/../include/vector_functions.h" { # 147 "/usr/local/cuda/bin/../include/vector_functions.h" int2 t; (t.x) = x; (t.y) = y; return t; # 148 "/usr/local/cuda/bin/../include/vector_functions.h" } # 150 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uint2 make_uint2(unsigned x, unsigned y) # 151 "/usr/local/cuda/bin/../include/vector_functions.h" { # 152 "/usr/local/cuda/bin/../include/vector_functions.h" uint2 t; (t.x) = x; (t.y) = y; return t; # 153 "/usr/local/cuda/bin/../include/vector_functions.h" } # 155 "/usr/local/cuda/bin/../include/vector_functions.h" static inline int3 make_int3(int x, int y, int z) # 156 "/usr/local/cuda/bin/../include/vector_functions.h" { # 157 "/usr/local/cuda/bin/../include/vector_functions.h" int3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 158 "/usr/local/cuda/bin/../include/vector_functions.h" } # 160 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uint3 make_uint3(unsigned x, unsigned y, unsigned z) # 161 "/usr/local/cuda/bin/../include/vector_functions.h" { # 162 "/usr/local/cuda/bin/../include/vector_functions.h" uint3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 163 "/usr/local/cuda/bin/../include/vector_functions.h" } # 165 "/usr/local/cuda/bin/../include/vector_functions.h" static inline int4 make_int4(int x, int y, int z, int w) # 166 "/usr/local/cuda/bin/../include/vector_functions.h" { # 167 "/usr/local/cuda/bin/../include/vector_functions.h" int4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 168 "/usr/local/cuda/bin/../include/vector_functions.h" } # 170 "/usr/local/cuda/bin/../include/vector_functions.h" static inline uint4 make_uint4(unsigned x, unsigned y, unsigned z, unsigned w) # 171 "/usr/local/cuda/bin/../include/vector_functions.h" { # 172 "/usr/local/cuda/bin/../include/vector_functions.h" uint4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 173 "/usr/local/cuda/bin/../include/vector_functions.h" } # 175 "/usr/local/cuda/bin/../include/vector_functions.h" static inline long1 make_long1(long x) # 176 "/usr/local/cuda/bin/../include/vector_functions.h" { # 177 "/usr/local/cuda/bin/../include/vector_functions.h" long1 t; (t.x) = x; return t; # 178 "/usr/local/cuda/bin/../include/vector_functions.h" } # 180 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulong1 make_ulong1(unsigned long x) # 181 "/usr/local/cuda/bin/../include/vector_functions.h" { # 182 "/usr/local/cuda/bin/../include/vector_functions.h" ulong1 t; (t.x) = x; return t; # 183 "/usr/local/cuda/bin/../include/vector_functions.h" } # 185 "/usr/local/cuda/bin/../include/vector_functions.h" static inline long2 make_long2(long x, long y) # 186 "/usr/local/cuda/bin/../include/vector_functions.h" { # 187 "/usr/local/cuda/bin/../include/vector_functions.h" long2 t; (t.x) = x; (t.y) = y; return t; # 188 "/usr/local/cuda/bin/../include/vector_functions.h" } # 190 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulong2 make_ulong2(unsigned long x, unsigned long y) # 191 "/usr/local/cuda/bin/../include/vector_functions.h" { # 192 "/usr/local/cuda/bin/../include/vector_functions.h" ulong2 t; (t.x) = x; (t.y) = y; return t; # 193 "/usr/local/cuda/bin/../include/vector_functions.h" } # 195 "/usr/local/cuda/bin/../include/vector_functions.h" static inline long3 make_long3(long x, long y, long z) # 196 "/usr/local/cuda/bin/../include/vector_functions.h" { # 197 "/usr/local/cuda/bin/../include/vector_functions.h" long3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 198 "/usr/local/cuda/bin/../include/vector_functions.h" } # 200 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulong3 make_ulong3(unsigned long x, unsigned long y, unsigned long z) # 201 "/usr/local/cuda/bin/../include/vector_functions.h" { # 202 "/usr/local/cuda/bin/../include/vector_functions.h" ulong3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 203 "/usr/local/cuda/bin/../include/vector_functions.h" } # 205 "/usr/local/cuda/bin/../include/vector_functions.h" static inline long4 make_long4(long x, long y, long z, long w) # 206 "/usr/local/cuda/bin/../include/vector_functions.h" { # 207 "/usr/local/cuda/bin/../include/vector_functions.h" long4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 208 "/usr/local/cuda/bin/../include/vector_functions.h" } # 210 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulong4 make_ulong4(unsigned long x, unsigned long y, unsigned long z, unsigned long w) # 211 "/usr/local/cuda/bin/../include/vector_functions.h" { # 212 "/usr/local/cuda/bin/../include/vector_functions.h" ulong4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 213 "/usr/local/cuda/bin/../include/vector_functions.h" } # 215 "/usr/local/cuda/bin/../include/vector_functions.h" static inline float1 make_float1(float x) # 216 "/usr/local/cuda/bin/../include/vector_functions.h" { # 217 "/usr/local/cuda/bin/../include/vector_functions.h" float1 t; (t.x) = x; return t; # 218 "/usr/local/cuda/bin/../include/vector_functions.h" } # 220 "/usr/local/cuda/bin/../include/vector_functions.h" static inline float2 make_float2(float x, float y) # 221 "/usr/local/cuda/bin/../include/vector_functions.h" { # 222 "/usr/local/cuda/bin/../include/vector_functions.h" float2 t; (t.x) = x; (t.y) = y; return t; # 223 "/usr/local/cuda/bin/../include/vector_functions.h" } # 225 "/usr/local/cuda/bin/../include/vector_functions.h" static inline float3 make_float3(float x, float y, float z) # 226 "/usr/local/cuda/bin/../include/vector_functions.h" { # 227 "/usr/local/cuda/bin/../include/vector_functions.h" float3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 228 "/usr/local/cuda/bin/../include/vector_functions.h" } # 230 "/usr/local/cuda/bin/../include/vector_functions.h" static inline float4 make_float4(float x, float y, float z, float w) # 231 "/usr/local/cuda/bin/../include/vector_functions.h" { # 232 "/usr/local/cuda/bin/../include/vector_functions.h" float4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 233 "/usr/local/cuda/bin/../include/vector_functions.h" } # 235 "/usr/local/cuda/bin/../include/vector_functions.h" static inline longlong1 make_longlong1(long long x) # 236 "/usr/local/cuda/bin/../include/vector_functions.h" { # 237 "/usr/local/cuda/bin/../include/vector_functions.h" longlong1 t; (t.x) = x; return t; # 238 "/usr/local/cuda/bin/../include/vector_functions.h" } # 240 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulonglong1 make_ulonglong1(unsigned long long x) # 241 "/usr/local/cuda/bin/../include/vector_functions.h" { # 242 "/usr/local/cuda/bin/../include/vector_functions.h" ulonglong1 t; (t.x) = x; return t; # 243 "/usr/local/cuda/bin/../include/vector_functions.h" } # 245 "/usr/local/cuda/bin/../include/vector_functions.h" static inline longlong2 make_longlong2(long long x, long long y) # 246 "/usr/local/cuda/bin/../include/vector_functions.h" { # 247 "/usr/local/cuda/bin/../include/vector_functions.h" longlong2 t; (t.x) = x; (t.y) = y; return t; # 248 "/usr/local/cuda/bin/../include/vector_functions.h" } # 250 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulonglong2 make_ulonglong2(unsigned long long x, unsigned long long y) # 251 "/usr/local/cuda/bin/../include/vector_functions.h" { # 252 "/usr/local/cuda/bin/../include/vector_functions.h" ulonglong2 t; (t.x) = x; (t.y) = y; return t; # 253 "/usr/local/cuda/bin/../include/vector_functions.h" } # 255 "/usr/local/cuda/bin/../include/vector_functions.h" static inline longlong3 make_longlong3(long long x, long long y, long long z) # 256 "/usr/local/cuda/bin/../include/vector_functions.h" { # 257 "/usr/local/cuda/bin/../include/vector_functions.h" longlong3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 258 "/usr/local/cuda/bin/../include/vector_functions.h" } # 260 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulonglong3 make_ulonglong3(unsigned long long x, unsigned long long y, unsigned long long z) # 261 "/usr/local/cuda/bin/../include/vector_functions.h" { # 262 "/usr/local/cuda/bin/../include/vector_functions.h" ulonglong3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 263 "/usr/local/cuda/bin/../include/vector_functions.h" } # 265 "/usr/local/cuda/bin/../include/vector_functions.h" static inline longlong4 make_longlong4(long long x, long long y, long long z, long long w) # 266 "/usr/local/cuda/bin/../include/vector_functions.h" { # 267 "/usr/local/cuda/bin/../include/vector_functions.h" longlong4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 268 "/usr/local/cuda/bin/../include/vector_functions.h" } # 270 "/usr/local/cuda/bin/../include/vector_functions.h" static inline ulonglong4 make_ulonglong4(unsigned long long x, unsigned long long y, unsigned long long z, unsigned long long w) # 271 "/usr/local/cuda/bin/../include/vector_functions.h" { # 272 "/usr/local/cuda/bin/../include/vector_functions.h" ulonglong4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 273 "/usr/local/cuda/bin/../include/vector_functions.h" } # 275 "/usr/local/cuda/bin/../include/vector_functions.h" static inline double1 make_double1(double x) # 276 "/usr/local/cuda/bin/../include/vector_functions.h" { # 277 "/usr/local/cuda/bin/../include/vector_functions.h" double1 t; (t.x) = x; return t; # 278 "/usr/local/cuda/bin/../include/vector_functions.h" } # 280 "/usr/local/cuda/bin/../include/vector_functions.h" static inline double2 make_double2(double x, double y) # 281 "/usr/local/cuda/bin/../include/vector_functions.h" { # 282 "/usr/local/cuda/bin/../include/vector_functions.h" double2 t; (t.x) = x; (t.y) = y; return t; # 283 "/usr/local/cuda/bin/../include/vector_functions.h" } # 285 "/usr/local/cuda/bin/../include/vector_functions.h" static inline double3 make_double3(double x, double y, double z) # 286 "/usr/local/cuda/bin/../include/vector_functions.h" { # 287 "/usr/local/cuda/bin/../include/vector_functions.h" double3 t; (t.x) = x; (t.y) = y; (t.z) = z; return t; # 288 "/usr/local/cuda/bin/../include/vector_functions.h" } # 290 "/usr/local/cuda/bin/../include/vector_functions.h" static inline double4 make_double4(double x, double y, double z, double w) # 291 "/usr/local/cuda/bin/../include/vector_functions.h" { # 292 "/usr/local/cuda/bin/../include/vector_functions.h" double4 t; (t.x) = x; (t.y) = y; (t.z) = z; (t.w) = w; return t; # 293 "/usr/local/cuda/bin/../include/vector_functions.h" } # 44 "/usr/include/string.h" 3 extern "C" __attribute__((weak)) void *memcpy(void *__restrict__, const void *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 49 "/usr/include/string.h" 3 extern "C" void *memmove(void *, const void *, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 57 "/usr/include/string.h" 3 extern "C" void *memccpy(void *__restrict__, const void *__restrict__, int, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 65 "/usr/include/string.h" 3 extern "C" __attribute__((weak)) void *memset(void *, int, size_t) throw() __attribute__((nonnull(1))); # 68 "/usr/include/string.h" 3 extern "C" int memcmp(const void *, const void *, size_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 75 "/usr/include/string.h" 3 extern void *memchr(void *, int, size_t) throw() __asm__("memchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 77 "/usr/include/string.h" 3 extern const void *memchr(const void *, int, size_t) throw() __asm__("memchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 104 "/usr/include/string.h" 3 void *rawmemchr(void *, int) throw() __asm__("rawmemchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 106 "/usr/include/string.h" 3 const void *rawmemchr(const void *, int) throw() __asm__("rawmemchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 115 "/usr/include/string.h" 3 void *memrchr(void *, int, size_t) throw() __asm__("memrchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 117 "/usr/include/string.h" 3 const void *memrchr(const void *, int, size_t) throw() __asm__("memrchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 128 "/usr/include/string.h" 3 extern "C" char *strcpy(char *__restrict__, const char *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 131 "/usr/include/string.h" 3 extern "C" char *strncpy(char *__restrict__, const char *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 136 "/usr/include/string.h" 3 extern "C" char *strcat(char *__restrict__, const char *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 139 "/usr/include/string.h" 3 extern "C" char *strncat(char *__restrict__, const char *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 143 "/usr/include/string.h" 3 extern "C" int strcmp(const char *, const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 146 "/usr/include/string.h" 3 extern "C" int strncmp(const char *, const char *, size_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 150 "/usr/include/string.h" 3 extern "C" int strcoll(const char *, const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 153 "/usr/include/string.h" 3 extern "C" size_t strxfrm(char *__restrict__, const char *__restrict__, size_t) throw() __attribute__((nonnull(2))); # 40 "/usr/include/xlocale.h" 3 extern "C" { typedef # 28 "/usr/include/xlocale.h" 3 struct __locale_struct { # 31 "/usr/include/xlocale.h" 3 struct __locale_data *__locales[13]; # 34 "/usr/include/xlocale.h" 3 const unsigned short *__ctype_b; # 35 "/usr/include/xlocale.h" 3 const int *__ctype_tolower; # 36 "/usr/include/xlocale.h" 3 const int *__ctype_toupper; # 39 "/usr/include/xlocale.h" 3 const char *__names[13]; # 40 "/usr/include/xlocale.h" 3 } *__locale_t; } # 43 "/usr/include/xlocale.h" 3 extern "C" { typedef __locale_t locale_t; } # 165 "/usr/include/string.h" 3 extern "C" int strcoll_l(const char *, const char *, __locale_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))) __attribute__((nonnull(3))); # 168 "/usr/include/string.h" 3 extern "C" size_t strxfrm_l(char *, const char *, size_t, __locale_t) throw() __attribute__((nonnull(2))) __attribute__((nonnull(4))); # 175 "/usr/include/string.h" 3 extern "C" char *strdup(const char *) throw() __attribute__((__malloc__)) __attribute__((nonnull(1))); # 183 "/usr/include/string.h" 3 extern "C" char *strndup(const char *, size_t) throw() __attribute__((__malloc__)) __attribute__((nonnull(1))); # 215 "/usr/include/string.h" 3 extern char *strchr(char *, int) throw() __asm__("strchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 217 "/usr/include/string.h" 3 extern const char *strchr(const char *, int) throw() __asm__("strchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 242 "/usr/include/string.h" 3 extern char *strrchr(char *, int) throw() __asm__("strrchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 244 "/usr/include/string.h" 3 extern const char *strrchr(const char *, int) throw() __asm__("strrchr") __attribute__((__pure__)) __attribute__((nonnull(1))); # 271 "/usr/include/string.h" 3 char *strchrnul(char *, int) throw() __asm__("strchrnul") __attribute__((__pure__)) __attribute__((nonnull(1))); # 273 "/usr/include/string.h" 3 const char *strchrnul(const char *, int) throw() __asm__("strchrnul") __attribute__((__pure__)) __attribute__((nonnull(1))); # 284 "/usr/include/string.h" 3 extern "C" size_t strcspn(const char *, const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 288 "/usr/include/string.h" 3 extern "C" size_t strspn(const char *, const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 294 "/usr/include/string.h" 3 extern char *strpbrk(char *, const char *) throw() __asm__("strpbrk") __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 296 "/usr/include/string.h" 3 extern const char *strpbrk(const char *, const char *) throw() __asm__("strpbrk") __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 321 "/usr/include/string.h" 3 extern char *strstr(char *, const char *) throw() __asm__("strstr") __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 323 "/usr/include/string.h" 3 extern const char *strstr(const char *, const char *) throw() __asm__("strstr") __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 348 "/usr/include/string.h" 3 extern "C" char *strtok(char *__restrict__, const char *__restrict__) throw() __attribute__((nonnull(2))); # 354 "/usr/include/string.h" 3 extern "C" char *__strtok_r(char *__restrict__, const char *__restrict__, char **__restrict__) throw() __attribute__((nonnull(2))) __attribute__((nonnull(3))); # 359 "/usr/include/string.h" 3 extern "C" char *strtok_r(char *__restrict__, const char *__restrict__, char **__restrict__) throw() __attribute__((nonnull(2))) __attribute__((nonnull(3))); # 367 "/usr/include/string.h" 3 char *strcasestr(char *, const char *) throw() __asm__("strcasestr") __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 369 "/usr/include/string.h" 3 const char *strcasestr(const char *, const char *) throw() __asm__("strcasestr") __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 382 "/usr/include/string.h" 3 extern "C" void *memmem(const void *, size_t, const void *, size_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(3))); # 388 "/usr/include/string.h" 3 extern "C" void *__mempcpy(void *__restrict__, const void *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 391 "/usr/include/string.h" 3 extern "C" void *mempcpy(void *__restrict__, const void *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 399 "/usr/include/string.h" 3 extern "C" size_t strlen(const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 406 "/usr/include/string.h" 3 extern "C" size_t strnlen(const char *, size_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 413 "/usr/include/string.h" 3 extern "C" char *strerror(int) throw(); # 438 "/usr/include/string.h" 3 extern "C" char *strerror_r(int, char *, size_t) throw() __attribute__((nonnull(2))); # 445 "/usr/include/string.h" 3 extern "C" char *strerror_l(int, __locale_t) throw(); # 451 "/usr/include/string.h" 3 extern "C" void __bzero(void *, size_t) throw() __attribute__((nonnull(1))); # 455 "/usr/include/string.h" 3 extern "C" void bcopy(const void *, void *, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 459 "/usr/include/string.h" 3 extern "C" void bzero(void *, size_t) throw() __attribute__((nonnull(1))); # 462 "/usr/include/string.h" 3 extern "C" int bcmp(const void *, const void *, size_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 469 "/usr/include/string.h" 3 extern char *index(char *, int) throw() __asm__("index") __attribute__((__pure__)) __attribute__((nonnull(1))); # 471 "/usr/include/string.h" 3 extern const char *index(const char *, int) throw() __asm__("index") __attribute__((__pure__)) __attribute__((nonnull(1))); # 497 "/usr/include/string.h" 3 extern char *rindex(char *, int) throw() __asm__("rindex") __attribute__((__pure__)) __attribute__((nonnull(1))); # 499 "/usr/include/string.h" 3 extern const char *rindex(const char *, int) throw() __asm__("rindex") __attribute__((__pure__)) __attribute__((nonnull(1))); # 523 "/usr/include/string.h" 3 extern "C" int ffs(int) throw() __attribute__((__const__)); # 528 "/usr/include/string.h" 3 extern "C" int ffsl(long) throw() __attribute__((__const__)); # 530 "/usr/include/string.h" 3 extern "C" int ffsll(long long) throw() __attribute__((__const__)); # 536 "/usr/include/string.h" 3 extern "C" int strcasecmp(const char *, const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 540 "/usr/include/string.h" 3 extern "C" int strncasecmp(const char *, const char *, size_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 547 "/usr/include/string.h" 3 extern "C" int strcasecmp_l(const char *, const char *, __locale_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))) __attribute__((nonnull(3))); # 551 "/usr/include/string.h" 3 extern "C" int strncasecmp_l(const char *, const char *, size_t, __locale_t) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))) __attribute__((nonnull(4))); # 559 "/usr/include/string.h" 3 extern "C" char *strsep(char **__restrict__, const char *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 566 "/usr/include/string.h" 3 extern "C" char *strsignal(int) throw(); # 569 "/usr/include/string.h" 3 extern "C" char *__stpcpy(char *__restrict__, const char *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 571 "/usr/include/string.h" 3 extern "C" char *stpcpy(char *__restrict__, const char *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 576 "/usr/include/string.h" 3 extern "C" char *__stpncpy(char *__restrict__, const char *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 579 "/usr/include/string.h" 3 extern "C" char *stpncpy(char *__restrict__, const char *__restrict__, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 586 "/usr/include/string.h" 3 extern "C" int strverscmp(const char *, const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 590 "/usr/include/string.h" 3 extern "C" char *strfry(char *) throw() __attribute__((nonnull(1))); # 593 "/usr/include/string.h" 3 extern "C" void *memfrob(void *, size_t) throw() __attribute__((nonnull(1))); # 601 "/usr/include/string.h" 3 char *basename(char *) throw() __asm__("basename") __attribute__((nonnull(1))); # 603 "/usr/include/string.h" 3 const char *basename(const char *) throw() __asm__("basename") __attribute__((nonnull(1))); # 31 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned char __u_char; } # 32 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned short __u_short; } # 33 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __u_int; } # 34 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __u_long; } # 37 "/usr/include/bits/types.h" 3 extern "C" { typedef signed char __int8_t; } # 38 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned char __uint8_t; } # 39 "/usr/include/bits/types.h" 3 extern "C" { typedef signed short __int16_t; } # 40 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned short __uint16_t; } # 41 "/usr/include/bits/types.h" 3 extern "C" { typedef signed int __int32_t; } # 42 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __uint32_t; } # 44 "/usr/include/bits/types.h" 3 extern "C" { typedef signed long __int64_t; } # 45 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __uint64_t; } # 53 "/usr/include/bits/types.h" 3 extern "C" { typedef long __quad_t; } # 54 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __u_quad_t; } # 134 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __dev_t; } # 135 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __uid_t; } # 136 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __gid_t; } # 137 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __ino_t; } # 138 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __ino64_t; } # 139 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __mode_t; } # 140 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __nlink_t; } # 141 "/usr/include/bits/types.h" 3 extern "C" { typedef long __off_t; } # 142 "/usr/include/bits/types.h" 3 extern "C" { typedef long __off64_t; } # 143 "/usr/include/bits/types.h" 3 extern "C" { typedef int __pid_t; } # 144 "/usr/include/bits/types.h" 3 extern "C" { typedef struct { int __val[2]; } __fsid_t; } # 145 "/usr/include/bits/types.h" 3 extern "C" { typedef long __clock_t; } # 146 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __rlim_t; } # 147 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __rlim64_t; } # 148 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __id_t; } # 149 "/usr/include/bits/types.h" 3 extern "C" { typedef long __time_t; } # 150 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __useconds_t; } # 151 "/usr/include/bits/types.h" 3 extern "C" { typedef long __suseconds_t; } # 153 "/usr/include/bits/types.h" 3 extern "C" { typedef int __daddr_t; } # 154 "/usr/include/bits/types.h" 3 extern "C" { typedef long __swblk_t; } # 155 "/usr/include/bits/types.h" 3 extern "C" { typedef int __key_t; } # 158 "/usr/include/bits/types.h" 3 extern "C" { typedef int __clockid_t; } # 161 "/usr/include/bits/types.h" 3 extern "C" { typedef void *__timer_t; } # 164 "/usr/include/bits/types.h" 3 extern "C" { typedef long __blksize_t; } # 169 "/usr/include/bits/types.h" 3 extern "C" { typedef long __blkcnt_t; } # 170 "/usr/include/bits/types.h" 3 extern "C" { typedef long __blkcnt64_t; } # 173 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsblkcnt_t; } # 174 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsblkcnt64_t; } # 177 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsfilcnt_t; } # 178 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned long __fsfilcnt64_t; } # 180 "/usr/include/bits/types.h" 3 extern "C" { typedef long __ssize_t; } # 184 "/usr/include/bits/types.h" 3 extern "C" { typedef __off64_t __loff_t; } # 185 "/usr/include/bits/types.h" 3 extern "C" { typedef __quad_t *__qaddr_t; } # 186 "/usr/include/bits/types.h" 3 extern "C" { typedef char *__caddr_t; } # 189 "/usr/include/bits/types.h" 3 extern "C" { typedef long __intptr_t; } # 192 "/usr/include/bits/types.h" 3 extern "C" { typedef unsigned __socklen_t; } # 60 "/usr/include/time.h" 3 extern "C" { typedef __clock_t clock_t; } # 76 "/usr/include/time.h" 3 extern "C" { typedef __time_t time_t; } # 92 "/usr/include/time.h" 3 extern "C" { typedef __clockid_t clockid_t; } # 104 "/usr/include/time.h" 3 extern "C" { typedef __timer_t timer_t; } # 120 "/usr/include/time.h" 3 extern "C" { struct timespec { # 122 "/usr/include/time.h" 3 __time_t tv_sec; # 123 "/usr/include/time.h" 3 long tv_nsec; # 124 "/usr/include/time.h" 3 }; } # 133 "/usr/include/time.h" 3 extern "C" { struct tm { # 135 "/usr/include/time.h" 3 int tm_sec; # 136 "/usr/include/time.h" 3 int tm_min; # 137 "/usr/include/time.h" 3 int tm_hour; # 138 "/usr/include/time.h" 3 int tm_mday; # 139 "/usr/include/time.h" 3 int tm_mon; # 140 "/usr/include/time.h" 3 int tm_year; # 141 "/usr/include/time.h" 3 int tm_wday; # 142 "/usr/include/time.h" 3 int tm_yday; # 143 "/usr/include/time.h" 3 int tm_isdst; # 146 "/usr/include/time.h" 3 long tm_gmtoff; # 147 "/usr/include/time.h" 3 const char *tm_zone; # 152 "/usr/include/time.h" 3 }; } # 161 "/usr/include/time.h" 3 extern "C" { struct itimerspec { # 163 "/usr/include/time.h" 3 timespec it_interval; # 164 "/usr/include/time.h" 3 timespec it_value; # 165 "/usr/include/time.h" 3 }; } # 168 "/usr/include/time.h" 3 struct sigevent; # 174 "/usr/include/time.h" 3 extern "C" { typedef __pid_t pid_t; } # 183 "/usr/include/time.h" 3 extern "C" __attribute__((weak)) clock_t clock() throw(); # 186 "/usr/include/time.h" 3 extern "C" time_t time(time_t *) throw(); # 189 "/usr/include/time.h" 3 extern "C" double difftime(time_t, time_t) throw() __attribute__((__const__)); # 193 "/usr/include/time.h" 3 extern "C" time_t mktime(tm *) throw(); # 199 "/usr/include/time.h" 3 extern "C" size_t strftime(char *__restrict__, size_t, const char *__restrict__, const tm *__restrict__) throw(); # 207 "/usr/include/time.h" 3 extern "C" char *strptime(const char *__restrict__, const char *__restrict__, tm *) throw(); # 217 "/usr/include/time.h" 3 extern "C" size_t strftime_l(char *__restrict__, size_t, const char *__restrict__, const tm *__restrict__, __locale_t) throw(); # 224 "/usr/include/time.h" 3 extern "C" char *strptime_l(const char *__restrict__, const char *__restrict__, tm *, __locale_t) throw(); # 233 "/usr/include/time.h" 3 extern "C" tm *gmtime(const time_t *) throw(); # 237 "/usr/include/time.h" 3 extern "C" tm *localtime(const time_t *) throw(); # 243 "/usr/include/time.h" 3 extern "C" tm *gmtime_r(const time_t *__restrict__, tm *__restrict__) throw(); # 248 "/usr/include/time.h" 3 extern "C" tm *localtime_r(const time_t *__restrict__, tm *__restrict__) throw(); # 255 "/usr/include/time.h" 3 extern "C" char *asctime(const tm *) throw(); # 258 "/usr/include/time.h" 3 extern "C" char *ctime(const time_t *) throw(); # 266 "/usr/include/time.h" 3 extern "C" char *asctime_r(const tm *__restrict__, char *__restrict__) throw(); # 270 "/usr/include/time.h" 3 extern "C" char *ctime_r(const time_t *__restrict__, char *__restrict__) throw(); # 276 "/usr/include/time.h" 3 extern "C" { extern char *__tzname[2]; } # 277 "/usr/include/time.h" 3 extern "C" { extern int __daylight; } # 278 "/usr/include/time.h" 3 extern "C" { extern long __timezone; } # 283 "/usr/include/time.h" 3 extern "C" { extern char *tzname[2]; } # 287 "/usr/include/time.h" 3 extern "C" void tzset() throw(); # 291 "/usr/include/time.h" 3 extern "C" { extern int daylight; } # 292 "/usr/include/time.h" 3 extern "C" { extern long timezone; } # 298 "/usr/include/time.h" 3 extern "C" int stime(const time_t *) throw(); # 313 "/usr/include/time.h" 3 extern "C" time_t timegm(tm *) throw(); # 316 "/usr/include/time.h" 3 extern "C" time_t timelocal(tm *) throw(); # 319 "/usr/include/time.h" 3 extern "C" int dysize(int) throw() __attribute__((__const__)); # 328 "/usr/include/time.h" 3 extern "C" int nanosleep(const timespec *, timespec *); # 333 "/usr/include/time.h" 3 extern "C" int clock_getres(clockid_t, timespec *) throw(); # 336 "/usr/include/time.h" 3 extern "C" int clock_gettime(clockid_t, timespec *) throw(); # 339 "/usr/include/time.h" 3 extern "C" int clock_settime(clockid_t, const timespec *) throw(); # 347 "/usr/include/time.h" 3 extern "C" int clock_nanosleep(clockid_t, int, const timespec *, timespec *); # 352 "/usr/include/time.h" 3 extern "C" int clock_getcpuclockid(pid_t, clockid_t *) throw(); # 357 "/usr/include/time.h" 3 extern "C" int timer_create(clockid_t, sigevent *__restrict__, timer_t *__restrict__) throw(); # 362 "/usr/include/time.h" 3 extern "C" int timer_delete(timer_t) throw(); # 365 "/usr/include/time.h" 3 extern "C" int timer_settime(timer_t, int, const itimerspec *__restrict__, itimerspec *__restrict__) throw(); # 370 "/usr/include/time.h" 3 extern "C" int timer_gettime(timer_t, itimerspec *) throw(); # 374 "/usr/include/time.h" 3 extern "C" int timer_getoverrun(timer_t) throw(); # 390 "/usr/include/time.h" 3 extern "C" { extern int getdate_err; } # 399 "/usr/include/time.h" 3 extern "C" tm *getdate(const char *); # 413 "/usr/include/time.h" 3 extern "C" int getdate_r(const char *__restrict__, tm *__restrict__); # 57 "/usr/local/cuda/bin/../include/common_functions.h" extern "C" __attribute__((weak)) clock_t clock() throw(); # 59 "/usr/local/cuda/bin/../include/common_functions.h" extern "C" __attribute__((weak)) void *memset(void *, int, size_t) throw() __attribute__((nonnull(1))); # 61 "/usr/local/cuda/bin/../include/common_functions.h" extern "C" __attribute__((weak)) void *memcpy(void *, const void *, size_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 66 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int abs(int) throw() __attribute__((__const__)); # 68 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long labs(long) throw() __attribute__((__const__)); # 70 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llabs(long long) throw() __attribute__((__const__)); # 72 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double fabs(double) throw() __attribute__((__const__)); # 74 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float fabsf(float) throw() __attribute__((__const__)); # 77 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int min(int, int); # 79 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) unsigned umin(unsigned, unsigned); # 81 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llmin(long long, long long); # 83 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) unsigned long long ullmin(unsigned long long, unsigned long long); # 85 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float fminf(float, float) throw(); # 87 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double fmin(double, double) throw(); # 90 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int max(int, int); # 92 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) unsigned umax(unsigned, unsigned); # 94 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llmax(long long, long long); # 96 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) unsigned long long ullmax(unsigned long long, unsigned long long); # 98 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float fmaxf(float, float) throw(); # 100 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double fmax(double, double) throw(); # 103 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double sin(double) throw(); # 105 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float sinf(float) throw(); # 108 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double cos(double) throw(); # 110 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float cosf(float) throw(); # 113 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) void sincos(double, double *, double *) throw(); # 115 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) void sincosf(float, float *, float *) throw(); # 118 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double tan(double) throw(); # 120 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float tanf(float) throw(); # 123 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double sqrt(double) throw(); # 125 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float sqrtf(float) throw(); # 128 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double rsqrt(double); # 130 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float rsqrtf(float); # 133 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double exp2(double) throw(); # 135 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float exp2f(float) throw(); # 138 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double exp10(double) throw(); # 140 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float exp10f(float) throw(); # 143 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double expm1(double) throw(); # 145 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float expm1f(float) throw(); # 148 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double log2(double) throw(); # 150 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float log2f(float) throw(); # 153 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double log10(double) throw(); # 155 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float log10f(float) throw(); # 158 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double log(double) throw(); # 160 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float logf(float) throw(); # 163 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double log1p(double) throw(); # 165 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float log1pf(float) throw(); # 168 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double floor(double) throw() __attribute__((__const__)); # 170 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float floorf(float) throw() __attribute__((__const__)); # 173 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double exp(double) throw(); # 175 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float expf(float) throw(); # 178 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double cosh(double) throw(); # 180 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float coshf(float) throw(); # 183 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double sinh(double) throw(); # 185 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float sinhf(float) throw(); # 188 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double tanh(double) throw(); # 190 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float tanhf(float) throw(); # 193 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double acosh(double) throw(); # 195 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float acoshf(float) throw(); # 198 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double asinh(double) throw(); # 200 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float asinhf(float) throw(); # 203 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double atanh(double) throw(); # 205 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float atanhf(float) throw(); # 208 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double ldexp(double, int) throw(); # 210 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float ldexpf(float, int) throw(); # 213 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double logb(double) throw(); # 215 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float logbf(float) throw(); # 218 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int ilogb(double) throw(); # 220 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int ilogbf(float) throw(); # 223 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double scalbn(double, int) throw(); # 225 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float scalbnf(float, int) throw(); # 228 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double scalbln(double, long) throw(); # 230 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float scalblnf(float, long) throw(); # 233 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double frexp(double, int *) throw(); # 235 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float frexpf(float, int *) throw(); # 238 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double round(double) throw() __attribute__((__const__)); # 240 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float roundf(float) throw() __attribute__((__const__)); # 243 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long lround(double) throw(); # 245 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long lroundf(float) throw(); # 248 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llround(double) throw(); # 250 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llroundf(float) throw(); # 253 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double rint(double) throw(); # 255 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float rintf(float) throw(); # 258 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long lrint(double) throw(); # 260 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long lrintf(float) throw(); # 263 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llrint(double) throw(); # 265 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) long long llrintf(float) throw(); # 268 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double nearbyint(double) throw(); # 270 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float nearbyintf(float) throw(); # 273 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double ceil(double) throw() __attribute__((__const__)); # 275 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float ceilf(float) throw() __attribute__((__const__)); # 278 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double trunc(double) throw() __attribute__((__const__)); # 280 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float truncf(float) throw() __attribute__((__const__)); # 283 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double fdim(double, double) throw(); # 285 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float fdimf(float, float) throw(); # 288 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double atan2(double, double) throw(); # 290 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float atan2f(float, float) throw(); # 293 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double atan(double) throw(); # 295 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float atanf(float) throw(); # 298 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double asin(double) throw(); # 300 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float asinf(float) throw(); # 303 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double acos(double) throw(); # 305 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float acosf(float) throw(); # 308 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double hypot(double, double) throw(); # 310 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float hypotf(float, float) throw(); # 313 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double cbrt(double) throw(); # 315 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float cbrtf(float) throw(); # 318 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double rcbrt(double); # 320 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float rcbrtf(float); # 323 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double sinpi(double); # 325 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float sinpif(float); # 328 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double pow(double, double) throw(); # 330 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float powf(float, float) throw(); # 333 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double modf(double, double *) throw(); # 335 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float modff(float, float *) throw(); # 338 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double fmod(double, double) throw(); # 340 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float fmodf(float, float) throw(); # 343 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double remainder(double, double) throw(); # 345 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float remainderf(float, float) throw(); # 348 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double remquo(double, double, int *) throw(); # 350 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float remquof(float, float, int *) throw(); # 353 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double erf(double) throw(); # 355 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float erff(float) throw(); # 358 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double erfinv(double); # 360 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float erfinvf(float); # 363 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double erfc(double) throw(); # 365 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float erfcf(float) throw(); # 368 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double erfcinv(double); # 370 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float erfcinvf(float); # 373 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double lgamma(double) throw(); # 375 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float lgammaf(float) throw(); # 378 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double tgamma(double) throw(); # 380 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float tgammaf(float) throw(); # 383 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double copysign(double, double) throw() __attribute__((__const__)); # 385 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float copysignf(float, float) throw() __attribute__((__const__)); # 388 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double nextafter(double, double) throw() __attribute__((__const__)); # 390 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float nextafterf(float, float) throw() __attribute__((__const__)); # 393 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double nan(const char *) throw() __attribute__((__const__)); # 395 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float nanf(const char *) throw() __attribute__((__const__)); # 398 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __isinf(double) throw() __attribute__((__const__)); # 400 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __isinff(float) throw() __attribute__((__const__)); # 403 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __isnan(double) throw() __attribute__((__const__)); # 405 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __isnanf(float) throw() __attribute__((__const__)); # 419 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __finite(double) throw() __attribute__((__const__)); # 421 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __finitef(float) throw() __attribute__((__const__)); # 423 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __signbit(double) throw() __attribute__((__const__)); # 428 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __signbitf(float) throw() __attribute__((__const__)); # 431 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) double fma(double, double, double) throw(); # 433 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) float fmaf(float, float, float) throw(); # 441 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __signbitl(long double) throw() __attribute__((__const__)); # 443 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __isinfl(long double) throw() __attribute__((__const__)); # 445 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __isnanl(long double) throw() __attribute__((__const__)); # 455 "/usr/local/cuda/bin/../include/math_functions.h" extern "C" __attribute__((weak)) int __finitel(long double) throw() __attribute__((__const__)); # 31 "/usr/include/bits/mathdef.h" 3 extern "C" { typedef float float_t; } # 32 "/usr/include/bits/mathdef.h" 3 extern "C" { typedef double double_t; } # 55 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double acos(double) throw(); extern "C" double __acos(double) throw(); # 57 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double asin(double) throw(); extern "C" double __asin(double) throw(); # 59 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double atan(double) throw(); extern "C" double __atan(double) throw(); # 61 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double atan2(double, double) throw(); extern "C" double __atan2(double, double) throw(); # 64 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double cos(double) throw(); extern "C" double __cos(double) throw(); # 66 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double sin(double) throw(); extern "C" double __sin(double) throw(); # 68 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double tan(double) throw(); extern "C" double __tan(double) throw(); # 73 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double cosh(double) throw(); extern "C" double __cosh(double) throw(); # 75 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double sinh(double) throw(); extern "C" double __sinh(double) throw(); # 77 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double tanh(double) throw(); extern "C" double __tanh(double) throw(); # 82 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) void sincos(double, double *, double *) throw(); extern "C" void __sincos(double, double *, double *) throw(); # 89 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double acosh(double) throw(); extern "C" double __acosh(double) throw(); # 91 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double asinh(double) throw(); extern "C" double __asinh(double) throw(); # 93 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double atanh(double) throw(); extern "C" double __atanh(double) throw(); # 101 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double exp(double) throw(); extern "C" double __exp(double) throw(); # 104 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double frexp(double, int *) throw(); extern "C" double __frexp(double, int *) throw(); # 107 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double ldexp(double, int) throw(); extern "C" double __ldexp(double, int) throw(); # 110 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double log(double) throw(); extern "C" double __log(double) throw(); # 113 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double log10(double) throw(); extern "C" double __log10(double) throw(); # 116 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double modf(double, double *) throw(); extern "C" double __modf(double, double *) throw(); # 121 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double exp10(double) throw(); extern "C" double __exp10(double) throw(); # 123 "/usr/include/bits/mathcalls.h" 3 extern "C" double pow10(double) throw(); extern "C" double __pow10(double) throw(); # 129 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double expm1(double) throw(); extern "C" double __expm1(double) throw(); # 132 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double log1p(double) throw(); extern "C" double __log1p(double) throw(); # 135 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double logb(double) throw(); extern "C" double __logb(double) throw(); # 142 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double exp2(double) throw(); extern "C" double __exp2(double) throw(); # 145 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double log2(double) throw(); extern "C" double __log2(double) throw(); # 154 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double pow(double, double) throw(); extern "C" double __pow(double, double) throw(); # 157 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double sqrt(double) throw(); extern "C" double __sqrt(double) throw(); # 163 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double hypot(double, double) throw(); extern "C" double __hypot(double, double) throw(); # 170 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double cbrt(double) throw(); extern "C" double __cbrt(double) throw(); # 179 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double ceil(double) throw() __attribute__((__const__)); extern "C" double __ceil(double) throw() __attribute__((__const__)); # 182 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double fabs(double) throw() __attribute__((__const__)); extern "C" double __fabs(double) throw() __attribute__((__const__)); # 185 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double floor(double) throw() __attribute__((__const__)); extern "C" double __floor(double) throw() __attribute__((__const__)); # 188 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double fmod(double, double) throw(); extern "C" double __fmod(double, double) throw(); # 193 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __isinf(double) throw() __attribute__((__const__)); # 196 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __finite(double) throw() __attribute__((__const__)); # 202 "/usr/include/bits/mathcalls.h" 3 extern "C" int isinf(double) throw() __attribute__((__const__)); # 205 "/usr/include/bits/mathcalls.h" 3 extern "C" int finite(double) throw() __attribute__((__const__)); # 208 "/usr/include/bits/mathcalls.h" 3 extern "C" double drem(double, double) throw(); extern "C" double __drem(double, double) throw(); # 212 "/usr/include/bits/mathcalls.h" 3 extern "C" double significand(double) throw(); extern "C" double __significand(double) throw(); # 218 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double copysign(double, double) throw() __attribute__((__const__)); extern "C" double __copysign(double, double) throw() __attribute__((__const__)); # 225 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double nan(const char *) throw() __attribute__((__const__)); extern "C" double __nan(const char *) throw() __attribute__((__const__)); # 231 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __isnan(double) throw() __attribute__((__const__)); # 235 "/usr/include/bits/mathcalls.h" 3 extern "C" int isnan(double) throw() __attribute__((__const__)); # 238 "/usr/include/bits/mathcalls.h" 3 extern "C" double j0(double) throw(); extern "C" double __j0(double) throw(); # 239 "/usr/include/bits/mathcalls.h" 3 extern "C" double j1(double) throw(); extern "C" double __j1(double) throw(); # 240 "/usr/include/bits/mathcalls.h" 3 extern "C" double jn(int, double) throw(); extern "C" double __jn(int, double) throw(); # 241 "/usr/include/bits/mathcalls.h" 3 extern "C" double y0(double) throw(); extern "C" double __y0(double) throw(); # 242 "/usr/include/bits/mathcalls.h" 3 extern "C" double y1(double) throw(); extern "C" double __y1(double) throw(); # 243 "/usr/include/bits/mathcalls.h" 3 extern "C" double yn(int, double) throw(); extern "C" double __yn(int, double) throw(); # 250 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double erf(double) throw(); extern "C" double __erf(double) throw(); # 251 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double erfc(double) throw(); extern "C" double __erfc(double) throw(); # 252 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double lgamma(double) throw(); extern "C" double __lgamma(double) throw(); # 259 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double tgamma(double) throw(); extern "C" double __tgamma(double) throw(); # 265 "/usr/include/bits/mathcalls.h" 3 extern "C" double gamma(double) throw(); extern "C" double __gamma(double) throw(); # 272 "/usr/include/bits/mathcalls.h" 3 extern "C" double lgamma_r(double, int *) throw(); extern "C" double __lgamma_r(double, int *) throw(); # 280 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double rint(double) throw(); extern "C" double __rint(double) throw(); # 283 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double nextafter(double, double) throw() __attribute__((__const__)); extern "C" double __nextafter(double, double) throw() __attribute__((__const__)); # 285 "/usr/include/bits/mathcalls.h" 3 extern "C" double nexttoward(double, long double) throw() __attribute__((__const__)); extern "C" double __nexttoward(double, long double) throw() __attribute__((__const__)); # 289 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double remainder(double, double) throw(); extern "C" double __remainder(double, double) throw(); # 293 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double scalbn(double, int) throw(); extern "C" double __scalbn(double, int) throw(); # 297 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int ilogb(double) throw(); extern "C" int __ilogb(double) throw(); # 302 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double scalbln(double, long) throw(); extern "C" double __scalbln(double, long) throw(); # 306 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double nearbyint(double) throw(); extern "C" double __nearbyint(double) throw(); # 310 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double round(double) throw() __attribute__((__const__)); extern "C" double __round(double) throw() __attribute__((__const__)); # 314 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double trunc(double) throw() __attribute__((__const__)); extern "C" double __trunc(double) throw() __attribute__((__const__)); # 319 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double remquo(double, double, int *) throw(); extern "C" double __remquo(double, double, int *) throw(); # 326 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long lrint(double) throw(); extern "C" long __lrint(double) throw(); # 327 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long long llrint(double) throw(); extern "C" long long __llrint(double) throw(); # 331 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long lround(double) throw(); extern "C" long __lround(double) throw(); # 332 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long long llround(double) throw(); extern "C" long long __llround(double) throw(); # 336 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double fdim(double, double) throw(); extern "C" double __fdim(double, double) throw(); # 339 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double fmax(double, double) throw(); extern "C" double __fmax(double, double) throw(); # 342 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double fmin(double, double) throw(); extern "C" double __fmin(double, double) throw(); # 346 "/usr/include/bits/mathcalls.h" 3 extern "C" int __fpclassify(double) throw() __attribute__((__const__)); # 350 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __signbit(double) throw() __attribute__((__const__)); # 355 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) double fma(double, double, double) throw(); extern "C" double __fma(double, double, double) throw(); # 364 "/usr/include/bits/mathcalls.h" 3 extern "C" double scalb(double, double) throw(); extern "C" double __scalb(double, double) throw(); # 55 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float acosf(float) throw(); extern "C" float __acosf(float) throw(); # 57 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float asinf(float) throw(); extern "C" float __asinf(float) throw(); # 59 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float atanf(float) throw(); extern "C" float __atanf(float) throw(); # 61 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float atan2f(float, float) throw(); extern "C" float __atan2f(float, float) throw(); # 64 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float cosf(float) throw(); # 66 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float sinf(float) throw(); # 68 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float tanf(float) throw(); # 73 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float coshf(float) throw(); extern "C" float __coshf(float) throw(); # 75 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float sinhf(float) throw(); extern "C" float __sinhf(float) throw(); # 77 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float tanhf(float) throw(); extern "C" float __tanhf(float) throw(); # 82 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) void sincosf(float, float *, float *) throw(); # 89 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float acoshf(float) throw(); extern "C" float __acoshf(float) throw(); # 91 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float asinhf(float) throw(); extern "C" float __asinhf(float) throw(); # 93 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float atanhf(float) throw(); extern "C" float __atanhf(float) throw(); # 101 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float expf(float) throw(); # 104 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float frexpf(float, int *) throw(); extern "C" float __frexpf(float, int *) throw(); # 107 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float ldexpf(float, int) throw(); extern "C" float __ldexpf(float, int) throw(); # 110 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float logf(float) throw(); # 113 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float log10f(float) throw(); # 116 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float modff(float, float *) throw(); extern "C" float __modff(float, float *) throw(); # 121 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float exp10f(float) throw(); # 123 "/usr/include/bits/mathcalls.h" 3 extern "C" float pow10f(float) throw(); extern "C" float __pow10f(float) throw(); # 129 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float expm1f(float) throw(); extern "C" float __expm1f(float) throw(); # 132 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float log1pf(float) throw(); extern "C" float __log1pf(float) throw(); # 135 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float logbf(float) throw(); extern "C" float __logbf(float) throw(); # 142 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float exp2f(float) throw(); extern "C" float __exp2f(float) throw(); # 145 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float log2f(float) throw(); # 154 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float powf(float, float) throw(); # 157 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float sqrtf(float) throw(); extern "C" float __sqrtf(float) throw(); # 163 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float hypotf(float, float) throw(); extern "C" float __hypotf(float, float) throw(); # 170 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float cbrtf(float) throw(); extern "C" float __cbrtf(float) throw(); # 179 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float ceilf(float) throw() __attribute__((__const__)); extern "C" float __ceilf(float) throw() __attribute__((__const__)); # 182 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float fabsf(float) throw() __attribute__((__const__)); extern "C" float __fabsf(float) throw() __attribute__((__const__)); # 185 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float floorf(float) throw() __attribute__((__const__)); extern "C" float __floorf(float) throw() __attribute__((__const__)); # 188 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float fmodf(float, float) throw(); extern "C" float __fmodf(float, float) throw(); # 193 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __isinff(float) throw() __attribute__((__const__)); # 196 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __finitef(float) throw() __attribute__((__const__)); # 202 "/usr/include/bits/mathcalls.h" 3 extern "C" int isinff(float) throw() __attribute__((__const__)); # 205 "/usr/include/bits/mathcalls.h" 3 extern "C" int finitef(float) throw() __attribute__((__const__)); # 208 "/usr/include/bits/mathcalls.h" 3 extern "C" float dremf(float, float) throw(); extern "C" float __dremf(float, float) throw(); # 212 "/usr/include/bits/mathcalls.h" 3 extern "C" float significandf(float) throw(); extern "C" float __significandf(float) throw(); # 218 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float copysignf(float, float) throw() __attribute__((__const__)); extern "C" float __copysignf(float, float) throw() __attribute__((__const__)); # 225 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float nanf(const char *) throw() __attribute__((__const__)); extern "C" float __nanf(const char *) throw() __attribute__((__const__)); # 231 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __isnanf(float) throw() __attribute__((__const__)); # 235 "/usr/include/bits/mathcalls.h" 3 extern "C" int isnanf(float) throw() __attribute__((__const__)); # 238 "/usr/include/bits/mathcalls.h" 3 extern "C" float j0f(float) throw(); extern "C" float __j0f(float) throw(); # 239 "/usr/include/bits/mathcalls.h" 3 extern "C" float j1f(float) throw(); extern "C" float __j1f(float) throw(); # 240 "/usr/include/bits/mathcalls.h" 3 extern "C" float jnf(int, float) throw(); extern "C" float __jnf(int, float) throw(); # 241 "/usr/include/bits/mathcalls.h" 3 extern "C" float y0f(float) throw(); extern "C" float __y0f(float) throw(); # 242 "/usr/include/bits/mathcalls.h" 3 extern "C" float y1f(float) throw(); extern "C" float __y1f(float) throw(); # 243 "/usr/include/bits/mathcalls.h" 3 extern "C" float ynf(int, float) throw(); extern "C" float __ynf(int, float) throw(); # 250 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float erff(float) throw(); extern "C" float __erff(float) throw(); # 251 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float erfcf(float) throw(); extern "C" float __erfcf(float) throw(); # 252 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float lgammaf(float) throw(); extern "C" float __lgammaf(float) throw(); # 259 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float tgammaf(float) throw(); extern "C" float __tgammaf(float) throw(); # 265 "/usr/include/bits/mathcalls.h" 3 extern "C" float gammaf(float) throw(); extern "C" float __gammaf(float) throw(); # 272 "/usr/include/bits/mathcalls.h" 3 extern "C" float lgammaf_r(float, int *) throw(); extern "C" float __lgammaf_r(float, int *) throw(); # 280 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float rintf(float) throw(); extern "C" float __rintf(float) throw(); # 283 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float nextafterf(float, float) throw() __attribute__((__const__)); extern "C" float __nextafterf(float, float) throw() __attribute__((__const__)); # 285 "/usr/include/bits/mathcalls.h" 3 extern "C" float nexttowardf(float, long double) throw() __attribute__((__const__)); extern "C" float __nexttowardf(float, long double) throw() __attribute__((__const__)); # 289 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float remainderf(float, float) throw(); extern "C" float __remainderf(float, float) throw(); # 293 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float scalbnf(float, int) throw(); extern "C" float __scalbnf(float, int) throw(); # 297 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int ilogbf(float) throw(); extern "C" int __ilogbf(float) throw(); # 302 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float scalblnf(float, long) throw(); extern "C" float __scalblnf(float, long) throw(); # 306 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float nearbyintf(float) throw(); extern "C" float __nearbyintf(float) throw(); # 310 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float roundf(float) throw() __attribute__((__const__)); extern "C" float __roundf(float) throw() __attribute__((__const__)); # 314 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float truncf(float) throw() __attribute__((__const__)); extern "C" float __truncf(float) throw() __attribute__((__const__)); # 319 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float remquof(float, float, int *) throw(); extern "C" float __remquof(float, float, int *) throw(); # 326 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long lrintf(float) throw(); extern "C" long __lrintf(float) throw(); # 327 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long long llrintf(float) throw(); extern "C" long long __llrintf(float) throw(); # 331 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long lroundf(float) throw(); extern "C" long __lroundf(float) throw(); # 332 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) long long llroundf(float) throw(); extern "C" long long __llroundf(float) throw(); # 336 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float fdimf(float, float) throw(); extern "C" float __fdimf(float, float) throw(); # 339 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float fmaxf(float, float) throw(); extern "C" float __fmaxf(float, float) throw(); # 342 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float fminf(float, float) throw(); extern "C" float __fminf(float, float) throw(); # 346 "/usr/include/bits/mathcalls.h" 3 extern "C" int __fpclassifyf(float) throw() __attribute__((__const__)); # 350 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __signbitf(float) throw() __attribute__((__const__)); # 355 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) float fmaf(float, float, float) throw(); extern "C" float __fmaf(float, float, float) throw(); # 364 "/usr/include/bits/mathcalls.h" 3 extern "C" float scalbf(float, float) throw(); extern "C" float __scalbf(float, float) throw(); # 55 "/usr/include/bits/mathcalls.h" 3 extern "C" long double acosl(long double) throw(); extern "C" long double __acosl(long double) throw(); # 57 "/usr/include/bits/mathcalls.h" 3 extern "C" long double asinl(long double) throw(); extern "C" long double __asinl(long double) throw(); # 59 "/usr/include/bits/mathcalls.h" 3 extern "C" long double atanl(long double) throw(); extern "C" long double __atanl(long double) throw(); # 61 "/usr/include/bits/mathcalls.h" 3 extern "C" long double atan2l(long double, long double) throw(); extern "C" long double __atan2l(long double, long double) throw(); # 64 "/usr/include/bits/mathcalls.h" 3 extern "C" long double cosl(long double) throw(); extern "C" long double __cosl(long double) throw(); # 66 "/usr/include/bits/mathcalls.h" 3 extern "C" long double sinl(long double) throw(); extern "C" long double __sinl(long double) throw(); # 68 "/usr/include/bits/mathcalls.h" 3 extern "C" long double tanl(long double) throw(); extern "C" long double __tanl(long double) throw(); # 73 "/usr/include/bits/mathcalls.h" 3 extern "C" long double coshl(long double) throw(); extern "C" long double __coshl(long double) throw(); # 75 "/usr/include/bits/mathcalls.h" 3 extern "C" long double sinhl(long double) throw(); extern "C" long double __sinhl(long double) throw(); # 77 "/usr/include/bits/mathcalls.h" 3 extern "C" long double tanhl(long double) throw(); extern "C" long double __tanhl(long double) throw(); # 82 "/usr/include/bits/mathcalls.h" 3 extern "C" void sincosl(long double, long double *, long double *) throw(); extern "C" void __sincosl(long double, long double *, long double *) throw(); # 89 "/usr/include/bits/mathcalls.h" 3 extern "C" long double acoshl(long double) throw(); extern "C" long double __acoshl(long double) throw(); # 91 "/usr/include/bits/mathcalls.h" 3 extern "C" long double asinhl(long double) throw(); extern "C" long double __asinhl(long double) throw(); # 93 "/usr/include/bits/mathcalls.h" 3 extern "C" long double atanhl(long double) throw(); extern "C" long double __atanhl(long double) throw(); # 101 "/usr/include/bits/mathcalls.h" 3 extern "C" long double expl(long double) throw(); extern "C" long double __expl(long double) throw(); # 104 "/usr/include/bits/mathcalls.h" 3 extern "C" long double frexpl(long double, int *) throw(); extern "C" long double __frexpl(long double, int *) throw(); # 107 "/usr/include/bits/mathcalls.h" 3 extern "C" long double ldexpl(long double, int) throw(); extern "C" long double __ldexpl(long double, int) throw(); # 110 "/usr/include/bits/mathcalls.h" 3 extern "C" long double logl(long double) throw(); extern "C" long double __logl(long double) throw(); # 113 "/usr/include/bits/mathcalls.h" 3 extern "C" long double log10l(long double) throw(); extern "C" long double __log10l(long double) throw(); # 116 "/usr/include/bits/mathcalls.h" 3 extern "C" long double modfl(long double, long double *) throw(); extern "C" long double __modfl(long double, long double *) throw(); # 121 "/usr/include/bits/mathcalls.h" 3 extern "C" long double exp10l(long double) throw(); extern "C" long double __exp10l(long double) throw(); # 123 "/usr/include/bits/mathcalls.h" 3 extern "C" long double pow10l(long double) throw(); extern "C" long double __pow10l(long double) throw(); # 129 "/usr/include/bits/mathcalls.h" 3 extern "C" long double expm1l(long double) throw(); extern "C" long double __expm1l(long double) throw(); # 132 "/usr/include/bits/mathcalls.h" 3 extern "C" long double log1pl(long double) throw(); extern "C" long double __log1pl(long double) throw(); # 135 "/usr/include/bits/mathcalls.h" 3 extern "C" long double logbl(long double) throw(); extern "C" long double __logbl(long double) throw(); # 142 "/usr/include/bits/mathcalls.h" 3 extern "C" long double exp2l(long double) throw(); extern "C" long double __exp2l(long double) throw(); # 145 "/usr/include/bits/mathcalls.h" 3 extern "C" long double log2l(long double) throw(); extern "C" long double __log2l(long double) throw(); # 154 "/usr/include/bits/mathcalls.h" 3 extern "C" long double powl(long double, long double) throw(); extern "C" long double __powl(long double, long double) throw(); # 157 "/usr/include/bits/mathcalls.h" 3 extern "C" long double sqrtl(long double) throw(); extern "C" long double __sqrtl(long double) throw(); # 163 "/usr/include/bits/mathcalls.h" 3 extern "C" long double hypotl(long double, long double) throw(); extern "C" long double __hypotl(long double, long double) throw(); # 170 "/usr/include/bits/mathcalls.h" 3 extern "C" long double cbrtl(long double) throw(); extern "C" long double __cbrtl(long double) throw(); # 179 "/usr/include/bits/mathcalls.h" 3 extern "C" long double ceill(long double) throw() __attribute__((__const__)); extern "C" long double __ceill(long double) throw() __attribute__((__const__)); # 182 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fabsl(long double) throw() __attribute__((__const__)); extern "C" long double __fabsl(long double) throw() __attribute__((__const__)); # 185 "/usr/include/bits/mathcalls.h" 3 extern "C" long double floorl(long double) throw() __attribute__((__const__)); extern "C" long double __floorl(long double) throw() __attribute__((__const__)); # 188 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fmodl(long double, long double) throw(); extern "C" long double __fmodl(long double, long double) throw(); # 193 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __isinfl(long double) throw() __attribute__((__const__)); # 196 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __finitel(long double) throw() __attribute__((__const__)); # 202 "/usr/include/bits/mathcalls.h" 3 extern "C" int isinfl(long double) throw() __attribute__((__const__)); # 205 "/usr/include/bits/mathcalls.h" 3 extern "C" int finitel(long double) throw() __attribute__((__const__)); # 208 "/usr/include/bits/mathcalls.h" 3 extern "C" long double dreml(long double, long double) throw(); extern "C" long double __dreml(long double, long double) throw(); # 212 "/usr/include/bits/mathcalls.h" 3 extern "C" long double significandl(long double) throw(); extern "C" long double __significandl(long double) throw(); # 218 "/usr/include/bits/mathcalls.h" 3 extern "C" long double copysignl(long double, long double) throw() __attribute__((__const__)); extern "C" long double __copysignl(long double, long double) throw() __attribute__((__const__)); # 225 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nanl(const char *) throw() __attribute__((__const__)); extern "C" long double __nanl(const char *) throw() __attribute__((__const__)); # 231 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __isnanl(long double) throw() __attribute__((__const__)); # 235 "/usr/include/bits/mathcalls.h" 3 extern "C" int isnanl(long double) throw() __attribute__((__const__)); # 238 "/usr/include/bits/mathcalls.h" 3 extern "C" long double j0l(long double) throw(); extern "C" long double __j0l(long double) throw(); # 239 "/usr/include/bits/mathcalls.h" 3 extern "C" long double j1l(long double) throw(); extern "C" long double __j1l(long double) throw(); # 240 "/usr/include/bits/mathcalls.h" 3 extern "C" long double jnl(int, long double) throw(); extern "C" long double __jnl(int, long double) throw(); # 241 "/usr/include/bits/mathcalls.h" 3 extern "C" long double y0l(long double) throw(); extern "C" long double __y0l(long double) throw(); # 242 "/usr/include/bits/mathcalls.h" 3 extern "C" long double y1l(long double) throw(); extern "C" long double __y1l(long double) throw(); # 243 "/usr/include/bits/mathcalls.h" 3 extern "C" long double ynl(int, long double) throw(); extern "C" long double __ynl(int, long double) throw(); # 250 "/usr/include/bits/mathcalls.h" 3 extern "C" long double erfl(long double) throw(); extern "C" long double __erfl(long double) throw(); # 251 "/usr/include/bits/mathcalls.h" 3 extern "C" long double erfcl(long double) throw(); extern "C" long double __erfcl(long double) throw(); # 252 "/usr/include/bits/mathcalls.h" 3 extern "C" long double lgammal(long double) throw(); extern "C" long double __lgammal(long double) throw(); # 259 "/usr/include/bits/mathcalls.h" 3 extern "C" long double tgammal(long double) throw(); extern "C" long double __tgammal(long double) throw(); # 265 "/usr/include/bits/mathcalls.h" 3 extern "C" long double gammal(long double) throw(); extern "C" long double __gammal(long double) throw(); # 272 "/usr/include/bits/mathcalls.h" 3 extern "C" long double lgammal_r(long double, int *) throw(); extern "C" long double __lgammal_r(long double, int *) throw(); # 280 "/usr/include/bits/mathcalls.h" 3 extern "C" long double rintl(long double) throw(); extern "C" long double __rintl(long double) throw(); # 283 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nextafterl(long double, long double) throw() __attribute__((__const__)); extern "C" long double __nextafterl(long double, long double) throw() __attribute__((__const__)); # 285 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nexttowardl(long double, long double) throw() __attribute__((__const__)); extern "C" long double __nexttowardl(long double, long double) throw() __attribute__((__const__)); # 289 "/usr/include/bits/mathcalls.h" 3 extern "C" long double remainderl(long double, long double) throw(); extern "C" long double __remainderl(long double, long double) throw(); # 293 "/usr/include/bits/mathcalls.h" 3 extern "C" long double scalbnl(long double, int) throw(); extern "C" long double __scalbnl(long double, int) throw(); # 297 "/usr/include/bits/mathcalls.h" 3 extern "C" int ilogbl(long double) throw(); extern "C" int __ilogbl(long double) throw(); # 302 "/usr/include/bits/mathcalls.h" 3 extern "C" long double scalblnl(long double, long) throw(); extern "C" long double __scalblnl(long double, long) throw(); # 306 "/usr/include/bits/mathcalls.h" 3 extern "C" long double nearbyintl(long double) throw(); extern "C" long double __nearbyintl(long double) throw(); # 310 "/usr/include/bits/mathcalls.h" 3 extern "C" long double roundl(long double) throw() __attribute__((__const__)); extern "C" long double __roundl(long double) throw() __attribute__((__const__)); # 314 "/usr/include/bits/mathcalls.h" 3 extern "C" long double truncl(long double) throw() __attribute__((__const__)); extern "C" long double __truncl(long double) throw() __attribute__((__const__)); # 319 "/usr/include/bits/mathcalls.h" 3 extern "C" long double remquol(long double, long double, int *) throw(); extern "C" long double __remquol(long double, long double, int *) throw(); # 326 "/usr/include/bits/mathcalls.h" 3 extern "C" long lrintl(long double) throw(); extern "C" long __lrintl(long double) throw(); # 327 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llrintl(long double) throw(); extern "C" long long __llrintl(long double) throw(); # 331 "/usr/include/bits/mathcalls.h" 3 extern "C" long lroundl(long double) throw(); extern "C" long __lroundl(long double) throw(); # 332 "/usr/include/bits/mathcalls.h" 3 extern "C" long long llroundl(long double) throw(); extern "C" long long __llroundl(long double) throw(); # 336 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fdiml(long double, long double) throw(); extern "C" long double __fdiml(long double, long double) throw(); # 339 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fmaxl(long double, long double) throw(); extern "C" long double __fmaxl(long double, long double) throw(); # 342 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fminl(long double, long double) throw(); extern "C" long double __fminl(long double, long double) throw(); # 346 "/usr/include/bits/mathcalls.h" 3 extern "C" int __fpclassifyl(long double) throw() __attribute__((__const__)); # 350 "/usr/include/bits/mathcalls.h" 3 extern "C" __attribute__((weak)) int __signbitl(long double) throw() __attribute__((__const__)); # 355 "/usr/include/bits/mathcalls.h" 3 extern "C" long double fmal(long double, long double, long double) throw(); extern "C" long double __fmal(long double, long double, long double) throw(); # 364 "/usr/include/bits/mathcalls.h" 3 extern "C" long double scalbl(long double, long double) throw(); extern "C" long double __scalbl(long double, long double) throw(); # 161 "/usr/include/math.h" 3 extern "C" { extern int signgam; } # 203 "/usr/include/math.h" 3 enum { # 204 "/usr/include/math.h" 3 FP_NAN, # 206 "/usr/include/math.h" 3 FP_INFINITE, # 208 "/usr/include/math.h" 3 FP_ZERO, # 210 "/usr/include/math.h" 3 FP_SUBNORMAL, # 212 "/usr/include/math.h" 3 FP_NORMAL # 214 "/usr/include/math.h" 3 }; # 302 "/usr/include/math.h" 3 extern "C" { typedef # 296 "/usr/include/math.h" 3 enum { # 297 "/usr/include/math.h" 3 _IEEE_ = (-1), # 298 "/usr/include/math.h" 3 _SVID_ = 0, # 299 "/usr/include/math.h" 3 _XOPEN_, # 300 "/usr/include/math.h" 3 _POSIX_, # 301 "/usr/include/math.h" 3 _ISOC_ # 302 "/usr/include/math.h" 3 } _LIB_VERSION_TYPE; } # 307 "/usr/include/math.h" 3 extern "C" { extern _LIB_VERSION_TYPE _LIB_VERSION; } # 318 "/usr/include/math.h" 3 extern "C" { struct __exception { # 323 "/usr/include/math.h" 3 int type; # 324 "/usr/include/math.h" 3 char *name; # 325 "/usr/include/math.h" 3 double arg1; # 326 "/usr/include/math.h" 3 double arg2; # 327 "/usr/include/math.h" 3 double retval; # 328 "/usr/include/math.h" 3 }; } # 331 "/usr/include/math.h" 3 extern "C" int matherr(__exception *) throw(); # 67 "/usr/include/bits/waitstatus.h" 3 extern "C" { union wait { # 69 "/usr/include/bits/waitstatus.h" 3 int w_status; # 71 "/usr/include/bits/waitstatus.h" 3 struct { # 73 "/usr/include/bits/waitstatus.h" 3 unsigned __w_termsig:7; # 74 "/usr/include/bits/waitstatus.h" 3 unsigned __w_coredump:1; # 75 "/usr/include/bits/waitstatus.h" 3 unsigned __w_retcode:8; # 76 "/usr/include/bits/waitstatus.h" 3 unsigned:16; # 84 "/usr/include/bits/waitstatus.h" 3 } __wait_terminated; # 86 "/usr/include/bits/waitstatus.h" 3 struct { # 88 "/usr/include/bits/waitstatus.h" 3 unsigned __w_stopval:8; # 89 "/usr/include/bits/waitstatus.h" 3 unsigned __w_stopsig:8; # 90 "/usr/include/bits/waitstatus.h" 3 unsigned:16; # 97 "/usr/include/bits/waitstatus.h" 3 } __wait_stopped; # 98 "/usr/include/bits/waitstatus.h" 3 }; } # 102 "/usr/include/stdlib.h" 3 extern "C" { typedef # 99 "/usr/include/stdlib.h" 3 struct { # 100 "/usr/include/stdlib.h" 3 int quot; # 101 "/usr/include/stdlib.h" 3 int rem; # 102 "/usr/include/stdlib.h" 3 } div_t; } # 110 "/usr/include/stdlib.h" 3 extern "C" { typedef # 107 "/usr/include/stdlib.h" 3 struct { # 108 "/usr/include/stdlib.h" 3 long quot; # 109 "/usr/include/stdlib.h" 3 long rem; # 110 "/usr/include/stdlib.h" 3 } ldiv_t; } # 122 "/usr/include/stdlib.h" 3 extern "C" { typedef # 119 "/usr/include/stdlib.h" 3 struct { # 120 "/usr/include/stdlib.h" 3 long long quot; # 121 "/usr/include/stdlib.h" 3 long long rem; # 122 "/usr/include/stdlib.h" 3 } lldiv_t; } # 140 "/usr/include/stdlib.h" 3 extern "C" size_t __ctype_get_mb_cur_max() throw(); # 145 "/usr/include/stdlib.h" 3 extern "C" double atof(const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 148 "/usr/include/stdlib.h" 3 extern "C" int atoi(const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 151 "/usr/include/stdlib.h" 3 extern "C" long atol(const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 158 "/usr/include/stdlib.h" 3 extern "C" long long atoll(const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 165 "/usr/include/stdlib.h" 3 extern "C" double strtod(const char *__restrict__, char **__restrict__) throw() __attribute__((nonnull(1))); # 173 "/usr/include/stdlib.h" 3 extern "C" float strtof(const char *__restrict__, char **__restrict__) throw() __attribute__((nonnull(1))); # 176 "/usr/include/stdlib.h" 3 extern "C" long double strtold(const char *__restrict__, char **__restrict__) throw() __attribute__((nonnull(1))); # 184 "/usr/include/stdlib.h" 3 extern "C" long strtol(const char *__restrict__, char **__restrict__, int) throw() __attribute__((nonnull(1))); # 188 "/usr/include/stdlib.h" 3 extern "C" unsigned long strtoul(const char *__restrict__, char **__restrict__, int) throw() __attribute__((nonnull(1))); # 196 "/usr/include/stdlib.h" 3 extern "C" long long strtoq(const char *__restrict__, char **__restrict__, int) throw() __attribute__((nonnull(1))); # 201 "/usr/include/stdlib.h" 3 extern "C" unsigned long long strtouq(const char *__restrict__, char **__restrict__, int) throw() __attribute__((nonnull(1))); # 210 "/usr/include/stdlib.h" 3 extern "C" long long strtoll(const char *__restrict__, char **__restrict__, int) throw() __attribute__((nonnull(1))); # 215 "/usr/include/stdlib.h" 3 extern "C" unsigned long long strtoull(const char *__restrict__, char **__restrict__, int) throw() __attribute__((nonnull(1))); # 240 "/usr/include/stdlib.h" 3 extern "C" long strtol_l(const char *__restrict__, char **__restrict__, int, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(4))); # 244 "/usr/include/stdlib.h" 3 extern "C" unsigned long strtoul_l(const char *__restrict__, char **__restrict__, int, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(4))); # 250 "/usr/include/stdlib.h" 3 extern "C" long long strtoll_l(const char *__restrict__, char **__restrict__, int, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(4))); # 256 "/usr/include/stdlib.h" 3 extern "C" unsigned long long strtoull_l(const char *__restrict__, char **__restrict__, int, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(4))); # 261 "/usr/include/stdlib.h" 3 extern "C" double strtod_l(const char *__restrict__, char **__restrict__, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(3))); # 265 "/usr/include/stdlib.h" 3 extern "C" float strtof_l(const char *__restrict__, char **__restrict__, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(3))); # 269 "/usr/include/stdlib.h" 3 extern "C" long double strtold_l(const char *__restrict__, char **__restrict__, __locale_t) throw() __attribute__((nonnull(1))) __attribute__((nonnull(3))); # 311 "/usr/include/stdlib.h" 3 extern "C" char *l64a(long) throw(); # 314 "/usr/include/stdlib.h" 3 extern "C" long a64l(const char *) throw() __attribute__((__pure__)) __attribute__((nonnull(1))); # 34 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_char u_char; } # 35 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_short u_short; } # 36 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_int u_int; } # 37 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_long u_long; } # 38 "/usr/include/sys/types.h" 3 extern "C" { typedef __quad_t quad_t; } # 39 "/usr/include/sys/types.h" 3 extern "C" { typedef __u_quad_t u_quad_t; } # 40 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsid_t fsid_t; } # 45 "/usr/include/sys/types.h" 3 extern "C" { typedef __loff_t loff_t; } # 49 "/usr/include/sys/types.h" 3 extern "C" { typedef __ino_t ino_t; } # 56 "/usr/include/sys/types.h" 3 extern "C" { typedef __ino64_t ino64_t; } # 61 "/usr/include/sys/types.h" 3 extern "C" { typedef __dev_t dev_t; } # 66 "/usr/include/sys/types.h" 3 extern "C" { typedef __gid_t gid_t; } # 71 "/usr/include/sys/types.h" 3 extern "C" { typedef __mode_t mode_t; } # 76 "/usr/include/sys/types.h" 3 extern "C" { typedef __nlink_t nlink_t; } # 81 "/usr/include/sys/types.h" 3 extern "C" { typedef __uid_t uid_t; } # 87 "/usr/include/sys/types.h" 3 extern "C" { typedef __off_t off_t; } # 94 "/usr/include/sys/types.h" 3 extern "C" { typedef __off64_t off64_t; } # 105 "/usr/include/sys/types.h" 3 extern "C" { typedef __id_t id_t; } # 110 "/usr/include/sys/types.h" 3 extern "C" { typedef __ssize_t ssize_t; } # 116 "/usr/include/sys/types.h" 3 extern "C" { typedef __daddr_t daddr_t; } # 117 "/usr/include/sys/types.h" 3 extern "C" { typedef __caddr_t caddr_t; } # 123 "/usr/include/sys/types.h" 3 extern "C" { typedef __key_t key_t; } # 137 "/usr/include/sys/types.h" 3 extern "C" { typedef __useconds_t useconds_t; } # 141 "/usr/include/sys/types.h" 3 extern "C" { typedef __suseconds_t suseconds_t; } # 151 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned long ulong; } # 152 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned short ushort; } # 153 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned uint; } # 195 "/usr/include/sys/types.h" 3 extern "C" { typedef signed char int8_t; } # 196 "/usr/include/sys/types.h" 3 extern "C" { typedef short int16_t; } # 197 "/usr/include/sys/types.h" 3 extern "C" { typedef int int32_t; } # 198 "/usr/include/sys/types.h" 3 extern "C" { typedef long int64_t; } # 201 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned char u_int8_t; } # 202 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned short u_int16_t; } # 203 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned u_int32_t; } # 204 "/usr/include/sys/types.h" 3 extern "C" { typedef unsigned long u_int64_t; } # 206 "/usr/include/sys/types.h" 3 extern "C" { typedef int register_t; } # 24 "/usr/include/bits/sigset.h" 3 extern "C" { typedef int __sig_atomic_t; } # 32 "/usr/include/bits/sigset.h" 3 extern "C" { typedef # 30 "/usr/include/bits/sigset.h" 3 struct { # 31 "/usr/include/bits/sigset.h" 3 unsigned long __val[((1024) / ((8) * sizeof(unsigned long)))]; # 32 "/usr/include/bits/sigset.h" 3 } __sigset_t; } # 38 "/usr/include/sys/select.h" 3 extern "C" { typedef __sigset_t sigset_t; } # 75 "/usr/include/bits/time.h" 3 extern "C" { struct timeval { # 77 "/usr/include/bits/time.h" 3 __time_t tv_sec; # 78 "/usr/include/bits/time.h" 3 __suseconds_t tv_usec; # 79 "/usr/include/bits/time.h" 3 }; } # 55 "/usr/include/sys/select.h" 3 extern "C" { typedef long __fd_mask; } # 78 "/usr/include/sys/select.h" 3 extern "C" { typedef # 68 "/usr/include/sys/select.h" 3 struct { # 72 "/usr/include/sys/select.h" 3 __fd_mask fds_bits[(1024 / (8 * ((int)sizeof(__fd_mask))))]; # 78 "/usr/include/sys/select.h" 3 } fd_set; } # 85 "/usr/include/sys/select.h" 3 extern "C" { typedef __fd_mask fd_mask; } # 109 "/usr/include/sys/select.h" 3 extern "C" int select(int, fd_set *__restrict__, fd_set *__restrict__, fd_set *__restrict__, timeval *__restrict__); # 121 "/usr/include/sys/select.h" 3 extern "C" int pselect(int, fd_set *__restrict__, fd_set *__restrict__, fd_set *__restrict__, const timespec *__restrict__, const __sigset_t *__restrict__); # 31 "/usr/include/sys/sysmacros.h" 3 extern "C" unsigned gnu_dev_major(unsigned long long) throw(); # 34 "/usr/include/sys/sysmacros.h" 3 extern "C" unsigned gnu_dev_minor(unsigned long long) throw(); # 37 "/usr/include/sys/sysmacros.h" 3 extern "C" unsigned long long gnu_dev_makedev(unsigned, unsigned) throw(); # 229 "/usr/include/sys/types.h" 3 extern "C" { typedef __blksize_t blksize_t; } # 236 "/usr/include/sys/types.h" 3 extern "C" { typedef __blkcnt_t blkcnt_t; } # 240 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsblkcnt_t fsblkcnt_t; } # 244 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsfilcnt_t fsfilcnt_t; } # 263 "/usr/include/sys/types.h" 3 extern "C" { typedef __blkcnt64_t blkcnt64_t; } # 264 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsblkcnt64_t fsblkcnt64_t; } # 265 "/usr/include/sys/types.h" 3 extern "C" { typedef __fsfilcnt64_t fsfilcnt64_t; } # 50 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef unsigned long pthread_t; } # 57 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 54 "/usr/include/bits/pthreadtypes.h" 3 union { # 55 "/usr/include/bits/pthreadtypes.h" 3 char __size[56]; # 56 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 57 "/usr/include/bits/pthreadtypes.h" 3 } pthread_attr_t; } # 65 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 61 "/usr/include/bits/pthreadtypes.h" 3 struct __pthread_internal_list { # 63 "/usr/include/bits/pthreadtypes.h" 3 __pthread_internal_list *__prev; # 64 "/usr/include/bits/pthreadtypes.h" 3 __pthread_internal_list *__next; # 65 "/usr/include/bits/pthreadtypes.h" 3 } __pthread_list_t; } # 104 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 77 "/usr/include/bits/pthreadtypes.h" 3 union { # 78 "/usr/include/bits/pthreadtypes.h" 3 struct __pthread_mutex_s { # 80 "/usr/include/bits/pthreadtypes.h" 3 int __lock; # 81 "/usr/include/bits/pthreadtypes.h" 3 unsigned __count; # 82 "/usr/include/bits/pthreadtypes.h" 3 int __owner; # 84 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nusers; # 88 "/usr/include/bits/pthreadtypes.h" 3 int __kind; # 90 "/usr/include/bits/pthreadtypes.h" 3 int __spins; # 91 "/usr/include/bits/pthreadtypes.h" 3 __pthread_list_t __list; # 101 "/usr/include/bits/pthreadtypes.h" 3 } __data; # 102 "/usr/include/bits/pthreadtypes.h" 3 char __size[40]; # 103 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 104 "/usr/include/bits/pthreadtypes.h" 3 } pthread_mutex_t; } # 110 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 107 "/usr/include/bits/pthreadtypes.h" 3 union { # 108 "/usr/include/bits/pthreadtypes.h" 3 char __size[4]; # 109 "/usr/include/bits/pthreadtypes.h" 3 int __align; # 110 "/usr/include/bits/pthreadtypes.h" 3 } pthread_mutexattr_t; } # 130 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 116 "/usr/include/bits/pthreadtypes.h" 3 union { # 118 "/usr/include/bits/pthreadtypes.h" 3 struct { # 119 "/usr/include/bits/pthreadtypes.h" 3 int __lock; # 120 "/usr/include/bits/pthreadtypes.h" 3 unsigned __futex; # 121 "/usr/include/bits/pthreadtypes.h" 3 __extension__ unsigned long long __total_seq; # 122 "/usr/include/bits/pthreadtypes.h" 3 __extension__ unsigned long long __wakeup_seq; # 123 "/usr/include/bits/pthreadtypes.h" 3 __extension__ unsigned long long __woken_seq; # 124 "/usr/include/bits/pthreadtypes.h" 3 void *__mutex; # 125 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nwaiters; # 126 "/usr/include/bits/pthreadtypes.h" 3 unsigned __broadcast_seq; # 127 "/usr/include/bits/pthreadtypes.h" 3 } __data; # 128 "/usr/include/bits/pthreadtypes.h" 3 char __size[48]; # 129 "/usr/include/bits/pthreadtypes.h" 3 __extension__ long long __align; # 130 "/usr/include/bits/pthreadtypes.h" 3 } pthread_cond_t; } # 136 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 133 "/usr/include/bits/pthreadtypes.h" 3 union { # 134 "/usr/include/bits/pthreadtypes.h" 3 char __size[4]; # 135 "/usr/include/bits/pthreadtypes.h" 3 int __align; # 136 "/usr/include/bits/pthreadtypes.h" 3 } pthread_condattr_t; } # 140 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef unsigned pthread_key_t; } # 144 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef int pthread_once_t; } # 189 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 151 "/usr/include/bits/pthreadtypes.h" 3 union { # 154 "/usr/include/bits/pthreadtypes.h" 3 struct { # 155 "/usr/include/bits/pthreadtypes.h" 3 int __lock; # 156 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nr_readers; # 157 "/usr/include/bits/pthreadtypes.h" 3 unsigned __readers_wakeup; # 158 "/usr/include/bits/pthreadtypes.h" 3 unsigned __writer_wakeup; # 159 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nr_readers_queued; # 160 "/usr/include/bits/pthreadtypes.h" 3 unsigned __nr_writers_queued; # 161 "/usr/include/bits/pthreadtypes.h" 3 int __writer; # 162 "/usr/include/bits/pthreadtypes.h" 3 int __shared; # 163 "/usr/include/bits/pthreadtypes.h" 3 unsigned long __pad1; # 164 "/usr/include/bits/pthreadtypes.h" 3 unsigned long __pad2; # 167 "/usr/include/bits/pthreadtypes.h" 3 unsigned __flags; # 168 "/usr/include/bits/pthreadtypes.h" 3 } __data; # 187 "/usr/include/bits/pthreadtypes.h" 3 char __size[56]; # 188 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 189 "/usr/include/bits/pthreadtypes.h" 3 } pthread_rwlock_t; } # 195 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 192 "/usr/include/bits/pthreadtypes.h" 3 union { # 193 "/usr/include/bits/pthreadtypes.h" 3 char __size[8]; # 194 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 195 "/usr/include/bits/pthreadtypes.h" 3 } pthread_rwlockattr_t; } # 201 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef volatile int pthread_spinlock_t; } # 210 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 207 "/usr/include/bits/pthreadtypes.h" 3 union { # 208 "/usr/include/bits/pthreadtypes.h" 3 char __size[32]; # 209 "/usr/include/bits/pthreadtypes.h" 3 long __align; # 210 "/usr/include/bits/pthreadtypes.h" 3 } pthread_barrier_t; } # 216 "/usr/include/bits/pthreadtypes.h" 3 extern "C" { typedef # 213 "/usr/include/bits/pthreadtypes.h" 3 union { # 214 "/usr/include/bits/pthreadtypes.h" 3 char __size[4]; # 215 "/usr/include/bits/pthreadtypes.h" 3 int __align; # 216 "/usr/include/bits/pthreadtypes.h" 3 } pthread_barrierattr_t; } # 327 "/usr/include/stdlib.h" 3 extern "C" long random() throw(); # 330 "/usr/include/stdlib.h" 3 extern "C" void srandom(unsigned) throw(); # 336 "/usr/include/stdlib.h" 3 extern "C" char *initstate(unsigned, char *, size_t) throw() __attribute__((nonnull(2))); # 341 "/usr/include/stdlib.h" 3 extern "C" char *setstate(char *) throw() __attribute__((nonnull(1))); # 349 "/usr/include/stdlib.h" 3 extern "C" { struct random_data { # 351 "/usr/include/stdlib.h" 3 int32_t *fptr; # 352 "/usr/include/stdlib.h" 3 int32_t *rptr; # 353 "/usr/include/stdlib.h" 3 int32_t *state; # 354 "/usr/include/stdlib.h" 3 int rand_type; # 355 "/usr/include/stdlib.h" 3 int rand_deg; # 356 "/usr/include/stdlib.h" 3 int rand_sep; # 357 "/usr/include/stdlib.h" 3 int32_t *end_ptr; # 358 "/usr/include/stdlib.h" 3 }; } # 360 "/usr/include/stdlib.h" 3 extern "C" int random_r(random_data *__restrict__, int32_t *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 363 "/usr/include/stdlib.h" 3 extern "C" int srandom_r(unsigned, random_data *) throw() __attribute__((nonnull(2))); # 366 "/usr/include/stdlib.h" 3 extern "C" int initstate_r(unsigned, char *__restrict__, size_t, random_data *__restrict__) throw() __attribute__((nonnull(2))) __attribute__((nonnull(4))); # 371 "/usr/include/stdlib.h" 3 extern "C" int setstate_r(char *__restrict__, random_data *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 380 "/usr/include/stdlib.h" 3 extern "C" int rand() throw(); # 382 "/usr/include/stdlib.h" 3 extern "C" void srand(unsigned) throw(); # 387 "/usr/include/stdlib.h" 3 extern "C" int rand_r(unsigned *) throw(); # 395 "/usr/include/stdlib.h" 3 extern "C" double drand48() throw(); # 396 "/usr/include/stdlib.h" 3 extern "C" double erand48(unsigned short [3]) throw() __attribute__((nonnull(1))); # 399 "/usr/include/stdlib.h" 3 extern "C" long lrand48() throw(); # 400 "/usr/include/stdlib.h" 3 extern "C" long nrand48(unsigned short [3]) throw() __attribute__((nonnull(1))); # 404 "/usr/include/stdlib.h" 3 extern "C" long mrand48() throw(); # 405 "/usr/include/stdlib.h" 3 extern "C" long jrand48(unsigned short [3]) throw() __attribute__((nonnull(1))); # 409 "/usr/include/stdlib.h" 3 extern "C" void srand48(long) throw(); # 410 "/usr/include/stdlib.h" 3 extern "C" unsigned short *seed48(unsigned short [3]) throw() __attribute__((nonnull(1))); # 412 "/usr/include/stdlib.h" 3 extern "C" void lcong48(unsigned short [7]) throw() __attribute__((nonnull(1))); # 418 "/usr/include/stdlib.h" 3 extern "C" { struct drand48_data { # 420 "/usr/include/stdlib.h" 3 unsigned short __x[3]; # 421 "/usr/include/stdlib.h" 3 unsigned short __old_x[3]; # 422 "/usr/include/stdlib.h" 3 unsigned short __c; # 423 "/usr/include/stdlib.h" 3 unsigned short __init; # 424 "/usr/include/stdlib.h" 3 unsigned long long __a; # 425 "/usr/include/stdlib.h" 3 }; } # 428 "/usr/include/stdlib.h" 3 extern "C" int drand48_r(drand48_data *__restrict__, double *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 430 "/usr/include/stdlib.h" 3 extern "C" int erand48_r(unsigned short [3], drand48_data *__restrict__, double *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 435 "/usr/include/stdlib.h" 3 extern "C" int lrand48_r(drand48_data *__restrict__, long *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 438 "/usr/include/stdlib.h" 3 extern "C" int nrand48_r(unsigned short [3], drand48_data *__restrict__, long *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 444 "/usr/include/stdlib.h" 3 extern "C" int mrand48_r(drand48_data *__restrict__, long *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 447 "/usr/include/stdlib.h" 3 extern "C" int jrand48_r(unsigned short [3], drand48_data *__restrict__, long *__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 453 "/usr/include/stdlib.h" 3 extern "C" int srand48_r(long, drand48_data *) throw() __attribute__((nonnull(2))); # 456 "/usr/include/stdlib.h" 3 extern "C" int seed48_r(unsigned short [3], drand48_data *) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 459 "/usr/include/stdlib.h" 3 extern "C" int lcong48_r(unsigned short [7], drand48_data *) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))); # 471 "/usr/include/stdlib.h" 3 extern "C" void *malloc(size_t) throw() __attribute__((__malloc__)); # 473 "/usr/include/stdlib.h" 3 extern "C" void *calloc(size_t, size_t) throw() __attribute__((__malloc__)); # 485 "/usr/include/stdlib.h" 3 extern "C" void *realloc(void *, size_t) throw() __attribute__((__warn_unused_result__)); # 488 "/usr/include/stdlib.h" 3 extern "C" void free(void *) throw(); # 493 "/usr/include/stdlib.h" 3 extern "C" void cfree(void *) throw(); # 33 "/usr/include/alloca.h" 3 extern "C" void *alloca(size_t) throw(); # 503 "/usr/include/stdlib.h" 3 extern "C" void *valloc(size_t) throw() __attribute__((__malloc__)); # 508 "/usr/include/stdlib.h" 3 extern "C" int posix_memalign(void **, size_t, size_t) throw() __attribute__((nonnull(1))); # 514 "/usr/include/stdlib.h" 3 extern "C" void abort() throw() __attribute__((__noreturn__)); # 518 "/usr/include/stdlib.h" 3 extern "C" int atexit(void (*)(void)) throw() __attribute__((nonnull(1))); # 525 "/usr/include/stdlib.h" 3 int at_quick_exit(void (*)(void)) throw() __asm__("at_quick_exit") __attribute__((nonnull(1))); # 536 "/usr/include/stdlib.h" 3 extern "C" int on_exit(void (*)(int, void *), void *) throw() __attribute__((nonnull(1))); # 544 "/usr/include/stdlib.h" 3 extern "C" void exit(int) throw() __attribute__((__noreturn__)); # 552 "/usr/include/stdlib.h" 3 extern "C" void quick_exit(int) throw() __attribute__((__noreturn__)); # 560 "/usr/include/stdlib.h" 3 extern "C" void _Exit(int) throw() __attribute__((__noreturn__)); # 567 "/usr/include/stdlib.h" 3 extern "C" char *getenv(const char *) throw() __attribute__((nonnull(1))); # 572 "/usr/include/stdlib.h" 3 extern "C" char *__secure_getenv(const char *) throw() __attribute__((nonnull(1))); # 579 "/usr/include/stdlib.h" 3 extern "C" int putenv(char *) throw() __attribute__((nonnull(1))); # 585 "/usr/include/stdlib.h" 3 extern "C" int setenv(const char *, const char *, int) throw() __attribute__((nonnull(2))); # 589 "/usr/include/stdlib.h" 3 extern "C" int unsetenv(const char *) throw() __attribute__((nonnull(1))); # 596 "/usr/include/stdlib.h" 3 extern "C" int clearenv() throw(); # 606 "/usr/include/stdlib.h" 3 extern "C" char *mktemp(char *) throw() __attribute__((nonnull(1))); # 620 "/usr/include/stdlib.h" 3 extern "C" int mkstemp(char *) __attribute__((nonnull(1))); # 630 "/usr/include/stdlib.h" 3 extern "C" int mkstemp64(char *) __attribute__((nonnull(1))); # 642 "/usr/include/stdlib.h" 3 extern "C" int mkstemps(char *, int) __attribute__((nonnull(1))); # 652 "/usr/include/stdlib.h" 3 extern "C" int mkstemps64(char *, int) __attribute__((nonnull(1))); # 663 "/usr/include/stdlib.h" 3 extern "C" char *mkdtemp(char *) throw() __attribute__((nonnull(1))); # 674 "/usr/include/stdlib.h" 3 extern "C" int mkostemp(char *, int) __attribute__((nonnull(1))); # 684 "/usr/include/stdlib.h" 3 extern "C" int mkostemp64(char *, int) __attribute__((nonnull(1))); # 694 "/usr/include/stdlib.h" 3 extern "C" int mkostemps(char *, int, int) __attribute__((nonnull(1))); # 706 "/usr/include/stdlib.h" 3 extern "C" int mkostemps64(char *, int, int) __attribute__((nonnull(1))); # 717 "/usr/include/stdlib.h" 3 extern "C" int system(const char *); # 724 "/usr/include/stdlib.h" 3 extern "C" char *canonicalize_file_name(const char *) throw() __attribute__((nonnull(1))); # 734 "/usr/include/stdlib.h" 3 extern "C" char *realpath(const char *__restrict__, char *__restrict__) throw(); # 742 "/usr/include/stdlib.h" 3 extern "C" { typedef int (*__compar_fn_t)(const void *, const void *); } # 745 "/usr/include/stdlib.h" 3 extern "C" { typedef __compar_fn_t comparison_fn_t; } # 749 "/usr/include/stdlib.h" 3 extern "C" { typedef int (*__compar_d_fn_t)(const void *, const void *, void *); } # 755 "/usr/include/stdlib.h" 3 extern "C" void *bsearch(const void *, const void *, size_t, size_t, __compar_fn_t) __attribute__((nonnull(1))) __attribute__((nonnull(2))) __attribute__((nonnull(5))); # 761 "/usr/include/stdlib.h" 3 extern "C" void qsort(void *, size_t, size_t, __compar_fn_t) __attribute__((nonnull(1))) __attribute__((nonnull(4))); # 764 "/usr/include/stdlib.h" 3 extern "C" void qsort_r(void *, size_t, size_t, __compar_d_fn_t, void *) __attribute__((nonnull(1))) __attribute__((nonnull(4))); # 771 "/usr/include/stdlib.h" 3 extern "C" __attribute__((weak)) int abs(int) throw() __attribute__((__const__)); # 772 "/usr/include/stdlib.h" 3 extern "C" __attribute__((weak)) long labs(long) throw() __attribute__((__const__)); # 776 "/usr/include/stdlib.h" 3 extern "C" __attribute__((weak)) long long llabs(long long) throw() __attribute__((__const__)); # 785 "/usr/include/stdlib.h" 3 extern "C" div_t div(int, int) throw() __attribute__((__const__)); # 787 "/usr/include/stdlib.h" 3 extern "C" ldiv_t ldiv(long, long) throw() __attribute__((__const__)); # 793 "/usr/include/stdlib.h" 3 extern "C" lldiv_t lldiv(long long, long long) throw() __attribute__((__const__)); # 808 "/usr/include/stdlib.h" 3 extern "C" char *ecvt(double, int, int *__restrict__, int *__restrict__) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))); # 814 "/usr/include/stdlib.h" 3 extern "C" char *fcvt(double, int, int *__restrict__, int *__restrict__) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))); # 820 "/usr/include/stdlib.h" 3 extern "C" char *gcvt(double, int, char *) throw() __attribute__((nonnull(3))); # 826 "/usr/include/stdlib.h" 3 extern "C" char *qecvt(long double, int, int *__restrict__, int *__restrict__) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))); # 829 "/usr/include/stdlib.h" 3 extern "C" char *qfcvt(long double, int, int *__restrict__, int *__restrict__) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))); # 832 "/usr/include/stdlib.h" 3 extern "C" char *qgcvt(long double, int, char *) throw() __attribute__((nonnull(3))); # 838 "/usr/include/stdlib.h" 3 extern "C" int ecvt_r(double, int, int *__restrict__, int *__restrict__, char *__restrict__, size_t) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))) __attribute__((nonnull(5))); # 841 "/usr/include/stdlib.h" 3 extern "C" int fcvt_r(double, int, int *__restrict__, int *__restrict__, char *__restrict__, size_t) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))) __attribute__((nonnull(5))); # 845 "/usr/include/stdlib.h" 3 extern "C" int qecvt_r(long double, int, int *__restrict__, int *__restrict__, char *__restrict__, size_t) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))) __attribute__((nonnull(5))); # 849 "/usr/include/stdlib.h" 3 extern "C" int qfcvt_r(long double, int, int *__restrict__, int *__restrict__, char *__restrict__, size_t) throw() __attribute__((nonnull(3))) __attribute__((nonnull(4))) __attribute__((nonnull(5))); # 860 "/usr/include/stdlib.h" 3 extern "C" int mblen(const char *, size_t) throw(); # 863 "/usr/include/stdlib.h" 3 extern "C" int mbtowc(wchar_t *__restrict__, const char *__restrict__, size_t) throw(); # 867 "/usr/include/stdlib.h" 3 extern "C" int wctomb(char *, wchar_t) throw(); # 871 "/usr/include/stdlib.h" 3 extern "C" size_t mbstowcs(wchar_t *__restrict__, const char *__restrict__, size_t) throw(); # 874 "/usr/include/stdlib.h" 3 extern "C" size_t wcstombs(char *__restrict__, const wchar_t *__restrict__, size_t) throw(); # 885 "/usr/include/stdlib.h" 3 extern "C" int rpmatch(const char *) throw() __attribute__((nonnull(1))); # 896 "/usr/include/stdlib.h" 3 extern "C" int getsubopt(char **__restrict__, char *const *__restrict__, char **__restrict__) throw() __attribute__((nonnull(1))) __attribute__((nonnull(2))) __attribute__((nonnull(3))); # 905 "/usr/include/stdlib.h" 3 extern "C" void setkey(const char *) throw() __attribute__((nonnull(1))); # 913 "/usr/include/stdlib.h" 3 extern "C" int posix_openpt(int); # 921 "/usr/include/stdlib.h" 3 extern "C" int grantpt(int) throw(); # 925 "/usr/include/stdlib.h" 3 extern "C" int unlockpt(int) throw(); # 930 "/usr/include/stdlib.h" 3 extern "C" char *ptsname(int) throw(); # 937 "/usr/include/stdlib.h" 3 extern "C" int ptsname_r(int, char *, size_t) throw() __attribute__((nonnull(2))); # 941 "/usr/include/stdlib.h" 3 extern "C" int getpt(); # 948 "/usr/include/stdlib.h" 3 extern "C" int getloadavg(double [], int) throw() __attribute__((nonnull(1))); # 69 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 namespace __gnu_cxx __attribute__((visibility("default"))) { # 71 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Iterator, class _Container> class __normal_iterator; # 74 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 } # 76 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 namespace std __attribute__((visibility("default"))) { # 78 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __true_type { }; # 79 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __false_type { }; # 81 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< bool __T0> # 82 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __truth_type { # 83 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; }; # 86 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __truth_type< true> { # 87 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; }; # 91 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Sp, class _Tp> # 92 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __traitor { # 94 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = (((bool)_Sp::__value) || ((bool)_Tp::__value))}; # 95 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef typename __truth_type< __value> ::__type __type; # 96 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 99 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class , class > # 100 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __are_same { # 102 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 103 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 104 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 106 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 107 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __are_same< _Tp, _Tp> { # 109 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 110 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 111 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 114 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 115 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_void { # 117 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 118 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 119 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 122 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_void< void> { # 124 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 125 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 126 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 131 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 132 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_integer { # 134 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 135 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 136 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 142 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< bool> { # 144 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 145 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 146 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 149 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< char> { # 151 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 152 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 153 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 156 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< signed char> { # 158 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 159 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 160 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 163 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned char> { # 165 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 166 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 167 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 171 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< wchar_t> { # 173 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 174 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 175 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 195 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< short> { # 197 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 198 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 199 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 202 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned short> { # 204 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 205 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 206 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 209 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< int> { # 211 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 212 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 213 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 216 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned> { # 218 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 219 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 220 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 223 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< long> { # 225 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 226 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 227 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 230 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned long> { # 232 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 233 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 234 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 237 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< long long> { # 239 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 240 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 241 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 244 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_integer< unsigned long long> { # 246 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 247 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 248 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 253 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 254 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_floating { # 256 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 257 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 258 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 262 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_floating< float> { # 264 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 265 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 266 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 269 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_floating< double> { # 271 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 272 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 273 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 276 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_floating< long double> { # 278 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 279 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 280 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 285 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 286 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_pointer { # 288 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 289 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 290 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 292 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 293 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_pointer< _Tp *> { # 295 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 296 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 297 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 302 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 303 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_normal_iterator { # 305 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 306 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 307 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 309 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Iterator, class _Container> # 310 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_normal_iterator< __gnu_cxx::__normal_iterator< _Iterator, _Container> > { # 313 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 314 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 315 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 320 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 321 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_arithmetic : public __traitor< __is_integer< _Tp> , __is_floating< _Tp> > { # 323 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 328 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 329 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_fundamental : public __traitor< __is_void< _Tp> , __is_arithmetic< _Tp> > { # 331 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 336 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 337 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_scalar : public __traitor< __is_arithmetic< _Tp> , __is_pointer< _Tp> > { # 339 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 344 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 345 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_char { # 347 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 348 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 349 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 352 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_char< char> { # 354 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 355 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 356 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 360 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_char< wchar_t> { # 362 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 363 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 364 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 367 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 368 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_byte { # 370 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 371 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 372 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 375 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_byte< char> { # 377 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 378 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 379 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 382 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_byte< signed char> { # 384 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 385 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 386 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 389 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template<> struct __is_byte< unsigned char> { # 391 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value = 1}; # 392 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __true_type __type; # 393 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 398 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 template< class _Tp> # 399 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 struct __is_move_iterator { # 401 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 enum { __value}; # 402 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 typedef __false_type __type; # 403 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 }; # 417 "/usr/include/c++/4.4/bits/cpp_type_traits.h" 3 } # 37 "/usr/include/c++/4.4/ext/type_traits.h" 3 namespace __gnu_cxx __attribute__((visibility("default"))) { # 40 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< bool __T1, class > # 41 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __enable_if { # 42 "/usr/include/c++/4.4/ext/type_traits.h" 3 }; # 44 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp> # 45 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __enable_if< true, _Tp> { # 46 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef _Tp __type; }; # 50 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< bool _Cond, class _Iftrue, class _Iffalse> # 51 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __conditional_type { # 52 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef _Iftrue __type; }; # 54 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Iftrue, class _Iffalse> # 55 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __conditional_type< false, _Iftrue, _Iffalse> { # 56 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef _Iffalse __type; }; # 60 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp> # 61 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __add_unsigned { # 64 "/usr/include/c++/4.4/ext/type_traits.h" 3 private: typedef __enable_if< std::__is_integer< _Tp> ::__value, _Tp> __if_type; # 67 "/usr/include/c++/4.4/ext/type_traits.h" 3 public: typedef typename __enable_if< std::__is_integer< _Tp> ::__value, _Tp> ::__type __type; # 68 "/usr/include/c++/4.4/ext/type_traits.h" 3 }; # 71 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< char> { # 72 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef unsigned char __type; }; # 75 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< signed char> { # 76 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef unsigned char __type; }; # 79 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< short> { # 80 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef unsigned short __type; }; # 83 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< int> { # 84 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef unsigned __type; }; # 87 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< long> { # 88 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef unsigned long __type; }; # 91 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< long long> { # 92 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef unsigned long long __type; }; # 96 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< bool> ; # 99 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __add_unsigned< wchar_t> ; # 103 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp> # 104 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __remove_unsigned { # 107 "/usr/include/c++/4.4/ext/type_traits.h" 3 private: typedef __enable_if< std::__is_integer< _Tp> ::__value, _Tp> __if_type; # 110 "/usr/include/c++/4.4/ext/type_traits.h" 3 public: typedef typename __enable_if< std::__is_integer< _Tp> ::__value, _Tp> ::__type __type; # 111 "/usr/include/c++/4.4/ext/type_traits.h" 3 }; # 114 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< char> { # 115 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef signed char __type; }; # 118 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned char> { # 119 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef signed char __type; }; # 122 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned short> { # 123 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef short __type; }; # 126 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned> { # 127 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef int __type; }; # 130 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned long> { # 131 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef long __type; }; # 134 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< unsigned long long> { # 135 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef long long __type; }; # 139 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< bool> ; # 142 "/usr/include/c++/4.4/ext/type_traits.h" 3 template<> struct __remove_unsigned< wchar_t> ; # 146 "/usr/include/c++/4.4/ext/type_traits.h" 3 template < typename _Type > inline bool __is_null_pointer ( _Type * __ptr ) { return __ptr == 0; } # 151 "/usr/include/c++/4.4/ext/type_traits.h" 3 template < typename _Type > inline bool __is_null_pointer ( _Type ) { return false; } # 158 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp, bool __T2 = std::__is_integer< _Tp> ::__value> # 159 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __promote { # 160 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef double __type; }; # 162 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp> # 163 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __promote< _Tp, false> { # 164 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef _Tp __type; }; # 166 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp, class _Up> # 167 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __promote_2 { # 170 "/usr/include/c++/4.4/ext/type_traits.h" 3 private: typedef typename __promote< _Tp, std::__is_integer< _Tp> ::__value> ::__type __type1; # 171 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef typename __promote< _Up, std::__is_integer< _Up> ::__value> ::__type __type2; # 174 "/usr/include/c++/4.4/ext/type_traits.h" 3 public: typedef __typeof__(__type1() + __type2()) __type; # 175 "/usr/include/c++/4.4/ext/type_traits.h" 3 }; # 177 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp, class _Up, class _Vp> # 178 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __promote_3 { # 181 "/usr/include/c++/4.4/ext/type_traits.h" 3 private: typedef typename __promote< _Tp, std::__is_integer< _Tp> ::__value> ::__type __type1; # 182 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef typename __promote< _Up, std::__is_integer< _Up> ::__value> ::__type __type2; # 183 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef typename __promote< _Vp, std::__is_integer< _Vp> ::__value> ::__type __type3; # 186 "/usr/include/c++/4.4/ext/type_traits.h" 3 public: typedef __typeof__((__type1() + __type2()) + __type3()) __type; # 187 "/usr/include/c++/4.4/ext/type_traits.h" 3 }; # 189 "/usr/include/c++/4.4/ext/type_traits.h" 3 template< class _Tp, class _Up, class _Vp, class _Wp> # 190 "/usr/include/c++/4.4/ext/type_traits.h" 3 struct __promote_4 { # 193 "/usr/include/c++/4.4/ext/type_traits.h" 3 private: typedef typename __promote< _Tp, std::__is_integer< _Tp> ::__value> ::__type __type1; # 194 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef typename __promote< _Up, std::__is_integer< _Up> ::__value> ::__type __type2; # 195 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef typename __promote< _Vp, std::__is_integer< _Vp> ::__value> ::__type __type3; # 196 "/usr/include/c++/4.4/ext/type_traits.h" 3 typedef typename __promote< _Wp, std::__is_integer< _Wp> ::__value> ::__type __type4; # 199 "/usr/include/c++/4.4/ext/type_traits.h" 3 public: typedef __typeof__(((__type1() + __type2()) + __type3()) + __type4()) __type; # 200 "/usr/include/c++/4.4/ext/type_traits.h" 3 }; # 202 "/usr/include/c++/4.4/ext/type_traits.h" 3 } # 77 "/usr/include/c++/4.4/cmath" 3 namespace std __attribute__((visibility("default"))) { # 81 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > _Tp __cmath_power ( _Tp, unsigned int ); # 84 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline _Tp __pow_helper ( _Tp __x, int __n ) { return __n < 0 ? _Tp ( 1 ) / __cmath_power ( __x, - __n ) : __cmath_power ( __x, __n ); } # 94 "/usr/include/c++/4.4/cmath" 3 inline double abs(double __x) # 95 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fabs(__x); } # 98 "/usr/include/c++/4.4/cmath" 3 inline float abs(float __x) # 99 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fabsf(__x); } # 102 "/usr/include/c++/4.4/cmath" 3 inline long double abs(long double __x) # 103 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fabsl(__x); } # 105 "/usr/include/c++/4.4/cmath" 3 using ::acos; # 108 "/usr/include/c++/4.4/cmath" 3 inline float acos(float __x) # 109 "/usr/include/c++/4.4/cmath" 3 { return __builtin_acosf(__x); } # 112 "/usr/include/c++/4.4/cmath" 3 inline long double acos(long double __x) # 113 "/usr/include/c++/4.4/cmath" 3 { return __builtin_acosl(__x); } # 115 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type acos ( _Tp __x ) { return __builtin_acos ( __x ); } # 121 "/usr/include/c++/4.4/cmath" 3 using ::asin; # 124 "/usr/include/c++/4.4/cmath" 3 inline float asin(float __x) # 125 "/usr/include/c++/4.4/cmath" 3 { return __builtin_asinf(__x); } # 128 "/usr/include/c++/4.4/cmath" 3 inline long double asin(long double __x) # 129 "/usr/include/c++/4.4/cmath" 3 { return __builtin_asinl(__x); } # 131 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type asin ( _Tp __x ) { return __builtin_asin ( __x ); } # 137 "/usr/include/c++/4.4/cmath" 3 using ::atan; # 140 "/usr/include/c++/4.4/cmath" 3 inline float atan(float __x) # 141 "/usr/include/c++/4.4/cmath" 3 { return __builtin_atanf(__x); } # 144 "/usr/include/c++/4.4/cmath" 3 inline long double atan(long double __x) # 145 "/usr/include/c++/4.4/cmath" 3 { return __builtin_atanl(__x); } # 147 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type atan ( _Tp __x ) { return __builtin_atan ( __x ); } # 153 "/usr/include/c++/4.4/cmath" 3 using ::atan2; # 156 "/usr/include/c++/4.4/cmath" 3 inline float atan2(float __y, float __x) # 157 "/usr/include/c++/4.4/cmath" 3 { return __builtin_atan2f(__y, __x); } # 160 "/usr/include/c++/4.4/cmath" 3 inline long double atan2(long double __y, long double __x) # 161 "/usr/include/c++/4.4/cmath" 3 { return __builtin_atan2l(__y, __x); } # 163 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp, typename _Up > inline typename __gnu_cxx :: __promote_2 < typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value && __is_arithmetic < _Up > :: __value, _Tp > :: __type, _Up > :: __type atan2 ( _Tp __y, _Up __x ) { typedef typename __gnu_cxx :: __promote_2 < _Tp, _Up > :: __type __type; return atan2 ( __type ( __y ), __type ( __x ) ); } # 175 "/usr/include/c++/4.4/cmath" 3 using ::ceil; # 178 "/usr/include/c++/4.4/cmath" 3 inline float ceil(float __x) # 179 "/usr/include/c++/4.4/cmath" 3 { return __builtin_ceilf(__x); } # 182 "/usr/include/c++/4.4/cmath" 3 inline long double ceil(long double __x) # 183 "/usr/include/c++/4.4/cmath" 3 { return __builtin_ceill(__x); } # 185 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type ceil ( _Tp __x ) { return __builtin_ceil ( __x ); } # 191 "/usr/include/c++/4.4/cmath" 3 using ::cos; # 194 "/usr/include/c++/4.4/cmath" 3 inline float cos(float __x) # 195 "/usr/include/c++/4.4/cmath" 3 { return __builtin_cosf(__x); } # 198 "/usr/include/c++/4.4/cmath" 3 inline long double cos(long double __x) # 199 "/usr/include/c++/4.4/cmath" 3 { return __builtin_cosl(__x); } # 201 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type cos ( _Tp __x ) { return __builtin_cos ( __x ); } # 207 "/usr/include/c++/4.4/cmath" 3 using ::cosh; # 210 "/usr/include/c++/4.4/cmath" 3 inline float cosh(float __x) # 211 "/usr/include/c++/4.4/cmath" 3 { return __builtin_coshf(__x); } # 214 "/usr/include/c++/4.4/cmath" 3 inline long double cosh(long double __x) # 215 "/usr/include/c++/4.4/cmath" 3 { return __builtin_coshl(__x); } # 217 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type cosh ( _Tp __x ) { return __builtin_cosh ( __x ); } # 223 "/usr/include/c++/4.4/cmath" 3 using ::exp; # 226 "/usr/include/c++/4.4/cmath" 3 inline float exp(float __x) # 227 "/usr/include/c++/4.4/cmath" 3 { return __builtin_expf(__x); } # 230 "/usr/include/c++/4.4/cmath" 3 inline long double exp(long double __x) # 231 "/usr/include/c++/4.4/cmath" 3 { return __builtin_expl(__x); } # 233 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type exp ( _Tp __x ) { return __builtin_exp ( __x ); } # 239 "/usr/include/c++/4.4/cmath" 3 using ::fabs; # 242 "/usr/include/c++/4.4/cmath" 3 inline float fabs(float __x) # 243 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fabsf(__x); } # 246 "/usr/include/c++/4.4/cmath" 3 inline long double fabs(long double __x) # 247 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fabsl(__x); } # 249 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type fabs ( _Tp __x ) { return __builtin_fabs ( __x ); } # 255 "/usr/include/c++/4.4/cmath" 3 using ::floor; # 258 "/usr/include/c++/4.4/cmath" 3 inline float floor(float __x) # 259 "/usr/include/c++/4.4/cmath" 3 { return __builtin_floorf(__x); } # 262 "/usr/include/c++/4.4/cmath" 3 inline long double floor(long double __x) # 263 "/usr/include/c++/4.4/cmath" 3 { return __builtin_floorl(__x); } # 265 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type floor ( _Tp __x ) { return __builtin_floor ( __x ); } # 271 "/usr/include/c++/4.4/cmath" 3 using ::fmod; # 274 "/usr/include/c++/4.4/cmath" 3 inline float fmod(float __x, float __y) # 275 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fmodf(__x, __y); } # 278 "/usr/include/c++/4.4/cmath" 3 inline long double fmod(long double __x, long double __y) # 279 "/usr/include/c++/4.4/cmath" 3 { return __builtin_fmodl(__x, __y); } # 281 "/usr/include/c++/4.4/cmath" 3 using ::frexp; # 284 "/usr/include/c++/4.4/cmath" 3 inline float frexp(float __x, int *__exp) # 285 "/usr/include/c++/4.4/cmath" 3 { return __builtin_frexpf(__x, __exp); } # 288 "/usr/include/c++/4.4/cmath" 3 inline long double frexp(long double __x, int *__exp) # 289 "/usr/include/c++/4.4/cmath" 3 { return __builtin_frexpl(__x, __exp); } # 291 "/usr/include/c++/4.4/cmath" 3 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 ); } # 297 "/usr/include/c++/4.4/cmath" 3 using ::ldexp; # 300 "/usr/include/c++/4.4/cmath" 3 inline float ldexp(float __x, int __exp) # 301 "/usr/include/c++/4.4/cmath" 3 { return __builtin_ldexpf(__x, __exp); } # 304 "/usr/include/c++/4.4/cmath" 3 inline long double ldexp(long double __x, int __exp) # 305 "/usr/include/c++/4.4/cmath" 3 { return __builtin_ldexpl(__x, __exp); } # 307 "/usr/include/c++/4.4/cmath" 3 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 ); } # 313 "/usr/include/c++/4.4/cmath" 3 using ::log; # 316 "/usr/include/c++/4.4/cmath" 3 inline float log(float __x) # 317 "/usr/include/c++/4.4/cmath" 3 { return __builtin_logf(__x); } # 320 "/usr/include/c++/4.4/cmath" 3 inline long double log(long double __x) # 321 "/usr/include/c++/4.4/cmath" 3 { return __builtin_logl(__x); } # 323 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type log ( _Tp __x ) { return __builtin_log ( __x ); } # 329 "/usr/include/c++/4.4/cmath" 3 using ::log10; # 332 "/usr/include/c++/4.4/cmath" 3 inline float log10(float __x) # 333 "/usr/include/c++/4.4/cmath" 3 { return __builtin_log10f(__x); } # 336 "/usr/include/c++/4.4/cmath" 3 inline long double log10(long double __x) # 337 "/usr/include/c++/4.4/cmath" 3 { return __builtin_log10l(__x); } # 339 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type log10 ( _Tp __x ) { return __builtin_log10 ( __x ); } # 345 "/usr/include/c++/4.4/cmath" 3 using ::modf; # 348 "/usr/include/c++/4.4/cmath" 3 inline float modf(float __x, float *__iptr) # 349 "/usr/include/c++/4.4/cmath" 3 { return __builtin_modff(__x, __iptr); } # 352 "/usr/include/c++/4.4/cmath" 3 inline long double modf(long double __x, long double *__iptr) # 353 "/usr/include/c++/4.4/cmath" 3 { return __builtin_modfl(__x, __iptr); } # 355 "/usr/include/c++/4.4/cmath" 3 using ::pow; # 358 "/usr/include/c++/4.4/cmath" 3 inline float pow(float __x, float __y) # 359 "/usr/include/c++/4.4/cmath" 3 { return __builtin_powf(__x, __y); } # 362 "/usr/include/c++/4.4/cmath" 3 inline long double pow(long double __x, long double __y) # 363 "/usr/include/c++/4.4/cmath" 3 { return __builtin_powl(__x, __y); } # 369 "/usr/include/c++/4.4/cmath" 3 inline double pow(double __x, int __i) # 370 "/usr/include/c++/4.4/cmath" 3 { return __builtin_powi(__x, __i); } # 373 "/usr/include/c++/4.4/cmath" 3 inline float pow(float __x, int __n) # 374 "/usr/include/c++/4.4/cmath" 3 { return __builtin_powif(__x, __n); } # 377 "/usr/include/c++/4.4/cmath" 3 inline long double pow(long double __x, int __n) # 378 "/usr/include/c++/4.4/cmath" 3 { return __builtin_powil(__x, __n); } # 381 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp, typename _Up > inline typename __gnu_cxx :: __promote_2 < typename __gnu_cxx :: __enable_if < __is_arithmetic < _Tp > :: __value && __is_arithmetic < _Up > :: __value, _Tp > :: __type, _Up > :: __type pow ( _Tp __x, _Up __y ) { typedef typename __gnu_cxx :: __promote_2 < _Tp, _Up > :: __type __type; return pow ( __type ( __x ), __type ( __y ) ); } # 393 "/usr/include/c++/4.4/cmath" 3 using ::sin; # 396 "/usr/include/c++/4.4/cmath" 3 inline float sin(float __x) # 397 "/usr/include/c++/4.4/cmath" 3 { return __builtin_sinf(__x); } # 400 "/usr/include/c++/4.4/cmath" 3 inline long double sin(long double __x) # 401 "/usr/include/c++/4.4/cmath" 3 { return __builtin_sinl(__x); } # 403 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type sin ( _Tp __x ) { return __builtin_sin ( __x ); } # 409 "/usr/include/c++/4.4/cmath" 3 using ::sinh; # 412 "/usr/include/c++/4.4/cmath" 3 inline float sinh(float __x) # 413 "/usr/include/c++/4.4/cmath" 3 { return __builtin_sinhf(__x); } # 416 "/usr/include/c++/4.4/cmath" 3 inline long double sinh(long double __x) # 417 "/usr/include/c++/4.4/cmath" 3 { return __builtin_sinhl(__x); } # 419 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type sinh ( _Tp __x ) { return __builtin_sinh ( __x ); } # 425 "/usr/include/c++/4.4/cmath" 3 using ::sqrt; # 428 "/usr/include/c++/4.4/cmath" 3 inline float sqrt(float __x) # 429 "/usr/include/c++/4.4/cmath" 3 { return __builtin_sqrtf(__x); } # 432 "/usr/include/c++/4.4/cmath" 3 inline long double sqrt(long double __x) # 433 "/usr/include/c++/4.4/cmath" 3 { return __builtin_sqrtl(__x); } # 435 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type sqrt ( _Tp __x ) { return __builtin_sqrt ( __x ); } # 441 "/usr/include/c++/4.4/cmath" 3 using ::tan; # 444 "/usr/include/c++/4.4/cmath" 3 inline float tan(float __x) # 445 "/usr/include/c++/4.4/cmath" 3 { return __builtin_tanf(__x); } # 448 "/usr/include/c++/4.4/cmath" 3 inline long double tan(long double __x) # 449 "/usr/include/c++/4.4/cmath" 3 { return __builtin_tanl(__x); } # 451 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type tan ( _Tp __x ) { return __builtin_tan ( __x ); } # 457 "/usr/include/c++/4.4/cmath" 3 using ::tanh; # 460 "/usr/include/c++/4.4/cmath" 3 inline float tanh(float __x) # 461 "/usr/include/c++/4.4/cmath" 3 { return __builtin_tanhf(__x); } # 464 "/usr/include/c++/4.4/cmath" 3 inline long double tanh(long double __x) # 465 "/usr/include/c++/4.4/cmath" 3 { return __builtin_tanhl(__x); } # 467 "/usr/include/c++/4.4/cmath" 3 template < typename _Tp > inline typename __gnu_cxx :: __enable_if < __is_integer < _Tp > :: __value, double > :: __type tanh ( _Tp __x ) { return __builtin_tanh ( __x ); } # 473 "/usr/include/c++/4.4/cmath" 3 } # 492 "/usr/include/c++/4.4/cmath" 3 namespace std __attribute__((visibility("default"))) { # 494 "/usr/include/c++/4.4/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 ( FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __type ( __f ) ); } # 504 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 513 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 522 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 531 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 540 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 549 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 558 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 567 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 576 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 585 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 594 "/usr/include/c++/4.4/cmath" 3 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 ) ); } # 603 "/usr/include/c++/4.4/cmath" 3 } # 35 "/usr/include/c++/4.4/bits/cmath.tcc" 3 namespace std __attribute__((visibility("default"))) { # 37 "/usr/include/c++/4.4/bits/cmath.tcc" 3 template < typename _Tp > inline _Tp __cmath_power ( _Tp __x, unsigned int __n ) { _Tp __y = __n % 2 ? __x : _Tp ( 1 ); while ( __n >>= 1 ) { __x = __x * __x; if ( __n % 2 ) __y = __y * __x; } return __y; } # 53 "/usr/include/c++/4.4/bits/cmath.tcc" 3 } # 49 "/usr/include/c++/4.4/cstddef" 3 namespace std __attribute__((visibility("default"))) { # 51 "/usr/include/c++/4.4/cstddef" 3 using ::ptrdiff_t; # 52 "/usr/include/c++/4.4/cstddef" 3 using ::size_t; # 54 "/usr/include/c++/4.4/cstddef" 3 } # 100 "/usr/include/c++/4.4/cstdlib" 3 namespace std __attribute__((visibility("default"))) { # 102 "/usr/include/c++/4.4/cstdlib" 3 using ::div_t; # 103 "/usr/include/c++/4.4/cstdlib" 3 using ::ldiv_t; # 105 "/usr/include/c++/4.4/cstdlib" 3 using ::abort; # 106 "/usr/include/c++/4.4/cstdlib" 3 using ::abs; # 107 "/usr/include/c++/4.4/cstdlib" 3 using ::atexit; # 108 "/usr/include/c++/4.4/cstdlib" 3 using ::atof; # 109 "/usr/include/c++/4.4/cstdlib" 3 using ::atoi; # 110 "/usr/include/c++/4.4/cstdlib" 3 using ::atol; # 111 "/usr/include/c++/4.4/cstdlib" 3 using ::bsearch; # 112 "/usr/include/c++/4.4/cstdlib" 3 using ::calloc; # 113 "/usr/include/c++/4.4/cstdlib" 3 using ::div; # 114 "/usr/include/c++/4.4/cstdlib" 3 using ::exit; # 115 "/usr/include/c++/4.4/cstdlib" 3 using ::free; # 116 "/usr/include/c++/4.4/cstdlib" 3 using ::getenv; # 117 "/usr/include/c++/4.4/cstdlib" 3 using ::labs; # 118 "/usr/include/c++/4.4/cstdlib" 3 using ::ldiv; # 119 "/usr/include/c++/4.4/cstdlib" 3 using ::malloc; # 121 "/usr/include/c++/4.4/cstdlib" 3 using ::mblen; # 122 "/usr/include/c++/4.4/cstdlib" 3 using ::mbstowcs; # 123 "/usr/include/c++/4.4/cstdlib" 3 using ::mbtowc; # 125 "/usr/include/c++/4.4/cstdlib" 3 using ::qsort; # 126 "/usr/include/c++/4.4/cstdlib" 3 using ::rand; # 127 "/usr/include/c++/4.4/cstdlib" 3 using ::realloc; # 128 "/usr/include/c++/4.4/cstdlib" 3 using ::srand; # 129 "/usr/include/c++/4.4/cstdlib" 3 using ::strtod; # 130 "/usr/include/c++/4.4/cstdlib" 3 using ::strtol; # 131 "/usr/include/c++/4.4/cstdlib" 3 using ::strtoul; # 132 "/usr/include/c++/4.4/cstdlib" 3 using ::system; # 134 "/usr/include/c++/4.4/cstdlib" 3 using ::wcstombs; # 135 "/usr/include/c++/4.4/cstdlib" 3 using ::wctomb; # 139 "/usr/include/c++/4.4/cstdlib" 3 inline long abs(long __i) { return labs(__i); } # 142 "/usr/include/c++/4.4/cstdlib" 3 inline ldiv_t div(long __i, long __j) { return ldiv(__i, __j); } # 144 "/usr/include/c++/4.4/cstdlib" 3 } # 157 "/usr/include/c++/4.4/cstdlib" 3 namespace __gnu_cxx __attribute__((visibility("default"))) { # 160 "/usr/include/c++/4.4/cstdlib" 3 using ::lldiv_t; # 166 "/usr/include/c++/4.4/cstdlib" 3 using ::_Exit; # 170 "/usr/include/c++/4.4/cstdlib" 3 inline long long abs(long long __x) { return (__x >= (0)) ? __x : (-__x); } # 173 "/usr/include/c++/4.4/cstdlib" 3 using ::llabs; # 176 "/usr/include/c++/4.4/cstdlib" 3 inline lldiv_t div(long long __n, long long __d) # 177 "/usr/include/c++/4.4/cstdlib" 3 { lldiv_t __q; (__q.quot) = (__n / __d); (__q.rem) = (__n % __d); return __q; } # 179 "/usr/include/c++/4.4/cstdlib" 3 using ::lldiv; # 190 "/usr/include/c++/4.4/cstdlib" 3 using ::atoll; # 191 "/usr/include/c++/4.4/cstdlib" 3 using ::strtoll; # 192 "/usr/include/c++/4.4/cstdlib" 3 using ::strtoull; # 194 "/usr/include/c++/4.4/cstdlib" 3 using ::strtof; # 195 "/usr/include/c++/4.4/cstdlib" 3 using ::strtold; # 197 "/usr/include/c++/4.4/cstdlib" 3 } # 199 "/usr/include/c++/4.4/cstdlib" 3 namespace std __attribute__((visibility("default"))) { # 202 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::lldiv_t; # 204 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::_Exit; # 205 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::abs; # 207 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::llabs; # 208 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::div; # 209 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::lldiv; # 211 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::atoll; # 212 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::strtof; # 213 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::strtoll; # 214 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::strtoull; # 215 "/usr/include/c++/4.4/cstdlib" 3 using __gnu_cxx::strtold; # 217 "/usr/include/c++/4.4/cstdlib" 3 } # 497 "/usr/local/cuda/bin/../include/math_functions.h" namespace __gnu_cxx { # 499 "/usr/local/cuda/bin/../include/math_functions.h" extern inline long long abs(long long) __attribute__((visibility("default"))); # 500 "/usr/local/cuda/bin/../include/math_functions.h" } # 502 "/usr/local/cuda/bin/../include/math_functions.h" namespace std { # 504 "/usr/local/cuda/bin/../include/math_functions.h" template< class T> extern inline T __pow_helper(T, int); # 505 "/usr/local/cuda/bin/../include/math_functions.h" template< class T> extern inline T __cmath_power(T, unsigned); # 506 "/usr/local/cuda/bin/../include/math_functions.h" } # 508 "/usr/local/cuda/bin/../include/math_functions.h" using std::abs; # 509 "/usr/local/cuda/bin/../include/math_functions.h" using std::fabs; # 510 "/usr/local/cuda/bin/../include/math_functions.h" using std::ceil; # 511 "/usr/local/cuda/bin/../include/math_functions.h" using std::floor; # 512 "/usr/local/cuda/bin/../include/math_functions.h" using std::sqrt; # 513 "/usr/local/cuda/bin/../include/math_functions.h" using std::pow; # 514 "/usr/local/cuda/bin/../include/math_functions.h" using std::log; # 515 "/usr/local/cuda/bin/../include/math_functions.h" using std::log10; # 516 "/usr/local/cuda/bin/../include/math_functions.h" using std::fmod; # 517 "/usr/local/cuda/bin/../include/math_functions.h" using std::modf; # 518 "/usr/local/cuda/bin/../include/math_functions.h" using std::exp; # 519 "/usr/local/cuda/bin/../include/math_functions.h" using std::frexp; # 520 "/usr/local/cuda/bin/../include/math_functions.h" using std::ldexp; # 521 "/usr/local/cuda/bin/../include/math_functions.h" using std::asin; # 522 "/usr/local/cuda/bin/../include/math_functions.h" using std::sin; # 523 "/usr/local/cuda/bin/../include/math_functions.h" using std::sinh; # 524 "/usr/local/cuda/bin/../include/math_functions.h" using std::acos; # 525 "/usr/local/cuda/bin/../include/math_functions.h" using std::cos; # 526 "/usr/local/cuda/bin/../include/math_functions.h" using std::cosh; # 527 "/usr/local/cuda/bin/../include/math_functions.h" using std::atan; # 528 "/usr/local/cuda/bin/../include/math_functions.h" using std::atan2; # 529 "/usr/local/cuda/bin/../include/math_functions.h" using std::tan; # 530 "/usr/local/cuda/bin/../include/math_functions.h" using std::tanh; # 584 "/usr/local/cuda/bin/../include/math_functions.h" namespace std { # 587 "/usr/local/cuda/bin/../include/math_functions.h" extern inline long abs(long) __attribute__((visibility("default"))); # 588 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float abs(float) __attribute__((visibility("default"))); # 589 "/usr/local/cuda/bin/../include/math_functions.h" extern inline double abs(double) __attribute__((visibility("default"))); # 590 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float fabs(float) __attribute__((visibility("default"))); # 591 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float ceil(float) __attribute__((visibility("default"))); # 592 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float floor(float) __attribute__((visibility("default"))); # 593 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float sqrt(float) __attribute__((visibility("default"))); # 594 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float pow(float, float) __attribute__((visibility("default"))); # 595 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float pow(float, int) __attribute__((visibility("default"))); # 596 "/usr/local/cuda/bin/../include/math_functions.h" extern inline double pow(double, int) __attribute__((visibility("default"))); # 597 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float log(float) __attribute__((visibility("default"))); # 598 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float log10(float) __attribute__((visibility("default"))); # 599 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float fmod(float, float) __attribute__((visibility("default"))); # 600 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float modf(float, float *) __attribute__((visibility("default"))); # 601 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float exp(float) __attribute__((visibility("default"))); # 602 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float frexp(float, int *) __attribute__((visibility("default"))); # 603 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float ldexp(float, int) __attribute__((visibility("default"))); # 604 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float asin(float) __attribute__((visibility("default"))); # 605 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float sin(float) __attribute__((visibility("default"))); # 606 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float sinh(float) __attribute__((visibility("default"))); # 607 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float acos(float) __attribute__((visibility("default"))); # 608 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float cos(float) __attribute__((visibility("default"))); # 609 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float cosh(float) __attribute__((visibility("default"))); # 610 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float atan(float) __attribute__((visibility("default"))); # 611 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float atan2(float, float) __attribute__((visibility("default"))); # 612 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float tan(float) __attribute__((visibility("default"))); # 613 "/usr/local/cuda/bin/../include/math_functions.h" extern inline float tanh(float) __attribute__((visibility("default"))); # 616 "/usr/local/cuda/bin/../include/math_functions.h" } # 619 "/usr/local/cuda/bin/../include/math_functions.h" static inline float logb(float a) # 620 "/usr/local/cuda/bin/../include/math_functions.h" { # 621 "/usr/local/cuda/bin/../include/math_functions.h" return logbf(a); # 622 "/usr/local/cuda/bin/../include/math_functions.h" } # 624 "/usr/local/cuda/bin/../include/math_functions.h" static inline int ilogb(float a) # 625 "/usr/local/cuda/bin/../include/math_functions.h" { # 626 "/usr/local/cuda/bin/../include/math_functions.h" return ilogbf(a); # 627 "/usr/local/cuda/bin/../include/math_functions.h" } # 629 "/usr/local/cuda/bin/../include/math_functions.h" static inline float scalbn(float a, int b) # 630 "/usr/local/cuda/bin/../include/math_functions.h" { # 631 "/usr/local/cuda/bin/../include/math_functions.h" return scalbnf(a, b); # 632 "/usr/local/cuda/bin/../include/math_functions.h" } # 634 "/usr/local/cuda/bin/../include/math_functions.h" static inline float scalbln(float a, long b) # 635 "/usr/local/cuda/bin/../include/math_functions.h" { # 636 "/usr/local/cuda/bin/../include/math_functions.h" return scalblnf(a, b); # 637 "/usr/local/cuda/bin/../include/math_functions.h" } # 639 "/usr/local/cuda/bin/../include/math_functions.h" static inline float exp2(float a) # 640 "/usr/local/cuda/bin/../include/math_functions.h" { # 641 "/usr/local/cuda/bin/../include/math_functions.h" return exp2f(a); # 642 "/usr/local/cuda/bin/../include/math_functions.h" } # 644 "/usr/local/cuda/bin/../include/math_functions.h" static inline float exp10(float a) # 645 "/usr/local/cuda/bin/../include/math_functions.h" { # 646 "/usr/local/cuda/bin/../include/math_functions.h" return exp10f(a); # 647 "/usr/local/cuda/bin/../include/math_functions.h" } # 649 "/usr/local/cuda/bin/../include/math_functions.h" static inline float expm1(float a) # 650 "/usr/local/cuda/bin/../include/math_functions.h" { # 651 "/usr/local/cuda/bin/../include/math_functions.h" return expm1f(a); # 652 "/usr/local/cuda/bin/../include/math_functions.h" } # 654 "/usr/local/cuda/bin/../include/math_functions.h" static inline float log2(float a) # 655 "/usr/local/cuda/bin/../include/math_functions.h" { # 656 "/usr/local/cuda/bin/../include/math_functions.h" return log2f(a); # 657 "/usr/local/cuda/bin/../include/math_functions.h" } # 659 "/usr/local/cuda/bin/../include/math_functions.h" static inline float log1p(float a) # 660 "/usr/local/cuda/bin/../include/math_functions.h" { # 661 "/usr/local/cuda/bin/../include/math_functions.h" return log1pf(a); # 662 "/usr/local/cuda/bin/../include/math_functions.h" } # 664 "/usr/local/cuda/bin/../include/math_functions.h" static inline float rsqrt(float a) # 665 "/usr/local/cuda/bin/../include/math_functions.h" { # 666 "/usr/local/cuda/bin/../include/math_functions.h" return rsqrtf(a); # 667 "/usr/local/cuda/bin/../include/math_functions.h" } # 669 "/usr/local/cuda/bin/../include/math_functions.h" static inline float acosh(float a) # 670 "/usr/local/cuda/bin/../include/math_functions.h" { # 671 "/usr/local/cuda/bin/../include/math_functions.h" return acoshf(a); # 672 "/usr/local/cuda/bin/../include/math_functions.h" } # 674 "/usr/local/cuda/bin/../include/math_functions.h" static inline float asinh(float a) # 675 "/usr/local/cuda/bin/../include/math_functions.h" { # 676 "/usr/local/cuda/bin/../include/math_functions.h" return asinhf(a); # 677 "/usr/local/cuda/bin/../include/math_functions.h" } # 679 "/usr/local/cuda/bin/../include/math_functions.h" static inline float atanh(float a) # 680 "/usr/local/cuda/bin/../include/math_functions.h" { # 681 "/usr/local/cuda/bin/../include/math_functions.h" return atanhf(a); # 682 "/usr/local/cuda/bin/../include/math_functions.h" } # 684 "/usr/local/cuda/bin/../include/math_functions.h" static inline float hypot(float a, float b) # 685 "/usr/local/cuda/bin/../include/math_functions.h" { # 686 "/usr/local/cuda/bin/../include/math_functions.h" return hypotf(a, b); # 687 "/usr/local/cuda/bin/../include/math_functions.h" } # 689 "/usr/local/cuda/bin/../include/math_functions.h" static inline float cbrt(float a) # 690 "/usr/local/cuda/bin/../include/math_functions.h" { # 691 "/usr/local/cuda/bin/../include/math_functions.h" return cbrtf(a); # 692 "/usr/local/cuda/bin/../include/math_functions.h" } # 694 "/usr/local/cuda/bin/../include/math_functions.h" static inline float rcbrt(float a) # 695 "/usr/local/cuda/bin/../include/math_functions.h" { # 696 "/usr/local/cuda/bin/../include/math_functions.h" return rcbrtf(a); # 697 "/usr/local/cuda/bin/../include/math_functions.h" } # 699 "/usr/local/cuda/bin/../include/math_functions.h" static inline float sinpi(float a) # 700 "/usr/local/cuda/bin/../include/math_functions.h" { # 701 "/usr/local/cuda/bin/../include/math_functions.h" return sinpif(a); # 702 "/usr/local/cuda/bin/../include/math_functions.h" } # 704 "/usr/local/cuda/bin/../include/math_functions.h" static inline void sincos(float a, float *sptr, float *cptr) # 705 "/usr/local/cuda/bin/../include/math_functions.h" { # 706 "/usr/local/cuda/bin/../include/math_functions.h" sincosf(a, sptr, cptr); # 707 "/usr/local/cuda/bin/../include/math_functions.h" } # 709 "/usr/local/cuda/bin/../include/math_functions.h" static inline float erf(float a) # 710 "/usr/local/cuda/bin/../include/math_functions.h" { # 711 "/usr/local/cuda/bin/../include/math_functions.h" return erff(a); # 712 "/usr/local/cuda/bin/../include/math_functions.h" } # 714 "/usr/local/cuda/bin/../include/math_functions.h" static inline float erfinv(float a) # 715 "/usr/local/cuda/bin/../include/math_functions.h" { # 716 "/usr/local/cuda/bin/../include/math_functions.h" return erfinvf(a); # 717 "/usr/local/cuda/bin/../include/math_functions.h" } # 719 "/usr/local/cuda/bin/../include/math_functions.h" static inline float erfc(float a) # 720 "/usr/local/cuda/bin/../include/math_functions.h" { # 721 "/usr/local/cuda/bin/../include/math_functions.h" return erfcf(a); # 722 "/usr/local/cuda/bin/../include/math_functions.h" } # 724 "/usr/local/cuda/bin/../include/math_functions.h" static inline float erfcinv(float a) # 725 "/usr/local/cuda/bin/../include/math_functions.h" { # 726 "/usr/local/cuda/bin/../include/math_functions.h" return erfcinvf(a); # 727 "/usr/local/cuda/bin/../include/math_functions.h" } # 729 "/usr/local/cuda/bin/../include/math_functions.h" static inline float lgamma(float a) # 730 "/usr/local/cuda/bin/../include/math_functions.h" { # 731 "/usr/local/cuda/bin/../include/math_functions.h" return lgammaf(a); # 732 "/usr/local/cuda/bin/../include/math_functions.h" } # 734 "/usr/local/cuda/bin/../include/math_functions.h" static inline float tgamma(float a) # 735 "/usr/local/cuda/bin/../include/math_functions.h" { # 736 "/usr/local/cuda/bin/../include/math_functions.h" return tgammaf(a); # 737 "/usr/local/cuda/bin/../include/math_functions.h" } # 739 "/usr/local/cuda/bin/../include/math_functions.h" static inline float copysign(float a, float b) # 740 "/usr/local/cuda/bin/../include/math_functions.h" { # 741 "/usr/local/cuda/bin/../include/math_functions.h" return copysignf(a, b); # 742 "/usr/local/cuda/bin/../include/math_functions.h" } # 744 "/usr/local/cuda/bin/../include/math_functions.h" static inline double copysign(double a, float b) # 745 "/usr/local/cuda/bin/../include/math_functions.h" { # 746 "/usr/local/cuda/bin/../include/math_functions.h" return copysign(a, (double)b); # 747 "/usr/local/cuda/bin/../include/math_functions.h" } # 749 "/usr/local/cuda/bin/../include/math_functions.h" static inline float copysign(float a, double b) # 750 "/usr/local/cuda/bin/../include/math_functions.h" { # 751 "/usr/local/cuda/bin/../include/math_functions.h" return copysignf(a, (float)b); # 752 "/usr/local/cuda/bin/../include/math_functions.h" } # 754 "/usr/local/cuda/bin/../include/math_functions.h" static inline float nextafter(float a, float b) # 755 "/usr/local/cuda/bin/../include/math_functions.h" { # 756 "/usr/local/cuda/bin/../include/math_functions.h" return nextafterf(a, b); # 757 "/usr/local/cuda/bin/../include/math_functions.h" } # 759 "/usr/local/cuda/bin/../include/math_functions.h" static inline float remainder(float a, float b) # 760 "/usr/local/cuda/bin/../include/math_functions.h" { # 761 "/usr/local/cuda/bin/../include/math_functions.h" return remainderf(a, b); # 762 "/usr/local/cuda/bin/../include/math_functions.h" } # 764 "/usr/local/cuda/bin/../include/math_functions.h" static inline float remquo(float a, float b, int *quo) # 765 "/usr/local/cuda/bin/../include/math_functions.h" { # 766 "/usr/local/cuda/bin/../include/math_functions.h" return remquof(a, b, quo); # 767 "/usr/local/cuda/bin/../include/math_functions.h" } # 769 "/usr/local/cuda/bin/../include/math_functions.h" static inline float round(float a) # 770 "/usr/local/cuda/bin/../include/math_functions.h" { # 771 "/usr/local/cuda/bin/../include/math_functions.h" return roundf(a); # 772 "/usr/local/cuda/bin/../include/math_functions.h" } # 774 "/usr/local/cuda/bin/../include/math_functions.h" static inline long lround(float a) # 775 "/usr/local/cuda/bin/../include/math_functions.h" { # 776 "/usr/local/cuda/bin/../include/math_functions.h" return lroundf(a); # 777 "/usr/local/cuda/bin/../include/math_functions.h" } # 779 "/usr/local/cuda/bin/../include/math_functions.h" static inline long long llround(float a) # 780 "/usr/local/cuda/bin/../include/math_functions.h" { # 781 "/usr/local/cuda/bin/../include/math_functions.h" return llroundf(a); # 782 "/usr/local/cuda/bin/../include/math_functions.h" } # 784 "/usr/local/cuda/bin/../include/math_functions.h" static inline float trunc(float a) # 785 "/usr/local/cuda/bin/../include/math_functions.h" { # 786 "/usr/local/cuda/bin/../include/math_functions.h" return truncf(a); # 787 "/usr/local/cuda/bin/../include/math_functions.h" } # 789 "/usr/local/cuda/bin/../include/math_functions.h" static inline float rint(float a) # 790 "/usr/local/cuda/bin/../include/math_functions.h" { # 791 "/usr/local/cuda/bin/../include/math_functions.h" return rintf(a); # 792 "/usr/local/cuda/bin/../include/math_functions.h" } # 794 "/usr/local/cuda/bin/../include/math_functions.h" static inline long lrint(float a) # 795 "/usr/local/cuda/bin/../include/math_functions.h" { # 796 "/usr/local/cuda/bin/../include/math_functions.h" return lrintf(a); # 797 "/usr/local/cuda/bin/../include/math_functions.h" } # 799 "/usr/local/cuda/bin/../include/math_functions.h" static inline long long llrint(float a) # 800 "/usr/local/cuda/bin/../include/math_functions.h" { # 801 "/usr/local/cuda/bin/../include/math_functions.h" return llrintf(a); # 802 "/usr/local/cuda/bin/../include/math_functions.h" } # 804 "/usr/local/cuda/bin/../include/math_functions.h" static inline float nearbyint(float a) # 805 "/usr/local/cuda/bin/../include/math_functions.h" { # 806 "/usr/local/cuda/bin/../include/math_functions.h" return nearbyintf(a); # 807 "/usr/local/cuda/bin/../include/math_functions.h" } # 809 "/usr/local/cuda/bin/../include/math_functions.h" static inline float fdim(float a, float b) # 810 "/usr/local/cuda/bin/../include/math_functions.h" { # 811 "/usr/local/cuda/bin/../include/math_functions.h" return fdimf(a, b); # 812 "/usr/local/cuda/bin/../include/math_functions.h" } # 814 "/usr/local/cuda/bin/../include/math_functions.h" static inline float fma(float a, float b, float c) # 815 "/usr/local/cuda/bin/../include/math_functions.h" { # 816 "/usr/local/cuda/bin/../include/math_functions.h" return fmaf(a, b, c); # 817 "/usr/local/cuda/bin/../include/math_functions.h" } # 819 "/usr/local/cuda/bin/../include/math_functions.h" static inline float fmax(float a, float b) # 820 "/usr/local/cuda/bin/../include/math_functions.h" { # 821 "/usr/local/cuda/bin/../include/math_functions.h" return fmaxf(a, b); # 822 "/usr/local/cuda/bin/../include/math_functions.h" } # 824 "/usr/local/cuda/bin/../include/math_functions.h" static inline float fmin(float a, float b) # 825 "/usr/local/cuda/bin/../include/math_functions.h" { # 826 "/usr/local/cuda/bin/../include/math_functions.h" return fminf(a, b); # 827 "/usr/local/cuda/bin/../include/math_functions.h" } # 829 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned min(unsigned a, unsigned b) # 830 "/usr/local/cuda/bin/../include/math_functions.h" { # 831 "/usr/local/cuda/bin/../include/math_functions.h" return umin(a, b); # 832 "/usr/local/cuda/bin/../include/math_functions.h" } # 834 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned min(int a, unsigned b) # 835 "/usr/local/cuda/bin/../include/math_functions.h" { # 836 "/usr/local/cuda/bin/../include/math_functions.h" return umin((unsigned)a, b); # 837 "/usr/local/cuda/bin/../include/math_functions.h" } # 839 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned min(unsigned a, int b) # 840 "/usr/local/cuda/bin/../include/math_functions.h" { # 841 "/usr/local/cuda/bin/../include/math_functions.h" return umin(a, (unsigned)b); # 842 "/usr/local/cuda/bin/../include/math_functions.h" } # 844 "/usr/local/cuda/bin/../include/math_functions.h" static inline long long min(long long a, long long b) # 845 "/usr/local/cuda/bin/../include/math_functions.h" { # 846 "/usr/local/cuda/bin/../include/math_functions.h" return llmin(a, b); # 847 "/usr/local/cuda/bin/../include/math_functions.h" } # 849 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned long long min(unsigned long long a, unsigned long long b) # 850 "/usr/local/cuda/bin/../include/math_functions.h" { # 851 "/usr/local/cuda/bin/../include/math_functions.h" return ullmin(a, b); # 852 "/usr/local/cuda/bin/../include/math_functions.h" } # 854 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned long long min(long long a, unsigned long long b) # 855 "/usr/local/cuda/bin/../include/math_functions.h" { # 856 "/usr/local/cuda/bin/../include/math_functions.h" return ullmin((unsigned long long)a, b); # 857 "/usr/local/cuda/bin/../include/math_functions.h" } # 859 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned long long min(unsigned long long a, long long b) # 860 "/usr/local/cuda/bin/../include/math_functions.h" { # 861 "/usr/local/cuda/bin/../include/math_functions.h" return ullmin(a, (unsigned long long)b); # 862 "/usr/local/cuda/bin/../include/math_functions.h" } # 864 "/usr/local/cuda/bin/../include/math_functions.h" static inline float min(float a, float b) # 865 "/usr/local/cuda/bin/../include/math_functions.h" { # 866 "/usr/local/cuda/bin/../include/math_functions.h" return fminf(a, b); # 867 "/usr/local/cuda/bin/../include/math_functions.h" } # 869 "/usr/local/cuda/bin/../include/math_functions.h" static inline double min(double a, double b) # 870 "/usr/local/cuda/bin/../include/math_functions.h" { # 871 "/usr/local/cuda/bin/../include/math_functions.h" return fmin(a, b); # 872 "/usr/local/cuda/bin/../include/math_functions.h" } # 874 "/usr/local/cuda/bin/../include/math_functions.h" static inline double min(float a, double b) # 875 "/usr/local/cuda/bin/../include/math_functions.h" { # 876 "/usr/local/cuda/bin/../include/math_functions.h" return fmin((double)a, b); # 877 "/usr/local/cuda/bin/../include/math_functions.h" } # 879 "/usr/local/cuda/bin/../include/math_functions.h" static inline double min(double a, float b) # 880 "/usr/local/cuda/bin/../include/math_functions.h" { # 881 "/usr/local/cuda/bin/../include/math_functions.h" return fmin(a, (double)b); # 882 "/usr/local/cuda/bin/../include/math_functions.h" } # 884 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned max(unsigned a, unsigned b) # 885 "/usr/local/cuda/bin/../include/math_functions.h" { # 886 "/usr/local/cuda/bin/../include/math_functions.h" return umax(a, b); # 887 "/usr/local/cuda/bin/../include/math_functions.h" } # 889 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned max(int a, unsigned b) # 890 "/usr/local/cuda/bin/../include/math_functions.h" { # 891 "/usr/local/cuda/bin/../include/math_functions.h" return umax((unsigned)a, b); # 892 "/usr/local/cuda/bin/../include/math_functions.h" } # 894 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned max(unsigned a, int b) # 895 "/usr/local/cuda/bin/../include/math_functions.h" { # 896 "/usr/local/cuda/bin/../include/math_functions.h" return umax(a, (unsigned)b); # 897 "/usr/local/cuda/bin/../include/math_functions.h" } # 899 "/usr/local/cuda/bin/../include/math_functions.h" static inline long long max(long long a, long long b) # 900 "/usr/local/cuda/bin/../include/math_functions.h" { # 901 "/usr/local/cuda/bin/../include/math_functions.h" return llmax(a, b); # 902 "/usr/local/cuda/bin/../include/math_functions.h" } # 904 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned long long max(unsigned long long a, unsigned long long b) # 905 "/usr/local/cuda/bin/../include/math_functions.h" { # 906 "/usr/local/cuda/bin/../include/math_functions.h" return ullmax(a, b); # 907 "/usr/local/cuda/bin/../include/math_functions.h" } # 909 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned long long max(long long a, unsigned long long b) # 910 "/usr/local/cuda/bin/../include/math_functions.h" { # 911 "/usr/local/cuda/bin/../include/math_functions.h" return ullmax((unsigned long long)a, b); # 912 "/usr/local/cuda/bin/../include/math_functions.h" } # 914 "/usr/local/cuda/bin/../include/math_functions.h" static inline unsigned long long max(unsigned long long a, long long b) # 915 "/usr/local/cuda/bin/../include/math_functions.h" { # 916 "/usr/local/cuda/bin/../include/math_functions.h" return ullmax(a, (unsigned long long)b); # 917 "/usr/local/cuda/bin/../include/math_functions.h" } # 919 "/usr/local/cuda/bin/../include/math_functions.h" static inline float max(float a, float b) # 920 "/usr/local/cuda/bin/../include/math_functions.h" { # 921 "/usr/local/cuda/bin/../include/math_functions.h" return fmaxf(a, b); # 922 "/usr/local/cuda/bin/../include/math_functions.h" } # 924 "/usr/local/cuda/bin/../include/math_functions.h" static inline double max(double a, double b) # 925 "/usr/local/cuda/bin/../include/math_functions.h" { # 926 "/usr/local/cuda/bin/../include/math_functions.h" return fmax(a, b); # 927 "/usr/local/cuda/bin/../include/math_functions.h" } # 929 "/usr/local/cuda/bin/../include/math_functions.h" static inline double max(float a, double b) # 930 "/usr/local/cuda/bin/../include/math_functions.h" { # 931 "/usr/local/cuda/bin/../include/math_functions.h" return fmax((double)a, b); # 932 "/usr/local/cuda/bin/../include/math_functions.h" } # 934 "/usr/local/cuda/bin/../include/math_functions.h" static inline double max(double a, float b) # 935 "/usr/local/cuda/bin/../include/math_functions.h" { # 936 "/usr/local/cuda/bin/../include/math_functions.h" return fmax(a, (double)b); # 937 "/usr/local/cuda/bin/../include/math_functions.h" } # 60 "/usr/local/cuda/bin/../include/cuda_surface_types.h" template< class T, int dim = 1> # 61 "/usr/local/cuda/bin/../include/cuda_surface_types.h" struct surface : public surfaceReference { # 63 "/usr/local/cuda/bin/../include/cuda_surface_types.h" surface() # 64 "/usr/local/cuda/bin/../include/cuda_surface_types.h" { # 65 "/usr/local/cuda/bin/../include/cuda_surface_types.h" (channelDesc) = cudaCreateChannelDesc< T> (); # 66 "/usr/local/cuda/bin/../include/cuda_surface_types.h" } # 68 "/usr/local/cuda/bin/../include/cuda_surface_types.h" surface(cudaChannelFormatDesc desc) # 69 "/usr/local/cuda/bin/../include/cuda_surface_types.h" { # 70 "/usr/local/cuda/bin/../include/cuda_surface_types.h" (channelDesc) = desc; # 71 "/usr/local/cuda/bin/../include/cuda_surface_types.h" } # 72 "/usr/local/cuda/bin/../include/cuda_surface_types.h" }; # 75 "/usr/local/cuda/bin/../include/cuda_surface_types.h" template< int dim> # 76 "/usr/local/cuda/bin/../include/cuda_surface_types.h" struct surface< void, dim> : public surfaceReference { # 78 "/usr/local/cuda/bin/../include/cuda_surface_types.h" surface() # 79 "/usr/local/cuda/bin/../include/cuda_surface_types.h" { # 80 "/usr/local/cuda/bin/../include/cuda_surface_types.h" (channelDesc) = cudaCreateChannelDesc< void> (); # 81 "/usr/local/cuda/bin/../include/cuda_surface_types.h" } # 82 "/usr/local/cuda/bin/../include/cuda_surface_types.h" }; # 60 "/usr/local/cuda/bin/../include/cuda_texture_types.h" template< class T, int dim = 1, cudaTextureReadMode mode = cudaReadModeElementType> # 61 "/usr/local/cuda/bin/../include/cuda_texture_types.h" struct texture : public textureReference { # 63 "/usr/local/cuda/bin/../include/cuda_texture_types.h" texture(int norm = 0, cudaTextureFilterMode # 64 "/usr/local/cuda/bin/../include/cuda_texture_types.h" fMode = cudaFilterModePoint, cudaTextureAddressMode # 65 "/usr/local/cuda/bin/../include/cuda_texture_types.h" aMode = cudaAddressModeClamp) # 66 "/usr/local/cuda/bin/../include/cuda_texture_types.h" { # 67 "/usr/local/cuda/bin/../include/cuda_texture_types.h" (normalized) = norm; # 68 "/usr/local/cuda/bin/../include/cuda_texture_types.h" (filterMode) = fMode; # 69 "/usr/local/cuda/bin/../include/cuda_texture_types.h" ((addressMode)[0]) = aMode; # 70 "/usr/local/cuda/bin/../include/cuda_texture_types.h" ((addressMode)[1]) = aMode; # 71 "/usr/local/cuda/bin/../include/cuda_texture_types.h" ((addressMode)[2]) = aMode; # 72 "/usr/local/cuda/bin/../include/cuda_texture_types.h" (channelDesc) = cudaCreateChannelDesc< T> (); # 73 "/usr/local/cuda/bin/../include/cuda_texture_types.h" } # 75 "/usr/local/cuda/bin/../include/cuda_texture_types.h" texture(int norm, cudaTextureFilterMode # 76 "/usr/local/cuda/bin/../include/cuda_texture_types.h" fMode, cudaTextureAddressMode # 77 "/usr/local/cuda/bin/../include/cuda_texture_types.h" aMode, cudaChannelFormatDesc # 78 "/usr/local/cuda/bin/../include/cuda_texture_types.h" desc) # 79 "/usr/local/cuda/bin/../include/cuda_texture_types.h" { # 80 "/usr/local/cuda/bin/../include/cuda_texture_types.h" (normalized) = norm; # 81 "/usr/local/cuda/bin/../include/cuda_texture_types.h" (filterMode) = fMode; # 82 "/usr/local/cuda/bin/../include/cuda_texture_types.h" ((addressMode)[0]) = aMode; # 83 "/usr/local/cuda/bin/../include/cuda_texture_types.h" ((addressMode)[1]) = aMode; # 84 "/usr/local/cuda/bin/../include/cuda_texture_types.h" ((addressMode)[2]) = aMode; # 85 "/usr/local/cuda/bin/../include/cuda_texture_types.h" (channelDesc) = desc; # 86 "/usr/local/cuda/bin/../include/cuda_texture_types.h" } # 87 "/usr/local/cuda/bin/../include/cuda_texture_types.h" }; # 324 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline int mulhi(int a, int b) # 325 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 327 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 329 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned mulhi(unsigned a, unsigned b) # 330 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 332 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 334 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned mulhi(int a, unsigned b) # 335 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 337 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 339 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned mulhi(unsigned a, int b) # 340 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 342 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 344 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline long long mul64hi(long long a, long long b) # 345 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 347 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 349 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned long long mul64hi(unsigned long long a, unsigned long long b) # 350 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 352 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 354 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned long long mul64hi(long long a, unsigned long long b) # 355 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 357 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 359 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned long long mul64hi(unsigned long long a, long long b) # 360 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 362 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 364 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline int float_as_int(float a) # 365 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 367 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 369 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline float int_as_float(int a) # 370 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 372 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 374 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline float saturate(float a) # 375 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 377 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 379 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline int mul24(int a, int b) # 380 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 382 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 384 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned umul24(unsigned a, unsigned b) # 385 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 387 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 389 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline void trap() # 390 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 392 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 394 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline void brkpt(int c) # 395 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 397 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 399 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline void syncthreads() # 400 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 402 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 404 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline void prof_trigger(int e) # 405 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 422 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 424 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline void threadfence(bool global = true) # 425 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 427 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 429 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline int float2int(float a, cudaRoundMode mode = cudaRoundZero) # 430 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 435 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 437 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline unsigned float2uint(float a, cudaRoundMode mode = cudaRoundZero) # 438 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 443 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 445 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline float int2float(int a, cudaRoundMode mode = cudaRoundNearest) # 446 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 451 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 453 "/usr/local/cuda/bin/../include/device_functions.h" __attribute__((unused)) static inline float uint2float(unsigned a, cudaRoundMode mode = cudaRoundNearest) # 454 "/usr/local/cuda/bin/../include/device_functions.h" {int volatile ___ = 1; # 459 "/usr/local/cuda/bin/../include/device_functions.h" exit(___);} # 102 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicAdd(int *address, int val) # 103 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 105 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 107 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicAdd(unsigned *address, unsigned val) # 108 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 110 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 112 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicSub(int *address, int val) # 113 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 115 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 117 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicSub(unsigned *address, unsigned val) # 118 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 120 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 122 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicExch(int *address, int val) # 123 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 125 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 127 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicExch(unsigned *address, unsigned val) # 128 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 130 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 132 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline float atomicExch(float *address, float val) # 133 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 135 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 137 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicMin(int *address, int val) # 138 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 140 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 142 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicMin(unsigned *address, unsigned val) # 143 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 145 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 147 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicMax(int *address, int val) # 148 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 150 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 152 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicMax(unsigned *address, unsigned val) # 153 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 155 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 157 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicInc(unsigned *address, unsigned val) # 158 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 160 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 162 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicDec(unsigned *address, unsigned val) # 163 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 165 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 167 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicAnd(int *address, int val) # 168 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 170 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 172 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicAnd(unsigned *address, unsigned val) # 173 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 175 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 177 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicOr(int *address, int val) # 178 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 180 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 182 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicOr(unsigned *address, unsigned val) # 183 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 185 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 187 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicXor(int *address, int val) # 188 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 190 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 192 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicXor(unsigned *address, unsigned val) # 193 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 195 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 197 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline int atomicCAS(int *address, int compare, int val) # 198 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 200 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 202 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" __attribute__((unused)) static inline unsigned atomicCAS(unsigned *address, unsigned compare, unsigned val) # 203 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" {int volatile ___ = 1; # 205 "/usr/local/cuda/bin/../include/sm_11_atomic_functions.h" exit(___);} # 75 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" __attribute__((unused)) static inline unsigned long long atomicAdd(unsigned long long *address, unsigned long long val) # 76 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" {int volatile ___ = 1; # 78 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" exit(___);} # 80 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" __attribute__((unused)) static inline unsigned long long atomicExch(unsigned long long *address, unsigned long long val) # 81 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" {int volatile ___ = 1; # 83 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" exit(___);} # 85 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" __attribute__((unused)) static inline unsigned long long atomicCAS(unsigned long long *address, unsigned long long compare, unsigned long long val) # 86 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" {int volatile ___ = 1; # 88 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" exit(___);} # 90 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" __attribute__((unused)) static inline bool any(bool cond) # 91 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" {int volatile ___ = 1; # 93 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" exit(___);} # 95 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" __attribute__((unused)) static inline bool all(bool cond) # 96 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" {int volatile ___ = 1; # 98 "/usr/local/cuda/bin/../include/sm_12_atomic_functions.h" exit(___);} # 170 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double fma(double a, double b, double c, cudaRoundMode mode) # 171 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 176 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 178 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double dmul(double a, double b, cudaRoundMode mode = cudaRoundNearest) # 179 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 184 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 186 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double dadd(double a, double b, cudaRoundMode mode = cudaRoundNearest) # 187 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 192 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 194 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline int double2int(double a, cudaRoundMode mode = cudaRoundZero) # 195 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 200 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 202 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline unsigned double2uint(double a, cudaRoundMode mode = cudaRoundZero) # 203 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 208 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 210 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline long long double2ll(double a, cudaRoundMode mode = cudaRoundZero) # 211 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 216 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 218 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline unsigned long long double2ull(double a, cudaRoundMode mode = cudaRoundZero) # 219 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 224 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 226 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double ll2double(long long a, cudaRoundMode mode = cudaRoundNearest) # 227 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 232 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 234 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double ull2double(unsigned long long a, cudaRoundMode mode = cudaRoundNearest) # 235 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 240 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 242 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double int2double(int a, cudaRoundMode mode = cudaRoundNearest) # 243 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 245 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 247 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double uint2double(unsigned a, cudaRoundMode mode = cudaRoundNearest) # 248 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 250 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 252 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" __attribute__((unused)) static inline double float2double(float a, cudaRoundMode mode = cudaRoundNearest) # 253 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" {int volatile ___ = 1; # 255 "/usr/local/cuda/bin/../include/sm_13_double_functions.h" exit(___);} # 66 "/usr/local/cuda/bin/../include/sm_20_atomic_functions.h" __attribute__((unused)) static inline float atomicAdd(float *address, float val) # 67 "/usr/local/cuda/bin/../include/sm_20_atomic_functions.h" {int volatile ___ = 1; # 69 "/usr/local/cuda/bin/../include/sm_20_atomic_functions.h" exit(___);} # 124 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" __attribute__((unused)) static inline unsigned ballot(bool pred) # 125 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" {int volatile ___ = 1; # 127 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" exit(___);} # 129 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" __attribute__((unused)) static inline int syncthreads_count(bool pred) # 130 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" {int volatile ___ = 1; # 132 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" exit(___);} # 134 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" __attribute__((unused)) static inline bool syncthreads_and(bool pred) # 135 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" {int volatile ___ = 1; # 137 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" exit(___);} # 139 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" __attribute__((unused)) static inline bool syncthreads_or(bool pred) # 140 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" {int volatile ___ = 1; # 142 "/usr/local/cuda/bin/../include/sm_20_intrinsics.h" exit(___);} # 97 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 98 "/usr/local/cuda/bin/../include/surface_functions.h" surf1Dread(T *res, surface< void, 1> surf, int x, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 99 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 106 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 108 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 109 "/usr/local/cuda/bin/../include/surface_functions.h" surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 110 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 116 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 118 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 119 "/usr/local/cuda/bin/../include/surface_functions.h" surf1Dread(T *res, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 120 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 122 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 125 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 126 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 128 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 131 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 132 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 134 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 137 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 138 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 140 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 143 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 144 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 146 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 149 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 150 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 152 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 155 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 156 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 160 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 163 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 164 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 166 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 169 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 170 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 174 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 177 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 178 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 180 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 183 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 184 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 186 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 189 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 190 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 192 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 195 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 196 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 198 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 201 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 202 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 204 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 207 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 208 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 212 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 215 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 216 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 218 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 221 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 222 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 226 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 229 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 230 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 232 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 235 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 236 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 238 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 241 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 242 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 244 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 247 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 248 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 250 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 253 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 254 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 256 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 259 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 260 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 264 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 267 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 268 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 270 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 273 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 274 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 278 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 281 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 282 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 284 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 287 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline long long surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 288 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 290 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 293 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 294 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 296 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 299 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 300 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 302 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 305 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 306 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 308 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 311 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 312 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 316 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 319 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 320 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 322 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 385 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 386 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 388 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 391 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 392 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 394 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 397 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 398 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 402 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 405 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf1Dread(surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode) # 406 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 410 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 457 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 458 "/usr/local/cuda/bin/../include/surface_functions.h" surf2Dread(T *res, surface< void, 2> surf, int x, int y, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 459 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 466 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 468 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline T # 469 "/usr/local/cuda/bin/../include/surface_functions.h" surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 470 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 476 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 478 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 479 "/usr/local/cuda/bin/../include/surface_functions.h" surf2Dread(T *res, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 480 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 482 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 485 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 486 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 488 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 491 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline signed char surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 492 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 494 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 497 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned char surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 498 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 500 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 503 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 504 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 506 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 509 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uchar1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 510 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 512 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 515 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 516 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 520 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 523 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uchar2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 524 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 526 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 529 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline char4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 530 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 534 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 537 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uchar4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 538 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 540 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 543 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 544 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 546 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 549 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned short surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 550 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 552 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 555 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 556 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 558 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 561 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ushort1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 562 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 564 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 567 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 568 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 572 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 575 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ushort2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 576 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 578 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 581 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline short4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 582 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 586 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 589 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ushort4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 590 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 592 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 595 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 596 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 598 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 601 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 602 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 604 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 607 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 608 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 610 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 613 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uint1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 614 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 616 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 619 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 620 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 624 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 627 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uint2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 628 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 630 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 633 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline int4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 634 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 638 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 641 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline uint4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 642 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 644 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 647 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline long long surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 648 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 650 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 653 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline unsigned long long surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 654 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 656 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 659 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline longlong1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 660 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 662 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 665 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 666 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 668 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 671 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline longlong2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 672 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 676 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 679 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline ulonglong2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 680 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 682 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 745 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 746 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 748 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 751 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float1 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 752 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 754 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 757 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float2 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 758 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 762 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 765 "/usr/local/cuda/bin/../include/surface_functions.h" template<> __attribute__((unused)) inline float4 surf2Dread(surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode) # 766 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 770 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 817 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 818 "/usr/local/cuda/bin/../include/surface_functions.h" surf1Dwrite(T val, surface< void, 1> surf, int x, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 819 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 837 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 839 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 840 "/usr/local/cuda/bin/../include/surface_functions.h" surf1Dwrite(T val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 841 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 843 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 846 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 847 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 849 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 851 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(signed char val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 852 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 854 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 856 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned char val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 857 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 859 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 861 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 862 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 864 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 866 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uchar1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 867 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 869 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 871 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 872 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 874 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 876 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uchar2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 877 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 879 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 881 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(char4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 882 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 884 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 886 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uchar4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 887 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 889 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 891 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 892 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 894 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 896 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned short val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 897 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 899 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 901 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 902 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 904 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 906 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ushort1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 907 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 909 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 911 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 912 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 914 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 916 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ushort2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 917 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 919 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 921 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(short4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 922 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 924 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 926 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ushort4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 927 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 929 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 931 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 932 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 934 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 936 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 937 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 939 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 941 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 942 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 944 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 946 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uint1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 947 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 949 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 951 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 952 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 954 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 956 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uint2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 957 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 959 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 961 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(int4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 962 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 964 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 966 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(uint4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 967 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 969 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 971 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(long long val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 972 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 974 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 976 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(unsigned long long val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 977 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 979 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 981 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(longlong1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 982 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 984 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 986 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ulonglong1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 987 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 989 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 991 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(longlong2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 992 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 994 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 996 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(ulonglong2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 997 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 999 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1045 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1046 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1048 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1050 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float1 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1051 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1053 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1055 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float2 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1056 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1058 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1060 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf1Dwrite(float4 val, surface< void, 1> surf, int x, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1061 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1063 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1110 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1111 "/usr/local/cuda/bin/../include/surface_functions.h" surf2Dwrite(T val, surface< void, 2> surf, int x, int y, int s, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1112 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1130 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1132 "/usr/local/cuda/bin/../include/surface_functions.h" template< class T> __attribute__((unused)) static inline void # 1133 "/usr/local/cuda/bin/../include/surface_functions.h" surf2Dwrite(T val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1134 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1136 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1139 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1140 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1142 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1144 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(signed char val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1145 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1147 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1149 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned char val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1150 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1152 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1154 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1155 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1157 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1159 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uchar1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1160 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1162 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1164 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1165 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1167 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1169 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uchar2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1170 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1172 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1174 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(char4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1175 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1177 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1179 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uchar4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1180 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1182 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1184 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1185 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1187 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1189 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned short val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1190 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1192 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1194 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1195 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1197 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1199 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ushort1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1200 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1202 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1204 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1205 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1207 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1209 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ushort2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1210 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1212 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1214 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(short4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1215 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1217 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1219 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ushort4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1220 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1222 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1224 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1225 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1227 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1229 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1230 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1232 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1234 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1235 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1237 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1239 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uint1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1240 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1242 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1244 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1245 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1247 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1249 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uint2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1250 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1252 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1254 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(int4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1255 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1257 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1259 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(uint4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1260 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1262 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1264 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(long long val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1265 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1267 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1269 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(unsigned long long val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1270 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1272 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1274 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(longlong1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1275 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1277 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1279 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ulonglong1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1280 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1282 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1284 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(longlong2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1285 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1287 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1289 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(ulonglong2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1290 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1292 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1338 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1339 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1341 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1343 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float1 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1344 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1346 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1348 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float2 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1349 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1351 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 1353 "/usr/local/cuda/bin/../include/surface_functions.h" __attribute__((unused)) static inline void surf2Dwrite(float4 val, surface< void, 2> surf, int x, int y, cudaSurfaceBoundaryMode mode = cudaBoundaryModeTrap) # 1354 "/usr/local/cuda/bin/../include/surface_functions.h" {int volatile ___ = 1; # 1356 "/usr/local/cuda/bin/../include/surface_functions.h" exit(___);} # 61 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< class T, cudaTextureReadMode readMode> __attribute__((unused)) extern uint4 __utexfetchi(texture< T, 1, readMode> , int4); # 63 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< class T, cudaTextureReadMode readMode> __attribute__((unused)) extern int4 __itexfetchi(texture< T, 1, readMode> , int4); # 65 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< class T, cudaTextureReadMode readMode> __attribute__((unused)) extern float4 __ftexfetchi(texture< T, 1, readMode> , int4); # 68 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< class T, int dim, cudaTextureReadMode readMode> __attribute__((unused)) extern uint4 __utexfetch(texture< T, dim, readMode> , float4, int = dim); # 70 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< class T, int dim, cudaTextureReadMode readMode> __attribute__((unused)) extern int4 __itexfetch(texture< T, dim, readMode> , float4, int = dim); # 72 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< class T, int dim, cudaTextureReadMode readMode> __attribute__((unused)) extern float4 __ftexfetch(texture< T, dim, readMode> , float4, int = dim); # 80 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex1Dfetch(texture< char, 1, cudaReadModeElementType> t, int x) # 81 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 89 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 91 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex1Dfetch(texture< signed char, 1, cudaReadModeElementType> t, int x) # 92 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 96 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 98 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex1Dfetch(texture< unsigned char, 1, cudaReadModeElementType> t, int x) # 99 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 103 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 105 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex1Dfetch(texture< char1, 1, cudaReadModeElementType> t, int x) # 106 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 110 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 112 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex1Dfetch(texture< uchar1, 1, cudaReadModeElementType> t, int x) # 113 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 117 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 119 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex1Dfetch(texture< char2, 1, cudaReadModeElementType> t, int x) # 120 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 124 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 126 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex1Dfetch(texture< uchar2, 1, cudaReadModeElementType> t, int x) # 127 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 131 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 133 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex1Dfetch(texture< char4, 1, cudaReadModeElementType> t, int x) # 134 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 138 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 140 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex1Dfetch(texture< uchar4, 1, cudaReadModeElementType> t, int x) # 141 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 145 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 153 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex1Dfetch(texture< short, 1, cudaReadModeElementType> t, int x) # 154 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 158 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 160 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex1Dfetch(texture< unsigned short, 1, cudaReadModeElementType> t, int x) # 161 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 165 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 167 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex1Dfetch(texture< short1, 1, cudaReadModeElementType> t, int x) # 168 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 172 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 174 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex1Dfetch(texture< ushort1, 1, cudaReadModeElementType> t, int x) # 175 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 179 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 181 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex1Dfetch(texture< short2, 1, cudaReadModeElementType> t, int x) # 182 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 186 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 188 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex1Dfetch(texture< ushort2, 1, cudaReadModeElementType> t, int x) # 189 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 193 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 195 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex1Dfetch(texture< short4, 1, cudaReadModeElementType> t, int x) # 196 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 200 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 202 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex1Dfetch(texture< ushort4, 1, cudaReadModeElementType> t, int x) # 203 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 207 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 215 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex1Dfetch(texture< int, 1, cudaReadModeElementType> t, int x) # 216 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 220 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 222 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex1Dfetch(texture< unsigned, 1, cudaReadModeElementType> t, int x) # 223 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 227 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 229 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex1Dfetch(texture< int1, 1, cudaReadModeElementType> t, int x) # 230 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 234 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 236 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex1Dfetch(texture< uint1, 1, cudaReadModeElementType> t, int x) # 237 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 241 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 243 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex1Dfetch(texture< int2, 1, cudaReadModeElementType> t, int x) # 244 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 248 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 250 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex1Dfetch(texture< uint2, 1, cudaReadModeElementType> t, int x) # 251 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 255 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 257 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex1Dfetch(texture< int4, 1, cudaReadModeElementType> t, int x) # 258 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 262 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 264 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex1Dfetch(texture< uint4, 1, cudaReadModeElementType> t, int x) # 265 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 269 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 343 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< float, 1, cudaReadModeElementType> t, int x) # 344 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 348 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 350 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< float1, 1, cudaReadModeElementType> t, int x) # 351 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 355 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 357 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< float2, 1, cudaReadModeElementType> t, int x) # 358 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 362 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 364 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< float4, 1, cudaReadModeElementType> t, int x) # 365 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 369 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 377 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< char, 1, cudaReadModeNormalizedFloat> t, int x) # 378 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 387 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 389 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< signed char, 1, cudaReadModeNormalizedFloat> t, int x) # 390 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 395 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 397 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< unsigned char, 1, cudaReadModeNormalizedFloat> t, int x) # 398 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 403 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 405 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< char1, 1, cudaReadModeNormalizedFloat> t, int x) # 406 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 411 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 413 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< uchar1, 1, cudaReadModeNormalizedFloat> t, int x) # 414 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 419 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 421 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< char2, 1, cudaReadModeNormalizedFloat> t, int x) # 422 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 427 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 429 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< uchar2, 1, cudaReadModeNormalizedFloat> t, int x) # 430 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 435 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 437 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< char4, 1, cudaReadModeNormalizedFloat> t, int x) # 438 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 443 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 445 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< uchar4, 1, cudaReadModeNormalizedFloat> t, int x) # 446 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 451 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 459 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< short, 1, cudaReadModeNormalizedFloat> t, int x) # 460 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 465 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 467 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1Dfetch(texture< unsigned short, 1, cudaReadModeNormalizedFloat> t, int x) # 468 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 473 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 475 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< short1, 1, cudaReadModeNormalizedFloat> t, int x) # 476 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 481 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 483 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1Dfetch(texture< ushort1, 1, cudaReadModeNormalizedFloat> t, int x) # 484 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 489 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 491 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< short2, 1, cudaReadModeNormalizedFloat> t, int x) # 492 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 497 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 499 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1Dfetch(texture< ushort2, 1, cudaReadModeNormalizedFloat> t, int x) # 500 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 505 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 507 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< short4, 1, cudaReadModeNormalizedFloat> t, int x) # 508 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 513 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 515 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1Dfetch(texture< ushort4, 1, cudaReadModeNormalizedFloat> t, int x) # 516 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 521 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 529 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex1D(texture< char, 1, cudaReadModeElementType> t, float x) # 530 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 538 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 540 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex1D(texture< signed char, 1, cudaReadModeElementType> t, float x) # 541 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 545 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 547 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex1D(texture< unsigned char, 1, cudaReadModeElementType> t, float x) # 548 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 552 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 554 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex1D(texture< char1, 1, cudaReadModeElementType> t, float x) # 555 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 559 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 561 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex1D(texture< uchar1, 1, cudaReadModeElementType> t, float x) # 562 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 566 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 568 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex1D(texture< char2, 1, cudaReadModeElementType> t, float x) # 569 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 573 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 575 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex1D(texture< uchar2, 1, cudaReadModeElementType> t, float x) # 576 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 580 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 582 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex1D(texture< char4, 1, cudaReadModeElementType> t, float x) # 583 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 587 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 589 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex1D(texture< uchar4, 1, cudaReadModeElementType> t, float x) # 590 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 594 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 602 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex1D(texture< short, 1, cudaReadModeElementType> t, float x) # 603 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 607 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 609 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex1D(texture< unsigned short, 1, cudaReadModeElementType> t, float x) # 610 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 614 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 616 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex1D(texture< short1, 1, cudaReadModeElementType> t, float x) # 617 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 621 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 623 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex1D(texture< ushort1, 1, cudaReadModeElementType> t, float x) # 624 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 628 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 630 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex1D(texture< short2, 1, cudaReadModeElementType> t, float x) # 631 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 635 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 637 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex1D(texture< ushort2, 1, cudaReadModeElementType> t, float x) # 638 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 642 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 644 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex1D(texture< short4, 1, cudaReadModeElementType> t, float x) # 645 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 649 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 651 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex1D(texture< ushort4, 1, cudaReadModeElementType> t, float x) # 652 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 656 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 664 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex1D(texture< int, 1, cudaReadModeElementType> t, float x) # 665 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 669 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 671 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex1D(texture< unsigned, 1, cudaReadModeElementType> t, float x) # 672 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 676 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 678 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex1D(texture< int1, 1, cudaReadModeElementType> t, float x) # 679 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 683 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 685 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex1D(texture< uint1, 1, cudaReadModeElementType> t, float x) # 686 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 690 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 692 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex1D(texture< int2, 1, cudaReadModeElementType> t, float x) # 693 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 697 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 699 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex1D(texture< uint2, 1, cudaReadModeElementType> t, float x) # 700 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 704 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 706 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex1D(texture< int4, 1, cudaReadModeElementType> t, float x) # 707 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 711 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 713 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex1D(texture< uint4, 1, cudaReadModeElementType> t, float x) # 714 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 718 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 798 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< float, 1, cudaReadModeElementType> t, float x) # 799 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 803 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 805 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< float1, 1, cudaReadModeElementType> t, float x) # 806 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 810 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 812 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< float2, 1, cudaReadModeElementType> t, float x) # 813 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 817 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 819 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< float4, 1, cudaReadModeElementType> t, float x) # 820 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 824 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 832 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< char, 1, cudaReadModeNormalizedFloat> t, float x) # 833 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 842 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 844 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< signed char, 1, cudaReadModeNormalizedFloat> t, float x) # 845 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 850 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 852 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< unsigned char, 1, cudaReadModeNormalizedFloat> t, float x) # 853 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 858 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 860 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< char1, 1, cudaReadModeNormalizedFloat> t, float x) # 861 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 866 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 868 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< uchar1, 1, cudaReadModeNormalizedFloat> t, float x) # 869 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 874 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 876 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< char2, 1, cudaReadModeNormalizedFloat> t, float x) # 877 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 882 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 884 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< uchar2, 1, cudaReadModeNormalizedFloat> t, float x) # 885 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 890 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 892 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< char4, 1, cudaReadModeNormalizedFloat> t, float x) # 893 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 898 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 900 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< uchar4, 1, cudaReadModeNormalizedFloat> t, float x) # 901 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 906 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 914 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< short, 1, cudaReadModeNormalizedFloat> t, float x) # 915 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 920 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 922 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex1D(texture< unsigned short, 1, cudaReadModeNormalizedFloat> t, float x) # 923 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 928 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 930 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< short1, 1, cudaReadModeNormalizedFloat> t, float x) # 931 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 936 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 938 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex1D(texture< ushort1, 1, cudaReadModeNormalizedFloat> t, float x) # 939 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 944 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 946 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< short2, 1, cudaReadModeNormalizedFloat> t, float x) # 947 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 952 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 954 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex1D(texture< ushort2, 1, cudaReadModeNormalizedFloat> t, float x) # 955 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 960 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 962 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< short4, 1, cudaReadModeNormalizedFloat> t, float x) # 963 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 968 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 970 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex1D(texture< ushort4, 1, cudaReadModeNormalizedFloat> t, float x) # 971 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 976 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 984 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex2D(texture< char, 2, cudaReadModeElementType> t, float x, float y) # 985 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 993 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 995 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex2D(texture< signed char, 2, cudaReadModeElementType> t, float x, float y) # 996 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1000 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1002 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex2D(texture< unsigned char, 2, cudaReadModeElementType> t, float x, float y) # 1003 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1007 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1009 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex2D(texture< char1, 2, cudaReadModeElementType> t, float x, float y) # 1010 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1014 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1016 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex2D(texture< uchar1, 2, cudaReadModeElementType> t, float x, float y) # 1017 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1021 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1023 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex2D(texture< char2, 2, cudaReadModeElementType> t, float x, float y) # 1024 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1028 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1030 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex2D(texture< uchar2, 2, cudaReadModeElementType> t, float x, float y) # 1031 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1035 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1037 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2D(texture< char4, 2, cudaReadModeElementType> t, float x, float y) # 1038 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1042 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1044 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2D(texture< uchar4, 2, cudaReadModeElementType> t, float x, float y) # 1045 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1049 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1057 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex2D(texture< short, 2, cudaReadModeElementType> t, float x, float y) # 1058 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1062 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1064 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex2D(texture< unsigned short, 2, cudaReadModeElementType> t, float x, float y) # 1065 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1069 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1071 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex2D(texture< short1, 2, cudaReadModeElementType> t, float x, float y) # 1072 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1076 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1078 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex2D(texture< ushort1, 2, cudaReadModeElementType> t, float x, float y) # 1079 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1083 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1085 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex2D(texture< short2, 2, cudaReadModeElementType> t, float x, float y) # 1086 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1090 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1092 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex2D(texture< ushort2, 2, cudaReadModeElementType> t, float x, float y) # 1093 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1097 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1099 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2D(texture< short4, 2, cudaReadModeElementType> t, float x, float y) # 1100 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1104 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1106 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2D(texture< ushort4, 2, cudaReadModeElementType> t, float x, float y) # 1107 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1111 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1119 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex2D(texture< int, 2, cudaReadModeElementType> t, float x, float y) # 1120 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1124 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1126 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex2D(texture< unsigned, 2, cudaReadModeElementType> t, float x, float y) # 1127 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1131 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1133 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex2D(texture< int1, 2, cudaReadModeElementType> t, float x, float y) # 1134 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1138 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1140 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex2D(texture< uint1, 2, cudaReadModeElementType> t, float x, float y) # 1141 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1145 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1147 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex2D(texture< int2, 2, cudaReadModeElementType> t, float x, float y) # 1148 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1152 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1154 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex2D(texture< uint2, 2, cudaReadModeElementType> t, float x, float y) # 1155 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1159 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1161 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2D(texture< int4, 2, cudaReadModeElementType> t, float x, float y) # 1162 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1166 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1168 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2D(texture< uint4, 2, cudaReadModeElementType> t, float x, float y) # 1169 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1173 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1247 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< float, 2, cudaReadModeElementType> t, float x, float y) # 1248 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1252 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1254 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< float1, 2, cudaReadModeElementType> t, float x, float y) # 1255 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1259 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1261 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< float2, 2, cudaReadModeElementType> t, float x, float y) # 1262 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1266 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1268 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< float4, 2, cudaReadModeElementType> t, float x, float y) # 1269 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1273 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1281 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< char, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1282 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1291 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1293 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< signed char, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1294 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1299 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1301 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< unsigned char, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1302 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1307 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1309 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< char1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1310 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1315 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1317 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< uchar1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1318 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1323 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1325 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< char2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1326 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1331 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1333 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< uchar2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1334 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1339 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1341 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< char4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1342 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1347 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1349 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< uchar4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1350 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1355 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1363 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< short, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1364 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1369 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1371 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex2D(texture< unsigned short, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1372 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1377 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1379 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< short1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1380 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1385 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1387 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex2D(texture< ushort1, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1388 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1393 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1395 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< short2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1396 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1401 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1403 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex2D(texture< ushort2, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1404 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1409 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1411 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< short4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1412 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1417 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1419 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2D(texture< ushort4, 2, cudaReadModeNormalizedFloat> t, float x, float y) # 1420 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1425 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1433 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char tex3D(texture< char, 3, cudaReadModeElementType> t, float x, float y, float z) # 1434 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1442 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1444 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline signed char tex3D(texture< signed char, 3, cudaReadModeElementType> t, float x, float y, float z) # 1445 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1449 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1451 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned char tex3D(texture< unsigned char, 3, cudaReadModeElementType> t, float x, float y, float z) # 1452 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1456 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1458 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char1 tex3D(texture< char1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1459 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1463 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1465 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar1 tex3D(texture< uchar1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1466 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1470 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1472 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char2 tex3D(texture< char2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1473 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1477 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1479 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar2 tex3D(texture< uchar2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1480 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1484 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1486 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex3D(texture< char4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1487 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1491 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1493 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex3D(texture< uchar4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1494 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1498 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1506 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short tex3D(texture< short, 3, cudaReadModeElementType> t, float x, float y, float z) # 1507 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1511 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1513 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned short tex3D(texture< unsigned short, 3, cudaReadModeElementType> t, float x, float y, float z) # 1514 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1518 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1520 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short1 tex3D(texture< short1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1521 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1525 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1527 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort1 tex3D(texture< ushort1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1528 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1532 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1534 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short2 tex3D(texture< short2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1535 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1539 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1541 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort2 tex3D(texture< ushort2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1542 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1546 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1548 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex3D(texture< short4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1549 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1553 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1555 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex3D(texture< ushort4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1556 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1560 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1568 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int tex3D(texture< int, 3, cudaReadModeElementType> t, float x, float y, float z) # 1569 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1573 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1575 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline unsigned tex3D(texture< unsigned, 3, cudaReadModeElementType> t, float x, float y, float z) # 1576 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1580 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1582 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int1 tex3D(texture< int1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1583 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1587 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1589 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint1 tex3D(texture< uint1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1590 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1594 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1596 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int2 tex3D(texture< int2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1597 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1601 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1603 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint2 tex3D(texture< uint2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1604 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1608 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1610 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex3D(texture< int4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1611 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1615 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1617 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex3D(texture< uint4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1618 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1622 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1696 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< float, 3, cudaReadModeElementType> t, float x, float y, float z) # 1697 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1701 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1703 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< float1, 3, cudaReadModeElementType> t, float x, float y, float z) # 1704 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1708 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1710 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< float2, 3, cudaReadModeElementType> t, float x, float y, float z) # 1711 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1715 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1717 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< float4, 3, cudaReadModeElementType> t, float x, float y, float z) # 1718 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1722 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1730 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< char, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1731 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1740 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1742 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< signed char, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1743 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1748 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1750 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< unsigned char, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1751 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1756 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1758 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< char1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1759 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1764 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1766 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< uchar1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1767 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1772 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1774 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< char2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1775 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1780 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1782 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< uchar2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1783 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1788 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1790 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< char4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1791 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1796 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1798 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< uchar4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1799 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1804 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1812 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< short, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1813 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1818 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1820 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float tex3D(texture< unsigned short, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1821 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1826 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1828 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< short1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1829 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1834 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1836 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float1 tex3D(texture< ushort1, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1837 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1842 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1844 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< short2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1845 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1850 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1852 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float2 tex3D(texture< ushort2, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1853 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1858 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1860 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< short4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1861 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1866 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1868 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex3D(texture< ushort4, 3, cudaReadModeNormalizedFloat> t, float x, float y, float z) # 1869 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1874 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1930 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< int comp, class T> __attribute__((unused)) extern int4 __itex2Dgather(texture< T, 2, cudaReadModeElementType> , float2, int = comp); # 1932 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< int comp, class T> __attribute__((unused)) extern uint4 __utex2Dgather(texture< T, 2, cudaReadModeElementType> , float2, int = comp); # 1934 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" template< int comp, class T> __attribute__((unused)) extern float4 __ftex2Dgather(texture< T, 2, cudaReadModeElementType> , float2, int = comp); # 1954 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1955 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1957 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1959 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< signed char, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1960 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1962 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1964 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< unsigned char, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1965 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1967 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1969 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1970 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1972 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1974 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1975 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1977 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1979 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1980 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1982 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1984 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1985 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1987 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1989 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1990 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1992 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1994 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 1995 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 1997 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 1999 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline char4 tex2Dgather(texture< char4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2000 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2002 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2004 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uchar4 tex2Dgather(texture< uchar4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2005 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2007 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2009 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2010 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2012 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2014 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< unsigned short, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2015 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2017 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2019 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2020 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2022 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2024 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2025 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2027 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2029 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2030 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2032 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2034 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2035 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2037 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2039 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2040 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2042 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2044 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2045 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2047 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2049 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline short4 tex2Dgather(texture< short4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2050 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2052 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2054 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline ushort4 tex2Dgather(texture< ushort4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2055 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2057 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2059 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2060 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2062 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2064 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< unsigned, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2065 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2067 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2069 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2070 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2072 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2074 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2075 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2077 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2079 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2080 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2082 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2084 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2085 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2087 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2089 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2090 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2092 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2094 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2095 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2097 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2099 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline int4 tex2Dgather(texture< int4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2100 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2102 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2104 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline uint4 tex2Dgather(texture< uint4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2105 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2107 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2109 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2110 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2112 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2114 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float1, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2115 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2117 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2119 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float2, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2120 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2122 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2124 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float3, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2125 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2127 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 2129 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" __attribute__((unused)) static inline float4 tex2Dgather(texture< float4, 2, cudaReadModeElementType> t, float x, float y, int comp = 0) # 2130 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" {int volatile ___ = 1; # 2132 "/usr/local/cuda/bin/../include/texture_fetch_functions.h" exit(___);} # 53 "/usr/local/cuda/bin/../include/device_launch_parameters.h" extern "C" { extern const uint3 threadIdx; } # 55 "/usr/local/cuda/bin/../include/device_launch_parameters.h" extern "C" { extern const uint3 blockIdx; } # 57 "/usr/local/cuda/bin/../include/device_launch_parameters.h" extern "C" { extern const dim3 blockDim; } # 59 "/usr/local/cuda/bin/../include/device_launch_parameters.h" extern "C" { extern const dim3 gridDim; } # 61 "/usr/local/cuda/bin/../include/device_launch_parameters.h" extern "C" { extern const int warpSize; } # 106 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 107 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaSetupArgument(T # 108 "/usr/local/cuda/bin/../include/cuda_runtime.h" arg, size_t # 109 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset) # 111 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 112 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaSetupArgument((const void *)(&arg), sizeof(T), offset); # 113 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 145 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaEventCreate(cudaEvent_t * # 146 "/usr/local/cuda/bin/../include/cuda_runtime.h" event, unsigned # 147 "/usr/local/cuda/bin/../include/cuda_runtime.h" flags) # 149 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 150 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaEventCreateWithFlags(event, 0); # 151 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 208 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaMallocHost(void ** # 209 "/usr/local/cuda/bin/../include/cuda_runtime.h" ptr, size_t # 210 "/usr/local/cuda/bin/../include/cuda_runtime.h" size, unsigned # 211 "/usr/local/cuda/bin/../include/cuda_runtime.h" flags) # 213 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 214 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaHostAlloc(ptr, size, flags); # 215 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 217 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 218 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaHostAlloc(T ** # 219 "/usr/local/cuda/bin/../include/cuda_runtime.h" ptr, size_t # 220 "/usr/local/cuda/bin/../include/cuda_runtime.h" size, unsigned # 221 "/usr/local/cuda/bin/../include/cuda_runtime.h" flags) # 223 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 224 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaHostAlloc((void **)((void *)ptr), size, flags); # 225 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 227 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 228 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaHostGetDevicePointer(T ** # 229 "/usr/local/cuda/bin/../include/cuda_runtime.h" pDevice, void * # 230 "/usr/local/cuda/bin/../include/cuda_runtime.h" pHost, unsigned # 231 "/usr/local/cuda/bin/../include/cuda_runtime.h" flags) # 233 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 234 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaHostGetDevicePointer((void **)((void *)pDevice), pHost, flags); # 235 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 237 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 238 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMalloc(T ** # 239 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, size_t # 240 "/usr/local/cuda/bin/../include/cuda_runtime.h" size) # 242 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 243 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMalloc((void **)((void *)devPtr), size); # 244 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 246 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 247 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMallocHost(T ** # 248 "/usr/local/cuda/bin/../include/cuda_runtime.h" ptr, size_t # 249 "/usr/local/cuda/bin/../include/cuda_runtime.h" size, unsigned # 250 "/usr/local/cuda/bin/../include/cuda_runtime.h" flags = (0)) # 252 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 253 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMallocHost((void **)((void *)ptr), size, flags); # 254 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 256 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 257 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMallocPitch(T ** # 258 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, size_t * # 259 "/usr/local/cuda/bin/../include/cuda_runtime.h" pitch, size_t # 260 "/usr/local/cuda/bin/../include/cuda_runtime.h" width, size_t # 261 "/usr/local/cuda/bin/../include/cuda_runtime.h" height) # 263 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 264 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMallocPitch((void **)((void *)devPtr), pitch, width, height); # 265 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 275 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaMemcpyToSymbol(char * # 276 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, const void * # 277 "/usr/local/cuda/bin/../include/cuda_runtime.h" src, size_t # 278 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 279 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 280 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyHostToDevice) # 282 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 283 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyToSymbol((const char *)symbol, src, count, offset, kind); # 284 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 286 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 287 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMemcpyToSymbol(const T & # 288 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, const void * # 289 "/usr/local/cuda/bin/../include/cuda_runtime.h" src, size_t # 290 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 291 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 292 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyHostToDevice) # 294 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 295 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyToSymbol((const char *)(&symbol), src, count, offset, kind); # 296 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 298 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaMemcpyToSymbolAsync(char * # 299 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, const void * # 300 "/usr/local/cuda/bin/../include/cuda_runtime.h" src, size_t # 301 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 302 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 303 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyHostToDevice, cudaStream_t # 304 "/usr/local/cuda/bin/../include/cuda_runtime.h" stream = 0) # 306 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 307 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyToSymbolAsync((const char *)symbol, src, count, offset, kind, stream); # 308 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 310 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 311 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMemcpyToSymbolAsync(const T & # 312 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, const void * # 313 "/usr/local/cuda/bin/../include/cuda_runtime.h" src, size_t # 314 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 315 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 316 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyHostToDevice, cudaStream_t # 317 "/usr/local/cuda/bin/../include/cuda_runtime.h" stream = 0) # 319 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 320 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyToSymbolAsync((const char *)(&symbol), src, count, offset, kind, stream); # 321 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 329 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaMemcpyFromSymbol(void * # 330 "/usr/local/cuda/bin/../include/cuda_runtime.h" dst, char * # 331 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, size_t # 332 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 333 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 334 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost) # 336 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 337 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyFromSymbol(dst, (const char *)symbol, count, offset, kind); # 338 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 340 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 341 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMemcpyFromSymbol(void * # 342 "/usr/local/cuda/bin/../include/cuda_runtime.h" dst, const T & # 343 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, size_t # 344 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 345 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 346 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost) # 348 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 349 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyFromSymbol(dst, (const char *)(&symbol), count, offset, kind); # 350 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 352 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaMemcpyFromSymbolAsync(void * # 353 "/usr/local/cuda/bin/../include/cuda_runtime.h" dst, char * # 354 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, size_t # 355 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 356 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 357 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost, cudaStream_t # 358 "/usr/local/cuda/bin/../include/cuda_runtime.h" stream = 0) # 360 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 361 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyFromSymbolAsync(dst, (const char *)symbol, count, offset, kind, stream); # 362 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 364 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 365 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaMemcpyFromSymbolAsync(void * # 366 "/usr/local/cuda/bin/../include/cuda_runtime.h" dst, const T & # 367 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol, size_t # 368 "/usr/local/cuda/bin/../include/cuda_runtime.h" count, size_t # 369 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset = (0), cudaMemcpyKind # 370 "/usr/local/cuda/bin/../include/cuda_runtime.h" kind = cudaMemcpyDeviceToHost, cudaStream_t # 371 "/usr/local/cuda/bin/../include/cuda_runtime.h" stream = 0) # 373 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 374 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaMemcpyFromSymbolAsync(dst, (const char *)(&symbol), count, offset, kind, stream); # 375 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 377 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaGetSymbolAddress(void ** # 378 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, char * # 379 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol) # 381 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 382 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaGetSymbolAddress(devPtr, (const char *)symbol); # 383 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 410 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 411 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaGetSymbolAddress(void ** # 412 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, const T & # 413 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol) # 415 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 416 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaGetSymbolAddress(devPtr, (const char *)(&symbol)); # 417 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 425 "/usr/local/cuda/bin/../include/cuda_runtime.h" static inline cudaError_t cudaGetSymbolSize(size_t * # 426 "/usr/local/cuda/bin/../include/cuda_runtime.h" size, char * # 427 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol) # 429 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 430 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaGetSymbolSize(size, (const char *)symbol); # 431 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 458 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 459 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaGetSymbolSize(size_t * # 460 "/usr/local/cuda/bin/../include/cuda_runtime.h" size, const T & # 461 "/usr/local/cuda/bin/../include/cuda_runtime.h" symbol) # 463 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 464 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaGetSymbolSize(size, (const char *)(&symbol)); # 465 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 507 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 508 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindTexture(size_t * # 509 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 510 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex, const void * # 511 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, const cudaChannelFormatDesc & # 512 "/usr/local/cuda/bin/../include/cuda_runtime.h" desc, size_t # 513 "/usr/local/cuda/bin/../include/cuda_runtime.h" size = (((2147483647) * 2U) + 1U)) # 515 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 516 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaBindTexture(offset, &tex, devPtr, &desc, size); # 517 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 552 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 553 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindTexture(size_t * # 554 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 555 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex, const void * # 556 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, size_t # 557 "/usr/local/cuda/bin/../include/cuda_runtime.h" size = (((2147483647) * 2U) + 1U)) # 559 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 560 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaBindTexture(offset, tex, devPtr, (tex.channelDesc), size); # 561 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 608 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 609 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindTexture2D(size_t * # 610 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 611 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex, const void * # 612 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, const cudaChannelFormatDesc & # 613 "/usr/local/cuda/bin/../include/cuda_runtime.h" desc, size_t # 614 "/usr/local/cuda/bin/../include/cuda_runtime.h" width, size_t # 615 "/usr/local/cuda/bin/../include/cuda_runtime.h" height, size_t # 616 "/usr/local/cuda/bin/../include/cuda_runtime.h" pitch) # 618 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 619 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaBindTexture2D(offset, &tex, devPtr, &desc, width, height, pitch); # 620 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 666 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 667 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindTexture2D(size_t * # 668 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 669 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex, const void * # 670 "/usr/local/cuda/bin/../include/cuda_runtime.h" devPtr, size_t # 671 "/usr/local/cuda/bin/../include/cuda_runtime.h" width, size_t # 672 "/usr/local/cuda/bin/../include/cuda_runtime.h" height, size_t # 673 "/usr/local/cuda/bin/../include/cuda_runtime.h" pitch) # 675 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 676 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaBindTexture2D(offset, &tex, devPtr, &(tex.texture< T, dim, readMode> ::channelDesc), width, height, pitch); # 677 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 708 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 709 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindTextureToArray(const texture< T, dim, readMode> & # 710 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex, const cudaArray * # 711 "/usr/local/cuda/bin/../include/cuda_runtime.h" array, const cudaChannelFormatDesc & # 712 "/usr/local/cuda/bin/../include/cuda_runtime.h" desc) # 714 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 715 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaBindTextureToArray(&tex, array, &desc); # 716 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 746 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 747 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindTextureToArray(const texture< T, dim, readMode> & # 748 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex, const cudaArray * # 749 "/usr/local/cuda/bin/../include/cuda_runtime.h" array) # 751 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 752 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaChannelFormatDesc desc; # 753 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaError_t err = cudaGetChannelDesc(&desc, array); # 755 "/usr/local/cuda/bin/../include/cuda_runtime.h" return (err == (cudaSuccess)) ? cudaBindTextureToArray(tex, array, desc) : err; # 756 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 785 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 786 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaUnbindTexture(const texture< T, dim, readMode> & # 787 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex) # 789 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 790 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaUnbindTexture(&tex); # 791 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 825 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim, cudaTextureReadMode readMode> inline cudaError_t # 826 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaGetTextureAlignmentOffset(size_t * # 827 "/usr/local/cuda/bin/../include/cuda_runtime.h" offset, const texture< T, dim, readMode> & # 828 "/usr/local/cuda/bin/../include/cuda_runtime.h" tex) # 830 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 831 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaGetTextureAlignmentOffset(offset, &tex); # 832 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 886 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 887 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaFuncSetCacheConfig(T * # 888 "/usr/local/cuda/bin/../include/cuda_runtime.h" func, cudaFuncCache # 889 "/usr/local/cuda/bin/../include/cuda_runtime.h" cacheConfig) # 891 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 892 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaFuncSetCacheConfig((const char *)func, cacheConfig); # 893 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 930 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 931 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaLaunch(T * # 932 "/usr/local/cuda/bin/../include/cuda_runtime.h" entry) # 934 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 935 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaLaunch((const char *)entry); # 936 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 970 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T> inline cudaError_t # 971 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaFuncGetAttributes(cudaFuncAttributes * # 972 "/usr/local/cuda/bin/../include/cuda_runtime.h" attr, T * # 973 "/usr/local/cuda/bin/../include/cuda_runtime.h" entry) # 975 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 976 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaFuncGetAttributes(attr, (const char *)entry); # 977 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 999 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim> inline cudaError_t # 1000 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindSurfaceToArray(const surface< T, dim> & # 1001 "/usr/local/cuda/bin/../include/cuda_runtime.h" surf, const cudaArray * # 1002 "/usr/local/cuda/bin/../include/cuda_runtime.h" array, const cudaChannelFormatDesc & # 1003 "/usr/local/cuda/bin/../include/cuda_runtime.h" desc) # 1005 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 1006 "/usr/local/cuda/bin/../include/cuda_runtime.h" return cudaBindSurfaceToArray(&surf, array, &desc); # 1007 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 1028 "/usr/local/cuda/bin/../include/cuda_runtime.h" template< class T, int dim> inline cudaError_t # 1029 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaBindSurfaceToArray(const surface< T, dim> & # 1030 "/usr/local/cuda/bin/../include/cuda_runtime.h" surf, const cudaArray * # 1031 "/usr/local/cuda/bin/../include/cuda_runtime.h" array) # 1033 "/usr/local/cuda/bin/../include/cuda_runtime.h" { # 1034 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaChannelFormatDesc desc; # 1035 "/usr/local/cuda/bin/../include/cuda_runtime.h" cudaError_t err = cudaGetChannelDesc(&desc, array); # 1037 "/usr/local/cuda/bin/../include/cuda_runtime.h" return (err == (cudaSuccess)) ? cudaBindSurfaceToArray(surf, array, desc) : err; # 1038 "/usr/local/cuda/bin/../include/cuda_runtime.h" } # 45 "/usr/include/stdio.h" 3 struct _IO_FILE; # 49 "/usr/include/stdio.h" 3 extern "C" { typedef _IO_FILE FILE; } # 65 "/usr/include/stdio.h" 3 extern "C" { typedef _IO_FILE __FILE; } # 95 "/usr/include/wchar.h" 3 extern "C" { typedef # 84 "/usr/include/wchar.h" 3 struct { # 85 "/usr/include/wchar.h" 3 int __count; # 87 "/usr/include/wchar.h" 3 union { # 89 "/usr/include/wchar.h" 3 unsigned __wch; # 93 "/usr/include/wchar.h" 3 char __wchb[4]; # 94 "/usr/include/wchar.h" 3 } __value; # 95 "/usr/include/wchar.h" 3 } __mbstate_t; } # 26 "/usr/include/_G_config.h" 3 extern "C" { typedef # 23 "/usr/include/_G_config.h" 3 struct { # 24 "/usr/include/_G_config.h" 3 __off_t __pos; # 25 "/usr/include/_G_config.h" 3 __mbstate_t __state; # 26 "/usr/include/_G_config.h" 3 } _G_fpos_t; } # 31 "/usr/include/_G_config.h" 3 extern "C" { typedef # 28 "/usr/include/_G_config.h" 3 struct { # 29 "/usr/include/_G_config.h" 3 __off64_t __pos; # 30 "/usr/include/_G_config.h" 3 __mbstate_t __state; # 31 "/usr/include/_G_config.h" 3 } _G_fpos64_t; } # 53 "/usr/include/_G_config.h" 3 extern "C" { typedef short _G_int16_t; } # 54 "/usr/include/_G_config.h" 3 extern "C" { typedef int _G_int32_t; } # 55 "/usr/include/_G_config.h" 3 extern "C" { typedef unsigned short _G_uint16_t; } # 56 "/usr/include/_G_config.h" 3 extern "C" { typedef unsigned _G_uint32_t; } # 40 "/usr/lib/gcc/i686-linux-gnu/4.4.5/include/va.h" 3 extern "C" { typedef __builtin_va_list __gnuc_va_list; } # 170 "/usr/include/libio.h" 3 struct _IO_jump_t; struct _IO_FILE; # 180 "/usr/include/libio.h" 3 extern "C" { typedef void _IO_lock_t; } # 186 "/usr/include/libio.h" 3 extern "C" { struct _IO_marker { # 187 "/usr/include/libio.h" 3 _IO_marker *_next; # 188 "/usr/include/libio.h" 3 _IO_FILE *_sbuf; # 192 "/usr/include/libio.h" 3 int _pos; # 203 "/usr/include/libio.h" 3 }; } # 206 "/usr/include/libio.h" 3 enum __codecvt_result { # 208 "/usr/include/libio.h" 3 __codecvt_ok, # 209 "/usr/include/libio.h" 3 __codecvt_partial, # 210 "/usr/include/libio.h" 3 __codecvt_error, # 211 "/usr/include/libio.h" 3 __codecvt_noconv # 212 "/usr/include/libio.h" 3 }; # 271 "/usr/include/libio.h" 3 extern "C" { struct _IO_FILE { # 272 "/usr/include/libio.h" 3 int _flags; # 277 "/usr/include/libio.h" 3 char *_IO_read_ptr; # 278 "/usr/include/libio.h" 3 char *_IO_read_end; # 279 "/usr/include/libio.h" 3 char *_IO_read_base; # 280 "/usr/include/libio.h" 3 char *_IO_write_base; # 281 "/usr/include/libio.h" 3 char *_IO_write_ptr; # 282 "/usr/include/libio.h" 3 char *_IO_write_end; # 283 "/usr/include/libio.h" 3 char *_IO_buf_base; # 284 "/usr/include/libio.h" 3 char *_IO_buf_end; # 286 "/usr/include/libio.h" 3 char *_IO_save_base; # 287 "/usr/include/libio.h" 3 char *_IO_backup_base; # 288 "/usr/include/libio.h" 3 char *_IO_save_end; # 290 "/usr/include/libio.h" 3 _IO_marker *_markers; # 292 "/usr/include/libio.h" 3 _IO_FILE *_chain; # 294 "/usr/include/libio.h" 3 int _fileno; # 298 "/usr/include/libio.h" 3 int _flags2; # 300 "/usr/include/libio.h" 3 __off_t _old_offset; # 304 "/usr/include/libio.h" 3 unsigned short _cur_column; # 305 "/usr/include/libio.h" 3 signed char _vtable_offset; # 306 "/usr/include/libio.h" 3 char _shortbuf[1]; # 310 "/usr/include/libio.h" 3 _IO_lock_t *_lock; # 319 "/usr/include/libio.h" 3 __off64_t _offset; # 328 "/usr/include/libio.h" 3 void *__pad1; # 329 "/usr/include/libio.h" 3 void *__pad2; # 330 "/usr/include/libio.h" 3 void *__pad3; # 331 "/usr/include/libio.h" 3 void *__pad4; # 332 "/usr/include/libio.h" 3 size_t __pad5; # 334 "/usr/include/libio.h" 3 int _mode; # 336 "/usr/include/libio.h" 3 char _unused2[((((15) * sizeof(int)) - ((4) * sizeof(void *))) - sizeof(size_t))]; # 338 "/usr/include/libio.h" 3 }; } # 344 "/usr/include/libio.h" 3 struct _IO_FILE_plus; # 346 "/usr/include/libio.h" 3 extern "C" { extern _IO_FILE_plus _IO_2_1_stdin_; } # 347 "/usr/include/libio.h" 3 extern "C" { extern _IO_FILE_plus _IO_2_1_stdout_; } # 348 "/usr/include/libio.h" 3 extern "C" { extern _IO_FILE_plus _IO_2_1_stderr_; } # 364 "/usr/include/libio.h" 3 extern "C" { typedef __ssize_t __io_read_fn(void *, char *, size_t); } # 372 "/usr/include/libio.h" 3 extern "C" { typedef __ssize_t __io_write_fn(void *, const char *, size_t); } # 381 "/usr/include/libio.h" 3 extern "C" { typedef int __io_seek_fn(void *, __off64_t *, int); } # 384 "/usr/include/libio.h" 3 extern "C" { typedef int __io_close_fn(void *); } # 389 "/usr/include/libio.h" 3 extern "C" { typedef __io_read_fn cookie_read_function_t; } # 390 "/usr/include/libio.h" 3 extern "C" { typedef __io_write_fn cookie_write_function_t; } # 391 "/usr/include/libio.h" 3 extern "C" { typedef __io_seek_fn cookie_seek_function_t; } # 392 "/usr/include/libio.h" 3 extern "C" { typedef __io_close_fn cookie_close_function_t; } # 401 "/usr/include/libio.h" 3 extern "C" { typedef # 396 "/usr/include/libio.h" 3 struct { # 397 "/usr/include/libio.h" 3 __io_read_fn *read; # 398 "/usr/include/libio.h" 3 __io_write_fn *write; # 399 "/usr/include/libio.h" 3 __io_seek_fn *seek; # 400 "/usr/include/libio.h" 3 __io_close_fn *close; # 401 "/usr/include/libio.h" 3 } _IO_cookie_io_functions_t; } # 402 "/usr/include/libio.h" 3 extern "C" { typedef _IO_cookie_io_functions_t cookie_io_functions_t; } # 404 "/usr/include/libio.h" 3 struct _IO_cookie_file; # 407 "/usr/include/libio.h" 3 extern "C" void _IO_cookie_init(_IO_cookie_file *, int, void *, _IO_cookie_io_functions_t); # 416 "/usr/include/libio.h" 3 extern "C" int __underflow(_IO_FILE *); # 417 "/usr/include/libio.h" 3 extern "C" int __uflow(_IO_FILE *); # 418 "/usr/include/libio.h" 3 extern "C" int __overflow(_IO_FILE *, int); # 460 "/usr/include/libio.h" 3 extern "C" int _IO_getc(_IO_FILE *); # 461 "/usr/include/libio.h" 3 extern "C" int _IO_putc(int, _IO_FILE *); # 462 "/usr/include/libio.h" 3 extern "C" int _IO_feof(_IO_FILE *) throw(); # 463 "/usr/include/libio.h" 3 extern "C" int _IO_ferror(_IO_FILE *) throw(); # 465 "/usr/include/libio.h" 3 extern "C" int _IO_peekc_locked(_IO_FILE *); # 471 "/usr/include/libio.h" 3 extern "C" void _IO_flockfile(_IO_FILE *) throw(); # 472 "/usr/include/libio.h" 3 extern "C" void _IO_funlockfile(_IO_FILE *) throw(); # 473 "/usr/include/libio.h" 3 extern "C" int _IO_ftrylockfile(_IO_FILE *) throw(); # 490 "/usr/include/libio.h" 3 extern "C" int _IO_vfscanf(_IO_FILE *__restrict__, const char *__restrict__, __gnuc_va_list, int *__restrict__); # 492 "/usr/include/libio.h" 3 extern "C" int _IO_vfprintf(_IO_FILE *__restrict__, const char *__restrict__, __gnuc_va_list); # 494 "/usr/include/libio.h" 3 extern "C" __ssize_t _IO_padn(_IO_FILE *, int, __ssize_t); # 495 "/usr/include/libio.h" 3 extern "C" size_t _IO_sgetn(_IO_FILE *, void *, size_t); # 497 "/usr/include/libio.h" 3 extern "C" __off64_t _IO_seekoff(_IO_FILE *, __off64_t, int, int); # 498 "/usr/include/libio.h" 3 extern "C" __off64_t _IO_seekpos(_IO_FILE *, __off64_t, int); # 500 "/usr/include/libio.h" 3 extern "C" void _IO_free_backup_area(_IO_FILE *) throw(); # 80 "/usr/include/stdio.h" 3 extern "C" { typedef __gnuc_va_list va_list; } # 111 "/usr/include/stdio.h" 3 extern "C" { typedef _G_fpos_t fpos_t; } # 117 "/usr/include/stdio.h" 3 extern "C" { typedef _G_fpos64_t fpos64_t; } # 165 "/usr/include/stdio.h" 3 extern "C" { extern _IO_FILE *stdin; } # 166 "/usr/include/stdio.h" 3 extern "C" { extern _IO_FILE *stdout; } # 167 "/usr/include/stdio.h" 3 extern "C" { extern _IO_FILE *stderr; } # 175 "/usr/include/stdio.h" 3 extern "C" int remove(const char *) throw(); # 177 "/usr/include/stdio.h" 3 extern "C" int rename(const char *, const char *) throw(); # 182 "/usr/include/stdio.h" 3 extern "C" int renameat(int, const char *, int, const char *) throw(); # 192 "/usr/include/stdio.h" 3 extern "C" FILE *tmpfile(); # 202 "/usr/include/stdio.h" 3 extern "C" FILE *tmpfile64(); # 206 "/usr/include/stdio.h" 3 extern "C" char *tmpnam(char *) throw(); # 212 "/usr/include/stdio.h" 3 extern "C" char *tmpnam_r(char *) throw(); # 224 "/usr/include/stdio.h" 3 extern "C" char *tempnam(const char *, const char *) throw() __attribute__((__malloc__)); # 234 "/usr/include/stdio.h" 3 extern "C" int fclose(FILE *); # 239 "/usr/include/stdio.h" 3 extern "C" int fflush(FILE *); # 249 "/usr/include/stdio.h" 3 extern "C" int fflush_unlocked(FILE *); # 259 "/usr/include/stdio.h" 3 extern "C" int fcloseall(); # 269 "/usr/include/stdio.h" 3 extern "C" FILE *fopen(const char *__restrict__, const char *__restrict__); # 275 "/usr/include/stdio.h" 3 extern "C" FILE *freopen(const char *__restrict__, const char *__restrict__, FILE *__restrict__); # 294 "/usr/include/stdio.h" 3 extern "C" FILE *fopen64(const char *__restrict__, const char *__restrict__); # 296 "/usr/include/stdio.h" 3 extern "C" FILE *freopen64(const char *__restrict__, const char *__restrict__, FILE *__restrict__); # 303 "/usr/include/stdio.h" 3 extern "C" FILE *fdopen(int, const char *) throw(); # 309 "/usr/include/stdio.h" 3 extern "C" FILE *fopencookie(void *__restrict__, const char *__restrict__, _IO_cookie_io_functions_t) throw(); # 316 "/usr/include/stdio.h" 3 extern "C" FILE *fmemopen(void *, size_t, const char *) throw(); # 322 "/usr/include/stdio.h" 3 extern "C" FILE *open_memstream(char **, size_t *) throw(); # 329 "/usr/include/stdio.h" 3 extern "C" void setbuf(FILE *__restrict__, char *__restrict__) throw(); # 333 "/usr/include/stdio.h" 3 extern "C" int setvbuf(FILE *__restrict__, char *__restrict__, int, size_t) throw(); # 340 "/usr/include/stdio.h" 3 extern "C" void setbuffer(FILE *__restrict__, char *__restrict__, size_t) throw(); # 344 "/usr/include/stdio.h" 3 extern "C" void setlinebuf(FILE *) throw(); # 353 "/usr/include/stdio.h" 3 extern "C" int fprintf(FILE *__restrict__, const char *__restrict__, ...); # 359 "/usr/include/stdio.h" 3 extern "C" int printf(const char *__restrict__, ...); # 361 "/usr/include/stdio.h" 3 extern "C" int sprintf(char *__restrict__, const char *__restrict__, ...) throw(); # 368 "/usr/include/stdio.h" 3 extern "C" int vfprintf(FILE *__restrict__, const char *__restrict__, __gnuc_va_list); # 374 "/usr/include/stdio.h" 3 extern "C" int vprintf(const char *__restrict__, __gnuc_va_list); # 376 "/usr/include/stdio.h" 3 extern "C" int vsprintf(char *__restrict__, const char *__restrict__, __gnuc_va_list) throw(); # 383 "/usr/include/stdio.h" 3 extern "C" int snprintf(char *__restrict__, size_t, const char *__restrict__, ...) throw(); # 387 "/usr/include/stdio.h" 3 extern "C" int vsnprintf(char *__restrict__, size_t, const char *__restrict__, __gnuc_va_list) throw(); # 396 "/usr/include/stdio.h" 3 extern "C" int vasprintf(char **__restrict__, const char *__restrict__, __gnuc_va_list) throw(); # 399 "/usr/include/stdio.h" 3 extern "C" int __asprintf(char **__restrict__, const char *__restrict__, ...) throw(); # 402 "/usr/include/stdio.h" 3 extern "C" int asprintf(char **__restrict__, const char *__restrict__, ...) throw(); # 414 "/usr/include/stdio.h" 3 extern "C" int vdprintf(int, const char *__restrict__, __gnuc_va_list); # 417 "/usr/include/stdio.h" 3 extern "C" int dprintf(int, const char *__restrict__, ...); # 427 "/usr/include/stdio.h" 3 extern "C" int fscanf(FILE *__restrict__, const char *__restrict__, ...); # 433 "/usr/include/stdio.h" 3 extern "C" int scanf(const char *__restrict__, ...); # 435 "/usr/include/stdio.h" 3 extern "C" int sscanf(const char *__restrict__, const char *__restrict__, ...) throw(); # 473 "/usr/include/stdio.h" 3 extern "C" int vfscanf(FILE *__restrict__, const char *__restrict__, __gnuc_va_list); # 481 "/usr/include/stdio.h" 3 extern "C" int vscanf(const char *__restrict__, __gnuc_va_list); # 485 "/usr/include/stdio.h" 3 extern "C" int vsscanf(const char *__restrict__, const char *__restrict__, __gnuc_va_list) throw(); # 533 "/usr/include/stdio.h" 3 extern "C" int fgetc(FILE *); # 534 "/usr/include/stdio.h" 3 extern "C" int getc(FILE *); # 540 "/usr/include/stdio.h" 3 extern "C" int getchar(); # 552 "/usr/include/stdio.h" 3 extern "C" int getc_unlocked(FILE *); # 553 "/usr/include/stdio.h" 3 extern "C" int getchar_unlocked(); # 563 "/usr/include/stdio.h" 3 extern "C" int fgetc_unlocked(FILE *); # 575 "/usr/include/stdio.h" 3 extern "C" int fputc(int, FILE *); # 576 "/usr/include/stdio.h" 3 extern "C" int putc(int, FILE *); # 582 "/usr/include/stdio.h" 3 extern "C" int putchar(int); # 596 "/usr/include/stdio.h" 3 extern "C" int fputc_unlocked(int, FILE *); # 604 "/usr/include/stdio.h" 3 extern "C" int putc_unlocked(int, FILE *); # 605 "/usr/include/stdio.h" 3 extern "C" int putchar_unlocked(int); # 612 "/usr/include/stdio.h" 3 extern "C" int getw(FILE *); # 615 "/usr/include/stdio.h" 3 extern "C" int putw(int, FILE *); # 624 "/usr/include/stdio.h" 3 extern "C" char *fgets(char *__restrict__, int, FILE *__restrict__); # 632 "/usr/include/stdio.h" 3 extern "C" char *gets(char *); # 642 "/usr/include/stdio.h" 3 extern "C" char *fgets_unlocked(char *__restrict__, int, FILE *__restrict__); # 658 "/usr/include/stdio.h" 3 extern "C" __ssize_t __getdelim(char **__restrict__, size_t *__restrict__, int, FILE *__restrict__); # 661 "/usr/include/stdio.h" 3 extern "C" __ssize_t getdelim(char **__restrict__, size_t *__restrict__, int, FILE *__restrict__); # 671 "/usr/include/stdio.h" 3 extern "C" __ssize_t getline(char **__restrict__, size_t *__restrict__, FILE *__restrict__); # 682 "/usr/include/stdio.h" 3 extern "C" int fputs(const char *__restrict__, FILE *__restrict__); # 688 "/usr/include/stdio.h" 3 extern "C" int puts(const char *); # 695 "/usr/include/stdio.h" 3 extern "C" int ungetc(int, FILE *); # 702 "/usr/include/stdio.h" 3 extern "C" size_t fread(void *__restrict__, size_t, size_t, FILE *__restrict__); # 708 "/usr/include/stdio.h" 3 extern "C" size_t fwrite(const void *__restrict__, size_t, size_t, FILE *__restrict__); # 719 "/usr/include/stdio.h" 3 extern "C" int fputs_unlocked(const char *__restrict__, FILE *__restrict__); # 730 "/usr/include/stdio.h" 3 extern "C" size_t fread_unlocked(void *__restrict__, size_t, size_t, FILE *__restrict__); # 732 "/usr/include/stdio.h" 3 extern "C" size_t fwrite_unlocked(const void *__restrict__, size_t, size_t, FILE *__restrict__); # 742 "/usr/include/stdio.h" 3 extern "C" int fseek(FILE *, long, int); # 747 "/usr/include/stdio.h" 3 extern "C" long ftell(FILE *); # 752 "/usr/include/stdio.h" 3 extern "C" void rewind(FILE *); # 766 "/usr/include/stdio.h" 3 extern "C" int fseeko(FILE *, __off_t, int); # 771 "/usr/include/stdio.h" 3 extern "C" __off_t ftello(FILE *); # 791 "/usr/include/stdio.h" 3 extern "C" int fgetpos(FILE *__restrict__, fpos_t *__restrict__); # 796 "/usr/include/stdio.h" 3 extern "C" int fsetpos(FILE *, const fpos_t *); # 811 "/usr/include/stdio.h" 3 extern "C" int fseeko64(FILE *, __off64_t, int); # 812 "/usr/include/stdio.h" 3 extern "C" __off64_t ftello64(FILE *); # 813 "/usr/include/stdio.h" 3 extern "C" int fgetpos64(FILE *__restrict__, fpos64_t *__restrict__); # 814 "/usr/include/stdio.h" 3 extern "C" int fsetpos64(FILE *, const fpos64_t *); # 819 "/usr/include/stdio.h" 3 extern "C" void clearerr(FILE *) throw(); # 821 "/usr/include/stdio.h" 3 extern "C" int feof(FILE *) throw(); # 823 "/usr/include/stdio.h" 3 extern "C" int ferror(FILE *) throw(); # 828 "/usr/include/stdio.h" 3 extern "C" void clearerr_unlocked(FILE *) throw(); # 829 "/usr/include/stdio.h" 3 extern "C" int feof_unlocked(FILE *) throw(); # 830 "/usr/include/stdio.h" 3 extern "C" int ferror_unlocked(FILE *) throw(); # 839 "/usr/include/stdio.h" 3 extern "C" void perror(const char *); # 27 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern int sys_nerr; } # 28 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern const char *const sys_errlist[]; } # 31 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern int _sys_nerr; } # 32 "/usr/include/bits/sys_errlist.h" 3 extern "C" { extern const char *const _sys_errlist[]; } # 851 "/usr/include/stdio.h" 3 extern "C" int fileno(FILE *) throw(); # 856 "/usr/include/stdio.h" 3 extern "C" int fileno_unlocked(FILE *) throw(); # 866 "/usr/include/stdio.h" 3 extern "C" FILE *popen(const char *, const char *); # 872 "/usr/include/stdio.h" 3 extern "C" int pclose(FILE *); # 878 "/usr/include/stdio.h" 3 extern "C" char *ctermid(char *) throw(); # 884 "/usr/include/stdio.h" 3 extern "C" char *cuserid(char *); # 889 "/usr/include/stdio.h" 3 struct obstack; # 892 "/usr/include/stdio.h" 3 extern "C" int obstack_printf(obstack *__restrict__, const char *__restrict__, ...) throw(); # 895 "/usr/include/stdio.h" 3 extern "C" int obstack_vprintf(obstack *__restrict__, const char *__restrict__, __gnuc_va_list) throw(); # 906 "/usr/include/stdio.h" 3 extern "C" void flockfile(FILE *) throw(); # 910 "/usr/include/stdio.h" 3 extern "C" int ftrylockfile(FILE *) throw(); # 913 "/usr/include/stdio.h" 3 extern "C" void funlockfile(FILE *) throw(); # 45 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" extern "C" { typedef unsigned uint; } # 46 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" extern "C" { typedef unsigned short ushort; } # 57 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" typedef # 53 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" struct __attribute__((__aligned__(8))) { # 54 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" uint key; # 55 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" uint value; # 57 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" } KeyValuePair; # 60 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort.cuh" extern "C" void RadixSort(KeyValuePair *, KeyValuePair *, uint, uint); # 44 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int NUM_SMS = 16; # 45 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int NUM_THREADS_PER_SM = 192; # 46 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int NUM_THREADS_PER_BLOCK = 64; # 48 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int NUM_BLOCKS = ((NUM_THREADS_PER_SM / NUM_THREADS_PER_BLOCK) * NUM_SMS); # 49 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int RADIX = 8; # 50 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int RADICES = (1 << RADIX); # 51 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int RADIXMASK = (RADICES - 1); # 55 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int RADIXBITS = 32; # 57 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int RADIXTHREADS = 16; # 58 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int RADIXGROUPS = (NUM_THREADS_PER_BLOCK / RADIXTHREADS); # 59 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int TOTALRADIXGROUPS = (NUM_BLOCKS * RADIXGROUPS); # 60 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int SORTRADIXGROUPS = (TOTALRADIXGROUPS * RADICES); # 61 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int GRFELEMENTS = ((NUM_THREADS_PER_BLOCK / RADIXTHREADS) * RADICES); # 62 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int GRFSIZE = ((GRFELEMENTS) * sizeof(uint)); # 65 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int PREFIX_NUM_THREADS_PER_SM = NUM_THREADS_PER_SM; # 66 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int PREFIX_NUM_THREADS_PER_BLOCK = PREFIX_NUM_THREADS_PER_SM; # 67 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int PREFIX_NUM_BLOCKS = ((PREFIX_NUM_THREADS_PER_SM / PREFIX_NUM_THREADS_PER_BLOCK) * NUM_SMS); # 68 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int PREFIX_BLOCKSIZE = (SORTRADIXGROUPS / PREFIX_NUM_BLOCKS); # 69 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int PREFIX_GRFELEMENTS = (PREFIX_BLOCKSIZE + (2 * PREFIX_NUM_THREADS_PER_BLOCK)); # 70 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int PREFIX_GRFSIZE = ((PREFIX_GRFELEMENTS) * sizeof(uint)); # 73 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int SHUFFLE_GRFOFFSET = (RADIXGROUPS * RADICES); # 74 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int SHUFFLE_GRFELEMENTS = (SHUFFLE_GRFOFFSET + PREFIX_NUM_BLOCKS); # 75 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static const int SHUFFLE_GRFSIZE = ((SHUFFLE_GRFELEMENTS) * sizeof(uint)); # 81 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" uint gRadixSum[(TOTALRADIXGROUPS * RADICES)]; # 82 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static uint dRadixSum[(TOTALRADIXGROUPS * RADICES)]; # 83 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" uint gRadixBlockSum[PREFIX_NUM_BLOCKS]; # 84 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" static uint dRadixBlockSum[PREFIX_NUM_BLOCKS]; # 86 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" __attribute__((unused)) extern uint sRadixSum[]; # 101 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" void RadixSum(KeyValuePair *pData, uint elements, uint elements_rounded_to_3072, uint shift) ; # 251 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" void RadixPrefixSum() ; # 374 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" void RadixAddOffsetsAndShuffle(KeyValuePair *pSrc, KeyValuePair *pDst, uint elements, uint elements_rounded_to_3072, int shift) ; # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" 1 # 1 "/usr/local/cuda/bin/../include/crt/host_runtime.h" 1 # 91 "/usr/local/cuda/bin/../include/crt/host_runtime.h" extern "C" { extern void** __cudaRegisterFatBinary( void *fatCubin ); extern void __cudaUnregisterFatBinary( void **fatCubinHandle ); extern void __cudaRegisterVar( void **fatCubinHandle, char *hostVar, char *deviceAddress, const char *deviceName, int ext, int size, int constant, int global ); extern void __cudaRegisterTexture( void **fatCubinHandle, const struct textureReference *hostVar, const void **deviceAddress, const char *deviceName, int dim, int norm, int ext ); extern void __cudaRegisterSurface( void **fatCubinHandle, const struct surfaceReference *hostVar, const void **deviceAddress, const char *deviceName, int dim, int ext ); extern void __cudaRegisterFunction( void **fatCubinHandle, const char *hostFun, char *deviceFun, const char *deviceName, int thread_limit, uint3 *tid, uint3 *bid, dim3 *bDim, dim3 *gDim, int *wSize ); extern int atexit(void(*)(void)) throw(); } static void **__cudaFatCubinHandle; static void __cudaUnregisterBinaryUtil(void) { __cudaUnregisterFatBinary(__cudaFatCubinHandle); } # 1 "/usr/local/cuda/bin/../include/common_functions.h" 1 # 90 "/usr/local/cuda/bin/../include/common_functions.h" # 1 "/usr/local/cuda/bin/../include/math_functions.h" 1 3 # 948 "/usr/local/cuda/bin/../include/math_functions.h" 3 # 1 "/usr/local/cuda/bin/../include/math_constants.h" 1 3 # 949 "/usr/local/cuda/bin/../include/math_functions.h" 2 3 # 2973 "/usr/local/cuda/bin/../include/math_functions.h" 3 # 1 "/usr/local/cuda/bin/../include/crt/func_macro.h" 1 3 # 2974 "/usr/local/cuda/bin/../include/math_functions.h" 2 3 # 4683 "/usr/local/cuda/bin/../include/math_functions.h" 3 extern __attribute__((__weak__)) double rsqrt(double a); double rsqrt(double a) { return 1.0 / sqrt(a); } extern __attribute__((__weak__)) double rcbrt(double a); double rcbrt(double a) { double s, t; if (__isnan(a)) { return a + a; } if (a == 0.0 || __isinf(a)) { return 1.0 / a; } s = fabs(a); t = exp2(-3.3333333333333333e-1 * log2(s)); t = ((t*t) * (-s*t) + 1.0) * (3.3333333333333333e-1*t) + t; if (__signbit(a)) { t = -t; } return t; } extern __attribute__((__weak__)) double sinpi(double a); double sinpi(double a) { int n; if (__isnan(a)) { return a + a; } if (a == 0.0 || __isinf(a)) { return sin (a); } if (a == floor(a)) { return ((a / 1.0e308) / 1.0e308) / 1.0e308; } a = remquo (a, 0.5, &n); a = a * 3.1415926535897931e+0; if (n & 1) { a = cos (a); } else { a = sin (a); } if (n & 2) { a = -a; } return a; } extern __attribute__((__weak__)) double erfinv(double a); double erfinv(double a) { double p, q, t, fa; volatile union { double d; unsigned long long int l; } cvt; fa = fabs(a); if (fa >= 1.0) { cvt.l = 0xfff8000000000000ull; t = cvt.d; if (fa == 1.0) { t = a * exp(1000.0); } } else if (fa >= 0.9375) { t = log1p(-fa); t = 1.0 / sqrt(-t); p = 2.7834010353747001060e-3; p = p * t + 8.6030097526280260580e-1; p = p * t + 2.1371214997265515515e+0; p = p * t + 3.1598519601132090206e+0; p = p * t + 3.5780402569085996758e+0; p = p * t + 1.5335297523989890804e+0; p = p * t + 3.4839207139657522572e-1; p = p * t + 5.3644861147153648366e-2; p = p * t + 4.3836709877126095665e-3; p = p * t + 1.3858518113496718808e-4; p = p * t + 1.1738352509991666680e-6; q = t + 2.2859981272422905412e+0; q = q * t + 4.3859045256449554654e+0; q = q * t + 4.6632960348736635331e+0; q = q * t + 3.9846608184671757296e+0; q = q * t + 1.6068377709719017609e+0; q = q * t + 3.5609087305900265560e-1; q = q * t + 5.3963550303200816744e-2; q = q * t + 4.3873424022706935023e-3; q = q * t + 1.3858762165532246059e-4; q = q * t + 1.1738313872397777529e-6; t = p / (q * t); if (a < 0.0) t = -t; } else if (fa >= 0.75) { t = a * a - .87890625; p = .21489185007307062000e+0; p = p * t - .64200071507209448655e+1; p = p * t + .29631331505876308123e+2; p = p * t - .47644367129787181803e+2; p = p * t + .34810057749357500873e+2; p = p * t - .12954198980646771502e+2; p = p * t + .25349389220714893917e+1; p = p * t - .24758242362823355486e+0; p = p * t + .94897362808681080020e-2; q = t - .12831383833953226499e+2; q = q * t + .41409991778428888716e+2; q = q * t - .53715373448862143349e+2; q = q * t + .33880176779595142685e+2; q = q * t - .11315360624238054876e+2; q = q * t + .20369295047216351160e+1; q = q * t - .18611650627372178511e+0; q = q * t + .67544512778850945940e-2; p = p / q; t = a * p; } else { t = a * a - .5625; p = - .23886240104308755900e+2; p = p * t + .45560204272689128170e+3; p = p * t - .22977467176607144887e+4; p = p * t + .46631433533434331287e+4; p = p * t - .43799652308386926161e+4; p = p * t + .19007153590528134753e+4; p = p * t - .30786872642313695280e+3; q = t - .83288327901936570000e+2; q = q * t + .92741319160935318800e+3; q = q * t - .35088976383877264098e+4; q = q * t + .59039348134843665626e+4; q = q * t - .48481635430048872102e+4; q = q * t + .18997769186453057810e+4; q = q * t - .28386514725366621129e+3; p = p / q; t = a * p; } return t; } extern __attribute__((__weak__)) double erfcinv(double a); double erfcinv(double a) { double t; volatile union { double d; unsigned long long int l; } cvt; if (__isnan(a)) { return a + a; } if (a <= 0.0) { cvt.l = 0xfff8000000000000ull; t = cvt.d; if (a == 0.0) { t = (1.0 - a) * exp(1000.0); } } else if (a >= 0.0625) { t = erfinv (1.0 - a); } else if (a >= 1e-100) { double p, q; t = log(a); t = 1.0 / sqrt(-t); p = 2.7834010353747001060e-3; p = p * t + 8.6030097526280260580e-1; p = p * t + 2.1371214997265515515e+0; p = p * t + 3.1598519601132090206e+0; p = p * t + 3.5780402569085996758e+0; p = p * t + 1.5335297523989890804e+0; p = p * t + 3.4839207139657522572e-1; p = p * t + 5.3644861147153648366e-2; p = p * t + 4.3836709877126095665e-3; p = p * t + 1.3858518113496718808e-4; p = p * t + 1.1738352509991666680e-6; q = t + 2.2859981272422905412e+0; q = q * t + 4.3859045256449554654e+0; q = q * t + 4.6632960348736635331e+0; q = q * t + 3.9846608184671757296e+0; q = q * t + 1.6068377709719017609e+0; q = q * t + 3.5609087305900265560e-1; q = q * t + 5.3963550303200816744e-2; q = q * t + 4.3873424022706935023e-3; q = q * t + 1.3858762165532246059e-4; q = q * t + 1.1738313872397777529e-6; t = p / (q * t); } else { double p, q; t = log(a); t = 1.0 / sqrt(-t); p = 6.9952990607058154858e-1; p = p * t + 1.9507620287580568829e+0; p = p * t + 8.2810030904462690216e-1; p = p * t + 1.1279046353630280005e-1; p = p * t + 6.0537914739162189689e-3; p = p * t + 1.3714329569665128933e-4; p = p * t + 1.2964481560643197452e-6; p = p * t + 4.6156006321345332510e-9; p = p * t + 4.5344689563209398450e-12; q = t + 1.5771922386662040546e+0; q = q * t + 2.1238242087454993542e+0; q = q * t + 8.4001814918178042919e-1; q = q * t + 1.1311889334355782065e-1; q = q * t + 6.0574830550097140404e-3; q = q * t + 1.3715891988350205065e-4; q = q * t + 1.2964671850944981713e-6; q = q * t + 4.6156017600933592558e-9; q = q * t + 4.5344687377088206783e-12; t = p / (q * t); } return t; } extern __attribute__((__weak__)) float rsqrtf(float a); float rsqrtf(float a) { return (float)rsqrt((double)a); } extern __attribute__((__weak__)) float rcbrtf(float a); float rcbrtf(float a) { return (float)rcbrt((double)a); } extern __attribute__((__weak__)) float sinpif(float a); float sinpif(float a) { return (float)sinpi((double)a); } extern __attribute__((__weak__)) float erfinvf(float a); float erfinvf(float a) { return (float)erfinv((double)a); } extern __attribute__((__weak__)) float erfcinvf(float a); float erfcinvf(float a) { return (float)erfcinv((double)a); } extern __attribute__((__weak__)) int min(int a, int b); int min(int a, int b) { return a < b ? a : b; } extern __attribute__((__weak__)) unsigned int umin(unsigned int a, unsigned int b); unsigned int umin(unsigned int a, unsigned int b) { return a < b ? a : b; } extern __attribute__((__weak__)) long long int llmin(long long int a, long long int b); long long int llmin(long long int a, long long int b) { return a < b ? a : b; } extern __attribute__((__weak__)) unsigned long long int ullmin(unsigned long long int a, unsigned long long int b); unsigned long long int ullmin(unsigned long long int a, unsigned long long int b) { return a < b ? a : b; } extern __attribute__((__weak__)) int max(int a, int b); int max(int a, int b) { return a > b ? a : b; } extern __attribute__((__weak__)) unsigned int umax(unsigned int a, unsigned int b); unsigned int umax(unsigned int a, unsigned int b) { return a > b ? a : b; } extern __attribute__((__weak__)) long long int llmax(long long int a, long long int b); long long int llmax(long long int a, long long int b) { return a > b ? a : b; } extern __attribute__((__weak__)) unsigned long long int ullmax(unsigned long long int a, unsigned long long int b); unsigned long long int ullmax(unsigned long long int a, unsigned long long int b) { return a > b ? a : b; } # 5006 "/usr/local/cuda/bin/../include/math_functions.h" 3 # 1 "/usr/local/cuda/bin/../include/math_functions_dbl_ptx3.h" 1 3 # 5007 "/usr/local/cuda/bin/../include/math_functions.h" 2 3 # 91 "/usr/local/cuda/bin/../include/common_functions.h" 2 # 164 "/usr/local/cuda/bin/../include/crt/host_runtime.h" 2 #pragma pack() # 2 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" 2 # 1 "/tmp/tmpxft_00000a86_00000000-3_radixsort_kernel.fatbin.c" 1 # 1 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" 1 # 83 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" extern "C" { # 97 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" typedef struct { char* gpuProfileName; char* cubin; } __cudaFatCubinEntry; # 113 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" typedef struct { char* gpuProfileName; char* ptx; } __cudaFatPtxEntry; # 125 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" typedef struct __cudaFatDebugEntryRec { char* gpuProfileName; char* debug; struct __cudaFatDebugEntryRec *next; unsigned int size; } __cudaFatDebugEntry; typedef struct __cudaFatElfEntryRec { char* gpuProfileName; char* elf; struct __cudaFatElfEntryRec *next; unsigned int size; } __cudaFatElfEntry; typedef enum { __cudaFatDontSearchFlag = (1 << 0), __cudaFatDontCacheFlag = (1 << 1), __cudaFatSassDebugFlag = (1 << 2) } __cudaFatCudaBinaryFlag; # 152 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" typedef struct { char* name; } __cudaFatSymbol; # 166 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" typedef struct __cudaFatCudaBinaryRec { unsigned long magic; unsigned long version; unsigned long gpuInfoVersion; char* key; char* ident; char* usageMode; __cudaFatPtxEntry *ptx; __cudaFatCubinEntry *cubin; __cudaFatDebugEntry *debug; void* debugInfo; unsigned int flags; __cudaFatSymbol *exported; __cudaFatSymbol *imported; struct __cudaFatCudaBinaryRec *dependends; unsigned int characteristic; __cudaFatElfEntry *elf; } __cudaFatCudaBinary; # 203 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" typedef enum { __cudaFatAvoidPTX, __cudaFatPreferBestCode, __cudaFatForcePTX } __cudaFatCompilationPolicy; # 227 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" void fatGetCubinForGpuWithPolicy( __cudaFatCudaBinary *binary, __cudaFatCompilationPolicy policy, char* gpuName, char* *cubin, char* *dbgInfoFile ); # 240 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" unsigned char fatCheckJitForGpuWithPolicy( __cudaFatCudaBinary *binary, __cudaFatCompilationPolicy policy, char* gpuName, char* *ptx ); # 250 "/usr/local/cuda/bin/../include/__cudaFatFormat.h" void fatFreeCubin( char* cubin, char* dbgInfoFile ); void __cudaFatFreePTX( char* ptx ); } # 2 "/tmp/tmpxft_00000a86_00000000-3_radixsort_kernel.fatbin.c" 2 asm( ".section .rodata\n" ".align 32\n" "__deviceText_$sm_21$:\n" ".quad 0x33010102464c457f,0x0000000000000004,0x0000000100be0002,0x0000000000000000\n" ".quad 0x000000000000254c,0x0000000000000040,0x0038004000140115,0x0001001300400006\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000300000001,0x0000000000000000,0x0000000000000000,0x0000000000000500\n" ".quad 0x000000000000024c,0x0000000000000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x000000030000000b,0x0000000000000000,0x0000000000000000,0x000000000000074c\n" ".quad 0x000000000000007f,0x0000000000000000,0x0000000000000001,0x0000000000000000\n" ".quad 0x0000000200000013,0x0000000000000000,0x0000000000000000,0x00000000000007cb\n" ".quad 0x0000000000000258,0x0000001400000002,0x0000000000000001,0x0000000000000018\n" ".quad 0x00000001000000eb,0x0000000000100006,0x0000000000000000,0x0000000000000a23\n" ".quad 0x0000000000000918,0x1400000b00000003,0x0000000000000004,0x0000000000000000\n" ".quad 0x00000001000001fe,0x0000000000000002,0x0000000000000000,0x000000000000133b\n" ".quad 0x0000000000000034,0x0000000400000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x000000010000010f,0x0000000000000002,0x0000000000000000,0x000000000000136f\n" ".quad 0x0000000000000070,0x0000000400000000,0x0000000000000001,0x0000000000000000\n" ".quad 0x00000001000000b4,0x0000000000100006,0x0000000000000000,0x00000000000013df\n" ".quad 0x0000000000000448,0x0e00000900000003,0x0000000000000004,0x0000000000000000\n" ".quad 0x00000001000001dc,0x0000000000000002,0x0000000000000000,0x0000000000001827\n" ".quad 0x0000000000000020,0x0000000700000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x00000001000001b9,0x0000000000000002,0x0000000000000000,0x0000000000001847\n" ".quad 0x0000000000000004,0x0000000700000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x00000001000000ce,0x0000000000000002,0x0000000000000000,0x000000000000184b\n" ".quad 0x0000000000000018,0x0000000700000000,0x0000000000000001,0x0000000000000000\n" ".quad 0x0000000100000036,0x0000000000100006,0x0000000000000000,0x0000000000001863\n" ".quad 0x0000000000000bb0,0x1500000600000003,0x0000000000000004,0x0000000000000000\n" ".quad 0x0000000100000178,0x0000000000000002,0x0000000000000000,0x0000000000002413\n" ".quad 0x000000000000003c,0x0000000b00000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x0000000100000136,0x0000000000000002,0x0000000000000000,0x000000000000244f\n" ".quad 0x0000000000000008,0x0000000b00000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x000000010000006f,0x0000000000000002,0x0000000000000000,0x0000000000002457\n" ".quad 0x0000000000000084,0x0000000b00000000,0x0000000000000001,0x0000000000000000\n" ".quad 0x000000010000022a,0x0000000000000002,0x0000000000000000,0x00000000000024db\n" ".quad 0x0000000000000008,0x0000000000000000,0x0000000000000008,0x0000000000000000\n" ".quad 0x0000000900000239,0x0000000000000000,0x0000000000000000,0x00000000000024e3\n" ".quad 0x0000000000000020,0x0000000f00000003,0x0000000000000004,0x0000000000000010\n" ".quad 0x000000080000002b,0x0000000000000003,0x0000000000000000,0x0000000000002503\n" ".quad 0x0000000000030040,0x0000000000000000,0x0000000000000004,0x0000000000000000\n" ".quad 0x00000001000000ab,0x0000000000000002,0x0000000000000000,0x0000000000002503\n" ".quad 0x0000000000000048,0x0000000000000000,0x0000000000000001,0x0000000000000000\n" ".quad 0x7472747368732e00,0x747274732e006261,0x746d79732e006261,0x672e766e2e006261\n" ".quad 0x6e692e6c61626f6c,0x672e766e2e007469,0x742e006c61626f6c,0x35325a5f2e747865\n" ".quad 0x6464417869646152,0x417374657366664f,0x6c6666756853646e,0x5679654b32315065\n" ".quad 0x7269615065756c61,0x2e00696a6a5f3053,0x2e6f666e692e766e,0x6964615235325a5f\n" ".quad 0x7366664f64644178,0x6853646e41737465,0x323150656c666675,0x65756c615679654b\n" ".quad 0x6a5f305372696150,0x692e766e2e00696a,0x7865742e006f666e,0x615234315a5f2e74\n" ".quad 0x6966657250786964,0x6e2e00766d755378,0x5f2e6f666e692e76,0x786964615234315a\n" ".quad 0x7553786966657250,0x747865742e00766d,0x69646152385a5f2e,0x4b3231506d755378\n" ".quad 0x5065756c61567965,0x2e006a6a6a726961,0x2e6f666e692e766e,0x7869646152385a5f\n" ".quad 0x654b3231506d7553,0x615065756c615679,0x6e2e006a6a6a7269,0x6174736e6f632e76\n" ".quad 0x325a5f2e3631746e,0x6441786964615235,0x7374657366664f64,0x6666756853646e41\n" ".quad 0x79654b323150656c,0x69615065756c6156,0x00696a6a5f305372,0x736e6f632e766e2e\n" ".quad 0x5a5f2e30746e6174,0x4178696461523532,0x74657366664f6464,0x66756853646e4173\n" ".quad 0x654b323150656c66,0x615065756c615679,0x696a6a5f30537269,0x6e6f632e766e2e00\n" ".quad 0x2e3631746e617473,0x6964615234315a5f,0x5378696665725078,0x2e766e2e00766d75\n" ".quad 0x746e6174736e6f63,0x615234315a5f2e30,0x6966657250786964,0x6e2e00766d755378\n" ".quad 0x6174736e6f632e76,0x52385a5f2e30746e,0x506d755378696461,0x6c615679654b3231\n" ".quad 0x6a6a726961506575,0x6f632e766e2e006a,0x3431746e6174736e,0x766e2e6c65722e00\n" ".quad 0x6e6174736e6f632e,0x325a5f0000343174,0x6441786964615235,0x7374657366664f64\n" ".quad 0x6666756853646e41,0x79654b323150656c,0x69615065756c6156,0x00696a6a5f305372\n" ".quad 0x6964615234315a5f,0x5378696665725078,0x52385a5f00766d75,0x506d755378696461\n" ".quad 0x6c615679654b3231,0x6a6a726961506575,0x786964615264006a,0x6d75536b636f6c42\n" ".quad 0x5378696461526400,0x0000000000006d75,0x0000000000000000,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000100,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000200,0x0000000000000000,0x0300000000000000,0x0000000000000300\n" ".quad 0x0000000000000000,0x0300000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000001100,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000b00,0x0000000bb0000000,0x0300000000000000,0x0000000000000e00\n" ".quad 0x0000000000000000,0x0300000000000000,0x0000000000001200,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000700,0x0000000448000000,0x0300000000000000\n" ".quad 0x0000000000000a00,0x0000000000000000,0x0300000000000000,0x0000000000000400\n" ".quad 0x0000000918000000,0x0300000000000000,0x0000000000000600,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000d00,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000c00,0x0000000000000000,0x0300000000000000,0x0000000000000900\n" ".quad 0x0000000000000000,0x0300000000000000,0x0000000000000800,0x0000000000000000\n" ".quad 0x0300000000000000,0x0000000000000500,0x0000000000000000,0x0300000000000000\n" ".quad 0x0000000000000f00,0x0000000000000000,0x0300000000000000,0x0000000000001000\n" ".quad 0x0000000000000000,0x1200000001000000,0x0000000000000b10,0x0000000bb0000000\n" ".quad 0x1200000034000000,0x0000000000000710,0x0000000448000000,0x1200000048000000\n" ".quad 0x0000000000000410,0x0000000918000000,0x1100000066000000,0x0000000000001100\n" ".quad 0x0000000040000000,0x1100000075000000,0x0000000040001100,0x0000030000000000\n" ".quad 0x0400005de4000000,0x0084001c04280044,0x0ffc01dc032c0000,0x03000000071a0ec0\n" ".quad 0x0000009de4600000,0x02a00001e7280000,0x030000dc03400000,0x0008011e034800c0\n" ".quad 0x0ffc31dc036000c0,0x01800021e7198ec0,0x0140000007400000,0x0400209c03600000\n" ".quad 0x00004fdc854800c0,0x030020dc03c90000,0x04004fdc854800c0,0x08004fdc85c90000\n" ".quad 0x0ffc31dc03c90000,0x0c004fdc85198ec0,0x1000411c03c90000,0xfee00001e74800c0\n" ".quad 0x0ffc21dc134003ff,0x00a00021e7198ec0,0x0100209c03400000,0x00004fdc854800c0\n" ".quad 0x0ffc21dc03c90000,0x0400411c03198ec0,0xff600001e74800c0,0x0000001df44003ff\n" ".quad 0x00ffffdc04400000,0xaaac00dde250ee00,0x0094009c041aaaaa,0x0010011c032c0000\n" ".quad 0x00b030dc435800c0,0x0008215e03500040,0x003c009c036000c0,0x001c30dc036800c0\n" ".quad 0x0014419c035800c0,0x1aa0000007480000,0x001831dc03600000,0x0018319c03200400\n" ".quad 0x001871dc03200600,0x1a000001e71b0e00,0x00142bdc03400000,0x00fc21dc03190ec0\n" ".quad 0x001c521c04190e00,0x000423dc03080e00,0x00182bdc03190ec0,0x000825dc03190ec0\n" ".quad 0x001c525c04190ec0,0x000c27dc03080e00,0x001c2bdc03190ec0,0x001029dc03190ec0\n" ".quad 0x001c529c04190ec0,0x00202bdc03080e00,0x001c52dc04190ec0,0x00242bdc03080e00\n" ".quad 0x001c531c04190ec0,0x00282bdc03080e00,0x001c535c04190ec0,0x002c2bdc03080e00\n" ".quad 0x001c539c04190ec0,0x00302bdc03080e00,0x001c53dc04190ec0,0x00342bdc03080e00\n" ".quad 0x001c541c04190ec0,0x00382bdc03080e00,0x001c545c04190ec0,0x003c2bdc03080e00\n" ".quad 0x001c549c04190ec0,0x00a07bdc03080e00,0x008000b5e7188e40,0x00800095e4400000\n" ".quad 0x0020709403280040,0x0093f0d4432005c0,0x0000209485480040,0x00005ddc04840000\n" ".quad 0x00fc00b5e40c0e00,0x00e000b9e7280000,0x00c020d803400000,0x03fc30d803580040\n" ".quad 0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0,0x000534d803c10000\n" ".quad 0x000034d8854800c0,0x00ffffdc04c90000,0x00045ddc0450ee00,0x00e000b9e70c0e00\n" ".quad 0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000\n" ".quad 0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000\n" ".quad 0x00085ddc0450ee00,0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040\n" ".quad 0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0,0x000534d803c10000\n" ".quad 0x000034d8854800c0,0x00ffffdc04c90000,0x000c5ddc0450ee00,0x00e000b9e70c0e00\n" ".quad 0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000\n" ".quad 0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000\n" ".quad 0x00105ddc0450ee00,0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040\n" ".quad 0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0,0x000534d803c10000\n" ".quad 0x000034d8854800c0,0x00ffffdc04c90000,0x00fc8ddc0350ee00,0x00185ddc041a8e00\n" ".quad 0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0\n" ".quad 0x000830da03400000,0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0\n" ".quad 0x00ffffdc04c90000,0x00fc9ddc0350ee00,0x00185ddc041a8e00,0x00e000b9e70c0e00\n" ".quad 0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000\n" ".quad 0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000\n" ".quad 0x00fcaddc0350ee00,0x00185ddc041a8e00,0x00e000b9e70c0e00,0x00c020d803400000\n" ".quad 0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0\n" ".quad 0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000,0x00fcbddc0350ee00\n" ".quad 0x00185ddc041a8e00,0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040\n" ".quad 0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0,0x000534d803c10000\n" ".quad 0x000034d8854800c0,0x00ffffdc04c90000,0x00fccddc0350ee00,0x00185ddc041a8e00\n" ".quad 0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0\n" ".quad 0x000830da03400000,0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0\n" ".quad 0x00ffffdc04c90000,0x00fcdddc0350ee00,0x00185ddc041a8e00,0x00e000b9e70c0e00\n" ".quad 0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000\n" ".quad 0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000\n" ".quad 0x00fceddc0350ee00,0x00185ddc041a8e00,0x00e000b9e70c0e00,0x00c020d803400000\n" ".quad 0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0\n" ".quad 0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000,0x00fcfddc0350ee00\n" ".quad 0x00185ddc041a8e00,0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040\n" ".quad 0x001030d8436800c0,0x000830da03400000,0x000034d8856000c0,0x000534d803c10000\n" ".quad 0x000034d8854800c0,0x00ffffdc04c90000,0x00fd0ddc0350ee00,0x00185ddc041a8e00\n" ".quad 0x00e000b9e70c0e00,0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0\n" ".quad 0x000830da03400000,0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0\n" ".quad 0x00ffffdc04c90000,0x00fd1ddc0350ee00,0x00185ddc041a8e00,0x00e000b9e70c0e00\n" ".quad 0x00c020d803400000,0x03fc30d803580040,0x001030d8436800c0,0x000830da03400000\n" ".quad 0x000034d8856000c0,0x000534d803c10000,0x000034d8854800c0,0x00ffffdc04c90000\n" ".quad 0x00fd2ddc0350ee00,0x00185bdc041a8e00,0x00e000b5e70c0e00,0x00c0209403400000\n" ".quad 0x03fc209403580040,0x00102094436800c0,0x000820d603400000,0x00003094856000c0\n" ".quad 0x0004209403c10000,0x00003094854800c0,0x00ffffdc04c90000,0x004071dc0350ee00\n" ".quad 0x001c6bdc034800c0,0xe9600015e71a0e00,0x000800dc134003ff,0x03fc31dc035800c0\n" ".quad 0x00000001e71a0ec0,0x0008309e03800000,0x0300311c036000c0,0x000c00dc03200ac0\n" ".quad 0x0100219c036800c0,0x0010301c034800c0,0x0ff061dc03480000,0x000830dc03198ec0\n" ".quad 0x02c00021e7480000,0x0280000007400000,0x0008315e03600000,0x0000029de46000c0\n" ".quad 0x0010019c43280078,0x0000521c855000c0,0x0010011c03c10000,0x0400525c852015c0\n" ".quad 0x300001dc03c10000,0x0200209c034800c0,0x001bf15c434800c0,0x020030dc03480000\n" ".quad 0x0010719c034800c0,0x6000001c032015c0,0x001071dc434800c0,0x0100229c035000c0\n" ".quad 0x001ff1dc434800c0,0x0ff0a1dc03480000,0x0000421c85198ec0,0x0000625c85940000\n" ".quad 0xfda00001e7940000,0x0ff021dc134003ff,0x00000021e7198ec0,0x0008309e03800000\n" ".quad 0x0000011de46000c0,0x001000dc43280078,0x0000209c855000c0,0x0010011c03c10000\n" ".quad 0x000ff15c432009c0,0x0000409c85480000,0x0000001de7940000,0x0000000000800000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0400000000000000,0x080000000000100c,0x100000000c000000\n" ".quad 0x1100080a04000000,0x0300140020000000,0xff000c1704001419,0x0000100003ffffff\n" ".quad 0xff000c17040011f0,0x00000c0002ffffff,0xff000c17040011f0,0x0000080001ffffff\n" ".quad 0xff000c17040011f0,0x0000000000ffffff,0x9800080d040021f0,0xe400000020002201\n" ".quad 0x042800440400005d,0x432c00000084001c,0x04500040000400dc,0x032c00000094009c\n" ".quad 0x035800c0001c311c,0x035800c00010019c,0x835000c0300020dc,0x034000000010215c\n" ".quad 0x032000c00300411e,0x034800c03000321c,0x072008c00300511c,0x0360000003a00000\n" ".quad 0x036800c0003c015c,0xe4198e00001081dc,0x032800000010025d,0xf4200ac00044615c\n" ".quad 0x0340000000000001,0xe44800c00300419c,0x432800780000029d,0x035000c0001041dc\n" ".quad 0x031a0e00001881dc,0x032015c00010419c,0x436000c00008535e,0xe7480000001ff1dc\n" ".quad 0x0740000001c00021,0x0360000001800000,0x854800c00600925c,0x038400000000629c\n" ".quad 0x854800c00300931c,0x038400000c0062dc,0x031a0e00003081dc,0x434801c01800619c\n" ".quad 0x8548000000fc71dc,0x85c900000000d29c,0x03c900000cc0d2dc,0xe74800c01980d35c\n" ".quad 0x134003fffea00001,0xf41a0e00002481dc,0x8540000000000021,0x958400000000619c\n" ".quad 0x04c900000000d19c,0x0350ee0000ffffdc,0x075000c0004401dc,0x0360000001c00000\n" ".quad 0xe44800c00040719c,0x03280000001c021d,0xe71a0e00001c61dc,0x0340000001200021\n" ".quad 0xe46000c0000872de,0x0328000000fc025d,0x854800c00004821c,0x03c100000000b29c\n" ".quad 0x031a8e00001883dc,0x854800000024a25c,0x03c900000000b25c,0xe74800c00010b2dc\n" ".quad 0xf44003ffff200005,0x044000000000001d,0x0350ee0000ffffdc,0x856000c00008721e\n" ".quad 0x85c1000000f0825c,0x04c900000100825c,0xe250ee0000ffffdc,0x031800000044025d\n" ".quad 0x034800000024729d,0x234800c00040a2dc,0x03198e0000fcb3dc,0x856000c00008a2e6\n" ".quad 0xe4c100000100b2a4,0x0428000000fc0285,0x8550ee0000ffffdc,0x03c10000010082dc\n" ".quad 0x854800000028b29c,0x04c900000100829c,0x0350ee0000ffffdc,0x236000c00004925e\n" ".quad 0xe7198ec032fc93dc,0x034003fffe400005,0x074800fffffc725c,0x2360000001800000\n" ".quad 0x85198e0000fc93dc,0xe4c103fffff08264,0xe728000000fc0245,0x0340000000e00021\n" ".quad 0x854800c0000471dc,0x03c100000000829c,0x031a8e00001871dc,0x854800000024a29c\n" ".quad 0x03c900000000829c,0xe74800c00010821c,0xf44003ffff200001,0x044000000000001d\n" ".quad 0x0350ee0000ffffdc,0x034000c00400219d,0x034800c00004421c,0x035800c00010619c\n" ".quad 0x075000c00300619c,0x0360000003400000,0xf4198e00002061dc,0x0340000000000001\n" ".quad 0xe44800c00300811c,0x432800780000025d,0x035000c0001081dc,0x031a0e00001061dc\n" ".quad 0x032013c00010811c,0x436000c0000852de,0xe7480000001ff15c,0x0740000001c00021\n" ".quad 0x0360000001800000,0x854800c00600821c,0x85c100000000b1dc,0x03c100000cc0b25c\n" ".quad 0x034800c00300829c,0x034800c01980b2dc,0x851a0e00002861dc,0x85940000000041dc\n" ".quad 0x039400000c00425c,0x434801c01800411c,0xe748000000fc515c,0x134003fffea00001\n" ".quad 0xf41a0e00002061dc,0x8540000000000021,0x95c100000000b19c,0x039400000000419c\n" ".quad 0xe71a8e0000fc01dc,0xe280000000000001,0x851800000010015d,0x43c10000cbf3f01c\n" ".quad 0x035000c00010211c,0x43200bb80010219c,0x435000c00010309c,0x034800000013f1dc\n" ".quad 0x43200bb80000311c,0x85480000000bf15c,0x859400000000601c,0xe794000000004fdc\n" ".quad 0x008000000000001d,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0xab00000000000000,0x1000080a04aaaaaa,0x0400200000000000,0x200022019800080d\n" ".quad 0x0400005de4000000,0x0084001c04280044,0x00fc01dc032c0000,0x4003ffe0851a8e00\n" ".quad 0x003801dc03c90000,0x00c00081e71a0ec0,0x000800e203400000,0x001000a0436000c0\n" ".quad 0x00103120035000c0,0x00fc216043480178,0x000040a085480000,0x401030a085840000\n" ".quad 0x00ffffdc04c90000,0x003c01dc2350ee00,0x0004009de2198ec0,0x000800dd03180000\n" ".quad 0x00fc33dc23480000,0x00083106031b0000,0x400040c4856000c0,0x00fc00e5e4c10000\n" ".quad 0x00ffffdc04280000,0x008000a1e750ee00,0x0008014203400000,0x40005100856000c0\n" ".quad 0x000c40c003c10000,0x400050c085480000,0x00ffffdc04c90000,0x0004209e0350ee00\n" ".quad 0x003c23dc236000c0,0xfe200005e7198ec0,0x0008011c034003ff,0x000c00dc035800c0\n" ".quad 0x000c41dc436800c0,0x0094009c04400000,0x00c0411c032c0000,0x0ffc71dc232004c0\n" ".quad 0x000c419c431a0ec0,0x0660000007400000,0x00000001f4600000,0x010070dc03400000\n" ".quad 0x0000011de44800c0,0x0010615ce3280078,0x0ffc31dc235000c0,0x0010611ca3198ec0\n" ".quad 0x000870de032009c0,0x0017f15c436000c0,0x04000021e7480000,0x03c0000007400000\n" ".quad 0x0019229ec4600000,0x0000425c851c0000,0x0014a29c43840000,0xc000421c85500040\n" ".quad 0x002ca29c23840000,0x3000631c035800c0,0x002922df844800c0,0x020071dc031c0000\n" ".quad 0x0028b29c234800c0,0x8000411c03308c00,0x003122dec44801c1,0x0008a29e031c0000\n" ".quad 0x0014b2dc436000c0,0x4000a29c85500040,0x002cb2dc23c10000,0x6000619c035800c0\n" ".quad 0x002d235f844800c0,0x00fc515c431c0000,0x002cd2dc23480000,0x0028925c03309800\n" ".quad 0x0008b29e03480000,0x0000325c856000c0,0x0100725c03c90000,0x4000a29c854800c0\n" ".quad 0x0ffc91dc23c10000,0x0028821c03198ec0,0x0400321c85480000,0x080030dc03c90000\n" ".quad 0xfc600001e74800c0,0x0ffc71dc334003ff,0x00000021f4198ec0,0x0000415c85400000\n" ".quad 0x001921dec4840000,0x001471dc431c0000,0x002c711c23500040,0x001121df845800c0\n" ".quad 0x0010711c231c0000,0x0008411e03308c00,0x4000411c856000c0,0x0010511c03c10000\n" ".quad 0x0000311c95480000,0x00ffffdc04c90000,0x00ffffdc0450ee00,0xaaac00dde250ee00\n" ".quad 0x0010011c031aaaaa,0x00d030dc435800c0,0x0010215c43500040,0x003c009c03400000\n" ".quad 0x001c30dc036800c0,0x0014301c035800c0,0x0014315c03200400,0x001401dc03200600\n" ".quad 0x00000001e71b0e00,0x00142bdc23800000,0x00fc21dc23190ec0,0x001c519c04190e00\n" ".quad 0x00182bdc23080e00,0x000423dc23190ec0,0x001c51dc04190ec0,0x000825dc23080e00\n" ".quad 0x001c2bdc23190ec0,0x000c27dc23190ec0,0x001c521c04190ec0,0x001029dc23080e00\n" ".quad 0x00202bdc23190ec0,0x001c525c04190ec0,0x00242bdc23080e00,0x001c531c04190ec0\n" ".quad 0x00282bdc23080e00,0x001c535c04190ec0,0x002c2bdc23080e00,0x001c539c04190ec0\n" ".quad 0x00302bdc23080e00,0x001c53dc04190ec0,0x00342bdc23080e00,0x001c541c04190ec0\n" ".quad 0x00382bdc23080e00,0x001c545c04190ec0,0x003c2bdc23080e00,0x001c549c04190ec0\n" ".quad 0x00c00bdc03080e00,0x008000b5e7188e40,0x00800095e4400000,0x0020029403280040\n" ".quad 0x0093f2d4432005c0,0x0000a094a5480040,0x00005ddc04840000,0x00fc00b5e40c0e00\n" ".quad 0x016000b9e7280000,0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0\n" ".quad 0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000\n" ".quad 0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000\n" ".quad 0x00ffffdc04940000,0x00045ddc0450ee00,0x016000b9e70c0e00,0x00e0229803400000\n" ".quad 0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000,0x00a00299e46000c0\n" ".quad 0x000132d885280040,0x0020b29803c10000,0x0004b518032015c0,0x00b3f2d8434800c0\n" ".quad 0x0001351885480040,0x0000a098a5c90000,0x00ffffdc04940000,0x00085ddc0450ee00\n" ".quad 0x016000b9e70c0e00,0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0\n" ".quad 0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000\n" ".quad 0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000\n" ".quad 0x00ffffdc04940000,0x000c5ddc0450ee00,0x016000b9e70c0e00,0x00e0229803400000\n" ".quad 0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000,0x000132d8856000c0\n" ".quad 0x00a00299e4c10000,0x0004b51803280040,0x0020b298034800c0,0x00013518852015c0\n" ".quad 0x00b3f2d843c90000,0x0000a098a5480040,0x00ffffdc04940000,0x00105ddc0450ee00\n" ".quad 0x016000b9e70c0e00,0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0\n" ".quad 0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000\n" ".quad 0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000\n" ".quad 0x00ffffdc04940000,0x00fc6ddc0350ee00,0x00185ddc041a8e00,0x016000b9e70c0e00\n" ".quad 0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000\n" ".quad 0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000,0x0004b518032015c0\n" ".quad 0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000,0x00ffffdc04940000\n" ".quad 0x00fc7ddc0350ee00,0x00185ddc041a8e00,0x016000b9e70c0e00,0x00e0229803400000\n" ".quad 0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000,0x00a00299e46000c0\n" ".quad 0x000132d885280040,0x0020b29803c10000,0x0004b518032015c0,0x00b3f2d8434800c0\n" ".quad 0x0001351885480040,0x0000a098a5c90000,0x00ffffdc04940000,0x00fc8ddc0350ee00\n" ".quad 0x00185ddc041a8e00,0x016000b9e70c0e00,0x00e0229803400000,0x03fca29803580040\n" ".quad 0x0010a298436800c0,0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040\n" ".quad 0x0020b29803c10000,0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040\n" ".quad 0x0000a098a5c90000,0x00ffffdc04940000,0x00fc9ddc0350ee00,0x00185ddc041a8e00\n" ".quad 0x016000b9e70c0e00,0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0\n" ".quad 0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000\n" ".quad 0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000\n" ".quad 0x00ffffdc04940000,0x00fccddc0350ee00,0x00185ddc041a8e00,0x016000b9e70c0e00\n" ".quad 0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000\n" ".quad 0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000,0x0004b518032015c0\n" ".quad 0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000,0x00ffffdc04940000\n" ".quad 0x00fcdddc0350ee00,0x00185ddc041a8e00,0x016000b9e70c0e00,0x00e0229803400000\n" ".quad 0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000,0x000132d8856000c0\n" ".quad 0x00a00299e4c10000,0x0004b51803280040,0x0020b298034800c0,0x00013518852015c0\n" ".quad 0x00b3f2d843c90000,0x0000a098a5480040,0x00ffffdc04940000,0x00fceddc0350ee00\n" ".quad 0x00185ddc041a8e00,0x016000b9e70c0e00,0x00e0229803400000,0x03fca29803580040\n" ".quad 0x0010a298436800c0,0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040\n" ".quad 0x0020b29803c10000,0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040\n" ".quad 0x0000a098a5c90000,0x00ffffdc04940000,0x00fcfddc0350ee00,0x00185ddc041a8e00\n" ".quad 0x016000b9e70c0e00,0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0\n" ".quad 0x0008a4da03400000,0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000\n" ".quad 0x0004b518032015c0,0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000\n" ".quad 0x00ffffdc04940000,0x00fd0ddc0350ee00,0x00185ddc041a8e00,0x016000b9e70c0e00\n" ".quad 0x00e0229803400000,0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000\n" ".quad 0x00a00299e46000c0,0x000132d885280040,0x0020b29803c10000,0x0004b518032015c0\n" ".quad 0x00b3f2d8434800c0,0x0001351885480040,0x0000a098a5c90000,0x00ffffdc04940000\n" ".quad 0x00fd1ddc0350ee00,0x00185ddc041a8e00,0x016000b9e70c0e00,0x00e0229803400000\n" ".quad 0x03fca29803580040,0x0010a298436800c0,0x0008a4da03400000,0x00a00299e46000c0\n" ".quad 0x000132d885280040,0x0020b29803c10000,0x0004b518032015c0,0x00b3f2d8434800c0\n" ".quad 0x0001351885480040,0x0000a098a5c90000,0x00ffffdc04940000,0x00fd2ddc0350ee00\n" ".quad 0x00185bdc041a8e00,0x016000b5e70c0e00,0x00e0229403400000,0x03fca29403580040\n" ".quad 0x0010a294436800c0,0x0008a4d603400000,0x00a00295e46000c0,0x000132d485280040\n" ".quad 0x0020b29403c10000,0x0004b514032015c0,0x00b3f2d4434800c0,0x0001351485480040\n" ".quad 0x0000a094a5c90000,0x00ffffdc04940000,0x0040001c0350ee00,0x00140bdc034800c0\n" ".quad 0xe1600015e7188e00,0x0000001de74003ff,0x0000000000800000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0100000000000000,0x04aaaaaaab000000,0x080000000000140c\n" ".quad 0x1400000010000000,0x0400000018000000,0x200000000e00080a,0x04001c1903001c00\n" ".quad 0x04ffffffff000c17,0x040011f000001800,0x03ffffffff000c17,0x040011f000001400\n" ".quad 0x02ffffffff000c17,0x040011f000001000,0x01ffffffff000c17,0x040021f000000800\n" ".quad 0x00ffffffff000c17,0x040021f000000000,0x200022019800080d,0x0000000000000000\n" ".quad 0x0000000000000000,0x1800000001000000,0x0000000004000000,0x1700000001000000\n" ".quad 0x1600081204000000,0x0400000000000000,0x0000000016000811,0x1500081204000000\n" ".quad 0x0400000000000000,0x0000000015000811,0x1400081204000000,0x0400000000000000\n" ".quad 0x0000000014000811,0x0000000600000000,0x0000254c00000005,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000015000000000,0x0000015000000000,0x0000000400000000\n" ".quad 0x6000000000000000,0x00000a2300001605,0x0000000000000000,0x0000000000000000\n" ".quad 0x000009bc00000000,0x000009bc00000000,0x0000000400000000,0x6000000000000000\n" ".quad 0x000013df00001505,0x0000000000000000,0x0000000000000000,0x0000048400000000\n" ".quad 0x0000048400000000,0x0000000400000000,0x6000000000000000,0x0000186300001405\n" ".quad 0x0000000000000000,0x0000000000000000,0x00000c7800000000,0x00000c7800000000\n" ".quad 0x0000000400000000,0x0000000100000000,0x000024db00000005,0x0000000000000000\n" ".quad 0x0000000000000000,0x0000002800000000,0x0000002800000000,0x0000000400000000\n" ".quad 0x0000000100000000,0x0000250300000006,0x0000000000000000,0x0000000000000000\n" ".quad 0x0000000000000000,0x0003004000000000,0x0000000400000000,0x0000000000000000\n" ".text"); extern "C" { extern const unsigned long long __deviceText_$sm_21$[1236]; } asm( ".section .rodata\n" ".align 32\n" "__deviceText_$compute_20$:\n" ".quad 0x6f69737265762e09,0x2e090a322e32206e,0x7320746567726174,0x2f2f090a30325f6d\n" ".quad 0x656c69706d6f6320,0x2f20687469772064,0x61636f6c2f727375,0x6f2f616475632f6c\n" ".quad 0x696c2f34366e6570,0x2f090a65622f2f62,0x6e65706f766e202f,0x6220322e33206363\n" ".quad 0x206e6f20746c6975,0x2d39302d30313032,0x2d2f2f090a0a3930,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x43202f2f090a2d2d,0x676e696c69706d6f\n" ".quad 0x6d742f706d742f20,0x3030305f74667870,0x30305f3638613030,0x372d303030303030\n" ".quad 0x6f7378696461725f,0x656e72656b5f7472,0x692e337070632e6c,0x632f706d742f2820\n" ".quad 0x3748652e23494263,0x2f2f090a29757245,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2f2f090a0a2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x202f2f090a2d2d2d,0x3a736e6f6974704f,0x2d2d2d2d2f2f090a\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x0a2d2d2d2d2d2d2d,0x72615420202f2f09\n" ".quad 0x2c7874703a746567,0x5f6d733a41534920,0x69646e45202c3032,0x6c7474696c3a6e61\n" ".quad 0x746e696f50202c65,0x3a657a6953207265,0x20202f2f090a3436,0x74704f2809334f2d\n" ".quad 0x6f6974617a696d69,0x296c6576656c206e,0x672d20202f2f090a,0x6775626544280930\n" ".quad 0x0a296c6576656c20,0x326d2d20202f2f09,0x74726f7065522809,0x726f736976646120\n" ".quad 0x2f2f090a29736569,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d,0x2d2d2d2d2d2d2d2d\n" ".quad 0x662e090a0a2d2d2d,0x3c22093109656c69,0x2d646e616d6d6f63,0x090a223e656e696c\n" ".quad 0x093209656c69662e,0x6d742f706d742f22,0x3030305f74667870,0x30305f3638613030\n" ".quad 0x362d303030303030,0x6f7378696461725f,0x656e72656b5f7472,0x6566616475632e6c\n" ".quad 0x090a227570672e32,0x093309656c69662e,0x6e2f656d6f682f22,0x68632f6c616d726f\n" ".quad 0x672f74756f6b6365,0x746f6c65636f7570,0x702d73747365742f,0x632f312e322d7874\n" ".quad 0x742f322e32616475,0x7261702f73747365,0x722f73656c636974,0x74726f7378696461\n" ".quad 0x2e090a226875632e,0x22093409656c6966,0x62696c2f7273752f,0x3836692f6363672f\n" ".quad 0x2d78756e696c2d36,0x2e342e342f756e67,0x64756c636e692f35,0x6665646474732f65\n" ".quad 0x69662e090a22682e,0x752f22093509656c,0x6c61636f6c2f7273,0x69622f616475632f\n" ".quad 0x636e692f2e2e2f6e,0x7472632f6564756c,0x5f6563697665642f,0x2e656d69746e7572\n" ".quad 0x6c69662e090a2268,0x73752f2209360965,0x2f6c61636f6c2f72,0x6e69622f61647563\n" ".quad 0x6c636e692f2e2e2f,0x74736f682f656475,0x73656e696665645f,0x69662e090a22682e\n" ".quad 0x752f22093709656c,0x6c61636f6c2f7273,0x69622f616475632f,0x636e692f2e2e2f6e\n" ".quad 0x6975622f6564756c,0x7079745f6e69746c,0x2e090a22682e7365,0x22093809656c6966\n" ".quad 0x636f6c2f7273752f,0x2f616475632f6c61,0x692f2e2e2f6e6962,0x642f6564756c636e\n" ".quad 0x79745f6563697665,0x090a22682e736570,0x093909656c69662e,0x6f6c2f7273752f22\n" ".quad 0x616475632f6c6163,0x2f2e2e2f6e69622f,0x2f6564756c636e69,0x745f726576697264\n" ".quad 0x0a22682e73657079,0x3109656c69662e09,0x2f7273752f220930,0x75632f6c61636f6c\n" ".quad 0x2e2f6e69622f6164,0x64756c636e692f2e,0x6361667275732f65,0x2e73657079745f65\n" ".quad 0x6c69662e090a2268,0x752f220931310965,0x6c61636f6c2f7273,0x69622f616475632f\n" ".quad 0x636e692f2e2e2f6e,0x7865742f6564756c,0x7079745f65727574,0x2e090a22682e7365\n" ".quad 0x09323109656c6966,0x6f6c2f7273752f22,0x616475632f6c6163,0x2f2e2e2f6e69622f\n" ".quad 0x2f6564756c636e69,0x745f726f74636576,0x0a22682e73657079,0x3109656c69662e09\n" ".quad 0x2f7273752f220933,0x75632f6c61636f6c,0x2e2f6e69622f6164,0x64756c636e692f2e\n" ".quad 0x6563697665642f65,0x5f68636e75616c5f,0x6574656d61726170,0x2e090a22682e7372\n" ".quad 0x09343109656c6966,0x6f6c2f7273752f22,0x616475632f6c6163,0x2f2e2e2f6e69622f\n" ".quad 0x2f6564756c636e69,0x726f74732f747263,0x73616c635f656761,0x662e090a22682e73\n" ".quad 0x2209353109656c69,0x636e692f7273752f,0x7469622f6564756c,0x2e73657079742f73\n" ".quad 0x6c69662e090a2268,0x752f220936310965,0x756c636e692f7273,0x2e656d69742f6564\n" ".quad 0x6c69662e090a2268,0x682f220937310965,0x6d726f6e2f656d6f,0x6b636568632f6c61\n" ".quad 0x6f7570672f74756f,0x65742f746f6c6563,0x2d7874702d737473,0x616475632f312e32\n" ".quad 0x747365742f322e32,0x6369747261702f73,0x696461722f73656c,0x656b5f74726f7378\n" ".quad 0x2275632e6c656e72,0x09656c69662e090a,0x7273752f22093831,0x632f6c61636f6c2f\n" ".quad 0x2f6e69622f616475,0x756c636e692f2e2e,0x6f6d6d6f632f6564,0x6974636e75665f6e\n" ".quad 0x090a22682e736e6f,0x393109656c69662e,0x6c2f7273752f2209,0x6475632f6c61636f\n" ".quad 0x2e2e2f6e69622f61,0x6564756c636e692f,0x75665f6874616d2f,0x2e736e6f6974636e\n" ".quad 0x6c69662e090a2268,0x752f220930320965,0x6c61636f6c2f7273,0x69622f616475632f\n" ".quad 0x636e692f2e2e2f6e,0x74616d2f6564756c,0x6174736e6f635f68,0x090a22682e73746e\n" ".quad 0x313209656c69662e,0x6c2f7273752f2209,0x6475632f6c61636f,0x2e2e2f6e69622f61\n" ".quad 0x6564756c636e692f,0x5f6563697665642f,0x6e6f6974636e7566,0x662e090a22682e73\n" ".quad 0x2209323209656c69,0x636f6c2f7273752f,0x2f616475632f6c61,0x692f2e2e2f6e6962\n" ".quad 0x732f6564756c636e,0x6f74615f31315f6d,0x636e75665f63696d,0x22682e736e6f6974\n" ".quad 0x09656c69662e090a,0x7273752f22093332,0x632f6c61636f6c2f,0x2f6e69622f616475\n" ".quad 0x756c636e692f2e2e,0x32315f6d732f6564,0x5f63696d6f74615f,0x6e6f6974636e7566\n" ".quad 0x662e090a22682e73,0x2209343209656c69,0x636f6c2f7273752f,0x2f616475632f6c61\n" ".quad 0x692f2e2e2f6e6962,0x732f6564756c636e,0x756f645f33315f6d,0x636e75665f656c62\n" ".quad 0x22682e736e6f6974,0x09656c69662e090a,0x7273752f22093532,0x632f6c61636f6c2f\n" ".quad 0x2f6e69622f616475,0x756c636e692f2e2e,0x30325f6d732f6564,0x5f63696d6f74615f\n" ".quad 0x6e6f6974636e7566,0x662e090a22682e73,0x2209363209656c69,0x636f6c2f7273752f\n" ".quad 0x2f616475632f6c61,0x692f2e2e2f6e6962,0x732f6564756c636e,0x746e695f30325f6d\n" ".quad 0x2e736369736e6972,0x6c69662e090a2268,0x752f220937320965,0x6c61636f6c2f7273\n" ".quad 0x69622f616475632f,0x636e692f2e2e2f6e,0x7275732f6564756c,0x6e75665f65636166\n" ".quad 0x682e736e6f697463,0x656c69662e090a22,0x73752f2209383209,0x2f6c61636f6c2f72\n" ".quad 0x6e69622f61647563,0x6c636e692f2e2e2f,0x747865742f656475,0x637465665f657275\n" ".quad 0x6974636e75665f68,0x090a22682e736e6f,0x393209656c69662e,0x6c2f7273752f2209\n" ".quad 0x6475632f6c61636f,0x2e2e2f6e69622f61,0x6564756c636e692f,0x75665f6874616d2f\n" ".quad 0x5f736e6f6974636e,0x337874705f6c6264,0x652e090a0a22682e,0x732e096e72657478\n" ".quad 0x612e206465726168,0x2e2034206e67696c,0x6964615273203862,0x0a3b5d5b6d755378\n" ".quad 0x6c61626f6c672e09,0x206e67696c612e20,0x52642038622e2034,0x5b6d755378696461\n" ".quad 0x3b5d383036363931,0x72746e652e090a0a,0x646152385a5f2079,0x3231506d75537869\n" ".quad 0x65756c615679654b,0x206a6a6a72696150,0x7261702e09090a28,0x203436752e206d61\n" ".quad 0x6170616475635f5f,0x6152385a5f5f6d72,0x31506d7553786964,0x756c615679654b32\n" ".quad 0x6a6a6a7269615065,0x0a2c61746144705f,0x6d617261702e0909,0x5f5f203233752e20\n" ".quad 0x6d72617061647563,0x69646152385a5f5f,0x4b3231506d755378,0x5065756c61567965\n" ".quad 0x655f6a6a6a726961,0x2c73746e656d656c,0x617261702e09090a,0x5f203233752e206d\n" ".quad 0x726170616475635f,0x646152385a5f5f6d,0x3231506d75537869,0x65756c615679654b\n" ".quad 0x5f6a6a6a72696150,0x73746e656d656c65,0x6465646e756f725f,0x323730335f6f745f\n" ".quad 0x7261702e09090a2c,0x203233752e206d61,0x6170616475635f5f,0x6152385a5f5f6d72\n" ".quad 0x31506d7553786964,0x756c615679654b32,0x6a6a6a7269615065,0x0a2974666968735f\n" ".quad 0x6765722e090a7b09,0x7225203233752e20,0x090a3b3e3838313c,0x36752e206765722e\n" ".quad 0x39343c6472252034,0x6765722e090a3b3e,0x2520646572702e20,0x090a3b3e31343c70\n" ".quad 0x09373109636f6c2e,0x4c240a3009313031,0x5f6e696765625744,0x7869646152385a5f\n" ".quad 0x654b3231506d7553,0x615065756c615679,0x090a3a6a6a6a7269,0x09373109636f6c2e\n" ".quad 0x6d090a3009333031,0x09203233752e766f,0x697425202c317225,0x6f6d090a3b782e64\n" ".quad 0x2509203233732e76,0x3b317225202c3272,0x33752e766f6d090a,0x202c337225092032\n" ".quad 0x73090a3b33323031,0x752e74672e707465,0x2c31702509203233,0x7225202c31722520\n" ".quad 0x31702540090a3b33,0x4c24092061726220,0x383430325f305f74,0x2e766f6d090a3b32\n" ".quad 0x6472250920343675,0x6964615273202c31,0x6d090a3b6d755378,0x09203233752e766f\n" ".quad 0x383031202c347225,0x2e627573090a3b37,0x3572250920323375,0x25202c347225202c\n" ".quad 0x726873090a3b3172,0x722509203233732e,0x202c357225202c36,0x766f6d090a3b3133\n" ".quad 0x722509203233732e,0x090a3b3336202c37,0x203233622e646e61,0x7225202c38722509\n" ".quad 0x0a3b377225202c36,0x3233732e64646109,0x25202c3972250920,0x3b357225202c3872\n" ".quad 0x33732e726873090a,0x2c30317225092032,0x3b36202c39722520,0x36752e747663090a\n" ".quad 0x2509203233752e34,0x317225202c326472,0x772e6c756d090a3b,0x203233752e656469\n" ".quad 0x25202c3364722509,0x090a3b34202c3172,0x203436752e646461,0x25202c3464722509\n" ".quad 0x647225202c316472,0x2e766f6d090a3b33,0x3172250920323373,0x3b30317225202c31\n" ".quad 0x325f305f744c240a,0x2f200a3a34393930,0x203e706f6f6c3c2f,0x646f6220706f6f4c\n" ".quad 0x3120656e696c2079,0x7473656e202c3330,0x7470656420676e69,0x7365202c31203a68\n" ".quad 0x20646574616d6974,0x6f69746172657469,0x6e6b6e75203a736e,0x6f6c2e090a6e776f\n" ".quad 0x3830310937310963,0x2e766f6d090a3009,0x3172250920323375,0x73090a3b30202c32\n" ".quad 0x6465726168732e74,0x255b09203233752e,0x202c5d302b346472,0x61090a3b32317225\n" ".quad 0x09203233752e6464,0x327225202c327225,0x61090a3b3436202c,0x09203436752e6464\n" ".quad 0x7225202c34647225,0x3b363532202c3464,0x33752e766f6d090a,0x2c33317225092032\n" ".quad 0x090a3b3332303120,0x2e656c2e70746573,0x3270250920323375,0x25202c327225202c\n" ".quad 0x2540090a3b333172,0x0920617262203270,0x30325f305f744c24,0x744c240a3b343939\n" ".quad 0x32383430325f305f,0x752e766f6d090a3a,0x3164722509203436,0x786964615273202c\n" ".quad 0x6c2e090a3b6d7553,0x333109373109636f,0x726162090a300936,0x300920636e79732e\n" ".quad 0x622e646e61090a3b,0x3431722509203233,0x31202c317225202c,0x2e726873090a3b35\n" ".quad 0x3172250920323375,0x202c317225202c35,0x2e766f6d090a3b34,0x3172250920323375\n" ".quad 0x6961746325202c36,0x756d090a3b782e64,0x3233752e6f6c2e6c,0x202c373172250920\n" ".quad 0x3b34202c36317225,0x7261702e646c090a,0x09203233752e6d61,0x5f5b202c38317225\n" ".quad 0x726170616475635f,0x646152385a5f5f6d,0x3231506d75537869,0x65756c615679654b\n" ".quad 0x5f6a6a6a72696150,0x73746e656d656c65,0x6465646e756f725f,0x323730335f6f745f\n" ".quad 0x2e766f6d090a3b5d,0x3172250920323375,0x313334312d202c39,0x0a3b353637353536\n" ".quad 0x2e69682e6c756d09,0x3272250920323375,0x2c38317225202c30,0x090a3b3931722520\n" ".quad 0x203233752e726873,0x25202c3132722509,0x0a3b37202c303272,0x3233752e64646109\n" ".quad 0x202c323272250920,0x7225202c35317225,0x6c756d090a3b3731,0x203233752e6f6c2e\n" ".quad 0x25202c3332722509,0x327225202c313272,0x2e646461090a3b32,0x3272250920323375\n" ".quad 0x2c34317225202c34,0x090a3b3332722520,0x203233732e766f6d,0x7225202c32722509\n" ".quad 0x646461090a3b3432,0x722509203233752e,0x31327225202c3532,0x0a3b33327225202c\n" ".quad 0x65672e7074657309,0x702509203233752e,0x2c34327225202c33,0x090a3b3532722520\n" ".quad 0x6172622033702540,0x5f305f744c240920,0x090a3b3630353132,0x203233752e627573\n" ".quad 0x25202c3632722509,0x317225202c313272,0x2e646461090a3b34,0x3272250920323375\n" ".quad 0x2c36327225202c37,0x6873090a3b353120,0x2509203233732e72,0x327225202c383272\n" ".quad 0x090a3b3133202c37,0x203233732e766f6d,0x31202c3932722509,0x2e646e61090a3b35\n" ".quad 0x3372250920323362,0x2c38327225202c30,0x090a3b3932722520,0x203233732e646461\n" ".quad 0x25202c3133722509,0x327225202c303372,0x2e726873090a3b37,0x3372250920323373\n" ".quad 0x2c31337225202c32,0x766f6d090a3b3420,0x722509203233752e,0x090a3b30202c3333\n" ".quad 0x2e71652e70746573,0x3470250920323375,0x202c34317225202c,0x6d090a3b33337225\n" ".quad 0x09203233752e766f,0x3b31202c34337225,0x652e70746573090a,0x2509203233752e71\n" ".quad 0x34317225202c3570,0x0a3b34337225202c,0x3233752e766f6d09,0x202c353372250920\n" ".quad 0x70746573090a3b32,0x203233752e71652e,0x7225202c36702509,0x35337225202c3431\n" ".quad 0x752e766f6d090a3b,0x3633722509203233,0x6573090a3b33202c,0x33752e71652e7074\n" ".quad 0x202c377025092032,0x7225202c34317225,0x766f6d090a3b3633,0x722509203233752e\n" ".quad 0x090a3b34202c3733,0x2e71652e70746573,0x3870250920323375,0x202c34317225202c\n" ".quad 0x6d090a3b37337225,0x09203233752e766f,0x3b35202c38337225,0x652e70746573090a\n" ".quad 0x2509203233752e71,0x34317225202c3970,0x0a3b38337225202c,0x3233752e766f6d09\n" ".quad 0x202c393372250920,0x70746573090a3b36,0x203233752e71652e,0x25202c3031702509\n" ".quad 0x337225202c343172,0x2e766f6d090a3b39,0x3472250920323375,0x73090a3b37202c30\n" ".quad 0x752e71652e707465,0x3131702509203233,0x202c34317225202c,0x6d090a3b30347225\n" ".quad 0x09203233752e766f,0x3b38202c31347225,0x652e70746573090a,0x2509203233752e71\n" ".quad 0x317225202c323170,0x3b31347225202c34,0x33752e766f6d090a,0x2c32347225092032\n" ".quad 0x746573090a3b3920,0x3233752e71652e70,0x202c333170250920,0x7225202c34317225\n" ".quad 0x766f6d090a3b3234,0x722509203233752e,0x0a3b3031202c3334,0x71652e7074657309\n" ".quad 0x702509203233752e,0x34317225202c3431,0x0a3b33347225202c,0x3233752e766f6d09\n" ".quad 0x202c343472250920,0x746573090a3b3131,0x3233752e71652e70,0x202c353170250920\n" ".quad 0x7225202c34317225,0x766f6d090a3b3434,0x722509203233752e,0x0a3b3231202c3534\n" ".quad 0x71652e7074657309,0x702509203233752e,0x34317225202c3631,0x0a3b35347225202c\n" ".quad 0x3233752e766f6d09,0x202c363472250920,0x746573090a3b3331,0x3233752e71652e70\n" ".quad 0x202c373170250920,0x7225202c34317225,0x766f6d090a3b3634,0x722509203233752e\n" ".quad 0x0a3b3431202c3734,0x71652e7074657309,0x702509203233752e,0x34317225202c3831\n" ".quad 0x0a3b37347225202c,0x3233752e766f6d09,0x202c383472250920,0x746573090a3b3531\n" ".quad 0x3233752e71652e70,0x202c393170250920,0x7225202c34317225,0x6c6573090a3b3834\n" ".quad 0x2509203233732e70,0x202c31202c393472,0x0a3b347025202c30,0x33732e706c657309\n" ".quad 0x2c30357225092032,0x25202c30202c3120,0x6c6573090a3b3570,0x2509203233732e70\n" ".quad 0x202c31202c313572,0x0a3b367025202c30,0x33732e706c657309,0x2c32357225092032\n" ".quad 0x25202c30202c3120,0x6c6573090a3b3770,0x2509203233732e70,0x202c31202c333572\n" ".quad 0x0a3b387025202c30,0x33732e706c657309,0x2c34357225092032,0x25202c30202c3120\n" ".quad 0x6c6573090a3b3970,0x2509203233732e70,0x202c31202c353572,0x3b30317025202c30\n" ".quad 0x732e706c6573090a,0x3635722509203233,0x202c30202c31202c,0x73090a3b31317025\n" ".quad 0x203233732e706c65,0x31202c3735722509,0x317025202c30202c,0x706c6573090a3b32\n" ".quad 0x722509203233732e,0x30202c31202c3835,0x0a3b33317025202c,0x33732e706c657309\n" ".quad 0x2c39357225092032,0x25202c30202c3120,0x6573090a3b343170,0x09203233732e706c\n" ".quad 0x2c31202c30367225,0x35317025202c3020,0x2e706c6573090a3b,0x3672250920323373\n" ".quad 0x2c30202c31202c31,0x090a3b3631702520,0x3233732e706c6573,0x202c323672250920\n" ".quad 0x7025202c30202c31,0x6c6573090a3b3731,0x2509203233732e70,0x202c31202c333672\n" ".quad 0x3b38317025202c30,0x732e706c6573090a,0x3436722509203233,0x202c30202c31202c\n" ".quad 0x6c090a3b39317025,0x2e6d617261702e64,0x3672250920323375,0x75635f5f5b202c35\n" ".quad 0x5f5f6d7261706164,0x537869646152385a,0x79654b3231506d75,0x69615065756c6156\n" ".quad 0x656c655f6a6a6a72,0x0a3b5d73746e656d,0x3233732e766f6d09,0x202c363672250920\n" ".quad 0x4c240a3b32337225,0x313032325f305f74,0x6c3c2f2f200a3a38,0x6f6f4c203e706f6f\n" ".quad 0x6c2079646f622070,0x2c36333120656e69,0x676e697473656e20,0x203a687470656420\n" ".quad 0x6d69747365202c31,0x6574692064657461,0x3a736e6f69746172,0x6e776f6e6b6e7520\n" ".quad 0x6c2e70746573090a,0x2509203233752e74,0x327225202c303270,0x0a3b35367225202c\n" ".quad 0x2030327025214009,0x744c240920617262,0x30333532325f305f,0x6f6c3c2f2f200a3b\n" ".quad 0x74726150203e706f,0x706f6f6c20666f20,0x696c2079646f6220,0x202c36333120656e\n" ".quad 0x62616c2064616568,0x744c242064656c65,0x38313032325f305f,0x3109636f6c2e090a\n" ".quad 0x0a30093834310937,0x2e6f6c2e6c756d09,0x3672250920323375,0x202c327225202c37\n" ".quad 0x2e747663090a3b38,0x203233752e343675,0x25202c3564722509,0x646c090a3b373672\n" ".quad 0x752e6d617261702e,0x3664722509203436,0x6475635f5f5b202c,0x5a5f5f6d72617061\n" ".quad 0x7553786964615238,0x5679654b3231506d,0x7269615065756c61,0x746144705f6a6a6a\n" ".quad 0x646461090a3b5d61,0x722509203436752e,0x35647225202c3764,0x0a3b36647225202c\n" ".quad 0x626f6c672e646c09,0x09203233752e6c61,0x255b202c38367225,0x0a3b5d302b376472\n" ".quad 0x696e752e61726209,0x5f305f744c240920,0x240a3b3437323232,0x3532325f305f744c\n" ".quad 0x3c2f2f200a3a3033,0x6150203e706f6f6c,0x6f6c20666f207472,0x2079646f6220706f\n" ".quad 0x36333120656e696c,0x6c2064616568202c,0x242064656c656261,0x3032325f305f744c\n" ".quad 0x636f6c2e090a3831,0x0930353109373109,0x752e766f6d090a30,0x3836722509203233\n" ".quad 0x744c240a3b30202c,0x34373232325f305f,0x6f6c3c2f2f200a3a,0x74726150203e706f\n" ".quad 0x706f6f6c20666f20,0x696c2079646f6220,0x202c36333120656e,0x62616c2064616568\n" ".quad 0x744c242064656c65,0x38313032325f305f,0x732e706c6573090a,0x3936722509203233\n" ".quad 0x202c30202c31202c,0x61090a3b30327025,0x09203233622e646e,0x7225202c30377225\n" ".quad 0x39347225202c3936,0x752e766f6d090a3b,0x3137722509203233,0x6573090a3b30202c\n" ".quad 0x33732e71652e7074,0x2c31327025092032,0x25202c3037722520,0x2540090a3b313772\n" ".quad 0x2061726220313270,0x325f305f744c2409,0x2f200a3b36383732,0x203e706f6f6c3c2f\n" ".quad 0x20666f2074726150,0x646f6220706f6f6c,0x3120656e696c2079,0x64616568202c3633\n" ".quad 0x64656c6562616c20,0x325f305f744c2420,0x6c2e090a38313032,0x373109373109636f\n" ".quad 0x2e646c090a300933,0x33732e6d61726170,0x2c32377225092032,0x616475635f5f5b20\n" ".quad 0x385a5f5f6d726170,0x6d75537869646152,0x615679654b323150,0x6a7269615065756c\n" ".quad 0x74666968735f6a6a,0x2e726873090a3b5d,0x3772250920323375,0x2c38367225202c33\n" ".quad 0x090a3b3237722520,0x203233622e646e61,0x25202c3437722509,0x353532202c333772\n" ".quad 0x6c2e6c756d090a3b,0x2509203233752e6f,0x377225202c353772,0x61090a3b34202c34\n" ".quad 0x09203233752e6464,0x7225202c36377225,0x35377225202c3531,0x752e747663090a3b\n" ".quad 0x09203233752e3436,0x7225202c38647225,0x6c756d090a3b3637,0x33752e656469772e\n" ".quad 0x2c39647225092032,0x34202c3637722520,0x752e646461090a3b,0x3164722509203436\n" ".quad 0x2c31647225202c30,0x090a3b3964722520,0x65726168732e646c,0x2509203233752e64\n" ".quad 0x72255b202c373772,0x0a3b5d302b303164,0x3233752e64646109,0x202c383772250920\n" ".quad 0x3b31202c37377225,0x6168732e7473090a,0x203233752e646572,0x2b30316472255b09\n" ".quad 0x38377225202c5d30,0x5f305f744c240a3b,0x200a3a3638373232,0x3e706f6f6c3c2f2f\n" ".quad 0x666f207472615020,0x6f6220706f6f6c20,0x20656e696c207964,0x616568202c363331\n" ".quad 0x656c6562616c2064,0x5f305f744c242064,0x2e090a3831303232,0x3109373109636f6c\n" ".quad 0x6162090a30093437,0x0920636e79732e72,0x2e646e61090a3b30,0x3772250920323362\n" ".quad 0x2c39367225202c39,0x090a3b3035722520,0x203233752e766f6d,0x30202c3038722509\n" ".quad 0x2e70746573090a3b,0x09203233732e7165,0x7225202c32327025,0x30387225202c3937\n" ".quad 0x3232702540090a3b,0x4c24092061726220,0x393233325f305f74,0x6c3c2f2f200a3b38\n" ".quad 0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070,0x2c36333120656e69\n" ".quad 0x616c206461656820,0x4c242064656c6562,0x313032325f305f74,0x09636f6c2e090a38\n" ".quad 0x3009363731093731,0x7261702e646c090a,0x09203233732e6d61,0x5f5b202c31387225\n" ".quad 0x726170616475635f,0x646152385a5f5f6d,0x3231506d75537869,0x65756c615679654b\n" ".quad 0x5f6a6a6a72696150,0x0a3b5d7466696873,0x3233752e72687309,0x202c333772250920\n" ".quad 0x7225202c38367225,0x646e61090a3b3138,0x722509203233622e,0x33377225202c3437\n" ".quad 0x090a3b353532202c,0x752e6f6c2e6c756d,0x3537722509203233,0x202c34377225202c\n" ".quad 0x2e646461090a3b34,0x3872250920323375,0x2c35317225202c32,0x090a3b3537722520\n" ".quad 0x2e3436752e747663,0x6472250920323375,0x32387225202c3131,0x772e6c756d090a3b\n" ".quad 0x203233752e656469,0x202c323164722509,0x3b34202c32387225,0x36752e646461090a\n" ".quad 0x3031647225092034,0x202c31647225202c,0x090a3b3231647225,0x65726168732e646c\n" ".quad 0x2509203233752e64,0x72255b202c333872,0x0a3b5d302b303164,0x3233752e64646109\n" ".quad 0x202c343872250920,0x3b31202c33387225,0x6168732e7473090a,0x203233752e646572\n" ".quad 0x2b30316472255b09,0x34387225202c5d30,0x5f305f744c240a3b,0x200a3a3839323332\n" ".quad 0x3e706f6f6c3c2f2f,0x666f207472615020,0x6f6220706f6f6c20,0x20656e696c207964\n" ".quad 0x616568202c363331,0x656c6562616c2064,0x5f305f744c242064,0x2e090a3831303232\n" ".quad 0x3109373109636f6c,0x6162090a30093737,0x0920636e79732e72,0x2e646e61090a3b30\n" ".quad 0x3872250920323362,0x2c39367225202c35,0x090a3b3135722520,0x203233752e766f6d\n" ".quad 0x30202c3638722509,0x2e70746573090a3b,0x09203233732e7165,0x7225202c33327025\n" ".quad 0x36387225202c3538,0x3332702540090a3b,0x4c24092061726220,0x313833325f305f74\n" ".quad 0x6c3c2f2f200a3b30,0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070\n" ".quad 0x2c36333120656e69,0x616c206461656820,0x4c242064656c6562,0x313032325f305f74\n" ".quad 0x09636f6c2e090a38,0x3009393731093731,0x7261702e646c090a,0x09203233732e6d61\n" ".quad 0x5f5b202c37387225,0x726170616475635f,0x646152385a5f5f6d,0x3231506d75537869\n" ".quad 0x65756c615679654b,0x5f6a6a6a72696150,0x0a3b5d7466696873,0x3233752e72687309\n" ".quad 0x202c333772250920,0x7225202c38367225,0x646e61090a3b3738,0x722509203233622e\n" ".quad 0x33377225202c3437,0x090a3b353532202c,0x752e6f6c2e6c756d,0x3537722509203233\n" ".quad 0x202c34377225202c,0x2e646461090a3b34,0x3872250920323375,0x2c35317225202c38\n" ".quad 0x090a3b3537722520,0x2e3436752e747663,0x6472250920323375,0x38387225202c3331\n" ".quad 0x772e6c756d090a3b,0x203233752e656469,0x202c343164722509,0x3b34202c38387225\n" ".quad 0x36752e646461090a,0x3031647225092034,0x202c31647225202c,0x090a3b3431647225\n" ".quad 0x65726168732e646c,0x2509203233752e64,0x72255b202c393872,0x0a3b5d302b303164\n" ".quad 0x3233752e64646109,0x202c303972250920,0x3b31202c39387225,0x6168732e7473090a\n" ".quad 0x203233752e646572,0x2b30316472255b09,0x30397225202c5d30,0x5f305f744c240a3b\n" ".quad 0x200a3a3031383332,0x3e706f6f6c3c2f2f,0x666f207472615020,0x6f6220706f6f6c20\n" ".quad 0x20656e696c207964,0x616568202c363331,0x656c6562616c2064,0x5f305f744c242064\n" ".quad 0x2e090a3831303232,0x3109373109636f6c,0x6162090a30093038,0x0920636e79732e72\n" ".quad 0x2e646e61090a3b30,0x3972250920323362,0x2c39367225202c31,0x090a3b3235722520\n" ".quad 0x203233752e766f6d,0x30202c3239722509,0x2e70746573090a3b,0x09203233732e7165\n" ".quad 0x7225202c34327025,0x32397225202c3139,0x3432702540090a3b,0x4c24092061726220\n" ".quad 0x323334325f305f74,0x6c3c2f2f200a3b32,0x726150203e706f6f,0x6f6f6c20666f2074\n" ".quad 0x6c2079646f622070,0x2c36333120656e69,0x616c206461656820,0x4c242064656c6562\n" ".quad 0x313032325f305f74,0x09636f6c2e090a38,0x3009323831093731,0x7261702e646c090a\n" ".quad 0x09203233732e6d61,0x5f5b202c33397225,0x726170616475635f,0x646152385a5f5f6d\n" ".quad 0x3231506d75537869,0x65756c615679654b,0x5f6a6a6a72696150,0x0a3b5d7466696873\n" ".quad 0x3233752e72687309,0x202c333772250920,0x7225202c38367225,0x646e61090a3b3339\n" ".quad 0x722509203233622e,0x33377225202c3437,0x090a3b353532202c,0x752e6f6c2e6c756d\n" ".quad 0x3537722509203233,0x202c34377225202c,0x2e646461090a3b34,0x3972250920323375\n" ".quad 0x2c35317225202c34,0x090a3b3537722520,0x2e3436752e747663,0x6472250920323375\n" ".quad 0x34397225202c3531,0x772e6c756d090a3b,0x203233752e656469,0x202c363164722509\n" ".quad 0x3b34202c34397225,0x36752e646461090a,0x3031647225092034,0x202c31647225202c\n" ".quad 0x090a3b3631647225,0x65726168732e646c,0x2509203233752e64,0x72255b202c353972\n" ".quad 0x0a3b5d302b303164,0x3233752e64646109,0x202c363972250920,0x3b31202c35397225\n" ".quad 0x6168732e7473090a,0x203233752e646572,0x2b30316472255b09,0x36397225202c5d30\n" ".quad 0x5f305f744c240a3b,0x200a3a3232333432,0x3e706f6f6c3c2f2f,0x666f207472615020\n" ".quad 0x6f6220706f6f6c20,0x20656e696c207964,0x616568202c363331,0x656c6562616c2064\n" ".quad 0x5f305f744c242064,0x2e090a3831303232,0x3109373109636f6c,0x6162090a30093338\n" ".quad 0x0920636e79732e72,0x2e646e61090a3b30,0x3972250920323362,0x2c39367225202c37\n" ".quad 0x090a3b3335722520,0x203233752e766f6d,0x30202c3839722509,0x2e70746573090a3b\n" ".quad 0x09203233732e7165,0x7225202c35327025,0x38397225202c3739,0x3532702540090a3b\n" ".quad 0x4c24092061726220,0x333834325f305f74,0x6c3c2f2f200a3b34,0x726150203e706f6f\n" ".quad 0x6f6f6c20666f2074,0x6c2079646f622070,0x2c36333120656e69,0x616c206461656820\n" ".quad 0x4c242064656c6562,0x313032325f305f74,0x09636f6c2e090a38,0x3009353831093731\n" ".quad 0x7261702e646c090a,0x09203233732e6d61,0x5f5b202c39397225,0x726170616475635f\n" ".quad 0x646152385a5f5f6d,0x3231506d75537869,0x65756c615679654b,0x5f6a6a6a72696150\n" ".quad 0x0a3b5d7466696873,0x3233752e72687309,0x202c333772250920,0x7225202c38367225\n" ".quad 0x646e61090a3b3939,0x722509203233622e,0x33377225202c3437,0x090a3b353532202c\n" ".quad 0x752e6f6c2e6c756d,0x3537722509203233,0x202c34377225202c,0x2e646461090a3b34\n" ".quad 0x3172250920323375,0x35317225202c3030,0x0a3b35377225202c,0x3436752e74766309\n" ".quad 0x722509203233752e,0x317225202c373164,0x6c756d090a3b3030,0x33752e656469772e\n" ".quad 0x3831647225092032,0x2c3030317225202c,0x646461090a3b3420,0x722509203436752e\n" ".quad 0x647225202c303164,0x3831647225202c31,0x68732e646c090a3b,0x3233752e64657261\n" ".quad 0x2c31303172250920,0x2b30316472255b20,0x646461090a3b5d30,0x722509203233752e\n" ".quad 0x317225202c323031,0x090a3b31202c3130,0x65726168732e7473,0x5b09203233752e64\n" ".quad 0x5d302b3031647225,0x3b3230317225202c,0x325f305f744c240a,0x2f200a3a34333834\n" ".quad 0x203e706f6f6c3c2f,0x20666f2074726150,0x646f6220706f6f6c,0x3120656e696c2079\n" ".quad 0x64616568202c3633,0x64656c6562616c20,0x325f305f744c2420,0x6c2e090a38313032\n" ".quad 0x383109373109636f,0x726162090a300936,0x300920636e79732e,0x622e646e61090a3b\n" ".quad 0x3031722509203233,0x2c39367225202c33,0x090a3b3435722520,0x203233752e766f6d\n" ".quad 0x202c343031722509,0x70746573090a3b30,0x203233732e71652e,0x25202c3632702509\n" ".quad 0x7225202c33303172,0x2540090a3b343031,0x2061726220363270,0x325f305f744c2409\n" ".quad 0x2f200a3b36343335,0x203e706f6f6c3c2f,0x20666f2074726150,0x646f6220706f6f6c\n" ".quad 0x3120656e696c2079,0x64616568202c3633,0x64656c6562616c20,0x325f305f744c2420\n" ".quad 0x6c2e090a38313032,0x383109373109636f,0x2e646c090a300938,0x33732e6d61726170\n" ".quad 0x3530317225092032,0x6475635f5f5b202c,0x5a5f5f6d72617061,0x7553786964615238\n" ".quad 0x5679654b3231506d,0x7269615065756c61,0x666968735f6a6a6a,0x726873090a3b5d74\n" ".quad 0x722509203233752e,0x38367225202c3337,0x3b3530317225202c,0x33622e646e61090a\n" ".quad 0x2c34377225092032,0x32202c3337722520,0x6c756d090a3b3535,0x203233752e6f6c2e\n" ".quad 0x25202c3537722509,0x0a3b34202c343772,0x3233752e64646109,0x2c36303172250920\n" ".quad 0x25202c3531722520,0x7663090a3b353772,0x33752e3436752e74,0x3931647225092032\n" ".quad 0x3b3630317225202c,0x69772e6c756d090a,0x09203233752e6564,0x25202c3032647225\n" ".quad 0x3b34202c36303172,0x36752e646461090a,0x3031647225092034,0x202c31647225202c\n" ".quad 0x090a3b3032647225,0x65726168732e646c,0x2509203233752e64,0x255b202c37303172\n" ".quad 0x3b5d302b30316472,0x33752e646461090a,0x3830317225092032,0x2c3730317225202c\n" ".quad 0x2e7473090a3b3120,0x752e646572616873,0x6472255b09203233,0x25202c5d302b3031\n" ".quad 0x4c240a3b38303172,0x343335325f305f74,0x6c3c2f2f200a3a36,0x726150203e706f6f\n" ".quad 0x6f6f6c20666f2074,0x6c2079646f622070,0x2c36333120656e69,0x616c206461656820\n" ".quad 0x4c242064656c6562,0x313032325f305f74,0x09636f6c2e090a38,0x3009393831093731\n" ".quad 0x79732e726162090a,0x090a3b300920636e,0x203233622e646e61,0x202c393031722509\n" ".quad 0x7225202c39367225,0x766f6d090a3b3535,0x722509203233752e,0x0a3b30202c303131\n" ".quad 0x71652e7074657309,0x702509203233732e,0x30317225202c3732,0x3031317225202c39\n" ".quad 0x3732702540090a3b,0x4c24092061726220,0x353835325f305f74,0x6c3c2f2f200a3b38\n" ".quad 0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070,0x2c36333120656e69\n" ".quad 0x616c206461656820,0x4c242064656c6562,0x313032325f305f74,0x09636f6c2e090a38\n" ".quad 0x3009313931093731,0x7261702e646c090a,0x09203233732e6d61,0x5b202c3131317225\n" ".quad 0x6170616475635f5f,0x6152385a5f5f6d72,0x31506d7553786964,0x756c615679654b32\n" ".quad 0x6a6a6a7269615065,0x3b5d74666968735f,0x33752e726873090a,0x2c33377225092032\n" ".quad 0x25202c3836722520,0x61090a3b31313172,0x09203233622e646e,0x7225202c34377225\n" ".quad 0x3b353532202c3337,0x6f6c2e6c756d090a,0x722509203233752e,0x34377225202c3537\n" ".quad 0x6461090a3b34202c,0x2509203233752e64,0x7225202c32313172,0x35377225202c3531\n" ".quad 0x752e747663090a3b,0x09203233752e3436,0x25202c3132647225,0x6d090a3b32313172\n" ".quad 0x2e656469772e6c75,0x6472250920323375,0x31317225202c3232,0x61090a3b34202c32\n" ".quad 0x09203436752e6464,0x25202c3031647225,0x647225202c316472,0x2e646c090a3b3232\n" ".quad 0x752e646572616873,0x3131722509203233,0x316472255b202c33,0x61090a3b5d302b30\n" ".quad 0x09203233752e6464,0x25202c3431317225,0x3b31202c33313172,0x6168732e7473090a\n" ".quad 0x203233752e646572,0x2b30316472255b09,0x31317225202c5d30,0x305f744c240a3b34\n" ".quad 0x0a3a38353835325f,0x706f6f6c3c2f2f20,0x6f2074726150203e,0x6220706f6f6c2066\n" ".quad 0x656e696c2079646f,0x6568202c36333120,0x6c6562616c206461,0x305f744c24206465\n" ".quad 0x090a38313032325f,0x09373109636f6c2e,0x62090a3009323931,0x20636e79732e7261\n" ".quad 0x646e61090a3b3009,0x722509203233622e,0x367225202c353131,0x3b36357225202c39\n" ".quad 0x33752e766f6d090a,0x3631317225092032,0x6573090a3b30202c,0x33732e71652e7074\n" ".quad 0x2c38327025092032,0x202c353131722520,0x090a3b3631317225,0x7262203832702540\n" ".quad 0x305f744c24092061,0x0a3b30373336325f,0x706f6f6c3c2f2f20,0x6f2074726150203e\n" ".quad 0x6220706f6f6c2066,0x656e696c2079646f,0x6568202c36333120,0x6c6562616c206461\n" ".quad 0x305f744c24206465,0x090a38313032325f,0x09373109636f6c2e,0x6c090a3009343931\n" ".quad 0x2e6d617261702e64,0x3172250920323373,0x635f5f5b202c3731,0x5f6d726170616475\n" ".quad 0x7869646152385a5f,0x654b3231506d7553,0x615065756c615679,0x68735f6a6a6a7269\n" ".quad 0x73090a3b5d746669,0x09203233752e7268,0x7225202c33377225,0x31317225202c3836\n" ".quad 0x2e646e61090a3b37,0x3772250920323362,0x2c33377225202c34,0x6d090a3b35353220\n" ".quad 0x33752e6f6c2e6c75,0x2c35377225092032,0x34202c3437722520,0x752e646461090a3b\n" ".quad 0x3131722509203233,0x2c35317225202c38,0x090a3b3537722520,0x2e3436752e747663\n" ".quad 0x6472250920323375,0x31317225202c3332,0x2e6c756d090a3b38,0x3233752e65646977\n" ".quad 0x2c34326472250920,0x202c383131722520,0x2e646461090a3b34,0x6472250920343675\n" ".quad 0x31647225202c3031,0x3b3432647225202c,0x6168732e646c090a,0x203233752e646572\n" ".quad 0x202c393131722509,0x302b30316472255b,0x2e646461090a3b5d,0x3172250920323375\n" ".quad 0x31317225202c3032,0x73090a3b31202c39,0x6465726168732e74,0x255b09203233752e\n" ".quad 0x2c5d302b30316472,0x0a3b303231722520,0x36325f305f744c24,0x2f2f200a3a303733\n" ".quad 0x50203e706f6f6c3c,0x6c20666f20747261,0x79646f6220706f6f,0x333120656e696c20\n" ".quad 0x2064616568202c36,0x2064656c6562616c,0x32325f305f744c24,0x6f6c2e090a383130\n" ".quad 0x3539310937310963,0x2e726162090a3009,0x3b300920636e7973,0x33622e646e61090a\n" ".quad 0x3132317225092032,0x202c39367225202c,0x6d090a3b37357225,0x09203233752e766f\n" ".quad 0x30202c3232317225,0x2e70746573090a3b,0x09203233732e7165,0x7225202c39327025\n" ".quad 0x317225202c313231,0x702540090a3b3232,0x0920617262203932,0x36325f305f744c24\n" ".quad 0x2f2f200a3b323838,0x50203e706f6f6c3c,0x6c20666f20747261,0x79646f6220706f6f\n" ".quad 0x333120656e696c20,0x2064616568202c36,0x2064656c6562616c,0x32325f305f744c24\n" ".quad 0x6f6c2e090a383130,0x3739310937310963,0x702e646c090a3009,0x3233732e6d617261\n" ".quad 0x2c33323172250920,0x616475635f5f5b20,0x385a5f5f6d726170,0x6d75537869646152\n" ".quad 0x615679654b323150,0x6a7269615065756c,0x74666968735f6a6a,0x2e726873090a3b5d\n" ".quad 0x3772250920323375,0x2c38367225202c33,0x0a3b333231722520,0x3233622e646e6109\n" ".quad 0x202c343772250920,0x3532202c33377225,0x2e6c756d090a3b35,0x09203233752e6f6c\n" ".quad 0x7225202c35377225,0x090a3b34202c3437,0x203233752e646461,0x202c343231722509\n" ".quad 0x7225202c35317225,0x747663090a3b3537,0x3233752e3436752e,0x2c35326472250920\n" ".quad 0x0a3b343231722520,0x6469772e6c756d09,0x2509203233752e65,0x7225202c36326472\n" ".quad 0x0a3b34202c343231,0x3436752e64646109,0x2c30316472250920,0x25202c3164722520\n" ".quad 0x6c090a3b36326472,0x6465726168732e64,0x722509203233752e,0x72255b202c353231\n" ".quad 0x0a3b5d302b303164,0x3233752e64646109,0x2c36323172250920,0x202c353231722520\n" ".quad 0x732e7473090a3b31,0x33752e6465726168,0x316472255b092032,0x7225202c5d302b30\n" ".quad 0x744c240a3b363231,0x32383836325f305f,0x6f6c3c2f2f200a3a,0x74726150203e706f\n" ".quad 0x706f6f6c20666f20,0x696c2079646f6220,0x202c36333120656e,0x62616c2064616568\n" ".quad 0x744c242064656c65,0x38313032325f305f,0x3109636f6c2e090a,0x0a30093839310937\n" ".quad 0x6e79732e72616209,0x61090a3b30092063,0x09203233622e646e,0x25202c3732317225\n" ".quad 0x357225202c393672,0x2e766f6d090a3b38,0x3172250920323375,0x090a3b30202c3832\n" ".quad 0x2e71652e70746573,0x3370250920323373,0x3732317225202c30,0x3b3832317225202c\n" ".quad 0x203033702540090a,0x744c240920617262,0x34393337325f305f,0x6f6c3c2f2f200a3b\n" ".quad 0x74726150203e706f,0x706f6f6c20666f20,0x696c2079646f6220,0x202c36333120656e\n" ".quad 0x62616c2064616568,0x744c242064656c65,0x38313032325f305f,0x3109636f6c2e090a\n" ".quad 0x0a30093030320937,0x617261702e646c09,0x2509203233732e6d,0x5f5b202c39323172\n" ".quad 0x726170616475635f,0x646152385a5f5f6d,0x3231506d75537869,0x65756c615679654b\n" ".quad 0x5f6a6a6a72696150,0x0a3b5d7466696873,0x3233752e72687309,0x202c333772250920\n" ".quad 0x7225202c38367225,0x6e61090a3b393231,0x2509203233622e64,0x377225202c343772\n" ".quad 0x0a3b353532202c33,0x2e6f6c2e6c756d09,0x3772250920323375,0x2c34377225202c35\n" ".quad 0x646461090a3b3420,0x722509203233752e,0x317225202c303331,0x3b35377225202c35\n" ".quad 0x36752e747663090a,0x2509203233752e34,0x7225202c37326472,0x756d090a3b303331\n" ".quad 0x752e656469772e6c,0x3264722509203233,0x3033317225202c38,0x6461090a3b34202c\n" ".quad 0x2509203436752e64,0x7225202c30316472,0x32647225202c3164,0x732e646c090a3b38\n" ".quad 0x33752e6465726168,0x3133317225092032,0x30316472255b202c,0x6461090a3b5d302b\n" ".quad 0x2509203233752e64,0x7225202c32333172,0x0a3b31202c313331,0x726168732e747309\n" ".quad 0x09203233752e6465,0x302b30316472255b,0x3233317225202c5d,0x5f305f744c240a3b\n" ".quad 0x200a3a3439333732,0x3e706f6f6c3c2f2f,0x666f207472615020,0x6f6220706f6f6c20\n" ".quad 0x20656e696c207964,0x616568202c363331,0x656c6562616c2064,0x5f305f744c242064\n" ".quad 0x2e090a3831303232,0x3209373109636f6c,0x6162090a30093130,0x0920636e79732e72\n" ".quad 0x2e646e61090a3b30,0x3172250920323362,0x39367225202c3333,0x0a3b39357225202c\n" ".quad 0x3233752e766f6d09,0x2c34333172250920,0x746573090a3b3020,0x3233732e71652e70\n" ".quad 0x202c313370250920,0x25202c3333317225,0x40090a3b34333172,0x6172622031337025\n" ".quad 0x5f305f744c240920,0x200a3b3630393732,0x3e706f6f6c3c2f2f,0x666f207472615020\n" ".quad 0x6f6220706f6f6c20,0x20656e696c207964,0x616568202c363331,0x656c6562616c2064\n" ".quad 0x5f305f744c242064,0x2e090a3831303232,0x3209373109636f6c,0x646c090a30093330\n" ".quad 0x732e6d617261702e,0x3331722509203233,0x75635f5f5b202c35,0x5f5f6d7261706164\n" ".quad 0x537869646152385a,0x79654b3231506d75,0x69615065756c6156,0x6968735f6a6a6a72\n" ".quad 0x6873090a3b5d7466,0x2509203233752e72,0x367225202c333772,0x3533317225202c38\n" ".quad 0x622e646e61090a3b,0x3437722509203233,0x202c33377225202c,0x756d090a3b353532\n" ".quad 0x3233752e6f6c2e6c,0x202c353772250920,0x3b34202c34377225,0x33752e646461090a\n" ".quad 0x3633317225092032,0x202c35317225202c,0x63090a3b35377225,0x752e3436752e7476\n" ".quad 0x3264722509203233,0x3633317225202c39,0x772e6c756d090a3b,0x203233752e656469\n" ".quad 0x202c303364722509,0x34202c3633317225,0x752e646461090a3b,0x3164722509203436\n" ".quad 0x2c31647225202c30,0x0a3b303364722520,0x726168732e646c09,0x09203233752e6465\n" ".quad 0x5b202c3733317225,0x5d302b3031647225,0x752e646461090a3b,0x3331722509203233\n" ".quad 0x3733317225202c38,0x7473090a3b31202c,0x2e6465726168732e,0x72255b0920323375\n" ".quad 0x202c5d302b303164,0x240a3b3833317225,0x3937325f305f744c,0x3c2f2f200a3a3630\n" ".quad 0x6150203e706f6f6c,0x6f6c20666f207472,0x2079646f6220706f,0x36333120656e696c\n" ".quad 0x6c2064616568202c,0x242064656c656261,0x3032325f305f744c,0x636f6c2e090a3831\n" ".quad 0x0934303209373109,0x732e726162090a30,0x0a3b300920636e79,0x3233622e646e6109\n" ".quad 0x2c39333172250920,0x25202c3936722520,0x6f6d090a3b303672,0x2509203233752e76\n" ".quad 0x3b30202c30343172,0x652e70746573090a,0x2509203233732e71,0x317225202c323370\n" ".quad 0x34317225202c3933,0x33702540090a3b30,0x2409206172622032,0x3438325f305f744c\n" ".quad 0x3c2f2f200a3b3831,0x6150203e706f6f6c,0x6f6c20666f207472,0x2079646f6220706f\n" ".quad 0x36333120656e696c,0x6c2064616568202c,0x242064656c656261,0x3032325f305f744c\n" ".quad 0x636f6c2e090a3831,0x0936303209373109,0x61702e646c090a30,0x203233732e6d6172\n" ".quad 0x202c313431722509,0x70616475635f5f5b,0x52385a5f5f6d7261,0x506d755378696461\n" ".quad 0x6c615679654b3231,0x6a6a726961506575,0x5d74666968735f6a,0x752e726873090a3b\n" ".quad 0x3337722509203233,0x202c38367225202c,0x090a3b3134317225,0x203233622e646e61\n" ".quad 0x25202c3437722509,0x353532202c333772,0x6c2e6c756d090a3b,0x2509203233752e6f\n" ".quad 0x377225202c353772,0x61090a3b34202c34,0x09203233752e6464,0x25202c3234317225\n" ".quad 0x377225202c353172,0x2e747663090a3b35,0x203233752e343675,0x202c313364722509\n" ".quad 0x090a3b3234317225,0x656469772e6c756d,0x722509203233752e,0x317225202c323364\n" ".quad 0x090a3b34202c3234,0x203436752e646461,0x202c303164722509,0x7225202c31647225\n" ".quad 0x646c090a3b323364,0x2e6465726168732e,0x3172250920323375,0x6472255b202c3334\n" ".quad 0x090a3b5d302b3031,0x203233752e646461,0x202c343431722509,0x31202c3334317225\n" ".quad 0x68732e7473090a3b,0x3233752e64657261,0x30316472255b0920,0x317225202c5d302b\n" ".quad 0x5f744c240a3b3434,0x3a38313438325f30,0x6f6f6c3c2f2f200a,0x2074726150203e70\n" ".quad 0x20706f6f6c20666f,0x6e696c2079646f62,0x68202c3633312065,0x6562616c20646165\n" ".quad 0x5f744c242064656c,0x0a38313032325f30,0x373109636f6c2e09,0x090a300937303209\n" ".quad 0x636e79732e726162,0x6e61090a3b300920,0x2509203233622e64,0x7225202c35343172\n" ".quad 0x31367225202c3936,0x752e766f6d090a3b,0x3431722509203233,0x73090a3b30202c36\n" ".quad 0x732e71652e707465,0x3333702509203233,0x2c3534317225202c,0x0a3b363431722520\n" ".quad 0x6220333370254009,0x5f744c2409206172,0x3b30333938325f30,0x6f6f6c3c2f2f200a\n" ".quad 0x2074726150203e70,0x20706f6f6c20666f,0x6e696c2079646f62,0x68202c3633312065\n" ".quad 0x6562616c20646165,0x5f744c242064656c,0x0a38313032325f30,0x373109636f6c2e09\n" ".quad 0x090a300939303209,0x6d617261702e646c,0x722509203233732e,0x5f5f5b202c373431\n" ".quad 0x6d72617061647563,0x69646152385a5f5f,0x4b3231506d755378,0x5065756c61567965\n" ".quad 0x735f6a6a6a726961,0x090a3b5d74666968,0x203233752e726873,0x25202c3337722509\n" ".quad 0x317225202c383672,0x646e61090a3b3734,0x722509203233622e,0x33377225202c3437\n" ".quad 0x090a3b353532202c,0x752e6f6c2e6c756d,0x3537722509203233,0x202c34377225202c\n" ".quad 0x2e646461090a3b34,0x3172250920323375,0x35317225202c3834,0x0a3b35377225202c\n" ".quad 0x3436752e74766309,0x722509203233752e,0x317225202c333364,0x6c756d090a3b3834\n" ".quad 0x33752e656469772e,0x3433647225092032,0x2c3834317225202c,0x646461090a3b3420\n" ".quad 0x722509203436752e,0x647225202c303164,0x3433647225202c31,0x68732e646c090a3b\n" ".quad 0x3233752e64657261,0x2c39343172250920,0x2b30316472255b20,0x646461090a3b5d30\n" ".quad 0x722509203233752e,0x317225202c303531,0x090a3b31202c3934,0x65726168732e7473\n" ".quad 0x5b09203233752e64,0x5d302b3031647225,0x3b3035317225202c,0x325f305f744c240a\n" ".quad 0x2f200a3a30333938,0x203e706f6f6c3c2f,0x20666f2074726150,0x646f6220706f6f6c\n" ".quad 0x3120656e696c2079,0x64616568202c3633,0x64656c6562616c20,0x325f305f744c2420\n" ".quad 0x6c2e090a38313032,0x313209373109636f,0x726162090a300930,0x300920636e79732e\n" ".quad 0x622e646e61090a3b,0x3531722509203233,0x2c39367225202c31,0x090a3b3236722520\n" ".quad 0x203233752e766f6d,0x202c323531722509,0x70746573090a3b30,0x203233732e71652e\n" ".quad 0x25202c3433702509,0x7225202c31353172,0x2540090a3b323531,0x2061726220343370\n" ".quad 0x325f305f744c2409,0x2f200a3b32343439,0x203e706f6f6c3c2f,0x20666f2074726150\n" ".quad 0x646f6220706f6f6c,0x3120656e696c2079,0x64616568202c3633,0x64656c6562616c20\n" ".quad 0x325f305f744c2420,0x6c2e090a38313032,0x313209373109636f,0x2e646c090a300932\n" ".quad 0x33732e6d61726170,0x3335317225092032,0x6475635f5f5b202c,0x5a5f5f6d72617061\n" ".quad 0x7553786964615238,0x5679654b3231506d,0x7269615065756c61,0x666968735f6a6a6a\n" ".quad 0x726873090a3b5d74,0x722509203233752e,0x38367225202c3337,0x3b3335317225202c\n" ".quad 0x33622e646e61090a,0x2c34377225092032,0x32202c3337722520,0x6c756d090a3b3535\n" ".quad 0x203233752e6f6c2e,0x25202c3537722509,0x0a3b34202c343772,0x3233752e64646109\n" ".quad 0x2c34353172250920,0x25202c3531722520,0x7663090a3b353772,0x33752e3436752e74\n" ".quad 0x3533647225092032,0x3b3435317225202c,0x69772e6c756d090a,0x09203233752e6564\n" ".quad 0x25202c3633647225,0x3b34202c34353172,0x36752e646461090a,0x3031647225092034\n" ".quad 0x202c31647225202c,0x090a3b3633647225,0x65726168732e646c,0x2509203233752e64\n" ".quad 0x255b202c35353172,0x3b5d302b30316472,0x33752e646461090a,0x3635317225092032\n" ".quad 0x2c3535317225202c,0x2e7473090a3b3120,0x752e646572616873,0x6472255b09203233\n" ".quad 0x25202c5d302b3031,0x4c240a3b36353172,0x343439325f305f74,0x6c3c2f2f200a3a32\n" ".quad 0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070,0x2c36333120656e69\n" ".quad 0x616c206461656820,0x4c242064656c6562,0x313032325f305f74,0x09636f6c2e090a38\n" ".quad 0x3009333132093731,0x79732e726162090a,0x090a3b300920636e,0x203233622e646e61\n" ".quad 0x202c373531722509,0x7225202c39367225,0x766f6d090a3b3336,0x722509203233752e\n" ".quad 0x0a3b30202c383531,0x71652e7074657309,0x702509203233732e,0x35317225202c3533\n" ".quad 0x3835317225202c37,0x3533702540090a3b,0x4c24092061726220,0x353939325f305f74\n" ".quad 0x6c3c2f2f200a3b34,0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070\n" ".quad 0x2c36333120656e69,0x616c206461656820,0x4c242064656c6562,0x313032325f305f74\n" ".quad 0x09636f6c2e090a38,0x3009353132093731,0x7261702e646c090a,0x09203233732e6d61\n" ".quad 0x5b202c3935317225,0x6170616475635f5f,0x6152385a5f5f6d72,0x31506d7553786964\n" ".quad 0x756c615679654b32,0x6a6a6a7269615065,0x3b5d74666968735f,0x33752e726873090a\n" ".quad 0x2c33377225092032,0x25202c3836722520,0x61090a3b39353172,0x09203233622e646e\n" ".quad 0x7225202c34377225,0x3b353532202c3337,0x6f6c2e6c756d090a,0x722509203233752e\n" ".quad 0x34377225202c3537,0x6461090a3b34202c,0x2509203233752e64,0x7225202c30363172\n" ".quad 0x35377225202c3531,0x752e747663090a3b,0x09203233752e3436,0x25202c3733647225\n" ".quad 0x6d090a3b30363172,0x2e656469772e6c75,0x6472250920323375,0x36317225202c3833\n" ".quad 0x61090a3b34202c30,0x09203436752e6464,0x25202c3031647225,0x647225202c316472\n" ".quad 0x2e646c090a3b3833,0x752e646572616873,0x3631722509203233,0x316472255b202c31\n" ".quad 0x61090a3b5d302b30,0x09203233752e6464,0x25202c3236317225,0x3b31202c31363172\n" ".quad 0x6168732e7473090a,0x203233752e646572,0x2b30316472255b09,0x36317225202c5d30\n" ".quad 0x305f744c240a3b32,0x0a3a34353939325f,0x706f6f6c3c2f2f20,0x6f2074726150203e\n" ".quad 0x6220706f6f6c2066,0x656e696c2079646f,0x6568202c36333120,0x6c6562616c206461\n" ".quad 0x305f744c24206465,0x090a38313032325f,0x09373109636f6c2e,0x62090a3009363132\n" ".quad 0x20636e79732e7261,0x646e61090a3b3009,0x722509203233622e,0x367225202c333631\n" ".quad 0x3b34367225202c39,0x33752e766f6d090a,0x3436317225092032,0x6573090a3b30202c\n" ".quad 0x33732e71652e7074,0x2c36337025092032,0x202c333631722520,0x090a3b3436317225\n" ".quad 0x7262203633702540,0x305f744c24092061,0x0a3b36363430335f,0x706f6f6c3c2f2f20\n" ".quad 0x6f2074726150203e,0x6220706f6f6c2066,0x656e696c2079646f,0x6568202c36333120\n" ".quad 0x6c6562616c206461,0x305f744c24206465,0x090a38313032325f,0x09373109636f6c2e\n" ".quad 0x6c090a3009383132,0x2e6d617261702e64,0x3172250920323373,0x635f5f5b202c3536\n" ".quad 0x5f6d726170616475,0x7869646152385a5f,0x654b3231506d7553,0x615065756c615679\n" ".quad 0x68735f6a6a6a7269,0x73090a3b5d746669,0x09203233752e7268,0x7225202c33377225\n" ".quad 0x36317225202c3836,0x2e646e61090a3b35,0x3772250920323362,0x2c33377225202c34\n" ".quad 0x6d090a3b35353220,0x33752e6f6c2e6c75,0x2c35377225092032,0x34202c3437722520\n" ".quad 0x752e646461090a3b,0x3631722509203233,0x2c35317225202c36,0x090a3b3537722520\n" ".quad 0x2e3436752e747663,0x6472250920323375,0x36317225202c3933,0x2e6c756d090a3b36\n" ".quad 0x3233752e65646977,0x2c30346472250920,0x202c363631722520,0x2e646461090a3b34\n" ".quad 0x6472250920343675,0x31647225202c3031,0x3b3034647225202c,0x6168732e646c090a\n" ".quad 0x203233752e646572,0x202c373631722509,0x302b30316472255b,0x2e646461090a3b5d\n" ".quad 0x3172250920323375,0x36317225202c3836,0x73090a3b31202c37,0x6465726168732e74\n" ".quad 0x255b09203233752e,0x2c5d302b30316472,0x0a3b383631722520,0x30335f305f744c24\n" ".quad 0x2f2f200a3a363634,0x50203e706f6f6c3c,0x6c20666f20747261,0x79646f6220706f6f\n" ".quad 0x333120656e696c20,0x2064616568202c36,0x2064656c6562616c,0x32325f305f744c24\n" ".quad 0x6f6c2e090a383130,0x3931320937310963,0x2e726162090a3009,0x3b300920636e7973\n" ".quad 0x33752e646461090a,0x202c327225092032,0x3b3631202c327225,0x672e70746573090a\n" ".quad 0x2509203233752e74,0x327225202c373370,0x0a3b327225202c35,0x6220373370254009\n" ".quad 0x5f744c2409206172,0x3b38313032325f30,0x325f305f744c240a,0x2e090a3a36303531\n" ".quad 0x3209373109636f6c,0x6873090a30093833,0x2509203233752e72,0x7225202c39363172\n" ".quad 0x6d090a3b32202c31,0x09203233752e766f,0x32202c3037317225,0x746573090a3b3535\n" ".quad 0x3233752e74672e70,0x202c383370250920,0x25202c3936317225,0x40090a3b30373172\n" ".quad 0x6172622038337025,0x5f305f744c240920,0x090a3b3433323133,0x203233752e766f6d\n" ".quad 0x202c313731722509,0x7573090a3b313732,0x2509203233752e62,0x7225202c32373172\n" ".quad 0x317225202c313731,0x726873090a3b3936,0x722509203233732e,0x317225202c333731\n" ".quad 0x0a3b3133202c3237,0x3233732e766f6d09,0x2c34373172250920,0x6e61090a3b353120\n" ".quad 0x2509203233622e64,0x7225202c35373172,0x317225202c333731,0x646461090a3b3437\n" ".quad 0x722509203233732e,0x317225202c363731,0x37317225202c3537,0x2e726873090a3b32\n" ".quad 0x3172250920323373,0x37317225202c3737,0x61090a3b34202c36,0x09203233622e646e\n" ".quad 0x25202c3837317225,0x090a3b33202c3172,0x752e6f6c2e6c756d,0x3731722509203233\n" ".quad 0x3936317225202c39,0x756d090a3b34202c,0x3233752e6f6c2e6c,0x2c30383172250920\n" ".quad 0x202c393631722520,0x6461090a3b323931,0x2509203233752e64,0x7225202c31383172\n" ".quad 0x317225202c383731,0x646461090a3b3937,0x722509203233752e,0x317225202c323831\n" ".quad 0x3038317225202c37,0x752e646461090a3b,0x3831722509203233,0x3837317225202c33\n" ".quad 0x3b3238317225202c,0x36752e766f6d090a,0x3134647225092034,0x786964615264202c\n" ".quad 0x6f6d090a3b6d7553,0x2509203233732e76,0x7225202c34383172,0x744c240a3b373731\n" ".quad 0x36343731335f305f,0x6f6c3c2f2f200a3a,0x706f6f4c203e706f,0x696c2079646f6220\n" ".quad 0x202c38333220656e,0x20676e697473656e,0x31203a6874706564,0x616d69747365202c\n" ".quad 0x7265746920646574,0x203a736e6f697461,0x0a6e776f6e6b6e75,0x373109636f6c2e09\n" ".quad 0x090a300931343209,0x2e3436752e747663,0x6472250920323375,0x38317225202c3234\n" ".quad 0x2e6c756d090a3b31,0x3233752e65646977,0x2c33346472250920,0x202c313831722520\n" ".quad 0x2e646461090a3b34,0x6472250920343675,0x31647225202c3434,0x3b3334647225202c\n" ".quad 0x6168732e646c090a,0x203233752e646572,0x202c353831722509,0x302b34346472255b\n" ".quad 0x2e747663090a3b5d,0x203233752e343675,0x202c353464722509,0x090a3b3338317225\n" ".quad 0x656469772e6c756d,0x722509203233752e,0x317225202c363464,0x090a3b34202c3338\n" ".quad 0x203436752e646461,0x202c373464722509,0x25202c3134647225,0x73090a3b36346472\n" ".quad 0x6c61626f6c672e74,0x255b09203233752e,0x2c5d302b37346472,0x0a3b353831722520\n" ".quad 0x3233752e64646109,0x2c33383172250920,0x202c333831722520,0x61090a3b32373033\n" ".quad 0x09203233752e6464,0x25202c3937317225,0x3436202c39373172,0x752e646461090a3b\n" ".quad 0x3831722509203233,0x3138317225202c31,0x6d090a3b3436202c,0x09203233752e766f\n" ".quad 0x31202c3638317225,0x6573090a3b303230,0x33752e656c2e7074,0x2c39337025092032\n" ".quad 0x202c393731722520,0x090a3b3638317225,0x7262203933702540,0x305f744c24092061\n" ".quad 0x0a3b36343731335f,0x31335f305f744c24,0x6c2e090a3a343332,0x343209373109636f\n" ".quad 0x697865090a300934,0x6557444c240a3b74,0x6152385a5f5f646e,0x31506d7553786964\n" ".quad 0x756c615679654b32,0x6a6a6a7269615065,0x202f2f207d090a3a,0x7869646152385a5f\n" ".quad 0x654b3231506d7553,0x615065756c615679,0x2e090a6a6a6a7269,0x2e206c61626f6c67\n" ".quad 0x2034206e67696c61,0x646152642038622e,0x536b636f6c427869,0x0a3b5d34365b6d75\n" ".quad 0x7972746e652e090a,0x64615234315a5f20,0x7869666572507869,0x0a7b090a766d7553\n" ".quad 0x752e206765722e09,0x30373c7225203233,0x6765722e090a3b3e,0x7225203436752e20\n" ".quad 0x090a3b3e30333c64,0x72702e206765722e,0x35313c7025206465,0x636f6c2e090a3b3e\n" ".quad 0x0935343209373109,0x656257444c240a30,0x34315a5f5f6e6967,0x6572507869646152\n" ".quad 0x3a766d7553786966,0x3109636f6c2e090a,0x0a30093936320937,0x3233752e766f6d09\n" ".quad 0x25202c3172250920,0x090a3b782e646974,0x203233622e646e61,0x7225202c32722509\n" ".quad 0x090a3b3531202c31,0x203233752e726873,0x7225202c33722509,0x6d090a3b34202c31\n" ".quad 0x33752e6f6c2e6c75,0x202c347225092032,0x3b3731202c337225,0x33752e646461090a\n" ".quad 0x202c357225092032,0x347225202c327225,0x752e766f6d090a3b,0x2c36722509203233\n" ".quad 0x3536313334312d20,0x6d090a3b35363735,0x33752e69682e6c75,0x202c377225092032\n" ".quad 0x367225202c317225,0x752e726873090a3b,0x2c38722509203233,0x3b37202c37722520\n" ".quad 0x33752e766f6d090a,0x202c397225092032,0x782e646961746325,0x6c2e6c756d090a3b\n" ".quad 0x2509203233752e6f,0x397225202c303172,0x6d090a3b3631202c,0x09203233752e766f\n" ".quad 0x312d202c31317225,0x3637353536313334,0x2e6c756d090a3b35,0x09203233752e6968\n" ".quad 0x7225202c32317225,0x3b31317225202c31,0x33752e726873090a,0x2c33317225092032\n" ".quad 0x37202c3231722520,0x6c2e6c756d090a3b,0x2509203233752e6f,0x317225202c343172\n" ".quad 0x0a3b323931202c33,0x3233752e62757309,0x202c353172250920,0x317225202c317225\n" ".quad 0x2e646461090a3b34,0x3172250920323375,0x202c387225202c36,0x6d090a3b30317225\n" ".quad 0x33752e6f6c2e6c75,0x2c37317225092032,0x31202c3631722520,0x646461090a3b3239\n" ".quad 0x722509203233752e,0x35317225202c3831,0x0a3b37317225202c,0x3233732e766f6d09\n" ".quad 0x202c393172250920,0x6d090a3b38317225,0x33752e6f6c2e6c75,0x2c30327225092032\n" ".quad 0x3033202c39722520,0x646461090a3b3237,0x722509203233752e,0x30327225202c3132\n" ".quad 0x0a3b32373033202c,0x656c2e7074657309,0x702509203233752e,0x2c31327225202c31\n" ".quad 0x090a3b3831722520,0x6172622031702540,0x5f315f744c240920,0x6d090a3b32383637\n" ".quad 0x09203436752e766f,0x5264202c31647225,0x3b6d755378696461,0x36752e766f6d090a\n" ".quad 0x2c32647225092034,0x5378696461527320,0x627573090a3b6d75,0x722509203233752e\n" ".quad 0x31327225202c3232,0x0a3b38317225202c,0x3233752e64646109,0x202c333272250920\n" ".quad 0x3931202c32327225,0x2e766f6d090a3b31,0x3272250920323373,0x313334312d202c34\n" ".quad 0x0a3b353637353536,0x3233732e766f6d09,0x202c353272250920,0x70746573090a3b30\n" ".quad 0x203233732e746c2e,0x7225202c32702509,0x35327225202c3332,0x732e736261090a3b\n" ".quad 0x3632722509203233,0x0a3b33327225202c,0x2e69682e6c756d09,0x3272250920323375\n" ".quad 0x2c36327225202c37,0x090a3b3432722520,0x203233732e726873,0x25202c3832722509\n" ".quad 0x0a3b37202c373272,0x7573203270254009,0x2509203233732e62,0x327225202c383272\n" ".quad 0x3b38327225202c35,0x33732e766f6d090a,0x2c39327225092032,0x090a3b3832722520\n" ".quad 0x2e3436752e747663,0x6472250920323375,0x0a3b357225202c33,0x6469772e6c756d09\n" ".quad 0x2509203233752e65,0x357225202c346472,0x6461090a3b34202c,0x2509203436752e64\n" ".quad 0x647225202c356472,0x3b32647225202c34,0x36752e747663090a,0x2509203233752e34\n" ".quad 0x317225202c366472,0x2e6c756d090a3b38,0x3233752e65646977,0x202c376472250920\n" ".quad 0x3b34202c38317225,0x36752e646461090a,0x2c38647225092034,0x25202c3164722520\n" ".quad 0x6f6d090a3b376472,0x2509203233732e76,0x327225202c303372,0x315f744c240a3b39\n" ".quad 0x200a3a343931385f,0x3e706f6f6c3c2f2f,0x6f6220706f6f4c20,0x20656e696c207964\n" ".quad 0x73656e202c393632,0x70656420676e6974,0x65202c31203a6874,0x646574616d697473\n" ".quad 0x6974617265746920,0x6b6e75203a736e6f,0x6c2e090a6e776f6e,0x373209373109636f\n" ".quad 0x2e646c090a300934,0x752e6c61626f6c67,0x3133722509203233,0x2b386472255b202c\n" ".quad 0x2e7473090a3b5d30,0x752e646572616873,0x6472255b09203233,0x7225202c5d302b35\n" ".quad 0x6f6c2e090a3b3133,0x3537320937310963,0x2e646461090a3009,0x6472250920343675\n" ".quad 0x2c35647225202c35,0x61090a3b36313820,0x09203233752e6464,0x7225202c39317225\n" ".quad 0x3b323931202c3931,0x36752e646461090a,0x2c38647225092034,0x37202c3864722520\n" ".quad 0x746573090a3b3836,0x3233752e74672e70,0x25202c3370250920,0x317225202c313272\n" ".quad 0x33702540090a3b39,0x4c24092061726220,0x343931385f315f74,0x5f315f744c240a3b\n" ".quad 0x6d090a3a32383637,0x09203436752e766f,0x5264202c31647225,0x3b6d755378696461\n" ".quad 0x36752e766f6d090a,0x2c32647225092034,0x5378696461527320,0x6f6c2e090a3b6d75\n" ".quad 0x3937320937310963,0x2e726162090a3009,0x3b300920636e7973,0x3109636f6c2e090a\n" ".quad 0x0a30093338320937,0x2e6f6c2e6c756d09,0x3372250920323375,0x202c317225202c32\n" ".quad 0x766f6d090a3b3731,0x722509203233732e,0x32337225202c3333,0x752e646461090a3b\n" ".quad 0x3433722509203233,0x202c32337225202c,0x746573090a3b3631,0x3233752e74672e70\n" ".quad 0x25202c3470250920,0x337225202c343372,0x70252140090a3b32,0x2409206172622034\n" ".quad 0x3037385f315f744c,0x2e747663090a3b36,0x203233732e343673,0x25202c3964722509\n" ".quad 0x756d090a3b323372,0x732e656469772e6c,0x3164722509203233,0x2c32337225202c30\n" ".quad 0x646461090a3b3420,0x722509203436752e,0x647225202c313164,0x3031647225202c32\n" ".quad 0x752e766f6d090a3b,0x3533722509203233,0x744c240a3b30202c,0x3a383132395f315f\n" ".quad 0x6f6f6c3c2f2f200a,0x20706f6f4c203e70,0x6e696c2079646f62,0x6e202c3338322065\n" ".quad 0x6420676e69747365,0x2c31203a68747065,0x6974617265746920,0x0a3631203a736e6f\n" ".quad 0x373109636f6c2e09,0x090a300938383209,0x65726168732e646c,0x2509203233752e64\n" ".quad 0x72255b202c363372,0x0a3b5d302b313164,0x3233752e64646109,0x202c353372250920\n" ".quad 0x7225202c36337225,0x6f6c2e090a3b3533,0x3938320937310963,0x732e7473090a3009\n" ".quad 0x33752e6465726168,0x316472255b092032,0x7225202c5d302b31,0x6f6c2e090a3b3533\n" ".quad 0x3039320937310963,0x2e646461090a3009,0x3372250920323373,0x2c33337225202c33\n" ".quad 0x646461090a3b3120,0x722509203436752e,0x647225202c313164,0x090a3b34202c3131\n" ".quad 0x2e656e2e70746573,0x3570250920323375,0x202c33337225202c,0x40090a3b34337225\n" ".quad 0x2061726220357025,0x395f315f744c2409,0x744c240a3b383132,0x3a363037385f315f\n" ".quad 0x3109636f6c2e090a,0x0a30093239320937,0x6e79732e72616209,0x2e090a3b30092063\n" ".quad 0x3309373109636f6c,0x7663090a30093530,0x33732e3436732e74,0x3231647225092032\n" ".quad 0x0a3b32337225202c,0x6469772e6c756d09,0x2509203233732e65,0x7225202c33316472\n" ".quad 0x090a3b34202c3233,0x203436752e646461,0x202c343164722509,0x7225202c32647225\n" ".quad 0x646c090a3b333164,0x2e6465726168732e,0x3372250920323375,0x316472255b202c37\n" ".quad 0x090a3b5d30362b34,0x65726168732e7473,0x5b09203233752e64,0x34362b3431647225\n" ".quad 0x3b37337225202c5d,0x3109636f6c2e090a,0x0a30093630330937,0x6e79732e72616209\n" ".quad 0x6d090a3b30092063,0x09203233732e766f,0x3731202c38337225,0x5f315f744c240a3b\n" ".quad 0x200a3a3234323031,0x3e706f6f6c3c2f2f,0x6f6220706f6f4c20,0x20656e696c207964\n" ".quad 0x73656e202c363033,0x70656420676e6974,0x65202c31203a6874,0x646574616d697473\n" ".quad 0x6974617265746920,0x6b6e75203a736e6f,0x7573090a6e776f6e,0x2509203233732e62\n" ".quad 0x337225202c393372,0x3b38337225202c32,0x33732e646461090a,0x2c30347225092032\n" ".quad 0x31202c3933722520,0x2e766f6d090a3b36,0x3472250920323375,0x73090a3b30202c31\n" ".quad 0x732e656c2e707465,0x2c36702509203233,0x25202c3034722520,0x2540090a3b313472\n" ".quad 0x0920617262203670,0x30315f315f744c24,0x2f2f200a3b343537,0x50203e706f6f6c3c\n" ".quad 0x6c20666f20747261,0x79646f6220706f6f,0x303320656e696c20,0x2064616568202c36\n" ".quad 0x2064656c6562616c,0x30315f315f744c24,0x6f6c2e090a323432,0x3231330937310963\n" ".quad 0x2e747663090a3009,0x203233732e343673,0x202c353164722509,0x6d090a3b39337225\n" ".quad 0x2e656469772e6c75,0x6472250920323373,0x39337225202c3631,0x6461090a3b34202c\n" ".quad 0x2509203436752e64,0x7225202c37316472,0x31647225202c3264,0x732e646c090a3b36\n" ".quad 0x33752e6465726168,0x2c32347225092032,0x2b37316472255b20,0x7262090a3b5d3436\n" ".quad 0x240920696e752e61,0x3430315f315f744c,0x5f744c240a3b3839,0x3a34353730315f31\n" ".quad 0x6f6f6c3c2f2f200a,0x2074726150203e70,0x20706f6f6c20666f,0x6e696c2079646f62\n" ".quad 0x68202c3630332065,0x6562616c20646165,0x5f744c242064656c,0x0a32343230315f31\n" ".quad 0x3233752e766f6d09,0x202c323472250920,0x315f744c240a3b30,0x0a3a38393430315f\n" ".quad 0x706f6f6c3c2f2f20,0x6f2074726150203e,0x6220706f6f6c2066,0x656e696c2079646f\n" ".quad 0x6568202c36303320,0x6c6562616c206461,0x315f744c24206465,0x090a32343230315f\n" ".quad 0x09373109636f6c2e,0x62090a3009333133,0x20636e79732e7261,0x6f6c2e090a3b3009\n" ".quad 0x3431330937310963,0x732e646c090a3009,0x33752e6465726168,0x2c33347225092032\n" ".quad 0x2b34316472255b20,0x6461090a3b5d3436,0x2509203233752e64,0x347225202c343472\n" ".quad 0x3b32347225202c33,0x6168732e7473090a,0x203233752e646572,0x2b34316472255b09\n" ".quad 0x347225202c5d3436,0x636f6c2e090a3b34,0x0935313309373109,0x732e726162090a30\n" ".quad 0x0a3b300920636e79,0x373109636f6c2e09,0x090a300936313309,0x732e6f6c2e6c756d\n" ".quad 0x3833722509203233,0x202c38337225202c,0x2e766f6d090a3b32,0x3472250920323375\n" ".quad 0x3b33363233202c35,0x6c2e70746573090a,0x2509203233732e65,0x38337225202c3770\n" ".quad 0x0a3b35347225202c,0x7262203770254009,0x315f744c24092061,0x0a3b32343230315f\n" ".quad 0x373109636f6c2e09,0x090a300935323309,0x203233732e766f6d,0x25202c3333722509\n" ".quad 0x7573090a3b323372,0x2509203233732e62,0x337225202c363472,0x6d090a3b31202c32\n" ".quad 0x09203233752e766f,0x3b30202c37347225,0x6c2e70746573090a,0x2509203233732e65\n" ".quad 0x36347225202c3870,0x0a3b37347225202c,0x7262203870254009,0x315f744c24092061\n" ".quad 0x0a3b32323531315f,0x373109636f6c2e09,0x090a300938323309,0x65726168732e646c\n" ".quad 0x2509203233752e64,0x72255b202c383472,0x3b5d342d2b343164,0x6e752e617262090a\n" ".quad 0x315f744c24092069,0x0a3b36363231315f,0x31315f315f744c24,0x6f6d090a3a323235\n" ".quad 0x2509203233752e76,0x0a3b30202c383472,0x31315f315f744c24,0x2140090a3a363632\n" ".quad 0x2061726220347025,0x315f315f744c2409,0x6d090a3b38373731,0x09203436732e766f\n" ".quad 0x25202c3131647225,0x4c240a3b34316472,0x393232315f315f74,0x6c3c2f2f200a3a30\n" ".quad 0x6f6f4c203e706f6f,0x6c2079646f622070,0x2c38323320656e69,0x676e697473656e20\n" ".quad 0x203a687470656420,0x6172657469202c31,0x31203a736e6f6974,0x09636f6c2e090a36\n" ".quad 0x3009313333093731,0x6168732e646c090a,0x203233752e646572,0x5b202c3934722509\n" ".quad 0x5d302b3131647225,0x752e646461090a3b,0x3035722509203233,0x202c39347225202c\n" ".quad 0x73090a3b38347225,0x6465726168732e74,0x255b09203233752e,0x2c5d302b31316472\n" ".quad 0x090a3b3035722520,0x09373109636f6c2e,0x61090a3009323333,0x09203233732e6464\n" ".quad 0x7225202c33337225,0x090a3b31202c3333,0x203436752e646461,0x202c313164722509\n" ".quad 0x34202c3131647225,0x2e70746573090a3b,0x09203233752e656e,0x337225202c397025\n" ".quad 0x3b34337225202c33,0x622039702540090a,0x5f744c2409206172,0x3b30393232315f31\n" ".quad 0x315f315f744c240a,0x2e090a3a38373731,0x3309373109636f6c,0x6162090a30093433\n" ".quad 0x0920636e79732e72,0x636f6c2e090a3b30,0x0935343309373109,0x752e646461090a30\n" ".quad 0x3135722509203233,0x202c38317225202c,0x2e766f6d090a3b31,0x3172250920323373\n" ".quad 0x3b31357225202c39,0x6f6c2e6c756d090a,0x722509203233752e,0x2c397225202c3235\n" ".quad 0x61090a3b36353220,0x09203233752e6464,0x7225202c33357225,0x3b363532202c3235\n" ".quad 0x33752e726873090a,0x2c34357225092032,0x34202c3335722520,0x6c2e6c756d090a3b\n" ".quad 0x2509203233752e6f,0x357225202c353572,0x0a3b323931202c34,0x656c2e7074657309\n" ".quad 0x702509203233752e,0x35357225202c3031,0x0a3b31357225202c,0x6220303170254009\n" ".quad 0x5f744c2409206172,0x3b32303832315f31,0x33752e627573090a,0x2c36357225092032\n" ".quad 0x25202c3535722520,0x6461090a3b313572,0x2509203233752e64,0x357225202c373572\n" ".quad 0x0a3b313931202c36,0x3233732e766f6d09,0x202c383572250920,0x353536313334312d\n" ".quad 0x6f6d090a3b353637,0x2509203233732e76,0x0a3b30202c393572,0x746c2e7074657309\n" ".quad 0x702509203233732e,0x37357225202c3131,0x0a3b39357225202c,0x3233732e73626109\n" ".quad 0x202c303672250920,0x6d090a3b37357225,0x33752e69682e6c75,0x2c31367225092032\n" ".quad 0x25202c3036722520,0x6873090a3b383572,0x2509203233732e72,0x367225202c323672\n" ".quad 0x40090a3b37202c31,0x6275732031317025,0x722509203233732e,0x39357225202c3236\n" ".quad 0x0a3b32367225202c,0x3233732e766f6d09,0x202c333672250920,0x63090a3b32367225\n" ".quad 0x752e3436752e7476,0x3164722509203233,0x0a3b357225202c38,0x6469772e6c756d09\n" ".quad 0x2509203233752e65,0x7225202c39316472,0x61090a3b34202c35,0x09203436752e6464\n" ".quad 0x7225202c35647225,0x647225202c393164,0x2e747663090a3b32,0x203233752e343675\n" ".quad 0x202c303264722509,0x6d090a3b31357225,0x2e656469772e6c75,0x6472250920323375\n" ".quad 0x31357225202c3132,0x6461090a3b34202c,0x2509203436752e64,0x647225202c386472\n" ".quad 0x3132647225202c31,0x732e766f6d090a3b,0x3436722509203233,0x0a3b33367225202c\n" ".quad 0x33315f315f744c24,0x2f2f200a3a343133,0x4c203e706f6f6c3c,0x79646f6220706f6f\n" ".quad 0x343320656e696c20,0x697473656e202c35,0x687470656420676e,0x747365202c31203a\n" ".quad 0x6920646574616d69,0x6e6f697461726574,0x6f6e6b6e75203a73,0x636f6c2e090a6e77\n" ".quad 0x0938343309373109,0x68732e646c090a30,0x3233752e64657261,0x202c353672250920\n" ".quad 0x5d302b356472255b,0x6c672e7473090a3b,0x3233752e6c61626f,0x2b386472255b0920\n" ".quad 0x35367225202c5d30,0x09636f6c2e090a3b,0x3009303533093731,0x36752e646461090a\n" ".quad 0x2c35647225092034,0x38202c3564722520,0x646461090a3b3631,0x722509203233752e\n" ".quad 0x39317225202c3931,0x090a3b323931202c,0x203436752e646461,0x25202c3864722509\n" ".quad 0x383637202c386472,0x2e70746573090a3b,0x09203233752e7467,0x7225202c32317025\n" ".quad 0x39317225202c3535,0x3231702540090a3b,0x4c24092061726220,0x313333315f315f74\n" ".quad 0x315f744c240a3b34,0x0a3a32303832315f,0x3233752e766f6d09,0x202c363672250920\n" ".quad 0x70746573090a3b30,0x203233752e656e2e,0x25202c3331702509,0x36367225202c3172\n" ".quad 0x3331702540090a3b,0x4c24092061726220,0x323833315f315f74,0x636f6c2e090a3b36\n" ".quad 0x0937353309373109,0x68732e646c090a30,0x3233752e64657261,0x202c373672250920\n" ".quad 0x537869646152735b,0x32353033312b6d75,0x2e766f6d090a3b5d,0x6472250920343675\n" ".quad 0x64615264202c3232,0x536b636f6c427869,0x747663090a3b6d75,0x3233752e3436752e\n" ".quad 0x2c33326472250920,0x6d090a3b39722520,0x2e656469772e6c75,0x6472250920323375\n" ".quad 0x2c397225202c3432,0x646461090a3b3420,0x722509203436752e,0x647225202c353264\n" ".quad 0x32647225202c3232,0x672e7473090a3b34,0x33752e6c61626f6c,0x326472255b092032\n" ".quad 0x7225202c5d302b35,0x6f6c2e090a3b3736,0x3835330937310963,0x2e766f6d090a3009\n" ".quad 0x3672250920323375,0x63090a3b30202c38,0x752e3436752e7476,0x3264722509203233\n" ".quad 0x3b30327225202c36,0x69772e6c756d090a,0x09203233752e6564,0x25202c3732647225\n" ".quad 0x0a3b34202c303272,0x3436752e64646109,0x2c38326472250920,0x25202c3164722520\n" ".quad 0x73090a3b37326472,0x6c61626f6c672e74,0x255b09203233752e,0x2c5d302b38326472\n" ".quad 0x240a3b3836722520,0x3833315f315f744c,0x6f6c2e090a3a3632,0x3036330937310963\n" ".quad 0x74697865090a3009,0x6e6557444c240a3b,0x615234315a5f5f64,0x6966657250786964\n" ".quad 0x090a3a766d755378,0x315a5f202f2f207d,0x7250786964615234,0x766d755378696665\n" ".quad 0x72746e652e090a0a,0x615235325a5f2079,0x664f646441786964,0x646e417374657366\n" ".quad 0x50656c6666756853,0x6c615679654b3231,0x3053726961506575,0x090a2820696a6a5f\n" ".quad 0x206d617261702e09,0x635f5f203436752e,0x5f6d726170616475,0x6964615235325a5f\n" ".quad 0x7366664f64644178,0x6853646e41737465,0x323150656c666675,0x65756c615679654b\n" ".quad 0x6a5f305372696150,0x2c637253705f696a,0x617261702e09090a,0x5f203436752e206d\n" ".quad 0x726170616475635f,0x615235325a5f5f6d,0x664f646441786964,0x646e417374657366\n" ".quad 0x50656c6666756853,0x6c615679654b3231,0x3053726961506575,0x7344705f696a6a5f\n" ".quad 0x61702e09090a2c74,0x3233752e206d6172,0x70616475635f5f20,0x35325a5f5f6d7261\n" ".quad 0x6464417869646152,0x417374657366664f,0x6c6666756853646e,0x5679654b32315065\n" ".quad 0x7269615065756c61,0x655f696a6a5f3053,0x2c73746e656d656c,0x617261702e09090a\n" ".quad 0x5f203233752e206d,0x726170616475635f,0x615235325a5f5f6d,0x664f646441786964\n" ".quad 0x646e417374657366,0x50656c6666756853,0x6c615679654b3231,0x3053726961506575\n" ".quad 0x656c655f696a6a5f,0x6f725f73746e656d,0x6f745f6465646e75,0x090a2c323730335f\n" ".quad 0x206d617261702e09,0x635f5f203233732e,0x5f6d726170616475,0x6964615235325a5f\n" ".quad 0x7366664f64644178,0x6853646e41737465,0x323150656c666675,0x65756c615679654b\n" ".quad 0x6a5f305372696150,0x74666968735f696a,0x722e090a7b090a29,0x203233752e206765\n" ".quad 0x3b3e3833323c7225,0x2e206765722e090a,0x3c64722520343675,0x2e090a3b3e383031\n" ".quad 0x6572702e20676572,0x3e35343c70252064,0x5f5f202f2f090a3b,0x636f6c5f61647563\n" ".quad 0x325f7261765f6c61,0x5f32325f33323538,0x736e6f635f6e6f6e,0x203d2070766b5f74\n" ".quad 0x09636f6c2e090a30,0x3009343733093731,0x67656257444c240a,0x5235325a5f5f6e69\n" ".quad 0x4f64644178696461,0x6e41737465736666,0x656c666675685364,0x615679654b323150\n" ".quad 0x537269615065756c,0x090a3a696a6a5f30,0x203233752e766f6d,0x7425202c31722509\n" ".quad 0x6d090a3b782e6469,0x09203233752e766f,0x0a3b30202c327225,0x656e2e7074657309\n" ".quad 0x702509203233752e,0x202c317225202c31,0x2540090a3b327225,0x0920617262203170\n" ".quad 0x33325f325f744c24,0x6c2e090a3b303138,0x373309373109636f,0x766f6d090a300938\n" ".quad 0x722509203233752e,0x73090a3b30202c33,0x6465726168732e74,0x735b09203233752e\n" ".quad 0x6d75537869646152,0x202c5d363930342b,0x744c240a3b337225,0x30313833325f325f\n" ".quad 0x752e766f6d090a3a,0x2c34722509203233,0x6573090a3b343120,0x33752e74672e7074\n" ".quad 0x202c327025092032,0x347225202c317225,0x2032702540090a3b,0x744c240920617262\n" ".quad 0x32323334325f325f,0x09636f6c2e090a3b,0x3009313833093731,0x36752e766f6d090a\n" ".quad 0x2c31647225092034,0x5378696461527320,0x747663090a3b6d75,0x3233752e3436752e\n" ".quad 0x202c326472250920,0x756d090a3b317225,0x752e656469772e6c,0x3364722509203233\n" ".quad 0x34202c317225202c,0x752e766f6d090a3b,0x3464722509203436,0x786964615264202c\n" ".quad 0x6d75536b636f6c42,0x752e646461090a3b,0x3564722509203436,0x202c33647225202c\n" ".quad 0x6c090a3b34647225,0x6c61626f6c672e64,0x722509203233752e,0x356472255b202c35\n" ".quad 0x6461090a3b5d302b,0x2509203436752e64,0x647225202c366472,0x3b31647225202c33\n" ".quad 0x6168732e7473090a,0x203233752e646572,0x342b366472255b09,0x7225202c5d303031\n" ".quad 0x325f744c240a3b35,0x0a3a32323334325f,0x3436752e766f6d09,0x202c316472250920\n" ".quad 0x7553786964615273,0x636f6c2e090a3b6d,0x0932383309373109,0x732e726162090a30\n" ".quad 0x0a3b300920636e79,0x3233732e766f6d09,0x31202c3672250920,0x70746573090a3b35\n" ".quad 0x203233732e656c2e,0x7225202c33702509,0x0a3b367225202c31,0x33732e706c657309\n" ".quad 0x202c377225092032,0x7025202c30202c31,0x2e766f6d090a3b33,0x3872250920323373\n" ".quad 0x744c240a3b31202c,0x36343335325f325f,0x6f6c3c2f2f200a3a,0x706f6f4c203e706f\n" ".quad 0x696c2079646f6220,0x202c32383320656e,0x20676e697473656e,0x31203a6874706564\n" ".quad 0x616d69747365202c,0x7265746920646574,0x203a736e6f697461,0x0a6e776f6e6b6e75\n" ".quad 0x3233732e62757309,0x25202c3972250920,0x3b387225202c3172,0x33732e766f6d090a\n" ".quad 0x2c30317225092032,0x746573090a3b3020,0x2e3233752e65672e,0x3172250920323373\n" ".quad 0x202c397225202c31,0x6e090a3b30317225,0x09203233732e6765,0x7225202c32317225\n" ".quad 0x646e61090a3b3131,0x722509203233622e,0x32317225202c3331,0x090a3b377225202c\n" ".quad 0x203233752e766f6d,0x30202c3431722509,0x2e70746573090a3b,0x09203233732e7165\n" ".quad 0x317225202c347025,0x3b34317225202c33,0x622034702540090a,0x5f744c2409206172\n" ".quad 0x3b38353835325f32,0x6f6f6c3c2f2f200a,0x2074726150203e70,0x20706f6f6c20666f\n" ".quad 0x6e696c2079646f62,0x68202c3238332065,0x6562616c20646165,0x5f744c242064656c\n" ".quad 0x0a36343335325f32,0x373109636f6c2e09,0x090a300930393309,0x2e3436732e747663\n" ".quad 0x6472250920323373,0x0a3b397225202c37,0x6469772e6c756d09,0x2509203233732e65\n" ".quad 0x397225202c386472,0x6461090a3b34202c,0x2509203436752e64,0x647225202c396472\n" ".quad 0x3b38647225202c31,0x6168732e646c090a,0x203233752e646572,0x5b202c3531722509\n" ".quad 0x3930342b39647225,0x617262090a3b5d36,0x4c240920696e752e,0x303635325f325f74\n" ".quad 0x325f744c240a3b32,0x0a3a38353835325f,0x706f6f6c3c2f2f20,0x6f2074726150203e\n" ".quad 0x6220706f6f6c2066,0x656e696c2079646f,0x6568202c32383320,0x6c6562616c206461\n" ".quad 0x325f744c24206465,0x090a36343335325f,0x203233752e766f6d,0x30202c3531722509\n" ".quad 0x5f325f744c240a3b,0x200a3a3230363532,0x3e706f6f6c3c2f2f,0x666f207472615020\n" ".quad 0x6f6220706f6f6c20,0x20656e696c207964,0x616568202c323833,0x656c6562616c2064\n" ".quad 0x5f325f744c242064,0x2e090a3634333532,0x3309373109636f6c,0x6162090a30093139\n" ".quad 0x0920636e79732e72,0x70252140090a3b30,0x2409206172622033,0x3136325f325f744c\n" ".quad 0x3c2f2f200a3b3431,0x6150203e706f6f6c,0x6f6c20666f207472,0x2079646f6220706f\n" ".quad 0x32383320656e696c,0x6c2064616568202c,0x242064656c656261,0x3335325f325f744c\n" ".quad 0x636f6c2e090a3634,0x0933393309373109,0x732e747663090a30,0x09203233732e3436\n" ".quad 0x25202c3031647225,0x6c756d090a3b3172,0x33732e656469772e,0x3131647225092032\n" ".quad 0x34202c317225202c,0x752e646461090a3b,0x3164722509203436,0x2c31647225202c32\n" ".quad 0x0a3b313164722520,0x726168732e646c09,0x09203233752e6465,0x255b202c36317225\n" ".quad 0x3930342b32316472,0x646461090a3b5d36,0x722509203233752e,0x36317225202c3731\n" ".quad 0x0a3b35317225202c,0x726168732e747309,0x09203233752e6465,0x342b32316472255b\n" ".quad 0x7225202c5d363930,0x5f744c240a3b3731,0x3a34313136325f32,0x6f6f6c3c2f2f200a\n" ".quad 0x2074726150203e70,0x20706f6f6c20666f,0x6e696c2079646f62,0x68202c3238332065\n" ".quad 0x6562616c20646165,0x5f744c242064656c,0x0a36343335325f32,0x373109636f6c2e09\n" ".quad 0x090a300934393309,0x636e79732e726162,0x6c2e090a3b300920,0x393309373109636f\n" ".quad 0x6c756d090a300935,0x203233732e6f6c2e,0x7225202c38722509,0x6d090a3b32202c38\n" ".quad 0x09203233752e766f,0x3531202c38317225,0x2e70746573090a3b,0x09203233732e656c\n" ".quad 0x387225202c357025,0x0a3b38317225202c,0x7262203570254009,0x325f744c24092061\n" ".quad 0x0a3b36343335325f,0x373109636f6c2e09,0x090a300939303409,0x203233622e646e61\n" ".quad 0x25202c3931722509,0x090a3b33202c3172,0x203233752e726873,0x25202c3032722509\n" ".quad 0x090a3b32202c3172,0x203233752e766f6d,0x25202c3132722509,0x3b782e6469617463\n" ".quad 0x6f6c2e6c756d090a,0x722509203233752e,0x30327225202c3232,0x61090a3b3834202c\n" ".quad 0x09203233752e6464,0x7225202c33327225,0x32327225202c3132,0x6c2e6c756d090a3b\n" ".quad 0x2509203233752e6f,0x327225202c343272,0x61090a3b34202c33,0x09203233752e6464\n" ".quad 0x7225202c35327225,0x34327225202c3931,0x6c2e6c756d090a3b,0x2509203233732e6f\n" ".quad 0x327225202c363272,0x61090a3b34202c30,0x09203233732e6464,0x7225202c37327225\n" ".quad 0x39317225202c3632,0x732e766f6d090a3b,0x3832722509203233,0x0a3b37327225202c\n" ".quad 0x3233752e766f6d09,0x202c393272250920,0x73090a3b33323031,0x732e74672e707465\n" ".quad 0x2c36702509203233,0x25202c3732722520,0x2540090a3b393272,0x0920617262203670\n" ".quad 0x36325f325f744c24,0x6f6d090a3b323838,0x2509203233732e76,0x383031202c303372\n" ".quad 0x2e627573090a3b37,0x3372250920323373,0x2c30337225202c31,0x090a3b3732722520\n" ".quad 0x203233732e726873,0x25202c3233722509,0x3b3133202c313372,0x33732e766f6d090a\n" ".quad 0x2c33337225092032,0x6e61090a3b333620,0x2509203233622e64,0x337225202c343372\n" ".quad 0x3b33337225202c32,0x33732e646461090a,0x2c35337225092032,0x25202c3433722520\n" ".quad 0x6873090a3b313372,0x2509203233732e72,0x337225202c363372,0x6d090a3b36202c35\n" ".quad 0x09203436752e766f,0x64202c3331647225,0x6d75537869646152,0x732e747663090a3b\n" ".quad 0x09203233732e3436,0x25202c3431647225,0x756d090a3b353272,0x732e656469772e6c\n" ".quad 0x3164722509203233,0x2c35327225202c35,0x646461090a3b3420,0x722509203436752e\n" ".quad 0x647225202c363164,0x31647225202c3331,0x2e747663090a3b35,0x203233732e343673\n" ".quad 0x202c373164722509,0x6d090a3b37327225,0x2e656469772e6c75,0x6472250920323373\n" ".quad 0x37327225202c3831,0x6461090a3b34202c,0x2509203436752e64,0x7225202c39316472\n" ".quad 0x31647225202c3164,0x2e766f6d090a3b38,0x3372250920323373,0x3b36337225202c37\n" ".quad 0x325f325f744c240a,0x2f200a3a34393337,0x203e706f6f6c3c2f,0x646f6220706f6f4c\n" ".quad 0x3420656e696c2079,0x7473656e202c3930,0x7470656420676e69,0x7365202c31203a68\n" ".quad 0x20646574616d6974,0x6f69746172657469,0x6e6b6e75203a736e,0x6f6c2e090a6e776f\n" ".quad 0x3231340937310963,0x672e646c090a3009,0x33752e6c61626f6c,0x2c38337225092032\n" ".quad 0x2b36316472255b20,0x766f6d090a3b5d30,0x722509203233732e,0x3334312d202c3933\n" ".quad 0x3b35363735353631,0x33732e766f6d090a,0x2c30347225092032,0x746573090a3b3020\n" ".quad 0x3233732e746c2e70,0x25202c3770250920,0x347225202c353272,0x2e736261090a3b30\n" ".quad 0x3472250920323373,0x3b35327225202c31,0x69682e6c756d090a,0x722509203233752e\n" ".quad 0x31347225202c3234,0x0a3b39337225202c,0x3233732e72687309,0x202c333472250920\n" ".quad 0x3131202c32347225,0x2037702540090a3b,0x203233732e627573,0x25202c3334722509\n" ".quad 0x347225202c303472,0x2e766f6d090a3b33,0x3472250920323373,0x3b33347225202c34\n" ".quad 0x36732e747663090a,0x2509203233732e34,0x7225202c30326472,0x6c756d090a3b3434\n" ".quad 0x33732e656469772e,0x3132647225092032,0x202c34347225202c,0x2e646461090a3b34\n" ".quad 0x6472250920343675,0x31647225202c3232,0x3b3132647225202c,0x6168732e646c090a\n" ".quad 0x203233752e646572,0x5b202c3534722509,0x30342b3232647225,0x6461090a3b5d3639\n" ".quad 0x2509203233752e64,0x337225202c363472,0x3b35347225202c38,0x6168732e7473090a\n" ".quad 0x203233752e646572,0x2b39316472255b09,0x36347225202c5d30,0x09636f6c2e090a3b\n" ".quad 0x3009343134093731,0x33732e646461090a,0x2c35327225092032,0x33202c3532722520\n" ".quad 0x6461090a3b323730,0x2509203436752e64,0x7225202c36316472,0x323231202c363164\n" ".quad 0x646461090a3b3838,0x722509203233732e,0x38327225202c3832,0x61090a3b3436202c\n" ".quad 0x09203436752e6464,0x25202c3931647225,0x3532202c39316472,0x2e766f6d090a3b36\n" ".quad 0x3472250920323375,0x3b33323031202c37,0x6c2e70746573090a,0x2509203233732e65\n" ".quad 0x38327225202c3870,0x0a3b37347225202c,0x7262203870254009,0x325f744c24092061\n" ".quad 0x0a3b34393337325f,0x36325f325f744c24,0x6c2e090a3a323838,0x313409373109636f\n" ".quad 0x726162090a300936,0x300920636e79732e,0x09636f6c2e090a3b,0x3009313334093731\n" ".quad 0x79732e726162090a,0x090a3b300920636e,0x203233622e646e61,0x25202c3834722509\n" ".quad 0x0a3b3531202c3172,0x3233752e72687309,0x202c393472250920,0x0a3b34202c317225\n" ".quad 0x2e6f6c2e6c756d09,0x3572250920323375,0x2c31327225202c30,0x2e646c090a3b3420\n" ".quad 0x33752e6d61726170,0x2c31357225092032,0x616475635f5f5b20,0x325a5f5f6d726170\n" ".quad 0x6441786964615235,0x7374657366664f64,0x6666756853646e41,0x79654b323150656c\n" ".quad 0x69615065756c6156,0x5f696a6a5f305372,0x73746e656d656c65,0x6465646e756f725f\n" ".quad 0x323730335f6f745f,0x2e766f6d090a3b5d,0x3572250920323375,0x313334312d202c32\n" ".quad 0x0a3b353637353536,0x2e69682e6c756d09,0x3572250920323375,0x2c31357225202c33\n" ".quad 0x090a3b3235722520,0x203233752e726873,0x25202c3435722509,0x0a3b37202c333572\n" ".quad 0x3233752e64646109,0x202c353572250920,0x7225202c39347225,0x6c756d090a3b3035\n" ".quad 0x203233752e6f6c2e,0x25202c3635722509,0x357225202c343572,0x2e646461090a3b35\n" ".quad 0x3572250920323373,0x2c38347225202c37,0x090a3b3635722520,0x203233732e766f6d\n" ".quad 0x25202c3835722509,0x6461090a3b373572,0x2509203233752e64,0x357225202c393572\n" ".quad 0x3b36357225202c34,0x672e70746573090a,0x2509203233752e65,0x37357225202c3970\n" ".quad 0x0a3b39357225202c,0x7262203970254009,0x325f744c24092061,0x0a3b36303937325f\n" ".quad 0x3233752e62757309,0x202c303672250920,0x7225202c34357225,0x646461090a3b3834\n" ".quad 0x722509203233752e,0x30367225202c3136,0x73090a3b3531202c,0x09203233732e7268\n" ".quad 0x7225202c32367225,0x0a3b3133202c3136,0x3233732e766f6d09,0x202c333672250920\n" ".quad 0x646e61090a3b3531,0x722509203233622e,0x32367225202c3436,0x0a3b33367225202c\n" ".quad 0x3233732e64646109,0x202c353672250920,0x7225202c34367225,0x726873090a3b3136\n" ".quad 0x722509203233732e,0x35367225202c3636,0x6f6d090a3b34202c,0x2509203233732e76\n" ".quad 0x0a3b30202c373672,0x71652e7074657309,0x702509203233732e,0x38347225202c3031\n" ".quad 0x0a3b37367225202c,0x3233732e766f6d09,0x202c383672250920,0x70746573090a3b31\n" ".quad 0x203233732e71652e,0x25202c3131702509,0x367225202c383472,0x2e766f6d090a3b38\n" ".quad 0x3672250920323373,0x73090a3b32202c39,0x732e71652e707465,0x3231702509203233\n" ".quad 0x202c38347225202c,0x6d090a3b39367225,0x09203233732e766f,0x3b33202c30377225\n" ".quad 0x652e70746573090a,0x2509203233732e71,0x347225202c333170,0x3b30377225202c38\n" ".quad 0x33732e766f6d090a,0x2c31377225092032,0x746573090a3b3420,0x3233732e71652e70\n" ".quad 0x202c343170250920,0x7225202c38347225,0x766f6d090a3b3137,0x722509203233732e\n" ".quad 0x090a3b35202c3237,0x2e71652e70746573,0x3170250920323373,0x2c38347225202c35\n" ".quad 0x090a3b3237722520,0x203233732e766f6d,0x36202c3337722509,0x2e70746573090a3b\n" ".quad 0x09203233732e7165,0x7225202c36317025,0x33377225202c3834,0x732e766f6d090a3b\n" ".quad 0x3437722509203233,0x6573090a3b37202c,0x33732e71652e7074,0x2c37317025092032\n" ".quad 0x25202c3834722520,0x6f6d090a3b343772,0x2509203233732e76,0x0a3b38202c353772\n" ".quad 0x71652e7074657309,0x702509203233732e,0x38347225202c3831,0x0a3b35377225202c\n" ".quad 0x3233732e766f6d09,0x202c363772250920,0x70746573090a3b39,0x203233732e71652e\n" ".quad 0x25202c3931702509,0x377225202c383472,0x2e766f6d090a3b36,0x3772250920323373\n" ".quad 0x090a3b3031202c37,0x2e71652e70746573,0x3270250920323373,0x2c38347225202c30\n" ".quad 0x090a3b3737722520,0x203233732e766f6d,0x31202c3837722509,0x70746573090a3b31\n" ".quad 0x203233732e71652e,0x25202c3132702509,0x377225202c383472,0x2e766f6d090a3b38\n" ".quad 0x3772250920323373,0x090a3b3231202c39,0x2e71652e70746573,0x3270250920323373\n" ".quad 0x2c38347225202c32,0x090a3b3937722520,0x203233732e766f6d,0x31202c3038722509\n" ".quad 0x70746573090a3b33,0x203233732e71652e,0x25202c3332702509,0x387225202c383472\n" ".quad 0x2e766f6d090a3b30,0x3872250920323373,0x090a3b3431202c31,0x2e71652e70746573\n" ".quad 0x3270250920323373,0x2c38347225202c34,0x090a3b3138722520,0x203233732e766f6d\n" ".quad 0x31202c3238722509,0x70746573090a3b35,0x203233732e71652e,0x25202c3532702509\n" ".quad 0x387225202c383472,0x706c6573090a3b32,0x722509203233732e,0x30202c31202c3338\n" ".quad 0x0a3b30317025202c,0x33732e706c657309,0x2c34387225092032,0x25202c30202c3120\n" ".quad 0x6573090a3b313170,0x09203233732e706c,0x2c31202c35387225,0x32317025202c3020\n" ".quad 0x2e706c6573090a3b,0x3872250920323373,0x2c30202c31202c36,0x090a3b3331702520\n" ".quad 0x3233732e706c6573,0x202c373872250920,0x7025202c30202c31,0x6c6573090a3b3431\n" ".quad 0x2509203233732e70,0x202c31202c383872,0x3b35317025202c30,0x732e706c6573090a\n" ".quad 0x3938722509203233,0x202c30202c31202c,0x73090a3b36317025,0x203233732e706c65\n" ".quad 0x31202c3039722509,0x317025202c30202c,0x706c6573090a3b37,0x722509203233732e\n" ".quad 0x30202c31202c3139,0x0a3b38317025202c,0x33732e706c657309,0x2c32397225092032\n" ".quad 0x25202c30202c3120,0x6573090a3b393170,0x09203233732e706c,0x2c31202c33397225\n" ".quad 0x30327025202c3020,0x2e706c6573090a3b,0x3972250920323373,0x2c30202c31202c34\n" ".quad 0x090a3b3132702520,0x3233732e706c6573,0x202c353972250920,0x7025202c30202c31\n" ".quad 0x6c6573090a3b3232,0x2509203233732e70,0x202c31202c363972,0x3b33327025202c30\n" ".quad 0x732e706c6573090a,0x3739722509203233,0x202c30202c31202c,0x73090a3b34327025\n" ".quad 0x203233732e706c65,0x31202c3839722509,0x327025202c30202c,0x702e646c090a3b35\n" ".quad 0x3233752e6d617261,0x202c393972250920,0x70616475635f5f5b,0x35325a5f5f6d7261\n" ".quad 0x6464417869646152,0x417374657366664f,0x6c6666756853646e,0x5679654b32315065\n" ".quad 0x7269615065756c61,0x655f696a6a5f3053,0x5d73746e656d656c,0x732e766f6d090a3b\n" ".quad 0x3031722509203233,0x3b36367225202c30,0x325f325f744c240a,0x2f200a3a38313438\n" ".quad 0x203e706f6f6c3c2f,0x646f6220706f6f4c,0x3420656e696c2079,0x7473656e202c3133\n" ".quad 0x7470656420676e69,0x7365202c31203a68,0x20646574616d6974,0x6f69746172657469\n" ".quad 0x6e6b6e75203a736e,0x746573090a6e776f,0x3233752e746c2e70,0x202c363270250920\n" ".quad 0x7225202c38357225,0x252140090a3b3939,0x2061726220363270,0x325f325f744c2409\n" ".quad 0x2f200a3b30333938,0x203e706f6f6c3c2f,0x20666f2074726150,0x646f6220706f6f6c\n" ".quad 0x3420656e696c2079,0x64616568202c3133,0x64656c6562616c20,0x325f325f744c2420\n" ".quad 0x6c2e090a38313438,0x343409373109636f,0x6c756d090a300930,0x203233752e6f6c2e\n" ".quad 0x202c313031722509,0x3b38202c38357225,0x36752e747663090a,0x2509203233752e34\n" ".quad 0x7225202c33326472,0x646c090a3b313031,0x752e6d617261702e,0x3264722509203436\n" ".quad 0x75635f5f5b202c34,0x5f5f6d7261706164,0x786964615235325a,0x657366664f646441\n" ".quad 0x756853646e417374,0x4b323150656c6666,0x5065756c61567965,0x6a6a5f3053726961\n" ".quad 0x3b5d637253705f69,0x36752e646461090a,0x3532647225092034,0x2c3332647225202c\n" ".quad 0x0a3b343264722520,0x626f6c672e646c09,0x33752e32762e6c61,0x303172257b092032\n" ".quad 0x7d33303172252c32,0x35326472255b202c,0x6f6d090a3b5d302b,0x2509203233732e76\n" ".quad 0x7225202c34303172,0x7262090a3b333031,0x240920696e752e61,0x3638325f325f744c\n" ".quad 0x5f744c240a3b3437,0x3a30333938325f32,0x6f6f6c3c2f2f200a,0x2074726150203e70\n" ".quad 0x20706f6f6c20666f,0x6e696c2079646f62,0x68202c3133342065,0x6562616c20646165\n" ".quad 0x5f744c242064656c,0x0a38313438325f32,0x373109636f6c2e09,0x090a300933343409\n" ".quad 0x203233752e766f6d,0x202c323031722509,0x325f744c240a3b30,0x0a3a34373638325f\n" ".quad 0x706f6f6c3c2f2f20,0x6f2074726150203e,0x6220706f6f6c2066,0x656e696c2079646f\n" ".quad 0x6568202c31333420,0x6c6562616c206461,0x325f744c24206465,0x090a38313438325f\n" ".quad 0x3233732e706c6573,0x2c35303172250920,0x25202c30202c3120,0x6e61090a3b363270\n" ".quad 0x2509203233622e64,0x7225202c36303172,0x387225202c353031,0x2e766f6d090a3b33\n" ".quad 0x3172250920323375,0x090a3b30202c3730,0x2e71652e70746573,0x3270250920323373\n" ".quad 0x3630317225202c37,0x3b3730317225202c,0x203732702540090a,0x744c240920617262\n" ".quad 0x36383139325f325f,0x6f6c3c2f2f200a3b,0x74726150203e706f,0x706f6f6c20666f20\n" ".quad 0x696c2079646f6220,0x202c31333420656e,0x62616c2064616568,0x744c242064656c65\n" ".quad 0x38313438325f325f,0x3109636f6c2e090a,0x0a30093437340937,0x617261702e646c09\n" ".quad 0x2509203233732e6d,0x5f5b202c38303172,0x726170616475635f,0x615235325a5f5f6d\n" ".quad 0x664f646441786964,0x646e417374657366,0x50656c6666756853,0x6c615679654b3231\n" ".quad 0x3053726961506575,0x6968735f696a6a5f,0x6873090a3b5d7466,0x2509203233752e72\n" ".quad 0x7225202c39303172,0x317225202c323031,0x646e61090a3b3830,0x722509203233622e\n" ".quad 0x317225202c303131,0x3b353532202c3930,0x6f6c2e6c756d090a,0x722509203233752e\n" ".quad 0x317225202c313131,0x090a3b34202c3031,0x203233752e646461,0x202c323131722509\n" ".quad 0x7225202c39347225,0x7663090a3b313131,0x33752e3436752e74,0x3632647225092032\n" ".quad 0x3b3231317225202c,0x69772e6c756d090a,0x09203233752e6564,0x25202c3732647225\n" ".quad 0x3b34202c32313172,0x36752e646461090a,0x3832647225092034,0x202c31647225202c\n" ".quad 0x090a3b3732647225,0x65726168732e646c,0x2509203233752e64,0x255b202c33313172\n" ".quad 0x3b5d302b38326472,0x33752e646461090a,0x3431317225092032,0x2c3331317225202c\n" ".quad 0x2e7473090a3b3120,0x752e646572616873,0x6472255b09203233,0x25202c5d302b3832\n" ".quad 0x2e090a3b34313172,0x3409373109636f6c,0x756d090a30093537,0x3233752e6f6c2e6c\n" ".quad 0x2c35313172250920,0x202c333131722520,0x2e747663090a3b38,0x203233752e343675\n" ".quad 0x202c393264722509,0x090a3b3531317225,0x6d617261702e646c,0x722509203436752e\n" ".quad 0x5f5f5b202c303364,0x6d72617061647563,0x64615235325a5f5f,0x66664f6464417869\n" ".quad 0x53646e4173746573,0x3150656c66667568,0x756c615679654b32,0x5f30537269615065\n" ".quad 0x747344705f696a6a,0x2e646461090a3b5d,0x6472250920343675,0x32647225202c3133\n" ".quad 0x3033647225202c39,0x732e766f6d090a3b,0x3131722509203233,0x3430317225202c36\n" ".quad 0x6c672e7473090a3b,0x2e32762e6c61626f,0x72255b0920323375,0x202c5d302b313364\n" ".quad 0x252c32303172257b,0x240a3b7d36313172,0x3139325f325f744c,0x3c2f2f200a3a3638\n" ".quad 0x6150203e706f6f6c,0x6f6c20666f207472,0x2079646f6220706f,0x31333420656e696c\n" ".quad 0x6c2064616568202c,0x242064656c656261,0x3438325f325f744c,0x636f6c2e090a3831\n" ".quad 0x0937373409373109,0x732e726162090a30,0x0a3b300920636e79,0x3233622e646e6109\n" ".quad 0x2c37313172250920,0x202c353031722520,0x6d090a3b34387225,0x09203233752e766f\n" ".quad 0x30202c3831317225,0x2e70746573090a3b,0x09203233732e7165,0x7225202c38327025\n" ".quad 0x317225202c373131,0x702540090a3b3831,0x0920617262203832,0x39325f325f744c24\n" ".quad 0x2f2f200a3b383936,0x50203e706f6f6c3c,0x6c20666f20747261,0x79646f6220706f6f\n" ".quad 0x333420656e696c20,0x2064616568202c31,0x2064656c6562616c,0x38325f325f744c24\n" ".quad 0x6f6c2e090a383134,0x3038340937310963,0x702e646c090a3009,0x3233732e6d617261\n" ".quad 0x2c39313172250920,0x616475635f5f5b20,0x325a5f5f6d726170,0x6441786964615235\n" ".quad 0x7374657366664f64,0x6666756853646e41,0x79654b323150656c,0x69615065756c6156\n" ".quad 0x5f696a6a5f305372,0x0a3b5d7466696873,0x3233752e72687309,0x2c39303172250920\n" ".quad 0x202c323031722520,0x090a3b3931317225,0x203233622e646e61,0x202c303131722509\n" ".quad 0x32202c3930317225,0x6c756d090a3b3535,0x203233752e6f6c2e,0x202c313131722509\n" ".quad 0x34202c3031317225,0x752e646461090a3b,0x3231722509203233,0x2c39347225202c30\n" ".quad 0x0a3b313131722520,0x3436752e74766309,0x722509203233752e,0x317225202c323364\n" ".quad 0x6c756d090a3b3032,0x33752e656469772e,0x3333647225092032,0x2c3032317225202c\n" ".quad 0x646461090a3b3420,0x722509203436752e,0x647225202c383264,0x3333647225202c31\n" ".quad 0x68732e646c090a3b,0x3233752e64657261,0x2c31323172250920,0x2b38326472255b20\n" ".quad 0x646461090a3b5d30,0x722509203233752e,0x317225202c323231,0x090a3b31202c3132\n" ".quad 0x65726168732e7473,0x5b09203233752e64,0x5d302b3832647225,0x3b3232317225202c\n" ".quad 0x3109636f6c2e090a,0x0a30093138340937,0x2e6f6c2e6c756d09,0x3172250920323375\n" ".quad 0x32317225202c3332,0x63090a3b38202c31,0x752e3436752e7476,0x3364722509203233\n" ".quad 0x3332317225202c34,0x61702e646c090a3b,0x203436752e6d6172,0x202c353364722509\n" ".quad 0x70616475635f5f5b,0x35325a5f5f6d7261,0x6464417869646152,0x417374657366664f\n" ".quad 0x6c6666756853646e,0x5679654b32315065,0x7269615065756c61,0x705f696a6a5f3053\n" ".quad 0x61090a3b5d747344,0x09203436752e6464,0x25202c3633647225,0x7225202c34336472\n" ".quad 0x6f6d090a3b353364,0x2509203233732e76,0x7225202c34323172,0x7473090a3b343031\n" ".quad 0x2e6c61626f6c672e,0x09203233752e3276,0x302b36336472255b,0x303172257b202c5d\n" ".quad 0x7d34323172252c32,0x5f325f744c240a3b,0x200a3a3839363932,0x3e706f6f6c3c2f2f\n" ".quad 0x666f207472615020,0x6f6220706f6f6c20,0x20656e696c207964,0x616568202c313334\n" ".quad 0x656c6562616c2064,0x5f325f744c242064,0x2e090a3831343832,0x3409373109636f6c\n" ".quad 0x6162090a30093338,0x0920636e79732e72,0x2e646e61090a3b30,0x3172250920323362\n" ".quad 0x30317225202c3532,0x3b35387225202c35,0x33752e766f6d090a,0x3632317225092032\n" ".quad 0x6573090a3b30202c,0x33732e71652e7074,0x2c39327025092032,0x202c353231722520\n" ".quad 0x090a3b3632317225,0x7262203932702540,0x325f744c24092061,0x0a3b30313230335f\n" ".quad 0x706f6f6c3c2f2f20,0x6f2074726150203e,0x6220706f6f6c2066,0x656e696c2079646f\n" ".quad 0x6568202c31333420,0x6c6562616c206461,0x325f744c24206465,0x090a38313438325f\n" ".quad 0x09373109636f6c2e,0x6c090a3009363834,0x2e6d617261702e64,0x3172250920323373\n" ".quad 0x635f5f5b202c3732,0x5f6d726170616475,0x6964615235325a5f,0x7366664f64644178\n" ".quad 0x6853646e41737465,0x323150656c666675,0x65756c615679654b,0x6a5f305372696150\n" ".quad 0x74666968735f696a,0x2e726873090a3b5d,0x3172250920323375,0x30317225202c3930\n" ".quad 0x3732317225202c32,0x622e646e61090a3b,0x3131722509203233,0x3930317225202c30\n" ".quad 0x090a3b353532202c,0x752e6f6c2e6c756d,0x3131722509203233,0x3031317225202c31\n" ".quad 0x6461090a3b34202c,0x2509203233752e64,0x7225202c38323172,0x31317225202c3934\n" ".quad 0x2e747663090a3b31,0x203233752e343675,0x202c373364722509,0x090a3b3832317225\n" ".quad 0x656469772e6c756d,0x722509203233752e,0x317225202c383364,0x090a3b34202c3832\n" ".quad 0x203436752e646461,0x202c383264722509,0x7225202c31647225,0x646c090a3b383364\n" ".quad 0x2e6465726168732e,0x3172250920323375,0x6472255b202c3932,0x090a3b5d302b3832\n" ".quad 0x203233752e646461,0x202c303331722509,0x31202c3932317225,0x68732e7473090a3b\n" ".quad 0x3233752e64657261,0x38326472255b0920,0x317225202c5d302b,0x6f6c2e090a3b3033\n" ".quad 0x3738340937310963,0x2e6c756d090a3009,0x09203233752e6f6c,0x25202c3133317225\n" ".quad 0x3b38202c39323172,0x36752e747663090a,0x2509203233752e34,0x7225202c39336472\n" ".quad 0x646c090a3b313331,0x752e6d617261702e,0x3464722509203436,0x75635f5f5b202c30\n" ".quad 0x5f5f6d7261706164,0x786964615235325a,0x657366664f646441,0x756853646e417374\n" ".quad 0x4b323150656c6666,0x5065756c61567965,0x6a6a5f3053726961,0x3b5d747344705f69\n" ".quad 0x36752e646461090a,0x3134647225092034,0x2c3933647225202c,0x0a3b303464722520\n" ".quad 0x3233732e766f6d09,0x2c32333172250920,0x0a3b343031722520,0x626f6c672e747309\n" ".quad 0x33752e32762e6c61,0x346472255b092032,0x257b202c5d302b31,0x3172252c32303172\n" ".quad 0x744c240a3b7d3233,0x30313230335f325f,0x6f6c3c2f2f200a3a,0x74726150203e706f\n" ".quad 0x706f6f6c20666f20,0x696c2079646f6220,0x202c31333420656e,0x62616c2064616568\n" ".quad 0x744c242064656c65,0x38313438325f325f,0x3109636f6c2e090a,0x0a30093938340937\n" ".quad 0x6e79732e72616209,0x61090a3b30092063,0x09203233622e646e,0x25202c3333317225\n" ".quad 0x7225202c35303172,0x766f6d090a3b3638,0x722509203233752e,0x0a3b30202c343331\n" ".quad 0x71652e7074657309,0x702509203233732e,0x33317225202c3033,0x3433317225202c33\n" ".quad 0x3033702540090a3b,0x4c24092061726220,0x323730335f325f74,0x6c3c2f2f200a3b32\n" ".quad 0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070,0x2c31333420656e69\n" ".quad 0x616c206461656820,0x4c242064656c6562,0x313438325f325f74,0x09636f6c2e090a38\n" ".quad 0x3009323934093731,0x7261702e646c090a,0x09203233732e6d61,0x5b202c3533317225\n" ".quad 0x6170616475635f5f,0x5235325a5f5f6d72,0x4f64644178696461,0x6e41737465736666\n" ".quad 0x656c666675685364,0x615679654b323150,0x537269615065756c,0x68735f696a6a5f30\n" ".quad 0x73090a3b5d746669,0x09203233752e7268,0x25202c3930317225,0x7225202c32303172\n" ".quad 0x6e61090a3b353331,0x2509203233622e64,0x7225202c30313172,0x353532202c393031\n" ".quad 0x6c2e6c756d090a3b,0x2509203233752e6f,0x7225202c31313172,0x0a3b34202c303131\n" ".quad 0x3233752e64646109,0x2c36333172250920,0x25202c3934722520,0x63090a3b31313172\n" ".quad 0x752e3436752e7476,0x3464722509203233,0x3633317225202c32,0x772e6c756d090a3b\n" ".quad 0x203233752e656469,0x202c333464722509,0x34202c3633317225,0x752e646461090a3b\n" ".quad 0x3264722509203436,0x2c31647225202c38,0x0a3b333464722520,0x726168732e646c09\n" ".quad 0x09203233752e6465,0x5b202c3733317225,0x5d302b3832647225,0x752e646461090a3b\n" ".quad 0x3331722509203233,0x3733317225202c38,0x7473090a3b31202c,0x2e6465726168732e\n" ".quad 0x72255b0920323375,0x202c5d302b383264,0x090a3b3833317225,0x09373109636f6c2e\n" ".quad 0x6d090a3009333934,0x33752e6f6c2e6c75,0x3933317225092032,0x2c3733317225202c\n" ".quad 0x747663090a3b3820,0x3233752e3436752e,0x2c34346472250920,0x0a3b393331722520\n" ".quad 0x617261702e646c09,0x2509203436752e6d,0x5f5b202c35346472,0x726170616475635f\n" ".quad 0x615235325a5f5f6d,0x664f646441786964,0x646e417374657366,0x50656c6666756853\n" ".quad 0x6c615679654b3231,0x3053726961506575,0x7344705f696a6a5f,0x646461090a3b5d74\n" ".quad 0x722509203436752e,0x647225202c363464,0x34647225202c3434,0x2e766f6d090a3b35\n" ".quad 0x3172250920323373,0x30317225202c3034,0x672e7473090a3b34,0x32762e6c61626f6c\n" ".quad 0x255b09203233752e,0x2c5d302b36346472,0x2c32303172257b20,0x0a3b7d3034317225\n" ".quad 0x30335f325f744c24,0x2f2f200a3a323237,0x50203e706f6f6c3c,0x6c20666f20747261\n" ".quad 0x79646f6220706f6f,0x333420656e696c20,0x2064616568202c31,0x2064656c6562616c\n" ".quad 0x38325f325f744c24,0x6f6c2e090a383134,0x3539340937310963,0x2e726162090a3009\n" ".quad 0x3b300920636e7973,0x33622e646e61090a,0x3134317225092032,0x2c3530317225202c\n" ".quad 0x090a3b3738722520,0x203233752e766f6d,0x202c323431722509,0x70746573090a3b30\n" ".quad 0x203233732e71652e,0x25202c3133702509,0x7225202c31343172,0x2540090a3b323431\n" ".quad 0x2061726220313370,0x335f325f744c2409,0x2f200a3b34333231,0x203e706f6f6c3c2f\n" ".quad 0x20666f2074726150,0x646f6220706f6f6c,0x3420656e696c2079,0x64616568202c3133\n" ".quad 0x64656c6562616c20,0x325f325f744c2420,0x6c2e090a38313438,0x393409373109636f\n" ".quad 0x2e646c090a300938,0x33732e6d61726170,0x3334317225092032,0x6475635f5f5b202c\n" ".quad 0x5a5f5f6d72617061,0x4178696461523532,0x74657366664f6464,0x66756853646e4173\n" ".quad 0x654b323150656c66,0x615065756c615679,0x696a6a5f30537269,0x3b5d74666968735f\n" ".quad 0x33752e726873090a,0x3930317225092032,0x2c3230317225202c,0x0a3b333431722520\n" ".quad 0x3233622e646e6109,0x2c30313172250920,0x202c393031722520,0x756d090a3b353532\n" ".quad 0x3233752e6f6c2e6c,0x2c31313172250920,0x202c303131722520,0x2e646461090a3b34\n" ".quad 0x3172250920323375,0x39347225202c3434,0x3b3131317225202c,0x36752e747663090a\n" ".quad 0x2509203233752e34,0x7225202c37346472,0x756d090a3b343431,0x752e656469772e6c\n" ".quad 0x3464722509203233,0x3434317225202c38,0x6461090a3b34202c,0x2509203436752e64\n" ".quad 0x7225202c38326472,0x34647225202c3164,0x732e646c090a3b38,0x33752e6465726168\n" ".quad 0x3534317225092032,0x38326472255b202c,0x6461090a3b5d302b,0x2509203233752e64\n" ".quad 0x7225202c36343172,0x0a3b31202c353431,0x726168732e747309,0x09203233752e6465\n" ".quad 0x302b38326472255b,0x3634317225202c5d,0x09636f6c2e090a3b,0x3009393934093731\n" ".quad 0x6f6c2e6c756d090a,0x722509203233752e,0x317225202c373431,0x090a3b38202c3534\n" ".quad 0x2e3436752e747663,0x6472250920323375,0x34317225202c3934,0x702e646c090a3b37\n" ".quad 0x3436752e6d617261,0x2c30356472250920,0x616475635f5f5b20,0x325a5f5f6d726170\n" ".quad 0x6441786964615235,0x7374657366664f64,0x6666756853646e41,0x79654b323150656c\n" ".quad 0x69615065756c6156,0x5f696a6a5f305372,0x090a3b5d74734470,0x203436752e646461\n" ".quad 0x202c313564722509,0x25202c3934647225,0x6d090a3b30356472,0x09203233732e766f\n" ".quad 0x25202c3834317225,0x73090a3b34303172,0x6c61626f6c672e74,0x203233752e32762e\n" ".quad 0x2b31356472255b09,0x3172257b202c5d30,0x38343172252c3230,0x325f744c240a3b7d\n" ".quad 0x0a3a34333231335f,0x706f6f6c3c2f2f20,0x6f2074726150203e,0x6220706f6f6c2066\n" ".quad 0x656e696c2079646f,0x6568202c31333420,0x6c6562616c206461,0x325f744c24206465\n" ".quad 0x090a38313438325f,0x09373109636f6c2e,0x62090a3009313035,0x20636e79732e7261\n" ".quad 0x646e61090a3b3009,0x722509203233622e,0x317225202c393431,0x38387225202c3530\n" ".quad 0x752e766f6d090a3b,0x3531722509203233,0x73090a3b30202c30,0x732e71652e707465\n" ".quad 0x3233702509203233,0x2c3934317225202c,0x0a3b303531722520,0x6220323370254009\n" ".quad 0x5f744c2409206172,0x3b36343731335f32,0x6f6f6c3c2f2f200a,0x2074726150203e70\n" ".quad 0x20706f6f6c20666f,0x6e696c2079646f62,0x68202c3133342065,0x6562616c20646165\n" ".quad 0x5f744c242064656c,0x0a38313438325f32,0x373109636f6c2e09,0x090a300934303509\n" ".quad 0x6d617261702e646c,0x722509203233732e,0x5f5f5b202c313531,0x6d72617061647563\n" ".quad 0x64615235325a5f5f,0x66664f6464417869,0x53646e4173746573,0x3150656c66667568\n" ".quad 0x756c615679654b32,0x5f30537269615065,0x666968735f696a6a,0x726873090a3b5d74\n" ".quad 0x722509203233752e,0x317225202c393031,0x35317225202c3230,0x2e646e61090a3b31\n" ".quad 0x3172250920323362,0x30317225202c3031,0x0a3b353532202c39,0x2e6f6c2e6c756d09\n" ".quad 0x3172250920323375,0x31317225202c3131,0x61090a3b34202c30,0x09203233752e6464\n" ".quad 0x25202c3235317225,0x317225202c393472,0x747663090a3b3131,0x3233752e3436752e\n" ".quad 0x2c32356472250920,0x0a3b323531722520,0x6469772e6c756d09,0x2509203233752e65\n" ".quad 0x7225202c33356472,0x0a3b34202c323531,0x3436752e64646109,0x2c38326472250920\n" ".quad 0x25202c3164722520,0x6c090a3b33356472,0x6465726168732e64,0x722509203233752e\n" ".quad 0x72255b202c333531,0x0a3b5d302b383264,0x3233752e64646109,0x2c34353172250920\n" ".quad 0x202c333531722520,0x732e7473090a3b31,0x33752e6465726168,0x326472255b092032\n" ".quad 0x7225202c5d302b38,0x6c2e090a3b343531,0x303509373109636f,0x6c756d090a300935\n" ".quad 0x203233752e6f6c2e,0x202c353531722509,0x38202c3335317225,0x752e747663090a3b\n" ".quad 0x09203233752e3436,0x25202c3435647225,0x6c090a3b35353172,0x2e6d617261702e64\n" ".quad 0x6472250920343675,0x635f5f5b202c3535,0x5f6d726170616475,0x6964615235325a5f\n" ".quad 0x7366664f64644178,0x6853646e41737465,0x323150656c666675,0x65756c615679654b\n" ".quad 0x6a5f305372696150,0x5d747344705f696a,0x752e646461090a3b,0x3564722509203436\n" ".quad 0x3435647225202c36,0x3b3535647225202c,0x33732e766f6d090a,0x3635317225092032\n" ".quad 0x3b3430317225202c,0x6f6c672e7473090a,0x752e32762e6c6162,0x6472255b09203233\n" ".quad 0x7b202c5d302b3635,0x72252c3230317225,0x4c240a3b7d363531,0x343731335f325f74\n" ".quad 0x6c3c2f2f200a3a36,0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070\n" ".quad 0x2c31333420656e69,0x616c206461656820,0x4c242064656c6562,0x313438325f325f74\n" ".quad 0x09636f6c2e090a38,0x3009373035093731,0x79732e726162090a,0x090a3b300920636e\n" ".quad 0x203233622e646e61,0x202c373531722509,0x25202c3530317225,0x6f6d090a3b393872\n" ".quad 0x2509203233752e76,0x3b30202c38353172,0x652e70746573090a,0x2509203233732e71\n" ".quad 0x317225202c333370,0x35317225202c3735,0x33702540090a3b38,0x2409206172622033\n" ".quad 0x3232335f325f744c,0x3c2f2f200a3b3835,0x6150203e706f6f6c,0x6f6c20666f207472\n" ".quad 0x2079646f6220706f,0x31333420656e696c,0x6c2064616568202c,0x242064656c656261\n" ".quad 0x3438325f325f744c,0x636f6c2e090a3831,0x0930313509373109,0x61702e646c090a30\n" ".quad 0x203233732e6d6172,0x202c393531722509,0x70616475635f5f5b,0x35325a5f5f6d7261\n" ".quad 0x6464417869646152,0x417374657366664f,0x6c6666756853646e,0x5679654b32315065\n" ".quad 0x7269615065756c61,0x735f696a6a5f3053,0x090a3b5d74666968,0x203233752e726873\n" ".quad 0x202c393031722509,0x25202c3230317225,0x61090a3b39353172,0x09203233622e646e\n" ".quad 0x25202c3031317225,0x3532202c39303172,0x2e6c756d090a3b35,0x09203233752e6f6c\n" ".quad 0x25202c3131317225,0x3b34202c30313172,0x33752e646461090a,0x3036317225092032\n" ".quad 0x202c39347225202c,0x090a3b3131317225,0x2e3436752e747663,0x6472250920323375\n" ".quad 0x36317225202c3735,0x2e6c756d090a3b30,0x3233752e65646977,0x2c38356472250920\n" ".quad 0x202c303631722520,0x2e646461090a3b34,0x6472250920343675,0x31647225202c3832\n" ".quad 0x3b3835647225202c,0x6168732e646c090a,0x203233752e646572,0x202c313631722509\n" ".quad 0x302b38326472255b,0x2e646461090a3b5d,0x3172250920323375,0x36317225202c3236\n" ".quad 0x73090a3b31202c31,0x6465726168732e74,0x255b09203233752e,0x2c5d302b38326472\n" ".quad 0x0a3b323631722520,0x373109636f6c2e09,0x090a300931313509,0x752e6f6c2e6c756d\n" ".quad 0x3631722509203233,0x3136317225202c33,0x7663090a3b38202c,0x33752e3436752e74\n" ".quad 0x3935647225092032,0x3b3336317225202c,0x7261702e646c090a,0x09203436752e6d61\n" ".quad 0x5b202c3036647225,0x6170616475635f5f,0x5235325a5f5f6d72,0x4f64644178696461\n" ".quad 0x6e41737465736666,0x656c666675685364,0x615679654b323150,0x537269615065756c\n" ".quad 0x44705f696a6a5f30,0x6461090a3b5d7473,0x2509203436752e64,0x7225202c31366472\n" ".quad 0x647225202c393564,0x766f6d090a3b3036,0x722509203233732e,0x317225202c343631\n" ".quad 0x2e7473090a3b3430,0x762e6c61626f6c67,0x5b09203233752e32,0x5d302b3136647225\n" ".quad 0x32303172257b202c,0x3b7d34363172252c,0x335f325f744c240a,0x2f200a3a38353232\n" ".quad 0x203e706f6f6c3c2f,0x20666f2074726150,0x646f6220706f6f6c,0x3420656e696c2079\n" ".quad 0x64616568202c3133,0x64656c6562616c20,0x325f325f744c2420,0x6c2e090a38313438\n" ".quad 0x313509373109636f,0x726162090a300933,0x300920636e79732e,0x622e646e61090a3b\n" ".quad 0x3631722509203233,0x3530317225202c35,0x0a3b30397225202c,0x3233752e766f6d09\n" ".quad 0x2c36363172250920,0x746573090a3b3020,0x3233732e71652e70,0x202c343370250920\n" ".quad 0x25202c3536317225,0x40090a3b36363172,0x6172622034337025,0x5f325f744c240920\n" ".quad 0x200a3b3037373233,0x3e706f6f6c3c2f2f,0x666f207472615020,0x6f6220706f6f6c20\n" ".quad 0x20656e696c207964,0x616568202c313334,0x656c6562616c2064,0x5f325f744c242064\n" ".quad 0x2e090a3831343832,0x3509373109636f6c,0x646c090a30093631,0x732e6d617261702e\n" ".quad 0x3631722509203233,0x75635f5f5b202c37,0x5f5f6d7261706164,0x786964615235325a\n" ".quad 0x657366664f646441,0x756853646e417374,0x4b323150656c6666,0x5065756c61567965\n" ".quad 0x6a6a5f3053726961,0x5d74666968735f69,0x752e726873090a3b,0x3031722509203233\n" ".quad 0x3230317225202c39,0x3b3736317225202c,0x33622e646e61090a,0x3031317225092032\n" ".quad 0x2c3930317225202c,0x6d090a3b35353220,0x33752e6f6c2e6c75,0x3131317225092032\n" ".quad 0x2c3031317225202c,0x646461090a3b3420,0x722509203233752e,0x347225202c383631\n" ".quad 0x3131317225202c39,0x752e747663090a3b,0x09203233752e3436,0x25202c3236647225\n" ".quad 0x6d090a3b38363172,0x2e656469772e6c75,0x6472250920323375,0x36317225202c3336\n" ".quad 0x61090a3b34202c38,0x09203436752e6464,0x25202c3832647225,0x647225202c316472\n" ".quad 0x2e646c090a3b3336,0x752e646572616873,0x3631722509203233,0x326472255b202c39\n" ".quad 0x61090a3b5d302b38,0x09203233752e6464,0x25202c3037317225,0x3b31202c39363172\n" ".quad 0x6168732e7473090a,0x203233752e646572,0x2b38326472255b09,0x37317225202c5d30\n" ".quad 0x636f6c2e090a3b30,0x0937313509373109,0x6c2e6c756d090a30,0x2509203233752e6f\n" ".quad 0x7225202c31373172,0x0a3b38202c393631,0x3436752e74766309,0x722509203233752e\n" ".quad 0x317225202c343664,0x2e646c090a3b3137,0x36752e6d61726170,0x3536647225092034\n" ".quad 0x6475635f5f5b202c,0x5a5f5f6d72617061,0x4178696461523532,0x74657366664f6464\n" ".quad 0x66756853646e4173,0x654b323150656c66,0x615065756c615679,0x696a6a5f30537269\n" ".quad 0x0a3b5d747344705f,0x3436752e64646109,0x2c36366472250920,0x202c343664722520\n" ".quad 0x090a3b3536647225,0x203233732e766f6d,0x202c323731722509,0x090a3b3430317225\n" ".quad 0x61626f6c672e7473,0x3233752e32762e6c,0x36366472255b0920,0x72257b202c5d302b\n" ".quad 0x373172252c323031,0x5f744c240a3b7d32,0x3a30373732335f32,0x6f6f6c3c2f2f200a\n" ".quad 0x2074726150203e70,0x20706f6f6c20666f,0x6e696c2079646f62,0x68202c3133342065\n" ".quad 0x6562616c20646165,0x5f744c242064656c,0x0a38313438325f32,0x373109636f6c2e09\n" ".quad 0x090a300939313509,0x636e79732e726162,0x6e61090a3b300920,0x2509203233622e64\n" ".quad 0x7225202c33373172,0x397225202c353031,0x2e766f6d090a3b31,0x3172250920323375\n" ".quad 0x090a3b30202c3437,0x2e71652e70746573,0x3370250920323373,0x3337317225202c35\n" ".quad 0x3b3437317225202c,0x203533702540090a,0x744c240920617262,0x32383233335f325f\n" ".quad 0x6f6c3c2f2f200a3b,0x74726150203e706f,0x706f6f6c20666f20,0x696c2079646f6220\n" ".quad 0x202c31333420656e,0x62616c2064616568,0x744c242064656c65,0x38313438325f325f\n" ".quad 0x3109636f6c2e090a,0x0a30093232350937,0x617261702e646c09,0x2509203233732e6d\n" ".quad 0x5f5b202c35373172,0x726170616475635f,0x615235325a5f5f6d,0x664f646441786964\n" ".quad 0x646e417374657366,0x50656c6666756853,0x6c615679654b3231,0x3053726961506575\n" ".quad 0x6968735f696a6a5f,0x6873090a3b5d7466,0x2509203233752e72,0x7225202c39303172\n" ".quad 0x317225202c323031,0x646e61090a3b3537,0x722509203233622e,0x317225202c303131\n" ".quad 0x3b353532202c3930,0x6f6c2e6c756d090a,0x722509203233752e,0x317225202c313131\n" ".quad 0x090a3b34202c3031,0x203233752e646461,0x202c363731722509,0x7225202c39347225\n" ".quad 0x7663090a3b313131,0x33752e3436752e74,0x3736647225092032,0x3b3637317225202c\n" ".quad 0x69772e6c756d090a,0x09203233752e6564,0x25202c3836647225,0x3b34202c36373172\n" ".quad 0x36752e646461090a,0x3832647225092034,0x202c31647225202c,0x090a3b3836647225\n" ".quad 0x65726168732e646c,0x2509203233752e64,0x255b202c37373172,0x3b5d302b38326472\n" ".quad 0x33752e646461090a,0x3837317225092032,0x2c3737317225202c,0x2e7473090a3b3120\n" ".quad 0x752e646572616873,0x6472255b09203233,0x25202c5d302b3832,0x2e090a3b38373172\n" ".quad 0x3509373109636f6c,0x756d090a30093332,0x3233752e6f6c2e6c,0x2c39373172250920\n" ".quad 0x202c373731722520,0x2e747663090a3b38,0x203233752e343675,0x202c393664722509\n" ".quad 0x090a3b3937317225,0x6d617261702e646c,0x722509203436752e,0x5f5f5b202c303764\n" ".quad 0x6d72617061647563,0x64615235325a5f5f,0x66664f6464417869,0x53646e4173746573\n" ".quad 0x3150656c66667568,0x756c615679654b32,0x5f30537269615065,0x747344705f696a6a\n" ".quad 0x2e646461090a3b5d,0x6472250920343675,0x36647225202c3137,0x3037647225202c39\n" ".quad 0x732e766f6d090a3b,0x3831722509203233,0x3430317225202c30,0x6c672e7473090a3b\n" ".quad 0x2e32762e6c61626f,0x72255b0920323375,0x202c5d302b313764,0x252c32303172257b\n" ".quad 0x240a3b7d30383172,0x3233335f325f744c,0x3c2f2f200a3a3238,0x6150203e706f6f6c\n" ".quad 0x6f6c20666f207472,0x2079646f6220706f,0x31333420656e696c,0x6c2064616568202c\n" ".quad 0x242064656c656261,0x3438325f325f744c,0x636f6c2e090a3831,0x0935323509373109\n" ".quad 0x732e726162090a30,0x0a3b300920636e79,0x3233622e646e6109,0x2c31383172250920\n" ".quad 0x202c353031722520,0x6d090a3b32397225,0x09203233752e766f,0x30202c3238317225\n" ".quad 0x2e70746573090a3b,0x09203233732e7165,0x7225202c36337025,0x317225202c313831\n" ".quad 0x702540090a3b3238,0x0920617262203633,0x33335f325f744c24,0x2f2f200a3b343937\n" ".quad 0x50203e706f6f6c3c,0x6c20666f20747261,0x79646f6220706f6f,0x333420656e696c20\n" ".quad 0x2064616568202c31,0x2064656c6562616c,0x38325f325f744c24,0x6f6c2e090a383134\n" ".quad 0x3832350937310963,0x702e646c090a3009,0x3233732e6d617261,0x2c33383172250920\n" ".quad 0x616475635f5f5b20,0x325a5f5f6d726170,0x6441786964615235,0x7374657366664f64\n" ".quad 0x6666756853646e41,0x79654b323150656c,0x69615065756c6156,0x5f696a6a5f305372\n" ".quad 0x0a3b5d7466696873,0x3233752e72687309,0x2c39303172250920,0x202c323031722520\n" ".quad 0x090a3b3338317225,0x203233622e646e61,0x202c303131722509,0x32202c3930317225\n" ".quad 0x6c756d090a3b3535,0x203233752e6f6c2e,0x202c313131722509,0x34202c3031317225\n" ".quad 0x752e646461090a3b,0x3831722509203233,0x2c39347225202c34,0x0a3b313131722520\n" ".quad 0x3436752e74766309,0x722509203233752e,0x317225202c323764,0x6c756d090a3b3438\n" ".quad 0x33752e656469772e,0x3337647225092032,0x2c3438317225202c,0x646461090a3b3420\n" ".quad 0x722509203436752e,0x647225202c383264,0x3337647225202c31,0x68732e646c090a3b\n" ".quad 0x3233752e64657261,0x2c35383172250920,0x2b38326472255b20,0x646461090a3b5d30\n" ".quad 0x722509203233752e,0x317225202c363831,0x090a3b31202c3538,0x65726168732e7473\n" ".quad 0x5b09203233752e64,0x5d302b3832647225,0x3b3638317225202c,0x3109636f6c2e090a\n" ".quad 0x0a30093932350937,0x2e6f6c2e6c756d09,0x3172250920323375,0x38317225202c3738\n" ".quad 0x63090a3b38202c35,0x752e3436752e7476,0x3764722509203233,0x3738317225202c34\n" ".quad 0x61702e646c090a3b,0x203436752e6d6172,0x202c353764722509,0x70616475635f5f5b\n" ".quad 0x35325a5f5f6d7261,0x6464417869646152,0x417374657366664f,0x6c6666756853646e\n" ".quad 0x5679654b32315065,0x7269615065756c61,0x705f696a6a5f3053,0x61090a3b5d747344\n" ".quad 0x09203436752e6464,0x25202c3637647225,0x7225202c34376472,0x6f6d090a3b353764\n" ".quad 0x2509203233732e76,0x7225202c38383172,0x7473090a3b343031,0x2e6c61626f6c672e\n" ".quad 0x09203233752e3276,0x302b36376472255b,0x303172257b202c5d,0x7d38383172252c32\n" ".quad 0x5f325f744c240a3b,0x200a3a3439373333,0x3e706f6f6c3c2f2f,0x666f207472615020\n" ".quad 0x6f6220706f6f6c20,0x20656e696c207964,0x616568202c313334,0x656c6562616c2064\n" ".quad 0x5f325f744c242064,0x2e090a3831343832,0x3509373109636f6c,0x6162090a30093133\n" ".quad 0x0920636e79732e72,0x2e646e61090a3b30,0x3172250920323362,0x30317225202c3938\n" ".quad 0x3b33397225202c35,0x33752e766f6d090a,0x3039317225092032,0x6573090a3b30202c\n" ".quad 0x33732e71652e7074,0x2c37337025092032,0x202c393831722520,0x090a3b3039317225\n" ".quad 0x7262203733702540,0x325f744c24092061,0x0a3b36303334335f,0x706f6f6c3c2f2f20\n" ".quad 0x6f2074726150203e,0x6220706f6f6c2066,0x656e696c2079646f,0x6568202c31333420\n" ".quad 0x6c6562616c206461,0x325f744c24206465,0x090a38313438325f,0x09373109636f6c2e\n" ".quad 0x6c090a3009343335,0x2e6d617261702e64,0x3172250920323373,0x635f5f5b202c3139\n" ".quad 0x5f6d726170616475,0x6964615235325a5f,0x7366664f64644178,0x6853646e41737465\n" ".quad 0x323150656c666675,0x65756c615679654b,0x6a5f305372696150,0x74666968735f696a\n" ".quad 0x2e726873090a3b5d,0x3172250920323375,0x30317225202c3930,0x3139317225202c32\n" ".quad 0x622e646e61090a3b,0x3131722509203233,0x3930317225202c30,0x090a3b353532202c\n" ".quad 0x752e6f6c2e6c756d,0x3131722509203233,0x3031317225202c31,0x6461090a3b34202c\n" ".quad 0x2509203233752e64,0x7225202c32393172,0x31317225202c3934,0x2e747663090a3b31\n" ".quad 0x203233752e343675,0x202c373764722509,0x090a3b3239317225,0x656469772e6c756d\n" ".quad 0x722509203233752e,0x317225202c383764,0x090a3b34202c3239,0x203436752e646461\n" ".quad 0x202c383264722509,0x7225202c31647225,0x646c090a3b383764,0x2e6465726168732e\n" ".quad 0x3172250920323375,0x6472255b202c3339,0x090a3b5d302b3832,0x203233752e646461\n" ".quad 0x202c343931722509,0x31202c3339317225,0x68732e7473090a3b,0x3233752e64657261\n" ".quad 0x38326472255b0920,0x317225202c5d302b,0x6f6c2e090a3b3439,0x3533350937310963\n" ".quad 0x2e6c756d090a3009,0x09203233752e6f6c,0x25202c3539317225,0x3b38202c33393172\n" ".quad 0x36752e747663090a,0x2509203233752e34,0x7225202c39376472,0x646c090a3b353931\n" ".quad 0x752e6d617261702e,0x3864722509203436,0x75635f5f5b202c30,0x5f5f6d7261706164\n" ".quad 0x786964615235325a,0x657366664f646441,0x756853646e417374,0x4b323150656c6666\n" ".quad 0x5065756c61567965,0x6a6a5f3053726961,0x3b5d747344705f69,0x36752e646461090a\n" ".quad 0x3138647225092034,0x2c3937647225202c,0x0a3b303864722520,0x3233732e766f6d09\n" ".quad 0x2c36393172250920,0x0a3b343031722520,0x626f6c672e747309,0x33752e32762e6c61\n" ".quad 0x386472255b092032,0x257b202c5d302b31,0x3172252c32303172,0x744c240a3b7d3639\n" ".quad 0x36303334335f325f,0x6f6c3c2f2f200a3a,0x74726150203e706f,0x706f6f6c20666f20\n" ".quad 0x696c2079646f6220,0x202c31333420656e,0x62616c2064616568,0x744c242064656c65\n" ".quad 0x38313438325f325f,0x3109636f6c2e090a,0x0a30093733350937,0x6e79732e72616209\n" ".quad 0x61090a3b30092063,0x09203233622e646e,0x25202c3739317225,0x7225202c35303172\n" ".quad 0x766f6d090a3b3439,0x722509203233752e,0x0a3b30202c383931,0x71652e7074657309\n" ".quad 0x702509203233732e,0x39317225202c3833,0x3839317225202c37,0x3833702540090a3b\n" ".quad 0x4c24092061726220,0x313834335f325f74,0x6c3c2f2f200a3b38,0x726150203e706f6f\n" ".quad 0x6f6f6c20666f2074,0x6c2079646f622070,0x2c31333420656e69,0x616c206461656820\n" ".quad 0x4c242064656c6562,0x313438325f325f74,0x09636f6c2e090a38,0x3009303435093731\n" ".quad 0x7261702e646c090a,0x09203233732e6d61,0x5b202c3939317225,0x6170616475635f5f\n" ".quad 0x5235325a5f5f6d72,0x4f64644178696461,0x6e41737465736666,0x656c666675685364\n" ".quad 0x615679654b323150,0x537269615065756c,0x68735f696a6a5f30,0x73090a3b5d746669\n" ".quad 0x09203233752e7268,0x25202c3930317225,0x7225202c32303172,0x6e61090a3b393931\n" ".quad 0x2509203233622e64,0x7225202c30313172,0x353532202c393031,0x6c2e6c756d090a3b\n" ".quad 0x2509203233752e6f,0x7225202c31313172,0x0a3b34202c303131,0x3233752e64646109\n" ".quad 0x2c30303272250920,0x25202c3934722520,0x63090a3b31313172,0x752e3436752e7476\n" ".quad 0x3864722509203233,0x3030327225202c32,0x772e6c756d090a3b,0x203233752e656469\n" ".quad 0x202c333864722509,0x34202c3030327225,0x752e646461090a3b,0x3264722509203436\n" ".quad 0x2c31647225202c38,0x0a3b333864722520,0x726168732e646c09,0x09203233752e6465\n" ".quad 0x5b202c3130327225,0x5d302b3832647225,0x752e646461090a3b,0x3032722509203233\n" ".quad 0x3130327225202c32,0x7473090a3b31202c,0x2e6465726168732e,0x72255b0920323375\n" ".quad 0x202c5d302b383264,0x090a3b3230327225,0x09373109636f6c2e,0x6d090a3009313435\n" ".quad 0x33752e6f6c2e6c75,0x3330327225092032,0x2c3130327225202c,0x747663090a3b3820\n" ".quad 0x3233752e3436752e,0x2c34386472250920,0x0a3b333032722520,0x617261702e646c09\n" ".quad 0x2509203436752e6d,0x5f5b202c35386472,0x726170616475635f,0x615235325a5f5f6d\n" ".quad 0x664f646441786964,0x646e417374657366,0x50656c6666756853,0x6c615679654b3231\n" ".quad 0x3053726961506575,0x7344705f696a6a5f,0x646461090a3b5d74,0x722509203436752e\n" ".quad 0x647225202c363864,0x38647225202c3438,0x2e766f6d090a3b35,0x3272250920323373\n" ".quad 0x30317225202c3430,0x672e7473090a3b34,0x32762e6c61626f6c,0x255b09203233752e\n" ".quad 0x2c5d302b36386472,0x2c32303172257b20,0x0a3b7d3430327225,0x34335f325f744c24\n" ".quad 0x2f2f200a3a383138,0x50203e706f6f6c3c,0x6c20666f20747261,0x79646f6220706f6f\n" ".quad 0x333420656e696c20,0x2064616568202c31,0x2064656c6562616c,0x38325f325f744c24\n" ".quad 0x6f6c2e090a383134,0x3334350937310963,0x2e726162090a3009,0x3b300920636e7973\n" ".quad 0x33622e646e61090a,0x3530327225092032,0x2c3530317225202c,0x090a3b3539722520\n" ".quad 0x203233752e766f6d,0x202c363032722509,0x70746573090a3b30,0x203233732e71652e\n" ".quad 0x25202c3933702509,0x7225202c35303272,0x2540090a3b363032,0x2061726220393370\n" ".quad 0x335f325f744c2409,0x2f200a3b30333335,0x203e706f6f6c3c2f,0x20666f2074726150\n" ".quad 0x646f6220706f6f6c,0x3420656e696c2079,0x64616568202c3133,0x64656c6562616c20\n" ".quad 0x325f325f744c2420,0x6c2e090a38313438,0x343509373109636f,0x2e646c090a300936\n" ".quad 0x33732e6d61726170,0x3730327225092032,0x6475635f5f5b202c,0x5a5f5f6d72617061\n" ".quad 0x4178696461523532,0x74657366664f6464,0x66756853646e4173,0x654b323150656c66\n" ".quad 0x615065756c615679,0x696a6a5f30537269,0x3b5d74666968735f,0x33752e726873090a\n" ".quad 0x3930317225092032,0x2c3230317225202c,0x0a3b373032722520,0x3233622e646e6109\n" ".quad 0x2c30313172250920,0x202c393031722520,0x756d090a3b353532,0x3233752e6f6c2e6c\n" ".quad 0x2c31313172250920,0x202c303131722520,0x2e646461090a3b34,0x3272250920323375\n" ".quad 0x39347225202c3830,0x3b3131317225202c,0x36752e747663090a,0x2509203233752e34\n" ".quad 0x7225202c37386472,0x756d090a3b383032,0x752e656469772e6c,0x3864722509203233\n" ".quad 0x3830327225202c38,0x6461090a3b34202c,0x2509203436752e64,0x7225202c38326472\n" ".quad 0x38647225202c3164,0x732e646c090a3b38,0x33752e6465726168,0x3930327225092032\n" ".quad 0x38326472255b202c,0x6461090a3b5d302b,0x2509203233752e64,0x7225202c30313272\n" ".quad 0x0a3b31202c393032,0x726168732e747309,0x09203233752e6465,0x302b38326472255b\n" ".quad 0x3031327225202c5d,0x09636f6c2e090a3b,0x3009373435093731,0x6f6c2e6c756d090a\n" ".quad 0x722509203233752e,0x327225202c313132,0x090a3b38202c3930,0x2e3436752e747663\n" ".quad 0x6472250920323375,0x31327225202c3938,0x702e646c090a3b31,0x3436752e6d617261\n" ".quad 0x2c30396472250920,0x616475635f5f5b20,0x325a5f5f6d726170,0x6441786964615235\n" ".quad 0x7374657366664f64,0x6666756853646e41,0x79654b323150656c,0x69615065756c6156\n" ".quad 0x5f696a6a5f305372,0x090a3b5d74734470,0x203436752e646461,0x202c313964722509\n" ".quad 0x25202c3938647225,0x6d090a3b30396472,0x09203233732e766f,0x25202c3231327225\n" ".quad 0x73090a3b34303172,0x6c61626f6c672e74,0x203233752e32762e,0x2b31396472255b09\n" ".quad 0x3172257b202c5d30,0x32313272252c3230,0x325f744c240a3b7d,0x0a3a30333335335f\n" ".quad 0x706f6f6c3c2f2f20,0x6f2074726150203e,0x6220706f6f6c2066,0x656e696c2079646f\n" ".quad 0x6568202c31333420,0x6c6562616c206461,0x325f744c24206465,0x090a38313438325f\n" ".quad 0x09373109636f6c2e,0x62090a3009393435,0x20636e79732e7261,0x646e61090a3b3009\n" ".quad 0x722509203233622e,0x317225202c333132,0x36397225202c3530,0x752e766f6d090a3b\n" ".quad 0x3132722509203233,0x73090a3b30202c34,0x732e71652e707465,0x3034702509203233\n" ".quad 0x2c3331327225202c,0x0a3b343132722520,0x6220303470254009,0x5f744c2409206172\n" ".quad 0x3b32343835335f32,0x6f6f6c3c2f2f200a,0x2074726150203e70,0x20706f6f6c20666f\n" ".quad 0x6e696c2079646f62,0x68202c3133342065,0x6562616c20646165,0x5f744c242064656c\n" ".quad 0x0a38313438325f32,0x373109636f6c2e09,0x090a300932353509,0x6d617261702e646c\n" ".quad 0x722509203233732e,0x5f5f5b202c353132,0x6d72617061647563,0x64615235325a5f5f\n" ".quad 0x66664f6464417869,0x53646e4173746573,0x3150656c66667568,0x756c615679654b32\n" ".quad 0x5f30537269615065,0x666968735f696a6a,0x726873090a3b5d74,0x722509203233752e\n" ".quad 0x317225202c393031,0x31327225202c3230,0x2e646e61090a3b35,0x3172250920323362\n" ".quad 0x30317225202c3031,0x0a3b353532202c39,0x2e6f6c2e6c756d09,0x3172250920323375\n" ".quad 0x31317225202c3131,0x61090a3b34202c30,0x09203233752e6464,0x25202c3631327225\n" ".quad 0x317225202c393472,0x747663090a3b3131,0x3233752e3436752e,0x2c32396472250920\n" ".quad 0x0a3b363132722520,0x6469772e6c756d09,0x2509203233752e65,0x7225202c33396472\n" ".quad 0x0a3b34202c363132,0x3436752e64646109,0x2c38326472250920,0x25202c3164722520\n" ".quad 0x6c090a3b33396472,0x6465726168732e64,0x722509203233752e,0x72255b202c373132\n" ".quad 0x0a3b5d302b383264,0x3233752e64646109,0x2c38313272250920,0x202c373132722520\n" ".quad 0x732e7473090a3b31,0x33752e6465726168,0x326472255b092032,0x7225202c5d302b38\n" ".quad 0x6c2e090a3b383132,0x353509373109636f,0x6c756d090a300933,0x203233752e6f6c2e\n" ".quad 0x202c393132722509,0x38202c3731327225,0x752e747663090a3b,0x09203233752e3436\n" ".quad 0x25202c3439647225,0x6c090a3b39313272,0x2e6d617261702e64,0x6472250920343675\n" ".quad 0x635f5f5b202c3539,0x5f6d726170616475,0x6964615235325a5f,0x7366664f64644178\n" ".quad 0x6853646e41737465,0x323150656c666675,0x65756c615679654b,0x6a5f305372696150\n" ".quad 0x5d747344705f696a,0x752e646461090a3b,0x3964722509203436,0x3439647225202c36\n" ".quad 0x3b3539647225202c,0x33732e766f6d090a,0x3032327225092032,0x3b3430317225202c\n" ".quad 0x6f6c672e7473090a,0x752e32762e6c6162,0x6472255b09203233,0x7b202c5d302b3639\n" ".quad 0x72252c3230317225,0x4c240a3b7d303232,0x343835335f325f74,0x6c3c2f2f200a3a32\n" ".quad 0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070,0x2c31333420656e69\n" ".quad 0x616c206461656820,0x4c242064656c6562,0x313438325f325f74,0x09636f6c2e090a38\n" ".quad 0x3009353535093731,0x79732e726162090a,0x090a3b300920636e,0x203233622e646e61\n" ".quad 0x202c313232722509,0x25202c3530317225,0x6f6d090a3b373972,0x2509203233752e76\n" ".quad 0x3b30202c32323272,0x652e70746573090a,0x2509203233732e71,0x327225202c313470\n" ".quad 0x32327225202c3132,0x34702540090a3b32,0x2409206172622031,0x3336335f325f744c\n" ".quad 0x3c2f2f200a3b3435,0x6150203e706f6f6c,0x6f6c20666f207472,0x2079646f6220706f\n" ".quad 0x31333420656e696c,0x6c2064616568202c,0x242064656c656261,0x3438325f325f744c\n" ".quad 0x636f6c2e090a3831,0x0938353509373109,0x61702e646c090a30,0x203233732e6d6172\n" ".quad 0x202c333232722509,0x70616475635f5f5b,0x35325a5f5f6d7261,0x6464417869646152\n" ".quad 0x417374657366664f,0x6c6666756853646e,0x5679654b32315065,0x7269615065756c61\n" ".quad 0x735f696a6a5f3053,0x090a3b5d74666968,0x203233752e726873,0x202c393031722509\n" ".quad 0x25202c3230317225,0x61090a3b33323272,0x09203233622e646e,0x25202c3031317225\n" ".quad 0x3532202c39303172,0x2e6c756d090a3b35,0x09203233752e6f6c,0x25202c3131317225\n" ".quad 0x3b34202c30313172,0x33752e646461090a,0x3432327225092032,0x202c39347225202c\n" ".quad 0x090a3b3131317225,0x2e3436752e747663,0x6472250920323375,0x32327225202c3739\n" ".quad 0x2e6c756d090a3b34,0x3233752e65646977,0x2c38396472250920,0x202c343232722520\n" ".quad 0x2e646461090a3b34,0x6472250920343675,0x31647225202c3832,0x3b3839647225202c\n" ".quad 0x6168732e646c090a,0x203233752e646572,0x202c353232722509,0x302b38326472255b\n" ".quad 0x2e646461090a3b5d,0x3272250920323375,0x32327225202c3632,0x73090a3b31202c35\n" ".quad 0x6465726168732e74,0x255b09203233752e,0x2c5d302b38326472,0x0a3b363232722520\n" ".quad 0x373109636f6c2e09,0x090a300939353509,0x752e6f6c2e6c756d,0x3232722509203233\n" ".quad 0x3532327225202c37,0x7663090a3b38202c,0x33752e3436752e74,0x3939647225092032\n" ".quad 0x3b3732327225202c,0x7261702e646c090a,0x09203436752e6d61,0x202c303031647225\n" ".quad 0x70616475635f5f5b,0x35325a5f5f6d7261,0x6464417869646152,0x417374657366664f\n" ".quad 0x6c6666756853646e,0x5679654b32315065,0x7269615065756c61,0x705f696a6a5f3053\n" ".quad 0x61090a3b5d747344,0x09203436752e6464,0x202c313031647225,0x25202c3939647225\n" ".quad 0x090a3b3030316472,0x203233732e766f6d,0x202c383232722509,0x090a3b3430317225\n" ".quad 0x61626f6c672e7473,0x3233752e32762e6c,0x30316472255b0920,0x257b202c5d302b31\n" ".quad 0x3272252c32303172,0x744c240a3b7d3832,0x34353336335f325f,0x6f6c3c2f2f200a3a\n" ".quad 0x74726150203e706f,0x706f6f6c20666f20,0x696c2079646f6220,0x202c31333420656e\n" ".quad 0x62616c2064616568,0x744c242064656c65,0x38313438325f325f,0x3109636f6c2e090a\n" ".quad 0x0a30093136350937,0x6e79732e72616209,0x61090a3b30092063,0x09203233622e646e\n" ".quad 0x25202c3932327225,0x7225202c35303172,0x766f6d090a3b3839,0x722509203233752e\n" ".quad 0x0a3b30202c303332,0x71652e7074657309,0x702509203233732e,0x32327225202c3234\n" ".quad 0x3033327225202c39,0x3234702540090a3b,0x4c24092061726220,0x363836335f325f74\n" ".quad 0x6c3c2f2f200a3b36,0x726150203e706f6f,0x6f6f6c20666f2074,0x6c2079646f622070\n" ".quad 0x2c31333420656e69,0x616c206461656820,0x4c242064656c6562,0x313438325f325f74\n" ".quad 0x09636f6c2e090a38,0x3009343635093731,0x7261702e646c090a,0x09203233732e6d61\n" ".quad 0x5b202c3133327225,0x6170616475635f5f,0x5235325a5f5f6d72,0x4f64644178696461\n" ".quad 0x6e41737465736666,0x656c666675685364,0x615679654b323150,0x537269615065756c\n" ".quad 0x68735f696a6a5f30,0x73090a3b5d746669,0x09203233752e7268,0x25202c3930317225\n" ".quad 0x7225202c32303172,0x6e61090a3b313332,0x2509203233622e64,0x7225202c30313172\n" ".quad 0x353532202c393031,0x6c2e6c756d090a3b,0x2509203233752e6f,0x7225202c31313172\n" ".quad 0x0a3b34202c303131,0x3233752e64646109,0x2c32333272250920,0x25202c3934722520\n" ".quad 0x63090a3b31313172,0x752e3436752e7476,0x3164722509203233,0x33327225202c3230\n" ".quad 0x2e6c756d090a3b32,0x3233752e65646977,0x3330316472250920,0x2c3233327225202c\n" ".quad 0x646461090a3b3420,0x722509203436752e,0x647225202c383264,0x3031647225202c31\n" ".quad 0x732e646c090a3b33,0x33752e6465726168,0x3333327225092032,0x38326472255b202c\n" ".quad 0x6461090a3b5d302b,0x2509203233752e64,0x7225202c34333272,0x0a3b31202c333332\n" ".quad 0x726168732e747309,0x09203233752e6465,0x302b38326472255b,0x3433327225202c5d\n" ".quad 0x09636f6c2e090a3b,0x3009353635093731,0x6f6c2e6c756d090a,0x722509203233752e\n" ".quad 0x327225202c353332,0x090a3b38202c3333,0x2e3436752e747663,0x6472250920323375\n" ".quad 0x327225202c343031,0x2e646c090a3b3533,0x36752e6d61726170,0x3031647225092034\n" ".quad 0x75635f5f5b202c35,0x5f5f6d7261706164,0x786964615235325a,0x657366664f646441\n" ".quad 0x756853646e417374,0x4b323150656c6666,0x5065756c61567965,0x6a6a5f3053726961\n" ".quad 0x3b5d747344705f69,0x36752e646461090a,0x3031647225092034,0x3031647225202c36\n" ".quad 0x3031647225202c34,0x2e766f6d090a3b35,0x3272250920323373,0x30317225202c3633\n" ".quad 0x672e7473090a3b34,0x32762e6c61626f6c,0x255b09203233752e,0x5d302b3630316472\n" ".quad 0x32303172257b202c,0x3b7d36333272252c,0x335f325f744c240a,0x2f200a3a36363836\n" ".quad 0x203e706f6f6c3c2f,0x20666f2074726150,0x646f6220706f6f6c,0x3420656e696c2079\n" ".quad 0x64616568202c3133,0x64656c6562616c20,0x325f325f744c2420,0x6c2e090a38313438\n" ".quad 0x363509373109636f,0x726162090a300937,0x300920636e79732e,0x732e646461090a3b\n" ".quad 0x3835722509203233,0x202c38357225202c,0x746573090a3b3631,0x3233752e746c2e70\n" ".quad 0x202c333470250920,0x7225202c38357225,0x702540090a3b3935,0x0920617262203334\n" ".quad 0x38325f325f744c24,0x744c240a3b383134,0x36303937325f325f,0x09636f6c2e090a3a\n" ".quad 0x3009333735093731,0x0a3b74697865090a,0x5f646e6557444c24,0x6964615235325a5f\n" ".quad 0x7366664f64644178,0x6853646e41737465,0x323150656c666675,0x65756c615679654b\n" ".quad 0x6a5f305372696150,0x2f207d090a3a696a,0x615235325a5f202f,0x664f646441786964\n" ".quad 0x646e417374657366,0x50656c6666756853,0x6c615679654b3231,0x3053726961506575\n" ".quad 0x00000a0a696a6a5f\n" ".text"); extern "C" { extern const unsigned long long __deviceText_$compute_20$[5793]; } static __cudaFatPtxEntry __ptxEntries [] = {{(char*)"compute_20",(char*)__deviceText_$compute_20$},{0,0}}; static __cudaFatCubinEntry __cubinEntries[] = {{0,0}}; static __cudaFatDebugEntry __debugEntries0 = {0, 0, 0, 0} ; static __cudaFatElfEntry __elfEntries0 = {0, 0, 0, 0} ; static __cudaFatElfEntry __elfEntries1 = {(char*)"sm_21", (char*)__deviceText_$sm_21$, &__elfEntries0, (unsigned int)sizeof(__deviceText_$sm_21$)}; static __cudaFatCudaBinary __fatDeviceText __attribute__ ((section (".nvFatBinSegment")))= {0x1ee55a01,0x00000004,0xa14f518d,(char*)"b7f601d2c38532b1",(char*)"/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu",(char*)" ",__ptxEntries,__cubinEntries,&__debugEntries0,0,0,0,0,0,0xa7b791db,&__elfEntries1}; # 3 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" 2 struct __T20 {KeyValuePair *__par0;uint __par1;uint __par2;uint __par3;int __dummy_field;}; struct __T21 {KeyValuePair *__par0;KeyValuePair *__par1;uint __par2;uint __par3;int __par4;int __dummy_field;}; extern void __device_stub__Z8RadixSumP12KeyValuePairjjj(KeyValuePair *, uint, uint, uint); extern void __device_stub__Z14RadixPrefixSumv(void); extern void __device_stub__Z25RadixAddOffsetsAndShuffleP12KeyValuePairS0_jji(KeyValuePair *, KeyValuePair *, uint, uint, int); static void __sti____cudaRegisterAll_51_tmpxft_00000a86_00000000_4_radixsort_kernel_cpp1_ii_3d289150(void) __attribute__((__constructor__)); void __device_stub__Z8RadixSumP12KeyValuePairjjj(KeyValuePair *__par0, uint __par1, uint __par2, uint __par3){ struct __T20 *__T22 = 0; if (cudaSetupArgument((void*)(char*)&__par0, sizeof(__par0), (size_t)&__T22->__par0) != cudaSuccess) return;if (cudaSetupArgument((void*)(char*)&__par1, sizeof(__par1), (size_t)&__T22->__par1) != cudaSuccess) return;if (cudaSetupArgument((void*)(char*)&__par2, sizeof(__par2), (size_t)&__T22->__par2) != cudaSuccess) return;if (cudaSetupArgument((void*)(char*)&__par3, sizeof(__par3), (size_t)&__T22->__par3) != cudaSuccess) return;{ volatile static char *__f; __f = ((char *)((void ( *)(KeyValuePair *, uint, uint, uint))RadixSum)); (void)cudaLaunch(((char *)((void ( *)(KeyValuePair *, uint, uint, uint))RadixSum))); };} void RadixSum( KeyValuePair *__cuda_0,uint __cuda_1,uint __cuda_2,uint __cuda_3) # 102 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" {__device_stub__Z8RadixSumP12KeyValuePairjjj( __cuda_0,__cuda_1,__cuda_2,__cuda_3); # 244 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" } # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" void __device_stub__Z14RadixPrefixSumv(void) { { volatile static char *__f; __f = ((char *)((void ( *)(void))RadixPrefixSum)); (void)cudaLaunch(((char *)((void ( *)(void))RadixPrefixSum))); }; } void RadixPrefixSum(void) # 252 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" {__device_stub__Z14RadixPrefixSumv(); # 360 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" } # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" void __device_stub__Z25RadixAddOffsetsAndShuffleP12KeyValuePairS0_jji( KeyValuePair *__par0, KeyValuePair *__par1, uint __par2, uint __par3, int __par4) { struct __T21 *__T23 = 0; if (cudaSetupArgument((void*)(char*)&__par0, sizeof(__par0), (size_t)&__T23->__par0) != cudaSuccess) return; if (cudaSetupArgument((void*)(char*)&__par1, sizeof(__par1), (size_t)&__T23->__par1) != cudaSuccess) return; if (cudaSetupArgument((void*)(char*)&__par2, sizeof(__par2), (size_t)&__T23->__par2) != cudaSuccess) return; if (cudaSetupArgument((void*)(char*)&__par3, sizeof(__par3), (size_t)&__T23->__par3) != cudaSuccess) return; if (cudaSetupArgument((void*)(char*)&__par4, sizeof(__par4), (size_t)&__T23->__par4) != cudaSuccess) return; { volatile static char *__f; __f = ((char *)((void ( *)(KeyValuePair *, KeyValuePair *, uint, uint, int))RadixAddOffsetsAndShuffle)); (void)cudaLaunch(((char *)((void ( *)(KeyValuePair *, KeyValuePair *, uint, uint, int))RadixAddOffsetsAndShuffle))); }; } void RadixAddOffsetsAndShuffle( KeyValuePair *__cuda_0,KeyValuePair *__cuda_1,uint __cuda_2,uint __cuda_3,int __cuda_4) # 375 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" {__device_stub__Z25RadixAddOffsetsAndShuffleP12KeyValuePairS0_jji( __cuda_0,__cuda_1,__cuda_2,__cuda_3,__cuda_4); # 573 "/home/normal/checkout/gpuocelot/tests-ptx-2.1/cuda2.2/tests/particles/radixsort_kernel.cu" } # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" static void __sti____cudaRegisterAll_51_tmpxft_00000a86_00000000_4_radixsort_kernel_cpp1_ii_3d289150(void) { __cudaFatCubinHandle = __cudaRegisterFatBinary((void*)&__fatDeviceText); atexit(__cudaUnregisterBinaryUtil); __cudaRegisterFunction(__cudaFatCubinHandle, (const char*)((void ( *)(KeyValuePair *, KeyValuePair *, uint, uint, int))RadixAddOffsetsAndShuffle), (char*)"_Z25RadixAddOffsetsAndShuffleP12KeyValuePairS0_jji", "_Z25RadixAddOffsetsAndShuffleP12KeyValuePairS0_jji", -1, (uint3*)0, (uint3*)0, (dim3*)0, (dim3*)0, (int*)0); __cudaRegisterFunction(__cudaFatCubinHandle, (const char*)((void ( *)(void))RadixPrefixSum), (char*)"_Z14RadixPrefixSumv", "_Z14RadixPrefixSumv", -1, (uint3*)0, (uint3*)0, (dim3*)0, (dim3*)0, (int*)0); __cudaRegisterFunction(__cudaFatCubinHandle, (const char*)((void ( *)(KeyValuePair *, uint, uint, uint))RadixSum), (char*)"_Z8RadixSumP12KeyValuePairjjj", "_Z8RadixSumP12KeyValuePairjjj", -1, (uint3*)0, (uint3*)0, (dim3*)0, (dim3*)0, (int*)0); __cudaRegisterVar(__cudaFatCubinHandle, (char*)&dRadixSum, (char*)"dRadixSum", "dRadixSum", 0, 196608, 0, 0); __cudaRegisterVar(__cudaFatCubinHandle, (char*)&dRadixBlockSum, (char*)"dRadixBlockSum", "dRadixBlockSum", 0, 64, 0, 0); } # 1 "/tmp/tmpxft_00000a86_00000000-1_radixsort_kernel.cudafe1.stub.c" 2
51.561004
1,214
0.765546
florianjacob
f326f527d760c60ebbbee51cfdea9e4d7036ecb7
5,547
cpp
C++
webkit/WebCore/inspector/InjectedScriptHost.cpp
s1rcheese/nintendo-3ds-internetbrowser-sourcecode
3dd05f035e0a5fc9723300623e9b9b359be64e11
[ "Unlicense" ]
15
2016-01-05T12:43:41.000Z
2022-03-15T10:34:47.000Z
webkit/WebCore/inspector/InjectedScriptHost.cpp
s1rcheese/nintendo-3ds-internetbrowser-sourcecode
3dd05f035e0a5fc9723300623e9b9b359be64e11
[ "Unlicense" ]
null
null
null
webkit/WebCore/inspector/InjectedScriptHost.cpp
s1rcheese/nintendo-3ds-internetbrowser-sourcecode
3dd05f035e0a5fc9723300623e9b9b359be64e11
[ "Unlicense" ]
2
2020-11-30T18:36:01.000Z
2021-02-05T23:20:24.000Z
/* * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2008 Matt Lilek <[email protected]> * Copyright (C) 2009 Google Inc. 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. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "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 APPLE OR ITS CONTRIBUTORS 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. */ #include "config.h" #include "InjectedScriptHost.h" #if ENABLE(INSPECTOR) #include "Element.h" #include "Frame.h" #include "FrameLoader.h" #include "HTMLFrameOwnerElement.h" #include "InspectorClient.h" #include "InspectorController.h" #include "InspectorDOMAgent.h" #include "InspectorFrontend.h" #include "InspectorResource.h" #include "Pasteboard.h" #include "ScriptArray.h" #include "ScriptFunctionCall.h" #if ENABLE(JAVASCRIPT_DEBUGGER) #include "JavaScriptCallFrame.h" #include "JavaScriptDebugServer.h" using namespace JSC; #endif #if ENABLE(DATABASE) #include "Database.h" #endif #if ENABLE(DOM_STORAGE) #include "Storage.h" #endif #include "markup.h" #include <wtf/RefPtr.h> #include <wtf/StdLibExtras.h> using namespace std; namespace WebCore { InjectedScriptHost::InjectedScriptHost(InspectorController* inspectorController) : m_inspectorController(inspectorController) { } InjectedScriptHost::~InjectedScriptHost() { } void InjectedScriptHost::copyText(const String& text) { Pasteboard::generalPasteboard()->writePlainText(text); } Node* InjectedScriptHost::nodeForId(long nodeId) { if (InspectorDOMAgent* domAgent = inspectorDOMAgent()) return domAgent->nodeForId(nodeId); return 0; } ScriptValue InjectedScriptHost::wrapObject(const ScriptValue& object, const String& objectGroup) { if (m_inspectorController) return m_inspectorController->wrapObject(object, objectGroup); return ScriptValue(); } ScriptValue InjectedScriptHost::unwrapObject(const String& objectId) { if (m_inspectorController) return m_inspectorController->unwrapObject(objectId); return ScriptValue(); } long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool selectInUI) { InspectorFrontend* frontend = inspectorFrontend(); InspectorDOMAgent* domAgent = inspectorDOMAgent(); if (!domAgent || !frontend) return 0; long id = domAgent->pushNodePathToFrontend(node); if (selectInUI) frontend->updateFocusedNode(id); return id; } void InjectedScriptHost::addNodesToSearchResult(const String& nodeIds) { if (InspectorFrontend* frontend = inspectorFrontend()) frontend->addNodesToSearchResult(nodeIds); } long InjectedScriptHost::pushNodeByPathToFrontend(const String& path) { InspectorDOMAgent* domAgent = inspectorDOMAgent(); if (!domAgent) return 0; Node* node = domAgent->nodeForPath(path); if (!node) return 0; return domAgent->pushNodePathToFrontend(node); } #if ENABLE(JAVASCRIPT_DEBUGGER) JavaScriptCallFrame* InjectedScriptHost::currentCallFrame() const { return JavaScriptDebugServer::shared().currentCallFrame(); } #endif #if ENABLE(DATABASE) Database* InjectedScriptHost::databaseForId(long databaseId) { if (m_inspectorController) return m_inspectorController->databaseForId(databaseId); return 0; } void InjectedScriptHost::selectDatabase(Database* database) { if (m_inspectorController) m_inspectorController->selectDatabase(database); } #endif #if ENABLE(DOM_STORAGE) void InjectedScriptHost::selectDOMStorage(Storage* storage) { if (m_inspectorController) m_inspectorController->selectDOMStorage(storage); } #endif void InjectedScriptHost::reportDidDispatchOnInjectedScript(long callId, const String& result, bool isException) { if (InspectorFrontend* frontend = inspectorFrontend()) frontend->didDispatchOnInjectedScript(callId, result, isException); } InspectorDOMAgent* InjectedScriptHost::inspectorDOMAgent() { if (!m_inspectorController) return 0; return m_inspectorController->domAgent(); } InspectorFrontend* InjectedScriptHost::inspectorFrontend() { if (!m_inspectorController) return 0; return m_inspectorController->m_frontend.get(); } } // namespace WebCore #endif // ENABLE(INSPECTOR)
28.890625
111
0.754822
s1rcheese
f327444821e89594c0f4f112fa4ace3381c66dd4
18,633
cpp
C++
base/src/TextureManager.cpp
rohith10/P6
0ff618a5aae09f678d699a1fe0db31010d077785
[ "BSD-4-Clause-UC" ]
null
null
null
base/src/TextureManager.cpp
rohith10/P6
0ff618a5aae09f678d699a1fe0db31010d077785
[ "BSD-4-Clause-UC" ]
null
null
null
base/src/TextureManager.cpp
rohith10/P6
0ff618a5aae09f678d699a1fe0db31010d077785
[ "BSD-4-Clause-UC" ]
null
null
null
#include "TextureManager.h" #include <algorithm> #include <string> #include <sstream> #include "GLRenderer.h" #include "Utility.h" #include "gl/glew.h" extern "C" { #include "SOIL/SOIL.h" #include "SOIL/image_DXT.h" #include "SOIL/image_helper.h" } std::weak_ptr<TextureManager> TextureManager::singleton; namespace { enum { SOIL_FLAG_SRGB_TEXTURE = 1024 }; bool IsNonPowerOfTwoTextureDimsSupported() { int32_t numExts; glGetIntegerv(GL_NUM_EXTENSIONS, &numExts); for (int32_t i = 0; i < numExts; ++i) { if (strstr(reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)), "GL_ARB_texture_non_power_of_two")) { return true; } } return false; } bool IsS3TCSupported() { int32_t numExts; glGetIntegerv(GL_NUM_EXTENSIONS, &numExts); for (int32_t i = 0; i < numExts; ++i) { if (strstr(reinterpret_cast<const char*>(glGetStringi(GL_EXTENSIONS, i)), "GL_EXT_texture_compression_s3tc")) { return true; } } return false; } } TextureManager::TextureManager() {} TextureManager::~TextureManager() { for (auto& eachElement : m_textureNameToObjectMap) glDeleteTextures(1, &eachElement.first); m_textureNameToObjectMap.clear(); } std::shared_ptr<TextureManager> TextureManager::GetSingleton() { try { return std::shared_ptr<TextureManager>(singleton); } catch (std::bad_weak_ptr&) { try { TextureManager* pTextureManager = new TextureManager; std::shared_ptr<TextureManager> newTextureManager = std::shared_ptr<TextureManager>(pTextureManager); singleton = newTextureManager; return newTextureManager; } catch (std::bad_alloc&) { assert(false); // Out of memory! } } } GLType_uint TextureManager::Acquire(const std::string& textureName) { uint32_t textureNameHash = Utility::HashCString(textureName.c_str()); GLType_uint acquiredTextureObject = 0; if (textureName.length()) { auto mapItr = m_textureNameToObjectMap.find(textureNameHash); if (mapItr != m_textureNameToObjectMap.end()) { std::pair<GLType_uint, uint32_t>& textureObject = mapItr->second; ++textureObject.second; acquiredTextureObject = textureObject.first; } else { std::pair<GLType_uint, uint32_t> newTextureObject; newTextureObject.first = LoadImageAndCreateTexture(textureName, 0, 0, SOIL_FLAG_TEXTURE_REPEATS | SOIL_FLAG_INVERT_Y); newTextureObject.second = 1; m_textureNameToObjectMap[textureNameHash] = newTextureObject; acquiredTextureObject = newTextureObject.first; } } return acquiredTextureObject; } void TextureManager::Release(GLType_uint textureObject) { bool found = false; auto iterator = m_textureNameToObjectMap.begin(); for (; iterator != m_textureNameToObjectMap.end(); ++iterator) { if (iterator->second.first == textureObject) { found = true; break; } } if (found) { --iterator->second.second; if (iterator->second.second == 0) { glDeleteTextures(1, &iterator->second.first); m_textureNameToObjectMap.erase(iterator->first); } } else { assert(false); // Trying to Release a texture that was not Acquired? } } // SOIL code copy-pasted an modified as required. GLType_uint TextureManager::LoadImageAndCreateTexture(const std::string& textureName, int32_t forceChannels, uint32_t reuseTextureName, uint32_t flags) { unsigned char* img; int width, height, channels; /* try to load the image */ img = SOIL_load_image(textureName.c_str(), &width, &height, &channels, forceChannels); /* channels holds the original number of channels, which may have been forced */ if ((forceChannels >= 1) && (forceChannels <= 4)) { channels = forceChannels; } if (NULL == img) { /* image loading failed */ Utility::LogMessage("Texture file: "); Utility::LogMessage(textureName.c_str()); Utility::LogMessageAndEndLine(" doesn't exist."); return 0; } GLType_uint opengl_texture_type = GL_TEXTURE_2D; GLType_uint opengl_texture_target = GL_TEXTURE_2D; /* variables */ unsigned int tex_id; unsigned int internalFormat = 0, pixelFormat = 0; int max_supported_size; /* If the user wants to use the texture rectangle I kill a few flags */ if (flags & SOIL_FLAG_TEXTURE_RECTANGLE) { /* only allow this if the user in _NOT_ trying to do a cubemap! */ if (opengl_texture_type == GL_TEXTURE_2D) { /* clean out the flags that cannot be used with texture rectangles */ flags &= ~( SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MIPMAPS | SOIL_FLAG_TEXTURE_REPEATS ); /* and change my target */ opengl_texture_target = GL_TEXTURE_RECTANGLE; opengl_texture_type = GL_TEXTURE_RECTANGLE; } else { /* not allowed for any other uses (yes, I'm looking at you, cubemaps!) */ flags &= ~SOIL_FLAG_TEXTURE_RECTANGLE; } } /* does the user want me to invert the image? */ if (flags & SOIL_FLAG_INVERT_Y) { int i, j; for (j = 0; j * 2 < height; ++j) { int index1 = j * width * channels; int index2 = (height - 1 - j) * width * channels; for (i = width * channels; i > 0; --i) { unsigned char temp = img[index1]; img[index1] = img[index2]; img[index2] = temp; ++index1; ++index2; } } } /* does the user want me to scale the colors into the NTSC safe RGB range? */ if (flags & SOIL_FLAG_NTSC_SAFE_RGB) { scale_image_RGB_to_NTSC_safe(img, width, height, channels); } /* does the user want me to convert from straight to pre-multiplied alpha? (and do we even _have_ alpha?) */ if (flags & SOIL_FLAG_MULTIPLY_ALPHA) { int i; switch (channels) { case 2: for (i = 0; i < 2 * width*height; i += 2) { img[i] = (img[i] * img[i + 1] + 128) >> 8; } break; case 4: for (i = 0; i < 4 * width*height; i += 4) { img[i + 0] = (img[i + 0] * img[i + 3] + 128) >> 8; img[i + 1] = (img[i + 1] * img[i + 3] + 128) >> 8; img[i + 2] = (img[i + 2] * img[i + 3] + 128) >> 8; } break; default: /* no other number of channels contains alpha data */ break; } } /* if the user can't support NPOT textures, make sure we force the POT option */ if (!IsNonPowerOfTwoTextureDimsSupported() && !(flags & SOIL_FLAG_TEXTURE_RECTANGLE)) { /* add in the POT flag */ flags |= SOIL_FLAG_POWER_OF_TWO; } /* how large of a texture can this OpenGL implementation handle? */ /* texture_check_size_enum will be GL_MAX_TEXTURE_SIZE or SOIL_MAX_CUBE_MAP_TEXTURE_SIZE */ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_supported_size); /* do I need to make it a power of 2? */ if ( (flags & SOIL_FLAG_POWER_OF_TWO) || /* user asked for it */ (flags & SOIL_FLAG_MIPMAPS) || /* need it for the MIP-maps */ (width > max_supported_size) || /* it's too big, (make sure it's */ (height > max_supported_size)) /* 2^n for later down-sampling) */ { int new_width = 1; int new_height = 1; while (new_width < width) { new_width *= 2; } while (new_height < height) { new_height *= 2; } /* still? */ if ((new_width != width) || (new_height != height)) { /* yep, resize */ unsigned char *resampled = (unsigned char*)malloc(channels*new_width*new_height); up_scale_image( img, width, height, channels, resampled, new_width, new_height); /* OJO this is for debug only! */ /* SOIL_save_image( "\\showme.bmp", SOIL_SAVE_TYPE_BMP, new_width, new_height, channels, resampled ); */ /* nuke the old guy, then point it at the new guy */ SOIL_free_image_data(img); img = resampled; width = new_width; height = new_height; } } /* now, if it is too large... */ if ((width > max_supported_size) || (height > max_supported_size)) { /* I've already made it a power of two, so simply use the MIPmapping code to reduce its size to the allowable maximum. */ unsigned char *resampled; int reduce_block_x = 1, reduce_block_y = 1; int new_width, new_height; if (width > max_supported_size) { reduce_block_x = width / max_supported_size; } if (height > max_supported_size) { reduce_block_y = height / max_supported_size; } new_width = width / reduce_block_x; new_height = height / reduce_block_y; resampled = (unsigned char*)malloc(channels*new_width*new_height); /* perform the actual reduction */ mipmap_image(img, width, height, channels, resampled, reduce_block_x, reduce_block_y); /* nuke the old guy, then point it at the new guy */ SOIL_free_image_data(img); img = resampled; width = new_width; height = new_height; } /* does the user want us to use YCoCg color space? */ if (flags & SOIL_FLAG_CoCg_Y) { /* this will only work with RGB and RGBA images */ convert_RGB_to_YCoCg(img, width, height, channels); /* save_image_as_DDS( "CoCg_Y.dds", width, height, channels, img ); */ } /* create the OpenGL texture ID handle (note: allowing a forced texture ID lets me reload a texture) */ tex_id = reuseTextureName; if (tex_id == 0) { glCreateTextures(opengl_texture_type, 1, &tex_id); } /* Note: sometimes glGenTextures fails (usually no OpenGL context) */ if (tex_id) { bool isS3TCSupported = IsS3TCSupported(); /* and what type am I using as the internal texture format? */ switch (channels) { case 1: pixelFormat = GL_RED; internalFormat = (isS3TCSupported && (flags & SOIL_FLAG_COMPRESS_TO_DXT)) ? GL_COMPRESSED_RGB_S3TC_DXT1_EXT : GL_R8; break; case 2: pixelFormat = GL_RG; internalFormat = (isS3TCSupported && (flags & SOIL_FLAG_COMPRESS_TO_DXT)) ? GL_COMPRESSED_RGBA_S3TC_DXT5_EXT : GL_RG8; break; case 3: pixelFormat = GL_RGB; internalFormat = (isS3TCSupported && (flags & SOIL_FLAG_COMPRESS_TO_DXT)) ? GL_COMPRESSED_RGB_S3TC_DXT1_EXT : GL_RGB8; break; case 4: pixelFormat = GL_RGBA; internalFormat = (isS3TCSupported && (flags & SOIL_FLAG_COMPRESS_TO_DXT)) ? GL_COMPRESSED_RGBA_S3TC_DXT5_EXT : GL_RGBA8; break; } if (flags & SOIL_FLAG_SRGB_TEXTURE) { if (internalFormat == GL_RGB8) internalFormat = GL_SRGB8; else if (internalFormat == GL_RGBA8) internalFormat = GL_SRGB8_ALPHA8; else if (internalFormat == GL_COMPRESSED_RGB_S3TC_DXT1_EXT) internalFormat = GL_COMPRESSED_SRGB_S3TC_DXT1_EXT; else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) internalFormat = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; } uint32_t numMipLevels = 0; // Mip levels ABOVE base level of 0. if (flags & SOIL_FLAG_MIPMAPS) { uint32_t mipWidth = width; uint32_t mipHeight = height; while ((mipWidth > 1) || (mipHeight > 1)) { mipWidth = std::max<uint32_t>(mipWidth >> 1, 1); mipHeight = std::max<uint32_t>(mipHeight >> 1, 1); ++numMipLevels; } } // Create the immutable storage for the texture. glTextureStorage2D(tex_id, numMipLevels + 1, internalFormat, width, height); /* does the user want me to, and can I, save as DXT? */ if (flags & SOIL_FLAG_COMPRESS_TO_DXT) { if (isS3TCSupported) { /* I can use DXT, whether I compress it or OpenGL does */ /* user wants me to do the DXT conversion! */ int DDS_size; unsigned char *DDS_data = NULL; if ((channels & 1) == 1) { /* RGB, use DXT1 */ DDS_data = convert_image_to_DXT1(img, width, height, channels, &DDS_size); } else { /* RGBA, use DXT5 */ DDS_data = convert_image_to_DXT5(img, width, height, channels, &DDS_size); } if (DDS_data) { glCompressedTextureSubImage2D(tex_id, 0, 0, 0, width, height, internalFormat, DDS_size, DDS_data); SOIL_free_image_data(DDS_data); /* printf( "Internal DXT compressor\n" ); */ } else { /* my compression failed, try the OpenGL driver's version */ glTextureSubImage2D(tex_id, 0, 0, 0, width, height, pixelFormat, GL_UNSIGNED_BYTE, img); /* printf( "OpenGL DXT compressor\n" ); */ } } } else { /* upload the main image without compression */ glTextureSubImage2D(tex_id, 0, 0, 0, width, height, pixelFormat, GL_UNSIGNED_BYTE, img); /*printf( "OpenGL DXT compressor\n" ); */ } /* are any MIPmaps desired? */ if (numMipLevels > 0) { uint32_t MIPwidth = (width + 1) / 2, MIPheight = (height + 1) / 2; unsigned char *resampled = (unsigned char*)malloc(channels*MIPwidth*MIPheight); for (uint32_t MIPlevel = 1; MIPlevel <= numMipLevels; ++MIPlevel) { /* do this MIPmap level */ mipmap_image( img, width, height, channels, resampled, (1 << MIPlevel), (1 << MIPlevel)); /* upload the MIPmaps */ if (isS3TCSupported) { /* user wants me to do the DXT conversion! */ int DDS_size; unsigned char *DDS_data = NULL; if ((channels & 1) == 1) { /* RGB, use DXT1 */ DDS_data = convert_image_to_DXT1( resampled, MIPwidth, MIPheight, channels, &DDS_size); } else { /* RGBA, use DXT5 */ DDS_data = convert_image_to_DXT5( resampled, MIPwidth, MIPheight, channels, &DDS_size); } if (DDS_data) { glCompressedTextureSubImage2D(tex_id, MIPlevel, 0, 0, MIPwidth, MIPheight, internalFormat, DDS_size, DDS_data); SOIL_free_image_data(DDS_data); } else { /* my compression failed, try the OpenGL driver's version */ glTextureSubImage2D(tex_id, MIPlevel, 0, 0, MIPwidth, MIPheight, pixelFormat, GL_UNSIGNED_BYTE, resampled); } } else { /* user want OpenGL to do all the work! */ glTextureSubImage2D(tex_id, MIPlevel, 0, 0, MIPwidth, MIPheight, pixelFormat, GL_UNSIGNED_BYTE, resampled); } MIPwidth = (width + 1) / 2; MIPheight = (height + 1) / 2; } free(resampled); /* instruct OpenGL to use the MIPmaps */ glTextureParameteri(tex_id, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTextureParameteri(tex_id, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTextureParameteri(tex_id, GL_TEXTURE_MAX_LEVEL, numMipLevels); } else { /* instruct OpenGL _NOT_ to use the MIPmaps */ glTextureParameteri(tex_id, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTextureParameteri(tex_id, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTextureParameteri(tex_id, GL_TEXTURE_MAX_LEVEL, 0); } /* does the user want clamping, or wrapping? */ if (flags & SOIL_FLAG_TEXTURE_REPEATS) { glTextureParameteri(tex_id, GL_TEXTURE_WRAP_S, GL_REPEAT); glTextureParameteri(tex_id, GL_TEXTURE_WRAP_T, GL_REPEAT); if (opengl_texture_type == GL_TEXTURE_CUBE_MAP) { /* SOIL_TEXTURE_WRAP_R is invalid if cubemaps aren't supported */ glTextureParameteri(tex_id, GL_TEXTURE_WRAP_R, GL_REPEAT); } } else { /* unsigned int clamp_mode = SOIL_CLAMP_TO_EDGE; */ unsigned int clamp_mode = GL_CLAMP_TO_EDGE; glTextureParameteri(tex_id, GL_TEXTURE_WRAP_S, clamp_mode); glTextureParameteri(tex_id, GL_TEXTURE_WRAP_T, clamp_mode); if (opengl_texture_type == GL_TEXTURE_CUBE_MAP) { /* SOIL_TEXTURE_WRAP_R is invalid if cubemaps aren't supported */ glTextureParameteri(tex_id, GL_TEXTURE_WRAP_R, clamp_mode); } } } else { // Failed to generate an OpenGL texture name; missing OpenGL context? assert(false); } SOIL_free_image_data(img); return tex_id; }
35.356736
151
0.552085
rohith10
f329b6343a63a6d99e1c333a8a3c93bb0c202be4
1,712
cpp
C++
CodeGeneration/codegen/mex/yolov2_detect/MWDepthConcatenationLayer.cpp
matlab-deep-learning/Object-Detection-Using-YOLO-v2-Deep-Learning
4db074adf074e6e7471e430799355509e72fd033
[ "BSD-2-Clause" ]
38
2020-03-17T21:00:55.000Z
2021-12-06T02:02:25.000Z
CodeGeneration/codegen/mex/yolov2_detect/MWDepthConcatenationLayer.cpp
matlab-deep-learning/Object-Detection-Using-YOLO-v2-Deep-Learning
4db074adf074e6e7471e430799355509e72fd033
[ "BSD-2-Clause" ]
1
2020-05-01T02:21:40.000Z
2020-05-13T18:55:40.000Z
CodeGeneration/codegen/mex/yolov2_detect/MWDepthConcatenationLayer.cpp
matlab-deep-learning/Object-Detection-Using-YOLO-v2-Deep-Learning
4db074adf074e6e7471e430799355509e72fd033
[ "BSD-2-Clause" ]
14
2020-04-16T16:08:41.000Z
2021-12-08T14:46:37.000Z
/* Copyright 2017 The MathWorks, Inc. */ #include "MWDepthConcatenationLayer.hpp" #include "MWDepthConcatenationLayerImpl.hpp" #include <stdarg.h> #include <cassert> MWDepthConcatenationLayer::MWDepthConcatenationLayer() { } MWDepthConcatenationLayer::~MWDepthConcatenationLayer() { } void MWDepthConcatenationLayer::createDepthConcatenationLayer(MWTargetNetworkImpl* ntwk_impl, int numInputs, ...) { va_list args; va_start(args, numInputs); for(int i = 0; i < numInputs; i++) { MWTensor* inputTensor = va_arg(args, MWTensor*); setInputTensor(inputTensor, i); } int outbufIdx = va_arg(args, int); // check that all input tensors match in size in all dim except channel dim unsigned long numChannels = getInputTensor(0)->getChannels(); for(int k = 1; k < numInputs; k++) { assert(getInputTensor(0)->getHeight() == getInputTensor(k)->getHeight()); assert(getInputTensor(0)->getWidth() == getInputTensor(k)->getWidth()); assert(getInputTensor(0)->getBatchSize() == getInputTensor(k)->getBatchSize()); numChannels += (int)getInputTensor(k)->getChannels(); } // allocate output allocateOutputTensor(getInputTensor(0)->getHeight(), getInputTensor(0)->getWidth(), numChannels, getInputTensor(0)->getBatchSize(), NULL); m_impl = new MWDepthConcatenationLayerImpl(this, ntwk_impl, outbufIdx); MWTensor *opTensor = getOutputTensor(); opTensor->setData(m_impl->getData()); }
32.923077
113
0.608645
matlab-deep-learning
f32d7ee7a2372ad8f6eac2ceb65a3334e8c41719
39,610
cpp
C++
external/vulkancts/modules/vulkan/wsi/vktWsiPresentIdWaitTests.cpp
twoerner/VK-GL-CTS
8e89717bf4ed2d67c58231d1847d2c8f574f300c
[ "Apache-2.0" ]
354
2017-01-24T17:12:38.000Z
2022-03-30T07:40:19.000Z
external/vulkancts/modules/vulkan/wsi/vktWsiPresentIdWaitTests.cpp
twoerner/VK-GL-CTS
8e89717bf4ed2d67c58231d1847d2c8f574f300c
[ "Apache-2.0" ]
275
2017-01-24T20:10:36.000Z
2022-03-24T16:24:50.000Z
external/vulkancts/modules/vulkan/wsi/vktWsiPresentIdWaitTests.cpp
twoerner/VK-GL-CTS
8e89717bf4ed2d67c58231d1847d2c8f574f300c
[ "Apache-2.0" ]
190
2017-01-24T18:02:04.000Z
2022-03-27T13:11:23.000Z
/*------------------------------------------------------------------------- * Vulkan Conformance Tests * ------------------------ * * Copyright (c) 2019 The Khronos Group Inc. * Copyright (c) 2019 Valve Corporation. * * 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. * *//*! * \file * \brief Tests for the present id and present wait extensions. *//*--------------------------------------------------------------------*/ #include "vktWsiPresentIdWaitTests.hpp" #include "vktTestCase.hpp" #include "vktCustomInstancesDevices.hpp" #include "vktNativeObjectsUtil.hpp" #include "vkQueryUtil.hpp" #include "vkDeviceUtil.hpp" #include "vkWsiUtil.hpp" #include "vkMemUtil.hpp" #include "vkTypeUtil.hpp" #include "vkRefUtil.hpp" #include "tcuTestContext.hpp" #include "tcuPlatform.hpp" #include "tcuCommandLine.hpp" #include "tcuTestLog.hpp" #include "deDefs.hpp" #include <vector> #include <string> #include <set> #include <sstream> #include <chrono> #include <algorithm> #include <utility> #include <limits> using std::vector; using std::string; using std::set; namespace vkt { namespace wsi { namespace { // Handy time constants in nanoseconds. constexpr deUint64 k10sec = 10000000000ull; constexpr deUint64 k1sec = 1000000000ull; // 100 milliseconds, way above 1/50 seconds for systems with 50Hz ticks. // This should also take into account possible measure deviations due to the machine being loaded. constexpr deUint64 kMargin = 100000000ull; using TimeoutRange = std::pair<deInt64, deInt64>; // Calculate acceptable timeout range based on indicated timeout and taking into account kMargin. TimeoutRange calcTimeoutRange (deUint64 timeout) { constexpr auto kUnsignedMax = std::numeric_limits<deUint64>::max(); constexpr auto kSignedMax = static_cast<deUint64>(std::numeric_limits<deInt64>::max()); // Watch for over- and under-flows. deUint64 timeoutMin = ((timeout < kMargin) ? 0ull : (timeout - kMargin)); deUint64 timeoutMax = ((kUnsignedMax - timeout < kMargin) ? kUnsignedMax : timeout + kMargin); // Make sure casting is safe. timeoutMin = de::min(kSignedMax, timeoutMin); timeoutMax = de::min(kSignedMax, timeoutMax); return TimeoutRange(static_cast<deInt64>(timeoutMin), static_cast<deInt64>(timeoutMax)); } class PresentIdWaitInstance : public TestInstance { public: PresentIdWaitInstance (Context& context, vk::wsi::Type wsiType) : TestInstance(context), m_wsiType(wsiType) {} virtual ~PresentIdWaitInstance (void) {} virtual tcu::TestStatus iterate (void); virtual tcu::TestStatus run (const vk::DeviceInterface& vkd, vk::VkDevice device, vk::VkQueue queue, vk::VkCommandPool commandPool, vk::VkSwapchainKHR swapchain, size_t swapchainSize, const vk::wsi::WsiTriangleRenderer& renderer) = 0; // Subclasses will need to implement a static method like this one indicating which extensions they need. static vector<const char*> requiredDeviceExts (void) { return vector<const char*>(); } // Subclasses will also need to implement this nonstatic method returning the same information as above. virtual vector<const char*> getRequiredDeviceExts (void) = 0; protected: vk::wsi::Type m_wsiType; }; vector<const char*> getRequiredInstanceExtensions (vk::wsi::Type wsiType) { vector<const char*> extensions; extensions.push_back("VK_KHR_surface"); extensions.push_back(getExtensionName(wsiType)); return extensions; } CustomInstance createInstanceWithWsi (Context& context, vk::wsi::Type wsiType, const vk::VkAllocationCallbacks* pAllocator = nullptr) { const auto version = context.getUsedApiVersion(); const auto requiredExtensions = getRequiredInstanceExtensions(wsiType); vector<string> requestedExtensions; for (const auto& extensionName : requiredExtensions) { if (!vk::isCoreInstanceExtension(version, extensionName)) requestedExtensions.push_back(extensionName); } return vkt::createCustomInstanceWithExtensions(context, requestedExtensions, pAllocator); } struct InstanceHelper { const vector<vk::VkExtensionProperties> supportedExtensions; CustomInstance instance; const vk::InstanceDriver& vki; InstanceHelper (Context& context, vk::wsi::Type wsiType, const vk::VkAllocationCallbacks* pAllocator = nullptr) : supportedExtensions (enumerateInstanceExtensionProperties(context.getPlatformInterface(), nullptr)) , instance (createInstanceWithWsi(context, wsiType, pAllocator)) , vki (instance.getDriver()) {} }; vector<const char*> getMandatoryDeviceExtensions () { vector<const char*> mandatoryExtensions; mandatoryExtensions.push_back("VK_KHR_swapchain"); return mandatoryExtensions; } vk::Move<vk::VkDevice> createDeviceWithWsi (const vk::PlatformInterface& vkp, vk::VkInstance instance, const vk::InstanceInterface& vki, vk::VkPhysicalDevice physicalDevice, const vector<const char*>& extraExtensions, const deUint32 queueFamilyIndex, bool validationEnabled, const vk::VkAllocationCallbacks* pAllocator = nullptr) { const float queuePriorities[] = { 1.0f }; const vk::VkDeviceQueueCreateInfo queueInfos[] = { { vk::VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, nullptr, (vk::VkDeviceQueueCreateFlags)0, queueFamilyIndex, DE_LENGTH_OF_ARRAY(queuePriorities), &queuePriorities[0] } }; vk::VkPhysicalDeviceFeatures features; std::vector<const char*> extensions = extraExtensions; const auto mandatoryExtensions = getMandatoryDeviceExtensions(); for (const auto& ext : mandatoryExtensions) extensions.push_back(ext); deMemset(&features, 0, sizeof(features)); const vk::VkDeviceCreateInfo deviceParams = { vk::VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, nullptr, (vk::VkDeviceCreateFlags)0, DE_LENGTH_OF_ARRAY(queueInfos), &queueInfos[0], 0u, // enabledLayerCount nullptr, // ppEnabledLayerNames static_cast<deUint32>(extensions.size()), // enabledExtensionCount extensions.data(), // ppEnabledExtensionNames &features }; return createCustomDevice(validationEnabled, vkp, instance, vki, physicalDevice, &deviceParams, pAllocator); } struct DeviceHelper { const vk::VkPhysicalDevice physicalDevice; const deUint32 queueFamilyIndex; const vk::Unique<vk::VkDevice> device; const vk::DeviceDriver vkd; const vk::VkQueue queue; DeviceHelper (Context& context, const vk::InstanceInterface& vki, vk::VkInstance instance, const vector<vk::VkSurfaceKHR>& surfaces, const vector<const char*>& extraExtensions, const vk::VkAllocationCallbacks* pAllocator = nullptr) : physicalDevice (chooseDevice(vki, instance, context.getTestContext().getCommandLine())) , queueFamilyIndex (vk::wsi::chooseQueueFamilyIndex(vki, physicalDevice, surfaces)) , device (createDeviceWithWsi(context.getPlatformInterface(), instance, vki, physicalDevice, extraExtensions, queueFamilyIndex, context.getTestContext().getCommandLine().isValidationEnabled(), pAllocator)) , vkd (context.getPlatformInterface(), instance, *device) , queue (getDeviceQueue(vkd, *device, queueFamilyIndex, 0)) { } }; vk::VkSwapchainCreateInfoKHR getBasicSwapchainParameters (vk::wsi::Type wsiType, const vk::InstanceInterface& vki, vk::VkPhysicalDevice physicalDevice, vk::VkSurfaceKHR surface, const tcu::UVec2& desiredSize, deUint32 desiredImageCount) { const vk::VkSurfaceCapabilitiesKHR capabilities = vk::wsi::getPhysicalDeviceSurfaceCapabilities(vki, physicalDevice, surface); const vector<vk::VkSurfaceFormatKHR> formats = vk::wsi::getPhysicalDeviceSurfaceFormats(vki, physicalDevice, surface); const vk::wsi::PlatformProperties& platformProperties = vk::wsi::getPlatformProperties(wsiType); const vk::VkSurfaceTransformFlagBitsKHR transform = (capabilities.supportedTransforms & vk::VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) ? vk::VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR : capabilities.currentTransform; const vk::VkSwapchainCreateInfoKHR parameters = { vk::VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, nullptr, (vk::VkSwapchainCreateFlagsKHR)0, surface, de::clamp(desiredImageCount, capabilities.minImageCount, capabilities.maxImageCount > 0 ? capabilities.maxImageCount : capabilities.minImageCount + desiredImageCount), formats[0].format, formats[0].colorSpace, (platformProperties.swapchainExtent == vk::wsi::PlatformProperties::SWAPCHAIN_EXTENT_MUST_MATCH_WINDOW_SIZE ? capabilities.currentExtent : vk::makeExtent2D(desiredSize.x(), desiredSize.y())), 1u, // imageArrayLayers vk::VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, vk::VK_SHARING_MODE_EXCLUSIVE, 0u, nullptr, transform, vk::VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR, vk::VK_PRESENT_MODE_FIFO_KHR, VK_FALSE, // clipped (vk::VkSwapchainKHR)0 // oldSwapchain }; return parameters; } using CommandBufferSp = de::SharedPtr<vk::Unique<vk::VkCommandBuffer>>; using FenceSp = de::SharedPtr<vk::Unique<vk::VkFence>>; using SemaphoreSp = de::SharedPtr<vk::Unique<vk::VkSemaphore>>; vector<FenceSp> createFences (const vk::DeviceInterface& vkd, const vk::VkDevice device, size_t numFences) { vector<FenceSp> fences(numFences); for (size_t ndx = 0; ndx < numFences; ++ndx) fences[ndx] = FenceSp(new vk::Unique<vk::VkFence>(createFence(vkd, device, vk::VK_FENCE_CREATE_SIGNALED_BIT))); return fences; } vector<SemaphoreSp> createSemaphores (const vk::DeviceInterface& vkd, const vk::VkDevice device, size_t numSemaphores) { vector<SemaphoreSp> semaphores(numSemaphores); for (size_t ndx = 0; ndx < numSemaphores; ++ndx) semaphores[ndx] = SemaphoreSp(new vk::Unique<vk::VkSemaphore>(createSemaphore(vkd, device))); return semaphores; } vector<CommandBufferSp> allocateCommandBuffers (const vk::DeviceInterface& vkd, const vk::VkDevice device, const vk::VkCommandPool commandPool, const vk::VkCommandBufferLevel level, const size_t numCommandBuffers) { vector<CommandBufferSp> buffers (numCommandBuffers); for (size_t ndx = 0; ndx < numCommandBuffers; ++ndx) buffers[ndx] = CommandBufferSp(new vk::Unique<vk::VkCommandBuffer>(allocateCommandBuffer(vkd, device, commandPool, level))); return buffers; } class FrameStreamObjects { public: struct FrameObjects { const vk::VkFence& renderCompleteFence; const vk::VkSemaphore& renderCompleteSemaphore; const vk::VkSemaphore& imageAvailableSemaphore; const vk::VkCommandBuffer& commandBuffer; }; FrameStreamObjects (const vk::DeviceInterface& vkd, vk::VkDevice device, vk::VkCommandPool cmdPool, size_t maxQueuedFrames) : renderingCompleteFences (createFences(vkd, device, maxQueuedFrames)) , renderingCompleteSemaphores (createSemaphores(vkd, device, maxQueuedFrames)) , imageAvailableSemaphores (createSemaphores(vkd, device, maxQueuedFrames)) , commandBuffers (allocateCommandBuffers(vkd, device, cmdPool, vk::VK_COMMAND_BUFFER_LEVEL_PRIMARY, maxQueuedFrames)) , m_maxQueuedFrames (maxQueuedFrames) , m_nextFrame (0u) {} size_t frameNumber (void) const { DE_ASSERT(m_nextFrame > 0u); return m_nextFrame - 1u; } FrameObjects newFrame () { const size_t mod = m_nextFrame % m_maxQueuedFrames; FrameObjects ret = { **renderingCompleteFences[mod], **renderingCompleteSemaphores[mod], **imageAvailableSemaphores[mod], **commandBuffers[mod], }; ++m_nextFrame; return ret; } private: const vector<FenceSp> renderingCompleteFences; const vector<SemaphoreSp> renderingCompleteSemaphores; const vector<SemaphoreSp> imageAvailableSemaphores; const vector<CommandBufferSp> commandBuffers; const size_t m_maxQueuedFrames; size_t m_nextFrame; }; tcu::TestStatus PresentIdWaitInstance::iterate (void) { const tcu::UVec2 desiredSize (256, 256); const InstanceHelper instHelper (m_context, m_wsiType); const NativeObjects native (m_context, instHelper.supportedExtensions, m_wsiType, 1u, tcu::just(desiredSize)); const vk::Unique<vk::VkSurfaceKHR> surface (createSurface(instHelper.vki, instHelper.instance, m_wsiType, native.getDisplay(), native.getWindow())); const DeviceHelper devHelper (m_context, instHelper.vki, instHelper.instance, vector<vk::VkSurfaceKHR>(1u, surface.get()), getRequiredDeviceExts()); const vk::DeviceInterface& vkd = devHelper.vkd; const vk::VkDevice device = *devHelper.device; vk::SimpleAllocator allocator (vkd, device, getPhysicalDeviceMemoryProperties(instHelper.vki, devHelper.physicalDevice)); const vk::VkSwapchainCreateInfoKHR swapchainInfo = getBasicSwapchainParameters(m_wsiType, instHelper.vki, devHelper.physicalDevice, *surface, desiredSize, 2); const vk::Unique<vk::VkSwapchainKHR> swapchain (vk::createSwapchainKHR(vkd, device, &swapchainInfo)); const vector<vk::VkImage> swapchainImages = vk::wsi::getSwapchainImages(vkd, device, *swapchain); const vk::Unique<vk::VkCommandPool> commandPool (createCommandPool(vkd, device, vk::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, devHelper.queueFamilyIndex)); const vk::wsi::WsiTriangleRenderer renderer (vkd, device, allocator, m_context.getBinaryCollection(), false, swapchainImages, swapchainImages, swapchainInfo.imageFormat, tcu::UVec2(swapchainInfo.imageExtent.width, swapchainInfo.imageExtent.height)); try { return run(vkd, device, devHelper.queue, commandPool.get(), swapchain.get(), swapchainImages.size(), renderer); } catch (...) { // Make sure device is idle before destroying resources vkd.deviceWaitIdle(device); throw; } return tcu::TestStatus(QP_TEST_RESULT_INTERNAL_ERROR, "Reached unreachable code"); } struct PresentParameters { tcu::Maybe<deUint64> presentId; tcu::Maybe<vk::VkResult> expectedResult; }; struct WaitParameters { deUint64 presentId; deUint64 timeout; // Nanoseconds. bool timeoutExpected; }; // This structure represents a set of present operations to be run followed by a set of wait operations to be run after them. // When running the present operations, the present id can be provided, together with an optional expected result to be checked. // When runing the wait operations, the present id must be provided together with a timeout and an indication of whether the operation is expected to time out or not. struct PresentAndWaitOps { vector<PresentParameters> presentOps; vector<WaitParameters> waitOps; }; // Parent class for VK_KHR_present_id and VK_KHR_present_wait simple tests. class PresentIdWaitSimpleInstance : public PresentIdWaitInstance { public: PresentIdWaitSimpleInstance(Context& context, vk::wsi::Type wsiType, const vector<PresentAndWaitOps>& sequence) : PresentIdWaitInstance(context, wsiType), m_sequence(sequence) {} virtual ~PresentIdWaitSimpleInstance() {} virtual tcu::TestStatus run (const vk::DeviceInterface& vkd, vk::VkDevice device, vk::VkQueue queue, vk::VkCommandPool commandPool, vk::VkSwapchainKHR swapchain, size_t swapchainSize, const vk::wsi::WsiTriangleRenderer& renderer); protected: const vector<PresentAndWaitOps> m_sequence; }; // Waits for the appropriate fences, acquires swapchain image, records frame and submits it to the given queue, signaling the appropriate frame semaphores. // Returns the image index from the swapchain. deUint32 recordAndSubmitFrame (FrameStreamObjects::FrameObjects& frameObjects, const vk::wsi::WsiTriangleRenderer& triangleRenderer, const vk::DeviceInterface& vkd, vk::VkDevice device, vk::VkSwapchainKHR swapchain, size_t swapchainSize, vk::VkQueue queue, size_t frameNumber, tcu::TestLog& testLog) { // Wait and reset the render complete fence to avoid having too many submitted frames. VK_CHECK(vkd.waitForFences(device, 1u, &frameObjects.renderCompleteFence, VK_TRUE, std::numeric_limits<deUint64>::max())); VK_CHECK(vkd.resetFences(device, 1, &frameObjects.renderCompleteFence)); // Acquire swapchain image. deUint32 imageNdx = std::numeric_limits<deUint32>::max(); const vk::VkResult acquireResult = vkd.acquireNextImageKHR(device, swapchain, std::numeric_limits<deUint64>::max(), frameObjects.imageAvailableSemaphore, (vk::VkFence)0, &imageNdx); if (acquireResult == vk::VK_SUBOPTIMAL_KHR) testLog << tcu::TestLog::Message << "Got " << acquireResult << " at frame " << frameNumber << tcu::TestLog::EndMessage; else VK_CHECK(acquireResult); TCU_CHECK(static_cast<size_t>(imageNdx) < swapchainSize); // Submit frame to the queue. const vk::VkPipelineStageFlags waitDstStage = vk::VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; const vk::VkSubmitInfo submitInfo = { vk::VK_STRUCTURE_TYPE_SUBMIT_INFO, nullptr, 1u, &frameObjects.imageAvailableSemaphore, &waitDstStage, 1u, &frameObjects.commandBuffer, 1u, &frameObjects.renderCompleteSemaphore, }; triangleRenderer.recordFrame(frameObjects.commandBuffer, imageNdx, static_cast<deUint32>(frameNumber)); VK_CHECK(vkd.queueSubmit(queue, 1u, &submitInfo, frameObjects.renderCompleteFence)); return imageNdx; } tcu::TestStatus PresentIdWaitSimpleInstance::run (const vk::DeviceInterface& vkd, vk::VkDevice device, vk::VkQueue queue, vk::VkCommandPool commandPool, vk::VkSwapchainKHR swapchain, size_t swapchainSize, const vk::wsi::WsiTriangleRenderer& renderer) { const size_t maxQueuedFrames = swapchainSize*2; FrameStreamObjects frameStreamObjects (vkd, device, commandPool, maxQueuedFrames); for (const auto& step : m_sequence) { for (const auto& presentOp : step.presentOps) { // Get objects for the next frame. FrameStreamObjects::FrameObjects frameObjects = frameStreamObjects.newFrame(); // Record and submit new frame. deUint32 imageNdx = recordAndSubmitFrame(frameObjects, renderer, vkd, device, swapchain, swapchainSize, queue, frameStreamObjects.frameNumber(), m_context.getTestContext().getLog()); // Present rendered frame. const vk::VkPresentIdKHR presentId = { vk::VK_STRUCTURE_TYPE_PRESENT_ID_KHR, // VkStructureType sType; nullptr, // const void* pNext; (presentOp.presentId ? 1u : 0u), // deUint32 swapchainCount; (presentOp.presentId ? &presentOp.presentId.get() : nullptr ), // const deUint64* pPresentIds; }; const vk::VkPresentInfoKHR presentInfo = { vk::VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, (presentOp.presentId ? &presentId : nullptr), 1u, &frameObjects.renderCompleteSemaphore, 1u, &swapchain, &imageNdx, nullptr, }; vk::VkResult result = vkd.queuePresentKHR(queue, &presentInfo); if (presentOp.expectedResult) { const vk::VkResult expected = presentOp.expectedResult.get(); if ((expected == vk::VK_SUCCESS && result != vk::VK_SUCCESS && result != vk::VK_SUBOPTIMAL_KHR) || (expected != vk::VK_SUCCESS && result != expected)) { std::ostringstream msg; msg << "Got " << result << " while expecting " << expected << " after presenting with "; if (presentOp.presentId) msg << "id " << presentOp.presentId.get(); else msg << "no id"; TCU_FAIL(msg.str()); } } } // Wait operations. for (const auto& waitOp : step.waitOps) { auto before = std::chrono::high_resolution_clock::now(); vk::VkResult waitResult = vkd.waitForPresentKHR(device, swapchain, waitOp.presentId, waitOp.timeout); auto after = std::chrono::high_resolution_clock::now(); auto diff = std::chrono::nanoseconds(after - before).count(); if (waitOp.timeoutExpected) { if (waitResult != vk::VK_TIMEOUT) { std::ostringstream msg; msg << "Got " << waitResult << " while expecting a timeout in vkWaitForPresentKHR call"; TCU_FAIL(msg.str()); } const auto timeoutRange = calcTimeoutRange(waitOp.timeout); if (diff < timeoutRange.first || diff > timeoutRange.second) { std::ostringstream msg; msg << "vkWaitForPresentKHR waited for " << diff << " nanoseconds with a timeout of " << waitOp.timeout << " nanoseconds"; TCU_FAIL(msg.str()); } } else if (waitResult != vk::VK_SUCCESS) { std::ostringstream msg; msg << "Got " << waitResult << " while expecting success in vkWaitForPresentKHR call"; TCU_FAIL(msg.str()); } } } // Wait until device is idle. VK_CHECK(vkd.deviceWaitIdle(device)); return tcu::TestStatus::pass("Pass"); } // Parent class for VK_KHR_present_id simple tests. class PresentIdInstance : public PresentIdWaitSimpleInstance { public: PresentIdInstance(Context& context, vk::wsi::Type wsiType, const vector<PresentAndWaitOps>& sequence) : PresentIdWaitSimpleInstance(context, wsiType, sequence) {} virtual ~PresentIdInstance() {} static vector<const char*> requiredDeviceExts (void) { vector<const char*> extensions; extensions.push_back("VK_KHR_present_id"); return extensions; } virtual vector<const char*> getRequiredDeviceExts (void) { return requiredDeviceExts(); } }; // Parent class for VK_KHR_present_wait simple tests. class PresentWaitInstance : public PresentIdWaitSimpleInstance { public: PresentWaitInstance(Context& context, vk::wsi::Type wsiType, const vector<PresentAndWaitOps>& sequence) : PresentIdWaitSimpleInstance(context, wsiType, sequence) {} virtual ~PresentWaitInstance() {} static vector<const char*> requiredDeviceExts (void) { vector<const char*> extensions; extensions.push_back("VK_KHR_present_id"); extensions.push_back("VK_KHR_present_wait"); return extensions; } virtual vector<const char*> getRequiredDeviceExts (void) { return requiredDeviceExts(); } }; class PresentIdZeroInstance : public PresentIdInstance { public: static const vector<PresentAndWaitOps> sequence; PresentIdZeroInstance (Context& context, vk::wsi::Type wsiType) : PresentIdInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentIdZeroInstance::sequence = { { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(0), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector }, }, }; class PresentIdIncreasingInstance : public PresentIdInstance { public: static const vector<PresentAndWaitOps> sequence; PresentIdIncreasingInstance (Context& context, vk::wsi::Type wsiType) : PresentIdInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentIdIncreasingInstance::sequence = { { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(1), tcu::just(vk::VK_SUCCESS) }, { tcu::just(std::numeric_limits<deUint64>::max()), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector }, }, }; class PresentIdInterleavedInstance : public PresentIdInstance { public: static const vector<PresentAndWaitOps> sequence; PresentIdInterleavedInstance (Context& context, vk::wsi::Type wsiType) : PresentIdInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentIdInterleavedInstance::sequence = { { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(0), tcu::just(vk::VK_SUCCESS) }, { tcu::just<deUint64>(1), tcu::just(vk::VK_SUCCESS) }, { tcu::nothing<deUint64>(), tcu::just(vk::VK_SUCCESS) }, { tcu::just(std::numeric_limits<deUint64>::max()), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector }, }, }; class PresentWaitSingleFrameInstance : public PresentWaitInstance { public: static const vector<PresentAndWaitOps> sequence; PresentWaitSingleFrameInstance (Context& context, vk::wsi::Type wsiType) : PresentWaitInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentWaitSingleFrameInstance::sequence = { { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(1), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector { 1ull, k10sec, false }, }, }, }; class PresentWaitPastFrameInstance : public PresentWaitInstance { public: static const vector<PresentAndWaitOps> sequence; PresentWaitPastFrameInstance (Context& context, vk::wsi::Type wsiType) : PresentWaitInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentWaitPastFrameInstance::sequence = { // Start with present id 1. { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(1), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector { 1ull, k10sec, false }, { 1ull, 0ull, false }, }, }, // Then the maximum value. Both waiting for id 1 and the max id should work. { // PresentAndWaitOps { // presentOps vector { tcu::just(std::numeric_limits<deUint64>::max()), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector { 1ull, 0ull, false }, { 1ull, k10sec, false }, { std::numeric_limits<deUint64>::max(), k10sec, false }, { std::numeric_limits<deUint64>::max(), 0ull, false }, }, }, // Submit some frames without id after having used the maximum value. This should also work. { // PresentAndWaitOps { // presentOps vector { tcu::nothing<deUint64>(), tcu::just(vk::VK_SUCCESS) }, { tcu::just<deUint64>(0), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector }, }, }; class PresentWaitNoFramesInstance : public PresentWaitInstance { public: static const vector<PresentAndWaitOps> sequence; PresentWaitNoFramesInstance (Context& context, vk::wsi::Type wsiType) : PresentWaitInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentWaitNoFramesInstance::sequence = { { // PresentAndWaitOps { // presentOps vector }, { // waitOps vector { 1ull, 0ull, true }, { 1ull, k1sec, true }, }, }, }; class PresentWaitNoFrameIdInstance : public PresentWaitInstance { public: static const vector<PresentAndWaitOps> sequence; PresentWaitNoFrameIdInstance (Context& context, vk::wsi::Type wsiType) : PresentWaitInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentWaitNoFrameIdInstance::sequence = { { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(0), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector { 1ull, 0ull, true }, { 1ull, k1sec, true }, }, }, { // PresentAndWaitOps { // presentOps vector { tcu::nothing<deUint64>(), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector { 1ull, 0ull, true }, { 1ull, k1sec, true }, }, }, }; class PresentWaitFutureFrameInstance : public PresentWaitInstance { public: static const vector<PresentAndWaitOps> sequence; PresentWaitFutureFrameInstance (Context& context, vk::wsi::Type wsiType) : PresentWaitInstance(context, wsiType, sequence) {} }; const vector<PresentAndWaitOps> PresentWaitFutureFrameInstance::sequence = { { // PresentAndWaitOps { // presentOps vector { tcu::just<deUint64>(1), tcu::just(vk::VK_SUCCESS) }, }, { // waitOps vector { std::numeric_limits<deUint64>::max(), k1sec, true }, { std::numeric_limits<deUint64>::max(), 0ull, true }, { 2ull, 0ull, true }, { 2ull, k1sec, true }, }, }, }; // Instance with two windows and surfaces to check present ids are not mixed up. class PresentWaitDualInstance : public TestInstance { public: PresentWaitDualInstance (Context& context, vk::wsi::Type wsiType) : TestInstance(context), m_wsiType(wsiType) {} virtual ~PresentWaitDualInstance (void) {} virtual tcu::TestStatus iterate (void); static vector<const char*> requiredDeviceExts (void) { vector<const char*> extensions; extensions.push_back("VK_KHR_present_id"); extensions.push_back("VK_KHR_present_wait"); return extensions; } virtual vector<const char*> getRequiredDeviceExts (void) { return requiredDeviceExts(); } protected: vk::wsi::Type m_wsiType; }; struct IdAndWait { deUint64 presentId; bool wait; }; struct DualIdAndWait { IdAndWait idWait1; IdAndWait idWait2; }; tcu::TestStatus PresentWaitDualInstance::iterate (void) { const tcu::UVec2 desiredSize (256, 256); const InstanceHelper instHelper (m_context, m_wsiType); const NativeObjects native (m_context, instHelper.supportedExtensions, m_wsiType, 2u, tcu::just(desiredSize)); const vk::Unique<vk::VkSurfaceKHR> surface1 (createSurface(instHelper.vki, instHelper.instance, m_wsiType, native.getDisplay(), native.getWindow(0))); const vk::Unique<vk::VkSurfaceKHR> surface2 (createSurface(instHelper.vki, instHelper.instance, m_wsiType, native.getDisplay(), native.getWindow(1))); const DeviceHelper devHelper (m_context, instHelper.vki, instHelper.instance, vector<vk::VkSurfaceKHR>{surface1.get(), surface2.get()}, getRequiredDeviceExts()); const vk::DeviceInterface& vkd = devHelper.vkd; const vk::VkDevice device = *devHelper.device; vk::SimpleAllocator allocator (vkd, device, getPhysicalDeviceMemoryProperties(instHelper.vki, devHelper.physicalDevice)); const vk::VkSwapchainCreateInfoKHR swapchainInfo1 = getBasicSwapchainParameters(m_wsiType, instHelper.vki, devHelper.physicalDevice, surface1.get(), desiredSize, 2); const vk::VkSwapchainCreateInfoKHR swapchainInfo2 = getBasicSwapchainParameters(m_wsiType, instHelper.vki, devHelper.physicalDevice, surface2.get(), desiredSize, 2); const vk::Unique<vk::VkSwapchainKHR> swapchain1 (vk::createSwapchainKHR(vkd, device, &swapchainInfo1)); const vk::Unique<vk::VkSwapchainKHR> swapchain2 (vk::createSwapchainKHR(vkd, device, &swapchainInfo2)); const vector<vk::VkImage> swapchainImages1 = vk::wsi::getSwapchainImages(vkd, device, swapchain1.get()); const vector<vk::VkImage> swapchainImages2 = vk::wsi::getSwapchainImages(vkd, device, swapchain2.get()); const vk::Unique<vk::VkCommandPool> commandPool (createCommandPool(vkd, device, vk::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, devHelper.queueFamilyIndex)); const vk::wsi::WsiTriangleRenderer renderer1 (vkd, device, allocator, m_context.getBinaryCollection(), false, swapchainImages1, swapchainImages1, swapchainInfo1.imageFormat, tcu::UVec2(swapchainInfo1.imageExtent.width, swapchainInfo1.imageExtent.height)); const vk::wsi::WsiTriangleRenderer renderer2 (vkd, device, allocator, m_context.getBinaryCollection(), false, swapchainImages2, swapchainImages2, swapchainInfo2.imageFormat, tcu::UVec2(swapchainInfo2.imageExtent.width, swapchainInfo2.imageExtent.height)); tcu::TestLog& testLog = m_context.getTestContext().getLog(); try { const size_t maxQueuedFrames = swapchainImages1.size()*2; FrameStreamObjects frameStreamObjects1 (vkd, device, commandPool.get(), maxQueuedFrames); FrameStreamObjects frameStreamObjects2 (vkd, device, commandPool.get(), maxQueuedFrames); // Increasing ids for both swapchains, waiting on some to make sure we do not time out unexpectedly. const vector<DualIdAndWait> sequence = { { { 1ull, false }, { 2ull, true }, }, { { 4ull, true }, { 3ull, false }, }, { { 5ull, true }, { 6ull, true }, }, }; for (const auto& step : sequence) { // Get objects for the next frames. FrameStreamObjects::FrameObjects frameObjects1 = frameStreamObjects1.newFrame(); FrameStreamObjects::FrameObjects frameObjects2 = frameStreamObjects2.newFrame(); // Record and submit frame. deUint32 imageNdx1 = recordAndSubmitFrame(frameObjects1, renderer1, vkd, device, swapchain1.get(), swapchainImages1.size(), devHelper.queue, frameStreamObjects1.frameNumber(), testLog); deUint32 imageNdx2 = recordAndSubmitFrame(frameObjects2, renderer2, vkd, device, swapchain2.get(), swapchainImages2.size(), devHelper.queue, frameStreamObjects2.frameNumber(), testLog); // Present both images at the same time with their corresponding ids. const deUint64 presentIdsArr[] = { step.idWait1.presentId, step.idWait2.presentId }; const vk::VkPresentIdKHR presentId = { vk::VK_STRUCTURE_TYPE_PRESENT_ID_KHR, // VkStructureType sType; nullptr, // const void* pNext; static_cast<deUint32>(DE_LENGTH_OF_ARRAY(presentIdsArr)), // deUint32 swapchainCount; presentIdsArr, // const deUint64* pPresentIds; }; const vk::VkSemaphore semaphoreArr[] = { frameObjects1.renderCompleteSemaphore, frameObjects2.renderCompleteSemaphore }; const vk::VkSwapchainKHR swapchainArr[] = { swapchain1.get(), swapchain2.get() }; const deUint32 imgIndexArr[] = { imageNdx1, imageNdx2 }; const vk::VkPresentInfoKHR presentInfo = { vk::VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, &presentId, static_cast<deUint32>(DE_LENGTH_OF_ARRAY(semaphoreArr)), semaphoreArr, static_cast<deUint32>(DE_LENGTH_OF_ARRAY(swapchainArr)), swapchainArr, imgIndexArr, nullptr, }; VK_CHECK(vkd.queuePresentKHR(devHelper.queue, &presentInfo)); const IdAndWait* idWaitArr[] = { &step.idWait1, &step.idWait2 }; for (int i = 0; i < DE_LENGTH_OF_ARRAY(idWaitArr); ++i) { if (idWaitArr[i]->wait) VK_CHECK(vkd.waitForPresentKHR(device, swapchainArr[i], idWaitArr[i]->presentId, k10sec)); } } // Wait until device is idle. VK_CHECK(vkd.deviceWaitIdle(device)); return tcu::TestStatus::pass("Pass"); } catch (...) { // Make sure device is idle before destroying resources vkd.deviceWaitIdle(device); throw; } return tcu::TestStatus(QP_TEST_RESULT_INTERNAL_ERROR, "Reached unreachable code"); } // Templated class for every instance type. template <class T> // T is the test instance class. class PresentIdWaitCase : public TestCase { public: PresentIdWaitCase (vk::wsi::Type wsiType, tcu::TestContext& ctx, const std::string& name, const std::string& description); virtual ~PresentIdWaitCase (void) {} virtual void initPrograms (vk::SourceCollections& programCollection) const; virtual TestInstance* createInstance (Context& context) const; virtual void checkSupport (Context& context) const; protected: vk::wsi::Type m_wsiType; }; template <class T> PresentIdWaitCase<T>::PresentIdWaitCase (vk::wsi::Type wsiType, tcu::TestContext& ctx, const std::string& name, const std::string& description) : TestCase(ctx, name, description), m_wsiType(wsiType) { } template <class T> void PresentIdWaitCase<T>::initPrograms (vk::SourceCollections& programCollection) const { vk::wsi::WsiTriangleRenderer::getPrograms(programCollection); } template <class T> TestInstance* PresentIdWaitCase<T>::createInstance (Context& context) const { return new T(context, m_wsiType); } template <class T> void PresentIdWaitCase<T>::checkSupport (Context& context) const { // Check instance extension support. const auto instanceExtensions = getRequiredInstanceExtensions(m_wsiType); for (const auto& ext : instanceExtensions) { if (!context.isInstanceFunctionalitySupported(ext)) TCU_THROW(NotSupportedError, ext + string(" is not supported")); } // Check device extension support. const auto& vki = context.getInstanceInterface(); const auto physDev = context.getPhysicalDevice(); const auto supportedDeviceExts = vk::enumerateDeviceExtensionProperties(vki, physDev, nullptr); const auto mandatoryDeviceExts = getMandatoryDeviceExtensions(); auto checkedDeviceExts = T::requiredDeviceExts(); for (const auto& ext : mandatoryDeviceExts) checkedDeviceExts.push_back(ext); for (const auto& ext : checkedDeviceExts) { if (!vk::isExtensionSupported(supportedDeviceExts, vk::RequiredExtension(ext))) TCU_THROW(NotSupportedError, ext + string(" is not supported")); } } void createPresentIdTests (tcu::TestCaseGroup* testGroup, vk::wsi::Type wsiType) { testGroup->addChild(new PresentIdWaitCase<PresentIdZeroInstance> (wsiType, testGroup->getTestContext(), "zero", "Use present id zero")); testGroup->addChild(new PresentIdWaitCase<PresentIdIncreasingInstance> (wsiType, testGroup->getTestContext(), "increasing", "Use increasing present ids")); testGroup->addChild(new PresentIdWaitCase<PresentIdInterleavedInstance> (wsiType, testGroup->getTestContext(), "interleaved", "Use increasing present ids interleaved with no ids")); } void createPresentWaitTests (tcu::TestCaseGroup* testGroup, vk::wsi::Type wsiType) { testGroup->addChild(new PresentIdWaitCase<PresentWaitSingleFrameInstance> (wsiType, testGroup->getTestContext(), "single_no_timeout", "Present single frame with no expected timeout")); testGroup->addChild(new PresentIdWaitCase<PresentWaitPastFrameInstance> (wsiType, testGroup->getTestContext(), "past_no_timeout", "Wait for past frame with no expected timeout")); testGroup->addChild(new PresentIdWaitCase<PresentWaitNoFramesInstance> (wsiType, testGroup->getTestContext(), "no_frames", "Expect timeout before submitting any frame")); testGroup->addChild(new PresentIdWaitCase<PresentWaitNoFrameIdInstance> (wsiType, testGroup->getTestContext(), "no_frame_id", "Expect timeout after submitting frames with no id")); testGroup->addChild(new PresentIdWaitCase<PresentWaitFutureFrameInstance> (wsiType, testGroup->getTestContext(), "future_frame", "Expect timeout when waiting for a future frame")); testGroup->addChild(new PresentIdWaitCase<PresentWaitDualInstance> (wsiType, testGroup->getTestContext(), "two_swapchains", "Smoke test using two windows, surfaces and swapchains")); } } // anonymous void createPresentIdWaitTests (tcu::TestCaseGroup* testGroup, vk::wsi::Type wsiType) { de::MovePtr<tcu::TestCaseGroup> idGroup (new tcu::TestCaseGroup(testGroup->getTestContext(), "id", "VK_KHR_present_id tests")); de::MovePtr<tcu::TestCaseGroup> waitGroup (new tcu::TestCaseGroup(testGroup->getTestContext(), "wait", "VK_KHR_present_wait tests")); createPresentIdTests (idGroup.get(), wsiType); createPresentWaitTests (waitGroup.get(), wsiType); testGroup->addChild(idGroup.release()); testGroup->addChild(waitGroup.release()); } } // wsi } // vkt
35.911151
299
0.711638
twoerner
f32f21450e4f81f7e68e7627fde0fdef2010e74d
6,080
hpp
C++
Lib/Chip/CM7/STMicro/STM32H7x3/IWDG.hpp
operativeF/Kvasir
dfbcbdc9993d326ef8cc73d99129e78459c561fd
[ "Apache-2.0" ]
null
null
null
Lib/Chip/CM7/STMicro/STM32H7x3/IWDG.hpp
operativeF/Kvasir
dfbcbdc9993d326ef8cc73d99129e78459c561fd
[ "Apache-2.0" ]
null
null
null
Lib/Chip/CM7/STMicro/STM32H7x3/IWDG.hpp
operativeF/Kvasir
dfbcbdc9993d326ef8cc73d99129e78459c561fd
[ "Apache-2.0" ]
null
null
null
#pragma once #include <Register/Utility.hpp> namespace Kvasir { //IWDG namespace IwdgIwdgKr{ ///<Key register using Addr = Register::Address<0x58004800,0xffff0000,0x00000000,std::uint32_t>; ///Key value (write only, read 0x0000) These bits must be written by software at regular intervals with the key value 0xAAAA, otherwise the watchdog generates a reset when the counter reaches 0. Writing the key value 0x5555 to enable access to the IWDG_PR, IWDG_RLR and IWDG_WINR registers (see Section23.3.6: Register access protection) Writing the key value CCCCh starts the watchdog (except if the hardware watchdog option is selected) constexpr Register::FieldLocation<Addr,Register::maskFromRange(15,0),Register::ReadWriteAccess,unsigned> key{}; } namespace IwdgIwdgPr{ ///<Prescaler register using Addr = Register::Address<0x58004804,0xfffffff8,0x00000000,std::uint32_t>; ///Prescaler divider These bits are write access protected see Section23.3.6: Register access protection. They are written by software to select the prescaler divider feeding the counter clock. PVU bit of IWDG_SR must be reset in order to be able to change the prescaler divider. Note: Reading this register returns the prescaler value from the VDD voltage domain. This value may not be up to date/valid if a write operation to this register is ongoing. For this reason the value read from this register is valid only when the PVU bit in the IWDG_SR register is reset. constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,0),Register::ReadWriteAccess,unsigned> pr{}; } namespace IwdgIwdgRlr{ ///<Reload register using Addr = Register::Address<0x58004808,0xfffff000,0x00000000,std::uint32_t>; ///Watchdog counter reload value These bits are write access protected see Section23.3.6. They are written by software to define the value to be loaded in the watchdog counter each time the value 0xAAAA is written in the IWDG_KR register. The watchdog counter counts down from this value. The timeout period is a function of this value and the clock prescaler. Refer to the datasheet for the timeout information. The RVU bit in the IWDG_SR register must be reset in order to be able to change the reload value. Note: Reading this register returns the reload value from the VDD voltage domain. This value may not be up to date/valid if a write operation to this register is ongoing on this register. For this reason the value read from this register is valid only when the RVU bit in the IWDG_SR register is reset. constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,0),Register::ReadWriteAccess,unsigned> rl{}; } namespace IwdgIwdgSr{ ///<Status register using Addr = Register::Address<0x5800480c,0xfffffff8,0x00000000,std::uint32_t>; ///Watchdog prescaler value update This bit is set by hardware to indicate that an update of the prescaler value is ongoing. It is reset by hardware when the prescaler update operation is completed in the VDD voltage domain (takes up to 5 RC 40 kHz cycles). Prescaler value can be updated only when PVU bit is reset. constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> pvu{}; ///Watchdog counter reload value update This bit is set by hardware to indicate that an update of the reload value is ongoing. It is reset by hardware when the reload value update operation is completed in the VDD voltage domain (takes up to 5 RC 40 kHz cycles). Reload value can be updated only when RVU bit is reset. constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rvu{}; ///Watchdog counter window value update This bit is set by hardware to indicate that an update of the window value is ongoing. It is reset by hardware when the reload value update operation is completed in the VDD voltage domain (takes up to 5 RC 40 kHz cycles). Window value can be updated only when WVU bit is reset. This bit is generated only if generic window = 1 constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> wvu{}; } namespace IwdgIwdgWinr{ ///<Window register using Addr = Register::Address<0x58004810,0xfffff000,0x00000000,std::uint32_t>; ///Watchdog counter window value These bits are write access protected see Section23.3.6. These bits contain the high limit of the window value to be compared to the downcounter. To prevent a reset, the downcounter must be reloaded when its value is lower than the window register value and greater than 0x0 The WVU bit in the IWDG_SR register must be reset in order to be able to change the reload value. Note: Reading this register returns the reload value from the VDD voltage domain. This value may not be valid if a write operation to this register is ongoing. For this reason the value read from this register is valid only when the WVU bit in the IWDG_SR register is reset. constexpr Register::FieldLocation<Addr,Register::maskFromRange(11,0),Register::ReadWriteAccess,unsigned> win{}; } }
173.714286
1,029
0.657072
operativeF
f3316659c5ed86abe7cf0809057ca8e9f234857a
3,364
cpp
C++
MyFirstGame/map/TileSet.cpp
NullBy7e/MyFIrstGame
487596cfc52c5a943585fa874cd9ccd33cd92cc9
[ "MIT" ]
1
2019-04-24T16:12:46.000Z
2019-04-24T16:12:46.000Z
MyFirstGame/map/TileSet.cpp
NullBy7e/MyFIrstGame
487596cfc52c5a943585fa874cd9ccd33cd92cc9
[ "MIT" ]
null
null
null
MyFirstGame/map/TileSet.cpp
NullBy7e/MyFIrstGame
487596cfc52c5a943585fa874cd9ccd33cd92cc9
[ "MIT" ]
null
null
null
#include "TileSet.hpp" #include <SFML/System/Vector2.hpp> #include <iostream> #include <filesystem> #include <fstream> #include <sstream> #include <functional> #include "spdlog/spdlog.h" #include "spdlog/sinks/stdout_color_sinks.h" #include "../Logger.hpp" TileSet::TileSet(const std::string& name, const std::string& path, const sf::Vector2u tilesize) { std::stringstream ss; ss << "Loading tileset " << "\"" << name << "\"" << ":" << "\"" << path << "\""; logger::info << "Loading tileset " << "\"" << name << "\"" << ":" << "\"" << path << "\""; if(!texture_.loadFromFile(path)) { std::cerr << "The tileset failed to load due to missing assets, please reinstall the game." << std::endl; return; } // read the meta file const auto meta_file_path = std::filesystem::path(path).parent_path().generic_string() + "/" + std::filesystem:: path(path).filename().replace_extension("meta").generic_string(); if (!load_meta_file(meta_file_path)) { std::cerr << "The tileset failed to load due to missing assets, please reinstall the game." << std::endl; return; } // slice up the image into multiple sf::Texture const auto cols = texture_.getSize().x / tilesize.x; const auto rows = texture_.getSize().y / tilesize.y; // each col + row combination contains a sprite for (auto col = 0u; col < cols; ++col) { for (auto row = 0u; row < rows; ++row) { // the xy location of the sprite in the image const auto x_pos = col * tilesize.x; const auto y_pos = row * tilesize.y; const auto sprite_index = sprites_.empty() ? 1 : sprites_.size() + 1; sprites_[sprite_index] = sf::Sprite(texture_, { static_cast<int>(x_pos), static_cast<int>(y_pos), static_cast<int>(tilesize.x), static_cast<int>(tilesize.y) });; } } } std::map<int, sf::Sprite>& TileSet::get_sprites() { return sprites_; } sf::Sprite TileSet::get_sprite(const int sprite_index) { return sprites_[sprite_index]; } bool TileSet::load_meta_file(const std::string& meta_file_path) { std::cout << "Loading meta file: " << meta_file_path << std::endl; if (!std::filesystem::exists(meta_file_path)) return false; std::ifstream meta_file(meta_file_path); if (meta_file.fail()) { meta_file.close(); return false; } std::string line; while (std::getline(meta_file, line)) { if (line.empty()) continue; //key and value auto str_split = split(line, ':'); auto key = str_split[0]; auto val = str_split[1]; if (key == "tileset_name") { name_ = val; } if (key == "tileset_desc") { desc_ = val; } if (key == "tileset_stid") { stid_ = std::stoi(val); } if (key == "tileset_size") { auto size_split = split(val, 'x'); size_ = sf::Vector2u(std::stoi(size_split[0]), std::stoi(size_split[1])); } } meta_file.close(); return true; } std::vector<std::string> TileSet::split(std::string& str_to_split, const char delimiter) const { std::stringstream ss(str_to_split); std::string item; std::vector<std::string> result; while (std::getline(ss, item, delimiter)) { item.erase(std::remove_if(item.begin(), item.end(), [](const char c) { return !(std::isspace(c, {}) || std::isalnum(c, {}) || c == '_'); }), item.end()); result.push_back(item); } return result; }
25.104478
164
0.62396
NullBy7e
f3325937ea46cade47c63620d6e195f9736264c2
4,185
cpp
C++
src/param_json_editor.cpp
billyfish/grassroots-client-qt-desktop
daa3b8f2bb70c759ef037270b9f5d36643060a39
[ "Apache-2.0" ]
1
2018-01-08T09:06:23.000Z
2018-01-08T09:06:23.000Z
src/param_json_editor.cpp
TGAC/grassroots-client-qt-desktop
39c559ff00d7386da3d6477c1b83a4705c1ca1dc
[ "Apache-2.0" ]
null
null
null
src/param_json_editor.cpp
TGAC/grassroots-client-qt-desktop
39c559ff00d7386da3d6477c1b83a4705c1ca1dc
[ "Apache-2.0" ]
null
null
null
/* ** Copyright 2014-2016 The Earlham Institute ** ** 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 <QDebug> #include <QDialog> #include "param_json_editor.h" #include "jansson.h" #include "json_util.h" #include "string_utils.h" #include "qt_client_data.h" DroppableJSONBox :: DroppableJSONBox (QTParameterWidget *parent_p) : DroppableTextBox (parent_p) {} bool DroppableJSONBox :: SetFromText (const char * const data_s) { bool success_flag = false; json_error_t error; json_t *data_p = json_loads (data_s, 0, &error); if (data_p) { clear (); insertPlainText (data_s); success_flag = true; json_decref (data_p); } return success_flag; } bool DroppableJSONBox :: SetFromJSON (const json_t * const value_p) { bool success_flag = false; if (json_is_null (value_p)) { clear (); success_flag = true; } else { char *data_s = json_dumps (value_p, 0); clear (); if (data_s) { insertPlainText (data_s); success_flag = true; free (data_s); } } return success_flag; } ParamJSONEditor :: ParamJSONEditor (JSONParameter * const param_p, QTParameterWidget * const parent_p) : BaseParamWidget (& (param_p -> jp_base_param), parent_p) { pje_param_p = param_p; pje_text_box_p = new DroppableJSONBox (parent_p); } bool ParamJSONEditor :: CreateDroppableTextBox (QTParameterWidget *parent_p) { pje_text_box_p = new DroppableJSONBox (parent_p); return true; } ParamJSONEditor :: ~ParamJSONEditor () { } QWidget *ParamJSONEditor :: GetQWidget () { return pje_text_box_p; } void ParamJSONEditor :: SetDefaultValue () { const json_t *value_p = GetJSONParameterDefaultValue (pje_param_p ); if (!IsJSONEmpty (value_p)) { char *value_s = json_dumps (value_p, JSON_INDENT (2) | JSON_PRESERVE_ORDER); if (value_s) { pje_text_box_p -> setPlainText (value_s); free (value_s); } } } bool ParamJSONEditor :: StoreParameterValue (bool refresh_flag) { bool success_flag = false; QString s = pje_text_box_p -> toPlainText (); QByteArray ba = s.toLocal8Bit (); const char *value_s = ba.constData (); if (!IsStringEmpty (value_s)) { json_error_t error; json_t *data_p = json_loads (value_s, 0, &error); if (data_p) { success_flag = SetJSONParameterCurrentValue (pje_param_p, data_p); json_decref (data_p); } else { success_flag = SetJSONParameterCurrentValue (pje_param_p, nullptr); } } else { success_flag = SetJSONParameterCurrentValue (pje_param_p, nullptr); } if (bpw_parent_p -> GetClientData () -> qcd_verbose_flag) { qDebug () << "Setting " << bpw_param_p -> pa_name_s << " to " << value_s << " " << success_flag; } if (!success_flag) { } return success_flag; } bool ParamJSONEditor :: SetValueFromText (const char *value_s) { return pje_text_box_p -> SetFromText (value_s); } bool ParamJSONEditor :: SetValueFromJSON (const json_t * const param_value_p) { bool success_flag = false; // const json_t *param_value_p = json_object_get (value_p, PARAM_CURRENT_VALUE_S); if ((!param_value_p) || (json_is_null (param_value_p))) { PrintLog (STM_LEVEL_INFO, __FILE__, __LINE__, "ParamJSONEditor :: SetValueFromJSON on widget \"%s\" with NULL\n", GetParameterName ()); success_flag = (static_cast <DroppableJSONBox *> (pje_text_box_p)) -> SetFromJSON (json_null ()); } else { PrintJSONToLog (STM_LEVEL_INFO, __FILE__, __LINE__, param_value_p, "ParamJSONEditor :: SetValueFromJSON on widget \"%s\"\n", GetParameterName ()); success_flag = (static_cast <DroppableJSONBox *> (pje_text_box_p)) -> SetFromJSON (param_value_p); } return success_flag; }
21.352041
149
0.702748
billyfish
f3359f4ed8018b23113970a5044bfc0cb87181e9
3,259
cpp
C++
OpenGl/src/shadowMapping/shadowMappingDepth.cpp
luckmoney/Cocos2dx
909a23852b226b28f7d910e7eecc2d451884ad57
[ "Apache-2.0" ]
1
2020-01-25T14:57:32.000Z
2020-01-25T14:57:32.000Z
OpenGl/src/shadowMapping/shadowMappingDepth.cpp
luckmoney/Cocos2dx
909a23852b226b28f7d910e7eecc2d451884ad57
[ "Apache-2.0" ]
null
null
null
OpenGl/src/shadowMapping/shadowMappingDepth.cpp
luckmoney/Cocos2dx
909a23852b226b28f7d910e7eecc2d451884ad57
[ "Apache-2.0" ]
null
null
null
#include "shadowMapping/shadowMappingDepth.h" const unsigned int SHADOW_WIDTH = 1024, SHADOW_HEIGHT = 1024; ShadowMappingDepth::~ShadowMappingDepth() { } void ShadowMappingDepth::Init() { glEnable(GL_DEPTH_TEST); m_depthShader = new Shader("../Cocos2dx/src/shadowMapping/shadow_mapping_depth.vs", "../Cocos2dx/src/shadowMapping/shadow_mapping_depth.fs"); m_depthQuad = new Shader("../Cocos2dx/src/shadowMapping/debug_quad.vs", "../Cocos2dx/src/shadowMapping/debug_quad.fs"); m_woodTexture = loadTexture("../Cocos2dx/res/wood.png"); lightPos = glm::vec3(-2.0f, 4.0f, -1.0f); glGenFramebuffers(1, &m_depthMapFBO); glGenTextures(1, &m_depthMap); glBindTexture(GL_TEXTURE_2D, m_depthMap); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, SHADOW_WIDTH, SHADOW_HEIGHT, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glBindFramebuffer(GL_FRAMEBUFFER, m_depthMapFBO); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, m_depthMap, 0); glDrawBuffer(GL_NONE); glReadBuffer(GL_NONE); glBindFramebuffer(GL_FRAMEBUFFER, 0); m_depthQuad->use(); m_depthQuad->setInt("depthMap", 0); } void ShadowMappingDepth::Render(Camera *camera) { glm::mat4 lightProjection, lightView; glm::mat4 lightSpaceMatrix; float near_plane = -1.0f, far_plane = 7.5f; lightProjection = glm::ortho(-10.0f, 10.0f, -10.0f, 10.0f, near_plane, far_plane); lightView = glm::lookAt(lightPos, glm::vec3(0.0f), glm::vec3(0.0, 1.0, 0.0)); lightSpaceMatrix = lightProjection * lightView; m_depthShader->use(); m_depthShader->setMat4("lightSpaceMatrix", lightSpaceMatrix); glViewport(0, 0, SHADOW_WIDTH, SHADOW_HEIGHT); glBindFramebuffer(GL_FRAMEBUFFER, m_depthMapFBO); glClear(GL_DEPTH_BUFFER_BIT); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_woodTexture); renderScene(m_depthShader); glBindFramebuffer(GL_FRAMEBUFFER, 0); glViewport(0, 0, SCR_WIDTH, SCR_HEIGHT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClearColor(0.1f,0.1f,0.1f,1.0); m_depthQuad->use(); m_depthQuad->setFloat("near_plane", near_plane); m_depthQuad->setFloat("far_plane", far_plane); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_depthMap); renderQuad(); } void ShadowMappingDepth::renderScene(Shader* shader) { glm::mat4 model = glm::mat4(1.0f); shader->setMat4("model", model); renderPlane(); model = glm::mat4(1.0f); model = glm::translate(model, glm::vec3(0.0f,1.5f,0.0)); model = glm::scale(model, glm::vec3(0.5f)); shader->setMat4("model", model); renderCube(); model = glm::mat4(1.0f); model = glm::translate(model, glm::vec3(2.0f, 0.0f, 1.0)); model = glm::scale(model, glm::vec3(0.5f)); shader->setMat4("model", model); renderCube(); model = glm::mat4(1.0f); model = glm::translate(model, glm::vec3(-1.0f, 0.0f, 2.0)); model = glm::rotate(model, glm::radians(60.0f), glm::normalize(glm::vec3(1.0, 0.0, 1.0))); model = glm::scale(model, glm::vec3(0.25)); shader->setMat4("model", model); renderCube(); }
27.618644
120
0.742252
luckmoney
f33779290df54ca16cff666e281aba7f74ad4937
14,328
tcc
C++
source/adios2/toolkit/format/bp/BPSerializer.tcc
gregorweiss/ADIOS2
25f91bb256ff004fccbe128dd9b0c584c3c674b3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
source/adios2/toolkit/format/bp/BPSerializer.tcc
gregorweiss/ADIOS2
25f91bb256ff004fccbe128dd9b0c584c3c674b3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
source/adios2/toolkit/format/bp/BPSerializer.tcc
gregorweiss/ADIOS2
25f91bb256ff004fccbe128dd9b0c584c3c674b3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
/* * Distributed under the OSI-approved Apache License, Version 2.0. See * accompanying file Copyright.txt for details. * * BPSerializer.tcc * * Created on: Sep 16, 2019 * Author: William F Godoy [email protected] */ #ifndef ADIOS2_TOOLKIT_FORMAT_BP_BPSERIALIZER_TCC_ #define ADIOS2_TOOLKIT_FORMAT_BP_BPSERIALIZER_TCC_ #include "BPSerializer.h" namespace adios2 { namespace format { template <class T> inline void BPSerializer::PutAttributeCharacteristicValueInIndex( uint8_t &characteristicsCounter, const core::Attribute<T> &attribute, std::vector<char> &buffer) noexcept { const uint8_t characteristicID = CharacteristicID::characteristic_value; helper::InsertToBuffer(buffer, &characteristicID); if (attribute.m_IsSingleValue) // single value { helper::InsertToBuffer(buffer, &attribute.m_DataSingleValue); } else // array { helper::InsertToBuffer(buffer, attribute.m_DataArray.data(), attribute.m_Elements); } ++characteristicsCounter; } template <class T> void BPSerializer::PutCharacteristicRecord(const uint8_t characteristicID, uint8_t &characteristicsCounter, const T &value, std::vector<char> &buffer) noexcept { const uint8_t id = characteristicID; helper::InsertToBuffer(buffer, &id); helper::InsertToBuffer(buffer, &value); ++characteristicsCounter; } template <class T> void BPSerializer::PutCharacteristicRecord(const uint8_t characteristicID, uint8_t &characteristicsCounter, const T &value, std::vector<char> &buffer, size_t &position) noexcept { const uint8_t id = characteristicID; helper::CopyToBuffer(buffer, position, &id); helper::CopyToBuffer(buffer, position, &value); ++characteristicsCounter; } template <class T> inline void BPSerializer::PutPayloadInBuffer( const core::Variable<T> &variable, const typename core::Variable<T>::BPInfo &blockInfo, const bool sourceRowMajor) noexcept { const size_t blockSize = helper::GetTotalSize(blockInfo.Count); m_Profiler.Start("memcpy"); #ifdef ADIOS2_HAVE_CUDA if (blockInfo.IsGPU) { helper::CopyFromGPUToBuffer(m_Data.m_Buffer, m_Data.m_Position, blockInfo.Data, blockSize); m_Profiler.Stop("memcpy"); m_Data.m_AbsolutePosition += blockSize * sizeof(T); return; } #endif if (!blockInfo.MemoryStart.empty()) { helper::CopyMemoryBlock( reinterpret_cast<T *>(m_Data.m_Buffer.data() + m_Data.m_Position), blockInfo.Start, blockInfo.Count, sourceRowMajor, blockInfo.Data, blockInfo.Start, blockInfo.Count, sourceRowMajor, false, Dims(), Dims(), blockInfo.MemoryStart, blockInfo.MemoryCount); m_Data.m_Position += blockSize * sizeof(T); } else { helper::CopyToBufferThreads(m_Data.m_Buffer, m_Data.m_Position, blockInfo.Data, blockSize, m_Parameters.Threads); } m_Profiler.Stop("memcpy"); m_Data.m_AbsolutePosition += blockSize * sizeof(T); // payload size } // PRIVATE template <class T> void BPSerializer::UpdateIndexOffsetsCharacteristics(size_t &currentPosition, const DataTypes dataType, std::vector<char> &buffer) { const bool isLittleEndian = helper::IsLittleEndian(); helper::ReadValue<uint8_t>(buffer, currentPosition, isLittleEndian); const uint32_t characteristicsLength = helper::ReadValue<uint32_t>(buffer, currentPosition, isLittleEndian); const size_t endPosition = currentPosition + static_cast<size_t>(characteristicsLength); size_t dimensionsSize = 0; // get it from dimensions characteristics while (currentPosition < endPosition) { const uint8_t id = helper::ReadValue<uint8_t>(buffer, currentPosition, isLittleEndian); switch (id) { case (characteristic_time_index): { currentPosition += sizeof(uint32_t); break; } case (characteristic_file_index): { currentPosition += sizeof(uint32_t); break; } case (characteristic_value): { if (dataType == type_string) { // first get the length of the string const size_t length = static_cast<size_t>( helper::ReadValue<uint16_t>(buffer, currentPosition, isLittleEndian)); currentPosition += length; } // using this function only for variables // TODO string array if string arrays are supported in the future else { currentPosition += sizeof(T); } break; } case (characteristic_min): { currentPosition += sizeof(T); break; } case (characteristic_max): { currentPosition += sizeof(T); break; } case (characteristic_minmax): { // first get the number of subblocks const uint16_t M = helper::ReadValue<uint16_t>(buffer, currentPosition); currentPosition += 2 * sizeof(T); // block min/max if (M > 1) { currentPosition += 1 + 8; // method (byte), blockSize (uint64_t) currentPosition += dimensionsSize * sizeof(uint16_t); // N-dim division currentPosition += 2 * M * sizeof(T); // M * min/max } break; } case (characteristic_offset): { const uint64_t currentOffset = helper::ReadValue<uint64_t>( buffer, currentPosition, isLittleEndian); const uint64_t updatedOffset = currentOffset + static_cast<uint64_t>(m_Data.m_AbsolutePosition); currentPosition -= sizeof(uint64_t); helper::CopyToBuffer(buffer, currentPosition, &updatedOffset); break; } case (characteristic_payload_offset): { const uint64_t currentPayloadOffset = helper::ReadValue<uint64_t>( buffer, currentPosition, isLittleEndian); const uint64_t updatedPayloadOffset = currentPayloadOffset + static_cast<uint64_t>(m_Data.m_AbsolutePosition); currentPosition -= sizeof(uint64_t); helper::CopyToBuffer(buffer, currentPosition, &updatedPayloadOffset); break; } case (characteristic_dimensions): { dimensionsSize = static_cast<size_t>(helper::ReadValue<uint8_t>( buffer, currentPosition, isLittleEndian)); currentPosition += 3 * sizeof(uint64_t) * dimensionsSize + 2; // 2 is for length break; } case (characteristic_transform_type): { const size_t typeLength = static_cast<size_t>(helper::ReadValue<uint8_t>( buffer, currentPosition, isLittleEndian)); // skip over operator name (transform type) string currentPosition += typeLength; // skip over pre-data type (1) and dimensionsSize (1) currentPosition += 2; const uint16_t dimensionsLength = helper::ReadValue<uint16_t>( buffer, currentPosition, isLittleEndian); // skip over dimensions currentPosition += dimensionsLength; const size_t metadataLength = static_cast<size_t>(helper::ReadValue<uint16_t>( buffer, currentPosition, isLittleEndian)); // skip over operator metadata currentPosition += metadataLength; break; } default: { throw std::invalid_argument( "ERROR: characteristic ID " + std::to_string(id) + " not supported when updating offsets\n"); } } // end id switch } // end while } template <class T> inline size_t BPSerializer::GetAttributeSizeInData(const core::Attribute<T> &attribute) const noexcept { size_t size = 14 + attribute.m_Name.size() + 10; size += 4 + sizeof(T) * attribute.m_Elements; return size; } template <class T> void BPSerializer::PutAttributeInData(const core::Attribute<T> &attribute, Stats<T> &stats) noexcept { DoPutAttributeInData(attribute, stats); } template <class T> void BPSerializer::PutAttributeInIndex(const core::Attribute<T> &attribute, const Stats<T> &stats) noexcept { SerialElementIndex index(stats.MemberID); auto &buffer = index.Buffer; // index.Valid = true; // when the attribute is put, set this flag to true size_t indexLengthPosition = buffer.size(); buffer.insert(buffer.end(), 4, '\0'); // skip attribute length (4) helper::InsertToBuffer(buffer, &stats.MemberID); buffer.insert(buffer.end(), 2, '\0'); // skip group name PutNameRecord(attribute.m_Name, buffer); buffer.insert(buffer.end(), 2, '\0'); // skip path uint8_t dataType = TypeTraits<T>::type_enum; // dataType if (dataType == type_string && !attribute.m_IsSingleValue) { dataType = type_string_array; } helper::InsertToBuffer(buffer, &dataType); // Characteristics Sets Count in Metadata index.Count = 1; helper::InsertToBuffer(buffer, &index.Count); // START OF CHARACTERISTICS const size_t characteristicsCountPosition = buffer.size(); // skip characteristics count(1) + length (4) buffer.insert(buffer.end(), 5, '\0'); uint8_t characteristicsCounter = 0; // DIMENSIONS PutCharacteristicRecord(characteristic_time_index, characteristicsCounter, stats.Step, buffer); PutCharacteristicRecord(characteristic_file_index, characteristicsCounter, stats.FileIndex, buffer); uint8_t characteristicID = characteristic_dimensions; helper::InsertToBuffer(buffer, &characteristicID); constexpr uint8_t dimensions = 1; helper::InsertToBuffer(buffer, &dimensions); // count constexpr uint16_t dimensionsLength = 24; helper::InsertToBuffer(buffer, &dimensionsLength); // length PutDimensionsRecord({attribute.m_Elements}, {}, {}, buffer); ++characteristicsCounter; // VALUE PutAttributeCharacteristicValueInIndex(characteristicsCounter, attribute, buffer); PutCharacteristicRecord(characteristic_offset, characteristicsCounter, stats.Offset, buffer); PutCharacteristicRecord(characteristic_payload_offset, characteristicsCounter, stats.PayloadOffset, buffer); // END OF CHARACTERISTICS // Back to characteristics count and length size_t backPosition = characteristicsCountPosition; helper::CopyToBuffer(buffer, backPosition, &characteristicsCounter); // count (1) // remove its own length (4) + characteristic counter (1) const uint32_t characteristicsLength = static_cast<uint32_t>( buffer.size() - characteristicsCountPosition - 4 - 1); helper::CopyToBuffer(buffer, backPosition, &characteristicsLength); // length // Remember this attribute and its serialized piece // should not affect BP3 as it's recalculated const uint32_t indexLength = static_cast<uint32_t>(buffer.size() - indexLengthPosition - 4); helper::CopyToBuffer(buffer, indexLengthPosition, &indexLength); m_MetadataSet.AttributesIndices.emplace(attribute.m_Name, index); m_SerializedAttributes.emplace(attribute.m_Name); } // operations related functions template <class T> void BPSerializer::PutCharacteristicOperation( const core::Variable<T> &variable, const typename core::Variable<T>::BPInfo &blockInfo, std::vector<char> &buffer) noexcept { auto &operation = blockInfo.Operations[0]; const std::string type = operation.Op->m_Type; const uint8_t typeLength = static_cast<uint8_t>(type.size()); helper::InsertToBuffer(buffer, &typeLength); helper::InsertToBuffer(buffer, type.c_str(), type.size()); // pre-transform type const uint8_t dataType = TypeTraits<T>::type_enum; helper::InsertToBuffer(buffer, &dataType); // pre-transform dimensions const uint8_t dimensions = static_cast<uint8_t>(blockInfo.Count.size()); helper::InsertToBuffer(buffer, &dimensions); // count const uint16_t dimensionsLength = static_cast<uint16_t>(24 * dimensions); helper::InsertToBuffer(buffer, &dimensionsLength); // length PutDimensionsRecord(blockInfo.Count, blockInfo.Shape, blockInfo.Start, buffer); // here put the metadata info depending on operation BPOperation bpOperation; bpOperation.SetMetadata(variable, blockInfo, operation, buffer); } template <class T> void BPSerializer::PutOperationPayloadInBuffer( const core::Variable<T> &variable, const typename core::Variable<T>::BPInfo &blockInfo) { BPOperation bpOperation; bpOperation.SetData(variable, blockInfo, blockInfo.Operations[0], m_Data); // update metadata bool isFound = false; SerialElementIndex &variableIndex = GetSerialElementIndex( variable.m_Name, m_MetadataSet.VarsIndices, isFound); bpOperation.UpdateMetadata(variable, blockInfo, blockInfo.Operations[0], variableIndex.Buffer); } } // end namespace format } // end namespace adios2 #endif /* ADIOS2_TOOLKIT_FORMAT_BP_BPSERIALIZER_TCC_ */
34.776699
80
0.619277
gregorweiss
f33baed1673db87d7f1c6beb271a91f4a07f49e0
139
cpp
C++
assets/code_box/boj_sum.cpp
happyOBO/happyOBO.github.io
96e60a67b9b84c26f01312f8ca5ade35803c521f
[ "MIT" ]
2
2020-10-24T03:25:30.000Z
2021-08-01T05:18:18.000Z
assets/code_box/boj_sum.cpp
happyOBO/happyOBO.github.io
96e60a67b9b84c26f01312f8ca5ade35803c521f
[ "MIT" ]
2
2020-12-05T14:31:19.000Z
2020-12-06T05:09:43.000Z
assets/code_box/boj_sum.cpp
happyOBO/happyOBO.github.io
96e60a67b9b84c26f01312f8ca5ade35803c521f
[ "MIT" ]
4
2020-08-26T10:02:11.000Z
2020-10-22T05:55:18.000Z
#include <iostream> #include <algorithm> using namespace std; long long sum(void) { long long result = 0LL; return result; }
12.636364
27
0.661871
happyOBO
f33f00eb3798df2cf9624cb1970dfbb60930ba65
24,568
cc
C++
src/EMBase.cc
MIRTK/NeoSeg
d2ff4e307638727d66aff3ece25496677bbd8df1
[ "Apache-2.0" ]
16
2016-03-25T22:39:48.000Z
2021-07-07T09:35:23.000Z
src/EMBase.cc
MIRTK/NeoSeg
d2ff4e307638727d66aff3ece25496677bbd8df1
[ "Apache-2.0" ]
24
2016-02-24T16:22:11.000Z
2021-10-05T12:34:39.000Z
src/EMBase.cc
MIRTK/NeoSeg
d2ff4e307638727d66aff3ece25496677bbd8df1
[ "Apache-2.0" ]
13
2016-03-17T03:41:01.000Z
2021-11-13T02:43:49.000Z
/* * Developing brain Region Annotation With Expectation-Maximization (Draw-EM) * * Copyright 2013-2020 Imperial College London * Copyright 2013-2020 Christian Ledig * Copyright 2013-2020 Antonios Makropoulos * * 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 "mirtk/EMBase.h" namespace mirtk { EMBase::EMBase(){ InitialiseParameters(); } template <class ImageType> EMBase::EMBase(int noTissues, ImageType **atlas, ImageType *background) { InitialiseParameters(); _atlas.AddProbabilityMaps(noTissues, atlas); addBackground(*background); _number_of_tissues = _atlas.GetNumberOfMaps(); } template <class ImageType> EMBase::EMBase(int noTissues, ImageType **atlas) { InitialiseParameters(); _atlas.AddProbabilityMaps(noTissues, atlas); _number_of_tissues = _atlas.GetNumberOfMaps(); } template <class ImageType> EMBase::EMBase(int noTissues, ImageType **atlas, ImageType **initposteriors) { InitialiseParameters(); _atlas.AddProbabilityMaps(noTissues, atlas); _output.AddProbabilityMaps(noTissues, initposteriors); _posteriors_set=true; _number_of_tissues = _atlas.GetNumberOfMaps(); } EMBase::~EMBase() { } void EMBase::InitialiseParameters() { _padding = MIN_GREY; _number_of_voxels = 0; _number_of_tissues = 0; _f = 0; _superlabels=false; _postpen=false; _posteriors_set=false; _has_background=false; _mask_set=false; } void EMBase::SetInput(const RealImage &image) { _input = image; _estimate = image; _weights = image; _number_of_voxels=_input.GetNumberOfVoxels(); } void EMBase::CreateMask() { _atlas.First(); if(!_mask_set){ _mask.Initialize(_input.Attributes()); } RealPixel *p=_input.GetPointerToVoxels(); BytePixel *m=_mask.GetPointerToVoxels(); for (int i=0; i<_number_of_voxels; i++) { if(!_mask_set || *m==1){ if (*p!=_padding){ bool flag = true; for (int j = 0; j < _number_of_tissues; j++) { if (_atlas.GetValue(j) > 0) { flag=false;break; } } if(flag) *m=0; else *m=1; } else *m=0; } p++; m++; _atlas.Next(); } _mask_set = true; } void EMBase::SetMask(ByteImage &mask) { _mask=mask; _mask_set = true; } void EMBase::Initialise() { _number_of_tissues = _atlas.GetNumberOfMaps(); _atlas.NormalizeAtlas(); if(!_posteriors_set) _output = _atlas; else _output.NormalizeAtlas(); CreateMask(); _mi.resize(_number_of_tissues); _sigma.resize(_number_of_tissues); _c.resize(_number_of_tissues); this->MStep(); Print(); } void EMBase::InitialiseGMM() { _atlas.NormalizeAtlas(); if(!_posteriors_set) _output = _atlas; else _output.NormalizeAtlas(); this->MStepGMM(); Print(); } void EMBase::setPostPenalty(RealImage &pp){ _postpenalty=pp; _postpen=true; } void EMBase::UniformPrior() { int i, k; _atlas.First(); BytePixel *pm = _mask.GetPointerToVoxels(); for (i=0; i< _number_of_voxels; i++) { if (*pm == 1) { for (k = 0; k < _number_of_tissues; k++) { _atlas.SetValue(k,1.0/_number_of_tissues); } } pm++; _atlas.Next(); } } void EMBase::InitialiseGMMParameters(int n) { int i; std::cout <<"Estimating GMM parameters ... "; RealPixel imin, imax; _input.GetMinMaxPad(&imin, &imax,_padding); _number_of_tissues=n; _mi.resize(_number_of_tissues); _sigma.resize(_number_of_tissues); _c.resize(_number_of_tissues); for (i=0; i<n; i++) { _mi[i]=imin+i*(imax-imin)/(n-1); _sigma[i]=((imax-imin)/(n-1))*((imax-imin)/(n-1)); _c[i]=1.0/n; } PrintGMM(); } void EMBase::InitialiseGMMParameters(int n, double *m, double *s, double *c) { int i; _number_of_tissues = n; _mi.resize(_number_of_tissues); _sigma.resize(_number_of_tissues); _c.resize(_number_of_tissues); for ( i=0; i<n; i++) { _mi[i]=m[i]; _sigma[i]=s[i]; _c[i]=c[i]; } PrintGMM(); _output = _atlas; EStepGMM(); } void EMBase::MStep() { std::cout << "M-step" << std::endl; int k; Array<double> mi_num(_number_of_tissues); Array<double> sigma_num(_number_of_tissues); Array<double> denom(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { mi_num[k] = 0; sigma_num[k] = 0; denom[k] = 0; } //superlabels Array<double> mi_num_super, sigma_num_super, denom_super; if(_superlabels) { mi_num_super.resize(_number_of_tissues); sigma_num_super.resize(_number_of_tissues); denom_super.resize(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { mi_num_super[k] = 0; sigma_num_super[k] = 0; denom_super[k]=0; } } for (k = 0; k < _number_of_tissues; k++) { const auto end = _output.End(k); for (auto it = _output.Begin(k); it != end; ++it) { if (_mask.Get(it->first)==1) { mi_num[k] += it->second * _input.Get(it->first); denom[k] += it->second; } } } /* _output.First(); RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { for (k = 0; k < _number_of_tissues; k++) { mi_num[k] += _output.GetValue(k) * *ptr; denom[k] += _output.GetValue(k); } } ptr++; pm++; _output.Next(); }*/ //superlabels if(_superlabels) { for (k = 0; k < _number_of_tissues; k++) { mi_num_super[_super[k]] += mi_num[k]; denom_super[_super[k]] += denom[k]; } for (k = 0; k < _number_of_tissues; k++) { mi_num[k] = mi_num_super[_super[k]]; denom[k] = denom_super[_super[k]]; } } for (k = 0; k < _number_of_tissues; k++) { if (denom[k] != 0) { _mi[k] = mi_num[k] / denom[k]; } else { std::cerr << "Division by zero while computing tissue mean!" << std::endl; exit(1); } } for (k = 0; k < _number_of_tissues; k++) { const auto end = _output.End(k); for (auto it = _output.Begin(k); it != end; ++it) { if (_mask.Get(it->first)==1) { sigma_num[k] += it->second * pow(_input.Get(it->first) - _mi[k],2); } } } /* _output.First(); ptr = _input.GetPointerToVoxels(); pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { for (k = 0; k <_number_of_tissues; k++) { sigma_num[k] += (_output.GetValue(k) * (*ptr - _mi[k]) * (*ptr - _mi[k])); } } ptr++; pm++; _output.Next(); }*/ //superlabels if(_superlabels){ for (k = 0; k < _number_of_tissues; k++) { sigma_num_super[_super[k]] += sigma_num[k]; } for (k = 0; k < _number_of_tissues; k++) { sigma_num[k] = sigma_num_super[_super[k]]; } } for (k = 0; k <_number_of_tissues; k++) { _sigma[k] = sigma_num[k] / denom[k]; _sigma[k] = max( _sigma[k], 0.005 ); } } void EMBase::EStep() { std::cout << "E-step" << std::endl; int i, k; double x; RealImage segmentation; Array<Gaussian> G(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { G[k].Initialise(_mi[k], _sigma[k]); } RealPixel *pptr = nullptr; if (_postpen) pptr = _postpenalty.GetPointerToVoxels(); Array<double> likelihood(_number_of_tissues); double sumlike; _atlas.First(); _output.First(); RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); Array<double> numerator(_number_of_tissues); double denominator, temp; for (i=0; i< _number_of_voxels; i++) { if (*pm == 1) { x = *ptr; sumlike=0; for (k = 0; k < _number_of_tissues; k++) { likelihood[k] = G[k].Evaluate(x); sumlike += likelihood[k]; } for (k = 0; k < _number_of_tissues; k++) { likelihood[k] /= sumlike; } denominator=0; for (k = 0; k < _number_of_tissues; k++) { temp = likelihood[k] * _atlas.GetValue(k); numerator[k] = temp; denominator += temp; } //model averaging if (_postpen && denominator != 0) { double olddenom=denominator; denominator=0; for (k = 0; k < _number_of_tissues; k++) { double value = numerator[k]/olddenom; double priorvalue=_atlas.GetValue(k); value=(1-*pptr)*value +*pptr * priorvalue; numerator[k] = value; denominator += value; } } for (k = 0; k < _number_of_tissues; k++) { if (denominator != 0) { double value = numerator[k]/denominator; if ((value < 0) || (value > 1)) { int x,y,z; _input.IndexToVoxel(i, x, y, z); std::cerr << "Probability value = " << value <<" @ Estep at voxel "<< x<<" "<<y<<" "<<z<< ", structure " << k << std::endl; if (value < 0)value=0; if (value > 1)value=1; } _output.SetValue(k, value); } else { _output.SetValue(k,_atlas.GetValue(k)); } } if (denominator == 0) { int x,y,z; _input.IndexToVoxel(i, x, y, z); std::cerr<<"Division by 0 while computing probabilities at voxel "<<x<<","<<y<<","<<z<<std::endl; } } else { for (k = 0; k < _number_of_tissues ; k++) { _output.SetValue(k, 0); } } ptr++; pm++; if(_postpen) pptr++; _atlas.Next(); _output.Next(); } } void EMBase::WStep() { std::cout << "W-step" << std::endl; int i,k; double num, den; std::cout<<"Calculating weights ..."; RealPixel *pi=_input.GetPointerToVoxels(); RealPixel *pw=_weights.GetPointerToVoxels(); RealPixel *pe=_estimate.GetPointerToVoxels(); BytePixel *pm=_mask.GetPointerToVoxels(); _output.First(); _atlas.First(); for (i=0; i< _number_of_voxels; i++) { if (*pm == 1){ num=0; den=0; for (k=0; k<_number_of_tissues; k++) { num += _output.GetValue(k)*_mi[k]/_sigma[k]; den += _output.GetValue(k)/_sigma[k]; } if (den!=0){ *pw=den; *pe=num/den; } else { *pw=_padding; *pe=_padding; } } else { *pw=_padding; *pe=_padding; } pi++; pm++; pw++; pe++; _output.Next(); _atlas.Next(); } std::cout<<"done."<<std::endl; } void EMBase::GetMean(double *mean){ int i; for(i=0;i<_number_of_tissues;i++){ mean[i] = _mi[i]; } } void EMBase::GetVariance(double *variance){ int i; for(i=0;i<_number_of_tissues;i++){ variance[i] = sqrt(_sigma[i]); } } void EMBase::MStepGMM(bool uniform_prior) { std::cout << "M-step GMM" << std::endl; int k; Array<double> mi_num(_number_of_tissues); Array<double> sigma_num(_number_of_tissues); Array<double> denom(_number_of_tissues); Array<double> num_vox(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { mi_num[k] = 0; sigma_num[k] = 0; denom[k] = 0; num_vox[k] = 0; } for (k = 0; k < _number_of_tissues; k++) { const auto end=_output.End(k); for (auto it = _output.Begin(k); it != end; ++it) { if (_mask.Get(it->first)==1) { mi_num[k] += it->second * _input.Get(it->first); denom[k] += it->second; num_vox[k]+= 1; } } } /* _output.First(); RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { // Check for backgound if (*pm == 1) { for (k = 0; k < _number_of_tissues; k++) { mi_num[k] += _output.GetValue(k) * *ptr; denom[k] += _output.GetValue(k); num_vox[k]+= 1; } } ptr++; pm++; _output.Next(); }*/ for (k = 0; k < _number_of_tissues; k++) { if (denom[k] != 0) { _mi[k] = mi_num[k] / denom[k]; } else { std::cerr <<"Tissue "<< k <<": Division by zero while computing tissue mean!" << std::endl; exit(1); } if (uniform_prior) _c[k]=1.0/_number_of_tissues; else _c[k]=denom[k]/num_vox[k]; } for (k = 0; k < _number_of_tissues; k++) { const auto end=_output.End(k); for (auto it = _output.Begin(k); it != end; ++it) { if (_mask.Get(it->first)==1) { sigma_num[k] += it->second * pow(_input.Get(it->first) - _mi[k],2); } } } /*_output.First(); ptr = _input.GetPointerToVoxels(); pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { for (k = 0; k <_number_of_tissues; k++) { sigma_num[k] += (_output.GetValue(k) * (*ptr - _mi[k]) * (*ptr - _mi[k])); } } ptr++; pm++; _output.Next(); }*/ for (k = 0; k <_number_of_tissues; k++) { _sigma[k] = sigma_num[k] / denom[k]; if(_sigma[k]<1) _sigma[k] = 1; } } void EMBase::MStepVarGMM(bool uniform_prior) { std::cout << "M-step VarGMM" << std::endl; int k; Array<double> mi_num(_number_of_tissues); Array<double> denom(_number_of_tissues); Array<double> num_vox(_number_of_tissues); double sigma_num = 0; for (k = 0; k < _number_of_tissues; k++) { mi_num[k] = 0; denom[k] = 0; num_vox[k] = 0; } for (k = 0; k < _number_of_tissues; k++) { const auto end=_output.End(k); for (auto it = _output.Begin(k); it != end; ++it) { if (_mask.Get(it->first)==1){ mi_num[k] += it->second * _input.Get(it->first); denom[k] += it->second; num_vox[k]+= 1; } } } /* _output.First(); RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { for (k = 0; k < _number_of_tissues; k++) { mi_num[k] += _output.GetValue(k) * *ptr; denom[k] += _output.GetValue(k); num_vox[k]+= 1; } } ptr++; pm++; _output.Next(); }*/ for (k = 0; k < _number_of_tissues; k++) { if (denom[k] != 0) { _mi[k] = mi_num[k] / denom[k]; } else { std::cerr << "Division by zero while computing tissue mean!" << std::endl; exit(1); } if (uniform_prior) _c[k]=1.0/_number_of_tissues; else _c[k]=denom[k]/num_vox[k]; } for (k = 0; k < _number_of_tissues; k++) { const auto end=_output.End(k); for (auto it = _output.Begin(k); it != end; ++it) { if (_mask.Get(it->first)==1){ sigma_num += it->second * pow(_input.Get(it->first) - _mi[k],2); } } } /* _output.First(); ptr = _input.GetPointerToVoxels(); pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { for (k = 0; k <_number_of_tissues; k++) { sigma_num += (_output.GetValue(k) * (*ptr - _mi[k]) * (*ptr - _mi[k])); } } ptr++; pm++; _output.Next(); }*/ double sum =0; for (k = 0; k <_number_of_tissues; k++) sum += denom[k]; for (k = 0; k <_number_of_tissues; k++) { if (sum>0) _sigma[k] = sigma_num / sum; } } void EMBase::EStepGMM(bool uniform_prior) { std::cout << "E-step GMM" << std::endl; int i, k; double x; Array<double> gv(_number_of_tissues); Array<double> numerator(_number_of_tissues); Array<Gaussian> G(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { G[k].Initialise( _mi[k], _sigma[k]); } _output.First(); RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); for (i=0; i< _number_of_voxels; i++) { double denominator=0, temp=0; if (*pm == 1) { x = *ptr; for (k = 0; k < _number_of_tissues; k++) { temp = G[k].Evaluate(x); gv[k] = temp; if (!uniform_prior) temp = temp * _c[k]; numerator[k] = temp; denominator += temp; } for (k = 0; k < _number_of_tissues; k++) { if (denominator != 0) { double value = numerator[k]/denominator; if ((value < 0) || (value > 1)) { int x,y,z; _input.IndexToVoxel(i, x, y, z); std::cerr << "Probability value = " << value <<" @ Estep gmm at voxel "<< x<<" "<<y<<" "<<z<< ", structure " << k << std::endl; if (value < 0)value=0; if (value > 1)value=1; } _output.SetValue(k, value); } else { _output.SetValue(k,_atlas.GetValue(k)); } } if (denominator <= 0) { int x,y,z; _input.IndexToVoxel(i, x, y, z); std::cerr<<"Division by 0 while computing probabilities at voxel "<<x<<","<<y<<","<<z<<std::endl; } } else { for (k = 0; k < _number_of_tissues ; k++) { _output.SetValue(k, 0); } } ptr++; pm++; _output.Next(); } } void EMBase::Print() { int k; std::cout << "mean:"; for (k = 0; k <_number_of_tissues; k++) { std::cout << " " << k << ": " << _mi[k]; } std::cout << std::endl; std::cout << "sigma:"; for (k = 0; k < _number_of_tissues; k++) { std::cout << " " << k << ": " << sqrt(_sigma[k]); } std::cout << std::endl; } void EMBase::PrintGMM() { int k; Print(); std::cout << "c:"; for (k = 0; k < _number_of_tissues; k++) { std::cout << " " << k << ": " << _c[k]; } std::cout << std::endl; } double EMBase::Iterate(int) { this->EStep(); this->MStep(); Print(); return LogLikelihood(); } double EMBase::IterateGMM(int iteration, bool equal_var, bool uniform_prior) { if (iteration > 1) this->EStepGMM(); if (equal_var) this->MStepVarGMM(uniform_prior); else this->MStepGMM(uniform_prior); PrintGMM(); return LogLikelihoodGMM(); } double EMBase::LogLikelihood() { int i, k; double temp, f; std::cout<< "Log likelihood: "; Array<Gaussian> G(_number_of_tissues); Array<double> gv(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { G[k].Initialise( _mi[k], _sigma[k]); } RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); _output.First(); f = 0; for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { temp = 0; double max = 0; int max_k = 0; for (k=0; k < _number_of_tissues; k++) { // Estimation of gaussian probability of intensity (*ptr) for tissue k gv[k] = G[k].Evaluate(*ptr); if( gv[k] > 1 ) gv[k] = 1.0; if( max < gv[k] ) { max_k = k; max = gv[k]; } // Probability that current voxel is from tissue k temp += gv[k] * _output.GetValue(k); } if ((temp > 0) && (temp <= 1)) { f += log(temp); } } ptr++; pm++; _output.Next(); } f = -f; double diff, rel_diff; diff = _f-f; if (_f == 0) rel_diff = 1; else rel_diff = diff/_f; _f=f; std::cout << "f= "<< f << " diff = " << diff << " rel_diff = " << rel_diff <<std::endl; return rel_diff; } double EMBase::LogLikelihoodGMM() { int i, k; double temp, f; std::cout<< "Log likelihood GMM: "; Array<Gaussian> G(_number_of_tissues); Array<double> gv(_number_of_tissues); for (k = 0; k < _number_of_tissues; k++) { G[k].Initialise( _mi[k], _sigma[k]); } RealPixel *ptr = _input.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); _output.First(); f = 0; for (i = 0; i < _number_of_voxels; i++) { if (*pm == 1) { temp = 0; for (k=0; k < _number_of_tissues; k++) { // Estimation of gaussian probability of intensity (*ptr) for tissue k gv[k] = G[k].Evaluate(*ptr); // Probability that current voxel is from tissue k temp += gv[k] * _c[k]; } if ((temp > 0) && (temp <= 1)) { f += log(temp); } } ptr++; pm++; _output.Next(); } f = -f; double diff, rel_diff; diff = _f-f; if (_f == 0) rel_diff = 1; else rel_diff = diff/_f; _f=f; std::cout << "f= "<< f << " diff = " << diff << " rel_diff = " << rel_diff <<std::endl; return rel_diff; } void EMBase::ConstructSegmentation(IntegerImage &segmentation) { int i, j, m; RealPixel max; std::cout<<"Constructing segmentation"<<std::endl; // Initialize pointers of probability maps _output.First(); // Initialize segmentation to same size as input segmentation = IntegerImage(_input.Attributes()); RealPixel *ptr = _input.GetPointerToVoxels(); int *sptr = segmentation.GetPointerToVoxels(); BytePixel *pm = _mask.GetPointerToVoxels(); for (i = 0; i < _number_of_voxels; i++) { m = 0; if (*pm == 1) { max = 0; for (j = 0; j < _number_of_tissues; j++) { if (_output.GetValue(j) > max) { max = _output.GetValue(j); m = j+1; if ( _has_background && (j+1) == _number_of_tissues) m=0; } } if(max==0){ int x,y,z; int index=i; z = index / (_input.GetX() * _input.GetY()); index -= z * (_input.GetX() * _input.GetY()); x = index % _input.GetX(); y = index / _input.GetX(); std::cerr<<"voxel at "<<x<<","<<y<<","<<z<<" has 0 prob"<<std::endl; } } *sptr = m; sptr++; ptr++; pm++; _output.Next(); } } void EMBase::ConstructSegmentation() { ConstructSegmentation(_segmentation); } void EMBase::GetProbMap(int i,RealImage& image){ if (i < _number_of_tissues) { image = _output.GetImage(i); } else { std::cerr << "HashProbabilisticAtlas::Write: No such probability map" << std::endl; exit(1); } } void EMBase::WriteProbMap(int i, const char *filename) { if (i < _number_of_tissues) { _output.GetImage(i).Write(filename); } else { std::cerr << "HashProbabilisticAtlas::Write: No such probability map" << std::endl; exit(1); } } void EMBase::WriteGaussianParameters(const char *file_name, int flag) { std::cout << "Writing GaussianDistributionParameters: " << file_name << std::endl; ofstream fileOut(file_name); if (!fileOut) { std::cerr << "Can't open file " << file_name << std::endl; exit(1); } int k,l,m; if(flag){ // out put without names for (k=0; k<_number_of_tissues; k++) { fileOut << _mi[k] << " " << _sigma[k] << std::endl; } }else{ // out put with names fileOut << "mi: " <<std::endl; for (k=0; k<_number_of_tissues; k++) { fileOut << "Tissue " << k << ": ("; for (l=0; l < 1/*_input.GetNumberOfChannels()*/; l++) { fileOut << _mi[k];//.Get(l); if (l == 0/*_input.GetNumberOfChannels() - 1*/) fileOut << ")" << std::endl; else fileOut << ", "; } } fileOut << "sigma: " << std::endl; for (k=0; k<_number_of_tissues; k++) { fileOut << "Tissue " << k << ": ("; //<<std::endl << "("; for (l=0; l < 1/*_input.GetNumberOfChannels()*/; l++) { //fileOut << "("; for (m = 0; m < 1/*_input.GetNumberOfChannels()*/; m++) { double s = _sigma[k];//.Get(m,l); if ( s >= 0) fileOut << sqrt(s); else fileOut << -sqrt(-s); } } //if (l == 0/*_input.GetNumberOfChannels() - 1*/) fileOut << ")" << std::endl; fileOut << ")" << std::endl; } } } void EMBase::WriteWeights(const char *filename) { RealImage w(_weights); RealPixel *pw = w.GetPointerToVoxels(); int i; double sigma_min=_sigma[0]; for (i = 1; i < _number_of_tissues; i++) { if (sigma_min > _sigma[i]) sigma_min = _sigma[i]; } std::cerr<<"sigma min = "<<sigma_min<<std::endl; for (i=0; i<w.GetNumberOfVoxels(); i++) { if (*pw != _padding) *pw=(*pw) * sigma_min * 100; pw++; } w.Write(filename); } double EMBase::PointLogLikelihoodGMM(double x) { int k; double temp=0; for (k = 0; k < _number_of_tissues; k++) { temp += _G[k].Evaluate(x) * _c[k]; } if (-log(temp)> 1000000) exit(1); if ((temp > 1) || (temp < 0)) { std::cerr << "Could not compute likelihood, probability out of range = " << temp << std::endl; exit(1); } return -log(temp); } void EMBase::GInit() { _G.resize(_number_of_tissues); for (int i = 0; i < _number_of_tissues; ++i) { _G[i].Initialise(_mi[i], _sigma[i]); } } void EMBase::setSuperlabels(int *superlabels) { for (int i = 0; i < _number_of_tissues; ++i) { _super[i] = superlabels[i]; } _superlabels=true; } void EMBase::GetProportions(double *proportions) { for(int i = 0; i < _number_of_tissues; ++i) { proportions[i] = _c[i]; } } template EMBase::EMBase(int, RealImage **, RealImage *); template EMBase::EMBase(int, HashRealImage **, HashRealImage *); template EMBase::EMBase(int, RealImage **); template EMBase::EMBase(int, HashRealImage **); template EMBase::EMBase(int, RealImage **, RealImage **); template EMBase::EMBase(int, HashRealImage **, HashRealImage **); template void EMBase::addProbabilityMap(RealImage image); template void EMBase::addProbabilityMap(HashRealImage image); template void EMBase::addBackground(RealImage image); template void EMBase::addBackground(HashRealImage image); } // namespace mirtk
23.221172
133
0.589303
MIRTK
f34062ec29c0bfb11b1a8912f673f016913244e8
1,802
cpp
C++
SearchEngine/SortingProperty.cpp
AnnaKrykora/indexer-plus-plus
99998b5205bf80ada23e2fdbd6aa2cc6be7f5ed1
[ "MIT" ]
59
2016-07-27T20:36:04.000Z
2022-02-21T07:39:43.000Z
SearchEngine/SortingProperty.cpp
Stateford/indexer-plus-plus
6ffc46d85a00fd83f0117b358ffe3eaae82ea575
[ "MIT" ]
43
2016-08-18T15:59:50.000Z
2021-01-18T09:16:50.000Z
SearchEngine/SortingProperty.cpp
Stateford/indexer-plus-plus
6ffc46d85a00fd83f0117b358ffe3eaae82ea575
[ "MIT" ]
13
2016-07-28T16:08:41.000Z
2020-12-17T06:06:27.000Z
// This file is the part of the Indexer++ project. // Copyright (C) 2016 Anna Krykora <[email protected]>. All rights reserved. // Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. #include "SortingProperty.h" namespace indexer { SortingProperty PropertyNameToSortingPropertyEnum(std::string prop_name) { if (prop_name == "Name") return SortingProperty::SORT_NAME; if (prop_name == "Path") return SortingProperty::SORT_PATH; if (prop_name == "Size") return SortingProperty::SORT_SIZE; if (prop_name == "Date created") return SortingProperty::SORT_CREATION_TIME; if (prop_name == "Date modified") return SortingProperty::SORT_LASTWRITE_TIME; if (prop_name == "Date accessed") return SortingProperty::SORT_LASTACCESS_TIME; if (prop_name == "Extension") return SortingProperty::SORT_EXTENSION; if (prop_name == "Type") return SortingProperty::SORT_TYPE; return SortingProperty::SORT_NOTSUPPORTED_COLUMNS; } std::wstring SortingPropertyEnumToPropertyName(SortingProperty prop) { if (prop == SortingProperty::SORT_NAME) return L"Name"; if (prop == SortingProperty::SORT_PATH) return L"Path"; if (prop == SortingProperty::SORT_SIZE) return L"Size"; if (prop == SortingProperty::SORT_CREATION_TIME) return L"Date created"; if (prop == SortingProperty::SORT_LASTWRITE_TIME) return L"Date modified"; if (prop == SortingProperty::SORT_LASTACCESS_TIME) return L"Date accessed"; if (prop == SortingProperty::SORT_EXTENSION) return L"Extension"; if (prop == SortingProperty::SORT_TYPE) return L"Type"; return L"Not supported column"; } } // namespace indexer
48.702703
101
0.689234
AnnaKrykora
f34a5dacbb7582163b72d3d60a654716a90e8edf
8,935
cc
C++
src/server/endpoint.cc
dlinten/pistache
22d74298038cadd3a2bc5e5424d352b7e58984d9
[ "Apache-2.0" ]
null
null
null
src/server/endpoint.cc
dlinten/pistache
22d74298038cadd3a2bc5e5424d352b7e58984d9
[ "Apache-2.0" ]
null
null
null
src/server/endpoint.cc
dlinten/pistache
22d74298038cadd3a2bc5e5424d352b7e58984d9
[ "Apache-2.0" ]
null
null
null
/* endpoint.cc Mathieu Stefani, 22 janvier 2016 Implementation of the http endpoint */ #include <pistache/config.h> #include <pistache/endpoint.h> #include <pistache/peer.h> #include <pistache/tcp.h> #include <array> #include <chrono> namespace Pistache { namespace Http { class TransportImpl : public Tcp::Transport { public: using Base = Tcp::Transport; explicit TransportImpl(const std::shared_ptr<Tcp::Handler>& handler); void registerPoller(Polling::Epoll& poller) override; void onReady(const Aio::FdSet& fds) override; void setHeaderTimeout(std::chrono::milliseconds timeout); void setBodyTimeout(std::chrono::milliseconds timeout); std::shared_ptr<Aio::Handler> clone() const override; private: std::shared_ptr<Tcp::Handler> handler_; std::chrono::milliseconds headerTimeout_; std::chrono::milliseconds bodyTimeout_; int timerFd; void checkIdlePeers(); }; TransportImpl::TransportImpl(const std::shared_ptr<Tcp::Handler>& handler) : Tcp::Transport(handler) , handler_(handler) { } void TransportImpl::registerPoller(Polling::Epoll& poller) { Base::registerPoller(poller); timerFd = TRY_RET(timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK)); static constexpr auto TimerInterval = std::chrono::milliseconds(500); static constexpr auto TimerIntervalNs = std::chrono::duration_cast<std::chrono::nanoseconds>(TimerInterval); static_assert( TimerInterval < std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::seconds(1)), "Timer frequency should be less than 1 second"); itimerspec spec; spec.it_value.tv_sec = 0; spec.it_value.tv_nsec = TimerIntervalNs.count(); spec.it_interval.tv_sec = 0; spec.it_interval.tv_nsec = TimerIntervalNs.count(); TRY(timerfd_settime(timerFd, 0, &spec, 0)); Polling::Tag tag(timerFd); poller.addFd(timerFd, Flags<Polling::NotifyOn>(Polling::NotifyOn::Read), Polling::Tag(timerFd)); } void TransportImpl::onReady(const Aio::FdSet& fds) { bool handled = false; for (const auto& entry : fds) { if (entry.getTag() == Polling::Tag(timerFd)) { uint64_t wakeups; ::read(timerFd, &wakeups, sizeof wakeups); checkIdlePeers(); handled = true; } } if (!handled) Base::onReady(fds); } void TransportImpl::setHeaderTimeout(std::chrono::milliseconds timeout) { headerTimeout_ = timeout; } void TransportImpl::setBodyTimeout(std::chrono::milliseconds timeout) { bodyTimeout_ = timeout; } void TransportImpl::checkIdlePeers() { std::vector<std::shared_ptr<Tcp::Peer>> idlePeers; for (const auto& peerPair : peers) { const auto& peer = peerPair.second; auto parser = Http::Handler::getParser(peer); auto time = parser->time(); auto now = std::chrono::steady_clock::now(); auto elapsed = now - time; auto* step = parser->step(); if (step->id() == Private::RequestLineStep::Id) { if (elapsed > headerTimeout_ || elapsed > bodyTimeout_) idlePeers.push_back(peer); } else if (step->id() == Private::HeadersStep::Id) { if (elapsed > bodyTimeout_) idlePeers.push_back(peer); } } for (const auto& idlePeer : idlePeers) { ResponseWriter response(Http::Version::Http11, this, static_cast<Http::Handler*>(handler_.get()), idlePeer); response.send(Http::Code::Request_Timeout).then([=, this](ssize_t) { removePeer(idlePeer); }, [=, this](const std::exception_ptr&) { removePeer(idlePeer); }); } } std::shared_ptr<Aio::Handler> TransportImpl::clone() const { auto transport = std::make_shared<TransportImpl>(handler_->clone()); transport->setHeaderTimeout(headerTimeout_); transport->setBodyTimeout(bodyTimeout_); return transport; } Endpoint::Options::Options() : threads_(1) , flags_() , backlog_(Const::MaxBacklog) , maxRequestSize_(Const::DefaultMaxRequestSize) , maxResponseSize_(Const::DefaultMaxResponseSize) , headerTimeout_(Const::DefaultHeaderTimeout) , bodyTimeout_(Const::DefaultBodyTimeout) , logger_(PISTACHE_NULL_STRING_LOGGER) { } Endpoint::Options& Endpoint::Options::threads(int val) { threads_ = val; return *this; } Endpoint::Options& Endpoint::Options::threadsName(const std::string& val) { threadsName_ = val; return *this; } Endpoint::Options& Endpoint::Options::flags(Flags<Tcp::Options> flags) { flags_ = flags; return *this; } Endpoint::Options& Endpoint::Options::backlog(int val) { backlog_ = val; return *this; } Endpoint::Options& Endpoint::Options::maxRequestSize(size_t val) { maxRequestSize_ = val; return *this; } Endpoint::Options& Endpoint::Options::maxPayload(size_t val) { return maxRequestSize(val); } Endpoint::Options& Endpoint::Options::maxResponseSize(size_t val) { maxResponseSize_ = val; return *this; } Endpoint::Options& Endpoint::Options::logger(PISTACHE_STRING_LOGGER_T logger) { logger_ = logger; return *this; } Endpoint::Endpoint() { } Endpoint::Endpoint(const Address& addr) : listener(addr) { } void Endpoint::init(const Endpoint::Options& options) { listener.init(options.threads_, options.flags_, options.threadsName_); listener.setTransportFactory([&] { if (!handler_) throw std::runtime_error("Must call setHandler()"); auto transport = std::make_shared<TransportImpl>(handler_); transport->setHeaderTimeout(options.headerTimeout_); transport->setBodyTimeout(options.bodyTimeout_); return transport; }); options_ = options; logger_ = options.logger_; } void Endpoint::setHandler(const std::shared_ptr<Handler>& handler) { handler_ = handler; handler_->setMaxRequestSize(options_.maxRequestSize_); handler_->setMaxResponseSize(options_.maxResponseSize_); } void Endpoint::bind() { listener.bind(); } void Endpoint::bind(const Address& addr) { listener.bind(addr); } void Endpoint::serve() { serveImpl(&Tcp::Listener::run); } void Endpoint::serveThreaded() { serveImpl(&Tcp::Listener::runThreaded); } void Endpoint::shutdown() { listener.shutdown(); } void Endpoint::useSSL(const std::string& cert, const std::string& key, bool use_compression) { #ifndef PISTACHE_USE_SSL (void)cert; (void)key; (void)use_compression; throw std::runtime_error("Pistache is not compiled with SSL support."); #else listener.setupSSL(cert, key, use_compression); #endif /* PISTACHE_USE_SSL */ } void Endpoint::useSSLAuth(std::string ca_file, std::string ca_path, int (*cb)(int, void*)) { #ifndef PISTACHE_USE_SSL (void)ca_file; (void)ca_path; (void)cb; throw std::runtime_error("Pistache is not compiled with SSL support."); #else listener.setupSSLAuth(ca_file, ca_path, cb); #endif /* PISTACHE_USE_SSL */ } Async::Promise<Tcp::Listener::Load> Endpoint::requestLoad(const Tcp::Listener::Load& old) { return listener.requestLoad(old); } Endpoint::Options Endpoint::options() { return Options(); } } // namespace Http } // namespace Pistache
32.02509
128
0.550979
dlinten
f353cc7deba62399e60d4fa94dee21bd570a77c6
5,308
cc
C++
src/cascade/target/core/sw/sw_compiler.cc
3Nigma/cascade
44f7cf20719822f2cba5df7065083a15db217c30
[ "BSD-2-Clause" ]
425
2018-10-17T19:47:32.000Z
2021-06-16T18:03:08.000Z
src/cascade/target/core/sw/sw_compiler.cc
3Nigma/cascade
44f7cf20719822f2cba5df7065083a15db217c30
[ "BSD-2-Clause" ]
196
2018-09-17T20:42:33.000Z
2020-05-15T00:00:24.000Z
src/cascade/target/core/sw/sw_compiler.cc
3Nigma/cascade
44f7cf20719822f2cba5df7065083a15db217c30
[ "BSD-2-Clause" ]
39
2018-11-07T21:16:21.000Z
2021-06-08T16:24:12.000Z
// Copyright 2017-2019 VMware, Inc. // SPDX-License-Identifier: BSD-2-Clause // // The BSD-2 license (the License) set forth below applies to all parts of the // Cascade project. You may not use this file except in compliance with the // License. // // BSD-2 License // // 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. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. #include "target/core/sw/sw_compiler.h" #include "target/compiler.h" #include "verilog/analyze/evaluate.h" #include "verilog/analyze/module_info.h" #include "verilog/analyze/resolve.h" #include "verilog/ast/ast.h" using namespace std; namespace cascade::sw { SwCompiler::SwCompiler() : CoreCompiler() { set_led(nullptr, nullptr); set_pad(nullptr, nullptr); set_reset(nullptr, nullptr); } SwCompiler& SwCompiler::set_led(Bits* b, mutex* l) { led_ = b; led_lock_ = l; return *this; } SwCompiler& SwCompiler::set_pad(Bits* b, mutex* l) { pad_ = b; pad_lock_ = l; return *this; } SwCompiler& SwCompiler::set_reset(Bits* b, mutex* l) { reset_ = b; reset_lock_ = l; return *this; } void SwCompiler::stop_compile(Engine::Id id) { // Does nothing. Compilations all return in a reasonable amount of time. (void) id; } SwClock* SwCompiler::compile_clock(Engine::Id id, ModuleDeclaration* md, Interface* interface) { (void) id; if (!check_io(md, 0, 1)) { get_compiler()->error("Unable to compile a software clock with more than one output"); delete md; return nullptr; } const auto* out = *ModuleInfo(md).outputs().begin(); const auto oid = to_vid(out); delete md; return new SwClock(interface, oid); } SwLed* SwCompiler::compile_led(Engine::Id id, ModuleDeclaration* md, Interface* interface) { (void) id; if (led_ == nullptr) { get_compiler()->error("Unable to compile a software led without a reference to a software fpga"); delete md; return nullptr; } if (!check_io(md, 8, 8)) { get_compiler()->error("Unable to compile a software led with more than 8 outputs"); delete md; return nullptr; } if (!ModuleInfo(md).inputs().empty()) { const auto* in = *ModuleInfo(md).inputs().begin(); const auto iid = to_vid(in); const auto w = Evaluate().get_width(in); delete md; return new SwLed(interface, iid, w, led_, led_lock_); } else { delete md; return new SwLed(interface, nullid(), 0, led_, led_lock_); } } SwLogic* SwCompiler::compile_logic(Engine::Id id, ModuleDeclaration* md, Interface* interface) { (void) id; ModuleInfo info(md); auto* c = new SwLogic(interface, md); for (auto* i : info.inputs()) { c->set_input(i, to_vid(i)); } for (auto* s : info.stateful()) { c->set_state(s, to_vid(s)); } for (auto* o : info.outputs()) { c->set_output(o, to_vid(o)); } return c; } SwPad* SwCompiler::compile_pad(Engine::Id id, ModuleDeclaration* md, Interface* interface) { (void) id; if (pad_ == nullptr) { get_compiler()->error("Unable to compile a software pad without a reference to a software fpga"); delete md; return nullptr; } if (pad_ == nullptr || !check_io(md, 0, 4)) { get_compiler()->error("Unable to compile a software pad with more than four inputs"); delete md; return nullptr; } const auto* out = *ModuleInfo(md).outputs().begin(); const auto oid = to_vid(out); const auto w = Evaluate().get_width(out); delete md; return new SwPad(interface, oid, w, pad_, pad_lock_); } SwReset* SwCompiler::compile_reset(Engine::Id id, ModuleDeclaration* md, Interface* interface) { (void) id; if (pad_ == nullptr) { get_compiler()->error("Unable to compile a software reset without a reference to a software fpga"); delete md; return nullptr; } if (pad_ == nullptr || !check_io(md, 0, 1)) { get_compiler()->error("Unable to compile a software reset with more than one input"); delete md; return nullptr; } const auto* out = *ModuleInfo(md).outputs().begin(); const auto oid = to_vid(out); delete md; return new SwReset(interface, oid, reset_, reset_lock_); } } // namespace cascade::sw
30.331429
103
0.694989
3Nigma
f3555b8bc3721d607c340db22af5d773d512cd4f
2,637
cpp
C++
include/workqueue.cpp
yyzhuxin/ilibevent
c9444b3600f5ac9eae0130e3f11753b6bd58017a
[ "MIT" ]
1
2017-04-02T12:33:04.000Z
2017-04-02T12:33:04.000Z
include/workqueue.cpp
yyzhuxin/ilibevent
c9444b3600f5ac9eae0130e3f11753b6bd58017a
[ "MIT" ]
null
null
null
include/workqueue.cpp
yyzhuxin/ilibevent
c9444b3600f5ac9eae0130e3f11753b6bd58017a
[ "MIT" ]
null
null
null
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "workqueue.hpp" #define LL_ADD(item, list) { \ item->prev = NULL; \ item->next = list; \ list = item; \ } #define LL_REMOVE(item, list) { \ if (item->prev != NULL) item->prev->next = item->next; \ if (item->next != NULL) item->next->prev = item->prev; \ if (list == item) list = item->next; \ item->prev = item->next = NULL; \ } static void* worker_function(void* ptr) { worker_t* worker = (worker_t*)ptr; job_t* job; while (1) { pthread_mutex_lock(&worker->workqueue->jobs_mutex); while (worker->workqueue->waiting_jobs == NULL) { if (worker->terminate) { break; } pthread_cond_wait(&worker->workqueue->jobs_cond, &worker->workqueue->jobs_mutex); } if (worker->terminate) { break; } job = worker->workqueue->waiting_jobs; if (job != NULL) { LL_REMOVE(job, worker->workqueue->waiting_jobs); } pthread_mutex_unlock(&worker->workqueue->jobs_mutex); if (job == NULL) { continue; } job->job_function(job); } free(worker); pthread_exit(NULL); } int workqueue_init(workqueue_t* workqueue, int numWorkers) { int i; worker_t* worker; pthread_cond_t blank_cond = PTHREAD_COND_INITIALIZER; pthread_mutex_t blank_mutex = PTHREAD_MUTEX_INITIALIZER; if (numWorkers < 1) { numWorkers = 1; } memset(workqueue, 0, sizeof(*workqueue)); memcpy(&workqueue->jobs_mutex, &blank_mutex, sizeof(workqueue->jobs_mutex)); memcpy(&workqueue->jobs_cond, &blank_cond, sizeof(workqueue->jobs_cond)); for (i = 0; i < numWorkers; ++i) { if ((worker = (worker_t*)malloc(sizeof(worker_t))) == NULL) { perror("Failed to allocate all workers"); return 1; } memset(worker, 0, sizeof(*worker)); worker->workqueue = workqueue; if (pthread_create(&worker->thread, NULL, worker_function, (void*)worker)) { perror("Failed to start all worker threads"); free(worker); return 1; } LL_ADD(worker, worker->workqueue->workers); } return 0; } void workqueue_shutdown(workqueue_t* workqueue) { worker_t* worker = NULL; for (worker = workqueue->workers; worker != NULL; worker = worker->next) { worker->terminate = 1; } pthread_mutex_lock(&workqueue->jobs_mutex); workqueue->workers = NULL; workqueue->waiting_jobs = NULL; pthread_cond_broadcast(&workqueue->jobs_cond); pthread_mutex_unlock(&workqueue->jobs_mutex); } void workqueue_add_job(workqueue_t* workqueue, job_t* job) { pthread_mutex_lock(&workqueue->jobs_mutex); LL_ADD(job, workqueue->waiting_jobs); pthread_cond_signal(&workqueue->jobs_cond); pthread_mutex_unlock(&workqueue->jobs_mutex); }
22.538462
84
0.68449
yyzhuxin
f355d1fac8057ee33c8a28cc09f6fe3dbfc60607
1,661
cpp
C++
aws-cpp-sdk-glue/source/model/BatchGetCrawlersRequest.cpp
curiousjgeorge/aws-sdk-cpp
09b65deba03cfbef9a1e5d5986aa4de71bc03cd8
[ "Apache-2.0" ]
2
2019-03-11T15:50:55.000Z
2020-02-27T11:40:27.000Z
aws-cpp-sdk-glue/source/model/BatchGetCrawlersRequest.cpp
curiousjgeorge/aws-sdk-cpp
09b65deba03cfbef9a1e5d5986aa4de71bc03cd8
[ "Apache-2.0" ]
null
null
null
aws-cpp-sdk-glue/source/model/BatchGetCrawlersRequest.cpp
curiousjgeorge/aws-sdk-cpp
09b65deba03cfbef9a1e5d5986aa4de71bc03cd8
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2010-2017 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. */ #include <aws/glue/model/BatchGetCrawlersRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Glue::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; BatchGetCrawlersRequest::BatchGetCrawlersRequest() : m_crawlerNamesHasBeenSet(false) { } Aws::String BatchGetCrawlersRequest::SerializePayload() const { JsonValue payload; if(m_crawlerNamesHasBeenSet) { Array<JsonValue> crawlerNamesJsonList(m_crawlerNames.size()); for(unsigned crawlerNamesIndex = 0; crawlerNamesIndex < crawlerNamesJsonList.GetLength(); ++crawlerNamesIndex) { crawlerNamesJsonList[crawlerNamesIndex].AsString(m_crawlerNames[crawlerNamesIndex]); } payload.WithArray("CrawlerNames", std::move(crawlerNamesJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection BatchGetCrawlersRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.BatchGetCrawlers")); return headers; }
28.152542
113
0.7646
curiousjgeorge
f360c0f3174cc8666055ba588bca76206daa4f53
1,099
cpp
C++
HomeWork/HomeWork220126/HomeWork220126.cpp
Munjongyun/HomeWork
9215fdcf283e70591cc67acd41f5b19fa6d6c22e
[ "MIT" ]
null
null
null
HomeWork/HomeWork220126/HomeWork220126.cpp
Munjongyun/HomeWork
9215fdcf283e70591cc67acd41f5b19fa6d6c22e
[ "MIT" ]
null
null
null
HomeWork/HomeWork220126/HomeWork220126.cpp
Munjongyun/HomeWork
9215fdcf283e70591cc67acd41f5b19fa6d6c22e
[ "MIT" ]
null
null
null
// HomeWork220126.cpp : 이 파일에는 'main' 함수가 포함됩니다. 거기서 프로그램 실행이 시작되고 종료됩니다. // #include <iostream> class MyInt { public: int Value; public: MyInt(int _Value) : Value(_Value) { } MyInt& operator++() { Value += 1; return *this; } MyInt operator++(int) { MyInt result(Value); Value += 1; return result; } }; int main() { int Value = 0; int Result = 0; Result = ++Value; Result = 0; Result = Value++; MyInt MyValue = 0; MyInt MyResult = 0; // ++ 쓰지마세요 MyResult = ++MyValue; MyResult = 0; MyResult = MyValue++; int a = 0; } // 프로그램 실행: <Ctrl+F5> 또는 [디버그] > [디버깅하지 않고 시작] 메뉴 // 프로그램 디버그: <F5> 키 또는 [디버그] > [디버깅 시작] 메뉴 // 시작을 위한 팁: // 1. [솔루션 탐색기] 창을 사용하여 파일을 추가/관리합니다. // 2. [팀 탐색기] 창을 사용하여 소스 제어에 연결합니다. // 3. [출력] 창을 사용하여 빌드 출력 및 기타 메시지를 확인합니다. // 4. [오류 목록] 창을 사용하여 오류를 봅니다. // 5. [프로젝트] > [새 항목 추가]로 이동하여 새 코드 파일을 만들거나, [프로젝트] > [기존 항목 추가]로 이동하여 기존 코드 파일을 프로젝트에 추가합니다. // 6. 나중에 이 프로젝트를 다시 열려면 [파일] > [열기] > [프로젝트]로 이동하고 .sln 파일을 선택합니다.
16.907692
96
0.519563
Munjongyun
f364bd2777c2dfa159ae5e9b20004d1541c05fad
13,424
cpp
C++
src/v_palette.cpp
351ELEC/lzdoom
2ee3ea91bc9c052b3143f44c96d85df22851426f
[ "RSA-MD" ]
2
2020-04-19T13:37:34.000Z
2021-06-09T04:26:25.000Z
src/v_palette.cpp
351ELEC/lzdoom
2ee3ea91bc9c052b3143f44c96d85df22851426f
[ "RSA-MD" ]
null
null
null
src/v_palette.cpp
351ELEC/lzdoom
2ee3ea91bc9c052b3143f44c96d85df22851426f
[ "RSA-MD" ]
null
null
null
/* ** v_palette.cpp ** Automatic colormap generation for "colored lights", etc. ** **--------------------------------------------------------------------------- ** Copyright 1998-2006 Randy Heit ** 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. **--------------------------------------------------------------------------- ** */ #include "g_level.h" #include <stddef.h> #include <string.h> #include <math.h> #include <float.h> #ifdef _WIN32 #include <io.h> #else #include <unistd.h> #define O_BINARY 0 #endif #include <fcntl.h> #include "templates.h" #include "v_video.h" #include "i_system.h" #include "w_wad.h" #include "i_video.h" #include "c_dispatch.h" #include "st_stuff.h" #include "gi.h" #include "x86.h" #include "colormatcher.h" #include "v_palette.h" #include "g_levellocals.h" #include "r_data/colormaps.h" FPalette GPalette; FColorMatcher ColorMatcher; /* Current color blending values */ int BlendR, BlendG, BlendB, BlendA; static int sortforremap (const void *a, const void *b); static int sortforremap2 (const void *a, const void *b); /**************************/ /* Gamma correction stuff */ /**************************/ uint8_t newgamma[256]; CUSTOM_CVAR (Float, Gamma, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) { if (self == 0.f) { // Gamma values of 0 are illegal. self = 1.f; return; } if (screen != NULL) { screen->SetGamma (self); } } CCMD (bumpgamma) { // [RH] Gamma correction tables are now generated // on the fly for *any* gamma level. // Q: What are reasonable limits to use here? float newgamma = Gamma + 0.1f; if (newgamma > 3.0) newgamma = 1.0; Gamma = newgamma; Printf ("Gamma correction level %g\n", *Gamma); } /****************************/ /* Palette management stuff */ /****************************/ int BestColor (const uint32_t *pal_in, int r, int g, int b, int first, int num) { const PalEntry *pal = (const PalEntry *)pal_in; int bestcolor = first; int bestdist = 257 * 257 + 257 * 257 + 257 * 257; for (int color = first; color < num; color++) { int x = r - pal[color].r; int y = g - pal[color].g; int z = b - pal[color].b; int dist = x*x + y*y + z*z; if (dist < bestdist) { if (dist == 0) return color; bestdist = dist; bestcolor = color; } } return bestcolor; } FPalette::FPalette () { } FPalette::FPalette (const uint8_t *colors) { SetPalette (colors); } void FPalette::SetPalette (const uint8_t *colors) { for (int i = 0; i < 256; i++, colors += 3) { BaseColors[i] = PalEntry (colors[0], colors[1], colors[2]); Remap[i] = i; } // Find white and black from the original palette so that they can be // used to make an educated guess of the translucency % for a BOOM // translucency map. WhiteIndex = BestColor ((uint32_t *)BaseColors, 255, 255, 255, 0, 255); BlackIndex = BestColor ((uint32_t *)BaseColors, 0, 0, 0, 0, 255); } // In ZDoom's new texture system, color 0 is used as the transparent color. // But color 0 is also a valid color for Doom engine graphics. What to do? // Simple. The default palette for every game has at least one duplicate // color, so find a duplicate pair of palette entries, make one of them a // duplicate of color 0, and remap every graphic so that it uses that entry // instead of entry 0. void FPalette::MakeGoodRemap () { PalEntry color0 = BaseColors[0]; int i; // First try for an exact match of color 0. Only Hexen does not have one. for (i = 1; i < 256; ++i) { if (BaseColors[i] == color0) { Remap[0] = i; break; } } // If there is no duplicate of color 0, find the first set of duplicate // colors and make one of them a duplicate of color 0. In Hexen's PLAYPAL // colors 209 and 229 are the only duplicates, but we cannot assume // anything because the player might be using a custom PLAYPAL where those // entries are not duplicates. if (Remap[0] == 0) { PalEntry sortcopy[256]; for (i = 0; i < 256; ++i) { sortcopy[i] = BaseColors[i] | (i << 24); } qsort (sortcopy, 256, 4, sortforremap); for (i = 255; i > 0; --i) { if ((sortcopy[i] & 0xFFFFFF) == (sortcopy[i-1] & 0xFFFFFF)) { int new0 = sortcopy[i].a; int dup = sortcopy[i-1].a; if (new0 > dup) { // Make the lower-numbered entry a copy of color 0. (Just because.) swapvalues (new0, dup); } Remap[0] = new0; Remap[new0] = dup; BaseColors[new0] = color0; break; } } } // If there were no duplicates, InitPalette() will remap color 0 to the // closest matching color. Hopefully nobody will use a palette where all // 256 entries are different. :-) } static int sortforremap (const void *a, const void *b) { return (*(const uint32_t *)a & 0xFFFFFF) - (*(const uint32_t *)b & 0xFFFFFF); } struct RemappingWork { uint32_t Color; uint8_t Foreign; // 0 = local palette, 1 = foreign palette uint8_t PalEntry; // Entry # in the palette uint8_t Pad[2]; }; void FPalette::MakeRemap (const uint32_t *colors, uint8_t *remap, const uint8_t *useful, int numcolors) const { RemappingWork workspace[255+256]; int i, j, k; // Fill in workspace with the colors from the passed palette and this palette. // By sorting this array, we can quickly find exact matches so that we can // minimize the time spent calling BestColor for near matches. for (i = 1; i < 256; ++i) { workspace[i-1].Color = uint32_t(BaseColors[i]) & 0xFFFFFF; workspace[i-1].Foreign = 0; workspace[i-1].PalEntry = i; } for (i = k = 0, j = 255; i < numcolors; ++i) { if (useful == NULL || useful[i] != 0) { workspace[j].Color = colors[i] & 0xFFFFFF; workspace[j].Foreign = 1; workspace[j].PalEntry = i; ++j; ++k; } else { remap[i] = 0; } } qsort (workspace, j, sizeof(RemappingWork), sortforremap2); // Find exact matches --j; for (i = 0; i < j; ++i) { if (workspace[i].Foreign) { if (!workspace[i+1].Foreign && workspace[i].Color == workspace[i+1].Color) { remap[workspace[i].PalEntry] = workspace[i+1].PalEntry; workspace[i].Foreign = 2; ++i; --k; } } } // Find near matches if (k > 0) { for (i = 0; i <= j; ++i) { if (workspace[i].Foreign == 1) { remap[workspace[i].PalEntry] = BestColor ((uint32_t *)BaseColors, RPART(workspace[i].Color), GPART(workspace[i].Color), BPART(workspace[i].Color), 1, 255); } } } } static int sortforremap2 (const void *a, const void *b) { const RemappingWork *ap = (const RemappingWork *)a; const RemappingWork *bp = (const RemappingWork *)b; if (ap->Color == bp->Color) { return bp->Foreign - ap->Foreign; } else { return ap->Color - bp->Color; } } void ReadPalette(int lumpnum, uint8_t *buffer) { if (lumpnum < 0) { I_FatalError("Palette not found"); } FMemLump lump = Wads.ReadLump(lumpnum); uint8_t *lumpmem = (uint8_t*)lump.GetMem(); memset(buffer, 0, 768); if (memcmp(lumpmem, "JASC-PAL", 8)) { memcpy(buffer, lumpmem, MIN<size_t>(768, lump.GetSize())); } else { FScanner sc; sc.OpenMem(Wads.GetLumpFullName(lumpnum), (char*)lumpmem, int(lump.GetSize())); sc.MustGetString(); sc.MustGetNumber(); // version - ignore sc.MustGetNumber(); int colors = MIN(256, sc.Number) * 3; for (int i = 0; i < colors; i++) { sc.MustGetNumber(); if (sc.Number < 0 || sc.Number > 255) { sc.ScriptError("Color %d value out of range.", sc.Number); } buffer[i] = sc.Number; } } } void InitPalette () { uint8_t pal[768]; ReadPalette(Wads.CheckNumForName("PLAYPAL"), pal); GPalette.SetPalette (pal); GPalette.MakeGoodRemap (); ColorMatcher.SetPalette ((uint32_t *)GPalette.BaseColors); if (GPalette.Remap[0] == 0) { // No duplicates, so settle for something close to color 0 GPalette.Remap[0] = BestColor ((uint32_t *)GPalette.BaseColors, GPalette.BaseColors[0].r, GPalette.BaseColors[0].g, GPalette.BaseColors[0].b, 1, 255); } // Colormaps have to be initialized before actors are loaded, // otherwise Powerup.Colormap will not work. R_InitColormaps (); } void DoBlending_MMX (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a); void DoBlending_SSE2 (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a); void DoBlending (const PalEntry *from, PalEntry *to, int count, int r, int g, int b, int a) { if (a == 0) { if (from != to) { memcpy (to, from, count * sizeof(uint32_t)); } return; } else if (a == 256) { uint32_t t = MAKERGB(r,g,b); int i; for (i = 0; i < count; i++) { to[i] = t; } return; } #if defined(_M_X64) || defined(_M_IX86) || defined(__i386__) || defined(__amd64__) else if (CPU.bSSE2) { if (count >= 4) { int not3count = count & ~3; DoBlending_SSE2 (from, to, not3count, r, g, b, a); count &= 3; if (count <= 0) { return; } from += not3count; to += not3count; } } #endif #if defined(_M_IX86) || defined(__i386__) else if (CPU.bMMX) { if (count >= 4) { int not3count = count & ~3; DoBlending_MMX (from, to, not3count, r, g, b, a); count &= 3; if (count <= 0) { return; } from += not3count; to += not3count; } } #endif int i, ia; ia = 256 - a; r *= a; g *= a; b *= a; for (i = count; i > 0; i--, to++, from++) { to->r = (r + from->r * ia) >> 8; to->g = (g + from->g * ia) >> 8; to->b = (b + from->b * ia) >> 8; } } void V_SetBlend (int blendr, int blendg, int blendb, int blenda) { // Don't do anything if the new blend is the same as the old if (((blenda|BlendA) == 0) || (blendr == BlendR && blendg == BlendG && blendb == BlendB && blenda == BlendA)) return; V_ForceBlend (blendr, blendg, blendb, blenda); } void V_ForceBlend (int blendr, int blendg, int blendb, int blenda) { BlendR = blendr; BlendG = blendg; BlendB = blendb; BlendA = blenda; screen->SetFlash (PalEntry (BlendR, BlendG, BlendB), BlendA); } CCMD (testblend) { FString colorstring; int color; float amt; if (argv.argc() < 3) { Printf ("testblend <color> <amount>\n"); } else { if ( !(colorstring = V_GetColorStringByName (argv[1])).IsEmpty() ) { color = V_GetColorFromString (NULL, colorstring); } else { color = V_GetColorFromString (NULL, argv[1]); } amt = (float)atof (argv[2]); if (amt > 1.0f) amt = 1.0f; else if (amt < 0.0f) amt = 0.0f; BaseBlendR = RPART(color); BaseBlendG = GPART(color); BaseBlendB = BPART(color); BaseBlendA = amt; } } /****** Colorspace Conversion Functions ******/ // Code from http://www.cs.rit.edu/~yxv4997/t_convert.html // r,g,b values are from 0 to 1 // h = [0,360], s = [0,1], v = [0,1] // if s == 0, then h = -1 (undefined) // Green Doom guy colors: // RGB - 0: { .46 1 .429 } 7: { .254 .571 .206 } 15: { .0317 .0794 .0159 } // HSV - 0: { 116.743 .571 1 } 7: { 112.110 .639 .571 } 15: { 105.071 .800 .0794 } void RGBtoHSV (float r, float g, float b, float *h, float *s, float *v) { float min, max, delta, foo; if (r == g && g == b) { *h = 0; *s = 0; *v = r; return; } foo = r < g ? r : g; min = (foo < b) ? foo : b; foo = r > g ? r : g; max = (foo > b) ? foo : b; *v = max; // v delta = max - min; *s = delta / max; // s if (r == max) *h = (g - b) / delta; // between yellow & magenta else if (g == max) *h = 2 + (b - r) / delta; // between cyan & yellow else *h = 4 + (r - g) / delta; // between magenta & cyan *h *= 60; // degrees if (*h < 0) *h += 360; } void HSVtoRGB (float *r, float *g, float *b, float h, float s, float v) { int i; float f, p, q, t; if (s == 0) { // achromatic (grey) *r = *g = *b = v; return; } h /= 60; // sector 0 to 5 i = (int)floor (h); f = h - i; // factorial part of h p = v * (1 - s); q = v * (1 - s * f); t = v * (1 - s * (1 - f)); switch (i) { case 0: *r = v; *g = t; *b = p; break; case 1: *r = q; *g = v; *b = p; break; case 2: *r = p; *g = v; *b = t; break; case 3: *r = p; *g = q; *b = v; break; case 4: *r = t; *g = p; *b = v; break; default: *r = v; *g = p; *b = q; break; } }
23.675485
109
0.610623
351ELEC
f364f98554b8570a3c01ed661bdc0ded28f229aa
1,004
cpp
C++
GOOGLETEST/RangeValidator/testRunner.cpp
Amit-Khobragade/Google-Test-And-Mock-Examples-Using-Cmake
f1a3951c5fb9c29cc3de7deadb34caea5c8829d0
[ "MIT" ]
null
null
null
GOOGLETEST/RangeValidator/testRunner.cpp
Amit-Khobragade/Google-Test-And-Mock-Examples-Using-Cmake
f1a3951c5fb9c29cc3de7deadb34caea5c8829d0
[ "MIT" ]
null
null
null
GOOGLETEST/RangeValidator/testRunner.cpp
Amit-Khobragade/Google-Test-And-Mock-Examples-Using-Cmake
f1a3951c5fb9c29cc3de7deadb34caea5c8829d0
[ "MIT" ]
null
null
null
#include <iostream> // #include <gmock/gmock.h> #include <gtest/gtest.h> #include "checker.h" ///////////////////////////////////////////////////////////// //fixture class for parameters class RangeCheckerFixture: public testing::TestWithParam<double>{ public: RangeCheckerFixture() = default; protected: RangeChecker range{ 0.0, 100.0 }; }; ///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////// //test with param TEST_P( RangeCheckerFixture, TEST_IN_RANGE ){ int param = GetParam(); std::cout<< "\n\n" <<param << "\n\n"; bool testval= range( param ); ASSERT_TRUE( testval ); } ///////////////////////////////////////////////////////////// INSTANTIATE_TEST_CASE_P( TEST_IN_RANGE, RangeCheckerFixture, testing::Values(1,20,30,40,120)); int main( int argc, char* argv[] ){ testing::InitGoogleTest( &argc, argv ); return RUN_ALL_TESTS(); }
31.375
94
0.479084
Amit-Khobragade
f36943983cbb129ac4ea3529f8001b09153510c3
991
cpp
C++
CWin/CWin/control/radio_check_button_control_group.cpp
benbraide/CWin
0441b48a71fef0dbddabf61033d7286669772c1e
[ "MIT" ]
null
null
null
CWin/CWin/control/radio_check_button_control_group.cpp
benbraide/CWin
0441b48a71fef0dbddabf61033d7286669772c1e
[ "MIT" ]
null
null
null
CWin/CWin/control/radio_check_button_control_group.cpp
benbraide/CWin
0441b48a71fef0dbddabf61033d7286669772c1e
[ "MIT" ]
null
null
null
#include "../hook/responsive_hooks.h" #include "radio_check_button_control_group.h" cwin::control::radio_group::radio_group(){ insert_object<hook::contain>(nullptr); } cwin::control::radio_group::radio_group(tree &parent) : radio_group(parent, static_cast<std::size_t>(-1)){} cwin::control::radio_group::radio_group(tree &parent, std::size_t index) : radio_group(){ index_ = index; if (&parent.get_thread() == &thread_) set_parent_(parent); else//Error throw thread::exception::context_mismatch(); } cwin::control::radio_group::~radio_group(){ force_destroy_(); } bool cwin::control::radio_group::inserting_child_(ui::object &child){ return (dynamic_cast<check_button *>(&child) != nullptr || dynamic_cast<hook::object *>(&child) != nullptr); } void cwin::control::radio_group::create_(){ creation_state_ = true; } void cwin::control::radio_group::destroy_(){ creation_state_ = false; } bool cwin::control::radio_group::is_created_() const{ return creation_state_; }
24.775
109
0.732593
benbraide
f36de8688e0e1b1ff148c279b4264465268d51c7
4,033
hpp
C++
agency/execution/execution_policy/parallel_execution_policy.hpp
nerikhman/agency
966ac59101f2fc3561a86b11874fbe8de361d0e4
[ "BSD-3-Clause" ]
129
2016-08-18T23:24:15.000Z
2022-03-25T12:06:05.000Z
agency/execution/execution_policy/parallel_execution_policy.hpp
nerikhman/agency
966ac59101f2fc3561a86b11874fbe8de361d0e4
[ "BSD-3-Clause" ]
86
2016-08-19T03:43:33.000Z
2020-07-20T14:27:41.000Z
agency/execution/execution_policy/parallel_execution_policy.hpp
nerikhman/agency
966ac59101f2fc3561a86b11874fbe8de361d0e4
[ "BSD-3-Clause" ]
23
2016-08-18T23:52:13.000Z
2022-02-28T16:28:20.000Z
/// \file /// \brief Contains definition of parallel_execution_policy. /// #pragma once #include <agency/detail/config.hpp> #include <agency/execution/executor/parallel_executor.hpp> #include <agency/execution/execution_agent.hpp> #include <agency/execution/execution_policy/basic_execution_policy.hpp> namespace agency { /// \brief Encapsulates requirements for creating groups of parallel execution agents. /// \ingroup execution_policies /// /// /// When used as a control structure parameter, `parallel_execution_policy` requires the creation of a group of execution agents which execute in parallel. /// When agents in such a group execute on separate threads, they have no order. Otherwise, if agents in such a group execute on the same thread, /// they execute in an unspecified order. /// /// The type of execution agent `parallel_execution_policy` induces is `parallel_agent`, and the type of its associated executor is `parallel_executor`. /// /// \see execution_policies /// \see basic_execution_policy /// \see par /// \see parallel_agent /// \see parallel_executor /// \see parallel_execution_tag class parallel_execution_policy : public basic_execution_policy<parallel_agent, parallel_executor, parallel_execution_policy> { private: using super_t = basic_execution_policy<parallel_agent, parallel_executor, parallel_execution_policy>; public: using super_t::basic_execution_policy; }; /// \brief The global variable `par` is the default `parallel_execution_policy`. /// \ingroup execution_policies const parallel_execution_policy par{}; /// \brief Encapsulates requirements for creating two-dimensional groups of parallel execution agents. /// \ingroup execution_policies /// /// /// When used as a control structure parameter, `parallel_execution_policy_2d` requires the creation of a two-dimensional group of execution agents which execute in parallel. /// When agents in such a group execute on separate threads, they have no order. Otherwise, if agents in such a group execute on the same thread, /// they execute in an unspecified order. /// /// The type of execution agent `parallel_execution_policy_2d` induces is `parallel_agent_2d`, and the type of its associated executor is `parallel_executor`. /// /// \see execution_policies /// \see basic_execution_policy /// \see par /// \see parallel_agent_2d /// \see parallel_executor /// \see parallel_execution_tag class parallel_execution_policy_2d : public basic_execution_policy<parallel_agent_2d, parallel_executor, parallel_execution_policy_2d> { private: using super_t = basic_execution_policy<parallel_agent_2d, parallel_executor, parallel_execution_policy_2d>; public: using super_t::basic_execution_policy; }; /// \brief The global variable `par2d` is the default `parallel_execution_policy_2d`. /// \ingroup execution_policies const parallel_execution_policy_2d par2d{}; /// \brief The function template `parnd` creates an n-dimensional parallel /// execution policy that induces execution agents over the given domain. /// \ingroup execution_policies template<class Index> __AGENCY_ANNOTATION basic_execution_policy< agency::detail::basic_execution_agent<agency::bulk_guarantee_t::parallel_t,Index>, agency::parallel_executor > parnd(const agency::lattice<Index>& domain) { using policy_type = agency::basic_execution_policy< agency::detail::basic_execution_agent<agency::bulk_guarantee_t::parallel_t,Index>, agency::parallel_executor >; typename policy_type::param_type param(domain); return policy_type{param}; } /// \brief The function template `parnd` creates an n-dimensional parallel /// execution policy that creates agent groups of the given shape. /// \ingroup execution_policies template<class Shape> __AGENCY_ANNOTATION basic_execution_policy< agency::detail::basic_execution_agent<agency::bulk_guarantee_t::parallel_t,Shape>, agency::parallel_executor > parnd(const Shape& shape) { return agency::parnd(agency::make_lattice(shape)); } } // end agency
34.470085
174
0.782544
nerikhman
f36ec0beb28f0bdaab7502b50c403b3e88fbdd75
1,762
cxx
C++
src/configuration/BeaconCacheConfiguration.cxx
jeanmarcwatson/openkit-native
bb02b6555e992eae0e3632394ad587f345e92fcb
[ "Apache-2.0" ]
null
null
null
src/configuration/BeaconCacheConfiguration.cxx
jeanmarcwatson/openkit-native
bb02b6555e992eae0e3632394ad587f345e92fcb
[ "Apache-2.0" ]
null
null
null
src/configuration/BeaconCacheConfiguration.cxx
jeanmarcwatson/openkit-native
bb02b6555e992eae0e3632394ad587f345e92fcb
[ "Apache-2.0" ]
null
null
null
/** * Copyright 2018-2019 Dynatrace LLC * * 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 "configuration/BeaconCacheConfiguration.h" using namespace configuration; /// /// The default @ref BeaconCacheConfiguration when user does not override it. /// Default settings allow beacons which are max 2 hours old and unbounded memory limits. /// const std::chrono::milliseconds BeaconCacheConfiguration::DEFAULT_MAX_RECORD_AGE_IN_MILLIS = std::chrono::minutes(105); // 1hour and 45 minutes const int64_t BeaconCacheConfiguration::DEFAULT_UPPER_MEMORY_BOUNDARY_IN_BYTES = 100 * 1024 * 1024; // 100 MiB const int64_t BeaconCacheConfiguration::DEFAULT_LOWER_MEMORY_BOUNDARY_IN_BYTES = 80 * 1024 * 1024; // 80 MiB BeaconCacheConfiguration::BeaconCacheConfiguration(int64_t maxRecordAge, int64_t cacheSizeLowerBound, int64_t cacheSizeUpperBound) : mMaxRecordAge(maxRecordAge) , mCacheSizeLowerBound(cacheSizeLowerBound) , mCacheSizeUpperBound(cacheSizeUpperBound) { } int64_t BeaconCacheConfiguration::getMaxRecordAge() const { return mMaxRecordAge; } int64_t BeaconCacheConfiguration::getCacheSizeLowerBound() const { return mCacheSizeLowerBound; } int64_t BeaconCacheConfiguration::getCacheSizeUpperBound() const { return mCacheSizeUpperBound; }
35.24
143
0.799092
jeanmarcwatson
f37b9708cabd854b47d663424a149a05a7e84e72
7,196
cpp
C++
src/TundraCore/Script/Script.cpp
realXtend/tundra-urho3d
436d41c3e3dd1a9b629703ee76fd0ef2ee212ef8
[ "Apache-2.0" ]
13
2015-02-25T02:42:38.000Z
2018-07-31T11:40:56.000Z
src/TundraCore/Script/Script.cpp
realXtend/tundra-urho3d
436d41c3e3dd1a9b629703ee76fd0ef2ee212ef8
[ "Apache-2.0" ]
8
2015-02-12T22:27:05.000Z
2017-01-21T15:59:17.000Z
src/TundraCore/Script/Script.cpp
realXtend/tundra-urho3d
436d41c3e3dd1a9b629703ee76fd0ef2ee212ef8
[ "Apache-2.0" ]
12
2015-03-25T21:10:50.000Z
2019-04-10T09:03:10.000Z
// For conditions of distribution and use, see copyright notice in LICENSE #include "StableHeaders.h" #include "Script.h" #include "IScriptInstance.h" #include "ScriptAsset.h" #include "AssetAPI.h" #include "Framework.h" #include "IAttribute.h" #include "AttributeMetadata.h" #include "IAssetTransfer.h" #include "Entity.h" #include "AssetRefListener.h" #include "LoggingFunctions.h" namespace Tundra { Script::~Script() { // If we have a classname, empty it to trigger deletion of the script object if (!className.Get().Trimmed().Empty()) className.Set("", AttributeChange::LocalOnly); if (scriptInstance_) scriptInstance_->Unload(); scriptInstance_.Reset(); } void Script::SetScriptInstance(IScriptInstance *instance) { // If we already have a script instance, unload and delete it. if (scriptInstance_) { scriptInstance_->Unload(); scriptInstance_.Reset(); } scriptInstance_ = instance; } void Script::SetScriptApplication(Script* app) { if (app) scriptApplication_ = app; else scriptApplication_.Reset(); } Script* Script::ScriptApplication() const { return dynamic_cast<Script*>(scriptApplication_.Get()); } bool Script::ShouldRun() const { int mode = runMode.Get(); if (mode == RunOnBoth) return true; if (mode == RunOnClient && isClient_) return true; if (mode == RunOnServer && isServer_) return true; return false; } void Script::SetIsClientIsServer(bool isClient, bool isServer) { isClient_ = isClient; isServer_ = isServer; } void Script::Run(const String &name) { if (!ShouldRun()) { LogWarning("Run explicitly called, but RunMode does not match"); return; } // This function (Script::Run) is invoked on the Entity Action RunScript(scriptName). To // allow the user to differentiate between multiple instances of Script in the same entity, the first // parameter of RunScript allows the user to specify which Script to run. So, first check // if this Run message is meant for us. if (!name.Empty() && name != Name()) return; // Not our RunScript invocation - ignore it. if (!scriptInstance_) { LogError("Run: No script instance set"); return; } scriptInstance_->Run(); } /// Invoked on the Entity Action UnloadScript(scriptName). void Script::Unload(const String &name) { if (!name.Empty() && name != Name()) return; // Not our RunScript invocation - ignore it. if (!scriptInstance_) { LogError("Unload: Cannot perform, no script instance set"); return; } scriptInstance_->Unload(); } Script::Script(Urho3D::Context* context, Scene* scene): IComponent(context, scene), INIT_ATTRIBUTE_VALUE(scriptRef, "Script ref", AssetReferenceList("Script")), INIT_ATTRIBUTE_VALUE(runOnLoad, "Run on load", false), INIT_ATTRIBUTE_VALUE(runMode, "Run mode", RunOnBoth), INIT_ATTRIBUTE(applicationName, "Script application name"), INIT_ATTRIBUTE(className, "Script class name"), scriptInstance_(0), isClient_(false), isServer_(false) { static AttributeMetadata scriptRefData; static AttributeMetadata runModeData; static bool metadataInitialized = false; if (!metadataInitialized) { AttributeMetadata::ButtonInfoList scriptRefButtons; scriptRefData.buttons = scriptRefButtons; scriptRefData.elementType = "AssetReference"; runModeData.enums[RunOnBoth] = "Both"; runModeData.enums[RunOnClient] = "Client"; runModeData.enums[RunOnServer] = "Server"; metadataInitialized = true; } scriptRef.SetMetadata(&scriptRefData); runMode.SetMetadata(&runModeData); AttributeChanged.Connect(this, &Script::HandleAttributeChanged); ParentEntitySet.Connect(this, &Script::RegisterActions); } void Script::HandleAttributeChanged(IAttribute* attribute, AttributeChange::Type /*change*/) { if (!framework) return; if (attribute == &scriptRef) { // Do not even fetch the assets if we should not run if (!ShouldRun()) return; AssetReferenceList scripts = scriptRef.Get(); // Purge empty script refs scripts.RemoveEmpty(); if (scripts.Size()) scriptAssets->HandleChange(scripts); else // If there are no non-empty script refs, we unload the script instance. SetScriptInstance(0); } else if (attribute == &applicationName) { ApplicationNameChanged.Emit(this, applicationName.Get()); } else if (attribute == &className) { ClassNameChanged.Emit(this, className.Get()); } else if (attribute == &runMode) { // If we had not loaded script assets previously because of runmode not allowing, load them now if (ShouldRun()) { if (scriptAssets->Assets().Empty()) HandleAttributeChanged(&scriptRef, AttributeChange::Default); } else // If runmode is changed and shouldn't run, unload script assets and script instance { scriptAssets->HandleChange(AssetReferenceList()); SetScriptInstance(0); } } else if (attribute == &runOnLoad) { // If RunOnLoad changes, is true, and we don't have a script instance yet, emit ScriptAssetsChanged to start up the script. if (runOnLoad.Get() && scriptAssets->Assets().Size() && (!scriptInstance_ || !scriptInstance_->IsEvaluated())) OnScriptAssetLoaded(0, AssetPtr()); // The asset ptr can be null, it is not used. } } void Script::OnScriptAssetLoaded(uint /*index*/, AssetPtr /*asset_*/) { // If all asset ref listeners have valid, loaded script assets, it's time to fire up the script engine Vector<ScriptAssetPtr> loadedScriptAssets; Vector<AssetPtr> allAssets = scriptAssets->Assets(); for (uint i = 0; i < allAssets.Size(); ++i) { if (allAssets[i]) { ScriptAssetPtr asset = Urho3D::DynamicCast<ScriptAsset>(allAssets[i]); if (!asset) { LogError("Script::ScriptAssetLoaded: Loaded asset of type other than ScriptAsset!"); continue; } if (asset->IsLoaded()) loadedScriptAssets.Push(asset); } } if (loadedScriptAssets.Size() == allAssets.Size()) ScriptAssetsChanged.Emit(this, loadedScriptAssets); } void Script::RegisterActions() { Entity *entity = ParentEntity(); assert(entity); if (entity) { entity->Action("RunScript")->Triggered.Connect(this, &Script::RunTriggered); entity->Action("UnloadScript")->Triggered.Connect(this, &Script::UnloadTriggered); } scriptAssets = new AssetRefListListener(framework->Asset()); scriptAssets->Loaded.Connect(this, &Script::OnScriptAssetLoaded); } void Script::RunTriggered(const StringVector& params) { if (params.Size()) Run(params[0]); } void Script::UnloadTriggered(const StringVector& params) { if (params.Size()) Unload(params[0]); } }
29.371429
131
0.6505
realXtend
3ce18297a386f1e8912d40bf2e36749f0b7bbfca
31,907
cpp
C++
Ogitor/src/PGInstanceManager.cpp
nexustheru/ogitor
a700f8fefffa4ac51c5c20ad155e97e6700aabd4
[ "MIT" ]
null
null
null
Ogitor/src/PGInstanceManager.cpp
nexustheru/ogitor
a700f8fefffa4ac51c5c20ad155e97e6700aabd4
[ "MIT" ]
null
null
null
Ogitor/src/PGInstanceManager.cpp
nexustheru/ogitor
a700f8fefffa4ac51c5c20ad155e97e6700aabd4
[ "MIT" ]
2
2021-04-02T03:53:18.000Z
2022-03-03T07:12:16.000Z
/*///////////////////////////////////////////////////////////////////////////////// /// An /// ___ ____ ___ _____ ___ ____ /// / _ \ / ___|_ _|_ _/ _ \| _ \ /// | | | | | _ | | | || | | | |_) | /// | |_| | |_| || | | || |_| | _ < /// \___/ \____|___| |_| \___/|_| \_\ /// File /// /// Copyright (c) 2008-2016 Ismail TARIM <[email protected]> and the Ogitor Team /// /// The MIT License /// /// 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 "OgitorsPrerequisites.h" #include "BaseEditor.h" #include "OgitorsRoot.h" #include "OgitorsSystem.h" #include "CameraEditor.h" #include "ViewportEditor.h" #include "PGInstanceManager.h" #include "PGInstanceEditor.h" #include "OgitorsUndoManager.h" #include "tinyxml.h" #include "ofs.h" #include "PagedGeometry.h" #include "BatchPage.h" #include "ImpostorPage.h" #include "TreeLoader3D.h" using namespace Ogitors; using namespace Forests; //----------------------------------------------------------------------------------------- namespace Ogitors { class AddInstanceUndo : public OgitorsUndoBase { public: AddInstanceUndo(unsigned int objectID, int index) : mObjectID(objectID), mIndex(index) {}; virtual bool apply(); protected: unsigned int mObjectID; int mIndex; }; //----------------------------------------------------------------------------------------- class RemoveInstanceUndo : public OgitorsUndoBase { public: RemoveInstanceUndo(unsigned int objectID, Ogre::Vector3 pos, Ogre::Real scale, Ogre::Real yaw) : mObjectID(objectID), mPos(pos), mScale(scale), mYaw(yaw) {}; virtual bool apply(); protected: unsigned int mObjectID; Ogre::Vector3 mPos; Ogre::Real mScale; Ogre::Real mYaw; }; } //----------------------------------------------------------------------------------------- bool AddInstanceUndo::apply() { CPGInstanceManager *man = static_cast<CPGInstanceManager*>(OgitorsRoot::getSingletonPtr()->FindObject(mObjectID)); if(man) { PGInstanceInfo info = man->getInstanceInfo(mIndex); man->_deleteChildEditor(mIndex); man->removeInstance(mIndex); OgitorsUndoManager::getSingletonPtr()->AddUndo(OGRE_NEW RemoveInstanceUndo(mObjectID, info.pos, info.scale, info.yaw)); } return true; } //----------------------------------------------------------------------------------------- bool RemoveInstanceUndo::apply() { CPGInstanceManager *man = static_cast<CPGInstanceManager *>(OgitorsRoot::getSingletonPtr()->FindObject(mObjectID)); if(man) { int index = man->addInstance(mPos, mScale, mYaw); man->_createChildEditor(index , mPos, mScale, mYaw); OgitorsUndoManager::getSingletonPtr()->AddUndo(OGRE_NEW AddInstanceUndo(mObjectID, index)); } return true; } //----------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------- CPGInstanceManager::CPGInstanceManager(CBaseEditorFactory *factory) : CBaseEditor(factory), mHandle(0), mPGHandle(0), mEntityHandle(0), mPlacementMode(false), mNextInstanceIndex(0) { mHelper = 0; mHideChildrenInProgress = false; mLastFileName = ""; mUsingPlaceHolderMesh = false; mTempFileName = ""; mShowChildren = false; } //----------------------------------------------------------------------------------------- CPGInstanceManager::~CPGInstanceManager() { } //----------------------------------------------------------------------------------------- Ogre::AxisAlignedBox CPGInstanceManager::getAABB() { if(mEntityHandle) return mEntityHandle->getBoundingBox(); else return Ogre::AxisAlignedBox::BOX_NULL; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::update(float timePassed) { if(mPGHandle) mPGHandle->update(); return false; } //----------------------------------------------------------------------------------------- void CPGInstanceManager::showBoundingBox(bool bShow) { } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::setLayerImpl(unsigned int newlayer) { if(mEntityHandle) mEntityHandle->setVisibilityFlags(1 << newlayer); if(mLoaded->get()) { unLoad(); load(); } return true; } //----------------------------------------------------------------------------------------- void CPGInstanceManager::setSelectedImpl(bool bSelected) { if(!bSelected) { mPlacementMode = false; mOgitorsRoot->ReleaseMouse(); } } //----------------------------------------------------------------------------------------- void CPGInstanceManager::_save(Ogre::String filename) { std::stringstream stream; PGInstanceList::iterator it = mInstanceList.begin(); while(it != mInstanceList.end()) { stream << Ogre::StringConverter::toString(it->first).c_str(); stream << ";"; stream << Ogre::StringConverter::toString(it->second.pos).c_str(); stream << ";"; stream << Ogre::StringConverter::toString(it->second.scale).c_str(); stream << ";"; stream << Ogre::StringConverter::toString(it->second.yaw).c_str(); stream << "\n"; it++; } OgitorsUtils::SaveStreamOfs(stream, filename); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::onSave(bool forced) { Ogre::String dir = "/PGInstances/"; OFS::OfsPtr& mFile = mOgitorsRoot->GetProjectFile(); mFile->createDirectory(dir.c_str()); Ogre::String name = mName->get(); std::replace(name.begin(), name.end(), '<', ' '); std::replace(name.begin(), name.end(), '>', ' '); std::replace(name.begin(), name.end(), '#', ' '); if(!mLastFileName.empty()) mFile->deleteFile(mLastFileName.c_str()); if(!mTempFileName.empty()) mFile->deleteFile(mTempFileName.c_str()); Ogre::String filename = dir + Ogre::StringConverter::toString(mObjectID->get()) + "_" + name + ".instance"; mLastFileName = filename; _save(filename); mTempModified->set(false); mTempFileName = ""; } //----------------------------------------------------------------------------------------- void CPGInstanceManager::_onLoad() { Ogre::String filename; if(mTempModified->get()) { if(mTempFileName.empty()) mTempFileName = "/Temp/tmp" + Ogre::StringConverter::toString(mObjectID->get()) + ".instance"; filename = mTempFileName; } else { Ogre::String name = mName->get(); std::replace(name.begin(), name.end(), '<', ' '); std::replace(name.begin(), name.end(), '>', ' '); std::replace(name.begin(), name.end(), '#', ' '); filename = "/PGInstances/" + Ogre::StringConverter::toString(mObjectID->get()) + "_" + name + ".instance"; } OFS::OFSHANDLE handle; OFS::OfsPtr& mFile = mOgitorsRoot->GetProjectFile(); OFS::OfsResult ret = mFile->openFile(handle, filename.c_str()); if(ret != OFS::OFS_OK) return; OFS::ofs64 file_size = 0; mFile->getFileSize(handle, file_size); if(file_size == 0) { mFile->closeFile(handle); return; } char *buffer = new char[(unsigned int)file_size]; mFile->read(handle, buffer, (unsigned int)file_size); std::stringstream stream; stream << buffer; delete [] buffer; if(!mTempModified->get()) mLastFileName = filename; Ogre::StringVector list; char res[128]; while(!stream.eof()) { stream.getline(res, 128); Ogre::String resStr(res); OgitorsUtils::ParseStringVector(resStr, list); if(list.size() == 3) { PGInstanceInfo info; info.pos = Ogre::StringConverter::parseVector3(list[0]); info.scale = Ogre::StringConverter::parseReal(list[1]); info.yaw = Ogre::StringConverter::parseReal(list[2]); mInstanceList[mNextInstanceIndex++] = info; } else if(list.size() == 4) { PGInstanceInfo info; int index = Ogre::StringConverter::parseInt(list[0]); info.pos = Ogre::StringConverter::parseVector3(list[1]); info.scale = Ogre::StringConverter::parseReal(list[2]); info.yaw = Ogre::StringConverter::parseReal(list[3]); info.instance = 0; mInstanceList[index] = info; if(index >= mNextInstanceIndex) mNextInstanceIndex = index + 1; } } } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::getObjectContextMenu(UTFStringVector &menuitems) { menuitems.clear(); if(!mEntityHandle) return false; if(mPlacementMode) menuitems.push_back(OTR("Stop Placement")); else menuitems.push_back(OTR("Start Placement")); if(mInstanceList.size()) { if(mShowChildren) menuitems.push_back(OTR("Hide Children")); else menuitems.push_back(OTR("Show Children")); } return true; } //------------------------------------------------------------------------------- void CPGInstanceManager::onObjectContextMenu(int menuresult) { if(menuresult == 0) { mPlacementMode = !mPlacementMode; if(mPlacementMode) mOgitorsRoot->CaptureMouse(this); else mOgitorsRoot->ReleaseMouse(); } else if(menuresult == 1) { if(mShowChildren) { mHideChildrenInProgress = true; NameObjectPairList::iterator i, iend; iend = mChildren.end(); for (i = mChildren.begin(); i != iend; ++i) { mSystem->DeleteTreeItem(i->second); i->second->destroy(); } mChildren.clear(); mHideChildrenInProgress = false; mShowChildren = false; } else { mShowChildren = true; PGInstanceList::iterator it = mInstanceList.begin(); while(it != mInstanceList.end()) { _createChildEditor(it->first, it->second.pos, it->second.scale, it->second.yaw); it++; } } } } //----------------------------------------------------------------------------------------- void CPGInstanceManager::createProperties(OgitorsPropertyValueMap &params) { PROPERTY_PTR(mModel , "model" , Ogre::String , "" , 0, SETTER(Ogre::String, CPGInstanceManager, _setModel)); PROPERTY_PTR(mPageSize , "pagesize" , int , 75 , 0, SETTER(int, CPGInstanceManager, _setPageSize)); PROPERTY_PTR(mBatchDistance , "batchdistance" , int , 75 , 0, SETTER(int, CPGInstanceManager, _setBatchDistance)); PROPERTY_PTR(mImpostorDistance, "impostordistance", int , 1000, 0, SETTER(int, CPGInstanceManager, _setImpostorDistance)); PROPERTY_PTR(mBounds , "bounds" , Ogre::Vector4, Ogre::Vector4(-10000,-10000,10000,10000), 0, SETTER(Ogre::Vector4, CPGInstanceManager, _setBounds)); PROPERTY_PTR(mCastShadows , "castshadows" , bool ,false,0, SETTER(bool, CPGInstanceManager, _setCastShadows)); PROPERTY_PTR(mTempModified , "tempmodified" , bool ,false,0, 0); PROPERTY_PTR(mMinScale , "randomizer::minscale", Ogre::Real,1.0f,0, 0); PROPERTY_PTR(mMaxScale , "randomizer::maxscale", Ogre::Real,1.0f,0, 0); PROPERTY_PTR(mMinYaw , "randomizer::minyaw", Ogre::Real , 0.0f,0, 0); PROPERTY_PTR(mMaxYaw , "randomizer::maxyaw", Ogre::Real , 0.0f,0, 0); mProperties.initValueMap(params); } //----------------------------------------------------------------------------------------- TiXmlElement* CPGInstanceManager::exportDotScene(TiXmlElement *pParent) { Ogre::String name = mName->get(); std::replace(name.begin(), name.end(), '<', ' '); std::replace(name.begin(), name.end(), '>', ' '); std::replace(name.begin(), name.end(), '#', ' '); name = Ogre::StringConverter::toString(mObjectID->get()) + "_" + name; Ogre::String filename = "PGInstances/" + name + ".instance"; TiXmlElement *pNode = pParent->InsertEndChild(TiXmlElement("node"))->ToElement(); // node properties pNode->SetAttribute("name", mName->get().c_str()); pNode->SetAttribute("id", Ogre::StringConverter::toString(mObjectID->get()).c_str()); // position TiXmlElement *pPosition = pNode->InsertEndChild(TiXmlElement("position"))->ToElement(); pPosition->SetAttribute("x", "0"); pPosition->SetAttribute("y", "0"); pPosition->SetAttribute("z", "0"); // rotation TiXmlElement *pRotation = pNode->InsertEndChild(TiXmlElement("rotation"))->ToElement(); pRotation->SetAttribute("qw", "1"); pRotation->SetAttribute("qx", "0"); pRotation->SetAttribute("qy", "0"); pRotation->SetAttribute("qz", "0"); // scale TiXmlElement *pScale = pNode->InsertEndChild(TiXmlElement("scale"))->ToElement(); pScale->SetAttribute("x", "1"); pScale->SetAttribute("y", "1"); pScale->SetAttribute("z", "1"); TiXmlElement *pPG = pNode->InsertEndChild(TiXmlElement("pagedgeometry"))->ToElement(); pPG->SetAttribute("fileName", filename.c_str()); pPG->SetAttribute("model", mModel->get().c_str()); pPG->SetAttribute("pageSize", Ogre::StringConverter::toString(mPageSize->get()).c_str()); pPG->SetAttribute("batchDistance", Ogre::StringConverter::toString(mBatchDistance->get()).c_str()); pPG->SetAttribute("impostorDistance", Ogre::StringConverter::toString(mImpostorDistance->get()).c_str()); pPG->SetAttribute("bounds", Ogre::StringConverter::toString(mBounds->get()).c_str()); pPG->SetAttribute("castShadows", Ogre::StringConverter::toString(mCastShadows->get()).c_str()); return pPG; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::load(bool async) { if(mLoaded->get()) return true; Ogre::String tmpDir = OgitorsUtils::QualifyPath(mOgitorsRoot->GetProjectOptions()->ProjectDir + "/Temp") + "/"; mPGHandle = new PagedGeometry(); mPGHandle->setCamera(mOgitorsRoot->GetViewport()->getCameraEditor()->getCamera()); mPGHandle->setPageSize(mPageSize->get()); mPGHandle->setInfinite(); mPGHandle->setTempDir(tmpDir); mPGHandle->addDetailLevel<BatchPage>(mBatchDistance->get(),0); mPGHandle->addDetailLevel<ImpostorPage>(mImpostorDistance->get(),0); Ogre::Vector4 bounds = mBounds->get(); mHandle = new Forests::TreeLoader3D(mPGHandle, Forests::TBounds(bounds.x, bounds.y, bounds.z, bounds.w)); mPGHandle->setPageLoader(mHandle); if(mInstanceList.size() == 0) _onLoad(); if(mModel->get() != "") { try { mEntityHandle = mOgitorsRoot->GetSceneManager()->createEntity(mName->get(), mModel->get() + ".mesh", PROJECT_RESOURCE_GROUP); mUsingPlaceHolderMesh = false; } catch(...) { mUsingPlaceHolderMesh = true; mEntityHandle = mOgitorsRoot->GetSceneManager()->createEntity(mName->get(), "missing_mesh.mesh"); mEntityHandle->setMaterialName("MAT_GIZMO_X_L"); } mEntityHandle->setQueryFlags(0); mEntityHandle->setVisibilityFlags(1 << mLayer->get()); mEntityHandle->setCastShadows(mCastShadows->get()); PGInstanceList::iterator it = mInstanceList.begin(); while(it != mInstanceList.end()) { mHandle->addTree(mEntityHandle, it->second.pos, Ogre::Degree(it->second.yaw), it->second.scale); it++; } } registerForUpdates(); mLoaded->set(true); return true; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::unLoad() { if(!mLoaded->get()) return true; if(mOgitorsRoot->GetLoadState() != LS_UNLOADED) { if(mTempFileName.empty()) { mTempFileName = "/Temp/tmp" + Ogre::StringConverter::toString(mObjectID->get()) + ".instance"; } _save(mTempFileName); mTempModified->set(true); } unRegisterForUpdates(); if(mHandle) delete mHandle; if(mPGHandle) delete mPGHandle; if(mEntityHandle) mOgitorsRoot->GetSceneManager()->destroyEntity(mEntityHandle); mHandle = 0; mPGHandle = 0; mEntityHandle = 0; if(mPlacementMode) mOgitorsRoot->ReleaseMouse(); mPlacementMode = false; mLoaded->set(false); return true; } //----------------------------------------------------------------------------------------- PGInstanceInfo CPGInstanceManager::getInstanceInfo(int index) { PGInstanceList::iterator it = mInstanceList.find(index); if(it != mInstanceList.end()) { return it->second; } return PGInstanceInfo(); } //----------------------------------------------------------------------------------------- int CPGInstanceManager::addInstance(const Ogre::Vector3& pos, const Ogre::Real& scale, const Ogre::Real& yaw) { if(!mEntityHandle || !mHandle) return -1; mHandle->addTree(mEntityHandle, pos, Ogre::Degree(yaw), scale); PGInstanceInfo instance; instance.pos = pos; instance.scale = scale; instance.yaw = yaw; instance.instance = 0; int result = mNextInstanceIndex++; mInstanceList.insert(PGInstanceList::value_type(result, instance)); return result; } //----------------------------------------------------------------------------------------- void CPGInstanceManager::removeInstance(int index) { if(!mLoaded->get() || index == -1) return; PGInstanceList::iterator it = mInstanceList.find(index); if(it != mInstanceList.end()) { it->second.instance = 0; if(!mHideChildrenInProgress) { mHandle->deleteTrees(it->second.pos, 0.01f, mEntityHandle); mInstanceList.erase(it); } } } //----------------------------------------------------------------------------------------- void CPGInstanceManager::modifyInstancePosition(int index, const Ogre::Vector3& pos) { if(!mHandle || index == -1) return; PGInstanceList::iterator it = mInstanceList.find(index); if(it != mInstanceList.end()) { if(mEntityHandle) { mHandle->deleteTrees(it->second.pos, 0.01f, mEntityHandle); mHandle->addTree(mEntityHandle, pos, Ogre::Degree(it->second.yaw), it->second.scale); } it->second.pos = pos; } } //----------------------------------------------------------------------------------------- void CPGInstanceManager::modifyInstanceScale(int index, Ogre::Real scale) { if(!mHandle || index == -1) return; PGInstanceList::iterator it = mInstanceList.find(index); if(it != mInstanceList.end()) { it->second.scale = scale; if(mEntityHandle) { mHandle->deleteTrees(it->second.pos, 0.01f, mEntityHandle); mHandle->addTree(mEntityHandle, it->second.pos, Ogre::Degree(it->second.yaw), it->second.scale); } } } //----------------------------------------------------------------------------------------- void CPGInstanceManager::modifyInstanceYaw(int index, Ogre::Real yaw) { if(!mHandle || index == -1) return; PGInstanceList::iterator it = mInstanceList.find(index); if(it != mInstanceList.end()) { it->second.yaw = yaw; if(mEntityHandle) { mHandle->deleteTrees(it->second.pos, 0.01f, mEntityHandle); mHandle->addTree(mEntityHandle, it->second.pos, Ogre::Degree(it->second.yaw), it->second.scale); } } } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::_setModel(OgitorsPropertyBase* property, const Ogre::String& value) { Ogre::String newname = "PGInstance<" + value + ">"; newname += mOgitorsRoot->CreateUniqueID(newname,""); if(mPlacementMode) { mPlacementMode = false; mOgitorsRoot->ReleaseMouse(); } mModel->init(value); mName->set(newname); return true; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::_setPageSize(OgitorsPropertyBase* property, const int& value) { if(value < 10) return false; if(mLoaded->get()) { unLoad(); load(); } return true; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::_setBatchDistance(OgitorsPropertyBase* property, const int& value) { if(value < 50) return false; if(mLoaded->get()) { unLoad(); load(); } return true; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::_setImpostorDistance(OgitorsPropertyBase* property, const int& value) { if(value < (mBatchDistance->get() + 50)) return false; if(mLoaded->get()) { unLoad(); load(); } return true; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::_setBounds(OgitorsPropertyBase* property, const Ogre::Vector4& value) { if(mLoaded->get()) { unLoad(); load(); } return true; } //----------------------------------------------------------------------------------------- bool CPGInstanceManager::_setCastShadows(OgitorsPropertyBase* property, const bool& value) { if(mEntityHandle) { mEntityHandle->setCastShadows(value); } if(mPGHandle) mPGHandle->reloadGeometry(); return true; } //----------------------------------------------------------------------------------------- void CPGInstanceManager::_createChildEditor(int index, Ogre::Vector3 pos, Ogre::Real scale, Ogre::Real yaw) { if(index == -1 || !mShowChildren) return; //We do not want an UNDO to be created for creation of children OgitorsUndoManager::getSingletonPtr()->BeginCollection("Eat Creation"); OgitorsPropertyValueMap params; params["init"] = OgitorsPropertyValue(PROP_STRING, Ogre::Any(Ogre::String(""))); params["position"] = OgitorsPropertyValue(PROP_VECTOR3, Ogre::Any(pos)); params["index"] = OgitorsPropertyValue(PROP_INT, Ogre::Any(index)); params["scale"] = OgitorsPropertyValue(PROP_VECTOR3, Ogre::Any(Ogre::Vector3(scale, scale, scale))); params["uniformscale"] = OgitorsPropertyValue(PROP_REAL, Ogre::Any(scale)); params["yaw"] = OgitorsPropertyValue(PROP_REAL, Ogre::Any(yaw)); Ogre::Quaternion q1; q1.FromAngleAxis(Ogre::Degree(yaw), Ogre::Vector3::UNIT_Y); params["orientation"] = OgitorsPropertyValue(PROP_QUATERNION, Ogre::Any(q1)); mInstanceList[index].instance = static_cast<CPGInstanceEditor*>(mOgitorsRoot->CreateEditorObject(this, "PGInstance", params, true, false)); OgitorsUndoManager::getSingletonPtr()->EndCollection(false, true); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::_deleteChildEditor(int index) { if(index == -1 || !mShowChildren) return; //We do not want an UNDO to be created for deletion of children OgitorsUndoManager::getSingletonPtr()->BeginCollection("Eat Deletion"); PGInstanceList::iterator it = mInstanceList.find(index); if(it != mInstanceList.end()) { mHideChildrenInProgress = true; if(it->second.instance) { mSystem->DeleteTreeItem(it->second.instance); it->second.instance->destroy(true); it->second.instance = 0; } mHideChildrenInProgress = false; } OgitorsUndoManager::getSingletonPtr()->EndCollection(false, true); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseLeftUp (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseLeftDown (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { Ogre::Camera *cam = viewport->getCameraEditor()->getCamera(); Ogre::Viewport *vp = static_cast<Ogre::Viewport*>(viewport->getHandle()); float width = vp->getActualWidth(); float height = vp->getActualHeight(); Ogre::Ray mRay = cam->getCameraToViewportRay(point.x / width, point.y / height); Ogre::Vector3 vPos; if(viewport->GetHitPosition(mRay, vPos)) { float yaw = (mMaxYaw->get() - mMinYaw->get()) * Ogre::Math::UnitRandom() + mMinYaw->get(); float scale = (mMaxScale->get() - mMinScale->get()) * Ogre::Math::UnitRandom() + mMinScale->get(); int index = addInstance(vPos, scale, yaw); OgitorsUndoManager::getSingletonPtr()->BeginCollection("Add Instance"); _createChildEditor(index , vPos, scale, yaw); OgitorsUndoManager::getSingletonPtr()->AddUndo(OGRE_NEW AddInstanceUndo(mObjectID->get(), index)); OgitorsUndoManager::getSingletonPtr()->EndCollection(true); } } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseMove (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { viewport->OnMouseMove(point, buttons & ~OMB_LEFT); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseLeave (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { viewport->OnMouseLeave(point, buttons); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseRightDown (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { viewport->OnMouseRightDown(point, buttons); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseRightUp (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { viewport->OnMouseRightUp(point, buttons); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseMiddleDown (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { viewport->OnMouseMiddleDown(point, buttons); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseMiddleUp (CViewportEditor *viewport, Ogre::Vector2 point, unsigned int buttons) { viewport->OnMouseMiddleUp(point, buttons); } //----------------------------------------------------------------------------------------- void CPGInstanceManager::OnMouseWheel (CViewportEditor *viewport, Ogre::Vector2 point, float delta, unsigned int buttons) { viewport->OnMouseWheel(point, delta, buttons); } //----------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------- //------CMATERIALEDITORFACTORY----------------------------------------------------------------- //----------------------------------------------------------------------------------------- CPGInstanceManagerFactory::CPGInstanceManagerFactory(OgitorsView *view) : CBaseEditorFactory(view) { mTypeName = "PGInstance Manager"; mEditorType = ETYPE_CUSTOM_MANAGER; mAddToObjectList = true; mRequirePlacement = false; mIcon = "pagedgeometry.svg"; mCapabilities = CAN_UNDO | CAN_DELETE; mUsesGizmos = false; mUsesHelper = false; OgitorsPropertyDef *definition = AddPropertyDefinition("model", "Model", "The model to be used.", PROP_STRING); definition->setOptions(OgitorsRoot::getSingletonPtr()->GetModelNames()); AddPropertyDefinition("pagesize", "Page Size", "Size of batch pages.",PROP_INT); AddPropertyDefinition("batchdistance", "Batch Distance", "Batch Distance.",PROP_INT); AddPropertyDefinition("impostordistance", "Impostor Distance", "Impostor Distance.",PROP_INT); definition = AddPropertyDefinition("bounds", "Bounds", "The dimensions of the bounding area.",PROP_VECTOR4); definition->setFieldNames("X1","Z1","X2","Z2"); AddPropertyDefinition("castshadows","Cast Shadows","Do the instances cast shadows?",PROP_BOOL); AddPropertyDefinition("tempmodified", "", "Is it temporarily modified.", PROP_BOOL); AddPropertyDefinition("randomizer::minscale", "Randomizer::Min. Scale", "Minimum Scale of new objects.",PROP_REAL); AddPropertyDefinition("randomizer::maxscale", "Randomizer::Max. Scale", "Maximum Scale of new objects.",PROP_REAL); AddPropertyDefinition("randomizer::minyaw", "Randomizer::Min. Yaw", "Minimum Yaw of new objects.",PROP_REAL); AddPropertyDefinition("randomizer::maxyaw", "Randomizer::Max. Yaw", "Maximum Yaw of new objects.",PROP_REAL); OgitorsPropertyDefMap::iterator it = mPropertyDefs.find("name"); it->second.setAccess(true, false); } //----------------------------------------------------------------------------------------- CBaseEditorFactory *CPGInstanceManagerFactory::duplicate(OgitorsView *view) { CBaseEditorFactory *ret = new CPGInstanceManagerFactory(view); ret->mTypeID = mTypeID; return ret; } //----------------------------------------------------------------------------------------- CBaseEditor *CPGInstanceManagerFactory::CreateObject(CBaseEditor **parent, OgitorsPropertyValueMap &params) { CPGInstanceManager *object = new CPGInstanceManager(this); OgitorsPropertyValueMap::iterator ni; if((ni = params.find("init")) != params.end()) { OgitorsPropertyValue value = EMPTY_PROPERTY_VALUE; value.val = Ogre::Any(CreateUniqueID("PGInstance<>")); params["name"] = value; params.erase(ni); } object->createProperties(params); object->mParentEditor->init(*parent); mInstanceCount++; return object; } //-----------------------------------------------------------------------------------------
35.334441
171
0.551133
nexustheru
3ce3623a40bc8290b36449418088e85ccbafb816
2,518
hpp
C++
alpaka/include/alpaka/time/TimeOmp.hpp
alpaka-group/mallocMC
ddba224b764885f816c42a7719551b14e6f5752b
[ "MIT" ]
6
2021-02-01T09:01:39.000Z
2021-11-14T17:09:03.000Z
alpaka/include/alpaka/time/TimeOmp.hpp
alpaka-group/mallocMC
ddba224b764885f816c42a7719551b14e6f5752b
[ "MIT" ]
17
2020-11-09T14:13:50.000Z
2021-11-03T11:54:54.000Z
alpaka/include/alpaka/time/TimeOmp.hpp
alpaka-group/mallocMC
ddba224b764885f816c42a7719551b14e6f5752b
[ "MIT" ]
null
null
null
/* Copyright 2019 Axel Huebl, Benjamin Worpitz * * This file is part of alpaka. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #pragma once #ifdef _OPENMP # include <alpaka/core/Common.hpp> # include <alpaka/core/Unused.hpp> # include <alpaka/time/Traits.hpp> # include <omp.h> namespace alpaka { //############################################################################# //! The OpenMP accelerator time implementation. class TimeOmp : public concepts::Implements<ConceptTime, TimeOmp> { public: //----------------------------------------------------------------------------- TimeOmp() = default; //----------------------------------------------------------------------------- ALPAKA_FN_HOST TimeOmp(TimeOmp const&) = delete; //----------------------------------------------------------------------------- ALPAKA_FN_HOST TimeOmp(TimeOmp&&) = delete; //----------------------------------------------------------------------------- ALPAKA_FN_HOST auto operator=(TimeOmp const&) -> TimeOmp& = delete; //----------------------------------------------------------------------------- ALPAKA_FN_HOST auto operator=(TimeOmp&&) -> TimeOmp& = delete; //----------------------------------------------------------------------------- /*virtual*/ ~TimeOmp() = default; }; namespace traits { //############################################################################# //! The OpenMP accelerator clock operation. template<> struct Clock<TimeOmp> { //----------------------------------------------------------------------------- ALPAKA_FN_HOST static auto clock(TimeOmp const& time) -> std::uint64_t { alpaka::ignore_unused(time); // NOTE: We compute the number of clock ticks by dividing the following durations: // - omp_get_wtime returns the elapsed wall clock time in seconds. // - omp_get_wtick gets the timer precision, i.e., the number of seconds between two successive clock // ticks. return static_cast<std::uint64_t>(omp_get_wtime() / omp_get_wtick()); } }; } // namespace traits } // namespace alpaka #endif
39.968254
117
0.42772
alpaka-group
3ce7ed4adf5a2f71aad64ff2b4cfd04321b8d76a
976
hpp
C++
include/afsm/detail/event_identity.hpp
galek/afsm
49181bf52fa2ab8bcea6017d11b3cd321b56c13c
[ "Artistic-2.0" ]
133
2016-11-20T18:23:09.000Z
2022-03-28T07:25:04.000Z
include/afsm/detail/event_identity.hpp
galek/afsm
49181bf52fa2ab8bcea6017d11b3cd321b56c13c
[ "Artistic-2.0" ]
24
2016-11-14T17:13:50.000Z
2021-08-31T15:48:48.000Z
include/afsm/detail/event_identity.hpp
galek/afsm
49181bf52fa2ab8bcea6017d11b3cd321b56c13c
[ "Artistic-2.0" ]
24
2019-02-06T22:13:42.000Z
2022-01-20T05:42:52.000Z
/* * event_identity.hpp * * Created on: Dec 20, 2016 * Author: zmij */ #ifndef AFSM_DETAIL_EVENT_IDENTITY_HPP_ #define AFSM_DETAIL_EVENT_IDENTITY_HPP_ #include <type_traits> #include <set> #include <pushkin/meta/type_tuple.hpp> namespace afsm { namespace detail { struct event_base { struct id_type {}; }; template < typename T > struct event : event_base { static constexpr id_type id{}; }; template < typename T > constexpr event_base::id_type event<T>::id; template < typename T > struct event_identity { using event_type = typename ::std::decay<T>::type; using type = event<event_type>; }; using event_set = ::std::set< event_base::id_type const* >; template < typename ... T > event_set make_event_set( ::psst::meta::type_tuple<T...> const& ) { return event_set{ &event_identity<T>::type::id... }; } } /* namespace detail */ } /* namespace afsm */ #endif /* AFSM_DETAIL_EVENT_IDENTITY_HPP_ */
18.415094
67
0.667008
galek
3cee5c9c41096baec5a2fa929d822d9f616f7af5
968
cpp
C++
leetcode-problems/medium/17-phone-number.cpp
formatkaka/dsalgo
a7c7386c5c161e23bc94456f93cadd0f91f102fa
[ "Unlicense" ]
null
null
null
leetcode-problems/medium/17-phone-number.cpp
formatkaka/dsalgo
a7c7386c5c161e23bc94456f93cadd0f91f102fa
[ "Unlicense" ]
null
null
null
leetcode-problems/medium/17-phone-number.cpp
formatkaka/dsalgo
a7c7386c5c161e23bc94456f93cadd0f91f102fa
[ "Unlicense" ]
null
null
null
// // Created by Siddhant on 2019-11-15. // #include "iostream" #include "vector" #include "string" using namespace std; vector<string> map = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; vector<string> letterCombinations(string digits) { vector<string> s; vector<string> old; for (int i = 0; i < digits.size(); i++) { int digit = digits[i] - '0'; if (s.empty()) { for (int j = 0; j < map[digit].size(); j++) { string character(1,map[digit][j]); s.push_back(character); } old = s; continue; } s = {}; for (int j = 0; j < map[digit].size(); j++) { for (int k = 0; k < old.size(); k++) { s.push_back(old[k] + map[digit][j]); } } old = s; } return s; } int main() { letterCombinations("23"); cout << "hello"; return 0; }
18.264151
88
0.44938
formatkaka
3ceeffa74ff7d034e15e310b190f62700940aa1d
840
hpp
C++
SDK/ARKSurvivalEvolved_MissionRace_Interface_classes.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
10
2020-02-17T19:08:46.000Z
2021-07-31T11:07:19.000Z
SDK/ARKSurvivalEvolved_MissionRace_Interface_classes.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
9
2020-02-17T18:15:41.000Z
2021-06-06T19:17:34.000Z
SDK/ARKSurvivalEvolved_MissionRace_Interface_classes.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
3
2020-07-22T17:42:07.000Z
2021-06-19T17:16:13.000Z
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_MissionRace_Interface_structs.hpp" namespace sdk { //--------------------------------------------------------------------------- //Classes //--------------------------------------------------------------------------- // BlueprintGeneratedClass MissionRace_Interface.MissionRace_Interface_C // 0x0000 (0x0028 - 0x0028) class UMissionRace_Interface_C : public UInterface { public: static UClass* StaticClass() { static auto ptr = UObject::FindClass("BlueprintGeneratedClass MissionRace_Interface.MissionRace_Interface_C"); return ptr; } void GetPlayerRanking(int PlayerIndex, int* Ranking); void GetRaceData(TArray<struct FRacePlayerData>* RaceData); }; } #ifdef _MSC_VER #pragma pack(pop) #endif
21
112
0.638095
2bite
3cf2700a6aa1adfce4e21b2d01c332e038240877
215
hpp
C++
bunsan/utility/include/bunsan/utility/error.hpp
bacsorg/bacs
2b52feb9efc805655cdf7829cf77ee028d567969
[ "Apache-2.0" ]
null
null
null
bunsan/utility/include/bunsan/utility/error.hpp
bacsorg/bacs
2b52feb9efc805655cdf7829cf77ee028d567969
[ "Apache-2.0" ]
10
2018-02-06T14:46:36.000Z
2018-03-20T13:37:20.000Z
bunsan/utility/include/bunsan/utility/error.hpp
bacsorg/bacs
2b52feb9efc805655cdf7829cf77ee028d567969
[ "Apache-2.0" ]
1
2021-11-26T10:59:09.000Z
2021-11-26T10:59:09.000Z
#pragma once #include <bunsan/error.hpp> namespace bunsan::utility { struct error : virtual bunsan::error { error() = default; explicit error(const std::string &message_); }; } // namespace bunsan::utility
16.538462
46
0.702326
bacsorg
3cf43adb15c2d36bcf0c212a4eb39b22a66cb18c
6,381
cpp
C++
src/mongo/s/s_only.cpp
guanhe0/mongo
75077b7f56bfe8f3cc187477c2f06527e14f7ad3
[ "Apache-2.0" ]
14
2019-01-11T05:01:29.000Z
2021-11-01T00:39:46.000Z
src/mongo/s/s_only.cpp
guanhe0/mongo
75077b7f56bfe8f3cc187477c2f06527e14f7ad3
[ "Apache-2.0" ]
1
2022-03-05T02:55:28.000Z
2022-03-05T05:28:00.000Z
src/mongo/s/s_only.cpp
guanhe0/mongo
75077b7f56bfe8f3cc187477c2f06527e14f7ad3
[ "Apache-2.0" ]
7
2019-02-08T16:28:36.000Z
2021-05-08T14:25:47.000Z
// s_only.cpp /* Copyright 2009 10gen Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * As a special exception, the copyright holders give permission to link the * code of portions of this program with the OpenSSL library under certain * conditions as described in each individual source file and distribute * linked combinations including the program with the OpenSSL library. You * must comply with the GNU Affero General Public License in all respects * for all of the code used other than as permitted herein. If you modify * file(s) with this exception, you may extend this exception to your * version of the file(s), but you are not obligated to do so. If you do not * wish to do so, delete this exception statement from your version. If you * delete this exception statement from all source files in the program, * then also delete it in the license file. */ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kSharding #include "mongo/platform/basic.h" #include <tuple> #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/authorization_manager_global.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/service_context.h" #include "mongo/db/stats/counters.h" #include "mongo/rpc/metadata.h" #include "mongo/rpc/reply_builder_interface.h" #include "mongo/rpc/request_interface.h" #include "mongo/s/cluster_last_error_info.h" #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/log.h" namespace mongo { using std::string; using std::stringstream; bool isMongos() { return true; } /** When this callback is run, we record a shard that we've used for useful work * in an operation to be read later by getLastError() */ void usingAShardConnection(const std::string& addr) { ClusterLastErrorInfo::get(cc()).addShardHost(addr); } // called into by the web server. For now we just translate the parameters // to their old style equivalents. void Command::execCommand(OperationContext* txn, Command* command, const rpc::RequestInterface& request, rpc::ReplyBuilderInterface* replyBuilder) { int queryFlags = 0; BSONObj cmdObj; std::tie(cmdObj, queryFlags) = uassertStatusOK( rpc::downconvertRequestMetadata(request.getCommandArgs(), request.getMetadata())); std::string db = request.getDatabase().rawData(); BSONObjBuilder result; execCommandClientBasic(txn, command, *txn->getClient(), queryFlags, request.getDatabase().rawData(), cmdObj, result); replyBuilder->setCommandReply(result.done()).setMetadata(rpc::makeEmptyMetadata()); } void Command::execCommandClientBasic(OperationContext* txn, Command* c, ClientBasic& client, int queryOptions, const char* ns, BSONObj& cmdObj, BSONObjBuilder& result) { std::string dbname = nsToDatabase(ns); if (cmdObj.getBoolField("help")) { stringstream help; help << "help for: " << c->name << " "; c->help(help); result.append("help", help.str()); result.append("lockType", c->isWriteCommandForConfigServer() ? 1 : 0); appendCommandStatus(result, true, ""); return; } Status status = checkAuthorization(c, txn, dbname, cmdObj); if (!status.isOK()) { appendCommandStatus(result, status); return; } c->_commandsExecuted.increment(); if (c->shouldAffectCommandCounter()) { globalOpCounters.gotCommand(); } std::string errmsg; bool ok = false; try { ok = c->run(txn, dbname, cmdObj, queryOptions, errmsg, result); } catch (const DBException& e) { result.resetToEmpty(); const int code = e.getCode(); // Codes for StaleConfigException if (code == ErrorCodes::RecvStaleConfig || code == ErrorCodes::SendStaleConfig) { throw; } errmsg = e.what(); result.append("code", code); } if (!ok) { c->_commandsFailed.increment(); } appendCommandStatus(result, ok, errmsg); } void Command::runAgainstRegistered(OperationContext* txn, const char* ns, BSONObj& jsobj, BSONObjBuilder& anObjBuilder, int queryOptions) { // It should be impossible for this uassert to fail since there should be no way to get // into this function with any other collection name. uassert(16618, "Illegal attempt to run a command against a namespace other than $cmd.", nsToCollectionSubstring(ns) == "$cmd"); BSONElement e = jsobj.firstElement(); std::string commandName = e.fieldName(); Command* c = e.type() ? Command::findCommand(commandName) : NULL; if (!c) { Command::appendCommandStatus( anObjBuilder, false, str::stream() << "no such cmd: " << commandName); anObjBuilder.append("code", ErrorCodes::CommandNotFound); Command::unknownCommands.increment(); return; } execCommandClientBasic(txn, c, cc(), queryOptions, ns, jsobj, anObjBuilder); } void Command::registerError(OperationContext* txn, const DBException& exception) {} } // namespace mongo
36.050847
91
0.629995
guanhe0
3cf50ddd33c54036104018b9bd178806536d4ef2
4,882
cpp
C++
bin/ch/JITProcessManager.cpp
vinay72/ChakraCore
bff3ae27d0e95abe6bbbaf4691218be37b8125ee
[ "MIT" ]
1
2019-05-08T21:39:33.000Z
2019-05-08T21:39:33.000Z
bin/ch/JITProcessManager.cpp
Dachande663/ChakraCore
ed98335e71a98b45629d9ab957960121d66790a2
[ "MIT" ]
5
2019-01-07T10:15:23.000Z
2019-01-08T08:59:03.000Z
bin/ch/JITProcessManager.cpp
Dachande663/ChakraCore
ed98335e71a98b45629d9ab957960121d66790a2
[ "MIT" ]
1
2019-01-18T12:55:24.000Z
2019-01-18T12:55:24.000Z
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #include "stdafx.h" #ifdef _WIN32 HANDLE JITProcessManager::s_rpcServerProcessHandle = 0; // 0 is the "invalid handle" value for process handles UUID JITProcessManager::s_connectionId = GUID_NULL; HRESULT JITProcessManager::StartRpcServer(int argc, __in_ecount(argc) LPWSTR argv[]) { HRESULT hr = S_OK; JITProcessManager::RemoveArg(_u("-dynamicprofilecache:"), &argc, &argv); JITProcessManager::RemoveArg(_u("-dpc:"), &argc, &argv); JITProcessManager::RemoveArg(_u("-dynamicprofileinput:"), &argc, &argv); if (IsEqualGUID(s_connectionId, GUID_NULL)) { RPC_STATUS status = UuidCreate(&s_connectionId); if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) { hr = CreateServerProcess(argc, argv); } else { hr = HRESULT_FROM_WIN32(status); } } return hr; } /* static */ void JITProcessManager::RemoveArg(LPCWSTR flag, int * argc, __in_ecount(*argc) LPWSTR * argv[]) { size_t flagLen = wcslen(flag); int flagIndex; while ((flagIndex = HostConfigFlags::FindArg(*argc, *argv, flag, flagLen)) >= 0) { HostConfigFlags::RemoveArg(*argc, *argv, flagIndex); } } HRESULT JITProcessManager::CreateServerProcess(int argc, __in_ecount(argc) LPWSTR argv[]) { HRESULT hr; PROCESS_INFORMATION processInfo = { 0 }; STARTUPINFOW si = { 0 }; // overallocate constant cmd line (jshost -jitserver:<guid>) size_t cmdLineSize = (MAX_PATH + (size_t)argc) * sizeof(WCHAR); for (int i = 0; i < argc; ++i) { // calculate space requirement for each arg cmdLineSize += wcslen(argv[i]) * sizeof(WCHAR); } WCHAR* cmdLine = (WCHAR*)malloc(cmdLineSize); if (cmdLine == nullptr) { return E_OUTOFMEMORY; } RPC_WSTR connectionUuidString = NULL; #pragma warning(suppress: 6386) // buffer overrun #ifdef ENABLE_DEBUG_CONFIG_OPTIONS hr = StringCchCopyW(cmdLine, cmdLineSize, _u("ch.exe -OOPCFGRegistration- -CheckOpHelpers -jitserver:")); #else hr = StringCchCopyW(cmdLine, cmdLineSize, _u("ch.exe -jitserver:")); #endif if (FAILED(hr)) { return hr; } RPC_STATUS status = UuidToStringW(&s_connectionId, &connectionUuidString); if (status != S_OK) { return HRESULT_FROM_WIN32(status); } hr = StringCchCatW(cmdLine, cmdLineSize, (WCHAR*)connectionUuidString); if (FAILED(hr)) { return hr; } for (int i = 1; i < argc; ++i) { hr = StringCchCatW(cmdLine, cmdLineSize, _u(" ")); if (FAILED(hr)) { return hr; } hr = StringCchCatW(cmdLine, cmdLineSize, argv[i]); if (FAILED(hr)) { return hr; } } if (!CreateProcessW( NULL, cmdLine, NULL, NULL, FALSE, NULL, NULL, NULL, &si, &processInfo)) { return HRESULT_FROM_WIN32(GetLastError()); } free(cmdLine); CloseHandle(processInfo.hThread); s_rpcServerProcessHandle = processInfo.hProcess; if (HostConfigFlags::flags.EnsureCloseJITServer) { // create job object so if parent ch gets killed, server is killed as well // under a flag because it's preferable to let server close naturally // only useful in scenarios where ch is expected to be force terminated HANDLE jobObject = CreateJobObject(nullptr, nullptr); if (jobObject == nullptr) { return HRESULT_FROM_WIN32(GetLastError()); } if (!AssignProcessToJobObject(jobObject, s_rpcServerProcessHandle)) { return HRESULT_FROM_WIN32(GetLastError()); } JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo = { 0 }; jobInfo.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE; if (!SetInformationJobObject(jobObject, JobObjectExtendedLimitInformation, &jobInfo, sizeof(jobInfo))) { return HRESULT_FROM_WIN32(GetLastError()); } } return NOERROR; } void JITProcessManager::TerminateJITServer() { if (s_rpcServerProcessHandle) { TerminateProcess(s_rpcServerProcessHandle, 1); CloseHandle(s_rpcServerProcessHandle); s_rpcServerProcessHandle = NULL; } } HANDLE JITProcessManager::GetRpcProccessHandle() { return s_rpcServerProcessHandle; } UUID JITProcessManager::GetRpcConnectionId() { return s_connectionId; } #endif
27.897143
110
0.612659
vinay72
3cf609518aad5663eac95909b8bce993dd0a4264
2,606
cpp
C++
src/Phases/economyPhase.cpp
spChalk/cardGame
cb0332ed007cd7f137cd67f410f9a5908f3cc2df
[ "MIT" ]
7
2020-03-06T18:59:15.000Z
2020-12-06T13:31:07.000Z
src/Phases/economyPhase.cpp
spChalk/Card-Game
cb0332ed007cd7f137cd67f410f9a5908f3cc2df
[ "MIT" ]
null
null
null
src/Phases/economyPhase.cpp
spChalk/Card-Game
cb0332ed007cd7f137cd67f410f9a5908f3cc2df
[ "MIT" ]
1
2020-03-06T20:39:11.000Z
2020-03-06T20:39:11.000Z
/* economyPhase.cpp */ #include <iostream> #include <string> #include "basicHeader.hpp" using std::cout; using std::endl; /* ========================================================================= */ void Game::economyPhase(PlayerPtr pl) { printF ("Economy Phase Started !" , 1 , YEL , FILL); printF ("Press ENTER to continue . . ." , 1); std::cin.clear(); std::cin.sync(); std::cin.get(); printF ("Player : " , 0 , MAG , BOLD); cout << pl->getUserName(); printF (" can now buy Provinces!" , 1 , MAG , BOLD); printF ("Printing " , 0 , MAG); cout << pl->getUserName(); printF ("'s Provinces : " , 1 , MAG); pl->printProvinces(); printF ("Type 'Y' (YES) or '<any other key>' (NO) after each card's \ appearance, to proceed to purchase. " , 1 , MAG , BOLD); /* Buy provinces */ for (auto i : *(pl->getProvinces())) /* For every province */ { if (i->checkBroken() == false && i->getCard()->checkRevealed() == true) { if (pl->getCurrMoney() == 0) { cout << "No money left !" << endl; return; } else if (pl->getCurrMoney() < i->getCard()->getCost()) continue; else { cout << pl->getUserName(); printF ("'s Current balance: " , 0 , YEL , BOLD); cout << pl->getCurrMoney() << endl; } i->print(); /* If it is revealed and not broken */ cout << endl << pl->getUserName(); printF (" , do you want to proceed to purchase ?\n> Your answer: " , 0 , YEL , BOLD); std::string answer; std::getline(std::cin, answer); cout << endl; if ((answer == "Y")||(answer == "y")) /* Attempt to make the purchase */ { if (pl->makePurchase(i->getCard()->getCost()) == true) { printF ("Purchase Completed ! " , 1 , YEL , BOLD); i->getCard()->setTapped(); /* Can't be used for this round */ i->getCard()->attachToPlayer(pl); if (pl->getDynastyDeck()->empty() == false) i->setCard( pl->drawBlackCard() ); /* Replace the card bought */ else { printF ("Dynasty deck is empty! No more Black Cards for player \'" , 0 , MAG , BOLD); cout << pl->getUserName(); printF ("\' !" , 1 , MAG , BOLD); } } else printF ("You don't have enough money to buy this province!" , 1 , MAG , BOLD); } } } printF ("Economy Phase Ended !" , 1 , YEL , FILL); } /* ========================================================================= */
31.39759
97
0.480046
spChalk
3cf707efa2dafcb4ad1efe63aa9a2145a730a90f
8,279
cpp
C++
libs/unordered/test/unordered/unnecessary_copy_tests.cpp
coxlab/boost_patched_for_objcplusplus
5316cd54bbd03994ae785185efcde62b57fd5e93
[ "BSL-1.0" ]
1
2017-07-31T02:19:48.000Z
2017-07-31T02:19:48.000Z
libs/unordered/test/unordered/unnecessary_copy_tests.cpp
boost-cmake/vintage
dcfb7da3177134eddaee6789d6f582259cb0d6ee
[ "BSL-1.0" ]
null
null
null
libs/unordered/test/unordered/unnecessary_copy_tests.cpp
boost-cmake/vintage
dcfb7da3177134eddaee6789d6f582259cb0d6ee
[ "BSL-1.0" ]
1
2021-03-07T05:20:43.000Z
2021-03-07T05:20:43.000Z
// Copyright 2006-2009 Daniel James. // Distributed under 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) #include <boost/unordered_set.hpp> #include <boost/unordered_map.hpp> #include "../helpers/test.hpp" namespace unnecessary_copy_tests { struct count_copies { static int copies; static int moves; count_copies() : tag_(0) { ++copies; } explicit count_copies(int tag) : tag_(tag) { ++copies; } // This bizarre constructor is an attempt to confuse emplace. // // unordered_map<count_copies, count_copies> x: // x.emplace(count_copies(1), count_copies(2)); // x.emplace(count_copies(1), count_copies(2), count_copies(3)); // // The first emplace should use the single argument constructor twice. // The second emplace should use the single argument contructor for // the key, and this constructor for the value. count_copies(count_copies const&, count_copies const& x) : tag_(x.tag_) { ++copies; } count_copies(count_copies const& x) : tag_(x.tag_) { ++copies; } #if defined(BOOST_HAS_RVALUE_REFS) count_copies(count_copies&& x) : tag_(x.tag_) { x.tag_ = -1; ++moves; } #endif int tag_; private: count_copies& operator=(count_copies const&); }; bool operator==(count_copies const& x, count_copies const& y) { return x.tag_ == y.tag_; } template <class T> T source() { return T(); } void reset() { count_copies::copies = 0; count_copies::moves = 0; } } #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) namespace boost #else namespace unnecessary_copy_tests #endif { std::size_t hash_value(unnecessary_copy_tests::count_copies const& x) { return x.tag_; } } #define COPY_COUNT(n) \ if(count_copies::copies != n) { \ BOOST_ERROR("Wrong number of copies."); \ std::cerr<<"Number of copies: "<<count_copies::copies<<" expecting: "<<n<<std::endl; \ } #define MOVE_COUNT(n) \ if(count_copies::moves != n) { \ BOOST_ERROR("Wrong number of moves."); \ std::cerr<<"Number of moves: "<<count_copies::moves<<" expecting: "<<n<<std::endl; \ } #define COPY_COUNT_RANGE(a, b) \ if(count_copies::copies < a || count_copies::copies > b) { \ BOOST_ERROR("Wrong number of copies."); \ std::cerr<<"Number of copies: "<<count_copies::copies<<" expecting: ["<<a<<", "<<b<<"]"<<std::endl; \ } #define MOVE_COUNT_RANGE(a, b) \ if(count_copies::moves < a || count_copies::moves > b) { \ BOOST_ERROR("Wrong number of moves."); \ std::cerr<<"Number of moves: "<<count_copies::copies<<" expecting: ["<<a<<", "<<b<<"]"<<std::endl; \ } namespace unnecessary_copy_tests { int count_copies::copies; int count_copies::moves; template <class T> void unnecessary_copy_insert_test(T*) { T x; BOOST_DEDUCED_TYPENAME T::value_type a; reset(); x.insert(a); COPY_COUNT(1); } boost::unordered_set<count_copies>* set; boost::unordered_multiset<count_copies>* multiset; boost::unordered_map<int, count_copies>* map; boost::unordered_multimap<int, count_copies>* multimap; UNORDERED_TEST(unnecessary_copy_insert_test, ((set)(multiset)(map)(multimap))) template <class T> void unnecessary_copy_emplace_test(T*) { reset(); T x; BOOST_DEDUCED_TYPENAME T::value_type a; COPY_COUNT(1); x.emplace(a); COPY_COUNT(2); } template <class T> void unnecessary_copy_emplace_rvalue_test(T*) { reset(); T x; x.emplace(source<BOOST_DEDUCED_TYPENAME T::value_type>()); #if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL) COPY_COUNT(1); #else COPY_COUNT(2); #endif } UNORDERED_TEST(unnecessary_copy_emplace_test, ((set)(multiset)(map)(multimap))) UNORDERED_TEST(unnecessary_copy_emplace_rvalue_test, ((set)(multiset)(map)(multimap))) #if defined(BOOST_HAS_RVALUE_REFS) && defined(BOOST_HAS_VARIADIC_TMPL) template <class T> void unnecessary_copy_emplace_move_test(T*) { reset(); T x; BOOST_DEDUCED_TYPENAME T::value_type a; COPY_COUNT(1); MOVE_COUNT(0); x.emplace(std::move(a)); COPY_COUNT(1); MOVE_COUNT(1); } UNORDERED_TEST(unnecessary_copy_emplace_move_test, ((set)(multiset)(map)(multimap))) #endif UNORDERED_AUTO_TEST(unnecessary_copy_emplace_set_test) { reset(); boost::unordered_set<count_copies> x; count_copies a; x.insert(a); COPY_COUNT(2); MOVE_COUNT(0); // // 0 arguments // // The container will have to create a copy in order to compare with // the existing element. reset(); x.emplace(); COPY_COUNT(1); MOVE_COUNT(0); // // 1 argument // // Emplace should be able to tell that there already is an element // without creating a new one. reset(); x.emplace(a); COPY_COUNT(0); MOVE_COUNT(0); // A new object is created by source, but it shouldn't be moved or // copied. reset(); x.emplace(source<count_copies>()); COPY_COUNT(1); MOVE_COUNT(0); #if defined(BOOST_HAS_RVALUE_REFS) // No move should take place. reset(); x.emplace(std::move(a)); COPY_COUNT(0); MOVE_COUNT(0); #endif // Just in case a did get moved... count_copies b; // The container will have to create a copy in order to compare with // the existing element. reset(); x.emplace(b.tag_); COPY_COUNT(1); MOVE_COUNT(0); // // 2 arguments // // The container will have to create b copy in order to compare with // the existing element. // // Note to self: If copy_count == 0 it's an error not an optimization. // TODO: Devise a better test. reset(); x.emplace(b, b); COPY_COUNT(1); MOVE_COUNT(0); } UNORDERED_AUTO_TEST(unnecessary_copy_emplace_map_test) { reset(); boost::unordered_map<count_copies, count_copies> x; // TODO: Run tests for pairs without const etc. std::pair<count_copies const, count_copies> a; x.emplace(a); COPY_COUNT(4); MOVE_COUNT(0); // // 0 arguments // // COPY_COUNT(1) would be okay here. reset(); x.emplace(); COPY_COUNT(2); MOVE_COUNT(0); // // 1 argument // reset(); x.emplace(a); COPY_COUNT(0); MOVE_COUNT(0); // A new object is created by source, but it shouldn't be moved or // copied. reset(); x.emplace(source<std::pair<count_copies, count_copies> >()); COPY_COUNT(2); MOVE_COUNT(0); // TODO: This doesn't work on older versions of gcc. //count_copies part; std::pair<count_copies const, count_copies> b; //reset(); //std::pair<count_copies const&, count_copies const&> a_ref(part, part); //x.emplace(a_ref); //COPY_COUNT(0); MOVE_COUNT(0); #if defined(BOOST_HAS_RVALUE_REFS) // No move should take place. // (since a is already in the container) reset(); x.emplace(std::move(a)); COPY_COUNT(0); MOVE_COUNT(0); #endif // // 2 arguments // reset(); x.emplace(b.first, b.second); COPY_COUNT(0); MOVE_COUNT(0); reset(); x.emplace(source<count_copies>(), source<count_copies>()); COPY_COUNT(2); MOVE_COUNT(0); // source<count_copies> creates a single copy. reset(); x.emplace(b.first, source<count_copies>()); COPY_COUNT(1); MOVE_COUNT(0); reset(); x.emplace(count_copies(b.first.tag_), count_copies(b.second.tag_)); COPY_COUNT(2); MOVE_COUNT(0); } } RUN_TESTS()
27.875421
109
0.590651
coxlab
3cf7c4cdd1c0914438ac10e3bcbee98d0f4f71f2
10,099
cpp
C++
HelperFunctions/getvkDebugUtilsMessengerCallbackDataEXT.cpp
dkaip/jvulkan-natives-Linux-x86_64
ea7932f74e828953c712feea11e0b01751f9dc9b
[ "Apache-2.0" ]
null
null
null
HelperFunctions/getvkDebugUtilsMessengerCallbackDataEXT.cpp
dkaip/jvulkan-natives-Linux-x86_64
ea7932f74e828953c712feea11e0b01751f9dc9b
[ "Apache-2.0" ]
null
null
null
HelperFunctions/getvkDebugUtilsMessengerCallbackDataEXT.cpp
dkaip/jvulkan-natives-Linux-x86_64
ea7932f74e828953c712feea11e0b01751f9dc9b
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2019-2020 Douglas Kaip * * 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. */ /* * getvkDebugUtilsMessengerCallbackDataEXT.cpp * * Created on: Apr 30, 2019 * Author: Douglas Kaip */ #include <stdlib.h> #include "JVulkanHelperFunctions.hh" #include "slf4j.hh" namespace jvulkan { void getvkDebugUtilsMessengerCallbackDataEXT( JNIEnv *env, const jobject jVkDebugUtilsMessengerCallbackDataEXTObject, VkDebugUtilsMessengerCallbackDataEXT *vkDebugUtilsMessengerCallbackDataEXT, std::vector<void *> *memoryToFree) { jclass vkDebugUtilsMessengerCallbackDataEXTClass = env->GetObjectClass(jVkDebugUtilsMessengerCallbackDataEXTObject); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to GetObjectClass for jVkDebugUtilsMessengerCallbackDataEXTObject"); return; } //////////////////////////////////////////////////////////////////////// VkStructureType sTypeValue = getSType(env, jVkDebugUtilsMessengerCallbackDataEXTObject); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to getSType"); return; } //////////////////////////////////////////////////////////////////////// jobject pNextObject = getpNextObject(env, jVkDebugUtilsMessengerCallbackDataEXTObject); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Call to getpNext failed."); return; } if (pNextObject != nullptr) { LOGERROR(env, "%s", "pNext must be null."); return; } void *pNext = nullptr; //////////////////////////////////////////////////////////////////////// jmethodID methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getFlags", "()Ljava/util/EnumSet;"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getFlags methodId"); return; } jobject flagsObject = env->CallObjectMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); VkDebugUtilsMessengerCallbackDataFlagsEXT flags = getEnumSetValue( env, flagsObject, "com/CIMthetics/jvulkan/VulkanExtensions/Enums/VkDebugUtilsMessengerCallbackDataFlagBitsEXT"); //////////////////////////////////////////////////////////////////////// methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getMessageIdName", "()Ljava/lang/String;"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getMessageIdName methodId"); return; } jstring jMessageIdName = (jstring)env->CallObjectMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error calling CallObjectMethod for getMessageIdName"); return; } char *theMessageIdName = nullptr; if (jMessageIdName != nullptr) { const char *tempString1 = env->GetStringUTFChars(jMessageIdName, 0); theMessageIdName = (char *)calloc(1, strlen(tempString1) + 1); memoryToFree->push_back(theMessageIdName); strcpy(theMessageIdName, tempString1); env->ReleaseStringUTFChars(jMessageIdName, tempString1); } //////////////////////////////////////////////////////////////////////// methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getMessageIdNumber", "()I"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getMessageIdNumber methodId"); return; } jint messageIdNumber = env->CallIntMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error calling CallIntMethod for getMessageIdNumber"); return; } //////////////////////////////////////////////////////////////////////// methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getMessage", "()Ljava/lang/String;"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getMessage methodId"); return; } jstring jMessage = (jstring)env->CallObjectMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error calling CallObjectMethod for getMessage"); return; } char *message = nullptr; if (jMessage != nullptr) { const char *tempString2 = env->GetStringUTFChars(jMessage, 0); message = (char *)calloc(1, strlen(tempString2) + 1); memoryToFree->push_back(message); strcpy(message, tempString2); env->ReleaseStringUTFChars(jMessage, tempString2); } //////////////////////////////////////////////////////////////////////// methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getQueueLabels", "()Ljava/util/Collection;"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getQueueLabels methodId"); return; } jobject jVkDebugUtilsLabelEXTCollectionObject = env->CallObjectMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error calling CallObjectMethod for getQueueLabels"); return; } int numberOfQLabels = 0; VkDebugUtilsLabelEXT *queueLabels = nullptr; if (jVkDebugUtilsLabelEXTCollectionObject != nullptr) { jvulkan::getVkDebugUtilsLabelEXTCollection( env, jVkDebugUtilsLabelEXTCollectionObject, &queueLabels, &numberOfQLabels, memoryToFree); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Call to getVkDebugUtilsLabelEXTCollection failed"); return; } } //////////////////////////////////////////////////////////////////////// methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getCmdBufLabels", "()Ljava/util/Collection;"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getCmdBufLabels methodId"); return; } jVkDebugUtilsLabelEXTCollectionObject = env->CallObjectMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error calling CallObjectMethod for getCmdBufLabels"); return; } int numberOfCmdBufLabels = 0; VkDebugUtilsLabelEXT *cmdBufLabels = nullptr; if (jVkDebugUtilsLabelEXTCollectionObject != nullptr) { jvulkan::getVkDebugUtilsLabelEXTCollection( env, jVkDebugUtilsLabelEXTCollectionObject, &cmdBufLabels, &numberOfCmdBufLabels, memoryToFree); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Call to getVkDebugUtilsLabelEXTCollection failed"); return; } } //////////////////////////////////////////////////////////////////////// methodId = env->GetMethodID(vkDebugUtilsMessengerCallbackDataEXTClass, "getObjects", "()Ljava/util/Collection;"); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error trying to get getObjects methodId"); return; } jobject jVkDebugUtilsObjectNameInfoEXTCollectionObject = env->CallObjectMethod(jVkDebugUtilsMessengerCallbackDataEXTObject, methodId); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Error calling CallObjectMethod for getObjects"); return; } int numberOfObjects = 0; VkDebugUtilsObjectNameInfoEXT *objects = nullptr; if (jVkDebugUtilsObjectNameInfoEXTCollectionObject != nullptr) { jvulkan::getVkDebugUtilsObjectNameInfoEXTCollection( env, jVkDebugUtilsObjectNameInfoEXTCollectionObject, &objects, &numberOfObjects, memoryToFree); if (env->ExceptionOccurred()) { LOGERROR(env, "%s", "Call to getVkDebugUtilsLabelEXTCollection failed"); return; } } vkDebugUtilsMessengerCallbackDataEXT->sType = sTypeValue; vkDebugUtilsMessengerCallbackDataEXT->pNext = (void *)pNext; vkDebugUtilsMessengerCallbackDataEXT->flags = flags; vkDebugUtilsMessengerCallbackDataEXT->pMessageIdName = theMessageIdName; vkDebugUtilsMessengerCallbackDataEXT->messageIdNumber = messageIdNumber; vkDebugUtilsMessengerCallbackDataEXT->pMessage = message; vkDebugUtilsMessengerCallbackDataEXT->queueLabelCount = numberOfQLabels; vkDebugUtilsMessengerCallbackDataEXT->pQueueLabels = queueLabels; vkDebugUtilsMessengerCallbackDataEXT->cmdBufLabelCount = numberOfCmdBufLabels; vkDebugUtilsMessengerCallbackDataEXT->pCmdBufLabels = cmdBufLabels; vkDebugUtilsMessengerCallbackDataEXT->objectCount = numberOfObjects; vkDebugUtilsMessengerCallbackDataEXT->pObjects = objects; } }
38.39924
142
0.600852
dkaip
3cfdb53f39fad5fc2ad53400721f7fe9f5f0db96
834
hpp
C++
sel_map_mesh_publisher/include/sel_map_mesh_publisher/TriangularMeshPublisher.hpp
roahmlab/sel_map
51c5ac738eb7475f409f826c0d30f555f98757b3
[ "MIT" ]
2
2022-02-24T21:10:32.000Z
2022-03-11T20:00:09.000Z
sel_map_mesh_publisher/include/sel_map_mesh_publisher/TriangularMeshPublisher.hpp
roahmlab/sel_map
51c5ac738eb7475f409f826c0d30f555f98757b3
[ "MIT" ]
null
null
null
sel_map_mesh_publisher/include/sel_map_mesh_publisher/TriangularMeshPublisher.hpp
roahmlab/sel_map
51c5ac738eb7475f409f826c0d30f555f98757b3
[ "MIT" ]
null
null
null
#pragma once #include <ros/ros.h> #include <string> #include "msg_adaptor/MeshGeometryStampedCustom.hpp" // Placing all lib elements into a sel_map namespace, partly in case this is extended upon later, partly to reduce pollution. namespace sel_map::publisher{ template <typename MeshAdaptorType> class TriangularMeshPublisher{ ros::NodeHandle node_handle; ros::Publisher mesh_publisher; sel_map::msg_adaptor::MeshGeometryStampedCustom cached_message; public: MeshAdaptorType mesh_adaptor; TriangularMeshPublisher(const MeshAdaptorType& mesh_adaptor, std::string uuid, std::string frame_id, std::string mesh_topic); bool pubAlive(); void publishMesh(); unsigned int getSingleClassifications(int* buffer, unsigned int length); }; }
30.888889
133
0.718225
roahmlab
3cfe35544080783e5498d639955729242cf09caa
3,804
cpp
C++
Engine/source/T3D/containerQuery.cpp
jnoyola/Torque3D_GDDEast
15738ed79185c45e353ea4520dee0a94872ee870
[ "Unlicense" ]
1
2019-01-15T09:47:35.000Z
2019-01-15T09:47:35.000Z
Engine/source/T3D/containerQuery.cpp
jnoyola/Torque3D_GDDEast
15738ed79185c45e353ea4520dee0a94872ee870
[ "Unlicense" ]
null
null
null
Engine/source/T3D/containerQuery.cpp
jnoyola/Torque3D_GDDEast
15738ed79185c45e353ea4520dee0a94872ee870
[ "Unlicense" ]
null
null
null
//----------------------------------------------------------------------------- // Copyright (c) 2012 GarageGames, LLC // // 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 "platform/platform.h" #include "T3D/containerQuery.h" #include "scene/sceneObject.h" #include "environment/waterObject.h" #include "T3D/physicalZone.h" void findRouter( SceneObject *obj, void *key ) { if (obj->getTypeMask() & WaterObjectType) waterFind(obj, key); else if (obj->getTypeMask() & PhysicalZoneObjectType) physicalZoneFind(obj, key); else { AssertFatal(false, "Error, must be either water or physical zone here!"); } } void waterFind( SceneObject *obj, void *key ) { PROFILE_SCOPE( waterFind ); // This is called for each WaterObject the ShapeBase object is overlapping. ContainerQueryInfo *info = static_cast<ContainerQueryInfo*>(key); WaterObject *water = dynamic_cast<WaterObject*>(obj); AssertFatal( water != NULL, "containerQuery - waterFind(), passed object was not of class WaterObject!"); // Get point at the bottom/center of the box. Point3F testPnt = info->box.getCenter(); testPnt.z = info->box.minExtents.z; F32 coverage = water->getWaterCoverage(info->box); // Since a WaterObject can have global bounds we may get this call // even though we have zero coverage. If so we want to early out and // not save the water properties. if ( coverage == 0.0f ) return; // Add in flow force. Would be appropriate to try scaling it by coverage // thought. Or perhaps have getFlow do that internally and take // the box parameter. info->appliedForce += water->getFlow( testPnt ); // Only save the following properties for the WaterObject with the // greatest water coverage for this ShapeBase object. if ( coverage < info->waterCoverage ) return; info->waterCoverage = coverage; info->liquidType = water->getLiquidType(); info->waterViscosity = water->getViscosity(); info->waterDensity = water->getDensity(); info->waterHeight = water->getSurfaceHeight( Point2F(testPnt.x,testPnt.y) ); info->waterObject = water; } void physicalZoneFind(SceneObject* obj, void *key) { PROFILE_SCOPE( physicalZoneFind ); ContainerQueryInfo *info = static_cast<ContainerQueryInfo*>(key); PhysicalZone* pz = dynamic_cast<PhysicalZone*>(obj); AssertFatal(pz != NULL, "Error, not a physical zone!"); if (pz == NULL || pz->testBox(info->box) == false) return; if (pz->isActive()) { info->gravityScale *= pz->getGravityMod(); info->airResistanceScale *= pz->getAirResistanceMod(); info->appliedForce += pz->getForce(); } }
38.424242
114
0.680862
jnoyola
a706248e68aead38a05656fb8465c8a270245089
960
cpp
C++
src/Modules/Helpers/Helpers/libhelpers/Dx/DxDeviceMt.cpp
sssr33/LuaModules
357a8c9445a237f2c98685000f6c7da668ea0e72
[ "MIT" ]
1
2020-02-24T22:21:04.000Z
2020-02-24T22:21:04.000Z
src/Modules/Helpers/Helpers/libhelpers/Dx/DxDeviceMt.cpp
sssr33/LuaModules
357a8c9445a237f2c98685000f6c7da668ea0e72
[ "MIT" ]
null
null
null
src/Modules/Helpers/Helpers/libhelpers/Dx/DxDeviceMt.cpp
sssr33/LuaModules
357a8c9445a237f2c98685000f6c7da668ea0e72
[ "MIT" ]
1
2019-10-11T12:48:44.000Z
2019-10-11T12:48:44.000Z
#include "DxDeviceMt.h" IDWriteFactory *DxDeviceMt::GetDwriteFactory() const { return this->dwriteFactory.Get(); } ID2D1Factory1 *DxDeviceMt::GetD2DFactory() const { return this->d2dFactory.Get(); } ID3D11Device *DxDeviceMt::GetD3DDevice() const { return this->d3dDev.Get(); } ID2D1Device *DxDeviceMt::GetD2DDevice() const { return this->d2dDevice.Get(); } D2DCtxMt *DxDeviceMt::GetD2DCtxMt() const { // TODO try to find better approach than const_cast D2DCtxMt *tmp = const_cast<D2DCtxMt *>(&this->d2dCtxMt); return tmp; } Microsoft::WRL::ComPtr<IDWriteFactory> DxDeviceMt::GetDwriteFactoryCPtr() const { return this->dwriteFactory; } Microsoft::WRL::ComPtr<ID2D1Factory1> DxDeviceMt::GetD2DFactoryCPtr() const { return this->d2dFactory; } Microsoft::WRL::ComPtr<ID3D11Device> DxDeviceMt::GetD3DDeviceCPtr() const { return this->d3dDev; } Microsoft::WRL::ComPtr<ID2D1Device> DxDeviceMt::GetD2DDeviceCPtr() const { return this->d2dDevice; }
24.615385
81
0.755208
sssr33
a7077296f0f92eed8004f61790ccc5839dd3de68
614
cpp
C++
water.cpp
sergiosvieira/mog
f23d2b18851bb58c3e60aae9b10deec023f2c9c8
[ "MIT" ]
null
null
null
water.cpp
sergiosvieira/mog
f23d2b18851bb58c3e60aae9b10deec023f2c9c8
[ "MIT" ]
null
null
null
water.cpp
sergiosvieira/mog
f23d2b18851bb58c3e60aae9b10deec023f2c9c8
[ "MIT" ]
null
null
null
#include "water.h" Water::Water(): TaticalMovingObject() { } Water::Water ( const Coordinates& position, const Vector& velocity, unsigned int initialTime, unsigned int lifeTime, const Vector &acceleration ): TaticalMovingObject(position, velocity, initialTime, lifeTime, acceleration, ObjectCategory::NavalShip) { } void Water::setMaxDepth(double value) { this->maxDepth = value; } double Water::getMaxDepth() const { return this->maxDepth; } void Water::setMinDepth(double value) { this->minDepth = value; } double Water::getMinDepth() const { return this->minDepth; }
15.74359
106
0.70684
sergiosvieira
a709f6fab3e2fd6c6b106b8bf667b7faadce9586
2,789
hpp
C++
Source/Utility/Maths.hpp
storm20200/WaterEngine
537910bc03e6d4016c9b22cf616d25afe40f77af
[ "MIT" ]
null
null
null
Source/Utility/Maths.hpp
storm20200/WaterEngine
537910bc03e6d4016c9b22cf616d25afe40f77af
[ "MIT" ]
2
2015-03-17T01:32:10.000Z
2015-03-19T18:58:28.000Z
Source/Utility/Maths.hpp
storm20200/WaterEngine
537910bc03e6d4016c9b22cf616d25afe40f77af
[ "MIT" ]
null
null
null
#if !defined WATER_UTILITY_MATHS_INCLUDED #define WATER_UTILITY_MATHS_INCLUDED // STL headers. #include <cmath> #include <type_traits> // Utility namespace. namespace util { ///////////////////// /// Miscellaneous /// ///////////////////// /// <summary> Checks if two float values are relatively equal to each other. </summary> /// <param name="margin"> The absolute margin of error between the two floats. Must be a positive value. </param> inline bool roughlyEquals (const float lhs, const float rhs, const float margin = 0.1f) { // Test the upper and lower limits. return std::abs (lhs - rhs) <= margin; } /////////////////// /// Comparisons /// /////////////////// /// <summary> Returns the minimum value, passed by value for arithmetic types. </summary> template <typename T> typename std::enable_if<std::is_arithmetic<T>::value, T>::type min (const T a, const T b) { return a < b ? a : b; } /// <summary> Returns the maximum value, passed by value for arithmetic types. </summary> template <typename T> typename std::enable_if<std::is_arithmetic<T>::value, T>::type max (const T a, const T b) { return a > b ? a : b; } /// <summary> Returns the minimum value, passed by reference for non-arithmetic types. </summary> template <typename T> typename std::enable_if<!std::is_arithmetic<T>::value, T>::type& min (const T& a, const T& b) { return a < b ? a : b; } /// <summary> Returns the maximum value, passed by reference for non-arithmetic types. </summary> template <typename T> typename std::enable_if<!std::is_arithmetic<T>::value, T>::type& max (const T& a, const T& b) { return a > b ? a : b; } /// <summary> Clamps a value between a given minimum and maximum value. Arithmetic types are passed by value. </summary> /// <param name="value"> The value to clamp. </param> template <typename T> typename std::enable_if<std::is_arithmetic<T>::value, T>::type clamp (const T value, const T min, const T max) { if (value < min) { return min; } if (value > max) { return max; } return value; } /// <summary> Clamps a value between a given minimum and maximum value. Non-arithmetic types are passed by reference. </summary> /// <param name="value"> The value to clamp. </param> template <typename T> typename std::enable_if<!std::is_arithmetic<T>::value, T>::type clamp (const T& value, const T& min, const T& max) { if (value < min) { return min; } if (value > max) { return max; } return value; } } #endif
29.357895
140
0.585873
storm20200
a70a5694f3dc2cd9c7593c0eb4bbda7485459800
634
cpp
C++
1001-1020/1005.cpp
nedchu/PTA-Advanced-Solution
9713142a48e7e416fd087980b6ac8251ae2b200f
[ "MIT" ]
1
2020-01-13T04:57:01.000Z
2020-01-13T04:57:01.000Z
1001-1020/1005.cpp
nedchu/PTA-Advanced-Solution
9713142a48e7e416fd087980b6ac8251ae2b200f
[ "MIT" ]
null
null
null
1001-1020/1005.cpp
nedchu/PTA-Advanced-Solution
9713142a48e7e416fd087980b6ac8251ae2b200f
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define fi first #define se second typedef long long ll; typedef pair<int,int> pii; // head const int N = 105; char s[105]; char dig[15][15] = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; int main() { while (scanf("%s", s) == 1) { int n = strlen(s); int sum = 0; for (int i = 0; i < n; i++) { sum += s[i] - '0'; } sprintf(s, "%d", sum); n = strlen(s); for (int i = 0; i < n; i++) { printf("%s%c", dig[s[i]-'0'], i==n-1 ? '\n' : ' '); } } return 0; }
17.611111
57
0.477918
nedchu
a70d5dd955b42d4cf5a025fd252d7d27e99bcb74
1,987
cpp
C++
cryptopp562/algparam.cpp
xlplbo/cryptopp
a831383b9c407c2836d35154ad4d34778597ca5b
[ "Apache-2.0" ]
505
2016-02-04T15:54:46.000Z
2022-03-27T18:43:01.000Z
src/cryptopp/algparam.cpp
brozkeff/Slothcoin
a4af51f5d3292f993ef7c3d95ead1f344c38ad4a
[ "MIT" ]
528
2016-02-06T19:50:12.000Z
2022-01-15T10:21:16.000Z
src/cryptopp/algparam.cpp
brozkeff/Slothcoin
a4af51f5d3292f993ef7c3d95ead1f344c38ad4a
[ "MIT" ]
208
2015-01-02T10:31:40.000Z
2021-12-14T07:37:36.000Z
// algparam.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #ifndef CRYPTOPP_IMPORTS #include "algparam.h" NAMESPACE_BEGIN(CryptoPP) PAssignIntToInteger g_pAssignIntToInteger = NULL; bool CombinedNameValuePairs::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const { if (strcmp(name, "ValueNames") == 0) return m_pairs1.GetVoidValue(name, valueType, pValue) && m_pairs2.GetVoidValue(name, valueType, pValue); else return m_pairs1.GetVoidValue(name, valueType, pValue) || m_pairs2.GetVoidValue(name, valueType, pValue); } void AlgorithmParametersBase::operator=(const AlgorithmParametersBase& rhs) { assert(false); } bool AlgorithmParametersBase::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const { if (strcmp(name, "ValueNames") == 0) { NameValuePairs::ThrowIfTypeMismatch(name, typeid(std::string), valueType); if (m_next.get()) m_next->GetVoidValue(name, valueType, pValue); (*reinterpret_cast<std::string *>(pValue) += m_name) += ";"; return true; } else if (strcmp(name, m_name) == 0) { AssignValue(name, valueType, pValue); m_used = true; return true; } else if (m_next.get()) return m_next->GetVoidValue(name, valueType, pValue); else return false; } AlgorithmParameters::AlgorithmParameters() : m_defaultThrowIfNotUsed(true) { } AlgorithmParameters::AlgorithmParameters(const AlgorithmParameters &x) : m_defaultThrowIfNotUsed(x.m_defaultThrowIfNotUsed) { m_next.reset(const_cast<AlgorithmParameters &>(x).m_next.release()); } AlgorithmParameters & AlgorithmParameters::operator=(const AlgorithmParameters &x) { m_next.reset(const_cast<AlgorithmParameters &>(x).m_next.release()); return *this; } bool AlgorithmParameters::GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const { if (m_next.get()) return m_next->GetVoidValue(name, valueType, pValue); else return false; } NAMESPACE_END #endif
26.144737
113
0.749874
xlplbo
a70e6941e1e1b44237cdc12c9f340d89f24d5274
4,087
cpp
C++
Project/src/Player.cpp
ishohois/DivisionEngine2D
3e38c2bf39e54b743bd01281980c4bdc502c93e4
[ "MIT" ]
null
null
null
Project/src/Player.cpp
ishohois/DivisionEngine2D
3e38c2bf39e54b743bd01281980c4bdc502c93e4
[ "MIT" ]
1
2021-12-14T08:33:06.000Z
2021-12-14T08:33:06.000Z
Project/src/Player.cpp
ishohois/DivisionEngine2D
3e38c2bf39e54b743bd01281980c4bdc502c93e4
[ "MIT" ]
null
null
null
#include "Player.h" #include <SystemResources.h> #include "TextureManager.h" #include "CollisionHandler.h" #include "Contact.h" #include "Input.h" #include "GameManager.h" #include "Bullet.h" namespace diva { /* */ Player::Player(int x, int y, int w, int h) : GameObject(), position(x, y), collider(position, w, h, "Player") { setTag("Player"); // laddar in spriten som ska användas samt sätter ett ID så att man kan hämta texuren från en map. sätter även en renderare. TextureManager::getInstance()->load((resPath + "images/PlayerSprite/RBS.png").c_str(), tag, system.renderer); rb.setGravity(0); // Eftersom spelet är topdown och vi fortfarande vill använda våran ridigbody klass så sätter vi gravity till 0. shootCounter = shootTime; counter = damageTimer; } void Player::gameObjectUpdate(float dt) { rb.resetForce(); //[Uträkning för vilken grad som spriten ska titta på] getAngle(); // Kolla imputs för att röra spelaren. if (InputHandler::getInstance()->getKeyDown(KEYS::A)) { rb.applyForceX(-6.0f); } if (InputHandler::getInstance()->getKeyDown(KEYS::D)) { rb.applyForceX(6.0f); } if (InputHandler::getInstance()->getKeyDown(KEYS::W)) { rb.applyForceY(-6.0f); } if (InputHandler::getInstance()->getKeyDown(KEYS::S)) { rb.applyForceY(6.0f); } shootCounter -= (dt / 100); if (InputHandler::getInstance()->getMouseButton(MOUSEBUTTON::LMB)) { shoot(shootCounter); } // När spelaren sjukter så ska den instanziera en annan klass som är av typ "Skott" eller liknande cf = int(((SDL_GetTicks() / 100) % 2)); rb.updatePhysics(dt); position += rb.getRbPosition(); if (rb.getVelocity().x != 0 || rb.getVelocity().y != 0) { isWalking = true; } else { isWalking = false; } collider.updateCollider(); if (isDamaged) { counter -= (dt / 100); } if (counter <= 0) { hp--; counter = damageTimer; isDamaged = false; } if (hp <= 0) { GameManager::getInstance()->remove(this); GameManager::getInstance()->removeCollider(collider); } } void Player::updateCollision(BoxCollider2D collision) { Contact c; if (CollisionHandler::collisionDetection(collider, collision, c)) { if (collision.getObjectTag() == "Enemy") { isDamaged = true; } if (collision.getObjectTag() == "Wall") { position += CollisionHandler::collisionResolution(collider, c); } } } void Player::draw() const { // OM player Velocity == 0 TextureManager::getInstance()->draw(tag, (int)position.x, (int)position.y, 57, 43, system.renderer, degrees, Spriteflip::HORIZONTALFLIP); if (isWalking) TextureManager::getInstance()->drawFrame(tag, (int)position.x, (int)position.y, 57, 43, cr, cf, system.renderer, degrees, Spriteflip::HORIZONTALFLIP); } void Player::getAngle() { float distX = collider.getCenterPoint().x - InputHandler::getInstance()->mousePos.x; float distY = InputHandler::getInstance()->mousePos.y - collider.getCenterPoint().y; float radians = (atan2(distY, distX)); degrees = -radians * (180 / 3.14); } void Player::shoot(float &sTime) { //Bullet *bull = nullptr; if (sTime >= 0) { return; } Vector2D v{(float)InputHandler::getInstance()->mousePos.x, (float)InputHandler::getInstance()->mousePos.y}; Bullet *bull = new Bullet(position, v); sTime = shootTime; bull = nullptr; } Player::~Player() { } }
27.246667
162
0.553707
ishohois
a7135529b1a781871edb93e6262ea6f251140998
5,332
hpp
C++
src/ascent/runtimes/ascent_mfem_data_adapter.hpp
jameskress/ascent
db799bc1e076b5413607ed45913d4c9c2b7fa421
[ "BSD-3-Clause" ]
null
null
null
src/ascent/runtimes/ascent_mfem_data_adapter.hpp
jameskress/ascent
db799bc1e076b5413607ed45913d4c9c2b7fa421
[ "BSD-3-Clause" ]
null
null
null
src/ascent/runtimes/ascent_mfem_data_adapter.hpp
jameskress/ascent
db799bc1e076b5413607ed45913d4c9c2b7fa421
[ "BSD-3-Clause" ]
2
2018-02-28T14:15:23.000Z
2018-07-05T18:30:07.000Z
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. // // Produced at the Lawrence Livermore National Laboratory // // LLNL-CODE-716457 // // All rights reserved. // // This file is part of Ascent. // // For details, see: http://ascent.readthedocs.io/. // // Please also read ascent/LICENSE // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the disclaimer below. // // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the disclaimer (as noted below) in the // documentation and/or other materials provided with the distribution. // // * Neither the name of the LLNS/LLNL nor the names of its contributors may // be used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 LAWRENCE LIVERMORE NATIONAL SECURITY, // LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS 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. // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// //----------------------------------------------------------------------------- /// /// file: ascent_mfem_data_adapter.hpp /// //----------------------------------------------------------------------------- #ifndef ASCENT_MFEM_DATA_ADAPTER_HPP #define ASCENT_MFEM_DATA_ADAPTER_HPP // conduit includes #include <conduit.hpp> #include <mfem.hpp> //----------------------------------------------------------------------------- // -- begin ascent:: -- //----------------------------------------------------------------------------- namespace ascent { class MFEMDataSet { public: using FieldMap = std::map<std::string, mfem::GridFunction*>; MFEMDataSet(); ~MFEMDataSet(); MFEMDataSet(mfem::Mesh *mesh); void set_mesh(mfem::Mesh *mesh); mfem::Mesh* get_mesh(); void add_field(mfem::GridFunction *field, const std::string &name); bool has_field(const std::string &field_name); mfem::GridFunction* get_field(const std::string &field_name); int num_fields(); FieldMap get_field_map(); protected: FieldMap m_fields; mfem::Mesh *m_mesh; }; struct MFEMDomains { std::vector<MFEMDataSet*> m_data_sets; std::vector<int> m_domain_ids; ~MFEMDomains() { for(int i = 0; i < m_data_sets.size(); ++i) { delete m_data_sets[i]; } } }; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // Class that Handles Blueprint to mfem //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- class MFEMDataAdapter { public: // convert blueprint mfem data to a mfem data set // assumes "n" conforms to the mesh blueprint // // conduit::blueprint::mesh::verify(n,info) == true // static MFEMDomains* BlueprintToMFEMDataSet(const conduit::Node &n, const std::string &topo_name=""); static bool IsHighOrder(const conduit::Node &n); static void Linearize(MFEMDomains *ho_domains, conduit::Node &output, const int refinement); static void GridFunctionToBlueprintField(mfem::GridFunction *gf, conduit::Node &out, const std::string &main_topology_name = "main"); static void MeshToBlueprintMesh(mfem::Mesh *m, conduit::Node &out, const std::string &coordset_name = "coords", const std::string &main_topology_name = "main", const std::string &boundary_topology_name = "boundary"); static std::string ElementTypeToShapeName(mfem::Element::Type element_type); }; //----------------------------------------------------------------------------- }; //----------------------------------------------------------------------------- // -- end ascent:: -- //----------------------------------------------------------------------------- #endif //----------------------------------------------------------------------------- // -- end header ifdef guard //-----------------------------------------------------------------------------
36.027027
96
0.525319
jameskress
a7195ffdfcf572028748b287b7f6513194f62166
1,856
hpp
C++
third_party/boost/simd/arch/ppc/vmx/simd/function/rsqrt.hpp
xmar/pythran
dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592
[ "BSD-3-Clause" ]
1
2018-01-14T12:49:14.000Z
2018-01-14T12:49:14.000Z
third_party/boost/simd/arch/ppc/vmx/simd/function/rsqrt.hpp
xmar/pythran
dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592
[ "BSD-3-Clause" ]
null
null
null
third_party/boost/simd/arch/ppc/vmx/simd/function/rsqrt.hpp
xmar/pythran
dbf2e8b70ed1e4d4ac6b5f26ead4add940a72592
[ "BSD-3-Clause" ]
2
2017-12-12T12:29:52.000Z
2019-04-08T15:55:25.000Z
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //================================================================================================== #ifndef BOOST_SIMD_ARCH_PPC_VMX_SIMD_FUNCTION_RSQRT_HPP_INCLUDED #define BOOST_SIMD_ARCH_PPC_VMX_SIMD_FUNCTION_RSQRT_HPP_INCLUDED #include <boost/simd/detail/overload.hpp> #include <boost/simd/constant/one.hpp> #include <boost/simd/constant/half.hpp> #include <boost/simd/constant/zero.hpp> #include <boost/simd/function/fma.hpp> #include <boost/simd/function/sqr.hpp> namespace boost { namespace simd { namespace ext { namespace bd = boost::dispatch; namespace bs = boost::simd; BOOST_DISPATCH_OVERLOAD( rsqrt_ , (typename A0) , bs::vmx_ , bs::pack_< bd::single_<A0>, bs::vmx_> ) { BOOST_FORCEINLINE A0 operator()(const A0& a0) const BOOST_NOEXCEPT { A0 o = One<A0>(); A0 estimate = fast_(rsqrt)(a0); A0 se = sqr(estimate); A0 he = estimate*Half<A0>(); A0 st = vec_nmsub(a0.storage(),se.storage(),o.storage()); return fma(st, he, estimate); } }; BOOST_DISPATCH_OVERLOAD( rsqrt_ , (typename A0) , bs::vmx_ , bs::fast_tag , bs::pack_< bd::single_<A0>, bs::vmx_> ) { BOOST_FORCEINLINE A0 operator()(bs::fast_tag const&, const A0& a0) const BOOST_NOEXCEPT { return vec_rsqrte( a0.storage() ); } }; } } } #endif
32
100
0.515086
xmar
a71a4a9cfa00696c592dbb3c5c783fe891256ce8
3,756
hpp
C++
altona/wz4lib/build.hpp
kebby/Werkkzeug4
f2ff557020d62c348b54d88e137999175b5c18a3
[ "BSD-2-Clause" ]
10
2020-11-26T09:45:15.000Z
2022-03-18T00:18:27.000Z
altona/wz4lib/build.hpp
kebby/Werkkzeug4
f2ff557020d62c348b54d88e137999175b5c18a3
[ "BSD-2-Clause" ]
null
null
null
altona/wz4lib/build.hpp
kebby/Werkkzeug4
f2ff557020d62c348b54d88e137999175b5c18a3
[ "BSD-2-Clause" ]
3
2020-01-02T19:11:44.000Z
2022-03-18T00:21:45.000Z
/*+**************************************************************************/ /*** ***/ /*** Copyright (C) by Dierk Ohlerich ***/ /*** all rights reserverd ***/ /*** ***/ /*** To license this software, please contact the copyright holder. ***/ /*** ***/ /**************************************************************************+*/ #ifndef FILE_WERKKZEUG4_BUILD_HPP #define FILE_WERKKZEUG4_BUILD_HPP #ifndef __GNUC__ #pragma once #endif #include "base/types2.hpp" #include "doc.hpp" class ScriptCompiler; class ScriptContext; /****************************************************************************/ struct wNode { wOp *Op; // each node has to represent an op. wOp *ScriptOp; // copy script from this op. Used for subroutine argumtent injection wNode **Inputs; wType *OutType; // real output type. Some ops specify "AnyType" as output. sInt InputCount; sInt FakeInputCount; // parameter only inputs sInt CycleCheck; sInt CallId; // this node is part of a subroutine call sPoolString LoopName; // for injecting loop counters with a fake op sF32 LoopValue; sInt LoopFlag; // inside call or loop (possibly multiple different results for the same op) sInt OutputCount; // used internally to find out good cache points sU8 StoreCache; // while execution, store cache sU8 LoadCache; // do no execute op, just load cache sU8 Visited; // used during recursion (OptimizeCacheR) wCommand *StoreCacheDone; // use the store cache! }; struct wBuilderPush { wNode *CallInputs; wOp *CallOp; sArray<wNode *> FakeInputs; // for call and loop sInt CurrentCallId; sInt LoopFlag; void GetFrom(wBuilder *); void PutTo(wBuilder *); }; class wBuilder { friend struct wBuilderPush; sMemoryPool *Pool; wNode *Root; wNode *MakeNode(sInt ic,sInt fc=0); const sChar *MakeString(const sChar *str1,const sChar *str2=0,const sChar *str3=0); wNode *ParseR(wOp *op,sInt recursion); void OptimizeCacheR(wNode **node); wCommand *OutputR(wExecutive &,wNode *node); wNode *SkipToSlowR(wNode *node); wCommand *MakeCommand(wExecutive &exe,wOp *op,wCommand **inputs,sInt inputcount,wOp *scriptop,wOp *d0,const sChar *d1,sInt callid,sInt fakeinputcount); void Error(wOp *op,const sChar *text); sInt Errors; void rssall(wNode *node,sInt flag); wNode *CallInputs; wOp *CallOp; sArray<wNode *> FakeInputs; // for call and loop sInt CallId; sInt CurrentCallId; sInt TypeCheckOnly; sInt LoopFlag; struct RecursionData_ { sArray<wOp *> inputs; sEndlessArray<sInt> inputloop; RecursionData_() : inputloop(-1) {} }; sEndlessArray<RecursionData_ *> RecursionData; // the new and delete in the recursion are very costly, especially with debug runtime. We can reuse the arrays! public: wBuilder(); ~wBuilder(); sBool Parse(wOp *root); sBool Optimize(sBool Cache); sBool TypeCheck(); sBool Output(wExecutive &); void SkipToSlow(sBool honorslow); sBool Check(wOp *root); sBool Depend(wExecutive &exe,wOp *root); wObject *Execute(wExecutive &,wOp *root,sBool honorslow,sBool progress); wObject *FindCache(wOp *root); sArray<wNode *> AllNodes; }; /****************************************************************************/ #endif // FILE_WERKKZEUG4_BUILD_HPP
33.238938
160
0.561235
kebby
a71ad25bdf939c6c0bfca9a4594ea7403041f7b3
1,290
cpp
C++
hiro/gtk/widget/vertical-slider.cpp
moon-chilled/Ares
909fb098c292f8336d0502dc677050312d8b5c81
[ "0BSD" ]
7
2020-07-25T11:44:39.000Z
2021-01-29T13:21:31.000Z
hiro/gtk/widget/vertical-slider.cpp
jchw-forks/ares
d78298a1e95fd0ce65feabfd4f13b60e31210a7a
[ "0BSD" ]
null
null
null
hiro/gtk/widget/vertical-slider.cpp
jchw-forks/ares
d78298a1e95fd0ce65feabfd4f13b60e31210a7a
[ "0BSD" ]
1
2021-03-22T16:15:30.000Z
2021-03-22T16:15:30.000Z
#if defined(Hiro_VerticalSlider) namespace hiro { static auto VerticalSlider_change(GtkRange* gtkRange, pVerticalSlider* p) -> void { auto position = (uint)gtk_range_get_value(gtkRange); if(p->state().position == position) return; p->state().position = position; if(!p->locked()) p->self().doChange(); } auto pVerticalSlider::construct() -> void { #if HIRO_GTK==2 gtkWidget = gtk_vscale_new_with_range(0, 100, 1); #elif HIRO_GTK==3 gtkWidget = gtk_scale_new_with_range(GTK_ORIENTATION_VERTICAL, 0, 100, 1); #endif gtk_scale_set_draw_value(GTK_SCALE(gtkWidget), false); setLength(state().length); setPosition(state().position); g_signal_connect(G_OBJECT(gtkWidget), "value-changed", G_CALLBACK(VerticalSlider_change), (gpointer)this); pWidget::construct(); } auto pVerticalSlider::destruct() -> void { gtk_widget_destroy(gtkWidget); } auto pVerticalSlider::minimumSize() const -> Size { return {20, 3}; } auto pVerticalSlider::setLength(uint length) -> void { length += length == 0; gtk_range_set_range(GTK_RANGE(gtkWidget), 0, max(1u, length - 1)); gtk_range_set_increments(GTK_RANGE(gtkWidget), 1, length >> 3); } auto pVerticalSlider::setPosition(uint position) -> void { gtk_range_set_value(GTK_RANGE(gtkWidget), position); } } #endif
26.326531
108
0.727907
moon-chilled
a71fd3fb8c339b2ab32c4b0525c64ca7c8fc088c
26,785
cpp
C++
Launcher/src/mainwindow.cpp
ProtocolONE/cord.app
0defd4e2cbc25d4f414fa68f8c1dfe65eadc02e7
[ "Apache-2.0" ]
8
2019-01-16T07:09:39.000Z
2020-11-06T23:13:46.000Z
Launcher/src/mainwindow.cpp
ProtocolONE/cord.app
0defd4e2cbc25d4f414fa68f8c1dfe65eadc02e7
[ "Apache-2.0" ]
null
null
null
Launcher/src/mainwindow.cpp
ProtocolONE/cord.app
0defd4e2cbc25d4f414fa68f8c1dfe65eadc02e7
[ "Apache-2.0" ]
3
2019-09-30T02:45:09.000Z
2019-09-30T23:17:26.000Z
#include <mainwindow.h> #include <Player.h> #include <BestInstallPath.h> #include <HostMessageAdapter.h> #include <Helper/CacheNetworkManagerFactory.h> #include <Features/PlainFileCache.h> #include <Features/Marketing/MarketingIntegrationMarker.h> #include <viewmodel/UpdateViewModel.h> #include <viewmodel/ApplicationStatisticViewModel.h> #include <viewmodel/SettingsViewModel.h> #include <viewmodel/GameSettingsViewModel.h> #include <viewmodel/ServiceHandleViewModel.h> #include <viewmodel/SettingsManagerViewModel.h> #include <Host/Translation.h> #include <Host/ClientConnection.h> #include <Host/Dbus/DbusConnection.h> #include <Host/Dbus/DownloaderBridgeProxy.h> #include <Host/Dbus/DownloaderSettingsBridgeProxy.h> #include <Host/Dbus/ServiceSettingsBridgeProxy.h> #include <Host/Dbus/ExecutorBridgeProxy.h> #include <Host/Dbus/ApplicationBridgeProxy.h> #include <Host/Dbus/ApplicationStatisticBridgeProxy.h> #include <Host/Dbus/LicenseManagerBridgeProxy.h> #include <Core/UI/Message.h> #include <Core/Marketing.h> #include <Core/System/FileInfo.h> #include <Core/System/HardwareId.h> #include <GameExecutor/GameExecutorService.h> #include <UpdateSystem/UpdateInfoGetterResultInterface.h> #include <RestApi/Request/RequestFactory.h> #include <Application/WindowHelper.h> #include <Settings/settings.h> #include <QtCore/QTranslator> #include <QtCore/QSysInfo> #include <QtCore/QFlags> #include <QtCore/QStringList> #include <QtCore/QSysInfo> #include <QtWidgets/QBoxLayout> #include <QtWidgets/QDesktopWidget> #include <QQmlEngine> #include <QQmlContext> #include <QQuickItem> #include <QQmlError> #include <QMetaType> #define SIGNAL_CONNECT_CHECK(X) { bool result = X; Q_ASSERT_X(result, __FUNCTION__ , #X); } using P1::Host::DBus::DBusConnection; using P1::Host::ClientConnection; using P1::RestApi::ProtocolOneCredential; MainWindow::MainWindow(QWindow *parent) : QQuickView(parent) , _gameArea(P1::Core::Service::Live) , _downloader(nullptr) , _downloaderSettings(nullptr) , _serviceSettings(nullptr) , _executor(nullptr) , _applicationProxy(nullptr) , _applicationStatistic(nullptr) , _clientConnection(nullptr) , _bestInstallPath(nullptr) { this->hide(); QString path = QCoreApplication::applicationDirPath(); path += "/Config.yaml"; if (!this->_configManager.load(path)) qWarning() << "Cannot read application config file: " << path; } MainWindow::~MainWindow() { } void MainWindow::initialize() { qRegisterMetaType<P1::Host::Bridge::DownloadProgressArgs>("P1::Host::Bridge::DownloadProgressArgs"); qDBusRegisterMetaType<P1::Host::Bridge::DownloadProgressArgs>(); // DBUS... QDBusConnection &connection = DBusConnection::bus(); QString dbusService("com.protocolone.launcher.dbus"); this->_clientConnection = new ClientConnection("Launcher", this); this->_clientConnection->init(); QObject::connect(this->_clientConnection, &ClientConnection::disconnected, this, &MainWindow::onWindowClose); QObject::connect(this->_clientConnection, &ClientConnection::authorizationError, this, &MainWindow::authorizationError); this->_applicationProxy = new ApplicationBridgeProxy(dbusService, "/application", connection, this); this->_downloader = new DownloaderBridgeProxy(dbusService, "/downloader", connection, this); this->_downloaderSettings = new DownloaderSettingsBridgeProxy(dbusService, "/downloader/settings", connection, this); this->_serviceSettings = new ServiceSettingsBridgeProxy(dbusService, "/serviceSettings", connection, this); this->_executor = new ExecutorBridgeProxy(dbusService, "/executor", connection, this); this->_applicationStatistic = new ApplicationStatisticBridgeProxy(dbusService, "/applicationStatistic", connection, this); this->_licenseManager = new LicenseManagerBridgeProxy(dbusService, "/licenseManager", connection, this); QObject::connect(this->_applicationProxy, &ApplicationBridgeProxy::languageChanged, this, &MainWindow::languageChanged); this->_bestInstallPath = new BestInstallPath(this); this->_bestInstallPath->setServiceSettings(this->_serviceSettings); QObject::connect(this->_applicationProxy, &ApplicationBridgeProxy::initCompleted, this, &MainWindow::initCompleted); QObject::connect(this->_applicationProxy, &ApplicationBridgeProxy::restartUIRequest, this, &MainWindow::restartUIRequest); QObject::connect(this->_applicationProxy, &ApplicationBridgeProxy::shutdownUIRequest, this, &MainWindow::shutdownUIRequest); QObject::connect(this->_applicationProxy, &ApplicationBridgeProxy::uninstallServiceRequest, this, &MainWindow::uninstallServiceRequest); QObject::connect(this->_applicationProxy, &ApplicationBridgeProxy::additionalResourcesReady, this, &MainWindow::additionalResourcesReady); qRegisterMetaType<P1::Host::Bridge::DownloadProgressArgs>("P1::Host::Bridge::DownloadProgressArgs"); qDBusRegisterMetaType<P1::Host::Bridge::DownloadProgressArgs>(); new HostMessageAdapter(this); this->initRestApi(); this->_commandLineArguments.parse(QCoreApplication::arguments()); if (this->_commandLineArguments.contains("gamepts")) this->_gameArea = P1::Core::Service::Pts; if (this->_commandLineArguments.contains("gametest")) this->_gameArea = P1::Core::Service::Tst; this->setFileVersion(P1::Core::System::FileInfo::version(QCoreApplication::applicationFilePath())); this->setTitle("ProtocolOne " + this->_fileVersion); this->setColor(QColor(0, 0, 0, 0)); this->setFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowSystemMenuHint); //Этот код уберет все внешние элементы формы P1::Host::Translation::load(this->translators, this); this->selectLanguage(this->_applicationProxy->language()); this->checkDesktopDepth(); this->settingsViewModel = new SettingsViewModel(this); this->settingsViewModel->setDownloaderSettings(this->_downloaderSettings); this->settingsViewModel->setApplicationProxy(this->_applicationProxy); qmlRegisterType<UpdateViewModel>("Launcher.Library", 1, 0, "UpdateViewModel"); qmlRegisterType<Player>("Launcher.Library", 1, 0, "Player"); qmlRegisterType<P1::Core::UI::Message>("Launcher.Library", 1, 0, "Message"); qmlRegisterType<ApplicationStatisticViewModel>("Launcher.Library", 1, 0, "ApplicationStatistic"); qmlRegisterType<ServiceHandleViewModel>("Launcher.Library", 1, 0, "ServiceHandle"); qmlRegisterType<SettingsManagerViewModel>("Launcher.Library", 1, 0, "SettingsManager"); qmlRegisterUncreatableType<P1::Downloader::DownloadResultsWrapper>("Launcher.Library", 1, 0, "DownloadResults", ""); qmlRegisterUncreatableType<P1::UpdateSystem::UpdateInfoGetterResultsWrapper>("Launcher.Library", 1, 0, "UpdateInfoGetterResults", ""); //this->initMarketing(); this->engine()->setNetworkAccessManagerFactory(new CacheNetworkManagerFactory(this)); this->engine()->addImportPath(":/"); this->engine()->addImportPath((QCoreApplication::applicationDirPath() + "/plugins5/")); this->engine()->addPluginPath(QCoreApplication::applicationDirPath() + "/plugins5/"); QObject::connect( &this->_restapiManager, &P1::RestApi::RestApiManager::authorizationError, this, &MainWindow::onAuthorizationError); messageAdapter = new QmlMessageAdapter(this); this->_gameSettingsViewModel = new GameSettingsViewModel(this); this->_gameSettingsViewModel->setDownloader(this->_downloader); this->_gameSettingsViewModel->setServiceSettings(this->_serviceSettings); this->rootContext()->setContextProperty("keyboardHook", &this->_keyboardLayoutHelper); this->rootContext()->setContextProperty("mainWindow", this); this->rootContext()->setContextProperty("installPath", "file:///" + QCoreApplication::applicationDirPath() + "/"); this->rootContext()->setContextProperty("settingsViewModel", settingsViewModel); this->rootContext()->setContextProperty("messageBox", messageAdapter); this->rootContext()->setContextProperty("gameSettingsModel", this->_gameSettingsViewModel); this->setResizeMode(QQuickView::SizeRootObjectToView); this->setSource(QUrl("qrc:/Main.qml")); if (this->status() == QQuickView::Status::Error) { Q_FOREACH(const QQmlError& error, this->errors()) { DEBUG_LOG << error; } // UNDONE решить что делать в случаи фейла верстки } QObject::connect(this->engine(), &QQmlEngine::quit, this, &MainWindow::onWindowClose); QObject::connect(this, &MainWindow::quit, this, &MainWindow::onWindowClose); Message::setAdapter(messageAdapter); if (this->_commandLineArguments.contains("minimized")) { //this->showMinimized(); this->hide(); } else { DEBUG_LOG; this->activateWindow(); } this->sendStartingMarketing(); this->_keyboardLayoutHelper.update(); } void MainWindow::hideToTaskBar() { this->showMinimized(); } void MainWindow::sendStartingMarketing() { int dwMajorVersion = 6; int dwMinorVersion = 1; switch (QSysInfo::windowsVersion()) { case QSysInfo::WV_5_1: dwMajorVersion = 5; dwMinorVersion = 1; break; case QSysInfo::WV_6_0: dwMajorVersion = 6; dwMinorVersion = 0; break; case QSysInfo::WV_6_1: dwMajorVersion = 6; dwMinorVersion = 1; break; case QSysInfo::WV_6_2: dwMajorVersion = 6; dwMinorVersion = 2; break; case QSysInfo::WV_6_3: dwMajorVersion = 6; dwMinorVersion = 3; break; case QSysInfo::WV_10_0: dwMajorVersion = 10; dwMinorVersion = 0; break; } QVariantMap params; params["windowsMajorVersion"] = dwMajorVersion; params["windowsMinorVersion"] = dwMinorVersion; params["windowsVersion"] = QSysInfo::productVersion(); params["updateArea"] = this->settingsViewModel->updateArea(); params["version"] = this->_fileVersion; P1::Core::Marketing::send(P1::Core::Marketing::AnyStartLauncher, params); P1::Core::Marketing::sendOnce(P1::Core::Marketing::FirstRunLauncher); } void MainWindow::restartUISlot(bool minimized) { this->_applicationProxy->restartApplication(minimized); } void MainWindow::shutdownUISlot() { this->_applicationProxy->shutdownUIResult(); this->onWindowClose(); } void MainWindow::terminateGame(const QString& serviceId) { this->_executor->terminateGame(serviceId); } bool MainWindow::isInitCompleted() { return this->_applicationProxy->isInitCompleted(); } void MainWindow::checkDesktopDepth() { QDesktopWidget widget; if (widget.depth() == 16) { QString info = QObject::tr("SCREEN_DEPTH_LOVER_THAN_16_INFO"); QString caption = QObject::tr("SCREEN_DEPTH_LOVER_THAN_16_CAPTION"); MessageBoxW(0, info.toStdWString().c_str(), caption.toStdWString().c_str(), MB_OK | MB_ICONINFORMATION); } } bool MainWindow::nativeEvent(const QByteArray & eventType, void * message, long * result) { if (message != nullptr && reinterpret_cast<MSG*>(message)->message == WM_KEYUP) this->_keyboardLayoutHelper.update(); return QQuickView::nativeEvent(eventType, message, result); } void MainWindow::activateWindow() { DEBUG_LOG << "activateWindow"; this->show(); // Это нам покажет окно //this->setFocusPolicy(Qt::StrongFocus); //this->setWindowState(Qt::WindowActive); this->showNormal(); // Эта функция активирует окно и поднмиает его повех всех окон P1::Application::WindowHelper::activate(reinterpret_cast<HWND>(this->winId())); this->_taskBarHelper.restore(); //this->repaint(); } bool MainWindow::isDownloading(QString serviceId) { return this->_downloader->isInProgress(serviceId); } QString MainWindow::language() { return this->_applicationProxy->language(); } const QString& MainWindow::fileVersion() const { return _fileVersion; } void MainWindow::saveLanguage(const QString& language) { this->_applicationProxy->setLanguage(language); } void MainWindow::selectLanguage(const QString& language) { if (this->translators[language]) QApplication::installTranslator(this->translators[language]); emit this->languageChanged(); } void MainWindow::onWindowClose() { DEBUG_LOG << "Shutting down"; //this->repaint(); this->hide(); this->_clientConnection->close(); QCoreApplication::quit(); } void MainWindow::authSuccessSlot(const QString& accessToken, const QString& acccessTokenExpiredTime) { this->_credential.setAcccessTokent(accessToken); this->_credential.setAccessTokenExpiredTime(acccessTokenExpiredTime); qDebug() << "Auth success with userId " << this->_credential.userId(); this->_restapiManager.setCridential(this->_credential); this->_clientConnection->setCredential(this->_credential); } void MainWindow::updateAuthCredential(const QString& accessTokenOld, const QString& acccessTokenExpiredTimeOld , const QString& accessTokenNew, const QString& acccessTokenExpiredTimeNew) { if (accessTokenOld == this->_credential.acccessTokent()) { this->_credential.setAcccessTokent(accessTokenNew); this->_credential.setAccessTokenExpiredTime(acccessTokenExpiredTimeNew); this->_restapiManager.setCridential(this->_credential); this->_clientConnection->setCredential(this->_credential); } ProtocolOneCredential oldValue(accessTokenOld, acccessTokenExpiredTimeOld); ProtocolOneCredential newValue(accessTokenNew, acccessTokenExpiredTimeNew); this->_restapiManager.updateCredential(oldValue, newValue); this->_clientConnection->updateCredential(oldValue, newValue); } void MainWindow::restartApplication(bool shouldStartWithSameArguments) { this->_applicationProxy->restartApplication(shouldStartWithSameArguments); } void MainWindow::openExternalUrlWithAuth(const QString& url) { //QString authUrl; //if(this->_credential.appKey().isEmpty()) { // authUrl = url; //} else { // authUrl = "https://gnlogin.ru/?auth="; // authUrl.append(this->_credential.cookie()); // authUrl.append("&rp="); // authUrl.append(QUrl::toPercentEncoding(url)); //} //authUrl.append('\0'); // UNDONE There are no shared auth between sites now. this->openExternalUrl(url); } void MainWindow::openExternalUrl(const QString& url) { QDesktopServices::openUrl(url); } void MainWindow::logout() { this->_credential.clear(); this->_restapiManager.setCridential(this->_credential); this->_clientConnection->setCredential(this->_credential); } void MainWindow::prepairGameDownloader() { using P1::GameDownloader::GameDownloadService; QObject::connect(this->_downloader, &DownloaderBridgeProxy::totalProgress, this, &MainWindow::downloadGameTotalProgressChanged); QObject::connect(this->_downloader, &DownloaderBridgeProxy::downloadProgress, this, &MainWindow::downloadGameProgressChanged); QObject::connect(this->_downloader, &DownloaderBridgeProxy::started, this, &MainWindow::gameDownloaderStarted); QObject::connect(this->_downloader, &DownloaderBridgeProxy::finished, this, &MainWindow::gameDownloaderFinished); QObject::connect(this->_downloader, &DownloaderBridgeProxy::stopped, this, &MainWindow::gameDownloaderStopped); QObject::connect(this->_downloader, &DownloaderBridgeProxy::stopping, this, &MainWindow::gameDownloaderStopping); QObject::connect(this->_downloader, &DownloaderBridgeProxy::failed, this, &MainWindow::gameDownloaderFailed); QObject::connect(this->_downloader, &DownloaderBridgeProxy::statusMessageChanged, this, &MainWindow::gameDownloaderStatusMessageChanged); QObject::connect(this->_downloader, &DownloaderBridgeProxy::serviceInstalled, this, &MainWindow::gameDownloaderServiceInstalled); QObject::connect(this->_downloader, &DownloaderBridgeProxy::serviceUpdated, this, &MainWindow::gameDownloaderServiceUpdated); QObject::connect(this->_downloader, &DownloaderBridgeProxy::accessRequired, this, &MainWindow::gameDownloaderAccessRequired); } void MainWindow::downloadGameTotalProgressChanged(const QString& serviceId, int progress) { emit totalProgressChanged(serviceId, progress); } void MainWindow::downloadGameProgressChanged( const QString& serviceId, int progress, P1::Host::Bridge::DownloadProgressArgs args) { if (args.status == static_cast<int>(P1::Libtorrent::EventArgs::ProgressEventArgs::CheckingFiles)) { emit this->rehashProgressChanged(serviceId, progress, args.progress * 100); return; } emit this->downloadProgressChanged(serviceId, progress, args.totalWantedDone, args.totalWanted, args.directTotalDownload, args.peerTotalDownload, args.payloadTotalDownload, args.peerPayloadDownloadRate, args.payloadDownloadRate, args.directPayloadDownloadRate, args.payloadUploadRate, args.totalPayloadUpload); } void MainWindow::gameDownloaderStarted(const QString& serviceId, int startType) { emit this->downloaderStarted(serviceId, startType); } void MainWindow::gameDownloaderFinished(const QString& serviceId) { emit this->downloaderFinished(serviceId); } bool MainWindow::executeService(QString id) { if (this->_executor->isGameStarted(id)) return false; if (!this->isWindowVisible()) { emit this->selectService(id); return false; } // UNDONE we shouldn't check here //if (!this->_restapiManager.credential().isValid()) { // emit this->authBeforeStartGameRequest(id); // return false; //} if (!this->_serviceSettings->isDownloadable(id)) this->_licenseManager->acceptWebLicense(); P1::RestApi::ProtocolOneCredential baseCredential = P1::RestApi::RestApiManager::commonInstance()->credential(); this->_executor->execute( id, baseCredential.acccessTokent(), baseCredential.accessTokenExpiredTimeAsString()); this->startGame(id); return true; } void MainWindow::gameDownloaderStopped(const QString& serviceId) { emit this->downloaderStopped(serviceId); } void MainWindow::gameDownloaderStopping(const QString& serviceId) { emit this->downloaderStopping(serviceId); } void MainWindow::updateFinishedSlot() { this->postUpdateInit(); } void MainWindow::gameDownloaderFailed(const QString& serviceId) { emit this->downloaderFailed(serviceId); } void MainWindow::removeStartGame(QString serviceId) { int totalCount = this->_applicationStatistic->executeGameTotalCount(serviceId); if (totalCount > 0) { this->selectService(serviceId); return; } this->downloadButtonStart(serviceId); } void MainWindow::downloadButtonStart(QString serviceId) { qDebug() << "downloadButtonStart " << serviceId; emit this->downloadButtonStartSignal(serviceId); if (!this->_serviceSettings->isDownloadable(serviceId)) { int totalCount = this->_applicationStatistic->executeGameTotalCount(serviceId); if (0 == totalCount) { emit this->showWebLicense(serviceId); return; } this->startGame(serviceId); return; } if (this->isLicenseAccepted(serviceId)) { this->startGame(serviceId); return; } DEBUG_LOG; this->activateWindow(); emit this->showLicense(serviceId); } void MainWindow::downloadButtonPause(QString serviceId) { if (this->_serviceSettings->isDownloadable(serviceId)) { this->_downloader->stop(serviceId); return; } P1::RestApi::ProtocolOneCredential baseCredential = P1::RestApi::RestApiManager::commonInstance()->credential(); this->_executor->execute(serviceId , baseCredential.acccessTokent() , baseCredential.accessTokenExpiredTimeAsString()); } void MainWindow::uninstallService(const QString serviceId) { this->_downloader->start(serviceId, P1::GameDownloader::Uninstall); } void MainWindow::cancelServiceUninstall(const QString serviceId) { this->_applicationProxy->cancelUninstallServiceRequest(serviceId); } bool MainWindow::isLicenseAccepted(const QString& serviceId) { return this->_licenseManager->hasAcceptedLicense(serviceId); } void MainWindow::startGame(const QString& serviceId) { if (this->_executor->isGameStarted(serviceId)) return; if (this->_serviceSettings->isDownloadable(serviceId)) { this->_downloader->start(serviceId, static_cast<int>(P1::GameDownloader::Normal)); return; } // UNDONE we shouldn't check here //bool isAuthed = !this->_restapiManager.credential().isValid(); //if (!isAuthed) { // emit this->authBeforeStartGameRequest(serviceId); // return; //} P1::RestApi::ProtocolOneCredential baseCredential = P1::RestApi::RestApiManager::commonInstance()->credential(); this->_executor->execute( serviceId, baseCredential.acccessTokent(), baseCredential.accessTokenExpiredTimeAsString()); } void MainWindow::commandRecieved(QString name, QStringList arguments) { DEBUG_LOG << name << arguments; if (name == "quit") { this->onWindowClose(); return; } if (name == "settings") { emit this->navigate("ApplicationSettings"); return; } if (name == "activate") { DEBUG_LOG; this->activateWindow(); return; } if (name == "goprotocolonemoney") { this->navigate("goprotocolonemoney"); return; } if (name == "uninstall" && arguments.size() > 0) { QString serviceId = arguments.at(0); emit this->uninstallServiceRequest(serviceId); } } void MainWindow::onServiceStarted(const QString &serviceId) { emit this->serviceStarted(serviceId); } void MainWindow::onServiceFinished(const QString &serviceId, int state) { emit this->serviceFinished(serviceId, state); } void MainWindow::gameDownloaderStatusMessageChanged(const QString& serviceId, const QString& message) { emit this->downloaderServiceStatusMessageChanged(serviceId, message); } void MainWindow::onAuthorizationError(const P1::RestApi::ProtocolOneCredential &credential) { if (credential.userId() == this->_credential.userId() && this->_credential != credential && this->_credential.isValid()) { this->_clientConnection->updateCredential(credential, this->_credential); } emit this->authorizationError(credential.acccessTokent(), credential.accessTokenExpiredTimeAsString()); } void MainWindow::showEvent(QShowEvent* event) { this->_taskBarHelper.prepare(reinterpret_cast<HWND>(this->winId())); emit this->taskBarButtonMsgRegistered(this->_taskBarHelper.getTaskbarCreatedMessageId()); QQuickView::showEvent(event); } bool MainWindow::isWindowVisible() { return this->isVisible() && this->windowState() != Qt::WindowMinimized; } void MainWindow::gameDownloaderServiceInstalled(const QString& serviceId) { emit this->serviceInstalled(serviceId); } void MainWindow::gameDownloaderServiceUpdated(const QString& serviceId) { DEBUG_LOG; this->activateWindow(); emit this->selectService(serviceId); } void MainWindow::postUpdateInit() { this->prepairGameDownloader(); QObject::connect(this->_executor, &ExecutorBridgeProxy::serviceStarted, this, &MainWindow::onServiceStarted); QObject::connect(this->_executor, &ExecutorBridgeProxy::serviceFinished, this, &MainWindow::onServiceFinished); } bool MainWindow::anyLicenseAccepted() { return this->_licenseManager->hasAcceptedLicense(); } QString MainWindow::startingService() { if (!this->_commandLineArguments.contains("startservice")) return "0"; QStringList arguments = this->_commandLineArguments.commandArguments("startservice"); if (arguments.count() > 0) return arguments.at(0); return "0"; } QString MainWindow::getExpectedInstallPath(const QString& serviceId) { return this->_bestInstallPath->expectedPath(serviceId); } QString MainWindow::getBestInstallPath(const QString& serviceId) { return this->_bestInstallPath->bestInstallPath(serviceId); } void MainWindow::setServiceInstallPath(const QString& serviceId, const QString& path) { this->_serviceSettings->setInstallPath(serviceId, path); if (!this->_serviceSettings->hasDownloadPath(serviceId)) { this->_serviceSettings->setDownloadPath(serviceId, path); return; } QString downloadPath = this->_serviceSettings->isDefaultDownloadPath(serviceId) ? QString("%1/dist").arg(path) : this->_serviceSettings->downloadPath(serviceId); this->_serviceSettings->setDownloadPath(serviceId, downloadPath); } void MainWindow::acceptFirstLicense(const QString& serviceId) { this->_licenseManager->acceptLicense(serviceId, "1"); } void MainWindow::initFinished() { emit this->updateFinished(); } void MainWindow::initRestApi() { QString apiUrl = this->_configManager.value<QString>("api\\url", "https://api.tst.protocol.one/"); qDebug() << "Using RestApi url " << apiUrl; this->_restapiManager.setUri(apiUrl); this->_restapiManager.setCache(new Features::PlainFileCache(&this->_restapiManager)); bool debugLogEnabled = this->_configManager.value<bool>("api\\debug", false); this->_restapiManager.setDebugLogEnabled(debugLogEnabled); P1::RestApi::RestApiManager::setCommonInstance(&this->_restapiManager); } bool MainWindow::event(QEvent* event) { switch(event->type()) { case QEvent::Close: this->hide(); event->ignore(); break; } return QQuickView::event(event); } //void MainWindow::initMarketing() //{ // QSettings midSettings( // QSettings::NativeFormat, // QSettings::UserScope, // QCoreApplication::organizationName(), // QCoreApplication::applicationName()); // // QString mid = midSettings.value("MID", "").toString(); // this->_marketingTargetFeatures.init("Launcher", mid); // // int installerKey = midSettings.value("InstKey").toInt(); // this->_marketingTargetFeatures.setInstallerKey(installerKey); // this->_marketingTargetFeatures.setRequestInterval(1000); //} void MainWindow::mousePressEvent(QMouseEvent* event) { if (event->button() & Qt::LeftButton) emit this->leftMousePress(event->x(), event->y()); QQuickView::mousePressEvent(event); } void MainWindow::mouseReleaseEvent(QMouseEvent* event) { if (event->button() & Qt::LeftButton) emit this->leftMouseRelease(event->x(), event->y()); QQuickView::mouseReleaseEvent(event); } void MainWindow::onTaskbarButtonCreated() { this->_taskBarHelper.init(); } void MainWindow::onProgressUpdated(int progressValue, const QString &status) { TaskBarHelper::Status newStatus = TaskBarHelper::StatusUnknown; if (status == "Normal") { newStatus = TaskBarHelper::StatusNormal; } else if (status == "Paused") { newStatus = TaskBarHelper::StatusPaused; } else if (status == "Error") { newStatus = TaskBarHelper::StatusError; } this->_taskBarHelper.setProgress(progressValue); this->_taskBarHelper.setStatus(newStatus); } void MainWindow::setTaskbarIcon(const QString &iconSource) { this->_taskBarHelper.setIcon(iconSource); } void MainWindow::onLanguageChanged() { this->_keyboardLayoutHelper.update(); } void MainWindow::switchClientVersion() { this->_applicationProxy->switchClientVersion(); }
29.927374
137
0.746985
ProtocolONE
a721bf4888f6362919db9cb5450793d3b4785417
3,624
cpp
C++
groups/bal/ball/doc/keyfeatures_example2.cpp
eddiepierce/bde
45953ece9dd1cd8732f01a1cd24bbe838791d298
[ "Apache-2.0" ]
1
2021-11-10T16:53:42.000Z
2021-11-10T16:53:42.000Z
groups/bal/ball/doc/keyfeatures_example2.cpp
eddiepierce/bde
45953ece9dd1cd8732f01a1cd24bbe838791d298
[ "Apache-2.0" ]
2
2020-11-05T15:20:55.000Z
2021-01-05T19:38:43.000Z
groups/bal/ball/doc/keyfeatures_example2.cpp
eddiepierce/bde
45953ece9dd1cd8732f01a1cd24bbe838791d298
[ "Apache-2.0" ]
2
2020-01-16T17:58:12.000Z
2020-08-11T20:59:30.000Z
// keyfeatures_example2.cpp -*-C++-*- #include <ball_log.h> #include <ball_loggermanager.h> #include <ball_loggermanagerconfiguration.h> #include <ball_fileobserver.h> #include <ball_scopedattribute.h> #include <bslma_allocator.h> #include <bslma_default.h> #include <bsl_iostream.h> #include <bsl_memory.h> using namespace BloombergLP; ///Key Example 2: Initialization ///- - - - - - - - - - - - - - - // Clients that perform logging must first instantiate the singleton logger // manager using the 'ball::LoggerManagerScopedGuard' class. This example // shows how to create a logger manager with basic "default behavior". // Subsequent examples will show more customized behavior. // // The following snippets of code illustrate the initialization sequence // (typically performed near the top of 'main'). // // First, we create a 'ball::LoggerManagerConfiguration' object, // 'configuration', and set the logging "pass-through" level -- the level at // which log records are published to registered observers -- to 'WARN' (see // {'Categories, Severities, and Threshold Levels'}): //.. // myApp.cpp // int main() { ball::LoggerManagerConfiguration configuration; configuration.setDefaultThresholdLevelsIfValid(ball::Severity::e_WARN); //.. // Next, create a 'ball::LoggerManagerScopedGuard' object whose constructor // takes the configuration object just created. The guard will initialize the // logger manager singleton on creation and destroy the singleton upon // destruction. This guarantees that any resources used by the logger manager // will be properly released when they are not needed: //.. ball::LoggerManagerScopedGuard guard(configuration); //.. // Note that the application is now prepared to log messages using the 'ball' // logging subsystem, but until the application registers an observer, all log // messages will be discarded. // // Finally, we create a 'ball::FileObserver' object 'observer' that will // publish records to a file, and exceptional records to 'stdout'. We // configure the log format to publish log attributes (see // {Key Example 1: Write to a Log}, enable the logger to write to a log file, // and then register 'observer' with the logger manager. Note that observers // must be registered by name; this example simply uses "default" for a name: //.. bslma::Allocator *alloc = bslma::Default::globalAllocator(0); // bsl::shared_ptr<ball::FileObserver> observer = bsl::allocate_shared<ball::FileObserver>(alloc); observer->setLogFormat( ball::RecordStringFormatter::k_BASIC_ATTRIBUTE_FORMAT, ball::RecordStringFormatter::k_BASIC_ATTRIBUTE_FORMAT); if (0 != observer->enableFileLogging("myapplication.log.%T")) { bsl::cout << "Failed to enable logging" << bsl::endl; return -1; } ball::LoggerManager::singleton().registerObserver(observer, "default"); //.. // The application is now prepared to log messages using the 'ball' logging // subsystem: //.. // ... // BALL_LOG_SET_CATEGORY("MYLIBRARY.MYSUBSYSTEM"); BALL_LOG_ERROR << "Exiting the application (0)"; return 0; } //.. // Note that concrete observers that can be configured after their creation // (e.g., as to whether log records are published in UTC or local time) // generally can have their configuration adjusted at any time, either before // or after being registered with a logger manager. For an example of such an // observer, see 'ball_asyncfileobserver'.
41.181818
79
0.700607
eddiepierce
a7224bf0b37c6f87d5513c1751520f59e4f05702
14,355
hpp
C++
SDK/ARKSurvivalEvolved_DinoBlueprintBase_VariableMovement_parameters.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
10
2020-02-17T19:08:46.000Z
2021-07-31T11:07:19.000Z
SDK/ARKSurvivalEvolved_DinoBlueprintBase_VariableMovement_parameters.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
9
2020-02-17T18:15:41.000Z
2021-06-06T19:17:34.000Z
SDK/ARKSurvivalEvolved_DinoBlueprintBase_VariableMovement_parameters.hpp
2bite/ARK-SDK
c38ca9925309516b2093ad8c3a70ed9489e1d573
[ "MIT" ]
3
2020-07-22T17:42:07.000Z
2021-06-19T17:16:13.000Z
#pragma once // ARKSurvivalEvolved (329.9) SDK #ifdef _MSC_VER #pragma pack(push, 0x8) #endif #include "ARKSurvivalEvolved_DinoBlueprintBase_VariableMovement_classes.hpp" namespace sdk { //--------------------------------------------------------------------------- //Parameters //--------------------------------------------------------------------------- // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.BlueprintPlayAnimationEvent struct UDinoBlueprintBase_VariableMovement_C_BlueprintPlayAnimationEvent_Params { class UAnimMontage** AnimationMontage; // (Parm, ZeroConstructor, IsPlainOldData) float* PlayRate; // (Parm, ZeroConstructor, IsPlainOldData) float playedAnimLength; // (Parm, OutParm, ZeroConstructor, IsPlainOldData) }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5076 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5076_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3750 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3750_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5075 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5075_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ModifyBone_774 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ModifyBone_774_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3749 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3749_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3748 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3748_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3747 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3747_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3746 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3746_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5074 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5074_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5073 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5073_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3745 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3745_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3744 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3744_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5070 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5070_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_RotationOffsetBlendSpace_240 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_RotationOffsetBlendSpace_240_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5069 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5069_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3743 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3743_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3742 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3742_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5068 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5068_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5067 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5067_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3741 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3741_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3740 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3740_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3739 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3739_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ModifyBone_773 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ModifyBone_773_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3738 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3738_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3737 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3737_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3736 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3736_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_GroundBones_228 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_GroundBones_228_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_GroundBones_227 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_GroundBones_227_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ApplyAdditive_408 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ApplyAdditive_408_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3735 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3735_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_RotationOffsetBlendSpace_239 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_RotationOffsetBlendSpace_239_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3734 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_BlendListByBool_3734_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ApplyAdditive_407 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_ApplyAdditive_407_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5062 struct UDinoBlueprintBase_VariableMovement_C_EvaluateGraphExposedInputs_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_AnimGraphNode_SequencePlayer_5062_Params { }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.BlueprintUpdateAnimation struct UDinoBlueprintBase_VariableMovement_C_BlueprintUpdateAnimation_Params { float* DeltaTimeX; // (Parm, ZeroConstructor, IsPlainOldData) }; // Function DinoBlueprintBase_VariableMovement.DinoBlueprintBase_VariableMovement_C.ExecuteUbergraph_DinoBlueprintBase_VariableMovement struct UDinoBlueprintBase_VariableMovement_C_ExecuteUbergraph_DinoBlueprintBase_VariableMovement_Params { int EntryPoint; // (Parm, ZeroConstructor, IsPlainOldData) }; } #ifdef _MSC_VER #pragma pack(pop) #endif
67.712264
205
0.911181
2bite
a729fc2aba67070dc2232a6ecd145f572758e1c6
397
cpp
C++
gripper/schmalz-ecbpi/main/SimGripper.cpp
opcua-skills/plug-and-produce
5567cd6177f973e97579fbd9d06ebbf23569ccfb
[ "Unlicense" ]
5
2020-04-15T03:24:48.000Z
2021-11-03T17:39:59.000Z
gripper/schmalz-ecbpi/main/SimGripper.cpp
opcua-skills/plug-and-produce
5567cd6177f973e97579fbd9d06ebbf23569ccfb
[ "Unlicense" ]
null
null
null
gripper/schmalz-ecbpi/main/SimGripper.cpp
opcua-skills/plug-and-produce
5567cd6177f973e97579fbd9d06ebbf23569ccfb
[ "Unlicense" ]
2
2020-07-04T16:01:25.000Z
2021-07-05T09:33:55.000Z
/* * This file is subject to the terms and conditions defined in * file 'LICENSE', which is part of this source code package. * * Copyright (c) 2020 fortiss GmbH, Stefan Profanter * All rights reserved. */ #include "SimGripper.h" bool SimGripper::startVaccum() { return true; } bool SimGripper::stopVaccum() { return true; } bool SimGripper::dropOff() { return true; }
18.045455
62
0.677582
opcua-skills
a731b845abc25134e8b1d4bd03e8d441bf82682f
341
cpp
C++
Problem/Presents.cpp
Shahin-Sheikh/Competitive-Programming
f66d9e1bb9013cc36bdb41faef699494fd73b952
[ "MIT" ]
1
2021-05-03T07:00:50.000Z
2021-05-03T07:00:50.000Z
Problem/Presents.cpp
Shahin-Sheikh/Codeforces
578e1eed1c8a77e55f217ab6036fee1206af1d3a
[ "MIT" ]
null
null
null
Problem/Presents.cpp
Shahin-Sheikh/Codeforces
578e1eed1c8a77e55f217ab6036fee1206af1d3a
[ "MIT" ]
null
null
null
#include<bits/stdc++.h> using namespace std; int main(){ int n,x,res=0; cin>>n; for(int i=0;i<n;i++){ cin>>x; } if(n==1){ res = 1; cout<<res<<"\n"; } else if(n==1){ res = 2; cout<<res<<"\n"; } else{ res = n/2; cout<<res<<"\n"; } return 0; }
14.826087
25
0.375367
Shahin-Sheikh
a73a580e93f2029733d71888c7713e41a4ef71e6
332
hpp
C++
core/interface/i_node.hpp
auyunli/enhance
ca99530c80b42842e713ed4b62e40d12e56ee24a
[ "BSD-2-Clause" ]
null
null
null
core/interface/i_node.hpp
auyunli/enhance
ca99530c80b42842e713ed4b62e40d12e56ee24a
[ "BSD-2-Clause" ]
null
null
null
core/interface/i_node.hpp
auyunli/enhance
ca99530c80b42842e713ed4b62e40d12e56ee24a
[ "BSD-2-Clause" ]
null
null
null
#ifndef E2_I_NODE_INOUT_HPP #define E2_I_NODE_INOUT_HPP #include <thread> #include <functional> #include <type_traits> #include <list> namespace e2 { namespace interface { template< class Impl > class i_node_inout : public Impl { public: std::list< i_node_inout * > _in; std::list< i_node_inout * > _out; }; } } #endif
15.809524
37
0.716867
auyunli
a73b3100617bf9d71525ee7c9cf6e598ae4887a7
29,880
hpp
C++
src/nonlinear_solvers.hpp
Pressio/pressio4py
36676dbd112a7c7960ccbf302ff14d4376c819ec
[ "Unlicense", "BSD-3-Clause" ]
4
2020-07-06T20:01:39.000Z
2022-03-05T09:23:40.000Z
src/nonlinear_solvers.hpp
Pressio/pressio4py
36676dbd112a7c7960ccbf302ff14d4376c819ec
[ "Unlicense", "BSD-3-Clause" ]
19
2020-02-27T20:52:53.000Z
2022-01-13T16:24:49.000Z
src/nonlinear_solvers.hpp
Pressio/pressio4py
36676dbd112a7c7960ccbf302ff14d4376c819ec
[ "Unlicense", "BSD-3-Clause" ]
1
2022-03-03T16:05:09.000Z
2022-03-03T16:05:09.000Z
/* //@HEADER // ************************************************************************ // // nonlinear_solvers.hpp // Pressio // Copyright 2019 // National Technology & Engineering Solutions of Sandia, LLC (NTESS) // // Under the terms of Contract DE-NA0003525 with NTESS, the // U.S. Government retains certain rights in this software. // // Pressio is licensed under BSD-3-Clause terms of use: // // 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. Neither the name of the copyright holder nor the names of its // contributors may be used to endorse or promote products derived // from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "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 // COPYRIGHT HOLDER OR CONTRIBUTORS 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. // // Questions? Contact Francesco Rizzi ([email protected]) // // ************************************************************************ //@HEADER */ #ifndef PRESSIO4PY_PYBINDINGS_NONLINEAR_SOLVERS_HPP_ #define PRESSIO4PY_PYBINDINGS_NONLINEAR_SOLVERS_HPP_ namespace pressio4py{ namespace solvers{ void bindUpdatingEnums(pybind11::module & m) { pybind11::enum_<pressio::nonlinearsolvers::Update>(m, "update") .value("Standard", pressio::nonlinearsolvers::Update::Standard) .value("Armijo", pressio::nonlinearsolvers::Update::Armijo) .value("LMSchedule1", pressio::nonlinearsolvers::Update::LMSchedule1) .value("LMSchedule2", pressio::nonlinearsolvers::Update::LMSchedule2) .export_values(); } void bindStoppingEnums(pybind11::module & m) { pybind11::enum_<pressio::nonlinearsolvers::Stop>(m, "stop") .value("WhenCorrectionAbsoluteNormBelowTolerance", pressio::nonlinearsolvers::Stop::WhenCorrectionAbsoluteNormBelowTolerance) .value("WhenCorrectionRelativeNormBelowTolerance", pressio::nonlinearsolvers::Stop::WhenCorrectionRelativeNormBelowTolerance) .value("WhenResidualAbsoluteNormBelowTolerance", pressio::nonlinearsolvers::Stop::WhenResidualAbsoluteNormBelowTolerance) .value("WhenResidualRelativeNormBelowTolerance", pressio::nonlinearsolvers::Stop::WhenResidualRelativeNormBelowTolerance) .value("WhenGradientAbsoluteNormBelowTolerance", pressio::nonlinearsolvers::Stop::WhenGradientAbsoluteNormBelowTolerance) .value("WhenGradientRelativeNormBelowTolerance", pressio::nonlinearsolvers::Stop::WhenGradientRelativeNormBelowTolerance) .value("AfterMaxIters", pressio::nonlinearsolvers::Stop::AfterMaxIters) .export_values(); } template <typename nonlinear_solver_t> void bindCommonSolverMethods(pybind11::class_<nonlinear_solver_t> & solverObj) { // methods to set and query num of iterations solverObj.def("maxIterations", &nonlinear_solver_t::maxIterations); solverObj.def("setMaxIterations", &nonlinear_solver_t::setMaxIterations); // updating criterion solverObj.def("setUpdatingCriterion", &nonlinear_solver_t::setUpdatingCriterion); solverObj.def("updatingCriterion", &nonlinear_solver_t::updatingCriterion); } template <typename nonlinear_solver_t> void bindTolerancesMethods(pybind11::class_<nonlinear_solver_t> & solverObj) { // tolerances solverObj.def("setTolerance", &nonlinear_solver_t::setTolerance); solverObj.def("setCorrectionAbsoluteTolerance", &nonlinear_solver_t::setCorrectionAbsoluteTolerance); solverObj.def("setCorrectionRelativeTolerance", &nonlinear_solver_t::setCorrectionRelativeTolerance); solverObj.def("setResidualAbsoluteTolerance", &nonlinear_solver_t::setResidualAbsoluteTolerance); solverObj.def("setResidualRelativeTolerance", &nonlinear_solver_t::setResidualRelativeTolerance); solverObj.def("setGradientAbsoluteTolerance", &nonlinear_solver_t::setGradientAbsoluteTolerance); solverObj.def("setGradientRelativeTolerance", &nonlinear_solver_t::setGradientRelativeTolerance); solverObj.def("correctionAbsoluteTolerance", &nonlinear_solver_t::correctionAbsoluteTolerance); solverObj.def("correctionRelativeTolerance", &nonlinear_solver_t::correctionRelativeTolerance); solverObj.def("residualAbsoluteTolerance", &nonlinear_solver_t::residualAbsoluteTolerance); solverObj.def("residualRelativeTolerance", &nonlinear_solver_t::residualRelativeTolerance); solverObj.def("gradientAbsoluteTolerance", &nonlinear_solver_t::gradientAbsoluteTolerance); solverObj.def("gradientRelativeTolerance", &nonlinear_solver_t::gradientRelativeTolerance); } template <typename nonlinear_solver_t> void bindStoppingCriteria(pybind11::class_<nonlinear_solver_t> & solverObj) { // stopping criterion solverObj.def("setStoppingCriterion", &nonlinear_solver_t::setStoppingCriterion); solverObj.def("stoppingCriterion", &nonlinear_solver_t::stoppingCriterion); }; //------------------------------------------------ // template <typename T, typename = void> // struct has_system_typedef : std::false_type{}; // template <typename T> // struct has_system_typedef< // T, pressio::mpl::enable_if_t< !std::is_void<typename T::system_t >::value > // > : std::true_type{}; // template <typename T, typename = void> // struct has_stepper_typedef : std::false_type{}; // template <typename T> // struct has_stepper_typedef< // T, pressio::mpl::enable_if_t< !std::is_void<typename T::stepper_t >::value > // > : std::true_type{}; // //----------------------------------------------- // template<typename, typename = void> // struct _have_rj_api; // template<class T> // struct _have_rj_api< // T, pressio::mpl::enable_if_t< has_system_typedef<T>::value > // > // { // static constexpr auto value = // pressio::solvers::constraints::system_residual_jacobian<typename T::system_t>::value; // }; // template<class T> // struct _have_rj_api< // T, pressio::mpl::enable_if_t< has_stepper_typedef<T>::value > // > // { // static constexpr auto value = // pressio::solvers::constraints::system_residual_jacobian<typename T::stepper_t>::value; // }; // //------------------------------------------------ // template<class...> // struct _have_rj_api_var; // template<class head> // struct _have_rj_api_var<head> // { // static constexpr auto value = _have_rj_api<head>::value; // }; // template<class head, class... tail> // struct _have_rj_api_var<head, tail...> // { // static constexpr auto value = _have_rj_api<head>::value // and _have_rj_api_var<tail...>::value; // }; // //------------------------------------------------ // template<class ...> struct bindCreateSolverVariadic; // template<class SystemType> // struct bindCreateSolverVariadic<SystemType> // { // template<class nonlinear_solver_t, class lin_s_t, typename tag> // static void bind(pybind11::module & m, const std::string & createFuncName) // { // m.def(createFuncName.c_str(), // &createSolver<nonlinear_solver_t, lin_s_t, SystemType, tag>, // pybind11::return_value_policy::take_ownership); // } // }; // template<class head, class ... tail> // struct bindCreateSolverVariadic<head, tail...> // { // template<class nonlinear_solver_t, class lin_s_t, class tag> // static void bind(pybind11::module & m, const std::string & name) // { // bindCreateSolverVariadic<head>::template bind<nonlinear_solver_t, lin_s_t, tag>(m, name); // bindCreateSolverVariadic<tail...>::template bind<nonlinear_solver_t, lin_s_t, tag>(m, name); // } // }; // template<class nonlinear_solver_t, class rom_problem_t, class tagT> // pressio::mpl::enable_if_t<std::is_same<tagT, Unweighted>::value, nonlinear_solver_t> // createSolver(rom_problem_t & romProb, // const typename rom_problem_t::lspg_native_state_t & romState, // pybind11::object pyobj) //linear or QR solver is a native python class // { // return nonlinear_solver_t(romProb, romState, pyobj); // } // template<class nonlinear_solver_t, class rom_problem_t, class tagT> // pressio::mpl::enable_if_t<std::is_same<tagT, Weighted>::value, nonlinear_solver_t> // createSolver(rom_problem_t & romProb, // const typename rom_problem_t::lspg_native_state_t & romState, // pybind11::object pyobj, // linear solver for norm eq is a native python class // pybind11::object wO) // weighting operator is a native python class // { // return nonlinear_solver_t(romProb, romState, pyobj, wO); // } // template<class nonlinear_solver_t, class rom_problem_t, class tagT> // pressio::mpl::enable_if_t<std::is_same<tagT, Irwls>::value, nonlinear_solver_t> // createSolver(rom_problem_t & romProb, // const typename rom_problem_t::lspg_native_state_t & romState, // pybind11::object pyobj, // linear solver for norm eq is a native python class // typename rom_problem_t::traits::scalar_t pNorm) // value of p-norm // { // return nonlinear_solver_t(romProb, romState, pyobj, pNorm); // } // template<class nonlinear_solver_t, class lin_s_t, class system_t, class tagT> // pressio::mpl::enable_if_t<std::is_same<tagT, NewtonRaphson>::value, nonlinear_solver_t> // createSolver(system_t & system, // ::pressio4py::py_f_arr romState, // pybind11::object pyobj) // { // std::cout << " create " << &system << " " << pyobj << "\n"; // return nonlinear_solver_t(system, romState, lin_s_t(pyobj)); // } // helper tags struct NewtonRaphson{}; struct LSUnweighted{}; struct LSWeighted{}; // struct Irwls{}; template<class nonlinear_solver_t, class lin_s_t, class system_t, class tagT> pressio::mpl::enable_if_t<std::is_same<tagT, LSUnweighted>::value, nonlinear_solver_t> createSolver(pybind11::object pysystem, ::pressio4py::py_f_arr romState, pybind11::object pysol) { return nonlinear_solver_t(system_t(pysystem), romState, lin_s_t(pysol)); } template<class nonlinear_solver_t, class lin_s_t, class system_t, class WeighWrapper, class tagT> pressio::mpl::enable_if_t<std::is_same<tagT, LSWeighted>::value, nonlinear_solver_t> createSolver(pybind11::object pysystem, ::pressio4py::py_f_arr romState, pybind11::object pysol, // py solver pybind11::object pywo) // py weighting operator { return nonlinear_solver_t(system_t(pysystem), romState, lin_s_t(pysol), WeighWrapper(pywo)); } template<class nonlinear_solver_t, class lin_s_t, class system_t, class tagT> pressio::mpl::enable_if_t<std::is_same<tagT, NewtonRaphson>::value, nonlinear_solver_t> createSolver(pybind11::object pysystem, ::pressio4py::py_f_arr romState, pybind11::object pysol) { return nonlinear_solver_t(system_t(pysystem), romState, lin_s_t(pysol)); } //--------------------------------------------------- /* newton-raphson */ //--------------------------------------------------- template<class linear_solver_t, class ResJacSystemWrapper> struct NewtonRaphsonBinder { using nonlinear_solver_t = typename pressio::nonlinearsolvers::impl::ComposeNewtonRaphson< pressio4py::py_f_arr, ResJacSystemWrapper, linear_solver_t >::type; static void bindClassAndMethods(pybind11::module & m) { pybind11::class_<nonlinear_solver_t> solver(m, "NewtonRaphClass"); // Note we don't bind the constructor because from Python we use the create // function (see below) to instantiate a solver object, we never // use the class name directly. m.def("create_newton_raphson", &createSolver<nonlinear_solver_t, linear_solver_t, ResJacSystemWrapper, NewtonRaphson>, pybind11::return_value_policy::take_ownership); bindTolerancesMethods(solver); bindStoppingCriteria(solver); bindCommonSolverMethods(solver); solver.def("solve", &nonlinear_solver_t::template solveForPy<ResJacSystemWrapper>); } // static void bindCreate(pybind11::module & m){ // const std::string name = "create_newton_raphson"; // m.def(name.c_str(), // &createSolverForPy<nonlinear_solver_t, linear_solver_t, ResJacSystemWrapper, NewtonRaphson>, // pybind11::return_value_policy::take_ownership); // } // template<class ...Systems> // static void bindCreate(pybind11::module & m){ // const std::string name = "create_newton_raphson"; // bindCreateSolverVariadic<Systems...>::template bind< // nonlinear_solver_t, linear_solver_t, NewtonRaphson>(m, name); // } }; //------------------------------------------------ /* GN: R/J API with normal equations */ //------------------------------------------------ template<class linear_solver_t, class ResJacSystemWrapper> struct GNNormalEqResJacApiBinder{ using nonlinear_solver_t = typename pressio::nonlinearsolvers::impl::Compose< pressio4py::py_f_arr, ResJacSystemWrapper, ::pressio::nonlinearsolvers::GaussNewton, void, linear_solver_t >::type; static void bindClassAndMethods(pybind11::module & m) { pybind11::class_<nonlinear_solver_t> solver(m, "GaussNewton"); m.def("create_gauss_newton", &createSolver<nonlinear_solver_t, linear_solver_t, ResJacSystemWrapper, LSUnweighted>, pybind11::return_value_policy::take_ownership); bindTolerancesMethods(solver); bindStoppingCriteria(solver); bindCommonSolverMethods(solver); solver.def("solve", &nonlinear_solver_t::template solveForPy<ResJacSystemWrapper>); } }; //------------------------------------------------ /* WEIGHTED GN: R/J API with normal equations */ //------------------------------------------------ template<class linear_solver_t, class ResJacSystemWrapper, class WeighWrapper> struct WeighGNNormalEqResJacApiBinder{ using nonlinear_solver_t = typename pressio::nonlinearsolvers::impl::Compose< pressio4py::py_f_arr, ResJacSystemWrapper, ::pressio::nonlinearsolvers::GaussNewton, void, linear_solver_t, WeighWrapper >::type; static void bindClassAndMethods(pybind11::module & m) { pybind11::class_<nonlinear_solver_t> solver(m, "WeightedGaussNewton"); m.def("create_weighted_gauss_newton", &createSolver<nonlinear_solver_t, linear_solver_t, ResJacSystemWrapper, WeighWrapper, LSWeighted>, pybind11::return_value_policy::take_ownership); bindTolerancesMethods(solver); bindStoppingCriteria(solver); bindCommonSolverMethods(solver); solver.def("solve", &nonlinear_solver_t::template solveForPy<ResJacSystemWrapper>); } }; //------------------------------------------------ /* GN: R/J API with QR */ //------------------------------------------------ template<class qr_solver_t, class ResJacSystemWrapper> struct GNQRResJacApiBinder{ using nonlinear_solver_t = typename pressio::nonlinearsolvers::impl::ComposeGNQR< pressio4py::py_f_arr, ResJacSystemWrapper, qr_solver_t >::type; static void bindClassAndMethods(pybind11::module & m) { pybind11::class_<nonlinear_solver_t> solver(m, "GaussNewtonQR"); m.def("create_gauss_newton_qr", &createSolver<nonlinear_solver_t, qr_solver_t, ResJacSystemWrapper, LSUnweighted>, pybind11::return_value_policy::take_ownership); bindTolerancesMethods(solver); bindStoppingCriteria(solver); bindCommonSolverMethods(solver); solver.def("solve", &nonlinear_solver_t::template solveForPy<ResJacSystemWrapper>); } }; //------------------------------------------------ /* LM: R/J API with normal equations */ //------------------------------------------------ template<class linear_solver_t, class ResJacSystemWrapper> struct LMNormalEqResJacApiBinder { using nonlinear_solver_t = typename pressio::nonlinearsolvers::impl::Compose< pressio4py::py_f_arr, ResJacSystemWrapper, ::pressio::nonlinearsolvers::LM, void, linear_solver_t >::type; static void bindClassAndMethods(pybind11::module & m) { pybind11::class_<nonlinear_solver_t> solver(m, "LevenbergMarquardt"); m.def("create_levenberg_marquardt", &createSolver<nonlinear_solver_t, linear_solver_t, ResJacSystemWrapper, LSUnweighted>, pybind11::return_value_policy::take_ownership); bindTolerancesMethods(solver); bindStoppingCriteria(solver); bindCommonSolverMethods(solver); solver.def("solve", &nonlinear_solver_t::template solveForPy<ResJacSystemWrapper>); } }; //------------------------------------------------ /* WEIGHTED LM: R/J API with normal equations */ //------------------------------------------------ template<class linear_solver_t, class ResJacSystemWrapper, class WeighWrapper> struct WeighLMNormalEqResJacApiBinder { using nonlinear_solver_t = typename pressio::nonlinearsolvers::impl::Compose< pressio4py::py_f_arr, ResJacSystemWrapper, ::pressio::nonlinearsolvers::LM, void, linear_solver_t, WeighWrapper >::type; static void bindClassAndMethods(pybind11::module & m) { pybind11::class_<nonlinear_solver_t> solver(m, "WeightedLevenbergMarquardt"); m.def("create_weighted_levenberg_marquardt", &createSolver<nonlinear_solver_t, linear_solver_t, ResJacSystemWrapper, WeighWrapper, LSWeighted>, pybind11::return_value_policy::take_ownership); bindTolerancesMethods(solver); bindStoppingCriteria(solver); bindCommonSolverMethods(solver); solver.def("solve", &nonlinear_solver_t::template solveForPy<ResJacSystemWrapper>); } }; }}//end namespace #endif // template<bool do_gn, typename ...> // struct LeastSquaresNormalEqResJacApiBinder; // template<bool do_gn, typename linear_solver_wrapper_t, typename ...Problems> // struct LeastSquaresNormalEqResJacApiBinder<do_gn, linear_solver_wrapper_t, std::tuple<Problems...>> // { // static_assert(_have_rj_api_var<Problems...>::value, ""); // // it does not matter here if we use the steady system or stepper_t // // as template arg to compose the solver type in the code below as long as it // // meets the res-jac api. But since we are here, this condition is met // // because it is asserted above. so just pick the first problem type in the // // pack, which should be a steady lspg problem, and so it has a system_t typedef // // that we can use for compose solver below // using head_problem_t = typename std::tuple_element<0, std::tuple<Problems...>>::type; // using system_t = typename head_problem_t::system_t; // // gauss-newton solver type // using gn_type = pressio::nonlinearsolvers::impl::composeGaussNewton_t // <system_t, linear_solver_wrapper_t>; // // lm solver type // using lm_type = pressio::nonlinearsolvers::impl::composeLevenbergMarquardt_t // <system_t, linear_solver_wrapper_t>; // // pick gn or lm conditioned on the bool argument // using nonlinear_solver_t = typename std::conditional<do_gn, gn_type, lm_type>::type; // static void bindClass(pybind11::module & m, const std::string & solverPythonName) // { // pybind11::class_<nonlinear_solver_t> nonLinSolver(m, solverPythonName.c_str()); // bindTolerancesMethods(nonLinSolver); // bindStoppingCriteria(nonLinSolver); // bindCommonSolverMethods(nonLinSolver); // // Note we don't bind the constructor because from Python we use the create // // function (see below) to instantiate a solver object, we never // // use the class name directly. This is useful because it allows us // // to overcome the problem of needing unique class names in python // } // static void bindCreate(pybind11::module & m) // { // const std::string name = do_gn ? "createGaussNewton" : "createLevenbergMarquardt"; // bindCreateSolverVariadic<Problems...>::template bind< // nonlinear_solver_t, Unweighted>(m, name); // } // }; // //------------------------------------------------ // /* GN, R/H API solved with QR */ // //------------------------------------------------ // template<bool do_gn, class ...> // struct LeastSquaresQRBinder; // template<bool do_gn, class qr_solver_t, class ...Problems> // struct LeastSquaresQRBinder< // do_gn, qr_solver_t, std::tuple<Problems...> // > // { // static_assert(do_gn, "QR-based solver only supported for GN"); // static_assert(_have_rj_api_var<Problems...>::value, ""); // // it does not matter here if we use the steady system or stepper_t // // as template arg to compose the solver type in the code below as long as it // // meets the res-jac api. But since we are here, this condition is met // // because it is asserted above. so just pick the first problem type in the // // pack, which should be a steady lspg problem, and so it has a system_t typedef // // that we can use for compose solver below // using head_problem_t = typename std::tuple_element<0, std::tuple<Problems...>>::type; // using system_t = typename head_problem_t::system_t; // using nonlinear_solver_t = // pressio::nonlinearsolvers::impl::composeGaussNewtonQR_t<system_t, qr_solver_t>; // static void bindClass(pybind11::module & m, const std::string & solverPythonName) // { // pybind11::class_<nonlinear_solver_t> nonLinSolver(m, solverPythonName.c_str()); // bindTolerancesMethods(nonLinSolver); // bindStoppingCriteria(nonLinSolver); // bindCommonSolverMethods(nonLinSolver); // // Note we don't bind the constructor because from Python we use the create // // function (see below) to instantiate a solver object, we never // // use the class name directly. This is useful because it allows us // // to overcome the problem of needing unique class names in python // } // static void bindCreate(pybind11::module & m) // { // const std::string name = do_gn ? "createGaussNewtonQR" : "createLevenbergMarquardtQR"; // bindCreateSolverVariadic<Problems...>::template bind< // nonlinear_solver_t, Unweighted>(m, name); // } // }; // //---------------------------------------------------- // /* weighted GN or LM, R/J API with normal equations */ // //---------------------------------------------------- // template<bool do_gn, class ...> // struct WeightedLeastSquaresNormalEqBinder; // template< // bool do_gn, // typename linear_solver_t, // typename weigher_t, // class ... Problems // > // struct WeightedLeastSquaresNormalEqBinder< // do_gn, linear_solver_t, weigher_t, std::tuple<Problems...> // > // { // static_assert(_have_rj_api_var<Problems...>::value, ""); // // it does not matter here if we use the steady system or stepper_t // // as template arg to compose the solver type in the code below as long as it // // meets the res-jac api. But since we are here, this condition is met // // because it is asserted above. so just pick the first problem type in the // // pack, which should be a steady lspg problem, and so it has a system_t typedef // // that we can use for compose solver below // using head_problem_t = typename std::tuple_element<0, std::tuple<Problems...>>::type; // using system_t = typename head_problem_t::system_t; // // gauss-newton solver type // using gn_type = // pressio::nonlinearsolvers::impl::composeGaussNewton_t<system_t, linear_solver_t, weigher_t>; // // lm solver type // using lm_type = // pressio::nonlinearsolvers::impl::composeLevenbergMarquardt_t<system_t, linear_solver_t, weigher_t>; // // pick the final nonlin solver type is based on the do_gn // using nonlinear_solver_t = typename std::conditional<do_gn, gn_type, lm_type>::type; // static void bindClass(pybind11::module & m, const std::string & solverPythonName) // { // pybind11::class_<nonlinear_solver_t> nonLinSolver(m, solverPythonName.c_str()); // bindTolerancesMethods(nonLinSolver); // bindStoppingCriteria(nonLinSolver); // bindCommonSolverMethods(nonLinSolver); // // Note we don't bind the constructor because from Python we use the create // // function (see below) to instantiate a solver object, we never // // use the class name directly. This is useful because it allows us // // to overcome the problem of needing unique class names in python // } // static void bindCreate(pybind11::module & m) // { // const std::string name = // do_gn ? "createWeightedGaussNewton" : "createWeightedLevenbergMarquardt"; // bindCreateSolverVariadic<Problems...>::template bind< // nonlinear_solver_t, Weighted>(m, name); // } // }; // //---------------------------------------- // /* IRWGN normal equations */ // //---------------------------------------- // template<class ...> // struct IrwLeastSquaresNormalEqBinder; // template<class linear_solver_t, class ...Problems> // struct IrwLeastSquaresNormalEqBinder<linear_solver_t, std::tuple<Problems...>> // { // static_assert(_have_rj_api_var<Problems...>::value, ""); // // it does not matter here if we use the steady system or stepper_t // // as template arg to compose the solver type in the code below as long as it // // meets the res-jac api. But since we are here, this condition is met // // because it is asserted above. so just pick the first problem type in the // // pack, which should be a steady lspg problem, and so it has a system_t typedef // // that we can use for compose solver below // using head_problem_t = typename std::tuple_element<0, std::tuple<Problems...>>::type; // using system_t = typename head_problem_t::system_t; // using composer_t = pressio::nonlinearsolvers::impl::composeIrwGaussNewton<system_t, linear_solver_t>; // using w_t = typename composer_t::weighting_t; // using nonlinear_solver_t = typename composer_t::type; // static void bindClass(pybind11::module & m, const std::string & solverPythonName) // { // pybind11::class_<nonlinear_solver_t> nonLinSolver(m, solverPythonName.c_str()); // bindTolerancesMethods(nonLinSolver); // bindStoppingCriteria(nonLinSolver); // bindCommonSolverMethods(nonLinSolver); // // Note we don't bind the constructor because from Python we use the create // // function (see below) to instantiate a solver object, we never // // use the class name directly. This is useful because it allows us // // to overcome the problem of needing unique class names in python // } // static void bindCreate(pybind11::module & m) // { // const std::string name = "createIrwGaussNewton"; // bindCreateSolverVariadic<Problems...>::template bind< // nonlinear_solver_t, Irwls>(m, name); // } // }; // //------------------------------------------------- // /* GN or LM with normal equations, hess-grad api */ // //------------------------------------------------- // template<bool do_gn, typename ...> // struct LeastSquaresNormalEqHessGrapApiBinder; // template<bool do_gn, typename linear_solver_wrapper_t, typename ...Problems> // struct LeastSquaresNormalEqHessGrapApiBinder< // do_gn, linear_solver_wrapper_t, std::tuple<Problems...> // > // { // using system_t = typename std::tuple_element<0, std::tuple<Problems...>>::type; // // gauss-newton solver type // using gn_type = pressio::nonlinearsolvers::impl::composeGaussNewton_t // <system_t, linear_solver_wrapper_t>; // // lm solver type // using lm_type = pressio::nonlinearsolvers::impl::composeLevenbergMarquardt_t // <system_t, linear_solver_wrapper_t>; // // pick gn or lm conditioned on the bool argument // using nonlinear_solver_t = typename std::conditional<do_gn, gn_type, lm_type>::type; // static void bindClass(pybind11::module & m, const std::string & solverPythonName) // { // pybind11::class_<nonlinear_solver_t> nonLinSolver(m, solverPythonName.c_str()); // bindTolerancesMethods(nonLinSolver); // bindStoppingCriteria(nonLinSolver); // bindCommonSolverMethods(nonLinSolver); // // Note we don't bind the constructor because from Python we use the create // // function (see below) to instantiate a solver object, we never // // use the class name directly. This is useful because it allows us // // to overcome the problem of needing unique class names in python // } // static void bindCreate(pybind11::module & m) // { // const std::string name = "createGaussNewton"; // bindCreateSolverVariadic<Problems...>::template bind< // nonlinear_solver_t, UnweightedWls>(m, name); // } // }; // //------------------------------------------------ // // helper metafunction for dealing with types in a tuple // //------------------------------------------------ // template<template<bool, typename...> class T, bool, typename...> // struct instantiate_from_tuple_pack { }; // template< // template<bool, typename...> class T, // bool b, class T1, typename... Ts // > // struct instantiate_from_tuple_pack<T, b, T1, std::tuple<Ts...>> // { // using type = T<b, T1, Ts...>; // }; // template< // template<bool, typename...> class T, // bool b, class T1, class T2, typename... Ts // > // struct instantiate_from_tuple_pack<T, b, T1, T2, std::tuple<Ts...>> // { // using type = T<b, T1, T2, Ts...>; // };
38.90625
106
0.692537
Pressio
a73ff525c3b31bc92a198ea0fd5a3a220f38a258
1,496
cpp
C++
201722/dec201722_1.cpp
jibsen/aocpp2017
8c53665ffc99a58b905758b6baf4f960d65d058c
[ "MIT" ]
null
null
null
201722/dec201722_1.cpp
jibsen/aocpp2017
8c53665ffc99a58b905758b6baf4f960d65d058c
[ "MIT" ]
null
null
null
201722/dec201722_1.cpp
jibsen/aocpp2017
8c53665ffc99a58b905758b6baf4f960d65d058c
[ "MIT" ]
null
null
null
// // Advent of Code 2017, day 22, part one // #include <algorithm> #include <iostream> #include <string> #include <unordered_set> #include <utility> #include <vector> struct PairHash { template<typename T1, typename T2> std::size_t operator()(const std::pair<T1, T2> &p) const noexcept { std::size_t h1 = std::hash<T1>()(p.first); std::size_t h2 = std::hash<T2>()(p.second); return (17 * 37 + h1) * 37 + h2; } }; using Infected = std::unordered_set<std::pair<int, int>, PairHash>; auto read_map() { std::vector<std::string> map; for (std::string line; std::getline(std::cin, line) && !line.empty(); ) { map.push_back(std::move(line)); } return map; } auto get_infected_from_map(const auto &map) { Infected infected; int mid_y = map.size() / 2; int mid_x = map[0].size() / 2; for (int y = 0; y < map.size(); ++y) { for (int x = 0; x < map[y].size(); ++x) { if (map[y][x] == '#') { infected.insert({x - mid_x, mid_y - y}); } } } return infected; } int main() { auto map = read_map(); auto infected = get_infected_from_map(map); int x = 0; int y = 0; int dx = 0; int dy = 1; std::size_t num_became_infected = 0; for (std::size_t bursts = 0; bursts != 10'000; ++bursts) { if (auto [it, success] = infected.insert({x, y}); !success) { dx = std::exchange(dy, -dx); infected.erase(it); } else { dy = std::exchange(dx, -dy); ++num_became_infected; } x += dx; y += dy; } std::cout << num_became_infected << '\n'; }
17.809524
74
0.596925
jibsen
a7404fe1594510cd4ef0fe820aba984d3e85cbd9
3,934
cpp
C++
src/qt/qtbase/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp
power-electro/phantomjs-Gohstdriver-DIY-openshift
a571d301a9658a4c1b524d07e15658b45f8a0579
[ "BSD-3-Clause" ]
1
2020-04-30T15:47:35.000Z
2020-04-30T15:47:35.000Z
src/qt/qtbase/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp
power-electro/phantomjs-Gohstdriver-DIY-openshift
a571d301a9658a4c1b524d07e15658b45f8a0579
[ "BSD-3-Clause" ]
null
null
null
src/qt/qtbase/examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp
power-electro/phantomjs-Gohstdriver-DIY-openshift
a571d301a9658a4c1b524d07e15658b45f8a0579
[ "BSD-3-Clause" ]
null
null
null
/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the demonstration applications of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL21$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 or version 3 as published by the Free ** Software Foundation and appearing in the file LICENSE.LGPLv21 and ** LICENSE.LGPLv3 included in the packaging of this file. Please review the ** following information to ensure the GNU Lesser General Public License ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** As a special exception, The Qt Company gives you certain additional ** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "spreadsheetdelegate.h" #include <QtWidgets> SpreadSheetDelegate::SpreadSheetDelegate(QObject *parent) : QItemDelegate(parent) {} QWidget *SpreadSheetDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const { if (index.column() == 1) { QDateTimeEdit *editor = new QDateTimeEdit(parent); editor->setDisplayFormat("dd/M/yyyy"); editor->setCalendarPopup(true); return editor; } QLineEdit *editor = new QLineEdit(parent); // create a completer with the strings in the column as model QStringList allStrings; for (int i = 1; i<index.model()->rowCount(); i++) { QString strItem(index.model()->data(index.sibling(i, index.column()), Qt::EditRole).toString()); if (!allStrings.contains(strItem)) allStrings.append(strItem); } QCompleter *autoComplete = new QCompleter(allStrings); editor->setCompleter(autoComplete); connect(editor, &QLineEdit::editingFinished, this, &SpreadSheetDelegate::commitAndCloseEditor); return editor; } void SpreadSheetDelegate::commitAndCloseEditor() { QLineEdit *editor = qobject_cast<QLineEdit *>(sender()); emit commitData(editor); emit closeEditor(editor); } void SpreadSheetDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { QLineEdit *edit = qobject_cast<QLineEdit*>(editor); if (edit) { edit->setText(index.model()->data(index, Qt::EditRole).toString()); return; } QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor); if (dateEditor) { dateEditor->setDate(QDate::fromString( index.model()->data(index, Qt::EditRole).toString(), "d/M/yyyy")); } } void SpreadSheetDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const { QLineEdit *edit = qobject_cast<QLineEdit *>(editor); if (edit) { model->setData(index, edit->text()); return; } QDateTimeEdit *dateEditor = qobject_cast<QDateTimeEdit *>(editor); if (dateEditor) model->setData(index, dateEditor->date().toString("dd/M/yyyy")); }
36.766355
99
0.655313
power-electro
a745df55c25a7cba822d143b33c40e82b16ab61c
3,095
cpp
C++
src/gs/gsVertex.cpp
frmr/gs
b9721ad27f59ca2e19f637bccd9eba32b663b6a3
[ "MIT" ]
2
2016-12-06T17:51:30.000Z
2018-06-21T08:52:58.000Z
src/gs/gsVertex.cpp
frmr/gs
b9721ad27f59ca2e19f637bccd9eba32b663b6a3
[ "MIT" ]
null
null
null
src/gs/gsVertex.cpp
frmr/gs
b9721ad27f59ca2e19f637bccd9eba32b663b6a3
[ "MIT" ]
null
null
null
#include "gsVertex.hpp" #include "gsEdge.hpp" #include "gsTile.hpp" #include <algorithm> #include <iostream> #include <limits> using std::cerr; using std::endl; int gs::Vertex::idCounter = 0; void gs::Vertex::AddLink(const gs::Link<gs::Vertex>& link) { links.push_back(link); } void gs::Vertex::AddTile(const shared_ptr<gs::Tile> tile) { tiles.push_back(tile); } void gs::Vertex::CalculateHeight() { double total = 0; for (const auto& tile : tiles) { total += tile->GetHeight(); } height = total / (double) tiles.size(); } vector<shared_ptr<gs::Edge>> gs::Vertex::GetEdges() const { return edges; } shared_ptr<gs::Edge> gs::Vertex::GetEdgeWith(const shared_ptr<gs::Vertex> refVertex) const { for (auto link : links) { if (link.edge->HasVertex(refVertex)) { return link.edge; } } return nullptr; } double gs::Vertex::GetHeight() const { return height; } //gs::Vec3d gs::Vertex::GetPosition() const //{ // return position; //} bool gs::Vertex::IsRiver() const { return (riverId != -1); } // //void gs::Vertex::SetPosition(const gs::Vec3d& newPosition) //{ // position = newPosition; //} bool gs::Vertex::SetRiver(const int newRiverId) { if (riverId == newRiverId) { //river converges with itself, which is impossible return false; } else if (riverId != -1) { //two rivers converge return true; } //else, the vertex is not already a river //stop if vertex touches the sea for (const auto& tile : tiles) { if (tile->GetSurface() == gs::Tile::Type::WATER) { return true; } } riverId = newRiverId; vector<int> visitedIds; bool childSucceeded = false; while (!childSucceeded) { gs::EdgePtr lowestEdge = nullptr; gs::VertexPtr lowestVertex = nullptr; double lowestHeight = GetHeight(); for (auto& link : links) { bool targetVisited = (std::find(visitedIds.begin(), visitedIds.end(), link.target->id) != visitedIds.end()); if (!targetVisited && link.target->GetHeight() < lowestHeight) { lowestEdge = link.edge; lowestVertex = link.target; lowestHeight = link.target->GetHeight(); } } if (lowestEdge == nullptr) { riverId = -1; return false; } else { childSucceeded = lowestVertex->SetRiver(newRiverId); if (childSucceeded) { lowestEdge->SetRiver(); } else { visitedIds.push_back(lowestVertex->id); } } } return true; } gs::Vertex::Vertex(const gs::Vec3d& position) : id(idCounter++), position(position), height(0.0), riverId(-1) { }
21.054422
121
0.527625
frmr
a74600e2f90d3fd754c2f5d30e5d24cb71c686f6
1,349
cpp
C++
leetcode/131.palindrome-partitioning.cpp
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
177
2017-08-21T08:57:43.000Z
2020-06-22T03:44:22.000Z
leetcode/131.palindrome-partitioning.cpp
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
2
2018-09-06T13:39:12.000Z
2019-06-03T02:54:45.000Z
leetcode/131.palindrome-partitioning.cpp
geemaple/algorithm
68bc5032e1ee52c22ef2f2e608053484c487af54
[ "MIT" ]
23
2017-08-23T06:01:28.000Z
2020-04-20T03:17:36.000Z
class Solution { private: vector<vector<bool>> isPalindrome; void helper(string& s, int start, vector<string>& ans, vector<vector<string>>& res) { if (start == s.size()) { res.push_back(ans); return; } for (auto i = start; i < s.size(); ++i) { if (isPalindrome[start][i]) { ans.push_back(s.substr(start, i - start + 1)); helper(s, i + 1, ans, res); ans.pop_back(); } } } public: vector<vector<string>> partition(string s) { int size = s.size(); isPalindrome.resize(size, vector<bool>(size, false)); int i, j =0; for (auto t = 0; t < size; ++t) { i = j = t; while(i >= 0 && j < size && s[i] == s[j]) { isPalindrome[i][j] = true; i--; j++; } i = t; j = t + 1; while(i >= 0 && j < size && s[i] == s[j]) { isPalindrome[i][j] = true; i--; j++; } } vector<string> ans; vector<vector<string>> res; helper(s, 0, ans, res); return res; } };
24.527273
87
0.364715
geemaple
a7460b0917459ed8bacb876f17aa6ffb1f846cfd
430
cpp
C++
gator-game-jam-2021/UidGenerator.cpp
lukas-vaiciunas/haterminator
7f42e5a4ed4c5dee21368859989b74ba6c80898b
[ "MIT" ]
null
null
null
gator-game-jam-2021/UidGenerator.cpp
lukas-vaiciunas/haterminator
7f42e5a4ed4c5dee21368859989b74ba6c80898b
[ "MIT" ]
null
null
null
gator-game-jam-2021/UidGenerator.cpp
lukas-vaiciunas/haterminator
7f42e5a4ed4c5dee21368859989b74ba6c80898b
[ "MIT" ]
null
null
null
#include "UidGenerator.h" UidGenerator::UidGenerator() : next_(1) {} UidGenerator &UidGenerator::instance() { static UidGenerator uidGenerator; return uidGenerator; } unsigned int UidGenerator::generate() { unsigned int uid = 0; if (!released_.empty()) { uid = released_.front(); released_.pop(); } else { uid = next_++; } return uid; } void UidGenerator::release(unsigned int uid) { released_.push(uid); }
13.030303
44
0.686047
lukas-vaiciunas
a7469abfc20ec604a21dbfac6f6e605e79ef2312
1,370
cpp
C++
bin/old/main.cpp
beckerrh/simfemsrc
d857eb6f6f8627412d4f9d89a871834c756537db
[ "MIT" ]
null
null
null
bin/old/main.cpp
beckerrh/simfemsrc
d857eb6f6f8627412d4f9d89a871834c756537db
[ "MIT" ]
1
2019-01-31T10:59:11.000Z
2019-01-31T10:59:11.000Z
bin/old/main.cpp
beckerrh/simfemsrc
d857eb6f6f8627412d4f9d89a871834c756537db
[ "MIT" ]
null
null
null
#include "simfem/timestepping.hpp" // typedef double (*nlfct)(double u, double v); //Hopf // double global_Du = 0.0; // double global_Dv = 0.0; // double global_a = 1.0; // double global_b = 2.1; // double global_T = 50.0; // double global_eps = 0.01; //spatial pattern // double global_Du = 0.001; // double global_Dv = 0.01; // double global_a = 1.0; // double global_b = 2.0; // double global_T = 30.0; // double global_eps = 0.01; //Turing double global_Du = 0.0001; double global_Dv = 0.01; double global_a = 1.0; double global_b = 1.5; double global_T = 1.0; double global_eps = 0.01; /*---------------------------------------------------------------------------*/ int main(int argc, char** argv) { if (argc !=4) { printf("%s needs arguments <nx, nt, scheme>\n", argv[0]); exit(1); } int nx = atoi(argv[1]); int nt = atoi(argv[2]); std::string scheme = argv[3]; TimeSteppingData timesteppingdata; timesteppingdata.T = global_T; timesteppingdata.nt = nt; timesteppingdata.nx = nx; timesteppingdata.scheme = scheme; Nonlinearity nonlinearity("brusselator"); nonlinearity.set_Du(global_Du); nonlinearity.set_Dv(global_Dv); nonlinearity.set_eps(global_eps); nonlinearity.set_a(global_a); nonlinearity.set_b(global_b); TimeStepping timestepping(timesteppingdata, nonlinearity); timestepping.run(); return 0; }
24.909091
79
0.643796
beckerrh
a74e24e98940f4aa2888e6b5994f1ef1ba01c2ee
2,296
cpp
C++
LIP_Core/src/BandSplitter.cpp
KyrietS/lossy-image-processor
d73552ee3ccb64ae97c55b586e4ce766155bb80c
[ "MIT" ]
null
null
null
LIP_Core/src/BandSplitter.cpp
KyrietS/lossy-image-processor
d73552ee3ccb64ae97c55b586e4ce766155bb80c
[ "MIT" ]
null
null
null
LIP_Core/src/BandSplitter.cpp
KyrietS/lossy-image-processor
d73552ee3ccb64ae97c55b586e4ce766155bb80c
[ "MIT" ]
null
null
null
#include "BandSplitter.hpp" #include <cassert> using byte_t = uint8_t; BandSplitter::BandSplitter(const std::vector<byte_t>& data) { split(data); } BandSplitter::BandSplitter(const std::vector<float>& upper, const std::vector<float>& lower) { upper_band = upper; lower_band = lower; } void BandSplitter::split(const std::vector<byte_t>& data) { if (data.size() == 0) return; lower_band.clear(); upper_band.clear(); for (size_t i = 1; i < data.size(); i += 2) { float lower = ((float)data[i] + (float)data[i - 1]) / 2.0f; float upper = ((float)data[i] - (float)data[i - 1]) / 2.0f; lower_band.push_back(lower); upper_band.push_back(upper); } // If data is not even sized if (data.size() % 2 != 0) { float lower = (float)data[data.size() - 1] / 2.0f; float upper = -1 * (float)data[data.size() - 1] / 2.0f; lower_band.push_back(lower); upper_band.push_back(upper); } } std::vector<byte_t> BandSplitter::mergeEven() { return merge(true); } std::vector<byte_t> BandSplitter::mergeUneven() { return merge(false); } std::vector<byte_t> BandSplitter::merge(bool even_result) { assert(lower_band.size() == upper_band.size()); const size_t BAND_SIZE = lower_band.size(); std::vector<byte_t> result; if (even_result) { for (int i = 0; i < BAND_SIZE; i++) { float even = lower_band[i] - upper_band[i]; float uneven = lower_band[i] + upper_band[i]; even = even < 0 ? 0 : even; even = even > 255 ? 255 : even; uneven = uneven < 0 ? 0 : uneven; uneven = uneven > 255 ? 255 : uneven; result.push_back((byte_t)even); result.push_back((byte_t)uneven); } } else if (BAND_SIZE > 0) { for (int i = 0; i < BAND_SIZE - 1; i++) { float even = lower_band[i] - upper_band[i]; float uneven = lower_band[i] + upper_band[i]; result.push_back((byte_t)even); result.push_back((byte_t)uneven); } float last_element = lower_band[BAND_SIZE - 1] - upper_band[BAND_SIZE - 1]; result.push_back((byte_t)last_element); } return result; }
24.956522
92
0.56838
KyrietS
a753ef7ad0553099fd0f0d7b72d98d7cdfa237e0
2,061
cpp
C++
src/plugins/advancednotifications/plugins/dolle/notificationhandler.cpp
Maledictus/leechcraft
79ec64824de11780b8e8bdfd5d8a2f3514158b12
[ "BSL-1.0" ]
120
2015-01-22T14:10:39.000Z
2021-11-25T12:57:16.000Z
src/plugins/advancednotifications/plugins/dolle/notificationhandler.cpp
Maledictus/leechcraft
79ec64824de11780b8e8bdfd5d8a2f3514158b12
[ "BSL-1.0" ]
8
2015-02-07T19:38:19.000Z
2017-11-30T20:18:28.000Z
src/plugins/advancednotifications/plugins/dolle/notificationhandler.cpp
Maledictus/leechcraft
79ec64824de11780b8e8bdfd5d8a2f3514158b12
[ "BSL-1.0" ]
33
2015-02-07T16:59:55.000Z
2021-10-12T00:36:40.000Z
/********************************************************************** * LeechCraft - modular cross-platform feature rich internet client. * Copyright (C) 2006-2014 Georg Rudoy * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt) **********************************************************************/ #include "notificationhandler.h" #include <numeric> #include <QtDebug> #include <interfaces/structures.h> #include <interfaces/advancednotifications/inotificationrule.h> #include <interfaces/advancednotifications/types.h> #include "dockutil.h" namespace LC { namespace AdvancedNotifications { namespace Dolle { NotificationMethod NotificationHandler::GetHandlerMethod () const { return NMTray; } void NotificationHandler::Handle (const Entity& e, const INotificationRule& rule) { const QString& cat = e.Additional_ ["org.LC.AdvNotifications.EventCategory"].toString (); const QString& type = e.Additional_ ["org.LC.AdvNotifications.EventType"].toString (); const QString& eventId = e.Additional_ ["org.LC.AdvNotifications.EventID"].toString (); auto& data = Counts_ [type]; if (cat != "org.LC.AdvNotifications.Cancel") { if (const int delta = e.Additional_.value ("org.LC.AdvNotifications.DeltaCount", 0).toInt ()) data.Counts_ [eventId] += delta; else data.Counts_ [eventId] = e.Additional_.value ("org.LC.AdvNotifications.Count", 1).toInt (); data.Color_ = rule.GetColor (); data.Total_ = std::accumulate (data.Counts_.constBegin (), data.Counts_.constEnd (), 0); } else { QMutableMapIterator<QString, NotificationData> it { Counts_ }; bool removed = false; while (it.hasNext () && !removed) { NotificationData& nd = it.next ().value (); if (nd.Counts_.remove (eventId)) { nd.Total_ = std::accumulate (data.Counts_.constBegin (), data.Counts_.constEnd (), 0); removed = true; } } if (!removed) return; } DU::SetDockBadges (Counts_.values ()); } } } }
30.308824
96
0.654537
Maledictus
a754e102d7849bcfabd82fbfc54daef55101b8d9
12,948
cxx
C++
Servers/Filters/vtkDesktopDeliveryClient.cxx
matthb2/ParaView-beforekitwareswtichedtogit
e47e57d6ce88444d9e6af9ab29f9db8c23d24cef
[ "BSD-3-Clause" ]
1
2021-07-31T19:38:03.000Z
2021-07-31T19:38:03.000Z
Servers/Filters/vtkDesktopDeliveryClient.cxx
matthb2/ParaView-beforekitwareswtichedtogit
e47e57d6ce88444d9e6af9ab29f9db8c23d24cef
[ "BSD-3-Clause" ]
null
null
null
Servers/Filters/vtkDesktopDeliveryClient.cxx
matthb2/ParaView-beforekitwareswtichedtogit
e47e57d6ce88444d9e6af9ab29f9db8c23d24cef
[ "BSD-3-Clause" ]
2
2019-01-22T19:51:40.000Z
2021-07-31T19:38:05.000Z
/*========================================================================= Program: ParaView Module: $RCSfile$ Copyright (c) Kitware, Inc. All rights reserved. See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "vtkDesktopDeliveryClient.h" #include "vtkDesktopDeliveryServer.h" #include "vtkCallbackCommand.h" #include "vtkCamera.h" #include "vtkCubeSource.h" #include "vtkDoubleArray.h" #include "vtkLight.h" #include "vtkLightCollection.h" #include "vtkMultiProcessController.h" #include "vtkObjectFactory.h" #include "vtkPolyDataMapper.h" #include "vtkRendererCollection.h" #include "vtkRenderWindow.h" #include "vtkSquirtCompressor.h" #include "vtkTimerLog.h" #include "vtkUnsignedCharArray.h" //----------------------------------------------------------------------------- static void vtkDesktopDeliveryClientReceiveImageCallback(vtkObject *, unsigned long, void *clientdata, void *) { vtkDesktopDeliveryClient *self = reinterpret_cast<vtkDesktopDeliveryClient *>(clientdata); self->ReceiveImageFromServer(); } //----------------------------------------------------------------------------- vtkCxxRevisionMacro(vtkDesktopDeliveryClient, "$Revision$"); vtkStandardNewMacro(vtkDesktopDeliveryClient); //---------------------------------------------------------------------------- vtkDesktopDeliveryClient::vtkDesktopDeliveryClient() { this->ReplaceActors = 1; this->Squirt = 0; this->SquirtCompressionLevel = 5; this->SquirtBuffer = vtkUnsignedCharArray::New(); this->UseCompositing = 0; this->RemoteDisplay = 1; this->ReceivedImageFromServer = 1; vtkCallbackCommand *cbc = vtkCallbackCommand::New(); cbc->SetClientData(this); cbc->SetCallback(vtkDesktopDeliveryClientReceiveImageCallback); this->ReceiveImageCallback = cbc; } //---------------------------------------------------------------------------- vtkDesktopDeliveryClient::~vtkDesktopDeliveryClient() { this->SquirtBuffer->Delete(); this->ReceiveImageCallback->Delete(); } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::SetUseCompositing(int v) { this->Superclass::SetUseCompositing(v); if (this->RemoteDisplay) { this->SetParallelRendering(v); } } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::SetController(vtkMultiProcessController *controller) { vtkDebugMacro("SetController"); if (controller && (controller->GetNumberOfProcesses() != 2)) { vtkErrorMacro("vtkDesktopDelivery needs controller with 2 processes"); return; } this->Superclass::SetController(controller); if (this->Controller) { this->RootProcessId = this->Controller->GetLocalProcessId(); this->ServerProcessId = 1 - this->RootProcessId; } } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::SetRenderWindow(vtkRenderWindow *renWin) { //Make sure the renWin has at least one renderer if (renWin) { vtkRendererCollection *rens = renWin->GetRenderers(); if (rens->GetNumberOfItems() < 1) { vtkRenderer *ren = vtkRenderer::New(); renWin->AddRenderer(ren); ren->Delete(); } } this->Superclass::SetRenderWindow(renWin); } //---------------------------------------------------------------------------- // Called only on the client. float vtkDesktopDeliveryClient::GetZBufferValue(int x, int y) { float z; if (this->UseCompositing == 0) { // This could cause a problem between setting this ivar and rendering. // We could always composite, and always consider client z. float *pz; pz = this->RenderWindow->GetZbufferData(x, y, x, y); z = *pz; delete [] pz; return z; } // TODO: // This first int is to check for byte swapping. // int pArg[3]; // pArg[0] = 1; // pArg[1] = x; // pArg[2] = y; // this->ClientController->TriggerRMI(1, (void*)pArg, sizeof(int)*3, // vtkClientCompositeManager::GATHER_Z_RMI_TAG); // this->ClientController->Receive(&z, 1, 1, vtkClientCompositeManager::CLIENT_Z_TAG); z = 1.0; return z; } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::CollectWindowInformation(vtkMultiProcessStream& stream) { this->Superclass::CollectWindowInformation(stream); vtkDesktopDeliveryServer::SquirtOptions squirt_options; squirt_options.Enabled = this->Squirt; squirt_options.CompressLevel = this->SquirtCompressionLevel; squirt_options.Save(stream); } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::PreRenderProcessing() { // Get remote display flag this->Controller->Receive(&this->RemoteDisplay, 1, this->ServerProcessId, vtkDesktopDeliveryServer::REMOTE_DISPLAY_TAG); if (this->ImageReductionFactor > 1) { // Since we're not really doing parallel rendering, restore the renderer // viewports. vtkRendererCollection *rens = this->GetRenderers(); vtkRenderer *ren; int i; for (rens->InitTraversal(), i = 0; (ren = rens->GetNextItem()); i++) { ren->SetViewport(this->Viewports->GetTuple(i)); } } this->ReceivedImageFromServer = 0; if (!this->SyncRenderWindowRenderers) { // Establish a callback so that the image from the server is retrieved // before we draw renderers that we are not synced with. This will fail if // a non-synced renderer is on a layer equal or less than a synced renderer. vtkRendererCollection *allren = this->RenderWindow->GetRenderers(); vtkCollectionSimpleIterator cookie; vtkRenderer *ren; for (allren->InitTraversal(cookie); (ren = allren->GetNextRenderer(cookie)) != NULL; ) { if (!this->Renderers->IsItemPresent(ren)) { ren->AddObserver(vtkCommand::StartEvent, this->ReceiveImageCallback); } } } // Turn swap buffers off before the render so the end render method has a // chance to add to the back buffer. if (this->UseBackBuffer) { this->RenderWindow->SwapBuffersOff(); } } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::PostRenderProcessing() { this->ReceiveImageFromServer(); this->Timer->StopTimer(); this->RenderTime += this->Timer->GetElapsedTime(); if (!this->SyncRenderWindowRenderers) { vtkRendererCollection *allren = this->RenderWindow->GetRenderers(); vtkCollectionSimpleIterator cookie; vtkRenderer *ren; for (allren->InitTraversal(cookie); (ren = allren->GetNextRenderer(cookie)) != NULL; ) { ren->RemoveObservers(vtkCommand::StartEvent, this->ReceiveImageCallback); } } // Swap buffers here. if (this->UseBackBuffer) { this->RenderWindow->SwapBuffersOn(); } this->RenderWindow->Frame(); } //----------------------------------------------------------------------------- void vtkDesktopDeliveryClient::ReceiveImageFromServer() { if (this->ReceivedImageFromServer) return; this->ReceivedImageFromServer = 1; vtkDesktopDeliveryServer::ImageParams ip; int comm_success = this->Controller->Receive((int *)(&ip), vtkDesktopDeliveryServer::IMAGE_PARAMS_SIZE, this->ServerProcessId, vtkDesktopDeliveryServer::IMAGE_PARAMS_TAG); // Adjust render time for actual render on server. this->Timer->StopTimer(); this->RenderTime += this->Timer->GetElapsedTime(); if (comm_success && ip.RemoteDisplay) { // Receive image. this->Timer->StartTimer(); this->ReducedImageSize[0] = ip.ImageSize[0]; this->ReducedImageSize[1] = ip.ImageSize[1]; this->ReducedImage->SetNumberOfComponents(ip.NumberOfComponents); if ( this->FullImageSize[0] == this->ReducedImageSize[0] && this->FullImageSize[1] == this->ReducedImageSize[1] ) { this->FullImage->SetNumberOfComponents(ip.NumberOfComponents); this->FullImage->SetNumberOfTuples( this->FullImageSize[0] * this->FullImageSize[1]); this->FullImageUpToDate = true; this->ReducedImage->SetArray(this->FullImage->GetPointer(0), this->FullImage->GetSize(), 1); } this->ReducedImage->SetNumberOfTuples( this->ReducedImageSize[0] * this->ReducedImageSize[1]); if (ip.SquirtCompressed) { this->SquirtBuffer->SetNumberOfComponents(ip.NumberOfComponents); this->SquirtBuffer->SetNumberOfTuples( ip.BufferSize / ip.NumberOfComponents); this->Controller->Receive(this->SquirtBuffer->GetPointer(0), ip.BufferSize, this->ServerProcessId, vtkDesktopDeliveryServer::IMAGE_TAG); this->SquirtDecompress(this->SquirtBuffer, this->ReducedImage); } else { this->Controller->Receive(this->ReducedImage->GetPointer(0), ip.BufferSize, this->ServerProcessId, vtkDesktopDeliveryServer::IMAGE_TAG); } this->ReducedImageUpToDate = true; this->RenderWindowImageUpToDate = false; this->Timer->StopTimer(); this->TransferTime = this->Timer->GetElapsedTime(); } else { // No remote display means no transfer time. this->TransferTime = 0.0; // Leave the image in the window alone. this->RenderWindowImageUpToDate = true; } vtkDesktopDeliveryServer::TimingMetrics tm; this->Controller->Receive((double *)(&tm), vtkDesktopDeliveryServer::TIMING_METRICS_SIZE, this->ServerProcessId, vtkDesktopDeliveryServer::TIMING_METRICS_TAG); this->RemoteImageProcessingTime = tm.ImageProcessingTime; this->WriteFullImage(); this->Timer->StartTimer(); } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::ComputeVisiblePropBounds(vtkRenderer *ren, double bounds[6]) { this->Superclass::ComputeVisiblePropBounds(ren, bounds); if (this->ReplaceActors) { vtkDebugMacro("Replacing actors."); ren->GetActors()->RemoveAllItems(); vtkCubeSource* source = vtkCubeSource::New(); source->SetBounds(bounds); vtkPolyDataMapper* mapper = vtkPolyDataMapper::New(); mapper->SetInput(source->GetOutput()); vtkActor* actor = vtkActor::New(); actor->SetMapper(mapper); ren->AddActor(actor); source->Delete(); mapper->Delete(); actor->Delete(); } } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::SetImageReductionFactorForUpdateRate(double desiredUpdateRate) { this->Superclass::SetImageReductionFactorForUpdateRate(desiredUpdateRate); if (this->Squirt) { if (this->ImageReductionFactor == 1) { this->SetSquirtCompressionLevel(0); } else { this->SetSquirtCompressionLevel(5); } } } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::SquirtDecompress(vtkUnsignedCharArray *in, vtkUnsignedCharArray *out) { vtkSquirtCompressor *compressor = vtkSquirtCompressor::New(); compressor->SetInput(in); compressor->SetOutput(out); compressor->Decompress(); compressor->Delete(); } //---------------------------------------------------------------------------- void vtkDesktopDeliveryClient::PrintSelf(ostream& os, vtkIndent indent) { this->Superclass::PrintSelf(os, indent); os << indent << "ServerProcessId: " << this->ServerProcessId << endl; os << indent << "ReplaceActors: " << (this->ReplaceActors ? "On" : "Off") << endl; os << indent << "RemoteDisplay: " << (this->RemoteDisplay ? "On" : "Off") << endl; os << indent << "Squirt: " << (this->Squirt? "On" : "Off") << endl; os << indent << "RemoteImageProcessingTime: " << this->RemoteImageProcessingTime << endl; os << indent << "TransferTime: " << this->TransferTime << endl; os << indent << "SquirtCompressionLevel: " << this->SquirtCompressionLevel << endl; }
32.61461
93
0.588585
matthb2
a7621b00088d2de9f2ecc9f4af940f5537291cb5
501
cpp
C++
src/base/pch_std.cpp
dufferprog/verbexx
bfc3c30ad2ca6c246c8f88405b386475278f9ecc
[ "MIT" ]
null
null
null
src/base/pch_std.cpp
dufferprog/verbexx
bfc3c30ad2ca6c246c8f88405b386475278f9ecc
[ "MIT" ]
1
2018-09-14T00:07:27.000Z
2018-09-14T00:07:27.000Z
src/base/pch_std.cpp
dufferprog/verbexx
bfc3c30ad2ca6c246c8f88405b386475278f9ecc
[ "MIT" ]
1
2018-09-13T23:43:12.000Z
2018-09-13T23:43:12.000Z
// pch_std.cpp ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // pch_std.cpp -- pre-compiled headers -- non-clr compiles // =========== ---------------------------------------- // // ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include "h__include.h" #pragma hdrstop("../pch/pch_std.pch")
33.4
135
0.191617
dufferprog