blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
listlengths
1
1
author
stringlengths
0
119
bea77d0f329dcd57876146492a75b39fc6309873
6ed7d6ab76b457386de1767e465ed7aeeb1e540d
/agent/browser/ie/urlBlast/urlBlastDlg.h
e41eb76e9e87bcf8bac815a73ffa764fa912603f
[]
no_license
kennydee/webpagetest
3d15f5c94c6d51166b377241d9877a704bc3ec5b
a23b389efe3fe657ca2358ebf6bd5a138f1afba3
refs/heads/master
2021-01-16T18:43:39.007107
2013-07-04T16:51:32
2013-07-04T16:51:32
11,185,036
0
1
null
null
null
null
UTF-8
C++
false
false
2,903
h
// urlBlastDlg.h : header file // #pragma once #include "afxwin.h" #include "URLBlaster.h" // CurlBlastDlg dialog class CurlBlastDlg : public CDialog { // Construction public: CurlBlastDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data enum { IDD = IDD_URLBLAST_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: HICON m_hIcon; // Generated message map functions virtual BOOL OnInitDialog(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg LRESULT OnUpdateUI(WPARAM wParal, LPARAM lParam); afx_msg LRESULT OnContinueStartup(WPARAM wParal, LPARAM lParam); DECLARE_MESSAGE_MAP() virtual void OnCancel(); virtual void OnOK(); public: afx_msg void OnClose(); CStatic status; afx_msg void OnTimer(UINT_PTR nIDEvent); void ClearCaches(void); protected: void DoStartup(void); CArray<CURLBlaster *> workers; void KillWorkers(void); void InstallFlash(); CStatic rate; __int64 start; __int64 freq; CStatic cpu; __int64 firstIdleTime; __int64 firstKernelTime; __int64 firstUserTime; __int64 lastIdleTime; __int64 lastKernelTime; __int64 lastUserTime; __int64 lastUpload; CString logFile; int startupDelay; int threadCount; int testID; int configID; DWORD timeout; CString aliveFile; CString urlFilesDir; int testType; int rebootInterval; int clearCacheInterval; DWORD screenShotErrors; DWORD checkOpt; CStatic rebooting; DWORD labID; DWORD dialerID; DWORD connectionType; int uploadLogsInterval; CStringArray uploadLogFiles; CStringArray addresses; CLog log; bool running; DWORD minInterval; CString customEventText; bool bDrWatson; DWORD ifIndex; // interface to add IP addresses to CList<ULONG> ipContexts; // added IP address contexts we need to delete when we exit CString accountBase; CString password; CString preLaunch; CString postLaunch; int browserWidth; int browserHeight; DWORD debug; DWORD pipeIn; DWORD pipeOut; SECURITY_ATTRIBUTES nullDacl; SECURITY_DESCRIPTOR SD; CString dynaTrace; int ec2; int useCurrentAccount; HMODULE hHookDll; int keepDNS; DWORD clearShortTermCacheSecs; CIpfw ipfw; HANDLE testingMutex; void LoadSettings(void); CUrlManager urlManager; CString computerName; bool CheckReboot(bool force = false); void WriteAlive(void); void CheckUploadLogs(void); void UploadLogs(void); void KillProcs(void); void ClearTemp(void); void CloseDialogs(void); DWORD experimental; void CheckExit(void); void DisableDNSCache(void); void StopService(CString serviceName); void Defrag(void); void SetupScreen(void); void GetEC2Config(); bool GetUrlText(CString url, CString &response); void InstallSystemGDIHook(); void RemoveSystemGDIHook(); };
[ "pmeenan@webpagetest.org" ]
pmeenan@webpagetest.org
62153622db4a090567533178e97c0e4262075f21
6b8fff0eeb75ad266af0ec2b9e9aaf28462c2a73
/GCJ_Dataset/Data/alex.jh/2994486_5751500831719424_alex.jh.cpp
4f4313cbbe04c757537c740f08220789ae305bf9
[]
no_license
kotunde/SourceFileAnalyzer_featureSearch_and_classification
030ab8e39dd79bcc029b38d68760c6366d425df5
9a3467e6aae5455142bc7a5805787f9b17112d17
refs/heads/master
2020-09-22T04:04:41.722623
2019-12-07T11:59:06
2019-12-07T11:59:06
225,040,703
0
1
null
null
null
null
UTF-8
C++
false
false
2,112
cpp
#include <iostream> #include <sstream> #include <vector> #include <string> #include <algorithm> #include <utility> #include <set> #include <map> #include <deque> #include <queue> #include <cmath> #include <cstdlib> #include <ctime> #include <cstdio> #include <stdio.h> using namespace std; #define fo(i,n) for(int i=0; i<(int)n; i++) #define rep(it,s) for(__typeof((s).begin()) it=(s).begin();it!=(s).end();it++) #define mp(a,b) make_pair(a,b) #define pb(x) push_back(x) #define pii pair<int,int> int n; string s[110]; string w[110]; int cnt[110][110]; int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); int t; cin>>t; for (int tt=1; tt<=t; tt++) { cin>>n; for (int i=0; i<n; i++) cin>>s[i]; for (int i=0; i<n; i++) w[i] = ""; for (int i=0; i<n; i++) { int tot = 0; for (int j=0; j<s[i].length(); j++) { if (j==0 || s[i][j]==s[i][j-1]) { tot++; } else { w[i] += s[i][j-1]; cnt[i][w[i].length()-1] = tot; tot = 1; } } w[i] += s[i][s[i].length()-1]; cnt[i][w[i].length()-1] = tot; } bool bad = 0; for (int i=1; i<n; i++) { if (w[i]!=w[i-1]) bad = 1; } if (bad) { printf("Case #%d: Fegla Won\n", tt); } else { int res = 0; for (int i=0; i<w[0].size(); i++) { int m = 0; for (int j=0; j<n; j++) m = max(m, cnt[j][i]); int best = 1000000; for (int k=1; k<=m; k++) { int tot = 0; for (int j=0; j<n; j++) { tot += abs(cnt[j][i]-k); } best = min(best, tot); } res += best; } printf("Case #%d: %d\n", tt, res); } } return 0; }
[ "tundekoncsard3566@gmail.com" ]
tundekoncsard3566@gmail.com
ee044a98e478a51f118692620381d3146928b801
0b88542ea778e7cb8a4e8fc2b735c5dc53284ff4
/cpp/encrypt/crc16.cpp
30c85392cfc84bb356b62e6568895dbe3fff5436
[]
no_license
GuoGuo-wen/library
49cf889ef493ba779278932b6dcc8847b926dee3
680bc647f231f3dd1a8c095fef998f6afd54113b
refs/heads/master
2021-11-23T21:25:00.693887
2011-10-28T00:32:35
2011-10-28T00:32:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,742
cpp
/** * Copyright (C) 2008 Meteor Liu * * This code has been released into the Public Domain. * You may do whatever you like with it. * * @file * @author Meteor Liu <meteor1113@gmail.com> * @date 2009-01-01 */ // #include <standard library headers> #include <fstream> // #include <other library headers> // #include "customer headers" #include "crc16.h" #pragma warning(push) #pragma warning(disable: 4996) namespace encrypt { static const unsigned short crc16tab[] = /* CRC lookup table */ { 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 }; /** * description */ CRC16::CRC16() { Init(); } /** * description */ CRC16::~CRC16() { } void CRC16::Init() { _value = 0xFFFF; } void CRC16::Update(const void* in, unsigned int uBufSize) { const unsigned char* pBuffer = (const unsigned char*)in; for(unsigned long i = 0; i < uBufSize; i++) { _value = (_value >> 8) ^ crc16tab[(_value ^ *pBuffer++) & 0xFF]; } } void CRC16::Final() { _value = ~(_value); } std::string CRC16::ToString() const { char buf[5]; sprintf(buf, "%04X", _value); buf[4] = '\0'; return buf; } unsigned short CRC16Data(const void* data, unsigned int length) { CRC16 obj; obj.Update(data, length); obj.Final(); return obj.GetValue(); } unsigned short CRC16String(const std::string& str) { CRC16 obj; obj.Update((const unsigned char*)str.c_str(), static_cast<unsigned int>(str.length())); obj.Final(); return obj.GetValue(); } unsigned short CRC16File(const std::string& file) { CRC16 obj; std::ifstream fs(file.c_str(), std::ios::binary); const unsigned int BUFFER_SIZE = 1024; char buffer[BUFFER_SIZE]; while (!fs.eof()) { fs.read(buffer, BUFFER_SIZE); std::streamsize length = fs.gcount(); if (length > 0) { obj.Update((const unsigned char*)buffer, length); } } fs.close(); obj.Final(); return obj.GetValue(); } } #pragma warning(pop)
[ "meteor1113@gmail.com" ]
meteor1113@gmail.com
bc94f787adf4e580dbdd2305c1a4dc8b395592d3
72bf5d66f0683389c24e3e946d364b5dbec4a540
/src/ofxTonicSynth.h
8f91cc0eaf89f26ae2c820eb58f9dc5a13ec926b
[]
no_license
CLOUDS-Interactive-Documentary/ofxTonic
dc172152200a158ea57cef2e50cafa4afa5cc689
5157b19162efd9743d9d0aff10beadca3396c8e6
refs/heads/master
2020-12-31T03:26:07.195085
2015-05-28T01:22:19
2015-05-28T01:22:19
15,638,953
1
0
null
null
null
null
UTF-8
C++
false
false
1,108
h
// // ofxTonicSynth.h // example_UI_Callbacks // // Created by Morgan Packard on 7/13/13. // // #ifndef __example_UI_Callbacks__ofxTonicSynth__ #define __example_UI_Callbacks__ofxTonicSynth__ #include <iostream> #include "Tonic/Synth.h" #include "ofEvents.h" /* Simple subclass of tonic::Synth to add a few oF-specific things. Mainly integration with the oF event system. */ namespace Tonic { class ofxTonicSynth; class ofControlChangetSubscriber : public ControlChangeSubscriber{ public: ofEvent<float> event; ofxTonicSynth* synth; void valueChanged(string name, TonicFloat value){ ofNotifyEvent(event, value, synth); } }; class ofxTonicSynth : public Synth{ vector<ofControlChangetSubscriber*> eventSubscribers; public: ofxTonicSynth(); ~ofxTonicSynth(); void update(ofEventArgs& args); void audioRequested(ofAudioEventArgs& args); /*! Event is triggered every time the value of the ControlGenerator changes. */ ofEvent<float>* createOFEvent(ControlGenerator gen); }; } #endif /* defined(__example_UI_Callbacks__ofxTonicSynth__) */
[ "morgan@morganpackard.com" ]
morgan@morganpackard.com
688ab70e8c2cee5cfea7ebbd18984b67d5e2ab78
53acc2627b0a23899ffe3e250acd8ee3d9b2216c
/modules/skottie/src/SkottieValue.cpp
ba833e78da6e82405726e5ec91982c1b7d6044b8
[ "BSD-3-Clause" ]
permissive
rust-skia/skia
7f5c485a104d0f0baf11a13668dbdb0815859a0c
84cb5d3fd906ddda7a04ec1bad6638ab36457af3
refs/heads/chrome/m81
2023-08-27T21:57:56.623145
2020-02-06T21:11:31
2020-02-11T20:03:00
225,648,100
3
6
BSD-3-Clause
2021-11-19T02:52:35
2019-12-03T15:04:50
C++
UTF-8
C++
false
false
8,281
cpp
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "modules/skottie/src/SkottieValue.h" #include "include/core/SkColor.h" #include "include/core/SkPoint.h" #include "include/core/SkSize.h" #include "include/private/SkM44.h" #include "include/private/SkNx.h" #include "modules/skottie/src/SkottieJson.h" #include "modules/skottie/src/SkottiePriv.h" namespace skottie { template <> bool ValueTraits<ScalarValue>::FromJSON(const skjson::Value& jv, const internal::AnimationBuilder*, ScalarValue* v) { return Parse(jv, v); } template <> bool ValueTraits<ScalarValue>::CanLerp(const ScalarValue&, const ScalarValue&) { return true; } template <> void ValueTraits<ScalarValue>::Lerp(const ScalarValue& v0, const ScalarValue& v1, float t, ScalarValue* result) { *result = v0 + (v1 - v0) * t; } template <> template <> SkScalar ValueTraits<ScalarValue>::As<SkScalar>(const ScalarValue& v) { return v; } template <> bool ValueTraits<VectorValue>::FromJSON(const skjson::Value& jv, const internal::AnimationBuilder*, VectorValue* v) { return Parse(jv, v); } template <> bool ValueTraits<VectorValue>::CanLerp(const VectorValue& v1, const VectorValue& v2) { return v1.size() == v2.size(); } template <> void ValueTraits<VectorValue>::Lerp(const VectorValue& v0, const VectorValue& v1, float t, VectorValue* result) { SkASSERT(v0.size() == v1.size()); result->resize(v0.size()); for (size_t i = 0; i < v0.size(); ++i) { ValueTraits<ScalarValue>::Lerp(v0[i], v1[i], t, &(*result)[i]); } } // DEPRECATED: remove after converting everything to SkColor4f template <> template <> SkColor ValueTraits<VectorValue>::As<SkColor>(const VectorValue& v) { // best effort to turn this into a color const auto r = v.size() > 0 ? v[0] : 0, g = v.size() > 1 ? v[1] : 0, b = v.size() > 2 ? v[2] : 0, a = v.size() > 3 ? v[3] : 1; return SkColorSetARGB(SkScalarRoundToInt(SkTPin(a, 0.0f, 1.0f) * 255), SkScalarRoundToInt(SkTPin(r, 0.0f, 1.0f) * 255), SkScalarRoundToInt(SkTPin(g, 0.0f, 1.0f) * 255), SkScalarRoundToInt(SkTPin(b, 0.0f, 1.0f) * 255)); } template <> template <> SkColor4f ValueTraits<VectorValue>::As<SkColor4f>(const VectorValue& v) { // best effort to turn a vector into a color const auto r = v.size() > 0 ? SkTPin(v[0], 0.0f, 1.0f) : 0, g = v.size() > 1 ? SkTPin(v[1], 0.0f, 1.0f) : 0, b = v.size() > 2 ? SkTPin(v[2], 0.0f, 1.0f) : 0, a = v.size() > 3 ? SkTPin(v[3], 0.0f, 1.0f) : 1; return { r, g, b, a }; } template <> template <> SkPoint ValueTraits<VectorValue>::As<SkPoint>(const VectorValue& vec) { // best effort to turn this into a 2D point return SkPoint { vec.size() > 0 ? vec[0] : 0, vec.size() > 1 ? vec[1] : 0, }; } template <> template <> SkV3 ValueTraits<VectorValue>::As<SkV3>(const VectorValue& vec) { // best effort to turn this into a 3D point return SkV3 { vec.size() > 0 ? vec[0] : 0, vec.size() > 1 ? vec[1] : 0, vec.size() > 2 ? vec[2] : 0, }; } template <> template <> SkSize ValueTraits<VectorValue>::As<SkSize>(const VectorValue& vec) { const auto pt = ValueTraits::As<SkPoint>(vec); return SkSize::Make(pt.x(), pt.y()); } namespace { bool ParsePointVec(const skjson::Value& jv, std::vector<SkPoint>* pts) { if (!jv.is<skjson::ArrayValue>()) return false; const auto& av = jv.as<skjson::ArrayValue>(); pts->clear(); pts->reserve(av.size()); std::vector<float> vec; for (size_t i = 0; i < av.size(); ++i) { if (!Parse(av[i], &vec) || vec.size() != 2) return false; pts->push_back(SkPoint::Make(vec[0], vec[1])); } return true; } } // namespace template <> bool ValueTraits<ShapeValue>::FromJSON(const skjson::Value& jv, const internal::AnimationBuilder* abuilder, ShapeValue* v) { SkASSERT(v->fVertices.empty()); // Some versions wrap values as single-element arrays. if (const skjson::ArrayValue* av = jv) { if (av->size() == 1) { return FromJSON((*av)[0], abuilder, v); } } if (!jv.is<skjson::ObjectValue>()) return false; const auto& ov = jv.as<skjson::ObjectValue>(); std::vector<SkPoint> verts, // Cubic Bezier vertices. inPts, // Cubic Bezier "in" control points, relative to vertices. outPts; // Cubic Bezier "out" control points, relative to vertices. if (!ParsePointVec(ov["v"], &verts)) { // Vertices are required. return false; } // In/out points are optional. ParsePointVec(ov["i"], &inPts); if (!inPts.empty() && inPts.size() != verts.size()) { return false; } inPts.resize(verts.size(), { 0, 0 }); ParsePointVec(ov["o"], &outPts); if (!outPts.empty() && outPts.size() != verts.size()) { return false; } outPts.resize(verts.size(), { 0, 0 }); v->fVertices.reserve(inPts.size()); for (size_t i = 0; i < inPts.size(); ++i) { v->fVertices.push_back(BezierVertex({inPts[i], outPts[i], verts[i]})); } v->fClosed = ParseDefault<bool>(ov["c"], false); return true; } template <> bool ValueTraits<ShapeValue>::CanLerp(const ShapeValue& v1, const ShapeValue& v2) { return v1.fVertices.size() == v2.fVertices.size() && v1.fClosed == v2.fClosed; } static SkPoint lerp_point(const SkPoint& v0, const SkPoint& v1, const Sk2f& t) { const auto v2f0 = Sk2f::Load(&v0), v2f1 = Sk2f::Load(&v1); SkPoint v; (v2f0 + (v2f1 - v2f0) * t).store(&v); return v; } template <> void ValueTraits<ShapeValue>::Lerp(const ShapeValue& v0, const ShapeValue& v1, float t, ShapeValue* result) { SkASSERT(v0.fVertices.size() == v1.fVertices.size()); SkASSERT(v0.fClosed == v1.fClosed); result->fClosed = v0.fClosed; result->fVolatile = true; // interpolated values are volatile const auto t2f = Sk2f(t); result->fVertices.resize(v0.fVertices.size()); for (size_t i = 0; i < v0.fVertices.size(); ++i) { result->fVertices[i] = BezierVertex({ lerp_point(v0.fVertices[i].fInPoint , v1.fVertices[i].fInPoint , t2f), lerp_point(v0.fVertices[i].fOutPoint, v1.fVertices[i].fOutPoint, t2f), lerp_point(v0.fVertices[i].fVertex , v1.fVertices[i].fVertex , t2f) }); } } template <> template <> SkPath ValueTraits<ShapeValue>::As<SkPath>(const ShapeValue& shape) { SkPath path; if (!shape.fVertices.empty()) { // conservatively assume all cubics path.incReserve(1 + SkToU32(shape.fVertices.size() * 3)); path.moveTo(shape.fVertices.front().fVertex); } const auto& addCubic = [&](size_t from, size_t to) { const auto c0 = shape.fVertices[from].fVertex + shape.fVertices[from].fOutPoint, c1 = shape.fVertices[to].fVertex + shape.fVertices[to].fInPoint; if (c0 == shape.fVertices[from].fVertex && c1 == shape.fVertices[to].fVertex) { // If the control points are coincident, we can power-reduce to a straight line. // TODO: we could also do that when the controls are on the same line as the // vertices, but it's unclear how common that case is. path.lineTo(shape.fVertices[to].fVertex); } else { path.cubicTo(c0, c1, shape.fVertices[to].fVertex); } }; for (size_t i = 1; i < shape.fVertices.size(); ++i) { addCubic(i - 1, i); } if (!shape.fVertices.empty() && shape.fClosed) { addCubic(shape.fVertices.size() - 1, 0); path.close(); } path.setIsVolatile(shape.fVolatile); path.shrinkToFit(); return path; } } // namespace skottie
[ "skia-commit-bot@chromium.org" ]
skia-commit-bot@chromium.org
d265fbe8a85ef6515edc4224b89ec3cd0c4d23cd
4091f79b6537d091241f66ce02c79f701e07967e
/DLNWare/examples/event_monitor_gui/main.cpp
023a41ecc97ba090158984e717df311edf44bf57
[]
no_license
habibiam/opto_luna
b0b3c29ce1fdb1e730d4c40a7dd91fe8a13d492b
1ee2cf09e0e03a046a43c69d35cb09e82f05c457
refs/heads/master
2020-04-15T12:47:47.547115
2017-02-03T22:50:11
2017-02-03T22:50:11
65,699,360
0
0
null
null
null
null
UTF-8
C++
false
false
614
cpp
#include <QtGui/QApplication> #include <QMessageBox> #include "mainwindow.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); int exitCode = -1; DLN_RESULT result = DlnConnect("localhost", DLN_DEFAULT_SERVER_PORT); if (DLN_SUCCEEDED(result)) { MainWindow w; w.show(); exitCode = a.exec(); DlnDisconnectAll(); } else { QMessageBox::warning(NULL, QObject::tr("DLN Server Connection Error"), QObject::tr("Failed to connect to local DLN server")); } return exitCode; }
[ "clawton@dlssolutions.com" ]
clawton@dlssolutions.com
eb0d0792538cb9be4a3370ec535efbbe2c4cf6b1
6b60654f5c37b788b5a0325fe22cce600794e525
/contest/arithm.cpp
ae1b334597b4d295b75e077b6b24eb78e231742d
[]
no_license
rsmnnit/Codes
cd45ae7a111fd7bb9e80bc85c0f273058eb3eb07
355daa783c625c3f1789f82482a7dbac12950210
refs/heads/master
2021-09-09T15:10:06.900600
2018-03-17T09:10:49
2018-03-17T09:10:49
104,431,239
0
0
null
null
null
null
UTF-8
C++
false
false
608
cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define sf(i) scanf("%lld",&i) #define sfd(a,b) scanf("%lld%lld",&a,&b) #define pf(a) printf("%lld\n",a) #define f(i,a,b) for(i=a;i<b;i++) int main() { ll t; sf(t); while(t--){ ll n,c,i,j; sfd(n,c); if(n%2) { if(c%(2*n)==0) { c-=n; if(c>=(1+n/2)) {printf("Yes\n"); } else printf("No\n"); } else printf("No\n"); } else { if(c%(n/2)==0) { c-=(n/2); if(c>=(1+n)) {printf("Yes\n"); } else printf("No\n"); } else printf("No\n"); } } return 0; }
[ "noreply@github.com" ]
noreply@github.com
0ca8df30291e582578db4f26c05e3e822e9e35f5
50d457e699498bac58c6625491aade25e8c23445
/b1.cpp
3a2ce6476cf18d66141aae0a05c705e1733dace3
[]
no_license
Hainam1406/test1
b304c40b146d81c5b231a7186f696bd3c0bd6fd7
48d344258d5ee9b39b0c1c9685ef370730023fc1
refs/heads/master
2023-02-07T23:17:15.090689
2020-12-20T08:19:57
2020-12-20T08:19:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
639
cpp
#include <iostream> using namespace std; int n; // Nhap n void nhap(){ do{ cout<<"\n + Nhap n: "; cin>>n; if(n<111||n>888) cout<<"\n Nhap lai n! "; }while(n<111||n>888); } // In so le nho hon n void In(){ cout<<"\n + In so le nho hon n: "; for(int i=0;i<n;i++) if(i%2!=0) cout<<i<<","; } // tach n void tach(){ int a,b,c; a=n/100; b=(n%100)/10; c=n%10; cout<<"\n + Hang tram cua n: "<<a; cout<<"\n + Hang chuc cua n: "<<b; cout<<"\n + Hang don vi cua n: "<<c; } // Ham chinh int main(){ cout<<"\n Nguyen Hai Nam - 1099247 "; cout<<"\n Cau 1: "; nhap(); In(); tach(); cout<<"\n ..... End ..... "; return 0; }
[ "nguyenhainambg1234@gmail.com" ]
nguyenhainambg1234@gmail.com
0c39fd185db954fd0e3764f2a6e58a3f9304ddd5
ee581f3feff6c348b8e358462aa6e83ddd85c757
/filezillaserverinterface/interface/misc/HyperLink.cpp
020558d72815baaa2cf6470e7e191d380472ed26
[]
no_license
jack416/filezilla
2e2907af0f577c0f685af63d38290a2cd647a624
dea390c7362540b6f8b317fd8af53f0c1178ea98
refs/heads/master
2020-04-24T08:55:10.533783
2018-06-07T03:00:49
2018-06-07T03:00:49
null
0
0
null
null
null
null
WINDOWS-1250
C++
false
false
15,968
cpp
// HyperLink.cpp : implementation file // // HyperLink static control. // // Copyright (C) 1997, 1998 Giancarlo Iovino (giancarlo@saria.com) // All rights reserved. May not be sold for profit. // // This code is based on CHyperlink by Chris Maunder. // "GotoURL" function by Stuart Patterson appeared in the Aug, 1997 // Windows Developer's Journal. // "Default hand cursor" from Paul DiLascia's Jan 1998 MSJ article. #include "stdafx.h" #include "HyperLink.h" #if defined(_DEBUG) #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #define TOOLTIP_ID 1 #define SETBITS(dw, bits) (dw |= bits) #define CLEARBITS(dw, bits) (dw &= ~(bits)) #define BITSET(dw, bit) (((dw) & (bit)) != 0L) ///////////////////////////////////////////////////////////////////////////// // CHyperLink const DWORD CHyperLink::StyleUnderline = 0x00000001; // Underline bit const DWORD CHyperLink::StyleUseHover = 0x00000002; // Hand over coloring bit const DWORD CHyperLink::StyleAutoSize = 0x00000004; // Auto size bit const DWORD CHyperLink::StyleDownClick = 0x00000008; // Down click mode bit const DWORD CHyperLink::StyleGetFocusOnClick = 0x00000010; // Get focus on click bit const DWORD CHyperLink::StyleNoHandCursor = 0x00000020; // No hand cursor bit const DWORD CHyperLink::StyleNoActiveColor = 0x00000040; // No active color bit COLORREF CHyperLink::g_crLinkColor = RGB(0, 0, 255); // Blue COLORREF CHyperLink::g_crActiveColor = RGB(0, 128, 128); // Dark cyan COLORREF CHyperLink::g_crVisitedColor = RGB(128, 0, 128); // Purple COLORREF CHyperLink::g_crHoverColor = RGB(255, 0, 0 ); // Red HCURSOR CHyperLink::g_hLinkCursor = NULL; // No cursor CHyperLink::CHyperLink() { m_bOverControl = FALSE; // Cursor not yet over control m_bVisited = FALSE; // Link has not been visited yet m_bLinkActive = FALSE; // Control doesn't own the focus yet m_strURL.Empty(); // Set URL to an empty string // Set default styles m_dwStyle = StyleUnderline|StyleAutoSize|StyleGetFocusOnClick; } CHyperLink::~CHyperLink() { m_Font.DeleteObject(); } IMPLEMENT_DYNAMIC(CHyperLink, CStatic) BEGIN_MESSAGE_MAP(CHyperLink, CStatic) //{{AFX_MSG_MAP(CHyperLink) ON_WM_CTLCOLOR_REFLECT() ON_WM_SETCURSOR() ON_WM_MOUSEMOVE() ON_WM_LBUTTONUP() ON_WM_SETFOCUS() ON_WM_KILLFOCUS() ON_WM_KEYDOWN() ON_WM_NCHITTEST() ON_WM_LBUTTONDOWN() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CHyperLink message handlers BOOL CHyperLink::PreTranslateMessage(MSG* pMsg) { m_ToolTip.RelayEvent(pMsg); return CStatic::PreTranslateMessage(pMsg); } void CHyperLink::PreSubclassWindow() { // If the URL string is empty try to set it to the window text if (m_strURL.IsEmpty()) GetWindowText(m_strURL); // Check that the window text isn't empty. // If it is, set it as URL string. CString strWndText; GetWindowText(strWndText); if (strWndText.IsEmpty()) { // Set the URL string as the window text ASSERT(!m_strURL.IsEmpty()); // window text and URL both NULL! CStatic::SetWindowText(m_strURL); } // Get the current window font CFont* pFont = GetFont(); if (pFont != NULL) { LOGFONT lf; pFont->GetLogFont(&lf); lf.lfUnderline = BITSET(m_dwStyle, StyleUnderline); if (m_Font.CreateFontIndirect(&lf)) CStatic::SetFont(&m_Font); // Adjust window size to fit URL if necessary AdjustWindow(); } else { // if GetFont() returns NULL then probably the static // control is not of a text type: it's better to set // auto-resizing off CLEARBITS(m_dwStyle,StyleAutoSize); } if (!BITSET(m_dwStyle,StyleNoHandCursor)) SetDefaultCursor(); // Try to load an "hand" cursor // Create the tooltip CRect rect; GetClientRect(rect); m_ToolTip.Create(this); m_ToolTip.AddTool(this, m_strURL, rect, TOOLTIP_ID); CStatic::PreSubclassWindow(); } // Handler for WM_CTLCOLOR reflected message (see message map) HBRUSH CHyperLink::CtlColor(CDC* pDC, UINT nCtlColor) { ASSERT(nCtlColor == CTLCOLOR_STATIC); if (m_bOverControl && BITSET(m_dwStyle,StyleUseHover)) pDC->SetTextColor(g_crHoverColor); else if (!BITSET(m_dwStyle,StyleNoActiveColor) && m_bLinkActive) pDC->SetTextColor(g_crActiveColor); else if (m_bVisited) pDC->SetTextColor(g_crVisitedColor); else pDC->SetTextColor(g_crLinkColor); // Set transparent drawing mode pDC->SetBkMode(TRANSPARENT); return (HBRUSH)GetStockObject(NULL_BRUSH); } void CHyperLink::OnMouseMove(UINT nFlags, CPoint point) { if (m_bOverControl) // Cursor currently over control { CRect rect; GetClientRect(rect); if (!rect.PtInRect(point)) { m_bOverControl = FALSE; ReleaseCapture(); Invalidate(); return; } } else // Cursor has left control area { m_bOverControl = TRUE; Invalidate(); SetCapture(); } } ////////////////////////////////////////////////////////////////////////// // "Normally, a static control does not get mouse events unless it has // SS_NOTIFY. This achieves the same effect as SS_NOTIFY, but it's fewer // lines of code and more reliable than turning on SS_NOTIFY in OnCtlColor // because Windows doesn't send WM_CTLCOLOR to bitmap static controls." // (Paul DiLascia) LRESULT CHyperLink::OnNcHitTest(CPoint /*point*/) { return HTCLIENT; } void CHyperLink::OnLButtonDown(UINT /*nFlags*/, CPoint /*point*/) { if (BITSET(m_dwStyle,StyleGetFocusOnClick)) SetFocus(); // Set the focus and make the link active if (BITSET(m_dwStyle,StyleDownClick)) FollowLink(); m_bLinkActive = TRUE; } void CHyperLink::OnLButtonUp(UINT /*nFlags*/, CPoint /*point*/) { if (m_bLinkActive && !BITSET(m_dwStyle,StyleDownClick)) FollowLink(); } BOOL CHyperLink::OnSetCursor(CWnd* /*pWnd*/, UINT /*nHitTest*/, UINT /*message*/) { if (g_hLinkCursor) { ::SetCursor(g_hLinkCursor); return TRUE; } return FALSE; } void CHyperLink::OnSetFocus(CWnd* /*pOldWnd*/) { m_bLinkActive = TRUE; Invalidate(); // Repaint to set the focus } void CHyperLink::OnKillFocus(CWnd* /*pNewWnd*/) { // Assume that control lost focus = mouse out // this avoid troubles with the Hover color m_bOverControl = FALSE; m_bLinkActive = FALSE; Invalidate(); // Repaint to unset the focus } void CHyperLink::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { if (nChar == VK_SPACE) FollowLink(); else CStatic::OnKeyDown(nChar, nRepCnt, nFlags); } ///////////////////////////////////////////////////////////////////////////// // CHyperLink operations void CHyperLink::SetColors( COLORREF crLinkColor, COLORREF crActiveColor, COLORREF crVisitedColor, COLORREF crHoverColor /* = -1 */) { g_crLinkColor = crLinkColor; g_crActiveColor = crActiveColor; g_crVisitedColor = crVisitedColor; if (crHoverColor == -1) g_crHoverColor = ::GetSysColor(COLOR_HIGHLIGHT); else g_crHoverColor = crHoverColor; } void CHyperLink::SetColors(HYPERLINKCOLORS& linkColors) { g_crLinkColor = linkColors.crLink; g_crActiveColor = linkColors.crActive; g_crVisitedColor = linkColors.crVisited; g_crHoverColor = linkColors.crHover; } void CHyperLink::GetColors(HYPERLINKCOLORS& linkColors) { linkColors.crLink = g_crLinkColor; linkColors.crActive = g_crActiveColor; linkColors.crVisited = g_crVisitedColor; linkColors.crHover = g_crHoverColor; } void CHyperLink::SetLinkCursor(HCURSOR hCursor) { ASSERT(hCursor != NULL); g_hLinkCursor = hCursor; if (g_hLinkCursor == NULL) SetDefaultCursor(); } HCURSOR CHyperLink::GetLinkCursor() { return g_hLinkCursor; } BOOL CHyperLink:: ModifyLinkStyle(DWORD dwRemove, DWORD dwAdd, BOOL bApply /* =TRUE */) { // Check if we are adding and removing the same style if ((dwRemove & dwAdd) != 0L) return FALSE; // Remove old styles and set the new ones CLEARBITS(m_dwStyle, dwRemove); SETBITS(m_dwStyle, dwAdd); if (bApply && ::IsWindow(GetSafeHwnd())) { // If possible, APPLY the new styles on the fly if (BITSET(dwAdd,StyleUnderline) || BITSET(dwRemove,StyleUnderline)) SwitchUnderline(); if (BITSET(dwAdd,StyleAutoSize)) AdjustWindow(); if (BITSET(dwRemove,StyleUseHover)) Invalidate(); } return TRUE; } DWORD CHyperLink::GetLinkStyle() const { return m_dwStyle; } void CHyperLink::SetURL(CString strURL) { m_strURL = strURL; if (::IsWindow(GetSafeHwnd())) { ShowWindow(SW_HIDE); AdjustWindow(); m_ToolTip.UpdateTipText(strURL, this, TOOLTIP_ID); ShowWindow(SW_SHOW); } } CString CHyperLink::GetURL() const { return m_strURL; } void CHyperLink::SetWindowText(LPCTSTR lpszText) { ASSERT(lpszText != NULL); if (::IsWindow(GetSafeHwnd())) { // Set the window text and adjust its size while the window // is kept hidden in order to allow dynamic modification ShowWindow(SW_HIDE); // Hide window // Call the base class SetWindowText() CStatic::SetWindowText(lpszText); // Resize the control if necessary AdjustWindow(); ShowWindow(SW_SHOW); // Show window } } void CHyperLink::SetFont(CFont* pFont) { ASSERT(::IsWindow(GetSafeHwnd())); ASSERT(pFont != NULL); // Set the window font and adjust its size while the window // is kept hidden in order to allow dynamic modification ShowWindow(SW_HIDE); // Hide window LOGFONT lf; // Create the new font pFont->GetLogFont(&lf); m_Font.DeleteObject(); m_Font.CreateFontIndirect(&lf); // Call the base class SetFont() CStatic::SetFont(&m_Font); // Resize the control if necessary AdjustWindow(); ShowWindow(SW_SHOW); // Show window } // Function to set underline on/off void CHyperLink::SwitchUnderline() { LOGFONT lf; CFont* pFont = GetFont(); if (pFont != NULL) { pFont->GetLogFont(&lf); lf.lfUnderline = BITSET(m_dwStyle,StyleUnderline); m_Font.DeleteObject(); m_Font.CreateFontIndirect(&lf); SetFont(&m_Font); } } // Move and resize the window so that its client area has the same size // as the hyperlink text. This prevents the hyperlink cursor being active // when it is not over the text. void CHyperLink::AdjustWindow() { ASSERT(::IsWindow(GetSafeHwnd())); if (!BITSET(m_dwStyle,StyleAutoSize)) return; // Get the current window rect CRect rcWnd; GetWindowRect(rcWnd); // For a child CWnd object, window rect is relative to the // upper-left corner of the parent window’s client area. CWnd* pParent = GetParent(); if (pParent) pParent->ScreenToClient(rcWnd); // Get the current client rect CRect rcClient; GetClientRect(rcClient); // Calc border size based on window and client rects int borderWidth = rcWnd.Width() - rcClient.Width(); int borderHeight = rcWnd.Height() - rcClient.Height(); // Get the extent of window text CString strWndText; GetWindowText(strWndText); CDC* pDC = GetDC(); CFont* pOldFont = pDC->SelectObject(&m_Font); CSize Extent = pDC->GetTextExtent(strWndText); pDC->SelectObject(pOldFont); ReleaseDC(pDC); // Get the text justification style DWORD dwStyle = GetStyle(); // Recalc window size and position based on text justification if (BITSET(dwStyle, SS_CENTERIMAGE)) rcWnd.DeflateRect(0, (rcWnd.Height() - Extent.cy) / 2); else rcWnd.bottom = rcWnd.top + Extent.cy; if (BITSET(dwStyle, SS_CENTER)) rcWnd.DeflateRect((rcWnd.Width() - Extent.cx) / 2, 0); else if (BITSET(dwStyle,SS_RIGHT)) rcWnd.left = rcWnd.right - Extent.cx; else // SS_LEFT rcWnd.right = rcWnd.left + Extent.cx; // Move and resize the window MoveWindow(rcWnd.left, rcWnd.top, rcWnd.Width() + borderWidth, rcWnd.Height() + borderHeight); } void CHyperLink::SetVisited(BOOL bVisited /* = TRUE */) { m_bVisited = bVisited; } BOOL CHyperLink::IsVisited() const { return m_bVisited; } ///////////////////////////////////////////////////////////////////////////// // CHyperLink implementation // The following function appeared in Paul DiLascia's Jan 1998 // MSJ articles. It loads a "hand" cursor from "winhlp32.exe" // resources void CHyperLink::SetDefaultCursor() { if (g_hLinkCursor == NULL) // No cursor handle - load our own { // This retrieves cursor #106 from winhlp32.exe, which is a hand pointer HCURSOR hHandCursor = ::LoadCursor(0, MAKEINTRESOURCE(IDC_HAND)); if (hHandCursor) g_hLinkCursor = CopyCursor(hHandCursor); } } LONG CHyperLink::GetRegKey(HKEY key, LPCTSTR subkey, LPTSTR retdata) { HKEY hkey; LONG retval = RegOpenKeyEx(key, subkey, 0, KEY_QUERY_VALUE, &hkey); if (retval == ERROR_SUCCESS) { long datasize = MAX_PATH; TCHAR data[MAX_PATH]; RegQueryValue(hkey, NULL, data, &datasize); lstrcpy(retdata,data); RegCloseKey(hkey); } return retval; } // Error report function void CHyperLink::ReportError(int nError) { CString str; switch (nError) { case 0: str = _T("The operating system is out\nof memory or resources."); break; case ERROR_FILE_NOT_FOUND: str = _T("The specified file was not found."); break; case ERROR_PATH_NOT_FOUND: str = _T("The specified path was not found."); break; case ERROR_BAD_FORMAT: str = _T("The .EXE file is invalid\n(non-Win32 .EXE or error in .EXE image)."); break; case SE_ERR_ACCESSDENIED: str = _T("The operating system denied\naccess to the specified file."); break; case SE_ERR_ASSOCINCOMPLETE: str = _T("The filename association is\nincomplete or invalid."); break; case SE_ERR_DDEBUSY: str = _T("The DDE transaction could not\nbe completed because other DDE transactions\nwere being processed."); break; case SE_ERR_DDEFAIL: str = _T("The DDE transaction failed."); break; case SE_ERR_DDETIMEOUT: str = _T("The DDE transaction could not\nbe completed because the request timed out."); break; case SE_ERR_DLLNOTFOUND: str = _T("The specified dynamic-link library was not found."); break; //case SE_ERR_FNF: str = _T("Windows 95 only: The specified file was not found."); break; case SE_ERR_NOASSOC: str = _T("There is no application associated\nwith the given filename extension."); break; case SE_ERR_OOM: str = _T("There was not enough memory to complete the operation."); break; //case SE_ERR_PNF: str = _T("The specified path was not found."); break; case SE_ERR_SHARE: str = _T("A sharing violation occurred. "); break; default: str.Format(_T("Unknown Error (%d) occurred."), nError); break; } str = "Can't open link:\n\n" + str; AfxMessageBox(str, MB_ICONEXCLAMATION | MB_OK); } // "GotoURL" function by Stuart Patterson // As seen in the August, 1997 Windows Developer's Journal. HINSTANCE CHyperLink::GotoURL(LPCTSTR url, int showcmd) { USES_CONVERSION; TCHAR key[MAX_PATH + MAX_PATH]; // First try ShellExecute() HINSTANCE result = ShellExecute(NULL, _T("open"), url, NULL,NULL, showcmd); // If it failed, get the .htm regkey and lookup the program if ((UINT)result <= HINSTANCE_ERROR) { if (GetRegKey(HKEY_CLASSES_ROOT, _T(".htm"), key) == ERROR_SUCCESS) { lstrcat(key, _T("\\shell\\open\\command")); if (GetRegKey(HKEY_CLASSES_ROOT,key,key) == ERROR_SUCCESS) { TCHAR *pos; pos = _tcsstr(key, _T("\"%1\"")); if (pos == NULL) { // No quotes found pos = _tcsstr(key, _T("%1")); // Check for %1, without quotes if (pos == NULL) // No parameter at all... pos = key+lstrlen(key) - 1; else *pos = '\0'; // Remove the parameter } else *pos = '\0'; // Remove the parameter lstrcat(pos, _T(" ")); lstrcat(pos, url); result = (HINSTANCE)WinExec(T2A(key), showcmd); PROCESS_INFORMATION ProcessInformation; STARTUPINFO startupinfo; memset(&startupinfo, 0, sizeof(startupinfo)); startupinfo.cb = sizeof(startupinfo); CreateProcess(0, key, 0, 0, 0, 0, 0, 0, &startupinfo, &ProcessInformation); } } } return result; } // Activate the link void CHyperLink::FollowLink() { int result = (int) GotoURL(m_strURL, SW_SHOW); if (result <= HINSTANCE_ERROR) { MessageBeep(MB_ICONEXCLAMATION); // Unable to follow link ReportError(result); } else { // Mark link as visited and repaint window m_bVisited = TRUE; Invalidate(); } }
[ "yuanlong.zhang@baidao.com" ]
yuanlong.zhang@baidao.com
9e82e20338eacf8cf628b8d1e912440ea0237ff4
3f78a9da3eecc6d8e401f1cce37e054a252930bc
/[Client]MH/FortWarDialog.h
192c805b4d60c57178cdec242a4ae735f0df991b
[]
no_license
apik1997/Mosiang-Online-Titan-DarkStroy-Azuga-Source-Code
9055aa319c5371afd1ebd504044160234ddbb418
74d6441754efb6da87855ee4916994adb7f838d5
refs/heads/master
2020-06-14T07:46:03.383719
2019-04-09T00:07:28
2019-04-09T00:07:28
194,951,315
0
0
null
2019-07-03T00:14:59
2019-07-03T00:14:59
null
UHC
C++
false
false
2,447
h
#pragma once #include "./Interface/cDialog.h" #include "./Interface/cTabDialog.h" class cStatic; class cButton; class CObjectGuagen; class CItem; class CFWEngraveDialog : public cDialog { protected: CObjectGuagen* m_pEngraveGuagen; cStatic* m_pRemaintimeStatic; DWORD m_dwProcessTime; float m_fBasicTime; public: CFWEngraveDialog(); virtual ~CFWEngraveDialog(); void Linking(); DWORD ActionEvent( CMouse * mouseInfo ); void OnActionEvent( LONG lId, void * p, DWORD we ); void SetActiveWithTime( BOOL val, DWORD dwTime ); }; class CFWTimeDialog : public cDialog { protected: cStatic* m_pTimeStatic; cStatic* m_pCharacterName; DWORD m_dwWarTime; public: CFWTimeDialog(); virtual ~CFWTimeDialog(); void Linking(); DWORD ActionEvent( CMouse * mouseInfo ); void SetActiveWithTimeName( BOOL val, DWORD dwTime, char* pName ); void SetCharacterName( char* pName ); }; // 요새 & 공성 창고 enum eWareHouseKind { eSeigeWareHouseDlg = 1, eFortWareHouseDlg, }; class CFWWareHouseDialog : public cTabDialog { protected: int m_nDialogKind; // 어떤창고인지??? WORD m_wStartPos; cStatic* m_pMoney; CItem* m_pTempMoveItem; int m_nTempMovePos; BOOL m_Lock; BOOL m_InitInfo; public: CFWWareHouseDialog(); virtual ~CFWWareHouseDialog(); virtual void Add( cWindow * window ); virtual void Render(); void Linking(); POSTYPE GetRelativePosition( POSTYPE absPos ); BOOL GetPositionForXYRef( BYTE param, LONG x, LONG y, WORD& pos ); WORD GetTabIndex( POSTYPE absPos ); void SetFortWarWareHouseInfo( MSG_FORTWAR_WAREHOUSE_INFO* pInfo, int nKind ); BOOL AddItem( ITEMBASE* itemBase ); BOOL DeleteItem( POSTYPE Pos, CItem** ppItem ); void DeleteAllItem(); virtual BOOL FakeMoveIcon( LONG x, LONG y, cIcon* icon ); BOOL FakeMoveItem( LONG mouseX, LONG mouseY, CItem* pFromItem ); BOOL FakeGeneralItemMove( POSTYPE ToPos, CItem * pFromItem, CItem * pToItem ); void SendItemMoveSyn(); virtual void SetActive(BOOL val); virtual DWORD ActionEvent(CMouse * mouseInfo); void OnActionEvent(LONG lId, void * p, DWORD we); int GetDialogKind() { return m_nDialogKind; } void SetMoney( MONEYTYPE money ); void PutOutMoneyMsgBox(); void PutOutMoney(); static void OnPutOutMoneyFromFortWarWareOk( LONG iId, void* p, DWORD param1, void * vData1, void * vData2 ); static void OnPutOutMoneyFromSeigeWarWareOk( LONG iId, void* p, DWORD param1, void * vData1, void * vData2 ); };
[ "lixeon.lij@gmail.com" ]
lixeon.lij@gmail.com
45c8c876ca829f570326b0fde64af4049d3b5de7
cea56d93dfbcd0c5b26b8a609917af29a9f69f2a
/vscode_project/c_plus_plus_project_with_vscode/PAT_and_postgraduate/PAT/TianTiSai/1032.cpp
2022619c065ad3107204eaadacf3f64fd3865356
[]
no_license
polyHong/E
e9e23bbc38d0745b1a246143c2e0ab02960e8a5b
404f8ef5f8fbff8136a42d7b17ce906d21a3db76
refs/heads/master
2022-01-09T10:32:42.349339
2018-04-21T06:42:33
2018-04-21T06:42:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
536
cpp
#include <iostream> #include <string.h> using namespace std; int main (){ int n; char c; scanf("%d %c",&n,&c); char sc[65535]; getchar(); gets(sc); int len=strlen(sc); if(len>=n){ for (int i=len-n;i<len;i++){ printf("%c",sc[i]); } printf("\n"); } else{ for(int i=0;i<n-len;i++){ printf("%c",c); } for(int i=0;i<len;i++){ printf("%c",sc[i]); } printf("\n"); } system("pause"); return 0; }
[ "171395837@qq.com" ]
171395837@qq.com
02219c55fc67bfea4ffe7bc884454d04a25d546a
829cb85cdeac487011e1e16ba32efa71a13527a0
/Lab2/Test.h
b61eec4067819bbe946311cdf6ee150ebcd5f1dd
[]
no_license
AnnaShipacheva/Lab2
35a944a41ed755add833ab5a9ed79246420d5d5c
bf01f8af00d46e95abc6c3d68c471bc9a6b5fb9b
refs/heads/master
2023-02-27T00:15:49.196293
2021-01-30T11:35:04
2021-01-30T11:35:04
334,300,342
0
0
null
null
null
null
UTF-8
C++
false
false
183
h
#ifndef TEST_H #define TEST_H #include <iostream> #include <fstream> #include <stdexcept> static std::ofstream testFile; void printExept(std::exception &, std::ofstream &); #endif
[ "a.shipacheva@g.nsu.ru" ]
a.shipacheva@g.nsu.ru
9d5137bead8afac0a4c49e1e71449ce2880222a1
a76fc4b155b155bb59a14a82b5939a30a9f74eca
/Atelier Courrier/RepItemsExt/HtmlBrowser.cpp
047f0e40c95340846121f46d6098103d0f131ca5
[]
no_license
isliulin/JFC-Tools
aade33337153d7cc1b5cfcd33744d89fe2d56b79
98b715b78ae5c01472ef595b1faa5531f356e794
refs/heads/master
2023-06-01T12:10:51.383944
2021-06-17T14:41:07
2021-06-17T14:41:07
null
0
0
null
null
null
null
UTF-8
C++
false
false
626
cpp
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. #include "stdafx.h" #include "HtmlBrowser.h" ///////////////////////////////////////////////////////////////////////////// // CHtmlBrowser IMPLEMENT_DYNCREATE(CHtmlBrowser, CWnd) ///////////////////////////////////////////////////////////////////////////// // CHtmlBrowser properties ///////////////////////////////////////////////////////////////////////////// // CHtmlBrowser operations
[ "alain.chambard@kantarmedia.com" ]
alain.chambard@kantarmedia.com
e7a27e367cc6b97dde0e64427b07e6c1c1497155
ab47182b44439143f975bb3434301dae2390aa45
/OpenFOAM-3.01/tutorials/liquid_Jet/struct_mesh/0/p_rgh
0485da8aee0eba180f166d70f6e2985aa6ca4cb0
[]
no_license
gunvirs/SigmaPDF
eb81c18e0826c82b708693330c962ff76087d3aa
c8ef0eec72bb87dcd57ccb693feaa43a1c891c18
refs/heads/master
2020-03-26T01:09:17.760013
2018-07-10T10:07:18
2018-07-10T10:07:18
144,354,421
0
0
null
null
null
null
UTF-8
C++
false
false
1,500
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inletL { type zeroGradient; } outlet { type totalPressure; rho rho; psi none; gamma 1; p0 uniform 0; value uniform 0; } lateral { type totalPressure; rho rho; psi none; gamma 1; p0 uniform 0; value uniform 0; } wallInlet { type zeroGradient; } } // ************************************************************************* //
[ "gio.tretola@live.it" ]
gio.tretola@live.it
e12bf9db01168b2d400b317bf2e073ddc5377394
2b93f887bdc61bbc5f7da771681659f72d2acc4f
/myki-dc/src/messages/productsalesreversal.cpp
217427a371a56a4d2d1a8536d60d4cfec086e582
[]
no_license
PengWEI9/Vix
a0796ff0d5e8ce962efa60b4bd22eaba03ac6017
c6dd23d2ffc36d82221a8d920862c435683f1c24
refs/heads/master
2021-01-10T16:01:18.530308
2016-01-25T03:42:00
2016-01-25T03:42:00
49,394,563
3
0
null
null
null
null
UTF-8
C++
false
false
4,080
cpp
/** * @file * @copyright 2015 Vix Technology. All rights reserved * $Author$ * $Date$ * $Rev$ * @brief Contains functions for handling productsalesreversal messages. */ #include "productsalesreversal.h" #include "../utils.h" #include "../dc.h" #include <txnlist/txnlist.h> #include <printerbackup/printerbackupmanager.h> #include <boost/lexical_cast.hpp> #include <string> using boost::lexical_cast; namespace { /** * @brief Creates a product sales reversal printer message, and sends it to * the printer process. * @param request JSON object from readerapp. */ void sendProductSalesReversalPrinterMsg(const Json::Value &request) { Json::Value printerMsg = createBasePrinterMsg(request); printerMsg["data"]["ReversalMessage"] = g_reversalMessage; if (sendJsonIpcMessage(printerTaskId, IPC_PRINTER_JSON, printerMsg) != 0) { CsErrx("sendProductSalesReversalPrinterMsg:" " sendJsonIpcMessage failed"); } printerBackupManager().save(lexical_cast<string>(printerMsg)); } } string process_GET_productsalesreversal(const Json::Value &request) { CsDbg(1, "process_GET_productsalesreversal: %s", request["terminalid"].asCString()); const int saleSeqNo = request["data"]["saleseqno"].asInt(); const Json::Value &items = request["data"]["cartitems"]; // Ensure transaction exists TxnList::TransactionPtr txnPtr = txnManager().getTransaction(saleSeqNo); if (txnPtr == NULL) { CsErrx("process_GET_productsalesreversal: Transaction %d not found", saleSeqNo); return lexical_cast<string>(createErrorResponse(request)); } // Ensure cart items exist for (Json::ValueIterator iter = items.begin(); iter != items.end(); ++iter) { const int itemNumber = (*iter)["itemnumber"].asInt(); if (txnPtr->getCartItem(itemNumber) == NULL) { CsErrx("process_GET_productsalesreversal: Cart item %d for" " transaction %d not found", saleSeqNo, itemNumber); return lexical_cast<string>(createErrorResponse(request)); } } Json::Value response = createBaseResponse(request); Json::Value readerMessage = response; readerMessage["data"] = request["data"]; readerMessage["type"] = "set"; response["processing"] = true; Json::FastWriter fw; sendReaderMessage(fw.write(readerMessage)); return fw.write(response); } string process_SET_productsalesreversal(const Json::Value &request) { CsDbg(1, "process_SET_productsalesreversal: %s", request["terminalid"].asCString()); Json::FastWriter fw; Json::Value browserMessage = request; if (request["string_error"] != "WS_SUCCESS") { sendDCMessage(lexical_cast<string>(request)); return ""; } int saleSeqNo = request["data"]["saleseqno"].asInt(); const Json::Value &items = request["data"]["cartitems"]; TxnList::TransactionPtr txnPtr = txnManager().getTransaction(saleSeqNo); if (txnPtr == NULL) { CsErrx("process_SET_productsalesreversal: transaction %d not found", saleSeqNo); sendDCMessage(lexical_cast<string>(createErrorResponse(request))); return ""; } for (Json::ValueIterator iter = items.begin(); iter != items.end(); ++iter) { const int itemNumber = (*iter)["itemnumber"].asInt(); try { txnPtr->reverseCartItem(itemNumber); txnManager().saveToFile(); } catch (exception &e) { CsErrx("process_SET_productsalesreversal: cart item %d for" " transaction %d not found", saleSeqNo, itemNumber); sendDCMessage(lexical_cast<string>(createErrorResponse(request))); return ""; } } sendDCMessage(fw.write(browserMessage)); Json::Value response = createBaseResponse(request); sendProductSalesReversalPrinterMsg(request); return ""; }
[ "peng.wei8899@gmail.com" ]
peng.wei8899@gmail.com
57c5b3062ba5ba539c35c3da3b247ba8066a4e1f
7195b0211ed7fa170abd505a7a7baf83aa52965a
/Distributed temperature control system/central_server/billshow.cpp
971556248182fb12b4c71521a59269fab8267c23
[]
no_license
Mr-Phoebe/ProgramDesign
173eaa71b786a9e5674f1e210e89b7ab57d2d6dd
f28f0baa3833cec6285c309fb60c864c96cc920c
refs/heads/master
2020-12-29T02:19:33.075845
2019-03-31T15:54:44
2019-03-31T15:54:44
64,042,321
7
4
null
null
null
null
UTF-8
C++
false
false
10,474
cpp
#include "billshow.h" #include "ui_billshow.h" #include "connection.h" #include "mainwindow.h" #include <QDebug> #include <QFile> extern int Smodel; extern int roomnum; extern int power[6]; extern int windtime[6]; extern int temptime[6]; extern int powertime[6]; extern int dispatchtime[6]; extern int year; extern int month; extern int day; extern int hour; extern int minute; extern int second; extern void DataTimeToEvery(); extern double price; const int windprice[3] = {4, 5, 6}; double getFileEndNumber(QString FileName) { QFile inputfile(FileName); if(!inputfile.open(QIODevice::ReadOnly)) { qDebug()<<"open file faild: "<<inputfile.errorString()<<endl; } QTextStream fin(&inputfile); QString Num; double res = 0; double tmpnum=0; while(!fin.atEnd())//这里是因为文件末尾有个空字符,最后一个读入是那个空字符,而log文件的倒数第二个数据才是目前总收入; { res = tmpnum; fin>>Num; tmpnum = Num.toDouble(); qDebug()<<"tmp: "<<Num<<" "<<Num.toDouble()<<endl; } inputfile.close(); return res; } Billshow::Billshow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Billshow) { ui->setupUi(this); //ui->textBrowser->setText("year month day hour minute second cur_temp wind temp cur_pay \n"); QString total_str = "\0", str_temp = "\0"; total_str=getBillString(); ui->textBrowser->setText(total_str); } QString Billshow::getBillString() { float cur_pay = 0; float total_pay = 0; int cur_year = 0; int cur_month = 0; int cur_day = 0; int cur_hour = 0; int cur_minute = 0; int cur_second = 0; int pre_year = 0; int pre_month = 0; int pre_day = 0; int pre_hour = 0; int pre_minute = 0; int pre_second = 0; float cur_temp = 0; int wind = 0; float temp = 0; QString total_str = "\0", str_temp = "\0"; total_str = "date\t\tcur_temp\twind\ttemprture\tcur_pay\n"; //打开对应报表 QSqlQuery query; if(1<= roomnum && roomnum <= 5) { QString sql = "select * from room" + QString::number(roomnum); query.exec(sql); while(query.next()) { pre_day = cur_day; pre_year = cur_year; pre_month = cur_month; pre_hour = cur_hour; pre_minute = cur_minute; pre_second = cur_second; cur_year = query.value(0).toInt(); cur_month = query.value(1).toInt(); cur_day = query.value(2).toInt(); cur_hour = query.value(3).toInt(); cur_minute = query.value(4).toInt(); cur_second = query.value(5).toInt(); cur_temp = query.value(6).toFloat(); wind = query.value(7).toInt(); temp = query.value(8).toFloat(); if(pre_year > 2000) cur_pay = ((cur_year - pre_year) * 8760.0 + (cur_month - pre_month) * 720.0 + (cur_day - pre_day) * 24.0 +(cur_hour - pre_hour) + (cur_minute - pre_minute)/60.0 + (cur_second - pre_second)/3600.0) * windprice[wind] * (1.1 + 0.1 * Smodel) * price; total_pay += cur_pay; qDebug()<<cur_year<<" "<<cur_month<<" "<<cur_day<<" "<<cur_hour<<" "<<cur_minute<<" "<<cur_second; qDebug()<<cur_pay<<total_pay; if(cur_year > 2000) { str_temp = str_temp.number(cur_year, 10); total_str += str_temp; total_str += "-"; str_temp = str_temp.number(cur_month, 10); total_str += str_temp; total_str += "-"; str_temp = str_temp.number(cur_day, 10); total_str += str_temp; total_str += " "; str_temp = str_temp.number(cur_hour, 10); total_str += str_temp; total_str += ":"; str_temp = str_temp.number(cur_minute, 10); total_str += str_temp; total_str += ":"; str_temp = str_temp.number(cur_second, 10); total_str += str_temp; total_str += "\t"; str_temp = str_temp.number(cur_temp, 10, 2); total_str += str_temp; total_str += "\t"; str_temp = str_temp.number(wind, 10); total_str += str_temp; total_str += "\t"; str_temp = str_temp.number(temp, 10, 2); total_str += str_temp; total_str += "\t"; str_temp = str_temp.number(cur_pay, 1, 2); total_str += str_temp; total_str += "\n"; } qDebug()<<total_str; //qDebug()<<query.value(0).toInt()<<query.value(1).toInt()<<query.value(2).toFloat()<<query.value(3).toInt()<<query.value(4).toFloat(); } DataTimeToEvery(); if(cur_year > 0) total_pay += ((year - cur_year) * 8760.0 + (month - cur_month) * 720.0 + (day - cur_day) * 24.0 +(hour - cur_hour) + (minute - cur_minute)/60 + (second - cur_second)/3600.0) * windprice[wind] * (1.1 + 0.1 * Smodel) * price; total_str += "wind change times = "; str_temp = str_temp.number(windtime[roomnum]); total_str += str_temp + "\n"; total_str += "temperature change times = "; str_temp = str_temp.number(temptime[roomnum]); total_str += str_temp + "\n"; total_str += "tunr on/off times = "; str_temp = str_temp.number(powertime[roomnum]); total_str += str_temp + "\n"; total_str += "dispatch times = "; str_temp = str_temp.number(dispatchtime[roomnum]); total_str += str_temp + "\n"; total_str += "total pay = "; str_temp = str_temp.number(total_pay); total_str += str_temp; } return total_str+"\n"; } QString Billshow::getLogString(double pre_income = 0) { float cur_pay = 0; float total_pay = 0; int cur_year = 0; int cur_month = 0; int cur_day = 0; int cur_hour = 0; int cur_minute = 0; int cur_second = 0; int pre_year = 0; int pre_month = 0; int pre_day = 0; int pre_hour = 0; int pre_minute = 0; int pre_second = 0; float cur_temp = 0; int wind = 0; int statement = 0; float temp = 0; QString total_str="\0", str_temp="\0"; //打开对应报表 QSqlQuery query; if(1<= roomnum && roomnum <= 5) { QString sql = "select * from room" + QString::number(roomnum); query.exec(sql); while(query.next()) { pre_day = cur_day; pre_year = cur_year; pre_month = cur_month; pre_hour = cur_hour; pre_minute = cur_minute; pre_second = cur_second; cur_year = query.value(0).toInt(); cur_month = query.value(1).toInt(); cur_day = query.value(2).toInt(); cur_hour = query.value(3).toInt(); cur_minute = query.value(4).toInt(); cur_second = query.value(5).toInt(); cur_temp = query.value(6).toFloat(); temp = query.value(8).toFloat(); if(pre_year > 2000 && statement) cur_pay = ((cur_year - pre_year) * 8760.0 + (cur_month - pre_month) * 720.0 + (cur_day - pre_day) * 24.0 +(cur_hour - pre_hour) + (cur_minute - pre_minute)/60.0 + (cur_second - pre_second)/3600.0) * windprice[wind] * (1.1 + 0.1 * Smodel) * price; wind = query.value(7).toInt(); statement = query.value(8).toInt(); total_pay += cur_pay; qDebug()<<cur_year<<" "<<cur_month<<" "<<cur_day<<" "<<cur_hour<<" "<<cur_minute<<" "<<cur_second; qDebug()<<cur_pay<<total_pay; } if(cur_year > 0 && power[roomnum]) total_pay += ((year - cur_year) * 8760.0 + (month - cur_month) * 720.0 + (day - cur_day) * 24.0 +(hour - cur_hour) + (minute - cur_minute)/60.0 + (second - cur_second)/3600.0) * windprice[wind] * (1.1 + 0.1 * Smodel) * price; total_str = "dateTime: "+str_temp.number(cur_year)+"-"+str_temp.number(cur_month)+"-"+str_temp.number(cur_day)+" "+str_temp.number(cur_hour) +":"+str_temp.number(cur_minute)+":"+str_temp.number(cur_second)+"\t"//时间 +"RoomNo: "+str_temp.number(roomnum)+"\t"//房间号 +"pay: "+str_temp.number(total_pay)+"\t"//本次收入 +"total_income: "+str_temp.number(total_pay+pre_income);//酒店总收入 } else { qDebug()<<"出错,请重新输入房间号码!"; QMessageBox::critical(this,"Error2","Please input correct room_num!",QMessageBox::Ignore); return "\0"; } return total_str+"\n"; } void Billshow::deleteTheTable() { if(1<= roomnum && roomnum <=5) { QString sql = "delete from room" + QString::number(roomnum) + " where year > 0"; QSqlQuery query(sql); } } Billshow::~Billshow() { delete ui; } void Billshow::writeToLog() { QString logFileName = "log"+QString::number(roomnum)+".txt"; double pre_income = getFileEndNumber(logFileName); qDebug()<<"preincome="<<pre_income; QFile logFile(logFileName); if(!logFile.open(QIODevice::Append)) { qDebug()<<"cannot open log bill!\n"<<logFile.errorString()<<endl; close(); return; } QTextStream out1(&logFile); QString logMessage = getLogString(pre_income); out1<<logMessage; logFile.close(); qDebug()<<"print log succeed!"<<endl; deleteTheTable(); } void Billshow::on_pushButton_clicked() { //打印账单 //QString billFileName = "roomFile"+QString::number(roomnum)+".txt"; QFile billFile("bill.txt"); if(!billFile.open(QIODevice::WriteOnly)) { qDebug()<<"cannot open print bill!\n"<<billFile.error()<<endl<<billFile.errorString()<<endl; close(); return; } QTextStream out(&billFile); out<<"roomNo: "<<roomnum<<endl<<getBillString()<<endl; qDebug()<<"print bill succeed!"<<endl; billFile.close(); writeToLog(); close(); } void Billshow::on_pushButton_2_clicked() { writeToLog(); close(); }
[ "6325689" ]
6325689
e5207facb54c673f9d9019a5196156aeeddc8f3f
0cbd91a38782ffa8c4f679b84592c1c822649f88
/include/tower.h
347139cc6077a18ef22a83c9aedcedced26cf2c9
[]
no_license
kgkilla/santorini
8a03fc9fba21b49df2d6d96dbe1242ce5237f780
ef74e5d9f6bb5e1335e34ae4983cf5ab3f91efc1
refs/heads/master
2020-04-16T22:20:14.845140
2019-03-20T05:44:47
2019-03-20T05:44:47
165,963,480
1
0
null
null
null
null
UTF-8
C++
false
false
5,086
h
#ifndef TOWER_H #define TOWER_H #include "stb_image.h" #define TOWER_TOP 1.0f #define TOWER_BOTTOM 0.0f #define TOWER_LEFT -0.5f #define TOWER_RIGHT 0.5f #define MAX_HEIGHT 3 class Tower { uint8_t height; Shader *towerShader; unsigned int VAO, VBO; unsigned int texture; const float vertices[36*5] = { TOWER_LEFT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 0.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_LEFT, 1.0f, 0.0f, TOWER_RIGHT, TOWER_TOP, TOWER_LEFT, 1.0f, 1.0f, TOWER_RIGHT, TOWER_TOP, TOWER_LEFT, 1.0f, 1.0f, TOWER_LEFT, TOWER_TOP, TOWER_LEFT, 0.0f, 1.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 0.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_RIGHT, 0.0f, 0.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_RIGHT, 1.0f, 0.0f, TOWER_RIGHT, TOWER_TOP, TOWER_RIGHT, 1.0f, 1.0f, TOWER_RIGHT, TOWER_TOP, TOWER_RIGHT, 1.0f, 1.0f, TOWER_LEFT, TOWER_TOP, TOWER_RIGHT, 0.0f, 1.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_RIGHT, 0.0f, 0.0f, TOWER_LEFT, TOWER_TOP, TOWER_RIGHT, 1.0f, 0.0f, TOWER_LEFT, TOWER_TOP, TOWER_LEFT, 1.0f, 1.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 1.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 1.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_RIGHT, 0.0f, 0.0f, TOWER_LEFT, TOWER_TOP, TOWER_RIGHT, 1.0f, 0.0f, TOWER_RIGHT, TOWER_TOP, TOWER_RIGHT, 1.0f, 0.0f, TOWER_RIGHT, TOWER_TOP, TOWER_LEFT, 1.0f, 1.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 1.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 1.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_RIGHT, 0.0f, 0.0f, TOWER_RIGHT, TOWER_TOP, TOWER_RIGHT, 1.0f, 0.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 1.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_LEFT, 1.0f, 1.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_RIGHT, 1.0f, 0.0f, TOWER_RIGHT, TOWER_BOTTOM, TOWER_RIGHT, 1.0f, 0.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_RIGHT, 0.0f, 0.0f, TOWER_LEFT, TOWER_BOTTOM, TOWER_LEFT, 0.0f, 1.0f, TOWER_LEFT, TOWER_TOP, TOWER_LEFT, 0.0f, 1.0f, TOWER_RIGHT, TOWER_TOP, TOWER_LEFT, 1.0f, 1.0f, TOWER_RIGHT, TOWER_TOP, TOWER_RIGHT, 1.0f, 0.0f, TOWER_RIGHT, TOWER_TOP, TOWER_RIGHT, 1.0f, 0.0f, TOWER_LEFT, TOWER_TOP, TOWER_RIGHT, 0.0f, 0.0f, TOWER_LEFT, TOWER_TOP, TOWER_LEFT, 0.0f, 1.0f }; public: Tower(void) { height = 0; towerShader = new Shader("shaders/shader.vs", "shaders/shader.fs"); glGenBuffers(1, &(VBO)); glGenVertexArrays(1, &(VAO)); // 1. bind Vertex Array Object glBindVertexArray(VAO); // 2. copy our vertices array in a buffer for OpenGL to use glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); // 4. then set our vertex attributes pointers glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 5*sizeof(float), (void*)0); glEnableVertexAttribArray(0); glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5*sizeof(float), (void*)(3*sizeof(float))); glEnableVertexAttribArray(1); glGenTextures(1, &(texture)); glBindTexture(GL_TEXTURE_2D, texture); // set the texture wrapping/filtering options (on the currently bound texture object) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // load and generate the texture int width, height, nrChannels; unsigned char *data = stbi_load("textures/awesomeface.png", &width, &height, &nrChannels, 0); if (data) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); glGenerateMipmap(GL_TEXTURE_2D); } stbi_image_free(data); } uint8_t getHeight(void) { return height; } void incrementHeight(void) { height += (height < MAX_HEIGHT) ? 1 : 0; } void drawTower(glm::mat4 model, glm::mat4 view, glm::mat4 projection) { // Nothing to do if height is zero if(!height) return; glActiveTexture(GL_TEXTURE0); switch(height) { case 1: case 2: case 3: glBindTexture(GL_TEXTURE_2D, texture); towerShader->use(); towerShader->setMat4("model", model); towerShader->setMat4("view", view); towerShader->setMat4("projection", projection); break; default: break; } glBindVertexArray(VAO); glDrawArrays(GL_TRIANGLES, 0, 36); } }; #endif
[ "kgkilla@ubuntu.ubuntu-domain" ]
kgkilla@ubuntu.ubuntu-domain
21445e99e4503a7b48aa3a6b6008a5d33e2c52aa
8547ea878165c354c305da3bca70e832bbc407dc
/include/mnist.hpp
a9d1740dada602d89063e0524a4901126883e319
[]
no_license
rmeno12/cuda-toy
cfa3c7f726575425a997c697c60f16a67aedc0cd
bdbfd4f7e04813b6e728080a9f2eeef4c3a7c5ca
refs/heads/master
2023-07-19T04:50:54.296336
2021-08-25T20:17:06
2021-08-25T20:17:06
376,163,727
2
0
null
null
null
null
UTF-8
C++
false
false
615
hpp
#ifndef MNIST_HPP #define MNIST_HPP #include <string> #include <tuple> #include <vector> #include "matrix.hpp" #define NUM_TRAINING 10000 #define NUM_TEST 100 class Mnist { private: Matrix* training_images[NUM_TRAINING]; Matrix* training_labels[NUM_TRAINING]; Matrix* test_images[NUM_TEST]; Matrix* test_labels[NUM_TEST]; std::vector<char> read_bytes(std::string filename); void read_training(std::string filename); public: Mnist(std::string); const std::tuple<Matrix, Matrix> get_training_batch( size_t batch_size = 64) const; static void printImage(const Matrix& img); }; #endif
[ "menonrahul02@gmail.com" ]
menonrahul02@gmail.com
d72174a6e65bebb56f2f9de88d6e17aed7893274
fb5f814932dc64f0415f07e9a3a256d6f7a74f7a
/src/code/Console/RowSection.cpp
e3e6476b2750fc540ec7edf0123b979c18db01eb
[]
no_license
emilisb/OOP-3
3adec242c8368b6d2abefc83a390d9227047576a
f18315ff393e04df848271c864cb050401f33d19
refs/heads/master
2020-05-19T14:40:09.339177
2019-05-21T21:10:37
2019-05-21T21:10:37
185,064,935
0
0
null
2019-05-05T19:47:49
2019-05-05T18:00:06
C++
UTF-8
C++
false
false
180
cpp
// // RowSection.cpp // Uzduotis 2 // // Created by Emilis Baliukonis on 22/02/2019. // Copyright © 2019 Emilis Baliukonis. All rights reserved. // #include "RowSection.hpp"
[ "emilisb@wix.com" ]
emilisb@wix.com
3e833d4ee091b3a36747a79adc9c717d2154b276
7823a181fcaa21f0ef7cd1e02924d1c1f11e8e26
/MarchingCubes/float3x3.cpp
7980be7317a1ebab37b6c5c1b9becdfc018c3e62
[]
no_license
barakianc/CSCI580_MarchingCubes
96b3c5b43da2fc688cea8e16b5a848b32ad2820f
91c6c291315210bd1e78a364e0c054d3f9c6e390
refs/heads/master
2021-01-25T07:40:14.381446
2013-03-18T07:52:31
2013-03-18T07:52:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,876
cpp
#include "float3x3.h" float3x3::float3x3() { memset((void*)m, 0, sizeof(double) * 9); m[0] = m[4] = m[8] = 1.0f; } float3x3::float3x3(double t[]) { m[0] = t[0]; m[1] = t[1]; m[2] = t[2]; m[3] = t[3]; m[4] = t[4]; m[5] = t[5]; m[6] = t[6]; m[7] = t[7]; m[8] = t[8]; } float3x3::float3x3(double m0, double m1, double m2, double m3, double m4, double m5, double m6, double m7, double m8) { m[0] = m0; m[1] = m1; m[2] = m2; m[3] = m3; m[4] = m4; m[5] = m5; m[6] = m6; m[7] = m7; m[8] = m8; } float3x3::~float3x3() { } void float3x3::FillMat(float3x3 matrix) { m[0] = matrix.m[0]; m[1] = matrix.m[1]; m[2] = matrix.m[2]; m[3] = matrix.m[3]; m[4] = matrix.m[4]; m[5] = matrix.m[5]; m[6] = matrix.m[6]; m[7] = matrix.m[7]; m[8] = matrix.m[8]; } void float3x3::FillMat(double m0, double m1, double m2, double m3, double m4, double m5, double m6, double m7, double m8) { m[0] = m0; m[1] = m1; m[2] = m2; m[3] = m3; m[4] = m4; m[5] = m5; m[6] = m6; m[7] = m7; m[8] = m8; } void float3x3::Print() { cout << "[0 3 6] "; cout << m[0] << " " << m[3] << " " << m[6] << endl; cout << "[1 4 7] "; cout << m[1] << " " << m[4] << " " << m[7] << endl; cout << "[2 5 8] "; cout << m[2] << " " << m[5] << " " << m[8] << endl; } bool float3x3::operator==(float3x3 mat2) { for(size_t i=0; i < 16; i++) { if(m[i] != mat2.m[i]) return false; } return true; } void float3x3::operator=(float3x3 mat2) { memcpy(m,mat2.m,sizeof(float)*9); } float3x3 float3x3::operator+(float3x3 mat2) { float3x3 ret; ret.m[0] += mat2.m[0]; ret.m[1] += mat2.m[1]; ret.m[2] += mat2.m[2]; ret.m[3] += mat2.m[3]; ret.m[4] += mat2.m[4]; ret.m[5] += mat2.m[5]; ret.m[6] += mat2.m[6]; ret.m[7] += mat2.m[7]; ret.m[8] += mat2.m[8]; return ret; } float3x3 float3x3::operator-(float3x3 mat2) { float3x3 ret; for(int i=0; i<9; i++) { ret.m[i] = m[i] - mat2.m[i]; } return ret; } float3x3 float3x3::operator*(float3x3 mat2) { float3x3 t; t.m[0] = m[0]*mat2.m[0] + m[3]*mat2.m[1] + m[6]*mat2.m[2]; t.m[1] = m[1]*mat2.m[0] + m[4]*mat2.m[1] + m[7]*mat2.m[2]; t.m[2] = m[2]*mat2.m[0] + m[5]*mat2.m[1] + m[8]*mat2.m[2]; t.m[3] = m[0]*mat2.m[3] + m[3]*mat2.m[4] + m[6]*mat2.m[5]; t.m[4] = m[1]*mat2.m[3] + m[4]*mat2.m[4] + m[7]*mat2.m[5]; t.m[5] = m[2]*mat2.m[3] + m[5]*mat2.m[4] + m[8]*mat2.m[5]; t.m[6] = m[0]*mat2.m[6] + m[3]*mat2.m[7] + m[6]*mat2.m[8]; t.m[7] = m[1]*mat2.m[6] + m[4]*mat2.m[7] + m[7]*mat2.m[8]; t.m[8] = m[2]*mat2.m[6] + m[5]*mat2.m[7] + m[8]*mat2.m[8]; return t; } float3x3 float3x3::operator*(double scalar) { float3x3 ret = m; for(int i=0; i<9; i++) ret.m[i] = m[i] * scalar; return ret; } Vector3 float3x3::operator*(Vector3 v) { Vector3 r; r.x = (float)(m[0]*v.x + m[3]*v.y + m[6]*v.z); r.y = (float)(m[1]*v.x + m[4]*v.y + m[7]*v.z); r.z = (float)(m[2]*v.x + m[5]*v.y + m[8]*v.z); return r; } Vector2 float3x3::operator*(Vector2 v) { Vector2 r; r.x = (float)(m[0]*v.x + m[3]*v.y + m[6]); r.y = (float)(m[1]*v.x + m[4]*v.y + m[7]); return r; } float3x3 float3x3::Adjoint() { float3x3 t; return t; } float3x3 float3x3::Transpose() { float3x3 t; t.m[0] = m[0]; t.m[1] = m[3]; t.m[2] = m[6]; t.m[3] = m[1]; t.m[4] = m[4]; t.m[5] = m[7]; t.m[6] = m[2]; t.m[7] = m[5]; t.m[8] = m[8]; return t; } float3x3 float3x3::Inverse() { /*float3x3 ret = float3x3(m); double detInv = 1.0 / determinant(); ret = ret * detInv; return ret;*/ float3x3 rot = float3x3(m[0],m[3],0, m[1],m[4],0, 0,0,1); float3x3 tran= float3x3(1,0,0, 0,1,0, -1.0f * m[6],-1.0f * m[7],1); return rot * tran; /*// | a11 a12 a13 |-1 | a33a22-a32a23 -(a33a12-a32a13) a23a12-a22a13 | // | a21 a22 a23 | = 1/DET * | -(a33a21-a31a23) a33a11-a31a13 -(a23a11-a21a13) | // | a31 a32 a33 | | a32a21-a31a22 -(a32a11-a31a12) a22a11-a21a12 | double detInv = 1.0 / determinant(); float3x3 ret; ret.m[0] = m[8]*m[5] - m[5]*m[7]; ret.m[1] = -(m[8]*m[1] - m[2]*m[7]); ret.m[2] = m[5]*m[1] - m[2]*m[4]; ret.m[3] = -(m[8]*m[3] - m[5]*m[6]); ret.m[4] = m[8]*m[0] - m[2]*m[6]; ret.m[5] = -(m[5]*m[0] - m[2]*m[3]); ret.m[6] = m[7]*m[3] - m[4]*m[6]; ret.m[7] = -(m[7]*m[0] - m[1]*m[6]); ret.m[8] = m[4]*m[0] - m[1]*m[3]; return ret * detInv;*/ } inline double float3x3::Determinant2x2(double m[]) { return (m[0]*m[3]) - (m[1]*m[2]); } double float3x3::Determinant() { double det1 = 0; double det2 = 0; double det3 = 0; double mat2x2[4]; mat2x2[0] = m[4]; mat2x2[2] = m[7]; mat2x2[1] = m[5]; mat2x2[3] = m[8]; det1 = (Determinant2x2(mat2x2) * m[0]); mat2x2[0] = m[1]; mat2x2[2] = m[7]; mat2x2[1] = m[2]; mat2x2[3] = m[8]; det2 = (Determinant2x2(mat2x2) * m[3]); mat2x2[0] = m[1]; mat2x2[2] = m[4]; mat2x2[1] = m[2]; mat2x2[3] = m[5]; det3 = (Determinant2x2(mat2x2) * m[6]); return det1 - det2 + det3; } float3x3 float3x3::Identity() { return float3x3(); } float3x3 float3x3::Scale(double x, double y) { return float3x3(m); } float3x3 float3x3::Scale(Vector2 v) { return float3x3(m); } float3x3 float3x3::SetTranslation(double x, double y) { /*float3x3 ret = float3x3(m); ret.m[6] = x; ret.m[7] = y;*/ m[6] = x; m[7] = y; return *this; } float3x3 float3x3::SetTranslation(Vector2 v) { /*float3x3 ret = float3x3(m); ret.m[6] = v.x; ret.m[7] = v.y;*/ m[6] = v.x; m[7] = v.y; return *this; } float3x3 float3x3::SetTranslation(Vector3 v) { /*float3x3 ret; ret.FillMat(m); ret.m[6] = v.x; ret.m[7] = v.y;*/ m[6] = v.x; m[7] = v.y; return *this; } float3x3 float3x3::SetRotation(double angle) { float3x3 ret; ret.FillMat(m); double s = sin(angle); double c = cos(angle); ret.m[0] = c; ret.m[3] = s; ret.m[1] = -s; ret.m[4] = c; return ret; } Vector2 float3x3::GetTranslation() { return Vector2((float)m[6], (float)m[7]); } /*Vector2 float3x3::GetRotation() { }*/
[ "barakianc@gmail.com" ]
barakianc@gmail.com
a49c87f2fcb9405e279e8d2a9e87a19c441eb84a
e1cc4c1ea56c575deff8e53a9c192208f094e79e
/deviceDetection/pattern/Provider.cpp
e100c680329e0b6701abce2fb7992946c85239c0
[]
no_license
whatvn/php7-51degrees
4a5dd17390a79af4b2aa921bc5e4d4c3726ef6a7
492040377ee5a497f2c788f4e764f46eb1e2ce21
refs/heads/master
2020-06-16T18:46:52.180483
2017-11-20T12:52:22
2017-11-20T12:52:22
75,074,776
3
1
null
2017-08-15T08:14:48
2016-11-29T11:26:41
C++
UTF-8
C++
false
false
30,944
cpp
/* ********************************************************************* * This Source Code Form is copyright of 51Degrees Mobile Experts Limited. * Copyright 2015 51Degrees Mobile Experts Limited, 5 Charlotte Close, * Caversham, Reading, Berkshire, United Kingdom RG4 7BY * * This Source Code Form is the subject of the following patent * applications, owned by 51Degrees Mobile Experts Limited of 5 Charlotte * Close, Caversham, Reading, Berkshire, United Kingdom RG4 7BY: * European Patent Application No. 13192291.6; and * United States Patent Application Nos. 14/085,223 and 14/085,301. * * 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/. * * This Source Code Form is "Incompatible With Secondary Licenses", as * defined by the Mozilla Public License, v. 2.0. ********************************************************************** */ #include "Provider.hpp" #include <iostream> #include <phpcpp.h> #ifdef HTTP_HEADERS_PREFIXED #define GET_HTTP_HEADER_NAME(d,i) \ fiftyoneDegreesGetPrefixedUpperHttpHeaderName(d, i) #else #define GET_HTTP_HEADER_NAME(d,i) i >= 0 && i < d->httpHeadersCount ? \ (d->httpHeaders + i)->headerName : NULL #endif using namespace std; /** * Constructs a new instance of Provider for the file provided. All properties * supported by the source data file are available to query in Match instances * created by the Provider. * @param fileName of the data source */ Provider::Provider(const string &fileName) { init(fileName, FIFTYONEDEGREESPROVIDER_CACHE_SIZE, FIFTYONEDEGREESPROVIDER_POOL_SIZE); } /** * Constructs a new instance of Provider for the file provided. The properties * provided are available to query in Match instances created by the Provider. * @param fileName of the data source * @param propertyString contains comma seperated property names to be available * to query from associated match results. */ Provider::Provider(const string &fileName, const string &propertyString) { init(fileName, propertyString, FIFTYONEDEGREESPROVIDER_CACHE_SIZE, FIFTYONEDEGREESPROVIDER_POOL_SIZE); } /** * Constructs a new instance of Provider for the file provided. The properties * provided are available to query in Match instances created by the Provider. * @param fileName of the data source * @param propertiesArray array of property names to be available to query from * the associated match results. */ Provider::Provider(const string &fileName, vector<string> &propertiesArray) { init(fileName, propertiesArray, FIFTYONEDEGREESPROVIDER_CACHE_SIZE, FIFTYONEDEGREESPROVIDER_POOL_SIZE); } /** * Constructs a new instance of Provider for the file provided. The properties * provided are available to query in Match instances created by the Provider. * @param fileName of the data source * @param propertyString contains comma seperated property names to be available * to query from associated match results. * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ Provider::Provider( const string &fileName, const string &propertyString, int cacheSize, int poolSize) { init(fileName, propertyString, cacheSize, poolSize); } /** * Constructs a new instance of Provider for the file provided. The properties * provided are available to query in Match instances created by the Provider. * @param fileName of the data source * @param propertyString contains comma seperated property names to be available * to query from associated match results. * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ Provider::Provider( const string &fileName, vector<string> &propertiesArray, int cacheSize, int poolSize) { init(fileName, propertiesArray, cacheSize, poolSize); } /** * Constructs a new instance of Provider for the file provided. All properties * supported by the source data file are available to query in Match instances * created by the Provider. * @param fileName of the data source * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ Provider::Provider(const string &fileName, int cacheSize, int poolSize) { init(fileName, cacheSize, poolSize); } /** * Frees the memory used by the Provider including the cache, pool and dataset. */ Provider::~Provider() { fiftyoneDegreesProviderFree(&provider); } /** * Initialises the Provider. * This method should not be called as it is part of the internal logic. * @param fileName of the data source * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ void Provider::init(const string &fileName, int cacheSize, int poolSize) { fiftyoneDegreesDataSetInitStatus status = fiftyoneDegreesInitProviderWithPropertyString( fileName.c_str(), &provider, NULL, poolSize, cacheSize); initComplete(status, fileName); } /** * Initialises the Provider. * This method should not be called as it is part of the internal logic. * @param fileName of the data source * @param propertyString contains comma seperated property names to be available * to query from associated match results. * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ void Provider::init( const string &fileName, const string &propertyString, int cacheSize, int poolSize) { fiftyoneDegreesDataSetInitStatus status = fiftyoneDegreesInitProviderWithPropertyString( fileName.c_str(), &provider, propertyString.c_str(), poolSize, cacheSize); initComplete(status, fileName); } /** * Initialises the Provider. * This method should not be called as it is part of the internal logic. * @param fileName of the data source * @param propertiesArray array of property names to be available to query from * the associated match results. * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ void Provider::init( const string &fileName, vector<string> &propertiesArray, int cacheSize, int poolSize) { fiftyoneDegreesDataSetInitStatus status; const char **properties = new const char*[propertiesArray.size()]; if (properties != NULL) { for (unsigned int index = 0; index < propertiesArray.size(); index++) { properties[index] = propertiesArray[index].c_str(); } status = fiftyoneDegreesInitProviderWithPropertyArray( fileName.c_str(), &provider, properties, (int) propertiesArray.size(), poolSize, cacheSize); initComplete(status, fileName); delete properties; } } /** * Completes the process of initialising the provider by either freeing memory * if the data set could be create, or initialising dependent data structures. * This method should not be called as it is part of the internal logic. * @param initStatus the status returned from the call to create the data set * @param fileName of the data source * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ void Provider::initComplete( fiftyoneDegreesDataSetInitStatus initStatus, const string &fileName) { if (initStatus != DATA_SET_INIT_STATUS_SUCCESS) { initException(initStatus, fileName); } else { initAvailableproperties(); initHttpHeaders(); } } /** * Checks the initialisation status result and throws a C++ exception if the * result is anything other than success. The text of the exception can be used * by the high level language to provide a message to the user. * This method should not be called as it is part of the internal logic. * @param initStatus status enum value * @param fileName of the data source */ void Provider::initException( fiftyoneDegreesDataSetInitStatus initStatus, const string &fileName) { stringstream message; switch (initStatus) { case DATA_SET_INIT_STATUS_SUCCESS: break; case DATA_SET_INIT_STATUS_INSUFFICIENT_MEMORY: throw runtime_error("Insufficient memory allocated."); break; case DATA_SET_INIT_STATUS_CORRUPT_DATA: throw runtime_error("The data was not in the correct format. Check " "the data file is uncompressed."); break; case DATA_SET_INIT_STATUS_INCORRECT_VERSION: throw runtime_error("The data is an unsupported version. Check you " "have the latest data and API. " + fileName); break; case DATA_SET_INIT_STATUS_FILE_NOT_FOUND: message << "The data file '" << fileName << "' could not be found. " "Check the file path and that the program has sufficient read " "permissions."; throw invalid_argument(message.str()); break; case DATA_SET_INIT_STATUS_NULL_POINTER: throw runtime_error("Null pointer to the existing dataset or memory" " location."); break; case DATA_SET_INIT_STATUS_POINTER_OUT_OF_BOUNDS: throw runtime_error("Allocated continuous memory containing " "51Degrees data file appears to be smaller than expected. Most" " likely because the data file was not fully loaded into the " "allocated memory."); break; default: case DATA_SET_INIT_STATUS_NOT_SET: throw runtime_error("Could not create data set from file."); break; } } /** * Populates the httpHeaders vectors for the Provider. The HTTP_HEADERS_PREFIXED * definition can be used to force the Provider to use HTTP_ prefixed upper * case header name keys. Perl and PHP are examples of such languages where this * directive is required. * This method should not be called as it is part of the internal logic. */ void Provider::initHttpHeaders() { for (int httpHeaderIndex = 0; httpHeaderIndex < provider.activePool->dataSet->httpHeadersCount; httpHeaderIndex++) { httpHeaders.insert( httpHeaders.end(), string(GET_HTTP_HEADER_NAME(provider.activePool->dataSet, httpHeaderIndex))); } } /** * Populates the availableProperties vector with all properties available in * source data set. This may return fewer properties than the number requested * at construction where the data set source file does not contain details * of the property name requested. * This method should not be called as it is part of the internal logic. */ void Provider::initAvailableproperties() { const fiftyoneDegreesAsciiString *propertyName; for (int requiredPropetyIndex = 0; requiredPropetyIndex < provider.activePool->dataSet->requiredPropertyCount; requiredPropetyIndex++) { propertyName = fiftyoneDegreesGetString( provider.activePool->dataSet, provider.activePool->dataSet->requiredProperties[requiredPropetyIndex]->nameOffset); availableProperties.insert( availableProperties.end(), string(&propertyName->firstByte)); } } /** * Initialises a new match instance for the provider ready to perform device * detection. * This method should not be called as it is part of the internal logic. */ void Provider::initMatch(Match *match) { match->ws = fiftyoneDegreesProviderWorksetGet(&this->provider); } /** * @returns a list of HTTP headers device detection considers are important. */ vector<string> Provider::getHttpHeaders() { return httpHeaders; } /** * @returns a list of the properties Match instances created from the Provider * can return. */ vector<string> Provider::getAvailableProperties() { return availableProperties; } /** * @returns the name of the data set used contained in the source file. */ string Provider::getDataSetName() { string result; result.assign(&fiftyoneDegreesGetString( provider.activePool->dataSet, provider.activePool->dataSet->header.nameOffset)->firstByte); return result; } /** * @returns the version format of the data file and API. */ string Provider::getDataSetFormat() { string result; result.assign(&fiftyoneDegreesGetString( provider.activePool->dataSet, provider.activePool->dataSet->header.formatOffset)->firstByte); return result; } /** * @returns the date that 51Degrees published the data file. */ string Provider::getDataSetPublishedDate() { stringstream stream; stream << provider.activePool->dataSet->header.published.year << "-" << (int) provider.activePool->dataSet->header.published.month << "-" << (int) provider.activePool->dataSet->header.published.day; return stream.str(); } /** * @returns the date that 51Degrees will publish an updated data file. */ string Provider::getDataSetNextUpdateDate() { stringstream stream; stream << provider.activePool->dataSet->header.nextUpdate.year << "-" << (int) provider.activePool->dataSet->header.nextUpdate.month << "-" << (int) provider.activePool->dataSet->header.nextUpdate.day; return stream.str(); } /** * @returns the number of Signatures the data set contains. */ int Provider::getDataSetSignatureCount() { return provider.activePool->dataSet->header.signatures.count; } /** * @returns the number of device combinations the data set contains. */ int Provider::getDataSetDeviceCombinations() { return provider.activePool->dataSet->header.deviceCombinations; } /** * Using the HTTP header name and values pairs sets the detected device * information in the workset provided. * @param ws instance of a workset to use for the match * @param headers name and value pairs to use for device detection */ void Provider::matchForHttpHeaders( fiftyoneDegreesWorkset *ws, const map<string, string> *headers) { int dataSetHeaderIndex = 0; const char *httpHeaderName = GET_HTTP_HEADER_NAME( provider.activePool->dataSet, dataSetHeaderIndex); ws->importantHeadersCount = 0; while (httpHeaderName != NULL) { map<string, string>::const_iterator httpHeaderValue = headers->find(string(httpHeaderName)); if (httpHeaderValue != headers->end()) { ws->importantHeaders[ws->importantHeadersCount].header = ws->dataSet->httpHeaders + dataSetHeaderIndex; ws->importantHeaders[ws->importantHeadersCount].headerValue = httpHeaderValue->second.c_str(); ws->importantHeaders[ws->importantHeadersCount].headerValueLength = (int) httpHeaderValue->second.length(); ws->importantHeadersCount++; } dataSetHeaderIndex++; httpHeaderName = GET_HTTP_HEADER_NAME(provider.activePool->dataSet, dataSetHeaderIndex); } fiftyoneDegreesMatchForHttpHeaders(ws); } /** * Completes the result map with all properties supported by the Provider and * their values for the detection results contained in the workset provided. * This method should not be called as it is part of the internal logic. * @param ws instance of a workset configured with the results of the match * @param result to place the properties and values */ void Provider::buildArray( fiftyoneDegreesWorkset *ws, map<string, vector<string> > *result) { string *propertyName; vector<string> *values; int propertyIndex, valueIndex; for (propertyIndex = 0; propertyIndex < ws->dataSet->requiredPropertyCount; propertyIndex++) { if (fiftyoneDegreesSetValues(ws, propertyIndex) > 0) { propertyName = new string(fiftyoneDegreesGetPropertyName( ws->dataSet, *(ws->dataSet->requiredProperties + propertyIndex))); values = &(result->operator[](*propertyName)); for (valueIndex = 0; valueIndex < ws->valuesCount; valueIndex++) { vector<string>::iterator it = values->end(); string value = string((const char*) &fiftyoneDegreesGetString( ws->dataSet, ws->values[valueIndex]->nameOffset)->firstByte); values->insert(it, value); } } } } /** * Completes device detection for the User-Agent provided. * @param User-Agent whose results need to be obtained * @returns new Match instance configured to provide access to the results */ Match* Provider::getMatch(const char* userAgent) { Match *result = new Match(); initMatch(result); fiftyoneDegreesMatch(result->ws, userAgent); return result; } /** * Completes device detection for the User-Agent provided. * @param User-Agent whose results need to be obtained * @returns new Match instance configured to provide access to the results */ Match* Provider::getMatch(const string& userAgent) { return getMatch(userAgent.c_str()); } /** * Completes device detection for the User-Agent provided. * @param headers HTTP headers to use to detect the device and return a match * @returns new Match instance configured to provide access to the results */ Match* Provider::getMatch(const map<string, string>& headers) { Match *result = new Match(); initMatch(result); matchForHttpHeaders(result->ws, &headers); return result; } Match* Provider::getMatchForHttpHeaders(const map<string, string>& headers) { Match *result = new Match(); initMatch(result); matchForHttpHeaders(result->ws, &headers); return result; } /** * Completes device detection for the User-Agent provided. * @param User-Agent whose results need to be obtained * @returns a Map and values array containing all the properties available */ map<string, vector<string> >& Provider::getMatchMap(const char *userAgent) { map<string, vector<string> > *result = new map<string, vector<string> >(); fiftyoneDegreesWorkset *ws = fiftyoneDegreesProviderWorksetGet(&provider); fiftyoneDegreesMatch(ws, userAgent); buildArray(ws, result); fiftyoneDegreesWorksetRelease(ws); return *result; } /** * Completes device detection for the collection of HTTP headers provided. * @param User-Agent whose results need to be obtained * @returns a Map and values array containing all the properties available */ map<string, vector<string> >& Provider::getMatchMap(const string &userAgent) { return getMatchMap(userAgent.c_str()); } /** * Completes device detection for the collection of HTTP headers provided. * @param headers HTTP headers to use to detect the device and return a match * @returns a Map and values array containing all the properties available */ map<string, vector<string> >& Provider::getMatchMap( const map<string, string> &headers) { map<string, vector<string> > *result = new map<string, vector<string> >(); fiftyoneDegreesWorkset *ws = fiftyoneDegreesProviderWorksetGet(&provider); matchForHttpHeaders(ws, &headers); buildArray(ws, result); fiftyoneDegreesWorksetRelease(ws); return *result; } /** * Returns a JSON string containing all available properties for the User-Agent. * @param User-Agent whose results need to be obtained * @returns a JSON string with property and value pairs */ string Provider::getMatchJson(const char* userAgent) { string result; fiftyoneDegreesWorkset *ws = fiftyoneDegreesProviderWorksetGet(&provider); fiftyoneDegreesMatch(ws, userAgent); char *json = fiftyoneDegreesJSONCreate(ws); fiftyoneDegreesProcessDeviceJSON(ws, json); result.assign(json); fiftyoneDegreesJSONFree(json); fiftyoneDegreesWorksetRelease(ws); return result; } /** * Returns a JSON string containing all available properties for the User-Agent. * @param User-Agent whose results need to be obtained * @returns a JSON string with property and value pairs */ string Provider::getMatchJson(const string& userAgent) { return getMatchJson(userAgent.c_str()); } /** * Returns a JSON string containing all available properties for the HTTP header * pairs. * @param headers HTTP headers to use to detect the device and return JSON * @returns a JSON string with property and value pairs */ string Provider::getMatchJson(const map<string, string>& headers) { string result; fiftyoneDegreesWorkset *ws = fiftyoneDegreesProviderWorksetGet(&provider); char *json = fiftyoneDegreesJSONCreate(ws); matchForHttpHeaders(ws, &headers); fiftyoneDegreesProcessDeviceJSON(ws, json); result.assign(json); fiftyoneDegreesJSONFree(json); fiftyoneDegreesWorksetRelease(ws); return result; } /** * Completes device detection for the device id provided. * @param device id used for the match * @returns new Match instance configured to provide access to the results */ Match* Provider::getMatchForDeviceId(const char *deviceId) { Match *result = new Match(); initMatch(result); fiftyoneDegreesMatchForDeviceId(result->ws, deviceId); return result; } /** * Completes device detection for the device id provided. * @param device id used for the match * @returns new Match instance configured to provide access to the results */ Match* Provider::getMatchForDeviceId(const string& deviceId) { return getMatchForDeviceId(deviceId.c_str()); } /** * Finds all profiles in the data set which contain the property * value pair provided. * @param propertyName used to search the profiles. * @param valueName used to search the profiles. * @returns new Profiles instance configured to provide access to the results. */ Profiles* Provider::findProfiles(const char *propertyName, const char *valueName) { Profiles *profiles = new Profiles(); profiles->profiles = fiftyoneDegreesFindProfiles(provider.activePool->dataSet, propertyName, valueName); return profiles; } /** * Finds all profiles in the data set which contain the property * value pair provided. * @param propertyName used to search the profiles. * @param valueName used to search the profiles. * @returns new Profiles instance configured to provide access to the results. */ Profiles* Provider::findProfiles(const string &propertyName, const string &valueName) { return findProfiles(propertyName.c_str(), valueName.c_str()); } /** * Finds all profiles within the provided Profiles object which contain * the property value pair provided. * @param propertyName used to search the profiles. * @param valueName used to search the profiles. * @param profiles object to perform the search in. * @returns new Profiles instance configured to provide access to the results. */ Profiles* Provider::findProfiles(const char *propertyName, const char *valueName, Profiles *profiles) { Profiles *returnprofiles = new Profiles(); returnprofiles->profiles = fiftyoneDegreesFindProfilesInProfiles(provider.activePool->dataSet, propertyName, valueName, profiles->profiles); return returnprofiles; } /** * Finds all profiles within the provided Profiles object which contain * the property value pair provided. * @param propertyName used to search the profiles. * @param valueName used to search the profiles. * @param profiles object to perform the search in. * @returns new Profiles instance configured to provide access to the results. */ Profiles* Provider::findProfiles(const string &propertyName, const string &valueName, Profiles *profiles) { return findProfiles(propertyName.c_str(), valueName.c_str(), profiles); } /** * Initiates the data set reload process from the same file location that was * used to create the current dataset. New dataset will be initialised with * exactly the same set of properties, cache size and number of worksets in * the workset pool. * * Function is not thread safe. */ void Provider::reloadFromFile() { fiftyoneDegreesProviderReloadFromFile(&provider); } /** * Initiates the data set reload process from the memory location supplied. * New dataset will be initialised with exactly the same set of properties. * * Function is not thread safe. * @param source pointer to the dataset in memory. * @param length of the dataset in memory. */ void Provider::reloadFromMemory(const char *source, int length) { fiftyoneDegreesProviderReloadFromMemory(&provider, (void*) source, (long) length); } /** * Initiates the data set reload process from the memory location supplied. * New dataset will be initialised with exactly the same set of properties. * * Function is not thread safe. * @param source pointer to the dataset in memory. * @param length of the dataset in memory. */ void Provider::reloadFromMemory(const string &source, int length) { reloadFromMemory(source.c_str(), length); } /** * Returns the number of times the cache fetch has found what it's * looking for. * @returns int number of cache hits. */ int Provider::getCacheHits() { return provider.activePool->cache->hits; } /** * Returns the number of times the cache fetch has not found what it's * looking for. The cache fetch function is called a second time to insert * a value that was not found. * @returns int number of cache misses. */ int Provider::getCacheMisses() { return provider.activePool->cache->misses; } /** * Return the maximum number of iterations a cache fetch could take to find * a match. This is the depth of the binary tree. */ int Provider::getCacheMaxIterations() { return provider.activePool->cache->maxIterations; } // The section below is entirely for testing purposes and is not written // for use in a production environment. // The actual size allocated for the provider. static int64_t _actualSize; /** * Overrides the malloc function so that the size being allocated can be * added up. * @param size to allocate in memory. * @returns void* pointer to the memory allocated. */ static void *validateMalloc(size_t __size) { _actualSize += (int64_t) __size; return malloc(__size); } /** * Modified constructor for the provider. If validate is true, then the * calculated value of the memory needed is compared to the actual amount * of memory allocated for the provider and an error thrown if the value is * too low. * * This function is used when testing the getProviderSize funtion and is NOT * THREAD SAFE as it accesses a static variable. For this reason it SHOULD * NOT BE USED IN PRODUCTION. * @param fileName of the data source * @param propertyString contains comma seperated property names to be available * to query from associated match results. * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ Provider::Provider( const string &fileName, const string &propertyString, int cacheSize, int poolSize, bool validate) { stringstream message; int64_t difference; if (validate == true) { // Get the difference between the calculated memory needed and the actual // memory userd. difference = initWithValidate(fileName, propertyString, cacheSize, poolSize); // If the calculated memory is less than the actual memory then throw // an error. // Note: this will always be a slight overestimate as calculating the // exact number of unique HTTP headers requires reading in the data // file. For this reason the maximum is used. if (difference < 0) { message << "Predicted memory usage is below the actual usage by " << (0 - difference) << " bytes."; throw runtime_error(message.str()); } } else { // Validate is false so divert to the standard constructor. Provider(fileName, propertyString, cacheSize, poolSize); } } /** * Modified provider init function. This uses the standard init function, * but uses a modified malloc function to determine the size. It also uses * the getProviderSize function to get the estimated size and return the * difference. * * This function is NOT THREAD SAFE so should be used appropriately. * @param fileName of the data source * @param propertyString contains comma seperated property names to be available * to query from associated match results. * @param cacheSize the number of prior User-Agent detections to cache * @param poolSize the maximum number of worksets to create for the pool */ int64_t Provider::initWithValidate( const string &fileName, const string &propertyString, int cacheSize, int poolSize) { int64_t predictedSize; // Reset the actual size parameter as it is global and may have been set // before. _actualSize = 0; // Use the getProviderSize function to get the predicted size that the // provider will need. predictedSize = (int64_t) fiftyoneDegreesGetProviderSizeWithPropertyString(fileName.c_str(), propertyString.c_str(), poolSize, cacheSize); // Set the malloc function to use the function that increments _actualSize // by the amount being allocated. fiftyoneDegreesMalloc = validateMalloc; // Use the standard init function to initialise the provider. This is the // same function used by the standard constructor, however every memory // allocation will be counted using the validateMalloc function. init(fileName, propertyString, cacheSize, poolSize); // Revert the malloc function so that future calls do not use the // validateMalloc function. fiftyoneDegreesMalloc = malloc; // Return the difference between the predicted and actual sizes. A positive // number is an overestimate, and a negative number is an underestimate. return predictedSize - _actualSize; }
[ "hungnv@opensource.com.vn" ]
hungnv@opensource.com.vn
5929f58ce5bcd797ea72f5b88078341171314637
612325535126eaddebc230d8c27af095c8e5cc2f
/src/net/filter/filter_source_stream_test_util.h
68e01bb28262391374b24d55f14041f95afee6b7
[ "BSD-3-Clause" ]
permissive
TrellixVulnTeam/proto-quic_1V94
1a3a03ac7a08a494b3d4e9857b24bb8f2c2cd673
feee14d96ee95313f236e0f0e3ff7719246c84f7
refs/heads/master
2023-04-01T14:36:53.888576
2019-10-17T02:23:04
2019-10-17T02:23:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
765
h
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_FILTER_FILTER_SOURCE_STREAM_TEST_UTIL_H_ #define NET_FILTER_FILTER_SOURCE_STREAM_TEST_UTIL_H_ #include <stddef.h> namespace net { // Compress |source| with length |source_len| using gzip. Write output into // |dest|, and output length into |dest_len|. If |gzip_framing| is true, header // will be added. void CompressGzip(const char* source, size_t source_len, char* dest, size_t* dest_len, bool gzip_framing); } // namespace net #endif // NET_FILTER_FILTER_SOURCE_STREAM_TEST_UTIL_H_
[ "2100639007@qq.com" ]
2100639007@qq.com
ab2208646a561f3e0e8bd8f2b101784d62da7930
9399ec3eb00b048b5a952dcc949b865b82b41f33
/algorithms/others/BinarySearch.cpp
02ca43b8466165c26fa088a0abc65dd694fe257e
[]
no_license
CrashedBboy/leetcode
3c7c9c885cbee7e3c10e7dfc648de74db748bc82
dacdc11e06a7de8f800999eee410173f8a93d994
refs/heads/master
2021-11-08T12:35:00.086370
2021-10-12T15:44:02
2021-10-12T15:44:02
245,770,766
4
3
null
null
null
null
UTF-8
C++
false
false
658
cpp
#include <iostream> #include <vector> using namespace std; bool BinarySearch(vector<int>& nums, int x) { int left = 0, right = nums.size()-1; while (left <= right) { cout << "left: " << left << ", right: " << right << endl; int mid = left + (right-left) / 2; if (nums[mid] == x) { return true; } else if (nums[mid] > x) { right = mid - 1; } else if (nums[mid] < x) { left = mid + 1; } } return false; } int main () { vector<int> inputs = {22, 33, 34, 35, 47, 56, 73, 123}; cout << BinarySearch(inputs, 22); return 0; }
[ "crashedbboy@gmail.com" ]
crashedbboy@gmail.com
c2175445daa6ff16351b67aaff7d7f707067c507
b0e5b1f107d29df3fd896b89b8a421987ed808e8
/examples/common/include/simple_interface.hpp
b04a8afc3ad464274f5330bb685869170e7d9d30
[ "BSD-2-Clause" ]
permissive
huangyaling/caffe_boost
5c35ad34501a8fd32933d97083d1019ddcee1fbc
5d043bbb003074f2583a90cf5f307028389cd1d5
refs/heads/master
2020-12-15T09:43:38.563818
2020-01-20T09:35:58
2020-01-20T09:35:58
235,001,329
0
0
BSD-2-Clause
2020-01-20T02:14:11
2020-01-20T02:14:11
null
UTF-8
C++
false
false
3,205
hpp
/* All modification made by Cambricon Corporation: © 2019 Cambricon Corporation All rights reserved. All other contributions: Copyright (c) 2014--2019, the respective contributors All rights reserved. For the list of contributors go to https://github.com/BVLC/caffe/blob/master/CONTRIBUTORS.md 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 following disclaimer. * 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. * Neither the name of Intel Corporation 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 OWNER 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. */ #ifndef EXAMPLES_COMMON_INCLUDE_SIMPLE_INTERFACE_HPP_ #define EXAMPLES_COMMON_INCLUDE_SIMPLE_INTERFACE_HPP_ #include <vector> #include <string> #include <queue> #include <chrono> // NOLINT #include <iostream> #include "cnrt.h" // NOLINT using std::vector; using std::string; class SimpleInterface { public: static SimpleInterface& getInstance(); void setFlag(bool b) {flag_ = b;} bool getFlag() {return flag_;} void loadOfflinemodel(const string& offlinemodel, const vector<int>& deviceIds, const bool& channel_dup); vector<cnrtRuntimeContext_t> get_runtime_contexts() {return dev_runtime_contexts_;} void destroyRuntimeContext(); public: // 4 threads of data providers static const int data_provider_num_ = 4; // 4 threads of thread pool static const int thread_num = 4; private: SimpleInterface(); ~SimpleInterface() = default; SimpleInterface(const SimpleInterface&) = delete; SimpleInterface& operator=(const SimpleInterface&) = delete; SimpleInterface(SimpleInterface&&) = delete; SimpleInterface& operator=(SimpleInterface&&) = delete; void prepareRuntimeContext(cnrtRuntimeContext_t *ctx, cnrtFunction_t function, int deviceId, const bool& channel_dup); private: bool flag_; uint64_t stack_size_; cnrtModel_t model_; vector<cnrtRuntimeContext_t> dev_runtime_contexts_; }; #endif // EXAMPLES_COMMON_INCLUDE_SIMPLE_INTERFACE_HPP_
[ "952287954@qq.com" ]
952287954@qq.com
734ff89a8dea6e165121ea93d48403a15e5a6835
f88cd16b1252c4ed6583b619d749d26125621d75
/machine.h
03cef285304788feec49ca2581cce09176bf378b
[]
no_license
lr10z/cst229_lab1
31783c2090c40d72d479e3214bec681e355687fa
a8660a211f8f23de31721a0259959f6b5c191dfd
refs/heads/master
2021-01-23T12:48:16.164112
2015-03-27T22:21:43
2015-03-27T22:21:43
33,011,435
0
0
null
null
null
null
UTF-8
C++
false
false
1,834
h
/*********************************************************** * Author: Leander Rodriguez * Date Created: 02/10/14 * Last Modification Date: 02/16/14 * Lab Number: CST 229 Lab 1 * Filename: machine.h * ************************************************************/ #ifndef MACHINE_H #define MACHINE_H #include <map> #include <set> #include <string> #include <vector> #include <fstream> #include <sstream> #include <iostream> #include <iterator> #include <algorithm> using namespace std; /************************************************************************ * Class: cDFA * * Constructors: * cDFA() * Reads in file name, opens file, stores file data, calls Machine(), * and displays Machine()'s results. * * Mutators: * bool Machine() * Determines if the user input is an acceptable string and returns * if it is acceptable or not acceptable. * * Methods: * const void ParseLine() const; * This method parses lines read in from input file and stores the * parsed values. * *************************************************************************/ class cDFA { public: // Default Constructor cDFA(const string &docFileName); // Determines whether the user input is an acceptable string bool Machine(const string& input); private: string m_startState, // machine starting state m_currentState; // current state of machine vector<string> m_states, // holds all machine states m_language, // holds the acceptable alphabet letters m_finalState; // holds all final machine states map<string, map<string, string>> m_transitions; // holds the machine states and transition functions // Parses line from file and stores it const void ParseLine(vector<string>& currentV, const string& line) const; }; #endif
[ "lr10@me.com" ]
lr10@me.com
ec32ade4e79f09a6c9dac2b26ab805dcf1803e2a
cf4ed97d519efcc5329a48b331a2f41a99d067e9
/4th-semester/daa-praktikum/strahil_in_labirinth.cpp
a4e841e8131911df8e9344ee8099c2c03dae3192
[]
no_license
tborisova/homeworks
6a186420f036ab175231e97d6c01021d7e2b7ce5
dc08d7b360b1337ece567deae66ad265fd83dd3e
refs/heads/master
2021-03-27T15:41:32.735565
2020-05-17T15:43:59
2020-05-17T15:43:59
25,862,294
0
0
null
null
null
null
UTF-8
C++
false
false
1,695
cpp
#include <iostream> #include <cstdio> using namespace std; #define MAXM 1000 #define MAXN 1000 struct point { int x, y, dist; point(int _x = 0, int _y = 0, int _dist = 0) { x = _x; y = _y; dist = _dist; } bool operator==(const point& other) const { return x == other.x && y == other.y; } bool operator!=(const point& other) const { return x != other.x && y != other.y; } }; bool visited[MAXN][MAXM]; char board[MAXN][MAXM]; int m, n, maxp = 0; int new_x = 0, new_y = 0; void printInput(){ for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cout << board[i][j]; } cout << endl; } } int dfs(point k){ if(k.dist > maxp){ maxp = k.dist; new_x = k.x; new_y = k.y; } int dx[4] = {0,0,1,-1}; int dy[4] = {1,-1,0,0}; for(int i = 0; i < 4; i++){ int nx = dx[i] + k.x; int ny = dy[i] + k.y; if(nx >= 0 && nx < n && ny >= 0 && ny < m && !visited[nx][ny] && board[nx][ny] != '#' ){ visited[nx][ny] = true; dfs(point(nx, ny, k.dist + 1)); // visited[nx][ny] = false; } } return maxp; } int main(){ string line; bool found = false; cin >> m >> n; for(int i = 0; i < n; i++){ cin >> line; for(int j = 0; j < m; j++){ board[i][j] = line[j]; } } int i, j; for(i = 0; i < n;i++){ for(j = 0; j < m; j++){ if(board[i][j] != '#'){ found = true; break; } } if(found) break; } dfs(point(i, j, 0)); if(i != new_x && j != new_y){ cout << dfs(point(new_x, new_y, 0)) << endl; }else{ cout << maxp << endl; } }
[ "ts.borisova3@gmail.com" ]
ts.borisova3@gmail.com
e5db685169dc2d589f6e0702335c8be4f6f9bd28
cfe59c0813abe2c5352f79f965bcb2994a4b9da4
/src/kernel/terminal.cpp
bf759cea301a8a3d02aaeb36382226617430f557
[ "MIT" ]
permissive
gkanwar/gullfoss-os
e29ca6ec7a3f039ac26027f623c9647424f1f23c
94b1735f19924243103fead740d257df4c0fa4b8
refs/heads/master
2023-06-01T21:21:28.872663
2021-06-20T16:52:16
2021-06-20T16:52:16
278,782,350
0
0
null
null
null
null
UTF-8
C++
false
false
742
cpp
#include "terminal.h" #include "util.h" void FBTerminal::putc_at(char c, lsize_t row, lsize_t col) { putc_at(c, fg_color, row, col); } void FBTerminal::putc_at(char c, pixel_t fg_color, lsize_t row, lsize_t col) { uint16_t ucs_char = (uint16_t)c; const uint8_t* glyph = font.to_glyph(ucs_char); pixel_t* base = framebuffer->buffer + row*charheight*framebuffer->scanline/sizeof(pixel_t) + col*charwidth; for (unsigned glyph_r = 0; glyph_r < charheight; ++glyph_r, base += framebuffer->scanline/sizeof(pixel_t)) { for (unsigned i = 0; i < charwidth; ++i) { if (util::get_bit(glyph[glyph_r], charwidth-i)) { base[i] = fg_color; } else { base[i] = bg_color; } } } }
[ "gurtej@mit.edu" ]
gurtej@mit.edu
2d81933d42d3c3011fc088f35543454ec3392191
4d508e0bd33dfc2134485ed19692d0c75dc05d67
/src/HOI4World/PlaneDesigns/PlaneModulesTests.cpp
02fbde977156d7759f908e9fc550b5a913119d28
[ "MIT" ]
permissive
ParadoxGameConverters/Vic2ToHoI4
4f97a00eb989d45cf7c4c460a884273aceab3a46
518bdc4542eb9e2f3a6f4eb02659ef4d67fabb22
refs/heads/master
2023-08-17T15:20:41.599432
2023-08-12T01:31:06
2023-08-12T01:31:06
160,988,154
33
45
MIT
2023-09-04T23:13:34
2018-12-08T23:37:24
C++
UTF-8
C++
false
false
1,118
cpp
#include "external/common_items/external/googletest/googletest/include/gtest/gtest.h" #include "src/HOI4World/PlaneDesigns/PlaneModules.h" #include <sstream> TEST(HoI4World_PlaneDesigns_PlaneModulesTests, ModulesDefaultToEmpty) { std::stringstream input; input << ""; HoI4::PlaneModules the_plane_modules(input); std::stringstream output; output << the_plane_modules; std::stringstream expected_output; expected_output << "\t\tmodules = {\n"; expected_output << "\t\t}\n"; EXPECT_EQ(expected_output.str(), output.str()); } TEST(HoI4World_PlaneDesigns_PlaneModulesTests, ModulesCanBeInput) { std::stringstream input; input << "= {\n"; input << "\tmodule_slot1 = module1\n"; input << "\tmodule_slot2 = module2\n"; input << "}"; HoI4::PlaneModules the_plane_modules(input); std::stringstream output; output << the_plane_modules; std::stringstream expected_output; expected_output << "\t\tmodules = {\n"; expected_output << "\t\t\tmodule_slot1 = module1\n"; expected_output << "\t\t\tmodule_slot2 = module2\n"; expected_output << "\t\t}\n"; EXPECT_EQ(expected_output.str(), output.str()); }
[ "noreply@github.com" ]
noreply@github.com
bbfcd318e27a66ec600f9ed3efc5648125645854
b87f052fdbc8266ef228ec1b3fbb849f41d27b76
/print_string.cpp
61132abefe32b3f8fc7214e9746c992c57597fed
[]
no_license
preetimaurya1992/programming_practise_interview_question_set3
6989fe2ce0f5c9097c0aff653c40cf883e2cc19a
07ab377cc440a8555677c664b295db812b76f1ed
refs/heads/master
2023-07-09T06:03:50.603107
2021-08-29T15:10:31
2021-08-29T15:10:31
400,423,173
0
0
null
2021-08-29T15:10:32
2021-08-27T07:18:36
C++
UTF-8
C++
false
false
211
cpp
//4. Write a Program to print a string. #include<bits/stdc++.h> using namespace std; int main(){ string s; cout<<"enter the string"<<endl; cin>>s; //getline(cin,s); cout<<s<<endl;; return 0; }
[ "preetimaurya3344@gmail.com" ]
preetimaurya3344@gmail.com
5c9ecd191f10978832004f550ad6f87707ccf2d9
bde250a5bd97435abf0ffa505ba3da1f129720d8
/ds/src/ntdsa/ldap/globals.hxx
bd64cd12e668145fd48824d4842fe96abb408396
[]
no_license
KernelPanic-OpenSource/Win2K3_NT_ds
f45afd1a1243e42a8ccb489048f4a73946dad99f
0d97393773ee5ecdc29aae15023492e383f7ee7f
refs/heads/master
2023-04-04T00:34:51.876505
2021-04-14T04:49:28
2021-04-14T04:49:28
357,774,650
1
0
null
null
null
null
UTF-8
C++
false
false
6,610
hxx
/*++ Copyright (C) Microsoft Corporation, 1997 - 1999 Module Name: globals.hxx Abstract: Global data used by NT5 LDAP server Author: Johnson Apacible (JohnsonA) 13-Nov-1997 --*/ #ifndef _GLOBALS_HXX_ #define _GLOBALS_HXX_ #include <fileno.h> #define FILENO FILENO_LDAP_GLOBALS // // Globals // extern LONG CurrentConnections; extern LONG MaxCurrentConnections; extern LONG UncountedConnections; extern LONG ActiveLdapConnObjects; extern USHORT LdapBuildNo; extern CRITICAL_SECTION csConnectionsListLock; extern LIST_ENTRY ActiveConnectionsList; extern CRITICAL_SECTION PagedBlobLock; extern LIST_ENTRY PagedBlobListHead; extern CRITICAL_SECTION LdapUdpEndpointLock; extern DWORD LdapConnMaxAlloc; extern DWORD LdapConnAlloc; extern DWORD LdapRequestAlloc; extern DWORD LdapRequestMaxAlloc; extern DWORD LdapConnCached; extern DWORD LdapRequestsCached; extern DWORD LdapBlockCacheLimit; extern DWORD LdapBufferAllocs; extern LARGE_INTEGER LdapFrequencyConstant; extern CRITICAL_SECTION LdapSslLock; // // limits // // Define as "C" so *.c in dsamain\src can reference and link. extern "C" { // limits exported to user extern DWORD LdapAtqMaxPoolThreads; extern DWORD LdapMaxDatagramRecv; extern DWORD LdapMaxReceiveBuffer; extern DWORD LdapInitRecvTimeout; extern DWORD LdapMaxConnections; extern DWORD LdapMaxConnIdleTime; extern DWORD LdapMaxPageSize; extern DWORD LdapMaxQueryDuration; extern DWORD LdapMaxTempTable; extern DWORD LdapMaxResultSet; extern DWORD LdapMaxNotifications; extern DWORD LdapMaxValRange; // limits NOT exported to user extern DWORD LdapMaxDatagramSend; extern DWORD LdapMaxReplSize; } extern CRITICAL_SECTION LdapLimitsLock; extern LIMIT_BLOCK KnownLimits[]; // // Lower limits on the ldap policy limits // #define LIMIT_LOW_MAX_POOL_THREADS (2) #define LIMIT_LOW_MAX_DATAGRAM_RECV (512) #define LIMIT_LOW_MAX_RECEIVE_BUF (10240) #define LIMIT_LOW_INIT_RECV_TIMEOUT (20) #define LIMIT_LOW_MAX_CONNECTIONS (10) #define LIMIT_LOW_MAX_CONN_IDLE (60) #define LIMIT_LOW_MAX_ACTIVE_QUERIES (4) #define LIMIT_LOW_MAX_PAGE_SIZE (2) #define LIMIT_LOW_MAX_QUERY_DURATION (10) #define LIMIT_LOW_MAX_TEMP_TABLE_SIZE (100) #define LIMIT_LOW_MAX_RESULT_SET_SIZE (1024) #define LIMIT_LOW_MAX_NOTIFY_PER_CONN (3) #define LIMIT_LOW_MAX_VAL_RANGE (30) extern LIMITS_NOTIFY_BLOCK LimitsNotifyBlock[]; // // Configurable Settings // extern LIMIT_BLOCK KnownConfSets[]; // // Lower/higher limits on the TTL configurable settings // #define LIMIT_LOW_DYNAMIC_OBJECT_TTL (1) // 1 second #define LIMIT_HIGH_DYNAMIC_OBJECT_TTL (31557600) // 1 true year // // Send queue related limits. // #define LDAP_MAX_UNAUTH_UNACKED_SEND_DATA (500*1024) #define LDAP_MAX_UNAUTH_UNACKED_SENDS (15) #define LDAP_UNACKED_SEND_DATA_WARN ((LONG)LdapMaxReceiveBuffer * 2) #define LDAP_MAX_CONN_UNACKED_SEND_DATA (LDAP_UNACKED_SEND_DATA_WARN + (3 * (1024 * 1024))) #define LDAP_NUM_UNACKED_SENDS_WARN (400) #define LDAP_MAX_CONN_NUM_UNACKED_SENDS (LDAP_NUM_UNACKED_SENDS_WARN + 100) #define LDAP_MAX_GLOBAL_UNACKED_SEND_DATA (LDAP_UNACKED_SEND_DATA_WARN * 100) #define LDAP_MAX_GLOBAL_NUM_UNACKED_SENDS (LDAP_MAX_CONN_NUM_UNACKED_SENDS * 100) #define LDAP_SEND_QUEUE_RECOVER_NUM (100) extern CRITICAL_SECTION LdapSendQueueRecoveryLock; // // Handle to plain text security provider // extern CredHandle hCredential; extern CredHandle hNtlmCredential; extern CredHandle hDpaCredential; extern CredHandle hGssCredential; extern CredHandle hSslCredential; extern CredHandle hDigestCredential; extern BOOL fhCredential; extern BOOL fhNtlmCredential; extern BOOL fhDpaCredential; extern BOOL fhGssCredential; extern BOOL fhSslCredential; extern BOOL fhDigestCredential; extern AttributeVals LdapAttrCache; extern LDAP_ATTRVAL_CACHE KnownControlCache; extern LDAP_ATTRVAL_CACHE KnownLimitsCache; extern LDAP_ATTRVAL_CACHE KnownConfSetsCache; extern LDAP_ATTRVAL_CACHE LdapVersionCache; extern LDAP_ATTRVAL_CACHE LdapSaslSupported; extern LDAP_ATTRVAL_CACHE LdapCapabilitiesCache; extern LDAP_ATTRVAL_CACHE KnownExtendedRequestsCache; // // Misc // extern BOOL LdapStarted; extern BOOL fBypassLimitsChecks; extern PIP_SEC_LIST LdapDenyList; extern GUID gCheckSum_serverGUID; extern LDAPOID KnownExtendedRequests[]; extern HANDLE LdapRetrySem; // // TTL // extern ATTRTYP gTTLAttrType; // // Ldap comments // PCHAR LdapComments[]; enum _LDAP_COMMENTS { LdapDecodeError, LdapEncodeError, LdapJetError, LdapDsaException, LdapBadVersion, LdapBadName, LdapAscErr, LdapBadAuth, LdapBadControl, LdapBadFilter, LdapBadRootDse, LdapBadConv, LdapUdpDenied, LdapGcDenied, LdapBadNotification, LdapTooManySearches, LdapCannotLeaveOldRdn, LdapBindAllowOne, LdapNoRebindOnSeal, LdapNoRebindOnActiveNotifications, LdapUnknownExtendedRequestOID, LdapTLSAlreadyActive, LdapSSLInitError, LdapNoSigningSealingOverTLS, LdapNoTLSCreds, LdapExtendedReqestDecodeError, LdapServerBusy, LdapConnectionTimedOut, LdapServerResourcesLow, LdapNetworkError, LdapDecryptFailed, LdapNoPendingRequestsAtStartTLS, LdapFilterDecodeErr, LdapBadAttrDescList, LdapControlsDecodeErr, LdapBadFastBind, LdapNoSignSealFastBind, LdapIntegrityRequired, LdapPrivacyRequired, LdapBadEncryptTransition, LdapClientBehindOnReceives, LdapClientTooBehindOnReceives, LdapNoFastBindOnBoundConnection, LdapMustAuthenticateForThisOp, LdapAuthzErr, LdapDigestUriErr }; // // routines // BOOL InitializeGlobals( VOID ); VOID DestroyGlobals( VOID ); PLDAP_CONN AllocNewConnection( IN BOOL fSkipCount, OUT LPBOOL pfMaxExceeded ); VOID CloseConnections( VOID ); PLDAP_CONN FindUserData ( DWORD hClient ); VOID ReleaseUserData ( PLDAP_CONN pLdapConn ); // // inlines // inline PVOID LdapAlloc( IN DWORD Size ) { PVOID p; p = LocalAlloc(0, Size); IF_DEBUG(WARNING) { if ( p != NULL ) { InterlockedIncrement((PLONG)&LdapBufferAllocs); } } return p; } // LdapAlloc inline VOID LdapFree( IN PVOID Buffer ) { if ( Buffer != NULL ) { HLOCAL local; IF_DEBUG(WARNING) { InterlockedDecrement((PLONG)&LdapBufferAllocs); } local = LocalFree(Buffer); Assert(local == NULL); } } // LdapFree #undef FILENO #endif // _GLOBALS_HXX_
[ "polarisdp@gmail.com" ]
polarisdp@gmail.com
c76b69ff6a777ccbb02c96f96803944ac9237a9e
2dc9ab0ec71fd31900173fb15a6f2c85753180c4
/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics_test.cc
e46eb8bf76c9d3e169cf4253c22b17c4f8b000b4
[ "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "GPL-1.0-or-later", "GPL-2.0-only", "LGPL-2.0-only", "BSD-2-Clause", "LicenseRef-scancode-other-copyleft", "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
Forilan/chromium
ec337c30d23c22d11fbdf814a40b9b4c26000d78
562b20b68672e7831054ec8f160d5f7ae940eae4
refs/heads/master
2023-02-28T02:43:17.744240
2020-05-12T02:23:44
2020-05-12T02:23:44
231,539,724
0
0
BSD-3-Clause
2020-05-12T02:23:45
2020-01-03T07:52:37
null
UTF-8
C++
false
false
25,897
cc
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/input/event_handler.h" #include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h" #include "third_party/blink/renderer/core/testing/sim/sim_request.h" #include "third_party/blink/renderer/core/testing/sim/sim_test.h" #include "third_party/blink/renderer/platform/testing/histogram_tester.h" #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h" namespace blink { namespace { using test::RunPendingTasks; class TextFragmentAnchorMetricsTest : public SimTest { public: void SetUp() override { SimTest::SetUp(); WebView().MainFrameWidget()->Resize(WebSize(800, 600)); } void RunAsyncMatchingTasks() { auto* scheduler = ThreadScheduler::Current()->GetWebMainThreadSchedulerForTest(); blink::scheduler::RunIdleTasksForTesting(scheduler, base::BindOnce([]() {})); RunPendingTasks(); } void SimulateClick(int x, int y) { WebMouseEvent event(WebInputEvent::Type::kMouseDown, gfx::PointF(x, y), gfx::PointF(x, y), WebPointerProperties::Button::kLeft, 0, WebInputEvent::Modifiers::kLeftButtonDown, base::TimeTicks::Now()); event.SetFrameScale(1); GetDocument().GetFrame()->GetEventHandler().HandleMousePressEvent(event); } void BeginEmptyFrame() { // If a test case doesn't find a match and therefore doesn't schedule the // beforematch event, we should still render a second frame as if we did // schedule the event to retain test coverage. // When the beforematch event is not scheduled, a DCHECK will fail on // BeginFrame() because no event was scheduled, so we schedule an empty task // here. GetDocument().EnqueueAnimationFrameTask(WTF::Bind([]() {})); Compositor().BeginFrame(); } HistogramTester histogram_tester_; }; // Test UMA metrics collection TEST_F(TextFragmentAnchorMetricsTest, UMAMetricsCollected) { SimRequest request("https://example.com/test.html#:~:text=test&text=cat", "text/html"); LoadURL("https://example.com/test.html#:~:text=test&text=cat"); request.Complete(R"HTML( <!DOCTYPE html> <style> body { height: 1200px; } p { position: absolute; top: 1000px; } </style> <p>This is a test page</p> <p>With ambiguous test content</p> )HTML"); RunAsyncMatchingTasks(); // Render two frames to handle the async step added by the beforematch event. Compositor().BeginFrame(); BeginEmptyFrame(); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.SelectorCount", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.SelectorCount", 2, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.MatchRate", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.MatchRate", 50, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.AmbiguousMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.AmbiguousMatch", 1, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ScrollCancelled", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.ScrollCancelled", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.DidScrollIntoView", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.DidScrollIntoView", 1, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TimeToScrollIntoView", 1); } // Test UMA metrics collection when there is no match found TEST_F(TextFragmentAnchorMetricsTest, NoMatchFound) { SimRequest request("https://example.com/test.html#:~:text=cat", "text/html"); LoadURL("https://example.com/test.html#:~:text=cat"); request.Complete(R"HTML( <!DOCTYPE html> <style> body { height: 1200px; } p { position: absolute; top: 1000px; } </style> <p>This is a test page</p> )HTML"); RunAsyncMatchingTasks(); // Render two frames to handle the async step added by the beforematch event. Compositor().BeginFrame(); BeginEmptyFrame(); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.SelectorCount", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.SelectorCount", 1, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.MatchRate", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.MatchRate", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.AmbiguousMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.AmbiguousMatch", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ScrollCancelled", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.ScrollCancelled", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.DidScrollIntoView", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TimeToScrollIntoView", 0); } // Test that we don't collect any metrics when there is no text directive TEST_F(TextFragmentAnchorMetricsTest, NoTextFragmentAnchor) { SimRequest request("https://example.com/test.html", "text/html"); LoadURL("https://example.com/test.html"); request.Complete(R"HTML( <!DOCTYPE html> <p>This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.SelectorCount", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.MatchRate", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.AmbiguousMatch", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ScrollCancelled", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.DidScrollIntoView", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TimeToScrollIntoView", 0); } // Test that the correct metrics are collected when we found a match but didn't // need to scroll. TEST_F(TextFragmentAnchorMetricsTest, MatchFoundNoScroll) { SimRequest request("https://example.com/test.html#:~:text=test", "text/html"); LoadURL("https://example.com/test.html#:~:text=test"); request.Complete(R"HTML( <!DOCTYPE html> <p>This is a test page</p> )HTML"); RunAsyncMatchingTasks(); // Render two frames to handle the async step added by the beforematch event. Compositor().BeginFrame(); BeginEmptyFrame(); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.SelectorCount", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.SelectorCount", 1, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.MatchRate", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.MatchRate", 100, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.AmbiguousMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.AmbiguousMatch", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ScrollCancelled", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.ScrollCancelled", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.DidScrollIntoView", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.DidScrollIntoView", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TimeToScrollIntoView", 1); } // Test that the ScrollCancelled metric gets reported when a user scroll cancels // the scroll into view. TEST_F(TextFragmentAnchorMetricsTest, ScrollCancelled) { // This test isn't relevant with this flag enabled. When it's enabled, // there's no way to block rendering and the fragment is installed and // invoked as soon as parsing finishes which means the user cannot scroll // before this point. ScopedBlockHTMLParserOnStyleSheetsForTest block_parser(false); SimRequest request("https://example.com/test.html#:~:text=test", "text/html"); SimSubresourceRequest css_request("https://example.com/test.css", "text/css"); LoadURL("https://example.com/test.html#:~:text=test"); request.Complete(R"HTML( <!DOCTYPE html> <style> body { height: 1200px; } p { position: absolute; top: 1000px; visibility: hidden; } </style> <link rel=stylesheet href=test.css> <p>This is a test page</p> )HTML"); Compositor().PaintFrame(); GetDocument().View()->LayoutViewport()->ScrollBy( ScrollOffset(0, 100), mojom::blink::ScrollType::kUser); // Set the target text to visible and change its position to cause a layout // and invoke the fragment anchor. css_request.Complete("p { visibility: visible; top: 1001px; }"); RunAsyncMatchingTasks(); // Render two frames to handle the async step added by the beforematch event. Compositor().BeginFrame(); BeginEmptyFrame(); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.SelectorCount", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.SelectorCount", 1, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.MatchRate", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.MatchRate", 100, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.AmbiguousMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.AmbiguousMatch", 0, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ScrollCancelled", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.ScrollCancelled", 1, 1); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.DidScrollIntoView", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TimeToScrollIntoView", 0); } // Test that the TapToDismiss feature gets use counted when the user taps to // dismiss the text highlight TEST_F(TextFragmentAnchorMetricsTest, TapToDismiss) { SimRequest request("https://example.com/test.html#:~:text=test%20page", "text/html"); LoadURL("https://example.com/test.html#:~:text=test%20page"); request.Complete(R"HTML( <!DOCTYPE html> <style> body { height: 2200px; } p { position: absolute; top: 1000px; } </style> <p>This is a test page</p> )HTML"); RunAsyncMatchingTasks(); // Render two frames to handle the async step added by the beforematch event. Compositor().BeginFrame(); BeginEmptyFrame(); EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kTextFragmentAnchor)); EXPECT_TRUE( GetDocument().IsUseCounted(WebFeature::kTextFragmentAnchorMatchFound)); EXPECT_FALSE( GetDocument().IsUseCounted(WebFeature::kTextFragmentAnchorTapToDismiss)); SimulateClick(100, 100); EXPECT_TRUE( GetDocument().IsUseCounted(WebFeature::kTextFragmentAnchorTapToDismiss)); } // Test counting cases where the fragment directive fails to parse. TEST_F(TextFragmentAnchorMetricsTest, InvalidFragmentDirective) { const int kUncounted = 0; const int kCounted = 1; Vector<std::pair<String, int>> test_cases = { {"", kUncounted}, {"#element", kUncounted}, {"#doesntExist", kUncounted}, {"#:~:element", kCounted}, {"#element:~:", kCounted}, {"#foo:~:bar", kCounted}, {"#:~:utext=foo", kCounted}, {"#:~:text=foo", kUncounted}, {"#:~:text=foo&invalid", kUncounted}, {"#foo:~:text=foo", kUncounted}}; for (auto test_case : test_cases) { String url = "https://example.com/test.html" + test_case.first; SimRequest request(url, "text/html"); LoadURL(url); request.Complete(R"HTML( <!DOCTYPE html> <p id="element">This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch // event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); bool is_use_counted = GetDocument().IsUseCounted(WebFeature::kInvalidFragmentDirective); if (test_case.second == kCounted) { EXPECT_TRUE(is_use_counted) << "Expected invalid directive in case: " << test_case.first; } else { EXPECT_FALSE(is_use_counted) << "Expected valid directive in case: " << test_case.first; } } } class TextFragmentRelatedMetricTest : public TextFragmentAnchorMetricsTest, public testing::WithParamInterface<bool> { public: TextFragmentRelatedMetricTest() : text_fragment_anchors_state_(GetParam()) {} private: ScopedTextFragmentIdentifiersForTest text_fragment_anchors_state_; }; // These tests will run with and without the TextFragmentIdentifiers feature // enabled to ensure we collect metrics correctly under both situations. INSTANTIATE_TEST_SUITE_P(All, TextFragmentRelatedMetricTest, testing::Values(false, true)); // Test that we correctly track failed vs. successful element-id lookups. We // only count these in cases where we don't have a text directive, when the REF // is enabled. TEST_P(TextFragmentRelatedMetricTest, ElementIdSuccessFailureCounts) { const int kUncounted = 0; const int kFound = 1; const int kNotFound = 2; // When the TextFragmentAnchors feature is on, we should avoid counting the // result of the element-id fragment if a text directive is successfully // parsed. If the feature is off we treat the text directive as an element-id // and should count the result. const int kUncountedOrNotFound = GetParam() ? kUncounted : kNotFound; const int kUncountedOrFound = GetParam() ? kUncounted : kFound; // When the TextFragmentAnchors feature is on, we'll strip the fragment // directive (i.e. anything after :~:) leaving just the element anchor. const int kFoundIfDirectiveStripped = GetParam() ? kFound : kNotFound; Vector<std::pair<String, int>> test_cases = { {"", kUncounted}, {"#element", kFound}, {"#doesntExist", kNotFound}, {"#element:~:foo", kFoundIfDirectiveStripped}, {"#doesntexist:~:foo", kNotFound}, {"##element", kNotFound}, {"#element:~:text=doesntexist", kUncountedOrNotFound}, {"#element:~:text=page", kUncountedOrNotFound}, {"#:~:text=doesntexist", kUncountedOrNotFound}, {"#:~:text=page", kUncountedOrNotFound}, {"#:~:text=name", kUncountedOrFound}, {"#element:~:text=name", kUncountedOrFound}}; const int kNotFoundSample = 0; const int kFoundSample = 1; const std::string histogram = "TextFragmentAnchor.ElementIdFragmentFound"; // Add counts to each histogram so that calls to GetBucketCount won't fail // due to not finding the histogram. UMA_HISTOGRAM_BOOLEAN(histogram, true); UMA_HISTOGRAM_BOOLEAN(histogram, false); int expected_found_count = 1; int expected_not_found_count = 1; for (auto test_case : test_cases) { String url = "https://example.com/test.html" + test_case.first; SimRequest request(url, "text/html"); LoadURL(url); request.Complete(R"HTML( <!DOCTYPE html> <p id="element">This is a test page</p> <p id=":~:text=name">This is a test page</p> <p id="element:~:text=name">This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch // event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); auto not_found_count = histogram_tester_.GetBucketCount(histogram, kNotFoundSample); auto found_count = histogram_tester_.GetBucketCount(histogram, kFoundSample); int result = test_case.second; if (result == kFound) { ++expected_found_count; ASSERT_EQ(expected_found_count, found_count) << "ElementId should have been |Found| but did not UseCount on case: " << test_case.first; ASSERT_EQ(expected_not_found_count, not_found_count) << "ElementId should have been |Found| but reported |NotFound| on " "case: " << test_case.first; } else if (result == kNotFound) { ++expected_not_found_count; ASSERT_EQ(expected_not_found_count, not_found_count) << "ElementId should have been |NotFound| but did not UseCount on " "case: " << test_case.first; ASSERT_EQ(expected_found_count, found_count) << "ElementId should have been |NotFound| but reported |Found| on " "case: " << test_case.first; } else { DCHECK_EQ(result, kUncounted); ASSERT_EQ(expected_found_count, found_count) << "Case should not have been counted but reported |Found| on case: " << test_case.first; ASSERT_EQ(expected_not_found_count, not_found_count) << "Case should not have been counted but reported |NotFound| on " "case: " << test_case.first; } } } // Test counting occurrences of ~&~ in the URL fragment. Used for potentially // using ~&~ as a delimiter. Can be removed once the feature ships. TEST_P(TextFragmentRelatedMetricTest, TildeAmpersandTildeUseCounter) { const int kUncounted = 0; const int kCounted = 1; Vector<std::pair<String, int>> test_cases = {{"", kUncounted}, {"#element", kUncounted}, {"#doesntExist", kUncounted}, {"#~&~element", kCounted}, {"#element~&~", kCounted}, {"#foo~&~bar", kCounted}, {"#foo~&~text=foo", kCounted}}; for (auto test_case : test_cases) { String url = "https://example.com/test.html" + test_case.first; SimRequest request(url, "text/html"); LoadURL(url); request.Complete(R"HTML( <!DOCTYPE html> <p id="element">This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch // event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); bool is_use_counted = GetDocument().IsUseCounted(WebFeature::kFragmentHasTildeAmpersandTilde); if (test_case.second == kCounted) { EXPECT_TRUE(is_use_counted) << "Expected to count ~&~ but didn't in case: " << test_case.first; } else { EXPECT_FALSE(is_use_counted) << "Expected not to count ~&~ but did in case: " << test_case.first; } } } // Test counting occurrences of ~@~ in the URL fragment. Used for potentially // using ~@~ as a delimiter. Can be removed once the feature ships. TEST_P(TextFragmentRelatedMetricTest, TildeAtTildeUseCounter) { const int kUncounted = 0; const int kCounted = 1; Vector<std::pair<String, int>> test_cases = {{"", kUncounted}, {"#element", kUncounted}, {"#doesntExist", kUncounted}, {"#~@~element", kCounted}, {"#element~@~", kCounted}, {"#foo~@~bar", kCounted}, {"#foo~@~text=foo", kCounted}}; for (auto test_case : test_cases) { String url = "https://example.com/test.html" + test_case.first; SimRequest request(url, "text/html"); LoadURL(url); request.Complete(R"HTML( <!DOCTYPE html> <p id="element">This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch // event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); bool is_use_counted = GetDocument().IsUseCounted(WebFeature::kFragmentHasTildeAtTilde); if (test_case.second == kCounted) { EXPECT_TRUE(is_use_counted) << "Expected to count ~@~ but didn't in case: " << test_case.first; } else { EXPECT_FALSE(is_use_counted) << "Expected not to count ~@~ but did in case: " << test_case.first; } } } // Test counting occurrences of &delimiter? in the URL fragment. Used for // potentially using &delimiter? as a delimiter. Can be removed once the // feature ships. TEST_P(TextFragmentRelatedMetricTest, AmpersandDelimiterQuestionUseCounter) { const int kUncounted = 0; const int kCounted = 1; Vector<std::pair<String, int>> test_cases = { {"", kUncounted}, {"#element", kUncounted}, {"#doesntExist", kUncounted}, {"#&delimiter?element", kCounted}, {"#element&delimiter?", kCounted}, {"#foo&delimiter?bar", kCounted}, {"#foo&delimiter?text=foo", kCounted}}; for (auto test_case : test_cases) { String url = "https://example.com/test.html" + test_case.first; SimRequest request(url, "text/html"); LoadURL(url); request.Complete(R"HTML( <!DOCTYPE html> <p id="element">This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch // event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); bool is_use_counted = GetDocument().IsUseCounted( WebFeature::kFragmentHasAmpersandDelimiterQuestion); if (test_case.second == kCounted) { EXPECT_TRUE(is_use_counted) << "Expected to count &delimiter? but didn't in case: " << test_case.first; } else { EXPECT_FALSE(is_use_counted) << "Expected not to count &delimiter? but did in case: " << test_case.first; } } } // Test counting occurrences of non-directive :~: in the URL fragment. Used to // ensure :~: is web-compatible; can be removed once the feature ships. TEST_P(TextFragmentRelatedMetricTest, NewDelimiterUseCounter) { const int kUncounted = 0; const int kCounted = 1; Vector<std::pair<String, int>> test_cases = {{"", kUncounted}, {"#element", kUncounted}, {"#doesntExist", kUncounted}, {"#:~:element", kCounted}, {"#element:~:", kCounted}, {"#foo:~:bar", kCounted}, {"#:~:utext=foo", kCounted}, {"#:~:text=foo", kUncounted}, {"#foo:~:text=foo", kUncounted}}; for (auto test_case : test_cases) { String url = "https://example.com/test.html" + test_case.first; SimRequest request(url, "text/html"); LoadURL(url); request.Complete(R"HTML( <!DOCTYPE html> <p id="element">This is a test page</p> )HTML"); // Render two frames to handle the async step added by the beforematch // event. Compositor().BeginFrame(); BeginEmptyFrame(); RunAsyncMatchingTasks(); bool is_use_counted = GetDocument().IsUseCounted(WebFeature::kFragmentHasColonTildeColon); if (test_case.second == kCounted) { EXPECT_TRUE(is_use_counted) << "Expected to count :~: but didn't in case: " << test_case.first; } else { EXPECT_FALSE(is_use_counted) << "Expected not to count :~: but did in case: " << test_case.first; } } } // Test use counting the location.fragmentDirective API TEST_P(TextFragmentRelatedMetricTest, TextFragmentAPIUseCounter) { SimRequest request("https://example.com/test.html", "text/html"); LoadURL("https://example.com/test.html"); request.Complete(R"HTML( <!DOCTYPE html> <script> var textFragmentsSupported = typeof(location.fragmentDirective) == "object"; </script> <p>This is a test page</p> )HTML"); Compositor().BeginFrame(); RunAsyncMatchingTasks(); bool text_fragments_enabled = GetParam(); EXPECT_EQ(text_fragments_enabled, GetDocument().IsUseCounted( WebFeature::kLocationFragmentDirectiveAccessed)); } // Test that simply activating a text fragment does not use count the API TEST_P(TextFragmentRelatedMetricTest, TextFragmentActivationDoesNotCountAPI) { SimRequest request("https://example.com/test.html#:~:text=test", "text/html"); LoadURL("https://example.com/test.html#:~:text=test"); request.Complete(R"HTML( <!DOCTYPE html> <p>This is a test page</p> )HTML"); Compositor().BeginFrame(); RunAsyncMatchingTasks(); bool text_fragments_enabled = GetParam(); EXPECT_EQ(text_fragments_enabled, GetDocument().IsUseCounted(WebFeature::kTextFragmentAnchor)); EXPECT_FALSE(GetDocument().IsUseCounted( WebFeature::kLocationFragmentDirectiveAccessed)); } } // namespace } // namespace blink
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
cd118f59a92651d3fd1183504e5aac31dc6dfe5f
5785f30d7c48d283f123a6c4b291c4dcdcde715f
/algorithm/cpp/474.cpp
629badd4257edf5bc73c79369ed3e90c60df0dc3
[]
no_license
beyanger/leetcode
925eb32fe02851aad0fd8f95f0ddf6495b13d9da
7b20536a900e7135e97cbe2ef7e581dae93c874c
refs/heads/master
2021-01-22T21:12:37.726492
2019-02-22T01:16:00
2019-02-22T01:16:00
85,403,391
0
0
null
null
null
null
UTF-8
C++
false
false
480
cpp
class Solution { public: int findMaxForm(vector<string>& strs, int m, int n) { vector<vector<int>> dp(m+1, vector<int>(n+1)); for (string& s : strs) { int cnt[2] = {}; for (char c : s) cnt[c-'0']++; for (int i = m, ii = m-cnt[0]; ii >= 0; i--, ii--) { for (int j = n, jj=n-cnt[1]; jj >= 0; j--, jj--) dp[i][j] = max(dp[i][j], dp[ii][jj]+1); } return dp[m][n]; } };
[ "beyanger@163.com" ]
beyanger@163.com
590848dc19361426e9202938075b0ecdcd9c2f79
b9404a88c13d723be44f7c247e1417689ce7981a
/include/External/stlib/packages/stochastic/FirstReactionInfluence.h
64faac274ac9c7bef1c52e2e36302556b0b7abde
[ "BSD-2-Clause" ]
permissive
bxl295/m4extreme
c3d0607711e268d22d054a8c3d9e6d123bbf7d78
2a4a20ebb5b4e971698f7c981de140d31a5e550c
refs/heads/master
2022-12-06T19:34:30.460935
2020-08-29T20:06:40
2020-08-29T20:06:40
291,333,994
0
0
null
null
null
null
UTF-8
C++
false
false
5,919
h
// -*- C++ -*- /*! \file stochastic/FirstReactionInfluence.h \brief The first reaction method for SSA. */ #if !defined(__stochastic_FirstReactionInfluence_h__) #define __stochastic_FirstReactionInfluence_h__ #include "FirstReaction.h" #include "../array/StaticArrayOfArrays.h" namespace stochastic { //! Perform a stochastic simulation using Gillespie's first reaction method. /*! \param _ExponentialGenerator Random deviate generator for the exponential distribution. By default the ziggurat algorithm is used. \param _PropensitiesFunctor Can calculate propensities as a function of the reaction index and the populations. */ template < class _ExponentialGenerator = numerical::ExponentialGeneratorZiggurat<>, class _PropensitiesFunctor = PropensitiesSingle<true> > class FirstReactionInfluence : public FirstReaction<_ExponentialGenerator, _PropensitiesFunctor> { private: typedef FirstReaction<_ExponentialGenerator, _PropensitiesFunctor> Base; // // Public types. // public: //! The exponential generator. typedef _ExponentialGenerator ExponentialGenerator; //! The propensities functor. typedef _PropensitiesFunctor PropensitiesFunctor; //! The discrete, uniform generator. typedef typename ExponentialGenerator::DiscreteUniformGenerator DiscreteUniformGenerator; // // Member data. // private: using Base::_state; using Base::_time; using Base::_propensitiesFunctor; //DiscreteUniformGenerator _discreteUniformGenerator; using Base::_exponentialGenerator; using Base::_timeToFirstReaction; using Base::_indexOfFirstReaction; array::StaticArrayOfArrays<std::size_t> _reactionInfluence; // Store the inverse propensities. This enables more efficient calculation // of the reaction times. (multiplication versus division) std::vector<double> _inversePropensities; // // Not implemented. // private: //! Default constructor not implemented. FirstReactionInfluence(); //! Copy constructor not implemented. FirstReactionInfluence(const FirstReactionInfluence&); //! Assignment operator not implemented. FirstReactionInfluence& operator=(const FirstReactionInfluence&); //-------------------------------------------------------------------------- //! \name Constructors etc. //@{ public: //! Construct. FirstReactionInfluence(const State& state, const PropensitiesFunctor& propensitiesFunctor, const array::StaticArrayOfArrays<std::size_t>& reactionInfluence, const double maxSteps) : Base(state, propensitiesFunctor, maxSteps), // Copy. _reactionInfluence(reactionInfluence), // Allocate. _inversePropensities(state.getNumberOfReactions()) { } // Default destructor is fine. //@} //-------------------------------------------------------------------------- //! \name Simulation. //@{ public: //! Initialize the state with the initial populations and reset the time. void initialize(const std::vector<double>& populations, const double time) { // Initialize the state. Base::Base::initialize(populations); _time = time; // Compute the initial propensities and the initial time to the first // reaction. computePropensities(); computeTimeToFirstReaction(); } //! Simulate until the termination condition is reached. void simulate(const double endTime) { // Step until no more reactions can fire or we reach the termination // condition. while (step(endTime)) { } } //! Try to take a step. Return true if a step is taken. bool step(double endTime); //@} //-------------------------------------------------------------------------- //! \name Accessors. //@{ public: //! Return a const reference to the state. using Base::getState; //! Return the current time. using Base::getTime; //! Return the step count. using Base::getStepCount; //! Return a const reference to the discrete, uniform generator. using Base::getDiscreteUniformGenerator; //@} //-------------------------------------------------------------------------- //! \name Manipulators. //@{ public: //! Return a reference to the discrete, uniform generator. //using Base::getDiscreteUniformGenerator; private: double safelyInvert(const double x) const { if (x != 0) { return 1. / x; } else { return std::numeric_limits<double>::max(); } } void computePropensities() { // Compute each propensity. for (std::size_t i = 0; i != _inversePropensities.size(); ++i) { _inversePropensities[i] = safelyInvert(_propensitiesFunctor(i, _state.getPopulations())); } } void updatePropensities(std::size_t reactionIndex); void computeTimeToFirstReaction() { // Start with infinity. _timeToFirstReaction = std::numeric_limits<double>::max(); _indexOfFirstReaction = 0; double t; for (std::size_t i = 0; i != _inversePropensities.size(); ++i) { if (_inversePropensities[i] != std::numeric_limits<double>::max()) { t = _exponentialGenerator() * _inversePropensities[i]; if (t < _timeToFirstReaction) { _timeToFirstReaction = t; _indexOfFirstReaction = i; } } } } //@} }; //@} } // namespace stochastic #define __stochastic_FirstReactionInfluence_ipp__ #include "FirstReactionInfluence.ipp" #undef __stochastic_FirstReactionInfluence_ipp__ #endif
[ "xctech@escaas.com" ]
xctech@escaas.com
22c588ac055ecaeef445ac3261d2dfa7053cb428
5f5ae96fc8081fbe0ebb9c511e43b41a993a0c5d
/tfjs-backend-wasm/src/cc/kernels/CropAndResize.cc
dd9eec2bdd60f090bb96d7eeaa3d2090423383aa
[ "Apache-2.0" ]
permissive
sydox/tfjs
82979de7aef72ad5210826f2d9f6171983512390
98435f4f70e6afeec00cd3bc91a46e404aba4b1b
refs/heads/master
2022-12-21T00:05:32.380378
2020-08-28T12:19:11
2020-08-28T12:19:11
292,177,995
1
0
Apache-2.0
2020-09-02T04:24:49
2020-09-02T04:24:49
null
UTF-8
C++
false
false
7,169
cc
/* Copyright 2019 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ===========================================================================*/ #ifdef __EMSCRIPTEN__ #include <emscripten.h> #endif #include <cmath> #include <cstddef> #include <vector> #include "src/cc/backend.h" #include "src/cc/interpolate_bilinear_impl.h" #include "src/cc/util.h" // Must match enum in CropAndResize.ts enum InterpolationMethod { BILINEAR = 0, NEAREST = 1, }; namespace { void interpolate_nearest(float* out_buf_ptr, const float* images_buf, std::vector<size_t> images_strides, size_t crop_width, size_t image_width, size_t image_width_m1, size_t num_channels, float extrapolation_value, size_t box_offset, float y_ind, float width_scale, float x1, float x2) { for (size_t x = 0; x < crop_width; ++x) { const float x_ind = (crop_width > 1) ? x1 * image_width_m1 + x * width_scale : 0.5 * (x1 + x2) * image_width_m1; if (x_ind < 0 || x_ind > image_width - 1) { for (size_t c = 0; c < num_channels; ++c) { *out_buf_ptr = extrapolation_value; out_buf_ptr++; } continue; } float closest_x = round(x_ind); float closest_y = round(y_ind); for (size_t c = 0; c < num_channels; ++c) { const size_t in_ind = c + closest_x * images_strides[2] + closest_y * images_strides[1] + box_offset; *out_buf_ptr = images_buf[in_ind]; out_buf_ptr++; } } } } // namespace namespace tfjs { namespace wasm { // We use C-style API to interface with Javascript. extern "C" { #ifdef __EMSCRIPTEN__ EMSCRIPTEN_KEEPALIVE #endif void CropAndResize(size_t images_id, size_t boxes_id, size_t box_ind_id, size_t num_boxes, size_t* images_shape_ptr, size_t crop_height, size_t crop_width, InterpolationMethod method, float extrapolation_value, size_t out_id) { const size_t images_shape_length = 4; const std::vector<size_t>& images_shape = std::vector<size_t>( images_shape_ptr, images_shape_ptr + images_shape_length); const auto images_strides = util::compute_strides(images_shape); const std::vector<size_t>& output_shape = {num_boxes, crop_height, crop_width, images_shape[3]}; const auto output_strides = util::compute_strides(output_shape); auto& images_info = backend::get_tensor_info(images_id); auto& boxes_info = backend::get_tensor_info(boxes_id); auto& box_ind_info = backend::get_tensor_info(box_ind_id); auto& out_info = backend::get_tensor_info_out(out_id); const float* images_buf = images_info.f32(); const size_t images_size = images_info.size; const float* boxes_buf = boxes_info.f32(); const size_t boxes_size = boxes_info.size; const int* box_ind_buf = box_ind_info.i32(); const size_t box_ind_size = box_ind_info.size; float* out_buf = out_info.f32_write(); const size_t out_size = out_info.size; const size_t batch = images_shape[0]; const size_t image_height = images_shape[1]; const size_t image_width = images_shape[2]; const size_t num_channels = images_shape[3]; const size_t image_height_m1 = image_height - 1; const size_t image_width_m1 = image_width - 1; const bool should_extrapolate = true; for (size_t b = 0; b < num_boxes; ++b) { const float y1 = *boxes_buf; boxes_buf++; const float x1 = *boxes_buf; boxes_buf++; const float y2 = *boxes_buf; boxes_buf++; const float x2 = *boxes_buf; boxes_buf++; if (*box_ind_buf >= batch) { continue; } const size_t box_offset = *box_ind_buf * images_strides[0]; const float height_scale = (crop_height > 1) ? (y2 - y1) * image_height_m1 / (crop_height - 1) : 0; const float width_scale = (crop_width > 1) ? (x2 - x1) * image_width_m1 / (crop_width - 1) : 0; const bool crop_size_eq_box_size = crop_width == 1 + (x2 - x1) * image_width_m1; bool requires_interpolation = false; if (method == InterpolationMethod::BILINEAR) { const float y_lerp_factor = crop_height > 1 ? y1 * image_height + height_scale : 0.5 * (y1 + y2) * image_height_m1; if (y_lerp_factor - floor(y_lerp_factor) != 0.0) { requires_interpolation = true; } else { const float x_lerp_factor = crop_width > 1 ? x1 * image_width_m1 + width_scale : 0.5 * (x1 + x2) * image_width_m1; if (x_lerp_factor - floor(x_lerp_factor) != 0.0) { requires_interpolation = true; } } } const bool should_memcpy = x2 > x1 && x1 >= 0 && crop_size_eq_box_size == true && requires_interpolation == false; for (size_t y = 0; y < crop_height; ++y) { const float y_ind = (crop_height > 1) ? y1 * image_height_m1 + y * height_scale : 0.5 * (y1 + y2) * image_height_m1; float* out_buf_ptr = out_buf + y * output_strides[1] + b * output_strides[0]; if (y_ind < 0 || y_ind > image_height - 1) { for (size_t x = 0; x < crop_width; ++x) { for (size_t c = 0; c < num_channels; ++c) { *out_buf_ptr = extrapolation_value; out_buf_ptr++; } } continue; } if (should_memcpy) { size_t y_ind_int = y_ind; size_t offset = box_offset + y_ind_int * images_strides[1]; memcpy(out_buf_ptr, images_buf + offset, sizeof(float) * crop_width * num_channels); continue; } if (method == InterpolationMethod::BILINEAR) { tfjs::wasm::interpolate_bilinear( out_buf_ptr, images_buf, images_strides, crop_width, image_width, image_width_m1, image_height_m1, num_channels, should_extrapolate, extrapolation_value, box_offset, y_ind, width_scale, x1, x2); } else { interpolate_nearest(out_buf_ptr, images_buf, images_strides, crop_width, image_width, image_width_m1, num_channels, extrapolation_value, box_offset, y_ind, width_scale, x1, x2); } } box_ind_buf++; } } } // extern "C" } // namespace wasm } // namespace tfjs
[ "noreply@github.com" ]
noreply@github.com
fca9faf8f1089066326e46407491477ab00d0e0d
a34f9784239504411669224860cc2dbe57f9cb18
/Server/iStartek.h
05cb694765da40c19841b4614e7b2595aa18c17c
[]
no_license
yannyesteban/GT
3ade90838c5816a106ce3a17ea19c1adaf2bf711
118d730a95872316170f8673b58a70a250f4b09b
refs/heads/master
2022-11-26T19:48:27.742629
2022-11-23T16:59:04
2022-11-23T16:59:04
233,468,612
0
0
null
null
null
null
UTF-8
C++
false
false
774
h
#pragma once #include <Socket.h> #include <list> #include <string> #include <map> #include "rapidjson/document.h" #include "rapidjson/prettywriter.h" // for stringify JSON #include "rapidjson/writer.h" // for stringify JSON #include "rapidjson/filereadstream.h" namespace GT { typedef struct { char token[3]; unsigned short packLength; } iStartekHeader; class iStartek { public: bool isSynch(ConnInfo Info); std::string getTracking(ConnInfo Info); std::string getTracking(const std::string s); std::list<std::string> getTrackingList(const std::string s); std::map<std::string, std::string> getEventData(const std::string s); std::map<std::string, std::string> getResponse(const std::string s); bool isMe(ConnInfo Info); private: }; }
[ "yannyesteban@hotmail.com" ]
yannyesteban@hotmail.com
ec12132f237a21e1740bc22a910af7eacd9edd99
cba0bef8fdde73df69e838100ce941bbedd5779e
/ControlNode.ino
eb0639166fa7b06ebaebf0b829c37d48178f623e
[]
no_license
dgraceli/Learning-IoT
974d4a6de75d9fd1354a147f12552e4aa5b5e122
03a7fa95f9aa66e80480ca336c75681d1662379e
refs/heads/master
2023-07-10T17:06:39.153382
2021-08-10T18:44:03
2021-08-10T18:44:03
366,139,121
2
0
null
null
null
null
UTF-8
C++
false
false
3,523
ino
// Loading the ESP8266WiFi library and the PubSubClient library #include <ESP8266WiFi.h> #include <PubSubClient.h> #include <DNSServer.h> #include <ESP8266WebServer.h> #include <WiFiManager.h> // Raspberry Pi IP address, so it connects to the MQTT broker const char* mqtt_server = "raspberrypi.local"; // Initializes the espClient WiFiClient espClient; PubSubClient client(espClient); int RELAY = D1; int ECHO = D2; int TRIGGER = D3; float tankdata; int min_thresh=5; int water=0; float max_height=18.00; float height; // This functions is executed when some device publishes a message to a topic that this ESP8266 is subscribed to float ultrasonicRead() { digitalWrite(TRIGGER, LOW); delayMicroseconds(2); digitalWrite(TRIGGER, HIGH); delayMicroseconds(10); digitalWrite(TRIGGER, LOW); long duration = pulseIn(ECHO, HIGH); tankdata = (duration/2) / 29.09; height= max_height-tankdata; if (height<0) return 0; else return height; } void callback(String topic, byte* message, unsigned int length) { Serial.print("Message arrived on topic: "); Serial.print(topic); Serial.print(". Message: "); String messageTemp; water=ultrasonicRead(); delay(2000); static char levelTemp[7]; dtostrf(water, 6, 2, levelTemp); for (int i = 0; i < length; i++) { Serial.print((char)message[i]); messageTemp += (char)message[i]; } Serial.println(); if((messageTemp > "550") && (water > min_thresh)) { Serial.print("Dry Soil!! Watering"); digitalWrite(RELAY, HIGH); client.publish("/esp8266/ControlNode/relay", "1"); water=ultrasonicRead(); delay(2000); static char levelTemp[7]; dtostrf(water, 6, 2,levelTemp); client.publish("/esp8266/ControlNode/waterLevel",levelTemp); Serial.println(" On"); Serial.println(water); delay(5000); } else { digitalWrite(RELAY, LOW); client.publish("/esp8266/ControlNode/relay", "0"); water=ultrasonicRead(); delay(2000); static char levelTemp[7]; dtostrf(water, 6, 2, levelTemp); client.publish("/esp8266/ControlNode/waterLevel",levelTemp); Serial.print("Off"); Serial.println(water); } Serial.println(); delay(1000); } // This functions reconnects your ESP8266 to your MQTT broker void reconnect() { // Loop until we're reconnected while (!client.connected()) { Serial.print("Attempting MQTT connection..."); // Attempt to connect if (client.connect("Client3")) { Serial.println("connected"); // Subscribe or resubscribe to a topic client.subscribe("/esp8266/+/moisture"); } else { Serial.print("failed, rc="); Serial.print(client.state()); Serial.println(" try again in 5 seconds"); // Wait 5 seconds before retrying delay(5000); } } } void setup() { pinMode(RELAY,OUTPUT); pinMode(TRIGGER,OUTPUT); pinMode(ECHO,INPUT); delay(1000); Serial.begin(115200); WiFiManager wifiManager; wifiManager.autoConnect("AutoConnectAP_CN"); Serial.println("connected..."); //setup_wifi(); client.setServer(mqtt_server, 1883); client.setCallback(callback); } void loop() { if (!client.connected()) { reconnect(); } if(!client.loop()) client.connect("Client3"); }
[ "noreply@github.com" ]
noreply@github.com
c5df0cf05f31e734f6e0d5e5cee6bfbcccd28421
d3d5636ae069c3d31c6e1dfae964f4b9797d1f87
/C++_CN_Day37/C++_CN_Day37/通配符匹配.cpp
450ea1023887b2ed9caa536b6cd03c842802a100
[]
no_license
adong001/C-C-_NC_Day
1f83b1c609f2c9496ff787a0a98880a6cdad4c1d
3351588293823c2507a4cef128967a07b80969ed
refs/heads/master
2021-07-11T00:56:07.846956
2020-09-13T05:14:56
2020-09-13T05:14:56
191,345,716
1
0
null
null
null
null
UTF-8
C++
false
false
1,266
cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> #include<string> using namespace std; //给定一个字符串 (s) 和一个字符模式 (p) ,实现一个支持 '?' 和 '*' 的通配符匹配。 //'?' 可以匹配任何单个字符。 //'*' 可以匹配任意字符串(包括空字符串)。 //两个字符串完全匹配才算匹配成功。 // //说明 : //s 可能为空,且只包含从 a - z 的小写字母。 //p 可能为空,且只包含从 a - z 的小写字母,以及字符  ? 和 *。 //示例 1 : //输入 : // s = "aa" // p = "a" //输出 : false // 解释 : "a" 无法匹配 "aa" 整个字符串。 //示例 2 : //输入 : // s = "aa" // p = "*" //输出 : true // 解释 : '*' 可以匹配任意字符串。 //示例 3 : //输入 : // s = "cb" // p = "?a" //输出 : false // 解释 : '?' 可以匹配 'c', 但第二个 'a' 无法匹配 'b'。 //示例 4 : //输入 : // s = "adceb" // p = "*a*b" //输出 : true // 解释 : 第一个 '*' 可以匹配空字符串, 第二个 '*' 可以匹配字符串 "dce". //示例 5 : // 输入 : // s = "acdcb" // p = "a*c?b" // 输入 : false class Solution { public: bool isMatch(string s, string p) { } }; int main3() { system("pause"); return 0; }
[ "1792095378@qq.com" ]
1792095378@qq.com
b1ee7fb805f9035e84019e08aa13cc312d617f93
c054ffed0df3565ce5a52321db273219275c6ca5
/src/test/test_camera/test_camera.cpp
1e8e713e143d998158d131dd5ce1b7e4fdd11116
[]
no_license
stevegocoding/yart
8ba0d059485f08e3a8eec31bdbec223512d2b71b
01505cc0e989cee41ba0e7617c9e6acb511447fe
refs/heads/master
2016-09-03T07:08:28.078837
2012-06-16T02:15:03
2012-06-16T02:15:03
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,492
cpp
#include "pch.h" #include "camera.h" #include "rng.h" #include "integrator.h" #include "stratified_sampler.h" #include "render_target.h" #include "filter.h" #include "cml/cml.h" #include <iomanip> using namespace std; void print_matrix(std::ostream& os, const cml::matrix44f& mat, int prec = 4, int width = 8) { std::ios::fmtflags old_flags = os.flags(); os.setf(ios::left, ios::adjustfield); // row #1 os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(0, 0) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(0, 1) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(0, 2) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(0, 3) << endl; // row #2 os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(1, 0) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(1, 1) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(1, 2) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(1, 3) << endl; // row #3 os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(2, 0) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(2, 1) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(2, 2) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(2, 3) << endl; // row #4 os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(3, 0) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(3, 1) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(3, 2) << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << mat(3, 3) << endl; os.setf(old_flags); } void print_vector3f_col(std::ostream& os, const cml::vector3f& vec, int prec = 4, int width = 8) { std::ios::fmtflags old_flags = os.flags(); os.setf(ios::left, ios::adjustfield); os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[0] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[1] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[2] << ' ' << std::endl; os.setf(old_flags); } void print_vector4f_col(std::ostream& os, const cml::vector4f& vec, int prec = 4, int width = 8) { std::ios::fmtflags old_flags = os.flags(); os.setf(ios::left, ios::adjustfield); os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[0] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[1] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[2] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[3] << endl; os.setf(old_flags); } void print_vector3f_row(std::ostream& os, const cml::vector3f& vec, int prec = 4, int width = 8) { std::ios::fmtflags old_flags = os.flags(); os.setf(ios::left, ios::adjustfield); os << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[0] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[1] << ' ' << std::endl << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << vec[2] << ' ' << std::endl; os.setf(old_flags); } void print_ray(std::ostream& os, c_ray& ray, int prec = 4, int width = 8) { std::ios::fmtflags old_flags = os.flags(); os.setf(ios::left, ios::adjustfield); os << "Ray: " << '[' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << ray.o[0] << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << ray.o[1] << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << ray.o[2] << ']' << " " << '[' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << ray.d[0] << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << ray.d[1] << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << ray.d[2] << ']' << endl; os.setf(old_flags); } void print_img_sample(std::ostream& os, c_sample& s, int prec = 4, int width = 8) { std::ios::fmtflags old_flags = os.flags(); os.setf(ios::left, ios::adjustfield); os << "Img Sample: " << '[' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << s.image_x << ' ' << std::setprecision(prec) << std::setw(width) << std::setfill(' ') << s.image_y << ']' << endl; os.setf(old_flags); } int main(int argc, char **argv) { uint32_t res_x = 2; uint32_t res_y = 2; uint32_t sppx = 2; uint32_t sppy = 2; c_rng rng(2047); std::vector<c_sample> samples_vec; std::vector<c_ray> rays_vec; samples_vec.reserve(res_x * res_y * sppx * sppy); rays_vec.reserve(res_x * res_y * sppx * sppy); // Create the sampler stratified_sampler_ptr sampler = boost::make_shared<c_stratified_sampler>(0, res_x, 0, res_y, sppx, sppy, true, 0.0f, 0.0f); sample_ptr orig_sample = sample_ptr(new c_sample(sampler, surface_integrator_ptr(), volume_integrator_ptr(), scene_ptr())); // Create the camera filter_ptr filter = make_box_filter(0.5f, 0.5f); render_target_ptr film = make_bitmap_render_target(res_x, res_y, filter); matrix44f m; cml::matrix_translation(m, vector3f(0,0,0)); c_transform world_to_cam(m); c_transform cam_to_world(m); float wnd[4] = {-1.0f, 1.0f, -1.0f, 1.0f}; perspective_camera_ptr cam = perspective_camera_ptr(new c_perspective_camera(cam_to_world, wnd, 0, 0, 90, film)); int sc = 0; samples_array_ptr samples_array = orig_sample->duplicate(sppx*sppy); while ((sc = sampler->get_current_pixel_samples(samples_array, rng)) > 0) { for (uint32_t j = 0; j < sppx * sppy; ++j) { c_ray r; cam->generate_ray(samples_array[j], &r); samples_vec.push_back(samples_array[j]); rays_vec.push_back(r); //print_img_sample(cout, samples_array[j]); print_ray(cout, r); } } return 0; }
[ "stevegocoding@gmail.com" ]
stevegocoding@gmail.com
10e7ac437fd61fd3db2be38c9241aa1b80dd4cd3
2c7ebf2741e77c5206abe250cd7a06acf66564bc
/Find Duplicate In Array.cpp
87c88745fcb93ccac54d1c6e3034bfc9f41e1724
[]
no_license
dhanendraverma/InterviewBit-Solutions
9b18a285db33f7d0f4773aa99aebe42264a56d7e
17b204b99e4cf4badab45172f447eb1092a45114
refs/heads/master
2020-05-30T00:47:55.431752
2019-07-15T17:08:29
2019-07-15T17:08:29
189,465,267
1
0
null
null
null
null
UTF-8
C++
false
false
393
cpp
int Solution::repeatedNumber(const vector<int> &A) { vector <bool> check(A.size(),false); //creating a boolean vector to keep tracked of seen intergers for(int i=0;i<A.size();i++){ if(!check[A[i]]) //if element is seen first time marked it as seen check[A[i]]=true; else //else it has been already return A[i]; } }
[ "noreply@github.com" ]
noreply@github.com
f5b488f0735c3197f5d880d4504cec4006805aad
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/collectd/gumtree/collectd_repos_function_177_collectd-5.6.3.cpp
bb8bfb923be06db019b2866762557b01e1985af3
[]
no_license
niuxu18/logTracker-old
97543445ea7e414ed40bdc681239365d33418975
f2b060f13a0295387fe02187543db124916eb446
refs/heads/master
2021-09-13T21:39:37.686481
2017-12-11T03:36:34
2017-12-11T03:36:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
856
cpp
static size_t apache_header_callback(void *buf, size_t size, size_t nmemb, void *user_data) { size_t len = size * nmemb; apache_t *st; st = user_data; if (st == NULL) { ERROR("apache plugin: apache_header_callback: " "user_data pointer is NULL."); return (0); } if (len == 0) return (len); /* look for the Server header */ if (strncasecmp(buf, "Server: ", strlen("Server: ")) != 0) return (len); if (strstr(buf, "Apache") != NULL) st->server_type = APACHE; else if (strstr(buf, "lighttpd") != NULL) st->server_type = LIGHTTPD; else if (strstr(buf, "IBM_HTTP_Server") != NULL) st->server_type = APACHE; else { const char *hdr = buf; hdr += strlen("Server: "); NOTICE("apache plugin: Unknown server software: %s", hdr); } return (len); }
[ "993273596@qq.com" ]
993273596@qq.com
0331fb419bfa77626b7e253d3d712502bc7c61f3
88ae8695987ada722184307301e221e1ba3cc2fa
/third_party/pdfium/third_party/base/compiler_specific.h
e11deb67aa85b9bb64516a423b78f5f229043aaa
[ "BSD-3-Clause", "Apache-2.0", "LGPL-2.0-or-later", "MIT", "GPL-1.0-or-later" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
C++
false
false
2,774
h
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BASE_COMPILER_SPECIFIC_H_ #define THIRD_PARTY_BASE_COMPILER_SPECIFIC_H_ #include "build/build_config.h" // A wrapper around `__has_attribute`, similar to HAS_CPP_ATTRIBUTE. #if defined(__has_attribute) #define HAS_ATTRIBUTE(x) __has_attribute(x) #else #define HAS_ATTRIBUTE(x) 0 #endif // Annotate a function indicating it should not be inlined. // Use like: // NOINLINE void DoStuff() { ... } #if defined(__clang__) && HAS_ATTRIBUTE(noinline) #define NOINLINE [[clang::noinline]] #elif defined(COMPILER_GCC) && HAS_ATTRIBUTE(noinline) #define NOINLINE __attribute__((noinline)) #elif defined(COMPILER_MSVC) #define NOINLINE __declspec(noinline) #else #define NOINLINE #endif // Macro for hinting that an expression is likely to be false. #if !defined(UNLIKELY) #if defined(COMPILER_GCC) || defined(__clang__) #define UNLIKELY(x) __builtin_expect(!!(x), 0) #else #define UNLIKELY(x) (x) #endif // defined(COMPILER_GCC) #endif // !defined(UNLIKELY) #if !defined(LIKELY) #if defined(COMPILER_GCC) || defined(__clang__) #define LIKELY(x) __builtin_expect(!!(x), 1) #else #define LIKELY(x) (x) #endif // defined(COMPILER_GCC) #endif // !defined(LIKELY) // Marks a type as being eligible for the "trivial" ABI despite having a // non-trivial destructor or copy/move constructor. Such types can be relocated // after construction by simply copying their memory, which makes them eligible // to be passed in registers. The canonical example is std::unique_ptr. // // Use with caution; this has some subtle effects on constructor/destructor // ordering and will be very incorrect if the type relies on its address // remaining constant. When used as a function argument (by value), the value // may be constructed in the caller's stack frame, passed in a register, and // then used and destructed in the callee's stack frame. A similar thing can // occur when values are returned. // // TRIVIAL_ABI is not needed for types which have a trivial destructor and // copy/move constructors, such as base::TimeTicks and other POD. // // It is also not likely to be effective on types too large to be passed in one // or two registers on typical target ABIs. // // See also: // https://clang.llvm.org/docs/AttributeReference.html#trivial-abi // https://libcxx.llvm.org/docs/DesignDocs/UniquePtrTrivialAbi.html #if defined(__clang__) && HAS_ATTRIBUTE(trivial_abi) #define TRIVIAL_ABI [[clang::trivial_abi]] #else #define TRIVIAL_ABI #endif #if defined(__clang__) #define GSL_POINTER [[gsl::Pointer]] #else #define GSL_POINTER #endif #endif // THIRD_PARTY_BASE_COMPILER_SPECIFIC_H_
[ "jengelh@inai.de" ]
jengelh@inai.de
52618ae1d58b943c5b7b7c55869dbc422a165c95
6732716b0dcfe56e5036ab2913d857c19d5387a5
/dyn-spline/src/UniformMeshes.cpp
e00672e3c5ba1b9c44c6633f392330a3f32136a0
[]
no_license
jstine35/dyn-spline
1de39663b5904d73fbb660f193cb8f58fc9d304f
085449c52bca6a34604e8a3bc2f753fe7cf0318d
refs/heads/master
2021-01-23T05:14:46.269595
2017-10-11T00:42:48
2017-10-11T00:46:58
86,289,611
1
0
null
null
null
null
UTF-8
C++
false
false
568
cpp
#include "UniformMeshes.h" UniformMeshVertex g_mesh_UniformQuad[4] = { { vFloat2(0.0f, 0.0f), vFloat2(0.0f, 0.0f) }, { vFloat2(0.0f, 1.0f), vFloat2(0.0f, 1.0f) }, { vFloat2(1.0f, 1.0f), vFloat2(1.0f, 1.0f) }, { vFloat2(1.0f, 0.0f), vFloat2(1.0f, 0.0f) }, }; UniformMeshVertex g_mesh_UniformQuadHalf[4] = { { vFloat2(0.0f, 0.0f), vFloat2(0.0f, 0.0f) }, { vFloat2(0.0f, 0.5f), vFloat2(0.0f, 1.0f) }, { vFloat2(0.5f, 0.5f), vFloat2(1.0f, 1.0f) }, { vFloat2(0.5f, 0.0f), vFloat2(1.0f, 0.0f) }, }; s16 g_ind_UniformQuad[6] = { 0,1,3, 1,3,2 };
[ "Jake.Stine@gmail.com" ]
Jake.Stine@gmail.com
83bff7f6e1126fed9b83219be5881ca85ad23ebe
0b1af6e3dc5b15a5f9eda8908f63af423bd3d847
/hw5LectureEx/main.cpp
1a71232a5a348d4f6aaeda2c7009c9aba6e43afc
[]
no_license
ronaldran97/CS2560_nima
c705cafbaba7f5b43bbd30a67a1af71ed560747a
407f9377a55e806ff716765ed3f455bbbb2ec245
refs/heads/master
2020-04-19T05:46:53.519426
2019-05-09T20:51:37
2019-05-09T20:51:37
167,998,173
0
0
null
null
null
null
UTF-8
C++
false
false
2,944
cpp
#include <iostream> //int main() { // std::cout << "Hello, World!" << std::endl; // return 0; //} #include <cstdio> // Base class class Animal { std::string _name; std::string _type; std::string _sound; // private constructor prevents construction of base class Animal() {}; protected: // protected constructor for use by derived classes only! Animal(const std::string & n, const std::string & t, const std::string & s) : _name(n), _type(t), _sound(s) { //using C++ 11 in-class member initalizer printf("Animal Constructed\n"); } public: void speak() const; const std::string & name() const { return _name; } const std::string & type() const { return _type; } const std::string & sound() const { return _sound; } std::string snap() { return "Animal_Snap"; } //redefine same signature }; //To deifine outside use class name,SCOPE OPERATOR,Member function void Animal::speak() const { printf("%s the %s says %s\n", _name.c_str(), _type.c_str(), _sound.c_str()); } // Dog class - derived from Animal class Dog : public Animal { int walked; public: Dog(std::string n) : Animal(n, "dog", "woof"), walked(0) { printf("Dog Constructed\n"); }; int walk() { return ++walked; } std::string snap() { return "Dog_Snap"; } //override same signature }; // Cat class - derived from Animal class Cat : public Animal { int petted; public: Cat(std::string n) : Animal(n, "cat", "meow"), petted(0) { printf("Cat Constructed\n"); }; int pet() { return ++petted; } }; class Donkey :public Animal { int carried; public: Donkey(std::string n) : Animal(n, "donkey", "hee-haw"), carried(0) { printf("Donkey constructed\n"); }; int carry() { return ++carried; } }; // Pig class - derived from Animal class Pig : public Animal { int fed; public: Pig(std::string n) : Animal(n, "pig", "oink"), fed(0) { printf("Pig Constructed\n"); }; int feed() { return ++fed; } }; //NOTICE INPUT TYPE std::string displayName(const Animal &A) { return A.name(); } int main(int argc, char ** argv) { Dog d("Rover"); Cat c("Fluffy"); Pig p("Arnold"); Donkey donk("Eeyore"); //Poly //calling a specific ANIMAL -> a derived class of base printf("%s\n", displayName(d).c_str() ); printf("%s\n", displayName(c).c_str()); printf("%s\n", displayName(p).c_str()); //d.snap() //what's called? //1B. Calls both the base and the derived case. It returns the Animal_snap. printf("%s\n", d.snap().c_str()); d.speak(); c.speak(); p.speak(); donk.speak(); printf("the dog has been walked %d times\n", d.walk()); printf("the cat has been petted %d times\n", c.pet()); printf("the pig has been fed %d times\n", p.feed()); printf("the Donkey has been carried %d times\n", donk.carry()); }
[ "noreply@github.com" ]
noreply@github.com
bbe5b5e14ce86fcbd6aa5d49e181e7f36b2e7618
ccbc3d74ea0a2bfdcf315d782b88b784b8b06222
/compass.cpp
98bb5f8efd87d0fb4e903f7dfe809f7d177415d3
[ "MIT" ]
permissive
gerson1974/tripmaster
8068d2e7534caf0488228ebd460e44999038a70e
cbe4ba8511054711cc7fe8825c2d97817b3a73c7
refs/heads/master
2023-03-18T07:54:02.098517
2016-06-10T23:05:33
2016-06-10T23:05:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,919
cpp
#include "compass.h" Compass::Compass() : compass(Adafruit_HMC5883_Unified(12345)) { /* if(!compass.begin()) { // There was a problem detecting the HMC5883 ... check your connections lcd->setCursor(1,0); lcd->print("Cannot find the compass"); } */ } void Compass::checkCompass() { sensors_event_t event; compass.getEvent(&event); /* // Display the results (magnetic vector values are in micro-Tesla (uT)) Serial.print("X: "); Serial.print(event.magnetic.x); Serial.print(" "); Serial.print("Y: "); Serial.print(event.magnetic.y); Serial.print(" "); Serial.print("Z: "); Serial.print(event.magnetic.z); Serial.print(" ");Serial.println("uT"); // Hold the module so that Z is pointing 'up' and you can measure the heading with x&y // Calculate heading when the magnetometer is level, then correct for signs of axis. float heading = atan2(event.magnetic.y, event.magnetic.x); // Once you have your heading, you must then add your 'Declination Angle', which is the 'Error' of the magnetic field in your location. // Find yours here: http://www.magnetic-declination.com/ // Mine is: -13* 2' W, which is ~13 Degrees, or (which we need) 0.22 radians // If you cannot find your Declination, comment out these two lines, your compass will be slightly off. float declinationAngle = 0.22; heading += declinationAngle; // Correct for when signs are reversed. if(heading < 0) heading += 2*PI; // Check for wrap due to addition of declination. if(heading > 2*PI) heading -= 2*PI; // Convert radians to degrees for readability. float headingDegrees = heading * 180/M_PI; Serial.print("Heading (degrees): "); Serial.println(headingDegrees); */ } void Compass::registerTripMaster(TripMaster* _tripMaster) { tripMaster = _tripMaster; }
[ "louis@naiaden.nl" ]
louis@naiaden.nl
d936fc3fed848c0731c4ab352e0ac2666bc726cf
cfd2aabc06bd68b0dd33d7af821b30fc0dd38292
/C++语言程序设计第三版教师用书/例题源代码/ch03/3_16.cpp
013008ce5071d85865de3f80b1453bcaba4cd64d
[]
no_license
Joyounger/cpp_zhengli
868c208c9ccea8e4e5e5a0c8f1a6dd144dcfd936
45ad9a351789adf5ad6c174e8eb1be5c3a90fecc
refs/heads/master
2021-01-01T19:31:58.827512
2017-07-28T03:40:44
2017-07-28T03:40:44
98,604,727
11
3
null
null
null
null
UTF-8
C++
false
false
1,025
cpp
//3_16.cpp #include<iostream> using namespace std; struct complex { double real; double imaginary; }; int main() { int m, n; double x, y; complex c1, c2, c3; int add(int m, int n); double add(double x, double y); complex add(complex c1, complex c2); cout<<"Enter two integer: "; cin>>m>>n; cout<<"integer "<<m<<'+'<<n<<"="<<add(m,n)<<endl; cout<<"Enter two real number: "; cin>>x>>y; cout<<"real number "<<x<<'+'<<y<<"= "<<add(x,y)<<endl; cout<<"Enter the first complex number: "; cin>>c1.real>>c1.imaginary; cout<<"Enter the second complex number: "; cin>>c2.real>>c2.imaginary; c3=add(c1,c2); cout<<"complex number ("<<c1.real<<','<<c1.imaginary<<")+(" <<c2.real<<','<<c2.imaginary<<")= ("<<c3.real<<','<<c3.imaginary<<")\n"; } int add(int m, int n) { return m+n; } double add(double x, double y) { return x+y; } complex add(complex c1, complex c2) { complex c; c.real=c1.real+c2.real; c.imaginary=c1.imaginary+c2.imaginary; return c; }
[ "aquanox@163.com" ]
aquanox@163.com
e16e724b934f69bff2c7fa7882609cb305a3cd38
81d41877c19714e35e94c76b54e402a06106bc49
/ZombieArena/player.h
b1a7994683c2b376712abcaeb8f59e7b6be2eadd
[]
no_license
paxsentry/ZombieArena
cf1a9fbe501226f66d08ceee176f8f7b15ab219d
a529aec7dd2dde5a24350091ba287d6837e8ff39
refs/heads/master
2020-04-05T14:02:03.137440
2017-07-03T05:30:14
2017-07-03T05:30:14
94,744,537
0
0
null
null
null
null
UTF-8
C++
false
false
1,087
h
#ifndef ZOMBIE_ARENA_PLAYER_H #define ZOMBIE_ARENA_PLAYER_H #include <SFML\Graphics.hpp> class Player { public: Player(); void spawn(sf::IntRect arena, sf::Vector2f resolution, int tileSize); void resetPlayerStats(); bool hit(sf::Time timeHit); sf::Time getLastHitTime(); sf::FloatRect getPosition(); sf::Vector2f getCenter(); float getRotation(); sf::Sprite getSprite(); int getHealth(); void moveLeft(); void moveRight(); void moveUp(); void moveDown(); void stopLeft(); void stopRight(); void stopUp(); void stopDown(); void update(float elapsedTime, sf::Vector2i mousePosition); void upgradeSpeed(); void upgradeHealth(); void increaseHealthLevel(int amount); private: const float START_SPEED = 200.0f; const float START_HEALTH = 100.0f; sf::Vector2f m_position; sf::Vector2f m_resolution; sf::Sprite m_sprite; sf::Texture m_texture; sf::IntRect m_arena; int m_tileSize; bool m_upPressed; bool m_downPressed; bool m_rightPressed; bool m_leftPressed; int m_health; int m_maxHealth; sf::Time m_lastHit; float m_speed; }; #endif
[ "Stomfai Zoltan" ]
Stomfai Zoltan
1fd7724f6428beb1f5789f70e100ac6d4d0b71b9
bc6c37cf0469c6b2778707b76227558b3a040718
/ITSA/20144a.cpp
a10800a5daca9bff76a50a4e701647d631c3ead4
[]
no_license
zeroplusone/AlgorithmPractice
241530a5c989f6321543f7bd07a393c405cdf2e6
7fe9182d943bc2066f7fd31cc05096be79dc12cb
refs/heads/master
2022-01-28T21:57:04.393943
2022-01-26T13:46:43
2022-01-26T13:46:43
84,074,414
2
1
null
null
null
null
UTF-8
C++
false
false
1,166
cpp
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> using namespace std; #define MAXN 13 int in[MAXN][MAXN]; int tmp[MAXN][MAXN]; char str[100]; int n; void rr() { int i,j,a,b; for(i=0,a=n-1;i<n;++i,--a) for(j=0;j<n;++j) tmp[j][a]=in[i][j]; for(i=0;i<n;++i) for(j=0;j<n;++j) in[i][j]=tmp[i][j]; } void ll() { int i,j,a,b; for(i=0;i<n;++i) for(j=0,a=n-1;j<n;++j,--a) tmp[a][i]=in[i][j]; for(i=0;i<n;++i) for(j=0;j<n;++j) in[i][j]=tmp[i][j]; } void nn() { int i,j,a,b; for(i=0,a=n-1;i<n;++i,--a) for(j=0;j<n;++j) tmp[a][j]=in[i][j]; for(i=0;i<n;++i) for(j=0;j<n;++j) in[i][j]=tmp[i][j]; } int main() { int t; int i,j,len; scanf("%d",&t); while(t--) { scanf("%d",&n); for(i=0;i<n*n;++i) in[i/n][i%n]=i+1; getchar(); scanf("%s",str); len=strlen(str); for(i=0;i<len;++i) { if(str[i]=='R') rr(); else if(str[i]=='L') ll(); else if(str[i]=='N') nn(); } for(i=0;i<n;++i) { for(j=0;j<n;++j) printf("%d%c",in[i][j],j==n-1?'\n':' '); } if(t!=0) printf("\n"); } return 0; }
[ "a711186@gmail.com" ]
a711186@gmail.com
6a54f646bdac067e8bf6c85b93cc5e4bc56f1185
7a884f353fc6a5b94a1366a3c3cadfc6bcb8ef21
/src/updater/adadelta_updater.cc
3aa8d2f5f125f0ae6c3440571cdb280104abbe45
[ "Apache-2.0" ]
permissive
wataegg/xLearn
3262bc1bff5084aeb75cc5fb09cab051e5ec884f
871564fa70cee7ce5811737d709262c870f940eb
refs/heads/master
2021-06-30T22:37:52.030021
2017-09-18T05:27:34
2017-09-18T05:27:34
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,767
cc
//------------------------------------------------------------------------------ // Copyright (c) 2016 by contributors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. //------------------------------------------------------------------------------ /* Author: Yuze Liao and Chao Ma (mctt90@gmail.com) This file is the implementation of AdaDelta updater. */ #include "src/updater/adadelta_updater.h" #include "src/base/math.h" // for sqrt() namespace xLearn { // This function needs to be invoked before update. void AdaDelta::Initialize(real_t learning_rate, real_t regu_lambda, real_t decay_rate_1, real_t decay_rate_2, index_t num_param) { CHECK_GT(learning_rate, 0); // regu_lambda == 0 means that we will not use regularizer CHECK_GE(regu_lambda, 0); CHECK_GT(decay_rate_1, 0); learning_rate_ = learning_rate; regu_lambda_ = regu_lambda; decay_rate_ = decay_rate_1; _lr = _MMX_SET1_PS(learning_rate_); _lambda = _MMX_SET1_PS(regu_lambda_); _decay_rate = _MMX_SET1_PS(decay_rate_); _small_num = _MMX_SET1_PS(kVerySmallNumber); // Allicating memory for cache vector try { cache_.resize(num_param, 0.0); } catch (std::bad_alloc&) { LOG(FATAL) << "Cannot allocate enough memory for current \ model parameters. Parameter size: " << num_param; } } // AdaDelta updater // [ cache = (1-decay_rate) * (grad^2) + decay_rate * cache ] // [ w -= learning_rate * grad / sqrt(cache) ] void AdaDelta::Update(const index_t id, const real_t grad, std::vector<real_t>& param) { // Do not check anything here cache_[id] = (1-decay_rate_) * (grad * grad) + decay_rate_ * cache_[id]; param[id] -= (learning_rate_ * grad * InvSqrt(cache_[id] + kVerySmallNumber) + // grad regu_lambda_ * param[id]); // regular } // Update a continous space of model parameters by // using sse/avx to speed up. void AdaDelta::BatchUpdate(const std::vector<real_t>& value, const index_t start_id, std::vector<real_t>& param) { // Do not check anything here static __MX _1_minus_decay_rate = _MMX_SET1_PS(1-decay_rate_); for (size_t i = 0; i < value.size(); i += _MMX_INCREMENT) { index_t id = start_id + i; __MX _grad = _MMX_LOAD_PS(value.data() + i); __MX _w = _MMX_LOAD_PS(param.data() + id); __MX _cache = _MMX_LOAD_PS(cache_.data() + id); // [ cache = (1-decay_rate) * (grad^2) + decay_rate * cache ] // [ w -= learning_rate * grad / sqrt(cache) ] _cache = _MMX_ADD_PS( _MMX_MUL_PS( _MMX_MUL_PS(_1_minus_decay_rate, _grad), _grad), _MMX_MUL_PS(_decay_rate, _cache)); _MMX_STORE_PS(cache_.data() + id, _cache); _MMX_STORE_PS(param.data() + id, _MMX_SUB_PS(_w, _MMX_ADD_PS( _MMX_MUL_PS(_lr, _MMX_MUL_PS(_grad, _MMX_RSQRT_PS( _MMX_ADD_PS(_cache, _small_num)))), _MMX_MUL_PS(_lambda, _w)))); } } }// namespace xLearn
[ "mctt90@gmail.com" ]
mctt90@gmail.com
98dc1e1695997a0653f9d6dc74c3d3f32fa7ec2e
263da0905064cea3243aa08316b93bdc53e769b2
/Source/ArenaBattle/Private/ABAIController.cpp
1c1d774a0061de0a848caef696e53a58c2ed0a32
[]
no_license
rylynn6318/UE4study
1dd2f6cf321c2854e5d35921bc81b72c275b0536
1de4c9ed54d2f6d8a7ce20e837709dad79a1a69b
refs/heads/master
2023-03-31T22:14:52.355115
2021-04-06T15:56:39
2021-04-06T15:56:39
339,419,278
1
0
null
null
null
null
UTF-8
C++
false
false
1,373
cpp
// Fill out your copyright notice in the Description page of Project Settings. #include "ABAIController.h" #include "BehaviorTree/BehaviorTree.h" #include "BehaviorTree/BlackboardData.h" #include "BehaviorTree/BlackboardComponent.h" const FName AABAIController::HomePosKey(TEXT("HomePos")); const FName AABAIController::PatrolPosKey(TEXT("PatrolPos")); const FName AABAIController::TargetKey(TEXT("Target")); AABAIController::AABAIController() { static ConstructorHelpers::FObjectFinder<UBlackboardData> BBObject(TEXT("/Game/Book/AI/BB_ABCharacter.BB_ABCharacter")); if (BBObject.Succeeded()) { BBAsset = BBObject.Object; } static ConstructorHelpers::FObjectFinder<UBehaviorTree> BTObject(TEXT("/Game/Book/AI/BT_ABCharacter.BT_ABCharacter")); if (BTObject.Succeeded()) { BTAsset = BTObject.Object; } } void AABAIController::OnPossess(APawn* InPawn) { Super::OnPossess(InPawn); } void AABAIController::RunAI() { if (UseBlackboard(BBAsset, Blackboard)) { Blackboard->SetValueAsVector(HomePosKey, GetPawn()->GetActorLocation()); if (!RunBehaviorTree(BTAsset)) { ABLOG(Error, TEXT("AIController couldn't run behavior tree!")); } } } void AABAIController::StopAI() { auto BehaviorTreeComponent = Cast<UBehaviorTreeComponent>(BrainComponent); if (BehaviorTreeComponent != nullptr) { BehaviorTreeComponent->StopTree(EBTStopMode::Safe); } }
[ "rylynn6318@kumoh.ac.kr" ]
rylynn6318@kumoh.ac.kr
3d8faf0223f375c7719194a11ff4ad8404fc60e0
8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a
/3rdParty/boost/1.78.0/boost/units/base_units/us/pound.hpp
bef6cde3b98cab726d6fe66804885e11accfb4f7
[ "BSL-1.0", "Apache-2.0", "BSD-3-Clause", "ICU", "Zlib", "GPL-1.0-or-later", "OpenSSL", "ISC", "LicenseRef-scancode-gutenberg-2020", "MIT", "GPL-2.0-only", "CC0-1.0", "LicenseRef-scancode-autoconf-simple-exception", "LicenseRef-scancode-pcre", "Bison-exception-2.2", "LicenseRef-scancode...
permissive
arangodb/arangodb
0980625e76c56a2449d90dcb8d8f2c485e28a83b
43c40535cee37fc7349a21793dc33b1833735af5
refs/heads/devel
2023-08-31T09:34:47.451950
2023-08-31T07:25:02
2023-08-31T07:25:02
2,649,214
13,385
982
Apache-2.0
2023-09-14T17:02:16
2011-10-26T06:42:00
C++
UTF-8
C++
false
false
1,052
hpp
// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2007-2008 Steven Watanabe // // 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) #ifndef BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED #define BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED #include <string> #include <boost/units/config.hpp> #include <boost/units/base_unit.hpp> #include <boost/units/physical_dimensions/mass.hpp> #include <boost/units/base_units/cgs/gram.hpp> #include <boost/units/conversion.hpp> BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(us, pound, "pound", "lb", 453.59237, cgs::gram_base_unit, -502); // exact conversion #if BOOST_UNITS_HAS_BOOST_TYPEOF #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() BOOST_TYPEOF_REGISTER_TYPE(boost::units::us::pound_base_unit) #endif #endif // BOOST_UNIT_SYSTEMS_US_POUND_HPP_INCLUDED
[ "frank@arangodb.com" ]
frank@arangodb.com
d9edf3eb548dcf1785648dd5683c772889b754d8
fae551eb54ab3a907ba13cf38aba1db288708d92
/third_party/blink/public/common/input/pointer_id.h
1844b9d830a89dffdaedc2eb832218037f5bf1c4
[ "BSD-3-Clause", "LGPL-2.0-or-later", "LicenseRef-scancode-warranty-disclaimer", "LGPL-2.1-only", "GPL-1.0-or-later", "GPL-2.0-only", "LGPL-2.0-only", "BSD-2-Clause", "LicenseRef-scancode-other-copyleft", "Apache-2.0", "MIT" ]
permissive
xtblock/chromium
d4506722fc6e4c9bc04b54921a4382165d875f9a
5fe0705b86e692c65684cdb067d9b452cc5f063f
refs/heads/main
2023-04-26T18:34:42.207215
2021-05-27T04:45:24
2021-05-27T04:45:24
371,258,442
2
1
BSD-3-Clause
2021-05-27T05:36:28
2021-05-27T05:36:28
null
UTF-8
C++
false
false
449
h
// Copyright (c) 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_INPUT_POINTER_ID_H_ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_INPUT_POINTER_ID_H_ #include <cstdint> namespace blink { using PointerId = std::int32_t; } // namespace blink #endif // THIRD_PARTY_BLINK_PUBLIC_COMMON_INPUT_POINTER_ID_H_
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
8c258558f00b64aa03f33b6cb3961b1573bed345
fad392b7b1533103a0ddcc18e059fcd2e85c0fda
/install/px4_msgs/include/px4_msgs/msg/gimbal_device_set_attitude__rosidl_typesupport_introspection_cpp.hpp
db8d0e90a81d3d61c8b9162e622654b24a84067b
[]
no_license
adamdai/px4_ros_com_ros2
bee6ef27559a3a157d10c250a45818a5c75f2eff
bcd7a1bd13c318d69994a64215f256b9ec7ae2bb
refs/heads/master
2023-07-24T18:09:24.817561
2021-08-23T21:47:18
2021-08-23T21:47:18
399,255,215
0
0
null
null
null
null
UTF-8
C++
false
false
169
hpp
/home/navlab-tx2-4/px4_ros_com_ros2/build/px4_msgs/rosidl_typesupport_introspection_cpp/px4_msgs/msg/gimbal_device_set_attitude__rosidl_typesupport_introspection_cpp.hpp
[ "adamdai97@gmail.com" ]
adamdai97@gmail.com
ac44dee991e96c054f5d58f826ed5f99f255e500
58b63d2afc9468e045b36aac5e3ec8cf80f1bf29
/core/openmm_core/tests/test_openmm_core.cpp
0fab57168a0e95d6c6ed306ec8ed6a5862721199
[ "Apache-2.0" ]
permissive
FoldingAtHome/siegetank-backend
248ba3f49be6d305422b8760513c6d1c78952ead
cb8a15d928e117a0fcaf42f80d79db2825ec5a36
refs/heads/master
2021-05-30T06:24:48.552996
2015-01-07T08:00:59
2015-01-07T08:00:59
13,896,001
2
1
null
null
null
null
UTF-8
C++
false
false
426
cpp
#include <OpenMMCore.h> #include <map> #include <string> #include <stdexcept> #include <iostream> #include <signal.h> #include <fstream> using namespace std; void test_openmm_core() { ifstream core_keys("../../../../core_keys.log"); string key; core_keys >> key; OpenMMCore core(key); core.startStream("127.0.0.1:8980", "", ""); } int main() { OpenMMCore::registerComponents(); test_openmm_core(); }
[ "yutong.zhao@stanford.edu" ]
yutong.zhao@stanford.edu
1dc8ead9fbaff2392e5b3e61e3135f76844741b0
abf24191265fb9e6648cf1de7ed848fbe291da7c
/cugl/include/cugl/2d/physics/CUWheelObstacle.h
a9955a2a96064f93315a214b30035e22c2c7c806
[]
no_license
onewordstudios/sweetspace
4ecc3fe27fb794fac6e8b2e8402f9b010f5553a4
5d071cd68eb925b9ae1b004ce5d6080cc3261d30
refs/heads/master
2023-02-04T11:13:34.287462
2023-02-03T04:03:24
2023-02-03T04:03:24
241,430,856
9
2
null
2023-02-03T04:03:26
2020-02-18T18:00:44
C++
UTF-8
C++
false
false
7,872
h
// // CUWheelObstacle.h // Cornell Extensions to Cocos2D // // This class implements a circular Physics object. We do not use it in any of // our samples, but it is included for your education. Note that the shape // must be circular, not elliptical. If you want to make an ellipse, you will // need to use the PolygonObstacle class. // // This class uses our standard shared-pointer architecture. // // 1. The constructor does not perform any initialization; it just sets all // attributes to their defaults. // // 2. All initialization takes place via init methods, which can fail if an // object is initialized more than once. // // 3. All allocation takes place via static constructors which return a shared // pointer. // // CUGL MIT License: // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, and must not // be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // // This file is based on the CS 3152 PhysicsDemo Lab by Don Holden, 2007 // // Author: Walker White // Version: 11/6/16 // #ifndef __CU_WHEEL_OBSTACLE_H__ #define __CU_WHEEL_OBSTACLE_H__ #include <Box2D/Collision/Shapes/b2CircleShape.h> #include "CUSimpleObstacle.h" namespace cugl { #pragma mark - #pragma mark Wheel Obstacle /** * Circle-shaped model to support collisions. * * Note that the shape must be circular, not elliptical. If you want to make an * ellipse, you will need to use the PolygonObstacle class. * * Unless otherwise specified, the center of mass is as the center. */ class WheelObstacle : public SimpleObstacle { protected: /** Shape information for this box */ b2CircleShape _shape; /** A cache value for the fixture (for resizing) */ b2Fixture* _geometry; #pragma mark - #pragma mark Scene Graph Methods /** * Creates the outline of the physics fixtures in the debug node * * The debug node is use to outline the fixtures attached to this object. * This is very useful when the fixtures have a very different shape than * the texture (e.g. a circular shape attached to a square texture). */ virtual void resetDebug() override; #pragma mark - #pragma mark Constructors public: /** * Creates a new wheel object at the origin. * * NEVER USE A CONSTRUCTOR WITH NEW. If you want to allocate an object on * the heap, use one of the static constructors instead. */ WheelObstacle(void) : SimpleObstacle(), _geometry(nullptr) { } /** * Deletes this physics object and all of its resources. * * We have to make the destructor public so that we can polymorphically * delete physics objects. * * A non-default destructor is necessary since we must release all * claims on scene graph nodes. */ virtual ~WheelObstacle() { CUAssertLog(_geometry == nullptr, "You must deactive physics before deleting an object"); } /** * Initializes a new wheel object at the origin with no size. * * @return true if the obstacle is initialized properly, false otherwise. */ virtual bool init() override { return init(Vec2::ZERO,0.0); } /** * Initializes a new wheel object at the given point with no size. * * The scene graph is completely decoupled from the physics system. * The node does not have to be the same size as the physics body. We * only guarantee that the scene graph node is positioned correctly * according to the drawing scale. * * @param pos Initial position in world coordinates * * @return true if the obstacle is initialized properly, false otherwise. */ virtual bool init(const Vec2& pos) override { return init(pos,0.0); } /** * Initializes a new wheel object of the given dimensions. * * The scene graph is completely decoupled from the physics system. * The node does not have to be the same size as the physics body. We * only guarantee that the scene graph node is positioned correctly * according to the drawing scale. * * @param pos Initial position in world coordinates * @param radius The wheel radius * * @return true if the obstacle is initialized properly, false otherwise. */ virtual bool init(const Vec2& pos, float radius); #pragma mark - #pragma mark Static Constructors /** * Returns a new wheel object at the origin with no radius. * * @return a new wheel object at the origin with no radius. */ static std::shared_ptr<WheelObstacle> alloc() { std::shared_ptr<WheelObstacle> result = std::make_shared<WheelObstacle>(); return (result->init() ? result : nullptr); } /** * Returns a new wheel object at the given point with no radius. * * The scene graph is completely decoupled from the physics system. * The node does not have to be the same size as the physics body. We * only guarantee that the scene graph node is positioned correctly * according to the drawing scale. * * @param pos Initial position in world coordinates * * @return a new wheel object at the given point with no radius. */ static std::shared_ptr<WheelObstacle> alloc(const Vec2& pos) { std::shared_ptr<WheelObstacle> result = std::make_shared<WheelObstacle>(); return (result->init(pos) ? result : nullptr); } /** * Returns a new wheel object of the given radius. * * The scene graph is completely decoupled from the physics system. * The node does not have to be the same size as the physics body. We * only guarantee that the scene graph node is positioned correctly * according to the drawing scale. * * @param pos Initial position in world coordinates * @param radius The wheel radius * * @return a new wheel object of the given radius. */ static std::shared_ptr<WheelObstacle> alloc(const Vec2& pos, float radius) { std::shared_ptr<WheelObstacle> result = std::make_shared<WheelObstacle>(); return (result->init(pos,radius) ? result : nullptr); } #pragma mark - #pragma mark Dimensions /** * Returns the radius of this circle * * @return the radius of this circle */ float getRadius() const { return _shape.m_radius; } /** * Sets the radius of this circle * * @param value the radius of this circle */ void setRadius(float value) { _shape.m_radius = value; markDirty(true); } #pragma mark - #pragma mark Physics Methods /** * Create new fixtures for this body, defining the shape * * This is the primary method to override for custom physics objects */ virtual void createFixtures() override; /** * Release the fixtures for this body, reseting the shape * * This is the primary method to override for custom physics objects */ virtual void releaseFixtures() override; }; } #endif /* __CU_WHEEL_OBSTACLE_H__ */
[ "mt-xing@users.noreply.github.com" ]
mt-xing@users.noreply.github.com
eaa6121f82b4efe59291317cb8649b66d4d593fb
4f2c79bc5f9273cd1098ae35879d5f5fe16aaadd
/pass objectwith frind fun.cpp
b03890d25be38fe2f754087d4f1a9c904adb83f7
[]
no_license
naeem182/c-plus-language
3f83b8fd621782d834633bec6ea315bc8deda1c6
e9d58104e5e5386ac009897ba3712f2700cb610f
refs/heads/main
2023-03-03T00:12:57.026382
2021-02-12T05:58:59
2021-02-12T05:58:59
338,059,760
0
0
null
null
null
null
UTF-8
C++
false
false
1,110
cpp
//class name:my classvalue set with with constructor and a friend fun name add thats pass obj #include<iostream> using namespace std; class myclass { int a,b; //us friend fun public: myclass(int i,int j) { a=i; b=j; } //declae friend class friend void add(myclass ob); //friend prototype fun_name(class_name obj_name); }; void add(myclass ob1) { cout<<"sum:"<<ob1.a+ob1.b; } int main() { myclass naeem(80,81); add(naeem); } //;;;
[ "naeemislamjr182@gmail.com" ]
naeemislamjr182@gmail.com
904fcc8ea1ec909e543c916d1c1500e5e42b81dd
236219800f83a09d90b3a768870ae0e227cdaa95
/rocAL/rocAL/source/node_flip.cpp
31c4cdd7d65ac7611d5ab7887e69c2a97b8217d2
[ "MIT" ]
permissive
shobana-mcw/MIVisionX
40ebcd5fd078677ccff388d613088b97a2b0c82e
f27100845954a74746a03e674fa29add9d454aaa
refs/heads/master
2023-07-25T10:52:59.252882
2022-03-02T10:34:55
2022-03-02T10:34:55
275,117,269
0
3
MIT
2023-06-02T08:15:37
2020-06-26T09:16:59
C++
UTF-8
C++
false
false
2,081
cpp
/* Copyright (c) 2019 - 2022 Advanced Micro Devices, Inc. All rights reserved. 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 <vx_ext_rpp.h> #include <graph.h> #include "node_flip.h" #include "exception.h" FlipNode::FlipNode(const std::vector<Image *> &inputs, const std::vector<Image *> &outputs) : Node(inputs, outputs), _flip_axis(FLIP_SIZE[0], FLIP_SIZE[1]) { } void FlipNode::create_node() { if(_node) return; _flip_axis.create_array(_graph ,VX_TYPE_UINT32 ,_batch_size); _node = vxExtrppNode_FlipbatchPD(_graph->get(), _inputs[0]->handle(), _src_roi_width, _src_roi_height, _outputs[0]->handle(), _flip_axis.default_array(), _batch_size); vx_status status; if((status = vxGetStatus((vx_reference)_node)) != VX_SUCCESS) THROW("Adding the flip (vxExtrppNode_Flip) node failed: "+ TOSTR(status)) } void FlipNode::init(int flip_axis) { _flip_axis.set_param(flip_axis); } void FlipNode::init(IntParam* flip_axis) { _flip_axis.set_param(core(flip_axis)); } void FlipNode::update_node() { _flip_axis.update_array(); }
[ "noreply@github.com" ]
noreply@github.com
29e07f90c7bc38da2686562fc0c6060f566d4e21
e69198f43d3fd9d3272028ea253bcfe30e9698d6
/caf_trigger/src/Probability_TopEMu_L1.cpp
970a7d37da52113273379f7f3b93897fbe3bca89
[]
no_license
hengne/d0wmass
a8514dfb01db7d9a60aa517e49bb6bc980c8cd24
f25d5ddb4616b00ca1e9ab83c02657844b778c3b
refs/heads/master
2021-01-20T18:20:06.573869
2016-06-05T13:30:24
2016-06-05T13:30:24
60,460,795
0
0
null
null
null
null
UTF-8
C++
false
false
15,270
cpp
//---------------------------------------------------------- //Author: Thomas Gadfort (tgadfort@fnal.gov) // Len Christofek (leonard@fnal.gov) // //Last Updated: 2/9/06 // //Purpose: Calculates the probability an muon+electron of a certain quality // passes the top mu+electrons level1 trigger condition //---------------------------------------------------------- //Header file for this class #include "caf_trigger/Probability_TopEMu_L1.hpp" using namespace std; Probability_TopEMu_L1::Probability_TopEMu_L1(const char *name) : probProcessor(name) { //We grab terms from the CAFe configuration file here cafe::Config config(name); //------------------------------------ // Get the list of trigger versions //------------------------------------ _trigger_version = config.getVString("TriggerVersions", ","); //------------------------------------ // Debug //------------------------------------ std::string debug = config.get("Debug", "no"); _debug = ( debug == "yes" ); //------------------------------------ // Split electrons turn on curves //------------------------------------ std::string split_electron = config.get("SplitElectron", "yes"); _split_electron = ( split_electron == "yes" ); //------------------------------------ // Save the number of trigger version for later use //------------------------------------ _num_trigger_versions = _trigger_version.size(); if ( _num_trigger_versions == 0 ) { cout << "There are no trigger versions. caf_trigger will not work." << endl; exit(1); } //------------------------------------ // Store the eff_utils look-up information //------------------------------------ _flags.push_back("EffName"); _flags.push_back("EffType"); _flags.push_back("EffVarNames"); _flags.push_back("ObjQuality"); _flags.push_back("ObjRelativeTo"); _flags.push_back("ObjType"); _flags.push_back("Source"); _flags.push_back("AddToEffUtils"); _object.push_back("Muon"); _object.push_back("Electron"); _object.push_back("Track"); _location.push_back("_INC"); _location.push_back("_CC"); _location.push_back("_EC"); _location.push_back("_ICD"); _level = "Level1"; //------------------------------------ // Create a map of trigger versions for later use //------------------------------------ for ( int i = 0; i < _num_trigger_versions; i++ ) { std::string version = _trigger_version[i]; _trigger_version_map[version] = i; for ( int l = 0; l < _location.size(); l++ ) { std::string detector = _location[l]; for ( int k = 0; k < _object.size(); k++ ) { std::string object = _object[k]; std::string add_to_eff_utils; for ( int j = 0; j < _flags.size(); j++ ) { std::string flag = _flags[j]; std::stringstream flag_name; flag_name << _level << object << flag << "_" << version << detector; std::vector<std::string> tmp; if ( flag == "AddToEffUtils" ) { tmp.push_back(add_to_eff_utils); } else { tmp = config.getVString(flag_name.str().c_str(), " "); } if ( flag == "EffVarNames" ) { if ( tmp.size() == 0 ) { add_to_eff_utils = "no"; } else { add_to_eff_utils = "yes"; } } if ( flag == "EffName" && tmp.size() == 0 ) { tmp.push_back("eff"); } if ( flag == "EffType" && tmp.size() == 0 ) { tmp.push_back("Binned"); } if ( flag == "ObjQuality" && tmp.size() == 0 ) { tmp.push_back("matched"); } if ( flag == "ObjRelativeTo" && tmp.size() == 0 ) { if ( object == "Muon" ) { tmp.push_back("mediumnseg3"); } if ( object == "Electron" ) { tmp.push_back("loose"); } } if ( flag == "ObjType" && tmp.size() == 0 ) { if ( object == "Track" ) { tmp.push_back("Muon"); } else { tmp.push_back(object); } } if ( flag == "Source" && tmp.size() == 0 ) { tmp.push_back("TopTrigger"); } _trigger_map[flag_name.str()] = tmp; } } } } //------------------------------------ // The sigma calculations. False by default //------------------------------------ _sigma = config.get("sigma", "false"); } //EffInfo terms are defined here void Probability_TopEMu_L1::defineEffInfo(std::map< std::string, eff_utils::EffInfo >& _effInfo) { _passedToProc = false; //------------------------------------ // We create an EffInfo request, then shove it in an object // with a name of our choosing to be used later on. //------------------------------------ for ( int i = 0; i < _num_trigger_versions; i++ ) { std::string version = _trigger_version[i]; for ( int l = 0; l < _location.size(); l++ ) { std::string detector = _location[l]; for ( int k = 0; k < _object.size(); k++ ) { std::string object = _object[k]; std::stringstream do_name; do_name << _level << object << "AddToEffUtils_" << version << detector; if ( _trigger_map[do_name.str()][0] == "yes" ) { std::stringstream effInfoName; effInfoName << _level << object << "_" << version << detector; // cout << "Going to store infomration : " << effInfoName.str() << endl; for ( int j = 0; j < _flags.size(); j++ ) { std::string flag = _flags[j]; std::stringstream flag_name; flag_name << _level << object << flag << "_" << version << detector; std::vector<std::string> eff_utils_variable = _trigger_map[flag_name.str()]; if ( flag == "EffName" ) { _effInfo[effInfoName.str().c_str()].EffName(eff_utils_variable[0]); } if ( flag == "EffVarNames" ) { _effInfo[effInfoName.str().c_str()].EffVarNames(eff_utils_variable); } if ( flag == "EffType" ) { _effInfo[effInfoName.str().c_str()].EffType(eff_utils_variable[0]); } if ( flag == "ObjQuality" ) { _effInfo[effInfoName.str().c_str()].ObjQuality(eff_utils_variable[0]); } if ( flag == "ObjRelativeTo" && object == "Muon" ) { _effInfo[effInfoName.str().c_str()].ObjRelativeTo(eff_utils_variable[0]); } if ( flag == "ObjType" ) { _effInfo[effInfoName.str().c_str()].ObjType(eff_utils_variable[0]); } } } } } } } //-------------------------------------- // The actual probability calculations are defined here and after calcProb //-------------------------------------- double Probability_TopEMu_L1::calcProb(std::string version) { //------------------------------------ // This sets up the channel name and is important to set! // This is the value specified to combine in the config file //------------------------------------ _channel = "TopEMu_L1"; double probability = Prob_TopEMu_L1(version); return probability; } //------------------------------------------------------------------------------ // This calculates the l1 probability // P_L1(muon,electron,track) = P_L1(muon) * P_L1(electron) * P_L1(track) //------------------------------------------------------------------------------ double Probability_TopEMu_L1::Prob_TopEMu_L1(std::string version) { double probability = ( Prob_TopEMu_Muon_L1(version) * Prob_TopEMu_Electron_L1(version) * Prob_TopEMu_Track_L1(version) ); if ( _debug ) { cout << "EMu L1 probability = " << probability << endl; } return probability; } //------------------------------------------------------------------------------ // This calculates the track l1 probability //------------------------------------------------------------------------------ double Probability_TopEMu_L1::Prob_TopEMu_Track_L1(std::string version){ std::string object = "Track"; bool valid = false; for ( int i = 0; i < _location.size(); i++ ) { std::string detector = _location[i]; std::stringstream do_name; do_name << _level << object << "AddToEffUtils_" << version << detector; if ( _trigger_map[do_name.str()][0] == "yes" ) { valid = true; } } if ( valid == false ) { return( 1.0 ); } //------------------------------------ // We setup an array to simplify the code and check that the number // of terms is valid //------------------------------------ std::vector<double> probArray; double sig = 0.0; std::stringstream effInfoName; effInfoName << _level << object << "_" << version << "_INC"; const objectProbabilities *prob = probObject(effInfoName.str().c_str()); if ( prob == 0 ) { cout << endl; cout << "Could not find the effInfo information" << endl; cout << "You gave: " << effInfoName.str() << endl; exit(1); } //------------------------------------ // Sum over muon and electron tracks //------------------------------------ for(int iobj = 0; iobj < NMU; ++iobj) { const TMBTrack *muon_track = MU[iobj].GetChargedTrack() ; float val = prob->getProbability(*muon_track, sig, isRun2b, _debug); probArray.push_back(val); } for(int iobj = 0; iobj < NEM; ++iobj) { const TMBTrack *electron_track = EM[iobj].GetChargedTrack() ; float val = prob->getProbability(*electron_track, sig, isRun2b, _debug); probArray.push_back(val); } //------------------------------------ // P(not) = Sum(track) ( 1 - P(track) ) //------------------------------------ double tmpProb = 1.0; for(int iobj = 0; iobj < probArray.size(); ++iobj) { tmpProb *= (1.0 - probArray[iobj]); } //------------------------------------ // We've calculate the P(no) and we need P //------------------------------------ double probCalc; probCalc = 1.0 - tmpProb; //------------------------------------ // Make sure the probability is [0,1] //------------------------------------ if(probCalc > 1.0) { probCalc = 1.0; } else if(probCalc < 0.0) { probCalc = 0.0; } if ( _debug ) { cout << _channel << " Track Probability = " << probCalc << endl; } double probability; probability = probCalc; return probability; } //------------------------------------------------------------------------------ // This calculates the muon l1 probability //------------------------------------------------------------------------------ double Probability_TopEMu_L1::Prob_TopEMu_Muon_L1(std::string version){ std::string object = "Muon"; bool valid = false; for ( int i = 0; i < _location.size(); i++ ) { std::string detector = _location[i]; std::stringstream do_name; do_name << _level << object << "AddToEffUtils_" << version << detector; if ( _trigger_map[do_name.str()][0] == "yes" ) { valid = true; } } if ( valid == false ) { return( 1.0 ); } //------------------------------------ // We setup an array to simplify the code and check that the number // of terms is valid //------------------------------------ std::vector<double> probArray; double probElectron; double probEM; //------------------------------------ // Loop over all muons to get L1 probability //------------------------------------ for(int iobj = 0; iobj < NMU; ++iobj) { std::stringstream effInfoName; effInfoName << _level << object << "_" << version << "_INC"; const objectProbabilities *prob = probObject(effInfoName.str().c_str()); if ( prob == 0 ) { cout << endl; cout << "Could not find the effInfo information" << endl; cout << "You gave: " << effInfoName.str() << endl; exit(1); } double sig = 0.0; float val = prob->getProbability(MU[iobj], sig, isRun2b, _debug); // cout << "Level1 muon = " << val << "\t" << effInfoName.str() << endl; probArray.push_back( val ); } //------------------------------------ // P(not) = Sum(muons) ( 1 - P(muon) ) //------------------------------------ double tmpProb = 1.0; for(int iobj = 0; iobj < NMU; ++iobj) { tmpProb *= (1.0 - probArray[iobj]); } //------------------------------------ // We've calculate the P(no) and we need P //------------------------------------ double probCalc; probCalc = 1.0 - tmpProb; //------------------------------------ // Make sure the probability is [0,1] //------------------------------------ if(probCalc > 1.0) { probCalc = 1.0; } else if(probCalc < 0.0) { probCalc = 0.0; } if ( _debug ) { cout << _channel << " Muon Probability = " << probCalc << endl; } double probability; probability = probCalc; return probability; } //------------------------------------------------------------------------------ // This calculates the electron l1 probability //------------------------------------------------------------------------------ double Probability_TopEMu_L1::Prob_TopEMu_Electron_L1(std::string version){ std::string object = "Electron"; bool valid = false; for ( int i = 0; i < _location.size(); i++ ) { std::string detector = _location[i]; std::stringstream do_name; do_name << _level << object << "AddToEffUtils_" << version << detector; if ( _trigger_map[do_name.str()][0] == "yes" ) { valid = true; } } if ( valid == false ) { return( 1.0 ); } //------------------------------------ // We setup an array to simplify the code and check that the number // of terms is valid //------------------------------------ std::vector<double> probArray; double probElectron; double probEM; //------------------------------------ // Loop over all electrons to get L1 probability //------------------------------------ for(int iobj = 0; iobj < NEM; ++iobj) { std::stringstream effInfoName; double detector_eta = TMath::Abs(EM[iobj].CalDetectorEta()); std::string detector; if ( _split_electron ) { if ( detector_eta <= 1.1 ) { effInfoName << _level << object << "_" << version << "_CC"; } else { effInfoName << _level << object << "_" << version << "_EC"; } } else { effInfoName << _level << object << "_" << version << "_INC"; } const objectProbabilities *prob = probObject(effInfoName.str().c_str()); if ( prob == 0 ) { cout << endl; cout << "Could not find the effInfo information" << endl; cout << "You gave: " << effInfoName.str() << endl; exit(1); } double sig = 0.0; float val = prob->getProbability(EM[iobj], sig, isRun2b, _debug); probArray.push_back( val ); } //------------------------------------ // P(not) = Sum(electrons) ( 1 - P(electron) ) //------------------------------------ double tmpProb = 1.0; for(int iobj = 0; iobj < NEM; ++iobj) { tmpProb *= (1.0 - probArray[iobj]); } //------------------------------------ // We've calculate the P(no) and we need P //------------------------------------ double probCalc; probCalc = 1.0 - tmpProb; //------------------------------------ // Make sure the probability is [0,1] //------------------------------------ if(probCalc > 1.0) { probCalc = 1.0; } else if(probCalc < 0.0) { probCalc = 0.0; } if ( _debug ) { cout << _channel << " Electron Probability = " << probCalc << endl; } double probability; probability = probCalc; return probability; } ClassImp(Probability_TopEMu_L1)
[ "Hengne.Li@cern.ch" ]
Hengne.Li@cern.ch
62e9beaa4247e99633ea2a666bbd9823421405ff
7d7a8fc7492c914198f6fa5abe691120f1306968
/VLSINew/SHA/solution2_Kintex_with_hardware/syn/systemc/sha256_transform_5.cpp
413e55c25363535b587fcd84190420d61cc26d79
[]
no_license
Anujkumar12/VLSI
fe23723dcc8923b21e71ac907e1074685a541e7e
c8e94a6784c38b63faa43498d5df386eba35878d
refs/heads/main
2023-07-11T17:46:03.497283
2021-08-30T09:06:36
2021-08-30T09:06:36
401,279,176
0
1
null
null
null
null
UTF-8
C++
false
false
147,621
cpp
#include "sha256_transform.h" #include "AESL_pkg.h" using namespace std; namespace ap_rtl { void sha256_transform::thread_or_ln54_101_fu_7982_p3() { or_ln54_101_fu_7982_p3 = esl_concat<13,19>(trunc_ln54_58_fu_7978_p1.read(), lshr_ln54_101_fu_7968_p4.read()); } void sha256_transform::thread_or_ln54_102_fu_8004_p3() { or_ln54_102_fu_8004_p3 = esl_concat<22,10>(trunc_ln54_59_fu_8000_p1.read(), lshr_ln54_102_fu_7990_p4.read()); } void sha256_transform::thread_or_ln54_103_fu_8521_p3() { or_ln54_103_fu_8521_p3 = esl_concat<13,19>(trunc_ln54_61_fu_8517_p1.read(), lshr_ln54_103_fu_8507_p4.read()); } void sha256_transform::thread_or_ln54_104_fu_8543_p3() { or_ln54_104_fu_8543_p3 = esl_concat<22,10>(trunc_ln54_62_fu_8539_p1.read(), lshr_ln54_104_fu_8529_p4.read()); } void sha256_transform::thread_or_ln54_105_fu_9059_p3() { or_ln54_105_fu_9059_p3 = esl_concat<13,19>(trunc_ln54_64_fu_9055_p1.read(), lshr_ln54_105_fu_9045_p4.read()); } void sha256_transform::thread_or_ln54_106_fu_9081_p3() { or_ln54_106_fu_9081_p3 = esl_concat<22,10>(trunc_ln54_65_fu_9077_p1.read(), lshr_ln54_106_fu_9067_p4.read()); } void sha256_transform::thread_or_ln54_107_fu_9295_p3() { or_ln54_107_fu_9295_p3 = esl_concat<13,19>(trunc_ln54_67_fu_9291_p1.read(), lshr_ln54_107_fu_9281_p4.read()); } void sha256_transform::thread_or_ln54_108_fu_9317_p3() { or_ln54_108_fu_9317_p3 = esl_concat<22,10>(trunc_ln54_68_fu_9313_p1.read(), lshr_ln54_108_fu_9303_p4.read()); } void sha256_transform::thread_or_ln54_109_fu_9687_p3() { or_ln54_109_fu_9687_p3 = esl_concat<13,19>(trunc_ln54_70_fu_9683_p1.read(), lshr_ln54_109_fu_9673_p4.read()); } void sha256_transform::thread_or_ln54_10_fu_4823_p3() { or_ln54_10_fu_4823_p3 = esl_concat<2,30>(trunc_ln54_30_fu_4819_p1.read(), lshr_ln54_10_fu_4809_p4.read()); } void sha256_transform::thread_or_ln54_110_fu_9709_p3() { or_ln54_110_fu_9709_p3 = esl_concat<22,10>(trunc_ln54_71_fu_9705_p1.read(), lshr_ln54_110_fu_9695_p4.read()); } void sha256_transform::thread_or_ln54_111_fu_9925_p3() { or_ln54_111_fu_9925_p3 = esl_concat<13,19>(trunc_ln54_73_fu_9921_p1.read(), lshr_ln54_111_fu_9911_p4.read()); } void sha256_transform::thread_or_ln54_112_fu_9947_p3() { or_ln54_112_fu_9947_p3 = esl_concat<22,10>(trunc_ln54_74_fu_9943_p1.read(), lshr_ln54_112_fu_9933_p4.read()); } void sha256_transform::thread_or_ln54_113_fu_10464_p3() { or_ln54_113_fu_10464_p3 = esl_concat<13,19>(trunc_ln54_76_fu_10460_p1.read(), lshr_ln54_113_fu_10450_p4.read()); } void sha256_transform::thread_or_ln54_114_fu_10486_p3() { or_ln54_114_fu_10486_p3 = esl_concat<22,10>(trunc_ln54_77_fu_10482_p1.read(), lshr_ln54_114_fu_10472_p4.read()); } void sha256_transform::thread_or_ln54_115_fu_11161_p3() { or_ln54_115_fu_11161_p3 = esl_concat<13,19>(trunc_ln54_79_fu_11157_p1.read(), lshr_ln54_115_fu_11147_p4.read()); } void sha256_transform::thread_or_ln54_116_fu_11183_p3() { or_ln54_116_fu_11183_p3 = esl_concat<22,10>(trunc_ln54_80_fu_11179_p1.read(), lshr_ln54_116_fu_11169_p4.read()); } void sha256_transform::thread_or_ln54_117_fu_11397_p3() { or_ln54_117_fu_11397_p3 = esl_concat<13,19>(trunc_ln54_82_fu_11393_p1.read(), lshr_ln54_117_fu_11383_p4.read()); } void sha256_transform::thread_or_ln54_118_fu_11419_p3() { or_ln54_118_fu_11419_p3 = esl_concat<22,10>(trunc_ln54_83_fu_11415_p1.read(), lshr_ln54_118_fu_11405_p4.read()); } void sha256_transform::thread_or_ln54_119_fu_12719_p3() { or_ln54_119_fu_12719_p3 = esl_concat<13,19>(trunc_ln54_85_fu_12715_p1.read(), lshr_ln54_119_fu_12705_p4.read()); } void sha256_transform::thread_or_ln54_11_fu_5461_p3() { or_ln54_11_fu_5461_p3 = esl_concat<2,30>(trunc_ln54_33_fu_5457_p1.read(), lshr_ln54_11_fu_5447_p4.read()); } void sha256_transform::thread_or_ln54_120_fu_12741_p3() { or_ln54_120_fu_12741_p3 = esl_concat<22,10>(trunc_ln54_86_fu_12737_p1.read(), lshr_ln54_120_fu_12727_p4.read()); } void sha256_transform::thread_or_ln54_121_fu_12956_p3() { or_ln54_121_fu_12956_p3 = esl_concat<13,19>(trunc_ln54_88_fu_12952_p1.read(), lshr_ln54_121_fu_12942_p4.read()); } void sha256_transform::thread_or_ln54_122_fu_12978_p3() { or_ln54_122_fu_12978_p3 = esl_concat<22,10>(trunc_ln54_89_fu_12974_p1.read(), lshr_ln54_122_fu_12964_p4.read()); } void sha256_transform::thread_or_ln54_123_fu_14426_p3() { or_ln54_123_fu_14426_p3 = esl_concat<13,19>(trunc_ln54_91_fu_14422_p1.read(), lshr_ln54_123_fu_14412_p4.read()); } void sha256_transform::thread_or_ln54_124_fu_14448_p3() { or_ln54_124_fu_14448_p3 = esl_concat<22,10>(trunc_ln54_92_fu_14444_p1.read(), lshr_ln54_124_fu_14434_p4.read()); } void sha256_transform::thread_or_ln54_125_fu_15610_p3() { or_ln54_125_fu_15610_p3 = esl_concat<13,19>(trunc_ln54_94_fu_15606_p1.read(), lshr_ln54_125_fu_15596_p4.read()); } void sha256_transform::thread_or_ln54_126_fu_15632_p3() { or_ln54_126_fu_15632_p3 = esl_concat<22,10>(trunc_ln54_95_fu_15628_p1.read(), lshr_ln54_126_fu_15618_p4.read()); } void sha256_transform::thread_or_ln54_127_fu_15845_p3() { or_ln54_127_fu_15845_p3 = esl_concat<13,19>(trunc_ln54_97_fu_15841_p1.read(), lshr_ln54_127_fu_15831_p4.read()); } void sha256_transform::thread_or_ln54_128_fu_15867_p3() { or_ln54_128_fu_15867_p3 = esl_concat<22,10>(trunc_ln54_98_fu_15863_p1.read(), lshr_ln54_128_fu_15853_p4.read()); } void sha256_transform::thread_or_ln54_129_fu_16530_p3() { or_ln54_129_fu_16530_p3 = esl_concat<13,19>(trunc_ln54_100_fu_16526_p1.read(), lshr_ln54_129_fu_16516_p4.read()); } void sha256_transform::thread_or_ln54_12_fu_5696_p3() { or_ln54_12_fu_5696_p3 = esl_concat<2,30>(trunc_ln54_36_fu_5692_p1.read(), lshr_ln54_12_fu_5682_p4.read()); } void sha256_transform::thread_or_ln54_130_fu_16552_p3() { or_ln54_130_fu_16552_p3 = esl_concat<22,10>(trunc_ln54_101_fu_16548_p1.read(), lshr_ln54_130_fu_16538_p4.read()); } void sha256_transform::thread_or_ln54_131_fu_16767_p3() { or_ln54_131_fu_16767_p3 = esl_concat<13,19>(trunc_ln54_103_fu_16763_p1.read(), lshr_ln54_131_fu_16753_p4.read()); } void sha256_transform::thread_or_ln54_132_fu_16789_p3() { or_ln54_132_fu_16789_p3 = esl_concat<22,10>(trunc_ln54_104_fu_16785_p1.read(), lshr_ln54_132_fu_16775_p4.read()); } void sha256_transform::thread_or_ln54_133_fu_17252_p3() { or_ln54_133_fu_17252_p3 = esl_concat<13,19>(trunc_ln54_106_fu_17248_p1.read(), lshr_ln54_133_fu_17238_p4.read()); } void sha256_transform::thread_or_ln54_134_fu_17274_p3() { or_ln54_134_fu_17274_p3 = esl_concat<22,10>(trunc_ln54_107_fu_17270_p1.read(), lshr_ln54_134_fu_17260_p4.read()); } void sha256_transform::thread_or_ln54_135_fu_17496_p3() { or_ln54_135_fu_17496_p3 = esl_concat<13,19>(trunc_ln54_109_fu_17492_p1.read(), lshr_ln54_135_fu_17482_p4.read()); } void sha256_transform::thread_or_ln54_136_fu_17518_p3() { or_ln54_136_fu_17518_p3 = esl_concat<22,10>(trunc_ln54_110_fu_17514_p1.read(), lshr_ln54_136_fu_17504_p4.read()); } void sha256_transform::thread_or_ln54_137_fu_17731_p3() { or_ln54_137_fu_17731_p3 = esl_concat<13,19>(trunc_ln54_112_fu_17727_p1.read(), lshr_ln54_137_fu_17717_p4.read()); } void sha256_transform::thread_or_ln54_138_fu_17753_p3() { or_ln54_138_fu_17753_p3 = esl_concat<22,10>(trunc_ln54_113_fu_17749_p1.read(), lshr_ln54_138_fu_17739_p4.read()); } void sha256_transform::thread_or_ln54_139_fu_17964_p3() { or_ln54_139_fu_17964_p3 = esl_concat<13,19>(trunc_ln54_115_fu_17960_p1.read(), lshr_ln54_139_fu_17950_p4.read()); } void sha256_transform::thread_or_ln54_13_fu_5930_p3() { or_ln54_13_fu_5930_p3 = esl_concat<2,30>(trunc_ln54_39_fu_5926_p1.read(), lshr_ln54_13_fu_5916_p4.read()); } void sha256_transform::thread_or_ln54_140_fu_17986_p3() { or_ln54_140_fu_17986_p3 = esl_concat<22,10>(trunc_ln54_116_fu_17982_p1.read(), lshr_ln54_140_fu_17972_p4.read()); } void sha256_transform::thread_or_ln54_141_fu_18201_p3() { or_ln54_141_fu_18201_p3 = esl_concat<13,19>(trunc_ln54_118_fu_18197_p1.read(), lshr_ln54_141_fu_18187_p4.read()); } void sha256_transform::thread_or_ln54_142_fu_18223_p3() { or_ln54_142_fu_18223_p3 = esl_concat<22,10>(trunc_ln54_119_fu_18219_p1.read(), lshr_ln54_142_fu_18209_p4.read()); } void sha256_transform::thread_or_ln54_143_fu_18432_p3() { or_ln54_143_fu_18432_p3 = esl_concat<13,19>(trunc_ln54_121_fu_18428_p1.read(), lshr_ln54_143_fu_18418_p4.read()); } void sha256_transform::thread_or_ln54_144_fu_18454_p3() { or_ln54_144_fu_18454_p3 = esl_concat<22,10>(trunc_ln54_122_fu_18450_p1.read(), lshr_ln54_144_fu_18440_p4.read()); } void sha256_transform::thread_or_ln54_145_fu_18666_p3() { or_ln54_145_fu_18666_p3 = esl_concat<13,19>(trunc_ln54_124_fu_18662_p1.read(), lshr_ln54_145_fu_18652_p4.read()); } void sha256_transform::thread_or_ln54_146_fu_18688_p3() { or_ln54_146_fu_18688_p3 = esl_concat<22,10>(trunc_ln54_125_fu_18684_p1.read(), lshr_ln54_146_fu_18674_p4.read()); } void sha256_transform::thread_or_ln54_147_fu_18901_p3() { or_ln54_147_fu_18901_p3 = esl_concat<13,19>(trunc_ln54_127_fu_18897_p1.read(), lshr_ln54_147_fu_18887_p4.read()); } void sha256_transform::thread_or_ln54_148_fu_18923_p3() { or_ln54_148_fu_18923_p3 = esl_concat<22,10>(trunc_ln54_128_fu_18919_p1.read(), lshr_ln54_148_fu_18909_p4.read()); } void sha256_transform::thread_or_ln54_149_fu_19134_p3() { or_ln54_149_fu_19134_p3 = esl_concat<13,19>(trunc_ln54_130_fu_19130_p1.read(), lshr_ln54_149_fu_19120_p4.read()); } void sha256_transform::thread_or_ln54_14_fu_6167_p3() { or_ln54_14_fu_6167_p3 = esl_concat<2,30>(trunc_ln54_42_fu_6163_p1.read(), lshr_ln54_14_fu_6153_p4.read()); } void sha256_transform::thread_or_ln54_150_fu_19156_p3() { or_ln54_150_fu_19156_p3 = esl_concat<22,10>(trunc_ln54_131_fu_19152_p1.read(), lshr_ln54_150_fu_19142_p4.read()); } void sha256_transform::thread_or_ln54_151_fu_19371_p3() { or_ln54_151_fu_19371_p3 = esl_concat<13,19>(trunc_ln54_133_fu_19367_p1.read(), lshr_ln54_151_fu_19357_p4.read()); } void sha256_transform::thread_or_ln54_152_fu_19393_p3() { or_ln54_152_fu_19393_p3 = esl_concat<22,10>(trunc_ln54_134_fu_19389_p1.read(), lshr_ln54_152_fu_19379_p4.read()); } void sha256_transform::thread_or_ln54_153_fu_19602_p3() { or_ln54_153_fu_19602_p3 = esl_concat<13,19>(trunc_ln54_136_fu_19598_p1.read(), lshr_ln54_153_fu_19588_p4.read()); } void sha256_transform::thread_or_ln54_154_fu_19624_p3() { or_ln54_154_fu_19624_p3 = esl_concat<22,10>(trunc_ln54_137_fu_19620_p1.read(), lshr_ln54_154_fu_19610_p4.read()); } void sha256_transform::thread_or_ln54_155_fu_19836_p3() { or_ln54_155_fu_19836_p3 = esl_concat<13,19>(trunc_ln54_139_fu_19832_p1.read(), lshr_ln54_155_fu_19822_p4.read()); } void sha256_transform::thread_or_ln54_156_fu_19858_p3() { or_ln54_156_fu_19858_p3 = esl_concat<22,10>(trunc_ln54_140_fu_19854_p1.read(), lshr_ln54_156_fu_19844_p4.read()); } void sha256_transform::thread_or_ln54_157_fu_20071_p3() { or_ln54_157_fu_20071_p3 = esl_concat<13,19>(trunc_ln54_142_fu_20067_p1.read(), lshr_ln54_157_fu_20057_p4.read()); } void sha256_transform::thread_or_ln54_158_fu_20093_p3() { or_ln54_158_fu_20093_p3 = esl_concat<22,10>(trunc_ln54_143_fu_20089_p1.read(), lshr_ln54_158_fu_20079_p4.read()); } void sha256_transform::thread_or_ln54_159_fu_20313_p3() { or_ln54_159_fu_20313_p3 = esl_concat<13,19>(trunc_ln54_145_fu_20309_p1.read(), lshr_ln54_159_fu_20299_p4.read()); } void sha256_transform::thread_or_ln54_15_fu_6556_p3() { or_ln54_15_fu_6556_p3 = esl_concat<2,30>(trunc_ln54_45_fu_6552_p1.read(), lshr_ln54_15_fu_6542_p4.read()); } void sha256_transform::thread_or_ln54_160_fu_20335_p3() { or_ln54_160_fu_20335_p3 = esl_concat<22,10>(trunc_ln54_146_fu_20331_p1.read(), lshr_ln54_160_fu_20321_p4.read()); } void sha256_transform::thread_or_ln54_161_fu_20550_p3() { or_ln54_161_fu_20550_p3 = esl_concat<13,19>(trunc_ln54_148_fu_20546_p1.read(), lshr_ln54_161_fu_20536_p4.read()); } void sha256_transform::thread_or_ln54_162_fu_20572_p3() { or_ln54_162_fu_20572_p3 = esl_concat<22,10>(trunc_ln54_149_fu_20568_p1.read(), lshr_ln54_162_fu_20558_p4.read()); } void sha256_transform::thread_or_ln54_163_fu_20781_p3() { or_ln54_163_fu_20781_p3 = esl_concat<13,19>(trunc_ln54_151_fu_20777_p1.read(), lshr_ln54_163_fu_20767_p4.read()); } void sha256_transform::thread_or_ln54_164_fu_20803_p3() { or_ln54_164_fu_20803_p3 = esl_concat<22,10>(trunc_ln54_152_fu_20799_p1.read(), lshr_ln54_164_fu_20789_p4.read()); } void sha256_transform::thread_or_ln54_165_fu_21015_p3() { or_ln54_165_fu_21015_p3 = esl_concat<13,19>(trunc_ln54_154_fu_21011_p1.read(), lshr_ln54_165_fu_21001_p4.read()); } void sha256_transform::thread_or_ln54_166_fu_21037_p3() { or_ln54_166_fu_21037_p3 = esl_concat<22,10>(trunc_ln54_155_fu_21033_p1.read(), lshr_ln54_166_fu_21023_p4.read()); } void sha256_transform::thread_or_ln54_167_fu_21250_p3() { or_ln54_167_fu_21250_p3 = esl_concat<13,19>(trunc_ln54_157_fu_21246_p1.read(), lshr_ln54_167_fu_21236_p4.read()); } void sha256_transform::thread_or_ln54_168_fu_21272_p3() { or_ln54_168_fu_21272_p3 = esl_concat<22,10>(trunc_ln54_158_fu_21268_p1.read(), lshr_ln54_168_fu_21258_p4.read()); } void sha256_transform::thread_or_ln54_169_fu_21483_p3() { or_ln54_169_fu_21483_p3 = esl_concat<13,19>(trunc_ln54_160_fu_21479_p1.read(), lshr_ln54_169_fu_21469_p4.read()); } void sha256_transform::thread_or_ln54_16_fu_7094_p3() { or_ln54_16_fu_7094_p3 = esl_concat<2,30>(trunc_ln54_48_fu_7090_p1.read(), lshr_ln54_16_fu_7080_p4.read()); } void sha256_transform::thread_or_ln54_170_fu_21505_p3() { or_ln54_170_fu_21505_p3 = esl_concat<22,10>(trunc_ln54_161_fu_21501_p1.read(), lshr_ln54_170_fu_21491_p4.read()); } void sha256_transform::thread_or_ln54_171_fu_21720_p3() { or_ln54_171_fu_21720_p3 = esl_concat<13,19>(trunc_ln54_163_fu_21716_p1.read(), lshr_ln54_171_fu_21706_p4.read()); } void sha256_transform::thread_or_ln54_172_fu_21742_p3() { or_ln54_172_fu_21742_p3 = esl_concat<22,10>(trunc_ln54_164_fu_21738_p1.read(), lshr_ln54_172_fu_21728_p4.read()); } void sha256_transform::thread_or_ln54_173_fu_21951_p3() { or_ln54_173_fu_21951_p3 = esl_concat<13,19>(trunc_ln54_166_fu_21947_p1.read(), lshr_ln54_173_fu_21937_p4.read()); } void sha256_transform::thread_or_ln54_174_fu_21973_p3() { or_ln54_174_fu_21973_p3 = esl_concat<22,10>(trunc_ln54_167_fu_21969_p1.read(), lshr_ln54_174_fu_21959_p4.read()); } void sha256_transform::thread_or_ln54_175_fu_22185_p3() { or_ln54_175_fu_22185_p3 = esl_concat<13,19>(trunc_ln54_169_fu_22181_p1.read(), lshr_ln54_175_fu_22171_p4.read()); } void sha256_transform::thread_or_ln54_176_fu_22207_p3() { or_ln54_176_fu_22207_p3 = esl_concat<22,10>(trunc_ln54_170_fu_22203_p1.read(), lshr_ln54_176_fu_22193_p4.read()); } void sha256_transform::thread_or_ln54_177_fu_22420_p3() { or_ln54_177_fu_22420_p3 = esl_concat<13,19>(trunc_ln54_172_fu_22416_p1.read(), lshr_ln54_177_fu_22406_p4.read()); } void sha256_transform::thread_or_ln54_178_fu_22442_p3() { or_ln54_178_fu_22442_p3 = esl_concat<22,10>(trunc_ln54_173_fu_22438_p1.read(), lshr_ln54_178_fu_22428_p4.read()); } void sha256_transform::thread_or_ln54_179_fu_22653_p3() { or_ln54_179_fu_22653_p3 = esl_concat<13,19>(trunc_ln54_175_fu_22649_p1.read(), lshr_ln54_179_fu_22639_p4.read()); } void sha256_transform::thread_or_ln54_17_fu_7330_p3() { or_ln54_17_fu_7330_p3 = esl_concat<2,30>(trunc_ln54_51_fu_7326_p1.read(), lshr_ln54_17_fu_7316_p4.read()); } void sha256_transform::thread_or_ln54_180_fu_22675_p3() { or_ln54_180_fu_22675_p3 = esl_concat<22,10>(trunc_ln54_176_fu_22671_p1.read(), lshr_ln54_180_fu_22661_p4.read()); } void sha256_transform::thread_or_ln54_181_fu_22890_p3() { or_ln54_181_fu_22890_p3 = esl_concat<13,19>(trunc_ln54_178_fu_22886_p1.read(), lshr_ln54_181_fu_22876_p4.read()); } void sha256_transform::thread_or_ln54_182_fu_22912_p3() { or_ln54_182_fu_22912_p3 = esl_concat<22,10>(trunc_ln54_179_fu_22908_p1.read(), lshr_ln54_182_fu_22898_p4.read()); } void sha256_transform::thread_or_ln54_183_fu_23121_p3() { or_ln54_183_fu_23121_p3 = esl_concat<13,19>(trunc_ln54_181_fu_23117_p1.read(), lshr_ln54_183_fu_23107_p4.read()); } void sha256_transform::thread_or_ln54_184_fu_23143_p3() { or_ln54_184_fu_23143_p3 = esl_concat<22,10>(trunc_ln54_182_fu_23139_p1.read(), lshr_ln54_184_fu_23129_p4.read()); } void sha256_transform::thread_or_ln54_185_fu_23420_p3() { or_ln54_185_fu_23420_p3 = esl_concat<13,19>(trunc_ln54_184_fu_23416_p1.read(), lshr_ln54_185_fu_23406_p4.read()); } void sha256_transform::thread_or_ln54_186_fu_23442_p3() { or_ln54_186_fu_23442_p3 = esl_concat<22,10>(trunc_ln54_185_fu_23438_p1.read(), lshr_ln54_186_fu_23428_p4.read()); } void sha256_transform::thread_or_ln54_187_fu_23655_p3() { or_ln54_187_fu_23655_p3 = esl_concat<13,19>(trunc_ln54_187_fu_23651_p1.read(), lshr_ln54_187_fu_23641_p4.read()); } void sha256_transform::thread_or_ln54_188_fu_23677_p3() { or_ln54_188_fu_23677_p3 = esl_concat<22,10>(trunc_ln54_188_fu_23673_p1.read(), lshr_ln54_188_fu_23663_p4.read()); } void sha256_transform::thread_or_ln54_189_fu_23884_p3() { or_ln54_189_fu_23884_p3 = esl_concat<13,19>(trunc_ln54_190_fu_23880_p1.read(), lshr_ln54_189_fu_23870_p4.read()); } void sha256_transform::thread_or_ln54_18_fu_7722_p3() { or_ln54_18_fu_7722_p3 = esl_concat<2,30>(trunc_ln54_54_fu_7718_p1.read(), lshr_ln54_18_fu_7708_p4.read()); } void sha256_transform::thread_or_ln54_190_fu_23906_p3() { or_ln54_190_fu_23906_p3 = esl_concat<22,10>(trunc_ln54_191_fu_23902_p1.read(), lshr_ln54_190_fu_23892_p4.read()); } void sha256_transform::thread_or_ln54_19_fu_7960_p3() { or_ln54_19_fu_7960_p3 = esl_concat<2,30>(trunc_ln54_57_fu_7956_p1.read(), lshr_ln54_19_fu_7946_p4.read()); } void sha256_transform::thread_or_ln54_1_fu_2021_p3() { or_ln54_1_fu_2021_p3 = esl_concat<13,19>(trunc_ln54_1_fu_2017_p1.read(), lshr_ln54_1_fu_2007_p4.read()); } void sha256_transform::thread_or_ln54_20_fu_8499_p3() { or_ln54_20_fu_8499_p3 = esl_concat<2,30>(trunc_ln54_60_fu_8495_p1.read(), lshr_ln54_20_fu_8485_p4.read()); } void sha256_transform::thread_or_ln54_21_fu_9037_p3() { or_ln54_21_fu_9037_p3 = esl_concat<2,30>(trunc_ln54_63_fu_9033_p1.read(), lshr_ln54_21_fu_9023_p4.read()); } void sha256_transform::thread_or_ln54_22_fu_9273_p3() { or_ln54_22_fu_9273_p3 = esl_concat<2,30>(trunc_ln54_66_fu_9269_p1.read(), lshr_ln54_22_fu_9259_p4.read()); } void sha256_transform::thread_or_ln54_23_fu_9665_p3() { or_ln54_23_fu_9665_p3 = esl_concat<2,30>(trunc_ln54_69_fu_9661_p1.read(), lshr_ln54_23_fu_9651_p4.read()); } void sha256_transform::thread_or_ln54_24_fu_9903_p3() { or_ln54_24_fu_9903_p3 = esl_concat<2,30>(trunc_ln54_72_fu_9899_p1.read(), lshr_ln54_24_fu_9889_p4.read()); } void sha256_transform::thread_or_ln54_25_fu_10442_p3() { or_ln54_25_fu_10442_p3 = esl_concat<2,30>(trunc_ln54_75_fu_10438_p1.read(), lshr_ln54_25_fu_10428_p4.read()); } void sha256_transform::thread_or_ln54_26_fu_11139_p3() { or_ln54_26_fu_11139_p3 = esl_concat<2,30>(trunc_ln54_78_fu_11135_p1.read(), lshr_ln54_26_fu_11125_p4.read()); } void sha256_transform::thread_or_ln54_27_fu_11375_p3() { or_ln54_27_fu_11375_p3 = esl_concat<2,30>(trunc_ln54_81_fu_11371_p1.read(), lshr_ln54_27_fu_11361_p4.read()); } void sha256_transform::thread_or_ln54_28_fu_12697_p3() { or_ln54_28_fu_12697_p3 = esl_concat<2,30>(trunc_ln54_84_fu_12693_p1.read(), lshr_ln54_28_fu_12683_p4.read()); } void sha256_transform::thread_or_ln54_29_fu_12934_p3() { or_ln54_29_fu_12934_p3 = esl_concat<2,30>(trunc_ln54_87_fu_12930_p1.read(), lshr_ln54_29_fu_12920_p4.read()); } void sha256_transform::thread_or_ln54_2_fu_2043_p3() { or_ln54_2_fu_2043_p3 = esl_concat<22,10>(trunc_ln54_2_fu_2039_p1.read(), lshr_ln54_2_fu_2029_p4.read()); } void sha256_transform::thread_or_ln54_30_fu_14404_p3() { or_ln54_30_fu_14404_p3 = esl_concat<2,30>(trunc_ln54_90_fu_14400_p1.read(), lshr_ln54_30_fu_14390_p4.read()); } void sha256_transform::thread_or_ln54_31_fu_15588_p3() { or_ln54_31_fu_15588_p3 = esl_concat<2,30>(trunc_ln54_93_fu_15584_p1.read(), lshr_ln54_31_fu_15574_p4.read()); } void sha256_transform::thread_or_ln54_32_fu_15823_p3() { or_ln54_32_fu_15823_p3 = esl_concat<2,30>(trunc_ln54_96_fu_15819_p1.read(), lshr_ln54_32_fu_15809_p4.read()); } void sha256_transform::thread_or_ln54_33_fu_16508_p3() { or_ln54_33_fu_16508_p3 = esl_concat<2,30>(trunc_ln54_99_fu_16504_p1.read(), lshr_ln54_33_fu_16494_p4.read()); } void sha256_transform::thread_or_ln54_34_fu_16745_p3() { or_ln54_34_fu_16745_p3 = esl_concat<2,30>(trunc_ln54_102_fu_16741_p1.read(), lshr_ln54_34_fu_16731_p4.read()); } void sha256_transform::thread_or_ln54_35_fu_17230_p3() { or_ln54_35_fu_17230_p3 = esl_concat<2,30>(trunc_ln54_105_fu_17226_p1.read(), lshr_ln54_35_fu_17216_p4.read()); } void sha256_transform::thread_or_ln54_36_fu_17474_p3() { or_ln54_36_fu_17474_p3 = esl_concat<2,30>(trunc_ln54_108_fu_17470_p1.read(), lshr_ln54_36_fu_17460_p4.read()); } void sha256_transform::thread_or_ln54_37_fu_17709_p3() { or_ln54_37_fu_17709_p3 = esl_concat<2,30>(trunc_ln54_111_fu_17705_p1.read(), lshr_ln54_37_fu_17695_p4.read()); } void sha256_transform::thread_or_ln54_38_fu_17942_p3() { or_ln54_38_fu_17942_p3 = esl_concat<2,30>(trunc_ln54_114_fu_17938_p1.read(), lshr_ln54_38_fu_17928_p4.read()); } void sha256_transform::thread_or_ln54_39_fu_18179_p3() { or_ln54_39_fu_18179_p3 = esl_concat<2,30>(trunc_ln54_117_fu_18175_p1.read(), lshr_ln54_39_fu_18165_p4.read()); } void sha256_transform::thread_or_ln54_3_fu_2341_p3() { or_ln54_3_fu_2341_p3 = esl_concat<2,30>(trunc_ln54_9_fu_2337_p1.read(), lshr_ln54_3_fu_2327_p4.read()); } void sha256_transform::thread_or_ln54_40_fu_18410_p3() { or_ln54_40_fu_18410_p3 = esl_concat<2,30>(trunc_ln54_120_fu_18406_p1.read(), lshr_ln54_40_fu_18396_p4.read()); } void sha256_transform::thread_or_ln54_41_fu_18644_p3() { or_ln54_41_fu_18644_p3 = esl_concat<2,30>(trunc_ln54_123_fu_18640_p1.read(), lshr_ln54_41_fu_18630_p4.read()); } void sha256_transform::thread_or_ln54_42_fu_18879_p3() { or_ln54_42_fu_18879_p3 = esl_concat<2,30>(trunc_ln54_126_fu_18875_p1.read(), lshr_ln54_42_fu_18865_p4.read()); } void sha256_transform::thread_or_ln54_43_fu_19112_p3() { or_ln54_43_fu_19112_p3 = esl_concat<2,30>(trunc_ln54_129_fu_19108_p1.read(), lshr_ln54_43_fu_19098_p4.read()); } void sha256_transform::thread_or_ln54_44_fu_19349_p3() { or_ln54_44_fu_19349_p3 = esl_concat<2,30>(trunc_ln54_132_fu_19345_p1.read(), lshr_ln54_44_fu_19335_p4.read()); } void sha256_transform::thread_or_ln54_45_fu_19580_p3() { or_ln54_45_fu_19580_p3 = esl_concat<2,30>(trunc_ln54_135_fu_19576_p1.read(), lshr_ln54_45_fu_19566_p4.read()); } void sha256_transform::thread_or_ln54_46_fu_19814_p3() { or_ln54_46_fu_19814_p3 = esl_concat<2,30>(trunc_ln54_138_fu_19810_p1.read(), lshr_ln54_46_fu_19800_p4.read()); } void sha256_transform::thread_or_ln54_47_fu_20049_p3() { or_ln54_47_fu_20049_p3 = esl_concat<2,30>(trunc_ln54_141_fu_20045_p1.read(), lshr_ln54_47_fu_20035_p4.read()); } void sha256_transform::thread_or_ln54_48_fu_20291_p3() { or_ln54_48_fu_20291_p3 = esl_concat<2,30>(trunc_ln54_144_fu_20287_p1.read(), lshr_ln54_48_fu_20277_p4.read()); } void sha256_transform::thread_or_ln54_49_fu_20528_p3() { or_ln54_49_fu_20528_p3 = esl_concat<2,30>(trunc_ln54_147_fu_20524_p1.read(), lshr_ln54_49_fu_20514_p4.read()); } void sha256_transform::thread_or_ln54_4_fu_2584_p3() { or_ln54_4_fu_2584_p3 = esl_concat<2,30>(trunc_ln54_12_fu_2580_p1.read(), lshr_ln54_4_fu_2570_p4.read()); } void sha256_transform::thread_or_ln54_50_fu_20759_p3() { or_ln54_50_fu_20759_p3 = esl_concat<2,30>(trunc_ln54_150_fu_20755_p1.read(), lshr_ln54_50_fu_20745_p4.read()); } void sha256_transform::thread_or_ln54_51_fu_20993_p3() { or_ln54_51_fu_20993_p3 = esl_concat<2,30>(trunc_ln54_153_fu_20989_p1.read(), lshr_ln54_51_fu_20979_p4.read()); } void sha256_transform::thread_or_ln54_52_fu_21228_p3() { or_ln54_52_fu_21228_p3 = esl_concat<2,30>(trunc_ln54_156_fu_21224_p1.read(), lshr_ln54_52_fu_21214_p4.read()); } void sha256_transform::thread_or_ln54_53_fu_21461_p3() { or_ln54_53_fu_21461_p3 = esl_concat<2,30>(trunc_ln54_159_fu_21457_p1.read(), lshr_ln54_53_fu_21447_p4.read()); } void sha256_transform::thread_or_ln54_54_fu_21698_p3() { or_ln54_54_fu_21698_p3 = esl_concat<2,30>(trunc_ln54_162_fu_21694_p1.read(), lshr_ln54_54_fu_21684_p4.read()); } void sha256_transform::thread_or_ln54_55_fu_21929_p3() { or_ln54_55_fu_21929_p3 = esl_concat<2,30>(trunc_ln54_165_fu_21925_p1.read(), lshr_ln54_55_fu_21915_p4.read()); } void sha256_transform::thread_or_ln54_56_fu_22163_p3() { or_ln54_56_fu_22163_p3 = esl_concat<2,30>(trunc_ln54_168_fu_22159_p1.read(), lshr_ln54_56_fu_22149_p4.read()); } void sha256_transform::thread_or_ln54_57_fu_22398_p3() { or_ln54_57_fu_22398_p3 = esl_concat<2,30>(trunc_ln54_171_fu_22394_p1.read(), lshr_ln54_57_fu_22384_p4.read()); } void sha256_transform::thread_or_ln54_58_fu_22631_p3() { or_ln54_58_fu_22631_p3 = esl_concat<2,30>(trunc_ln54_174_fu_22627_p1.read(), lshr_ln54_58_fu_22617_p4.read()); } void sha256_transform::thread_or_ln54_59_fu_22868_p3() { or_ln54_59_fu_22868_p3 = esl_concat<2,30>(trunc_ln54_177_fu_22864_p1.read(), lshr_ln54_59_fu_22854_p4.read()); } void sha256_transform::thread_or_ln54_5_fu_3025_p3() { or_ln54_5_fu_3025_p3 = esl_concat<2,30>(trunc_ln54_15_fu_3021_p1.read(), lshr_ln54_5_fu_3011_p4.read()); } void sha256_transform::thread_or_ln54_60_fu_23099_p3() { or_ln54_60_fu_23099_p3 = esl_concat<2,30>(trunc_ln54_180_fu_23095_p1.read(), lshr_ln54_60_fu_23085_p4.read()); } void sha256_transform::thread_or_ln54_61_fu_23398_p3() { or_ln54_61_fu_23398_p3 = esl_concat<2,30>(trunc_ln54_183_fu_23394_p1.read(), lshr_ln54_61_fu_23384_p4.read()); } void sha256_transform::thread_or_ln54_62_fu_23633_p3() { or_ln54_62_fu_23633_p3 = esl_concat<2,30>(trunc_ln54_186_fu_23629_p1.read(), lshr_ln54_62_fu_23619_p4.read()); } void sha256_transform::thread_or_ln54_63_fu_23862_p3() { or_ln54_63_fu_23862_p3 = esl_concat<2,30>(trunc_ln54_189_fu_23858_p1.read(), lshr_ln54_63_fu_23848_p4.read()); } void sha256_transform::thread_or_ln54_64_fu_2130_p3() { or_ln54_64_fu_2130_p3 = esl_concat<13,19>(trunc_ln54_4_fu_2126_p1.read(), lshr_ln54_64_fu_2116_p4.read()); } void sha256_transform::thread_or_ln54_65_fu_2152_p3() { or_ln54_65_fu_2152_p3 = esl_concat<22,10>(trunc_ln54_5_fu_2148_p1.read(), lshr_ln54_65_fu_2138_p4.read()); } void sha256_transform::thread_or_ln54_66_fu_2219_p3() { or_ln54_66_fu_2219_p3 = esl_concat<2,30>(trunc_ln54_6_fu_2215_p1.read(), lshr_ln54_66_fu_2205_p4.read()); } void sha256_transform::thread_or_ln54_67_fu_2241_p3() { or_ln54_67_fu_2241_p3 = esl_concat<13,19>(trunc_ln54_7_fu_2237_p1.read(), lshr_ln54_67_fu_2227_p4.read()); } void sha256_transform::thread_or_ln54_68_fu_2263_p3() { or_ln54_68_fu_2263_p3 = esl_concat<22,10>(trunc_ln54_8_fu_2259_p1.read(), lshr_ln54_68_fu_2249_p4.read()); } void sha256_transform::thread_or_ln54_69_fu_2363_p3() { or_ln54_69_fu_2363_p3 = esl_concat<13,19>(trunc_ln54_10_fu_2359_p1.read(), lshr_ln54_69_fu_2349_p4.read()); } void sha256_transform::thread_or_ln54_6_fu_3468_p3() { or_ln54_6_fu_3468_p3 = esl_concat<2,30>(trunc_ln54_18_fu_3464_p1.read(), lshr_ln54_6_fu_3454_p4.read()); } void sha256_transform::thread_or_ln54_70_fu_2385_p3() { or_ln54_70_fu_2385_p3 = esl_concat<22,10>(trunc_ln54_11_fu_2381_p1.read(), lshr_ln54_70_fu_2371_p4.read()); } void sha256_transform::thread_or_ln54_71_fu_2606_p3() { or_ln54_71_fu_2606_p3 = esl_concat<13,19>(trunc_ln54_13_fu_2602_p1.read(), lshr_ln54_71_fu_2592_p4.read()); } void sha256_transform::thread_or_ln54_72_fu_2628_p3() { or_ln54_72_fu_2628_p3 = esl_concat<22,10>(trunc_ln54_14_fu_2624_p1.read(), lshr_ln54_72_fu_2614_p4.read()); } void sha256_transform::thread_or_ln54_73_fu_3047_p3() { or_ln54_73_fu_3047_p3 = esl_concat<13,19>(trunc_ln54_16_fu_3043_p1.read(), lshr_ln54_73_fu_3033_p4.read()); } void sha256_transform::thread_or_ln54_74_fu_3069_p3() { or_ln54_74_fu_3069_p3 = esl_concat<22,10>(trunc_ln54_17_fu_3065_p1.read(), lshr_ln54_74_fu_3055_p4.read()); } void sha256_transform::thread_or_ln54_75_fu_3490_p3() { or_ln54_75_fu_3490_p3 = esl_concat<13,19>(trunc_ln54_19_fu_3486_p1.read(), lshr_ln54_75_fu_3476_p4.read()); } void sha256_transform::thread_or_ln54_76_fu_3512_p3() { or_ln54_76_fu_3512_p3 = esl_concat<22,10>(trunc_ln54_20_fu_3508_p1.read(), lshr_ln54_76_fu_3498_p4.read()); } void sha256_transform::thread_or_ln54_77_fu_3726_p3() { or_ln54_77_fu_3726_p3 = esl_concat<13,19>(trunc_ln54_22_fu_3722_p1.read(), lshr_ln54_77_fu_3712_p4.read()); } void sha256_transform::thread_or_ln54_78_fu_3748_p3() { or_ln54_78_fu_3748_p3 = esl_concat<22,10>(trunc_ln54_23_fu_3744_p1.read(), lshr_ln54_78_fu_3734_p4.read()); } void sha256_transform::thread_or_ln54_79_fu_4180_p3() { or_ln54_79_fu_4180_p3 = esl_concat<13,19>(trunc_ln54_25_fu_4176_p1.read(), lshr_ln54_79_fu_4166_p4.read()); } void sha256_transform::thread_or_ln54_7_fu_3704_p3() { or_ln54_7_fu_3704_p3 = esl_concat<2,30>(trunc_ln54_21_fu_3700_p1.read(), lshr_ln54_7_fu_3690_p4.read()); } void sha256_transform::thread_or_ln54_80_fu_4202_p3() { or_ln54_80_fu_4202_p3 = esl_concat<22,10>(trunc_ln54_26_fu_4198_p1.read(), lshr_ln54_80_fu_4188_p4.read()); } void sha256_transform::thread_or_ln54_81_fu_4418_p3() { or_ln54_81_fu_4418_p3 = esl_concat<13,19>(trunc_ln54_28_fu_4414_p1.read(), lshr_ln54_81_fu_4404_p4.read()); } void sha256_transform::thread_or_ln54_82_fu_4440_p3() { or_ln54_82_fu_4440_p3 = esl_concat<22,10>(trunc_ln54_29_fu_4436_p1.read(), lshr_ln54_82_fu_4426_p4.read()); } void sha256_transform::thread_or_ln54_83_fu_4845_p3() { or_ln54_83_fu_4845_p3 = esl_concat<13,19>(trunc_ln54_31_fu_4841_p1.read(), lshr_ln54_83_fu_4831_p4.read()); } void sha256_transform::thread_or_ln54_84_fu_4867_p3() { or_ln54_84_fu_4867_p3 = esl_concat<22,10>(trunc_ln54_32_fu_4863_p1.read(), lshr_ln54_84_fu_4853_p4.read()); } void sha256_transform::thread_or_ln54_85_fu_5483_p3() { or_ln54_85_fu_5483_p3 = esl_concat<13,19>(trunc_ln54_34_fu_5479_p1.read(), lshr_ln54_85_fu_5469_p4.read()); } void sha256_transform::thread_or_ln54_86_fu_5505_p3() { or_ln54_86_fu_5505_p3 = esl_concat<22,10>(trunc_ln54_35_fu_5501_p1.read(), lshr_ln54_86_fu_5491_p4.read()); } void sha256_transform::thread_or_ln54_87_fu_5718_p3() { or_ln54_87_fu_5718_p3 = esl_concat<13,19>(trunc_ln54_37_fu_5714_p1.read(), lshr_ln54_87_fu_5704_p4.read()); } void sha256_transform::thread_or_ln54_88_fu_5740_p3() { or_ln54_88_fu_5740_p3 = esl_concat<22,10>(trunc_ln54_38_fu_5736_p1.read(), lshr_ln54_88_fu_5726_p4.read()); } void sha256_transform::thread_or_ln54_89_fu_5952_p3() { or_ln54_89_fu_5952_p3 = esl_concat<13,19>(trunc_ln54_40_fu_5948_p1.read(), lshr_ln54_89_fu_5938_p4.read()); } void sha256_transform::thread_or_ln54_8_fu_4158_p3() { or_ln54_8_fu_4158_p3 = esl_concat<2,30>(trunc_ln54_24_fu_4154_p1.read(), lshr_ln54_8_fu_4144_p4.read()); } void sha256_transform::thread_or_ln54_90_fu_5974_p3() { or_ln54_90_fu_5974_p3 = esl_concat<22,10>(trunc_ln54_41_fu_5970_p1.read(), lshr_ln54_90_fu_5960_p4.read()); } void sha256_transform::thread_or_ln54_91_fu_6189_p3() { or_ln54_91_fu_6189_p3 = esl_concat<13,19>(trunc_ln54_43_fu_6185_p1.read(), lshr_ln54_91_fu_6175_p4.read()); } void sha256_transform::thread_or_ln54_92_fu_6211_p3() { or_ln54_92_fu_6211_p3 = esl_concat<22,10>(trunc_ln54_44_fu_6207_p1.read(), lshr_ln54_92_fu_6197_p4.read()); } void sha256_transform::thread_or_ln54_93_fu_6578_p3() { or_ln54_93_fu_6578_p3 = esl_concat<13,19>(trunc_ln54_46_fu_6574_p1.read(), lshr_ln54_93_fu_6564_p4.read()); } void sha256_transform::thread_or_ln54_94_fu_6600_p3() { or_ln54_94_fu_6600_p3 = esl_concat<22,10>(trunc_ln54_47_fu_6596_p1.read(), lshr_ln54_94_fu_6586_p4.read()); } void sha256_transform::thread_or_ln54_95_fu_7116_p3() { or_ln54_95_fu_7116_p3 = esl_concat<13,19>(trunc_ln54_49_fu_7112_p1.read(), lshr_ln54_95_fu_7102_p4.read()); } void sha256_transform::thread_or_ln54_96_fu_7138_p3() { or_ln54_96_fu_7138_p3 = esl_concat<22,10>(trunc_ln54_50_fu_7134_p1.read(), lshr_ln54_96_fu_7124_p4.read()); } void sha256_transform::thread_or_ln54_97_fu_7352_p3() { or_ln54_97_fu_7352_p3 = esl_concat<13,19>(trunc_ln54_52_fu_7348_p1.read(), lshr_ln54_97_fu_7338_p4.read()); } void sha256_transform::thread_or_ln54_98_fu_7374_p3() { or_ln54_98_fu_7374_p3 = esl_concat<22,10>(trunc_ln54_53_fu_7370_p1.read(), lshr_ln54_98_fu_7360_p4.read()); } void sha256_transform::thread_or_ln54_99_fu_7744_p3() { or_ln54_99_fu_7744_p3 = esl_concat<13,19>(trunc_ln54_55_fu_7740_p1.read(), lshr_ln54_99_fu_7730_p4.read()); } void sha256_transform::thread_or_ln54_9_fu_4396_p3() { or_ln54_9_fu_4396_p3 = esl_concat<2,30>(trunc_ln54_27_fu_4392_p1.read(), lshr_ln54_9_fu_4382_p4.read()); } void sha256_transform::thread_or_ln54_s_fu_2108_p3() { or_ln54_s_fu_2108_p3 = esl_concat<2,30>(trunc_ln54_3_fu_2104_p1.read(), lshr_ln54_s_fu_2094_p4.read()); } void sha256_transform::thread_or_ln_fu_5064_p6() { or_ln_fu_5064_p6 = esl_concat<25,7>(esl_concat<17,8>(esl_concat<9,8>(esl_concat<1,8>(trunc_ln40_fu_5060_p1.read(), data_2_q0.read()), data_3_q0.read()), data_0_q0.read()), tmp_fu_5050_p4.read()); } void sha256_transform::thread_tmp_10_fu_1412_p4() { tmp_10_fu_1412_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_11_fu_1450_p3() { tmp_11_fu_1450_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_12_fu_1476_p4() { tmp_12_fu_1476_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_13_fu_1504_p4() { tmp_13_fu_1504_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_14_fu_1801_p3() { tmp_14_fu_1801_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_15_fu_1827_p4() { tmp_15_fu_1827_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_16_fu_1855_p4() { tmp_16_fu_1855_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_17_fu_1893_p3() { tmp_17_fu_1893_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_18_fu_1919_p4() { tmp_18_fu_1919_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_19_fu_1947_p4() { tmp_19_fu_1947_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_1_fu_984_p3() { tmp_1_fu_984_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_20_fu_2756_p3() { tmp_20_fu_2756_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_21_fu_2782_p4() { tmp_21_fu_2782_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_22_fu_2810_p4() { tmp_22_fu_2810_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_23_fu_2848_p3() { tmp_23_fu_2848_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_24_fu_2874_p4() { tmp_24_fu_2874_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_25_fu_2902_p4() { tmp_25_fu_2902_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_26_fu_3241_p3() { tmp_26_fu_3241_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_27_fu_3267_p4() { tmp_27_fu_3267_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_28_fu_3295_p4() { tmp_28_fu_3295_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_29_fu_3333_p3() { tmp_29_fu_3333_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_2_fu_5142_p4() { tmp_2_fu_5142_p4 = data_1_q1.read().range(7, 1); } void sha256_transform::thread_tmp_30_fu_3359_p4() { tmp_30_fu_3359_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_31_fu_3387_p4() { tmp_31_fu_3387_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_32_fu_3922_p3() { tmp_32_fu_3922_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_33_fu_3948_p4() { tmp_33_fu_3948_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_34_fu_3976_p4() { tmp_34_fu_3976_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_35_fu_4014_p3() { tmp_35_fu_4014_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_36_fu_4040_p4() { tmp_36_fu_4040_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_37_fu_4068_p4() { tmp_37_fu_4068_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_38_fu_4555_p3() { tmp_38_fu_4555_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_39_fu_4581_p4() { tmp_39_fu_4581_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_3_fu_5078_p4() { tmp_3_fu_5078_p4 = data_1_q0.read().range(7, 3); } void sha256_transform::thread_tmp_40_fu_4609_p4() { tmp_40_fu_4609_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_41_fu_4647_p3() { tmp_41_fu_4647_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_42_fu_4673_p4() { tmp_42_fu_4673_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_43_fu_4701_p4() { tmp_43_fu_4701_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_44_fu_5234_p3() { tmp_44_fu_5234_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_45_fu_5260_p4() { tmp_45_fu_5260_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_46_fu_5288_p4() { tmp_46_fu_5288_p4 = data_3_q0.read().range(7, 3); } void sha256_transform::thread_tmp_47_fu_5326_p3() { tmp_47_fu_5326_p3 = data_3_q1.read().range(7, 7); } void sha256_transform::thread_tmp_48_fu_5352_p4() { tmp_48_fu_5352_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_49_fu_5380_p4() { tmp_49_fu_5380_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_tmp_4_fu_5170_p4() { tmp_4_fu_5170_p4 = data_1_q1.read().range(7, 3); } void sha256_transform::thread_tmp_5_fu_5106_p4() { tmp_5_fu_5106_p4 = data_2_q0.read().range(7, 2); } void sha256_transform::thread_tmp_6_fu_5198_p4() { tmp_6_fu_5198_p4 = data_2_q1.read().range(7, 2); } void sha256_transform::thread_tmp_7_fu_1358_p3() { tmp_7_fu_1358_p3 = data_3_q0.read().range(7, 7); } void sha256_transform::thread_tmp_8_fu_1010_p4() { tmp_8_fu_1010_p4 = data_1_q1.read().range(7, 2); } void sha256_transform::thread_tmp_9_fu_1384_p4() { tmp_9_fu_1384_p4 = data_1_q0.read().range(7, 2); } void sha256_transform::thread_tmp_fu_5050_p4() { tmp_fu_5050_p4 = data_1_q0.read().range(7, 1); } void sha256_transform::thread_tmp_s_fu_1038_p4() { tmp_s_fu_1038_p4 = data_3_q1.read().range(7, 3); } void sha256_transform::thread_trunc_ln40_100_fu_13279_p1() { trunc_ln40_100_fu_13279_p1 = m_39_fu_13179_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_101_fu_13301_p1() { trunc_ln40_101_fu_13301_p1 = m_39_fu_13179_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_102_fu_10297_p1() { trunc_ln40_102_fu_10297_p1 = m_26_fu_10067_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_103_fu_10319_p1() { trunc_ln40_103_fu_10319_p1 = m_26_fu_10067_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_104_fu_13364_p1() { trunc_ln40_104_fu_13364_p1 = m_40_fu_13263_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_105_fu_13386_p1() { trunc_ln40_105_fu_13386_p1 = m_40_fu_13263_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_106_fu_10896_p1() { trunc_ln40_106_fu_10896_p1 = m_27_fu_10638_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_107_fu_10918_p1() { trunc_ln40_107_fu_10918_p1 = m_27_fu_10638_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_108_fu_13449_p1() { trunc_ln40_108_fu_13449_p1 = m_41_fu_13348_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_109_fu_13471_p1() { trunc_ln40_109_fu_13471_p1 = m_41_fu_13348_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_10_fu_1458_p1() { trunc_ln40_10_fu_1458_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_110_fu_10966_p1() { trunc_ln40_110_fu_10966_p1 = m_28_fu_10651_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_111_fu_10988_p1() { trunc_ln40_111_fu_10988_p1 = m_28_fu_10651_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_112_fu_13535_p1() { trunc_ln40_112_fu_13535_p1 = m_42_fu_13433_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_113_fu_13557_p1() { trunc_ln40_113_fu_13557_p1 = m_42_fu_13433_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_114_fu_11036_p1() { trunc_ln40_114_fu_11036_p1 = m_29_fu_10736_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_115_fu_11058_p1() { trunc_ln40_115_fu_11058_p1 = m_29_fu_10736_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_116_fu_13609_p1() { trunc_ln40_116_fu_13609_p1 = m_43_fu_13519_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_117_fu_13631_p1() { trunc_ln40_117_fu_13631_p1 = m_43_fu_13519_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_118_fu_12165_p1() { trunc_ln40_118_fu_12165_p1 = m_30_fu_11565_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_119_fu_12187_p1() { trunc_ln40_119_fu_12187_p1 = m_30_fu_11565_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_11_fu_1486_p1() { trunc_ln40_11_fu_1486_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_120_fu_14614_p1() { trunc_ln40_120_fu_14614_p1 = m_44_fu_14599_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_121_fu_14636_p1() { trunc_ln40_121_fu_14636_p1 = m_44_fu_14599_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_122_fu_12235_p1() { trunc_ln40_122_fu_12235_p1 = m_31_fu_11575_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_123_fu_12257_p1() { trunc_ln40_123_fu_12257_p1 = m_31_fu_11575_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_124_fu_13695_p1() { trunc_ln40_124_fu_13695_p1 = m_45_fu_13679_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_125_fu_13717_p1() { trunc_ln40_125_fu_13717_p1 = m_45_fu_13679_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_126_fu_12305_p1() { trunc_ln40_126_fu_12305_p1 = m_32_fu_11659_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_127_fu_12327_p1() { trunc_ln40_127_fu_12327_p1 = m_32_fu_11659_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_128_fu_14708_p1() { trunc_ln40_128_fu_14708_p1 = m_46_fu_14683_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_129_fu_14730_p1() { trunc_ln40_129_fu_14730_p1 = m_46_fu_14683_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_12_fu_6781_p1() { trunc_ln40_12_fu_6781_p1 = m_17_fu_6752_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_130_fu_12375_p1() { trunc_ln40_130_fu_12375_p1 = m_33_fu_11744_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_131_fu_12397_p1() { trunc_ln40_131_fu_12397_p1 = m_33_fu_11744_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_132_fu_14793_p1() { trunc_ln40_132_fu_14793_p1 = m_47_fu_14693_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_133_fu_14815_p1() { trunc_ln40_133_fu_14815_p1 = m_47_fu_14693_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_134_fu_12445_p1() { trunc_ln40_134_fu_12445_p1 = m_34_fu_11829_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_135_fu_12467_p1() { trunc_ln40_135_fu_12467_p1 = m_34_fu_11829_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_136_fu_14878_p1() { trunc_ln40_136_fu_14878_p1 = m_48_fu_14777_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_137_fu_14900_p1() { trunc_ln40_137_fu_14900_p1 = m_48_fu_14777_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_138_fu_12515_p1() { trunc_ln40_138_fu_12515_p1 = m_35_fu_11914_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_139_fu_12537_p1() { trunc_ln40_139_fu_12537_p1 = m_35_fu_11914_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_13_fu_6803_p1() { trunc_ln40_13_fu_6803_p1 = m_17_fu_6752_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_140_fu_14963_p1() { trunc_ln40_140_fu_14963_p1 = m_49_fu_14862_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_141_fu_14985_p1() { trunc_ln40_141_fu_14985_p1 = m_49_fu_14862_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_142_fu_13770_p1() { trunc_ln40_142_fu_13770_p1 = m_36_fu_13085_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_143_fu_13792_p1() { trunc_ln40_143_fu_13792_p1 = m_36_fu_13085_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_144_fu_15049_p1() { trunc_ln40_144_fu_15049_p1 = m_50_fu_14947_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_145_fu_15071_p1() { trunc_ln40_145_fu_15071_p1 = m_50_fu_14947_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_146_fu_12585_p1() { trunc_ln40_146_fu_12585_p1 = m_37_fu_12074_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_147_fu_12607_p1() { trunc_ln40_147_fu_12607_p1 = m_37_fu_12074_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_148_fu_15119_p1() { trunc_ln40_148_fu_15119_p1 = m_51_fu_15033_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_149_fu_15141_p1() { trunc_ln40_149_fu_15141_p1 = m_51_fu_15033_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_14_fu_1809_p1() { trunc_ln40_14_fu_1809_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_150_fu_13840_p1() { trunc_ln40_150_fu_13840_p1 = m_38_fu_13169_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_151_fu_13862_p1() { trunc_ln40_151_fu_13862_p1 = m_38_fu_13169_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_152_fu_16040_p1() { trunc_ln40_152_fu_16040_p1 = m_52_fu_16024_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_153_fu_16062_p1() { trunc_ln40_153_fu_16062_p1 = m_52_fu_16024_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_154_fu_13910_p1() { trunc_ln40_154_fu_13910_p1 = m_39_fu_13179_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_155_fu_13932_p1() { trunc_ln40_155_fu_13932_p1 = m_39_fu_13179_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_156_fu_15205_p1() { trunc_ln40_156_fu_15205_p1 = m_53_fu_15189_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_157_fu_15227_p1() { trunc_ln40_157_fu_15227_p1 = m_53_fu_15189_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_158_fu_13980_p1() { trunc_ln40_158_fu_13980_p1 = m_40_fu_13263_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_159_fu_14002_p1() { trunc_ln40_159_fu_14002_p1 = m_40_fu_13263_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_15_fu_1837_p1() { trunc_ln40_15_fu_1837_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_160_fu_16139_p1() { trunc_ln40_160_fu_16139_p1 = m_54_fu_16109_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_161_fu_16161_p1() { trunc_ln40_161_fu_16161_p1 = m_54_fu_16109_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_162_fu_14050_p1() { trunc_ln40_162_fu_14050_p1 = m_41_fu_13348_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_163_fu_14072_p1() { trunc_ln40_163_fu_14072_p1 = m_41_fu_13348_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_164_fu_16209_p1() { trunc_ln40_164_fu_16209_p1 = m_55_fu_16123_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_165_fu_16231_p1() { trunc_ln40_165_fu_16231_p1 = m_55_fu_16123_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_166_fu_14120_p1() { trunc_ln40_166_fu_14120_p1 = m_42_fu_13433_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_167_fu_14142_p1() { trunc_ln40_167_fu_14142_p1 = m_42_fu_13433_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_168_fu_16916_p1() { trunc_ln40_168_fu_16916_p1 = m_56_fu_16900_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_169_fu_16938_p1() { trunc_ln40_169_fu_16938_p1 = m_56_fu_16900_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_16_fu_6851_p1() { trunc_ln40_16_fu_6851_p1 = m_18_fu_6765_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_170_fu_14190_p1() { trunc_ln40_170_fu_14190_p1 = m_43_fu_13519_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_171_fu_14212_p1() { trunc_ln40_171_fu_14212_p1 = m_43_fu_13519_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_172_fu_16294_p1() { trunc_ln40_172_fu_16294_p1 = m_57_fu_16278_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_173_fu_16316_p1() { trunc_ln40_173_fu_16316_p1 = m_57_fu_16278_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_174_fu_15275_p1() { trunc_ln40_174_fu_15275_p1 = m_44_fu_14599_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_175_fu_15297_p1() { trunc_ln40_175_fu_15297_p1 = m_44_fu_14599_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_176_fu_17001_p1() { trunc_ln40_176_fu_17001_p1 = m_58_fu_16985_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_177_fu_17023_p1() { trunc_ln40_177_fu_17023_p1 = m_58_fu_16985_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_178_fu_14260_p1() { trunc_ln40_178_fu_14260_p1 = m_45_fu_13679_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_179_fu_14282_p1() { trunc_ln40_179_fu_14282_p1 = m_45_fu_13679_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_17_fu_6873_p1() { trunc_ln40_17_fu_6873_p1 = m_18_fu_6765_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_180_fu_16380_p1() { trunc_ln40_180_fu_16380_p1 = m_59_fu_16364_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_181_fu_16402_p1() { trunc_ln40_181_fu_16402_p1 = m_59_fu_16364_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_182_fu_15345_p1() { trunc_ln40_182_fu_15345_p1 = m_46_fu_14683_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_183_fu_15367_p1() { trunc_ln40_183_fu_15367_p1 = m_46_fu_14683_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_184_fu_17086_p1() { trunc_ln40_184_fu_17086_p1 = m_60_fu_17070_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_185_fu_17108_p1() { trunc_ln40_185_fu_17108_p1 = m_60_fu_17070_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_186_fu_15415_p1() { trunc_ln40_186_fu_15415_p1 = m_47_fu_14693_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_187_fu_15437_p1() { trunc_ln40_187_fu_15437_p1 = m_47_fu_14693_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_188_fu_23299_p1() { trunc_ln40_188_fu_23299_p1 = m_61_reg_26038_pp0_iter4_reg.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_189_fu_23319_p1() { trunc_ln40_189_fu_23319_p1 = m_61_reg_26038_pp0_iter4_reg.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_18_fu_1901_p1() { trunc_ln40_18_fu_1901_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_190_fu_15485_p1() { trunc_ln40_190_fu_15485_p1 = m_48_fu_14777_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_191_fu_15507_p1() { trunc_ln40_191_fu_15507_p1 = m_48_fu_14777_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_19_fu_1929_p1() { trunc_ln40_19_fu_1929_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_1_fu_5088_p1() { trunc_ln40_1_fu_5088_p1 = data_1_q0.read().range(3-1, 0); } void sha256_transform::thread_trunc_ln40_20_fu_7540_p1() { trunc_ln40_20_fu_7540_p1 = m_19_fu_7520_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_21_fu_7562_p1() { trunc_ln40_21_fu_7562_p1 = m_19_fu_7520_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_22_fu_2764_p1() { trunc_ln40_22_fu_2764_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_23_fu_2792_p1() { trunc_ln40_23_fu_2792_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_24_fu_8140_p1() { trunc_ln40_24_fu_8140_p1 = m_20_fu_8111_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_25_fu_8162_p1() { trunc_ln40_25_fu_8162_p1 = m_20_fu_8111_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_26_fu_2856_p1() { trunc_ln40_26_fu_2856_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_27_fu_2884_p1() { trunc_ln40_27_fu_2884_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_28_fu_8214_p1() { trunc_ln40_28_fu_8214_p1 = m_21_fu_8124_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_29_fu_8236_p1() { trunc_ln40_29_fu_8236_p1 = m_21_fu_8124_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_2_fu_992_p1() { trunc_ln40_2_fu_992_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_30_fu_3249_p1() { trunc_ln40_30_fu_3249_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_31_fu_3277_p1() { trunc_ln40_31_fu_3277_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_32_fu_8724_p1() { trunc_ln40_32_fu_8724_p1 = m_22_fu_8695_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_33_fu_8746_p1() { trunc_ln40_33_fu_8746_p1 = m_22_fu_8695_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_34_fu_3341_p1() { trunc_ln40_34_fu_3341_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_35_fu_3369_p1() { trunc_ln40_35_fu_3369_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_36_fu_8794_p1() { trunc_ln40_36_fu_8794_p1 = m_23_fu_8708_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_37_fu_8816_p1() { trunc_ln40_37_fu_8816_p1 = m_23_fu_8708_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_38_fu_3930_p1() { trunc_ln40_38_fu_3930_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_39_fu_3958_p1() { trunc_ln40_39_fu_3958_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_3_fu_1020_p1() { trunc_ln40_3_fu_1020_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_40_fu_9483_p1() { trunc_ln40_40_fu_9483_p1 = m_24_fu_9463_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_41_fu_9505_p1() { trunc_ln40_41_fu_9505_p1 = m_24_fu_9463_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_42_fu_4022_p1() { trunc_ln40_42_fu_4022_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_43_fu_4050_p1() { trunc_ln40_43_fu_4050_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_44_fu_10083_p1() { trunc_ln40_44_fu_10083_p1 = m_25_fu_10054_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_45_fu_10105_p1() { trunc_ln40_45_fu_10105_p1 = m_25_fu_10054_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_46_fu_4563_p1() { trunc_ln40_46_fu_4563_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_47_fu_4591_p1() { trunc_ln40_47_fu_4591_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_48_fu_10157_p1() { trunc_ln40_48_fu_10157_p1 = m_26_fu_10067_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_49_fu_10179_p1() { trunc_ln40_49_fu_10179_p1 = m_26_fu_10067_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_4_fu_5152_p1() { trunc_ln40_4_fu_5152_p1 = data_1_q1.read().range(1-1, 0); } void sha256_transform::thread_trunc_ln40_50_fu_4655_p1() { trunc_ln40_50_fu_4655_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_51_fu_4683_p1() { trunc_ln40_51_fu_4683_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_52_fu_10667_p1() { trunc_ln40_52_fu_10667_p1 = m_27_fu_10638_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_53_fu_10689_p1() { trunc_ln40_53_fu_10689_p1 = m_27_fu_10638_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_54_fu_5242_p1() { trunc_ln40_54_fu_5242_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_55_fu_5270_p1() { trunc_ln40_55_fu_5270_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_56_fu_10752_p1() { trunc_ln40_56_fu_10752_p1 = m_28_fu_10651_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_57_fu_10774_p1() { trunc_ln40_57_fu_10774_p1 = m_28_fu_10651_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_58_fu_5334_p1() { trunc_ln40_58_fu_5334_p1 = data_3_q1.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_59_fu_5362_p1() { trunc_ln40_59_fu_5362_p1 = data_1_q1.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_5_fu_5180_p1() { trunc_ln40_5_fu_5180_p1 = data_1_q1.read().range(3-1, 0); } void sha256_transform::thread_trunc_ln40_60_fu_10822_p1() { trunc_ln40_60_fu_10822_p1 = m_29_fu_10736_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_61_fu_10844_p1() { trunc_ln40_61_fu_10844_p1 = m_29_fu_10736_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_62_fu_6412_p1() { trunc_ln40_62_fu_6412_p1 = m_16_fu_6322_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_63_fu_6434_p1() { trunc_ln40_63_fu_6434_p1 = m_16_fu_6322_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_64_fu_11590_p1() { trunc_ln40_64_fu_11590_p1 = m_30_fu_11565_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_65_fu_11612_p1() { trunc_ln40_65_fu_11612_p1 = m_30_fu_11565_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_66_fu_6921_p1() { trunc_ln40_66_fu_6921_p1 = m_17_fu_6752_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_67_fu_6943_p1() { trunc_ln40_67_fu_6943_p1 = m_17_fu_6752_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_68_fu_11675_p1() { trunc_ln40_68_fu_11675_p1 = m_31_fu_11575_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_69_fu_11697_p1() { trunc_ln40_69_fu_11697_p1 = m_31_fu_11575_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_6_fu_1366_p1() { trunc_ln40_6_fu_1366_p1 = data_3_q0.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_70_fu_6991_p1() { trunc_ln40_70_fu_6991_p1 = m_18_fu_6765_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_71_fu_7013_p1() { trunc_ln40_71_fu_7013_p1 = m_18_fu_6765_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_72_fu_11760_p1() { trunc_ln40_72_fu_11760_p1 = m_32_fu_11659_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_73_fu_11782_p1() { trunc_ln40_73_fu_11782_p1 = m_32_fu_11659_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_74_fu_7610_p1() { trunc_ln40_74_fu_7610_p1 = m_19_fu_7520_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_75_fu_7632_p1() { trunc_ln40_75_fu_7632_p1 = m_19_fu_7520_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_76_fu_11845_p1() { trunc_ln40_76_fu_11845_p1 = m_33_fu_11744_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_77_fu_11867_p1() { trunc_ln40_77_fu_11867_p1 = m_33_fu_11744_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_78_fu_8284_p1() { trunc_ln40_78_fu_8284_p1 = m_20_fu_8111_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_79_fu_8306_p1() { trunc_ln40_79_fu_8306_p1 = m_20_fu_8111_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_7_fu_1394_p1() { trunc_ln40_7_fu_1394_p1 = data_1_q0.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln40_80_fu_11930_p1() { trunc_ln40_80_fu_11930_p1 = m_34_fu_11829_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_81_fu_11952_p1() { trunc_ln40_81_fu_11952_p1 = m_34_fu_11829_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_82_fu_8354_p1() { trunc_ln40_82_fu_8354_p1 = m_21_fu_8124_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_83_fu_8376_p1() { trunc_ln40_83_fu_8376_p1 = m_21_fu_8124_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_84_fu_12004_p1() { trunc_ln40_84_fu_12004_p1 = m_35_fu_11914_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_85_fu_12026_p1() { trunc_ln40_85_fu_12026_p1 = m_35_fu_11914_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_86_fu_8864_p1() { trunc_ln40_86_fu_8864_p1 = m_22_fu_8695_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_87_fu_8886_p1() { trunc_ln40_87_fu_8886_p1 = m_22_fu_8695_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_88_fu_13100_p1() { trunc_ln40_88_fu_13100_p1 = m_36_fu_13085_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_89_fu_13122_p1() { trunc_ln40_89_fu_13122_p1 = m_36_fu_13085_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_8_fu_6342_p1() { trunc_ln40_8_fu_6342_p1 = m_16_fu_6322_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_90_fu_8934_p1() { trunc_ln40_90_fu_8934_p1 = m_23_fu_8708_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_91_fu_8956_p1() { trunc_ln40_91_fu_8956_p1 = m_23_fu_8708_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_92_fu_12090_p1() { trunc_ln40_92_fu_12090_p1 = m_37_fu_12074_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_93_fu_12112_p1() { trunc_ln40_93_fu_12112_p1 = m_37_fu_12074_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_94_fu_9553_p1() { trunc_ln40_94_fu_9553_p1 = m_24_fu_9463_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_95_fu_9575_p1() { trunc_ln40_95_fu_9575_p1 = m_24_fu_9463_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_96_fu_13194_p1() { trunc_ln40_96_fu_13194_p1 = m_38_fu_13169_p2.read().range(17-1, 0); } void sha256_transform::thread_trunc_ln40_97_fu_13216_p1() { trunc_ln40_97_fu_13216_p1 = m_38_fu_13169_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_98_fu_10227_p1() { trunc_ln40_98_fu_10227_p1 = m_25_fu_10054_p2.read().range(7-1, 0); } void sha256_transform::thread_trunc_ln40_99_fu_10249_p1() { trunc_ln40_99_fu_10249_p1 = m_25_fu_10054_p2.read().range(18-1, 0); } void sha256_transform::thread_trunc_ln40_9_fu_6364_p1() { trunc_ln40_9_fu_6364_p1 = m_16_fu_6322_p2.read().range(19-1, 0); } void sha256_transform::thread_trunc_ln40_fu_5060_p1() { trunc_ln40_fu_5060_p1 = data_1_q0.read().range(1-1, 0); } void sha256_transform::thread_trunc_ln53_100_fu_15924_p1() { trunc_ln53_100_fu_15924_p1 = add_ln58_32_fu_15887_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_101_fu_15946_p1() { trunc_ln53_101_fu_15946_p1 = add_ln58_32_fu_15887_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_102_fu_16619_p1() { trunc_ln53_102_fu_16619_p1 = add_ln58_33_fu_16592_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_103_fu_16641_p1() { trunc_ln53_103_fu_16641_p1 = add_ln58_33_fu_16592_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_104_fu_16663_p1() { trunc_ln53_104_fu_16663_p1 = add_ln58_33_fu_16592_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_105_fu_16824_p1() { trunc_ln53_105_fu_16824_p1 = add_ln58_34_fu_16809_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_106_fu_16846_p1() { trunc_ln53_106_fu_16846_p1 = add_ln58_34_fu_16809_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_107_fu_16868_p1() { trunc_ln53_107_fu_16868_p1 = add_ln58_34_fu_16809_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_108_fu_17309_p1() { trunc_ln53_108_fu_17309_p1 = add_ln58_35_fu_17294_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_109_fu_17331_p1() { trunc_ln53_109_fu_17331_p1 = add_ln58_35_fu_17294_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_10_fu_1708_p1() { trunc_ln53_10_fu_1708_p1 = add_ln58_2_fu_1670_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_110_fu_17353_p1() { trunc_ln53_110_fu_17353_p1 = add_ln58_35_fu_17294_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_111_fu_17583_p1() { trunc_ln53_111_fu_17583_p1 = add_ln58_36_fu_17558_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_112_fu_17605_p1() { trunc_ln53_112_fu_17605_p1 = add_ln58_36_fu_17558_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_113_fu_17627_p1() { trunc_ln53_113_fu_17627_p1 = add_ln58_36_fu_17558_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_114_fu_17788_p1() { trunc_ln53_114_fu_17788_p1 = add_ln58_37_fu_17773_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_115_fu_17810_p1() { trunc_ln53_115_fu_17810_p1 = add_ln58_37_fu_17773_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_116_fu_17832_p1() { trunc_ln53_116_fu_17832_p1 = add_ln58_37_fu_17773_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_117_fu_18053_p1() { trunc_ln53_117_fu_18053_p1 = add_ln58_38_fu_18026_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_118_fu_18075_p1() { trunc_ln53_118_fu_18075_p1 = add_ln58_38_fu_18026_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_119_fu_18097_p1() { trunc_ln53_119_fu_18097_p1 = add_ln58_38_fu_18026_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_11_fu_1730_p1() { trunc_ln53_11_fu_1730_p1 = add_ln58_2_fu_1670_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_120_fu_18258_p1() { trunc_ln53_120_fu_18258_p1 = add_ln58_39_fu_18243_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_121_fu_18280_p1() { trunc_ln53_121_fu_18280_p1 = add_ln58_39_fu_18243_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_122_fu_18302_p1() { trunc_ln53_122_fu_18302_p1 = add_ln58_39_fu_18243_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_123_fu_18489_p1() { trunc_ln53_123_fu_18489_p1 = add_ln58_40_fu_18474_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_124_fu_18511_p1() { trunc_ln53_124_fu_18511_p1 = add_ln58_40_fu_18474_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_125_fu_18533_p1() { trunc_ln53_125_fu_18533_p1 = add_ln58_40_fu_18474_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_126_fu_18753_p1() { trunc_ln53_126_fu_18753_p1 = add_ln58_41_fu_18728_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_127_fu_18775_p1() { trunc_ln53_127_fu_18775_p1 = add_ln58_41_fu_18728_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_128_fu_18797_p1() { trunc_ln53_128_fu_18797_p1 = add_ln58_41_fu_18728_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_129_fu_18958_p1() { trunc_ln53_129_fu_18958_p1 = add_ln58_42_fu_18943_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_12_fu_2457_p1() { trunc_ln53_12_fu_2457_p1 = add_ln58_3_fu_2429_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_130_fu_18980_p1() { trunc_ln53_130_fu_18980_p1 = add_ln58_42_fu_18943_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_131_fu_19002_p1() { trunc_ln53_131_fu_19002_p1 = add_ln58_42_fu_18943_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_132_fu_19223_p1() { trunc_ln53_132_fu_19223_p1 = add_ln58_43_fu_19196_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_133_fu_19245_p1() { trunc_ln53_133_fu_19245_p1 = add_ln58_43_fu_19196_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_134_fu_19267_p1() { trunc_ln53_134_fu_19267_p1 = add_ln58_43_fu_19196_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_135_fu_19428_p1() { trunc_ln53_135_fu_19428_p1 = add_ln58_44_fu_19413_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_136_fu_19450_p1() { trunc_ln53_136_fu_19450_p1 = add_ln58_44_fu_19413_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_137_fu_19472_p1() { trunc_ln53_137_fu_19472_p1 = add_ln58_44_fu_19413_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_138_fu_19659_p1() { trunc_ln53_138_fu_19659_p1 = add_ln58_45_fu_19644_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_139_fu_19681_p1() { trunc_ln53_139_fu_19681_p1 = add_ln58_45_fu_19644_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_13_fu_2479_p1() { trunc_ln53_13_fu_2479_p1 = add_ln58_3_fu_2429_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_140_fu_19703_p1() { trunc_ln53_140_fu_19703_p1 = add_ln58_45_fu_19644_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_141_fu_19923_p1() { trunc_ln53_141_fu_19923_p1 = add_ln58_46_fu_19898_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_142_fu_19945_p1() { trunc_ln53_142_fu_19945_p1 = add_ln58_46_fu_19898_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_143_fu_19967_p1() { trunc_ln53_143_fu_19967_p1 = add_ln58_46_fu_19898_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_144_fu_20128_p1() { trunc_ln53_144_fu_20128_p1 = add_ln58_47_fu_20113_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_145_fu_20150_p1() { trunc_ln53_145_fu_20150_p1 = add_ln58_47_fu_20113_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_146_fu_20172_p1() { trunc_ln53_146_fu_20172_p1 = add_ln58_47_fu_20113_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_147_fu_20402_p1() { trunc_ln53_147_fu_20402_p1 = add_ln58_48_fu_20375_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_148_fu_20424_p1() { trunc_ln53_148_fu_20424_p1 = add_ln58_48_fu_20375_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_149_fu_20446_p1() { trunc_ln53_149_fu_20446_p1 = add_ln58_48_fu_20375_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_14_fu_2501_p1() { trunc_ln53_14_fu_2501_p1 = add_ln58_3_fu_2429_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_150_fu_20607_p1() { trunc_ln53_150_fu_20607_p1 = add_ln58_49_fu_20592_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_151_fu_20629_p1() { trunc_ln53_151_fu_20629_p1 = add_ln58_49_fu_20592_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_152_fu_20651_p1() { trunc_ln53_152_fu_20651_p1 = add_ln58_49_fu_20592_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_153_fu_20838_p1() { trunc_ln53_153_fu_20838_p1 = add_ln58_50_fu_20823_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_154_fu_20860_p1() { trunc_ln53_154_fu_20860_p1 = add_ln58_50_fu_20823_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_155_fu_20882_p1() { trunc_ln53_155_fu_20882_p1 = add_ln58_50_fu_20823_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_156_fu_21102_p1() { trunc_ln53_156_fu_21102_p1 = add_ln58_51_fu_21077_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_157_fu_21124_p1() { trunc_ln53_157_fu_21124_p1 = add_ln58_51_fu_21077_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_158_fu_21146_p1() { trunc_ln53_158_fu_21146_p1 = add_ln58_51_fu_21077_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_159_fu_21307_p1() { trunc_ln53_159_fu_21307_p1 = add_ln58_52_fu_21292_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_15_fu_2664_p1() { trunc_ln53_15_fu_2664_p1 = add_ln58_4_fu_2648_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_160_fu_21329_p1() { trunc_ln53_160_fu_21329_p1 = add_ln58_52_fu_21292_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_161_fu_21351_p1() { trunc_ln53_161_fu_21351_p1 = add_ln58_52_fu_21292_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_162_fu_21572_p1() { trunc_ln53_162_fu_21572_p1 = add_ln58_53_fu_21545_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_163_fu_21594_p1() { trunc_ln53_163_fu_21594_p1 = add_ln58_53_fu_21545_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_164_fu_21616_p1() { trunc_ln53_164_fu_21616_p1 = add_ln58_53_fu_21545_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_165_fu_21777_p1() { trunc_ln53_165_fu_21777_p1 = add_ln58_54_fu_21762_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_166_fu_21799_p1() { trunc_ln53_166_fu_21799_p1 = add_ln58_54_fu_21762_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_167_fu_21821_p1() { trunc_ln53_167_fu_21821_p1 = add_ln58_54_fu_21762_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_168_fu_22008_p1() { trunc_ln53_168_fu_22008_p1 = add_ln58_55_fu_21993_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_169_fu_22030_p1() { trunc_ln53_169_fu_22030_p1 = add_ln58_55_fu_21993_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_16_fu_2686_p1() { trunc_ln53_16_fu_2686_p1 = add_ln58_4_fu_2648_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_170_fu_22052_p1() { trunc_ln53_170_fu_22052_p1 = add_ln58_55_fu_21993_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_171_fu_22272_p1() { trunc_ln53_171_fu_22272_p1 = add_ln58_56_fu_22247_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_172_fu_22294_p1() { trunc_ln53_172_fu_22294_p1 = add_ln58_56_fu_22247_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_173_fu_22316_p1() { trunc_ln53_173_fu_22316_p1 = add_ln58_56_fu_22247_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_174_fu_22477_p1() { trunc_ln53_174_fu_22477_p1 = add_ln58_57_fu_22462_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_175_fu_22499_p1() { trunc_ln53_175_fu_22499_p1 = add_ln58_57_fu_22462_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_176_fu_22521_p1() { trunc_ln53_176_fu_22521_p1 = add_ln58_57_fu_22462_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_177_fu_22742_p1() { trunc_ln53_177_fu_22742_p1 = add_ln58_58_fu_22715_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_178_fu_22764_p1() { trunc_ln53_178_fu_22764_p1 = add_ln58_58_fu_22715_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_179_fu_22786_p1() { trunc_ln53_179_fu_22786_p1 = add_ln58_58_fu_22715_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_17_fu_2708_p1() { trunc_ln53_17_fu_2708_p1 = add_ln58_4_fu_2648_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_180_fu_22947_p1() { trunc_ln53_180_fu_22947_p1 = add_ln58_59_fu_22932_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_181_fu_22969_p1() { trunc_ln53_181_fu_22969_p1 = add_ln58_59_fu_22932_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_182_fu_22991_p1() { trunc_ln53_182_fu_22991_p1 = add_ln58_59_fu_22932_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_183_fu_23178_p1() { trunc_ln53_183_fu_23178_p1 = add_ln58_60_fu_23163_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_184_fu_23200_p1() { trunc_ln53_184_fu_23200_p1 = add_ln58_60_fu_23163_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_185_fu_23222_p1() { trunc_ln53_185_fu_23222_p1 = add_ln58_60_fu_23163_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_186_fu_23507_p1() { trunc_ln53_186_fu_23507_p1 = add_ln58_61_fu_23482_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_187_fu_23529_p1() { trunc_ln53_187_fu_23529_p1 = add_ln58_61_fu_23482_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_188_fu_23551_p1() { trunc_ln53_188_fu_23551_p1 = add_ln58_61_fu_23482_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_189_fu_23746_p1() { trunc_ln53_189_fu_23746_p1 = add_ln58_62_fu_23719_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_18_fu_3104_p1() { trunc_ln53_18_fu_3104_p1 = add_ln58_5_fu_3089_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_190_fu_23768_p1() { trunc_ln53_190_fu_23768_p1 = add_ln58_62_fu_23719_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_191_fu_23790_p1() { trunc_ln53_191_fu_23790_p1 = add_ln58_62_fu_23719_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_19_fu_3126_p1() { trunc_ln53_19_fu_3126_p1 = add_ln58_5_fu_3089_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_1_fu_1108_p1() { trunc_ln53_1_fu_1108_p1 = ap_port_reg_ctx_state_4_read.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_20_fu_3148_p1() { trunc_ln53_20_fu_3148_p1 = add_ln58_5_fu_3089_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_21_fu_3577_p1() { trunc_ln53_21_fu_3577_p1 = add_ln58_6_fu_3552_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_22_fu_3599_p1() { trunc_ln53_22_fu_3599_p1 = add_ln58_6_fu_3552_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_23_fu_3621_p1() { trunc_ln53_23_fu_3621_p1 = add_ln58_6_fu_3552_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_24_fu_3783_p1() { trunc_ln53_24_fu_3783_p1 = add_ln58_7_fu_3768_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_25_fu_3805_p1() { trunc_ln53_25_fu_3805_p1 = add_ln58_7_fu_3768_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_26_fu_3827_p1() { trunc_ln53_26_fu_3827_p1 = add_ln58_7_fu_3768_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_27_fu_4269_p1() { trunc_ln53_27_fu_4269_p1 = add_ln58_8_fu_4242_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_28_fu_4291_p1() { trunc_ln53_28_fu_4291_p1 = add_ln58_8_fu_4242_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_29_fu_4313_p1() { trunc_ln53_29_fu_4313_p1 = add_ln58_8_fu_4242_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_2_fu_1130_p1() { trunc_ln53_2_fu_1130_p1 = ap_port_reg_ctx_state_4_read.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_30_fu_4475_p1() { trunc_ln53_30_fu_4475_p1 = add_ln58_9_fu_4460_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_31_fu_4497_p1() { trunc_ln53_31_fu_4497_p1 = add_ln58_9_fu_4460_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_32_fu_4519_p1() { trunc_ln53_32_fu_4519_p1 = add_ln58_9_fu_4460_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_33_fu_4902_p1() { trunc_ln53_33_fu_4902_p1 = add_ln58_10_fu_4887_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_34_fu_4924_p1() { trunc_ln53_34_fu_4924_p1 = add_ln58_10_fu_4887_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_35_fu_4946_p1() { trunc_ln53_35_fu_4946_p1 = add_ln58_10_fu_4887_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_36_fu_5570_p1() { trunc_ln53_36_fu_5570_p1 = add_ln58_11_fu_5545_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_37_fu_5592_p1() { trunc_ln53_37_fu_5592_p1 = add_ln58_11_fu_5545_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_38_fu_5614_p1() { trunc_ln53_38_fu_5614_p1 = add_ln58_11_fu_5545_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_39_fu_5775_p1() { trunc_ln53_39_fu_5775_p1 = add_ln58_12_fu_5760_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_3_fu_1218_p1() { trunc_ln53_3_fu_1218_p1 = add_ln58_fu_1202_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_40_fu_5797_p1() { trunc_ln53_40_fu_5797_p1 = add_ln58_12_fu_5760_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_41_fu_5819_p1() { trunc_ln53_41_fu_5819_p1 = add_ln58_12_fu_5760_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_42_fu_6041_p1() { trunc_ln53_42_fu_6041_p1 = add_ln58_13_fu_6014_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_43_fu_6063_p1() { trunc_ln53_43_fu_6063_p1 = add_ln58_13_fu_6014_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_44_fu_6085_p1() { trunc_ln53_44_fu_6085_p1 = add_ln58_13_fu_6014_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_45_fu_6246_p1() { trunc_ln53_45_fu_6246_p1 = add_ln58_14_fu_6231_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_46_fu_6268_p1() { trunc_ln53_46_fu_6268_p1 = add_ln58_14_fu_6231_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_47_fu_6290_p1() { trunc_ln53_47_fu_6290_p1 = add_ln58_14_fu_6231_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_48_fu_6635_p1() { trunc_ln53_48_fu_6635_p1 = add_ln58_15_fu_6620_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_49_fu_6657_p1() { trunc_ln53_49_fu_6657_p1 = add_ln58_15_fu_6620_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_4_fu_1240_p1() { trunc_ln53_4_fu_1240_p1 = add_ln58_fu_1202_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_50_fu_6679_p1() { trunc_ln53_50_fu_6679_p1 = add_ln58_15_fu_6620_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_51_fu_7203_p1() { trunc_ln53_51_fu_7203_p1 = add_ln58_16_fu_7178_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_52_fu_7225_p1() { trunc_ln53_52_fu_7225_p1 = add_ln58_16_fu_7178_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_53_fu_7247_p1() { trunc_ln53_53_fu_7247_p1 = add_ln58_16_fu_7178_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_54_fu_7409_p1() { trunc_ln53_54_fu_7409_p1 = add_ln58_17_fu_7394_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_55_fu_7431_p1() { trunc_ln53_55_fu_7431_p1 = add_ln58_17_fu_7394_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_56_fu_7453_p1() { trunc_ln53_56_fu_7453_p1 = add_ln58_17_fu_7394_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_57_fu_7833_p1() { trunc_ln53_57_fu_7833_p1 = add_ln58_18_fu_7806_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_58_fu_7855_p1() { trunc_ln53_58_fu_7855_p1 = add_ln58_18_fu_7806_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_59_fu_7877_p1() { trunc_ln53_59_fu_7877_p1 = add_ln58_18_fu_7806_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_5_fu_1262_p1() { trunc_ln53_5_fu_1262_p1 = add_ln58_fu_1202_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_60_fu_8039_p1() { trunc_ln53_60_fu_8039_p1 = add_ln58_19_fu_8024_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_61_fu_8061_p1() { trunc_ln53_61_fu_8061_p1 = add_ln58_19_fu_8024_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_62_fu_8083_p1() { trunc_ln53_62_fu_8083_p1 = add_ln58_19_fu_8024_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_63_fu_8578_p1() { trunc_ln53_63_fu_8578_p1 = add_ln58_20_fu_8563_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_64_fu_8600_p1() { trunc_ln53_64_fu_8600_p1 = add_ln58_20_fu_8563_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_65_fu_8622_p1() { trunc_ln53_65_fu_8622_p1 = add_ln58_20_fu_8563_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_66_fu_9146_p1() { trunc_ln53_66_fu_9146_p1 = add_ln58_21_fu_9121_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_67_fu_9168_p1() { trunc_ln53_67_fu_9168_p1 = add_ln58_21_fu_9121_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_68_fu_9190_p1() { trunc_ln53_68_fu_9190_p1 = add_ln58_21_fu_9121_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_69_fu_9352_p1() { trunc_ln53_69_fu_9352_p1 = add_ln58_22_fu_9337_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_6_fu_1557_p1() { trunc_ln53_6_fu_1557_p1 = add_ln58_1_fu_1542_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_70_fu_9374_p1() { trunc_ln53_70_fu_9374_p1 = add_ln58_22_fu_9337_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_71_fu_9396_p1() { trunc_ln53_71_fu_9396_p1 = add_ln58_22_fu_9337_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_72_fu_9776_p1() { trunc_ln53_72_fu_9776_p1 = add_ln58_23_fu_9749_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_73_fu_9798_p1() { trunc_ln53_73_fu_9798_p1 = add_ln58_23_fu_9749_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_74_fu_9820_p1() { trunc_ln53_74_fu_9820_p1 = add_ln58_23_fu_9749_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_75_fu_9982_p1() { trunc_ln53_75_fu_9982_p1 = add_ln58_24_fu_9967_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_76_fu_10004_p1() { trunc_ln53_76_fu_10004_p1 = add_ln58_24_fu_9967_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_77_fu_10026_p1() { trunc_ln53_77_fu_10026_p1 = add_ln58_24_fu_9967_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_78_fu_10521_p1() { trunc_ln53_78_fu_10521_p1 = add_ln58_25_fu_10506_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_79_fu_10543_p1() { trunc_ln53_79_fu_10543_p1 = add_ln58_25_fu_10506_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_7_fu_1579_p1() { trunc_ln53_7_fu_1579_p1 = add_ln58_1_fu_1542_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_80_fu_10565_p1() { trunc_ln53_80_fu_10565_p1 = add_ln58_25_fu_10506_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_81_fu_11248_p1() { trunc_ln53_81_fu_11248_p1 = add_ln58_26_fu_11223_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_82_fu_11270_p1() { trunc_ln53_82_fu_11270_p1 = add_ln58_26_fu_11223_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_83_fu_11292_p1() { trunc_ln53_83_fu_11292_p1 = add_ln58_26_fu_11223_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_84_fu_11454_p1() { trunc_ln53_84_fu_11454_p1 = add_ln58_27_fu_11439_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_85_fu_11476_p1() { trunc_ln53_85_fu_11476_p1 = add_ln58_27_fu_11439_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_86_fu_11498_p1() { trunc_ln53_86_fu_11498_p1 = add_ln58_27_fu_11439_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_87_fu_12808_p1() { trunc_ln53_87_fu_12808_p1 = add_ln58_28_fu_12781_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_88_fu_12830_p1() { trunc_ln53_88_fu_12830_p1 = add_ln58_28_fu_12781_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_89_fu_12852_p1() { trunc_ln53_89_fu_12852_p1 = add_ln58_28_fu_12781_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_8_fu_1601_p1() { trunc_ln53_8_fu_1601_p1 = add_ln58_1_fu_1542_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_90_fu_13013_p1() { trunc_ln53_90_fu_13013_p1 = add_ln58_29_fu_12998_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_91_fu_13035_p1() { trunc_ln53_91_fu_13035_p1 = add_ln58_29_fu_12998_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_92_fu_13057_p1() { trunc_ln53_92_fu_13057_p1 = add_ln58_29_fu_12998_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_93_fu_14483_p1() { trunc_ln53_93_fu_14483_p1 = add_ln58_30_fu_14468_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_94_fu_14505_p1() { trunc_ln53_94_fu_14505_p1 = add_ln58_30_fu_14468_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_95_fu_14527_p1() { trunc_ln53_95_fu_14527_p1 = add_ln58_30_fu_14468_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_96_fu_15697_p1() { trunc_ln53_96_fu_15697_p1 = add_ln58_31_fu_15672_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_97_fu_15719_p1() { trunc_ln53_97_fu_15719_p1 = add_ln58_31_fu_15672_p2.read().range(11-1, 0); } void sha256_transform::thread_trunc_ln53_98_fu_15741_p1() { trunc_ln53_98_fu_15741_p1 = add_ln58_31_fu_15672_p2.read().range(25-1, 0); } void sha256_transform::thread_trunc_ln53_99_fu_15902_p1() { trunc_ln53_99_fu_15902_p1 = add_ln58_32_fu_15887_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_9_fu_1686_p1() { trunc_ln53_9_fu_1686_p1 = add_ln58_2_fu_1670_p2.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln53_fu_1086_p1() { trunc_ln53_fu_1086_p1 = ap_port_reg_ctx_state_4_read.read().range(6-1, 0); } void sha256_transform::thread_trunc_ln54_100_fu_16526_p1() { trunc_ln54_100_fu_16526_p1 = add_ln62_32_fu_16480_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_101_fu_16548_p1() { trunc_ln54_101_fu_16548_p1 = add_ln62_32_fu_16480_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_102_fu_16741_p1() { trunc_ln54_102_fu_16741_p1 = add_ln62_33_fu_16603_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_103_fu_16763_p1() { trunc_ln54_103_fu_16763_p1 = add_ln62_33_fu_16603_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_104_fu_16785_p1() { trunc_ln54_104_fu_16785_p1 = add_ln62_33_fu_16603_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_105_fu_17226_p1() { trunc_ln54_105_fu_17226_p1 = add_ln62_34_fu_17170_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_106_fu_17248_p1() { trunc_ln54_106_fu_17248_p1 = add_ln62_34_fu_17170_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_107_fu_17270_p1() { trunc_ln54_107_fu_17270_p1 = add_ln62_34_fu_17170_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_108_fu_17470_p1() { trunc_ln54_108_fu_17470_p1 = add_ln62_35_fu_17455_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_109_fu_17492_p1() { trunc_ln54_109_fu_17492_p1 = add_ln62_35_fu_17455_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_10_fu_2359_p1() { trunc_ln54_10_fu_2359_p1 = add_ln62_2_fu_2312_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_110_fu_17514_p1() { trunc_ln54_110_fu_17514_p1 = add_ln62_35_fu_17455_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_111_fu_17705_p1() { trunc_ln54_111_fu_17705_p1 = add_ln62_36_fu_17567_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_112_fu_17727_p1() { trunc_ln54_112_fu_17727_p1 = add_ln62_36_fu_17567_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_113_fu_17749_p1() { trunc_ln54_113_fu_17749_p1 = add_ln62_36_fu_17567_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_114_fu_17938_p1() { trunc_ln54_114_fu_17938_p1 = add_ln62_37_fu_17913_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_115_fu_17960_p1() { trunc_ln54_115_fu_17960_p1 = add_ln62_37_fu_17913_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_116_fu_17982_p1() { trunc_ln54_116_fu_17982_p1 = add_ln62_37_fu_17913_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_117_fu_18175_p1() { trunc_ln54_117_fu_18175_p1 = add_ln62_38_fu_18037_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_118_fu_18197_p1() { trunc_ln54_118_fu_18197_p1 = add_ln62_38_fu_18037_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_119_fu_18219_p1() { trunc_ln54_119_fu_18219_p1 = add_ln62_38_fu_18037_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_11_fu_2381_p1() { trunc_ln54_11_fu_2381_p1 = add_ln62_2_fu_2312_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_120_fu_18406_p1() { trunc_ln54_120_fu_18406_p1 = add_ln62_39_fu_18350_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_121_fu_18428_p1() { trunc_ln54_121_fu_18428_p1 = add_ln62_39_fu_18350_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_122_fu_18450_p1() { trunc_ln54_122_fu_18450_p1 = add_ln62_39_fu_18350_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_123_fu_18640_p1() { trunc_ln54_123_fu_18640_p1 = add_ln62_40_fu_18625_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_124_fu_18662_p1() { trunc_ln54_124_fu_18662_p1 = add_ln62_40_fu_18625_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_125_fu_18684_p1() { trunc_ln54_125_fu_18684_p1 = add_ln62_40_fu_18625_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_126_fu_18875_p1() { trunc_ln54_126_fu_18875_p1 = add_ln62_41_fu_18737_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_127_fu_18897_p1() { trunc_ln54_127_fu_18897_p1 = add_ln62_41_fu_18737_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_128_fu_18919_p1() { trunc_ln54_128_fu_18919_p1 = add_ln62_41_fu_18737_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_129_fu_19108_p1() { trunc_ln54_129_fu_19108_p1 = add_ln62_42_fu_19084_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_12_fu_2580_p1() { trunc_ln54_12_fu_2580_p1 = add_ln62_3_fu_2441_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_130_fu_19130_p1() { trunc_ln54_130_fu_19130_p1 = add_ln62_42_fu_19084_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_131_fu_19152_p1() { trunc_ln54_131_fu_19152_p1 = add_ln62_42_fu_19084_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_132_fu_19345_p1() { trunc_ln54_132_fu_19345_p1 = add_ln62_43_fu_19207_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_133_fu_19367_p1() { trunc_ln54_133_fu_19367_p1 = add_ln62_43_fu_19207_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_134_fu_19389_p1() { trunc_ln54_134_fu_19389_p1 = add_ln62_43_fu_19207_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_135_fu_19576_p1() { trunc_ln54_135_fu_19576_p1 = add_ln62_44_fu_19520_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_136_fu_19598_p1() { trunc_ln54_136_fu_19598_p1 = add_ln62_44_fu_19520_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_137_fu_19620_p1() { trunc_ln54_137_fu_19620_p1 = add_ln62_44_fu_19520_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_138_fu_19810_p1() { trunc_ln54_138_fu_19810_p1 = add_ln62_45_fu_19795_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_139_fu_19832_p1() { trunc_ln54_139_fu_19832_p1 = add_ln62_45_fu_19795_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_13_fu_2602_p1() { trunc_ln54_13_fu_2602_p1 = add_ln62_3_fu_2441_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_140_fu_19854_p1() { trunc_ln54_140_fu_19854_p1 = add_ln62_45_fu_19795_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_141_fu_20045_p1() { trunc_ln54_141_fu_20045_p1 = add_ln62_46_fu_19907_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_142_fu_20067_p1() { trunc_ln54_142_fu_20067_p1 = add_ln62_46_fu_19907_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_143_fu_20089_p1() { trunc_ln54_143_fu_20089_p1 = add_ln62_46_fu_19907_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_144_fu_20287_p1() { trunc_ln54_144_fu_20287_p1 = add_ln62_47_fu_20263_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_145_fu_20309_p1() { trunc_ln54_145_fu_20309_p1 = add_ln62_47_fu_20263_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_146_fu_20331_p1() { trunc_ln54_146_fu_20331_p1 = add_ln62_47_fu_20263_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_147_fu_20524_p1() { trunc_ln54_147_fu_20524_p1 = add_ln62_48_fu_20386_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_148_fu_20546_p1() { trunc_ln54_148_fu_20546_p1 = add_ln62_48_fu_20386_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_149_fu_20568_p1() { trunc_ln54_149_fu_20568_p1 = add_ln62_48_fu_20386_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_14_fu_2624_p1() { trunc_ln54_14_fu_2624_p1 = add_ln62_3_fu_2441_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_150_fu_20755_p1() { trunc_ln54_150_fu_20755_p1 = add_ln62_49_fu_20699_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_151_fu_20777_p1() { trunc_ln54_151_fu_20777_p1 = add_ln62_49_fu_20699_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_152_fu_20799_p1() { trunc_ln54_152_fu_20799_p1 = add_ln62_49_fu_20699_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_153_fu_20989_p1() { trunc_ln54_153_fu_20989_p1 = add_ln62_50_fu_20974_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_154_fu_21011_p1() { trunc_ln54_154_fu_21011_p1 = add_ln62_50_fu_20974_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_155_fu_21033_p1() { trunc_ln54_155_fu_21033_p1 = add_ln62_50_fu_20974_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_156_fu_21224_p1() { trunc_ln54_156_fu_21224_p1 = add_ln62_51_fu_21086_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_157_fu_21246_p1() { trunc_ln54_157_fu_21246_p1 = add_ln62_51_fu_21086_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_158_fu_21268_p1() { trunc_ln54_158_fu_21268_p1 = add_ln62_51_fu_21086_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_159_fu_21457_p1() { trunc_ln54_159_fu_21457_p1 = add_ln62_52_fu_21433_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_15_fu_3021_p1() { trunc_ln54_15_fu_3021_p1 = add_ln62_4_fu_2964_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_160_fu_21479_p1() { trunc_ln54_160_fu_21479_p1 = add_ln62_52_fu_21433_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_161_fu_21501_p1() { trunc_ln54_161_fu_21501_p1 = add_ln62_52_fu_21433_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_162_fu_21694_p1() { trunc_ln54_162_fu_21694_p1 = add_ln62_53_fu_21556_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_163_fu_21716_p1() { trunc_ln54_163_fu_21716_p1 = add_ln62_53_fu_21556_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_164_fu_21738_p1() { trunc_ln54_164_fu_21738_p1 = add_ln62_53_fu_21556_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_165_fu_21925_p1() { trunc_ln54_165_fu_21925_p1 = add_ln62_54_fu_21869_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_166_fu_21947_p1() { trunc_ln54_166_fu_21947_p1 = add_ln62_54_fu_21869_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_167_fu_21969_p1() { trunc_ln54_167_fu_21969_p1 = add_ln62_54_fu_21869_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_168_fu_22159_p1() { trunc_ln54_168_fu_22159_p1 = add_ln62_55_fu_22144_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_169_fu_22181_p1() { trunc_ln54_169_fu_22181_p1 = add_ln62_55_fu_22144_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_16_fu_3043_p1() { trunc_ln54_16_fu_3043_p1 = add_ln62_4_fu_2964_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_170_fu_22203_p1() { trunc_ln54_170_fu_22203_p1 = add_ln62_55_fu_22144_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_171_fu_22394_p1() { trunc_ln54_171_fu_22394_p1 = add_ln62_56_fu_22256_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_172_fu_22416_p1() { trunc_ln54_172_fu_22416_p1 = add_ln62_56_fu_22256_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_173_fu_22438_p1() { trunc_ln54_173_fu_22438_p1 = add_ln62_56_fu_22256_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_174_fu_22627_p1() { trunc_ln54_174_fu_22627_p1 = add_ln62_57_fu_22602_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_175_fu_22649_p1() { trunc_ln54_175_fu_22649_p1 = add_ln62_57_fu_22602_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_176_fu_22671_p1() { trunc_ln54_176_fu_22671_p1 = add_ln62_57_fu_22602_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_177_fu_22864_p1() { trunc_ln54_177_fu_22864_p1 = add_ln62_58_fu_22726_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_178_fu_22886_p1() { trunc_ln54_178_fu_22886_p1 = add_ln62_58_fu_22726_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_179_fu_22908_p1() { trunc_ln54_179_fu_22908_p1 = add_ln62_58_fu_22726_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_17_fu_3065_p1() { trunc_ln54_17_fu_3065_p1 = add_ln62_4_fu_2964_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_180_fu_23095_p1() { trunc_ln54_180_fu_23095_p1 = add_ln62_59_fu_23039_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_181_fu_23117_p1() { trunc_ln54_181_fu_23117_p1 = add_ln62_59_fu_23039_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_182_fu_23139_p1() { trunc_ln54_182_fu_23139_p1 = add_ln62_59_fu_23039_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_183_fu_23394_p1() { trunc_ln54_183_fu_23394_p1 = add_ln62_60_fu_23379_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_184_fu_23416_p1() { trunc_ln54_184_fu_23416_p1 = add_ln62_60_fu_23379_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_185_fu_23438_p1() { trunc_ln54_185_fu_23438_p1 = add_ln62_60_fu_23379_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_186_fu_23629_p1() { trunc_ln54_186_fu_23629_p1 = add_ln62_61_fu_23491_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_187_fu_23651_p1() { trunc_ln54_187_fu_23651_p1 = add_ln62_61_fu_23491_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_188_fu_23673_p1() { trunc_ln54_188_fu_23673_p1 = add_ln62_61_fu_23491_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_189_fu_23858_p1() { trunc_ln54_189_fu_23858_p1 = add_ln62_62_fu_23730_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_18_fu_3464_p1() { trunc_ln54_18_fu_3464_p1 = add_ln62_5_fu_3449_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_190_fu_23880_p1() { trunc_ln54_190_fu_23880_p1 = add_ln62_62_fu_23730_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_191_fu_23902_p1() { trunc_ln54_191_fu_23902_p1 = add_ln62_62_fu_23730_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_19_fu_3486_p1() { trunc_ln54_19_fu_3486_p1 = add_ln62_5_fu_3449_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_1_fu_2017_p1() { trunc_ln54_1_fu_2017_p1 = ap_port_reg_ctx_state_0_read.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_20_fu_3508_p1() { trunc_ln54_20_fu_3508_p1 = add_ln62_5_fu_3449_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_21_fu_3700_p1() { trunc_ln54_21_fu_3700_p1 = add_ln62_6_fu_3561_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_22_fu_3722_p1() { trunc_ln54_22_fu_3722_p1 = add_ln62_6_fu_3561_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_23_fu_3744_p1() { trunc_ln54_23_fu_3744_p1 = add_ln62_6_fu_3561_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_24_fu_4154_p1() { trunc_ln54_24_fu_4154_p1 = add_ln62_7_fu_4130_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_25_fu_4176_p1() { trunc_ln54_25_fu_4176_p1 = add_ln62_7_fu_4130_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_26_fu_4198_p1() { trunc_ln54_26_fu_4198_p1 = add_ln62_7_fu_4130_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_27_fu_4392_p1() { trunc_ln54_27_fu_4392_p1 = add_ln62_8_fu_4253_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_28_fu_4414_p1() { trunc_ln54_28_fu_4414_p1 = add_ln62_8_fu_4253_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_29_fu_4436_p1() { trunc_ln54_29_fu_4436_p1 = add_ln62_8_fu_4253_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_2_fu_2039_p1() { trunc_ln54_2_fu_2039_p1 = ap_port_reg_ctx_state_0_read.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_30_fu_4819_p1() { trunc_ln54_30_fu_4819_p1 = add_ln62_9_fu_4763_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_31_fu_4841_p1() { trunc_ln54_31_fu_4841_p1 = add_ln62_9_fu_4763_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_32_fu_4863_p1() { trunc_ln54_32_fu_4863_p1 = add_ln62_9_fu_4763_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_33_fu_5457_p1() { trunc_ln54_33_fu_5457_p1 = add_ln62_10_fu_5442_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_34_fu_5479_p1() { trunc_ln54_34_fu_5479_p1 = add_ln62_10_fu_5442_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_35_fu_5501_p1() { trunc_ln54_35_fu_5501_p1 = add_ln62_10_fu_5442_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_36_fu_5692_p1() { trunc_ln54_36_fu_5692_p1 = add_ln62_11_fu_5554_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_37_fu_5714_p1() { trunc_ln54_37_fu_5714_p1 = add_ln62_11_fu_5554_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_38_fu_5736_p1() { trunc_ln54_38_fu_5736_p1 = add_ln62_11_fu_5554_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_39_fu_5926_p1() { trunc_ln54_39_fu_5926_p1 = add_ln62_12_fu_5901_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_3_fu_2104_p1() { trunc_ln54_3_fu_2104_p1 = add_ln62_fu_2088_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_40_fu_5948_p1() { trunc_ln54_40_fu_5948_p1 = add_ln62_12_fu_5901_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_41_fu_5970_p1() { trunc_ln54_41_fu_5970_p1 = add_ln62_12_fu_5901_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_42_fu_6163_p1() { trunc_ln54_42_fu_6163_p1 = add_ln62_13_fu_6025_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_43_fu_6185_p1() { trunc_ln54_43_fu_6185_p1 = add_ln62_13_fu_6025_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_44_fu_6207_p1() { trunc_ln54_44_fu_6207_p1 = add_ln62_13_fu_6025_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_45_fu_6552_p1() { trunc_ln54_45_fu_6552_p1 = add_ln62_14_fu_6496_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_46_fu_6574_p1() { trunc_ln54_46_fu_6574_p1 = add_ln62_14_fu_6496_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_47_fu_6596_p1() { trunc_ln54_47_fu_6596_p1 = add_ln62_14_fu_6496_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_48_fu_7090_p1() { trunc_ln54_48_fu_7090_p1 = add_ln62_15_fu_7075_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_49_fu_7112_p1() { trunc_ln54_49_fu_7112_p1 = add_ln62_15_fu_7075_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_4_fu_2126_p1() { trunc_ln54_4_fu_2126_p1 = add_ln62_fu_2088_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_50_fu_7134_p1() { trunc_ln54_50_fu_7134_p1 = add_ln62_15_fu_7075_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_51_fu_7326_p1() { trunc_ln54_51_fu_7326_p1 = add_ln62_16_fu_7187_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_52_fu_7348_p1() { trunc_ln54_52_fu_7348_p1 = add_ln62_16_fu_7187_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_53_fu_7370_p1() { trunc_ln54_53_fu_7370_p1 = add_ln62_16_fu_7187_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_54_fu_7718_p1() { trunc_ln54_54_fu_7718_p1 = add_ln62_17_fu_7694_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_55_fu_7740_p1() { trunc_ln54_55_fu_7740_p1 = add_ln62_17_fu_7694_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_56_fu_7762_p1() { trunc_ln54_56_fu_7762_p1 = add_ln62_17_fu_7694_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_57_fu_7956_p1() { trunc_ln54_57_fu_7956_p1 = add_ln62_18_fu_7817_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_58_fu_7978_p1() { trunc_ln54_58_fu_7978_p1 = add_ln62_18_fu_7817_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_59_fu_8000_p1() { trunc_ln54_59_fu_8000_p1 = add_ln62_18_fu_7817_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_5_fu_2148_p1() { trunc_ln54_5_fu_2148_p1 = add_ln62_fu_2088_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_60_fu_8495_p1() { trunc_ln54_60_fu_8495_p1 = add_ln62_19_fu_8438_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_61_fu_8517_p1() { trunc_ln54_61_fu_8517_p1 = add_ln62_19_fu_8438_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_62_fu_8539_p1() { trunc_ln54_62_fu_8539_p1 = add_ln62_19_fu_8438_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_63_fu_9033_p1() { trunc_ln54_63_fu_9033_p1 = add_ln62_20_fu_9018_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_64_fu_9055_p1() { trunc_ln54_64_fu_9055_p1 = add_ln62_20_fu_9018_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_65_fu_9077_p1() { trunc_ln54_65_fu_9077_p1 = add_ln62_20_fu_9018_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_66_fu_9269_p1() { trunc_ln54_66_fu_9269_p1 = add_ln62_21_fu_9130_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_67_fu_9291_p1() { trunc_ln54_67_fu_9291_p1 = add_ln62_21_fu_9130_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_68_fu_9313_p1() { trunc_ln54_68_fu_9313_p1 = add_ln62_21_fu_9130_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_69_fu_9661_p1() { trunc_ln54_69_fu_9661_p1 = add_ln62_22_fu_9637_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_6_fu_2215_p1() { trunc_ln54_6_fu_2215_p1 = add_ln62_1_fu_2199_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_70_fu_9683_p1() { trunc_ln54_70_fu_9683_p1 = add_ln62_22_fu_9637_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_71_fu_9705_p1() { trunc_ln54_71_fu_9705_p1 = add_ln62_22_fu_9637_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_72_fu_9899_p1() { trunc_ln54_72_fu_9899_p1 = add_ln62_23_fu_9760_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_73_fu_9921_p1() { trunc_ln54_73_fu_9921_p1 = add_ln62_23_fu_9760_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_74_fu_9943_p1() { trunc_ln54_74_fu_9943_p1 = add_ln62_23_fu_9760_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_75_fu_10438_p1() { trunc_ln54_75_fu_10438_p1 = add_ln62_24_fu_10381_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_76_fu_10460_p1() { trunc_ln54_76_fu_10460_p1 = add_ln62_24_fu_10381_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_77_fu_10482_p1() { trunc_ln54_77_fu_10482_p1 = add_ln62_24_fu_10381_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_78_fu_11135_p1() { trunc_ln54_78_fu_11135_p1 = add_ln62_25_fu_11120_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_79_fu_11157_p1() { trunc_ln54_79_fu_11157_p1 = add_ln62_25_fu_11120_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_7_fu_2237_p1() { trunc_ln54_7_fu_2237_p1 = add_ln62_1_fu_2199_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_80_fu_11179_p1() { trunc_ln54_80_fu_11179_p1 = add_ln62_25_fu_11120_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_81_fu_11371_p1() { trunc_ln54_81_fu_11371_p1 = add_ln62_26_fu_11232_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_82_fu_11393_p1() { trunc_ln54_82_fu_11393_p1 = add_ln62_26_fu_11232_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_83_fu_11415_p1() { trunc_ln54_83_fu_11415_p1 = add_ln62_26_fu_11232_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_84_fu_12693_p1() { trunc_ln54_84_fu_12693_p1 = add_ln62_27_fu_12669_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_85_fu_12715_p1() { trunc_ln54_85_fu_12715_p1 = add_ln62_27_fu_12669_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_86_fu_12737_p1() { trunc_ln54_86_fu_12737_p1 = add_ln62_27_fu_12669_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_87_fu_12930_p1() { trunc_ln54_87_fu_12930_p1 = add_ln62_28_fu_12792_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_88_fu_12952_p1() { trunc_ln54_88_fu_12952_p1 = add_ln62_28_fu_12792_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_89_fu_12974_p1() { trunc_ln54_89_fu_12974_p1 = add_ln62_28_fu_12792_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_8_fu_2259_p1() { trunc_ln54_8_fu_2259_p1 = add_ln62_1_fu_2199_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_90_fu_14400_p1() { trunc_ln54_90_fu_14400_p1 = add_ln62_29_fu_14344_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_91_fu_14422_p1() { trunc_ln54_91_fu_14422_p1 = add_ln62_29_fu_14344_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_92_fu_14444_p1() { trunc_ln54_92_fu_14444_p1 = add_ln62_29_fu_14344_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_93_fu_15584_p1() { trunc_ln54_93_fu_15584_p1 = add_ln62_30_fu_15569_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_94_fu_15606_p1() { trunc_ln54_94_fu_15606_p1 = add_ln62_30_fu_15569_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_95_fu_15628_p1() { trunc_ln54_95_fu_15628_p1 = add_ln62_30_fu_15569_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_96_fu_15819_p1() { trunc_ln54_96_fu_15819_p1 = add_ln62_31_fu_15681_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_97_fu_15841_p1() { trunc_ln54_97_fu_15841_p1 = add_ln62_31_fu_15681_p2.read().range(13-1, 0); } void sha256_transform::thread_trunc_ln54_98_fu_15863_p1() { trunc_ln54_98_fu_15863_p1 = add_ln62_31_fu_15681_p2.read().range(22-1, 0); } void sha256_transform::thread_trunc_ln54_99_fu_16504_p1() { trunc_ln54_99_fu_16504_p1 = add_ln62_32_fu_16480_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_9_fu_2337_p1() { trunc_ln54_9_fu_2337_p1 = add_ln62_2_fu_2312_p2.read().range(2-1, 0); } void sha256_transform::thread_trunc_ln54_fu_1995_p1() { trunc_ln54_fu_1995_p1 = ap_port_reg_ctx_state_0_read.read().range(2-1, 0); } void sha256_transform::thread_xor_ln40_100_fu_13327_p2() { xor_ln40_100_fu_13327_p2 = (zext_ln40_50_fu_13323_p1.read() ^ or_ln40_122_fu_13305_p3.read()); } void sha256_transform::thread_xor_ln40_101_fu_13333_p2() { xor_ln40_101_fu_13333_p2 = (xor_ln40_100_fu_13327_p2.read() ^ or_ln40_25_fu_13283_p3.read()); } void sha256_transform::thread_xor_ln40_102_fu_10345_p2() { xor_ln40_102_fu_10345_p2 = (zext_ln40_51_fu_10341_p1.read() ^ or_ln40_124_fu_10323_p3.read()); } void sha256_transform::thread_xor_ln40_103_fu_10351_p2() { xor_ln40_103_fu_10351_p2 = (xor_ln40_102_fu_10345_p2.read() ^ or_ln40_123_fu_10301_p3.read()); } void sha256_transform::thread_xor_ln40_104_fu_13412_p2() { xor_ln40_104_fu_13412_p2 = (zext_ln40_52_fu_13408_p1.read() ^ or_ln40_125_fu_13390_p3.read()); } void sha256_transform::thread_xor_ln40_105_fu_13418_p2() { xor_ln40_105_fu_13418_p2 = (xor_ln40_104_fu_13412_p2.read() ^ or_ln40_26_fu_13368_p3.read()); } void sha256_transform::thread_xor_ln40_106_fu_10944_p2() { xor_ln40_106_fu_10944_p2 = (zext_ln40_53_fu_10940_p1.read() ^ or_ln40_127_fu_10922_p3.read()); } void sha256_transform::thread_xor_ln40_107_fu_10950_p2() { xor_ln40_107_fu_10950_p2 = (xor_ln40_106_fu_10944_p2.read() ^ or_ln40_126_fu_10900_p3.read()); } void sha256_transform::thread_xor_ln40_108_fu_13497_p2() { xor_ln40_108_fu_13497_p2 = (zext_ln40_54_fu_13493_p1.read() ^ or_ln40_128_fu_13475_p3.read()); } void sha256_transform::thread_xor_ln40_109_fu_13503_p2() { xor_ln40_109_fu_13503_p2 = (xor_ln40_108_fu_13497_p2.read() ^ or_ln40_27_fu_13453_p3.read()); } void sha256_transform::thread_xor_ln40_10_fu_1530_p2() { xor_ln40_10_fu_1530_p2 = (zext_ln40_5_fu_1526_p1.read() ^ or_ln40_54_fu_1490_p6.read()); } void sha256_transform::thread_xor_ln40_110_fu_11014_p2() { xor_ln40_110_fu_11014_p2 = (zext_ln40_55_fu_11010_p1.read() ^ or_ln40_130_fu_10992_p3.read()); } void sha256_transform::thread_xor_ln40_111_fu_11020_p2() { xor_ln40_111_fu_11020_p2 = (xor_ln40_110_fu_11014_p2.read() ^ or_ln40_129_fu_10970_p3.read()); } void sha256_transform::thread_xor_ln40_112_fu_13583_p2() { xor_ln40_112_fu_13583_p2 = (zext_ln40_56_fu_13579_p1.read() ^ or_ln40_131_fu_13561_p3.read()); } void sha256_transform::thread_xor_ln40_113_fu_13589_p2() { xor_ln40_113_fu_13589_p2 = (xor_ln40_112_fu_13583_p2.read() ^ or_ln40_28_fu_13539_p3.read()); } void sha256_transform::thread_xor_ln40_114_fu_11084_p2() { xor_ln40_114_fu_11084_p2 = (zext_ln40_57_fu_11080_p1.read() ^ or_ln40_133_fu_11062_p3.read()); } void sha256_transform::thread_xor_ln40_115_fu_11090_p2() { xor_ln40_115_fu_11090_p2 = (xor_ln40_114_fu_11084_p2.read() ^ or_ln40_132_fu_11040_p3.read()); } void sha256_transform::thread_xor_ln40_116_fu_13657_p2() { xor_ln40_116_fu_13657_p2 = (zext_ln40_58_fu_13653_p1.read() ^ or_ln40_134_fu_13635_p3.read()); } void sha256_transform::thread_xor_ln40_117_fu_13663_p2() { xor_ln40_117_fu_13663_p2 = (xor_ln40_116_fu_13657_p2.read() ^ or_ln40_29_fu_13613_p3.read()); } void sha256_transform::thread_xor_ln40_118_fu_12213_p2() { xor_ln40_118_fu_12213_p2 = (zext_ln40_59_fu_12209_p1.read() ^ or_ln40_136_fu_12191_p3.read()); } void sha256_transform::thread_xor_ln40_119_fu_12219_p2() { xor_ln40_119_fu_12219_p2 = (xor_ln40_118_fu_12213_p2.read() ^ or_ln40_135_fu_12169_p3.read()); } void sha256_transform::thread_xor_ln40_11_fu_1536_p2() { xor_ln40_11_fu_1536_p2 = (xor_ln40_10_fu_1530_p2.read() ^ or_ln40_53_fu_1462_p6.read()); } void sha256_transform::thread_xor_ln40_120_fu_14662_p2() { xor_ln40_120_fu_14662_p2 = (zext_ln40_60_fu_14658_p1.read() ^ or_ln40_137_fu_14640_p3.read()); } void sha256_transform::thread_xor_ln40_121_fu_14668_p2() { xor_ln40_121_fu_14668_p2 = (xor_ln40_120_fu_14662_p2.read() ^ or_ln40_30_fu_14618_p3.read()); } void sha256_transform::thread_xor_ln40_122_fu_12283_p2() { xor_ln40_122_fu_12283_p2 = (zext_ln40_61_fu_12279_p1.read() ^ or_ln40_139_fu_12261_p3.read()); } void sha256_transform::thread_xor_ln40_123_fu_12289_p2() { xor_ln40_123_fu_12289_p2 = (xor_ln40_122_fu_12283_p2.read() ^ or_ln40_138_fu_12239_p3.read()); } void sha256_transform::thread_xor_ln40_124_fu_13743_p2() { xor_ln40_124_fu_13743_p2 = (zext_ln40_62_fu_13739_p1.read() ^ or_ln40_140_fu_13721_p3.read()); } void sha256_transform::thread_xor_ln40_125_fu_13749_p2() { xor_ln40_125_fu_13749_p2 = (xor_ln40_124_fu_13743_p2.read() ^ or_ln40_31_fu_13699_p3.read()); } void sha256_transform::thread_xor_ln40_126_fu_12353_p2() { xor_ln40_126_fu_12353_p2 = (zext_ln40_63_fu_12349_p1.read() ^ or_ln40_142_fu_12331_p3.read()); } void sha256_transform::thread_xor_ln40_127_fu_12359_p2() { xor_ln40_127_fu_12359_p2 = (xor_ln40_126_fu_12353_p2.read() ^ or_ln40_141_fu_12309_p3.read()); } void sha256_transform::thread_xor_ln40_128_fu_14756_p2() { xor_ln40_128_fu_14756_p2 = (zext_ln40_64_fu_14752_p1.read() ^ or_ln40_143_fu_14734_p3.read()); } void sha256_transform::thread_xor_ln40_129_fu_14762_p2() { xor_ln40_129_fu_14762_p2 = (xor_ln40_128_fu_14756_p2.read() ^ or_ln40_32_fu_14712_p3.read()); } void sha256_transform::thread_xor_ln40_12_fu_6829_p2() { xor_ln40_12_fu_6829_p2 = (zext_ln40_6_fu_6825_p1.read() ^ or_ln40_56_fu_6807_p3.read()); } void sha256_transform::thread_xor_ln40_130_fu_12423_p2() { xor_ln40_130_fu_12423_p2 = (zext_ln40_65_fu_12419_p1.read() ^ or_ln40_145_fu_12401_p3.read()); } void sha256_transform::thread_xor_ln40_131_fu_12429_p2() { xor_ln40_131_fu_12429_p2 = (xor_ln40_130_fu_12423_p2.read() ^ or_ln40_144_fu_12379_p3.read()); } void sha256_transform::thread_xor_ln40_132_fu_14841_p2() { xor_ln40_132_fu_14841_p2 = (zext_ln40_66_fu_14837_p1.read() ^ or_ln40_146_fu_14819_p3.read()); } void sha256_transform::thread_xor_ln40_133_fu_14847_p2() { xor_ln40_133_fu_14847_p2 = (xor_ln40_132_fu_14841_p2.read() ^ or_ln40_33_fu_14797_p3.read()); } void sha256_transform::thread_xor_ln40_134_fu_12493_p2() { xor_ln40_134_fu_12493_p2 = (zext_ln40_67_fu_12489_p1.read() ^ or_ln40_148_fu_12471_p3.read()); } void sha256_transform::thread_xor_ln40_135_fu_12499_p2() { xor_ln40_135_fu_12499_p2 = (xor_ln40_134_fu_12493_p2.read() ^ or_ln40_147_fu_12449_p3.read()); } void sha256_transform::thread_xor_ln40_136_fu_14926_p2() { xor_ln40_136_fu_14926_p2 = (zext_ln40_68_fu_14922_p1.read() ^ or_ln40_149_fu_14904_p3.read()); } void sha256_transform::thread_xor_ln40_137_fu_14932_p2() { xor_ln40_137_fu_14932_p2 = (xor_ln40_136_fu_14926_p2.read() ^ or_ln40_34_fu_14882_p3.read()); } void sha256_transform::thread_xor_ln40_138_fu_12563_p2() { xor_ln40_138_fu_12563_p2 = (zext_ln40_69_fu_12559_p1.read() ^ or_ln40_151_fu_12541_p3.read()); } void sha256_transform::thread_xor_ln40_139_fu_12569_p2() { xor_ln40_139_fu_12569_p2 = (xor_ln40_138_fu_12563_p2.read() ^ or_ln40_150_fu_12519_p3.read()); } void sha256_transform::thread_xor_ln40_13_fu_6835_p2() { xor_ln40_13_fu_6835_p2 = (xor_ln40_12_fu_6829_p2.read() ^ or_ln40_55_fu_6785_p3.read()); } void sha256_transform::thread_xor_ln40_140_fu_15011_p2() { xor_ln40_140_fu_15011_p2 = (zext_ln40_70_fu_15007_p1.read() ^ or_ln40_152_fu_14989_p3.read()); } void sha256_transform::thread_xor_ln40_141_fu_15017_p2() { xor_ln40_141_fu_15017_p2 = (xor_ln40_140_fu_15011_p2.read() ^ or_ln40_35_fu_14967_p3.read()); } void sha256_transform::thread_xor_ln40_142_fu_13818_p2() { xor_ln40_142_fu_13818_p2 = (zext_ln40_71_fu_13814_p1.read() ^ or_ln40_154_fu_13796_p3.read()); } void sha256_transform::thread_xor_ln40_143_fu_13824_p2() { xor_ln40_143_fu_13824_p2 = (xor_ln40_142_fu_13818_p2.read() ^ or_ln40_153_fu_13774_p3.read()); } void sha256_transform::thread_xor_ln40_144_fu_15097_p2() { xor_ln40_144_fu_15097_p2 = (zext_ln40_72_fu_15093_p1.read() ^ or_ln40_155_fu_15075_p3.read()); } void sha256_transform::thread_xor_ln40_145_fu_15103_p2() { xor_ln40_145_fu_15103_p2 = (xor_ln40_144_fu_15097_p2.read() ^ or_ln40_36_fu_15053_p3.read()); } void sha256_transform::thread_xor_ln40_146_fu_12633_p2() { xor_ln40_146_fu_12633_p2 = (zext_ln40_73_fu_12629_p1.read() ^ or_ln40_157_fu_12611_p3.read()); } void sha256_transform::thread_xor_ln40_147_fu_12639_p2() { xor_ln40_147_fu_12639_p2 = (xor_ln40_146_fu_12633_p2.read() ^ or_ln40_156_fu_12589_p3.read()); } void sha256_transform::thread_xor_ln40_148_fu_15167_p2() { xor_ln40_148_fu_15167_p2 = (zext_ln40_74_fu_15163_p1.read() ^ or_ln40_158_fu_15145_p3.read()); } void sha256_transform::thread_xor_ln40_149_fu_15173_p2() { xor_ln40_149_fu_15173_p2 = (xor_ln40_148_fu_15167_p2.read() ^ or_ln40_37_fu_15123_p3.read()); } void sha256_transform::thread_xor_ln40_14_fu_1881_p2() { xor_ln40_14_fu_1881_p2 = (zext_ln40_7_fu_1877_p1.read() ^ or_ln40_58_fu_1841_p6.read()); } void sha256_transform::thread_xor_ln40_150_fu_13888_p2() { xor_ln40_150_fu_13888_p2 = (zext_ln40_75_fu_13884_p1.read() ^ or_ln40_160_fu_13866_p3.read()); } void sha256_transform::thread_xor_ln40_151_fu_13894_p2() { xor_ln40_151_fu_13894_p2 = (xor_ln40_150_fu_13888_p2.read() ^ or_ln40_159_fu_13844_p3.read()); } void sha256_transform::thread_xor_ln40_152_fu_16088_p2() { xor_ln40_152_fu_16088_p2 = (zext_ln40_76_fu_16084_p1.read() ^ or_ln40_161_fu_16066_p3.read()); } void sha256_transform::thread_xor_ln40_153_fu_16094_p2() { xor_ln40_153_fu_16094_p2 = (xor_ln40_152_fu_16088_p2.read() ^ or_ln40_38_fu_16044_p3.read()); } void sha256_transform::thread_xor_ln40_154_fu_13958_p2() { xor_ln40_154_fu_13958_p2 = (zext_ln40_77_fu_13954_p1.read() ^ or_ln40_163_fu_13936_p3.read()); } void sha256_transform::thread_xor_ln40_155_fu_13964_p2() { xor_ln40_155_fu_13964_p2 = (xor_ln40_154_fu_13958_p2.read() ^ or_ln40_162_fu_13914_p3.read()); } void sha256_transform::thread_xor_ln40_156_fu_15253_p2() { xor_ln40_156_fu_15253_p2 = (zext_ln40_78_fu_15249_p1.read() ^ or_ln40_164_fu_15231_p3.read()); } void sha256_transform::thread_xor_ln40_157_fu_15259_p2() { xor_ln40_157_fu_15259_p2 = (xor_ln40_156_fu_15253_p2.read() ^ or_ln40_39_fu_15209_p3.read()); } void sha256_transform::thread_xor_ln40_158_fu_14028_p2() { xor_ln40_158_fu_14028_p2 = (zext_ln40_79_fu_14024_p1.read() ^ or_ln40_166_fu_14006_p3.read()); } void sha256_transform::thread_xor_ln40_159_fu_14034_p2() { xor_ln40_159_fu_14034_p2 = (xor_ln40_158_fu_14028_p2.read() ^ or_ln40_165_fu_13984_p3.read()); } void sha256_transform::thread_xor_ln40_15_fu_1887_p2() { xor_ln40_15_fu_1887_p2 = (xor_ln40_14_fu_1881_p2.read() ^ or_ln40_57_fu_1813_p6.read()); } void sha256_transform::thread_xor_ln40_160_fu_16187_p2() { xor_ln40_160_fu_16187_p2 = (zext_ln40_80_fu_16183_p1.read() ^ or_ln40_167_fu_16165_p3.read()); } void sha256_transform::thread_xor_ln40_161_fu_16193_p2() { xor_ln40_161_fu_16193_p2 = (xor_ln40_160_fu_16187_p2.read() ^ or_ln40_40_fu_16143_p3.read()); } void sha256_transform::thread_xor_ln40_162_fu_14098_p2() { xor_ln40_162_fu_14098_p2 = (zext_ln40_81_fu_14094_p1.read() ^ or_ln40_169_fu_14076_p3.read()); } void sha256_transform::thread_xor_ln40_163_fu_14104_p2() { xor_ln40_163_fu_14104_p2 = (xor_ln40_162_fu_14098_p2.read() ^ or_ln40_168_fu_14054_p3.read()); } void sha256_transform::thread_xor_ln40_164_fu_16257_p2() { xor_ln40_164_fu_16257_p2 = (zext_ln40_82_fu_16253_p1.read() ^ or_ln40_170_fu_16235_p3.read()); } void sha256_transform::thread_xor_ln40_165_fu_16263_p2() { xor_ln40_165_fu_16263_p2 = (xor_ln40_164_fu_16257_p2.read() ^ or_ln40_41_fu_16213_p3.read()); } void sha256_transform::thread_xor_ln40_166_fu_14168_p2() { xor_ln40_166_fu_14168_p2 = (zext_ln40_83_fu_14164_p1.read() ^ or_ln40_172_fu_14146_p3.read()); } void sha256_transform::thread_xor_ln40_167_fu_14174_p2() { xor_ln40_167_fu_14174_p2 = (xor_ln40_166_fu_14168_p2.read() ^ or_ln40_171_fu_14124_p3.read()); } void sha256_transform::thread_xor_ln40_168_fu_16964_p2() { xor_ln40_168_fu_16964_p2 = (zext_ln40_84_fu_16960_p1.read() ^ or_ln40_173_fu_16942_p3.read()); } void sha256_transform::thread_xor_ln40_169_fu_16970_p2() { xor_ln40_169_fu_16970_p2 = (xor_ln40_168_fu_16964_p2.read() ^ or_ln40_42_fu_16920_p3.read()); } void sha256_transform::thread_xor_ln40_16_fu_6899_p2() { xor_ln40_16_fu_6899_p2 = (zext_ln40_8_fu_6895_p1.read() ^ or_ln40_59_fu_6877_p3.read()); } void sha256_transform::thread_xor_ln40_170_fu_14238_p2() { xor_ln40_170_fu_14238_p2 = (zext_ln40_85_fu_14234_p1.read() ^ or_ln40_175_fu_14216_p3.read()); } void sha256_transform::thread_xor_ln40_171_fu_14244_p2() { xor_ln40_171_fu_14244_p2 = (xor_ln40_170_fu_14238_p2.read() ^ or_ln40_174_fu_14194_p3.read()); } void sha256_transform::thread_xor_ln40_172_fu_16342_p2() { xor_ln40_172_fu_16342_p2 = (zext_ln40_86_fu_16338_p1.read() ^ or_ln40_176_fu_16320_p3.read()); } void sha256_transform::thread_xor_ln40_173_fu_16348_p2() { xor_ln40_173_fu_16348_p2 = (xor_ln40_172_fu_16342_p2.read() ^ or_ln40_43_fu_16298_p3.read()); } void sha256_transform::thread_xor_ln40_174_fu_15323_p2() { xor_ln40_174_fu_15323_p2 = (zext_ln40_87_fu_15319_p1.read() ^ or_ln40_178_fu_15301_p3.read()); } void sha256_transform::thread_xor_ln40_175_fu_15329_p2() { xor_ln40_175_fu_15329_p2 = (xor_ln40_174_fu_15323_p2.read() ^ or_ln40_177_fu_15279_p3.read()); } void sha256_transform::thread_xor_ln40_176_fu_17049_p2() { xor_ln40_176_fu_17049_p2 = (zext_ln40_88_fu_17045_p1.read() ^ or_ln40_179_fu_17027_p3.read()); } void sha256_transform::thread_xor_ln40_177_fu_17055_p2() { xor_ln40_177_fu_17055_p2 = (xor_ln40_176_fu_17049_p2.read() ^ or_ln40_44_fu_17005_p3.read()); } void sha256_transform::thread_xor_ln40_178_fu_14308_p2() { xor_ln40_178_fu_14308_p2 = (zext_ln40_89_fu_14304_p1.read() ^ or_ln40_181_fu_14286_p3.read()); } void sha256_transform::thread_xor_ln40_179_fu_14314_p2() { xor_ln40_179_fu_14314_p2 = (xor_ln40_178_fu_14308_p2.read() ^ or_ln40_180_fu_14264_p3.read()); } void sha256_transform::thread_xor_ln40_17_fu_6905_p2() { xor_ln40_17_fu_6905_p2 = (xor_ln40_16_fu_6899_p2.read() ^ or_ln40_4_fu_6855_p3.read()); } void sha256_transform::thread_xor_ln40_180_fu_16428_p2() { xor_ln40_180_fu_16428_p2 = (zext_ln40_90_fu_16424_p1.read() ^ or_ln40_182_fu_16406_p3.read()); } void sha256_transform::thread_xor_ln40_181_fu_16434_p2() { xor_ln40_181_fu_16434_p2 = (xor_ln40_180_fu_16428_p2.read() ^ or_ln40_45_fu_16384_p3.read()); } void sha256_transform::thread_xor_ln40_182_fu_15393_p2() { xor_ln40_182_fu_15393_p2 = (zext_ln40_91_fu_15389_p1.read() ^ or_ln40_184_fu_15371_p3.read()); } void sha256_transform::thread_xor_ln40_183_fu_15399_p2() { xor_ln40_183_fu_15399_p2 = (xor_ln40_182_fu_15393_p2.read() ^ or_ln40_183_fu_15349_p3.read()); } void sha256_transform::thread_xor_ln40_184_fu_17134_p2() { xor_ln40_184_fu_17134_p2 = (zext_ln40_92_fu_17130_p1.read() ^ or_ln40_185_fu_17112_p3.read()); } void sha256_transform::thread_xor_ln40_185_fu_17140_p2() { xor_ln40_185_fu_17140_p2 = (xor_ln40_184_fu_17134_p2.read() ^ or_ln40_46_fu_17090_p3.read()); } void sha256_transform::thread_xor_ln40_186_fu_15463_p2() { xor_ln40_186_fu_15463_p2 = (zext_ln40_93_fu_15459_p1.read() ^ or_ln40_187_fu_15441_p3.read()); } void sha256_transform::thread_xor_ln40_187_fu_15469_p2() { xor_ln40_187_fu_15469_p2 = (xor_ln40_186_fu_15463_p2.read() ^ or_ln40_186_fu_15419_p3.read()); } void sha256_transform::thread_xor_ln40_188_fu_23343_p2() { xor_ln40_188_fu_23343_p2 = (zext_ln40_94_fu_23339_p1.read() ^ or_ln40_188_fu_23322_p3.read()); } void sha256_transform::thread_xor_ln40_189_fu_23349_p2() { xor_ln40_189_fu_23349_p2 = (xor_ln40_188_fu_23343_p2.read() ^ or_ln40_47_fu_23302_p3.read()); } void sha256_transform::thread_xor_ln40_18_fu_1973_p2() { xor_ln40_18_fu_1973_p2 = (zext_ln40_9_fu_1969_p1.read() ^ or_ln40_61_fu_1933_p6.read()); } void sha256_transform::thread_xor_ln40_190_fu_15533_p2() { xor_ln40_190_fu_15533_p2 = (zext_ln40_95_fu_15529_p1.read() ^ or_ln40_190_fu_15511_p3.read()); } void sha256_transform::thread_xor_ln40_191_fu_15539_p2() { xor_ln40_191_fu_15539_p2 = (xor_ln40_190_fu_15533_p2.read() ^ or_ln40_189_fu_15489_p3.read()); } void sha256_transform::thread_xor_ln40_19_fu_1979_p2() { xor_ln40_19_fu_1979_p2 = (xor_ln40_18_fu_1973_p2.read() ^ or_ln40_60_fu_1905_p6.read()); } void sha256_transform::thread_xor_ln40_1_fu_5136_p2() { xor_ln40_1_fu_5136_p2 = (xor_ln40_fu_5130_p2.read() ^ or_ln_fu_5064_p6.read()); } void sha256_transform::thread_xor_ln40_20_fu_7588_p2() { xor_ln40_20_fu_7588_p2 = (zext_ln40_10_fu_7584_p1.read() ^ or_ln40_62_fu_7566_p3.read()); } void sha256_transform::thread_xor_ln40_21_fu_7594_p2() { xor_ln40_21_fu_7594_p2 = (xor_ln40_20_fu_7588_p2.read() ^ or_ln40_5_fu_7544_p3.read()); } void sha256_transform::thread_xor_ln40_22_fu_2836_p2() { xor_ln40_22_fu_2836_p2 = (zext_ln40_11_fu_2832_p1.read() ^ or_ln40_64_fu_2796_p6.read()); } void sha256_transform::thread_xor_ln40_23_fu_2842_p2() { xor_ln40_23_fu_2842_p2 = (xor_ln40_22_fu_2836_p2.read() ^ or_ln40_63_fu_2768_p6.read()); } void sha256_transform::thread_xor_ln40_24_fu_8188_p2() { xor_ln40_24_fu_8188_p2 = (zext_ln40_12_fu_8184_p1.read() ^ or_ln40_65_fu_8166_p3.read()); } void sha256_transform::thread_xor_ln40_25_fu_8194_p2() { xor_ln40_25_fu_8194_p2 = (xor_ln40_24_fu_8188_p2.read() ^ or_ln40_6_fu_8144_p3.read()); } void sha256_transform::thread_xor_ln40_26_fu_2928_p2() { xor_ln40_26_fu_2928_p2 = (zext_ln40_13_fu_2924_p1.read() ^ or_ln40_67_fu_2888_p6.read()); } void sha256_transform::thread_xor_ln40_27_fu_2934_p2() { xor_ln40_27_fu_2934_p2 = (xor_ln40_26_fu_2928_p2.read() ^ or_ln40_66_fu_2860_p6.read()); } void sha256_transform::thread_xor_ln40_28_fu_8262_p2() { xor_ln40_28_fu_8262_p2 = (zext_ln40_14_fu_8258_p1.read() ^ or_ln40_68_fu_8240_p3.read()); } void sha256_transform::thread_xor_ln40_29_fu_8268_p2() { xor_ln40_29_fu_8268_p2 = (xor_ln40_28_fu_8262_p2.read() ^ or_ln40_7_fu_8218_p3.read()); } void sha256_transform::thread_xor_ln40_2_fu_1064_p2() { xor_ln40_2_fu_1064_p2 = (zext_ln40_1_fu_1060_p1.read() ^ or_ln40_3_fu_1024_p6.read()); } void sha256_transform::thread_xor_ln40_30_fu_3321_p2() { xor_ln40_30_fu_3321_p2 = (zext_ln40_15_fu_3317_p1.read() ^ or_ln40_70_fu_3281_p6.read()); } void sha256_transform::thread_xor_ln40_31_fu_3327_p2() { xor_ln40_31_fu_3327_p2 = (xor_ln40_30_fu_3321_p2.read() ^ or_ln40_69_fu_3253_p6.read()); } void sha256_transform::thread_xor_ln40_32_fu_8772_p2() { xor_ln40_32_fu_8772_p2 = (zext_ln40_16_fu_8768_p1.read() ^ or_ln40_71_fu_8750_p3.read()); } void sha256_transform::thread_xor_ln40_33_fu_8778_p2() { xor_ln40_33_fu_8778_p2 = (xor_ln40_32_fu_8772_p2.read() ^ or_ln40_8_fu_8728_p3.read()); } void sha256_transform::thread_xor_ln40_34_fu_3413_p2() { xor_ln40_34_fu_3413_p2 = (zext_ln40_17_fu_3409_p1.read() ^ or_ln40_73_fu_3373_p6.read()); } void sha256_transform::thread_xor_ln40_35_fu_3419_p2() { xor_ln40_35_fu_3419_p2 = (xor_ln40_34_fu_3413_p2.read() ^ or_ln40_72_fu_3345_p6.read()); } void sha256_transform::thread_xor_ln40_36_fu_8842_p2() { xor_ln40_36_fu_8842_p2 = (zext_ln40_18_fu_8838_p1.read() ^ or_ln40_74_fu_8820_p3.read()); } void sha256_transform::thread_xor_ln40_37_fu_8848_p2() { xor_ln40_37_fu_8848_p2 = (xor_ln40_36_fu_8842_p2.read() ^ or_ln40_9_fu_8798_p3.read()); } void sha256_transform::thread_xor_ln40_38_fu_4002_p2() { xor_ln40_38_fu_4002_p2 = (zext_ln40_19_fu_3998_p1.read() ^ or_ln40_76_fu_3962_p6.read()); } void sha256_transform::thread_xor_ln40_39_fu_4008_p2() { xor_ln40_39_fu_4008_p2 = (xor_ln40_38_fu_4002_p2.read() ^ or_ln40_75_fu_3934_p6.read()); } void sha256_transform::thread_xor_ln40_3_fu_1070_p2() { xor_ln40_3_fu_1070_p2 = (xor_ln40_2_fu_1064_p2.read() ^ or_ln40_2_fu_996_p6.read()); } void sha256_transform::thread_xor_ln40_40_fu_9531_p2() { xor_ln40_40_fu_9531_p2 = (zext_ln40_20_fu_9527_p1.read() ^ or_ln40_77_fu_9509_p3.read()); } void sha256_transform::thread_xor_ln40_41_fu_9537_p2() { xor_ln40_41_fu_9537_p2 = (xor_ln40_40_fu_9531_p2.read() ^ or_ln40_10_fu_9487_p3.read()); } void sha256_transform::thread_xor_ln40_42_fu_4094_p2() { xor_ln40_42_fu_4094_p2 = (zext_ln40_21_fu_4090_p1.read() ^ or_ln40_79_fu_4054_p6.read()); } void sha256_transform::thread_xor_ln40_43_fu_4100_p2() { xor_ln40_43_fu_4100_p2 = (xor_ln40_42_fu_4094_p2.read() ^ or_ln40_78_fu_4026_p6.read()); } void sha256_transform::thread_xor_ln40_44_fu_10131_p2() { xor_ln40_44_fu_10131_p2 = (zext_ln40_22_fu_10127_p1.read() ^ or_ln40_80_fu_10109_p3.read()); } void sha256_transform::thread_xor_ln40_45_fu_10137_p2() { xor_ln40_45_fu_10137_p2 = (xor_ln40_44_fu_10131_p2.read() ^ or_ln40_11_fu_10087_p3.read()); } void sha256_transform::thread_xor_ln40_46_fu_4635_p2() { xor_ln40_46_fu_4635_p2 = (zext_ln40_23_fu_4631_p1.read() ^ or_ln40_82_fu_4595_p6.read()); } void sha256_transform::thread_xor_ln40_47_fu_4641_p2() { xor_ln40_47_fu_4641_p2 = (xor_ln40_46_fu_4635_p2.read() ^ or_ln40_81_fu_4567_p6.read()); } void sha256_transform::thread_xor_ln40_48_fu_10205_p2() { xor_ln40_48_fu_10205_p2 = (zext_ln40_24_fu_10201_p1.read() ^ or_ln40_83_fu_10183_p3.read()); } void sha256_transform::thread_xor_ln40_49_fu_10211_p2() { xor_ln40_49_fu_10211_p2 = (xor_ln40_48_fu_10205_p2.read() ^ or_ln40_12_fu_10161_p3.read()); } void sha256_transform::thread_xor_ln40_4_fu_5222_p2() { xor_ln40_4_fu_5222_p2 = (zext_ln40_2_fu_5218_p1.read() ^ or_ln40_48_fu_5184_p6.read()); } void sha256_transform::thread_xor_ln40_50_fu_4727_p2() { xor_ln40_50_fu_4727_p2 = (zext_ln40_25_fu_4723_p1.read() ^ or_ln40_85_fu_4687_p6.read()); } void sha256_transform::thread_xor_ln40_51_fu_4733_p2() { xor_ln40_51_fu_4733_p2 = (xor_ln40_50_fu_4727_p2.read() ^ or_ln40_84_fu_4659_p6.read()); } void sha256_transform::thread_xor_ln40_52_fu_10715_p2() { xor_ln40_52_fu_10715_p2 = (zext_ln40_26_fu_10711_p1.read() ^ or_ln40_86_fu_10693_p3.read()); } void sha256_transform::thread_xor_ln40_53_fu_10721_p2() { xor_ln40_53_fu_10721_p2 = (xor_ln40_52_fu_10715_p2.read() ^ or_ln40_13_fu_10671_p3.read()); } void sha256_transform::thread_xor_ln40_54_fu_5314_p2() { xor_ln40_54_fu_5314_p2 = (zext_ln40_27_fu_5310_p1.read() ^ or_ln40_88_fu_5274_p6.read()); } void sha256_transform::thread_xor_ln40_55_fu_5320_p2() { xor_ln40_55_fu_5320_p2 = (xor_ln40_54_fu_5314_p2.read() ^ or_ln40_87_fu_5246_p6.read()); } void sha256_transform::thread_xor_ln40_56_fu_10800_p2() { xor_ln40_56_fu_10800_p2 = (zext_ln40_28_fu_10796_p1.read() ^ or_ln40_89_fu_10778_p3.read()); } void sha256_transform::thread_xor_ln40_57_fu_10806_p2() { xor_ln40_57_fu_10806_p2 = (xor_ln40_56_fu_10800_p2.read() ^ or_ln40_14_fu_10756_p3.read()); } void sha256_transform::thread_xor_ln40_58_fu_5406_p2() { xor_ln40_58_fu_5406_p2 = (zext_ln40_29_fu_5402_p1.read() ^ or_ln40_91_fu_5366_p6.read()); } void sha256_transform::thread_xor_ln40_59_fu_5412_p2() { xor_ln40_59_fu_5412_p2 = (xor_ln40_58_fu_5406_p2.read() ^ or_ln40_90_fu_5338_p6.read()); } void sha256_transform::thread_xor_ln40_5_fu_5228_p2() { xor_ln40_5_fu_5228_p2 = (xor_ln40_4_fu_5222_p2.read() ^ or_ln40_s_fu_5156_p6.read()); } void sha256_transform::thread_xor_ln40_60_fu_10870_p2() { xor_ln40_60_fu_10870_p2 = (zext_ln40_30_fu_10866_p1.read() ^ or_ln40_92_fu_10848_p3.read()); } void sha256_transform::thread_xor_ln40_61_fu_10876_p2() { xor_ln40_61_fu_10876_p2 = (xor_ln40_60_fu_10870_p2.read() ^ or_ln40_15_fu_10826_p3.read()); } void sha256_transform::thread_xor_ln40_62_fu_6460_p2() { xor_ln40_62_fu_6460_p2 = (zext_ln40_31_fu_6456_p1.read() ^ or_ln40_94_fu_6438_p3.read()); } void sha256_transform::thread_xor_ln40_63_fu_6466_p2() { xor_ln40_63_fu_6466_p2 = (xor_ln40_62_fu_6460_p2.read() ^ or_ln40_93_fu_6416_p3.read()); } void sha256_transform::thread_xor_ln40_64_fu_11638_p2() { xor_ln40_64_fu_11638_p2 = (zext_ln40_32_fu_11634_p1.read() ^ or_ln40_95_fu_11616_p3.read()); } void sha256_transform::thread_xor_ln40_65_fu_11644_p2() { xor_ln40_65_fu_11644_p2 = (xor_ln40_64_fu_11638_p2.read() ^ or_ln40_16_fu_11594_p3.read()); } void sha256_transform::thread_xor_ln40_66_fu_6969_p2() { xor_ln40_66_fu_6969_p2 = (zext_ln40_33_fu_6965_p1.read() ^ or_ln40_97_fu_6947_p3.read()); } void sha256_transform::thread_xor_ln40_67_fu_6975_p2() { xor_ln40_67_fu_6975_p2 = (xor_ln40_66_fu_6969_p2.read() ^ or_ln40_96_fu_6925_p3.read()); } void sha256_transform::thread_xor_ln40_68_fu_11723_p2() { xor_ln40_68_fu_11723_p2 = (zext_ln40_34_fu_11719_p1.read() ^ or_ln40_98_fu_11701_p3.read()); } void sha256_transform::thread_xor_ln40_69_fu_11729_p2() { xor_ln40_69_fu_11729_p2 = (xor_ln40_68_fu_11723_p2.read() ^ or_ln40_17_fu_11679_p3.read()); } void sha256_transform::thread_xor_ln40_6_fu_1438_p2() { xor_ln40_6_fu_1438_p2 = (zext_ln40_3_fu_1434_p1.read() ^ or_ln40_50_fu_1398_p6.read()); } void sha256_transform::thread_xor_ln40_70_fu_7039_p2() { xor_ln40_70_fu_7039_p2 = (zext_ln40_35_fu_7035_p1.read() ^ or_ln40_100_fu_7017_p3.read()); } void sha256_transform::thread_xor_ln40_71_fu_7045_p2() { xor_ln40_71_fu_7045_p2 = (xor_ln40_70_fu_7039_p2.read() ^ or_ln40_99_fu_6995_p3.read()); } void sha256_transform::thread_xor_ln40_72_fu_11808_p2() { xor_ln40_72_fu_11808_p2 = (zext_ln40_36_fu_11804_p1.read() ^ or_ln40_101_fu_11786_p3.read()); } void sha256_transform::thread_xor_ln40_73_fu_11814_p2() { xor_ln40_73_fu_11814_p2 = (xor_ln40_72_fu_11808_p2.read() ^ or_ln40_18_fu_11764_p3.read()); } void sha256_transform::thread_xor_ln40_74_fu_7658_p2() { xor_ln40_74_fu_7658_p2 = (zext_ln40_37_fu_7654_p1.read() ^ or_ln40_103_fu_7636_p3.read()); } void sha256_transform::thread_xor_ln40_75_fu_7664_p2() { xor_ln40_75_fu_7664_p2 = (xor_ln40_74_fu_7658_p2.read() ^ or_ln40_102_fu_7614_p3.read()); } void sha256_transform::thread_xor_ln40_76_fu_11893_p2() { xor_ln40_76_fu_11893_p2 = (zext_ln40_38_fu_11889_p1.read() ^ or_ln40_104_fu_11871_p3.read()); } void sha256_transform::thread_xor_ln40_77_fu_11899_p2() { xor_ln40_77_fu_11899_p2 = (xor_ln40_76_fu_11893_p2.read() ^ or_ln40_19_fu_11849_p3.read()); } void sha256_transform::thread_xor_ln40_78_fu_8332_p2() { xor_ln40_78_fu_8332_p2 = (zext_ln40_39_fu_8328_p1.read() ^ or_ln40_106_fu_8310_p3.read()); } void sha256_transform::thread_xor_ln40_79_fu_8338_p2() { xor_ln40_79_fu_8338_p2 = (xor_ln40_78_fu_8332_p2.read() ^ or_ln40_105_fu_8288_p3.read()); } void sha256_transform::thread_xor_ln40_7_fu_1444_p2() { xor_ln40_7_fu_1444_p2 = (xor_ln40_6_fu_1438_p2.read() ^ or_ln40_49_fu_1370_p6.read()); } void sha256_transform::thread_xor_ln40_80_fu_11978_p2() { xor_ln40_80_fu_11978_p2 = (zext_ln40_40_fu_11974_p1.read() ^ or_ln40_107_fu_11956_p3.read()); } void sha256_transform::thread_xor_ln40_81_fu_11984_p2() { xor_ln40_81_fu_11984_p2 = (xor_ln40_80_fu_11978_p2.read() ^ or_ln40_20_fu_11934_p3.read()); } void sha256_transform::thread_xor_ln40_82_fu_8402_p2() { xor_ln40_82_fu_8402_p2 = (zext_ln40_41_fu_8398_p1.read() ^ or_ln40_109_fu_8380_p3.read()); } void sha256_transform::thread_xor_ln40_83_fu_8408_p2() { xor_ln40_83_fu_8408_p2 = (xor_ln40_82_fu_8402_p2.read() ^ or_ln40_108_fu_8358_p3.read()); } void sha256_transform::thread_xor_ln40_84_fu_12052_p2() { xor_ln40_84_fu_12052_p2 = (zext_ln40_42_fu_12048_p1.read() ^ or_ln40_110_fu_12030_p3.read()); } void sha256_transform::thread_xor_ln40_85_fu_12058_p2() { xor_ln40_85_fu_12058_p2 = (xor_ln40_84_fu_12052_p2.read() ^ or_ln40_21_fu_12008_p3.read()); } void sha256_transform::thread_xor_ln40_86_fu_8912_p2() { xor_ln40_86_fu_8912_p2 = (zext_ln40_43_fu_8908_p1.read() ^ or_ln40_112_fu_8890_p3.read()); } void sha256_transform::thread_xor_ln40_87_fu_8918_p2() { xor_ln40_87_fu_8918_p2 = (xor_ln40_86_fu_8912_p2.read() ^ or_ln40_111_fu_8868_p3.read()); } void sha256_transform::thread_xor_ln40_88_fu_13148_p2() { xor_ln40_88_fu_13148_p2 = (zext_ln40_44_fu_13144_p1.read() ^ or_ln40_113_fu_13126_p3.read()); } void sha256_transform::thread_xor_ln40_89_fu_13154_p2() { xor_ln40_89_fu_13154_p2 = (xor_ln40_88_fu_13148_p2.read() ^ or_ln40_22_fu_13104_p3.read()); } void sha256_transform::thread_xor_ln40_8_fu_6390_p2() { xor_ln40_8_fu_6390_p2 = (zext_ln40_4_fu_6386_p1.read() ^ or_ln40_52_fu_6368_p3.read()); } void sha256_transform::thread_xor_ln40_90_fu_8982_p2() { xor_ln40_90_fu_8982_p2 = (zext_ln40_45_fu_8978_p1.read() ^ or_ln40_115_fu_8960_p3.read()); } void sha256_transform::thread_xor_ln40_91_fu_8988_p2() { xor_ln40_91_fu_8988_p2 = (xor_ln40_90_fu_8982_p2.read() ^ or_ln40_114_fu_8938_p3.read()); } }
[ "anujk0405@gmail.com" ]
anujk0405@gmail.com
0dd0fadae369a034d822c631187429c2439dade9
790389da7c2f7e4dc0c2b579d257de1edfbe9e27
/linear probing.cpp
68a29c49f12deaec8437ed3c173b0d57f85dcc2a
[]
no_license
Srishti-aggarwal/data-structure
0866906f1823a169a8650653ebbae355211aaa0f
f62b201a0ec391c489e7b8b3ff5aad6b2ae0bcf5
refs/heads/main
2023-05-15T09:40:42.674167
2021-06-09T12:57:30
2021-06-09T12:57:30
358,598,475
0
0
null
null
null
null
UTF-8
C++
false
false
783
cpp
#include<iostream> using namespace std; void insertkey(int h[],int key){ int x=key%10; int i=0; while(h[x]!=0){ x=(x+i)%10; i++; } h[x]=key; } int searchkey(int h[],int x){ int key=x%10; int i=0; while(h[key]!=0 ){ key=(key+i)%10; if(h[key]==x) return 1; i++; } return 0; } void printkeys(int h[]){ for(int i=0;i<10;i++){ if(h[i]!=0) cout<<h[i]<<" "; } } int main(){ int hash[10]={0}; int val; for(int i=0;i<10;i++){ cin>>val; insertkey(hash,val); } printkeys(hash); int x; cin>>x; if(searchkey(hash,x)) cout<<"found key"; else cout<<"Key not found"; return 0; }
[ "noreply@github.com" ]
noreply@github.com
d86125a037a37c35c52f11951feb0de6c90f7cd5
3c385690edc4cfbb1996fae4ad424c45158ede53
/src/qt/rpcconsole.h
166d9a1c0a417216ee7ebccac87aaaae997a1896
[ "MIT" ]
permissive
ifscdev/ifsc
5ea77a68804b4bc615b2e4d225035aca57f49a3a
cb75c431218bf7412d70bc556252286377a7d261
refs/heads/master
2020-04-15T07:53:44.877998
2016-09-14T09:27:49
2016-09-14T09:27:49
68,192,818
0
0
null
null
null
null
UTF-8
C++
false
false
1,946
h
#ifndef RPCCONSOLE_H #define RPCCONSOLE_H #include <QDialog> namespace Ui { class RPCConsole; } class ClientModel; /** Local Bitcoin RPC console. */ class RPCConsole: public QDialog { Q_OBJECT public: explicit RPCConsole(QWidget *parent = 0); ~RPCConsole(); void setClientModel(ClientModel *model); enum MessageClass { MC_ERROR, MC_DEBUG, CMD_REQUEST, CMD_REPLY, CMD_ERROR }; protected: virtual bool eventFilter(QObject* obj, QEvent *event); private slots: void on_lineEdit_returnPressed(); void on_tabWidget_currentChanged(int index); /** open the debug.log from the current datadir */ void on_openDebugLogfileButton_clicked(); /** display messagebox with program parameters (same as Inclusivefinancesyscoin --help) */ void on_showCLOptionsButton_clicked(); /** change the time range of the network traffic graph */ void on_sldGraphRange_valueChanged(int value); /** update traffic statistics */ void updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut); /** clear traffic graph */ void on_btnClearTrafficGraph_clicked(); public slots: void clear(); void message(int category, const QString &message, bool html = false); /** Set number of connections shown in the UI */ void setNumConnections(int count); /** Set number of blocks shown in the UI */ void setNumBlocks(int count); /** Go forward or back in history */ void browseHistory(int offset); /** Scroll console view to end */ void scrollToEnd(); signals: // For RPC command executor void stopExecutor(); void cmdRequest(const QString &command); private: static QString FormatBytes(quint64 bytes); void setTrafficGraphRange(int mins); Ui::RPCConsole *ui; ClientModel *clientModel; QStringList history; int historyPtr; void startExecutor(); }; #endif // RPCCONSOLE_H
[ "1552521584@qq.com" ]
1552521584@qq.com
6525ace9fcde46facfbd0b6b2496add9c62059da
fa60254ae0f9649f8d5d593a2c956f92ee9a6ca2
/CC_Source/Dawn.cpp
f3a740f793ef296105c02281b25bb1c5a86194ee
[]
no_license
nishant-gupt/CoinCollector
0325a6401da93035ea5007c848e23211afa03c32
5aefe76b4a30a059e8743db696411e70f842dc61
refs/heads/master
2021-09-25T01:24:40.919194
2018-03-03T07:23:49
2018-03-03T07:23:49
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,352
cpp
#include "Dawn.h" void Dawn::Init(Game* game, ResourceManager* rm) { this->game = game; this->rm = rm; x = 160 - 8; y = 120 - 16; sizeX = 16; sizeY = 32; dirX = 0.0f; dirY = 0.0f; sheet_row = 0.0f; sheet_column = 0.0f; sheet_animSpeed = 6.0f; move_speed = 32.0f; sheet = rm->getTexture("Data/character.png"); } void Dawn::Update(float deltaTime) { if(dirX != 0 || dirY != 0) { sheet_row += sheet_animSpeed*deltaTime; if((int)sheet_row >= 4) sheet_row = 0.0f; } else sheet_row = 0.0f; if(dirX > 0) sheet_column = 3; if(dirX < 0) sheet_column = 2; if(dirY < 0) sheet_column = 1; if(dirY > 0) sheet_column = 0; x += dirX * move_speed * deltaTime; y += dirY * move_speed * deltaTime; //calculating rectangle coordinates //for rendering the sprite sheet source_rect.x = sizeX * (int)sheet_column; source_rect.y = sizeY * (int)sheet_row; source_rect.w = sizeX; source_rect.h = sizeY; dest_rect.x = x; dest_rect.y = y; dest_rect.w = sizeX; dest_rect.h = sizeY; //we just reset the direction so we can check it //again in the next frame dirX = 0.0f; dirY = 0.0f; } void Dawn::Render() { SDL_RenderCopy(game->getRenderer(), sheet, &source_rect, &dest_rect); } void Dawn::Move(int dx, int dy) { dirX += dx; dirY += dy; }
[ "noreply@github.com" ]
noreply@github.com
232d36225db11615dd4c40920f0c2c9e5a0f99da
2e7ae26c8b93edbdc067d14d732a46d350693449
/sort.cpp
0d43a305bac25c9369a3e05aea4ca654e688c1dc
[]
no_license
reriver/go_hackerrank
427c40d406064ce622208df9fa23e3147be6db8b
fc0793ecdd9fb64255e25bdc64ac45eaf33fccdf
refs/heads/main
2023-06-28T23:25:57.430890
2021-08-05T13:06:24
2021-08-05T13:06:24
390,247,965
0
0
null
null
null
null
UTF-8
C++
false
false
237
cpp
std::string myStr = "abc"; std::stable_sort(std::begin(myStr), std::end(myStr)); do { for(auto&& element : myStr) std::cout << element << " "; std::cout << std::endl; } while (std::next_permutation(std::begin(myStr), std::end(myStr)));
[ "71904707+reriver@users.noreply.github.com" ]
71904707+reriver@users.noreply.github.com
0c7b8ccd466148e860f9f7d6678f16fbf156fbb9
757a2e564538e8f68a009ab2818ac9c9c63160c2
/1116 哈罗哈的大披萨 【淡蓝】 .cpp
92937e0d7ed3877fe16281ad8ade88afd459522d
[]
no_license
Alruddy/NOJ
29934a4d4f601b379cc47a0867595d6f16917463
66788b7ec702ec3345c47ff815675d4a963ba9c0
refs/heads/master
2021-01-20T17:14:50.529758
2017-07-15T08:15:58
2017-07-15T08:15:58
95,740,516
1
0
null
null
null
null
UTF-8
C++
false
false
1,768
cpp
#include <iostream> #include <stdio.h> #include <vector> #include <cstring> using namespace std; int m, n, x; double p, a, y; double dp[1<<16 | 1]; double zhekou[1<<16 | 1][16]; double toarea[1<<16 | 1]; int bit[1 << 16 | 1]; struct Pizza { double p; double a; double Coupon[16]; }; Pizza pizza[16]; inline int lowbit(int i) { return i&(-i); } void read() { for(int i = 0; i < m; i++) { scanf("%lf%lf%d", &p, &a, &n); pizza[i].p = p; pizza[i].a = a; for(int j = 0; j < n; j++) { scanf("%d%lf", &x, &y); pizza[i].Coupon[x-1] = y; } } } void solve() { int maxs = 1 << m; for(int i = 0; i < m; i++) bit[1 << i] = i; toarea[0] = 0; for(int i = 1; i < maxs; i++) { int id = bit[lowbit(i)]; toarea[i] = toarea[i - lowbit(i)] + pizza[id].a; } dp[0] = 0; for(int s = 1; s < maxs; s++) dp[s] = 1e9; for(int s = 0; s < maxs; s++) { for(int i = 0; i < m; i++) { if((1 << i) & s) continue; zhekou[s][i] = 1.0; if(s) { int lowb = lowbit(s); int id = bit[lowb]; zhekou[s][i] = zhekou[s ^ lowb][i] * (100 - pizza[id].Coupon[i]) / 100.0; } dp[s ^ (1<<i)] = min(dp[s ^ (1<<i)], dp[s] + zhekou[s][i]*pizza[i].p); } } double ans = 1e10; for(int s = 0; s < maxs; s++) { ans=min(ans, dp[s] * 1.0 / toarea[s]); } printf("%.4f\n", ans); } int main() { while(scanf("%d", &m) == 1, m) { read(); solve(); } return 0; }
[ "noreply@github.com" ]
noreply@github.com
aca30c0e36bf7f9e51db8749576b73546497d5ac
f6708de00e55eab96ddee086b5c2b517ba453567
/CPPToNet/CPPTemplateTemplateParameter.h
1b256e71f4786c121750e946b9146eb0810bb131
[]
no_license
galkahana/Code-Name-Falafel
994c5989a4ffb835f86a57bc0788d144ff9ee124
0ffe727cd36660ca4f6e65f2ce4834d9c3e12c96
refs/heads/master
2022-11-09T01:12:52.590225
2022-10-24T11:05:33
2022-10-24T11:05:33
2,405,143
0
0
null
null
null
null
UTF-8
C++
false
false
1,568
h
#pragma once #include "CPPElement.h" #include "SingleValueContainerIterator.h" #include "ICPPElementsContainer.h" #include "ITemplateWithDefault.h" #include <map> #include <string> #include <list> using namespace std; class CPPTemplateTypename; class UsedTypeDescriptor; struct TypedParameter; typedef list<CPPElement*> CPPElementList; typedef map<string,CPPTemplateTypename*> StringToCPPTemplateTypenameMap; class CPPTemplateTemplateParameter : public CPPElement, public ICPPElementsContainer, public ITemplateWithDefault { public: CPPTemplateTemplateParameter(const string& inName,unsigned long inParameterIndex,CPPElementList& inTemplateParameters); virtual ~CPPTemplateTemplateParameter(void); // ICPPElementsContainer implementation virtual CPPElementList FindElements(const string& inElementName); // ITemplateWithDefault implementation virtual void SetDefaultTypename(TypedParameter* inDefaultType); UsedTypeDescriptor* GetDefault(); Hummus::SingleValueContainerIterator<CPPElementList> GetParametersIterator(); CPPElementList& GetTemplateParameters(); unsigned long GetParameterIndex(); // checks for equivalency. which is the position in the parent parameters list, and the equivalency of the template parameters bool IsEqual(CPPTemplateTemplateParameter* inOther); bool IsLess(CPPTemplateTemplateParameter* inOther); private: CPPElementList mTemplateParameters; unsigned long mParameterIndex; TypedParameter* mDefaultType; StringToCPPTemplateTypenameMap mTypenames; };
[ "gal.kahana@hotmail.com" ]
gal.kahana@hotmail.com
13d2d83ef4607c949415c275df4c0a1a0f8d0550
f7cb15c04251321c6a1ee5de890b1f87bc4fcac5
/Space Invaders SFML/AudioManager.h
851e2826ad20646417c1c10479c3588b478499b8
[]
no_license
JPitman97/Space-Invaders-SFML
6cb89a30770dbd978330ca911aef8f6cb8a9b30b
cae208debbaa161cfeb2d70aa204811465bd44c3
refs/heads/master
2021-09-14T12:28:22.200805
2018-05-13T22:04:31
2018-05-13T22:04:31
131,075,730
0
0
null
null
null
null
UTF-8
C++
false
false
404
h
#pragma once #include <SFML\Audio.hpp> #include <iostream> class AudioManager { public: AudioManager(); ~AudioManager(); /*Variables related to sound objects used for the game*/ sf::SoundBuffer shotBuffer; sf::Sound shot; sf::SoundBuffer deathBuffer; sf::Sound death; sf::Music BGMusic; /*Methods used to play the sounds used for the game*/ void playShotSound(); void playDeathSound(); };
[ "jackpitman99@hotmail.co.uk" ]
jackpitman99@hotmail.co.uk
38b3bb840b7d8ffce765c38647848d457c5248d5
628f60ea185d57334e350a6e3bbbb6eac6f77bd0
/Framework/Client/Code/CardSpawn.h
d29641d987288b7f53608cf82f4064f897cb6d17
[]
no_license
ems789/Wizard-of-Legend-2.5D-Team-Project
e31a2a50e1971f88b8ec1d9320332f1f5608d16d
345136dc7a76dc66b9b864945804dddabf88be8e
refs/heads/master
2022-05-26T12:41:44.766735
2020-04-29T01:24:52
2020-04-29T01:24:52
252,634,747
0
0
null
null
null
null
UTF-8
C++
false
false
1,026
h
#ifndef CardSpawn_h__ #define CardSpawn_h__ #include "Defines.h" #include "Effect.h" BEGIN(Engine) class CTransform; class CTexture; class CRcTex; class CRenderer; END class CCardSpawn : public Engine::CEffect { private: explicit CCardSpawn(LPDIRECT3DDEVICE9 pGraphicDev); virtual ~CCardSpawn(); public: HRESULT Ready_GameObject(const _tchar* pTextureTag); virtual _int Update_GameObject(const _float& fTimeDelta) override; virtual void Render_GameObject() override; private: void Animation(const _float& fTimeDelta); void Update_Scale(); void Turn_To_Camera_Look(); void Add_Monster(); private: _float m_fCumulativeTime = 0.f; FRAME m_tFrame; _float m_fScale = 1.f; Engine::CGameObject* m_pMonster = nullptr; public: static CCardSpawn* Create(LPDIRECT3DDEVICE9 pGraphicDev, const _tchar* pTextureTag, const _float& fMaxFrame, const _float& fFrameSpeed, const _float& fScale, const _vec3* pPos, Engine::CGameObject* pMonster); private: virtual void Free() override; }; #endif // CardSpawn_h__
[ "56038721+Daruria@users.noreply.github.com" ]
56038721+Daruria@users.noreply.github.com
c8a7956c1392224d2fbccbe986ee681b21449610
f91cbe3b643edff7d17a3790a5919d9ca0157d07
/Code/GameSDK/GameDll/AI/RadioChatter/RadioChatterFlowNode.cpp
0856a2ecf0e91bd2069fc1ed5e8c41a929902bbd
[]
no_license
salilkanetkar/AI-Playing-Games
5b66b166fc6c84853410bf37961b14933fa20509
7dd6965678cbeebb572ab924812acb9ceccabcf3
refs/heads/master
2021-01-21T18:46:11.320518
2016-09-15T16:14:51
2016-09-15T16:14:51
68,309,388
1
1
null
null
null
null
UTF-8
C++
false
false
4,516
cpp
/* * 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 "../../Nodes/G2FlowBaseNode.h" #include "../GameAIEnv.h" #include "RadioChatterModule.h" class RadioChatterFlowNode : public CFlowBaseNode<eNCT_Instanced> { public: enum EInputs { IN_Set, IN_Enable, IN_Disable, IN_SoundName, IN_MinimumSilenceDuration, IN_MaximumSilenceDuration, }; enum EOutputs { OUT_Set, OUT_Enabled, OUT_Disabled, }; RadioChatterFlowNode( SActivationInfo * pActInfo ) { } virtual IFlowNodePtr Clone( SActivationInfo *pActInfo ) { return new RadioChatterFlowNode(pActInfo); } void GetConfiguration( SFlowNodeConfig& config ) { static const SInputPortConfig in_ports[] = { InputPortConfig_Void("Set", _HELP("Triggering this will apply your sound name and duration to the radio chatter system. (Note that this is automatically done if you trigger Enable.)")), InputPortConfig_Void("Enable", _HELP("Enable Radio Chatter and apply the sound name and duration.")), InputPortConfig_Void("Disable", _HELP("Disable Radio Chatter.")), InputPortConfig<string>("sound_Sound", _HELP("The chatter sound to be used. (Leave empty for default.)")), InputPortConfig<float>("SilenceDurationMin", -1.0f, _HELP("The silence duration used between chatter will be randomly picked within the interval of the specific minimum and the maximum duration. (Set either one of them to -1.0 to use default properties in the system.)" )), InputPortConfig<float>("SilenceDurationMax", -1.0f, _HELP("The silence duration used between chatter will be randomly picked within the interval of the specific minimum and the maximum duration. (Set either one of them to -1.0 to use default properties in the system.)" )), {0} }; static const SOutputPortConfig out_ports[] = { OutputPortConfig_AnyType("Set", _HELP("The properties have been applied.")), OutputPortConfig_AnyType("Enabled", _HELP("Radio Chatter was enabled and the properties were applied.")), OutputPortConfig_AnyType("Disabled", _HELP("Radio Chatter was disabled.")), {0} }; config.nFlags |= EFLN_AISEQUENCE_SUPPORTED; config.pInputPorts = in_ports; config.pOutputPorts = out_ports; config.sDescription = _HELP("Radio Chatter refers to the noises emitted from soldiers walkie-talkies. A sound will be emitted from a soldier near the camera. The interval is randomized between the minimum/maximum silence time."); config.SetCategory(EFLN_APPROVED); } void ProcessEvent(EFlowEvent event, SActivationInfo *pActInfo) { if (event == eFE_Activate) { RadioChatterModule* radioChatterModule = gGameAIEnv.radioChatterModule; if (IsPortActive(pActInfo, IN_Enable)) { radioChatterModule->SetEnabled(true); ActivateOutput(pActInfo, OUT_Enabled, true); } if (IsPortActive(pActInfo, IN_Disable)) { radioChatterModule->SetEnabled(false); ActivateOutput(pActInfo, OUT_Disabled, true); } if (IsPortActive(pActInfo, IN_Set) || IsPortActive(pActInfo, IN_Enable)) { const float minimumSilenceDuration = GetPortFloat(pActInfo, IN_MinimumSilenceDuration); const float maximumSilenceDuration = GetPortFloat(pActInfo, IN_MaximumSilenceDuration); const string& chatterSoundName = GetPortString(pActInfo, IN_SoundName); if (minimumSilenceDuration < 0.0f || maximumSilenceDuration < 0.0f) radioChatterModule->SetDefaultSilenceDuration(); else radioChatterModule->SetSilenceDuration(minimumSilenceDuration, maximumSilenceDuration); if (chatterSoundName.empty()) radioChatterModule->SetDefaultSound(); else radioChatterModule->SetSound(chatterSoundName); ActivateOutput(pActInfo, OUT_Set, true); } } } virtual void GetMemoryUsage(ICrySizer * s) const { s->Add(*this); } }; REGISTER_FLOW_NODE("AI:RadioChatter", RadioChatterFlowNode);
[ "prawinsg@gmail.com" ]
prawinsg@gmail.com
6b0d325568526553caf35cb73f3675dd60258e94
9eea3e8a9e87ee23b2346f9df1eebe0dd068ee97
/src/MatcherSparseFlow.cpp
bef5b664cb528cc5375538582d9922c8ad48346e
[]
no_license
liss1810/gsoc2011sfm
44da2bcf99d036f1cd1938ac40efd2239bf90c2d
6c26f4543705b7e58f1128ad3c70a537a49e7ad0
refs/heads/master
2022-02-20T20:04:45.674785
2015-03-25T14:40:19
2015-03-25T14:40:19
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,241
cpp
#include "MatcherSparseFlow.h" #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/video/tracking.hpp> #include <opencv2/calib3d/calib3d.hpp> #include <algorithm> #include "PointsMatcher.h" #include "PointsToTrack.h" #include "PointsToTrackWithImage.h" namespace OpencvSfM{ using cv::Mat; using cv::Ptr; using std::vector; using cv::KeyPoint; using cv::DMatch; using cv::Size; using cv::Rect; MatcherSparseFlow::MatcherSparseFlow( const cv::Ptr<cv::DescriptorMatcher>& matcher, double dist_allowed ) : PointsMatcher( matcher ) { max_distance_ = dist_allowed; }; cv::Ptr<PointsMatcher> MatcherSparseFlow::clone( bool emptyTrainData ) { P_MUTEX( thread_concurr ); MatcherSparseFlow* outPointMatcher = new MatcherSparseFlow( matcher_->clone( emptyTrainData ), max_distance_ ); if( !emptyTrainData ) outPointMatcher->pointCollection_ = pointCollection_; V_MUTEX( thread_concurr ); return outPointMatcher; }; void MatcherSparseFlow::match( cv::Ptr<PointsToTrack> queryPoints, std::vector<cv::DMatch>& matches, const std::vector<cv::Mat>& masks ) { //first match using classical matcher: //Ptr<PointsMatcher> simple_matcher = new PointsMatcher( this->matcher_->clone( true ) ); //simple_matcher->add( queryPoints ); //simple_matcher->match( pointCollection_[0], matches, masks ); PointsMatcher::match( queryPoints,matches ); P_MUTEX( thread_concurr ); ////////////////////////////////////////////////////////////////////////// //Using fundamental function from OpenCV, improve the matches //First compute points matches: int size_match=matches.size( ); Mat srcP( 1,size_match,CV_32FC2 ); Mat destP( 1,size_match,CV_32FC2 ); vector<uchar> status; //vector<KeyPoint> points1 = point_matcher->; for( int i = 0; i < size_match; i ++ ){ const KeyPoint &key1 = pointCollection_[0]->getKeypoint( matches[ i ].trainIdx ); const KeyPoint &key2 = queryPoints->getKeypoint( matches[ i ].queryIdx ); srcP.at<float[ 2 ]>( 0,i )[ 0 ] = key1.pt.x; srcP.at<float[ 2 ]>( 0,i )[ 1 ] = key1.pt.y; destP.at<float[ 2 ]>( 0,i )[ 0 ] = key2.pt.x; destP.at<float[ 2 ]>( 0,i )[ 1 ] = key2.pt.y; status.push_back( 1 ); } Mat fundam = cv::findFundamentalMat( srcP, destP, status, cv::FM_RANSAC, 1 ); //refine the mathing : for( int i = 0; i < size_match; ++i ){ if( status[ i ] == 0 ) { status[ i ] = status[ --size_match ]; status.pop_back( ); matches[ i-- ] = matches[ size_match ]; matches.pop_back( ); } } //now using optical flow, improve this: const vector<KeyPoint>& keyPoints=pointCollection_[0]->getKeypoints( ); const vector<KeyPoint>& keyPoints1=queryPoints->getKeypoints( ); vector<cv::Point2f> keyPointsIn; vector<cv::Point2f> keyPointsOut; vector<float> error; cv::Mat img1 = pointCollection_[0]->getImage(); cv::Mat img2 = queryPoints->getImage(); CV_Assert( !img1.empty() && !img2.empty() ); vector< int > corresponding_point; int nbIn = 0, nbOut = 0; for( size_t cpt = 0; cpt<keyPoints.size(); cpt++) { //is this keypoint in matches? int has_keypoint = -1; for( size_t cpt1 = 0; has_keypoint<0 && cpt1 < matches.size(); cpt1++ ) has_keypoint = matches[ cpt1 ].trainIdx == cpt? cpt1 : -1; const KeyPoint &kp = keyPoints[cpt]; bool point_added = false; if( has_keypoint<0 ) {//TODO: find the closest point and set him the same displacement size_t nb_points = keyPoints.size(); int idx_min = -1; float dist_min = 1e10; for(size_t i = 0; i<nb_points ; ++i) { if(cpt!=i) { const cv::KeyPoint& kp_i = keyPoints[i]; float dist = sqrt( (kp.pt.x - kp_i.pt.x)*(kp.pt.x - kp_i.pt.x) + (kp.pt.y - kp_i.pt.y) * (kp.pt.y - kp_i.pt.y) ); if( dist<dist_min ) {//is this point in matches? has_keypoint = -1; for( size_t cpt2 = 0; has_keypoint<0 && cpt2 < matches.size(); cpt2++ ) has_keypoint = matches[ cpt2 ].trainIdx == i? cpt2 : -1; if( has_keypoint>0 ) { dist_min = dist; idx_min = has_keypoint; } } } } if( idx_min>0 ) { size_t pt_idx = matches[ idx_min ].trainIdx; size_t pt_idx1 = matches[ idx_min ].queryIdx; const KeyPoint &kp_src = keyPoints[ pt_idx ]; const KeyPoint &kp_dest = keyPoints1[ pt_idx1 ]; float dx = kp_dest.pt.x - kp_src.pt.x, dy = kp_dest.pt.y - kp_src.pt.y; //if( kp.pt.x + dx>0 && kp.pt.x + dx<img2.cols && // kp.pt.y + dy>0 && kp.pt.y + dy<img2.rows ) { keyPointsOut.push_back( cv::Point2f(kp.pt.x + dx, kp.pt.y + dy) ); point_added = true; } } } else { size_t pt_idx = matches[ has_keypoint ].queryIdx; const KeyPoint &kp1 = keyPoints1[ pt_idx ]; keyPointsOut.push_back( cv::Point2f(kp1.pt.x, kp1.pt.y) ); point_added = true; } if( point_added ) { nbIn++; keyPointsIn.push_back( cv::Point2f(kp.pt.x, kp.pt.y) ); corresponding_point.push_back( cpt ); } } cv::calcOpticalFlowPyrLK(img1, img2, keyPointsIn, keyPointsOut, status, error, cv::Size(31,31),4, cv::TermCriteria( cv::TermCriteria::COUNT+cv::TermCriteria::EPS,30, 0.01), 0.75, cv::OPTFLOW_USE_INITIAL_FLOW ); queryPoints->free_descriptors( true );//descriptors are not needed now! std::vector<cv::DMatch> final_matches; //construct the DMatch vector (find the closest point in queryPoints) int idxPointsAdd = keyPoints1.size() - 1; vector<cv::KeyPoint> keypoints_to_add; vector< int > idx_to_add; for( size_t cpt = 0; cpt<keyPointsOut.size(); cpt++) { if( cpt>=status.size() || status[cpt]!=0 ) { cv::Point2f& kp = keyPointsOut[ cpt ]; size_t idx = queryPoints->getClosestKeypoint( kp ); const cv::KeyPoint& kpClose = queryPoints->getKeypoint( idx ); float dist = sqrt( (kpClose.pt.x - kp.x)*(kpClose.pt.x - kp.x) + (kpClose.pt.y - kp.y) * (kpClose.pt.y - kp.y) ); if( dist<max_distance_ ) final_matches.push_back( cv::DMatch(idx, corresponding_point[cpt], dist) ); } } matches = final_matches; /* queryPoints->addKeypoints( keypoints_to_add ); for( size_t cpt = 0; cpt<keypoints_to_add.size(); cpt++) { cv::KeyPoint& kp = keypoints_to_add[ cpt ]; int idx_min = queryPoints->getClosestKeypoint( kp.pt ); const cv::KeyPoint& kpClose = queryPoints->getKeypoint( idx_min ); float dist = sqrt( (kpClose.pt.x - kp.pt.x)*(kpClose.pt.x - kp.pt.x) + (kpClose.pt.y - kp.pt.y) * (kpClose.pt.y - kp.pt.y) ); if( dist<max_distance_ ) matches.push_back( cv::DMatch(idx_min, idx_to_add[cpt], dist_min) ); }*/ V_MUTEX( thread_concurr ); } void MatcherSparseFlow::knnMatch( cv::Ptr<PointsToTrack> queryPoints, std::vector<std::vector<cv::DMatch> >& matches, int k, const std::vector<cv::Mat>& masks, bool compactResult ) { if( k!=1 ) CV_Error( CV_StsError, "not yet implemented..." ); vector<DMatch> matchesTmp; match( queryPoints, matchesTmp, masks ); matches.push_back(matchesTmp); } void MatcherSparseFlow::radiusMatch( cv::Ptr<PointsToTrack> queryPoints, std::vector<std::vector<cv::DMatch> >& matches, float maxDistance, const std::vector<cv::Mat>& masks, bool compactResult ) { double tmp = max_distance_; vector<DMatch> matchesTmp; match( queryPoints, matchesTmp, masks ); matches.push_back(matchesTmp); max_distance_ = tmp; } }
[ "thibault.lelore@gmail.com@925df00f-a3a1-6e17-06e6-3e40b9fa844e" ]
thibault.lelore@gmail.com@925df00f-a3a1-6e17-06e6-3e40b9fa844e
82636364127535503b0ea59c2cb7215def1aafd4
0f0add5e2c721c7a3381de612093a41bae0c190d
/Study/NhapMonGame/Tham khao/game-con-tra/GameTutorial/CBulletItem.cpp
7117d9d5035a3cd8428f67f5467dc6aaf9a956e2
[]
no_license
phanybien/University
9d5a8b0a8598823b6612e07980b820469223f7e1
409496c8c9feca3d8420d93d6a5d91ac583cb71a
refs/heads/master
2023-06-11T17:39:13.619405
2021-01-08T06:01:58
2021-01-08T06:01:58
80,742,472
1
4
null
2023-05-31T18:17:29
2017-02-02T16:11:05
C++
UTF-8
C++
false
false
4,869
cpp
#include "CBulletItem.h" #include "CCollision.h" #include "CContra.h" #include "CCamera.h" CBulletItem::CBulletItem(void) { this->Init(); } CBulletItem::CBulletItem(D3DXVECTOR2 pos) { this->Init(); this->m_pos = pos; } CBulletItem::CBulletItem(D3DXVECTOR2 pos, STATE_BULLET_ITEM state) { this->Init(); this->m_pos = pos; this->m_stateItem = state; } CBulletItem::CBulletItem(const std::vector<int>& info) { this->Init();// if (!info.empty()) { this->m_id = info.at(0) % 1000; this->m_idType = info.at(0) / 1000; this->m_pos = D3DXVECTOR2(info.at(1), info.at(2)); this->m_width = info.at(3); this->m_height = info.at(4); } } void CBulletItem::Init() { //Khoi tao cac thong so cua doi tuong this->m_id = 8; this->m_idType = 14; this->m_idImage = 0; this->m_isALive = false; this->m_isAnimatedSprite = true; this->m_width = 49.0f;//56.0f; //78 this->m_height = 27.0f; //88.0f; //84 this->m_pos = D3DXVECTOR2(1100.0f, 200.0f); this->m_left = false; this->m_a = -700.0f; this->m_vx = 80.0f; this->m_vy = 400.0f; //Khoi tao cac thong so chuyen doi sprite this->m_currentTime = 0; this->m_currentFrame = 0; this->m_elapseTimeChangeFrame = 0.20f; this->m_increase = 1; this->m_totalFrame = 10; this->m_column = 10; this->m_stateItem = STATE_BULLET_ITEM::BULLET_ITEM_L; } void CBulletItem::Update(float deltaTime) { this->MoveUpdate(deltaTime); this->SetFrame(); this->ChangeFrame(deltaTime); } void CBulletItem::MoveUpdate(float deltaTime) { //this->m_vx -= this->m_a * deltaTime; //this->m_vy += this->m_a * deltaTime * sin(this->m_angle); this->m_pos.x += this->m_vx * deltaTime; this->m_vy += this->m_a * deltaTime; this->m_pos.y += this->m_vy * deltaTime; //this->m_pos.y += 5.0f * sin(this->m_angle); //this->m_angle += 4.0 * deltaTime; // Xet' alive = false khi soldier ra khoi man hinh D3DXVECTOR3 pos; pos = CCamera::GetInstance()->GetPointTransform(this->m_pos.x, this->m_pos.y); if(pos.x > __SCREEN_WIDTH + 100 || pos.x < -100) { this->m_isALive = false; } } void CBulletItem::Update(float deltaTime, std::vector<CGameObject*>* listObjectCollision) { if(this->m_isALive) { this->MoveUpdate(deltaTime); this->SetFrame(); this->ChangeFrame(deltaTime); this->OnCollision(deltaTime, listObjectCollision); } } void CBulletItem::OnCollision(float deltaTime, std::vector<CGameObject*>* listObjectCollision){ #pragma region XU_LY_VA_CHAM float normalX = 0; float normalY = 0; float moveX = 0.0f; float moveY = 0.0f; float timeCollision; //Kiem tra va cham voi ground bool checkColWithGround = false; timeCollision = CCollision::GetInstance()->Collision(CContra::GetInstance(), this, normalX, normalY, moveX, moveY, deltaTime); if ((timeCollision > 0.0f && timeCollision < 1.0f) || timeCollision == 2.0f) { CContra::GetInstance()->SetTypeBullet(this->m_stateItem); this->m_isALive = false; } for (std::vector<CGameObject*>::iterator it = listObjectCollision->begin(); it != listObjectCollision->end(); it++) { CGameObject* obj = *it; //Lay thoi gian va cham //Neu doi tuong la ground va dang va cham if (obj->GetIDType() == 15 && !checkColWithGround) { timeCollision = CCollision::GetInstance()->Collision(this, obj, normalX, normalY, moveX, moveY, deltaTime); if ((timeCollision > 0.0f && timeCollision < 1.0f) || timeCollision == 2.0f) { if (normalY > 0.0f){ checkColWithGround = true; if(timeCollision == 2 && this->m_vy < 0) { this->m_pos.y += moveY; this->m_vx = 0; this->m_vy = 0; } else { } } } } } #pragma endregion } void CBulletItem::SetFrame() { switch (this->m_stateItem) { case STATE_BULLET_ITEM::BULLET_ITEM_B: { this->m_currentFrame = 2; this->m_startFrame = 2; this->m_endFrame = 2; break; } case STATE_BULLET_ITEM::BULLET_ITEM_F: { this->m_currentFrame = 3; this->m_startFrame = 3; this->m_endFrame = 3; break; } case STATE_BULLET_ITEM::BULLET_ITEM_L: { this->m_currentFrame = 5; this->m_startFrame = 5; this->m_endFrame = 5; break; } case STATE_BULLET_ITEM::BULLET_ITEM_M: { this->m_currentFrame = 1; this->m_startFrame = 1; this->m_endFrame = 1; break; } case STATE_BULLET_ITEM::BULLET_ITEM_R: { this->m_currentFrame = 6; this->m_startFrame = 6; this->m_endFrame = 6; break; } case STATE_BULLET_ITEM::BULLET_ITEM_S: { this->m_currentFrame = 4; this->m_startFrame = 4; this->m_endFrame = 4; break; } default: { break; } } } RECT* CBulletItem::GetBound() { return nullptr; } RECT* CBulletItem::GetRectRS() { return this->UpdateRectResource(this->m_height, this->m_width); } Box CBulletItem::GetBox() { return Box(this->m_pos.x, this->m_pos.y, this->m_width, this->m_height, this->m_vx, this->m_vy); } CBulletItem::~CBulletItem() { }
[ "phanybien@gmail.com" ]
phanybien@gmail.com
9c7f757ea4e290a1a1d0971ddb8f212c1a6d2a2e
ed0088a49fbd34d3d4fd253f58c5648a367f6aa0
/DirectedGraph/DirectedGraph.h
6e25bc69cab34ab19055b7338e2a9b3d6dcdcc95
[]
no_license
dtbinh/GraphAlgorithms
df07198793a03c1ee78d24d0c962dd0679e1216e
01123e2ad6a2d8a6ebfb6f378acfda27a47d171f
refs/heads/master
2023-03-18T02:25:04.330815
2018-04-25T03:34:22
2018-04-25T03:34:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
909
h
// // DirectedGraph.h // DirectedGraph // // Created by RogerChen on 14-8-18. // Copyright (c) 2014年 RogerChen. All rights reserved. // #ifndef DirectedGraph_DirectedGraph_h #define DirectedGraph_DirectedGraph_h #include <iostream> #include <vector> using namespace std; class DirectedGraph{ private: vector<vector<size_t>> adjList_; unsigned int E_ = 0; unsigned int V_ = 0; public: DirectedGraph() = default; DirectedGraph(unsigned int V); DirectedGraph(istream &); public: unsigned int V() const; unsigned int E() const; const vector<size_t> adj(size_t) const; void addEdge(size_t, size_t); DirectedGraph reverse() const; friend ostream & operator<<(ostream&, const DirectedGraph &); }; ostream & operator<<(ostream &out, const DirectedGraph &dg); #endif
[ "chenyuntao08@gmail.com" ]
chenyuntao08@gmail.com
044da701ef229f7837a68ce16b5d82b801452c42
da2c40817423735c3300e8745b12c5ff7d13358b
/rocksdb-6.15.5/file/delete_scheduler.cc
5a032837e88f05d6dfa1f809ac0655a1718bbc85
[ "MIT", "Apache-2.0", "GPL-2.0-only", "BSD-3-Clause" ]
permissive
pch6828/HYU_Graduation_Project
b894e9d19f52fc22036efdfb236b98ca6cae8991
5e40c8e6657da2ad912cc8c2590c5722e0907d23
refs/heads/master
2023-08-25T01:15:40.445679
2021-10-21T14:39:29
2021-10-21T14:39:29
342,797,543
0
0
MIT
2021-09-09T15:40:01
2021-02-27T07:29:27
C++
UTF-8
C++
false
false
13,353
cc
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved. // This source code is licensed under both the GPLv2 (found in the // COPYING file in the root directory) and Apache 2.0 License // (found in the LICENSE.Apache file in the root directory). #ifndef ROCKSDB_LITE #include "file/delete_scheduler.h" #include <cinttypes> #include <thread> #include <vector> #include "file/sst_file_manager_impl.h" #include "logging/logging.h" #include "port/port.h" #include "rocksdb/env.h" #include "test_util/sync_point.h" #include "util/mutexlock.h" namespace ROCKSDB_NAMESPACE { DeleteScheduler::DeleteScheduler(Env* env, FileSystem* fs, int64_t rate_bytes_per_sec, Logger* info_log, SstFileManagerImpl* sst_file_manager, double max_trash_db_ratio, uint64_t bytes_max_delete_chunk) : env_(env), fs_(fs), total_trash_size_(0), rate_bytes_per_sec_(rate_bytes_per_sec), pending_files_(0), bytes_max_delete_chunk_(bytes_max_delete_chunk), closing_(false), cv_(&mu_), bg_thread_(nullptr), info_log_(info_log), sst_file_manager_(sst_file_manager), max_trash_db_ratio_(max_trash_db_ratio) { assert(sst_file_manager != nullptr); assert(max_trash_db_ratio >= 0); MaybeCreateBackgroundThread(); } DeleteScheduler::~DeleteScheduler() { { InstrumentedMutexLock l(&mu_); closing_ = true; cv_.SignalAll(); } if (bg_thread_) { bg_thread_->join(); } } Status DeleteScheduler::DeleteFile(const std::string& file_path, const std::string& dir_to_sync, const bool force_bg) { Status s; if (rate_bytes_per_sec_.load() <= 0 || (!force_bg && total_trash_size_.load() > sst_file_manager_->GetTotalSize() * max_trash_db_ratio_.load())) { // Rate limiting is disabled or trash size makes up more than // max_trash_db_ratio_ (default 25%) of the total DB size TEST_SYNC_POINT("DeleteScheduler::DeleteFile"); s = fs_->DeleteFile(file_path, IOOptions(), nullptr); if (s.ok()) { s = sst_file_manager_->OnDeleteFile(file_path); ROCKS_LOG_INFO(info_log_, "Deleted file %s immediately, rate_bytes_per_sec %" PRIi64 ", total_trash_size %" PRIu64 " max_trash_db_ratio %lf", file_path.c_str(), rate_bytes_per_sec_.load(), total_trash_size_.load(), max_trash_db_ratio_.load()); InstrumentedMutexLock l(&mu_); RecordTick(stats_.get(), FILES_DELETED_IMMEDIATELY); } return s; } // Move file to trash std::string trash_file; s = MarkAsTrash(file_path, &trash_file); ROCKS_LOG_INFO(info_log_, "Mark file: %s as trash -- %s", trash_file.c_str(), s.ToString().c_str()); if (!s.ok()) { ROCKS_LOG_ERROR(info_log_, "Failed to mark %s as trash -- %s", file_path.c_str(), s.ToString().c_str()); s = fs_->DeleteFile(file_path, IOOptions(), nullptr); if (s.ok()) { s = sst_file_manager_->OnDeleteFile(file_path); ROCKS_LOG_INFO(info_log_, "Deleted file %s immediately", trash_file.c_str()); InstrumentedMutexLock l(&mu_); RecordTick(stats_.get(), FILES_DELETED_IMMEDIATELY); } return s; } // Update the total trash size uint64_t trash_file_size = 0; fs_->GetFileSize(trash_file, IOOptions(), &trash_file_size, nullptr); total_trash_size_.fetch_add(trash_file_size); // Add file to delete queue { InstrumentedMutexLock l(&mu_); RecordTick(stats_.get(), FILES_MARKED_TRASH); queue_.emplace(trash_file, dir_to_sync); pending_files_++; if (pending_files_ == 1) { cv_.SignalAll(); } } return s; } std::map<std::string, Status> DeleteScheduler::GetBackgroundErrors() { InstrumentedMutexLock l(&mu_); return bg_errors_; } const std::string DeleteScheduler::kTrashExtension = ".trash"; bool DeleteScheduler::IsTrashFile(const std::string& file_path) { return (file_path.size() >= kTrashExtension.size() && file_path.rfind(kTrashExtension) == file_path.size() - kTrashExtension.size()); } Status DeleteScheduler::CleanupDirectory(Env* env, SstFileManagerImpl* sfm, const std::string& path) { Status s; // Check if there are any files marked as trash in this path std::vector<std::string> files_in_path; s = env->GetChildren(path, &files_in_path); if (!s.ok()) { return s; } for (const std::string& current_file : files_in_path) { if (!DeleteScheduler::IsTrashFile(current_file)) { // not a trash file, skip continue; } Status file_delete; std::string trash_file = path + "/" + current_file; if (sfm) { // We have an SstFileManager that will schedule the file delete s = sfm->OnAddFile(trash_file); file_delete = sfm->ScheduleFileDeletion(trash_file, path); } else { // Delete the file immediately file_delete = env->DeleteFile(trash_file); } if (s.ok() && !file_delete.ok()) { s = file_delete; } } return s; } Status DeleteScheduler::MarkAsTrash(const std::string& file_path, std::string* trash_file) { // Sanity check of the path size_t idx = file_path.rfind("/"); if (idx == std::string::npos || idx == file_path.size() - 1) { return Status::InvalidArgument("file_path is corrupted"); } Status s; if (DeleteScheduler::IsTrashFile(file_path)) { // This is already a trash file *trash_file = file_path; return s; } *trash_file = file_path + kTrashExtension; // TODO(tec) : Implement Env::RenameFileIfNotExist and remove // file_move_mu mutex. int cnt = 0; InstrumentedMutexLock l(&file_move_mu_); while (true) { s = fs_->FileExists(*trash_file, IOOptions(), nullptr); if (s.IsNotFound()) { // We found a path for our file in trash s = fs_->RenameFile(file_path, *trash_file, IOOptions(), nullptr); break; } else if (s.ok()) { // Name conflict, generate new random suffix *trash_file = file_path + std::to_string(cnt) + kTrashExtension; } else { // Error during FileExists call, we cannot continue break; } cnt++; } if (s.ok()) { sst_file_manager_->OnMoveFile(file_path, *trash_file); } return s; } void DeleteScheduler::BackgroundEmptyTrash() { TEST_SYNC_POINT("DeleteScheduler::BackgroundEmptyTrash"); while (true) { InstrumentedMutexLock l(&mu_); while (queue_.empty() && !closing_) { cv_.Wait(); } if (closing_) { return; } // Delete all files in queue_ uint64_t start_time = env_->NowMicros(); uint64_t total_deleted_bytes = 0; int64_t current_delete_rate = rate_bytes_per_sec_.load(); while (!queue_.empty() && !closing_) { if (current_delete_rate != rate_bytes_per_sec_.load()) { // User changed the delete rate current_delete_rate = rate_bytes_per_sec_.load(); start_time = env_->NowMicros(); total_deleted_bytes = 0; ROCKS_LOG_INFO(info_log_, "rate_bytes_per_sec is changed to %" PRIi64, current_delete_rate); } // Get new file to delete const FileAndDir& fad = queue_.front(); std::string path_in_trash = fad.fname; // We don't need to hold the lock while deleting the file mu_.Unlock(); uint64_t deleted_bytes = 0; bool is_complete = true; // Delete file from trash and update total_penlty value Status s = DeleteTrashFile(path_in_trash, fad.dir, &deleted_bytes, &is_complete); total_deleted_bytes += deleted_bytes; mu_.Lock(); if (is_complete) { queue_.pop(); } if (!s.ok()) { bg_errors_[path_in_trash] = s; } // Apply penalty if necessary uint64_t total_penalty; if (current_delete_rate > 0) { // rate limiting is enabled total_penalty = ((total_deleted_bytes * kMicrosInSecond) / current_delete_rate); ROCKS_LOG_INFO(info_log_, "Rate limiting is enabled with penalty %" PRIu64 " after deleting file %s", total_penalty, path_in_trash.c_str()); while (!closing_ && !cv_.TimedWait(start_time + total_penalty)) { } } else { // rate limiting is disabled total_penalty = 0; ROCKS_LOG_INFO(info_log_, "Rate limiting is disabled after deleting file %s", path_in_trash.c_str()); } TEST_SYNC_POINT_CALLBACK("DeleteScheduler::BackgroundEmptyTrash:Wait", &total_penalty); if (is_complete) { pending_files_--; } if (pending_files_ == 0) { // Unblock WaitForEmptyTrash since there are no more files waiting // to be deleted cv_.SignalAll(); } } } } Status DeleteScheduler::DeleteTrashFile(const std::string& path_in_trash, const std::string& dir_to_sync, uint64_t* deleted_bytes, bool* is_complete) { uint64_t file_size; Status s = fs_->GetFileSize(path_in_trash, IOOptions(), &file_size, nullptr); *is_complete = true; TEST_SYNC_POINT("DeleteScheduler::DeleteTrashFile:DeleteFile"); if (s.ok()) { bool need_full_delete = true; if (bytes_max_delete_chunk_ != 0 && file_size > bytes_max_delete_chunk_) { uint64_t num_hard_links = 2; // We don't have to worry aobut data race between linking a new // file after the number of file link check and ftruncte because // the file is now in trash and no hardlink is supposed to create // to trash files by RocksDB. Status my_status = fs_->NumFileLinks(path_in_trash, IOOptions(), &num_hard_links, nullptr); if (my_status.ok()) { if (num_hard_links == 1) { std::unique_ptr<FSWritableFile> wf; my_status = fs_->ReopenWritableFile(path_in_trash, FileOptions(), &wf, nullptr); if (my_status.ok()) { my_status = wf->Truncate(file_size - bytes_max_delete_chunk_, IOOptions(), nullptr); if (my_status.ok()) { TEST_SYNC_POINT("DeleteScheduler::DeleteTrashFile:Fsync"); my_status = wf->Fsync(IOOptions(), nullptr); } } if (my_status.ok()) { *deleted_bytes = bytes_max_delete_chunk_; need_full_delete = false; *is_complete = false; } else { ROCKS_LOG_WARN(info_log_, "Failed to partially delete %s from trash -- %s", path_in_trash.c_str(), my_status.ToString().c_str()); } } else { ROCKS_LOG_INFO(info_log_, "Cannot delete %s slowly through ftruncate from trash " "as it has other links", path_in_trash.c_str()); } } else if (!num_link_error_printed_) { ROCKS_LOG_INFO( info_log_, "Cannot delete files slowly through ftruncate from trash " "as Env::NumFileLinks() returns error: %s", my_status.ToString().c_str()); num_link_error_printed_ = true; } } if (need_full_delete) { s = fs_->DeleteFile(path_in_trash, IOOptions(), nullptr); if (!dir_to_sync.empty()) { std::unique_ptr<FSDirectory> dir_obj; if (s.ok()) { s = fs_->NewDirectory(dir_to_sync, IOOptions(), &dir_obj, nullptr); } if (s.ok()) { s = dir_obj->Fsync(IOOptions(), nullptr); TEST_SYNC_POINT_CALLBACK( "DeleteScheduler::DeleteTrashFile::AfterSyncDir", reinterpret_cast<void*>(const_cast<std::string*>(&dir_to_sync))); } } if (s.ok()) { *deleted_bytes = file_size; s = sst_file_manager_->OnDeleteFile(path_in_trash); } } } if (!s.ok()) { // Error while getting file size or while deleting ROCKS_LOG_ERROR(info_log_, "Failed to delete %s from trash -- %s", path_in_trash.c_str(), s.ToString().c_str()); *deleted_bytes = 0; } else { total_trash_size_.fetch_sub(*deleted_bytes); } return s; } void DeleteScheduler::WaitForEmptyTrash() { InstrumentedMutexLock l(&mu_); while (pending_files_ > 0 && !closing_) { cv_.Wait(); } } void DeleteScheduler::MaybeCreateBackgroundThread() { if (bg_thread_ == nullptr && rate_bytes_per_sec_.load() > 0) { bg_thread_.reset( new port::Thread(&DeleteScheduler::BackgroundEmptyTrash, this)); ROCKS_LOG_INFO(info_log_, "Created background thread for deletion scheduler with " "rate_bytes_per_sec: %" PRIi64, rate_bytes_per_sec_.load()); } } } // namespace ROCKSDB_NAMESPACE #endif // ROCKSDB_LITE
[ "pch6828@naver.com" ]
pch6828@naver.com
496fb7c8c4c661943c992aa507087bd0f36f74e3
361daa5a0bb08e4d440c32f6c334373fbd8cbaf4
/TriggerSpeedUp.cpp
5be60bcfceee16e364c6cfa5a938aba9243b8a6a
[]
no_license
ptitSeb/prototype
a888ae41126d558514e52450564d2cf0c0515b18
12d2de8639982db12091ca37eeee9036b54f3fa7
refs/heads/master
2021-05-01T16:18:37.832537
2020-12-20T16:42:33
2020-12-20T16:42:33
59,242,409
14
6
null
null
null
null
UTF-8
C++
false
false
1,178
cpp
#include "TriggerSpeedUp.h" #include "Engine.h" //================================================================================================// /******************************************************** ** Doesnt really do anything, more like a dummy entity ** *********************************************************/ //================================================================================================// TriggerSpeedUp::TriggerSpeedUp() { iMaxTicks = 10; } void TriggerSpeedUp::Spawn(Vec2 pos) { IsActive = true; iMapSpeedTicks=0; } TriggerSpeedUp* TriggerSpeedUp::Clone()const { return new TriggerSpeedUp(*this); } void TriggerSpeedUp::Update() { gpEngine->fMapSpeed+=0.005f; iMapSpeedTicks++; if(iMapSpeedTicks>=iMaxTicks) IsActive = false; } void TriggerSpeedUp::Draw(const float interp) { } void TriggerSpeedUp::NeedsToBeRemoved() { } bool TriggerSpeedUp::CheckCollided(Sphere s, float damage) { return false; } void TriggerSpeedUp::LoadFromFile(CFileIO &fIO) { fIO.ReadBinary(&iMaxTicks,1); } void TriggerSpeedUp::WriteToFile(CFileIO &fIO) { fIO.WriteBinary(&iMaxTicks,1); } int TriggerSpeedUp::InWater() { return 0; }
[ "sebastien.chev@gmail.com" ]
sebastien.chev@gmail.com
756f253d67dfa436c068cfd7fb40bc8656d8e9c2
ee2d58e6c99ecfa9a78661d6ab8fc99bd336d424
/Brute Force/Brute_Force_from_Set.cpp
19f5dcc6ed4179e0473fc85dc134e35cd16aabf0
[]
no_license
DollarAkshay/Vertex-Disjoin-Paths
a02900ccef1ef25461b9a9848f452a3e18c89464
c2370dade91e81ef78a18eecd9afc711d77ded3f
refs/heads/master
2021-01-19T18:10:35.692034
2015-08-23T14:31:07
2015-08-23T14:31:07
41,252,973
0
0
null
null
null
null
UTF-8
C++
false
false
2,790
cpp
#include <math.h> #include <time.h> #include <ctype.h> #include <stdio.h> #include <assert.h> #include <stdlib.h> #include <string.h> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <string> #include <vector> #include <iostream> #include <algorithm> #include <functional> using namespace std; #define FOR(i,a,b) for(int i=a; i<=b; ++i) #define FORD(i,a,b) for(int i=a; i>=b; --i) #define REP(i,n) for(int i=0; i<n ; i++) #define ll long long #define sp system("pause") int n; set<int> nodes; vector<vector<int>> adjacency; FILE *input = fopen("../Brute Force/Input.txt", "r"); FILE *output = fopen("../Brute Force/Set Output.txt", "w"); void printPath(int a,int b,set<int> path) { int dist = 0, prev = a; fprintf(output, "%d", a); for (auto i = path.begin(); i!=path.end(); prev = *i, i++) { fprintf(output, "->%d", *i); dist += adjacency[prev][*i]; } fprintf(output, "->%d", b); dist += adjacency[prev][b]; fprintf(output, " (Dist : %d)\n", dist); } set<int> getSubset(set<int> a, int s) { set<int> res; for (auto i = a.begin(); s && i!=a.end(); s/=2, i++) { if (s%2==1) res.insert(*i); } return res; } set<int> subtractSubsetFromSet(set<int> super, set<int> sub) { set<int> res(super); for (auto i = sub.begin(); i!=sub.end(); i++) { res.erase(*i); } return res; } int printAllPathsBetween(int a, int b) { ll int subsetsCount1, subsetsCount2, pathCount = 0; set<int> path1, path2; set<int> pathnodes1(nodes), pathnodes2; pathnodes1.erase(a); pathnodes1.erase(b); subsetsCount1 = 1L<<pathnodes1.size(); REP(i, subsetsCount1) { path1 = getSubset(pathnodes1, i); pathnodes2 = subtractSubsetFromSet(pathnodes1, path1); subsetsCount2 = 1L<<pathnodes2.size(); REP(j, subsetsCount2) { path2 = getSubset(pathnodes2, j); printPath(a, b, path1); printPath(a, b, path2); fprintf(output, "\n"); pathCount++; } } return pathCount; } int main(){ //Reading Input fscanf(input, "%d", &n); REP(i, n) { vector<int> temp; REP(j, n) { int dist; fscanf(input, "%d", &dist); temp.push_back(dist); } adjacency.push_back(temp); } printf("Done reading Input\n"); // Reduce Number of nodes (for testing) n = 13; // Create a set of Nodes REP(i,n) nodes.insert(i); // Print the paths int start = 0, end = n-1; clock_t t = clock(); ll int pathCount = printAllPathsBetween(start, end); t = clock() - t; fprintf(output, "\n\n------------------- STATS -------------------\n"); fprintf(output, " ! Time Taken = %f sec for %d nodes \n", (float)t/CLOCKS_PER_SEC, 13); fprintf(output, " ! Found %d paths between %d and %d \n", pathCount, start, end); printf("Done printing path\n"); fclose(input); fclose(output); sp; return 0; }
[ "akshay95aradhya@gmail.com" ]
akshay95aradhya@gmail.com
39994bca2d3e7002e4fdcac5c8a66baa8049e79f
2bc835b044f306fca1affd1c61b8650b06751756
/setup/active/asctrls/progdlg.h
d25d05d0d61467d67c1c27135c72048b479f80bc
[]
no_license
KernelPanic-OpenSource/Win2K3_NT_inetcore
bbb2354d95a51a75ce2dfd67b18cfb6b21c94939
75f614d008bfce1ea71e4a727205f46b0de8e1c3
refs/heads/master
2023-04-04T02:55:25.139618
2021-04-14T05:25:01
2021-04-14T05:25:01
357,780,123
1
0
null
null
null
null
UTF-8
C++
false
false
939
h
class CInstallEngineCtl; class CProgressDlg { private: HWND hDlg; HWND hProgText; HWND hBigProg; HWND hLittleProg; DWORD dwLittleGoal; DWORD dwLittleFactor; DWORD dwBigGoal; DWORD dwBigFactor; DWORD dwOldBytes; DWORD dwOldMinutesLeft; void UpdateLittleTime(DWORD dwSecsLeft); public: CProgressDlg(HINSTANCE hInst, HWND hParent, HWND hGrandParent, CInstallEngineCtl *pctl); void DisplayWindow(BOOL fShow); ~CProgressDlg(); void SetInsProgGoal(DWORD dwKBytes); void SetDownloadProgGoal(DWORD dwKBytes); void SetDownloadProgress(DWORD dwKBytes); void SetProgText(LPCSTR psz); void SetInsProgress(DWORD dwKBytes); HWND GetHWND() { return hDlg; } CInstallEngineCtl *pinsengctl; IInstallEngineTiming *ptimer; }; INT_PTR CALLBACK ProgressDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
[ "polarisdp@gmail.com" ]
polarisdp@gmail.com
69268a6786ccf6f06c035eaa6a9246fe6518032d
ff538bac0235a3f6789173e943596eea18d32e6a
/src/increament_and_decreament.cpp
c691e43e8c5610252cd8d9bded296a005e3fd1c1
[ "MIT" ]
permissive
Alan-Kuan/BigInteger
2c459414cbbbcbfdf1d2dc9827c9ac77c1d28db7
4c6bdcc95bd1890f0b95bbca543d8f0d79fb4c2b
refs/heads/master
2022-11-28T17:14:37.788109
2020-08-09T16:13:29
2020-08-09T16:13:29
266,679,254
0
0
null
null
null
null
UTF-8
C++
false
false
367
cpp
#include "big_integer.hpp" BigInteger& BigInteger::operator++(void) { *this += 1; return *this; } BigInteger BigInteger::operator++(int _) { BigInteger tmp(*this); *this += 1; return tmp; } BigInteger& BigInteger::operator--(void) { *this -= 1; return *this; } BigInteger BigInteger::operator--(int _) { BigInteger tmp(*this); *this -= 1; return tmp; }
[ "kuanhaoan@gmail.com" ]
kuanhaoan@gmail.com
0aeb4c4fdb98fd92e062e1c4e753bc96ed608709
072f95c801d870308d5f6eb300626320bc7cded8
/Game Technologies/SPH_CPU_3D/main.cpp
d24463b4fc1d6d62b2aaadc585d85fc9d1bc8497
[]
no_license
pieran/Cloth_Simulation
fbb1b2a2632d5a284e6fd61024425078420bb7ec
b76da76ecdc54287d6d305a0c49568cd67093b4c
refs/heads/master
2023-01-30T23:55:56.320326
2017-04-03T23:56:02
2017-04-03T23:56:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,569
cpp
#include <nclgl\Window.h> #include "MyScene.h" #include <ncltech\PhysicsEngine.h> #include <ncltech\NCLDebug.h> #pragma comment(lib, "nclgl.lib") #pragma comment(lib, "ncltech.lib") Scene* scene = NULL; int Quit(bool pause = false, const string &reason = "") { if (scene) { delete scene; scene = NULL; } Window::Destroy(); if (pause) { std::cout << reason << std::endl; system("PAUSE"); } return 0; } int main() { //------------------- //--- MAIN ENGINE --- //------------------- //Initialise the Window if (!Window::Initialise("Yusef Cloth Simulation", 1280, 800, false)) { return Quit(true, "Window failed to initialise!"); } //Initialise the Scene scene = new MyScene(Window::GetWindow()); if (!scene->HasInitialised()) { return Quit(true, "Renderer failed to initialise!"); } GameTimer engine_timer; //Create main game-loop while (Window::GetWindow().UpdateWindow() && !Window::GetKeyboard()->KeyDown(KEYBOARD_ESCAPE)) { float dt = Window::GetWindow().GetTimer()->GetTimedMS() * 0.001f; //How many milliseconds since last update? engine_timer.GetTimedMS(); float physics_ms = engine_timer.GetTimedMS(); scene->UpdateScene(dt); float update_ms = engine_timer.GetTimedMS(); NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Fluid Simulation"); NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "--------------------------------"); NCLDebug::AddStatusEntry(Vector4(1.0f, 1.0f, 1.0f, 1.0f), "Fluid Update : %5.2fms", update_ms); scene->RenderScene(); } //Cleanup return Quit(); }
[ "pieranmarris@gmail.com" ]
pieranmarris@gmail.com
547c11e1b02e1b4ecb08ff415c6595e54a52b2f5
a91662f4845fa40a623033e4ad269918b1cdf189
/src_FlightDisplay_PreFlightBatteryCheck_qml.cpp
77fe3f9be4b0a78bd8c664858eb26bca60f7d207
[]
no_license
ximiheheda/qgroundcontrol_release
efc8047609861228dd7941708d61650486612b6b
0d46e6c47c14a04123fe1a86c2a0f9b42c740572
refs/heads/main
2023-02-07T04:37:33.802514
2020-12-16T03:36:19
2020-12-16T03:36:19
321,858,098
0
0
null
null
null
null
UTF-8
C++
false
false
16,667
cpp
// /qml/QGroundControl/FlightDisplay/PreFlightBatteryCheck.qml namespace QmlCacheGeneratedCode { namespace _qml_QGroundControl_FlightDisplay_PreFlightBatteryCheck_qml { extern const unsigned char qmlData alignas(16) [] = { 0x71,0x76,0x34,0x63,0x64,0x61,0x74,0x61, 0x20,0x0,0x0,0x0,0x6,0xc,0x5,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x74,0xe,0x0,0x0,0x31,0x37,0x39,0x63, 0x34,0x62,0x36,0x38,0x39,0x64,0x31,0x61, 0x37,0x62,0x39,0x65,0x39,0x65,0x64,0x62, 0x37,0x31,0x64,0x64,0x66,0x35,0x34,0x35, 0x64,0x63,0x32,0x33,0x37,0x62,0x63,0x61, 0x36,0x37,0x30,0x34,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x23,0x0,0x0,0x0, 0x21,0x0,0x0,0x0,0x58,0x3,0x0,0x0, 0x6,0x0,0x0,0x0,0xf8,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x10,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x10,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x10,0x1,0x0,0x0, 0x13,0x0,0x0,0x0,0x10,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x5c,0x1,0x0,0x0, 0x1,0x0,0x0,0x0,0x60,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x68,0x1,0x0,0x0, 0x2,0x0,0x0,0x0,0x68,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x88,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x88,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x88,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x88,0x1,0x0,0x0, 0x0,0x0,0x0,0x0,0x88,0x1,0x0,0x0, 0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x78,0xc,0x0,0x0, 0x88,0x1,0x0,0x0,0xc8,0x1,0x0,0x0, 0x38,0x2,0x0,0x0,0x78,0x2,0x0,0x0, 0xc0,0x2,0x0,0x0,0x10,0x3,0x0,0x0, 0x63,0x1,0x0,0x0,0xe3,0x0,0x0,0x0, 0x93,0x1,0x0,0x0,0x3,0x1,0x0,0x0, 0xa0,0x1,0x0,0x0,0x93,0x1,0x0,0x0, 0x3,0x1,0x0,0x0,0xa0,0x1,0x0,0x0, 0x13,0x1,0x0,0x0,0x23,0x0,0x0,0x0, 0xc0,0x1,0x0,0x0,0xd0,0x1,0x0,0x0, 0x23,0x1,0x0,0x0,0x23,0x1,0x0,0x0, 0xe0,0x1,0x0,0x0,0xf0,0x1,0x0,0x0, 0x0,0x2,0x0,0x0,0x43,0x1,0x0,0x0, 0x3,0x1,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xb8,0xbf, 0x7,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0, 0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0, 0x38,0x0,0x0,0x0,0x5,0x0,0x0,0x0, 0xb,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x30,0x0,0x0,0x0,0x30,0x0,0x0,0x0, 0x0,0x0,0x1,0x0,0xff,0xff,0xff,0xff, 0x0,0x0,0x7,0x0,0x0,0x0,0x7,0x0, 0x14,0x0,0x50,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x14,0x0,0x0,0x0, 0x2e,0x0,0x18,0x6,0x2,0x0,0x0,0x0, 0x40,0x0,0x0,0x0,0x2f,0x0,0x0,0x0, 0xd,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x30,0x0,0x0,0x0,0x30,0x0,0x0,0x0, 0x0,0x0,0x2,0x0,0xff,0xff,0xff,0xff, 0x0,0x0,0x7,0x0,0x0,0x0,0xb,0x0, 0x15,0x0,0x50,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x15,0x0,0x0,0x0, 0x2e,0x0,0x0,0x0,0x17,0x0,0x0,0x0, 0x2e,0x1,0x4c,0x15,0x12,0x18,0x18,0x9, 0xae,0x2,0x1,0x9,0x18,0x7,0x2e,0x3, 0x18,0xa,0xa4,0x4,0x7,0x1,0xa,0x48, 0x13,0x12,0x1b,0x18,0x9,0xae,0x5,0x1, 0x9,0x18,0x7,0x2e,0x6,0x18,0xa,0xa4, 0x7,0x7,0x1,0xa,0x18,0x6,0x2,0x0, 0x38,0x0,0x0,0x0,0x5,0x0,0x0,0x0, 0xf,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x30,0x0,0x0,0x0,0x30,0x0,0x0,0x0, 0x0,0x0,0x1,0x0,0xff,0xff,0xff,0xff, 0x0,0x0,0x7,0x0,0x0,0x0,0x7,0x0, 0x18,0x0,0x50,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x2e,0x8,0x18,0x6,0x2,0x0,0x0,0x0, 0x38,0x0,0x0,0x0,0x9,0x0,0x0,0x0, 0x13,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x30,0x0,0x0,0x0,0x30,0x0,0x0,0x0, 0x0,0x0,0x1,0x0,0xff,0xff,0xff,0xff, 0x0,0x0,0x7,0x0,0x0,0x0,0x7,0x0, 0x1d,0x0,0x50,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1d,0x0,0x0,0x0, 0x2e,0x9,0x3a,0xa,0x3a,0xb,0x18,0x6, 0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x38,0x0,0x0,0x0,0x12,0x0,0x0,0x0, 0x15,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x30,0x0,0x0,0x0,0x30,0x0,0x0,0x0, 0x0,0x0,0x1,0x0,0xff,0xff,0xff,0xff, 0x0,0x0,0x7,0x0,0x0,0x0,0x7,0x0, 0x1e,0x0,0x50,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1e,0x0,0x0,0x0, 0x2e,0xc,0x4c,0xa,0x2e,0xd,0x3a,0xe, 0x3a,0xf,0x3a,0x10,0x48,0x1,0x6,0x18, 0x6,0x2,0x0,0x0,0x0,0x0,0x0,0x0, 0x38,0x0,0x0,0x0,0xb,0x0,0x0,0x0, 0x17,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x30,0x0,0x0,0x0,0x30,0x0,0x0,0x0, 0x0,0x0,0x1,0x0,0xff,0xff,0xff,0xff, 0x0,0x0,0x7,0x0,0x0,0x0,0x8,0x0, 0x1f,0x0,0x50,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1f,0x0,0x0,0x0, 0x2e,0x11,0x18,0x7,0x2e,0x12,0x62,0x7, 0x18,0x6,0x2,0x0,0x0,0x0,0x0,0x0, 0xe0,0x3,0x0,0x0,0x0,0x4,0x0,0x0, 0x28,0x4,0x0,0x0,0x60,0x4,0x0,0x0, 0xa8,0x4,0x0,0x0,0xf0,0x4,0x0,0x0, 0x38,0x5,0x0,0x0,0x60,0x5,0x0,0x0, 0x88,0x5,0x0,0x0,0xb8,0x5,0x0,0x0, 0x18,0x6,0x0,0x0,0x58,0x6,0x0,0x0, 0xb0,0x6,0x0,0x0,0xf8,0x6,0x0,0x0, 0x58,0x7,0x0,0x0,0xb0,0x7,0x0,0x0, 0x28,0x8,0x0,0x0,0x60,0x8,0x0,0x0, 0xb0,0x8,0x0,0x0,0xe8,0x8,0x0,0x0, 0x40,0x9,0x0,0x0,0x88,0x9,0x0,0x0, 0xe8,0x9,0x0,0x0,0x10,0xa,0x0,0x0, 0x58,0xa,0x0,0x0,0xb8,0xa,0x0,0x0, 0xe0,0xa,0x0,0x0,0x0,0xb,0x0,0x0, 0x70,0xb,0x0,0x0,0xb0,0xb,0x0,0x0, 0xe8,0xb,0x0,0x0,0x10,0xc,0x0,0x0, 0x50,0xc,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x7,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x51,0x0,0x74,0x0,0x51,0x0,0x75,0x0, 0x69,0x0,0x63,0x0,0x6b,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0xe,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x51,0x0,0x47,0x0,0x72,0x0,0x6f,0x0, 0x75,0x0,0x6e,0x0,0x64,0x0,0x43,0x0, 0x6f,0x0,0x6e,0x0,0x74,0x0,0x72,0x0, 0x6f,0x0,0x6c,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x17,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x51,0x0,0x47,0x0,0x72,0x0,0x6f,0x0, 0x75,0x0,0x6e,0x0,0x64,0x0,0x43,0x0, 0x6f,0x0,0x6e,0x0,0x74,0x0,0x72,0x0, 0x6f,0x0,0x6c,0x0,0x2e,0x0,0x43,0x0, 0x6f,0x0,0x6e,0x0,0x74,0x0,0x72,0x0, 0x6f,0x0,0x6c,0x0,0x73,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x16,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x51,0x0,0x47,0x0,0x72,0x0,0x6f,0x0, 0x75,0x0,0x6e,0x0,0x64,0x0,0x43,0x0, 0x6f,0x0,0x6e,0x0,0x74,0x0,0x72,0x0, 0x6f,0x0,0x6c,0x0,0x2e,0x0,0x56,0x0, 0x65,0x0,0x68,0x0,0x69,0x0,0x63,0x0, 0x6c,0x0,0x65,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x14,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x50,0x0,0x72,0x0,0x65,0x0,0x46,0x0, 0x6c,0x0,0x69,0x0,0x67,0x0,0x68,0x0, 0x74,0x0,0x43,0x0,0x68,0x0,0x65,0x0, 0x63,0x0,0x6b,0x0,0x42,0x0,0x75,0x0, 0x74,0x0,0x74,0x0,0x6f,0x0,0x6e,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x4,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x6e,0x0,0x61,0x0,0x6d,0x0,0x65,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x7,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x42,0x0,0x61,0x0,0x74,0x0,0x74,0x0, 0x65,0x0,0x72,0x0,0x79,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0xa,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x6d,0x0,0x61,0x0,0x6e,0x0,0x75,0x0, 0x61,0x0,0x6c,0x0,0x54,0x0,0x65,0x0, 0x78,0x0,0x74,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x21,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x42,0x0,0x61,0x0,0x74,0x0,0x74,0x0, 0x65,0x0,0x72,0x0,0x79,0x0,0x20,0x0, 0x63,0x0,0x6f,0x0,0x6e,0x0,0x6e,0x0, 0x65,0x0,0x63,0x0,0x74,0x0,0x6f,0x0, 0x72,0x0,0x20,0x0,0x66,0x0,0x69,0x0, 0x72,0x0,0x6d,0x0,0x6c,0x0,0x79,0x0, 0x20,0x0,0x70,0x0,0x6c,0x0,0x75,0x0, 0x67,0x0,0x67,0x0,0x65,0x0,0x64,0x0, 0x3f,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x10,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x74,0x0,0x65,0x0,0x6c,0x0,0x65,0x0, 0x6d,0x0,0x65,0x0,0x74,0x0,0x72,0x0, 0x79,0x0,0x46,0x0,0x61,0x0,0x69,0x0, 0x6c,0x0,0x75,0x0,0x72,0x0,0x65,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x1f,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x65,0x0,0x78,0x0,0x70,0x0,0x72,0x0, 0x65,0x0,0x73,0x0,0x73,0x0,0x69,0x0, 0x6f,0x0,0x6e,0x0,0x20,0x0,0x66,0x0, 0x6f,0x0,0x72,0x0,0x20,0x0,0x74,0x0, 0x65,0x0,0x6c,0x0,0x65,0x0,0x6d,0x0, 0x65,0x0,0x74,0x0,0x72,0x0,0x79,0x0, 0x46,0x0,0x61,0x0,0x69,0x0,0x6c,0x0, 0x75,0x0,0x72,0x0,0x65,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x14,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x74,0x0,0x65,0x0,0x6c,0x0,0x65,0x0, 0x6d,0x0,0x65,0x0,0x74,0x0,0x72,0x0, 0x79,0x0,0x54,0x0,0x65,0x0,0x78,0x0, 0x74,0x0,0x46,0x0,0x61,0x0,0x69,0x0, 0x6c,0x0,0x75,0x0,0x72,0x0,0x65,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x23,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x65,0x0,0x78,0x0,0x70,0x0,0x72,0x0, 0x65,0x0,0x73,0x0,0x73,0x0,0x69,0x0, 0x6f,0x0,0x6e,0x0,0x20,0x0,0x66,0x0, 0x6f,0x0,0x72,0x0,0x20,0x0,0x74,0x0, 0x65,0x0,0x6c,0x0,0x65,0x0,0x6d,0x0, 0x65,0x0,0x74,0x0,0x72,0x0,0x79,0x0, 0x54,0x0,0x65,0x0,0x78,0x0,0x74,0x0, 0x46,0x0,0x61,0x0,0x69,0x0,0x6c,0x0, 0x75,0x0,0x72,0x0,0x65,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x1d,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x61,0x0,0x6c,0x0,0x6c,0x0,0x6f,0x0, 0x77,0x0,0x54,0x0,0x65,0x0,0x6c,0x0, 0x65,0x0,0x6d,0x0,0x65,0x0,0x74,0x0, 0x72,0x0,0x79,0x0,0x46,0x0,0x61,0x0, 0x69,0x0,0x6c,0x0,0x75,0x0,0x72,0x0, 0x65,0x0,0x4f,0x0,0x76,0x0,0x65,0x0, 0x72,0x0,0x72,0x0,0x69,0x0,0x64,0x0, 0x65,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x2c,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x65,0x0,0x78,0x0,0x70,0x0,0x72,0x0, 0x65,0x0,0x73,0x0,0x73,0x0,0x69,0x0, 0x6f,0x0,0x6e,0x0,0x20,0x0,0x66,0x0, 0x6f,0x0,0x72,0x0,0x20,0x0,0x61,0x0, 0x6c,0x0,0x6c,0x0,0x6f,0x0,0x77,0x0, 0x54,0x0,0x65,0x0,0x6c,0x0,0x65,0x0, 0x6d,0x0,0x65,0x0,0x74,0x0,0x72,0x0, 0x79,0x0,0x46,0x0,0x61,0x0,0x69,0x0, 0x6c,0x0,0x75,0x0,0x72,0x0,0x65,0x0, 0x4f,0x0,0x76,0x0,0x65,0x0,0x72,0x0, 0x72,0x0,0x69,0x0,0x64,0x0,0x65,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0xe,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x66,0x0,0x61,0x0,0x69,0x0,0x6c,0x0, 0x75,0x0,0x72,0x0,0x65,0x0,0x50,0x0, 0x65,0x0,0x72,0x0,0x63,0x0,0x65,0x0, 0x6e,0x0,0x74,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x1b,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x61,0x0,0x6c,0x0,0x6c,0x0,0x6f,0x0, 0x77,0x0,0x46,0x0,0x61,0x0,0x69,0x0, 0x6c,0x0,0x75,0x0,0x72,0x0,0x65,0x0, 0x50,0x0,0x65,0x0,0x72,0x0,0x63,0x0, 0x65,0x0,0x6e,0x0,0x74,0x0,0x4f,0x0, 0x76,0x0,0x65,0x0,0x72,0x0,0x72,0x0, 0x69,0x0,0x64,0x0,0x65,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0xe,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x5f,0x0,0x61,0x0,0x63,0x0,0x74,0x0, 0x69,0x0,0x76,0x0,0x65,0x0,0x56,0x0, 0x65,0x0,0x68,0x0,0x69,0x0,0x63,0x0, 0x6c,0x0,0x65,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x1d,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x65,0x0,0x78,0x0,0x70,0x0,0x72,0x0, 0x65,0x0,0x73,0x0,0x73,0x0,0x69,0x0, 0x6f,0x0,0x6e,0x0,0x20,0x0,0x66,0x0, 0x6f,0x0,0x72,0x0,0x20,0x0,0x5f,0x0, 0x61,0x0,0x63,0x0,0x74,0x0,0x69,0x0, 0x76,0x0,0x65,0x0,0x56,0x0,0x65,0x0, 0x68,0x0,0x69,0x0,0x63,0x0,0x6c,0x0, 0x65,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x14,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x5f,0x0,0x62,0x0,0x61,0x0,0x74,0x0, 0x50,0x0,0x65,0x0,0x72,0x0,0x63,0x0, 0x65,0x0,0x6e,0x0,0x74,0x0,0x52,0x0, 0x65,0x0,0x6d,0x0,0x61,0x0,0x69,0x0, 0x6e,0x0,0x69,0x0,0x6e,0x0,0x67,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x23,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x65,0x0,0x78,0x0,0x70,0x0,0x72,0x0, 0x65,0x0,0x73,0x0,0x73,0x0,0x69,0x0, 0x6f,0x0,0x6e,0x0,0x20,0x0,0x66,0x0, 0x6f,0x0,0x72,0x0,0x20,0x0,0x5f,0x0, 0x62,0x0,0x61,0x0,0x74,0x0,0x50,0x0, 0x65,0x0,0x72,0x0,0x63,0x0,0x65,0x0, 0x6e,0x0,0x74,0x0,0x52,0x0,0x65,0x0, 0x6d,0x0,0x61,0x0,0x69,0x0,0x6e,0x0, 0x69,0x0,0x6e,0x0,0x67,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x7,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x5f,0x0,0x62,0x0,0x61,0x0,0x74,0x0, 0x4c,0x0,0x6f,0x0,0x77,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x16,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x65,0x0,0x78,0x0,0x70,0x0,0x72,0x0, 0x65,0x0,0x73,0x0,0x73,0x0,0x69,0x0, 0x6f,0x0,0x6e,0x0,0x20,0x0,0x66,0x0, 0x6f,0x0,0x72,0x0,0x20,0x0,0x5f,0x0, 0x62,0x0,0x61,0x0,0x74,0x0,0x4c,0x0, 0x6f,0x0,0x77,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x23,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x57,0x0,0x61,0x0,0x72,0x0,0x6e,0x0, 0x69,0x0,0x6e,0x0,0x67,0x0,0x20,0x0, 0x2d,0x0,0x20,0x0,0x42,0x0,0x61,0x0, 0x74,0x0,0x74,0x0,0x65,0x0,0x72,0x0, 0x79,0x0,0x20,0x0,0x63,0x0,0x68,0x0, 0x61,0x0,0x72,0x0,0x67,0x0,0x65,0x0, 0x20,0x0,0x62,0x0,0x65,0x0,0x6c,0x0, 0x6f,0x0,0x77,0x0,0x20,0x0,0x25,0x0, 0x31,0x0,0x25,0x0,0x2e,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x4,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x71,0x0,0x73,0x0,0x54,0x0,0x72,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x3,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x61,0x0,0x72,0x0,0x67,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x2a,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x42,0x0,0x61,0x0,0x74,0x0,0x74,0x0, 0x65,0x0,0x72,0x0,0x79,0x0,0x20,0x0, 0x63,0x0,0x68,0x0,0x61,0x0,0x72,0x0, 0x67,0x0,0x65,0x0,0x20,0x0,0x62,0x0, 0x65,0x0,0x6c,0x0,0x6f,0x0,0x77,0x0, 0x20,0x0,0x25,0x0,0x31,0x0,0x25,0x0, 0x2e,0x0,0x20,0x0,0x50,0x0,0x6c,0x0, 0x65,0x0,0x61,0x0,0x73,0x0,0x65,0x0, 0x20,0x0,0x72,0x0,0x65,0x0,0x63,0x0, 0x68,0x0,0x61,0x0,0x72,0x0,0x67,0x0, 0x65,0x0,0x2e,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x13,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x6d,0x0,0x75,0x0,0x6c,0x0,0x74,0x0, 0x69,0x0,0x56,0x0,0x65,0x0,0x68,0x0, 0x69,0x0,0x63,0x0,0x6c,0x0,0x65,0x0, 0x4d,0x0,0x61,0x0,0x6e,0x0,0x61,0x0, 0x67,0x0,0x65,0x0,0x72,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0xd,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x61,0x0,0x63,0x0,0x74,0x0,0x69,0x0, 0x76,0x0,0x65,0x0,0x56,0x0,0x65,0x0, 0x68,0x0,0x69,0x0,0x63,0x0,0x6c,0x0, 0x65,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x7,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x62,0x0,0x61,0x0,0x74,0x0,0x74,0x0, 0x65,0x0,0x72,0x0,0x79,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x10,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x70,0x0,0x65,0x0,0x72,0x0,0x63,0x0, 0x65,0x0,0x6e,0x0,0x74,0x0,0x52,0x0, 0x65,0x0,0x6d,0x0,0x61,0x0,0x69,0x0, 0x6e,0x0,0x69,0x0,0x6e,0x0,0x67,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0xff,0xff,0xff,0xff,0x5,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x18,0x0,0x0,0x0, 0x18,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x76,0x0,0x61,0x0,0x6c,0x0,0x75,0x0, 0x65,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x4,0x0,0x0,0x0,0x10,0x0,0x0,0x0, 0x1,0x0,0x0,0x0,0x70,0x0,0x0,0x0, 0x1,0x0,0x0,0x0,0x1,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0, 0x3,0x0,0x0,0x0,0xa,0x0,0x10,0x0, 0x1,0x0,0x0,0x0,0x2,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0xc,0x0,0x10,0x0, 0x1,0x0,0x0,0x0,0x3,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0xd,0x0,0x10,0x0, 0x1,0x0,0x0,0x0,0x4,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0xe,0x0,0x10,0x0, 0x74,0x0,0x0,0x0,0x5,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff, 0xff,0xff,0xff,0xff,0x0,0x0,0x5,0x0, 0x44,0x0,0x0,0x0,0x44,0x0,0x0,0x0, 0x94,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x94,0x0,0x0,0x0,0x94,0x0,0x0,0x0, 0x0,0x0,0xa,0x0,0x94,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x84,0x1,0x0,0x0, 0x11,0x0,0x10,0x0,0x0,0x0,0x0,0x0, 0x10,0x0,0x0,0x0,0x2,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1a,0x0,0x50,0x0, 0x11,0x0,0x0,0x0,0x3,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1b,0x0,0x50,0x0, 0x12,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1d,0x0,0x50,0x0, 0x14,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1e,0x0,0x50,0x0, 0x16,0x0,0x0,0x0,0x3,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x1f,0x0,0x50,0x0, 0x16,0x0,0x0,0x0,0x0,0x0,0x6,0x0, 0x5,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1f,0x0,0x30,0x1,0x1f,0x0,0x90,0x2, 0x14,0x0,0x0,0x0,0x0,0x0,0x6,0x0, 0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1e,0x0,0x20,0x1,0x1e,0x0,0x90,0x2, 0x12,0x0,0x0,0x0,0x0,0x0,0x6,0x0, 0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1d,0x0,0x20,0x1,0x1d,0x0,0x90,0x2, 0x11,0x0,0x0,0x0,0x0,0x0,0x1,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1b,0x0,0x50,0x1,0x1b,0x0,0x50,0x3, 0x10,0x0,0x0,0x0,0x0,0x0,0x2,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x1a,0x0,0x50,0x1,0x1a,0x0,0x50,0x3, 0xe,0x0,0x0,0x0,0x0,0x0,0x6,0x0, 0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x18,0x0,0x50,0x0,0x18,0x0,0x50,0x2, 0xc,0x0,0x0,0x0,0x0,0x0,0x6,0x0, 0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x15,0x0,0x50,0x0,0x15,0x0,0x50,0x2, 0xa,0x0,0x0,0x0,0x0,0x0,0x6,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x14,0x0,0x50,0x0,0x14,0x0,0x50,0x2, 0x8,0x0,0x0,0x0,0x0,0x0,0x4,0x0, 0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x13,0x0,0x50,0x0,0x13,0x0,0x50,0x2, 0x6,0x0,0x0,0x0,0x0,0x0,0x4,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x12,0x0,0x50,0x0,0x12,0x0,0x50,0x2, 0x0,0x0,0x0,0x0 }; } }
[ "caosu_93@foxmail.com" ]
caosu_93@foxmail.com
6f2f52d9fe9758db455651599faf20eb531e567a
74af32d04639d5c442f0e94b425beb68a2544b3c
/LeetCode/Normal/600-699/671.cpp
d2d382566db68c7606db868abf8c66a4c49bc7a6
[]
no_license
dlvguo/NoobOJCollection
4e4bd570aa2744dfaa2924bacc34467a9eae8c9d
596f6c578d18c7beebdb00fa3ce6d6d329647360
refs/heads/master
2023-05-01T07:42:33.479091
2023-04-20T11:09:15
2023-04-20T11:09:15
181,868,933
8
0
null
null
null
null
UTF-8
C++
false
false
1,165
cpp
#include <bits/stdc++.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right) {} }; class Solution { public: int findSecondMinimumValue(TreeNode *root) { if (!root->left) return -1; queue<TreeNode *> tq; tq.push(root); int first = -1, second = -1; while (tq.size()) { TreeNode *t = tq.front(); tq.pop(); if (first == -1) { first = t->val; } else if (first > t->val) { second = first; first = t->val; } else if (t->val != first && (second == -1 || second > t->val)) { second = t->val; } if (t->left) { tq.push(t->left); tq.push(t->right); } } return second; } };
[ "dlvguo@qq.com" ]
dlvguo@qq.com
3d223ee6aab954163c32e4a06b9f68f71fa550b8
fd240be9bdc92099986370a963038142de163c23
/CS580/Project/CS580_Project/CS529_Project_5/Collision.h
2edaeb8c9b5a09e30e50275b2f31414b9035c677
[]
no_license
sshedbalkar/DigiPen_Projects
14fd47fb4f985626c71123342b5ed53c0f5e085e
e2c645a4bbf3827495b4f8e3d5eb83c6f8ca2d55
refs/heads/main
2022-12-27T03:02:55.375419
2020-10-11T09:10:57
2020-10-11T09:10:57
303,081,834
0
0
null
null
null
null
UTF-8
C++
false
false
1,519
h
/////////////////////////////////////////////////////////////////////////////////////// /// /// \file Collision.h /// Provides shapes that are used by Body Component for collision detection. /// /// Authors: Chris Peters /// Copyright 2010, Digipen Institute of Technology /// /////////////////////////////////////////////////////////////////////////////////////// #ifndef COLLISION_H #define COLLISION_H //#pragma once //Makes sure this header is only included once // #include "VMath.h" #include "Engine.h" #include "Shape.h" // namespace Wye { class Body; ///Data for a contact between two bodies. ///Used to resolve world collisions. struct BodyContact { //#pragma message("Including Class: BodyContact") Body* Bodies[2]; Vec3 Movement[2]; Vec3 ContactNormal; float Penetration; float Restitution; float FrictionCof; float SeperatingVelocity; float ContactImpulse; float calculateSeparatingVelocity(); }; class ContactSet; typedef bool (*CollisionTest)(Shape* a, Vec3 at, Shape* b, Vec3 bt, ContactSet* c); ///The collision database provides collision detection between shape types. class CollsionDatabase { public: CollsionDatabase(); CollisionTest CollsionRegistry[Shape::SidNumberOfShapes][Shape::SidNumberOfShapes]; bool generateContacts(Shape* shapeA, Vec3 poistionA, Shape* shapeB, Vec3 poistionB, ContactSet* c); void registerCollsionTest(Shape::ShapeId a, Shape::ShapeId b, CollisionTest test); }; } // #endif
[ "sanoysyg@gmail.com" ]
sanoysyg@gmail.com
12bf397ebc75e918d965ebd02f090b8111cff662
0641d87fac176bab11c613e64050330246569e5c
/branches/markus/uni51/source/i18n/zonemeta.h
6c2f1728dd2ee246d855c58abea55302aaa40f7a
[ "ICU", "LicenseRef-scancode-unicode" ]
permissive
svn2github/libicu_full
ecf883cedfe024efa5aeda4c8527f227a9dbf100
f1246dcb7fec5a23ebd6d36ff3515ff0395aeb29
refs/heads/master
2021-01-01T17:00:58.555108
2015-01-27T16:59:40
2015-01-27T16:59:40
9,308,333
0
2
null
null
null
null
UTF-8
C++
false
false
2,751
h
/* ******************************************************************************* * Copyright (C) 2007-2008, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ #ifndef ZONEMETA_H #define ZONEMETA_H #include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING #include "unicode/unistr.h" #include "hash.h" U_NAMESPACE_BEGIN typedef struct CanonicalMapEntry { UChar *id; const UChar *country; // const because it's a reference to a resource bundle string. } CanonicalMapEntry; typedef struct OlsonToMetaMappingEntry { const UChar *mzid; // const because it's a reference to a resource bundle string. UDate from; UDate to; } OlsonToMetaMappingEntry; typedef struct MetaToOlsonMappingEntry { const UChar *id; // const because it's a reference to a resource bundle string. UChar *territory; } MetaToOlsonMappingEntry; class UVector; class U_I18N_API ZoneMeta { public: /** * Return the canonical id for this tzid, which might be the id itself. * If there is no canonical id for it, return the passed-in id. */ static UnicodeString& U_EXPORT2 getCanonicalID(const UnicodeString &tzid, UnicodeString &canonicalID); /** * Return the canonical country code for this tzid. If we have none, or if the time zone * is not associated with a country, return null. */ static UnicodeString& U_EXPORT2 getCanonicalCountry(const UnicodeString &tzid, UnicodeString &canonicalCountry); /** * Return the country code if this is a 'single' time zone that can fallback to just * the country, otherwise return empty string. (Note, one must also check the locale data * to see that there is a localization for the country in order to implement * tr#35 appendix J step 5.) */ static UnicodeString& U_EXPORT2 getSingleCountry(const UnicodeString &tzid, UnicodeString &country); /** * Returns a CLDR metazone ID for the given Olson tzid and time. */ static UnicodeString& U_EXPORT2 getMetazoneID(const UnicodeString &tzid, UDate date, UnicodeString &result); /** * Returns an Olson ID for the ginve metazone and region */ static UnicodeString& U_EXPORT2 getZoneIdByMetazone(const UnicodeString &mzid, const UnicodeString &region, UnicodeString &result); static const UVector* U_EXPORT2 getMetazoneMappings(const UnicodeString &tzid); private: static const CanonicalMapEntry* U_EXPORT2 getCanonicalInfo(const UnicodeString &tzid); ZoneMeta(); // Prevent construction. }; U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ #endif // ZONEMETA_H
[ "schererm@251d0590-4201-4cf1-90de-194747b24ca1" ]
schererm@251d0590-4201-4cf1-90de-194747b24ca1
4c175c41bb11a70946e5ba57024fcc6107c6c269
74207fe6006dd5c27883a4fd4e0417126df50059
/app/src/main/cpp/ffmpeg-utils.cpp
2a2fe0e7ac7e6d1997a46742720c7c0629eac392
[ "Apache-2.0" ]
permissive
hubean/AudioAndVideoKotlin
68e1b8142371770a04c1414ba16a3ac76c77c32c
abb8f42b399be4a399c1fd370da8ef984789cf19
refs/heads/master
2022-12-11T20:17:16.528565
2020-09-08T07:13:04
2020-09-08T07:13:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,976
cpp
// // Created by kongpingan on 2020/9/5. // #include <jni.h> #include <android/log.h> extern "C" { #include <libavformat/avformat.h> #include <libavcodec/avcodec.h> #include <libswresample/swresample.h> #include <libavfilter/avfilter.h> #include <libavfilter/avfiltergraph.h> #include <libavfilter/buffersink.h> #include <libavfilter/buffersrc.h> } #define TAG "FFmpeg===>" #define LOGI(FORMAT, ...) __android_log_print(ANDROID_LOG_INFO,TAG,FORMAT,##__VA_ARGS__); #define LOGE(FORMAT, ...) __android_log_print(ANDROID_LOG_ERROR,TAG,FORMAT,##__VA_ARGS__); #define MAX_AUDIO_SIZE 48000*4 int init_volume_filter(AVFilterGraph **pGraph, AVFilterContext **src, AVFilterContext **out, char *value) { //初始化AVFilterGraph AVFilterGraph *graph = avfilter_graph_alloc(); //获取abuffer用于接收输入端 AVFilter *abuffer = avfilter_get_by_name("abuffer"); AVFilterContext *abuffer_ctx = avfilter_graph_alloc_filter(graph, abuffer, "src"); //设置参数,这里需要匹配原始音频采样率、数据格式(位数) if (avfilter_init_str(abuffer_ctx, "sample_rate=48000:sample_fmt=s16p:channel_layout=stereo") < 0) { LOGE("error init abuffer filter"); return -1; } //初始化volume filter AVFilter *volume = avfilter_get_by_name("atempo"); AVFilterContext *volume_ctx = avfilter_graph_alloc_filter(graph, volume, "atempo"); //这里采用av_dict_set设置参数 AVDictionary *args = NULL; av_dict_set(&args, "tempo", value, 0);//调节音量为原先的一半 if (avfilter_init_dict(volume_ctx, &args) < 0) { LOGE("error init volume filter"); return -1; } AVFilter *aformat = avfilter_get_by_name("aformat"); AVFilterContext *aformat_ctx = avfilter_graph_alloc_filter(graph, aformat, "aformat"); if (avfilter_init_str(aformat_ctx, "sample_rates=48000:sample_fmts=s16p:channel_layouts=stereo") < 0) { LOGE("error init aformat filter"); return -1; } //初始化sink用于输出 AVFilter *sink = avfilter_get_by_name("abuffersink"); AVFilterContext *sink_ctx = avfilter_graph_alloc_filter(graph, sink, "sink"); if (avfilter_init_str(sink_ctx, NULL) < 0) {//无需参数 LOGE("error init sink filter"); return -1; } //链接各个filter上下文 if (avfilter_link(abuffer_ctx, 0, volume_ctx, 0) != 0) { LOGE("error link to volume filter"); return -1; } if (avfilter_link(volume_ctx, 0, aformat_ctx, 0) != 0) { LOGE("error link to aformat filter"); return -1; } if (avfilter_link(aformat_ctx, 0, sink_ctx, 0) != 0) { LOGE("error link to sink filter"); return -1; } if (avfilter_graph_config(graph, NULL) < 0) { LOGI("error config filter graph"); return -1; } *pGraph = graph; *src = abuffer_ctx; *out = sink_ctx; LOGI("init filter success..."); return 0; } extern "C" JNIEXPORT void JNICALL Java_com_kpa_android_care_natives_NativeHelper_decodeAudio(JNIEnv *env, jobject thiz, jstring _src, jstring _out ) { const char *src = env->GetStringUTFChars(_src, 0); const char *out = env->GetStringUTFChars(_out, 0); char info[1000] = {0}; // 获取ffmpeg 配置信息 LOGE("ffmpeg config info ----> %s\t", avcodec_configuration()) /** * Protocol: FFmpeg类库支持的协议 AVFormat: FFmpeg类库支持的封装格式 AVCodec: FFmpeg类库支持的编解码器 AVFilter: FFmpeg类库支持的滤镜 Configure: FFmpeg类库的配置信息 */ if (src && *src == '\0') { LOGE("操作文件为空 %s", !src) return; } if (out && *out == '\0') { LOGE("输出文件为空 %s", !out) return; } // 将所有的编码器注册到FFmpeg 框架中 av_register_all() 已经调用了avcodec_register_all(); avcodec_register_all(); // 注册协议、格式和编码器 // return; av_register_all(); AVFormatContext *_context = avformat_alloc_context(); // 打开媒体文件 if (avformat_open_input(&_context, src, NULL, NULL) < 0) { LOGE("打开媒体文件失败") return; } // 读取文件格式 if (avformat_find_stream_info(_context, NULL) < 0) { return; } int audio_strem_index = -1; // 寻找音频流 for (int i = 0; i < _context->nb_streams; ++i) { AVStream *stream = _context->streams[i]; if (AVMEDIA_TYPE_AUDIO == stream->codecpar->codec_type) { // 是音频流 audio_strem_index = i; break; } } //获取解码器 AVCodecContext *codec_ctx = avcodec_alloc_context3(NULL); avcodec_parameters_to_context(codec_ctx, _context->streams[audio_strem_index]->codecpar); AVCodec *codec = avcodec_find_decoder(codec_ctx->codec_id); LOGI("codec ----> ", codec) //打开解码器 if (avcodec_open2(codec_ctx, codec, NULL) < 0) { LOGE("could not open codec"); return; } // 获取完音视频解码器信息之后 需要分配出解码之后的数据所存放的内存空间,以及进行格式转换需要用到的对象。 SwrContext *swrContext = NULL; if (codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) { LOGI("smaple_fmt =%s"); } //分配AVPacket和AVFrame内存,用于接收音频数据,解码数据 AVPacket *packet = av_packet_alloc(); AVFrame *frame = av_frame_alloc(); int got_frame;//接收解码结果 int index = 0; //pcm输出文件 FILE *out_file = fopen(out, "wb"); AVFilterGraph *graph; AVFilterContext *in_ctx; AVFilterContext *out_ctx; //注册所有过滤器 avfilter_register_all(); init_volume_filter(&graph, &in_ctx, &out_ctx, "0.5"); //初始化SwrContext SwrContext *swr_ctx = swr_alloc(); enum AVSampleFormat in_sample_fmt = codec_ctx->sample_fmt; enum AVSampleFormat out_sample_fmt = AV_SAMPLE_FMT_S16; int in_sample_rate = codec_ctx->sample_rate; int out_sample_rate = in_sample_rate; uint64_t in_ch_layout = codec_ctx->channel_layout; uint64_t out_ch_layout = AV_CH_LAYOUT_STEREO; swr_alloc_set_opts(swr_ctx, out_ch_layout, out_sample_fmt, out_sample_rate, in_ch_layout, in_sample_fmt, in_sample_rate, 0, NULL); swr_init(swr_ctx); int out_ch_layout_nb = av_get_channel_layout_nb_channels(out_ch_layout);//声道个数 uint8_t *out_buffer = (uint8_t *) av_malloc(MAX_AUDIO_SIZE);//重采样数据 //初始化 while (av_read_frame(_context, packet) == 0) {//将音频数据读入packet if (packet->stream_index == audio_strem_index) {//取音频索引packet if (avcodec_decode_audio4(codec_ctx, frame, &got_frame, packet) < 0) {//将packet解码成AVFrame LOGE("decode error:%d", index); break; } if (got_frame > 0) { // LOGI("decode frame:%d", index++); if (index == 1000) {//模拟动态修改音量 init_volume_filter(&graph, &in_ctx, &out_ctx, "1.0"); } if (index == 2000) { init_volume_filter(&graph, &in_ctx, &out_ctx, "0.8"); } if (index == 3000) { init_volume_filter(&graph, &in_ctx, &out_ctx, "1.5"); } if (index == 4000) { init_volume_filter(&graph, &in_ctx, &out_ctx, "2.0"); } if (av_buffersrc_add_frame(in_ctx, frame) < 0) {//将frame放入输入filter上下文 LOGE("error add frame"); break; } while (av_buffersink_get_frame(out_ctx, frame) >= 0) {//从输出filter上下文中获取frame // fwrite(frame->data[0], 1, static_cast<size_t>(frame->linesize[0]), // out_file); //想将单个声道pcm数据写入文件 swr_convert(swr_ctx, &out_buffer, MAX_AUDIO_SIZE, (const uint8_t **) frame->data, frame->nb_samples); int out_size = av_samples_get_buffer_size(NULL, out_ch_layout_nb, frame->nb_samples, out_sample_fmt, 0); fwrite(out_buffer, 1, out_size, out_file); } } } } LOGI("decode finish..."); //释放资源 av_packet_unref(packet); av_frame_free(&frame); avcodec_close(codec_ctx); avformat_close_input(&_context); fclose(out_file); }
[ "billkp@yeah.net" ]
billkp@yeah.net
1a945d3a10596795bee769243ffcc8124cd23202
c92dd1131248079e3859e287ae3c4366bbfa7fd5
/SW 역량 테스트 준비/11066 파일합치기 dp시간초과.cpp
d395fdfbf86f426aea739a24722ab3f640f15f82
[]
no_license
GangsterAnt/BaekJoon
2bac200c887fe58cb169156aba41adf18673ea2b
4a096f6a56a062e2875d938a363fd5dcb3bb751f
refs/heads/master
2021-08-22T21:31:49.414754
2020-12-05T12:07:47
2020-12-05T12:07:47
232,078,540
0
0
null
2020-01-06T10:59:31
2020-01-06T10:35:53
C++
UTF-8
C++
false
false
1,515
cpp
//https://www.acmicpc.net/problem/11066 //https://code.plus/lecture/350 /* 행렬의 곱 연산 ( 연쇄행렬 곱셈 ) 데이터 n 개를 받는다면 n x n 행렬 m 을 생성, m[i][j] 는 데이터 i 부터 j 까지를 합쳤을때 사용하는데이터의 최소값을 저장한다. 이를 위해 m[i][i] = v[i] 로 세팅 m[i][i+1] = v[i] + v[i+1] 로 세팅 m[i][j] = min( m[i][i] + m[i+1][j] , m[i][i+1] + m[i+2][j] ..... m[i][j-1] + m[j][j] )가 점화식이다. */ #include <iostream> #include <algorithm> #include <vector> using namespace std; void dp(vector<int> &v, vector<vector<long long>>& m, vector<vector<long long>>& m2) { int ans = 0; int n = m.size(); ans += m[0][n - 1]; } int main() { int T; cin >> T; while (T--) { int n; cin >> n; int sum = 0; vector<int> v(n, 0); //각 데이터 저장 for (int i = 0; i < n; ++i) cin >> v[i]; vector<vector<long long>> m(n, vector<long long>(n, -1)); //매트릭스 for (int i = n - 1; i >= 0; --i) { for (int j = i; j < n; ++j) { if (j == i) m[i][i] = 0; else for (int k = 0; k < j - i; ++k) { int tmp = m[i][i + k] + m[i + k + 1][j]; for (int a = i; a <= j; a++) tmp += v[a]; if (m[i][j] == -1 || tmp < m[i][j]) m[i][j] = tmp; } } } /*for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { cout << m[i][j] << ' '; } cout << '\n'; }*/ cout << m[0][n - 1] << '\n'; } return 0; }
[ "noreply@github.com" ]
noreply@github.com
ac186a65d9a96dde247c8bc4a1a58f07f682c8ff
99d43bda10d38710b8484c81268bb8b489b6d221
/src/IoTT_LocoNetHBESP32.cpp
aa2c359d3d09141ec77cd124c297145e2408d02f
[]
no_license
tanner87661/LocoNetESP32HB
87ae53794bede509abace1c241feb3ea42136993
959207d3f82c49356bcf370940d590cad47afb19
refs/heads/master
2020-07-23T16:23:51.379081
2019-11-29T04:36:47
2019-11-29T04:36:47
207,627,563
7
0
null
null
null
null
UTF-8
C++
false
false
11,490
cpp
/* SoftwareSerial.cpp - Implementation of the Arduino software serial for ESP8266. Copyright (c) 2015-2016 Peter Lerup. All rights reserved. Adaptation to LocoNet (half-duplex network with DCMA) by Hans Tanner. See Digitrax LocoNet PE documentation for more information This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <IoTT_LocoNetHBESP32.h> #include <HardwareSerial.h> #define cdBackOffDelay 20 //20 bit-time Backoff Delay per LocoNet Standard cbFct lnCallback = NULL; LocoNetESPSerial::LocoNetESPSerial(int receivePin, int transmitPin, bool inverse_logic, int uartNr, unsigned int buffSize) : HardwareSerial(uartNr) { m_invert = inverse_logic; m_rxPin = receivePin; m_txPin = transmitPin; m_StartCD = micros(); que_rdPos = que_wrPos = 0; receiveMode = true; transmitStatus = 0; m_uart = uartNr; m_buffsize = buffSize; if ((m_rxPin >= 0) || (m_txPin >= 0)) begin(); } LocoNetESPSerial::~LocoNetESPSerial() { // HardwareSerial::~HardwareSerial(); } void LocoNetESPSerial::begin() { HardwareSerial::begin(16667, SERIAL_8N1, m_rxPin, -1, m_invert); m_highSpeed = true; m_bitTime = 60; //round(1000000 / 16667); //60 uSecs pinMode(m_rxPin, INPUT_PULLUP); //needed to set this when using Software Serial. Seems to work here hybrid_begin(m_rxPin, m_txPin, m_invert); } void LocoNetESPSerial::loadLNCfgJSON(DynamicJsonDocument doc) { if (doc.containsKey("pinRx")) m_rxPin = doc["pinRx"]; if (doc.containsKey("pinTx")) m_txPin = doc["pinTx"]; if (doc.containsKey("invLogic")) m_invert = doc["invLogic"]; if (doc.containsKey("buffsize")) m_buffsize = doc["buffsize"]; begin(); } uint16_t LocoNetESPSerial::lnWriteMsg(lnTransmitMsg txData) { uint8_t hlpQuePtr = (que_wrPos + 1) % queBufferSize; if (hlpQuePtr != que_rdPos) //override protection { transmitQueue[hlpQuePtr].lnMsgSize = txData.lnMsgSize; transmitQueue[hlpQuePtr].reqID = txData.reqID; transmitQueue[hlpQuePtr].reqRecTime = micros(); memcpy(transmitQueue[hlpQuePtr].lnData, txData.lnData, txData.lnMsgSize); que_wrPos = hlpQuePtr; return txData.lnMsgSize; } else { Serial.println("LocoNet Write Error. Too many messages in queue"); return -1; } } uint16_t LocoNetESPSerial::lnWriteMsg(lnReceiveBuffer txData) { uint8_t hlpQuePtr = (que_wrPos + 1) % queBufferSize; if (hlpQuePtr != que_rdPos) //override protection { transmitQueue[hlpQuePtr].lnMsgSize = txData.lnMsgSize; transmitQueue[hlpQuePtr].reqID = txData.reqID; transmitQueue[hlpQuePtr].reqRecTime = micros(); memcpy(transmitQueue[hlpQuePtr].lnData, txData.lnData, txData.lnMsgSize); que_wrPos = hlpQuePtr; return txData.lnMsgSize; } else { Serial.println("LocoNet Write Error. Too many messages in queue"); return -1; } } void LocoNetESPSerial::setLNCallback(cbFct newCB) { lnCallback = newCB; } void LocoNetESPSerial::sendBreakSequence() { // Serial.println(!m_invert ? LOW : HIGH); digitalWrite(m_txPin, !m_invert ? LOW : HIGH); //not sure this is working. The Serial port may not let me set the Tx pin from outside. Alternatives? uint32_t startSeq = micros(); while (micros() < (startSeq + (15 * m_bitTime))) { digitalWrite(m_txPin, !m_invert ? LOW : HIGH); // Serial.print('.'); } digitalWrite(m_txPin, m_invert ? LOW : HIGH); } void LocoNetESPSerial::processLNMsg(lnReceiveBuffer * recData) { if (lnCallback != NULL) lnCallback(recData); else if (onLocoNetMessage) onLocoNetMessage(recData); } void LocoNetESPSerial::handleLNIn(uint8_t inData, uint8_t inFlags) //called for stuff that comes in through the HW uart { /* this no longer exists, the HW uart does not give any error statuses // Serial.printf("Handle data %i Flags %i\n", inData, inFlags); if ((inFlags & (errorCollision | errorTimeout | errorFrame | errorCarrierLoss)) > 0) //this will only come from transmit { lnInBuffer.errorFlags = inFlags | msgIncomplete | msgXORCheck; if ((inFlags & msgEcho) > 0) lnInBuffer.reqRespTime = micros() - lnInBuffer.reqRecTime; lnInBuffer.lnData[lnBufferPtr] = inData; lnInBuffer.reqRespTime = 0; lnInBuffer.lnMsgSize = lnBufferPtr+1; lnBufferPtr = 0; lnInBuffer.echoTime = 0; processLNMsg(&lnInBuffer); bitRecStatus = 0; //awaiting OpCode return; } */ if (inData >= 0x80) //OpCode, start of new message { lnInBuffer.echoTime = 0; lnInBuffer.reqRespTime = 0; lnInBuffer.reqRecTime = 0; lnInBuffer.reqID = 0; if (bitRecStatus == 1) //awaiting data bytes but received OpCode { //incomplete message lnInBuffer.lnMsgSize = lnBufferPtr; lnInBuffer.errorFlags |= msgIncomplete; if (getXORCheck(&lnInBuffer.lnData[0], &lnInBuffer.lnMsgSize) != 0xFF) lnInBuffer.errorFlags |= msgXORCheck; processLNMsg(&lnInBuffer); //get rid of previous message lnInBuffer.lnMsgSize = 0; lnBufferPtr = 0; } bitRecStatus = 1; //await data bytes lnBufferPtr = 0; lnInBuffer.errorFlags = 0; uint8_t swiByte = (inData & 0x60) >> 5; switch (swiByte) { case 0: lnExpLen = 2; break; case 1: lnExpLen = 4; break; case 2: lnExpLen = 6; break; case 3: lnExpLen = 0xFF; break; default: lnExpLen = 0; } lnInBuffer.lnData[lnBufferPtr] = inData; lnBufferPtr++; } else //received regular data byte { // lnInBuffer.errorFlags |= inFlags; if (bitRecStatus == 1) //collecting data { lnInBuffer.lnData[lnBufferPtr] = inData; if ((lnBufferPtr == 1) && (lnExpLen == 0xFF)) lnExpLen = (inData & 0x007F); //updating expected length for long message lnBufferPtr++; if (lnBufferPtr == lnExpLen) //message length received { lnInBuffer.lnMsgSize = lnBufferPtr; if (getXORCheck(&lnInBuffer.lnData[0], &lnInBuffer.lnMsgSize) != 0xFF) lnInBuffer.errorFlags |= msgXORCheck; if ((lnEchoBuffer.lnData[0] == lnInBuffer.lnData[0]) && ((lnEchoBuffer.errorFlags & msgXORCheck) == 0) && ((lnInBuffer.errorFlags & msgXORCheck) == 0)) //valid echo message { que_rdPos = (que_rdPos + 1) % queBufferSize; //finalize transmit process lnInBuffer.errorFlags |= msgEcho; lnInBuffer.echoTime = micros() - lnInBuffer.reqRecTime; } if (((lnInBuffer.errorFlags & msgEcho) > 0) || (((respOpCode & 0x08) > 0) && ((lnInBuffer.lnData[0]==0xB4) || (lnInBuffer.lnData[0]==0xE7) || (lnInBuffer.lnData[0]==0x81)) && ((lnInBuffer.errorFlags & msgEcho) == 0))) { lnInBuffer.reqID = respID; lnInBuffer.reqRespTime = micros() - respTime; } else { lnInBuffer.reqID = 0; lnInBuffer.reqRespTime = 0; } // processLNMsg(&lnEchoBuffer); lnEchoBuffer.lnData[0] = 0; //reset Echo Buffer processLNMsg(&lnInBuffer); lnBufferPtr = 0; bitRecStatus = 0; //awaiting OpCode } } else { //unexpected data byte while waiting for OpCode lnInBuffer.errorFlags |= msgStrayData; lnInBuffer.lnMsgSize = 1; lnInBuffer.echoTime = 0; lnInBuffer.reqID = 0; lnInBuffer.reqRecTime = 0; lnInBuffer.reqRespTime = micros(); lnBufferPtr = 0; processLNMsg(&lnInBuffer); } } } void LocoNetESPSerial::processLoop() { if (receiveMode) processLNReceive(); else processLNTransmit(); yield(); } void LocoNetESPSerial::processLNReceive() { hybrid_highSpeed(false); while (HardwareSerial::available() > 0) //empty that input buffer { uint8_t newData = HardwareSerial::read(); handleLNIn((newData), 0); //and process incoming bytes } if ((que_wrPos != que_rdPos) && (hybrid_LocoNetAvailable() == lnNetAvailable)) //if rxBuffer is empty, load next command, if available receiveMode = false; } void LocoNetESPSerial::processLNTransmit() { switch (transmitStatus) { case 0: //not yet started, transfer data and start transmission { if (!hybrid_availableForWrite()) //uart only takes one message at a time { receiveMode = true; return; } //do not set que_rdPos as this would break mode switch from Receive to Transmit. que_rdPos is only updated after successful transmission transmitStatus = 1; //in case we have to stop transmission, process can be repeated //break; //don't break, just go on and start transmit } case 1: // { hybrid_highSpeed(true); numRead = 0; int hlpQuePtr = (que_rdPos + 1) % queBufferSize; numWrite = transmitQueue[hlpQuePtr].lnMsgSize; hybrid_write(&transmitQueue[hlpQuePtr].lnData[0], transmitQueue[hlpQuePtr].lnMsgSize); //send bytes lnEchoBuffer.reqID = transmitQueue[hlpQuePtr].reqID; lnEchoBuffer.reqRecTime = transmitQueue[hlpQuePtr].reqRecTime; lnEchoBuffer.reqRespTime = 0; lnEchoBuffer.echoTime = 0; lnEchoBuffer.errorFlags = 0; lnEchoBuffer.lnMsgSize = 0; //store these to look up when a reply comes in respTime = micros(); respID = lnEchoBuffer.reqID; respOpCode = transmitQueue[hlpQuePtr].lnData[0]; transmitTime = micros() + (numWrite * 600) + 500000; //set timeout condition, LocoNet not echoing bytes sent. must be > 500ms to allow network access trys and low processing rate transmitStatus = 2; //set status for verification of echo bytes break; } case 2: //message sent to buffer. Check for incoming bytes and verify collision status. Return to receive mode when complete or timeout { //wait for echo bytes, verify against buffer while ((hybrid_available() > 0) && (numRead < numWrite)) { uint16_t newByte = hybrid_read(); lnEchoBuffer.lnData[numRead] = newByte & 0x00FF; lnEchoBuffer.errorFlags |= (newByte >> 8); lnEchoBuffer.lnMsgSize++; numRead++; } //success, update read pointer, set status and mode if ((numRead == numWrite) || (micros() > transmitTime)) //success or timeout { if (micros() > transmitTime) lnEchoBuffer.errorFlags |= errorTimeout; if (getXORCheck(&lnEchoBuffer.lnData[0], &lnEchoBuffer.lnMsgSize) != 0xFF) lnEchoBuffer.errorFlags |= msgXORCheck; lnEchoBuffer.echoTime = micros() - lnEchoBuffer.reqRecTime; transmitStatus = 0; receiveMode = true; hybrid_flush(); } break; } } } uint8_t LocoNetESPSerial::getXORCheck(uint8_t * msgData, uint8_t * msgLen) { uint8_t xorChk = 0; for (uint8_t i = 0; i < *msgLen; i++) xorChk ^= msgData[i]; return xorChk; } bool LocoNetESPSerial::carrierOK() { return hybrid_carrierOK(); } void LocoNetESPSerial::setBusyLED(int8_t ledNr) { hybrid_setBusyLED(ledNr); } int LocoNetESPSerial::cdBackoff() { return hybrid_LocoNetAvailable(); }
[ "noreply@github.com" ]
noreply@github.com
14c44ad3a20da26ca173342fc149b3cd6dd88460
918205bd2c9b1609feab369278648b7e905ec92e
/Rtt_LinuxImageProvider.cpp
059faaffbfbd1aab61cafbf386837b7c105cf01d
[]
no_license
kchecker/submodule-platform-linux
e1ad3cc596c09c2a37a5538ca832e206e1971500
8a3d6871f1e60f2f053f67e63d9d8781d84180b8
refs/heads/master
2021-01-07T04:41:45.882484
2019-12-24T11:46:17
2019-12-24T11:46:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
11,559
cpp
////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2018 Corona Labs Inc. // Contact: support@coronalabs.com // // This file is part of the Corona game engine. // // Commercial License Usage // Licensees holding valid commercial Corona licenses may use this file in // accordance with the commercial license agreement between you and // Corona Labs Inc. For licensing terms and conditions please contact // support@coronalabs.com or visit https://coronalabs.com/com-license // // GNU General Public License Usage // Alternatively, this file may be used under the terms of the GNU General // Public license version 3. The license is as published by the Free Software // Foundation and appearing in the file LICENSE.GPL3 included in the packaging // of this file. Please review the following information to ensure the GNU // General Public License requirements will // be met: https://www.gnu.org/licenses/gpl-3.0.html // // For overview and more information on licensing please refer to README.md // ////////////////////////////////////////////////////////////////////////////// #include "Core/Rtt_Build.h" #include "Rtt_LinuxImageProvider.h" #include "Rtt_LinuxBitmap.h" #include "Display/Rtt_BitmapPaint.h" #include "Display/Rtt_LuaLibDisplay.h" #include "Rtt_Lua.h" #include "Rtt_LuaContext.h" #include "Display/Rtt_Display.h" #ifndef _WIN32 #include <sys/mman.h> #include <sys/ioctl.h> #include <linux/videodev2.h> // // NOT COMPLETED YET !!! // namespace Rtt { enum io_method { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR, }; #define CLEAR(x) memset(&(x), 0, sizeof(x)) static const char* dev_name = "/dev/video0"; static enum io_method io = IO_METHOD_MMAP; struct buffer { void *start; size_t length; }; struct buffer* buffers; static unsigned int n_buffers; /// Creates a new image provider. /// @param handle Reference to Lua state used to send image selection notifications to a Lua listener function. LinuxImageProvider::LinuxImageProvider(const ResourceHandle<lua_State> & handle, int w, int h) : PlatformImageProvider(handle) , fd(-1) { if (open_device()) { init_device(); } } LinuxImageProvider::~LinuxImageProvider() { uninit_device(); close_device(); } bool LinuxImageProvider::open_device() { struct stat st; if (stat(dev_name, &st) == -1) { Rtt_LogException("Cannot identify '%s': errno: %d, %s\n", dev_name, errno, strerror(errno)); return false; } if (S_ISCHR(st.st_mode) == false) { Rtt_LogException("%s is no device\n", dev_name); return false; } fd = open(dev_name, O_RDWR | O_NONBLOCK, 0); if (fd == -1) { Rtt_LogException("Cannot open '%s': %d, %s\n", dev_name, errno, strerror(errno)); return false; } return true; } void LinuxImageProvider::close_device() { if (fd != -1 && close(fd) == -1) { Rtt_LogException("close webcam failed"); } fd = -1; } int LinuxImageProvider::xioctl(int fh, unsigned long int request, void *arg) { int r; do { r = ioctl(fh, request, arg); } while (r == -1 && EINTR == errno); return r; } void LinuxImageProvider::init_read(unsigned int buffer_size) { buffers = (buffer*) calloc(1, sizeof(*buffers)); if (!buffers) { fprintf(stderr, "Out of memory\n"); exit(EXIT_FAILURE); } buffers[0].length = buffer_size; buffers[0].start = malloc(buffer_size); if (!buffers[0].start) { fprintf(stderr, "Out of memory\n"); exit(EXIT_FAILURE); } } bool LinuxImageProvider::init_mmap() { struct v4l2_requestbuffers req; CLEAR(req); req.count = 4; req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; req.memory = V4L2_MEMORY_MMAP; if (xioctl(fd, VIDIOC_REQBUFS, &req) == -1) { if (EINVAL == errno) { Rtt_LogException("%s does not support memory mapping\n", dev_name); return false; } else { Rtt_LogException("VIDIOC_REQBUFS failed"); return false; } } if (req.count < 2) { Rtt_LogException("Insufficient buffer memory on %s\n", dev_name); return false; } buffers = (buffer*) calloc(req.count, sizeof(*buffers)); if (buffers == NULL) { Rtt_LogException("Out of memory\n"); return false; } for (n_buffers = 0; n_buffers < req.count; ++n_buffers) { struct v4l2_buffer buf; CLEAR(buf); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = n_buffers; if (xioctl(fd, VIDIOC_QUERYBUF, &buf) == -1) { Rtt_LogException("VIDIOC_QUERYBUF failed"); return false; } buffers[n_buffers].length = buf.length; buffers[n_buffers].start = mmap(NULL, // start anywhere buf.length, PROT_READ | PROT_WRITE, MAP_SHARED, // recommended fd, buf.m.offset); if (MAP_FAILED == buffers[n_buffers].start) { Rtt_LogException("mmap failed"); return false; } } return true; } void LinuxImageProvider::init_userp(unsigned int buffer_size) { struct v4l2_requestbuffers req; CLEAR(req); req.count = 4; req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; req.memory = V4L2_MEMORY_USERPTR; if (-1 == xioctl(fd, VIDIOC_REQBUFS, &req)) { if (EINVAL == errno) { fprintf(stderr, "%s does not support " "user pointer i/o\n", dev_name); exit(EXIT_FAILURE); } else { printf("VIDIOC_REQBUFS"); } } buffers = (buffer*) calloc(4, sizeof(*buffers)); if (!buffers) { fprintf(stderr, "Out of memory\n"); exit(EXIT_FAILURE); } for (n_buffers = 0; n_buffers < 4; ++n_buffers) { buffers[n_buffers].length = buffer_size; buffers[n_buffers].start = malloc(buffer_size); if (!buffers[n_buffers].start) { fprintf(stderr, "Out of memory\n"); exit(EXIT_FAILURE); } } } bool LinuxImageProvider::init_device() { struct v4l2_capability cap; struct v4l2_cropcap cropcap; struct v4l2_crop crop; struct v4l2_format fmt; if (xioctl(fd, VIDIOC_QUERYCAP, &cap) == -1) { if (errno == EINVAL) { Rtt_LogException("%s is no V4L2 device\n", dev_name); } else { Rtt_LogException("VIDIOC_QUERYCAP failed"); } return false; } if (cap.capabilities & V4L2_CAP_VIDEO_CAPTURE == 0) { Rtt_LogException("%s is no video capture device\n", dev_name); return false; } switch (io) { case IO_METHOD_READ: if (cap.capabilities & V4L2_CAP_READWRITE == 0) { Rtt_LogException("%s does not support read i/o\n", dev_name); return false; } break; case IO_METHOD_MMAP: case IO_METHOD_USERPTR: if (cap.capabilities & V4L2_CAP_STREAMING == 0) { Rtt_LogException("%s does not support streaming i/o\n", dev_name); return false; } break; } // Select video input, video standard and tune here. CLEAR(cropcap); cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (xioctl(fd, VIDIOC_CROPCAP, &cropcap) == 0) { crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; crop.c = cropcap.defrect; // reset to default if (xioctl(fd, VIDIOC_S_CROP, &crop) == -1) { switch (errno) { case EINVAL: // Cropping not supported. break; default: // Errors ignored. break; } } } else { // Errors ignored. } CLEAR(fmt); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (force_format) { fmt.fmt.pix.width = 640; fmt.fmt.pix.height = 480; fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV; fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; if (xioctl(fd, VIDIOC_S_FMT, &fmt) == -1) { Rtt_LogException("VIDIOC_S_FMT failed"); return false; } // Note VIDIOC_S_FMT may change width and height. } else { // Preserve original settings as set by v4l2-ctl for example if (xioctl(fd, VIDIOC_G_FMT, &fmt) == -1) { Rtt_LogException("VIDIOC_G_FMT filed"); return false; } } bool rc = false; switch (io) { case IO_METHOD_READ: init_read(fmt.fmt.pix.sizeimage); break; case IO_METHOD_MMAP: rc = init_mmap(); break; case IO_METHOD_USERPTR: init_userp(fmt.fmt.pix.sizeimage); break; } return rc; } void LinuxImageProvider::uninit_device() { unsigned int i; switch (io) { case IO_METHOD_READ: free(buffers[0].start); break; case IO_METHOD_MMAP: for (i = 0; i < n_buffers; ++i) { if (munmap(buffers[i].start, buffers[i].length) == -1) { Rtt_LogException("munmap failed"); break; } } break; case IO_METHOD_USERPTR: for (i = 0; i < n_buffers; ++i) { free(buffers[i].start); } break; } free(buffers); } /// Determines if the given image source (Camera, Photo Library, etc.) is supported on this platform. /// @param source Unique integer ID of the image source. IDs are defined in PlatformImageProvider class. /// @return Returns true if given image source is supported on this platform. Returns false if not. bool LinuxImageProvider::Supports(int source) const { bool hasSource = false; switch (source) { case IMAGE_SOURCE_PHOTO_LIBRARY: case IMAGE_SOURCE_SAVED_PHOTOS_ALBUM: hasSource = false; break; case IMAGE_SOURCE_CAMERA: hasSource = fd != -1; break; } return hasSource; } /// Displays a window for selecting an image. /// @param source Unique integer ID indicating what kind of window to display such as the Camera or Photo Library. /// @param filePath The path\file name to save the selected image file to. /// Set to NULL to not save to file and display the selected photo as a display object instead. /// @return Returns true if the window was shown. /// Returns false if given source is not provided or if an image provider window is currently shown. // PlatformImageProvider::kCamera = 1 bool LinuxImageProvider::Show(int source, const char* filePath, lua_State* L) { // Do not continue if: // 1) Given image source type is not supported on this platform. // 2) Image providing window is already shown. PlatformImageProvider::Source src = (PlatformImageProvider::Source) source; // If given file path is an empty string, then change it to NULL. if (filePath && (strlen(filePath) <= 0)) { filePath = NULL; } if (fd < 0) // streamer created ? { Rtt_LogException("LinuxImageProvider is not implememnted\n"); return false; } return true; } void LinuxImageProvider::dispatch(LinuxVideoEventTypes eventID, int w, int h, uint8_t* buf) { //printf("event: id=%d, w=%d, h=%d, buf=%p,fObjID=%d\n", eventID, w, h, buf, fObjID); if (eventID == onCreated) { // fObjID = w; return; } lua_State *L = GetLuaState(); LinuxImageProviderCompletionEvent e(w, h, buf); Runtime* runtime = LuaContext::GetRuntime(L); e.Dispatch(L, *runtime); if (fd < 0) { // jsImageProviderHide(fObjID); Rtt_LogException("LinuxImageProvider is not implememnted\n"); } } int LinuxImageProvider::LinuxImageProviderCompletionEvent::Push(lua_State *L) const { if (Rtt_VERIFY(Super::Push(L)) && fData && fWidth > 0 && fHeight > 0) { lua_pushboolean(L, true); lua_setfield(L, -2, "completed"); Runtime* runtime = LuaContext::GetRuntime(L); LinuxBaseBitmap* bitmap = new LinuxBaseBitmap(runtime->GetAllocator(), fWidth, fHeight, fData); BitmapPaint* paint = BitmapPaint::NewBitmap(runtime->GetDisplay().GetTextureFactory(), bitmap, false); LuaLibDisplay::PushImage(L, NULL, paint, runtime->GetDisplay(), NULL); lua_setfield(L, -2, "target"); } return 1; } } // namespace Rtt #endif
[ "vlad@coronalabs.com" ]
vlad@coronalabs.com
f0a451ad2d4d6df85a93f48b5e2ce417db212574
c78c926155760aa63d24ad26b3356f6d19398f69
/NEUQOJ/大一上OJ作业/OJ第6周作业/组合数.cpp
39500236bb615db49e42e6d06f55bfc26c569081
[]
no_license
fhyPayaso/ACM
34c26aff0697ef0e7956cd03e30f13739a286466
0c7f4bf298e9a164f8a5ae140f30f441ccc226dc
refs/heads/master
2021-08-30T05:04:53.518780
2017-12-16T03:39:10
2017-12-16T03:39:10
114,429,801
1
1
null
null
null
null
UTF-8
C++
false
false
190
cpp
#include<iostream> using namespace std; int main() { int n,m; while(cin>>n>>m) { int t=1; for(int i=1; i<=m; i++) { t*=n; t/=i; n--; } cout<<t<<endl; } return 0; }
[ "410619823@qq.com" ]
410619823@qq.com
765253b29ac8f97aefdebf3ef732abbaa825aa7b
c63547a84e190382ccfbfb37366967bfad2497b0
/rmdisk.h
fe57d73974442c0f9c3a2684ac19c77426d644d4
[]
no_license
LuisLVar/PartitionLinux
cc24e47b32047ef869f0222d339073bf8bca640c
78a8715e07b1648d897b84d7d6bc5f7d065fdb0f
refs/heads/master
2020-09-30T05:14:16.233564
2019-12-21T17:45:53
2019-12-21T17:45:53
227,212,929
0
0
null
null
null
null
UTF-8
C++
false
false
176
h
#ifndef RMDISK_H #define RMDISK_H #include <string> #include <iostream> class rmDisk { public: rmDisk(); void eliminarDisco(std::string path); }; #endif // RMDISK_H
[ "noreply@github.com" ]
noreply@github.com
fa0e96526239f91767fac52c081bc20213a2855d
2f0bd3aa356a117926cefc60d7b5ed1be3b92a18
/Predator/tld/MedianFlowTracker.cpp
47688d66a763ca12284ae2ee1261fc2c16357817
[]
no_license
eaa3/FishTankVR
9719c04f24c93238a671c96f09c65e3ea989e166
8406cba018af281ee3ef50ec5c23a1d1755bb099
refs/heads/master
2020-04-13T04:03:27.439656
2013-03-19T19:08:15
2013-03-19T19:08:15
7,626,284
1
0
null
null
null
null
UTF-8
C++
false
false
2,157
cpp
/* Copyright 2011 AIT Austrian Institute of Technology * * This file is part of OpenTLD. * * OpenTLD is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenTLD 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 OpenTLD. If not, see <http://www.gnu.org/licenses/>. * */ /* * MedianFlowTracker.cpp * * Created on: Nov 17, 2011 * Author: Georg Nebehay */ #include "MedianFlowTracker.h" #include "fbtrack.h" #include <cmath> namespace tld { MedianFlowTracker::MedianFlowTracker() { trackerBB = NULL; } MedianFlowTracker::~MedianFlowTracker() { cleanPreviousData(); } void MedianFlowTracker::cleanPreviousData() { delete trackerBB; trackerBB = NULL; } void MedianFlowTracker::track(Mat prevMat, Mat currMat, Rect* prevBB) { if(prevBB != NULL) { if(prevBB->width <= 0 || prevBB->height <= 0) { return; } float bb_tracker[] = {prevBB->x, prevBB->y, prevBB->width+prevBB->x-1, prevBB->height+prevBB->y-1}; float scale; IplImage prevImg = prevMat; IplImage currImg = currMat; int success = fbtrack(&prevImg, &currImg, bb_tracker,bb_tracker,&scale); //Extract subimage float x,y,w,h; x = floor(bb_tracker[0]+0.5); y = floor(bb_tracker[1]+0.5); w = floor(bb_tracker[2]-bb_tracker[0]+1+0.5); h = floor(bb_tracker[3]-bb_tracker[1]+1+0.5); //TODO: Introduce a check for a minimum size if(!success || x < 0 || y < 0 || w <= 0 || h <= 0 || x +w > currMat.cols || y+h > currMat.rows || x!=x || y!=y || w!=w || h!=h) { //x!=x is check for nan //Leave it empty } else { trackerBB = new Rect(x,y,w,h); //printf("BBinside %d %d %d %d\n", trackerBB->x, trackerBB->y, trackerBB->width, trackerBB->height); } } } } /* namespace tld */
[ "eaa3" ]
eaa3
b40474ad578acd9b50d030165fdac12412dc8c55
464aa9d7d6c4906b083e6c3da12341504b626404
/src/lib/waypoint/chunk_waypoint_set.hpp
7dbc0171e9284f4dd496f66b36b211e743131ecf
[]
no_license
v2v3v4/BigWorld-Engine-2.0.1
3a6fdbb7e08a3e09bcf1fd82f06c1d3f29b84f7d
481e69a837a9f6d63f298a4f24d423b6329226c6
refs/heads/master
2023-01-13T03:49:54.244109
2022-12-25T14:21:30
2022-12-25T14:21:30
163,719,991
182
167
null
null
null
null
UTF-8
C++
false
false
6,043
hpp
/****************************************************************************** BigWorld Technology Copyright BigWorld Pty, Ltd. All Rights Reserved. Commercial in confidence. WARNING: This computer program is protected by copyright law and international treaties. Unauthorized use, reproduction or distribution of this program, or any portion of this program, may result in the imposition of civil and criminal penalties as provided by law. ******************************************************************************/ #ifndef CHUNK_WAYPOINT_SET_HPP #define CHUNK_WAYPOINT_SET_HPP #include "chunk_waypoint.hpp" #include "chunk_waypoint_set_data.hpp" #include "chunk_waypoint_vertex_provider.hpp" #include "dependent_array.hpp" #include "chunk/chunk_item.hpp" #include "chunk/chunk_boundary.hpp" #include "chunk/chunk.hpp" #include <map> #include <vector> typedef uint32 WaypointEdgeIndex; class ChunkWaypointSet; typedef SmartPointer< ChunkWaypointSet > ChunkWaypointSetPtr; typedef std::vector< ChunkWaypointSetPtr > ChunkWaypointSets; typedef std::map< ChunkWaypointSetPtr, ChunkBoundary::Portal * > ChunkWaypointConns; typedef std::map< WaypointEdgeIndex, ChunkWaypointSetPtr > ChunkWaypointEdgeLabels; /** * This class is a set of connected waypoints in a chunk. * It may have connections to other waypoint sets when its chunk is bound. */ class ChunkWaypointSet : public ChunkItem, public ChunkWaypointVertexProvider { DECLARE_CHUNK_ITEM( ChunkWaypointSet ) public: ChunkWaypointSet( ChunkWaypointSetDataPtr pSetData ); ~ChunkWaypointSet(); virtual void toss( Chunk * pChunk ); void bind(); /** * This finds the waypoint that contains the given point. * * @param lpoint The point that is used to find the waypoint. * @param ignoreHeight Flag indicates vertical range should be considered * in finding waypoint. If not, the best waypoint * that is closest to give point is selected (of * course the waypoint should contain projection of * the given point regardless). * @return The index of the waypoint that contains the point, * -1 if no waypoint contains the point. */ int find( const WaypointSpaceVector3 & point, bool ignoreHeight = false ) { return pSetData_->find( point, ignoreHeight ); } /** * This finds the waypoint that contains the given point. * * @param lpoint The point that is used to find the waypoint. * @param bestDistanceSquared The point must be closer than this to the * waypoint. It is updated to the new best distance * if a better waypoint is found. * @return The index of the waypoint that contains the point, * -1 if no waypoint contains the point. */ int find( const WaypointSpaceVector3 & point, float & bestDistanceSquared ) { return pSetData_->find( chunk(), point, bestDistanceSquared ); } /** * This gets the girth of the waypoints. * * @returns The girth of the waypoints. */ float girth() const { return pSetData_->girth(); } /** * This gets the number of waypoints in the set. * * @returns The number of waypoints. */ int waypointCount() const { return pSetData_->waypoints().size(); } /** * This gets the index'th waypoint. * * @param index The index of the waypoint to get. * @return A reference to the index'th waypoint. */ ChunkWaypoint & waypoint( int index ) { return pSetData_->waypoints()[index]; } /** * This gets the index'th waypoint. * * @param index The index of the waypoint to get. * @return A reference to the index'th waypoint. */ const ChunkWaypoint & waypoint( int index ) const { return pSetData_->waypoints()[index]; } /** * This returns an iterator to the first connection. * * @return An iterator to the first connection. */ ChunkWaypointConns::iterator connectionsBegin() { return connections_.begin(); } /** * This returns a const iterator to the first connection. * * @return A const iterator to the first connection. */ ChunkWaypointConns::const_iterator connectionsBegin() const { return connections_.begin(); } /** * This returns an iterator that points one past the last connection. * * @return An iterator to one past the last connection. */ ChunkWaypointConns::iterator connectionsEnd() { return connections_.end(); } /** * This returns a const iterator that points one past the last connection. * * @return A const iterator to one past the last connection. */ ChunkWaypointConns::const_iterator connectionsEnd() const { return connections_.end(); } /** * This gets the portal for the given waypoint set. * * @param pWaypointSet The ChunkWaypointSet to get the portal for. * @return The portal for the ChunkWaypointSet. */ ChunkBoundary::Portal * connectionPortal( ChunkWaypointSetPtr pWaypointSet ) { return connections_[pWaypointSet]; } /** * This method gets the corresponding ChunkWaypointSet for an edge. * * @param edge The ChunkWaypoint::Edge to get the ChunkWaypointSet * for. * @return The ChunkWaypointSet along the edge. */ ChunkWaypointSetPtr connectionWaypoint( const ChunkWaypoint::Edge & edge ) { return edgeLabels_[pSetData_->getAbsoluteEdgeIndex( edge )]; } void addBacklink( ChunkWaypointSetPtr pWaypointSet ); void removeBacklink( ChunkWaypointSetPtr pWaypointSet ); void print() const; // From ChunkWaypointVertexProvider virtual const Vector2 & vertexByIndex( EdgeIndex index ) const { return pSetData_->vertexByIndex( index ); } private: bool readyToBind() const; void deleteConnection( ChunkWaypointSetPtr pSet ); void removeOurConnections(); void removeOthersConnections(); void connect( ChunkWaypointSetPtr pWaypointSet, ChunkBoundary::Portal * pPortal, const ChunkWaypoint::Edge & edge ); protected: ChunkWaypointSetDataPtr pSetData_; ChunkWaypointConns connections_; ChunkWaypointEdgeLabels edgeLabels_; ChunkWaypointSets backlinks_; }; #endif // CHUNK_WAYPOINT_SET_HPP
[ "terran.erre@mail.ru" ]
terran.erre@mail.ru
99fb84be77524fc0a626f0a27f37b9374ee29e30
f1b7acf5d29e284dd48d47b1a0e3ec0406394aef
/ibh/reverse-stack-recursion.cpp
4f238daff544e7ec35feaa90cb114df5cdc74429
[]
no_license
bhardwaj-varun/recursion-old
3cfca4efda7f3489559e836440facaa5ab1c0338
b11487eb26b6abfa6f435e77cb01f4d023e5c66c
refs/heads/master
2022-11-22T12:00:11.685156
2020-07-28T05:23:27
2020-07-28T05:23:27
null
0
0
null
null
null
null
UTF-8
C++
false
false
592
cpp
#include<bits/stdc++.h> using namespace std; void insert(stack<int> &s, int elem){ if(s.size()==0){ s.push(elem); return; } int temp = s.top();s.pop(); insert(s,elem); s.push(temp); } void reverse(stack<int> &s){ if(s.size()==1){ return; } int temp=s.top();s.pop(); reverse(s); insert(s, temp); } int main(){ int n, t; stack<int> s; cin>>n; for(int i=0;i<n;i++){ cin>>t; s.push(t); } reverse(s); for(int i=s.size(); i>0;i--){ cout<<s.top()<<" "; s.pop(); } }
[ "varun.bhardwaj@sterlite.com" ]
varun.bhardwaj@sterlite.com
67ae737adda0a1305989ea5766d6b47ae4e3ef41
54adc4d554dce2769103a50d0af5aa20f8200aeb
/UVA Solutions/UVA/UVA 517.cpp
7a2bd7e2f0b69f5c1008a3dd72d7d36c09f12d23
[]
no_license
MoustafaHussien/UVA
d75ac2b5231edde18c493919b4c50122ab247139
13fddf04901a536fc4a5ed6fac9eb0541e0085cf
refs/heads/master
2020-07-03T19:48:34.518417
2016-11-19T21:23:04
2016-11-19T21:23:04
74,235,468
0
0
null
null
null
null
UTF-8
C++
false
false
865
cpp
//============================================================================ // Name : UVA.cpp // Author : moustafa // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostream> #include <stdio.h> using namespace std; int main() { freopen("input.txt", "r", stdin); int ca, cb, n, na, nb; while (scanf("%d %d %d", &ca, &cb, &n) != EOF) { nb = 0, na = 0; while (nb != n) { if (na == 0) { na = ca; printf("fill A\n"); } if (nb == cb) { printf("empty B\n"); nb = 0; } printf("pour A B\n"); nb = nb + na; if (nb > cb) { na = nb - cb, nb = cb; } else if (cb >= nb) { na = 0; } } printf("success\n"); } return 0; }
[ "moustafa.elmasry2013@gmail.com" ]
moustafa.elmasry2013@gmail.com
f5e428b4e8e9f3f07a84d0cdc8e4778f5f76db57
3eefa43e7dea4244fd61a021029375c937b7f6ea
/WebCamTest/ARTest/Classes/Native/mscorlib_System_Collections_Generic_EqualityCompar3152411022.h
5c5eff942376a8ed6266be7a819df05e038ef8ab
[]
no_license
poikelp/UnityIdeas
603865e4e8b4ef31baa84f86688f51f7b27aae69
8f5a7e9c7e8d319d45f18b2da0393b6e1359752c
refs/heads/master
2021-01-11T21:03:09.728467
2017-08-10T15:44:34
2017-08-10T15:44:34
79,234,786
0
0
null
null
null
null
UTF-8
C++
false
false
626
h
#pragma once #include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <stdint.h> #include "mscorlib_System_Collections_Generic_EqualityCompare104116132.h" #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.EqualityComparer`1/DefaultComparer<proto.PhoneEvent/Types/Type> struct DefaultComparer_t3152411022 : public EqualityComparer_1_t104116132 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "takukelp@gmail.com" ]
takukelp@gmail.com
18ea4065e7ef0f1a2286b71a7c6827c4db09e25d
d5c4d2eec7c311ba5bcb4ea3df14c47edb028e14
/9_module/ex01/main.cpp
3aadf90f60a25c2477463340f3b984d834e55889
[]
no_license
olegroom/CPP
8d903cb9bce0f6bf9736050bc089afa270e0f7ea
07e0034ec53fb284d4908a7ee6ed553532a13a40
refs/heads/main
2023-07-15T10:41:26.074180
2021-08-23T16:31:22
2021-08-23T16:31:22
388,804,258
0
0
null
null
null
null
UTF-8
C++
false
false
1,323
cpp
#include "span.hpp" int main() { std::cout << "Simple test" << std::endl; Span sp(5); // Span sp; Span sp1(400); try { sp.addNumber(10); sp.addNumber(29); sp.addNumber(2); sp.addNumber(48); sp.addNumber(18); // sp.addNumber(45); // sp.addNumber(333); // sp.addNumber(338); } catch (const std::exception &e) { std::cerr << e.what() << std::endl; } try { std::cout << sp.shortestSpan() << std::endl; std::cout << sp.longestSpan() << std::endl; } catch(const std::exception& e) { std::cerr << e.what() << std::endl; } Span sec_sp(15000); sec_sp.addNumber(453); sec_sp.addNumber(33); std::cout << std::endl << "test with 50000 numbers" << std::endl; Span sp_long_long(50000); std::vector<int> range(50000, 60); range[3256] = 40; try { sp_long_long.addNumber(range.begin(), range.end()); } catch(const std::exception& e) { std::cerr << e.what() << '\n'; } try { std::cout << sp_long_long.longestSpan() << std::endl; } catch(const std::exception& e) { std::cerr << "Error : " << e.what() << std::endl; } try { std::cout << sp_long_long.shortestSpan() << std::endl; } catch(const std::exception& e) { std::cerr << "Error : " << e.what() << std::endl; } return (0); }
[ "rumyancev.olezhka@gmail.com" ]
rumyancev.olezhka@gmail.com
e0d0a7d27d8a334547c4db356a2eda66837b3d0e
186d9281611777f08ab22744867ea160002d469f
/include/rucksack/optional_scalar.hpp
4d55bdf1f00e0026193e376d3e50344546508a5a
[]
no_license
pmiddend/rucksack
0f30017d463de5f1c48f6e9dcc5755706966572b
9a920b9cf91114828a4dcdabef81d0b4ef7c65ff
refs/heads/master
2021-01-25T10:28:44.994653
2012-07-21T16:23:40
2012-07-21T16:23:40
2,595,152
0
0
null
null
null
null
UTF-8
C++
false
false
249
hpp
#ifndef RUCKSACK_OPTIONAL_SCALAR_HPP_INCLUDED #define RUCKSACK_OPTIONAL_SCALAR_HPP_INCLUDED #include <rucksack/scalar.hpp> #include <fcppt/optional_fwd.hpp> namespace rucksack { typedef fcppt::optional<rucksack::scalar> optional_scalar; } #endif
[ "pmidden@gmx.net" ]
pmidden@gmx.net
2173105755a7df921025a70d42e407cf5b35298d
fb5545a27eba0d1df279a11ebe2c0e47921f9ff3
/Science/CartesianFFT.h
f37be513432929aa51e3f9e0fc63188e5366208e
[]
no_license
OpenEngineDK/projects-MRISIM
f9e187652847c42ed49e30df34fb5d608c553071
f2ccfc41e84f3b61448ec0b99ad12baed7bd49ca
refs/heads/master
2020-12-24T20:15:30.488997
2016-05-05T00:43:11
2016-05-05T00:43:11
58,077,385
3
0
null
null
null
null
UTF-8
C++
false
false
1,498
h
// Reconstruct sample data based on a 2D cartesian grid FFT algorithm. // ------------------------------------------------------------------- // Copyright (C) 2007 OpenEngine.dk (See AUTHORS) // // This program is free software; It is covered by the GNU General // Public License version 2 or any later version. // See the GNU General Public License for more details (see LICENSE). //-------------------------------------------------------------------- #ifndef _MRI_CARTESIAN_F_F_T_H_ #define _MRI_CARTESIAN_F_F_T_H_ #include <Math/Vector.h> #include <Resources/Texture3D.h> #include "../Resources/Sample3DTexture.h" #include <vector> #include <complex> namespace MRI { namespace Science { using OpenEngine::Math::Vector; using MRI::Resources::Sample3DTexturePtr; using std::vector; using std::complex; class IFFT; /** * Reconstruct sample data based on a 2D cartesian grid FFT algorithm. * * @class CartesianFFT CartesianFFT.h MRISIM/Science/CartesianFFT.h */ class CartesianFFT { private: IFFT& fft; unsigned int size; vector<complex<float> >& samples; vector<complex<float> > out; Vector<3,unsigned int> dims; Sample3DTexturePtr res; float* data; public: CartesianFFT(IFFT& fft, vector<complex<float> >& samples, Vector<3,unsigned int> dims, bool autoWindow = false); virtual ~CartesianFFT(); void ReconstructSlice(unsigned int i); FloatTexture3DPtr GetResult(); }; } // NS Science } // NS MRI #endif //_MRI_CARTESIAN_F_F_T_H_
[ "salomonhippie@gmail.com" ]
salomonhippie@gmail.com
c7894c155c5073b8427cc2a935d37fef3791164a
4199daa5a859f0a08d7000e0dbec4584f058d3aa
/engine/lib/TmxParser/TmxPropertySet.cpp
b2551cffe910abd470086db0ed2c2e13f6b620ab
[]
no_license
LucidMage/Torque2D-feature-tmx_maps
2f978d5ffdffb079aba63dd0215b66ac4451d611
39d46d0eab5bf743be28ceb3b4a1bc92e24f002f
refs/heads/master
2016-09-06T00:29:46.380191
2013-10-23T20:55:28
2013-10-23T20:55:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,097
cpp
//----------------------------------------------------------------------------- // TmxPropertySet.cpp // // Copyright (c) 2010-2013, Tamir Atias // All rights reserved. // // 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 following disclaimer. // * 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 TAMIR ATIAS 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. // // Author: Tamir Atias //----------------------------------------------------------------------------- #include "tinyxml/tinyxml.h" #include "TmxPropertySet.h" using std::string; using std::map; namespace Tmx { PropertySet::PropertySet() : properties() {} PropertySet::~PropertySet() { properties.clear(); } void PropertySet::Parse(const TiXmlNode *propertiesNode) { // Iterate through all of the property nodes. const TiXmlNode *propertyNode = propertiesNode->FirstChild("property"); string propertyName; string propertyValue; while (propertyNode) { const TiXmlElement* propertyElem = propertyNode->ToElement(); // Read the attributes of the property and add it to the map propertyName = string(propertyElem->Attribute("name")); propertyValue = string(propertyElem->Attribute("value")); properties[propertyName] = propertyValue; propertyNode = propertiesNode->IterateChildren( "property", propertyNode); } } string PropertySet::GetLiteralProperty(const string &name) const { // Find the property in the map. map< string, string >::const_iterator iter = properties.find(name); if (iter == properties.end()) return std::string(""); return iter->second; } int PropertySet::GetNumericProperty(const string &name) const { return atoi(GetLiteralProperty(name).c_str()); } float PropertySet::GetFloatProperty(const string &name) const { return float(atof(GetLiteralProperty(name).c_str())); } bool PropertySet::HasProperty( const string& name ) const { if( properties.empty() ) return false; return ( properties.find(name) != properties.end() ); } };
[ "lucidmage@outlook.com" ]
lucidmage@outlook.com
4dcc5063fdf055b30c03265fc1d5bd3961f6d71a
51e5963aa39ea849664af9f6e9f61f736de90b12
/Unit2.h
bbe4bc3b128cb02563b71e94c12c1054d2c0c1c8
[]
no_license
amalter1999/TP-Cam-ra
d4fe125ed3ff69dabc72fe9cf24c3c02d718ab5e
fbdc89a470a1c0c135d50dba734bb1cae387d4ca
refs/heads/main
2023-01-28T13:12:53.377989
2020-11-17T10:09:06
2020-11-17T10:09:06
313,578,776
0
0
null
null
null
null
ISO-8859-1
C++
false
false
1,665
h
//--------------------------------------------------------------------------- #ifndef Unit2H #define Unit2H //--------------------------------------------------------------------------- #include <System.Classes.hpp> #include <Vcl.Controls.hpp> #include <Vcl.StdCtrls.hpp> #include <Vcl.Forms.hpp> #include "Rs232.h" #include <Vcl.ExtCtrls.hpp> #include <Vcl.ComCtrls.hpp> //--------------------------------------------------------------------------- class TForm2 : public TForm { __published: // Composants gérés par l'EDI TButton *connexion; TButton *Deconnexion; TShape *Shape1; TButton *Gauche; TButton *Droite; TTrackBar *TrackBar1; TButton *neutre; void __fastcall connexionClick(TObject *Sender); void __fastcall DeconnexionClick(TObject *Sender); void __fastcall GaucheMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall GaucheMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall DroiteMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall neutreClick(TObject *Sender); void __fastcall DroiteMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall TrackBar1Change(TObject *Sender); private: // Déclarations utilisateur Rs232 *c1; public: // Déclarations utilisateur __fastcall TForm2(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TForm2 *Form2; //--------------------------------------------------------------------------- #endif
[ "noreply@github.com" ]
noreply@github.com
593d1c4602a2c755aaad28053d3b003c1425bcaf
1f0179df804cc917ced4a7e5dedcabfa30de6adf
/HTMLFinalFinal/HTMLPage.cpp
5a69cd13ae47a9f3a11805ee1cde203728e1e9ea
[]
no_license
json-as/HTMLFinalFinal
5a2ef7bfadab30b57a380deae22f44387e594311
6ea3f24335cb0ce0cdc8213068630845f2efef4a
refs/heads/master
2023-05-07T12:05:56.905807
2021-05-31T09:10:36
2021-05-31T09:10:36
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,638
cpp
#include "HTMLPage.h" #include "demo.h" namespace HTML { /** * adds a table to the bottom of a page */ size_t HTMLPage::addTable(TableTag& t) { htmlVector::iterator iter = htmlVector_.end() - 2; htmlVector_.insert(iter, t.getTableTagStr()); return size_t(); } /** * adds a paragraph to the bottom of a page */ size_t HTMLPage::addParagraph(ParagraphTag& p) { htmlVector::iterator iter = htmlVector_.end() - 2; htmlVector_.insert(iter, p.getParagraphTagStr()); return size_t(); } /** * adds an anchor tag to the bottom of a page */ size_t HTMLPage::addAnchor(AnchorTag& a) { htmlVector::iterator iter = htmlVector_.end() - 2; htmlVector_.insert(iter, a.getAnchorTagStr()); return size_t(); } /** * adds a doctype declaration to the top of a page */ size_t HTMLPage::docTypeDeclarationTag(DocTypeDeclarationTag& d) { htmlVector::iterator iter = htmlVector_.begin(); htmlVector_.insert(iter, d.getDocTypeDeclarationTagStr()); return size_t(); } /** * adds a headTag after the doctype declaration (or after the first element * in htmlVector_) */ size_t HTMLPage::headTag(HeadTag& head) { htmlVector::iterator iter = htmlVector_.begin()+1; htmlVector_.insert(iter, head.getHeadTagStr()); return size_t(); } /** * goes through htmlVector_ and outputs the vector */ std::ostream& operator<<(std::ostream& o, HTMLPage& html) { std::string outputStr = ""; for (auto& e : html.htmlVector_) outputStr = outputStr.append(e).append("\n"); return o << outputStr; } /** * used within indexPage and linkedPage */ void HTMLPage::viewPage() { } /** * Menu for adding elements */ void HTMLPage::addElements() { std::string input; int choice = 0; std::cout << "What would you like to add?\n"; std::cout << "1. Paragraph Tag\n"; std::cout << "2. Anchor Tag\n"; std::cout << "3. Go to next page\n"; std::cout << "4. Quit Adding Tags\n"; std::cout << "Input your choice: \n"; std::cin >> choice; while (choice != 3) { if (choice == 1) { std::cout << "Enter the content for the paragraph tag\n"; std::cin >> input; HTML::ParagraphTag p(input); addParagraph(p); break; } else if (choice == 2) { std::cout << "Enter the content for the anchor tag\n"; std::cin >> input; HTML::AnchorTag a(input); addAnchor(a); break; } else if (choice == 3) { break; } else if (choice == 4) { Demo::Demo d; d.demoHTML(); } else { choice == 0; std::cout << "Please enter a valid choice"; } } } }
[ "smart.j1959@yahoo.co.uk" ]
smart.j1959@yahoo.co.uk
338d60ac4a3f8bd48cac20491f5dfb2ee9a8374f
8a762f02b5a20c844e6a74b578275e1d44020cc6
/td/telegram/SendCodeHelper.h
421d47bba892799faaea79a88e45f1eb74cd79fe
[ "LicenseRef-scancode-unknown-license-reference", "JSON", "BSL-1.0" ]
permissive
kesha-antonov/td
e186a5496db89f664bf787b1c5c8527022e3eb0a
0b9824231e9a8771f935e51a27dcf061c7c01a93
refs/heads/master
2020-06-08T14:35:52.905483
2019-06-22T14:44:53
2019-06-22T14:44:53
193,244,698
0
0
BSL-1.0
2019-06-22T14:43:41
2019-06-22T14:43:41
null
UTF-8
C++
false
false
3,679
h
// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2019 // // 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) // #pragma once #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/TermsOfService.h" #include "td/utils/common.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/Time.h" namespace td { class SendCodeHelper { public: void on_sent_code(telegram_api::object_ptr<telegram_api::auth_sentCode> sent_code); td_api::object_ptr<td_api::authorizationStateWaitCode> get_authorization_state_wait_code( const TermsOfService &terms_of_service) const; td_api::object_ptr<td_api::authenticationCodeInfo> get_authentication_code_info_object() const; Result<telegram_api::auth_resendCode> resend_code(); Result<telegram_api::auth_sendCode> send_code(Slice phone_number, bool allow_flash_call, bool is_current_phone_number, int32 api_id, const string &api_hash); Result<telegram_api::account_sendChangePhoneCode> send_change_phone_code(Slice phone_number, bool allow_flash_call, bool is_current_phone_number); Result<telegram_api::account_sendVerifyPhoneCode> send_verify_phone_code(const string &hash, Slice phone_number, bool allow_flash_call, bool is_current_phone_number); Result<telegram_api::account_sendConfirmPhoneCode> send_confirm_phone_code(Slice phone_number, bool allow_flash_call, bool is_current_phone_number); Slice phone_number() const { return phone_number_; } Slice phone_code_hash() const { return phone_code_hash_; } bool phone_registered() const { return phone_registered_; } template <class StorerT> void store(StorerT &storer) const; template <class ParserT> void parse(ParserT &parser); private: static constexpr int32 AUTH_SEND_CODE_FLAG_ALLOW_FLASH_CALL = 1 << 0; static constexpr int32 SENT_CODE_FLAG_IS_USER_REGISTERED = 1 << 0; static constexpr int32 SENT_CODE_FLAG_HAS_NEXT_TYPE = 1 << 1; static constexpr int32 SENT_CODE_FLAG_HAS_TIMEOUT = 1 << 2; struct AuthenticationCodeInfo { enum class Type : int32 { None, Message, Sms, Call, FlashCall }; Type type = Type::None; int32 length = 0; string pattern; AuthenticationCodeInfo() = default; AuthenticationCodeInfo(Type type, int length, string pattern) : type(type), length(length), pattern(std::move(pattern)) { } template <class StorerT> void store(StorerT &storer) const; template <class ParserT> void parse(ParserT &parser); }; string phone_number_; bool phone_registered_; string phone_code_hash_; SendCodeHelper::AuthenticationCodeInfo sent_code_info_; SendCodeHelper::AuthenticationCodeInfo next_code_info_; Timestamp next_code_timestamp_; static AuthenticationCodeInfo get_authentication_code_info( tl_object_ptr<telegram_api::auth_CodeType> &&code_type_ptr); static AuthenticationCodeInfo get_authentication_code_info( tl_object_ptr<telegram_api::auth_SentCodeType> &&sent_code_type_ptr); static tl_object_ptr<td_api::AuthenticationCodeType> get_authentication_code_type_object( const AuthenticationCodeInfo &authentication_code_info); }; } // namespace td
[ "levlam@telegram.org" ]
levlam@telegram.org
a0388e42384d1255bee2ef6ec40274f90591e620
01bca8b6f248001fcec95d75ee0f36b7c66678f2
/src/route_planner.cpp
50452f4dec8cb4fd3c0d7685ef8d647c7e391461
[]
no_license
peter-de-boer/CppND-Route-Planning-Project
8b195095fe16b5896ddba9014acf6965b9aebe30
ff06cb4fa243c2b1d7f1a95257e522c2176854e0
refs/heads/master
2023-01-24T16:33:28.008190
2020-11-30T08:31:11
2020-11-30T08:31:11
316,417,559
0
0
null
null
null
null
UTF-8
C++
false
false
4,673
cpp
#include "route_planner.h" #include <algorithm> RoutePlanner::RoutePlanner(RouteModel &model, float start_x, float start_y, float end_x, float end_y): m_Model(model) { // Convert inputs to percentage: start_x *= 0.01; start_y *= 0.01; end_x *= 0.01; end_y *= 0.01; // TODO 2: Use the m_Model.FindClosestNode method to find the closest nodes to the starting and ending coordinates. // Store the nodes you find in the RoutePlanner's start_node and end_node attributes. start_node = &m_Model.FindClosestNode(start_x, start_y); end_node = &m_Model.FindClosestNode(end_x, end_y); } // TODO 3: Implement the CalculateHValue method. // Tips: // - You can use the distance to the end_node for the h value. // - Node objects have a distance method to determine the distance to another node. float RoutePlanner::CalculateHValue(RouteModel::Node const *node) { return node->distance(*end_node); } // TODO 4: Complete the AddNeighbors method to expand the current node by adding all unvisited neighbors to the open list. // Tips: // - Use the FindNeighbors() method of the current_node to populate current_node.neighbors vector with all the neighbors. // - For each node in current_node.neighbors, set the parent, the h_value, the g_value. // - Use CalculateHValue below to implement the h-Value calculation. // - For each node in current_node.neighbors, add the neighbor to open_list and set the node's visited attribute to true. void RoutePlanner::AddNeighbors(RouteModel::Node *current_node) { current_node->FindNeighbors(); for (auto node: current_node->neighbors) { node->parent = current_node; node->h_value = CalculateHValue(node); node->g_value = current_node->g_value + node->distance(*current_node); node->visited = true; this->open_list.push_back(node); } } // TODO 5: Complete the NextNode method to sort the open list and return the next node. // Tips: // - Sort the open_list according to the sum of the h value and g value. // - Create a pointer to the node in the list with the lowest sum. // - Remove that node from the open_list. // - Return the pointer. RouteModel::Node *RoutePlanner::NextNode() { sort(open_list.begin(), open_list.end(), [](const auto node1, const auto node2) { return (node1->g_value+node1->h_value)<(node2->g_value+node2->h_value); } ); auto first_node = open_list[0]; open_list.erase(open_list.begin()); return first_node; } // TODO 6: Complete the ConstructFinalPath method to return the final path found from your A* search. // Tips: // - This method should take the current (final) node as an argument and iteratively follow the // chain of parents of nodes until the starting node is found. // - For each node in the chain, add the distance from the node to its parent to the distance variable. // - The returned vector should be in the correct order: the start node should be the first element // of the vector, the end node should be the last element. std::vector<RouteModel::Node> RoutePlanner::ConstructFinalPath(RouteModel::Node *current_node) { // Create path_found vector distance = 0.0f; std::vector<RouteModel::Node> path_found; // TODO: Implement your solution here. // - add node to path_found, at the beginning // - if no parent node: finished // - else get distance to parent node, set node to parent node, and repeat path_found.insert(path_found.begin(), *current_node); while (current_node->parent) { distance += current_node->distance(*(current_node->parent)); current_node = current_node->parent; path_found.insert(path_found.begin(), *current_node); } distance *= m_Model.MetricScale(); // Multiply the distance by the scale of the map to get meters. return path_found; } // TODO 7: Write the A* Search algorithm here. // Tips: // - Use the AddNeighbors method to add all of the neighbors of the current node to the open_list. // - Use the NextNode() method to sort the open_list and return the next node. // - When the search has reached the end_node, use the ConstructFinalPath method to return the final path that was found. // - Store the final path in the m_Model.path attribute before the method exits. This path will then be displayed on the map tile. void RoutePlanner::AStarSearch() { RouteModel::Node *current_node = nullptr; // TODO: Implement your solution here. current_node = start_node; current_node->visited = true; while (current_node != end_node) { AddNeighbors(current_node); current_node = NextNode(); } m_Model.path = ConstructFinalPath(current_node); }
[ "peterdeboer_private@hotmail.com" ]
peterdeboer_private@hotmail.com
3d960ffd1ccce57488ce5533384f599dcc4c85ed
0629a654e44b952b678caeae33ee66baab1bbb65
/fondo.h
c26f999b306298728ad52738abc0375f3defe59c
[]
no_license
teresacheca/Practica-IG
22d1bda9115435a45135c8d8d530853e0508d421
448b919f94a0661e7e2a8597f3ab6705b5996564
refs/heads/master
2023-02-21T11:06:04.331959
2021-01-21T22:44:59
2021-01-21T22:44:59
329,286,271
0
0
null
null
null
null
UTF-8
C++
false
false
722
h
// ############################################################################# // // Informática Gráfica (Grado Informática) // // Archivo: fondo.h // // ############################################################################# #ifndef FONDO_H_INCLUDED #define FONDO_H_INCLUDED #include "aux.h" #include "lata.h" #include "pelota.h" #include "suelo.h" #include "horizonte.h" // ***************************************************************************** // // clase cola // // ***************************************************************************** class Fondo { public: Fondo(); void draw(); private: Lata * lata; Pelota * pelota; Suelo * suelo; Horizonte * horizonte; } ; #endif
[ "teresa.checamarabotto@gmail.com" ]
teresa.checamarabotto@gmail.com