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
e4eaa2ca2b34c0ddff9c8fff37ab6407217367f4
b2084fb8f7bd158a5875e85b36e5d4bbb53f0ded
/Programas/RedNeuronal/mainwindow.cpp
1b27a7f13ffe0b33b803dace4c62ef079829a3a8
[]
no_license
Kathyren/Peptidos
e99bfbd1f58850265dfb3fb8d5bf8c7748bfee70
ff47735de8b5638503586e29511f8e0bd62e535d
refs/heads/master
2021-01-10T16:45:11.213738
2016-10-29T03:50:09
2016-10-29T03:50:09
45,004,875
0
0
null
null
null
null
UTF-8
C++
false
false
4,949
cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include <QFile> #include <QTextStream> #include "redneuronal.h" #include <QFileDialog> #include <QMessageBox> #include <QFile> #include <QTextStream> RedNeuronal * redNeuronal; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); srand(time(NULL)); } MainWindow::~MainWindow() { delete ui; } void cargarDatos(QString archivoTexto){ double clasesEntren [NUM_ENTREN][NUM_SALIDAS]; double datosEntren [NUM_ENTREN][NUM_CARS]; QString dato; QFile archivo(archivoTexto); archivo.open(QIODevice::ReadOnly); QTextStream textoArchivo(&archivo); int contSC=0; int contE=0; while (!textoArchivo.atEnd()) { textoArchivo >> dato; if (contSC<NUM_SALIDAS){ clasesEntren[contE][contSC]=dato.toDouble(); } else{ //Recordar que los primeros NUM_SALIDAS valores corresponden a las clases y no a características datosEntren[contE][contSC-NUM_SALIDAS]=dato.toDouble(); } contSC++; if (contSC==NUM_SALIDAS+NUM_CARS){ contE++; contSC=0; } } archivo.close(); redNeuronal=new RedNeuronal(clasesEntren,datosEntren); } void cargarDatosP(QString archivoTexto){ double clasesEntren [NUM_Pruebas][NUM_SALIDAS]; double datosEntren [NUM_Pruebas][NUM_CARS]; QString dato; QFile archivo(archivoTexto); archivo.open(QIODevice::ReadOnly); QTextStream textoArchivo(&archivo); int contSC=0; int contE=0; while (!textoArchivo.atEnd()) { textoArchivo >> dato; if (contSC<NUM_SALIDAS){ clasesEntren[contE][contSC]=dato.toDouble(); } else{ //Recordar que los primeros NUM_SALIDAS valores corresponden a las clases y no a características datosEntren[contE][contSC-NUM_SALIDAS]=dato.toDouble(); } contSC++; if (contSC==NUM_SALIDAS+NUM_CARS){ contE++; contSC=0; } } archivo.close(); // redNeuronal->preProbar(clasesEntren,datosEntren); redNeuronal->probar(clasesEntren,datosEntren); } QString cargarDatosC(QString archivoTexto){ double datosEntren [NUM_Calculos][NUM_CARS]; QString dato; QFile archivo(archivoTexto); archivo.open(QIODevice::ReadOnly); QTextStream textoArchivo(&archivo); int contSC=0; int contE=0; while (!textoArchivo.atEnd()) { textoArchivo >> dato; //Recordar que los primeros NUM_SALIDAS valores corresponden a las clases y no a características datosEntren[contE][contSC]=dato.toDouble(); contSC++; if (contSC==NUM_CARS) { contE++; contSC=0; } } archivo.close(); return redNeuronal->Resultado( datosEntren); return "a"; } void MainWindow::on_cmdEntrenar_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Abrir archivo de entrenamiento"), "C://Users//Karen//Documents//Peptidos//RedesNeuronales", " Text File (*.txt)" ); if (fileName!="") { ui->txtArchivoEntrenamiento->setText(fileName); cargarDatos(fileName); } redNeuronal->entrenar(); QMessageBox::information(this,tr("File Name"),"Entrenamiento finalizado"); } void MainWindow::on_cmdPruebas_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Abrir archivo de prueba"), "C://Users//Karen//Documents//Peptidos//RedesNeuronales", "Text File (*.txt)" ); if (fileName!="") { ui->txtArchivoPrueba->setText(fileName); cargarDatosP(fileName); } } void MainWindow::on_btnCalular_clicked() { QString fileName = QFileDialog::getOpenFileName( this, tr("Abrir archivo para calcular"), "C://Users//Karen//Documents//Peptidos//RedesNeuronales", "Text File (*.txt)" ); QString texto=""; if (fileName!="") { texto=cargarDatosC(fileName); QString st = QFileDialog::getSaveFileName( this,tr("Guardar"), "C://Users//Karen//Documents//Peptidos//RedesNeuronales", "All files (*.*);; Text File (*.txt)" ); QFile file1(st); file1.open(QIODevice::WriteOnly|QIODevice::Text); QTextStream in (&file1); //double datosEntren [NUM_Calculos][NUM_CARS];// //texto=redNeuronal->Resultado(datosEntren);// // cargarDatosC(texto) in << texto; file1.close(); texto.clear(); QMessageBox::information(this,tr("Exito"),"Archivo guardado como: "+st); } }
[ "Katthyren@hotmail.com" ]
Katthyren@hotmail.com
f89d7546afdaabc04224e07c8a3d1120d3c1af5f
777a75e6ed0934c193aece9de4421f8d8db01aac
/src/Providers/UNIXProviders/PackageAlarm/UNIX_PackageAlarm_VMS.hxx
4705a450dc073d5f4f592be7099009b417af820e
[ "MIT" ]
permissive
brunolauze/openpegasus-providers-old
20fc13958016e35dc4d87f93d1999db0eae9010a
b00f1aad575bae144b8538bf57ba5fd5582a4ec7
refs/heads/master
2021-01-01T20:05:44.559362
2014-04-30T17:50:06
2014-04-30T17:50:06
19,132,738
1
0
null
null
null
null
UTF-8
C++
false
false
118
hxx
#ifdef PEGASUS_OS_VMS #ifndef __UNIX_PACKAGEALARM_PRIVATE_H #define __UNIX_PACKAGEALARM_PRIVATE_H #endif #endif
[ "brunolauze@msn.com" ]
brunolauze@msn.com
1ce231f54f51b3d733dd13f84e00ee3371051933
a090af918e3ec59140027dbddd54aa4ca1c73910
/Lightoj/copy.cpp
87c7fa50973e4f7e43dab0706d1b6f58290b48fd
[]
no_license
nitesh-147/Programming-Problem-Solution
b739e2a3c9cfeb2141baf1d34e43eac0435ecb2a
df7d53e0863954ddf358539d23266b28d5504212
refs/heads/master
2023-03-16T00:37:10.236317
2019-11-28T18:11:33
2019-11-28T18:11:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,756
cpp
#include<cstdio> #include<algorithm> #include <bits/stdc++.h> #include<vector> #define re(i,a,b) for(int i=a;i<=b;++i) #define sf scanf #define si(a) sf("%d",&a) #define pf printf #define ps while(1) #define pb push_back #define inf 0xffffff #define multi int T;si(T);re(t,1,T) #define cse pf("Case %d: ",t) #define csel pf("Case %d:\n",t) using namespace std; vector<int> eg[2010],wt[2010]; int d[2010],f[2010]; int mx=-1; void dfs(int u) { if(f[u])return; f[u]=1; mx=max(u,mx); re(k,0,int(eg[u].size())-1)dfs(eg[u][k]); } int main() { multi { int n,m; si(n); si(m); fill(eg,eg+n,vector<int>()); fill(wt,wt+n,vector<int>()); fill(d,d+n,0); fill(f,f+n,0); mx=-1; re(i,1,m) { int u,v,w; si(u),si(v),si(w); eg[v].pb(u); wt[v].pb(w); } re(i,1,n-1) { re(j,0,n-1) { re(k,0,int(eg[j].size())-1) { int u=j,v=eg[j][k],w=wt[j][k]; if(d[u]+w<d[v])d[v]=d[u]+w; } } cout<<"FOR "<<i<<" : "<<endl; for(int j = 0; j < n; j++) cout<<d[j]<<" "; cout<<endl; } re(j,0,n-1) { re(k,0,int(eg[j].size())-1) { int u=j,v=eg[j][k],w=wt[j][k]; if(d[u]+w<d[v])dfs(u); } } cse; if(mx==-1)pf("impossible\n"); else re(i,0,n-1) { if(f[i]) { pf("%d",i); if(i==mx)pf("\n"); else pf(" "); } } } return 0; }
[ "milonju01@gmail.com" ]
milonju01@gmail.com
505385dcd59dc7219faa86a8db4f4af6a15169f4
a24765ab100cf80c9aa6772049040d945a8f74b7
/src/objects/primitives/plane.h
f0430ce95cde8dd6a7538084f8a0bc45dfc88524
[]
no_license
araghava/raytracer
0af73340140be8f05a02b7eb430402382aef35af
3415078eef8e4a780d4adf6feca206f81b91f5e0
refs/heads/master
2021-07-08T05:51:52.276690
2017-12-25T11:36:09
2017-12-25T11:36:09
34,893,565
0
1
null
2021-05-31T20:39:25
2015-05-01T07:30:00
C++
UTF-8
C++
false
false
1,637
h
#ifndef __PLANE_H #define __PLANE_H #include "../object.h" #include "../../core/geometry.h" #include "../../core/constants.h" #include "../../trace/ray.h" #include <math.h> // Plane object implementation. Useful to use as a ground plane. class Plane : public Object { public: // Defines a plane by three points. // Make sure that no two are collinear! Plane(const size_t id, const Vector& p1_, const Vector& p2_, const Vector& p3_) : Object(id), p1(p1_), p2(p2_), p3(p3_) {} virtual ~Plane() = default; // Virtual implementations. virtual bool intersect(const Ray& ray, Intersection& intersection) { Vector rp1 = transform.applyPoint(p1); Vector rp2 = transform.applyPoint(p2); Vector rp3 = transform.applyPoint(p3); Vector nml = ((rp2 - rp1).cross(rp3 - rp2)).normalize(); if (ray.direction.dot(nml) > 0) nml = nml * -1; const float dp = ray.direction.dot(nml); // Ray and plane are parallel. if (fabs(dp) < TOLERANCE) return false; const float u = ((p1 - ray.origin).dot(nml)) / dp; // The intersection point is behind where we fired the ray. if (u < 0) return false; const Vector pt = ray.origin + ray.direction * u; const float dist = (pt - ray.origin).length2(); // The intersection is too far for it to count. if (dist >= RAY_FAR_DISTANCE) return false; intersection.objectId = objectId; intersection.ray = ray; intersection.pt = ray.origin + ray.direction * u; intersection.nml = nml; intersection.finalized = true; return true; } private: float radius; Vector p1, p2, p3; }; #endif
[ "araghavan3@gmail.com" ]
araghavan3@gmail.com
d262b2029b2c1c4ca1b7a5cda82980da78752ee2
8febc6bf3eeae315532b6e265d18976c18b6c404
/N2/export/common/N2Base.h
78527eeabba0dd9c2d5799143ef506bf74c4d7bd
[]
no_license
Veala/N2Lib
a6cedc21e078a6409729783dd9777daae57feaaa
5a485fbf2857eaa5cfcec0aa4452e007b1fa64df
refs/heads/master
2020-07-04T16:06:42.722618
2017-01-09T18:02:30
2017-01-09T18:02:30
74,153,460
0
0
null
null
null
null
UTF-8
C++
false
false
721
h
// -*- mode:c++; coding:utf-8; -*- /// /// \file N2Base.h /// /// \brief Общий шаблонный класс /// \details /// /// \copyright ЗАО НТЦ "Модуль" /// \author Чихичин Д.А. /// /// \date 21.03.2014 /// \version 0.1 /// /// История изменений: /// /// #pragma once #include "isolator.h" /// Общий класс, от которого наследуют практически все классы библиотеки N2 class N2Base { std_string nameModule; protected: // ExC exc; public: N2Base() { // определение наименования модуля, запихиваем его в исключение } virtual ~N2Base() {} };
[ "ialaev86@gmail.com" ]
ialaev86@gmail.com
33454fb578a5953bcc1295ba45c4a0a93dc56a07
4bb806c1d0bf3272195b99f22d2db381cfb844c6
/NewAR/Classes/Native/Bulk_UnityEngine.UIModule_0.cpp
afb0dd10b7c56f31c8c6a0bdfd6cad7ee530b642
[ "MIT" ]
permissive
RealityVirtually2019/Cadence
f2412e8e39572ebc2f7398048c11548f4a8697a5
23589e7c9fc545def7fa87da66ea842e3ea43aef
refs/heads/master
2020-04-17T08:57:03.699497
2019-01-21T14:17:45
2019-01-21T14:17:45
166,435,752
2
0
null
null
null
null
UTF-8
C++
false
false
215,199
cpp
#include "il2cpp-config.h" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <cstring> #include <string.h> #include <stdio.h> #include <cmath> #include <limits> #include <assert.h> #include <stdint.h> #include "il2cpp-class-internals.h" #include "codegen/il2cpp-codegen.h" #include "il2cpp-object-internals.h" struct VirtActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (Il2CppMethodSlot slot, RuntimeObject* obj) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_virtual_invoke_data(slot, obj); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; struct GenericVirtActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj) { VirtualInvokeData invokeData; il2cpp_codegen_get_generic_virtual_invoke_data(method, obj, &invokeData); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; struct InterfaceActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (Il2CppMethodSlot slot, RuntimeClass* declaringInterface, RuntimeObject* obj) { const VirtualInvokeData& invokeData = il2cpp_codegen_get_interface_invoke_data(slot, obj, declaringInterface); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; struct GenericInterfaceActionInvoker0 { typedef void (*Action)(void*, const RuntimeMethod*); static inline void Invoke (const RuntimeMethod* method, RuntimeObject* obj) { VirtualInvokeData invokeData; il2cpp_codegen_get_generic_interface_invoke_data(method, obj, &invokeData); ((Action)invokeData.methodPtr)(obj, invokeData.method); } }; // System.AsyncCallback struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4; // System.Char[] struct CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2; // System.Collections.Generic.List`1<System.Int32> struct List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226; // System.Collections.Generic.List`1<UnityEngine.Color32> struct List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5; // System.Collections.Generic.List`1<UnityEngine.UIVertex> struct List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554; // System.Collections.Generic.List`1<UnityEngine.Vector2> struct List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB; // System.Collections.Generic.List`1<UnityEngine.Vector3> struct List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5; // System.Collections.Generic.List`1<UnityEngine.Vector4> struct List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955; // System.Delegate struct Delegate_t; // System.DelegateData struct DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE; // System.Delegate[] struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86; // System.IAsyncResult struct IAsyncResult_t8E194308510B375B42432981AE5E7488C458D598; // System.Int32[] struct Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83; // System.Reflection.MethodInfo struct MethodInfo_t; // System.String struct String_t; // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017; // UnityEngine.Behaviour struct Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8; // UnityEngine.Camera struct Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34; // UnityEngine.Camera/CameraCallback struct CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0; // UnityEngine.Canvas struct Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591; // UnityEngine.Canvas/WillRenderCanvases struct WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE; // UnityEngine.CanvasGroup struct CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90; // UnityEngine.CanvasRenderer struct CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72; // UnityEngine.Color32[] struct Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983; // UnityEngine.Material struct Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598; // UnityEngine.Mesh struct Mesh_t6106B8D8E4C691321581AB0445552EC78B947B8C; // UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0; // UnityEngine.RectTransform struct RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20; // UnityEngine.RectTransform/ReapplyDrivenProperties struct ReapplyDrivenProperties_t431F4FBD9C59AE097FE33C4354CC6251B01B527D; // UnityEngine.Texture struct Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4; // UnityEngine.Transform struct Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA; // UnityEngine.UIVertex[] struct UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A; // UnityEngine.Vector2[] struct Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6; // UnityEngine.Vector3[] struct Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28; // UnityEngine.Vector4[] struct Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66; extern RuntimeClass* Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var; extern RuntimeClass* Math_tFB388E53C7FDC6FCCF9A19ABF5A4E521FBD52E19_il2cpp_TypeInfo_var; extern RuntimeClass* Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var; extern RuntimeClass* Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_il2cpp_TypeInfo_var; extern RuntimeClass* RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var; extern RuntimeClass* RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20_il2cpp_TypeInfo_var; extern RuntimeClass* Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var; extern RuntimeClass* Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28_il2cpp_TypeInfo_var; extern RuntimeClass* Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_il2cpp_TypeInfo_var; extern RuntimeClass* WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE_il2cpp_TypeInfo_var; extern const uint32_t CanvasRenderer_SetMaterial_mD407C670DBA743283F32581586B5DD51272B08C7_MetadataUsageId; extern const uint32_t Canvas_SendWillRenderCanvases_mD38081FE3172AC7A884B8ED459E90633167B2D10_MetadataUsageId; extern const uint32_t Canvas_add_willRenderCanvases_mACABFF4EAFB7DCFF4B9A33357D496EC3010D7E6B_MetadataUsageId; extern const uint32_t Canvas_remove_willRenderCanvases_m9A5F0E946B4549D576EDAD5618FEA2D532377831_MetadataUsageId; extern const uint32_t RectTransformUtility_FlipLayoutAxes_mF5D9BF9F0EACBC972A22C937FD21B610410EB956_MetadataUsageId; extern const uint32_t RectTransformUtility_FlipLayoutOnAxis_mFECCA330C80845D0B75829C7DD242688911006AE_MetadataUsageId; extern const uint32_t RectTransformUtility_PixelAdjustPoint_m9B5E7F4F2EB55A49670316CBE4D8923154054573_MetadataUsageId; extern const uint32_t RectTransformUtility_PixelAdjustRect_m320399756E1AD411CFECB3E11867806E73A0DE49_MetadataUsageId; extern const uint32_t RectTransformUtility_PointInRectangle_m31A8C0A3CFCC0B584A33C3A3F2692EF09D303CEE_MetadataUsageId; extern const uint32_t RectTransformUtility_RectangleContainsScreenPoint_mDED32A2F3CD5C623FBA3FFE2C49AEB861D33DE14_MetadataUsageId; extern const uint32_t RectTransformUtility_ScreenPointToLocalPointInRectangle_m2C389D4DCBB3CADB51A793702F13DF7CE837E153_MetadataUsageId; extern const uint32_t RectTransformUtility_ScreenPointToRay_mB74CED011944E1E7CE3A24C433B9B660C5BADC73_MetadataUsageId; extern const uint32_t RectTransformUtility_ScreenPointToWorldPointInRectangle_m821FF925C5B70477F153B4C053AE9E36A04A774F_MetadataUsageId; extern const uint32_t RectTransformUtility__cctor_m1DCF0D49797698D7D4FBF3EF83B5DEC9A5F42851_MetadataUsageId; struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86; struct Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28; #ifndef U3CMODULEU3E_T79D7DE725655CFC1B063EA359E8D75692CF5DC2F_H #define U3CMODULEU3E_T79D7DE725655CFC1B063EA359E8D75692CF5DC2F_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <Module> struct U3CModuleU3E_t79D7DE725655CFC1B063EA359E8D75692CF5DC2F { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // U3CMODULEU3E_T79D7DE725655CFC1B063EA359E8D75692CF5DC2F_H #ifndef RUNTIMEOBJECT_H #define RUNTIMEOBJECT_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Object #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEOBJECT_H struct Il2CppArrayBounds; #ifndef RUNTIMEARRAY_H #define RUNTIMEARRAY_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Array #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RUNTIMEARRAY_H #ifndef LIST_1_TE1526161A558A17A39A8B69D8EEF3801393B6226_H #define LIST_1_TE1526161A558A17A39A8B69D8EEF3801393B6226_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<System.Int32> struct List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226, ____items_1)); } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get__items_1() const { return ____items_1; } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of__items_1() { return &____items_1; } inline void set__items_1(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226_StaticFields, ____emptyArray_5)); } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* get__emptyArray_5() const { return ____emptyArray_5; } inline Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(Int32U5BU5D_t2B9E4FDDDB9F0A00EC0AC631BA2DA915EB1ECF83* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_TE1526161A558A17A39A8B69D8EEF3801393B6226_H #ifndef LIST_1_T749ADA5233D9B421293A000DCB83608A24C3D5D5_H #define LIST_1_T749ADA5233D9B421293A000DCB83608A24C3D5D5_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.Color32> struct List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5, ____items_1)); } inline Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983* get__items_1() const { return ____items_1; } inline Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983** get_address_of__items_1() { return &____items_1; } inline void set__items_1(Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5_StaticFields, ____emptyArray_5)); } inline Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983* get__emptyArray_5() const { return ____emptyArray_5; } inline Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(Color32U5BU5D_tABFBCB467E6D1B791303A0D3A3AA1A482F620983* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_T749ADA5233D9B421293A000DCB83608A24C3D5D5_H #ifndef LIST_1_T4CE16E1B496C9FE941554BB47727DFDD7C3D9554_H #define LIST_1_T4CE16E1B496C9FE941554BB47727DFDD7C3D9554_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.UIVertex> struct List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____items_1)); } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* get__items_1() const { return ____items_1; } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A** get_address_of__items_1() { return &____items_1; } inline void set__items_1(UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554_StaticFields, ____emptyArray_5)); } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* get__emptyArray_5() const { return ____emptyArray_5; } inline UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(UIVertexU5BU5D_tB560F9F9269864891FCE1677971F603A08AA857A* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_T4CE16E1B496C9FE941554BB47727DFDD7C3D9554_H #ifndef LIST_1_T0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB_H #define LIST_1_T0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.Vector2> struct List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB, ____items_1)); } inline Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6* get__items_1() const { return ____items_1; } inline Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6** get_address_of__items_1() { return &____items_1; } inline void set__items_1(Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB_StaticFields, ____emptyArray_5)); } inline Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6* get__emptyArray_5() const { return ____emptyArray_5; } inline Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(Vector2U5BU5D_tA065A07DFC060C1B8786BBAA5F3A6577CCEB27D6* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_T0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB_H #ifndef LIST_1_TFCCBEDAA56D8F7598520FB136A9F8D713033D6B5_H #define LIST_1_TFCCBEDAA56D8F7598520FB136A9F8D713033D6B5_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.Vector3> struct List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5, ____items_1)); } inline Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* get__items_1() const { return ____items_1; } inline Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28** get_address_of__items_1() { return &____items_1; } inline void set__items_1(Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5_StaticFields, ____emptyArray_5)); } inline Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* get__emptyArray_5() const { return ____emptyArray_5; } inline Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_TFCCBEDAA56D8F7598520FB136A9F8D713033D6B5_H #ifndef LIST_1_TFF4005B40E5BA433006DA11C56DB086B1E2FC955_H #define LIST_1_TFF4005B40E5BA433006DA11C56DB086B1E2FC955_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Collections.Generic.List`1<UnityEngine.Vector4> struct List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 : public RuntimeObject { public: // T[] System.Collections.Generic.List`1::_items Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66* ____items_1; // System.Int32 System.Collections.Generic.List`1::_size int32_t ____size_2; // System.Int32 System.Collections.Generic.List`1::_version int32_t ____version_3; // System.Object System.Collections.Generic.List`1::_syncRoot RuntimeObject * ____syncRoot_4; public: inline static int32_t get_offset_of__items_1() { return static_cast<int32_t>(offsetof(List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955, ____items_1)); } inline Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66* get__items_1() const { return ____items_1; } inline Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66** get_address_of__items_1() { return &____items_1; } inline void set__items_1(Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66* value) { ____items_1 = value; Il2CppCodeGenWriteBarrier((&____items_1), value); } inline static int32_t get_offset_of__size_2() { return static_cast<int32_t>(offsetof(List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955, ____size_2)); } inline int32_t get__size_2() const { return ____size_2; } inline int32_t* get_address_of__size_2() { return &____size_2; } inline void set__size_2(int32_t value) { ____size_2 = value; } inline static int32_t get_offset_of__version_3() { return static_cast<int32_t>(offsetof(List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955, ____version_3)); } inline int32_t get__version_3() const { return ____version_3; } inline int32_t* get_address_of__version_3() { return &____version_3; } inline void set__version_3(int32_t value) { ____version_3 = value; } inline static int32_t get_offset_of__syncRoot_4() { return static_cast<int32_t>(offsetof(List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955, ____syncRoot_4)); } inline RuntimeObject * get__syncRoot_4() const { return ____syncRoot_4; } inline RuntimeObject ** get_address_of__syncRoot_4() { return &____syncRoot_4; } inline void set__syncRoot_4(RuntimeObject * value) { ____syncRoot_4 = value; Il2CppCodeGenWriteBarrier((&____syncRoot_4), value); } }; struct List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955_StaticFields { public: // T[] System.Collections.Generic.List`1::_emptyArray Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66* ____emptyArray_5; public: inline static int32_t get_offset_of__emptyArray_5() { return static_cast<int32_t>(offsetof(List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955_StaticFields, ____emptyArray_5)); } inline Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66* get__emptyArray_5() const { return ____emptyArray_5; } inline Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66** get_address_of__emptyArray_5() { return &____emptyArray_5; } inline void set__emptyArray_5(Vector4U5BU5D_t51402C154FFFCF7217A9BEC4B834F0B726C10F66* value) { ____emptyArray_5 = value; Il2CppCodeGenWriteBarrier((&____emptyArray_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // LIST_1_TFF4005B40E5BA433006DA11C56DB086B1E2FC955_H #ifndef STRING_T_H #define STRING_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.String struct String_t : public RuntimeObject { public: // System.Int32 System.String::m_stringLength int32_t ___m_stringLength_0; // System.Char System.String::m_firstChar Il2CppChar ___m_firstChar_1; public: inline static int32_t get_offset_of_m_stringLength_0() { return static_cast<int32_t>(offsetof(String_t, ___m_stringLength_0)); } inline int32_t get_m_stringLength_0() const { return ___m_stringLength_0; } inline int32_t* get_address_of_m_stringLength_0() { return &___m_stringLength_0; } inline void set_m_stringLength_0(int32_t value) { ___m_stringLength_0 = value; } inline static int32_t get_offset_of_m_firstChar_1() { return static_cast<int32_t>(offsetof(String_t, ___m_firstChar_1)); } inline Il2CppChar get_m_firstChar_1() const { return ___m_firstChar_1; } inline Il2CppChar* get_address_of_m_firstChar_1() { return &___m_firstChar_1; } inline void set_m_firstChar_1(Il2CppChar value) { ___m_firstChar_1 = value; } }; struct String_t_StaticFields { public: // System.String System.String::Empty String_t* ___Empty_5; public: inline static int32_t get_offset_of_Empty_5() { return static_cast<int32_t>(offsetof(String_t_StaticFields, ___Empty_5)); } inline String_t* get_Empty_5() const { return ___Empty_5; } inline String_t** get_address_of_Empty_5() { return &___Empty_5; } inline void set_Empty_5(String_t* value) { ___Empty_5 = value; Il2CppCodeGenWriteBarrier((&___Empty_5), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // STRING_T_H #ifndef VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #define VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_marshaled_com { }; #endif // VALUETYPE_T4D0C27076F7C36E76190FB3328E232BCB1CD1FFF_H #ifndef RECTTRANSFORMUTILITY_T9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_H #define RECTTRANSFORMUTILITY_T9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.RectTransformUtility struct RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA : public RuntimeObject { public: public: }; struct RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_StaticFields { public: // UnityEngine.Vector3[] UnityEngine.RectTransformUtility::s_Corners Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* ___s_Corners_0; public: inline static int32_t get_offset_of_s_Corners_0() { return static_cast<int32_t>(offsetof(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_StaticFields, ___s_Corners_0)); } inline Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* get_s_Corners_0() const { return ___s_Corners_0; } inline Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28** get_address_of_s_Corners_0() { return &___s_Corners_0; } inline void set_s_Corners_0(Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* value) { ___s_Corners_0 = value; Il2CppCodeGenWriteBarrier((&___s_Corners_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RECTTRANSFORMUTILITY_T9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_H #ifndef UISYSTEMPROFILERAPI_TD33E558B2D0176096E5DB375956ACA9F03678F1B_H #define UISYSTEMPROFILERAPI_TD33E558B2D0176096E5DB375956ACA9F03678F1B_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.UISystemProfilerApi struct UISystemProfilerApi_tD33E558B2D0176096E5DB375956ACA9F03678F1B : public RuntimeObject { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // UISYSTEMPROFILERAPI_TD33E558B2D0176096E5DB375956ACA9F03678F1B_H #ifndef BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #define BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Boolean struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C { public: // System.Boolean System.Boolean::m_value bool ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C, ___m_value_0)); } inline bool get_m_value_0() const { return ___m_value_0; } inline bool* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(bool value) { ___m_value_0 = value; } }; struct Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields { public: // System.String System.Boolean::TrueString String_t* ___TrueString_5; // System.String System.Boolean::FalseString String_t* ___FalseString_6; public: inline static int32_t get_offset_of_TrueString_5() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___TrueString_5)); } inline String_t* get_TrueString_5() const { return ___TrueString_5; } inline String_t** get_address_of_TrueString_5() { return &___TrueString_5; } inline void set_TrueString_5(String_t* value) { ___TrueString_5 = value; Il2CppCodeGenWriteBarrier((&___TrueString_5), value); } inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_tB53F6830F670160873277339AA58F15CAED4399C_StaticFields, ___FalseString_6)); } inline String_t* get_FalseString_6() const { return ___FalseString_6; } inline String_t** get_address_of_FalseString_6() { return &___FalseString_6; } inline void set_FalseString_6(String_t* value) { ___FalseString_6 = value; Il2CppCodeGenWriteBarrier((&___FalseString_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BOOLEAN_TB53F6830F670160873277339AA58F15CAED4399C_H #ifndef ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #define ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521 : public ValueType_t4D0C27076F7C36E76190FB3328E232BCB1CD1FFF { public: public: }; struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields { public: // System.Char[] System.Enum::enumSeperatorCharArray CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* ___enumSeperatorCharArray_0; public: inline static int32_t get_offset_of_enumSeperatorCharArray_0() { return static_cast<int32_t>(offsetof(Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_StaticFields, ___enumSeperatorCharArray_0)); } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* get_enumSeperatorCharArray_0() const { return ___enumSeperatorCharArray_0; } inline CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2** get_address_of_enumSeperatorCharArray_0() { return &___enumSeperatorCharArray_0; } inline void set_enumSeperatorCharArray_0(CharU5BU5D_t4CC6ABF0AD71BEC97E3C2F1E9C5677E46D3A75C2* value) { ___enumSeperatorCharArray_0 = value; Il2CppCodeGenWriteBarrier((&___enumSeperatorCharArray_0), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_pinvoke { }; // Native definition for COM marshalling of System.Enum struct Enum_t2AF27C02B8653AE29442467390005ABC74D8F521_marshaled_com { }; #endif // ENUM_T2AF27C02B8653AE29442467390005ABC74D8F521_H #ifndef INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #define INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Int32 struct Int32_t585191389E07734F19F3156FF88FB3EF4800D102 { public: // System.Int32 System.Int32::m_value int32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Int32_t585191389E07734F19F3156FF88FB3EF4800D102, ___m_value_0)); } inline int32_t get_m_value_0() const { return ___m_value_0; } inline int32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(int32_t value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INT32_T585191389E07734F19F3156FF88FB3EF4800D102_H #ifndef INTPTR_T_H #define INTPTR_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.IntPtr struct IntPtr_t { public: // System.Void* System.IntPtr::m_value void* ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); } inline void* get_m_value_0() const { return ___m_value_0; } inline void** get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(void* value) { ___m_value_0 = value; } }; struct IntPtr_t_StaticFields { public: // System.IntPtr System.IntPtr::Zero intptr_t ___Zero_1; public: inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); } inline intptr_t get_Zero_1() const { return ___Zero_1; } inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; } inline void set_Zero_1(intptr_t value) { ___Zero_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // INTPTR_T_H #ifndef SINGLE_TDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1_H #define SINGLE_TDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Single struct Single_tDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1 { public: // System.Single System.Single::m_value float ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Single_tDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1, ___m_value_0)); } inline float get_m_value_0() const { return ___m_value_0; } inline float* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(float value) { ___m_value_0 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SINGLE_TDDDA9169C4E4E308AC6D7A824F9B28DC82204AE1_H #ifndef VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #define VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void struct Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017 { public: union { struct { }; uint8_t Void_t22962CB4C05B1D89B55A6E1139F0E87A90987017__padding[1]; }; public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VOID_T22962CB4C05B1D89B55A6E1139F0E87A90987017_H #ifndef COLOR_T119BCA590009762C7223FDD3AF9706653AC84ED2_H #define COLOR_T119BCA590009762C7223FDD3AF9706653AC84ED2_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Color struct Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 { public: // System.Single UnityEngine.Color::r float ___r_0; // System.Single UnityEngine.Color::g float ___g_1; // System.Single UnityEngine.Color::b float ___b_2; // System.Single UnityEngine.Color::a float ___a_3; public: inline static int32_t get_offset_of_r_0() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___r_0)); } inline float get_r_0() const { return ___r_0; } inline float* get_address_of_r_0() { return &___r_0; } inline void set_r_0(float value) { ___r_0 = value; } inline static int32_t get_offset_of_g_1() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___g_1)); } inline float get_g_1() const { return ___g_1; } inline float* get_address_of_g_1() { return &___g_1; } inline void set_g_1(float value) { ___g_1 = value; } inline static int32_t get_offset_of_b_2() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___b_2)); } inline float get_b_2() const { return ___b_2; } inline float* get_address_of_b_2() { return &___b_2; } inline void set_b_2(float value) { ___b_2 = value; } inline static int32_t get_offset_of_a_3() { return static_cast<int32_t>(offsetof(Color_t119BCA590009762C7223FDD3AF9706653AC84ED2, ___a_3)); } inline float get_a_3() const { return ___a_3; } inline float* get_address_of_a_3() { return &___a_3; } inline void set_a_3(float value) { ___a_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COLOR_T119BCA590009762C7223FDD3AF9706653AC84ED2_H #ifndef QUATERNION_T319F3319A7D43FFA5D819AD6C0A98851F0095357_H #define QUATERNION_T319F3319A7D43FFA5D819AD6C0A98851F0095357_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Quaternion struct Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 { public: // System.Single UnityEngine.Quaternion::x float ___x_0; // System.Single UnityEngine.Quaternion::y float ___y_1; // System.Single UnityEngine.Quaternion::z float ___z_2; // System.Single UnityEngine.Quaternion::w float ___w_3; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___x_0)); } inline float get_x_0() const { return ___x_0; } inline float* get_address_of_x_0() { return &___x_0; } inline void set_x_0(float value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___y_1)); } inline float get_y_1() const { return ___y_1; } inline float* get_address_of_y_1() { return &___y_1; } inline void set_y_1(float value) { ___y_1 = value; } inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___z_2)); } inline float get_z_2() const { return ___z_2; } inline float* get_address_of_z_2() { return &___z_2; } inline void set_z_2(float value) { ___z_2 = value; } inline static int32_t get_offset_of_w_3() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357, ___w_3)); } inline float get_w_3() const { return ___w_3; } inline float* get_address_of_w_3() { return &___w_3; } inline void set_w_3(float value) { ___w_3 = value; } }; struct Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_StaticFields { public: // UnityEngine.Quaternion UnityEngine.Quaternion::identityQuaternion Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 ___identityQuaternion_4; public: inline static int32_t get_offset_of_identityQuaternion_4() { return static_cast<int32_t>(offsetof(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_StaticFields, ___identityQuaternion_4)); } inline Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 get_identityQuaternion_4() const { return ___identityQuaternion_4; } inline Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 * get_address_of_identityQuaternion_4() { return &___identityQuaternion_4; } inline void set_identityQuaternion_4(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 value) { ___identityQuaternion_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // QUATERNION_T319F3319A7D43FFA5D819AD6C0A98851F0095357_H #ifndef RECT_T35B976DE901B5423C11705E156938EA27AB402CE_H #define RECT_T35B976DE901B5423C11705E156938EA27AB402CE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Rect struct Rect_t35B976DE901B5423C11705E156938EA27AB402CE { public: // System.Single UnityEngine.Rect::m_XMin float ___m_XMin_0; // System.Single UnityEngine.Rect::m_YMin float ___m_YMin_1; // System.Single UnityEngine.Rect::m_Width float ___m_Width_2; // System.Single UnityEngine.Rect::m_Height float ___m_Height_3; public: inline static int32_t get_offset_of_m_XMin_0() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_XMin_0)); } inline float get_m_XMin_0() const { return ___m_XMin_0; } inline float* get_address_of_m_XMin_0() { return &___m_XMin_0; } inline void set_m_XMin_0(float value) { ___m_XMin_0 = value; } inline static int32_t get_offset_of_m_YMin_1() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_YMin_1)); } inline float get_m_YMin_1() const { return ___m_YMin_1; } inline float* get_address_of_m_YMin_1() { return &___m_YMin_1; } inline void set_m_YMin_1(float value) { ___m_YMin_1 = value; } inline static int32_t get_offset_of_m_Width_2() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_Width_2)); } inline float get_m_Width_2() const { return ___m_Width_2; } inline float* get_address_of_m_Width_2() { return &___m_Width_2; } inline void set_m_Width_2(float value) { ___m_Width_2 = value; } inline static int32_t get_offset_of_m_Height_3() { return static_cast<int32_t>(offsetof(Rect_t35B976DE901B5423C11705E156938EA27AB402CE, ___m_Height_3)); } inline float get_m_Height_3() const { return ___m_Height_3; } inline float* get_address_of_m_Height_3() { return &___m_Height_3; } inline void set_m_Height_3(float value) { ___m_Height_3 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RECT_T35B976DE901B5423C11705E156938EA27AB402CE_H #ifndef VECTOR2_TA85D2DD88578276CA8A8796756458277E72D073D_H #define VECTOR2_TA85D2DD88578276CA8A8796756458277E72D073D_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Vector2 struct Vector2_tA85D2DD88578276CA8A8796756458277E72D073D { public: // System.Single UnityEngine.Vector2::x float ___x_0; // System.Single UnityEngine.Vector2::y float ___y_1; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D, ___x_0)); } inline float get_x_0() const { return ___x_0; } inline float* get_address_of_x_0() { return &___x_0; } inline void set_x_0(float value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D, ___y_1)); } inline float get_y_1() const { return ___y_1; } inline float* get_address_of_y_1() { return &___y_1; } inline void set_y_1(float value) { ___y_1 = value; } }; struct Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields { public: // UnityEngine.Vector2 UnityEngine.Vector2::zeroVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___zeroVector_2; // UnityEngine.Vector2 UnityEngine.Vector2::oneVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___oneVector_3; // UnityEngine.Vector2 UnityEngine.Vector2::upVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___upVector_4; // UnityEngine.Vector2 UnityEngine.Vector2::downVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___downVector_5; // UnityEngine.Vector2 UnityEngine.Vector2::leftVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___leftVector_6; // UnityEngine.Vector2 UnityEngine.Vector2::rightVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___rightVector_7; // UnityEngine.Vector2 UnityEngine.Vector2::positiveInfinityVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___positiveInfinityVector_8; // UnityEngine.Vector2 UnityEngine.Vector2::negativeInfinityVector Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___negativeInfinityVector_9; public: inline static int32_t get_offset_of_zeroVector_2() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___zeroVector_2)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_zeroVector_2() const { return ___zeroVector_2; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_zeroVector_2() { return &___zeroVector_2; } inline void set_zeroVector_2(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___zeroVector_2 = value; } inline static int32_t get_offset_of_oneVector_3() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___oneVector_3)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_oneVector_3() const { return ___oneVector_3; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_oneVector_3() { return &___oneVector_3; } inline void set_oneVector_3(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___oneVector_3 = value; } inline static int32_t get_offset_of_upVector_4() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___upVector_4)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_upVector_4() const { return ___upVector_4; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_upVector_4() { return &___upVector_4; } inline void set_upVector_4(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___upVector_4 = value; } inline static int32_t get_offset_of_downVector_5() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___downVector_5)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_downVector_5() const { return ___downVector_5; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_downVector_5() { return &___downVector_5; } inline void set_downVector_5(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___downVector_5 = value; } inline static int32_t get_offset_of_leftVector_6() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___leftVector_6)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_leftVector_6() const { return ___leftVector_6; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_leftVector_6() { return &___leftVector_6; } inline void set_leftVector_6(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___leftVector_6 = value; } inline static int32_t get_offset_of_rightVector_7() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___rightVector_7)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_rightVector_7() const { return ___rightVector_7; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_rightVector_7() { return &___rightVector_7; } inline void set_rightVector_7(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___rightVector_7 = value; } inline static int32_t get_offset_of_positiveInfinityVector_8() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___positiveInfinityVector_8)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_positiveInfinityVector_8() const { return ___positiveInfinityVector_8; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_positiveInfinityVector_8() { return &___positiveInfinityVector_8; } inline void set_positiveInfinityVector_8(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___positiveInfinityVector_8 = value; } inline static int32_t get_offset_of_negativeInfinityVector_9() { return static_cast<int32_t>(offsetof(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_StaticFields, ___negativeInfinityVector_9)); } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D get_negativeInfinityVector_9() const { return ___negativeInfinityVector_9; } inline Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * get_address_of_negativeInfinityVector_9() { return &___negativeInfinityVector_9; } inline void set_negativeInfinityVector_9(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D value) { ___negativeInfinityVector_9 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VECTOR2_TA85D2DD88578276CA8A8796756458277E72D073D_H #ifndef VECTOR3_TDCF05E21F632FE2BA260C06E0D10CA81513E6720_H #define VECTOR3_TDCF05E21F632FE2BA260C06E0D10CA81513E6720_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Vector3 struct Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 { public: // System.Single UnityEngine.Vector3::x float ___x_2; // System.Single UnityEngine.Vector3::y float ___y_3; // System.Single UnityEngine.Vector3::z float ___z_4; public: inline static int32_t get_offset_of_x_2() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___x_2)); } inline float get_x_2() const { return ___x_2; } inline float* get_address_of_x_2() { return &___x_2; } inline void set_x_2(float value) { ___x_2 = value; } inline static int32_t get_offset_of_y_3() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___y_3)); } inline float get_y_3() const { return ___y_3; } inline float* get_address_of_y_3() { return &___y_3; } inline void set_y_3(float value) { ___y_3 = value; } inline static int32_t get_offset_of_z_4() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720, ___z_4)); } inline float get_z_4() const { return ___z_4; } inline float* get_address_of_z_4() { return &___z_4; } inline void set_z_4(float value) { ___z_4 = value; } }; struct Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields { public: // UnityEngine.Vector3 UnityEngine.Vector3::zeroVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___zeroVector_5; // UnityEngine.Vector3 UnityEngine.Vector3::oneVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___oneVector_6; // UnityEngine.Vector3 UnityEngine.Vector3::upVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___upVector_7; // UnityEngine.Vector3 UnityEngine.Vector3::downVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___downVector_8; // UnityEngine.Vector3 UnityEngine.Vector3::leftVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___leftVector_9; // UnityEngine.Vector3 UnityEngine.Vector3::rightVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___rightVector_10; // UnityEngine.Vector3 UnityEngine.Vector3::forwardVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___forwardVector_11; // UnityEngine.Vector3 UnityEngine.Vector3::backVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___backVector_12; // UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___positiveInfinityVector_13; // UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___negativeInfinityVector_14; public: inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___zeroVector_5)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_zeroVector_5() const { return ___zeroVector_5; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_zeroVector_5() { return &___zeroVector_5; } inline void set_zeroVector_5(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___zeroVector_5 = value; } inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___oneVector_6)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_oneVector_6() const { return ___oneVector_6; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_oneVector_6() { return &___oneVector_6; } inline void set_oneVector_6(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___oneVector_6 = value; } inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___upVector_7)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_upVector_7() const { return ___upVector_7; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_upVector_7() { return &___upVector_7; } inline void set_upVector_7(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___upVector_7 = value; } inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___downVector_8)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_downVector_8() const { return ___downVector_8; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_downVector_8() { return &___downVector_8; } inline void set_downVector_8(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___downVector_8 = value; } inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___leftVector_9)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_leftVector_9() const { return ___leftVector_9; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_leftVector_9() { return &___leftVector_9; } inline void set_leftVector_9(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___leftVector_9 = value; } inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___rightVector_10)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_rightVector_10() const { return ___rightVector_10; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_rightVector_10() { return &___rightVector_10; } inline void set_rightVector_10(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___rightVector_10 = value; } inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___forwardVector_11)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_forwardVector_11() const { return ___forwardVector_11; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_forwardVector_11() { return &___forwardVector_11; } inline void set_forwardVector_11(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___forwardVector_11 = value; } inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___backVector_12)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_backVector_12() const { return ___backVector_12; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_backVector_12() { return &___backVector_12; } inline void set_backVector_12(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___backVector_12 = value; } inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___positiveInfinityVector_13)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; } inline void set_positiveInfinityVector_13(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___positiveInfinityVector_13 = value; } inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_StaticFields, ___negativeInfinityVector_14)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; } inline void set_negativeInfinityVector_14(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___negativeInfinityVector_14 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // VECTOR3_TDCF05E21F632FE2BA260C06E0D10CA81513E6720_H #ifndef DELEGATE_T_H #define DELEGATE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Delegate struct Delegate_t : public RuntimeObject { public: // System.IntPtr System.Delegate::method_ptr Il2CppMethodPointer ___method_ptr_0; // System.IntPtr System.Delegate::invoke_impl intptr_t ___invoke_impl_1; // System.Object System.Delegate::m_target RuntimeObject * ___m_target_2; // System.IntPtr System.Delegate::method intptr_t ___method_3; // System.IntPtr System.Delegate::delegate_trampoline intptr_t ___delegate_trampoline_4; // System.IntPtr System.Delegate::extra_arg intptr_t ___extra_arg_5; // System.IntPtr System.Delegate::method_code intptr_t ___method_code_6; // System.Reflection.MethodInfo System.Delegate::method_info MethodInfo_t * ___method_info_7; // System.Reflection.MethodInfo System.Delegate::original_method_info MethodInfo_t * ___original_method_info_8; // System.DelegateData System.Delegate::data DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; // System.Boolean System.Delegate::method_is_virtual bool ___method_is_virtual_10; public: inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_ptr_0)); } inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; } inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; } inline void set_method_ptr_0(Il2CppMethodPointer value) { ___method_ptr_0 = value; } inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t, ___invoke_impl_1)); } inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; } inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; } inline void set_invoke_impl_1(intptr_t value) { ___invoke_impl_1 = value; } inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t, ___m_target_2)); } inline RuntimeObject * get_m_target_2() const { return ___m_target_2; } inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; } inline void set_m_target_2(RuntimeObject * value) { ___m_target_2 = value; Il2CppCodeGenWriteBarrier((&___m_target_2), value); } inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_3)); } inline intptr_t get_method_3() const { return ___method_3; } inline intptr_t* get_address_of_method_3() { return &___method_3; } inline void set_method_3(intptr_t value) { ___method_3 = value; } inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t, ___delegate_trampoline_4)); } inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; } inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; } inline void set_delegate_trampoline_4(intptr_t value) { ___delegate_trampoline_4 = value; } inline static int32_t get_offset_of_extra_arg_5() { return static_cast<int32_t>(offsetof(Delegate_t, ___extra_arg_5)); } inline intptr_t get_extra_arg_5() const { return ___extra_arg_5; } inline intptr_t* get_address_of_extra_arg_5() { return &___extra_arg_5; } inline void set_extra_arg_5(intptr_t value) { ___extra_arg_5 = value; } inline static int32_t get_offset_of_method_code_6() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_code_6)); } inline intptr_t get_method_code_6() const { return ___method_code_6; } inline intptr_t* get_address_of_method_code_6() { return &___method_code_6; } inline void set_method_code_6(intptr_t value) { ___method_code_6 = value; } inline static int32_t get_offset_of_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_info_7)); } inline MethodInfo_t * get_method_info_7() const { return ___method_info_7; } inline MethodInfo_t ** get_address_of_method_info_7() { return &___method_info_7; } inline void set_method_info_7(MethodInfo_t * value) { ___method_info_7 = value; Il2CppCodeGenWriteBarrier((&___method_info_7), value); } inline static int32_t get_offset_of_original_method_info_8() { return static_cast<int32_t>(offsetof(Delegate_t, ___original_method_info_8)); } inline MethodInfo_t * get_original_method_info_8() const { return ___original_method_info_8; } inline MethodInfo_t ** get_address_of_original_method_info_8() { return &___original_method_info_8; } inline void set_original_method_info_8(MethodInfo_t * value) { ___original_method_info_8 = value; Il2CppCodeGenWriteBarrier((&___original_method_info_8), value); } inline static int32_t get_offset_of_data_9() { return static_cast<int32_t>(offsetof(Delegate_t, ___data_9)); } inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * get_data_9() const { return ___data_9; } inline DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE ** get_address_of_data_9() { return &___data_9; } inline void set_data_9(DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * value) { ___data_9 = value; Il2CppCodeGenWriteBarrier((&___data_9), value); } inline static int32_t get_offset_of_method_is_virtual_10() { return static_cast<int32_t>(offsetof(Delegate_t, ___method_is_virtual_10)); } inline bool get_method_is_virtual_10() const { return ___method_is_virtual_10; } inline bool* get_address_of_method_is_virtual_10() { return &___method_is_virtual_10; } inline void set_method_is_virtual_10(bool value) { ___method_is_virtual_10 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.Delegate struct Delegate_t_marshaled_pinvoke { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; int32_t ___method_is_virtual_10; }; // Native definition for COM marshalling of System.Delegate struct Delegate_t_marshaled_com { intptr_t ___method_ptr_0; intptr_t ___invoke_impl_1; Il2CppIUnknown* ___m_target_2; intptr_t ___method_3; intptr_t ___delegate_trampoline_4; intptr_t ___extra_arg_5; intptr_t ___method_code_6; MethodInfo_t * ___method_info_7; MethodInfo_t * ___original_method_info_8; DelegateData_t1BF9F691B56DAE5F8C28C5E084FDE94F15F27BBE * ___data_9; int32_t ___method_is_virtual_10; }; #endif // DELEGATE_T_H #ifndef OBJECT_TAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_H #define OBJECT_TAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 : public RuntimeObject { public: // System.IntPtr UnityEngine.Object::m_CachedPtr intptr_t ___m_CachedPtr_0; public: inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0, ___m_CachedPtr_0)); } inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; } inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; } inline void set_m_CachedPtr_0(intptr_t value) { ___m_CachedPtr_0 = value; } }; struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_StaticFields { public: // System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1; public: inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); } inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; } inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; } inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value) { ___OffsetOfInstanceIDInCPlusPlusObject_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_pinvoke { intptr_t ___m_CachedPtr_0; }; // Native definition for COM marshalling of UnityEngine.Object struct Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_marshaled_com { intptr_t ___m_CachedPtr_0; }; #endif // OBJECT_TAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_H #ifndef PLANE_T0903921088DEEDE1BCDEA5BF279EDBCFC9679AED_H #define PLANE_T0903921088DEEDE1BCDEA5BF279EDBCFC9679AED_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Plane struct Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED { public: // UnityEngine.Vector3 UnityEngine.Plane::m_Normal Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___m_Normal_0; // System.Single UnityEngine.Plane::m_Distance float ___m_Distance_1; public: inline static int32_t get_offset_of_m_Normal_0() { return static_cast<int32_t>(offsetof(Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED, ___m_Normal_0)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_m_Normal_0() const { return ___m_Normal_0; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_m_Normal_0() { return &___m_Normal_0; } inline void set_m_Normal_0(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___m_Normal_0 = value; } inline static int32_t get_offset_of_m_Distance_1() { return static_cast<int32_t>(offsetof(Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED, ___m_Distance_1)); } inline float get_m_Distance_1() const { return ___m_Distance_1; } inline float* get_address_of_m_Distance_1() { return &___m_Distance_1; } inline void set_m_Distance_1(float value) { ___m_Distance_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // PLANE_T0903921088DEEDE1BCDEA5BF279EDBCFC9679AED_H #ifndef RAY_TE2163D4CB3E6B267E29F8ABE41684490E4A614B2_H #define RAY_TE2163D4CB3E6B267E29F8ABE41684490E4A614B2_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Ray struct Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 { public: // UnityEngine.Vector3 UnityEngine.Ray::m_Origin Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___m_Origin_0; // UnityEngine.Vector3 UnityEngine.Ray::m_Direction Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 ___m_Direction_1; public: inline static int32_t get_offset_of_m_Origin_0() { return static_cast<int32_t>(offsetof(Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2, ___m_Origin_0)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_m_Origin_0() const { return ___m_Origin_0; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_m_Origin_0() { return &___m_Origin_0; } inline void set_m_Origin_0(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___m_Origin_0 = value; } inline static int32_t get_offset_of_m_Direction_1() { return static_cast<int32_t>(offsetof(Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2, ___m_Direction_1)); } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 get_m_Direction_1() const { return ___m_Direction_1; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * get_address_of_m_Direction_1() { return &___m_Direction_1; } inline void set_m_Direction_1(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { ___m_Direction_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RAY_TE2163D4CB3E6B267E29F8ABE41684490E4A614B2_H #ifndef RENDERMODE_TB54632E74CDC4A990E815EB8C3CC515D3A9E2F60_H #define RENDERMODE_TB54632E74CDC4A990E815EB8C3CC515D3A9E2F60_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.RenderMode struct RenderMode_tB54632E74CDC4A990E815EB8C3CC515D3A9E2F60 { public: // System.Int32 UnityEngine.RenderMode::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(RenderMode_tB54632E74CDC4A990E815EB8C3CC515D3A9E2F60, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RENDERMODE_TB54632E74CDC4A990E815EB8C3CC515D3A9E2F60_H #ifndef SAMPLETYPE_T2144AEAF3447ACAFCE1C13AF669F63192F8E75EC_H #define SAMPLETYPE_T2144AEAF3447ACAFCE1C13AF669F63192F8E75EC_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.UISystemProfilerApi/SampleType struct SampleType_t2144AEAF3447ACAFCE1C13AF669F63192F8E75EC { public: // System.Int32 UnityEngine.UISystemProfilerApi/SampleType::value__ int32_t ___value___2; public: inline static int32_t get_offset_of_value___2() { return static_cast<int32_t>(offsetof(SampleType_t2144AEAF3447ACAFCE1C13AF669F63192F8E75EC, ___value___2)); } inline int32_t get_value___2() const { return ___value___2; } inline int32_t* get_address_of_value___2() { return &___value___2; } inline void set_value___2(int32_t value) { ___value___2 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // SAMPLETYPE_T2144AEAF3447ACAFCE1C13AF669F63192F8E75EC_H #ifndef MULTICASTDELEGATE_T_H #define MULTICASTDELEGATE_T_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.MulticastDelegate struct MulticastDelegate_t : public Delegate_t { public: // System.Delegate[] System.MulticastDelegate::delegates DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* ___delegates_11; public: inline static int32_t get_offset_of_delegates_11() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___delegates_11)); } inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* get_delegates_11() const { return ___delegates_11; } inline DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86** get_address_of_delegates_11() { return &___delegates_11; } inline void set_delegates_11(DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* value) { ___delegates_11 = value; Il2CppCodeGenWriteBarrier((&___delegates_11), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // Native definition for P/Invoke marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_pinvoke : public Delegate_t_marshaled_pinvoke { DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* ___delegates_11; }; // Native definition for COM marshalling of System.MulticastDelegate struct MulticastDelegate_t_marshaled_com : public Delegate_t_marshaled_com { DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* ___delegates_11; }; #endif // MULTICASTDELEGATE_T_H #ifndef COMPONENT_T05064EF382ABCAF4B8C94F8A350EA85184C26621_H #define COMPONENT_T05064EF382ABCAF4B8C94F8A350EA85184C26621_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Component struct Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // COMPONENT_T05064EF382ABCAF4B8C94F8A350EA85184C26621_H #ifndef MATERIAL_TF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598_H #define MATERIAL_TF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Material struct Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MATERIAL_TF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598_H #ifndef MESH_T6106B8D8E4C691321581AB0445552EC78B947B8C_H #define MESH_T6106B8D8E4C691321581AB0445552EC78B947B8C_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Mesh struct Mesh_t6106B8D8E4C691321581AB0445552EC78B947B8C : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // MESH_T6106B8D8E4C691321581AB0445552EC78B947B8C_H #ifndef TEXTURE_T387FE83BB848001FD06B14707AEA6D5A0F6A95F4_H #define TEXTURE_T387FE83BB848001FD06B14707AEA6D5A0F6A95F4_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Texture struct Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 : public Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TEXTURE_T387FE83BB848001FD06B14707AEA6D5A0F6A95F4_H #ifndef ASYNCCALLBACK_T3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4_H #define ASYNCCALLBACK_T3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.AsyncCallback struct AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4 : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // ASYNCCALLBACK_T3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4_H #ifndef BEHAVIOUR_TBDC7E9C3C898AD8348891B82D3E345801D920CA8_H #define BEHAVIOUR_TBDC7E9C3C898AD8348891B82D3E345801D920CA8_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Behaviour struct Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8 : public Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // BEHAVIOUR_TBDC7E9C3C898AD8348891B82D3E345801D920CA8_H #ifndef WILLRENDERCANVASES_TBD5AD090B5938021DEAA679A5AEEA790F60A8BEE_H #define WILLRENDERCANVASES_TBD5AD090B5938021DEAA679A5AEEA790F60A8BEE_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Canvas/WillRenderCanvases struct WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE : public MulticastDelegate_t { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // WILLRENDERCANVASES_TBD5AD090B5938021DEAA679A5AEEA790F60A8BEE_H #ifndef CANVASRENDERER_TB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72_H #define CANVASRENDERER_TB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.CanvasRenderer struct CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 : public Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 { public: // System.Boolean UnityEngine.CanvasRenderer::<isMask>k__BackingField bool ___U3CisMaskU3Ek__BackingField_4; public: inline static int32_t get_offset_of_U3CisMaskU3Ek__BackingField_4() { return static_cast<int32_t>(offsetof(CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72, ___U3CisMaskU3Ek__BackingField_4)); } inline bool get_U3CisMaskU3Ek__BackingField_4() const { return ___U3CisMaskU3Ek__BackingField_4; } inline bool* get_address_of_U3CisMaskU3Ek__BackingField_4() { return &___U3CisMaskU3Ek__BackingField_4; } inline void set_U3CisMaskU3Ek__BackingField_4(bool value) { ___U3CisMaskU3Ek__BackingField_4 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CANVASRENDERER_TB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72_H #ifndef TRANSFORM_TBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA_H #define TRANSFORM_TBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Transform struct Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA : public Component_t05064EF382ABCAF4B8C94F8A350EA85184C26621 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // TRANSFORM_TBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA_H #ifndef CAMERA_T48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_H #define CAMERA_T48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Camera struct Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 : public Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8 { public: public: }; struct Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_StaticFields { public: // UnityEngine.Camera/CameraCallback UnityEngine.Camera::onPreCull CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * ___onPreCull_4; // UnityEngine.Camera/CameraCallback UnityEngine.Camera::onPreRender CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * ___onPreRender_5; // UnityEngine.Camera/CameraCallback UnityEngine.Camera::onPostRender CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * ___onPostRender_6; public: inline static int32_t get_offset_of_onPreCull_4() { return static_cast<int32_t>(offsetof(Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_StaticFields, ___onPreCull_4)); } inline CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * get_onPreCull_4() const { return ___onPreCull_4; } inline CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 ** get_address_of_onPreCull_4() { return &___onPreCull_4; } inline void set_onPreCull_4(CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * value) { ___onPreCull_4 = value; Il2CppCodeGenWriteBarrier((&___onPreCull_4), value); } inline static int32_t get_offset_of_onPreRender_5() { return static_cast<int32_t>(offsetof(Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_StaticFields, ___onPreRender_5)); } inline CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * get_onPreRender_5() const { return ___onPreRender_5; } inline CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 ** get_address_of_onPreRender_5() { return &___onPreRender_5; } inline void set_onPreRender_5(CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * value) { ___onPreRender_5 = value; Il2CppCodeGenWriteBarrier((&___onPreRender_5), value); } inline static int32_t get_offset_of_onPostRender_6() { return static_cast<int32_t>(offsetof(Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_StaticFields, ___onPostRender_6)); } inline CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * get_onPostRender_6() const { return ___onPostRender_6; } inline CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 ** get_address_of_onPostRender_6() { return &___onPostRender_6; } inline void set_onPostRender_6(CameraCallback_t8BBB42AA08D7498DFC11F4128117055BC7F0B9D0 * value) { ___onPostRender_6 = value; Il2CppCodeGenWriteBarrier((&___onPostRender_6), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CAMERA_T48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34_H #ifndef CANVAS_TBC28BF1DD8D8499A89B5781505833D3728CF8591_H #define CANVAS_TBC28BF1DD8D8499A89B5781505833D3728CF8591_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.Canvas struct Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 : public Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8 { public: public: }; struct Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields { public: // UnityEngine.Canvas/WillRenderCanvases UnityEngine.Canvas::willRenderCanvases WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * ___willRenderCanvases_4; public: inline static int32_t get_offset_of_willRenderCanvases_4() { return static_cast<int32_t>(offsetof(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields, ___willRenderCanvases_4)); } inline WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * get_willRenderCanvases_4() const { return ___willRenderCanvases_4; } inline WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE ** get_address_of_willRenderCanvases_4() { return &___willRenderCanvases_4; } inline void set_willRenderCanvases_4(WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * value) { ___willRenderCanvases_4 = value; Il2CppCodeGenWriteBarrier((&___willRenderCanvases_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CANVAS_TBC28BF1DD8D8499A89B5781505833D3728CF8591_H #ifndef CANVASGROUP_TE2C664C60990D1DCCEE0CC6545CC3E80369C7F90_H #define CANVASGROUP_TE2C664C60990D1DCCEE0CC6545CC3E80369C7F90_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.CanvasGroup struct CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 : public Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8 { public: public: }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // CANVASGROUP_TE2C664C60990D1DCCEE0CC6545CC3E80369C7F90_H #ifndef RECTTRANSFORM_T285CBD8775B25174B75164F10618F8B9728E1B20_H #define RECTTRANSFORM_T285CBD8775B25174B75164F10618F8B9728E1B20_H #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // UnityEngine.RectTransform struct RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 : public Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA { public: public: }; struct RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20_StaticFields { public: // UnityEngine.RectTransform/ReapplyDrivenProperties UnityEngine.RectTransform::reapplyDrivenProperties ReapplyDrivenProperties_t431F4FBD9C59AE097FE33C4354CC6251B01B527D * ___reapplyDrivenProperties_4; public: inline static int32_t get_offset_of_reapplyDrivenProperties_4() { return static_cast<int32_t>(offsetof(RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20_StaticFields, ___reapplyDrivenProperties_4)); } inline ReapplyDrivenProperties_t431F4FBD9C59AE097FE33C4354CC6251B01B527D * get_reapplyDrivenProperties_4() const { return ___reapplyDrivenProperties_4; } inline ReapplyDrivenProperties_t431F4FBD9C59AE097FE33C4354CC6251B01B527D ** get_address_of_reapplyDrivenProperties_4() { return &___reapplyDrivenProperties_4; } inline void set_reapplyDrivenProperties_4(ReapplyDrivenProperties_t431F4FBD9C59AE097FE33C4354CC6251B01B527D * value) { ___reapplyDrivenProperties_4 = value; Il2CppCodeGenWriteBarrier((&___reapplyDrivenProperties_4), value); } }; #ifdef __clang__ #pragma clang diagnostic pop #endif #endif // RECTTRANSFORM_T285CBD8775B25174B75164F10618F8B9728E1B20_H // System.Delegate[] struct DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86 : public RuntimeArray { public: ALIGN_FIELD (8) Delegate_t * m_Items[1]; public: inline Delegate_t * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Delegate_t ** GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Delegate_t * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } inline Delegate_t * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Delegate_t ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Delegate_t * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier(m_Items + index, value); } }; // UnityEngine.Vector3[] struct Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28 : public RuntimeArray { public: ALIGN_FIELD (8) Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 m_Items[1]; public: inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * GetAddressAt(il2cpp_array_size_t index) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items + index; } inline void SetAt(il2cpp_array_size_t index, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 value) { m_Items[index] = value; } }; // System.Void UnityEngine.Behaviour::.ctor() extern "C" IL2CPP_METHOD_ATTR void Behaviour__ctor_m409AEC21511ACF9A4CC0654DF4B8253E0D81D22C (Behaviour_tBDC7E9C3C898AD8348891B82D3E345801D920CA8 * __this, const RuntimeMethod* method); // System.Delegate System.Delegate::Combine(System.Delegate,System.Delegate) extern "C" IL2CPP_METHOD_ATTR Delegate_t * Delegate_Combine_mC25D2F7DECAFBA6D9A2F9EBA8A77063F0658ECF1 (Delegate_t * p0, Delegate_t * p1, const RuntimeMethod* method); // System.Delegate System.Delegate::Remove(System.Delegate,System.Delegate) extern "C" IL2CPP_METHOD_ATTR Delegate_t * Delegate_Remove_m0B0DB7D1B3AF96B71AFAA72BA0EFE32FBBC2932D (Delegate_t * p0, Delegate_t * p1, const RuntimeMethod* method); // System.Void UnityEngine.Canvas::SendWillRenderCanvases() extern "C" IL2CPP_METHOD_ATTR void Canvas_SendWillRenderCanvases_mD38081FE3172AC7A884B8ED459E90633167B2D10 (const RuntimeMethod* method); // System.Void UnityEngine.Canvas/WillRenderCanvases::Invoke() extern "C" IL2CPP_METHOD_ATTR void WillRenderCanvases_Invoke_m115F44E08A802F1800D79D3B92EE1A575AD08834 (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * __this, const RuntimeMethod* method); // System.Boolean UnityEngine.CanvasGroup::get_blocksRaycasts() extern "C" IL2CPP_METHOD_ATTR bool CanvasGroup_get_blocksRaycasts_m3792CE490F35260A673C28FD29BF4B2814833DDA (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::SetColor_Injected(UnityEngine.Color&) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetColor_Injected_mA64D7935C130EDFCB8D9C1DF27F67C8EF6F36CCE (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___color0, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::GetColor_Injected(UnityEngine.Color&) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_GetColor_Injected_mD90AE649D248DA886C8DB085FC27B7134399F68A (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___ret0, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::EnableRectClipping_Injected(UnityEngine.Rect&) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_EnableRectClipping_Injected_mB430FAA285D77D2EA776CA90D3B1179DE637B20D (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Rect_t35B976DE901B5423C11705E156938EA27AB402CE * ___rect0, const RuntimeMethod* method); // System.Int32 UnityEngine.CanvasRenderer::get_materialCount() extern "C" IL2CPP_METHOD_ATTR int32_t CanvasRenderer_get_materialCount_m5C0C1E7CC3DAE4B14E29A36E9890F92C0DACC3F5 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method); // System.Int32 System.Math::Max(System.Int32,System.Int32) extern "C" IL2CPP_METHOD_ATTR int32_t Math_Max_mA99E48BB021F2E4B62D4EA9F52EA6928EED618A2 (int32_t p0, int32_t p1, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::set_materialCount(System.Int32) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_set_materialCount_m124AD7592DD6078E097C9FD6CBC5676341DBCA9E (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, int32_t ___value0, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::SetMaterial(UnityEngine.Material,System.Int32) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetMaterial_m9851A87FA12E2CD1321BB971953E899292EC4707 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * ___material0, int32_t ___index1, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::SetTexture(UnityEngine.Texture) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetTexture_m406C073585AF48FD2A880D73419F6E1069BEEA84 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 * ___texture0, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::SplitUIVertexStreamsInternal(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4 (RuntimeObject * ___verts0, RuntimeObject * ___positions1, RuntimeObject * ___colors2, RuntimeObject * ___uv0S3, RuntimeObject * ___uv1S4, RuntimeObject * ___uv2S5, RuntimeObject * ___uv3S6, RuntimeObject * ___normals7, RuntimeObject * ___tangents8, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::SplitIndicesStreamsInternal(System.Object,System.Object) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SplitIndicesStreamsInternal_mE13C66217A4A26239D601CC5FDD1AB8B302D487B (RuntimeObject * ___verts0, RuntimeObject * ___indices1, const RuntimeMethod* method); // System.Void UnityEngine.CanvasRenderer::CreateUIVertexStreamInternal(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_CreateUIVertexStreamInternal_m5BC57F4F9325EC398216AEA1E53CC21E5C6CA920 (RuntimeObject * ___verts0, RuntimeObject * ___positions1, RuntimeObject * ___colors2, RuntimeObject * ___uv0S3, RuntimeObject * ___uv1S4, RuntimeObject * ___uv2S5, RuntimeObject * ___uv3S6, RuntimeObject * ___normals7, RuntimeObject * ___tangents8, RuntimeObject * ___indices9, const RuntimeMethod* method); // System.Boolean UnityEngine.RectTransformUtility::PointInRectangle(UnityEngine.Vector2,UnityEngine.RectTransform,UnityEngine.Camera) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_PointInRectangle_m31A8C0A3CFCC0B584A33C3A3F2692EF09D303CEE (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPoint0, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.Vector2::get_zero() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8 (const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Vector2::op_Implicit(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Vector2_op_Implicit_mD152B6A34B4DB7FFECC2844D74718568FE867D6F (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D p0, const RuntimeMethod* method); // UnityEngine.Ray UnityEngine.RectTransformUtility::ScreenPointToRay(UnityEngine.Camera,UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 RectTransformUtility_ScreenPointToRay_mB74CED011944E1E7CE3A24C433B9B660C5BADC73 (Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPos1, const RuntimeMethod* method); // UnityEngine.Quaternion UnityEngine.Transform::get_rotation() extern "C" IL2CPP_METHOD_ATTR Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 Transform_get_rotation_m3AB90A67403249AECCA5E02BC70FCE8C90FE9FB9 (Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * __this, const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Vector3::get_back() extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Vector3_get_back_mE7EF8625637E6F8B9E6B42A6AE140777C51E02F7 (const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Quaternion::op_Multiply(UnityEngine.Quaternion,UnityEngine.Vector3) extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Quaternion_op_Multiply_mD5999DE317D808808B72E58E7A978C4C0995879C (Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 p0, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p1, const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Transform::get_position() extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Transform_get_position_mF54C3A064F7C8E24F1C56EE128728B2E4485E294 (Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * __this, const RuntimeMethod* method); // System.Void UnityEngine.Plane::.ctor(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" IL2CPP_METHOD_ATTR void Plane__ctor_m6535EAD5E675627C2533962F1F7890CBFA2BA44A (Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED * __this, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p0, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p1, const RuntimeMethod* method); // System.Boolean UnityEngine.Plane::Raycast(UnityEngine.Ray,System.Single&) extern "C" IL2CPP_METHOD_ATTR bool Plane_Raycast_m04E61D7C78A5DA70F4F73F9805ABB54177B799A9 (Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED * __this, Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 p0, float* p1, const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Ray::GetPoint(System.Single) extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Ray_GetPoint_mE8830D3BA68A184AD70514428B75F5664105ED08 (Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 * __this, float p0, const RuntimeMethod* method); // System.Boolean UnityEngine.RectTransformUtility::ScreenPointToWorldPointInRectangle(UnityEngine.RectTransform,UnityEngine.Vector2,UnityEngine.Camera,UnityEngine.Vector3&) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_ScreenPointToWorldPointInRectangle_m821FF925C5B70477F153B4C053AE9E36A04A774F (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPoint1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * ___worldPoint3, const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Transform::InverseTransformPoint(UnityEngine.Vector3) extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Transform_InverseTransformPoint_mB6E3145F20B531B4A781C194BAC43A8255C96C47 (Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * __this, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p0, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.Vector2::op_Implicit(UnityEngine.Vector3) extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D Vector2_op_Implicit_mEA1F75961E3D368418BA8CEB9C40E55C25BA3C28 (Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p0, const RuntimeMethod* method); // System.Boolean UnityEngine.Object::op_Inequality(UnityEngine.Object,UnityEngine.Object) extern "C" IL2CPP_METHOD_ATTR bool Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1 (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p0, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p1, const RuntimeMethod* method); // UnityEngine.Ray UnityEngine.Camera::ScreenPointToRay(UnityEngine.Vector3) extern "C" IL2CPP_METHOD_ATTR Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 Camera_ScreenPointToRay_m27638E78502DB6D6D7113F81AF7C210773B828F3 (Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * __this, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p0, const RuntimeMethod* method); // UnityEngine.Vector3 UnityEngine.Vector3::get_forward() extern "C" IL2CPP_METHOD_ATTR Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 Vector3_get_forward_m3E2E192B3302130098738C308FA1EE1439449D0D (const RuntimeMethod* method); // System.Void UnityEngine.Ray::.ctor(UnityEngine.Vector3,UnityEngine.Vector3) extern "C" IL2CPP_METHOD_ATTR void Ray__ctor_m695D219349B8AA4C82F96C55A27D384C07736F6B (Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 * __this, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p0, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 p1, const RuntimeMethod* method); // System.Boolean UnityEngine.Object::op_Equality(UnityEngine.Object,UnityEngine.Object) extern "C" IL2CPP_METHOD_ATTR bool Object_op_Equality_mBC2401774F3BE33E8CF6F0A8148E66C95D6CFF1C (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p0, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * p1, const RuntimeMethod* method); // UnityEngine.Transform UnityEngine.Transform::GetChild(System.Int32) extern "C" IL2CPP_METHOD_ATTR Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * Transform_GetChild_mC86B9B61E4EC086A571B09EA7A33FFBF50DF52D3 (Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * __this, int32_t p0, const RuntimeMethod* method); // System.Void UnityEngine.RectTransformUtility::FlipLayoutOnAxis(UnityEngine.RectTransform,System.Int32,System.Boolean,System.Boolean) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_FlipLayoutOnAxis_mFECCA330C80845D0B75829C7DD242688911006AE (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, int32_t ___axis1, bool ___keepPositioning2, bool ___recursive3, const RuntimeMethod* method); // System.Int32 UnityEngine.Transform::get_childCount() extern "C" IL2CPP_METHOD_ATTR int32_t Transform_get_childCount_m7665D779DCDB6B175FB52A254276CDF0C384A724 (Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * __this, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.RectTransform::get_pivot() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransform_get_pivot_mA5BEEE2069ACA7C0C717530EED3E7D811D46C463 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, const RuntimeMethod* method); // System.Single UnityEngine.Vector2::get_Item(System.Int32) extern "C" IL2CPP_METHOD_ATTR float Vector2_get_Item_m67344A67120E48C32D9419E24BA7AED29F063379 (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * __this, int32_t p0, const RuntimeMethod* method); // System.Void UnityEngine.Vector2::set_Item(System.Int32,System.Single) extern "C" IL2CPP_METHOD_ATTR void Vector2_set_Item_m2335DC41E2BB7E64C21CDF0EEDE64FFB56E7ABD1 (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * __this, int32_t p0, float p1, const RuntimeMethod* method); // System.Void UnityEngine.RectTransform::set_pivot(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR void RectTransform_set_pivot_mB791A383B3C870B9CBD7BC51B2C95711C88E9DCF (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D p0, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.RectTransform::get_anchoredPosition() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransform_get_anchoredPosition_mCB2171DBADBC572F354CCFE3ACA19F9506F97907 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, const RuntimeMethod* method); // System.Void UnityEngine.RectTransform::set_anchoredPosition(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR void RectTransform_set_anchoredPosition_m4DD45DB1A97734A1F3A81E5F259638ECAF35962F (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D p0, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.RectTransform::get_anchorMin() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransform_get_anchorMin_mB62D77CAC5A2A086320638AE7DF08135B7028744 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.RectTransform::get_anchorMax() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransform_get_anchorMax_m1E51C211FBB32326C884375C9F1E8E8221E5C086 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, const RuntimeMethod* method); // System.Void UnityEngine.RectTransform::set_anchorMin(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR void RectTransform_set_anchorMin_mE965F5B0902C2554635010A5752728414A57020A (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D p0, const RuntimeMethod* method); // System.Void UnityEngine.RectTransform::set_anchorMax(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR void RectTransform_set_anchorMax_m55EEF00D9E42FE542B5346D7CEDAF9248736F7D3 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D p0, const RuntimeMethod* method); // System.Void UnityEngine.RectTransformUtility::FlipLayoutAxes(UnityEngine.RectTransform,System.Boolean,System.Boolean) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_FlipLayoutAxes_mF5D9BF9F0EACBC972A22C937FD21B610410EB956 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, bool ___keepPositioning1, bool ___recursive2, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.RectTransformUtility::GetTransposed(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14 (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___input0, const RuntimeMethod* method); // UnityEngine.Vector2 UnityEngine.RectTransform::get_sizeDelta() extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransform_get_sizeDelta_mDA0A3E73679143B1B52CE2F9A417F90CB9F3DAFF (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, const RuntimeMethod* method); // System.Void UnityEngine.RectTransform::set_sizeDelta(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR void RectTransform_set_sizeDelta_m7729BA56325BA667F0F7D60D642124F7909F1302 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D p0, const RuntimeMethod* method); // System.Void UnityEngine.Vector2::.ctor(System.Single,System.Single) extern "C" IL2CPP_METHOD_ATTR void Vector2__ctor_mEE8FB117AB1F8DB746FB8B3EB4C0DA3BF2A230D0 (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * __this, float p0, float p1, const RuntimeMethod* method); // System.Void UnityEngine.RectTransformUtility::PixelAdjustPoint_Injected(UnityEngine.Vector2&,UnityEngine.Transform,UnityEngine.Canvas,UnityEngine.Vector2&) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_PixelAdjustPoint_Injected_m7F2640515030E47B1B8227306BFED31F733C9B8B (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___point0, Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * ___elementTransform1, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * ___canvas2, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___ret3, const RuntimeMethod* method); // System.Void UnityEngine.RectTransformUtility::PixelAdjustRect_Injected(UnityEngine.RectTransform,UnityEngine.Canvas,UnityEngine.Rect&) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_PixelAdjustRect_Injected_m2172A105E834E9F0B292508EF544A68ED257A317 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rectTransform0, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * ___canvas1, Rect_t35B976DE901B5423C11705E156938EA27AB402CE * ___ret2, const RuntimeMethod* method); // System.Boolean UnityEngine.RectTransformUtility::PointInRectangle_Injected(UnityEngine.Vector2&,UnityEngine.RectTransform,UnityEngine.Camera) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_PointInRectangle_Injected_m42DCFCCED1ABCAE24B543ABD1903291A3A186B2D (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___screenPoint0, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, const RuntimeMethod* method); #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.Canvas::.ctor() extern "C" IL2CPP_METHOD_ATTR void Canvas__ctor_m83621E7EFCEFA5A0EDC886CB878FE10E7281B951 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { { Behaviour__ctor_m409AEC21511ACF9A4CC0654DF4B8253E0D81D22C(__this, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.Canvas::add_willRenderCanvases(UnityEngine.Canvas/WillRenderCanvases) extern "C" IL2CPP_METHOD_ATTR void Canvas_add_willRenderCanvases_mACABFF4EAFB7DCFF4B9A33357D496EC3010D7E6B (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Canvas_add_willRenderCanvases_mACABFF4EAFB7DCFF4B9A33357D496EC3010D7E6B_MetadataUsageId); s_Il2CppMethodInitialized = true; } WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * V_0 = NULL; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * V_1 = NULL; { WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_0 = ((Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields*)il2cpp_codegen_static_fields_for(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var))->get_willRenderCanvases_4(); V_0 = L_0; } IL_0006: { WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_1 = V_0; V_1 = L_1; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_2 = V_1; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_3 = ___value0; Delegate_t * L_4 = Delegate_Combine_mC25D2F7DECAFBA6D9A2F9EBA8A77063F0658ECF1(L_2, L_3, /*hidden argument*/NULL); WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_5 = V_0; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_6 = InterlockedCompareExchangeImpl<WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *>((WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE **)(((Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields*)il2cpp_codegen_static_fields_for(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var))->get_address_of_willRenderCanvases_4()), ((WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *)CastclassSealed((RuntimeObject*)L_4, WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE_il2cpp_TypeInfo_var)), L_5); V_0 = L_6; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_7 = V_0; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_8 = V_1; if ((!(((RuntimeObject*)(WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *)L_7) == ((RuntimeObject*)(WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *)L_8)))) { goto IL_0006; } } { return; } } // System.Void UnityEngine.Canvas::remove_willRenderCanvases(UnityEngine.Canvas/WillRenderCanvases) extern "C" IL2CPP_METHOD_ATTR void Canvas_remove_willRenderCanvases_m9A5F0E946B4549D576EDAD5618FEA2D532377831 (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * ___value0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Canvas_remove_willRenderCanvases_m9A5F0E946B4549D576EDAD5618FEA2D532377831_MetadataUsageId); s_Il2CppMethodInitialized = true; } WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * V_0 = NULL; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * V_1 = NULL; { WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_0 = ((Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields*)il2cpp_codegen_static_fields_for(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var))->get_willRenderCanvases_4(); V_0 = L_0; } IL_0006: { WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_1 = V_0; V_1 = L_1; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_2 = V_1; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_3 = ___value0; Delegate_t * L_4 = Delegate_Remove_m0B0DB7D1B3AF96B71AFAA72BA0EFE32FBBC2932D(L_2, L_3, /*hidden argument*/NULL); WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_5 = V_0; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_6 = InterlockedCompareExchangeImpl<WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *>((WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE **)(((Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields*)il2cpp_codegen_static_fields_for(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var))->get_address_of_willRenderCanvases_4()), ((WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *)CastclassSealed((RuntimeObject*)L_4, WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE_il2cpp_TypeInfo_var)), L_5); V_0 = L_6; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_7 = V_0; WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_8 = V_1; if ((!(((RuntimeObject*)(WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *)L_7) == ((RuntimeObject*)(WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE *)L_8)))) { goto IL_0006; } } { return; } } // UnityEngine.RenderMode UnityEngine.Canvas::get_renderMode() extern "C" IL2CPP_METHOD_ATTR int32_t Canvas_get_renderMode_mAF68701B143F01C7D19B6C7D3033E3B34ECB2FC8 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef int32_t (*Canvas_get_renderMode_mAF68701B143F01C7D19B6C7D3033E3B34ECB2FC8_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_renderMode_mAF68701B143F01C7D19B6C7D3033E3B34ECB2FC8_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_renderMode_mAF68701B143F01C7D19B6C7D3033E3B34ECB2FC8_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_renderMode()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.Canvas::get_isRootCanvas() extern "C" IL2CPP_METHOD_ATTR bool Canvas_get_isRootCanvas_mA4ADE90017884B88AF7A9DD3114FDD4FEB73918A (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef bool (*Canvas_get_isRootCanvas_mA4ADE90017884B88AF7A9DD3114FDD4FEB73918A_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_isRootCanvas_mA4ADE90017884B88AF7A9DD3114FDD4FEB73918A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_isRootCanvas_mA4ADE90017884B88AF7A9DD3114FDD4FEB73918A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_isRootCanvas()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Single UnityEngine.Canvas::get_scaleFactor() extern "C" IL2CPP_METHOD_ATTR float Canvas_get_scaleFactor_m0F6D59E75F7605ABD2AFF6AF32A1097226CE060A (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef float (*Canvas_get_scaleFactor_m0F6D59E75F7605ABD2AFF6AF32A1097226CE060A_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_scaleFactor_m0F6D59E75F7605ABD2AFF6AF32A1097226CE060A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_scaleFactor_m0F6D59E75F7605ABD2AFF6AF32A1097226CE060A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_scaleFactor()"); float retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.Canvas::set_scaleFactor(System.Single) extern "C" IL2CPP_METHOD_ATTR void Canvas_set_scaleFactor_m40359EE941E1573107542A2377E87BEB17C10163 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, float ___value0, const RuntimeMethod* method) { typedef void (*Canvas_set_scaleFactor_m40359EE941E1573107542A2377E87BEB17C10163_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, float); static Canvas_set_scaleFactor_m40359EE941E1573107542A2377E87BEB17C10163_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_set_scaleFactor_m40359EE941E1573107542A2377E87BEB17C10163_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::set_scaleFactor(System.Single)"); _il2cpp_icall_func(__this, ___value0); } // System.Single UnityEngine.Canvas::get_referencePixelsPerUnit() extern "C" IL2CPP_METHOD_ATTR float Canvas_get_referencePixelsPerUnit_mF824215754F9A66CE59F57A3F282384124EB9BAB (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef float (*Canvas_get_referencePixelsPerUnit_mF824215754F9A66CE59F57A3F282384124EB9BAB_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_referencePixelsPerUnit_mF824215754F9A66CE59F57A3F282384124EB9BAB_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_referencePixelsPerUnit_mF824215754F9A66CE59F57A3F282384124EB9BAB_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_referencePixelsPerUnit()"); float retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.Canvas::set_referencePixelsPerUnit(System.Single) extern "C" IL2CPP_METHOD_ATTR void Canvas_set_referencePixelsPerUnit_m16AF69DA4801579FD03A220D3D6293421671F341 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, float ___value0, const RuntimeMethod* method) { typedef void (*Canvas_set_referencePixelsPerUnit_m16AF69DA4801579FD03A220D3D6293421671F341_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, float); static Canvas_set_referencePixelsPerUnit_m16AF69DA4801579FD03A220D3D6293421671F341_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_set_referencePixelsPerUnit_m16AF69DA4801579FD03A220D3D6293421671F341_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::set_referencePixelsPerUnit(System.Single)"); _il2cpp_icall_func(__this, ___value0); } // System.Boolean UnityEngine.Canvas::get_pixelPerfect() extern "C" IL2CPP_METHOD_ATTR bool Canvas_get_pixelPerfect_mEB8527374734F73BE960B288095A1A619E700595 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef bool (*Canvas_get_pixelPerfect_mEB8527374734F73BE960B288095A1A619E700595_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_pixelPerfect_mEB8527374734F73BE960B288095A1A619E700595_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_pixelPerfect_mEB8527374734F73BE960B288095A1A619E700595_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_pixelPerfect()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Int32 UnityEngine.Canvas::get_renderOrder() extern "C" IL2CPP_METHOD_ATTR int32_t Canvas_get_renderOrder_m673818EDB7D1F75F70B7FFFC1B909F1CDBA52F8D (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef int32_t (*Canvas_get_renderOrder_m673818EDB7D1F75F70B7FFFC1B909F1CDBA52F8D_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_renderOrder_m673818EDB7D1F75F70B7FFFC1B909F1CDBA52F8D_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_renderOrder_m673818EDB7D1F75F70B7FFFC1B909F1CDBA52F8D_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_renderOrder()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.Canvas::get_overrideSorting() extern "C" IL2CPP_METHOD_ATTR bool Canvas_get_overrideSorting_m5C4295223733C2195D2B6CC69721B04376C3C67C (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef bool (*Canvas_get_overrideSorting_m5C4295223733C2195D2B6CC69721B04376C3C67C_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_overrideSorting_m5C4295223733C2195D2B6CC69721B04376C3C67C_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_overrideSorting_m5C4295223733C2195D2B6CC69721B04376C3C67C_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_overrideSorting()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.Canvas::set_overrideSorting(System.Boolean) extern "C" IL2CPP_METHOD_ATTR void Canvas_set_overrideSorting_m446842097ED576AB8706B9980E85AECC24C13015 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, bool ___value0, const RuntimeMethod* method) { typedef void (*Canvas_set_overrideSorting_m446842097ED576AB8706B9980E85AECC24C13015_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, bool); static Canvas_set_overrideSorting_m446842097ED576AB8706B9980E85AECC24C13015_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_set_overrideSorting_m446842097ED576AB8706B9980E85AECC24C13015_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::set_overrideSorting(System.Boolean)"); _il2cpp_icall_func(__this, ___value0); } // System.Int32 UnityEngine.Canvas::get_sortingOrder() extern "C" IL2CPP_METHOD_ATTR int32_t Canvas_get_sortingOrder_mA3FC1159A6594B522A7B682F5792845E2DC7C540 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef int32_t (*Canvas_get_sortingOrder_mA3FC1159A6594B522A7B682F5792845E2DC7C540_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_sortingOrder_mA3FC1159A6594B522A7B682F5792845E2DC7C540_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_sortingOrder_mA3FC1159A6594B522A7B682F5792845E2DC7C540_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_sortingOrder()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.Canvas::set_sortingOrder(System.Int32) extern "C" IL2CPP_METHOD_ATTR void Canvas_set_sortingOrder_m4387540EBDF2716DFAE26F27074DBF15F32382E7 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, int32_t ___value0, const RuntimeMethod* method) { typedef void (*Canvas_set_sortingOrder_m4387540EBDF2716DFAE26F27074DBF15F32382E7_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, int32_t); static Canvas_set_sortingOrder_m4387540EBDF2716DFAE26F27074DBF15F32382E7_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_set_sortingOrder_m4387540EBDF2716DFAE26F27074DBF15F32382E7_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::set_sortingOrder(System.Int32)"); _il2cpp_icall_func(__this, ___value0); } // System.Int32 UnityEngine.Canvas::get_targetDisplay() extern "C" IL2CPP_METHOD_ATTR int32_t Canvas_get_targetDisplay_m80D9D93CA075084BDD3B05AF5F880698D7BB235D (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef int32_t (*Canvas_get_targetDisplay_m80D9D93CA075084BDD3B05AF5F880698D7BB235D_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_targetDisplay_m80D9D93CA075084BDD3B05AF5F880698D7BB235D_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_targetDisplay_m80D9D93CA075084BDD3B05AF5F880698D7BB235D_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_targetDisplay()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Int32 UnityEngine.Canvas::get_sortingLayerID() extern "C" IL2CPP_METHOD_ATTR int32_t Canvas_get_sortingLayerID_mD0EB8964D1C7E68F429F83B5C5AF58426D354C75 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef int32_t (*Canvas_get_sortingLayerID_mD0EB8964D1C7E68F429F83B5C5AF58426D354C75_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_sortingLayerID_mD0EB8964D1C7E68F429F83B5C5AF58426D354C75_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_sortingLayerID_mD0EB8964D1C7E68F429F83B5C5AF58426D354C75_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_sortingLayerID()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.Canvas::set_sortingLayerID(System.Int32) extern "C" IL2CPP_METHOD_ATTR void Canvas_set_sortingLayerID_m9FE5A69A22DB3316964C9D5CD49E5B4352550747 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, int32_t ___value0, const RuntimeMethod* method) { typedef void (*Canvas_set_sortingLayerID_m9FE5A69A22DB3316964C9D5CD49E5B4352550747_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, int32_t); static Canvas_set_sortingLayerID_m9FE5A69A22DB3316964C9D5CD49E5B4352550747_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_set_sortingLayerID_m9FE5A69A22DB3316964C9D5CD49E5B4352550747_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::set_sortingLayerID(System.Int32)"); _il2cpp_icall_func(__this, ___value0); } // UnityEngine.Canvas UnityEngine.Canvas::get_rootCanvas() extern "C" IL2CPP_METHOD_ATTR Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * Canvas_get_rootCanvas_mFC5752C1955AF10E71AA6160A3A1880586116123 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * (*Canvas_get_rootCanvas_mFC5752C1955AF10E71AA6160A3A1880586116123_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_rootCanvas_mFC5752C1955AF10E71AA6160A3A1880586116123_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_rootCanvas_mFC5752C1955AF10E71AA6160A3A1880586116123_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_rootCanvas()"); Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * retVal = _il2cpp_icall_func(__this); return retVal; } // UnityEngine.Camera UnityEngine.Canvas::get_worldCamera() extern "C" IL2CPP_METHOD_ATTR Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * Canvas_get_worldCamera_m36F1A8DBFC4AB34278125DA017CACDC873F53409 (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * __this, const RuntimeMethod* method) { typedef Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * (*Canvas_get_worldCamera_m36F1A8DBFC4AB34278125DA017CACDC873F53409_ftn) (Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *); static Canvas_get_worldCamera_m36F1A8DBFC4AB34278125DA017CACDC873F53409_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_get_worldCamera_m36F1A8DBFC4AB34278125DA017CACDC873F53409_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::get_worldCamera()"); Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * retVal = _il2cpp_icall_func(__this); return retVal; } // UnityEngine.Material UnityEngine.Canvas::GetDefaultCanvasMaterial() extern "C" IL2CPP_METHOD_ATTR Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * Canvas_GetDefaultCanvasMaterial_m972CD867F8C777A55C35A735ACE85BADC628233B (const RuntimeMethod* method) { typedef Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * (*Canvas_GetDefaultCanvasMaterial_m972CD867F8C777A55C35A735ACE85BADC628233B_ftn) (); static Canvas_GetDefaultCanvasMaterial_m972CD867F8C777A55C35A735ACE85BADC628233B_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_GetDefaultCanvasMaterial_m972CD867F8C777A55C35A735ACE85BADC628233B_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::GetDefaultCanvasMaterial()"); Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * retVal = _il2cpp_icall_func(); return retVal; } // UnityEngine.Material UnityEngine.Canvas::GetETC1SupportedCanvasMaterial() extern "C" IL2CPP_METHOD_ATTR Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * Canvas_GetETC1SupportedCanvasMaterial_m99A6CABFF2B919C2B84F703A8DAC64C76F5E2C52 (const RuntimeMethod* method) { typedef Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * (*Canvas_GetETC1SupportedCanvasMaterial_m99A6CABFF2B919C2B84F703A8DAC64C76F5E2C52_ftn) (); static Canvas_GetETC1SupportedCanvasMaterial_m99A6CABFF2B919C2B84F703A8DAC64C76F5E2C52_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (Canvas_GetETC1SupportedCanvasMaterial_m99A6CABFF2B919C2B84F703A8DAC64C76F5E2C52_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.Canvas::GetETC1SupportedCanvasMaterial()"); Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * retVal = _il2cpp_icall_func(); return retVal; } // System.Void UnityEngine.Canvas::ForceUpdateCanvases() extern "C" IL2CPP_METHOD_ATTR void Canvas_ForceUpdateCanvases_mB23FF44265E49BE388A79267533EA482F08C0755 (const RuntimeMethod* method) { { Canvas_SendWillRenderCanvases_mD38081FE3172AC7A884B8ED459E90633167B2D10(/*hidden argument*/NULL); return; } } // System.Void UnityEngine.Canvas::SendWillRenderCanvases() extern "C" IL2CPP_METHOD_ATTR void Canvas_SendWillRenderCanvases_mD38081FE3172AC7A884B8ED459E90633167B2D10 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (Canvas_SendWillRenderCanvases_mD38081FE3172AC7A884B8ED459E90633167B2D10_MetadataUsageId); s_Il2CppMethodInitialized = true; } { WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_0 = ((Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields*)il2cpp_codegen_static_fields_for(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var))->get_willRenderCanvases_4(); if (L_0) { goto IL_000d; } } { goto IL_0017; } IL_000d: { WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * L_1 = ((Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_StaticFields*)il2cpp_codegen_static_fields_for(Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591_il2cpp_TypeInfo_var))->get_willRenderCanvases_4(); NullCheck(L_1); WillRenderCanvases_Invoke_m115F44E08A802F1800D79D3B92EE1A575AD08834(L_1, /*hidden argument*/NULL); } IL_0017: { return; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif extern "C" void DelegatePInvokeWrapper_WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * __this, const RuntimeMethod* method) { typedef void (DEFAULT_CALL *PInvokeFunc)(); PInvokeFunc il2cppPInvokeFunc = reinterpret_cast<PInvokeFunc>(il2cpp_codegen_get_method_pointer(((RuntimeDelegate*)__this)->method)); // Native function invocation il2cppPInvokeFunc(); } // System.Void UnityEngine.Canvas/WillRenderCanvases::.ctor(System.Object,System.IntPtr) extern "C" IL2CPP_METHOD_ATTR void WillRenderCanvases__ctor_m9AB0D8B934BE573C4B3ABBAA313984B054B4B885 (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * __this, RuntimeObject * ___object0, intptr_t ___method1, const RuntimeMethod* method) { __this->set_method_ptr_0(il2cpp_codegen_get_method_pointer((RuntimeMethod*)___method1)); __this->set_method_3(___method1); __this->set_m_target_2(___object0); } // System.Void UnityEngine.Canvas/WillRenderCanvases::Invoke() extern "C" IL2CPP_METHOD_ATTR void WillRenderCanvases_Invoke_m115F44E08A802F1800D79D3B92EE1A575AD08834 (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * __this, const RuntimeMethod* method) { DelegateU5BU5D_tDFCDEE2A6322F96C0FE49AF47E9ADB8C4B294E86* delegatesToInvoke = __this->get_delegates_11(); if (delegatesToInvoke != NULL) { il2cpp_array_size_t length = delegatesToInvoke->max_length; for (il2cpp_array_size_t i = 0; i < length; i++) { Delegate_t* currentDelegate = (delegatesToInvoke)->GetAtUnchecked(static_cast<il2cpp_array_size_t>(i)); Il2CppMethodPointer targetMethodPointer = currentDelegate->get_method_ptr_0(); RuntimeMethod* targetMethod = (RuntimeMethod*)(currentDelegate->get_method_3()); RuntimeObject* targetThis = currentDelegate->get_m_target_2(); if (!il2cpp_codegen_method_is_virtual(targetMethod)) { il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod); } bool ___methodIsStatic = MethodIsStatic(targetMethod); int ___parameterCount = il2cpp_codegen_method_parameter_count(targetMethod); if (___methodIsStatic) { if (___parameterCount == 0) { // open typedef void (*FunctionPointerType) (const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetMethod); } else { // closed typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } else { // closed if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_generic_instance(targetMethod)) { if (il2cpp_codegen_method_is_interface_method(targetMethod)) GenericInterfaceActionInvoker0::Invoke(targetMethod, targetThis); else GenericVirtActionInvoker0::Invoke(targetMethod, targetThis); } else { if (il2cpp_codegen_method_is_interface_method(targetMethod)) InterfaceActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis); else VirtActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis); } } } else { typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } } } else { Il2CppMethodPointer targetMethodPointer = __this->get_method_ptr_0(); RuntimeMethod* targetMethod = (RuntimeMethod*)(__this->get_method_3()); RuntimeObject* targetThis = __this->get_m_target_2(); if (!il2cpp_codegen_method_is_virtual(targetMethod)) { il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found(targetMethod); } bool ___methodIsStatic = MethodIsStatic(targetMethod); int ___parameterCount = il2cpp_codegen_method_parameter_count(targetMethod); if (___methodIsStatic) { if (___parameterCount == 0) { // open typedef void (*FunctionPointerType) (const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetMethod); } else { // closed typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } else { // closed if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_virtual(targetMethod) && !il2cpp_codegen_object_is_of_sealed_type(targetThis) && il2cpp_codegen_delegate_has_invoker((Il2CppDelegate*)__this)) { if (il2cpp_codegen_method_is_generic_instance(targetMethod)) { if (il2cpp_codegen_method_is_interface_method(targetMethod)) GenericInterfaceActionInvoker0::Invoke(targetMethod, targetThis); else GenericVirtActionInvoker0::Invoke(targetMethod, targetThis); } else { if (il2cpp_codegen_method_is_interface_method(targetMethod)) InterfaceActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), il2cpp_codegen_method_get_declaring_type(targetMethod), targetThis); else VirtActionInvoker0::Invoke(il2cpp_codegen_method_get_slot(targetMethod), targetThis); } } } else { typedef void (*FunctionPointerType) (void*, const RuntimeMethod*); ((FunctionPointerType)targetMethodPointer)(targetThis, targetMethod); } } } } // System.IAsyncResult UnityEngine.Canvas/WillRenderCanvases::BeginInvoke(System.AsyncCallback,System.Object) extern "C" IL2CPP_METHOD_ATTR RuntimeObject* WillRenderCanvases_BeginInvoke_mEFF75BC062DE3E7888B23BE447DD9CBDF9F307F3 (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * __this, AsyncCallback_t3F3DA3BEDAEE81DD1D24125DF8EB30E85EE14DA4 * ___callback0, RuntimeObject * ___object1, const RuntimeMethod* method) { void *__d_args[1] = {0}; return (RuntimeObject*)il2cpp_codegen_delegate_begin_invoke((RuntimeDelegate*)__this, __d_args, (RuntimeDelegate*)___callback0, (RuntimeObject*)___object1); } // System.Void UnityEngine.Canvas/WillRenderCanvases::EndInvoke(System.IAsyncResult) extern "C" IL2CPP_METHOD_ATTR void WillRenderCanvases_EndInvoke_mD86D55F1B1B76055B8992CE306C56BFDA735B935 (WillRenderCanvases_tBD5AD090B5938021DEAA679A5AEEA790F60A8BEE * __this, RuntimeObject* ___result0, const RuntimeMethod* method) { il2cpp_codegen_delegate_end_invoke((Il2CppAsyncResult*) ___result0, 0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Single UnityEngine.CanvasGroup::get_alpha() extern "C" IL2CPP_METHOD_ATTR float CanvasGroup_get_alpha_mF6AFB387E643765758F1461369A65F59BA06D26E (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, const RuntimeMethod* method) { typedef float (*CanvasGroup_get_alpha_mF6AFB387E643765758F1461369A65F59BA06D26E_ftn) (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 *); static CanvasGroup_get_alpha_mF6AFB387E643765758F1461369A65F59BA06D26E_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasGroup_get_alpha_mF6AFB387E643765758F1461369A65F59BA06D26E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasGroup::get_alpha()"); float retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.CanvasGroup::set_alpha(System.Single) extern "C" IL2CPP_METHOD_ATTR void CanvasGroup_set_alpha_m7E3C4DCD13E6B1FD43C797EFF9698BACA1FBEC3D (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, float ___value0, const RuntimeMethod* method) { typedef void (*CanvasGroup_set_alpha_m7E3C4DCD13E6B1FD43C797EFF9698BACA1FBEC3D_ftn) (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 *, float); static CanvasGroup_set_alpha_m7E3C4DCD13E6B1FD43C797EFF9698BACA1FBEC3D_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasGroup_set_alpha_m7E3C4DCD13E6B1FD43C797EFF9698BACA1FBEC3D_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasGroup::set_alpha(System.Single)"); _il2cpp_icall_func(__this, ___value0); } // System.Boolean UnityEngine.CanvasGroup::get_interactable() extern "C" IL2CPP_METHOD_ATTR bool CanvasGroup_get_interactable_mC5CE48DEFFC97EFEC794DB695E3C906736483BA1 (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, const RuntimeMethod* method) { typedef bool (*CanvasGroup_get_interactable_mC5CE48DEFFC97EFEC794DB695E3C906736483BA1_ftn) (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 *); static CanvasGroup_get_interactable_mC5CE48DEFFC97EFEC794DB695E3C906736483BA1_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasGroup_get_interactable_mC5CE48DEFFC97EFEC794DB695E3C906736483BA1_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasGroup::get_interactable()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.CanvasGroup::get_blocksRaycasts() extern "C" IL2CPP_METHOD_ATTR bool CanvasGroup_get_blocksRaycasts_m3792CE490F35260A673C28FD29BF4B2814833DDA (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, const RuntimeMethod* method) { typedef bool (*CanvasGroup_get_blocksRaycasts_m3792CE490F35260A673C28FD29BF4B2814833DDA_ftn) (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 *); static CanvasGroup_get_blocksRaycasts_m3792CE490F35260A673C28FD29BF4B2814833DDA_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasGroup_get_blocksRaycasts_m3792CE490F35260A673C28FD29BF4B2814833DDA_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasGroup::get_blocksRaycasts()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.CanvasGroup::get_ignoreParentGroups() extern "C" IL2CPP_METHOD_ATTR bool CanvasGroup_get_ignoreParentGroups_mD37DD35C1B20CC9750AA6CC442C00E5731157918 (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, const RuntimeMethod* method) { typedef bool (*CanvasGroup_get_ignoreParentGroups_mD37DD35C1B20CC9750AA6CC442C00E5731157918_ftn) (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 *); static CanvasGroup_get_ignoreParentGroups_mD37DD35C1B20CC9750AA6CC442C00E5731157918_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasGroup_get_ignoreParentGroups_mD37DD35C1B20CC9750AA6CC442C00E5731157918_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasGroup::get_ignoreParentGroups()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.CanvasGroup::IsRaycastLocationValid(UnityEngine.Vector2,UnityEngine.Camera) extern "C" IL2CPP_METHOD_ATTR bool CanvasGroup_IsRaycastLocationValid_m21C6A4F645CDD52E57D6CDBD0963E3594081782A (CanvasGroup_tE2C664C60990D1DCCEE0CC6545CC3E80369C7F90 * __this, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___sp0, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___eventCamera1, const RuntimeMethod* method) { bool V_0 = false; { bool L_0 = CanvasGroup_get_blocksRaycasts_m3792CE490F35260A673C28FD29BF4B2814833DDA(__this, /*hidden argument*/NULL); V_0 = L_0; goto IL_000d; } IL_000d: { bool L_1 = V_0; return L_1; } } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.CanvasRenderer::set_hasPopInstruction(System.Boolean) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_set_hasPopInstruction_m3432A1568931473F691261A90D82AFD4063E27E5 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, bool ___value0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_set_hasPopInstruction_m3432A1568931473F691261A90D82AFD4063E27E5_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, bool); static CanvasRenderer_set_hasPopInstruction_m3432A1568931473F691261A90D82AFD4063E27E5_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_set_hasPopInstruction_m3432A1568931473F691261A90D82AFD4063E27E5_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::set_hasPopInstruction(System.Boolean)"); _il2cpp_icall_func(__this, ___value0); } // System.Int32 UnityEngine.CanvasRenderer::get_materialCount() extern "C" IL2CPP_METHOD_ATTR int32_t CanvasRenderer_get_materialCount_m5C0C1E7CC3DAE4B14E29A36E9890F92C0DACC3F5 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { typedef int32_t (*CanvasRenderer_get_materialCount_m5C0C1E7CC3DAE4B14E29A36E9890F92C0DACC3F5_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *); static CanvasRenderer_get_materialCount_m5C0C1E7CC3DAE4B14E29A36E9890F92C0DACC3F5_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_get_materialCount_m5C0C1E7CC3DAE4B14E29A36E9890F92C0DACC3F5_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::get_materialCount()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.CanvasRenderer::set_materialCount(System.Int32) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_set_materialCount_m124AD7592DD6078E097C9FD6CBC5676341DBCA9E (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, int32_t ___value0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_set_materialCount_m124AD7592DD6078E097C9FD6CBC5676341DBCA9E_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, int32_t); static CanvasRenderer_set_materialCount_m124AD7592DD6078E097C9FD6CBC5676341DBCA9E_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_set_materialCount_m124AD7592DD6078E097C9FD6CBC5676341DBCA9E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::set_materialCount(System.Int32)"); _il2cpp_icall_func(__this, ___value0); } // System.Void UnityEngine.CanvasRenderer::set_popMaterialCount(System.Int32) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_set_popMaterialCount_m238C5CF7919510F3A9FE70AC502D9C3F0C2BFE6A (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, int32_t ___value0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_set_popMaterialCount_m238C5CF7919510F3A9FE70AC502D9C3F0C2BFE6A_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, int32_t); static CanvasRenderer_set_popMaterialCount_m238C5CF7919510F3A9FE70AC502D9C3F0C2BFE6A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_set_popMaterialCount_m238C5CF7919510F3A9FE70AC502D9C3F0C2BFE6A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::set_popMaterialCount(System.Int32)"); _il2cpp_icall_func(__this, ___value0); } // System.Int32 UnityEngine.CanvasRenderer::get_absoluteDepth() extern "C" IL2CPP_METHOD_ATTR int32_t CanvasRenderer_get_absoluteDepth_mCE62152F19926BC6A2864E23E5070641E18A27E7 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { typedef int32_t (*CanvasRenderer_get_absoluteDepth_mCE62152F19926BC6A2864E23E5070641E18A27E7_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *); static CanvasRenderer_get_absoluteDepth_mCE62152F19926BC6A2864E23E5070641E18A27E7_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_get_absoluteDepth_mCE62152F19926BC6A2864E23E5070641E18A27E7_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::get_absoluteDepth()"); int32_t retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.CanvasRenderer::get_hasMoved() extern "C" IL2CPP_METHOD_ATTR bool CanvasRenderer_get_hasMoved_m169212ADE7843C5721D2D4ED3567AB8299B6F073 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { typedef bool (*CanvasRenderer_get_hasMoved_m169212ADE7843C5721D2D4ED3567AB8299B6F073_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *); static CanvasRenderer_get_hasMoved_m169212ADE7843C5721D2D4ED3567AB8299B6F073_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_get_hasMoved_m169212ADE7843C5721D2D4ED3567AB8299B6F073_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::get_hasMoved()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Boolean UnityEngine.CanvasRenderer::get_cull() extern "C" IL2CPP_METHOD_ATTR bool CanvasRenderer_get_cull_m3BBDA319F68D6182BF4451812A7ABC3E862356DA (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { typedef bool (*CanvasRenderer_get_cull_m3BBDA319F68D6182BF4451812A7ABC3E862356DA_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *); static CanvasRenderer_get_cull_m3BBDA319F68D6182BF4451812A7ABC3E862356DA_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_get_cull_m3BBDA319F68D6182BF4451812A7ABC3E862356DA_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::get_cull()"); bool retVal = _il2cpp_icall_func(__this); return retVal; } // System.Void UnityEngine.CanvasRenderer::set_cull(System.Boolean) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_set_cull_m71618AE8E7F24B7B7B04F75641295ECD84F9AFA1 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, bool ___value0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_set_cull_m71618AE8E7F24B7B7B04F75641295ECD84F9AFA1_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, bool); static CanvasRenderer_set_cull_m71618AE8E7F24B7B7B04F75641295ECD84F9AFA1_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_set_cull_m71618AE8E7F24B7B7B04F75641295ECD84F9AFA1_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::set_cull(System.Boolean)"); _il2cpp_icall_func(__this, ___value0); } // System.Void UnityEngine.CanvasRenderer::SetColor(UnityEngine.Color) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetColor_mD19F4B2314FD9820902AF6ED1F0392FC78447C06 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 ___color0, const RuntimeMethod* method) { { CanvasRenderer_SetColor_Injected_mA64D7935C130EDFCB8D9C1DF27F67C8EF6F36CCE(__this, (Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *)(&___color0), /*hidden argument*/NULL); return; } } // UnityEngine.Color UnityEngine.CanvasRenderer::GetColor() extern "C" IL2CPP_METHOD_ATTR Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 CanvasRenderer_GetColor_m841EC074805A87FBD6D3EF7A17BEA2476AEBA31D (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 V_0; memset(&V_0, 0, sizeof(V_0)); { CanvasRenderer_GetColor_Injected_mD90AE649D248DA886C8DB085FC27B7134399F68A(__this, (Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *)(&V_0), /*hidden argument*/NULL); Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 L_0 = V_0; return L_0; } } // System.Void UnityEngine.CanvasRenderer::EnableRectClipping(UnityEngine.Rect) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_EnableRectClipping_m7C409436632B57EEC761606E22408355D8197397 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Rect_t35B976DE901B5423C11705E156938EA27AB402CE ___rect0, const RuntimeMethod* method) { { CanvasRenderer_EnableRectClipping_Injected_mB430FAA285D77D2EA776CA90D3B1179DE637B20D(__this, (Rect_t35B976DE901B5423C11705E156938EA27AB402CE *)(&___rect0), /*hidden argument*/NULL); return; } } // System.Void UnityEngine.CanvasRenderer::DisableRectClipping() extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_DisableRectClipping_m67C4FF4EF6888518AC4B9B8CE256DC761DF08D42 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { typedef void (*CanvasRenderer_DisableRectClipping_m67C4FF4EF6888518AC4B9B8CE256DC761DF08D42_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *); static CanvasRenderer_DisableRectClipping_m67C4FF4EF6888518AC4B9B8CE256DC761DF08D42_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_DisableRectClipping_m67C4FF4EF6888518AC4B9B8CE256DC761DF08D42_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::DisableRectClipping()"); _il2cpp_icall_func(__this); } // System.Void UnityEngine.CanvasRenderer::SetMaterial(UnityEngine.Material,System.Int32) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetMaterial_m9851A87FA12E2CD1321BB971953E899292EC4707 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * ___material0, int32_t ___index1, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SetMaterial_m9851A87FA12E2CD1321BB971953E899292EC4707_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 *, int32_t); static CanvasRenderer_SetMaterial_m9851A87FA12E2CD1321BB971953E899292EC4707_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SetMaterial_m9851A87FA12E2CD1321BB971953E899292EC4707_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SetMaterial(UnityEngine.Material,System.Int32)"); _il2cpp_icall_func(__this, ___material0, ___index1); } // System.Void UnityEngine.CanvasRenderer::SetPopMaterial(UnityEngine.Material,System.Int32) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetPopMaterial_m4772792D80E04FF3B3F5BA0B65AF94F3BE326A2C (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * ___material0, int32_t ___index1, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SetPopMaterial_m4772792D80E04FF3B3F5BA0B65AF94F3BE326A2C_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 *, int32_t); static CanvasRenderer_SetPopMaterial_m4772792D80E04FF3B3F5BA0B65AF94F3BE326A2C_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SetPopMaterial_m4772792D80E04FF3B3F5BA0B65AF94F3BE326A2C_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SetPopMaterial(UnityEngine.Material,System.Int32)"); _il2cpp_icall_func(__this, ___material0, ___index1); } // System.Void UnityEngine.CanvasRenderer::SetTexture(UnityEngine.Texture) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetTexture_m406C073585AF48FD2A880D73419F6E1069BEEA84 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 * ___texture0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SetTexture_m406C073585AF48FD2A880D73419F6E1069BEEA84_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 *); static CanvasRenderer_SetTexture_m406C073585AF48FD2A880D73419F6E1069BEEA84_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SetTexture_m406C073585AF48FD2A880D73419F6E1069BEEA84_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SetTexture(UnityEngine.Texture)"); _il2cpp_icall_func(__this, ___texture0); } // System.Void UnityEngine.CanvasRenderer::SetAlphaTexture(UnityEngine.Texture) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetAlphaTexture_m0DF53B597582D8661411DF84ABF25F995540F34E (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 * ___texture0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SetAlphaTexture_m0DF53B597582D8661411DF84ABF25F995540F34E_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 *); static CanvasRenderer_SetAlphaTexture_m0DF53B597582D8661411DF84ABF25F995540F34E_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SetAlphaTexture_m0DF53B597582D8661411DF84ABF25F995540F34E_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SetAlphaTexture(UnityEngine.Texture)"); _il2cpp_icall_func(__this, ___texture0); } // System.Void UnityEngine.CanvasRenderer::SetMesh(UnityEngine.Mesh) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetMesh_mC87C841A52339C33E5B1C644C70FC9CC9C560988 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Mesh_t6106B8D8E4C691321581AB0445552EC78B947B8C * ___mesh0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SetMesh_mC87C841A52339C33E5B1C644C70FC9CC9C560988_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Mesh_t6106B8D8E4C691321581AB0445552EC78B947B8C *); static CanvasRenderer_SetMesh_mC87C841A52339C33E5B1C644C70FC9CC9C560988_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SetMesh_mC87C841A52339C33E5B1C644C70FC9CC9C560988_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SetMesh(UnityEngine.Mesh)"); _il2cpp_icall_func(__this, ___mesh0); } // System.Void UnityEngine.CanvasRenderer::Clear() extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_Clear_m8D621D571EEE6C2609F18ADF888008273A5A29AC (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, const RuntimeMethod* method) { typedef void (*CanvasRenderer_Clear_m8D621D571EEE6C2609F18ADF888008273A5A29AC_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *); static CanvasRenderer_Clear_m8D621D571EEE6C2609F18ADF888008273A5A29AC_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_Clear_m8D621D571EEE6C2609F18ADF888008273A5A29AC_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::Clear()"); _il2cpp_icall_func(__this); } // System.Void UnityEngine.CanvasRenderer::SetMaterial(UnityEngine.Material,UnityEngine.Texture) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetMaterial_mD407C670DBA743283F32581586B5DD51272B08C7 (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * ___material0, Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 * ___texture1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (CanvasRenderer_SetMaterial_mD407C670DBA743283F32581586B5DD51272B08C7_MetadataUsageId); s_Il2CppMethodInitialized = true; } { int32_t L_0 = CanvasRenderer_get_materialCount_m5C0C1E7CC3DAE4B14E29A36E9890F92C0DACC3F5(__this, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Math_tFB388E53C7FDC6FCCF9A19ABF5A4E521FBD52E19_il2cpp_TypeInfo_var); int32_t L_1 = Math_Max_mA99E48BB021F2E4B62D4EA9F52EA6928EED618A2(1, L_0, /*hidden argument*/NULL); CanvasRenderer_set_materialCount_m124AD7592DD6078E097C9FD6CBC5676341DBCA9E(__this, L_1, /*hidden argument*/NULL); Material_tF7DB3BF0C24DEC2FE0CB51E5DF5053D5223C8598 * L_2 = ___material0; CanvasRenderer_SetMaterial_m9851A87FA12E2CD1321BB971953E899292EC4707(__this, L_2, 0, /*hidden argument*/NULL); Texture_t387FE83BB848001FD06B14707AEA6D5A0F6A95F4 * L_3 = ___texture1; CanvasRenderer_SetTexture_m406C073585AF48FD2A880D73419F6E1069BEEA84(__this, L_3, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.CanvasRenderer::SplitUIVertexStreams(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Color32>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Vector4>,System.Collections.Generic.List`1<System.Int32>) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SplitUIVertexStreams_m6398634C55BA494F2D2AE13FC3878E698330AB9F (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___verts0, List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * ___positions1, List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 * ___colors2, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv0S3, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv1S4, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv2S5, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv3S6, List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * ___normals7, List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 * ___tangents8, List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226 * ___indices9, const RuntimeMethod* method) { { List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_0 = ___verts0; List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * L_1 = ___positions1; List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 * L_2 = ___colors2; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_3 = ___uv0S3; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_4 = ___uv1S4; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_5 = ___uv2S5; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_6 = ___uv3S6; List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * L_7 = ___normals7; List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 * L_8 = ___tangents8; CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4(L_0, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_9 = ___verts0; List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226 * L_10 = ___indices9; CanvasRenderer_SplitIndicesStreamsInternal_mE13C66217A4A26239D601CC5FDD1AB8B302D487B(L_9, L_10, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.CanvasRenderer::CreateUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Color32>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Vector4>,System.Collections.Generic.List`1<System.Int32>) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_CreateUIVertexStream_m1826F08D237884FD9817F2E0251FF0F813A2C1CA (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___verts0, List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * ___positions1, List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 * ___colors2, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv0S3, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv1S4, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv2S5, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv3S6, List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * ___normals7, List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 * ___tangents8, List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226 * ___indices9, const RuntimeMethod* method) { { List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_0 = ___verts0; List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * L_1 = ___positions1; List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 * L_2 = ___colors2; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_3 = ___uv0S3; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_4 = ___uv1S4; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_5 = ___uv2S5; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_6 = ___uv3S6; List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * L_7 = ___normals7; List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 * L_8 = ___tangents8; List_1_tE1526161A558A17A39A8B69D8EEF3801393B6226 * L_9 = ___indices9; CanvasRenderer_CreateUIVertexStreamInternal_m5BC57F4F9325EC398216AEA1E53CC21E5C6CA920(L_0, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, L_9, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.CanvasRenderer::AddUIVertexStream(System.Collections.Generic.List`1<UnityEngine.UIVertex>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Color32>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector2>,System.Collections.Generic.List`1<UnityEngine.Vector3>,System.Collections.Generic.List`1<UnityEngine.Vector4>) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_AddUIVertexStream_m58722DF8AED39532C201A0A79A84F10BEC9C7EAB (List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * ___verts0, List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * ___positions1, List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 * ___colors2, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv0S3, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv1S4, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv2S5, List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * ___uv3S6, List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * ___normals7, List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 * ___tangents8, const RuntimeMethod* method) { { List_1_t4CE16E1B496C9FE941554BB47727DFDD7C3D9554 * L_0 = ___verts0; List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * L_1 = ___positions1; List_1_t749ADA5233D9B421293A000DCB83608A24C3D5D5 * L_2 = ___colors2; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_3 = ___uv0S3; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_4 = ___uv1S4; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_5 = ___uv2S5; List_1_t0737D51EB43DAAA1BDC9C2B83B393A4B9B9BE8EB * L_6 = ___uv3S6; List_1_tFCCBEDAA56D8F7598520FB136A9F8D713033D6B5 * L_7 = ___normals7; List_1_tFF4005B40E5BA433006DA11C56DB086B1E2FC955 * L_8 = ___tangents8; CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4(L_0, L_1, L_2, L_3, L_4, L_5, L_6, L_7, L_8, /*hidden argument*/NULL); return; } } // System.Void UnityEngine.CanvasRenderer::SplitIndicesStreamsInternal(System.Object,System.Object) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SplitIndicesStreamsInternal_mE13C66217A4A26239D601CC5FDD1AB8B302D487B (RuntimeObject * ___verts0, RuntimeObject * ___indices1, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SplitIndicesStreamsInternal_mE13C66217A4A26239D601CC5FDD1AB8B302D487B_ftn) (RuntimeObject *, RuntimeObject *); static CanvasRenderer_SplitIndicesStreamsInternal_mE13C66217A4A26239D601CC5FDD1AB8B302D487B_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SplitIndicesStreamsInternal_mE13C66217A4A26239D601CC5FDD1AB8B302D487B_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SplitIndicesStreamsInternal(System.Object,System.Object)"); _il2cpp_icall_func(___verts0, ___indices1); } // System.Void UnityEngine.CanvasRenderer::SplitUIVertexStreamsInternal(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4 (RuntimeObject * ___verts0, RuntimeObject * ___positions1, RuntimeObject * ___colors2, RuntimeObject * ___uv0S3, RuntimeObject * ___uv1S4, RuntimeObject * ___uv2S5, RuntimeObject * ___uv3S6, RuntimeObject * ___normals7, RuntimeObject * ___tangents8, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4_ftn) (RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *); static CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SplitUIVertexStreamsInternal_m845727DA732141F79E070AABA87C4468C3D9AFE4_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SplitUIVertexStreamsInternal(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object)"); _il2cpp_icall_func(___verts0, ___positions1, ___colors2, ___uv0S3, ___uv1S4, ___uv2S5, ___uv3S6, ___normals7, ___tangents8); } // System.Void UnityEngine.CanvasRenderer::CreateUIVertexStreamInternal(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_CreateUIVertexStreamInternal_m5BC57F4F9325EC398216AEA1E53CC21E5C6CA920 (RuntimeObject * ___verts0, RuntimeObject * ___positions1, RuntimeObject * ___colors2, RuntimeObject * ___uv0S3, RuntimeObject * ___uv1S4, RuntimeObject * ___uv2S5, RuntimeObject * ___uv3S6, RuntimeObject * ___normals7, RuntimeObject * ___tangents8, RuntimeObject * ___indices9, const RuntimeMethod* method) { typedef void (*CanvasRenderer_CreateUIVertexStreamInternal_m5BC57F4F9325EC398216AEA1E53CC21E5C6CA920_ftn) (RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *, RuntimeObject *); static CanvasRenderer_CreateUIVertexStreamInternal_m5BC57F4F9325EC398216AEA1E53CC21E5C6CA920_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_CreateUIVertexStreamInternal_m5BC57F4F9325EC398216AEA1E53CC21E5C6CA920_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::CreateUIVertexStreamInternal(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object)"); _il2cpp_icall_func(___verts0, ___positions1, ___colors2, ___uv0S3, ___uv1S4, ___uv2S5, ___uv3S6, ___normals7, ___tangents8, ___indices9); } // System.Void UnityEngine.CanvasRenderer::SetColor_Injected(UnityEngine.Color&) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_SetColor_Injected_mA64D7935C130EDFCB8D9C1DF27F67C8EF6F36CCE (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___color0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_SetColor_Injected_mA64D7935C130EDFCB8D9C1DF27F67C8EF6F36CCE_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *); static CanvasRenderer_SetColor_Injected_mA64D7935C130EDFCB8D9C1DF27F67C8EF6F36CCE_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_SetColor_Injected_mA64D7935C130EDFCB8D9C1DF27F67C8EF6F36CCE_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::SetColor_Injected(UnityEngine.Color&)"); _il2cpp_icall_func(__this, ___color0); } // System.Void UnityEngine.CanvasRenderer::GetColor_Injected(UnityEngine.Color&) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_GetColor_Injected_mD90AE649D248DA886C8DB085FC27B7134399F68A (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 * ___ret0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_GetColor_Injected_mD90AE649D248DA886C8DB085FC27B7134399F68A_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Color_t119BCA590009762C7223FDD3AF9706653AC84ED2 *); static CanvasRenderer_GetColor_Injected_mD90AE649D248DA886C8DB085FC27B7134399F68A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_GetColor_Injected_mD90AE649D248DA886C8DB085FC27B7134399F68A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::GetColor_Injected(UnityEngine.Color&)"); _il2cpp_icall_func(__this, ___ret0); } // System.Void UnityEngine.CanvasRenderer::EnableRectClipping_Injected(UnityEngine.Rect&) extern "C" IL2CPP_METHOD_ATTR void CanvasRenderer_EnableRectClipping_Injected_mB430FAA285D77D2EA776CA90D3B1179DE637B20D (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 * __this, Rect_t35B976DE901B5423C11705E156938EA27AB402CE * ___rect0, const RuntimeMethod* method) { typedef void (*CanvasRenderer_EnableRectClipping_Injected_mB430FAA285D77D2EA776CA90D3B1179DE637B20D_ftn) (CanvasRenderer_tB4D9C9FE77FD5C9C4546FC022D6E956960BC2B72 *, Rect_t35B976DE901B5423C11705E156938EA27AB402CE *); static CanvasRenderer_EnableRectClipping_Injected_mB430FAA285D77D2EA776CA90D3B1179DE637B20D_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (CanvasRenderer_EnableRectClipping_Injected_mB430FAA285D77D2EA776CA90D3B1179DE637B20D_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.CanvasRenderer::EnableRectClipping_Injected(UnityEngine.Rect&)"); _il2cpp_icall_func(__this, ___rect0); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Boolean UnityEngine.RectTransformUtility::RectangleContainsScreenPoint(UnityEngine.RectTransform,UnityEngine.Vector2,UnityEngine.Camera) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_RectangleContainsScreenPoint_mDED32A2F3CD5C623FBA3FFE2C49AEB861D33DE14 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPoint1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_RectangleContainsScreenPoint_mDED32A2F3CD5C623FBA3FFE2C49AEB861D33DE14_MetadataUsageId); s_Il2CppMethodInitialized = true; } bool V_0 = false; { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_0 = ___screenPoint1; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_1 = ___rect0; Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * L_2 = ___cam2; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); bool L_3 = RectTransformUtility_PointInRectangle_m31A8C0A3CFCC0B584A33C3A3F2692EF09D303CEE(L_0, L_1, L_2, /*hidden argument*/NULL); V_0 = L_3; goto IL_000f; } IL_000f: { bool L_4 = V_0; return L_4; } } // System.Boolean UnityEngine.RectTransformUtility::ScreenPointToWorldPointInRectangle(UnityEngine.RectTransform,UnityEngine.Vector2,UnityEngine.Camera,UnityEngine.Vector3&) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_ScreenPointToWorldPointInRectangle_m821FF925C5B70477F153B4C053AE9E36A04A774F (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPoint1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * ___worldPoint3, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_ScreenPointToWorldPointInRectangle_m821FF925C5B70477F153B4C053AE9E36A04A774F_MetadataUsageId); s_Il2CppMethodInitialized = true; } Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 V_0; memset(&V_0, 0, sizeof(V_0)); Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED V_1; memset(&V_1, 0, sizeof(V_1)); float V_2 = 0.0f; bool V_3 = false; { Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * L_0 = ___worldPoint3; IL2CPP_RUNTIME_CLASS_INIT(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_1 = Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8(/*hidden argument*/NULL); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_2 = Vector2_op_Implicit_mD152B6A34B4DB7FFECC2844D74718568FE867D6F(L_1, /*hidden argument*/NULL); *(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 *)L_0 = L_2; Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * L_3 = ___cam2; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_4 = ___screenPoint1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 L_5 = RectTransformUtility_ScreenPointToRay_mB74CED011944E1E7CE3A24C433B9B660C5BADC73(L_3, L_4, /*hidden argument*/NULL); V_0 = L_5; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_6 = ___rect0; NullCheck(L_6); Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357 L_7 = Transform_get_rotation_m3AB90A67403249AECCA5E02BC70FCE8C90FE9FB9(L_6, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_il2cpp_TypeInfo_var); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_8 = Vector3_get_back_mE7EF8625637E6F8B9E6B42A6AE140777C51E02F7(/*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Quaternion_t319F3319A7D43FFA5D819AD6C0A98851F0095357_il2cpp_TypeInfo_var); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_9 = Quaternion_op_Multiply_mD5999DE317D808808B72E58E7A978C4C0995879C(L_7, L_8, /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_10 = ___rect0; NullCheck(L_10); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_11 = Transform_get_position_mF54C3A064F7C8E24F1C56EE128728B2E4485E294(L_10, /*hidden argument*/NULL); Plane__ctor_m6535EAD5E675627C2533962F1F7890CBFA2BA44A((Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED *)(&V_1), L_9, L_11, /*hidden argument*/NULL); Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 L_12 = V_0; bool L_13 = Plane_Raycast_m04E61D7C78A5DA70F4F73F9805ABB54177B799A9((Plane_t0903921088DEEDE1BCDEA5BF279EDBCFC9679AED *)(&V_1), L_12, (float*)(&V_2), /*hidden argument*/NULL); if (L_13) { goto IL_004c; } } { V_3 = (bool)0; goto IL_0061; } IL_004c: { Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * L_14 = ___worldPoint3; float L_15 = V_2; Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_16 = Ray_GetPoint_mE8830D3BA68A184AD70514428B75F5664105ED08((Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 *)(&V_0), L_15, /*hidden argument*/NULL); *(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 *)L_14 = L_16; V_3 = (bool)1; goto IL_0061; } IL_0061: { bool L_17 = V_3; return L_17; } } // System.Boolean UnityEngine.RectTransformUtility::ScreenPointToLocalPointInRectangle(UnityEngine.RectTransform,UnityEngine.Vector2,UnityEngine.Camera,UnityEngine.Vector2&) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_ScreenPointToLocalPointInRectangle_m2C389D4DCBB3CADB51A793702F13DF7CE837E153 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPoint1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___localPoint3, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_ScreenPointToLocalPointInRectangle_m2C389D4DCBB3CADB51A793702F13DF7CE837E153_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 V_0; memset(&V_0, 0, sizeof(V_0)); bool V_1 = false; { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * L_0 = ___localPoint3; IL2CPP_RUNTIME_CLASS_INIT(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_1 = Vector2_get_zero_mFE0C3213BB698130D6C5247AB4B887A59074D0A8(/*hidden argument*/NULL); *(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)L_0 = L_1; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_2 = ___rect0; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_3 = ___screenPoint1; Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * L_4 = ___cam2; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); bool L_5 = RectTransformUtility_ScreenPointToWorldPointInRectangle_m821FF925C5B70477F153B4C053AE9E36A04A774F(L_2, L_3, L_4, (Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 *)(&V_0), /*hidden argument*/NULL); if (!L_5) { goto IL_0035; } } { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * L_6 = ___localPoint3; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_7 = ___rect0; Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_8 = V_0; NullCheck(L_7); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_9 = Transform_InverseTransformPoint_mB6E3145F20B531B4A781C194BAC43A8255C96C47(L_7, L_8, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_10 = Vector2_op_Implicit_mEA1F75961E3D368418BA8CEB9C40E55C25BA3C28(L_9, /*hidden argument*/NULL); *(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)L_6 = L_10; V_1 = (bool)1; goto IL_003c; } IL_0035: { V_1 = (bool)0; goto IL_003c; } IL_003c: { bool L_11 = V_1; return L_11; } } // UnityEngine.Ray UnityEngine.RectTransformUtility::ScreenPointToRay(UnityEngine.Camera,UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 RectTransformUtility_ScreenPointToRay_mB74CED011944E1E7CE3A24C433B9B660C5BADC73 (Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam0, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPos1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_ScreenPointToRay_mB74CED011944E1E7CE3A24C433B9B660C5BADC73_MetadataUsageId); s_Il2CppMethodInitialized = true; } Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 V_0; memset(&V_0, 0, sizeof(V_0)); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 V_1; memset(&V_1, 0, sizeof(V_1)); { Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * L_0 = ___cam0; IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_1 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_0, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_001f; } } { Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * L_2 = ___cam0; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_3 = ___screenPos1; IL2CPP_RUNTIME_CLASS_INIT(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_4 = Vector2_op_Implicit_mD152B6A34B4DB7FFECC2844D74718568FE867D6F(L_3, /*hidden argument*/NULL); NullCheck(L_2); Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 L_5 = Camera_ScreenPointToRay_m27638E78502DB6D6D7113F81AF7C210773B828F3(L_2, L_4, /*hidden argument*/NULL); V_0 = L_5; goto IL_004a; } IL_001f: { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_6 = ___screenPos1; IL2CPP_RUNTIME_CLASS_INIT(Vector2_tA85D2DD88578276CA8A8796756458277E72D073D_il2cpp_TypeInfo_var); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_7 = Vector2_op_Implicit_mD152B6A34B4DB7FFECC2844D74718568FE867D6F(L_6, /*hidden argument*/NULL); V_1 = L_7; Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 * L_8 = (&V_1); float L_9 = L_8->get_z_4(); L_8->set_z_4(((float)il2cpp_codegen_subtract((float)L_9, (float)(100.0f)))); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_10 = V_1; IL2CPP_RUNTIME_CLASS_INIT(Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720_il2cpp_TypeInfo_var); Vector3_tDCF05E21F632FE2BA260C06E0D10CA81513E6720 L_11 = Vector3_get_forward_m3E2E192B3302130098738C308FA1EE1439449D0D(/*hidden argument*/NULL); Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 L_12; memset(&L_12, 0, sizeof(L_12)); Ray__ctor_m695D219349B8AA4C82F96C55A27D384C07736F6B((&L_12), L_10, L_11, /*hidden argument*/NULL); V_0 = L_12; goto IL_004a; } IL_004a: { Ray_tE2163D4CB3E6B267E29F8ABE41684490E4A614B2 L_13 = V_0; return L_13; } } // System.Void UnityEngine.RectTransformUtility::FlipLayoutOnAxis(UnityEngine.RectTransform,System.Int32,System.Boolean,System.Boolean) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_FlipLayoutOnAxis_mFECCA330C80845D0B75829C7DD242688911006AE (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, int32_t ___axis1, bool ___keepPositioning2, bool ___recursive3, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_FlipLayoutOnAxis_mFECCA330C80845D0B75829C7DD242688911006AE_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * V_1 = NULL; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D V_2; memset(&V_2, 0, sizeof(V_2)); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D V_3; memset(&V_3, 0, sizeof(V_3)); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D V_4; memset(&V_4, 0, sizeof(V_4)); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D V_5; memset(&V_5, 0, sizeof(V_5)); float V_6 = 0.0f; { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_0 = ___rect0; IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_mBC2401774F3BE33E8CF6F0A8148E66C95D6CFF1C(L_0, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { goto IL_00f3; } IL_0012: { bool L_2 = ___recursive3; if (!L_2) { goto IL_0055; } } { V_0 = 0; goto IL_0048; } IL_0020: { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_3 = ___rect0; int32_t L_4 = V_0; NullCheck(L_3); Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * L_5 = Transform_GetChild_mC86B9B61E4EC086A571B09EA7A33FFBF50DF52D3(L_3, L_4, /*hidden argument*/NULL); V_1 = ((RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 *)IsInstSealed((RuntimeObject*)L_5, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20_il2cpp_TypeInfo_var)); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_6 = V_1; IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_7 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_6, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_7) { goto IL_0043; } } { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_8 = V_1; int32_t L_9 = ___axis1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutOnAxis_mFECCA330C80845D0B75829C7DD242688911006AE(L_8, L_9, (bool)0, (bool)1, /*hidden argument*/NULL); } IL_0043: { int32_t L_10 = V_0; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_10, (int32_t)1)); } IL_0048: { int32_t L_11 = V_0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_12 = ___rect0; NullCheck(L_12); int32_t L_13 = Transform_get_childCount_m7665D779DCDB6B175FB52A254276CDF0C384A724(L_12, /*hidden argument*/NULL); if ((((int32_t)L_11) < ((int32_t)L_13))) { goto IL_0020; } } { } IL_0055: { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_14 = ___rect0; NullCheck(L_14); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_15 = RectTransform_get_pivot_mA5BEEE2069ACA7C0C717530EED3E7D811D46C463(L_14, /*hidden argument*/NULL); V_2 = L_15; int32_t L_16 = ___axis1; int32_t L_17 = ___axis1; float L_18 = Vector2_get_Item_m67344A67120E48C32D9419E24BA7AED29F063379((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_2), L_17, /*hidden argument*/NULL); Vector2_set_Item_m2335DC41E2BB7E64C21CDF0EEDE64FFB56E7ABD1((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_2), L_16, ((float)il2cpp_codegen_subtract((float)(1.0f), (float)L_18)), /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_19 = ___rect0; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_20 = V_2; NullCheck(L_19); RectTransform_set_pivot_mB791A383B3C870B9CBD7BC51B2C95711C88E9DCF(L_19, L_20, /*hidden argument*/NULL); bool L_21 = ___keepPositioning2; if (!L_21) { goto IL_0084; } } { goto IL_00f3; } IL_0084: { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_22 = ___rect0; NullCheck(L_22); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_23 = RectTransform_get_anchoredPosition_mCB2171DBADBC572F354CCFE3ACA19F9506F97907(L_22, /*hidden argument*/NULL); V_3 = L_23; int32_t L_24 = ___axis1; int32_t L_25 = ___axis1; float L_26 = Vector2_get_Item_m67344A67120E48C32D9419E24BA7AED29F063379((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_3), L_25, /*hidden argument*/NULL); Vector2_set_Item_m2335DC41E2BB7E64C21CDF0EEDE64FFB56E7ABD1((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_3), L_24, ((-L_26)), /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_27 = ___rect0; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_28 = V_3; NullCheck(L_27); RectTransform_set_anchoredPosition_m4DD45DB1A97734A1F3A81E5F259638ECAF35962F(L_27, L_28, /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_29 = ___rect0; NullCheck(L_29); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_30 = RectTransform_get_anchorMin_mB62D77CAC5A2A086320638AE7DF08135B7028744(L_29, /*hidden argument*/NULL); V_4 = L_30; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_31 = ___rect0; NullCheck(L_31); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_32 = RectTransform_get_anchorMax_m1E51C211FBB32326C884375C9F1E8E8221E5C086(L_31, /*hidden argument*/NULL); V_5 = L_32; int32_t L_33 = ___axis1; float L_34 = Vector2_get_Item_m67344A67120E48C32D9419E24BA7AED29F063379((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_4), L_33, /*hidden argument*/NULL); V_6 = L_34; int32_t L_35 = ___axis1; int32_t L_36 = ___axis1; float L_37 = Vector2_get_Item_m67344A67120E48C32D9419E24BA7AED29F063379((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_5), L_36, /*hidden argument*/NULL); Vector2_set_Item_m2335DC41E2BB7E64C21CDF0EEDE64FFB56E7ABD1((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_4), L_35, ((float)il2cpp_codegen_subtract((float)(1.0f), (float)L_37)), /*hidden argument*/NULL); int32_t L_38 = ___axis1; float L_39 = V_6; Vector2_set_Item_m2335DC41E2BB7E64C21CDF0EEDE64FFB56E7ABD1((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_5), L_38, ((float)il2cpp_codegen_subtract((float)(1.0f), (float)L_39)), /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_40 = ___rect0; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_41 = V_4; NullCheck(L_40); RectTransform_set_anchorMin_mE965F5B0902C2554635010A5752728414A57020A(L_40, L_41, /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_42 = ___rect0; Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_43 = V_5; NullCheck(L_42); RectTransform_set_anchorMax_m55EEF00D9E42FE542B5346D7CEDAF9248736F7D3(L_42, L_43, /*hidden argument*/NULL); } IL_00f3: { return; } } // System.Void UnityEngine.RectTransformUtility::FlipLayoutAxes(UnityEngine.RectTransform,System.Boolean,System.Boolean) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_FlipLayoutAxes_mF5D9BF9F0EACBC972A22C937FD21B610410EB956 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect0, bool ___keepPositioning1, bool ___recursive2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_FlipLayoutAxes_mF5D9BF9F0EACBC972A22C937FD21B610410EB956_MetadataUsageId); s_Il2CppMethodInitialized = true; } int32_t V_0 = 0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * V_1 = NULL; { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_0 = ___rect0; IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_1 = Object_op_Equality_mBC2401774F3BE33E8CF6F0A8148E66C95D6CFF1C(L_0, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_1) { goto IL_0012; } } { goto IL_00b4; } IL_0012: { bool L_2 = ___recursive2; if (!L_2) { goto IL_0054; } } { V_0 = 0; goto IL_0047; } IL_0020: { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_3 = ___rect0; int32_t L_4 = V_0; NullCheck(L_3); Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * L_5 = Transform_GetChild_mC86B9B61E4EC086A571B09EA7A33FFBF50DF52D3(L_3, L_4, /*hidden argument*/NULL); V_1 = ((RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 *)IsInstSealed((RuntimeObject*)L_5, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20_il2cpp_TypeInfo_var)); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_6 = V_1; IL2CPP_RUNTIME_CLASS_INIT(Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0_il2cpp_TypeInfo_var); bool L_7 = Object_op_Inequality_m31EF58E217E8F4BDD3E409DEF79E1AEE95874FC1(L_6, (Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *)NULL, /*hidden argument*/NULL); if (!L_7) { goto IL_0042; } } { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_8 = V_1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); RectTransformUtility_FlipLayoutAxes_mF5D9BF9F0EACBC972A22C937FD21B610410EB956(L_8, (bool)0, (bool)1, /*hidden argument*/NULL); } IL_0042: { int32_t L_9 = V_0; V_0 = ((int32_t)il2cpp_codegen_add((int32_t)L_9, (int32_t)1)); } IL_0047: { int32_t L_10 = V_0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_11 = ___rect0; NullCheck(L_11); int32_t L_12 = Transform_get_childCount_m7665D779DCDB6B175FB52A254276CDF0C384A724(L_11, /*hidden argument*/NULL); if ((((int32_t)L_10) < ((int32_t)L_12))) { goto IL_0020; } } { } IL_0054: { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_13 = ___rect0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_14 = ___rect0; NullCheck(L_14); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_15 = RectTransform_get_pivot_mA5BEEE2069ACA7C0C717530EED3E7D811D46C463(L_14, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_16 = RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14(L_15, /*hidden argument*/NULL); NullCheck(L_13); RectTransform_set_pivot_mB791A383B3C870B9CBD7BC51B2C95711C88E9DCF(L_13, L_16, /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_17 = ___rect0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_18 = ___rect0; NullCheck(L_18); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_19 = RectTransform_get_sizeDelta_mDA0A3E73679143B1B52CE2F9A417F90CB9F3DAFF(L_18, /*hidden argument*/NULL); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_20 = RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14(L_19, /*hidden argument*/NULL); NullCheck(L_17); RectTransform_set_sizeDelta_m7729BA56325BA667F0F7D60D642124F7909F1302(L_17, L_20, /*hidden argument*/NULL); bool L_21 = ___keepPositioning1; if (!L_21) { goto IL_0081; } } { goto IL_00b4; } IL_0081: { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_22 = ___rect0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_23 = ___rect0; NullCheck(L_23); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_24 = RectTransform_get_anchoredPosition_mCB2171DBADBC572F354CCFE3ACA19F9506F97907(L_23, /*hidden argument*/NULL); IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_25 = RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14(L_24, /*hidden argument*/NULL); NullCheck(L_22); RectTransform_set_anchoredPosition_m4DD45DB1A97734A1F3A81E5F259638ECAF35962F(L_22, L_25, /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_26 = ___rect0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_27 = ___rect0; NullCheck(L_27); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_28 = RectTransform_get_anchorMin_mB62D77CAC5A2A086320638AE7DF08135B7028744(L_27, /*hidden argument*/NULL); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_29 = RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14(L_28, /*hidden argument*/NULL); NullCheck(L_26); RectTransform_set_anchorMin_mE965F5B0902C2554635010A5752728414A57020A(L_26, L_29, /*hidden argument*/NULL); RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_30 = ___rect0; RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_31 = ___rect0; NullCheck(L_31); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_32 = RectTransform_get_anchorMax_m1E51C211FBB32326C884375C9F1E8E8221E5C086(L_31, /*hidden argument*/NULL); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_33 = RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14(L_32, /*hidden argument*/NULL); NullCheck(L_30); RectTransform_set_anchorMax_m55EEF00D9E42FE542B5346D7CEDAF9248736F7D3(L_30, L_33, /*hidden argument*/NULL); } IL_00b4: { return; } } // UnityEngine.Vector2 UnityEngine.RectTransformUtility::GetTransposed(UnityEngine.Vector2) extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransformUtility_GetTransposed_m405847E48935C6439CFADED4188B6F3BEE55FC14 (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___input0, const RuntimeMethod* method) { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D V_0; memset(&V_0, 0, sizeof(V_0)); { float L_0 = (&___input0)->get_y_1(); float L_1 = (&___input0)->get_x_0(); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_2; memset(&L_2, 0, sizeof(L_2)); Vector2__ctor_mEE8FB117AB1F8DB746FB8B3EB4C0DA3BF2A230D0((&L_2), L_0, L_1, /*hidden argument*/NULL); V_0 = L_2; goto IL_001a; } IL_001a: { Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_3 = V_0; return L_3; } } // UnityEngine.Vector2 UnityEngine.RectTransformUtility::PixelAdjustPoint(UnityEngine.Vector2,UnityEngine.Transform,UnityEngine.Canvas) extern "C" IL2CPP_METHOD_ATTR Vector2_tA85D2DD88578276CA8A8796756458277E72D073D RectTransformUtility_PixelAdjustPoint_m9B5E7F4F2EB55A49670316CBE4D8923154054573 (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___point0, Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * ___elementTransform1, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * ___canvas2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_PixelAdjustPoint_m9B5E7F4F2EB55A49670316CBE4D8923154054573_MetadataUsageId); s_Il2CppMethodInitialized = true; } Vector2_tA85D2DD88578276CA8A8796756458277E72D073D V_0; memset(&V_0, 0, sizeof(V_0)); { Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * L_0 = ___elementTransform1; Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * L_1 = ___canvas2; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); RectTransformUtility_PixelAdjustPoint_Injected_m7F2640515030E47B1B8227306BFED31F733C9B8B((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&___point0), L_0, L_1, (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&V_0), /*hidden argument*/NULL); Vector2_tA85D2DD88578276CA8A8796756458277E72D073D L_2 = V_0; return L_2; } } // UnityEngine.Rect UnityEngine.RectTransformUtility::PixelAdjustRect(UnityEngine.RectTransform,UnityEngine.Canvas) extern "C" IL2CPP_METHOD_ATTR Rect_t35B976DE901B5423C11705E156938EA27AB402CE RectTransformUtility_PixelAdjustRect_m320399756E1AD411CFECB3E11867806E73A0DE49 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rectTransform0, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * ___canvas1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_PixelAdjustRect_m320399756E1AD411CFECB3E11867806E73A0DE49_MetadataUsageId); s_Il2CppMethodInitialized = true; } Rect_t35B976DE901B5423C11705E156938EA27AB402CE V_0; memset(&V_0, 0, sizeof(V_0)); { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_0 = ___rectTransform0; Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * L_1 = ___canvas1; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); RectTransformUtility_PixelAdjustRect_Injected_m2172A105E834E9F0B292508EF544A68ED257A317(L_0, L_1, (Rect_t35B976DE901B5423C11705E156938EA27AB402CE *)(&V_0), /*hidden argument*/NULL); Rect_t35B976DE901B5423C11705E156938EA27AB402CE L_2 = V_0; return L_2; } } // System.Boolean UnityEngine.RectTransformUtility::PointInRectangle(UnityEngine.Vector2,UnityEngine.RectTransform,UnityEngine.Camera) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_PointInRectangle_m31A8C0A3CFCC0B584A33C3A3F2692EF09D303CEE (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D ___screenPoint0, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility_PointInRectangle_m31A8C0A3CFCC0B584A33C3A3F2692EF09D303CEE_MetadataUsageId); s_Il2CppMethodInitialized = true; } { RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * L_0 = ___rect1; Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * L_1 = ___cam2; IL2CPP_RUNTIME_CLASS_INIT(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var); bool L_2 = RectTransformUtility_PointInRectangle_Injected_m42DCFCCED1ABCAE24B543ABD1903291A3A186B2D((Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *)(&___screenPoint0), L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.Void UnityEngine.RectTransformUtility::.cctor() extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility__cctor_m1DCF0D49797698D7D4FBF3EF83B5DEC9A5F42851 (const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_method (RectTransformUtility__cctor_m1DCF0D49797698D7D4FBF3EF83B5DEC9A5F42851_MetadataUsageId); s_Il2CppMethodInitialized = true; } { Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28* L_0 = (Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28*)SZArrayNew(Vector3U5BU5D_tB9EC3346CC4A0EA5447D968E84A9AC1F6F372C28_il2cpp_TypeInfo_var, (uint32_t)4); ((RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_StaticFields*)il2cpp_codegen_static_fields_for(RectTransformUtility_t9B90669A72B05A33DD88BEBB817BC9CDBB614BBA_il2cpp_TypeInfo_var))->set_s_Corners_0(L_0); return; } } // System.Void UnityEngine.RectTransformUtility::PixelAdjustPoint_Injected(UnityEngine.Vector2&,UnityEngine.Transform,UnityEngine.Canvas,UnityEngine.Vector2&) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_PixelAdjustPoint_Injected_m7F2640515030E47B1B8227306BFED31F733C9B8B (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___point0, Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA * ___elementTransform1, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * ___canvas2, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___ret3, const RuntimeMethod* method) { typedef void (*RectTransformUtility_PixelAdjustPoint_Injected_m7F2640515030E47B1B8227306BFED31F733C9B8B_ftn) (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *, Transform_tBB9E78A2766C3C83599A8F66EDE7D1FCAFC66EDA *, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *); static RectTransformUtility_PixelAdjustPoint_Injected_m7F2640515030E47B1B8227306BFED31F733C9B8B_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (RectTransformUtility_PixelAdjustPoint_Injected_m7F2640515030E47B1B8227306BFED31F733C9B8B_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.RectTransformUtility::PixelAdjustPoint_Injected(UnityEngine.Vector2&,UnityEngine.Transform,UnityEngine.Canvas,UnityEngine.Vector2&)"); _il2cpp_icall_func(___point0, ___elementTransform1, ___canvas2, ___ret3); } // System.Void UnityEngine.RectTransformUtility::PixelAdjustRect_Injected(UnityEngine.RectTransform,UnityEngine.Canvas,UnityEngine.Rect&) extern "C" IL2CPP_METHOD_ATTR void RectTransformUtility_PixelAdjustRect_Injected_m2172A105E834E9F0B292508EF544A68ED257A317 (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rectTransform0, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 * ___canvas1, Rect_t35B976DE901B5423C11705E156938EA27AB402CE * ___ret2, const RuntimeMethod* method) { typedef void (*RectTransformUtility_PixelAdjustRect_Injected_m2172A105E834E9F0B292508EF544A68ED257A317_ftn) (RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 *, Canvas_tBC28BF1DD8D8499A89B5781505833D3728CF8591 *, Rect_t35B976DE901B5423C11705E156938EA27AB402CE *); static RectTransformUtility_PixelAdjustRect_Injected_m2172A105E834E9F0B292508EF544A68ED257A317_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (RectTransformUtility_PixelAdjustRect_Injected_m2172A105E834E9F0B292508EF544A68ED257A317_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.RectTransformUtility::PixelAdjustRect_Injected(UnityEngine.RectTransform,UnityEngine.Canvas,UnityEngine.Rect&)"); _il2cpp_icall_func(___rectTransform0, ___canvas1, ___ret2); } // System.Boolean UnityEngine.RectTransformUtility::PointInRectangle_Injected(UnityEngine.Vector2&,UnityEngine.RectTransform,UnityEngine.Camera) extern "C" IL2CPP_METHOD_ATTR bool RectTransformUtility_PointInRectangle_Injected_m42DCFCCED1ABCAE24B543ABD1903291A3A186B2D (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D * ___screenPoint0, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 * ___rect1, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 * ___cam2, const RuntimeMethod* method) { typedef bool (*RectTransformUtility_PointInRectangle_Injected_m42DCFCCED1ABCAE24B543ABD1903291A3A186B2D_ftn) (Vector2_tA85D2DD88578276CA8A8796756458277E72D073D *, RectTransform_t285CBD8775B25174B75164F10618F8B9728E1B20 *, Camera_t48B2B9ECB3CE6108A98BF949A1CECF0FE3421F34 *); static RectTransformUtility_PointInRectangle_Injected_m42DCFCCED1ABCAE24B543ABD1903291A3A186B2D_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (RectTransformUtility_PointInRectangle_Injected_m42DCFCCED1ABCAE24B543ABD1903291A3A186B2D_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.RectTransformUtility::PointInRectangle_Injected(UnityEngine.Vector2&,UnityEngine.RectTransform,UnityEngine.Camera)"); bool retVal = _il2cpp_icall_func(___screenPoint0, ___rect1, ___cam2); return retVal; } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // System.Void UnityEngine.UISystemProfilerApi::BeginSample(UnityEngine.UISystemProfilerApi/SampleType) extern "C" IL2CPP_METHOD_ATTR void UISystemProfilerApi_BeginSample_m43EF1B2F9606D5F0C99DF84505C5498AA0CDBB1B (int32_t ___type0, const RuntimeMethod* method) { typedef void (*UISystemProfilerApi_BeginSample_m43EF1B2F9606D5F0C99DF84505C5498AA0CDBB1B_ftn) (int32_t); static UISystemProfilerApi_BeginSample_m43EF1B2F9606D5F0C99DF84505C5498AA0CDBB1B_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (UISystemProfilerApi_BeginSample_m43EF1B2F9606D5F0C99DF84505C5498AA0CDBB1B_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.UISystemProfilerApi::BeginSample(UnityEngine.UISystemProfilerApi/SampleType)"); _il2cpp_icall_func(___type0); } // System.Void UnityEngine.UISystemProfilerApi::EndSample(UnityEngine.UISystemProfilerApi/SampleType) extern "C" IL2CPP_METHOD_ATTR void UISystemProfilerApi_EndSample_mB7DD865D72832D3558931B4E6801999B23F0429A (int32_t ___type0, const RuntimeMethod* method) { typedef void (*UISystemProfilerApi_EndSample_mB7DD865D72832D3558931B4E6801999B23F0429A_ftn) (int32_t); static UISystemProfilerApi_EndSample_mB7DD865D72832D3558931B4E6801999B23F0429A_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (UISystemProfilerApi_EndSample_mB7DD865D72832D3558931B4E6801999B23F0429A_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.UISystemProfilerApi::EndSample(UnityEngine.UISystemProfilerApi/SampleType)"); _il2cpp_icall_func(___type0); } // System.Void UnityEngine.UISystemProfilerApi::AddMarker(System.String,UnityEngine.Object) extern "C" IL2CPP_METHOD_ATTR void UISystemProfilerApi_AddMarker_m9193DB5B08C1B7DD35835D6F0E2DF9DD20483FFA (String_t* ___name0, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 * ___obj1, const RuntimeMethod* method) { typedef void (*UISystemProfilerApi_AddMarker_m9193DB5B08C1B7DD35835D6F0E2DF9DD20483FFA_ftn) (String_t*, Object_tAE11E5E46CD5C37C9F3E8950C00CD8B45666A2D0 *); static UISystemProfilerApi_AddMarker_m9193DB5B08C1B7DD35835D6F0E2DF9DD20483FFA_ftn _il2cpp_icall_func; if (!_il2cpp_icall_func) _il2cpp_icall_func = (UISystemProfilerApi_AddMarker_m9193DB5B08C1B7DD35835D6F0E2DF9DD20483FFA_ftn)il2cpp_codegen_resolve_icall ("UnityEngine.UISystemProfilerApi::AddMarker(System.String,UnityEngine.Object)"); _il2cpp_icall_func(___name0, ___obj1); } #ifdef __clang__ #pragma clang diagnostic pop #endif #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif #ifdef __clang__ #pragma clang diagnostic pop #endif
[ "altutar@davidson.edu" ]
altutar@davidson.edu
90eaf42ce92beac4fb65397d55da2fcf23b672e9
06465dcc5555b938f6fe4505eb3eaa0e806b6666
/Test/Automation/InterceptsFunctionGeneration/RegUnLoadKeyA.cpp
4ed40edfb565230462c3d70026d6c90cd57810b6
[ "MIT" ]
permissive
michaelolson01/Holodeck
c94413b69c0ff355736a8df51e924f2f4733493e
54b97675a73b668f8eec8d9c8a8c7733e1a53db3
refs/heads/master
2022-05-10T01:37:09.187095
2017-11-16T23:23:10
2017-11-16T23:23:10
null
0
0
null
null
null
null
UTF-8
C++
false
false
518
cpp
#include "common.h" BOOL My_RegUnLoadKeyA() { HKEY hKey=NULL; LPCSTR lpSubKey=NULL; LONG returnVal_Real = NULL; LONG returnVal_Intercepted = NULL; DWORD error_Real = 0; DWORD error_Intercepted = 0; disableInterception(); returnVal_Real = RegUnLoadKeyA (hKey,lpSubKey); error_Real = GetLastError(); enableInterception(); returnVal_Intercepted = RegUnLoadKeyA (hKey,lpSubKey); error_Intercepted = GetLastError(); return ((returnVal_Real == returnVal_Intercepted) && (error_Real == error_Intercepted)); }
[ "joebasirico@gmail.com" ]
joebasirico@gmail.com
8a0aaca493f85b8e0c40573e1d4256b33767f2bb
498344cc99a7d49d6cf100044c6d0baa479e3cb8
/Graph/ShortestPath/Bellman-Ford/bellman-ford.cpp
c3e4032b3224410b43136d8d5b589ba51816f21a
[]
no_license
h114mx001/DataStructure
fc657c609fc85aa9c23ec57c5199e6fcc7bf64fa
dd2c7f737032825e2ceaae28203a44791bf3be7b
refs/heads/master
2023-02-18T10:20:03.098741
2021-01-21T18:25:41
2021-01-21T18:25:41
331,710,603
0
0
null
null
null
null
UTF-8
C++
false
false
2,639
cpp
#include <bits/stdc++.h> bool stop = false; bool negativeCycle = false; int distance[100]; int edges, nodes, start, finish; int tracer[100]; //Trace the optimal from a node to another node. std::vector<std::tuple<int,int,int>> edgList; //Edge list void IOInit(){ std::ios::sync_with_stdio(0); std::cin.tie(0); freopen("graph.inp","r",stdin); } void graphRead(){ //Read the graph as a edge list. std::cin >> nodes >> edges >> start >> finish; int a, b, weight; for (int i = 0; i < edges; i++){ std::cin >> a >> b >> weight; edgList.push_back({a,b,weight}); edgList.push_back({b,a,weight}); } } void BellmanFord(){ for (int i = 1; i <= nodes; i++) distance[i] = 9999999; //Init every node has infinity distance distance[start] = 0; //except the start node for (int i = 1; i <= nodes - 1; i++){ //Bellman-Ford algo stop = true; //The boolean plays two roles. //1. It will stop the algorithm if it can not make any distances smaller //2. It can identify whether the graph has a negative cycle or not. for (auto e: edgList){ int a, b, w; std::tie(a,b,w) = e; //unpack the tuple (other way, the edge) if (distance[b] > distance[a] + w){ //Check whether the algo can reduce the distance. distance[b] = distance[a] + w; tracer[b] = a; //The optimal node to go to stop = false; //We should not stop the algorithm because it can reduce more } } if (i == nodes - 1){ //If the algo have to run fully, graph contains a negative cycle negativeCycle = true; return; } if (stop) return; //If there is a negative cycle, or the algo can't reduce anymore } } int main(){ IOInit(); graphRead(); BellmanFord(); if (negativeCycle){ std::cout << "There is a negative cycle in this graph. \n"; } else{ if (distance[finish] == 9999999){ //If we can not reduce the distance to the finish node std::cout << "There aren't any from " << start << " to " << finish << ".\n"; } else{ //Otherwise, we found a path std::cout << "Shortest path from " << start << " to " << finish << ": \n"; std::cout << "With the cost: " << distance[finish] << "\n"; while (start != finish){ //while we reach the finish node std::cout << finish << "<-"; finish = tracer[finish]; //We trace to the best node to go to } std::cout << start << "\n"; } } }
[ "flyablecat179@gmail.com" ]
flyablecat179@gmail.com
a5e1a150ffa9a96a9157f334c84e46b7bd350172
fec6c702f694e49ecc0c0352b5d6932507a427c5
/ds/5/1.cpp
e30e46669e4104140704d598748f3a7e557336a3
[]
no_license
sahilkhose/Lab-Codes
074605a77ebe7e00c7827f07a9bd238f1189332a
547b654ef702074adde4b1b4a9b9d96b9b4ebd8f
refs/heads/master
2022-12-22T00:56:18.861762
2020-09-26T16:39:46
2020-09-26T16:39:46
289,521,111
0
0
null
null
null
null
UTF-8
C++
false
false
1,237
cpp
// 1. Write a program to implement the circular queue using arrays. // Implementation of Circular Queue with counter: #include<iostream> using namespace std; #define QUEUE_SIZE 5 class Queue { int front, rear, counter; int q[QUEUE_SIZE]; public: Queue(); void insert(int item); int del(); void display(); }; Queue::Queue() { counter = 0; front = -1; // latest deleted rear = -1; // latest added } void Queue::insert(int item) { if(counter == QUEUE_SIZE) { cout<<"Queue Overflow"<<endl; return; } rear = (rear + 1) % QUEUE_SIZE; counter++; q[rear] = item; } int Queue::del() { if(counter == 0) return -999; front = (front + 1) % QUEUE_SIZE; counter--; return q[front]; } void Queue::display() { int i; if(counter == 0) { cout<<"Empty queue"<<endl; return; } cout<<"Contents:"<<endl; int j=0; for(i=(front+1)%QUEUE_SIZE; j<counter; i=(i+1)%QUEUE_SIZE, j++) cout<<q[i]<<" "; cout<<endl; } int main() { Queue q; q.insert(5); q.insert(100); q.insert(13878); q.display(); q.del(); q.del(); q.del(); q.display(); q.insert(120); q.insert(12100); q.insert(-1); q.insert(100); q.insert(123); q.insert(13223); q.display(); return 0; }
[ "sahilkhose18@gmail.com" ]
sahilkhose18@gmail.com
5848b158191d12d3866bdefac2903a9a4be5a254
29a1cdf729cfc3c20daa2ad2d439f95c6304f04f
/source/lang/core/code/codeparametertype.cpp
8081d84328735aa9e330854f1eb22e9cb9e09f73
[]
no_license
StanHash/TEA
2a190116ce2fbc180adb94fcfdcd731cc8dec73c
21075f41de5d97ad20e88c963d6a7fe2bd0bb4f5
refs/heads/master
2021-06-21T06:10:16.421968
2017-08-09T00:48:44
2017-08-09T00:48:44
84,768,081
0
0
null
null
null
null
UTF-8
C++
false
false
1,146
cpp
#include "codeparametertype.h" namespace tea { CodeParameterType::CodeParameterType() {} CodeParameterType::CodeParameterType(QString name) : mTypeName(name) {} bool CodeParameterType::isValid() const { return ((!mTypeName.isEmpty()) && (mTypeName != "null")); } QString CodeParameterType::name() const { return mTypeName; } QStringList CodeParameterType::parameterValues(QString parameter) const { auto it = mArguments.find(parameter); if (it != mArguments.end()) return it.value(); return QStringList(); } CodeParameterType CodeParameterType::parseFromString(QString str) { QStringList stringList = str.simplified().split(' '); if (stringList.isEmpty()) return CodeParameterType("null"); QString name = stringList.first(); stringList.removeFirst(); CodeParameterType result(name); for (QString argument : stringList) { QStringList argList = argument.split(':'); if (argList.size() == 2) result.mArguments[argList.at(0)].append(argList.at(1)); // TODO: else err away } return result; } const QMap<QString, QStringList>& CodeParameterType::parameters() const { return mArguments; } } // namespace tea
[ "deindall@outlook.com" ]
deindall@outlook.com
e0cd444b43f8981018e0a8ed4fca480aa54ddc36
71501709864eff17c873abbb97ffabbeba4cb5e3
/llvm8.0.1/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.h
f9102442de935bb2edaf2236792734d2e6e8b32c
[ "NCSA" ]
permissive
LEA0317/LLVM-VideoCore4
d08ba6e6f26f7893709d3285bdbd67442b3e1651
7ae2304339760685e8b5556aacc7e9eee91de05c
refs/heads/master
2022-06-22T15:15:52.112867
2022-06-09T08:45:24
2022-06-09T08:45:24
189,765,789
1
0
NOASSERTION
2019-06-01T18:31:29
2019-06-01T18:31:29
null
UTF-8
C++
false
false
7,642
h
//===-- ProcessKDP.h --------------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef liblldb_ProcessKDP_h_ #define liblldb_ProcessKDP_h_ #include <list> #include <vector> #include "lldb/Core/ThreadSafeValue.h" #include "lldb/Host/HostThread.h" #include "lldb/Target/Process.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/Broadcaster.h" #include "lldb/Utility/ConstString.h" #include "lldb/Utility/Status.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/StringList.h" #include "CommunicationKDP.h" class ThreadKDP; class ProcessKDP : public lldb_private::Process { public: //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const lldb_private::FileSpec *crash_file_path); static void Initialize(); static void DebuggerInitialize(lldb_private::Debugger &debugger); static void Terminate(); static lldb_private::ConstString GetPluginNameStatic(); static const char *GetPluginDescriptionStatic(); //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ ProcessKDP(lldb::TargetSP target_sp, lldb::ListenerSP listener); ~ProcessKDP() override; //------------------------------------------------------------------ // Check if a given Process //------------------------------------------------------------------ bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override; lldb_private::CommandObject *GetPluginCommandObject() override; //------------------------------------------------------------------ // Creating a new process, or attaching to an existing one //------------------------------------------------------------------ lldb_private::Status WillLaunch(lldb_private::Module *module) override; lldb_private::Status DoLaunch(lldb_private::Module *exe_module, lldb_private::ProcessLaunchInfo &launch_info) override; lldb_private::Status WillAttachToProcessWithID(lldb::pid_t pid) override; lldb_private::Status WillAttachToProcessWithName(const char *process_name, bool wait_for_launch) override; lldb_private::Status DoConnectRemote(lldb_private::Stream *strm, llvm::StringRef remote_url) override; lldb_private::Status DoAttachToProcessWithID( lldb::pid_t pid, const lldb_private::ProcessAttachInfo &attach_info) override; lldb_private::Status DoAttachToProcessWithName( const char *process_name, const lldb_private::ProcessAttachInfo &attach_info) override; void DidAttach(lldb_private::ArchSpec &process_arch) override; lldb::addr_t GetImageInfoAddress() override; lldb_private::DynamicLoader *GetDynamicLoader() override; //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ lldb_private::ConstString GetPluginName() override; uint32_t GetPluginVersion() override; //------------------------------------------------------------------ // Process Control //------------------------------------------------------------------ lldb_private::Status WillResume() override; lldb_private::Status DoResume() override; lldb_private::Status DoHalt(bool &caused_stop) override; lldb_private::Status DoDetach(bool keep_stopped) override; lldb_private::Status DoSignal(int signal) override; lldb_private::Status DoDestroy() override; void RefreshStateAfterStop() override; //------------------------------------------------------------------ // Process Queries //------------------------------------------------------------------ bool IsAlive() override; //------------------------------------------------------------------ // Process Memory //------------------------------------------------------------------ size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, lldb_private::Status &error) override; size_t DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size, lldb_private::Status &error) override; lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions, lldb_private::Status &error) override; lldb_private::Status DoDeallocateMemory(lldb::addr_t ptr) override; //---------------------------------------------------------------------- // Process Breakpoints //---------------------------------------------------------------------- lldb_private::Status EnableBreakpointSite(lldb_private::BreakpointSite *bp_site) override; lldb_private::Status DisableBreakpointSite(lldb_private::BreakpointSite *bp_site) override; //---------------------------------------------------------------------- // Process Watchpoints //---------------------------------------------------------------------- lldb_private::Status EnableWatchpoint(lldb_private::Watchpoint *wp, bool notify = true) override; lldb_private::Status DisableWatchpoint(lldb_private::Watchpoint *wp, bool notify = true) override; CommunicationKDP &GetCommunication() { return m_comm; } protected: friend class ThreadKDP; friend class CommunicationKDP; //---------------------------------------------------------------------- // Accessors //---------------------------------------------------------------------- bool IsRunning(lldb::StateType state) { return state == lldb::eStateRunning || IsStepping(state); } bool IsStepping(lldb::StateType state) { return state == lldb::eStateStepping; } bool CanResume(lldb::StateType state) { return state == lldb::eStateStopped; } bool HasExited(lldb::StateType state) { return state == lldb::eStateExited; } bool GetHostArchitecture(lldb_private::ArchSpec &arch); bool ProcessIDIsValid() const; void Clear(); bool UpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list) override; enum { eBroadcastBitAsyncContinue = (1 << 0), eBroadcastBitAsyncThreadShouldExit = (1 << 1) }; lldb::ThreadSP GetKernelThread(); //------------------------------------------------------------------ /// Broadcaster event bits definitions. //------------------------------------------------------------------ CommunicationKDP m_comm; lldb_private::Broadcaster m_async_broadcaster; lldb_private::HostThread m_async_thread; lldb_private::ConstString m_dyld_plugin_name; lldb::addr_t m_kernel_load_addr; lldb::CommandObjectSP m_command_sp; lldb::ThreadWP m_kernel_thread_wp; bool StartAsyncThread(); void StopAsyncThread(); static void *AsyncThread(void *arg); private: //------------------------------------------------------------------ // For ProcessKDP only //------------------------------------------------------------------ DISALLOW_COPY_AND_ASSIGN(ProcessKDP); }; #endif // liblldb_ProcessKDP_h_
[ "kontoshi0317@gmail.com" ]
kontoshi0317@gmail.com
2303c10ef08e810ea7e0d8fa531ea530371d638f
21a22d882e1d8eb34d38accdb752d152f8b9abfb
/Core/WinAPI/Debug/IsPresent.cpp
b740b22bbcce6eeffa708e1c9ec43ea32b994bd2
[]
no_license
tomekjaworski/PELoader
88dfb32823851bbf2838ad3a01e5a5be56c92415
718f8e97e63909eefbd9bad434442e7e8ab70c28
refs/heads/master
2023-04-02T03:16:17.971260
2021-04-13T13:27:52
2021-04-13T13:27:52
357,560,334
5
1
null
null
null
null
UTF-8
C++
false
false
396
cpp
#include "../BasicTypes.hpp" #include "../../Trace/Trace.hpp" #include "Debug.hpp" namespace Core::WinAPI::Debug { // // ###################################################### // /// https://docs.microsoft.com/en-us/windows/win32/api/debugapi/nf-debugapi-isdebuggerpresent WINBASEAPI BOOL WINAPI IsDebuggerPresent( VOID ) { TRACE(); TRACE_NOT_IMPLEMENTED; return TRUE; } }
[ "tjaworski@iis.p.lodz.pl" ]
tjaworski@iis.p.lodz.pl
27038baeeda7bd722ba2e95e875fea4296e7097c
9d1444dabfb76cc6749ca36f715d94e31c8ca88e
/Entrega1/ColaPrioridadImp.cpp
4102918bddba2dfc4806660903f21678571904ad
[]
no_license
brunvez/EntregasA2
478849f0987f353c583caaf48215b7f0ee778541
ccf9d42672a22cf94f660d24f6ed3f81e0e6ca68
refs/heads/master
2021-01-12T17:51:29.235531
2016-12-12T19:53:39
2016-12-12T19:53:39
71,652,147
0
0
null
null
null
null
UTF-8
C++
false
false
2,814
cpp
#ifndef COLAPRIORIDADIMP_CPP #define COLAPRIORIDADIMP_CPP #include "ColaPrioridadImp.h" template <class T, class P> ColaPrioridadImp<T, P>::ColaPrioridadImp(int size) { l = NULL; length = 0; max = size; } template <class T, class P> ColaPrioridadImp<T, P>::~ColaPrioridadImp() { while (l) { NodoListaDD<T, P> * aux = l; l = l->sig; delete aux; } } template<class T, class P> void ColaPrioridadImp<T, P>::Encolar(const T & e, const P & p) { if (EstaLlena()) { int i = 1; NodoListaDD<T, P> * frst = l; while (l) { i++; if (i >= max) { NodoListaDD<T, P> * d = l->sig; l->sig = NULL; length--; delete d; break; } l = l->sig; } l = frst; } if (l) { if (l->prio <= p) { l = new NodoListaDD<T, P>(e, p, l); } else { NodoListaDD<T, P> * frst = l; bool added = false; while (l->sig) { if (p >= l->sig->prio) { l->sig = new NodoListaDD<T, P>(e, p,l->sig); added = true; break; } l = l->sig; } l = frst; if (!added) { // ver como se comporta al agregar ultimo while (l->sig) { l = l->sig; } l->sig = new NodoListaDD<T, P>(e, p); } l = frst; } } else { l = new NodoListaDD<T, P>(e, p); } length++; } template<class T, class P> const T & ColaPrioridadImp<T, P>::Desencolar() { assert(!EstaVacia()); NodoListaDD<T, P> *d = l; T &t = *(new T(l->dato)); l = l->sig; length--; delete d; return t; } template<class T, class P> const T & ColaPrioridadImp<T, P>::Cabeza() { return l->dato; } template<class T, class P> Natural ColaPrioridadImp<T, P>::Largo() const { return length; } template<class T, class P> const T & ColaPrioridadImp<T, P>::ObtenerPrioridad(const T & e) { assert(Pertenece(e)); NodoListaDD<T, P> * aux = l; while (aux) { if (aux->dato == e) return aux->dato; } assert(false); return l->dato; } template<class T, class P> bool ColaPrioridadImp<T, P>::Pertenece(const T & e) { NodoListaDD<T, P> * aux = l; while (aux) { if (aux->dato == e) return true; } return false; } template<class T, class P> bool ColaPrioridadImp<T, P>::EstaVacia() const { return length == 0; } template<class T, class P> bool ColaPrioridadImp<T, P>::EstaLlena() const { return length == max; } template<class T, class P> Puntero<ColaPrioridad<T, P>> ColaPrioridadImp<T, P>::Clon() const { ColaPrioridad<T, P> * c = new ColaPrioridadImp<T, P>(max); NodoListaDD<T, P> * frst = l; while (frst) { c->Encolar(frst->dato, frst->prio); frst = frst->sig; } return Puntero<ColaPrioridad<T, P>>(c); } template<class T, class P> Iterador<T> ColaPrioridadImp<T, P>::ObtenerIterador() const { return Iterador<T>(); } #endif
[ "bruno.vezoli@moove-it.com" ]
bruno.vezoli@moove-it.com
75923e5d14a64f6acadf9bb9317b65b9d308a654
c776476e9d06b3779d744641e758ac3a2c15cddc
/examples/litmus/c/run-scripts/tmp_5/IRWIW+poacquireonces+OnceRelease.c.cbmc.cpp
b998a1a8aa5171131e2e4fc99cd25cb144d1cecc
[]
no_license
ashutosh0gupta/llvm_bmc
aaac7961c723ba6f7ffd77a39559e0e52432eade
0287c4fb180244e6b3c599a9902507f05c8a7234
refs/heads/master
2023-08-02T17:14:06.178723
2023-07-31T10:46:53
2023-07-31T10:46:53
143,100,825
3
4
null
2023-05-25T05:50:55
2018-08-01T03:47:00
C++
UTF-8
C++
false
false
41,337
cpp
// Global variabls: // 0:vars:2 // 2:atom_1_X0_2:1 // 3:atom_3_X0_2:1 // Local global variabls: // 0:thr0:1 // 1:thr1:1 // 2:thr2:1 // 3:thr3:1 #define ADDRSIZE 4 #define LOCALADDRSIZE 4 #define NTHREAD 5 #define NCONTEXT 5 #define ASSUME(stmt) __CPROVER_assume(stmt) #define ASSERT(stmt) __CPROVER_assert(stmt, "error") #define max(a,b) (a>b?a:b) char __get_rng(); char get_rng( char from, char to ) { char ret = __get_rng(); ASSUME(ret >= from && ret <= to); return ret; } char get_rng_th( char from, char to ) { char ret = __get_rng(); ASSUME(ret >= from && ret <= to); return ret; } int main(int argc, char **argv) { // Declare arrays for intial value version in contexts int local_mem[LOCALADDRSIZE]; // Dumping initializations local_mem[0+0] = 0; local_mem[1+0] = 0; local_mem[2+0] = 0; local_mem[3+0] = 0; int cstart[NTHREAD]; int creturn[NTHREAD]; // declare arrays for contexts activity int active[NCONTEXT]; int ctx_used[NCONTEXT]; // declare arrays for intial value version in contexts int meminit_[ADDRSIZE*NCONTEXT]; #define meminit(x,k) meminit_[(x)*NCONTEXT+k] int coinit_[ADDRSIZE*NCONTEXT]; #define coinit(x,k) coinit_[(x)*NCONTEXT+k] int deltainit_[ADDRSIZE*NCONTEXT]; #define deltainit(x,k) deltainit_[(x)*NCONTEXT+k] // declare arrays for running value version in contexts int mem_[ADDRSIZE*NCONTEXT]; #define mem(x,k) mem_[(x)*NCONTEXT+k] int co_[ADDRSIZE*NCONTEXT]; #define co(x,k) co_[(x)*NCONTEXT+k] int delta_[ADDRSIZE*NCONTEXT]; #define delta(x,k) delta_[(x)*NCONTEXT+k] // declare arrays for local buffer and observed writes int buff_[NTHREAD*ADDRSIZE]; #define buff(x,k) buff_[(x)*ADDRSIZE+k] int pw_[NTHREAD*ADDRSIZE]; #define pw(x,k) pw_[(x)*ADDRSIZE+k] // declare arrays for context stamps char cr_[NTHREAD*ADDRSIZE]; #define cr(x,k) cr_[(x)*ADDRSIZE+k] char iw_[NTHREAD*ADDRSIZE]; #define iw(x,k) iw_[(x)*ADDRSIZE+k] char cw_[NTHREAD*ADDRSIZE]; #define cw(x,k) cw_[(x)*ADDRSIZE+k] char cx_[NTHREAD*ADDRSIZE]; #define cx(x,k) cx_[(x)*ADDRSIZE+k] char is_[NTHREAD*ADDRSIZE]; #define is(x,k) is_[(x)*ADDRSIZE+k] char cs_[NTHREAD*ADDRSIZE]; #define cs(x,k) cs_[(x)*ADDRSIZE+k] char crmax_[NTHREAD*ADDRSIZE]; #define crmax(x,k) crmax_[(x)*ADDRSIZE+k] char sforbid_[ADDRSIZE*NCONTEXT]; #define sforbid(x,k) sforbid_[(x)*NCONTEXT+k] // declare arrays for synchronizations int cl[NTHREAD]; int cdy[NTHREAD]; int cds[NTHREAD]; int cdl[NTHREAD]; int cisb[NTHREAD]; int caddr[NTHREAD]; int cctrl[NTHREAD]; __LOCALS__ buff(0,0) = 0; pw(0,0) = 0; cr(0,0) = 0; iw(0,0) = 0; cw(0,0) = 0; cx(0,0) = 0; is(0,0) = 0; cs(0,0) = 0; crmax(0,0) = 0; buff(0,1) = 0; pw(0,1) = 0; cr(0,1) = 0; iw(0,1) = 0; cw(0,1) = 0; cx(0,1) = 0; is(0,1) = 0; cs(0,1) = 0; crmax(0,1) = 0; buff(0,2) = 0; pw(0,2) = 0; cr(0,2) = 0; iw(0,2) = 0; cw(0,2) = 0; cx(0,2) = 0; is(0,2) = 0; cs(0,2) = 0; crmax(0,2) = 0; buff(0,3) = 0; pw(0,3) = 0; cr(0,3) = 0; iw(0,3) = 0; cw(0,3) = 0; cx(0,3) = 0; is(0,3) = 0; cs(0,3) = 0; crmax(0,3) = 0; cl[0] = 0; cdy[0] = 0; cds[0] = 0; cdl[0] = 0; cisb[0] = 0; caddr[0] = 0; cctrl[0] = 0; cstart[0] = get_rng(0,NCONTEXT-1); creturn[0] = get_rng(0,NCONTEXT-1); buff(1,0) = 0; pw(1,0) = 0; cr(1,0) = 0; iw(1,0) = 0; cw(1,0) = 0; cx(1,0) = 0; is(1,0) = 0; cs(1,0) = 0; crmax(1,0) = 0; buff(1,1) = 0; pw(1,1) = 0; cr(1,1) = 0; iw(1,1) = 0; cw(1,1) = 0; cx(1,1) = 0; is(1,1) = 0; cs(1,1) = 0; crmax(1,1) = 0; buff(1,2) = 0; pw(1,2) = 0; cr(1,2) = 0; iw(1,2) = 0; cw(1,2) = 0; cx(1,2) = 0; is(1,2) = 0; cs(1,2) = 0; crmax(1,2) = 0; buff(1,3) = 0; pw(1,3) = 0; cr(1,3) = 0; iw(1,3) = 0; cw(1,3) = 0; cx(1,3) = 0; is(1,3) = 0; cs(1,3) = 0; crmax(1,3) = 0; cl[1] = 0; cdy[1] = 0; cds[1] = 0; cdl[1] = 0; cisb[1] = 0; caddr[1] = 0; cctrl[1] = 0; cstart[1] = get_rng(0,NCONTEXT-1); creturn[1] = get_rng(0,NCONTEXT-1); buff(2,0) = 0; pw(2,0) = 0; cr(2,0) = 0; iw(2,0) = 0; cw(2,0) = 0; cx(2,0) = 0; is(2,0) = 0; cs(2,0) = 0; crmax(2,0) = 0; buff(2,1) = 0; pw(2,1) = 0; cr(2,1) = 0; iw(2,1) = 0; cw(2,1) = 0; cx(2,1) = 0; is(2,1) = 0; cs(2,1) = 0; crmax(2,1) = 0; buff(2,2) = 0; pw(2,2) = 0; cr(2,2) = 0; iw(2,2) = 0; cw(2,2) = 0; cx(2,2) = 0; is(2,2) = 0; cs(2,2) = 0; crmax(2,2) = 0; buff(2,3) = 0; pw(2,3) = 0; cr(2,3) = 0; iw(2,3) = 0; cw(2,3) = 0; cx(2,3) = 0; is(2,3) = 0; cs(2,3) = 0; crmax(2,3) = 0; cl[2] = 0; cdy[2] = 0; cds[2] = 0; cdl[2] = 0; cisb[2] = 0; caddr[2] = 0; cctrl[2] = 0; cstart[2] = get_rng(0,NCONTEXT-1); creturn[2] = get_rng(0,NCONTEXT-1); buff(3,0) = 0; pw(3,0) = 0; cr(3,0) = 0; iw(3,0) = 0; cw(3,0) = 0; cx(3,0) = 0; is(3,0) = 0; cs(3,0) = 0; crmax(3,0) = 0; buff(3,1) = 0; pw(3,1) = 0; cr(3,1) = 0; iw(3,1) = 0; cw(3,1) = 0; cx(3,1) = 0; is(3,1) = 0; cs(3,1) = 0; crmax(3,1) = 0; buff(3,2) = 0; pw(3,2) = 0; cr(3,2) = 0; iw(3,2) = 0; cw(3,2) = 0; cx(3,2) = 0; is(3,2) = 0; cs(3,2) = 0; crmax(3,2) = 0; buff(3,3) = 0; pw(3,3) = 0; cr(3,3) = 0; iw(3,3) = 0; cw(3,3) = 0; cx(3,3) = 0; is(3,3) = 0; cs(3,3) = 0; crmax(3,3) = 0; cl[3] = 0; cdy[3] = 0; cds[3] = 0; cdl[3] = 0; cisb[3] = 0; caddr[3] = 0; cctrl[3] = 0; cstart[3] = get_rng(0,NCONTEXT-1); creturn[3] = get_rng(0,NCONTEXT-1); buff(4,0) = 0; pw(4,0) = 0; cr(4,0) = 0; iw(4,0) = 0; cw(4,0) = 0; cx(4,0) = 0; is(4,0) = 0; cs(4,0) = 0; crmax(4,0) = 0; buff(4,1) = 0; pw(4,1) = 0; cr(4,1) = 0; iw(4,1) = 0; cw(4,1) = 0; cx(4,1) = 0; is(4,1) = 0; cs(4,1) = 0; crmax(4,1) = 0; buff(4,2) = 0; pw(4,2) = 0; cr(4,2) = 0; iw(4,2) = 0; cw(4,2) = 0; cx(4,2) = 0; is(4,2) = 0; cs(4,2) = 0; crmax(4,2) = 0; buff(4,3) = 0; pw(4,3) = 0; cr(4,3) = 0; iw(4,3) = 0; cw(4,3) = 0; cx(4,3) = 0; is(4,3) = 0; cs(4,3) = 0; crmax(4,3) = 0; cl[4] = 0; cdy[4] = 0; cds[4] = 0; cdl[4] = 0; cisb[4] = 0; caddr[4] = 0; cctrl[4] = 0; cstart[4] = get_rng(0,NCONTEXT-1); creturn[4] = get_rng(0,NCONTEXT-1); // Dumping initializations mem(0+0,0) = 0; mem(0+1,0) = 0; mem(2+0,0) = 0; mem(3+0,0) = 0; // Dumping context matching equalities co(0,0) = 0; delta(0,0) = -1; mem(0,1) = meminit(0,1); co(0,1) = coinit(0,1); delta(0,1) = deltainit(0,1); mem(0,2) = meminit(0,2); co(0,2) = coinit(0,2); delta(0,2) = deltainit(0,2); mem(0,3) = meminit(0,3); co(0,3) = coinit(0,3); delta(0,3) = deltainit(0,3); mem(0,4) = meminit(0,4); co(0,4) = coinit(0,4); delta(0,4) = deltainit(0,4); co(1,0) = 0; delta(1,0) = -1; mem(1,1) = meminit(1,1); co(1,1) = coinit(1,1); delta(1,1) = deltainit(1,1); mem(1,2) = meminit(1,2); co(1,2) = coinit(1,2); delta(1,2) = deltainit(1,2); mem(1,3) = meminit(1,3); co(1,3) = coinit(1,3); delta(1,3) = deltainit(1,3); mem(1,4) = meminit(1,4); co(1,4) = coinit(1,4); delta(1,4) = deltainit(1,4); co(2,0) = 0; delta(2,0) = -1; mem(2,1) = meminit(2,1); co(2,1) = coinit(2,1); delta(2,1) = deltainit(2,1); mem(2,2) = meminit(2,2); co(2,2) = coinit(2,2); delta(2,2) = deltainit(2,2); mem(2,3) = meminit(2,3); co(2,3) = coinit(2,3); delta(2,3) = deltainit(2,3); mem(2,4) = meminit(2,4); co(2,4) = coinit(2,4); delta(2,4) = deltainit(2,4); co(3,0) = 0; delta(3,0) = -1; mem(3,1) = meminit(3,1); co(3,1) = coinit(3,1); delta(3,1) = deltainit(3,1); mem(3,2) = meminit(3,2); co(3,2) = coinit(3,2); delta(3,2) = deltainit(3,2); mem(3,3) = meminit(3,3); co(3,3) = coinit(3,3); delta(3,3) = deltainit(3,3); mem(3,4) = meminit(3,4); co(3,4) = coinit(3,4); delta(3,4) = deltainit(3,4); // Dumping thread 1 int ret_thread_1 = 0; cdy[1] = get_rng(0,NCONTEXT-1); ASSUME(cdy[1] >= cstart[1]); T1BLOCK0: // call void @llvm.dbg.value(metadata i8* %arg, metadata !36, metadata !DIExpression()), !dbg !42 // br label %label_1, !dbg !43 goto T1BLOCK1; T1BLOCK1: // call void @llvm.dbg.label(metadata !41), !dbg !44 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !37, metadata !DIExpression()), !dbg !45 // call void @llvm.dbg.value(metadata i64 2, metadata !40, metadata !DIExpression()), !dbg !45 // store atomic i64 2, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !46 // ST: Guess iw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STIW _l20_c3 old_cw = cw(1,0); cw(1,0) = get_rng(0,NCONTEXT-1);// 1 ASSIGN STCOM _l20_c3 // Check ASSUME(active[iw(1,0)] == 1); ASSUME(active[cw(1,0)] == 1); ASSUME(sforbid(0,cw(1,0))== 0); ASSUME(iw(1,0) >= 0); ASSUME(iw(1,0) >= 0); ASSUME(cw(1,0) >= iw(1,0)); ASSUME(cw(1,0) >= old_cw); ASSUME(cw(1,0) >= cr(1,0)); ASSUME(cw(1,0) >= cl[1]); ASSUME(cw(1,0) >= cisb[1]); ASSUME(cw(1,0) >= cdy[1]); ASSUME(cw(1,0) >= cdl[1]); ASSUME(cw(1,0) >= cds[1]); ASSUME(cw(1,0) >= cctrl[1]); ASSUME(cw(1,0) >= caddr[1]); // Update caddr[1] = max(caddr[1],0); buff(1,0) = 2; mem(0,cw(1,0)) = 2; co(0,cw(1,0))+=1; delta(0,cw(1,0)) = -1; ASSUME(creturn[1] >= cw(1,0)); // ret i8* null, !dbg !47 ret_thread_1 = (- 1); goto T1BLOCK_END; T1BLOCK_END: // Dumping thread 2 int ret_thread_2 = 0; cdy[2] = get_rng(0,NCONTEXT-1); ASSUME(cdy[2] >= cstart[2]); T2BLOCK0: // call void @llvm.dbg.value(metadata i8* %arg, metadata !50, metadata !DIExpression()), !dbg !60 // br label %label_2, !dbg !48 goto T2BLOCK1; T2BLOCK1: // call void @llvm.dbg.label(metadata !59), !dbg !62 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !52, metadata !DIExpression()), !dbg !63 // %0 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) acquire, align 8, !dbg !51 // LD: Guess // : Acquire old_cr = cr(2,0); cr(2,0) = get_rng(0,NCONTEXT-1);// 2 ASSIGN LDCOM _l26_c15 // Check ASSUME(active[cr(2,0)] == 2); ASSUME(cr(2,0) >= iw(2,0)); ASSUME(cr(2,0) >= 0); ASSUME(cr(2,0) >= cdy[2]); ASSUME(cr(2,0) >= cisb[2]); ASSUME(cr(2,0) >= cdl[2]); ASSUME(cr(2,0) >= cl[2]); ASSUME(cr(2,0) >= cx(2,0)); ASSUME(cr(2,0) >= cs(2,0+0)); ASSUME(cr(2,0) >= cs(2,0+1)); ASSUME(cr(2,0) >= cs(2,2+0)); ASSUME(cr(2,0) >= cs(2,3+0)); // Update creg_r0 = cr(2,0); crmax(2,0) = max(crmax(2,0),cr(2,0)); caddr[2] = max(caddr[2],0); if(cr(2,0) < cw(2,0)) { r0 = buff(2,0); ASSUME((!(( (cw(2,0) < 1) && (1 < crmax(2,0)) )))||(sforbid(0,1)> 0)); ASSUME((!(( (cw(2,0) < 2) && (2 < crmax(2,0)) )))||(sforbid(0,2)> 0)); ASSUME((!(( (cw(2,0) < 3) && (3 < crmax(2,0)) )))||(sforbid(0,3)> 0)); ASSUME((!(( (cw(2,0) < 4) && (4 < crmax(2,0)) )))||(sforbid(0,4)> 0)); } else { if(pw(2,0) != co(0,cr(2,0))) { ASSUME(cr(2,0) >= old_cr); } pw(2,0) = co(0,cr(2,0)); r0 = mem(0,cr(2,0)); } cl[2] = max(cl[2],cr(2,0)); ASSUME(creturn[2] >= cr(2,0)); // call void @llvm.dbg.value(metadata i64 %0, metadata !54, metadata !DIExpression()), !dbg !63 // %conv = trunc i64 %0 to i32, !dbg !52 // call void @llvm.dbg.value(metadata i32 %conv, metadata !51, metadata !DIExpression()), !dbg !60 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !55, metadata !DIExpression()), !dbg !66 // call void @llvm.dbg.value(metadata i64 1, metadata !57, metadata !DIExpression()), !dbg !66 // store atomic i64 1, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !54 // ST: Guess iw(2,0+1*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l27_c3 old_cw = cw(2,0+1*1); cw(2,0+1*1) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l27_c3 // Check ASSUME(active[iw(2,0+1*1)] == 2); ASSUME(active[cw(2,0+1*1)] == 2); ASSUME(sforbid(0+1*1,cw(2,0+1*1))== 0); ASSUME(iw(2,0+1*1) >= 0); ASSUME(iw(2,0+1*1) >= 0); ASSUME(cw(2,0+1*1) >= iw(2,0+1*1)); ASSUME(cw(2,0+1*1) >= old_cw); ASSUME(cw(2,0+1*1) >= cr(2,0+1*1)); ASSUME(cw(2,0+1*1) >= cl[2]); ASSUME(cw(2,0+1*1) >= cisb[2]); ASSUME(cw(2,0+1*1) >= cdy[2]); ASSUME(cw(2,0+1*1) >= cdl[2]); ASSUME(cw(2,0+1*1) >= cds[2]); ASSUME(cw(2,0+1*1) >= cctrl[2]); ASSUME(cw(2,0+1*1) >= caddr[2]); // Update caddr[2] = max(caddr[2],0); buff(2,0+1*1) = 1; mem(0+1*1,cw(2,0+1*1)) = 1; co(0+1*1,cw(2,0+1*1))+=1; delta(0+1*1,cw(2,0+1*1)) = -1; ASSUME(creturn[2] >= cw(2,0+1*1)); // %cmp = icmp eq i32 %conv, 2, !dbg !55 creg__r0__2_ = max(0,creg_r0); // %conv1 = zext i1 %cmp to i32, !dbg !55 // call void @llvm.dbg.value(metadata i32 %conv1, metadata !58, metadata !DIExpression()), !dbg !60 // store i32 %conv1, i32* @atom_1_X0_2, align 4, !dbg !56, !tbaa !57 // ST: Guess iw(2,2) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STIW _l29_c15 old_cw = cw(2,2); cw(2,2) = get_rng(0,NCONTEXT-1);// 2 ASSIGN STCOM _l29_c15 // Check ASSUME(active[iw(2,2)] == 2); ASSUME(active[cw(2,2)] == 2); ASSUME(sforbid(2,cw(2,2))== 0); ASSUME(iw(2,2) >= creg__r0__2_); ASSUME(iw(2,2) >= 0); ASSUME(cw(2,2) >= iw(2,2)); ASSUME(cw(2,2) >= old_cw); ASSUME(cw(2,2) >= cr(2,2)); ASSUME(cw(2,2) >= cl[2]); ASSUME(cw(2,2) >= cisb[2]); ASSUME(cw(2,2) >= cdy[2]); ASSUME(cw(2,2) >= cdl[2]); ASSUME(cw(2,2) >= cds[2]); ASSUME(cw(2,2) >= cctrl[2]); ASSUME(cw(2,2) >= caddr[2]); // Update caddr[2] = max(caddr[2],0); buff(2,2) = (r0==2); mem(2,cw(2,2)) = (r0==2); co(2,cw(2,2))+=1; delta(2,cw(2,2)) = -1; ASSUME(creturn[2] >= cw(2,2)); // ret i8* null, !dbg !61 ret_thread_2 = (- 1); goto T2BLOCK_END; T2BLOCK_END: // Dumping thread 3 int ret_thread_3 = 0; cdy[3] = get_rng(0,NCONTEXT-1); ASSUME(cdy[3] >= cstart[3]); T3BLOCK0: // call void @llvm.dbg.value(metadata i8* %arg, metadata !77, metadata !DIExpression()), !dbg !82 // br label %label_3, !dbg !43 goto T3BLOCK1; T3BLOCK1: // call void @llvm.dbg.label(metadata !81), !dbg !84 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !78, metadata !DIExpression()), !dbg !85 // call void @llvm.dbg.value(metadata i64 2, metadata !80, metadata !DIExpression()), !dbg !85 // store atomic i64 2, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) release, align 8, !dbg !46 // ST: Guess // : Release iw(3,0+1*1) = get_rng(0,NCONTEXT-1);// 3 ASSIGN STIW _l35_c3 old_cw = cw(3,0+1*1); cw(3,0+1*1) = get_rng(0,NCONTEXT-1);// 3 ASSIGN STCOM _l35_c3 // Check ASSUME(active[iw(3,0+1*1)] == 3); ASSUME(active[cw(3,0+1*1)] == 3); ASSUME(sforbid(0+1*1,cw(3,0+1*1))== 0); ASSUME(iw(3,0+1*1) >= 0); ASSUME(iw(3,0+1*1) >= 0); ASSUME(cw(3,0+1*1) >= iw(3,0+1*1)); ASSUME(cw(3,0+1*1) >= old_cw); ASSUME(cw(3,0+1*1) >= cr(3,0+1*1)); ASSUME(cw(3,0+1*1) >= cl[3]); ASSUME(cw(3,0+1*1) >= cisb[3]); ASSUME(cw(3,0+1*1) >= cdy[3]); ASSUME(cw(3,0+1*1) >= cdl[3]); ASSUME(cw(3,0+1*1) >= cds[3]); ASSUME(cw(3,0+1*1) >= cctrl[3]); ASSUME(cw(3,0+1*1) >= caddr[3]); ASSUME(cw(3,0+1*1) >= cr(3,0+0)); ASSUME(cw(3,0+1*1) >= cr(3,0+1)); ASSUME(cw(3,0+1*1) >= cr(3,2+0)); ASSUME(cw(3,0+1*1) >= cr(3,3+0)); ASSUME(cw(3,0+1*1) >= cw(3,0+0)); ASSUME(cw(3,0+1*1) >= cw(3,0+1)); ASSUME(cw(3,0+1*1) >= cw(3,2+0)); ASSUME(cw(3,0+1*1) >= cw(3,3+0)); // Update caddr[3] = max(caddr[3],0); buff(3,0+1*1) = 2; mem(0+1*1,cw(3,0+1*1)) = 2; co(0+1*1,cw(3,0+1*1))+=1; delta(0+1*1,cw(3,0+1*1)) = -1; is(3,0+1*1) = iw(3,0+1*1); cs(3,0+1*1) = cw(3,0+1*1); ASSUME(creturn[3] >= cw(3,0+1*1)); // ret i8* null, !dbg !47 ret_thread_3 = (- 1); goto T3BLOCK_END; T3BLOCK_END: // Dumping thread 4 int ret_thread_4 = 0; cdy[4] = get_rng(0,NCONTEXT-1); ASSUME(cdy[4] >= cstart[4]); T4BLOCK0: // call void @llvm.dbg.value(metadata i8* %arg, metadata !90, metadata !DIExpression()), !dbg !100 // br label %label_4, !dbg !48 goto T4BLOCK1; T4BLOCK1: // call void @llvm.dbg.label(metadata !99), !dbg !102 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !92, metadata !DIExpression()), !dbg !103 // %0 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) acquire, align 8, !dbg !51 // LD: Guess // : Acquire old_cr = cr(4,0+1*1); cr(4,0+1*1) = get_rng(0,NCONTEXT-1);// 4 ASSIGN LDCOM _l41_c15 // Check ASSUME(active[cr(4,0+1*1)] == 4); ASSUME(cr(4,0+1*1) >= iw(4,0+1*1)); ASSUME(cr(4,0+1*1) >= 0); ASSUME(cr(4,0+1*1) >= cdy[4]); ASSUME(cr(4,0+1*1) >= cisb[4]); ASSUME(cr(4,0+1*1) >= cdl[4]); ASSUME(cr(4,0+1*1) >= cl[4]); ASSUME(cr(4,0+1*1) >= cx(4,0+1*1)); ASSUME(cr(4,0+1*1) >= cs(4,0+0)); ASSUME(cr(4,0+1*1) >= cs(4,0+1)); ASSUME(cr(4,0+1*1) >= cs(4,2+0)); ASSUME(cr(4,0+1*1) >= cs(4,3+0)); // Update creg_r1 = cr(4,0+1*1); crmax(4,0+1*1) = max(crmax(4,0+1*1),cr(4,0+1*1)); caddr[4] = max(caddr[4],0); if(cr(4,0+1*1) < cw(4,0+1*1)) { r1 = buff(4,0+1*1); ASSUME((!(( (cw(4,0+1*1) < 1) && (1 < crmax(4,0+1*1)) )))||(sforbid(0+1*1,1)> 0)); ASSUME((!(( (cw(4,0+1*1) < 2) && (2 < crmax(4,0+1*1)) )))||(sforbid(0+1*1,2)> 0)); ASSUME((!(( (cw(4,0+1*1) < 3) && (3 < crmax(4,0+1*1)) )))||(sforbid(0+1*1,3)> 0)); ASSUME((!(( (cw(4,0+1*1) < 4) && (4 < crmax(4,0+1*1)) )))||(sforbid(0+1*1,4)> 0)); } else { if(pw(4,0+1*1) != co(0+1*1,cr(4,0+1*1))) { ASSUME(cr(4,0+1*1) >= old_cr); } pw(4,0+1*1) = co(0+1*1,cr(4,0+1*1)); r1 = mem(0+1*1,cr(4,0+1*1)); } cl[4] = max(cl[4],cr(4,0+1*1)); ASSUME(creturn[4] >= cr(4,0+1*1)); // call void @llvm.dbg.value(metadata i64 %0, metadata !94, metadata !DIExpression()), !dbg !103 // %conv = trunc i64 %0 to i32, !dbg !52 // call void @llvm.dbg.value(metadata i32 %conv, metadata !91, metadata !DIExpression()), !dbg !100 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !95, metadata !DIExpression()), !dbg !106 // call void @llvm.dbg.value(metadata i64 1, metadata !97, metadata !DIExpression()), !dbg !106 // store atomic i64 1, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !54 // ST: Guess iw(4,0) = get_rng(0,NCONTEXT-1);// 4 ASSIGN STIW _l42_c3 old_cw = cw(4,0); cw(4,0) = get_rng(0,NCONTEXT-1);// 4 ASSIGN STCOM _l42_c3 // Check ASSUME(active[iw(4,0)] == 4); ASSUME(active[cw(4,0)] == 4); ASSUME(sforbid(0,cw(4,0))== 0); ASSUME(iw(4,0) >= 0); ASSUME(iw(4,0) >= 0); ASSUME(cw(4,0) >= iw(4,0)); ASSUME(cw(4,0) >= old_cw); ASSUME(cw(4,0) >= cr(4,0)); ASSUME(cw(4,0) >= cl[4]); ASSUME(cw(4,0) >= cisb[4]); ASSUME(cw(4,0) >= cdy[4]); ASSUME(cw(4,0) >= cdl[4]); ASSUME(cw(4,0) >= cds[4]); ASSUME(cw(4,0) >= cctrl[4]); ASSUME(cw(4,0) >= caddr[4]); // Update caddr[4] = max(caddr[4],0); buff(4,0) = 1; mem(0,cw(4,0)) = 1; co(0,cw(4,0))+=1; delta(0,cw(4,0)) = -1; ASSUME(creturn[4] >= cw(4,0)); // %cmp = icmp eq i32 %conv, 2, !dbg !55 creg__r1__2_ = max(0,creg_r1); // %conv1 = zext i1 %cmp to i32, !dbg !55 // call void @llvm.dbg.value(metadata i32 %conv1, metadata !98, metadata !DIExpression()), !dbg !100 // store i32 %conv1, i32* @atom_3_X0_2, align 4, !dbg !56, !tbaa !57 // ST: Guess iw(4,3) = get_rng(0,NCONTEXT-1);// 4 ASSIGN STIW _l44_c15 old_cw = cw(4,3); cw(4,3) = get_rng(0,NCONTEXT-1);// 4 ASSIGN STCOM _l44_c15 // Check ASSUME(active[iw(4,3)] == 4); ASSUME(active[cw(4,3)] == 4); ASSUME(sforbid(3,cw(4,3))== 0); ASSUME(iw(4,3) >= creg__r1__2_); ASSUME(iw(4,3) >= 0); ASSUME(cw(4,3) >= iw(4,3)); ASSUME(cw(4,3) >= old_cw); ASSUME(cw(4,3) >= cr(4,3)); ASSUME(cw(4,3) >= cl[4]); ASSUME(cw(4,3) >= cisb[4]); ASSUME(cw(4,3) >= cdy[4]); ASSUME(cw(4,3) >= cdl[4]); ASSUME(cw(4,3) >= cds[4]); ASSUME(cw(4,3) >= cctrl[4]); ASSUME(cw(4,3) >= caddr[4]); // Update caddr[4] = max(caddr[4],0); buff(4,3) = (r1==2); mem(3,cw(4,3)) = (r1==2); co(3,cw(4,3))+=1; delta(3,cw(4,3)) = -1; ASSUME(creturn[4] >= cw(4,3)); // ret i8* null, !dbg !61 ret_thread_4 = (- 1); goto T4BLOCK_END; T4BLOCK_END: // Dumping thread 0 int ret_thread_0 = 0; cdy[0] = get_rng(0,NCONTEXT-1); ASSUME(cdy[0] >= cstart[0]); T0BLOCK0: // %thr0 = alloca i64, align 8 // %thr1 = alloca i64, align 8 // %thr2 = alloca i64, align 8 // %thr3 = alloca i64, align 8 // call void @llvm.dbg.value(metadata i32 %argc, metadata !118, metadata !DIExpression()), !dbg !148 // call void @llvm.dbg.value(metadata i8** %argv, metadata !119, metadata !DIExpression()), !dbg !148 // %0 = bitcast i64* %thr0 to i8*, !dbg !71 // call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) #7, !dbg !71 // call void @llvm.dbg.declare(metadata i64* %thr0, metadata !120, metadata !DIExpression()), !dbg !150 // %1 = bitcast i64* %thr1 to i8*, !dbg !73 // call void @llvm.lifetime.start.p0i8(i64 8, i8* %1) #7, !dbg !73 // call void @llvm.dbg.declare(metadata i64* %thr1, metadata !124, metadata !DIExpression()), !dbg !152 // %2 = bitcast i64* %thr2 to i8*, !dbg !75 // call void @llvm.lifetime.start.p0i8(i64 8, i8* %2) #7, !dbg !75 // call void @llvm.dbg.declare(metadata i64* %thr2, metadata !125, metadata !DIExpression()), !dbg !154 // %3 = bitcast i64* %thr3 to i8*, !dbg !77 // call void @llvm.lifetime.start.p0i8(i64 8, i8* %3) #7, !dbg !77 // call void @llvm.dbg.declare(metadata i64* %thr3, metadata !126, metadata !DIExpression()), !dbg !156 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !127, metadata !DIExpression()), !dbg !157 // call void @llvm.dbg.value(metadata i64 0, metadata !129, metadata !DIExpression()), !dbg !157 // store atomic i64 0, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !80 // ST: Guess iw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l54_c3 old_cw = cw(0,0+1*1); cw(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l54_c3 // Check ASSUME(active[iw(0,0+1*1)] == 0); ASSUME(active[cw(0,0+1*1)] == 0); ASSUME(sforbid(0+1*1,cw(0,0+1*1))== 0); ASSUME(iw(0,0+1*1) >= 0); ASSUME(iw(0,0+1*1) >= 0); ASSUME(cw(0,0+1*1) >= iw(0,0+1*1)); ASSUME(cw(0,0+1*1) >= old_cw); ASSUME(cw(0,0+1*1) >= cr(0,0+1*1)); ASSUME(cw(0,0+1*1) >= cl[0]); ASSUME(cw(0,0+1*1) >= cisb[0]); ASSUME(cw(0,0+1*1) >= cdy[0]); ASSUME(cw(0,0+1*1) >= cdl[0]); ASSUME(cw(0,0+1*1) >= cds[0]); ASSUME(cw(0,0+1*1) >= cctrl[0]); ASSUME(cw(0,0+1*1) >= caddr[0]); // Update caddr[0] = max(caddr[0],0); buff(0,0+1*1) = 0; mem(0+1*1,cw(0,0+1*1)) = 0; co(0+1*1,cw(0,0+1*1))+=1; delta(0+1*1,cw(0,0+1*1)) = -1; ASSUME(creturn[0] >= cw(0,0+1*1)); // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !130, metadata !DIExpression()), !dbg !159 // call void @llvm.dbg.value(metadata i64 0, metadata !132, metadata !DIExpression()), !dbg !159 // store atomic i64 0, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !82 // ST: Guess iw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l55_c3 old_cw = cw(0,0); cw(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l55_c3 // Check ASSUME(active[iw(0,0)] == 0); ASSUME(active[cw(0,0)] == 0); ASSUME(sforbid(0,cw(0,0))== 0); ASSUME(iw(0,0) >= 0); ASSUME(iw(0,0) >= 0); ASSUME(cw(0,0) >= iw(0,0)); ASSUME(cw(0,0) >= old_cw); ASSUME(cw(0,0) >= cr(0,0)); ASSUME(cw(0,0) >= cl[0]); ASSUME(cw(0,0) >= cisb[0]); ASSUME(cw(0,0) >= cdy[0]); ASSUME(cw(0,0) >= cdl[0]); ASSUME(cw(0,0) >= cds[0]); ASSUME(cw(0,0) >= cctrl[0]); ASSUME(cw(0,0) >= caddr[0]); // Update caddr[0] = max(caddr[0],0); buff(0,0) = 0; mem(0,cw(0,0)) = 0; co(0,cw(0,0))+=1; delta(0,cw(0,0)) = -1; ASSUME(creturn[0] >= cw(0,0)); // store i32 0, i32* @atom_1_X0_2, align 4, !dbg !83, !tbaa !84 // ST: Guess iw(0,2) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l56_c15 old_cw = cw(0,2); cw(0,2) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l56_c15 // Check ASSUME(active[iw(0,2)] == 0); ASSUME(active[cw(0,2)] == 0); ASSUME(sforbid(2,cw(0,2))== 0); ASSUME(iw(0,2) >= 0); ASSUME(iw(0,2) >= 0); ASSUME(cw(0,2) >= iw(0,2)); ASSUME(cw(0,2) >= old_cw); ASSUME(cw(0,2) >= cr(0,2)); ASSUME(cw(0,2) >= cl[0]); ASSUME(cw(0,2) >= cisb[0]); ASSUME(cw(0,2) >= cdy[0]); ASSUME(cw(0,2) >= cdl[0]); ASSUME(cw(0,2) >= cds[0]); ASSUME(cw(0,2) >= cctrl[0]); ASSUME(cw(0,2) >= caddr[0]); // Update caddr[0] = max(caddr[0],0); buff(0,2) = 0; mem(2,cw(0,2)) = 0; co(2,cw(0,2))+=1; delta(2,cw(0,2)) = -1; ASSUME(creturn[0] >= cw(0,2)); // store i32 0, i32* @atom_3_X0_2, align 4, !dbg !88, !tbaa !84 // ST: Guess iw(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STIW _l57_c15 old_cw = cw(0,3); cw(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN STCOM _l57_c15 // Check ASSUME(active[iw(0,3)] == 0); ASSUME(active[cw(0,3)] == 0); ASSUME(sforbid(3,cw(0,3))== 0); ASSUME(iw(0,3) >= 0); ASSUME(iw(0,3) >= 0); ASSUME(cw(0,3) >= iw(0,3)); ASSUME(cw(0,3) >= old_cw); ASSUME(cw(0,3) >= cr(0,3)); ASSUME(cw(0,3) >= cl[0]); ASSUME(cw(0,3) >= cisb[0]); ASSUME(cw(0,3) >= cdy[0]); ASSUME(cw(0,3) >= cdl[0]); ASSUME(cw(0,3) >= cds[0]); ASSUME(cw(0,3) >= cctrl[0]); ASSUME(cw(0,3) >= caddr[0]); // Update caddr[0] = max(caddr[0],0); buff(0,3) = 0; mem(3,cw(0,3)) = 0; co(3,cw(0,3))+=1; delta(3,cw(0,3)) = -1; ASSUME(creturn[0] >= cw(0,3)); // %call = call i32 @pthread_create(i64* noundef %thr0, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t0, i8* noundef null) #7, !dbg !89 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cstart[1] >= cdy[0]); // %call3 = call i32 @pthread_create(i64* noundef %thr1, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t1, i8* noundef null) #7, !dbg !90 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cstart[2] >= cdy[0]); // %call4 = call i32 @pthread_create(i64* noundef %thr2, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t2, i8* noundef null) #7, !dbg !91 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cstart[3] >= cdy[0]); // %call5 = call i32 @pthread_create(i64* noundef %thr3, %union.pthread_attr_t* noundef null, i8* (i8*)* noundef @t3, i8* noundef null) #7, !dbg !92 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cstart[4] >= cdy[0]); // %4 = load i64, i64* %thr0, align 8, !dbg !93, !tbaa !94 r3 = local_mem[0]; // %call6 = call i32 @pthread_join(i64 noundef %4, i8** noundef null), !dbg !96 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cdy[0] >= creturn[1]); // %5 = load i64, i64* %thr1, align 8, !dbg !97, !tbaa !94 r4 = local_mem[1]; // %call7 = call i32 @pthread_join(i64 noundef %5, i8** noundef null), !dbg !98 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cdy[0] >= creturn[2]); // %6 = load i64, i64* %thr2, align 8, !dbg !99, !tbaa !94 r5 = local_mem[2]; // %call8 = call i32 @pthread_join(i64 noundef %6, i8** noundef null), !dbg !100 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cdy[0] >= creturn[3]); // %7 = load i64, i64* %thr3, align 8, !dbg !101, !tbaa !94 r6 = local_mem[3]; // %call9 = call i32 @pthread_join(i64 noundef %7, i8** noundef null), !dbg !102 // dumbsy: Guess old_cdy = cdy[0]; cdy[0] = get_rng(0,NCONTEXT-1); // Check ASSUME(cdy[0] >= old_cdy); ASSUME(cdy[0] >= cisb[0]); ASSUME(cdy[0] >= cdl[0]); ASSUME(cdy[0] >= cds[0]); ASSUME(cdy[0] >= cctrl[0]); ASSUME(cdy[0] >= cw(0,0+0)); ASSUME(cdy[0] >= cw(0,0+1)); ASSUME(cdy[0] >= cw(0,2+0)); ASSUME(cdy[0] >= cw(0,3+0)); ASSUME(cdy[0] >= cr(0,0+0)); ASSUME(cdy[0] >= cr(0,0+1)); ASSUME(cdy[0] >= cr(0,2+0)); ASSUME(cdy[0] >= cr(0,3+0)); ASSUME(creturn[0] >= cdy[0]); ASSUME(cdy[0] >= creturn[4]); // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0), metadata !134, metadata !DIExpression()), !dbg !177 // %8 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 0) monotonic, align 8, !dbg !104 // LD: Guess old_cr = cr(0,0); cr(0,0) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l69_c12 // Check ASSUME(active[cr(0,0)] == 0); ASSUME(cr(0,0) >= iw(0,0)); ASSUME(cr(0,0) >= 0); ASSUME(cr(0,0) >= cdy[0]); ASSUME(cr(0,0) >= cisb[0]); ASSUME(cr(0,0) >= cdl[0]); ASSUME(cr(0,0) >= cl[0]); // Update creg_r7 = cr(0,0); crmax(0,0) = max(crmax(0,0),cr(0,0)); caddr[0] = max(caddr[0],0); if(cr(0,0) < cw(0,0)) { r7 = buff(0,0); ASSUME((!(( (cw(0,0) < 1) && (1 < crmax(0,0)) )))||(sforbid(0,1)> 0)); ASSUME((!(( (cw(0,0) < 2) && (2 < crmax(0,0)) )))||(sforbid(0,2)> 0)); ASSUME((!(( (cw(0,0) < 3) && (3 < crmax(0,0)) )))||(sforbid(0,3)> 0)); ASSUME((!(( (cw(0,0) < 4) && (4 < crmax(0,0)) )))||(sforbid(0,4)> 0)); } else { if(pw(0,0) != co(0,cr(0,0))) { ASSUME(cr(0,0) >= old_cr); } pw(0,0) = co(0,cr(0,0)); r7 = mem(0,cr(0,0)); } ASSUME(creturn[0] >= cr(0,0)); // call void @llvm.dbg.value(metadata i64 %8, metadata !136, metadata !DIExpression()), !dbg !177 // %conv = trunc i64 %8 to i32, !dbg !105 // call void @llvm.dbg.value(metadata i32 %conv, metadata !133, metadata !DIExpression()), !dbg !148 // %cmp = icmp eq i32 %conv, 2, !dbg !106 creg__r7__2_ = max(0,creg_r7); // %conv10 = zext i1 %cmp to i32, !dbg !106 // call void @llvm.dbg.value(metadata i32 %conv10, metadata !137, metadata !DIExpression()), !dbg !148 // call void @llvm.dbg.value(metadata i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1), metadata !139, metadata !DIExpression()), !dbg !181 // %9 = load atomic i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @vars, i64 0, i64 1) monotonic, align 8, !dbg !108 // LD: Guess old_cr = cr(0,0+1*1); cr(0,0+1*1) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l71_c12 // Check ASSUME(active[cr(0,0+1*1)] == 0); ASSUME(cr(0,0+1*1) >= iw(0,0+1*1)); ASSUME(cr(0,0+1*1) >= 0); ASSUME(cr(0,0+1*1) >= cdy[0]); ASSUME(cr(0,0+1*1) >= cisb[0]); ASSUME(cr(0,0+1*1) >= cdl[0]); ASSUME(cr(0,0+1*1) >= cl[0]); // Update creg_r8 = cr(0,0+1*1); crmax(0,0+1*1) = max(crmax(0,0+1*1),cr(0,0+1*1)); caddr[0] = max(caddr[0],0); if(cr(0,0+1*1) < cw(0,0+1*1)) { r8 = buff(0,0+1*1); ASSUME((!(( (cw(0,0+1*1) < 1) && (1 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,1)> 0)); ASSUME((!(( (cw(0,0+1*1) < 2) && (2 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,2)> 0)); ASSUME((!(( (cw(0,0+1*1) < 3) && (3 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,3)> 0)); ASSUME((!(( (cw(0,0+1*1) < 4) && (4 < crmax(0,0+1*1)) )))||(sforbid(0+1*1,4)> 0)); } else { if(pw(0,0+1*1) != co(0+1*1,cr(0,0+1*1))) { ASSUME(cr(0,0+1*1) >= old_cr); } pw(0,0+1*1) = co(0+1*1,cr(0,0+1*1)); r8 = mem(0+1*1,cr(0,0+1*1)); } ASSUME(creturn[0] >= cr(0,0+1*1)); // call void @llvm.dbg.value(metadata i64 %9, metadata !141, metadata !DIExpression()), !dbg !181 // %conv14 = trunc i64 %9 to i32, !dbg !109 // call void @llvm.dbg.value(metadata i32 %conv14, metadata !138, metadata !DIExpression()), !dbg !148 // %cmp15 = icmp eq i32 %conv14, 2, !dbg !110 creg__r8__2_ = max(0,creg_r8); // %conv16 = zext i1 %cmp15 to i32, !dbg !110 // call void @llvm.dbg.value(metadata i32 %conv16, metadata !142, metadata !DIExpression()), !dbg !148 // %10 = load i32, i32* @atom_1_X0_2, align 4, !dbg !111, !tbaa !84 // LD: Guess old_cr = cr(0,2); cr(0,2) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l73_c13 // Check ASSUME(active[cr(0,2)] == 0); ASSUME(cr(0,2) >= iw(0,2)); ASSUME(cr(0,2) >= 0); ASSUME(cr(0,2) >= cdy[0]); ASSUME(cr(0,2) >= cisb[0]); ASSUME(cr(0,2) >= cdl[0]); ASSUME(cr(0,2) >= cl[0]); // Update creg_r9 = cr(0,2); crmax(0,2) = max(crmax(0,2),cr(0,2)); caddr[0] = max(caddr[0],0); if(cr(0,2) < cw(0,2)) { r9 = buff(0,2); ASSUME((!(( (cw(0,2) < 1) && (1 < crmax(0,2)) )))||(sforbid(2,1)> 0)); ASSUME((!(( (cw(0,2) < 2) && (2 < crmax(0,2)) )))||(sforbid(2,2)> 0)); ASSUME((!(( (cw(0,2) < 3) && (3 < crmax(0,2)) )))||(sforbid(2,3)> 0)); ASSUME((!(( (cw(0,2) < 4) && (4 < crmax(0,2)) )))||(sforbid(2,4)> 0)); } else { if(pw(0,2) != co(2,cr(0,2))) { ASSUME(cr(0,2) >= old_cr); } pw(0,2) = co(2,cr(0,2)); r9 = mem(2,cr(0,2)); } ASSUME(creturn[0] >= cr(0,2)); // call void @llvm.dbg.value(metadata i32 %10, metadata !143, metadata !DIExpression()), !dbg !148 // %11 = load i32, i32* @atom_3_X0_2, align 4, !dbg !112, !tbaa !84 // LD: Guess old_cr = cr(0,3); cr(0,3) = get_rng(0,NCONTEXT-1);// 0 ASSIGN LDCOM _l74_c13 // Check ASSUME(active[cr(0,3)] == 0); ASSUME(cr(0,3) >= iw(0,3)); ASSUME(cr(0,3) >= 0); ASSUME(cr(0,3) >= cdy[0]); ASSUME(cr(0,3) >= cisb[0]); ASSUME(cr(0,3) >= cdl[0]); ASSUME(cr(0,3) >= cl[0]); // Update creg_r10 = cr(0,3); crmax(0,3) = max(crmax(0,3),cr(0,3)); caddr[0] = max(caddr[0],0); if(cr(0,3) < cw(0,3)) { r10 = buff(0,3); ASSUME((!(( (cw(0,3) < 1) && (1 < crmax(0,3)) )))||(sforbid(3,1)> 0)); ASSUME((!(( (cw(0,3) < 2) && (2 < crmax(0,3)) )))||(sforbid(3,2)> 0)); ASSUME((!(( (cw(0,3) < 3) && (3 < crmax(0,3)) )))||(sforbid(3,3)> 0)); ASSUME((!(( (cw(0,3) < 4) && (4 < crmax(0,3)) )))||(sforbid(3,4)> 0)); } else { if(pw(0,3) != co(3,cr(0,3))) { ASSUME(cr(0,3) >= old_cr); } pw(0,3) = co(3,cr(0,3)); r10 = mem(3,cr(0,3)); } ASSUME(creturn[0] >= cr(0,3)); // call void @llvm.dbg.value(metadata i32 %11, metadata !144, metadata !DIExpression()), !dbg !148 // %and = and i32 %10, %11, !dbg !113 creg_r11 = max(creg_r10,creg_r9); r11 = r9 & r10; // call void @llvm.dbg.value(metadata i32 %and, metadata !145, metadata !DIExpression()), !dbg !148 // %and17 = and i32 %conv16, %and, !dbg !114 creg_r12 = max(creg__r8__2_,creg_r11); r12 = (r8==2) & r11; // call void @llvm.dbg.value(metadata i32 %and17, metadata !146, metadata !DIExpression()), !dbg !148 // %and18 = and i32 %conv10, %and17, !dbg !115 creg_r13 = max(creg__r7__2_,creg_r12); r13 = (r7==2) & r12; // call void @llvm.dbg.value(metadata i32 %and18, metadata !147, metadata !DIExpression()), !dbg !148 // %cmp19 = icmp eq i32 %and18, 1, !dbg !116 creg__r13__1_ = max(0,creg_r13); // br i1 %cmp19, label %if.then, label %if.end, !dbg !118 old_cctrl = cctrl[0]; cctrl[0] = get_rng(0,NCONTEXT-1); ASSUME(cctrl[0] >= old_cctrl); ASSUME(cctrl[0] >= creg__r13__1_); if((r13==1)) { goto T0BLOCK1; } else { goto T0BLOCK2; } T0BLOCK1: // call void @__assert_fail(i8* noundef getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* noundef getelementptr inbounds ([117 x i8], [117 x i8]* @.str.1, i64 0, i64 0), i32 noundef 78, i8* noundef getelementptr inbounds ([23 x i8], [23 x i8]* @__PRETTY_FUNCTION__.main, i64 0, i64 0)) #8, !dbg !119 // unreachable, !dbg !119 r14 = 1; goto T0BLOCK_END; T0BLOCK2: // %12 = bitcast i64* %thr3 to i8*, !dbg !122 // call void @llvm.lifetime.end.p0i8(i64 8, i8* %12) #7, !dbg !122 // %13 = bitcast i64* %thr2 to i8*, !dbg !122 // call void @llvm.lifetime.end.p0i8(i64 8, i8* %13) #7, !dbg !122 // %14 = bitcast i64* %thr1 to i8*, !dbg !122 // call void @llvm.lifetime.end.p0i8(i64 8, i8* %14) #7, !dbg !122 // %15 = bitcast i64* %thr0 to i8*, !dbg !122 // call void @llvm.lifetime.end.p0i8(i64 8, i8* %15) #7, !dbg !122 // ret i32 0, !dbg !123 ret_thread_0 = 0; goto T0BLOCK_END; T0BLOCK_END: ASSUME(meminit(0,1) == mem(0,0)); ASSUME(coinit(0,1) == co(0,0)); ASSUME(deltainit(0,1) == delta(0,0)); ASSUME(meminit(0,2) == mem(0,1)); ASSUME(coinit(0,2) == co(0,1)); ASSUME(deltainit(0,2) == delta(0,1)); ASSUME(meminit(0,3) == mem(0,2)); ASSUME(coinit(0,3) == co(0,2)); ASSUME(deltainit(0,3) == delta(0,2)); ASSUME(meminit(0,4) == mem(0,3)); ASSUME(coinit(0,4) == co(0,3)); ASSUME(deltainit(0,4) == delta(0,3)); ASSUME(meminit(1,1) == mem(1,0)); ASSUME(coinit(1,1) == co(1,0)); ASSUME(deltainit(1,1) == delta(1,0)); ASSUME(meminit(1,2) == mem(1,1)); ASSUME(coinit(1,2) == co(1,1)); ASSUME(deltainit(1,2) == delta(1,1)); ASSUME(meminit(1,3) == mem(1,2)); ASSUME(coinit(1,3) == co(1,2)); ASSUME(deltainit(1,3) == delta(1,2)); ASSUME(meminit(1,4) == mem(1,3)); ASSUME(coinit(1,4) == co(1,3)); ASSUME(deltainit(1,4) == delta(1,3)); ASSUME(meminit(2,1) == mem(2,0)); ASSUME(coinit(2,1) == co(2,0)); ASSUME(deltainit(2,1) == delta(2,0)); ASSUME(meminit(2,2) == mem(2,1)); ASSUME(coinit(2,2) == co(2,1)); ASSUME(deltainit(2,2) == delta(2,1)); ASSUME(meminit(2,3) == mem(2,2)); ASSUME(coinit(2,3) == co(2,2)); ASSUME(deltainit(2,3) == delta(2,2)); ASSUME(meminit(2,4) == mem(2,3)); ASSUME(coinit(2,4) == co(2,3)); ASSUME(deltainit(2,4) == delta(2,3)); ASSUME(meminit(3,1) == mem(3,0)); ASSUME(coinit(3,1) == co(3,0)); ASSUME(deltainit(3,1) == delta(3,0)); ASSUME(meminit(3,2) == mem(3,1)); ASSUME(coinit(3,2) == co(3,1)); ASSUME(deltainit(3,2) == delta(3,1)); ASSUME(meminit(3,3) == mem(3,2)); ASSUME(coinit(3,3) == co(3,2)); ASSUME(deltainit(3,3) == delta(3,2)); ASSUME(meminit(3,4) == mem(3,3)); ASSUME(coinit(3,4) == co(3,3)); ASSUME(deltainit(3,4) == delta(3,3)); ASSERT(r14== 0); }
[ "tuan-phong.ngo@it.uu.se" ]
tuan-phong.ngo@it.uu.se
227bd738ea670cf3388555f6be713b8d3faea649
801f7ed77fb05b1a19df738ad7903c3e3b302692
/optimisationRefactoring/differentiatedCAD/occt-min-topo-src/src/BRep/BRep_TFace.cxx
8f118b32cbab6013af059fbf367294db678eb123
[]
no_license
salvAuri/optimisationRefactoring
9507bdb837cabe10099d9481bb10a7e65331aa9d
e39e19da548cb5b9c0885753fe2e3a306632d2ba
refs/heads/master
2021-01-20T03:47:54.825311
2017-04-27T11:31:24
2017-04-27T11:31:24
89,588,404
0
1
null
null
null
null
UTF-8
C++
false
false
1,650
cxx
// Created on: 1992-08-25 // Created by: Remi Lequette // Copyright (c) 1992-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 2.1 as published // by the Free Software Foundation, with special exception defined in the file // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT // distribution for complete text of the license and disclaimer of any warranty. // // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. #include <BRep_TFace.hxx> #include <Geom_Surface.hxx> #include <Poly_Triangulation.hxx> #include <Standard_Type.hxx> #include <TopAbs.hxx> #include <TopLoc_Location.hxx> #include <TopoDS_TShape.hxx> //======================================================================= //function : BRep_TFace //purpose : //======================================================================= BRep_TFace::BRep_TFace() : TopoDS_TFace(), myTolerance(RealEpsilon()), myNaturalRestriction(Standard_False) { } //======================================================================= //function : EmptyCopy //purpose : //======================================================================= Handle(TopoDS_TShape) BRep_TFace::EmptyCopy() const { Handle(BRep_TFace) TF = new BRep_TFace(); TF->Surface(mySurface); TF->Location(myLocation); TF->Tolerance(myTolerance); return TF; }
[ "salvatore.auriemma@opencascade.com" ]
salvatore.auriemma@opencascade.com
cafc996e8597cdaae18a1565795c8bc56217bc83
1455841b3fcfda2f6d6c1eb436136b5d9ff6dc7c
/TreeSimulator/TreeSimulator/InterestingWind.cpp
28e4a6c916344aa9267470ed8cc0d7ff4bc6a6fc
[]
no_license
skyrimax/TreeSimulator_GPA665
1b25f8d33f8ce638c191acceace280cb4430141d
610abebd33f3d17ed08c79414b66487ed6240042
refs/heads/master
2023-05-25T14:31:50.111945
2020-04-10T23:35:25
2020-04-10T23:35:25
247,355,095
0
0
null
null
null
null
UTF-8
C++
false
false
241
cpp
#include "InterestingWind.h" #include <cmath> InterestingWind::InterestingWind() : Wind() { } InterestingWind::~InterestingWind() { } Vector InterestingWind::operator()(double t) const { return Vector(0.5*sin(2.5*t)-0.5*sin(1.5*t)); }
[ "MaxRoyal123@hotmail.com" ]
MaxRoyal123@hotmail.com
551da542a309d3c1937a4d8f4887c16c0befad8b
4ca308e0feb5aeac0ec99e5c09fae2ab9c405363
/velocidad.cc
54b6ae4f3b16b7128f08b9c0f794204ba99e5513
[]
no_license
FisicaComputacionalI/20171108-examen-FernandaHernandezRodriguez
6484d0257332125d742e1e79c55ab4f57d2ac1f9
d1f41fbc4096d2f80ceca0ff2c9b13bab62f6ba5
refs/heads/master
2021-05-07T15:30:58.198808
2018-01-03T04:55:01
2018-01-03T04:55:01
110,012,916
0
0
null
null
null
null
UTF-8
C++
false
false
438
cc
//Programa para calcular la velocidad de una particula //Autor: Maria Fernanda Hernmandez Rodriguez //Creado: Miercoles 8 de noviembre de 2017 #include <iostream> using namespace std; int main (){ float d; float t; cout<<"¿Cual es la distancia d recorrida por la particula?"<<endl; cin>> d; cout<<"¿Cual es el tiempo t transcurrido?"<<endl; cin>> t; cout<<"La velocidad de la particula es: "<< d/t<<endl; return 0; }
[ "noreply@github.com" ]
noreply@github.com
fe54effea95d8a19d898ef692eb40d1615de8401
ba0cbdae81c171bd4be7b12c0594de72bd6d625a
/MyToontown/Panda3D-1.9.0/include/collisionHandlerFloor.h
d9175aec6e95069693aa1b7481227b73e6c543b4
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
sweep41/Toontown-2016
65985f198fa32a832e762fa9c59e59606d6a40a3
7732fb2c27001264e6dd652c057b3dc41f9c8a7d
refs/heads/master
2021-01-23T16:04:45.264205
2017-06-04T02:47:34
2017-06-04T02:47:34
93,279,679
0
0
null
null
null
null
UTF-8
C++
false
false
2,541
h
// Filename: collisionHandlerFloor.h // Created by: drose (16Mar02) // //////////////////////////////////////////////////////////////////// // // PANDA 3D SOFTWARE // Copyright (c) Carnegie Mellon University. All rights reserved. // // All use of this software is subject to the terms of the revised BSD // license. You should have received a copy of this license along // with this source code in a file named "LICENSE." // //////////////////////////////////////////////////////////////////// #ifndef COLLISIONHANDLERFLOOR_H #define COLLISIONHANDLERFLOOR_H #include "pandabase.h" #include "collisionHandlerPhysical.h" //////////////////////////////////////////////////////////////////// // Class : CollisionHandlerFloor // Description : A specialized kind of CollisionHandler that sets the // Z height of the collider to a fixed linear offset // from the highest detected collision point each frame. // It's intended to implement walking around on a floor // of varying height by casting a ray down from the // avatar's head. //////////////////////////////////////////////////////////////////// class EXPCL_PANDA_COLLIDE CollisionHandlerFloor : public CollisionHandlerPhysical { PUBLISHED: CollisionHandlerFloor(); virtual ~CollisionHandlerFloor(); INLINE void set_offset(PN_stdfloat offset); INLINE PN_stdfloat get_offset() const; INLINE void set_reach(PN_stdfloat reach); INLINE PN_stdfloat get_reach() const; INLINE void set_max_velocity(PN_stdfloat max_vel); INLINE PN_stdfloat get_max_velocity() const; protected: PN_stdfloat set_highest_collision(const NodePath &target_node_path, const NodePath &from_node_path, const Entries &entries); virtual bool handle_entries(); virtual void apply_linear_force(ColliderDef &def, const LVector3 &force); private: PN_stdfloat _offset; PN_stdfloat _reach; PN_stdfloat _max_velocity; public: static TypeHandle get_class_type() { return _type_handle; } static void init_type() { CollisionHandlerPhysical::init_type(); register_type(_type_handle, "CollisionHandlerFloor", CollisionHandlerPhysical::get_class_type()); } virtual TypeHandle get_type() const { return get_class_type(); } virtual TypeHandle force_init_type() {init_type(); return get_class_type();} private: static TypeHandle _type_handle; }; #include "collisionHandlerFloor.I" #endif
[ "sweep14@gmail.com" ]
sweep14@gmail.com
c73f9f8e05760f67dfadaab65bf147297eeb19cd
4759af27a1544b7625daed951cbe270f79d94e5c
/san_zhi_chee.hpp
0aa7dc38038cfdb21f55d650f90e9924824ae101
[]
no_license
r08922130/three_children_chess
0e5a77e9117a71891ab7fea3e3caa6e02abd760f
5a739e14504c8f5d24c3247f61272739d5200e17
refs/heads/master
2020-11-24T05:09:20.345692
2019-12-14T13:35:54
2019-12-14T13:35:54
227,978,690
0
0
null
null
null
null
UTF-8
C++
false
false
1,171
hpp
#define SIZE 3 #define BLACK -1 #define WHITE 1 #define RIGHT 11 #define LEFT 12 #define UP 13 #define DOWN 14 #define RIGHT_UP 15 #define RIGHT_DOWN 16 #define LEFT_UP 17 #define LEFT_DOWN 18 struct chess{ int x; int y; // -1 for black , 1 for white int color; }; struct step{ int move; int win; // -1 for black , 1 for white chess c; }; step next_step(int board[SIZE][SIZE], int my_color, chess white[SIZE] , chess black[SIZE]); void go_right(int board[SIZE][SIZE],chess c[SIZE], int i ); void go_left(int board[SIZE][SIZE],chess c[SIZE], int i); void go_up(int board[SIZE][SIZE],chess c[SIZE], int i); void go_down(int board[SIZE][SIZE],chess c[SIZE], int i); void go_right_up(int board[SIZE][SIZE],chess c[SIZE], int i ); void go_left_up(int board[SIZE][SIZE],chess c[SIZE], int i); void go_right_down(int board[SIZE][SIZE],chess c[SIZE], int i); void go_left_down(int board[SIZE][SIZE],chess c[SIZE], int i); void print_board(int board[SIZE][SIZE]); int is_win_lose(chess c[SIZE]); int try_go(int board[SIZE][SIZE],chess my_chess[SIZE], int i); int block_line(int board[SIZE][SIZE],chess my_chess[SIZE], int i, int px, int py);
[ "dingjie@dingjies-MacBook-Pro.local" ]
dingjie@dingjies-MacBook-Pro.local
eb64c7aefb9e44c32d405a83bc83fc7420e7c779
e45280a01b840bebf8301f2589cc0b28199ddfde
/tss463_van_alarm/tss463_van_buzzer/VanMessageSender.h
a8f668358d60c4f901837a913ba5b667a7679f63
[ "GPL-3.0-only" ]
permissive
doiiido/arduino_tss463_van
f2a75eba05fb189844bf5def4348e55a7e8b72af
1edc2e868d4b8b21a72ccfbfe349b40b12e07321
refs/heads/master
2023-03-05T00:50:13.557430
2021-02-18T20:40:56
2021-02-18T20:40:56
262,392,637
1
0
MIT
2021-02-18T20:40:57
2020-05-08T17:59:06
C++
UTF-8
C++
false
false
3,531
h
#pragma once #ifndef _VanMessageSender_h #define _VanMessageSender_h #if defined(ARDUINO) && ARDUINO >= 100 #include <Arduino.h> #include <SPI.h> #else #include "WProgram.h" #endif #include <tss463_van.h> #include "AbstractVanMessageSender.h" /// <summary> /// This is just an abstraction layer around the VAN library in case you need it /// It is perfectly fine to use the library directly /// </summary> class VanMessageSender : public AbstractVanMessageSender { TSS463_VAN* VAN; public: /// <summary> Constructor for the VAN bus library </summary> /// <param name="vanPin"> CS (chip select) also known as SS (slave select) pin to use </param> /// <param name="spi"> An initialized SPI class </param> VanMessageSender(uint8_t vanPin, SPIClass* spi) { VAN = new TSS463_VAN(vanPin, spi); } bool set_channel_for_transmit_message(uint8_t channelId, uint16_t identifier, const uint8_t values[], uint8_t messageLength, uint8_t requireAck) override { return VAN->set_channel_for_transmit_message(channelId, identifier, values, messageLength, requireAck); } bool set_channel_for_receive_message(uint8_t channelId, uint16_t identifier, uint8_t messageLength, uint8_t setAck) override { return VAN->set_channel_for_receive_message(channelId, identifier, messageLength, setAck); } bool set_channel_for_reply_request_message_without_transmission(uint8_t channelId, uint16_t identifier, uint8_t messageLength) override { return VAN->set_channel_for_reply_request_message_without_transmission(channelId, identifier, messageLength); } bool set_channel_for_reply_request_message(uint8_t channelId, uint16_t identifier, uint8_t messageLength, uint8_t requireAck) override { return VAN->set_channel_for_reply_request_message(channelId, identifier, messageLength, requireAck); } bool set_channel_for_immediate_reply_message(uint8_t channelId, uint16_t identifier, const uint8_t values[], uint8_t messageLength) override { return VAN->set_channel_for_immediate_reply_message(channelId, identifier, values, messageLength); } bool set_channel_for_deferred_reply_message(uint8_t channelId, uint16_t identifier, const uint8_t values[], uint8_t messageLength, uint8_t setAck) override { return VAN->set_channel_for_deferred_reply_message(channelId, identifier, values, messageLength, setAck); } bool set_channel_for_reply_request_detection_message(uint8_t channelId, uint16_t identifier, uint8_t messageLength) override { return VAN->set_channel_for_reply_request_detection_message(channelId, identifier, messageLength); } MessageLengthAndStatusRegister message_available(uint8_t channelId) override { return VAN->message_available(channelId); } void read_message(uint8_t channelId, uint8_t* length, uint8_t buffer[]) override { VAN->read_message(channelId, length, buffer); } uint8_t get_last_channel() override { return VAN->get_last_channel(); } void begin() override { VAN->begin(); } bool reactivate_channel(uint8_t channelId) override { return VAN->reactivate_channel(channelId); } void reset_channels() override { VAN->reset_channels(); } void set_value_in_channel(uint8_t channelId, uint8_t index0, uint8_t value) override { VAN->set_value_in_channel(channelId, index0, value); } }; #endif
[ "lincoln_abreu@aluno.unb.br" ]
lincoln_abreu@aluno.unb.br
c807cae1eb68f8f47084b33ef55e30525f3526fb
cb7f5e7f668cd46a496b93e741bbfefe8fca2b2f
/ZOJ2351(AC).cpp
c5849da81c12296f7c69fe6e0a54c586deb8ff36
[]
no_license
ee08b397/zoj
ae6c80fcb1acc2db470d300d675188166e75b420
760865a44457ebffa416949e93a5009522f7f344
refs/heads/master
2021-01-18T03:02:40.584528
2015-03-22T17:09:56
2015-03-22T17:09:56
43,004,404
1
0
null
2015-09-23T14:00:21
2015-09-23T14:00:20
null
UTF-8
C++
false
false
499
cpp
#define _CRT_SECURE_NO_WARNINGS #include <cmath> #include <cstdio> #include <cstdlib> using namespace std; int main() { int t, ti; double ka, s; double x; int m, n; double d; while(scanf("%d", &t) == 1){ for(ti = 0; ti < t; ++ti){ if(ti > 0){ printf("\n"); } while(scanf("%lf%lf%d%d", &ka, &s, &m, &n) == 4 && (ka || s || m || n)){ d = ka / (m * n * s); x = 0.5 * (sqrt(d * (d + 4)) - d); printf("%.3f\n", -(log(m * s * x) / log(10.0))); } } } return 0; }
[ "zhuli19901106@gmail.com" ]
zhuli19901106@gmail.com
9e33932204c0d0e1beb86e88ea511f39cc89c2a7
dbb50d74406518f58baae0f91e7fb44874ab31e6
/RingingMaster/RecordManagerEventListener.h
ae4d56ccb6149597f2e584c04916fa657ee964d4
[]
no_license
lakestephen/ringingmaster_cpp
60f917eb66970e6fc84f9703a229dd0028892632
3d34efa1c4dca560a67a8aee1375df92fdcbeb6f
refs/heads/master
2023-02-20T14:41:35.756431
2021-01-26T19:45:38
2021-01-26T19:45:38
333,197,351
1
0
null
null
null
null
UTF-8
C++
false
false
558
h
#pragma once enum ViewType; class RecordGrab; class RecordTower; class RecordManagerEventListener { public: RecordManagerEventListener() {}; virtual ~RecordManagerEventListener() {}; virtual void recordManager_notifyHomeTowerChange(RecordTower* /*homeTower*/) {}; virtual RecordTower* recordManager_notifyGetSelectedTower(ViewType /*ViewType*/) { return NULL;}//todo do we need this? virtual void recordManager_updateFilterList() {}; }; typedef CArray<RecordManagerEventListener*, RecordManagerEventListener*> RecordManagerEventListeners;
[ "steve.lake@anaplan.com" ]
steve.lake@anaplan.com
adb249a3b2446a66228211dc8240944848fd9e79
d2f9c405844f3903c422ec08570ca8b7065e6485
/torch/csrc/jit/frontend/schema_matching.cpp
977cc3daaa40dbdce97e8cefcee4593a479d2009
[ "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSL-1.0", "Apache-2.0", "BSD-2-Clause" ]
permissive
lacrosse91/pytorch
a22768aad718759c569f4986bee84656e603f01f
38154d34413de28fccade193e833899369ad9b26
refs/heads/master
2023-02-26T03:06:35.948795
2021-01-29T07:10:57
2021-01-29T07:10:57
296,674,152
0
0
NOASSERTION
2020-09-18T16:28:35
2020-09-18T16:28:32
null
UTF-8
C++
false
false
22,717
cpp
#include <torch/csrc/jit/frontend/schema_matching.h> #include <ATen/core/jit_type.h> #include <torch/csrc/jit/frontend/builtin_functions.h> #include <torch/csrc/jit/frontend/error_report.h> #include <torch/csrc/jit/runtime/operator.h> namespace torch { namespace jit { static inline TypePtr unwrapOptional(TypePtr opt_type) { if (auto unwrap_list_type = opt_type->cast<OptionalType>()) { return unwrap_list_type->getElementType(); } return opt_type; } static inline bool isIntOrFloatUsedAsList( const Value* value, const Argument& arg) { // Look for int[N] or float[N] const auto& v_type = value->type(); if (v_type != FloatType::get() && v_type != IntType::get()) return false; auto arg_type = unwrapOptional(arg.type()); auto list_type = arg_type->cast<ListType>(); return list_type && list_type->getElementType() == v_type && arg.N(); } /// Returns true if `type` is a Tuple in which all the elements have the /// same type or if it's a subtype of `list_type_`. inline bool convertibleToList(const TypePtr& type, const TypePtr& list_type_) { auto list_type = list_type_->cast<ListType>(); if (!list_type) { return false; } if (type->isSubtypeOf(list_type_)) { return true; } if (auto tuple = type->cast<TupleType>()) { return std::all_of( tuple->elements().begin(), tuple->elements().end(), [&](const TypePtr& t) { // TODO: resolve VarType if necessary return t->isSubtypeOf(list_type->getElementType()); }); } return false; } // Applies implicit conversion from value trying to turn it into type // concrete_type. It succeeds if `return_value->isSubtypeOf(concrete_type)` Value* tryConvertToType( const SourceRange& loc, Graph& graph, const TypePtr& concrete_type, Value* value, bool allow_conversions) { // treat conversion to Optional[T] as conversions to T if (OptionalTypePtr op = concrete_type->cast<OptionalType>()) { if (value->type()->kind() != OptionalType::Kind && !value->type()->isSubtypeOf(NoneType::get())) { return tryConvertToType( loc, graph, op->getElementType(), value, allow_conversions); } } if (auto value_tuple = value->type()->cast<TupleType>()) { // Allow homogeneous tuples to be casted implicitly to lists of appropriate // types if (convertibleToList(value->type(), unwrapOptional(concrete_type))) { auto unpacked = createTupleUnpack(value); auto elem_type = unwrapOptional(concrete_type)->expectRef<ListType>().getElementType(); value = graph.insertNode(graph.createList(elem_type, unpacked))->output(); } // inductively apply implicit conversions to tuples if (auto concrete_tuple = concrete_type->cast<TupleType>()) { if (!value_tuple->isSubtypeOf(concrete_tuple) && concrete_tuple->elements().size() == value_tuple->elements().size()) { auto unpacked = createTupleUnpack(value); std::vector<Value*> converted; for (size_t i = 0; i < concrete_tuple->elements().size(); ++i) { converted.emplace_back(tryConvertToType( loc, graph, concrete_tuple->elements().at(i), unpacked.at(i), allow_conversions)); } value = graph.insertNode(graph.createTuple(converted))->output(); } } } // implicit conversions if (allow_conversions) { // Convert tensor or number to concrete int/float types bool value_isa_tensor = value->type()->isSubtypeOf(TensorType::get()); bool value_equals_number = *value->type() == *NumberType::get(); bool concrete_float = *concrete_type == *FloatType::get(); bool concrete_int = *concrete_type == *IntType::get(); bool concrete_number = *concrete_type == *NumberType::get(); if (value_isa_tensor) { if (concrete_float) { value = graph.insert(aten::FloatImplicit, {value}, {}, loc); } else if (concrete_int) { value = graph.insert(aten::IntImplicit, {value}, {}, loc); } else if (concrete_number) { value = graph.insert(aten::ScalarImplicit, {value}, {}, loc); } } else if (value_equals_number) { if (concrete_float) { value = graph.insert(aten::Float, {value}, {}, loc); } else if (concrete_int) { value = graph.insert(aten::Int, {value}, {}, loc); } } // Convert strings to device if (value->type()->isSubtypeOf(StringType::get()) && concrete_type->isSubtypeOf(DeviceObjType::get())) { return graph.insert(aten::device, {value}, {}, loc); } } return value; } // Checks if `named_value` can be used as a value for `arg`. If `arg` is a // VarType, it will be added to the type_env through `matchTypeVariables` as // the corresponding actual type. If `allow_conversions` is true, implicit // conversions to the `arg` type may be performed through `tryConvertToType`. static Value* tryMatchArgument( const Argument& arg, Graph& graph, const SourceRange& loc, const NamedValue& named_value, std::ostream* failure_messages, const std::function<std::ostream&()>& err, bool allow_conversions, TypeEnv& type_env) { Value* value = named_value.value(graph); // Some functions that take lists of integers or floats for fixed size arrays // also allow single ints/floats to be passed in their place. The single // int/float is then repeated to the length of the list if (isIntOrFloatUsedAsList(value, arg)) { std::vector<Value*> repeated(*arg.N(), value); value = graph.insertNode(graph.createList(value->type(), repeated))->output(); } // Resolve VarType variables const MatchTypeReturn matched = matchTypeVariables(arg.type(), value->type(), type_env); if (!matched.success()) { if (failure_messages) { err() << "Could not match type " << value->type()->repr_str() << " to " << arg.type()->repr_str() << " in argument '" << arg.name() << "': " << matched.reason() << ".\n"; } return nullptr; } const auto concrete_type = tryEvalTypeVariables(arg.type(), type_env); if (!concrete_type) { if (failure_messages) { err() << "Type variables in type " << arg.type()->repr_str() << " could not be inferred from actual type " << value->type()->repr_str(); } return nullptr; } // Check if the value can be matched to the arg through any implicit // conversions value = tryConvertToType(loc, graph, concrete_type, value, allow_conversions); std::stringstream ss; if (!value->type()->isSubtypeOfExt( concrete_type, /*why_not=*/(failure_messages) ? &ss : nullptr)) { if (failure_messages) { auto& ostream = err() << arg.formatTypeMismatchMsg(value->type()->repr_str()); if (auto pt = value->type()->cast<TensorType>()) { if (pt->isInferredType()) { std::string inferred_type_hint; inferred_type_hint = c10::str( "Inferred the value for argument '", arg.name(), "' to be of type 'Tensor' ", "because it was not annotated with an explicit type.\n"); ostream << inferred_type_hint; } } if (auto v = value->type()->cast<ListType>()) { if (v->getElementType()->isSubtypeOf(TensorType::get())) { ostream << "Empty lists default to List[Tensor]. Add a variable " "annotation to the assignment to create an empty list " "of another type (torch.jit.annotate(List[T, []]) where T " "is the type of elements in the list for Python 2)\n"; } } ostream << ss.str(); } return nullptr; } return value; } c10::optional<size_t> findInputWithName( const std::string& name, at::ArrayRef<NamedValue> kwargs) { for (size_t i = 0; i < kwargs.size(); ++i) { if (kwargs[i].name() == name) return i; } return c10::nullopt; } /// Creates a list with the provided values if each value's type can be matched /// to an argument with type `elem_type`. If a type in `varargs` does not match /// `elem_type`, nullptr is returned. This is used for creating lists from /// varargs so that calls like torch.zeros(1, 2, 3) will be matched to /// aten::zeros(int[]). static Value* tryCreateList( const TypePtr& elem_type, Graph& graph, const SourceRange& loc, at::ArrayRef<NamedValue> varargs, std::ostream* failure_messages, const std::function<std::ostream&()>& err, bool convert_tensor_to_num, TypeEnv& type_env) { Argument elem_arg("<varargs>", elem_type); std::vector<Value*> list_elements; for (const auto& named_value : varargs) { // Try to convert named_value to elem_type Value* matched_value = tryMatchArgument( /*arg=*/elem_arg, graph, loc, named_value, failure_messages, err, /*allow_conversions=*/convert_tensor_to_num, type_env); if (!matched_value) { return nullptr; } list_elements.push_back(matched_value); } return graph.insertNode(graph.createList(elem_type, list_elements))->output(); } // Check if it is possible to convert all the remaining non-kwarg arguments // to a list. This allows zeros(IntArrayRef sizes) to work with zeros(1, 2) or // zeros(1) static bool varargsCanBeUsedAsList( const FunctionSchema& schema, size_t arg_index, const Argument& arg) { // The arg must be the last one in the arg list that is not a kwarg bool is_last_argument = arg_index + 1 == schema.arguments().size() || schema.arguments()[arg_index + 1].kwarg_only(); // The formal must be a list bool argument_is_list = arg.type()->kind() == TypeKind::ListType; // matching varargs of typevar list nyi bool typevar_list = argument_is_list && arg.type()->cast<ListType>()->getElementType()->cast<VarType>(); // it must not be a broadcasting list like int[3], // otherwise a single int is a valid input bool arg_is_broadcasting_list = bool(arg.N()); return is_last_argument && argument_is_list && !arg_is_broadcasting_list && !typevar_list; } // Note (@zasdfgbnm): // This is a workaround for https://github.com/pytorch/pytorch/issues/47964 // Currently JIT does not distinguish ScalarType vs int, so there is really // no way to distinguish x.view(1) vs x.view(torch.int8). So we have to hardcode // the aten::view.dtype here to block this overload. This blocklist should be // removed when JIT fully suports ScalarType as its own type. bool isBlockListedSchema(const FunctionSchema& schema) { if (schema.name() == "aten::view" && schema.overload_name() == "dtype") { return true; } return false; } static c10::optional<MatchedSchema> tryMatchSchema( const FunctionSchema& schema, const SourceRange& loc, Graph& graph, at::ArrayRef<NamedValue> args, at::ArrayRef<NamedValue> kwargs, c10::optional<NamedValue> self, std::ostream* failure_messages, bool allow_conversions) { if (isBlockListedSchema(schema)) { return c10::nullopt; } auto err = [&]() -> std::ostream& { *failure_messages << "\n" << schema << ":\n"; return *failure_messages; }; // For VarTypes, maps VarType name to actual type as it's used with these // args TypeEnv type_env; std::vector<Value*> positional_inputs; std::vector<bool> used_kwarg(kwargs.size(), false); // if we finish the loop will we have consumed all arguments? size_t used_args = 0; for (size_t schema_i = 0; schema_i < schema.arguments().size(); ++schema_i) { const auto& arg = schema.arguments()[schema_i]; c10::optional<NamedValue> actual_named_value; if (arg.name() == "self" && self) { actual_named_value = self; self = c10::nullopt; } else if (!arg.kwarg_only() && used_args < args.size()) { // Try to convert all the remaining non-kwarg arguments (used_args) to a // list. Allow zeros(IntArrayRef sizes) to work with zeros(1, 2) or // zeros(1) if (allow_conversions && varargsCanBeUsedAsList(schema, schema_i, arg)) { auto value = args[used_args].value(graph); const auto& actual_type = value->type(); // The actual cannot already be a list if (actual_type->kind() != TypeKind::ListType && !convertibleToList(actual_type, unwrapOptional(arg.type()))) { auto formal_type = unwrapOptional(arg.type()) ->expectRef<ListType>() .getElementType(); Value* list = tryCreateList( formal_type, graph, loc, at::ArrayRef<NamedValue>(args).slice(used_args), failure_messages, err, allow_conversions, type_env); if (!list) { return c10::nullopt; } used_args = args.size(); positional_inputs.push_back(list); continue; } } // Set actual_named_value to the argument and mark the arg position as // used actual_named_value = args[used_args]; used_args++; } else if (auto kwarg_idx = findInputWithName(arg.name(), kwargs)) { const NamedValue& nv = kwargs[*kwarg_idx]; if (used_kwarg[*kwarg_idx]) { if (failure_messages) { err() << "Argument " << nv.name() << " specified twice in schema, submit a bug report!\n"; } return c10::nullopt; } used_kwarg[*kwarg_idx] = true; actual_named_value = nv; } else if (arg.default_value()) { // Argument has a default value and no value was provided, so use the // default actual_named_value = NamedValue(*arg.default_value()); } else { if (failure_messages) { err() << "Argument " << schema.arguments()[schema_i].name() << " not provided.\n"; } return c10::nullopt; } // Make sure the actual_named_value found matches the type of arg Value* positional = tryMatchArgument( arg, graph, loc, *actual_named_value, failure_messages, err, allow_conversions, type_env); if (!positional) { return c10::nullopt; } positional_inputs.push_back(positional); } // check for unused self argument if (self != c10::nullopt && failure_messages) { err() << "Provided self argument not used in schema.\n"; } if (schema.is_vararg()) { for (; used_args < args.size(); ++used_args) { positional_inputs.push_back(args[used_args].value(graph)); } } // check for unused positional arguments if (used_args < args.size()) { if (failure_messages) { err() << "Expected at most " << used_args << " arguments " << "but found " << args.size() << " positional arguments.\n"; } return c10::nullopt; } // check for unused kwargs for (size_t i = 0; i < kwargs.size(); ++i) { const auto& nv = kwargs[i]; if (!used_kwarg[i]) { if (failure_messages) { if (!schema.argumentIndexWithName(nv.name())) { err() << "Keyword argument " << nv.name() << " unknown.\n"; } else { err() << "Keyword argument " << nv.name() << " specified twice.\n"; } } return c10::nullopt; } } const auto& returns = schema.returns(); auto return_types = fmap(returns, [&](const Argument& r) { TypePtr result = tryEvalTypeVariables(r.type(), type_env); TORCH_INTERNAL_ASSERT( result, r.type()->repr_str(), " has unbound type variables."); return result; }); // Codegen does not support return of namedtuples with undefined field names. // Therefore, either all or none returns has field names. bool return_has_field_names = std::all_of(returns.begin(), returns.end(), [&](const Argument& r) { return r.name().length() > 0; }); c10::OptNameList return_field_names = c10::nullopt; if (return_has_field_names) { return_field_names = fmap(returns, [&](const Argument& r) { return r.name(); }); } return MatchedSchema{ std::move(positional_inputs), std::move(return_types), std::move(return_field_names)}; } MatchedSchema matchSchema( const ::c10::FunctionSchema& schema, const SourceRange& loc, Graph& graph, at::ArrayRef<NamedValue> args, at::ArrayRef<NamedValue> kwargs, const c10::optional<NamedValue>& self) { std::stringstream failure_messages; if (auto result = tryMatchSchema( schema, loc, graph, args, kwargs, self, &failure_messages, /*allow_conversions=*/true)) { return *result; } throw ErrorReport(loc) << failure_messages.str(); } MatchedSchema matchSchema( const ::c10::FunctionSchema& schema, const SourceRange& loc, Graph& graph, at::ArrayRef<Value*> args, at::ArrayRef<NamedValue> kwargs) { std::vector<NamedValue> named_args = fmap(args, [](Value* v) { return NamedValue(v); }); return matchSchema(schema, loc, graph, named_args, kwargs); } static std::string prefixLine( const std::string& str, const std::string& prefix) { std::stringstream ss; bool was_newline = true; for (auto c : str) { if (was_newline) ss << prefix; ss.put(c); was_newline = c == '\n'; } return ss.str(); } std::pair<size_t, MatchedSchema> matchSchemas( const std::vector<const FunctionSchema*>& schemas, const SourceRange& loc, Graph& graph, at::ArrayRef<NamedValue> args, at::ArrayRef<NamedValue> kwargs, const c10::optional<NamedValue>& self, bool render_errors) { TORCH_INTERNAL_ASSERT(schemas.size() > 0); // if there is only one schema, we do not need to try without conversions // first. this is faster and puts less dead code in the graph. if (schemas.size() == 1) { return std::make_pair( 0, matchSchema(*schemas.at(0), loc, graph, args, kwargs, self)); } std::stringstream failure_messages; for (bool allow_conversions : {false, true}) { // clear previous error messages failure_messages.str(""); for (size_t i = 0; i < schemas.size(); ++i) { const auto matched_schema = tryMatchSchema( *schemas[i], loc, graph, args, kwargs, self, render_errors ? &failure_messages : nullptr, allow_conversions); if (matched_schema) { return std::make_pair(i, *matched_schema); } } } // we optimistically assume this call will not error, and avoid formatting the // error strings. If we discover it did error, then we replay it, recording // the errors. if (!render_errors) { return matchSchemas( schemas, loc, graph, args, kwargs, self, /*render_errors=*/true); } throw ErrorReport(loc) << "Arguments for call are not valid.\n" << "The following variants are available:\n" << prefixLine(failure_messages.str(), " ") << "\nThe original call is"; throw ErrorReport(loc) << failure_messages.str(); } // pack outputs of a function following python rules. If there is a single value // return a SimpleValue, otherwise pack all the values into a Tuple. static Value* packOutputs( Graph& g, at::ArrayRef<Value*> values, c10::OptNameList field_names) { if (values.size() == 1) { return values[0]; } std::shared_ptr<FunctionSchema> schema; TupleTypePtr named_tuple = nullptr; if (field_names) { auto types = fmap(values, [](Value* v) { return v->type(); }); named_tuple = TupleType::createNamed(c10::nullopt, field_names.value(), types); } return g.insertNode(g.createTuple(values, named_tuple))->output(); } // Given a successful match between operator schema and symbol, emit a node // with the appropriate inputs and outputs. static Value* emitBuiltinNode( const MatchedSchema& matched_schema, const SourceRange& loc, Graph& graph, Symbol name) { auto n = graph.insertNode(graph.create(name, matched_schema.inputs, 0)) ->setSourceRange(loc); for (auto& ret : matched_schema.return_types) { n->addOutput()->setType(ret); } // assert that we did indeed create an op that has implementation // otherwise schema and dispatch are not in sync n->getOperation(); return packOutputs(graph, n->outputs(), matched_schema.return_field_names); } // Search for operators matching the provided symbol name and input types. // If one is found, emit a node to the graph for that operator. Value* emitBuiltinCall( const SourceRange& loc, Graph& graph, Symbol name, at::ArrayRef<NamedValue> args, at::ArrayRef<NamedValue> kwargs, const c10::optional<NamedValue>& self) { const auto& variants = getAllOperatorsFor(name); const auto& builtin_functions = getAllBuiltinFunctionsFor(name); std::stringstream failure_messages; std::vector<const FunctionSchema*> schemas; schemas.reserve(variants.size()); for (const std::shared_ptr<Operator>& op : variants) { schemas.push_back(&op->schema()); } for (const auto method : builtin_functions) { method->ensure_defined(); schemas.push_back(&method->getSchema()); } // no operators found with the same name, print out similarly named operators if (schemas.size() == 0) { const auto close_symbols = findSimilarOperators(name); auto error = ErrorReport(loc); const auto& user_function_name = name.toQualString(); error << "Unknown builtin op: " << user_function_name << ".\n"; if (close_symbols.size() == 0) { error << "Could not find any similar ops to " << user_function_name << ". This op may not exist or may not be currently supported in TorchScript.\n"; } else { error << "Here are some suggestions: \n"; for (const auto& sym : close_symbols) { error << "\t" << sym.toQualString() << "\n"; } error << "\nThe original call is"; } throw error; } auto matched = matchSchemas(schemas, loc, graph, args, kwargs, self); if (matched.first < variants.size()) { return emitBuiltinNode(matched.second, loc, graph, name); } else { Function* fn = builtin_functions[matched.first - variants.size()]; // we inline builtin calls because they are normally very small // wrappers and are not useful for keeping around to debug return insertGraph(graph, *fn->graph(), matched.second.inputs).at(0); } } } // namespace jit } // namespace torch
[ "facebook-github-bot@users.noreply.github.com" ]
facebook-github-bot@users.noreply.github.com
59cb5eaf6cf8a87848812cd5551828411bd8939a
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
/chrome/browser/chromeos/login/version_updater/mock_version_updater_delegate.h
cd0759b88516f40800c436bb2ca51d2d7829517e
[ "BSD-3-Clause" ]
permissive
otcshare/chromium-src
26a7372773b53b236784c51677c566dc0ad839e4
64bee65c921db7e78e25d08f1e98da2668b57be5
refs/heads/webml
2023-03-21T03:20:15.377034
2020-11-16T01:40:14
2020-11-16T01:40:14
209,262,645
18
21
BSD-3-Clause
2023-03-23T06:20:07
2019-09-18T08:52:07
null
UTF-8
C++
false
false
1,367
h
// 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. #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_UPDATER_MOCK_VERSION_UPDATER_DELEGATE_H_ #define CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_UPDATER_MOCK_VERSION_UPDATER_DELEGATE_H_ #include <string> #include "chrome/browser/chromeos/login/version_updater/version_updater.h" #include "testing/gmock/include/gmock/gmock.h" namespace chromeos { class MockVersionUpdaterDelegate : public VersionUpdater::Delegate { public: MockVersionUpdaterDelegate(); virtual ~MockVersionUpdaterDelegate(); MOCK_METHOD1(UpdateInfoChanged, void(const VersionUpdater::UpdateInfo& update_info)); MOCK_METHOD1(FinishExitUpdate, void(VersionUpdater::Result result)); MOCK_METHOD0(OnWaitForRebootTimeElapsed, void()); MOCK_METHOD0(PrepareForUpdateCheck, void()); MOCK_METHOD3(UpdateErrorMessage, void(const NetworkPortalDetector::CaptivePortalStatus status, const NetworkError::ErrorState& error_state, const std::string& network_name)); MOCK_METHOD0(ShowErrorMessage, void()); MOCK_METHOD0(DelayErrorMessage, void()); }; } // namespace chromeos #endif // CHROME_BROWSER_CHROMEOS_LOGIN_VERSION_UPDATER_MOCK_VERSION_UPDATER_DELEGATE_H_
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
646452f8d723eb387ad440a78bc44e6a92286c32
5795af16335f6c04b07500343703cd75eba7edfa
/VectorUtils/interface/VectorUtils.h
bb87859907de26d01fa6102e1281635c9c401396
[]
no_license
duartej/AnalysisVH
f5bf152b717c3abd6ae949cea065177359fbb3f1
5f05b75448df06f05fd6143a020b9cd884aa8c5b
refs/heads/master
2020-04-05T23:40:38.654548
2013-11-07T18:27:00
2013-11-07T18:27:00
4,871,087
0
0
null
2013-01-15T10:30:16
2012-07-03T10:43:32
C++
UTF-8
C++
false
false
1,575
h
/////////////////////////////////////////////////////////////////////// // // FILE: VectorUtils.h // CLASS: VectorUtils // AUTHORS: I. Gonzalez Caballero // DATE: 21/02/2011 // // CONTENT: Some utility functions related to vectors, angles, etc... // /////////////////////////////////////////////////////////////////////// #ifndef VectorUtils_h #define VectorUtils_h 1 #include <math.h> class VectorUtils { public: static inline float Eta(float x, float y, float z) { float t(z/sqrt(x*x+y*y)); return asinhf(t);} static inline double eta3(double x, double y, double z) { double t(z/sqrt(x*x+y*y)); return asinh(t);} //Calculates DeltaPhi. Returns a value between -pi and pi static float DeltaPhi(float phi1, float phi2); static double DeltaPhi(double phi1, double phi2); //DR2 = DPhi*DPhi + DEta*DEta static float DeltaR2(float eta1, float phi1, float eta2, float phi2); static double DeltaR2(double eta1, double phi1, double eta2, double phi2); //DR2 = sqrt(DR2) static float DeltaR(float eta1, float phi1, float eta2, float phi2); static double DeltaR(double eta1, double phi1, double eta2, double phi2); //Rho2 = x^2+y^2+z^2 //Rho = sqrt(x^2+y^2+z^2) static inline float Rho2(float x, float y, float z) {return (x*x+y*y+z*z);} static inline double Rho2(double x, double y, double z) {return (x*x+y*y+z*z);} static inline float Rho(float x, float y, float z) {return sqrt(Rho2(x,y,z));} static inline double Rho(double x, double y, double z) {return sqrt(Rho2(x,y,z));} }; #endif
[ "duarte@ifca.unican.es" ]
duarte@ifca.unican.es
27f9f3a9ba06273c1f57ad431518f354bc597ce4
284d8657b07536bea5d400168a98c1a3ce0bc851
/xray/physics/engine.h
6f0a3c2cac154362396286df63770bad183eaa69
[]
no_license
yxf010/xray-2.0
c6bcd35caa4677ab19cd8be241ce1cc0a25c74a7
47461806c25e34005453a373b07ce5b00df2c295
refs/heads/master
2020-08-29T21:35:38.253150
2019-05-23T16:00:42
2019-05-23T16:00:42
null
0
0
null
null
null
null
UTF-8
C++
false
false
529
h
//////////////////////////////////////////////////////////////////////////// // Created : 20.11.2008 // Author : Dmitriy Iassenev // Description : physics engine interface //////////////////////////////////////////////////////////////////////////// #ifndef XRAY_PHYSICS_ENGINE_H_INCLUDED #define XRAY_PHYSICS_ENGINE_H_INCLUDED namespace xray { namespace physics { struct XRAY_NOVTABLE engine { }; // class engine } // namespace physics } // namespace xray #endif // #ifndef XRAY_PHYSICS_ENGINE_H_INCLUDED
[ "tyabustest@gmail.com" ]
tyabustest@gmail.com
cb35578832ad98cec0f84326b3df962400ea17cb
6d25434ca8ce03f8fef3247fd4fc3a1707f380fc
/[0428][Hard][Serialize_and_Deserialize_N-ary_Tree]/Serialize_and_Deserialize_N-ary_Tree.cpp
e4c20a2b4a97b79215a1d3fcde8e03f1346bf4ba
[]
no_license
sky-dream/LeetCodeProblemsStudy
145f620e217f54b5b124de09624c87821a5bea1b
e0fde671cdc9e53b83a66632935f98931d729de9
refs/heads/master
2020-09-13T08:58:30.712604
2020-09-09T15:54:06
2020-09-09T15:54:06
222,716,337
2
0
null
null
null
null
UTF-8
C++
false
false
1,373
cpp
// leetcode time cost : 108 ms // leetcode memory cost : 199.2 MB #include <vector> #include <stdlib.h> #include <string> using namespace std; // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; class Codec { public: // Encodes a tree to a single string. string serialize(Node* root) { string s; if (!root) { s = "#"; return s; } s = to_string(root->val) + " " + to_string(root->children.size()); for (const auto &child : root->children) { s = s + " " + serialize(child); } return s; } // Decodes your encoded data to tree. Node* deserialize(string data) { istringstream is(data); return DFS(is); } Node* DFS(istringstream &is) { string s, size; is >> s; if (s == "#") return nullptr; is >> size; Node *p = new Node(stoi(s)); for (int i = 0; i < stoi(size); ++i) { p->children.push_back(DFS(is)); } return p; } }; // Your Codec object will be instantiated and called as such: // Codec codec; // codec.deserialize(codec.serialize(root));
[ "xxm1263476788@126.com" ]
xxm1263476788@126.com
2e94df8af65b2baeb72ee858a8315c2064ffb76b
db309602f751dcd407506411a7963bfdd7c54a6f
/src/render2d.cpp
03bebd69df89328a6ed32f846842dcbef683d814
[]
no_license
perfectdaemon/96k
a931a9e5f49b3bfe54ec131ba095e4c677ea116c
9b84643730c5ca443251378873614b2987cd6f63
refs/heads/master
2016-09-06T00:13:19.918185
2015-03-16T11:01:14
2015-03-16T11:01:14
30,697,726
3
0
null
null
null
null
UTF-8
C++
false
false
7,589
cpp
#include "render2d.h" #include "resources.h" Sprite::Sprite(float width, float height, const vec2 &pivot) : m_width(width), m_height(height), m_pivot(pivot.x, pivot.y), m_rot(0) { resetVertices(); resetTexCoords(); setVerticesColor(vec4(1.0f)); } void Sprite::setRotation(float rotation) { if (!_equalf(rotation, m_rot)) { m_rot = rotation; model.identity(); model.rotate(m_rot * _DEG2RAD, vec3(0, 0, 1)); if (m_rot > 360) m_rot -= 360; else if (m_rot < -360) m_rot += 360; } } void Sprite::setPivot(vec2 &pivot) { if (pivot != m_pivot) { m_pivot = pivot; resetVertices(); } } void Sprite::setWidth(float width) { if (width > 0 && !_equalf(m_width, width)) { m_width = width; resetVertices(); } } void Sprite::setHeight(float height) { if (height > 0 && !_equalf(m_height, height)) { m_height = height; resetVertices(); } } void Sprite::setSize(float width, float height) { m_width = width; m_height = height; resetVertices(); } void Sprite::resetVertices() { vertices[0].pos = vec3((vec2(1.0f, 1.0f) - m_pivot) * vec2(m_width, m_height), 0); vertices[1].pos = vec3((vec2(1.0f, 0.0f) - m_pivot) * vec2(m_width, m_height), 0); vertices[2].pos = vec3(( - m_pivot) * vec2(m_width, m_height), 0); vertices[3].pos = vec3((vec2(0.0f, 1.0f) - m_pivot) * vec2(m_width, m_height), 0); } void Sprite::resetTexCoords() { vertices[0].tc = vec2(1, 1); vertices[1].tc = vec2(1, 0); vertices[2].tc = vec2(0, 0); vertices[3].tc = vec2(0, 1); } void Sprite::setTextureRegion(TextureRegion *region, bool adjustSpriteSize) { if (!region->rotated) { vertices[0].tc = vec2(region->tx + region->tw, region->ty + region->th); vertices[1].tc = vec2(region->tx + region->tw, region->ty); vertices[2].tc = vec2(region->tx, region->ty); vertices[3].tc = vec2(region->tx, region->ty + region->th); if (adjustSpriteSize) setSize((region->tw) * (region->texture->width), (region->th) * (region->texture->height)); } else { vertices[0].tc = vec2(region->tx, region->ty + region->th); vertices[1].tc = vec2(region->tx + region->tw, region->ty + region->th); vertices[2].tc = vec2(region->tx + region->tw, region->ty); vertices[3].tc = vec2(region->tx, region->ty); if (adjustSpriteSize) setSize(region->th * region->texture->height, region->tw * region->texture->width); } } // SpriteBatch ---------------------------------------------- void SpriteBatch::begin() { m_count = 0; } void SpriteBatch::end() { if (m_count == 0) return; vb->update(&m_vData[0], 0, m_count * 4); ib->update(&m_iData[0], 0, m_count * 6); Render::params.mModelViewProj = Render::params.mViewProj; Render::drawTriangles(ib, vb, 0, m_count * 6); } void SpriteBatch::render(Sprite *sprite) { static const unsigned int spriteIndices[6] = { 0, 1, 2, 2, 3, 0 }; if (!sprite->visible()) return; memcpy(&m_vData[m_count * 4], &sprite->vertices[0], sizeof(Vertex_PTC_324) * 4); mat4 absMatrix = sprite->absMatrix(); for (int i = 0; i < 4; i++) m_vData[m_count * 4 + i].pos = absMatrix * m_vData[m_count * 4 + i].pos; for (int i = 0; i < 6; i++) m_iData[m_count * 6 + i] = spriteIndices[i] + m_count * 4; m_count++; } // Font ------------------------------------------------------ Font* Font::init(Stream *stream, bool freeStreamOnFinish) { Font *f = new Font(); FontRes *fRes = new FontRes(stream); TextureRes *tRes = fRes->texture; f->texture = Texture::init(tRes->width, tRes->height, tRes->format, tRes->data, tRes->size); f->material = Material::init(Default::isInited ? Default::spriteShader : NULL); f->material->addTexture(f->texture, "uDiffuse", 0); f->m_charCount = fRes->charCount; f->charData = new CharData[f->m_charCount]; memcpy(f->charData, fRes->data, sizeof(CharData) * f->m_charCount); for (int i = 0; i < f->m_charCount; i++) { f->table[f->charData[i].id] = &f->charData[i]; if (f->charData[i].h > f->maxCharHeight) f->maxCharHeight = f->charData[i].h; } delete fRes; if (freeStreamOnFinish) delete stream; return f; } Quad_PTC_324 Font::getCharQuad(uchar c, float scale) { Quad_PTC_324 q; memset(&q, 0, sizeof(Quad_PTC_324)); CharData *cd = table[c]; if (!cd) return q; q.v[0].pos = vec3(cd->w, cd->py + cd->h, 0.0f) * scale; q.v[1].pos = vec3(cd->w, cd->py, 0.0f) * scale; q.v[2].pos = vec3(0, cd->py, 0.0f) * scale; q.v[3].pos = vec3(0, cd->py + cd->h, 0.0f) * scale; q.v[0].tc = vec2(cd->tx + cd->tw, cd->ty + cd->th); q.v[1].tc = vec2(cd->tx + cd->tw, cd->ty ); q.v[2].tc = vec2(cd->tx, cd->ty ); q.v[3].tc = vec2(cd->tx, cd->ty + cd->th); return q; } // FontBatch --------------------------------------------------- vec2 FontBatch::getTextOrigin(const Text *text) { float maxWidth = 0.0f; vec2 textSize(0.0f, m_font->maxCharHeight + text->lineSpacing); for (int i = 0; i < text->text.length(); i++) { unsigned char ch = text->text[i]; CharData *c = m_font->table[ch]; if (c->id == '\n') { textSize.y += m_font->maxCharHeight + text->lineSpacing; if (maxWidth > textSize.x) textSize.x = maxWidth; maxWidth = 0.0f; continue; } maxWidth += c->w + text->letterSpacing; } if (textSize.x < maxWidth) textSize.x = maxWidth; textSize *= text->scale; return -textSize * text->pivot; } void FontBatch::wordWrapText(Text *text) { int lastSpace = 0; float width = 0.0f; int i = 0; while (i < text->text.length()) { if (!m_font->table[text->text[i]]) continue; if (text->text[i] == '\n') text->text[i] = ' '; if (text->text[i] == ' ') lastSpace = i; width += m_font->table[text->text[i]]->w * text->scale + text->letterSpacing; if (width > text->textWidth() && lastSpace > 0) { text->text[lastSpace] = '\n'; i = lastSpace + 1; width = 0.0f; lastSpace = 0; } else i++; } } void FontBatch::begin() { m_count = 0; } void FontBatch::end() { if (m_count == 0) return; vb->update(&m_vData[0], 0, m_count * 4); ib->update(&m_iData[0], 0, m_count * 6); Render::params.mModelViewProj = Render::params.mViewProj; this->m_font->material->bind(); Render::drawTriangles(ib, vb, 0, m_count * 6); } void FontBatch::render(Text *text) { static const unsigned int spriteIndices[6] = { 0, 1, 2, 2, 3, 0 }; if (!text->visible() || text->text == "") return; vec2 origin = getTextOrigin(text); vec2 start = origin; if (text->textWidth() > 0.0f && text->textWidthChanged) { wordWrapText(text); text->textWidthChanged = false; } for (int i = 0; i < text->text.length(); i++) { uchar c = text->text[i]; if (c == '\n') { start.x = origin.x; start.y += (text->lineSpacing + m_font->maxCharHeight) * text->scale; continue; } if (!m_font->table[c]) continue; Quad_PTC_324 quad = m_font->getCharQuad(c, text->scale); mat4 absMatrix = text->absMatrix(); for (int j = 0; j < 4; j++) { m_vData[m_count * 4 + j] = quad.v[j]; m_vData[m_count * 4 + j].pos += vec3(start.x, start.y, 0); m_vData[m_count * 4 + j].pos = absMatrix * m_vData[m_count * 4 + j].pos; m_vData[m_count * 4 + j].col = text->color; } for (int j = 0; j < 6; j++) m_iData[m_count * 6 + j] = spriteIndices[j] + m_count * 4; start.x += quad.v[0].pos.x + text->letterSpacing; m_count++; } }
[ "perfectdaemon@gmail.com" ]
perfectdaemon@gmail.com
8afa66157d72d33f8158f0c4b54cf0c4e45aecfa
c31792ecc2f4558530aea33c2692773932e6cf50
/bulletgba/generator/data/code/original/kotai.cpp
f8d584f49595638e5492472408772deda26ff657
[ "Unlicense" ]
permissive
pqrs-org/BulletGBA
f65e4e7b964b5bb021a8b95dd7727852e62a866c
a294007902970242b496f2528b4762cfef22bc86
refs/heads/main
2021-08-29T02:12:55.680153
2020-03-22T05:50:28
2020-03-22T05:50:28
249,121,625
12
0
null
null
null
null
UTF-8
C++
false
false
20,158
cpp
// XXX uniqID XXX 1f791c16ab88181e58b563da25f9ea1e XXX #include <gba_types.h> #include "bullet.hpp" #include "fixed.hpp" #include "original/kotai.hpp" extern const BulletStepFunc bullet_c71b828c85d04ccf19d35f2da771b455_1f791c16ab88181e58b563da25f9ea1e[] = { stepfunc_ab0fd8a77cda5ccea72996d1b769bb36_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, NULL}; extern const BulletStepFunc bullet_faee90b588521d3383e006cbe64f1032_1f791c16ab88181e58b563da25f9ea1e[] = { stepfunc_a3894d366d11edfc7580780bc18d56f0_1f791c16ab88181e58b563da25f9ea1e, stepfunc_6cccf7dcb3619fe5aca367b7ac497470_1f791c16ab88181e58b563da25f9ea1e, NULL}; extern const BulletStepFunc bullet_2350d17c031d43ca9f4b178d12eb7a55_1f791c16ab88181e58b563da25f9ea1e[] = { stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e, stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e, stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e, NULL}; void stepfunc_dae2cf81747ffb5070f05c8837b1d568_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { ListBullets::stepFuncDrop(p);} void stepfunc_a3894d366d11edfc7580780bc18d56f0_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { p->wait = static_cast<u16>( 1.0 ); } void stepfunc_6cccf7dcb3619fe5aca367b7ac497470_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { { BulletInfo *bi; p->lastBulletAngle = (FixedPointNum::degree2angle( 180.0 )); p->lastBulletSpeed = ( 1.8 ); bi = ListBullets::makeNewBullet(); if (bi != NULL) { bi->initialize(p->getType() << 1, p->getPosX(), p->getPosY(), p->lastBulletAngle, p->lastBulletSpeed, StepFunc::nullStepFuncList); } } ListBullets::stepFuncDrop(p);} void stepfunc_ebe0866deec6051320cf77dff8d9c01f_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { { BulletInfo *bi; p->lastBulletAngle = (FixedPointNum::degree2angle( FixedPointNum::random()*360.0 )); p->lastBulletSpeed = ( FixedPointNum::random()*10.0 ); bi = ListBullets::makeNewBullet(); if (bi != NULL) { bi->initialize(p->getType() << 1, p->getPosX(), p->getPosY(), p->lastBulletAngle, p->lastBulletSpeed, bullet_faee90b588521d3383e006cbe64f1032_1f791c16ab88181e58b563da25f9ea1e); } } } void stepfunc_ab0fd8a77cda5ccea72996d1b769bb36_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { p->wait = static_cast<u16>( 10.0 ); } void stepfunc_939b22b865fe2bd859947361db80f98f_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { p->wait = static_cast<u16>( 10.0-1.0*6.0 ); } void stepfunc_fc83f7d264ffdefedb20ad9464e5c5ed_1f791c16ab88181e58b563da25f9ea1e(BulletInfo *p) { { BulletInfo *bi; p->lastBulletAngle = (FixedPointNum::degree2angle( 90.0 )); p->lastBulletSpeed = ( -10.0+FixedPointNum::random()*20.0 ); bi = ListBullets::makeNewBullet(); if (bi != NULL) { bi->initialize(p->getType() << 1, p->getPosX(), p->getPosY(), p->lastBulletAngle, p->lastBulletSpeed, bullet_c71b828c85d04ccf19d35f2da771b455_1f791c16ab88181e58b563da25f9ea1e); } } } BulletInfo *genBulletFunc_1f791c16ab88181e58b563da25f9ea1e(FixedPointNum posx, FixedPointNum posy) { BulletInfo * bi; bi = ListBullets::makeNewBullet(); if (bi != NULL) { bi->initialize(BULLET_TYPE_ROOT, posx, posy, BulletInfo::DEFAULT_ANGLE, 0, bullet_2350d17c031d43ca9f4b178d12eb7a55_1f791c16ab88181e58b563da25f9ea1e); } return bi;}
[ "tekezo@pqrs.org" ]
tekezo@pqrs.org
bdff444d7c0942fb97f06c42ab9d286f5376c15c
bb5ca293640f379dbff3852609806273b0059031
/src/caffe/layers/acl_absval_layer.cpp
b0b0304d1329181d377c3aab540a1e93af821db8
[ "BSD-3-Clause", "LicenseRef-scancode-generic-cla", "BSD-2-Clause", "LicenseRef-scancode-public-domain" ]
permissive
dlyshare/CaffeOnACL
085206e2b361c38dc728ee4859a090d12f410f74
d06352537c5f6f38897fb30119bad9bacb37ce79
refs/heads/master
2021-05-15T20:09:55.379567
2017-10-20T06:34:09
2017-10-20T06:34:09
107,835,719
2
0
null
2017-10-22T03:55:35
2017-10-22T03:55:35
null
UTF-8
C++
false
false
1,979
cpp
#ifdef USE_ACL #include <vector> #include "caffe/layers/acl_absval_layer.hpp" #include "caffe/util/math_functions.hpp" namespace caffe { template <typename Dtype> void ACLAbsValLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { AbsValLayer<Dtype>::LayerSetUp(bottom, top); ACLBaseActivationLayer<Dtype>::LayerSetUp(bottom, top); this->force_bypass_acl_path_= bypass_acl_class_layer & FLAGS_ENABLE_ACL_ABSVAL; } template <typename Dtype> void ACLAbsValLayer<Dtype>::SetupACLLayer(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top,ActivationLayerInfo::ActivationFunction type){ ACLBaseActivationLayer<Dtype>::SetupACLLayer(bottom, top,ActivationLayerInfo::ActivationFunction::ABS); } template <typename Dtype> void ACLAbsValLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { AbsValLayer<Dtype>::Reshape(bottom, top); ACLBaseActivationLayer<Dtype>::Reshape(bottom, top); } template <typename Dtype> void ACLAbsValLayer<Dtype>::Forward_cpu( const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { #ifdef USE_PROFILING logtime_util log_time(ACL_ABSVAL_INFO); #endif //USE_PROFILING if (this->force_bypass_acl_path_) { AbsValLayer<Dtype>::Forward_cpu(bottom,top); return; } ACLBaseActivationLayer<Dtype>::Forward_cpu(bottom,top); } template <typename Dtype> void ACLAbsValLayer<Dtype>::Forward_gpu( const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { #ifdef USE_PROFILING logtime_util log_time(ACL_ABSVAL_INFO); #endif //USE_PROFILING if (this->force_bypass_acl_path_) { AbsValLayer<Dtype>::Forward_cpu(bottom,top); return; } ACLBaseActivationLayer<Dtype>::Forward_gpu(bottom,top); } template <typename Dtype> ACLAbsValLayer<Dtype>::~ACLAbsValLayer() { } INSTANTIATE_CLASS(ACLAbsValLayer); } // namespace caffe #endif // USE_ACL
[ "honggui@openailan.com" ]
honggui@openailan.com
eae63502c8278d975c0eddd6dc9179b085f0909a
93020fcc267a0ae3494907a5d8f325e55ddb0e30
/e_06_09/src/e_06_09.cpp
0ab542b99e1eda202e1b28397d22b56a8819c22c
[]
no_license
ddt-narita/meikai_c-_narita
7f27d854f03241ab6706d89dd2e837ae98585538
e923a2489a181cbd61868ba09fee8d72d479a7b1
refs/heads/master
2021-01-20T07:23:31.846324
2019-05-21T11:37:16
2019-05-21T11:37:16
89,997,124
0
0
null
null
null
null
UTF-8
C++
false
false
1,862
cpp
/* 演習06-09 * a以上b未満の乱数を生成しその値を返却する関数randomを作成 * ただしbがa未満の時はaをそのまま返す * 作成日:5月11日 * 作成者:成田修之 */ #include<ctime> #include<cstdlib> #include<iostream> using namespace std; /* 関数random * a以上b未満のランダムな値を返却、bがa未満の時はaを返却する関数 * 引数は2つのint型の整数 * 返却値はa以上b未満のランダムな値か、a * 作成日:5月11日 * 作成者:成田修之 */ int random(int nInputA,int nInputB); int main () { int nInputA; //入力するための変数A int nInputB; //入力するための変数B //ランダムな整数を生成することを明示 cout << "整数A以上整数B未満のランダムな整数を表示します。(整数Bが整数A未満な時は"; cout << "整数Aを表示します。)\n"; //整数Aに入力を促す表示 cout << "整数A:"; //キーボードから入力 cin >> nInputA; //整数Bに入力を促す表示 cout << "整数B:"; //キーボードから入力 cin >> nInputB; //random関数を呼び出して生成した整数を表示 cout << random(nInputA,nInputB) << "です。"; //main関数の返却値 return 0; } int random(int nInputA,int nInputB) { //返却値となる変数を宣言 int nReturn; //ランダムな値を生成する種を設定 srand (time(NULL)); //入力されたAの値がB以上のとき if(nInputA >= nInputB) { //返却値にAを代入する nReturn = nInputA; //Bのほうが大きいとき } else { /*0から大きいBから小さいAの値を引いた数までのランダムな整数を生成しAに * 足したものを返却値に代入する */ nReturn = rand() % (nInputB - nInputA) + nInputA; } //関数randomの返却値 return nReturn; }
[ "ddt.jissyusei1@gmail.com" ]
ddt.jissyusei1@gmail.com
9a00b2136cd18f799efc2778acb9c0fd369663ec
022383785ea9dc55520b310a3de87283706dda5d
/source/Dream/Client/Graphics/ShaderManager.h
faa549c2983ed0a23334d65c435d15a9abc3b1d5
[ "MIT" ]
permissive
rdcastan/dream
ea98183d941ef82b3c7c0e157bf4bd2a83923a7e
ca0a7f8bf31ca74652d5a5c5bdfd8adc97302d29
refs/heads/master
2020-12-25T10:14:13.736685
2013-07-14T02:42:01
2013-07-14T02:42:01
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,066
h
// // Client/Graphics/ShaderManager.h // This file is part of the "Dream" project, and is released under the MIT license. // // Created by Samuel Williams on 5/12/11. // Copyright (c) 2011 Samuel Williams. All rights reserved. // #ifndef _DREAM_CLIENT_GRAPHICS_SHADERMANAGER_H #define _DREAM_CLIENT_GRAPHICS_SHADERMANAGER_H #include "Graphics.h" #include <Euclid/Numerics/Vector.h> namespace Dream { namespace Client { namespace Graphics { using namespace Euclid::Numerics::Constants; using Euclid::Numerics::Vector; using Euclid::Numerics::Matrix; /* void test() { Ref<Program> program = ...; Shared<UniformBuffer> lighting_buffer; UniformBuffer::Binding uniform_binding(0); program->set_uniform_block(uniform_binding); buffer->bind_range(uniform_binding); } */ #ifndef DREAM_OPENGLES2 class UniformBuffer : private NonCopyable { protected: GLuint _handle; public: UniformBuffer(std::size_t size = 0, GLenum mode = GL_STREAM_DRAW) { glGenBuffers(1, &_handle); if (size) { bind(); resize(size, mode); unbind(); } } ~UniformBuffer() { glDeleteBuffers(1, &_handle); } void bind() { glBindBuffer(GL_UNIFORM_BUFFER, _handle); } void unbind() { glBindBuffer(GL_UNIFORM_BUFFER, 0); } void resize(std::size_t size, GLenum mode = GL_STREAM_DRAW) { glBufferData(GL_UNIFORM_BUFFER, (GLsizeiptr)size, NULL, mode); } void bind_range(GLuint bindingIndex, GLintptr size, GLintptr offset = 0) { bind(); glBindBufferRange(GL_UNIFORM_BUFFER, bindingIndex, _handle, offset, size); unbind(); } class Binding { protected: GLuint _index; public: Binding(GLuint index) : _index(index) { } GLuint index() const { return _index; } }; }; #endif template <dimension E> class GLUniformTraits { }; template <dimension R, dimension C> class GLUniformMatrixTraits { }; class ShaderError : public std::exception { protected: StringT _message; public: ShaderError(StringT message); const char * what () const noexcept; }; class Program : public Object { protected: // This is actually a program handle. GLenum _handle; void enable(); void disable(); public: Program(); ~Program(); void attach(GLenum shader); bool link(); GLint attribute_location(const char * name); GLint uniform_location(const char * name); GLint uniform_block_index(const char * name); void bind_fragment_location(const char * name, GLuint output = 0); public: void set_attribute_location(const char * name, GLuint location) { glBindAttribLocation(_handle, location, name); } class Binding { protected: Program * _program; GLuint location_of(GLuint location) { return location; } GLuint location_of(const char * name) { return _program->uniform_location(name); } public: Binding(Program * program) : _program(program) { _program->enable(); } Binding(Binding && other) : _program(other._program) { other._program = NULL; } ~Binding() { if (_program) _program->disable(); } template <typename LocationT> void set_texture_unit(LocationT name, GLuint unit) { glUniform1i(location_of(name), unit); } template <typename LocationT, dimension E, typename T> void set_uniform(LocationT name, const Vector<E, T> & vector) { GLUniformTraits<E>::set(location_of(name), 1, vector.data()); } template <typename LocationT, dimension E, typename T, dimension N> void set_uniform(LocationT name, const Vector<E, T>(&vector)[N]) { GLUniformTraits<E>::set(location_of(name), N, vector[0].data()); } template <typename LocationT, dimension R, dimension C, typename T> void set_uniform(LocationT name, const Matrix<R, C, T> & matrix, bool transpose = false) { GLUniformMatrixTraits<R, C>::set(location_of(name), 1, transpose, matrix.data()); } }; Binding binding() { Binding binding(this); // Is this approach really efficient? return std::move(binding); } void property(GLenum name, GLint * value) { glGetProgramiv(_handle, name, value); } }; /* Once the ShaderManager is deallocated, associated Program objects that are not linked will become invalid. */ class ShaderManager : public Object { protected: std::vector<GLenum> _shaders; public: ShaderManager(); ~ShaderManager(); GLenum compile(GLenum type, const Buffer & buffer); // Deprecated GLenum compile(GLenum type, const Buffer * buffer) { return compile(type, *buffer); } }; // MARK: - // MARK: Uniform Specialisations template <> class GLUniformTraits<1> { public: #ifndef DREAM_OPENGLES2 static void set(GLint location, const GLsizei count, const GLuint * value) { glUniform1uiv(location, count, value); } #endif static void set(GLint location, const GLsizei count, const GLint * value) { glUniform1iv(location, count, value); } static void set(GLint location, const GLsizei count, const GLfloat * value) { glUniform1fv(location, count, value); } }; template <> class GLUniformTraits<2>{ public: #ifndef DREAM_OPENGLES2 static void set(GLint location, const GLsizei count, const GLuint * value) { glUniform2uiv(location, count, value); } #endif static void set(GLint location, const GLsizei count, const GLint * value) { glUniform2iv(location, count, value); } static void set(GLint location, const GLsizei count, const GLfloat * value) { glUniform2fv(location, count, value); } }; template <> class GLUniformTraits<3>{ public: #ifndef DREAM_OPENGLES2 static void set(GLint location, const GLsizei count, const GLuint * value) { glUniform3uiv(location, count, value); } #endif static void set(GLint location, const GLsizei count, const GLint * value) { glUniform3iv(location, count, value); } static void set(GLint location, const GLsizei count, const GLfloat * value) { glUniform3fv(location, count, value); } }; template <> class GLUniformTraits<4>{ public: #ifndef DREAM_OPENGLES2 static void set(GLint location, const GLsizei count, const GLuint * value) { glUniform4uiv(location, count, value); } #endif static void set(GLint location, const GLsizei count, const GLint * value) { glUniform4iv(location, count, value); } static void set(GLint location, const GLsizei count, const GLfloat * value) { glUniform4fv(location, count, value); } }; template <> class GLUniformMatrixTraits<2, 2>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix2fv(location, count, transpose, value); } }; #ifndef DREAM_OPENGLES2 template <> class GLUniformMatrixTraits<2, 3>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix2x3fv(location, count, transpose, value); } }; template <> class GLUniformMatrixTraits<2, 4>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix2x4fv(location, count, transpose, value); } }; template <> class GLUniformMatrixTraits<3, 2>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix3x2fv(location, count, transpose, value); } }; #endif template <> class GLUniformMatrixTraits<3, 3>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix3fv(location, count, transpose, value); } }; #ifndef DREAM_OPENGLES2 template <> class GLUniformMatrixTraits<3, 4>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix3x4fv(location, count, transpose, value); } }; template <> class GLUniformMatrixTraits<4, 2>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix4x2fv(location, count, transpose, value); } }; template <> class GLUniformMatrixTraits<4, 3>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix4x3fv(location, count, transpose, value); } }; #endif template <> class GLUniformMatrixTraits<4, 4>{ public: static void set(GLint location, const GLsizei count, GLboolean transpose, const GLfloat * value) { glUniformMatrix4fv(location, count, transpose, value); } }; } } } #endif
[ "samuel.williams@oriontransfer.co.nz" ]
samuel.williams@oriontransfer.co.nz
0c126e14153bfd3ab2b14f839d4c2dfc4104d7ef
a585a837bb289323d33354ed7a58a8f2818c0cf1
/cpp/7kyu/the-hotel-with-infinite-rooms.cpp
8c0fb1164c385b9aa86f03d900fa81e9a7ce4f4e
[ "MIT" ]
permissive
walki/codewar-solutions
6dd986b5b5bef568238b41862167040ca487d99d
07b51ebe0be30ce251b1d936e7fccf9201cd3c9d
refs/heads/master
2023-01-20T13:11:59.004851
2022-05-10T01:37:31
2022-05-10T01:37:31
169,509,837
0
0
MIT
2023-01-08T16:14:17
2019-02-07T02:42:55
JavaScript
UTF-8
C++
false
false
409
cpp
long long int groupSize(long long int S,long long int D){ // The Day is Triangular Number, G is n... // G * (G + 1) / 2 = D; // G = 1/2 ( Sqrt( 8*D + 1) -1 ) // However, we need to find the offset Day to map, total to add to D if S > 1 long long toAdd = (S - 1) * S / 2; double offsetDay = D + toAdd; long long G = ceil(1.0/2.0 * ( sqrt( 8.0 * offsetDay + 1 ) - 1 )); return G; }
[ "roger.john.walker@gmail.com" ]
roger.john.walker@gmail.com
8ab5b7bde6f23d933e729972ff203332804dbf78
1f5079b24785a0e6a8bef1f15e1bca939e94ba56
/Dev/C++/Mascaret/include/BackupUtils/ProcedureExecutionBackup.h
a550a137ad049c1ae4544bc9e678a3f0a97d8626
[]
no_license
querrec/Mascaret
7d5d0628dfb93226a602f79a7a974c14a60a88e8
c71eba3667b3e3fa8a0b18a1f40219aee358c968
refs/heads/master
2021-01-17T08:12:10.024097
2016-04-14T13:27:52
2016-04-14T13:27:52
25,727,699
0
5
null
null
null
null
UTF-8
C++
false
false
1,358
h
#ifndef _BackupUtils_ProcedureExecutionBackup_H #define _BackupUtils_ProcedureExecutionBackup_H #include "Tools/veha_plateform.h" #include "BackupUtils/Backup.h" #include "BEHAVE/ProcedureExecution.h" #include "BEHAVE/AID.h" #include "VEHA/Behavior/Activity/ActivityPartition.h" #include "VEHA/Behavior/Activity/ActionNode.h" #include "VEHA/Behavior/Activity/ActivityEdge.h" namespace BackupUtils { using VEHA::ActivityPartition; using VEHA::ActivityNode; using VEHA::ActionNode; using VEHA::ActivityEdge; using BEHAVE::AID; using BEHAVE::ProcedureExecution; class VEHA_API ProcedureExecutionBackup : public Backup { friend class ProcedureExecution; //allow direct access for owner public : ProcedureExecutionBackup(const shared_ptr<IBackupEnabled> obj); ~ProcedureExecutionBackup(); protected: vector < shared_ptr<ActionNode> > runningNodes; vector < shared_ptr<ActivityEdge> > toExecuteNodes; vector < shared_ptr<ActivityEdge> > lastToExecuteNodes; vector<pair<string,string> > actionsDone; map<string, vector<string> > allActionsDone; vector<pair<string,string> > actionsRunning; vector< shared_ptr<ActionNode> >forkFirstActionsDone; vector< shared_ptr<ActionNode> >forkLastActionsDone; map<string, shared_ptr<ActivityPartition> > agentToPartition; map<shared_ptr<ActivityPartition>, shared_ptr<AID> > partitionToAgent; }; } #endif
[ "querrec@querrecPortable.(none)" ]
querrec@querrecPortable.(none)
0e6214b14463859a0a88679fb7019bc3d2134850
eab5a717b6e0a8d3fb9f6847c4e4b1109b75a920
/finalWifiModule.ino
2c31306af9f76ab0555cdc13c846f9f135a792ea
[]
no_license
torviik/chessLogger
a43bb09bf73c49aa11c666861c66629b8e0cb044
275ebf81077fe2deb8c401186003c48631b8b8e3
refs/heads/master
2020-11-24T13:08:32.389783
2019-12-15T09:28:06
2019-12-15T09:28:06
228,159,077
0
0
null
null
null
null
UTF-8
C++
false
false
1,090
ino
#include <ESP8266WiFi.h> #include <FirebaseArduino.h> #define FIREBASE_HOST "cheogger.firebaseio.com" #define FIREBASE_AUTH "9tGxaWQgfggfx7u5jl0ntAlmVO82gcSaGqTayx1L" #define WIFI_SSID "Torviik" #define WIFI_PASSWORD "nCrp5kP2" String passedData = ""; void setup() { Serial.begin(9600); WiFi.begin(WIFI_SSID, WIFI_PASSWORD); Serial.print("connecting"); while (WiFi.status() != WL_CONNECTED) { Serial.print("."); delay(500); } Serial.println(); Serial.print("connected: "); Serial.println(WiFi.localIP()); Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH); } void loop() { passedData = Serial.readString(); if (passedData.length() > 2) { Serial.println(passedData); String gameName = Firebase.pushString("games", passedData); // HANDLING ERROR if (Firebase.failed()) { Serial.print("pushing game failed: "); Serial.println(Firebase.error()); return; } Serial.print("Game named "); Serial.println(gameName + " successfully created!"); delay(3000); } }
[ "vik.nikolenko@gmail.com" ]
vik.nikolenko@gmail.com
8cdc59e03c2951484f18aa122dec9cea8f5af6b8
78e5a1baeb25887e25b7d6709e45b44277f42a76
/src/LayerDesc.h
a14fcf2312c4fa7a787e27dcafe9ca9ff6815c55
[]
no_license
yixuan/Layer
5502c1defea70abaac48fe5e9854da5d7303e9f8
89e0b12744e9fca5873b7676574772fe5b8fa9ce
refs/heads/master
2020-03-27T18:50:22.665369
2011-09-16T04:58:05
2011-09-16T04:58:05
2,397,389
1
2
null
null
null
null
UTF-8
C++
false
false
5,331
h
#ifndef LAYERDESC_H #define LAYERDESC_H #include <R.h> #include <Rinternals.h> #include <Rdefines.h> #include <R_ext/GraphicsEngine.h> #include <R_ext/GraphicsDevice.h> #include <gtk/gtk.h> #include <cairo.h> #include <cairo-svg.h> #include <cairo-pdf.h> #include <cairo-ps.h> #include <vector> #include "Layer.h" #include "LayerStruct.h" enum FileType{fileTypePDF, fileTypePNG, fileTypeSVG, fileTypePS}; class LayerDesc { public: LayerDesc(gdouble wInPoints, gdouble hInPoints, gint wInPixels, gint hInPixels, pDevDesc dd); ~LayerDesc(); inline void ShowWindow() { gtk_widget_show_all(gWindow); } inline gdouble GetWidthInPoints() { return widthInPoints; } inline gdouble GetHeightInPoints() { return heightInPoints; } void SetDefaultFontFace(const gchar *fontPath); inline cairo_font_face_t* GetDefaultFontFace() { return defaultFontFace; } gint AddLayer(const gchar* layerName); inline gint GetIdCount() { return idCount; } inline gint GetLayersCount() { return (gint) layers.size(); } inline const gchar* GetLayerNameAt(gint index) { return layers[index]->GetLayerName(); } inline gint GetLayerIdAt(gint index) { return layers[index]->GetLayerId(); } inline gint GetCurrentLayerIndex() { return currentLayerIndex; } inline void SetCurrentLayerByIndex(gint index) { currentLayerIndex = index; currentLayer = layers[currentLayerIndex]; } inline void SetOpMode(gint operateMode) { opMode = operateMode; } void SetDefaultTransMatrix(); void PlotToDispSurface(); void ReplotToDispSurface(); void ReplotTo(cairo_t *cr, gboolean isVectorDevice); void MergeLayers(); void MergeLayersWithTransformation(); void CanvasToScreen(); void ResetLayers(); inline void SetMousePressCoord(gint x, gint y) { mousePressX = x; mousePressY = y; } inline void SetMouseHoldOn(gboolean isHoldOn) { mouseHoldOn = isHoldOn; } inline gboolean IsMouseHoldOn() { return mouseHoldOn; } inline gint GetMousePressCoordX() {return mousePressX;} inline gint GetMousePressCoordY() {return mousePressY;} void OpenSaveAsDialog(FileType fType, gchar *fName); void Activate(pDevDesc dd) { SetWindowActive(TRUE, dd); } void Deactivate(pDevDesc dd) { SetWindowActive(FALSE, dd); } void NewPage(pGEcontext gc, pDevDesc dd); void Clip(double x0, double x1, double y0, double y1, pDevDesc dd); void Size(double *left, double *right, double *bottom, double *top, pDevDesc dd); void Circle(double x, double y, double r, pGEcontext gc, pDevDesc dd); void Line(double x1, double y1, double x2, double y2, pGEcontext gc, pDevDesc dd); void Polygon(int n, double *x, double *y, pGEcontext gc, pDevDesc dd); void Polyline(int n, double *x, double *y, pGEcontext gc, pDevDesc dd); void Rect(double x0, double y0, double x1, double y1, pGEcontext gc, pDevDesc dd); void Text(double x, double y, const char *str, double rot, double hadj, pGEcontext gc, pDevDesc dd); void MetricInfo(int c, pGEcontext gc, double* ascent, double* descent, double* width, pDevDesc dd); double StrWidth(const char *str, pGEcontext gc, pDevDesc dd); void Mode(int mode, pDevDesc dd); Rboolean Locator(double *x, double *y, pDevDesc dd); private: // Main Window GtkWidget *gWindow; // Drawing widget GtkWidget *gDraw; // Save file dialog GtkWidget *gDialog; // Layer structures std::vector<LayerStruct*> layers; // Background layer LayerStruct *background; // Record merged layers and render the drawing widget LayerStruct *canvas; // Pointer to current layer LayerStruct *currentLayer; // Size of the device gdouble widthInPoints, heightInPoints; gint widthInPixels, heightInPixels; // Operation mode: -1 for none, 0 for move, 1 for rotate, 2 for scale gint opMode; // Coordinates in button events gint mousePressX, mousePressY; gboolean mouseHoldOn; // Number of available layers; ID of current layer gint currentLayerIndex, idCount; // Default font FT_Library library; FT_Face face; cairo_font_face_t *defaultFontFace; void SetWindowActive(gboolean active, pDevDesc dd); // Events static gboolean OnExpose(GtkWidget *widget, GdkEventExpose *event, pDevDesc dd); static gboolean OnLeftMouseButtonPress(GtkWidget *widget, GdkEventButton *event, pDevDesc dd); static gboolean OnMouseMove(GtkWidget *widget, GdkEventMotion *event, pDevDesc dd); static gboolean OnLeftMouseButtonRelease(GtkWidget *widget, GdkEventButton *event, pDevDesc dd); static gboolean OnDelete(GtkWidget *widget, GdkEvent *event, pDevDesc dd); // Menu item callbacks void SaveAsFile(FileType fType, const gchar *fileName); static void SaveAsCallback(gpointer data, guint action, GtkWidget *widget); static void SaveAsPDFCallback(gpointer data, guint action, GtkWidget *widget); static void SaveAsPNGCallback(gpointer data, guint action, GtkWidget *widget); static void SaveAsSVGCallback(gpointer data, guint action, GtkWidget *widget); static void SaveAsPSCallback(gpointer data, guint action, GtkWidget *widget); static void SetOpModeCallback(gpointer data, guint action, GtkWidget *widget); }; #endif // LAYERDESC_H
[ "yixuan.qiu@cos.name" ]
yixuan.qiu@cos.name
9d51529a5e28ae19cf53bb04eef54aec1e52f30f
fd728573c692402d88e311beb44559e8e0f0621c
/src/main/Config.cpp
c044deb22cfbac8ff2f402aca0bfcb0305d755c5
[ "MIT", "BSD-3-Clause", "BSL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
diamante-block/Diamante-Core
de9b7fe977952b8232c262b571bb2448064d05d4
ddfc81379426143a22091fa4da17b3983d055713
refs/heads/master
2021-04-08T14:25:05.998926
2020-12-24T06:04:03
2020-12-24T06:04:03
248,783,093
0
0
null
null
null
null
UTF-8
C++
false
false
46,619
cpp
// Copyright 2014 DiamNet Development Foundation and contributors. Licensed // under the Apache License, Version 2.0. See the COPYING file at the root // of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 #include "main/Config.h" #include "crypto/Hex.h" #include "crypto/KeyUtils.h" #include "herder/Herder.h" #include "history/HistoryArchive.h" #include "ledger/LedgerManager.h" #include "main/ExternalQueue.h" #include "main/DiamNetCoreVersion.h" #include "scp/LocalNode.h" #include "scp/QuorumSetUtils.h" #include "util/Fs.h" #include "util/Logging.h" #include "util/XDROperators.h" #include "util/types.h" #include <functional> #include <lib/util/format.h> #include <sstream> #include <unordered_set> namespace DiamNet { const uint32 Config::CURRENT_LEDGER_PROTOCOL_VERSION = 12; // Options that must only be used for testing static const std::unordered_set<std::string> TESTING_ONLY_OPTIONS = { "RUN_STANDALONE", "MANUAL_CLOSE", "ARTIFICIALLY_GENERATE_LOAD_FOR_TESTING", "ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING", "ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING", "ARTIFICIALLY_REPLAY_WITH_NEWEST_BUCKET_LOGIC_FOR_TESTING"}; // Options that should only be used for testing static const std::unordered_set<std::string> TESTING_SUGGESTED_OPTIONS = { "ALLOW_LOCALHOST_FOR_TESTING"}; namespace { // compute a default threshold for qset: // if simpleMajority is set and there are no inner sets, only require majority // (>50%) otherwise assume byzantine failures (~67%) unsigned int computeDefaultThreshold(SCPQuorumSet const& qset, bool simpleMajority) { unsigned int res = 0; unsigned int topSize = static_cast<unsigned int>(qset.validators.size() + qset.innerSets.size()); if (topSize == 0) { // leave the quorum set empty return 0; } if (simpleMajority && qset.innerSets.empty()) { // n=2f+1 // compute res = n - f res = topSize - (topSize - 1) / 2; } else { // n=3f+1 // compute res = n - f res = topSize - (topSize - 1) / 3; } return res; } } Config::Config() : NODE_SEED(SecretKey::random()) { // fill in defaults // non configurable FORCE_SCP = false; LEDGER_PROTOCOL_VERSION = CURRENT_LEDGER_PROTOCOL_VERSION; MAXIMUM_LEDGER_CLOSETIME_DRIFT = 50; OVERLAY_PROTOCOL_MIN_VERSION = 8; OVERLAY_PROTOCOL_VERSION = 10; VERSION_STR = DiamNet_CORE_VERSION; // configurable RUN_STANDALONE = false; MANUAL_CLOSE = false; CATCHUP_COMPLETE = false; CATCHUP_RECENT = 0; AUTOMATIC_MAINTENANCE_PERIOD = std::chrono::seconds{14400}; AUTOMATIC_MAINTENANCE_COUNT = 50000; ARTIFICIALLY_GENERATE_LOAD_FOR_TESTING = false; ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING = false; ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING = 0; ARTIFICIALLY_PESSIMIZE_MERGES_FOR_TESTING = false; ARTIFICIALLY_REDUCE_MERGE_COUNTS_FOR_TESTING = false; ARTIFICIALLY_REPLAY_WITH_NEWEST_BUCKET_LOGIC_FOR_TESTING = false; ALLOW_LOCALHOST_FOR_TESTING = false; USE_CONFIG_FOR_GENESIS = false; FAILURE_SAFETY = -1; UNSAFE_QUORUM = false; DISABLE_BUCKET_GC = false; DISABLE_XDR_FSYNC = false; LOG_FILE_PATH = "DiamNet-core.%datetime{%Y.%M.%d-%H:%m:%s}.log"; BUCKET_DIR_PATH = "buckets"; TESTING_UPGRADE_DESIRED_FEE = LedgerManager::GENESIS_LEDGER_BASE_FEE; TESTING_UPGRADE_RESERVE = LedgerManager::GENESIS_LEDGER_BASE_RESERVE; TESTING_UPGRADE_MAX_TX_SET_SIZE = 50; HTTP_PORT = DEFAULT_PEER_PORT + 1; PUBLIC_HTTP_PORT = false; HTTP_MAX_CLIENT = 128; PEER_PORT = DEFAULT_PEER_PORT; TARGET_PEER_CONNECTIONS = 8; MAX_PENDING_CONNECTIONS = 500; MAX_ADDITIONAL_PEER_CONNECTIONS = -1; MAX_OUTBOUND_PENDING_CONNECTIONS = 0; MAX_INBOUND_PENDING_CONNECTIONS = 0; PEER_AUTHENTICATION_TIMEOUT = 2; PEER_TIMEOUT = 30; PEER_STRAGGLER_TIMEOUT = 120; PREFERRED_PEERS_ONLY = false; MINIMUM_IDLE_PERCENT = 0; // WORKER_THREADS: setting this too low risks a form of priority inversion // where a long-running background task occupies all worker threads and // we're not able to do short high-priority background tasks like merging // small buckets to be ready for the next ledger close. To attempt to // mitigate this, we make sure we have as many worker threads as the worst // case long-running parallelism we're going to encounter, and let the OS // deal with time-slicing between the threads if there aren't enough cores // for it. // // Worst case = 10 concurrent merges + 1 quorum intersection calculation. WORKER_THREADS = 11; MAX_CONCURRENT_SUBPROCESSES = 16; NODE_IS_VALIDATOR = false; QUORUM_INTERSECTION_CHECKER = true; DATABASE = SecretValue{"sqlite3://:memory:"}; ENTRY_CACHE_SIZE = 100000; BEST_OFFERS_CACHE_SIZE = 64; PREFETCH_BATCH_SIZE = 1000; } namespace { using ConfigItem = std::pair<std::string, std::shared_ptr<cpptoml::base>>; bool readBool(ConfigItem const& item) { if (!item.second->as<bool>()) { throw std::invalid_argument(fmt::format("invalid {}", item.first)); } return item.second->as<bool>()->get(); } std::string readString(ConfigItem const& item) { if (!item.second->as<std::string>()) { throw std::invalid_argument(fmt::format("invalid {}", item.first)); } return item.second->as<std::string>()->get(); } std::vector<std::string> readStringArray(ConfigItem const& item) { auto result = std::vector<std::string>{}; if (!item.second->is_array()) { throw std::invalid_argument( fmt::format("{} must be an array", item.first)); } for (auto v : item.second->as_array()->get()) { if (!v->as<std::string>()) { throw std::invalid_argument( fmt::format("invalid element of {}", item.first)); } result.push_back(v->as<std::string>()->get()); } return result; } template <typename T> T readInt(ConfigItem const& item, T min = std::numeric_limits<T>::min(), T max = std::numeric_limits<T>::max()) { if (!item.second->as<int64_t>()) { throw std::invalid_argument(fmt::format("invalid {}", item.first)); } int64_t v = item.second->as<int64_t>()->get(); if (v < min || v > max) { throw std::invalid_argument(fmt::format("bad {}", item.first)); } return static_cast<T>(v); } } void Config::loadQset(std::shared_ptr<cpptoml::table> group, SCPQuorumSet& qset, int level) { if (!group) { throw std::invalid_argument("invalid entry in quorum set definition"); } if (level > 2) { throw std::invalid_argument("too many levels in quorum set"); } int thresholdPercent = 67; qset.threshold = 0; for (auto& item : *group) { if (item.first == "THRESHOLD_PERCENT") { if (!item.second->as<int64_t>()) { throw std::invalid_argument("invalid THRESHOLD_PERCENT"); } int64_t f = item.second->as<int64_t>()->get(); if (f <= 0 || f > 100) { throw std::invalid_argument("invalid THRESHOLD_PERCENT"); } thresholdPercent = (uint32_t)f; } else if (item.first == "VALIDATORS") { auto values = readStringArray(item); for (auto v : values) { PublicKey nodeID; parseNodeID(v, nodeID); qset.validators.emplace_back(nodeID); } } else { // must be a subset try { if (!item.second->is_table()) { throw std::invalid_argument( "invalid quorum set, should be a group"); } qset.innerSets.resize((uint32_t)qset.innerSets.size() + 1); loadQset(item.second->as_table(), qset.innerSets[qset.innerSets.size() - 1], level + 1); } catch (std::exception& e) { std::string s; s = e.what(); s += " while parsing '" + item.first + "'"; throw std::invalid_argument(s); } } } // round up: n*percent/100 qset.threshold = uint32( 1 + (((qset.validators.size() + qset.innerSets.size()) * thresholdPercent - 1) / 100)); if (qset.threshold == 0 || (qset.validators.empty() && qset.innerSets.empty())) { throw std::invalid_argument("invalid quorum set definition"); } } void Config::addHistoryArchive(std::string const& name, std::string const& get, std::string const& put, std::string const& mkdir) { auto r = HISTORY.insert(std::make_pair( name, HistoryArchiveConfiguration{name, get, put, mkdir})); if (!r.second) { throw std::invalid_argument( fmt::format("Conflicting archive name {}", name)); } } static std::array<std::string, 3> const kQualities = {"LOW", "MEDIUM", "HIGH"}; std::string Config::toString(ValidatorQuality q) const { return kQualities[static_cast<int>(q)]; } Config::ValidatorQuality Config::parseQuality(std::string const& q) const { auto it = std::find(kQualities.begin(), kQualities.end(), q); ValidatorQuality res; if (it != kQualities.end()) { res = static_cast<Config::ValidatorQuality>( std::distance(kQualities.begin(), it)); } else { throw std::invalid_argument(fmt::format("Unknown QUALITY {}", q)); } return res; } std::vector<Config::ValidatorEntry> Config::parseValidators( std::shared_ptr<cpptoml::base> validators, std::unordered_map<std::string, ValidatorQuality> const& domainQualityMap) { std::vector<ValidatorEntry> res; auto tarr = validators->as_table_array(); if (!tarr) { throw std::invalid_argument("malformed VALIDATORS"); } for (auto const& valRaw : *tarr) { auto validator = valRaw->as_table(); if (!validator) { throw std::invalid_argument("malformed VALIDATORS"); } ValidatorEntry ve; std::string pubKey, hist; bool qualitySet = false; for (auto const& f : *validator) { if (f.first == "NAME") { ve.mName = readString(f); } else if (f.first == "HOME_DOMAIN") { ve.mHomeDomain = readString(f); } else if (f.first == "QUALITY") { auto q = readString(f); ve.mQuality = parseQuality(q); qualitySet = true; } else if (f.first == "PUBLIC_KEY") { pubKey = readString(f); } else if (f.first == "ADDRESS") { auto address = readString(f); KNOWN_PEERS.emplace_back(address); } else if (f.first == "HISTORY") { hist = readString(f); } else { throw std::invalid_argument(fmt::format( "malformed VALIDATORS entry, unknown element '{}'", f.first)); } } if (ve.mName.empty()) { throw std::invalid_argument( "malformed VALIDATORS entry: missing 'NAME'"); } if (pubKey.empty() || ve.mHomeDomain.empty()) { throw std::invalid_argument( fmt::format("malformed VALIDATORS entry {}", ve.mName)); } auto globQualityIt = domainQualityMap.find(ve.mHomeDomain); if (globQualityIt != domainQualityMap.end()) { if (qualitySet) { throw std::invalid_argument( fmt::format("malformed VALIDATORS entry {}: quality " "already defined in home domain {}", ve.mName, ve.mHomeDomain)); } else { ve.mQuality = globQualityIt->second; qualitySet = true; } } if (!qualitySet) { throw std::invalid_argument(fmt::format( "malformed VALIDATORS entry {} (missing quality)", ve.mName)); } addValidatorName(pubKey, ve.mName); ve.mKey = KeyUtils::fromStrKey<PublicKey>(pubKey); ve.mHasHistory = !hist.empty(); if (ve.mHasHistory) { addHistoryArchive(ve.mName, hist, "", ""); } if (ve.mQuality == ValidatorQuality::VALIDATOR_HIGH_QUALITY && hist.empty()) { throw std::invalid_argument( fmt::format("malformed VALIDATORS entry {} (high quality must " "have an archive)", ve.mName)); } res.emplace_back(ve); } return res; } std::unordered_map<std::string, Config::ValidatorQuality> Config::parseDomainsQuality(std::shared_ptr<cpptoml::base> domainsQuality) { std::unordered_map<std::string, ValidatorQuality> res; auto tarr = domainsQuality->as_table_array(); if (!tarr) { throw std::invalid_argument("malformed HOME_DOMAINS"); } for (auto const& valRaw : *tarr) { auto home_domain = valRaw->as_table(); if (!home_domain) { throw std::invalid_argument("malformed HOME_DOMAINS"); } std::string domain; ValidatorQuality quality; bool qualitySet = false; for (auto const& f : *home_domain) { if (f.first == "QUALITY") { auto q = readString(f); quality = parseQuality(q); qualitySet = true; } else if (f.first == "HOME_DOMAIN") { domain = readString(f); } else { throw std::invalid_argument( fmt::format("Unknown field {} in HOME_DOMAINS", f.first)); } } if (!qualitySet || domain.empty()) { throw std::invalid_argument( fmt::format("Malformed HOME_DOMAINS {}", domain)); } auto p = res.emplace(std::make_pair(domain, quality)); if (!p.second) { throw std::invalid_argument( fmt::format("Malformed HOME_DOMAINS: duplicate {}", domain)); } } return res; } void Config::load(std::string const& filename) { if (filename != "-" && !fs::exists(filename)) { std::string s; s = "No config file "; s += filename + " found"; throw std::invalid_argument(s); } LOG(DEBUG) << "Loading config from: " << filename; try { if (filename == "-") { load(std::cin); } else { std::ifstream ifs(filename); if (!ifs.is_open()) { throw std::runtime_error("could not open file"); } load(ifs); } } catch (std::exception const& ex) { std::string err("Failed to parse '"); err += filename; err += "' :"; err += ex.what(); throw std::invalid_argument(err); } } void Config::load(std::istream& in) { std::shared_ptr<cpptoml::table> t; cpptoml::parser p(in); t = p.parse(); processConfig(t); } void Config::addSelfToValidators( std::vector<ValidatorEntry>& validators, std::unordered_map<std::string, ValidatorQuality> const& domainQualityMap) { auto it = domainQualityMap.find(NODE_HOME_DOMAIN); ValidatorEntry self; self.mKey = NODE_SEED.getPublicKey(); self.mHomeDomain = NODE_HOME_DOMAIN; self.mName = "self"; self.mHasHistory = false; if (it != domainQualityMap.end()) { self.mQuality = it->second; } else { throw std::invalid_argument( "Must specify a matching HOME_DOMAINS for self"); } validators.emplace_back(self); } void Config::verifyHistoryValidatorsBlocking( std::vector<ValidatorEntry> const& validators) { std::vector<NodeID> archives; for (auto const& v : validators) { if (v.mHasHistory) { archives.emplace_back(v.mKey); } } if (!LocalNode::isVBlocking(QUORUM_SET, archives)) { LOG(WARNING) << "Quorum can be reached without validators with " "an archive"; if (!UNSAFE_QUORUM) { LOG(ERROR) << "Potentially unsafe configuration: " "validators with known archives should be " "included in all quorums. If this is really " "what you want, set UNSAFE_QUORUM=true. Be " "sure you know what you are doing!"; throw std::invalid_argument("SCP unsafe"); } } } void Config::processConfig(std::shared_ptr<cpptoml::table> t) { auto logIfSet = [](auto& item, auto const& message) { if (item.second->template as<bool>()) { if (item.second->template as<bool>()->get()) { LOG(INFO) << fmt::format( "{} enabled in configuration file - {}", item.first, message); } } else { LOG(INFO) << fmt::format("{} set in configuration file - {}", item.first, message); } }; try { if (!t) { throw std::runtime_error("Could not parse toml"); } std::vector<ValidatorEntry> validators; std::unordered_map<std::string, ValidatorQuality> domainQualityMap; // cpptoml returns the items in non-deterministic order // so we need to process items that are potential dependencies first for (auto& item : *t) { LOG(DEBUG) << "Config item: " << item.first; if (TESTING_ONLY_OPTIONS.count(item.first) > 0) { logIfSet(item, "node will not function properly with most networks"); } else if (TESTING_SUGGESTED_OPTIONS.count(item.first) > 0) { logIfSet(item, "node may not function properly with most networks"); } if (item.first == "PEER_PORT") { PEER_PORT = readInt<unsigned short>(item, 1); } else if (item.first == "HTTP_PORT") { HTTP_PORT = readInt<unsigned short>(item, 1); } else if (item.first == "HTTP_MAX_CLIENT") { HTTP_MAX_CLIENT = readInt<unsigned short>(item, 0); } else if (item.first == "PUBLIC_HTTP_PORT") { PUBLIC_HTTP_PORT = readBool(item); } else if (item.first == "FAILURE_SAFETY") { FAILURE_SAFETY = readInt<int32_t>(item, -1, INT32_MAX - 1); } else if (item.first == "UNSAFE_QUORUM") { UNSAFE_QUORUM = readBool(item); } else if (item.first == "DISABLE_XDR_FSYNC") { DISABLE_XDR_FSYNC = readBool(item); } else if (item.first == "KNOWN_CURSORS") { KNOWN_CURSORS = readStringArray(item); for (auto const& c : KNOWN_CURSORS) { if (!ExternalQueue::validateResourceID(c)) { throw std::invalid_argument( fmt::format("invalid cursor: \"{}\"", c)); } } } else if (item.first == "RUN_STANDALONE") { RUN_STANDALONE = readBool(item); } else if (item.first == "CATCHUP_COMPLETE") { CATCHUP_COMPLETE = readBool(item); } else if (item.first == "CATCHUP_RECENT") { CATCHUP_RECENT = readInt<uint32_t>(item, 0, UINT32_MAX - 1); } else if (item.first == "ARTIFICIALLY_GENERATE_LOAD_FOR_TESTING") { ARTIFICIALLY_GENERATE_LOAD_FOR_TESTING = readBool(item); } else if (item.first == "ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING") { ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING = readBool(item); } else if (item.first == "ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING") { ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING = readInt<uint32_t>(item, 0, UINT32_MAX - 1); } else if (item.first == "ARTIFICIALLY_REPLAY_WITH_NEWEST_BUCKET_LOGIC_FOR_TESTING") { ARTIFICIALLY_REPLAY_WITH_NEWEST_BUCKET_LOGIC_FOR_TESTING = readBool(item); } else if (item.first == "ALLOW_LOCALHOST_FOR_TESTING") { ALLOW_LOCALHOST_FOR_TESTING = readBool(item); } else if (item.first == "AUTOMATIC_MAINTENANCE_PERIOD") { AUTOMATIC_MAINTENANCE_PERIOD = std::chrono::seconds{readInt<uint32_t>(item)}; } else if (item.first == "AUTOMATIC_MAINTENANCE_COUNT") { AUTOMATIC_MAINTENANCE_COUNT = readInt<uint32_t>(item); } else if (item.first == "MANUAL_CLOSE") { MANUAL_CLOSE = readBool(item); } else if (item.first == "LOG_FILE_PATH") { LOG_FILE_PATH = readString(item); } else if (item.first == "TMP_DIR_PATH") { throw std::invalid_argument("TMP_DIR_PATH is not supported " "anymore - tmp data is now kept in " "BUCKET_DIR_PATH/tmp"); } else if (item.first == "BUCKET_DIR_PATH") { BUCKET_DIR_PATH = readString(item); } else if (item.first == "NODE_NAMES") { auto names = readStringArray(item); for (auto v : names) { PublicKey nodeID; parseNodeID(v, nodeID); } } else if (item.first == "NODE_SEED") { PublicKey nodeID; parseNodeID(readString(item), nodeID, NODE_SEED, true); } else if (item.first == "NODE_IS_VALIDATOR") { NODE_IS_VALIDATOR = readBool(item); } else if (item.first == "NODE_HOME_DOMAIN") { NODE_HOME_DOMAIN = readString(item); } else if (item.first == "TARGET_PEER_CONNECTIONS") { TARGET_PEER_CONNECTIONS = readInt<unsigned short>(item, 1); } else if (item.first == "MAX_ADDITIONAL_PEER_CONNECTIONS") { MAX_ADDITIONAL_PEER_CONNECTIONS = readInt<int>( item, -1, std::numeric_limits<unsigned short>::max()); } else if (item.first == "MAX_PENDING_CONNECTIONS") { MAX_PENDING_CONNECTIONS = readInt<unsigned short>( item, 1, std::numeric_limits<unsigned short>::max()); } else if (item.first == "PEER_AUTHENTICATION_TIMEOUT") { PEER_AUTHENTICATION_TIMEOUT = readInt<unsigned short>( item, 1, std::numeric_limits<unsigned short>::max()); } else if (item.first == "PEER_TIMEOUT") { PEER_TIMEOUT = readInt<unsigned short>( item, 1, std::numeric_limits<unsigned short>::max()); } else if (item.first == "PEER_STRAGGLER_TIMEOUT") { PEER_STRAGGLER_TIMEOUT = readInt<unsigned short>( item, 1, std::numeric_limits<unsigned short>::max()); } else if (item.first == "PREFERRED_PEERS") { PREFERRED_PEERS = readStringArray(item); } else if (item.first == "PREFERRED_PEER_KEYS") { // handled below } else if (item.first == "PREFERRED_PEERS_ONLY") { PREFERRED_PEERS_ONLY = readBool(item); } else if (item.first == "KNOWN_PEERS") { auto peers = readStringArray(item); KNOWN_PEERS.insert(KNOWN_PEERS.begin(), peers.begin(), peers.end()); } else if (item.first == "QUORUM_SET") { // processing performed after this loop } else if (item.first == "COMMANDS") { COMMANDS = readStringArray(item); } else if (item.first == "WORKER_THREADS") { WORKER_THREADS = readInt<int>(item, 1, 1000); } else if (item.first == "MAX_CONCURRENT_SUBPROCESSES") { MAX_CONCURRENT_SUBPROCESSES = readInt<int>(item, 1); } else if (item.first == "MINIMUM_IDLE_PERCENT") { MINIMUM_IDLE_PERCENT = readInt<uint32_t>(item, 0, 100); } else if (item.first == "QUORUM_INTERSECTION_CHECKER") { QUORUM_INTERSECTION_CHECKER = readBool(item); } else if (item.first == "HISTORY") { auto hist = item.second->as_table(); if (hist) { for (auto const& archive : *hist) { LOG(DEBUG) << "History archive: " << archive.first; auto tab = archive.second->as_table(); if (!tab) { throw std::invalid_argument( "malformed HISTORY config block"); } std::string get, put, mkdir; for (auto const& c : *tab) { if (c.first == "get") { get = c.second->as<std::string>()->get(); } else if (c.first == "put") { put = c.second->as<std::string>()->get(); } else if (c.first == "mkdir") { mkdir = c.second->as<std::string>()->get(); } else { std::string err( "Unknown HISTORY-table entry: '"); err += c.first; err += "', within [HISTORY." + archive.first + "]"; throw std::invalid_argument(err); } } addHistoryArchive(archive.first, get, put, mkdir); } } else { throw std::invalid_argument("incomplete HISTORY block"); } } else if (item.first == "DATABASE") { DATABASE = SecretValue{readString(item)}; } else if (item.first == "NETWORK_PASSPHRASE") { NETWORK_PASSPHRASE = readString(item); } else if (item.first == "INVARIANT_CHECKS") { INVARIANT_CHECKS = readStringArray(item); } else if (item.first == "ENTRY_CACHE_SIZE") { ENTRY_CACHE_SIZE = readInt<uint32_t>(item); } else if (item.first == "BEST_OFFERS_CACHE_SIZE") { BEST_OFFERS_CACHE_SIZE = readInt<uint32_t>(item); } else if (item.first == "PREFETCH_BATCH_SIZE") { PREFETCH_BATCH_SIZE = readInt<uint32_t>(item); } else if (item.first == "MAXIMUM_LEDGER_CLOSETIME_DRIFT") { MAXIMUM_LEDGER_CLOSETIME_DRIFT = readInt<int64_t>(item, 0); } else if (item.first == "VALIDATORS") { // processed later (may depend on HOME_DOMAINS) } else if (item.first == "HOME_DOMAINS") { domainQualityMap = parseDomainsQuality(item.second); } else { std::string err("Unknown configuration entry: '"); err += item.first; err += "'"; throw std::invalid_argument(err); } } // process elements that potentially depend on others if (t->contains("VALIDATORS")) { auto vals = t->get("VALIDATORS"); if (vals) { validators = parseValidators(vals, domainQualityMap); } } // if only QUORUM_SET is specified: we don't populate validators at all if (NODE_IS_VALIDATOR && !(validators.empty() && t->contains("QUORUM_SET"))) { addSelfToValidators(validators, domainQualityMap); } if (t->contains("PREFERRED_PEER_KEYS")) { auto pkeys = t->get("PREFERRED_PEER_KEYS"); if (pkeys) { auto values = readStringArray(ConfigItem{"PREFERRED_PEER_KEYS", pkeys}); for (auto const& v : values) { PublicKey nodeID; parseNodeID(v, nodeID); PREFERRED_PEER_KEYS.push_back(KeyUtils::toStrKey(nodeID)); } } } auto autoQSet = generateQuorumSet(validators); auto autoQSetStr = toString(autoQSet); bool mixedDomains; if (t->contains("QUORUM_SET")) { auto qset = t->get("QUORUM_SET"); if (qset) { loadQset(qset->as_table(), QUORUM_SET, 0); } auto s = toString(QUORUM_SET); LOG(INFO) << "Using QUORUM_SET: " << s; if (s != autoQSetStr && !validators.empty()) { LOG(WARNING) << "Differs from generated: " << autoQSetStr; if (!UNSAFE_QUORUM) { LOG(ERROR) << "Can't override [[VALIDATORS]] with " "QUORUM_SET unless you also set " "UNSAFE_QUORUM=true. Be sure you know what " "you are doing!"; throw std::invalid_argument("SCP unsafe"); } } mixedDomains = true; // assume validators are from different entities } else { LOG(INFO) << "Generated QUORUM_SET: " << autoQSetStr; QUORUM_SET = autoQSet; verifyHistoryValidatorsBlocking(validators); // count the number of domains std::unordered_set<std::string> domains; for (auto const& v : validators) { domains.insert(v.mHomeDomain); } mixedDomains = domains.size() > 1; } adjust(); validateConfig(mixedDomains); } catch (cpptoml::parse_exception& ex) { throw std::invalid_argument(ex.what()); } } void Config::adjust() { if (MAX_ADDITIONAL_PEER_CONNECTIONS == -1) { if (TARGET_PEER_CONNECTIONS <= std::numeric_limits<unsigned short>::max() / 8) { MAX_ADDITIONAL_PEER_CONNECTIONS = TARGET_PEER_CONNECTIONS * 8; } else { MAX_ADDITIONAL_PEER_CONNECTIONS = std::numeric_limits<unsigned short>::max(); } } int maxFsConnections = std::min<int>( std::numeric_limits<unsigned short>::max(), fs::getMaxConnections()); auto totalAuthenticatedConnections = TARGET_PEER_CONNECTIONS + MAX_ADDITIONAL_PEER_CONNECTIONS; int maxPendingConnections = MAX_PENDING_CONNECTIONS; if (totalAuthenticatedConnections > 0) { auto outboundPendingRate = double(TARGET_PEER_CONNECTIONS) / totalAuthenticatedConnections; auto doubleToNonzeroUnsignedShort = [](double v) { auto rounded = static_cast<int>(std::ceil(v)); auto cappedToUnsignedShort = std::min<int>( std::numeric_limits<unsigned short>::max(), rounded); return static_cast<unsigned short>( std::max<int>(1, cappedToUnsignedShort)); }; // see if we need to reduce maxPendingConnections if (totalAuthenticatedConnections + maxPendingConnections > maxFsConnections) { maxPendingConnections = totalAuthenticatedConnections >= maxFsConnections ? 1 : static_cast<unsigned short>( maxFsConnections - totalAuthenticatedConnections); } // if we're still over, we scale everything if (totalAuthenticatedConnections + maxPendingConnections > maxFsConnections) { maxPendingConnections = std::max<int>(MAX_PENDING_CONNECTIONS, 1); int totalRequiredConnections = totalAuthenticatedConnections + maxPendingConnections; auto outboundRate = (double)TARGET_PEER_CONNECTIONS / totalRequiredConnections; auto inboundRate = (double)MAX_ADDITIONAL_PEER_CONNECTIONS / totalRequiredConnections; TARGET_PEER_CONNECTIONS = doubleToNonzeroUnsignedShort(maxFsConnections * outboundRate); MAX_ADDITIONAL_PEER_CONNECTIONS = doubleToNonzeroUnsignedShort(maxFsConnections * inboundRate); auto authenticatedConnections = TARGET_PEER_CONNECTIONS + MAX_ADDITIONAL_PEER_CONNECTIONS; maxPendingConnections = authenticatedConnections >= maxFsConnections ? 1 : static_cast<unsigned short>(maxFsConnections - authenticatedConnections); } MAX_PENDING_CONNECTIONS = static_cast<unsigned short>(std::min<int>( std::numeric_limits<unsigned short>::max(), maxPendingConnections)); // derive outbound/inbound pending connections // from MAX_PENDING_CONNECTIONS, using the ratio of inbound/outbound // connections if (MAX_OUTBOUND_PENDING_CONNECTIONS == 0 && MAX_INBOUND_PENDING_CONNECTIONS == 0) { MAX_OUTBOUND_PENDING_CONNECTIONS = std::max<unsigned short>( 1, doubleToNonzeroUnsignedShort(MAX_PENDING_CONNECTIONS * outboundPendingRate)); MAX_INBOUND_PENDING_CONNECTIONS = std::max<unsigned short>( 1, MAX_PENDING_CONNECTIONS - MAX_OUTBOUND_PENDING_CONNECTIONS); } } else { MAX_OUTBOUND_PENDING_CONNECTIONS = 0; MAX_INBOUND_PENDING_CONNECTIONS = 0; } } void Config::logBasicInfo() { LOG(INFO) << "Connection effective settings:"; LOG(INFO) << "TARGET_PEER_CONNECTIONS: " << TARGET_PEER_CONNECTIONS; LOG(INFO) << "MAX_ADDITIONAL_PEER_CONNECTIONS: " << MAX_ADDITIONAL_PEER_CONNECTIONS; LOG(INFO) << "MAX_PENDING_CONNECTIONS: " << MAX_PENDING_CONNECTIONS; LOG(INFO) << "MAX_OUTBOUND_PENDING_CONNECTIONS: " << MAX_OUTBOUND_PENDING_CONNECTIONS; LOG(INFO) << "MAX_INBOUND_PENDING_CONNECTIONS: " << MAX_INBOUND_PENDING_CONNECTIONS; } void Config::validateConfig(bool mixed) { std::set<NodeID> nodes; LocalNode::forAllNodes(QUORUM_SET, [&](NodeID const& n) { nodes.insert(n); }); if (nodes.empty()) { throw std::invalid_argument( "no validators defined in VALIDATORS/QUORUM_SET"); } // calculates nodes that would break quorum auto selfID = NODE_SEED.getPublicKey(); auto r = LocalNode::findClosestVBlocking(QUORUM_SET, nodes, nullptr); unsigned int minSize = computeDefaultThreshold(QUORUM_SET, !mixed); if (FAILURE_SAFETY == -1) { // calculates default value for safety giving the top level entities // the same weight auto topLevelCount = static_cast<uint32>(QUORUM_SET.validators.size() + QUORUM_SET.innerSets.size()); FAILURE_SAFETY = topLevelCount - minSize; LOG(INFO) << "Assigning calculated value of " << FAILURE_SAFETY << " to FAILURE_SAFETY"; } try { if (FAILURE_SAFETY >= static_cast<int32_t>(r.size())) { LOG(ERROR) << "Not enough nodes / thresholds too strict in your " "Quorum set to ensure your desired level of " "FAILURE_SAFETY. Reduce FAILURE_SAFETY or fix " "quorum set"; throw std::invalid_argument( "FAILURE_SAFETY incompatible with QUORUM_SET"); } if (!UNSAFE_QUORUM) { if (FAILURE_SAFETY == 0) { LOG(ERROR) << "Can't have FAILURE_SAFETY=0 unless you also set " "UNSAFE_QUORUM=true. Be sure you know what you are " "doing!"; throw std::invalid_argument("SCP unsafe"); } if (QUORUM_SET.threshold < minSize) { LOG(ERROR) << "Your THRESHOLD_PERCENTAGE is too low. If you " "really want this set UNSAFE_QUORUM=true. Be " "sure you know what you are doing!"; throw std::invalid_argument("SCP unsafe"); } } } catch (...) { LOG(INFO) << " Current QUORUM_SET breaks with " << r.size() << " failures"; throw; } if (!isQuorumSetSane(QUORUM_SET, !UNSAFE_QUORUM)) { LOG(FATAL) << fmt::format("Invalid QUORUM_SET: check nesting, " "duplicate entries and thresholds (must be " "between {} and 100)", UNSAFE_QUORUM ? 1 : 51); throw std::invalid_argument("Invalid QUORUM_SET"); } } void Config::parseNodeID(std::string configStr, PublicKey& retKey) { SecretKey k; parseNodeID(configStr, retKey, k, false); } void Config::addValidatorName(std::string const& pubKeyStr, std::string const& name) { PublicKey k; std::string cName = "$"; cName += name; if (resolveNodeID(cName, k)) { throw std::invalid_argument("name already used: " + name); } if (!VALIDATOR_NAMES.emplace(std::make_pair(pubKeyStr, name)).second) { throw std::invalid_argument("naming node twice: " + name); } } void Config::parseNodeID(std::string configStr, PublicKey& retKey, SecretKey& sKey, bool isSeed) { if (configStr.size() < 2) { throw std::invalid_argument("invalid key: " + configStr); } // check if configStr is a PublicKey or a common name if (configStr[0] == '$') { if (isSeed) { throw std::invalid_argument("aliases only store public keys: " + configStr); } if (!resolveNodeID(configStr, retKey)) { throw std::invalid_argument("unknown key in config: " + configStr); } } else { std::istringstream iss(configStr); std::string nodestr; iss >> nodestr; if (isSeed) { sKey = SecretKey::fromStrKeySeed(nodestr); retKey = sKey.getPublicKey(); nodestr = sKey.getStrKeyPublic(); } else { retKey = KeyUtils::fromStrKey<PublicKey>(nodestr); } if (iss) { // get any common name they have added std::string commonName; iss >> commonName; if (commonName.size()) { addValidatorName(nodestr, commonName); } } } } std::string Config::toShortString(PublicKey const& pk) const { std::string ret = KeyUtils::toStrKey(pk); auto it = VALIDATOR_NAMES.find(ret); if (it == VALIDATOR_NAMES.end()) return ret.substr(0, 5); else return it->second; } std::string Config::toStrKey(PublicKey const& pk, bool fullKey) const { std::string res; if (fullKey) { res = KeyUtils::toStrKey(pk); } else { res = toShortString(pk); } return res; } bool Config::resolveNodeID(std::string const& s, PublicKey& retKey) const { auto expanded = expandNodeID(s); if (expanded.empty()) { return false; } try { retKey = KeyUtils::fromStrKey<PublicKey>(expanded); } catch (std::invalid_argument&) { return false; } return true; } std::string Config::expandNodeID(const std::string& s) const { if (s.length() < 2) { return s; } if (s[0] != '$' && s[0] != '@') { return s; } using validatorMatcher_t = std::function<bool(std::pair<std::string, std::string> const&)>; auto arg = s.substr(1); auto validatorMatcher = s[0] == '$' ? validatorMatcher_t{[&](std::pair<std::string, std::string> const& p) { return p.second == arg; }} : validatorMatcher_t{ [&](std::pair<std::string, std::string> const& p) { return p.first.compare(0, arg.size(), arg) == 0; }}; auto it = std::find_if(VALIDATOR_NAMES.begin(), VALIDATOR_NAMES.end(), validatorMatcher); if (it != VALIDATOR_NAMES.end()) { return it->first; } else { return {}; } } std::chrono::seconds Config::getExpectedLedgerCloseTime() const { if (ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING) { return std::chrono::seconds{ARTIFICIALLY_SET_CLOSE_TIME_FOR_TESTING}; } if (ARTIFICIALLY_ACCELERATE_TIME_FOR_TESTING) { return std::chrono::seconds{1}; } return Herder::EXP_LEDGER_TIMESPAN_SECONDS; } void Config::setNoListen() { // prevent opening up a port for other peers RUN_STANDALONE = true; HTTP_PORT = 0; MANUAL_CLOSE = true; } SCPQuorumSet Config::generateQuorumSetHelper( std::vector<ValidatorEntry>::const_iterator begin, std::vector<ValidatorEntry>::const_iterator end, ValidatorQuality curQuality) { auto it = begin; SCPQuorumSet ret; while (it != end && it->mQuality == curQuality) { SCPQuorumSet innerSet; auto& vals = innerSet.validators; auto it2 = it; for (; it2 != end && it2->mHomeDomain == it->mHomeDomain; it2++) { if (it2->mQuality != it->mQuality) { throw std::invalid_argument( fmt::format("Validators {} and {} must have same quality", it->mName, it2->mName)); } vals.emplace_back(it2->mKey); } if (vals.size() < 3 && it->mQuality == ValidatorQuality::VALIDATOR_HIGH_QUALITY) { throw std::invalid_argument(fmt::format( "High quality validator {} must have redundancy of at least 3", it->mName)); } innerSet.threshold = computeDefaultThreshold(innerSet, true); ret.innerSets.emplace_back(innerSet); it = it2; } if (it != end) { if (it->mQuality > curQuality) { throw std::invalid_argument(fmt::format( "invalid validator quality for {} (must be ascending)", it->mName)); } auto lowQ = generateQuorumSetHelper(it, end, it->mQuality); ret.innerSets.emplace_back(lowQ); } ret.threshold = computeDefaultThreshold(ret, false); return ret; } SCPQuorumSet Config::generateQuorumSet(std::vector<ValidatorEntry> const& validators) { auto todo = validators; // first, sort by quality (desc), homedomain (asc) std::sort(todo.begin(), todo.end(), [](ValidatorEntry const& l, ValidatorEntry const& r) { if (l.mQuality > r.mQuality) { return true; } else if (l.mQuality < r.mQuality) { return false; } return l.mHomeDomain < r.mHomeDomain; }); auto res = generateQuorumSetHelper( todo.begin(), todo.end(), ValidatorQuality::VALIDATOR_HIGH_QUALITY); normalizeQSet(res); return res; } std::string Config::toString(SCPQuorumSet const& qset) { auto json = LocalNode::toJson( qset, [&](PublicKey const& k) { return toShortString(k); }); Json::StyledWriter fw; return fw.write(json); } }
[ "surya@codomotive.com" ]
surya@codomotive.com
1aa6eb973489288d1e38a22e02566baeaac37204
a25a741f590e86fef685c20d05f0c60d0bd7a6fc
/例题/InterviewQuestions-master/面试题37之两个链表的第一个公共结点_FirstCommonNodesInLists.cpp
4f7e13bd0cb7db94bda837d48e6644993b29b92f
[ "MIT" ]
permissive
anotherNight/MathWS
85dae4a134083b8eacd5046c377aa2fa24edde03
9f82f9e3bd7bf8e3bec9ac56dff8aa521516a102
refs/heads/master
2021-07-04T02:16:15.361684
2020-09-08T10:51:02
2020-09-08T10:51:02
164,804,011
0
0
null
null
null
null
GB18030
C++
false
false
5,602
cpp
// FirstCommandNodesInLists.cpp : Defines the entry point for the console application. // // 《剑指Offer——名企面试官精讲典型编程题》代码 // 著作权所有者:何海涛 #include "stdafx.h" #include "Utilities\List.h" unsigned int GetListLength(ListNode* pHead); ListNode* FindFirstCommonNode( ListNode *pHead1, ListNode *pHead2) { // 得到两个链表的长度 unsigned int nLength1 = GetListLength(pHead1); unsigned int nLength2 = GetListLength(pHead2); int nLengthDif = nLength1 - nLength2; ListNode* pListHeadLong = pHead1; ListNode* pListHeadShort = pHead2; if(nLength2 > nLength1) { pListHeadLong = pHead2; pListHeadShort = pHead1; nLengthDif = nLength2 - nLength1; } // 先在长链表上走几步,再同时在两个链表上遍历 for(int i = 0; i < nLengthDif; ++ i) pListHeadLong = pListHeadLong->m_pNext; while((pListHeadLong != NULL) && (pListHeadShort != NULL) && (pListHeadLong != pListHeadShort)) { pListHeadLong = pListHeadLong->m_pNext; pListHeadShort = pListHeadShort->m_pNext; } // 得到第一个公共结点 ListNode* pFisrtCommonNode = pListHeadLong; return pFisrtCommonNode; } unsigned int GetListLength(ListNode* pHead) { unsigned int nLength = 0; ListNode* pNode = pHead; while(pNode != NULL) { ++ nLength; pNode = pNode->m_pNext; } return nLength; } // ====================测试代码==================== void DestroyNode(ListNode* pNode); void Test(char* testName, ListNode* pHead1, ListNode* pHead2, ListNode* pExpected) { if(testName != NULL) printf("%s begins: ", testName); ListNode* pResult = FindFirstCommonNode(pHead1, pHead2); if(pResult == pExpected) printf("Passed.\n"); else printf("Failed.\n"); } // 第一个公共结点在链表中间 // 1 - 2 - 3 \ // 6 - 7 // 4 - 5 / void Test1() { ListNode* pNode1 = CreateListNode(1); ListNode* pNode2 = CreateListNode(2); ListNode* pNode3 = CreateListNode(3); ListNode* pNode4 = CreateListNode(4); ListNode* pNode5 = CreateListNode(5); ListNode* pNode6 = CreateListNode(6); ListNode* pNode7 = CreateListNode(7); ConnectListNodes(pNode1, pNode2); ConnectListNodes(pNode2, pNode3); ConnectListNodes(pNode3, pNode6); ConnectListNodes(pNode4, pNode5); ConnectListNodes(pNode5, pNode6); ConnectListNodes(pNode6, pNode7); Test("Test1", pNode1, pNode4, pNode6); DestroyNode(pNode1); DestroyNode(pNode2); DestroyNode(pNode3); DestroyNode(pNode4); DestroyNode(pNode5); DestroyNode(pNode6); DestroyNode(pNode7); } // 没有公共结点 // 1 - 2 - 3 - 4 // // 5 - 6 - 7 void Test2() { ListNode* pNode1 = CreateListNode(1); ListNode* pNode2 = CreateListNode(2); ListNode* pNode3 = CreateListNode(3); ListNode* pNode4 = CreateListNode(4); ListNode* pNode5 = CreateListNode(5); ListNode* pNode6 = CreateListNode(6); ListNode* pNode7 = CreateListNode(7); ConnectListNodes(pNode1, pNode2); ConnectListNodes(pNode2, pNode3); ConnectListNodes(pNode3, pNode4); ConnectListNodes(pNode5, pNode6); ConnectListNodes(pNode6, pNode7); Test("Test2", pNode1, pNode5, NULL); DestroyList(pNode1); DestroyList(pNode5); } // 公共结点是最后一个结点 // 1 - 2 - 3 - 4 \ // 7 // 5 - 6 / void Test3() { ListNode* pNode1 = CreateListNode(1); ListNode* pNode2 = CreateListNode(2); ListNode* pNode3 = CreateListNode(3); ListNode* pNode4 = CreateListNode(4); ListNode* pNode5 = CreateListNode(5); ListNode* pNode6 = CreateListNode(6); ListNode* pNode7 = CreateListNode(7); ConnectListNodes(pNode1, pNode2); ConnectListNodes(pNode2, pNode3); ConnectListNodes(pNode3, pNode4); ConnectListNodes(pNode4, pNode7); ConnectListNodes(pNode5, pNode6); ConnectListNodes(pNode6, pNode7); Test("Test3", pNode1, pNode5, pNode7); DestroyNode(pNode1); DestroyNode(pNode2); DestroyNode(pNode3); DestroyNode(pNode4); DestroyNode(pNode5); DestroyNode(pNode6); DestroyNode(pNode7); } // 公共结点是第一个结点 // 1 - 2 - 3 - 4 - 5 // 两个链表完全重合 void Test4() { ListNode* pNode1 = CreateListNode(1); ListNode* pNode2 = CreateListNode(2); ListNode* pNode3 = CreateListNode(3); ListNode* pNode4 = CreateListNode(4); ListNode* pNode5 = CreateListNode(5); ConnectListNodes(pNode1, pNode2); ConnectListNodes(pNode2, pNode3); ConnectListNodes(pNode3, pNode4); ConnectListNodes(pNode4, pNode5); Test("Test4", pNode1, pNode1, pNode1); DestroyList(pNode1); } // 输入的两个链表有一个空链表 void Test5() { ListNode* pNode1 = CreateListNode(1); ListNode* pNode2 = CreateListNode(2); ListNode* pNode3 = CreateListNode(3); ListNode* pNode4 = CreateListNode(4); ListNode* pNode5 = CreateListNode(5); ConnectListNodes(pNode1, pNode2); ConnectListNodes(pNode2, pNode3); ConnectListNodes(pNode3, pNode4); ConnectListNodes(pNode4, pNode5); Test("Test5", NULL, pNode1, NULL); DestroyList(pNode1); } // 输入的两个链表有一个空链表 void Test6() { Test("Test6", NULL, NULL, NULL); } void DestroyNode(ListNode* pNode) { delete pNode; pNode = NULL; } int _tmain(int argc, _TCHAR* argv[]) { Test1(); Test2(); Test3(); Test4(); Test5(); Test6(); return 0; }
[ "whanis123@21cn.com" ]
whanis123@21cn.com
9b9ccf7b92ad8b9911a76581404da95c6e9a50c7
2734363ed182a42343ae77c6022434710d9dfcea
/src/tsn/TSNEncapsulator.cc
234ca3c47836d5ced39295890a55744473d2d58a
[]
no_license
kaganndemirr/IEEE-802-1-Qci
c5f04b8f207febb72d7cf314976dbfbd5fa4ec1d
5355e50c9876fd56f988006f1c0b8c92b4ab9a0d
refs/heads/main
2021-06-30T17:32:50.396322
2021-03-03T20:29:00
2021-03-03T20:29:00
226,062,518
2
1
null
2021-03-03T20:29:01
2019-12-05T09:17:42
C++
UTF-8
C++
false
false
1,317
cc
// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see http://www.gnu.org/licenses/. // #include "TSNEncapsulator.h" #include "../application/EthernetFrame_m.h" #include "TSNPacket_m.h" namespace ieee_802_1_qci { Define_Module(TSNEncapsulator); void TSNEncapsulator::initialize() { } void TSNEncapsulator::handleMessage(cMessage *msg) { EthernetFrame* pkt = dynamic_cast<EthernetFrame *>(msg); if (pkt) { TSNPacket* tsnPkt = new TSNPacket(); tsnPkt->encapsulate(pkt); tsnPkt->setPortIn(msg->getArrivalGate()->getIndex()); send(tsnPkt, "out"); } else { EV_ERROR << "Unknown message received: " << msg->getDisplayString() << endl; delete msg; } } } //namespace
[ "webninjasi.0@gmail.com" ]
webninjasi.0@gmail.com
1f08c3c9e03addcdbc3dfe1aa72748b0a4f85a84
b8e597951495322104e2d04b99f9179b8a8e20d5
/sol.cpp
01f7e5ccd89bda2f126b64be84536b3abf102bdd
[]
no_license
invoker951/GitTesting
8873ffd6c35882e39637dd18360b1436584bc9b8
c8a6ad0e0c701b23e45b340f4cb2332beaeaad2a
refs/heads/master
2023-07-07T10:09:54.436997
2016-09-20T10:53:08
2016-09-20T10:53:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
128
cpp
#include <iostream> using namespace std; int main() { cout << "Daniyar lol pacan\n"; cout << "ACM airamyz!)\n"; return 0; }
[ "meirambek77@gmail.com" ]
meirambek77@gmail.com
c9ee08131502b357c50c9dd31d56f3ff4459e5b9
b5ef8b23352189fafabdb85cfd1e450bfc1f60e2
/samples/Week 7 - Tutorial/src/Graphics/Texture2D.cpp
6ca2ff79aaa5b76f310013c8e500c41f210b92d1
[]
no_license
Nazosazee7701/OTTER
545e29a135b312a079faabaedaa6a36439c85062
171526e63bf5f72b5a02145c966990bcc7ea1a5c
refs/heads/master
2023-08-30T15:00:35.114065
2021-10-28T03:47:16
2021-10-28T03:47:16
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,677
cpp
#include "Texture2D.h" #include <stb_image.h> #include <Logging.h> #include "GLM/glm.hpp" Texture2D::Texture2D(const Texture2DDescription& description) : ITexture(TextureType::_2D) { _description = description; _SetTextureParams(); _LoadDataFromFile(); } void Texture2D::LoadData(uint32_t width, uint32_t height, PixelFormat format, PixelType type, void* data, uint32_t offsetX, uint32_t offsetY) { // Ensure the rectangle we're setting is within the bounds of the image LOG_ASSERT((width + offsetX) <= _description.Width, "Pixel bounds are outside of the X extents of the image!"); LOG_ASSERT((height + offsetY) <= _description.Height, "Pixel bounds are outside of the Y extents of the image!"); // Align the data store to the size of a single component to ensure we don't get weirdness with images that aren't RGBA // See https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glPixelStore.xhtml int componentSize = (GLint)GetTexelComponentSize(type); glPixelStorei(GL_PACK_ALIGNMENT, componentSize); // Upload our data to our image glTextureSubImage2D(_handle, 0, offsetX, offsetY, width, height, (GLenum)format, (GLenum)type, data); } void Texture2D::_LoadDataFromFile() { LOG_ASSERT(_description.Width + _description.Height == 0, "This texture has already been configured with a size! Cannot re-allocate memory!"); if (!_description.Filename.empty()) { // Variables that will store properties about our image int width, height, numChannels; const int targetChannels = GetTexelComponentCount(_description.FormatHint); // Use STBI to load the image stbi_set_flip_vertically_on_load(true); uint8_t* data = stbi_load(_description.Filename.c_str(), &width, &height, &numChannels, targetChannels); // If we could not load any data, warn and return null if (data == nullptr) { LOG_WARN("STBI Failed to load image from \"{}\"", _description.Filename); return ; } // We should estimate a good format for our data // numChannels will store the number of channels in the image on disk, if we overrode that we should use the override value if (targetChannels != 0) numChannels = targetChannels; // We'll determine a recommended format for the image based on number of channels // We hinted that we wanted a certain number of channels, but we're not guaranteed // that all those channels exist (ex: loading an RGB image but requesting RGBA) InternalFormat internal_format; PixelFormat image_format; switch (numChannels) { case 1: internal_format = InternalFormat::R8; image_format = PixelFormat::Red; break; case 2: internal_format = InternalFormat::RG8; image_format = PixelFormat::RG; break; case 3: internal_format = InternalFormat::RGB8; image_format = PixelFormat::RGB; break; case 4: internal_format = InternalFormat::RGBA8; image_format = PixelFormat::RGBA; break; default: LOG_ASSERT(false, "Unsupported texture format for texture \"{}\" with {} channels", _description.Filename, numChannels) break; } // This is one of those poorly documented things in OpenGL if ((numChannels * width) % 4 != 0) { LOG_WARN("The alignment of a horizontal line is not a multiple of 4, this will require a call to glPixelStorei(GL_PACK_ALIGNMENT)"); } // Update our description to match what we loaded _description.Format = internal_format; _description.Width = width; _description.Height = height; // Allocates our memory _SetTextureParams(); // Upload data to our texture LoadData(width, height, image_format, PixelType::UByte, data); // We now have data in the image, we can clear the STBI data stbi_image_free(data); } } void Texture2D::_SetTextureParams() { // Make sure the size is greater than zero and that we have a format specified before trying to set parameters if ((_description.Width * _description.Height > 0) && _description.Format != InternalFormat::Unknown) { // Allocates the memory for our texture glTextureStorage2D(_handle, 1, (GLenum)_description.Format, _description.Width, _description.Height); glTextureParameteri(_handle, GL_TEXTURE_WRAP_S, (GLenum)_description.HorizontalWrap); glTextureParameteri(_handle, GL_TEXTURE_WRAP_T, (GLenum)_description.VerticalWrap); } } Texture2D::Sptr Texture2D::LoadFromFile(const std::string& path, const Texture2DDescription& description, bool forceRgba) { // Create a copy of the description and change filename to the path Texture2DDescription desc = description; desc.Filename = path; // Create a texture from the description (it'll load the file) Texture2D::Sptr result = std::make_shared<Texture2D>(desc); return result; }
[ "osazeeenoma.osayande@ontariotechu.net" ]
osazeeenoma.osayande@ontariotechu.net
5b30dd797450cae6ef690dc082f6ae8541470faf
0562cf42a0680a32fd3a6a3e272f30c12a494b89
/lib/LcVector.cpp
7bb0e9c3f2c94ad6c4f14cc530e54df3e7ed235f
[]
no_license
ammarhakim/gkeyll1
70131876e4a68851a548e4d45e225498911eb2b6
59da9591106207e22787d72b9c2f3e7fbdc1a7e4
refs/heads/master
2020-09-08T05:23:47.974889
2019-02-06T18:09:18
2019-02-06T18:09:18
221,027,635
0
0
null
null
null
null
UTF-8
C++
false
false
2,338
cpp
/** * @file LcVector.cpp * * @brief Vector class. */ // lucee includes #include <LcExcept.h> #include <LcVector.h> #include <LcFixedVector.h> namespace Lucee { template <typename T> Vector<T>::Vector(unsigned len) : Lucee::Array<1, T>( &Lucee::FixedVector<1, unsigned>(len)[0]) { } template <typename T> Vector<T>::Vector(unsigned len, int start) : Lucee::Array<1, T>( &Lucee::FixedVector<1, unsigned>(len)[0], &Lucee::FixedVector<1,int>(start)[0]) { } template <typename T> Vector<T>::Vector(const Vector<T>& vec) : Lucee::Array<1, T>(vec) { } template <typename T> Vector<T>::Vector(const Lucee::Array<1, T>& arr) : Lucee::Array<1, T>(arr) { } template <typename T> Vector<T>& Vector<T>::operator=(const Vector<T>& vec) { if (&vec == this) return *this; Lucee::Array<1, T>::operator=(vec); return *this; } template <typename T> Vector<T>& Vector<T>::operator=(const T& val) { Lucee::Array<1, T>::operator=(val); return *this; } template <typename T> void Vector<T>::scale(const T& fact) { for (int i=this->getLower(0); i<this->getUpper(0); ++i) this->operator[](i) *= fact; } template <typename T> Vector<T> Vector<T>::duplicate() const { unsigned shape[1]; int start[1]; // get out shape and start indices this->fillWithShape(shape); this->fillWithStart(start); // create new vector and copy data into it Vector<T> dup(shape[0], start[0]); for (int i=this->getLower(0); i<this->getUpper(0); ++i) dup[i] = this->operator[](i); return dup; } template <typename T> T Vector<T>::innerProduct(const Vector<T>& vec) const { if (getLength() != vec.getLength()) throw Lucee::Except("Vector::innerProduct: vectors should be of same size"); int ss = this->getLower(0); int sv = this->getLower(0); T sum = 0; for (unsigned i=0; i<getLength(); ++i) sum += this->operator[](ss++)*vec[sv++]; return sum; } template <typename T> Vector<T>::Vector(unsigned len, T *dp) : Lucee::Array<1, T>( Lucee::Region<1, int>(&Lucee::FixedVector<1, int>(len)[0]), dp) { } // instantiations template class Lucee::Vector<int>; template class Lucee::Vector<float>; template class Lucee::Vector<double>; }
[ "eshi@pppl.gov" ]
eshi@pppl.gov
9cce1e22b90f6bffb05a774947b9253e2b1ef3e4
d8da6a2f8be73240b81370ffac737bd643c8a1e3
/src2/sourcesafe/titan_r1/Application/Commands/MediaCommandLoadEffectPreset.cpp
44982a7c76b56e7ef29b0d620311d8dce68bf9d5
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
EmbeddedSystemClass/TitanMedia
d0f28f6f67858bff96bbf3da559d314d2da9f91a
135984a67ea3bb58b237b5d5342d1f51936bb9ab
refs/heads/master
2021-03-08T08:37:32.561381
2017-04-21T00:56:52
2017-04-21T00:56:52
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,744
cpp
#include "MediaCommandLoadEffectPreset.h" #include "EMMediaEffectTrackRepository.h" #include "EMPlugin.h" #include "EMMediaEffectTrack.h" #include "EMMediaEngine.h" #include "EMMediaProject.h" MediaCommandLoadEffectPreset::MediaCommandLoadEffectPreset() { } void* MediaCommandLoadEffectPreset::ExecuteE(void* p_upMediaEffectID, void* p_upPresetName, void*) { int32 vMediaEffectID = *static_cast<int32*>(p_upMediaEffectID); char* vpPresetName = static_cast<char*>(p_upPresetName); EMMediaEffectTrackRepository* opFXTrackRep = EMMediaEffectTrackRepository::Instance(); bool vBreakLoop = true; EMPlugin* opWantedPlugin = NULL; opFXTrackRep -> Rewind(); while(opFXTrackRep -> Current() != NULL && ! vBreakLoop) { EMMediaEffectTrack* opFXTrack = opFXTrackRep -> Current(); opWantedPlugin = opFXTrack -> FindEffect(vMediaEffectID); if(opWantedPlugin != NULL) break; opFXTrackRep -> Next(); } if(opWantedPlugin != NULL) { list<EMPluginPreset*>* opPresets = opWantedPlugin -> GetPresets(); list<EMPluginPreset*>::const_iterator oIter; for(oIter = opPresets -> begin(); oIter != opPresets -> end(); oIter++) { EMPluginPreset* opPreset = (*oIter); if(opPreset -> m_oName == string(const_cast<const char*>(vpPresetName))) { m_vReturnValue = opWantedPlugin -> ActivatePreset(opPreset -> m_vID); } } } else EMDebugger("ERROR! Could not find the effect with the specified ID!"); EMMediaEngine::Instance() -> GetMediaProject() -> SetDirty(true); return static_cast<void*>(&m_vReturnValue); } bool MediaCommandLoadEffectPreset::RequiresParameters() { return true; } bool MediaCommandLoadEffectPreset::IsUndoable() { return false; }
[ "scottmc2@gmail.com" ]
scottmc2@gmail.com
ce2099d829ed57d5b2481c0661a5da0adb940e04
426ce3137ec0cbc70c9165c91a97dab331fbdb7e
/Crypto/intro/Exercise1.1/AnalyzeCryptoMessage/AnalyzeCryptoMessage/EnglishText.cpp
1cc7684ab93694e6478e43ef740c5d3c618481cd
[]
no_license
masmowa/crypto-includes-too-much
b9c2ece02ad449c15bb5f0b5d3feaa301eaef52b
5bb0e68c01a260c6ca3525ac47f59c95fc3f98ff
refs/heads/master
2022-04-12T06:26:56.984805
2020-03-15T13:07:35
2020-03-15T13:07:35
null
0
0
null
null
null
null
UTF-8
C++
false
false
600
cpp
#include "EnglishText.h" #include <iostream> void EnglishText::PrintCharByFreq() { for (std::vector<char>::iterator itvcc = alphaByFreq.begin(); itvcc != alphaByFreq.end(); ++itvcc) { std::cout << *itvcc; } std::cout << std::endl; } // construct a vector containing the first N words of size M std::vector<std::string> EnglishText::GetFirstNofWordSize(size_t count, size_t wdLen) { MessageBase::VectorWords::const_iterator t = vvWordsByFreq[wdLen].begin(); MessageBase::VectorWords::const_iterator tx = vvWordsByFreq[wdLen].begin() + 2; MessageBase::VectorWords res(t, tx); return res; }
[ "masmowa@gmail.com" ]
masmowa@gmail.com
89d9657ce50f3369bea40a30520ea8b862cd0b80
6854bf6cf47c68de574f855af19981a74087da7d
/0374 - Guess Number Higher or Lower/cpp/main.cpp
a82c2aef66797af6b2aa70b7ce362fcf8198c17c
[ "MIT" ]
permissive
xiaoswu/Leetcode
5a2a864afa3b204badf5034d2124b104edfbbe8e
e4ae8b2f72a312ee247084457cf4e6dbcfd20e18
refs/heads/master
2021-08-14T23:21:04.461658
2021-08-10T06:15:01
2021-08-10T06:15:01
152,703,066
5
0
null
null
null
null
UTF-8
C++
false
false
723
cpp
// // main.cpp // 374 - Guess Number Higher or Lower // // Created by ynfMac on 2019/11/11. // Copyright © 2019 ynfMac. All rights reserved. // #include <iostream> int guess(int num); class Solution { public: int guessNumber(int n) { int low = 1; int high = n; while (low <= high) { int mid = low + (high - low)/2; int res = guess(mid); if (res == 0) { return mid; } else if (res < 0){ high = mid - 1; } else { low = mid + 1; } } return -1; } }; int main(int argc, const char * argv[]) { return 0; }
[ "1016324449@qq.com" ]
1016324449@qq.com
17cfea6275700bee4143c28e595601186f57bf8d
69e22cca4033ccc9ed8c0cbb1641659b794fb1a9
/top/SortColors_75.cpp
b35e5a8d973954c1fee46e5f2b1dadb4b7e0345f
[]
no_license
TopHK/fightcode
7815deddbeeb4cea23e23e9a8e84f79d6055ebda
d928f4a9c5cbd542dd46e7aaa0bc4f2be085a7ce
refs/heads/master
2022-02-09T03:04:06.223951
2022-01-03T14:01:16
2022-01-03T14:01:16
127,899,945
0
0
null
null
null
null
UTF-8
C++
false
false
1,050
cpp
/* Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively. Note: You are not suppose to use the library's sort function for this problem. Example: Input: [2,0,2,1,1,0] Output: [0,0,1,1,2,2] Follow up: A rather straight forward solution is a two-pass algorithm using counting sort. First, iterate the array counting number of 0's, 1's, and 2's, then overwrite array with total number of 0's, then 1's and followed by 2's. Could you come up with a one-pass algorithm using only constant space? */ void sortColors(vector<int>& nums) { int low = 0; int high = nums.size()-1; int i = 0; while(i < high) { if(nums[i] == 0) { swap(nums[i++], nums[low++]); } else if(nums[i] == 1) ++i; else { swap(nums[i], nums[high--]); } } }
[ "TopShaojie.Kang@gmail.com" ]
TopShaojie.Kang@gmail.com
3b354894bf3cca484f7972456c0aa689dc249b06
79ca7b66cab08ee777d6bd0a36ed1322b8995d2b
/winrt/impl/Windows.UI.Input.Inking.Analysis.1.h
a00e423a1a3d70c6de6315946ee7a0e923a6d718
[]
no_license
kennykerr/pch
44f22003912665555364b30e75d0b071c74b37cc
71c43e9141589d9a55447c60e415992b49479a9c
refs/heads/master
2023-02-17T11:27:02.670659
2021-01-20T21:31:56
2021-01-20T21:31:56
331,404,561
0
0
null
null
null
null
UTF-8
C++
false
false
9,652
h
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.3.4.5 #ifndef WINRT_Windows_UI_Input_Inking_Analysis_1_H #define WINRT_Windows_UI_Input_Inking_Analysis_1_H #include "winrt/impl/Windows.UI.Input.Inking.Analysis.0.h" WINRT_EXPORT namespace winrt::Windows::UI::Input::Inking::Analysis { struct __declspec(empty_bases) IInkAnalysisInkBullet : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisInkBullet>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisInkBullet, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisInkBullet(std::nullptr_t = nullptr) noexcept {} IInkAnalysisInkBullet(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisInkBullet(IInkAnalysisInkBullet const&) noexcept = default; IInkAnalysisInkBullet(IInkAnalysisInkBullet&&) noexcept = default; IInkAnalysisInkBullet& operator=(IInkAnalysisInkBullet const&) & noexcept = default; IInkAnalysisInkBullet& operator=(IInkAnalysisInkBullet&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisInkDrawing : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisInkDrawing>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisInkDrawing, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisInkDrawing(std::nullptr_t = nullptr) noexcept {} IInkAnalysisInkDrawing(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisInkDrawing(IInkAnalysisInkDrawing const&) noexcept = default; IInkAnalysisInkDrawing(IInkAnalysisInkDrawing&&) noexcept = default; IInkAnalysisInkDrawing& operator=(IInkAnalysisInkDrawing const&) & noexcept = default; IInkAnalysisInkDrawing& operator=(IInkAnalysisInkDrawing&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisInkWord : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisInkWord>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisInkWord, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisInkWord(std::nullptr_t = nullptr) noexcept {} IInkAnalysisInkWord(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisInkWord(IInkAnalysisInkWord const&) noexcept = default; IInkAnalysisInkWord(IInkAnalysisInkWord&&) noexcept = default; IInkAnalysisInkWord& operator=(IInkAnalysisInkWord const&) & noexcept = default; IInkAnalysisInkWord& operator=(IInkAnalysisInkWord&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisLine : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisLine>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisLine, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisLine(std::nullptr_t = nullptr) noexcept {} IInkAnalysisLine(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisLine(IInkAnalysisLine const&) noexcept = default; IInkAnalysisLine(IInkAnalysisLine&&) noexcept = default; IInkAnalysisLine& operator=(IInkAnalysisLine const&) & noexcept = default; IInkAnalysisLine& operator=(IInkAnalysisLine&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisListItem : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisListItem>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisListItem, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisListItem(std::nullptr_t = nullptr) noexcept {} IInkAnalysisListItem(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisListItem(IInkAnalysisListItem const&) noexcept = default; IInkAnalysisListItem(IInkAnalysisListItem&&) noexcept = default; IInkAnalysisListItem& operator=(IInkAnalysisListItem const&) & noexcept = default; IInkAnalysisListItem& operator=(IInkAnalysisListItem&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisNode : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisNode> { IInkAnalysisNode(std::nullptr_t = nullptr) noexcept {} IInkAnalysisNode(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisNode(IInkAnalysisNode const&) noexcept = default; IInkAnalysisNode(IInkAnalysisNode&&) noexcept = default; IInkAnalysisNode& operator=(IInkAnalysisNode const&) & noexcept = default; IInkAnalysisNode& operator=(IInkAnalysisNode&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisParagraph : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisParagraph>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisParagraph, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisParagraph(std::nullptr_t = nullptr) noexcept {} IInkAnalysisParagraph(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisParagraph(IInkAnalysisParagraph const&) noexcept = default; IInkAnalysisParagraph(IInkAnalysisParagraph&&) noexcept = default; IInkAnalysisParagraph& operator=(IInkAnalysisParagraph const&) & noexcept = default; IInkAnalysisParagraph& operator=(IInkAnalysisParagraph&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisResult : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisResult> { IInkAnalysisResult(std::nullptr_t = nullptr) noexcept {} IInkAnalysisResult(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisResult(IInkAnalysisResult const&) noexcept = default; IInkAnalysisResult(IInkAnalysisResult&&) noexcept = default; IInkAnalysisResult& operator=(IInkAnalysisResult const&) & noexcept = default; IInkAnalysisResult& operator=(IInkAnalysisResult&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisRoot : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisRoot>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisRoot, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisRoot(std::nullptr_t = nullptr) noexcept {} IInkAnalysisRoot(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisRoot(IInkAnalysisRoot const&) noexcept = default; IInkAnalysisRoot(IInkAnalysisRoot&&) noexcept = default; IInkAnalysisRoot& operator=(IInkAnalysisRoot const&) & noexcept = default; IInkAnalysisRoot& operator=(IInkAnalysisRoot&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalysisWritingRegion : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalysisWritingRegion>, impl::require<Windows::UI::Input::Inking::Analysis::IInkAnalysisWritingRegion, Windows::UI::Input::Inking::Analysis::IInkAnalysisNode> { IInkAnalysisWritingRegion(std::nullptr_t = nullptr) noexcept {} IInkAnalysisWritingRegion(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalysisWritingRegion(IInkAnalysisWritingRegion const&) noexcept = default; IInkAnalysisWritingRegion(IInkAnalysisWritingRegion&&) noexcept = default; IInkAnalysisWritingRegion& operator=(IInkAnalysisWritingRegion const&) & noexcept = default; IInkAnalysisWritingRegion& operator=(IInkAnalysisWritingRegion&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalyzer : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalyzer> { IInkAnalyzer(std::nullptr_t = nullptr) noexcept {} IInkAnalyzer(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalyzer(IInkAnalyzer const&) noexcept = default; IInkAnalyzer(IInkAnalyzer&&) noexcept = default; IInkAnalyzer& operator=(IInkAnalyzer const&) & noexcept = default; IInkAnalyzer& operator=(IInkAnalyzer&&) & noexcept = default; }; struct __declspec(empty_bases) IInkAnalyzerFactory : Windows::Foundation::IInspectable, impl::consume_t<IInkAnalyzerFactory> { IInkAnalyzerFactory(std::nullptr_t = nullptr) noexcept {} IInkAnalyzerFactory(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} IInkAnalyzerFactory(IInkAnalyzerFactory const&) noexcept = default; IInkAnalyzerFactory(IInkAnalyzerFactory&&) noexcept = default; IInkAnalyzerFactory& operator=(IInkAnalyzerFactory const&) & noexcept = default; IInkAnalyzerFactory& operator=(IInkAnalyzerFactory&&) & noexcept = default; }; } #endif
[ "kenny.kerr@microsoft.com" ]
kenny.kerr@microsoft.com
52dab641ae476c512b0fc98387b9f7f6510c296f
2bee67c59dc644f835a4e8d21514fa51687c0056
/Server/OClient.h
b89738b0259cfabd90a1b5df0cdd7bdeda1c00bc
[]
no_license
jysperm/ZeroMS-1x
483dab6c385bddf618bc20990ab70719558a4888
a48ba50152bf6e55bcecbbb304596747cc8e014a
refs/heads/master
2020-04-30T17:42:26.802301
2016-02-25T18:33:01
2016-02-25T18:33:01
2,780,517
5
1
null
null
null
null
UTF-8
C++
false
false
1,113
h
#ifndef CLIENTCONN_H #define CLIENTCONN_H #include "const.h" #include "../public/OPacket.h" class OClient:public QObject { //该类是对客户端连接的一个简单抽象,一个Client对象代表一个客户端 //事实上该类只是添加了一些数据成员,用来为连接对象提供一些额外的信息 //只是简单的添加了几个共有成员变量,所以不单独使用实现文件了 public: OClient(); virtual ~OClient(); inline unsigned int ping();//将最后登陆时间改为当前时间 inline void send(OPacket &packet); int isLoged;//是否已经登录成功 unsigned int lasttime;//上次请求时间,客户端最后一次给服务器发消息的时间 int clientver;//客户端版本顺序号 QString clientname;//客户端名称描述性字符串 QByteArray *databuf;//数据缓冲 QTcpSocket *conn;//连接对象 }; inline unsigned int OClient::ping() { return lasttime=QDateTime::currentDateTime().toTime_t(); } inline void OClient::send(OPacket &packet) { conn->write(packet.exec()); } #endif // CLIENTCONN_H
[ "m@jybox.net" ]
m@jybox.net
a8df53c0c62c4d7bcddde335030c860114a7e014
38b9daafe39f937b39eefc30501939fd47f7e668
/tutorials/2WayCouplingOceanWave3D/basicTutorialwtProbesResultsWtPhiCoupled_180625/28/uniform/time
a7b104df00ffbe24c389dedcfa2dbb42a0b68137
[]
no_license
rubynuaa/2-way-coupling
3a292840d9f56255f38c5e31c6b30fcb52d9e1cf
a820b57dd2cac1170b937f8411bc861392d8fbaa
refs/heads/master
2020-04-08T18:49:53.047796
2018-08-29T14:22:18
2018-08-29T14:22:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
984
/*--------------------------------*- 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 dictionary; location "28/uniform"; object time; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // value 28; name "28"; index 2689; deltaT 0.00952381; deltaT0 0.00952381; // ************************************************************************* //
[ "abenaz15@etudiant.mines-nantes.fr" ]
abenaz15@etudiant.mines-nantes.fr
9ed5346019b75f49587d104020fbd56d52b27cb1
050d0303560fd88431c6eaae53d72c156da98485
/mainwindow.cpp
abbfc44a9f3982acde937d02e0c56c435a06ae10
[]
no_license
hgarbeil/dronefly
81ef0ca86e9d76a9f93fad81c37e522f15426224
5b61845fcdbc78df3c0d964d60bcf3e069075396
refs/heads/master
2021-04-12T08:40:01.088888
2018-03-30T02:45:17
2018-03-30T02:45:17
126,241,893
0
0
null
null
null
null
UTF-8
C++
false
false
8,339
cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include "processso2.h" #include "QThread" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); statusString = new QString ("Ready") ; ppmmString = new QString ("") ; myspec = new MySpectrometer () ; myspec->initSpec() ; myspec->setIntLevel (2) ; gps = new QGPSDevice (this) ; gps->setPort ("/dev/ttyS0") ; //gps->init() ; pm = new phidgetsMot () ; pso2 = new ProcessSO2 () ; cscan = new CalScan () ; cscan->setObjects(myspec, pm); cscan->setPSO2(pso2) ; cscan->setFName ("/home/pi/calfiles/cal") ; cscan->setModeString (statusString); pso2->setCals (cscan->dark, 0) ; pso2->setCals (cscan->low, 1) ; pso2->setCals (cscan->high, 2) ; pso2->setCals (cscan->ref, 3) ; scanthread = new ScanThread () ; scanthread->setObjects (myspec, pm) ; scanthread->setPS (pso2) ; scanthread->setCalscan (cscan) ; scanthread->setModeString (statusString) ; QThread::sleep (5) ; aint = new AutoInt() ; aint->setSpec (myspec) ; aint->setModeString (this->statusString) ; firstFlag = true ; calFlag = false ; connect (aint, SIGNAL(complete(int)), this, SLOT(autoDone(int))) ; connect (aint, SIGNAL(setMax(float)), this, SLOT(setValueLabel(float))) ; connect (scanthread, SIGNAL(setVal(float)), this, SLOT(setValueLabel(float))) ; qtimer = new QTimer (this) ; qtimer->start(1000) ; connect (qtimer, SIGNAL(timeout()), this, SLOT(updateGUI())) ; connect (pm, SIGNAL(cellState(int)), this, SLOT(setCellButton(int))) ; polarFlag = false ; voltOnlyFlag = true ; scanState = false ; } void MainWindow::setParamFile (char *pfile) { char gpsdev[240] ; float lowCell, highCell, scanoff, caloff, scanscale ; float val0, val1 ; int d0, d1, r0, r1, r0h, r1h, ival ; int cellSer, scanSer ; int dpos, lpos, hpos, rpos ; int nmotors ; FILE *fin = fopen (pfile, "r") ; if (fin==0L) { return ; } //paramFile = QString (ifile); // first line is low and high cell conctn fscanf (fin, "%f %f", &val0, &val1) ; lowCell = val0 ; highCell = val1 ; printf ("Low and high cell vals are : %f %f\r\n", lowCell, highCell) ; pso2->setConcentrations (lowCell, highCell) ; // second line is start and stop of dark range fscanf (fin, "%d %d", &d0, &d1) ; printf ("Dark range is %d %d\r\n", d0, d1) ; // third line is start and stop of fit range fscanf (fin, "%d %d", &r0, &r1) ; printf ("Fit range is %d %d\r\n", r0, r1) ; fscanf (fin, "%d %d", &r0h, &r1h) ; pso2->setRanges (d0, d1, r0, r1, r0h, r1h) ; myspec->setRanges ( r0, r1, r0h, r1h) ; printf ("Long fit range is %d %d\r\n", r0h, r1h) ; // fourth line is nmotors, caloff, scanoff, scanscale fscanf (fin, "%d %f %f %f", &nmotors, &caloff, &scanoff, &scanscale) ; pm->setMotors (nmotors, caloff, scanoff, scanscale) ; // fifth line is cell positions ref,high, dark, low fscanf (fin, "%d %d %d %d", &rpos, &hpos, &dpos, &lpos) ; this->pm->setCalPositions (dpos, lpos, hpos, rpos) ; // slope offset correction - not used in this program fscanf (fin, "%f %f", &val0, &val1) ; // the two motor serial numbers fscanf (fin, "%d %d", &cellSer, &scanSer) ; // gps serial device name fscanf (fin, "%s", gpsdev) ; // 0 or 1 flag for volts fscanf (fin, "%d", &ival) ; fscanf (fin, "%f %f", &startTime, &endTime) ; //gps->setPort (gpsdev) ; gps->init() ; /*if (gps->gpsStatus) gps->start() ; */ pm->setSerialNumbers (cellSer, scanSer) ; pm->init() ; bool mFlag ; if (nmotors >1) { mFlag = true ; polarFlag = true ; // ui->scanAvgCBox->setChecked(false); // ui->polarRB->setChecked(true) ; // ui->ppmmWidget->setPolarScales() ; // ui->MirrorScanCB->setChecked(true) ; // ui->menuScanner->setEnabled (true); pm->scanHome(); } else{ mFlag = false ; polarFlag = false ; // ui->scanAvgCBox->setChecked(true); // ui->polarRB->setEnabled(false) ; // ui->MirrorScanCB->setCheckable(false) ; // ui->MirrorScanCB->setChecked(false) ; // ui->menuScanner->setEnabled (false); } scanthread->setMirrorFlag (mFlag) ; //repeatscan->setMirrorFlag (mFlag) ; ui->aintButton->setStyleSheet ("background-color:orange") ; aint->start() ; } void MainWindow::updateGUI () { ui->StatLE->setText (*statusString) ; if (calFlag == false) { ui->scanButton->setEnabled (false) ; } else ui->scanButton->setEnabled (true ) ; //ui->ppmmLE->setText (ppmmString->toLatin1().data()) ; ui->GPS_LE->setText (*gps->timestring) ; ui->GPSP_LE->setText (*gps->posstring) ; } void MainWindow::autoDone (int lev) { if (firstFlag) { ui->calButton->setStyleSheet ("background-color:green") ; cscan->fileCal("/home/pi/calfiles/cal") ; ui->scanButton->setEnabled (true) ; calFlag = true ; firstFlag = false ; } ui->aintButton->setStyleSheet ("background-color:green") ; //ui->lineEdit->setText (*statusString) ; } MainWindow::~MainWindow() { delete ui; delete myspec ; } void MainWindow::on_aintButton_clicked() { ui->aintButton->setStyleSheet ("background-color:orange") ; aint->start() ; } void MainWindow::on_scanButton_clicked() { // if not scanning .... QString workDir ("/home/pi/data") ; if (!scanState){ // start scanning QString filestring ; QTime qtim = QTime::currentTime () ; QDate qdat = QDate::currentDate() ; filestring = workDir+"/"+filestring.sprintf ("Scan_%04d_%02d_%02d_%02d%02d", qdat.year(), qdat.month(), qdat.day(), qtim.hour(), qtim.minute()) ; //this->writeParamFile (filestring+"_params.txt"); pso2->processCals() ; ui->scanButton->setEnabled (false) ; scanthread->setScanFile (filestring) ; scanthread->nscans = 10000 ; myspec->setNScansAvg (AutoInt::nscansAvg[myspec->intLevel]) ; scanthread->setGPS (this->gps) ; //ui->plotWidget->detachCals() ; ui->scanButton->setStyleSheet ("background-color:green;color:yellow") ; ui->scanButton->setText ("Stop SCAN") ; pm->setRef() ; scanthread->start() ; scanState = true ; } else { scanthread->scanning = false ; scanState = false ; ui->scanButton->setStyleSheet ("background-color:yellow;color:black") ; ui->scanButton->setText ("SCAN") ; } } void MainWindow::on_calButton_clicked() { QTime qtim = QTime::currentTime () ; QDate qdat = QDate::currentDate() ; timestring.sprintf ("/home/pi/calfiles/Cal_%04d_%02d_%02d_%02d%02d", qdat.year(), qdat.month(), qdat.day(), qtim.hour(), qtim.minute()) ; myspec->setNScansAvg (AutoInt::nscansAvg[myspec->intLevel]); //calFlag = 0 ; cscan->setFName ("/home/pi/calfiles/cal") ; cscan->setTimeString (&timestring) ; cscan->setMode (0) ; cscan->start() ; } void MainWindow::setCellButton (int bnum){ switch (bnum) { case 0 : ui->cellButton->setText ("Dark") ; break ; case 1 : ui->cellButton->setText ("Low") ; break ; case 2 : ui->cellButton->setText ("High") ; break ; case 3 : ui->cellButton->setText ("Clear") ; break ; } } void MainWindow::setValueLabel (float val) { int ival = int(val) ; QString str = QString("%1").arg(ival) ; ui->valueLabel->setText(str) ; } void MainWindow::on_insLowButton_clicked() { scanthread->insertCell (0,10) ; } void MainWindow::on_insHighButton_clicked() { scanthread->insertCell (1,10) ; }
[ "garbeil@hawaii.edu" ]
garbeil@hawaii.edu
0dbf01b0b56e0286c4b26ce2ffe29d10269c3552
8e8f6ea9a3dfba0fe1b309d77b3887ca2c48f833
/codeforces/1401/A.cpp
688f122a26d1028adc2d55efe7ddb8227583ca48
[]
no_license
MahirSez/problem-solving
dcfa75a15a44eb32716b706324be5226334558f1
385a43a1354e64be82a15528ee2d52d7e93812f3
refs/heads/master
2023-03-21T10:53:30.135684
2021-02-21T13:25:00
2021-03-07T15:40:47
340,282,809
0
1
null
null
null
null
UTF-8
C++
false
false
631
cpp
#include <bits/stdc++.h> #define ll long long int #define uu first #define vv second #define pii pair<int,int> #define pll pair<ll,ll> #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) using namespace std; const int INF = 1e9; const ll MOD = 1e9 + 7; const int N = 1e6 + 6; int main() { fastio; int t; cin>>t; while(t--) { int n , k; cin>>n>>k; if( k <= n ) { if(k%2 == n%2 ) cout<<0<<'\n'; else cout<<1<<'\n'; } else cout<<k-n<<'\n'; } return 0; }
[ "mahirsezan@gmail.com" ]
mahirsezan@gmail.com
2cc325043febe3dac341651c1001f8f4815c726f
60bb67415a192d0c421719de7822c1819d5ba7ac
/blazetest/src/mathtest/dmatdmatmult/LDaLDa.cpp
a07c3465389de3e534398b590d9772e89cfabdb3
[ "BSD-3-Clause" ]
permissive
rtohid/blaze
48decd51395d912730add9bc0d19e617ecae8624
7852d9e22aeb89b907cb878c28d6ca75e5528431
refs/heads/master
2020-04-16T16:48:03.915504
2018-12-19T20:29:42
2018-12-19T20:29:42
165,750,036
0
0
null
null
null
null
UTF-8
C++
false
false
4,124
cpp
//================================================================================================= /*! // \file src/mathtest/dmatdmatmult/LDaLDa.cpp // \brief Source file for the LDaLDa dense matrix/dense matrix multiplication math test // // Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or modify it under // the terms of the New (Revised) BSD License. Redistribution and use in source and binary // forms, with or without modification, are permitted provided that the following conditions // are met: // // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // 3. Neither the names of the Blaze development group nor the names of its contributors // may be used to endorse or promote products derived from this software without specific // prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT // SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR // BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH // DAMAGE. */ //================================================================================================= //************************************************************************************************* // Includes //************************************************************************************************* #include <cstdlib> #include <iostream> #include <blaze/math/DynamicMatrix.h> #include <blaze/math/LowerMatrix.h> #include <blazetest/mathtest/Creator.h> #include <blazetest/mathtest/dmatdmatmult/OperationTest.h> #include <blazetest/system/MathTest.h> //================================================================================================= // // MAIN FUNCTION // //================================================================================================= //************************************************************************************************* int main() { std::cout << " Running 'LDaLDa'..." << std::endl; using blazetest::mathtest::TypeA; try { // Matrix type definitions using LDa = blaze::LowerMatrix< blaze::DynamicMatrix<TypeA> >; // Creator type definitions using CLDa = blazetest::Creator<LDa>; // Running tests with small matrices for( size_t i=0UL; i<=6UL; ++i ) { RUN_DMATDMATMULT_OPERATION_TEST( CLDa( i ), CLDa( i ) ); } // Running tests with large matrices RUN_DMATDMATMULT_OPERATION_TEST( CLDa( 15UL ), CLDa( 15UL ) ); RUN_DMATDMATMULT_OPERATION_TEST( CLDa( 37UL ), CLDa( 37UL ) ); RUN_DMATDMATMULT_OPERATION_TEST( CLDa( 63UL ), CLDa( 63UL ) ); RUN_DMATDMATMULT_OPERATION_TEST( CLDa( 16UL ), CLDa( 16UL ) ); RUN_DMATDMATMULT_OPERATION_TEST( CLDa( 32UL ), CLDa( 32UL ) ); RUN_DMATDMATMULT_OPERATION_TEST( CLDa( 64UL ), CLDa( 64UL ) ); } catch( std::exception& ex ) { std::cerr << "\n\n ERROR DETECTED during dense matrix/dense matrix multiplication:\n" << ex.what() << "\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } //*************************************************************************************************
[ "klaus.iglberger@gmail.com" ]
klaus.iglberger@gmail.com
a782491b80907f08f84497ebc0bb61779cfab64b
76e4eb2cebd217f1ad57c18c38b6ef527ab1a684
/cubool/sources/cuda/details/meta.hpp
18762ae6ffcfd7cef4201754c742e2681c8cd549
[ "MIT" ]
permissive
MSc-21-22/cuBool
fcf89fb5015a519e4a25ef836710c9debb8f91af
c785615bd56c6b0a4b967ae22a7b8554b78258b3
refs/heads/master
2023-09-02T06:27:43.899439
2021-11-22T08:32:41
2021-11-22T08:32:41
426,636,346
0
0
null
null
null
null
UTF-8
C++
false
false
3,890
hpp
/**********************************************************************************/ /* MIT License */ /* */ /* Copyright (c) 2020, 2021 JetBrains-Research */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining a copy */ /* of this software and associated documentation files (the "Software"), to deal */ /* in the Software without restriction, including without limitation the rights */ /* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell */ /* copies of the Software, and to permit persons to whom the Software is */ /* furnished to do so, subject to the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be included in all */ /* copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR */ /* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, */ /* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE */ /* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER */ /* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, */ /* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ /* SOFTWARE. */ /**********************************************************************************/ #ifndef CUBOOL_META_HPP #define CUBOOL_META_HPP #include <thrust/device_vector.h> #include <thrust/host_vector.h> #include <cstddef> namespace cubool { template <typename Config> struct StreamsWrapper { StreamsWrapper() { for (auto& s: streams) cudaStreamCreate(&s); } ~StreamsWrapper() { for (auto& s: streams) cudaStreamDestroy(s); } cudaStream_t streams[Config::binsCount()] = {}; }; template<size_t Threads, size_t BlocksSize, size_t Max, size_t Min, size_t Id> struct Bin { static_assert(Threads <= BlocksSize, "Block size must be >= threads in this block"); static constexpr size_t threads = Threads; static constexpr size_t blockSize = BlocksSize; static constexpr size_t dispatchRatio = BlocksSize / Threads; static constexpr size_t min = Max; static constexpr size_t max = Min; static constexpr size_t id = Id; }; template <typename ... Bins> struct Config { public: static __host__ __device__ size_t selectBin(size_t rowSize) { static constexpr size_t mins[] = { Bins::min... }; static constexpr size_t maxs[] = { Bins::max... }; for (size_t i = 0; i < binsCount(); i++) { if (mins[i] <= rowSize && rowSize <= maxs[i]) return i; } return unusedBinId(); } static __host__ __device__ constexpr size_t binBlockSize(size_t id) { constexpr size_t blockSizes[] = { Bins::blockSize... }; return blockSizes[id]; } static __host__ __device__ constexpr size_t binsCount() { return sizeof...(Bins); } static __host__ __device__ constexpr size_t unusedBinId() { return binsCount() + 1; } }; } #endif //CUBOOL_META_HPP
[ "egororachyov5@gmail.com" ]
egororachyov5@gmail.com
b70534a84a7c08f83e38faa0a6cb30b8933409d0
8d898a03e5b15f4a4e4524c6c28c2b5b27b45ca8
/Polish_notation/main.cpp
10f479c5c19e6b5cabfc10b2fe8bd4b3a15108da
[]
no_license
FOAna/algorithm-library
badc28c5ab8f83a456972af4149dcefcdf8ffc15
613e3f2492b80d2e8d80c500b47d8e6ed5dddb92
refs/heads/main
2023-07-29T13:08:55.485787
2021-09-16T17:56:13
2021-09-16T17:56:13
407,251,261
0
0
null
null
null
null
WINDOWS-1251
C++
false
false
481
cpp
#include"Pol'skaya.h" void main() { int prav; char stroka[255]; List *zap, *vyv; setlocale(0,"Russian"); cout<<"Введите выражение.\n"; cin>>stroka; prav = Kontrol(stroka); List *Stek = Queue(0); List *Ocher = Queue(0); if (prav!=NULL) zap = Polka(stroka,Ocher,Stek); if ((prav!=NULL)&&(zap!=NULL)) { cout<<" Обратная польская запись вашего выражения: "; vyv = Vyvod(Ocher); cout<<"\n"; } system("pause"); }
[ "kristendamon@yandex.ru" ]
kristendamon@yandex.ru
227b81045a18ef2970ba81d965d1086112e88dbf
e37eb1401c3d7e975a8c2dbc3e717ee0c6925e45
/android/anno/src/main/resources/CrossPLUtils.cpp
20df0324053d2e0fb2d26135f7244bb51c84ee8b
[ "MIT" ]
permissive
klx99/CrossPL
4c8759ae5092a0ad498e96ab9bf8960ba66e1979
a5f7241ce03aef2403ef0fc409297bcab6b1e069
refs/heads/master
2022-02-27T23:34:30.108241
2019-09-17T09:54:22
2019-09-17T09:54:22
null
0
0
null
null
null
null
UTF-8
C++
false
false
13,856
cpp
#include "CrossPLUtils.hpp" #include <android/log.h> #include <vector> namespace crosspl { /***********************************************/ /***** static variables initialize *************/ /***********************************************/ //const char* CrossPLUtils::JavaClassNameBoolean = "java/lang/Boolean"; //const char* CrossPLUtils::JavaClassNameInteger = "java/lang/Integer"; //const char* CrossPLUtils::JavaClassNameLong = "java/lang/Long"; //const char* CrossPLUtils::JavaClassNameDouble = "java/lang/Double"; const char* CrossPLUtils::JavaClassNameString = "java/lang/String"; const char* CrossPLUtils::JavaClassNameByteArray = "[B"; const char* CrossPLUtils::JavaClassNameRunnable = "java/lang/Runnable"; const char* CrossPLUtils::JavaClassNameStringBuffer = "java/lang/StringBuffer"; const char* CrossPLUtils::JavaClassNameByteArrayOutputStream = "java/io/ByteArrayOutputStream"; std::map<const char*, jclass> CrossPLUtils::sJavaClassCache {}; JavaVM* CrossPLUtils::sJVM = nullptr; /***********************************************/ /***** static function implement ***************/ /***********************************************/ void CrossPLUtils::SetJavaVM(JavaVM* jvm) { sJVM = jvm; } std::unique_ptr<JNIEnv, std::function<void(JNIEnv*)>> CrossPLUtils::SafeGetEnv() { std::unique_ptr<JNIEnv, std::function<void(JNIEnv*)>> ret; bool needDetach = false; std::thread::id threadId = std::this_thread::get_id(); JNIEnv* jenv; jint jret = sJVM->GetEnv((void **) &jenv, JNI_VERSION_1_6); if (jret != JNI_OK) { jret = sJVM->AttachCurrentThread(&jenv, nullptr); if (jret != JNI_OK) { throw std::runtime_error("CrossPL: Failed to get jni env, AttachCurrentThread return error"); } needDetach = true; } auto deleter = [=](JNIEnv* jenv) -> void { EnsureRunOnThread(threadId); if (needDetach == true) { sJVM->DetachCurrentThread(); } }; ret = std::unique_ptr<JNIEnv, std::function<void(JNIEnv*)>>(jenv, deleter); return ret; } jclass CrossPLUtils::FindJavaClass(JNIEnv* jenv, const char* className) { // CRASH if not found auto found = sJavaClassCache.find(className); if(found == sJavaClassCache.end()) { jclass clazz = jenv->FindClass(className); sJavaClassCache[className] = (jclass) jenv->NewGlobalRef(clazz); jenv->DeleteLocalRef(clazz); } return sJavaClassCache.at(className); } void CrossPLUtils::EnsureRunOnThread(std::thread::id threadId) { std::thread::id currThreadId = std::this_thread::get_id(); if(currThreadId != threadId) { __android_log_print(ANDROID_LOG_FATAL, "crosspl", "Running on incorrect thread!!!"); throw std::runtime_error("CrossPL: Running on incorrect thread"); } } std::shared_ptr<const char> CrossPLUtils::SafeCastString(JNIEnv* jenv, jstring jdata) { std::shared_ptr<const char> ret; std::thread::id threadId = std::this_thread::get_id(); if(jdata == nullptr) { return ret; // nullptr } auto creater = [=]() -> const char* { EnsureRunOnThread(threadId); const char* ptr = jenv->GetStringUTFChars(jdata, nullptr); return ptr; }; auto deleter = [=](const char* ptr) -> void { EnsureRunOnThread(threadId); jenv->ReleaseStringUTFChars(jdata, ptr); }; ret = std::shared_ptr<const char>(creater(), deleter); return ret; } std::shared_ptr<std::function<void()>> CrossPLUtils::SafeCastFunction(JNIEnv* jenv, jobject jdata) { std::shared_ptr<std::function<void()>> ret; std::thread::id threadId = std::this_thread::get_id(); if(jdata == nullptr) { return ret; // nullptr } auto creater = [=]() -> std::function<void()>* { EnsureRunOnThread(threadId); auto ptr = new std::function<void()>([=]() { jclass jclazz = FindJavaClass(jenv, JavaClassNameRunnable); jmethodID jmethod = jenv->GetMethodID(jclazz, "run", "()V"); jenv->CallVoidMethod(jdata, jmethod); }); return ptr; }; auto deleter = [=](std::function<void()>* ptr) -> void { EnsureRunOnThread(threadId); delete ptr; }; ret = std::shared_ptr<std::function<void()>>(creater(), deleter); return ret; } std::shared_ptr<std::span<int8_t>> CrossPLUtils::SafeCastByteArray(JNIEnv* jenv, jbyteArray jdata) { std::shared_ptr<std::span<int8_t>> ret; std::thread::id threadId = std::this_thread::get_id(); if(jdata == nullptr) { return ret; // nullptr } auto creater = [=]() -> std::span<int8_t>* { EnsureRunOnThread(threadId); jbyte* arrayPtr = jenv->GetByteArrayElements(jdata, nullptr); jsize arrayLen = jenv->GetArrayLength(jdata); auto retPtr = new std::span<int8_t>(arrayPtr, arrayLen); return retPtr; }; auto deleter = [=](std::span<int8_t>* ptr) -> void { EnsureRunOnThread(threadId); jenv->ReleaseByteArrayElements(jdata, ptr->data(), JNI_ABORT); delete ptr; }; ret = std::shared_ptr<std::span<int8_t>>(creater(), deleter); return ret; } std::shared_ptr<std::stringstream> CrossPLUtils::SafeCastStringBuffer(JNIEnv* jenv, jobject jdata) { std::shared_ptr<std::stringstream> ret; std::thread::id threadId = std::this_thread::get_id(); if(jdata == nullptr) { return ret; // nullptr } auto creater = [=]() -> std::stringstream* { EnsureRunOnThread(threadId); jclass jclazz = FindJavaClass(jenv, JavaClassNameStringBuffer); jmethodID jmethod = jenv->GetMethodID(jclazz, "toString", "()Ljava/lang/String;"); jstring jstr = static_cast<jstring>(jenv->CallObjectMethod(jdata, jmethod)); auto str = SafeCastString(jenv, jstr); auto retPtr = new std::stringstream(str.get()); return retPtr; }; auto deleter = [=](std::stringstream* ptr) -> void { EnsureRunOnThread(threadId); delete ptr; }; ret = std::shared_ptr<std::stringstream>(creater(), deleter); return ret; } std::shared_ptr<std::vector<int8_t>> CrossPLUtils::SafeCastByteBuffer(JNIEnv* jenv, jobject jdata) { std::shared_ptr<std::vector<int8_t>> ret; std::thread::id threadId = std::this_thread::get_id(); if(jdata == nullptr) { return ret; // nullptr } auto creater = [=]() -> std::vector<int8_t>* { EnsureRunOnThread(threadId); jclass jclazz = jenv->GetObjectClass(jdata); jmethodID jmethod = jenv->GetMethodID(jclazz, "toByteArray", "()[B"); jbyteArray jbytes = static_cast<jbyteArray>(jenv->CallObjectMethod(jdata, jmethod)); auto bytes = SafeCastByteArray(jenv, jbytes); auto retPtr = new std::vector<int8_t>(bytes->data(), bytes->data() + bytes->size()); return retPtr; }; auto deleter = [=](std::vector<int8_t>* ptr) -> void { EnsureRunOnThread(threadId); delete ptr; }; ret = std::shared_ptr<std::vector<int8_t>>(creater(), deleter); return ret; } std::shared_ptr<_jstring> CrossPLUtils::SafeCastString(JNIEnv* jenv, const char* data) { std::shared_ptr<_jstring> ret; std::thread::id threadId = std::this_thread::get_id(); if (data == nullptr) { return ret; // nullptr } auto creater = [=]() -> jstring { EnsureRunOnThread(threadId); jstring ptr = jenv->NewStringUTF(data); return ptr; }; auto deleter = [=](jstring ptr) -> void { EnsureRunOnThread(threadId); jenv->DeleteLocalRef(ptr); }; ret = std::shared_ptr<_jstring>(creater(), deleter); return ret; } std::shared_ptr<_jbyteArray> CrossPLUtils::SafeCastByteArray(JNIEnv* jenv, const std::span<int8_t>* data) { std::shared_ptr<_jbyteArray> ret; std::thread::id threadId = std::this_thread::get_id(); if(data == nullptr) { return ret; // nullptr } auto creater = [=]() -> jbyteArray { EnsureRunOnThread(threadId); jbyteArray jdata = jenv->NewByteArray(data->size()); jenv->SetByteArrayRegion(jdata, 0, data->size(), data->data()); return jdata; }; auto deleter = [=](jbyteArray ptr) -> void { EnsureRunOnThread(threadId); jenv->DeleteLocalRef(ptr); }; ret = std::shared_ptr<_jbyteArray>(creater(), deleter); return ret; } std::shared_ptr<_jobject> CrossPLUtils::SafeCastFunction(JNIEnv* jenv, const std::function<void()>* data) { std::shared_ptr<_jobject> ret; std::thread::id threadId = std::this_thread::get_id(); if(data == nullptr) { return ret; // nullptr } auto creater = [&]() -> jobject { EnsureRunOnThread(threadId); jclass jclazz = FindJavaClass(jenv, JavaClassNameRunnable); // jmethodID jconstructor = jenv->GetMethodID(jclazz, "<init>", "()V"); // jobject jobj = jenv->NewObject(jclazz, jconstructor); // return jobj; }; auto deleter = [=](jobject ptr) -> void { EnsureRunOnThread(threadId); // jenv->DeleteLocalRef(ptr); }; ret = std::shared_ptr<_jobject>(creater(), deleter); return ret; } std::shared_ptr<_jobject> CrossPLUtils::SafeCastStringBuffer(JNIEnv* jenv, const std::stringstream* data) { std::shared_ptr<_jobject> ret; std::thread::id threadId = std::this_thread::get_id(); if(data == nullptr) { return ret; // nullptr } auto creater = [=]() -> jobject { EnsureRunOnThread(threadId); jclass jclazz = FindJavaClass(jenv, JavaClassNameStringBuffer); jmethodID jconstructor = jenv->GetMethodID(jclazz, "<init>", "()V"); jobject jobj = jenv->NewObject(jclazz, jconstructor); SafeCopyStringBufferToJava(jenv, jobj, data); return jobj; }; auto deleter = [=](jobject ptr) -> void { EnsureRunOnThread(threadId); jenv->DeleteLocalRef(ptr); }; ret = std::shared_ptr<_jobject>(creater(), deleter); return ret; } std::shared_ptr<_jobject> CrossPLUtils::SafeCastByteBuffer(JNIEnv* jenv, const std::vector<int8_t>* data) { std::shared_ptr<_jobject> ret; std::thread::id threadId = std::this_thread::get_id(); if(data == nullptr) { return ret; // nullptr } auto creater = [=]() -> jobject { EnsureRunOnThread(threadId); jclass jclazz = FindJavaClass(jenv, JavaClassNameByteArrayOutputStream); jmethodID jconstructor = jenv->GetMethodID(jclazz, "<init>", "()V"); jobject jobj = jenv->NewObject(jclazz, jconstructor); SafeCopyByteBufferToJava(jenv, jobj, data); return jobj; }; auto deleter = [=](jobject ptr) -> void { EnsureRunOnThread(threadId); jenv->DeleteLocalRef(ptr); }; ret = std::shared_ptr<_jobject>(creater(), deleter); return ret; } int CrossPLUtils::SafeCopyStringBufferToCpp(JNIEnv* jenv, std::stringstream* copyTo, jobject jdata) { if(copyTo == nullptr) { return 0; // nullptr } auto tmpPtr = SafeCastStringBuffer(jenv, jdata); copyTo->str(""); // clear stringstream copyTo->swap(*tmpPtr); return 0; } int CrossPLUtils::SafeCopyByteBufferToCpp(JNIEnv* jenv, std::vector<int8_t>* copyTo, jobject jdata) { if(copyTo == nullptr) { return 0; // nullptr } auto tmpPtr = SafeCastByteBuffer(jenv, jdata); copyTo->swap(*tmpPtr); return 0; } int CrossPLUtils::SafeCopyStringBufferToJava(JNIEnv* jenv, jobject jcopyTo, const std::stringstream* data) { if(jcopyTo == nullptr) { return 0; // nullptr } // clear exists content jclass jclazz = FindJavaClass(jenv, JavaClassNameStringBuffer); jmethodID jmethodSetLength = jenv->GetMethodID(jclazz, "setLength", "(I)V"); jenv->CallVoidMethod(jcopyTo, jmethodSetLength, 0); if(data == nullptr) { return 0; // nullptr } auto jstrPtr = SafeCastString(jenv, data->str().c_str()); jmethodID jmethodAppend = jenv->GetMethodID(jclazz, "append", "(Ljava/lang/String;)Ljava/lang/StringBuffer;"); jenv->CallObjectMethod(jcopyTo, jmethodAppend, jstrPtr.get()); return 0; } int CrossPLUtils::SafeCopyByteBufferToJava(JNIEnv* jenv, jobject jcopyTo, const std::vector<int8_t>* data) { if(jcopyTo == nullptr) { return 0; // nullptr } // clear exists content jclass jclazz = FindJavaClass(jenv, JavaClassNameByteArrayOutputStream); jmethodID jmethodReset = jenv->GetMethodID(jclazz, "reset", "()V"); jenv->CallVoidMethod(jcopyTo, jmethodReset); if(data == nullptr) { return 0; // nullptr } auto spanData = std::span<int8_t>(const_cast<int8_t*>(data->data()), data->size()); auto jbytesPtr = SafeCastByteArray(jenv, &spanData); jmethodID jmethodWrite = jenv->GetMethodID(jclazz, "write", "([B)V"); jenv->CallVoidMethod(jcopyTo, jmethodWrite, jbytesPtr.get()); return 0; } void* CrossPLUtils::SafeCastCrossObject(JNIEnv* jenv, jobject jdata) { jclass jclazz = jenv->GetObjectClass(jdata); jfieldID jfield = jenv->GetFieldID(jclazz, "nativeHandle", "J"); jlong jnativeHandle = jenv->GetLongField(jdata, jfield); return reinterpret_cast<void*>(jnativeHandle); } /***********************************************/ /***** class public function implement ********/ /***********************************************/ /***********************************************/ /***** class protected function implement *****/ /***********************************************/ /***********************************************/ /***** class private function implement *******/ /***********************************************/ } // namespace crosspl
[ "xiaokun.meng@qcast.cn" ]
xiaokun.meng@qcast.cn
c73d48906f44d9a880552f28b6fa18dbf1721ead
3ec943d869615c093cb83457eea93e55e5ffb844
/JellyUnlock/moc/moc_application.cpp
442b14fad37fcbd5659ae095c01ce47a9e887983
[]
no_license
kolayuk/dUnlock
c83abfca8414462e4dfa2ccab9b4074b976303d0
a7578a1af9f85825c4bf1addf8d8bf59ca866598
refs/heads/master
2020-05-17T02:11:46.053901
2014-01-31T19:20:28
2014-01-31T19:20:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
10,566
cpp
/**************************************************************************** ** Meta object code from reading C++ file 'application.h' ** ** Created: Fri 21. Dec 16:08:18 2012 ** by: The Qt Meta Object Compiler version 62 (Qt 4.7.3) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../application.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'application.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 62 #error "This file was generated using the moc from 4.7.3. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_Application[] = { // content: 5, // revision 0, // classname 0, 0, // classinfo 30, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 18, // signalCount // signals: signature, parameters, type, tag, flags 22, 13, 12, 12, 0x05, 42, 13, 12, 12, 0x05, 71, 64, 12, 12, 0x05, 95, 13, 12, 12, 0x05, 119, 13, 12, 12, 0x05, 136, 13, 12, 12, 0x05, 156, 13, 12, 12, 0x05, 185, 181, 12, 12, 0x05, 206, 181, 12, 12, 0x05, 227, 181, 12, 12, 0x05, 248, 181, 12, 12, 0x05, 269, 181, 12, 12, 0x05, 290, 181, 12, 12, 0x05, 311, 181, 12, 12, 0x05, 337, 13, 12, 12, 0x05, 363, 13, 12, 12, 0x05, 389, 13, 12, 12, 0x05, 413, 12, 12, 12, 0x05, // slots: signature, parameters, type, tag, flags 447, 440, 12, 12, 0x0a, 465, 12, 12, 12, 0x0a, 495, 490, 12, 12, 0x0a, 523, 12, 519, 12, 0x0a, 547, 490, 519, 12, 0x0a, 577, 12, 12, 12, 0x0a, // methods: signature, parameters, type, tag, flags 599, 590, 12, 12, 0x02, 631, 12, 12, 12, 0x02, 641, 12, 12, 12, 0x02, 654, 648, 519, 12, 0x02, 672, 12, 519, 12, 0x02, 694, 682, 12, 12, 0x02, 0 // eod }; static const char qt_meta_stringdata_Application[] = { "Application\0\0newstate\0appWorkChanged(int)\0" "autostartChanged(int)\0newpic\0" "pictureChanged(QString)\0playerAlbumChanged(int)\0" "zoomChanged(int)\0hideSMSChanged(int)\0" "useWallpaperChanged(int)\0app\0" "app1Changed(QString)\0app2Changed(QString)\0" "app3Changed(QString)\0app4Changed(QString)\0" "app5Changed(QString)\0app6Changed(QString)\0" "cameraAppChanged(QString)\0" "useSystemFontChanged(int)\0" "notificationsChanged(int)\0" "orientationChanged(int)\0" "showAppPanelNotification()\0filter\0" "SortApps(QString)\0KillAnotherLockScreens()\0" "name\0KillLockScreen(QString)\0int\0" "GetAnotherLockscreens()\0" "isLockScreenLaunched(QString)\0" "HideSplash()\0id,value\0" "ChangeSetting(QString,QVariant)\0" "EditPic()\0Exit()\0index\0isKeyChecked(int)\0" "keysLen()\0key,checked\0checkKey(int,bool)\0" }; const QMetaObject Application::staticMetaObject = { { &QObject::staticMetaObject, qt_meta_stringdata_Application, qt_meta_data_Application, 0 } }; #ifdef Q_NO_DATA_RELOCATION const QMetaObject &Application::getStaticMetaObject() { return staticMetaObject; } #endif //Q_NO_DATA_RELOCATION const QMetaObject *Application::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; } void *Application::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_Application)) return static_cast<void*>(const_cast< Application*>(this)); return QObject::qt_metacast(_clname); } int Application::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: appWorkChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: autostartChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: pictureChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 3: playerAlbumChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 4: zoomChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 5: hideSMSChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 6: useWallpaperChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 7: app1Changed((*reinterpret_cast< QString(*)>(_a[1]))); break; case 8: app2Changed((*reinterpret_cast< QString(*)>(_a[1]))); break; case 9: app3Changed((*reinterpret_cast< QString(*)>(_a[1]))); break; case 10: app4Changed((*reinterpret_cast< QString(*)>(_a[1]))); break; case 11: app5Changed((*reinterpret_cast< QString(*)>(_a[1]))); break; case 12: app6Changed((*reinterpret_cast< QString(*)>(_a[1]))); break; case 13: cameraAppChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; case 14: useSystemFontChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 15: notificationsChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 16: orientationChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 17: showAppPanelNotification(); break; case 18: SortApps((*reinterpret_cast< QString(*)>(_a[1]))); break; case 19: KillAnotherLockScreens(); break; case 20: KillLockScreen((*reinterpret_cast< QString(*)>(_a[1]))); break; case 21: { int _r = GetAnotherLockscreens(); if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; } break; case 22: { int _r = isLockScreenLaunched((*reinterpret_cast< QString(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; } break; case 23: HideSplash(); break; case 24: ChangeSetting((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QVariant(*)>(_a[2]))); break; case 25: EditPic(); break; case 26: Exit(); break; case 27: { int _r = isKeyChecked((*reinterpret_cast< int(*)>(_a[1]))); if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; } break; case 28: { int _r = keysLen(); if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; } break; case 29: checkKey((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< bool(*)>(_a[2]))); break; default: ; } _id -= 30; } return _id; } // SIGNAL 0 void Application::appWorkChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 0, _a); } // SIGNAL 1 void Application::autostartChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 1, _a); } // SIGNAL 2 void Application::pictureChanged(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 2, _a); } // SIGNAL 3 void Application::playerAlbumChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 3, _a); } // SIGNAL 4 void Application::zoomChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 4, _a); } // SIGNAL 5 void Application::hideSMSChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 5, _a); } // SIGNAL 6 void Application::useWallpaperChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 6, _a); } // SIGNAL 7 void Application::app1Changed(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 7, _a); } // SIGNAL 8 void Application::app2Changed(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 8, _a); } // SIGNAL 9 void Application::app3Changed(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 9, _a); } // SIGNAL 10 void Application::app4Changed(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 10, _a); } // SIGNAL 11 void Application::app5Changed(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 11, _a); } // SIGNAL 12 void Application::app6Changed(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 12, _a); } // SIGNAL 13 void Application::cameraAppChanged(QString _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 13, _a); } // SIGNAL 14 void Application::useSystemFontChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 14, _a); } // SIGNAL 15 void Application::notificationsChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 15, _a); } // SIGNAL 16 void Application::orientationChanged(int _t1) { void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) }; QMetaObject::activate(this, &staticMetaObject, 16, _a); } // SIGNAL 17 void Application::showAppPanelNotification() { QMetaObject::activate(this, &staticMetaObject, 17, 0); } QT_END_MOC_NAMESPACE
[ "kolayuk@gmail.com" ]
kolayuk@gmail.com
5196625af5687d0896c5eb04d781d701ea54f73f
d09945668f19bb4bc17087c0cb8ccbab2b2dd688
/srm/741-770/761/SortArray.cpp
0ff29971b0b67d3ecb1c555544eb969d227c0921
[]
no_license
kmjp/procon
27270f605f3ae5d80fbdb28708318a6557273a57
8083028ece4be1460150aa3f0e69bdb57e510b53
refs/heads/master
2023-09-04T11:01:09.452170
2023-09-03T15:25:21
2023-09-03T15:25:21
30,825,508
23
2
null
2023-08-18T14:02:07
2015-02-15T11:25:23
C++
UTF-8
C++
false
false
3,461
cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<to;x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) //------------------------------------------------------- class SortArray { public: vector <int> verify(int N, vector <int> C) { int i,x,y; int mask; FOR(mask,1<<N) { vector<int> V(N,0); FOR(y,N) if((mask&(1<<y))==0) V[y]=1; FORR(c,C) { int n[2]={}; FOR(y,N) if(c&(1<<y)) n[V[y]]++; FOR(y,N) if(c&(1<<y)) { if(n[0]) n[0]--, V[y]=0; else V[y]=1; } } FOR(y,__builtin_popcount(mask)) if(V[y]==1) { int a=0,b=__builtin_popcount(mask); FOR(y,N) { if((mask&(1<<y))) V[y]=a++; else V[y]=b++; } return V; } } return {}; } // BEGIN CUT HERE public: void run_test(int Case) { if ((Case == -1) || (Case == 0)) test_case_0(); if ((Case == -1) || (Case == 1)) test_case_1(); if ((Case == -1) || (Case == 2)) test_case_2(); if ((Case == -1) || (Case == 3)) test_case_3(); if ((Case == -1) || (Case == 4)) test_case_4(); } private: template <typename T> string print_array(const vector<T> &V) { ostringstream os; os << "{ "; for (typename vector<T>::const_iterator iter = V.begin(); iter != V.end(); ++iter) os << '\"' << *iter << "\","; os << " }"; return os.str(); } void verify_case(int Case, const vector <int> &Expected, const vector <int> &Received) { cerr << "Test Case #" << Case << "..."; if (Expected == Received) cerr << "PASSED" << endl; else { cerr << "FAILED" << endl; cerr << "\tExpected: " << print_array(Expected) << endl; cerr << "\tReceived: " << print_array(Received) << endl; } } void test_case_0() { int Arg0 = 7; int Arr1[] = {127}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arr2[] = { }; vector <int> Arg2(Arr2, Arr2 + (sizeof(Arr2) / sizeof(Arr2[0]))); verify_case(0, Arg2, verify(Arg0, Arg1)); } void test_case_1() { int Arg0 = 8; int Arr1[] = {85, 170}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arr2[] = {0, 1, 2, 3, 4, 5, 7, 6 }; vector <int> Arg2(Arr2, Arr2 + (sizeof(Arr2) / sizeof(Arr2[0]))); verify_case(1, Arg2, verify(Arg0, Arg1)); } void test_case_2() { int Arg0 = 3; int Arr1[] = {3, 5, 6}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arr2[] = { }; vector <int> Arg2(Arr2, Arr2 + (sizeof(Arr2) / sizeof(Arr2[0]))); verify_case(2, Arg2, verify(Arg0, Arg1)); } void test_case_3() { int Arg0 = 10; int Arr1[] = {255, 1020}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arr2[] = {3, 4, 5, 6, 7, 8, 9, 0, 1, 2 }; vector <int> Arg2(Arr2, Arr2 + (sizeof(Arr2) / sizeof(Arr2[0]))); verify_case(3, Arg2, verify(Arg0, Arg1)); } void test_case_4() { int Arg0 = 10; int Arr1[] = {255, 1020, 255, 1020, 255, 1020, 255, 1020, 255, 1020}; vector <int> Arg1(Arr1, Arr1 + (sizeof(Arr1) / sizeof(Arr1[0]))); int Arr2[] = { }; vector <int> Arg2(Arr2, Arr2 + (sizeof(Arr2) / sizeof(Arr2[0]))); verify_case(4, Arg2, verify(Arg0, Arg1)); } // END CUT HERE }; // BEGIN CUT HERE int main(int argc,char** argv) { SortArray ___test; ___test.run_test((argc==1)?-1:atoi(argv[1])); }
[ "kmjp@users.noreply.github.com" ]
kmjp@users.noreply.github.com
9e94bd993b53c49acc62b56ccc5c0c7cf31180d3
4d61c688f57cb1777a07f8347beba95fdadf12b2
/Setup.cpp
8c219738c398908d247fb547e0c574fed575c3fc
[]
no_license
Ahlyis/nguindustbeacons
1737a7a7f05a5835f629381ea03f38795e435e3b
0e32743fafd77e96a8c6978347c085e8cdf0cd7d
refs/heads/main
2023-05-29T17:43:43.339154
2021-06-22T23:33:13
2021-06-22T23:33:13
359,896,412
3
2
null
2021-06-22T23:33:13
2021-04-20T17:20:03
C++
UTF-8
C++
false
false
3,911
cpp
#include "stdafx.h" #include <string.h> #include <fstream> #include <iostream> #include "Accessories.h" extern int sqx[8]; extern int sqy[8]; extern int knx[8]; extern int kny[8]; extern int arx[71]; extern int ary[71]; extern int wlb[12]; extern int dtx[16]; extern int dty[16]; extern int beaconval[3][5]; /* [affects][shape] */ extern int mapcolor [10]; void InitBeacons () { sqx[0] = -1; sqy[0] = -1; sqx[1] = -1; sqy[1] = 0; sqx[2] = -1; sqy[2] = 1; sqx[3] = 0; sqy[3] = -1; sqx[4] = 0; sqy[4] = 1; sqx[5] = 1; sqy[5] = -1; sqx[6] = 1; sqy[6] = 0; sqx[7] = 1; sqy[7] = 1; knx[0] = -2; kny[0] = -1; knx[1] = -2; kny[1] = 1; knx[2] = -1; kny[2] = -2; knx[3] = -1; kny[3] = 2; knx[4] = 1; kny[4] = -2; knx[5] = 1; kny[5] = 2; knx[6] = 2; kny[6] = -1; knx[7] = 2; kny[7] = 1; arx[0] = 0; ary[0] = 1; arx[1] = 0; ary[1] = 2; arx[2] = -2; ary[2] = 3; arx[3] = -1; ary[3] = 3; arx[4] = 0; ary[4] = 3; arx[5] = 1; ary[5] = 3; arx[6] = 2; ary[6] = 3; arx[7] = -1; ary[7] = 4; arx[8] = 0; ary[8] = 4; arx[9] = 1; ary[9] = 4; arx[10] = 0; ary[10] = 5; arx[20] = 0; ary[20] = -1; arx[21] = 0; ary[21] = -2; arx[22] = -2; ary[22] = -3; arx[23] = -1; ary[23] = -3; arx[24] = 0; ary[24] = -3; arx[25] = 1; ary[25] = -3; arx[26] = 2; ary[26] = -3; arx[27] = -1; ary[27] = -4; arx[28] = 0; ary[28] = -4; arx[29] = 1; ary[29] = -4; arx[30] = 0; ary[30] = -5; ary[40] = 0; arx[40] = 1; ary[41] = 0; arx[41] = 2; ary[42] = -2; arx[42] = 3; ary[43] = -1; arx[43] = 3; ary[44] = 0; arx[44] = 3; ary[45] = 1; arx[45] = 3; ary[46] = 2; arx[46] = 3; ary[47] = -1; arx[47] = 4; ary[48] = 0; arx[48] = 4; ary[49] = 1; arx[49] = 4; ary[50] = 0; arx[50] = 5; ary[60] = 0; arx[60] = -1; ary[61] = 0; arx[61] = -2; ary[62] = -2; arx[62] = -3; ary[63] = -1; arx[63] = -3; ary[64] = 0; arx[64] = -3; ary[65] = 1; arx[65] = -3; ary[66] = 2; arx[66] = -3; ary[67] = -1; arx[67] = -4; ary[68] = 0; arx[68] = -4; ary[69] = 1; arx[69] = -4; ary[70] = 0; arx[70] = -5; wlb[0] = -6; wlb[1] = -5; wlb[2] = -4; wlb[3] = -3; wlb[4] = -2; wlb[5] = -1; wlb[6] = 6; wlb[7] = 5; wlb[8] = 4; wlb[9] = 3; wlb[10] = 2; wlb[11] = 1; dtx[0] = -2; dty[0] = -2; dtx[1] = -2; dty[1] = -1; dtx[2] = -2; dty[2] = 0; dtx[3] = -2; dty[3] = 1; dtx[4] = -2; dty[4] = 2; dtx[5] = -1; dty[5] = 2; dtx[6] = 0; dty[6] = 2; dtx[7] = 1; dty[7] = 2; dtx[8] = 2; dty[8] = 2; dtx[9] = 2; dty[9] = 1; dtx[10] = 2; dty[10] = 0; dtx[11] = 2; dty[11] = -1; dtx[12] = 2; dty[12] = -2; dtx[13] = -2; dty[13] = 1; dtx[14] = -2; dty[14] = 0; dtx[15] = -2; dty[15] = -1; beaconval [0][0] = 40; beaconval [0][1] = 35; beaconval [0][2] = 26; beaconval [0][3] = 27; beaconval [0][4] = 23; beaconval [1][0] = 30; beaconval [1][1] = 35; beaconval [1][2] = 22; beaconval [1][3] = 27; beaconval [1][4] = 26; beaconval [2][0] = 15; beaconval [2][1] = 13; beaconval [2][2] = 7; beaconval [2][3] = 9; beaconval [2][4] = 8; mapcolor[1] = 24; mapcolor[2] = 197; mapcolor[3] = 48; mapcolor[4] = 222; mapcolor[5] = 15; return; }
[ "noreply@github.com" ]
noreply@github.com
9035cbe1efd42d129d3031efc2c8142d1fd43ab1
be6a9b37553a85b9a0395c3cae1a04d5f70b180a
/12527 Different Digits.cpp
052ed99384994a230a56daf0847c6e58503e5c9d
[]
no_license
opi919/Uva-Online-Judge
3a903ed31f8020e8c5167b6190cb82ce6333382f
d9497a34e1297aded2cecb2f182b6ec95ae0b5a9
refs/heads/main
2023-01-23T04:52:24.537931
2020-11-24T07:55:07
2020-11-24T07:55:07
315,557,627
0
0
null
null
null
null
UTF-8
C++
false
false
958
cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int nore[5050]={0}; void norepeat() { int i,j,k,l,s,m; for(int i=1;i<=5000;i++) { j=i;s=0;l=0;m=0; int check[10]={0}; while(1) { k=j%10; j=j/10; s++; if(check[k]==0) { check[k]=1; l++; } else { m=1; break; } if(j==0) break; } if(m==1) nore[i]=nore[i-1]; else { if(l==s) { nore[i]=nore[i-1]+1; } else nore[i]=nore[i-1]; } } } int main() { norepeat(); int i,j,k,l,n,m,s; // for(i=0;i<100;i++) // cout<<nore[i]<<" "; while(cin>>n>>m) { cout<<nore[m]-nore[n-1]<<endl; } return 0; }
[ "noreply@github.com" ]
noreply@github.com
80fe4ac39c7dde41b902c5efebf5e90c30d834c9
5a6f24ac87834c179a8ab4e40615fbe5a67f71f7
/RCIR_UAV_NEW/Onboard-SDK-ROS/dji_sdk_demo/include/mymission/auto_landing_task.h
b18e3a1411680b9afab6ab8247fd33bd7db75e3c
[ "MIT" ]
permissive
NPU-RCIR/RCIR_UAV_NEW
7bc45388d29bdc739a2affeca2f7d4f43b972a2c
07202c80e42fbe02f7adfd22f03cdd6f0459aef8
refs/heads/master
2022-11-26T04:36:06.723513
2020-07-30T07:09:38
2020-07-30T07:09:38
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,094
h
#include "mymission/Mission.h" #include <message_filters/subscriber.h> #include <message_filters/synchronizer.h> #include <message_filters/sync_policies/approximate_time.h> #include <message_filters/time_synchronizer.h> #include <iostream> #include <fstream> #include <string> #include <opencv2/highgui.hpp> #include <opencv2/videoio.hpp> #include <opencv2/opencv.hpp> #include <opencv2/core.hpp> #include <cv_bridge/cv_bridge.h> #include <cam/vision_msg.h> #include "config.h" #define C_EARTH (double)6378137.0 #define C_PI (double)3.141592653589793 #define DEG2RAD(DEG) ((DEG) * ((C_PI) / (180.0))) /*! * @brief a bare bone state machine to track the stage of the mission */ // global variables for subscribed topics int vs_info_counter = 0; std_msgs::Float32MultiArray vs_data_x; std_msgs::Float32MultiArray vs_data_y; std_msgs::Float32MultiArray vs_data_yaw; geometry_msgs::Point current_local_pos; Mission square_mission; Control_law con_law_vision, con_law_yaw; cam::vision_msg Land_Info = cam::vision_msg(); bool isgetdata = false; std::ofstream location_out; std::string ss; //control task param ros::Time time_s; double time_now, visionok_time, land_time; float control_height; double start_yaw; param vision_task_param = param(); void display_mode_callback(const std_msgs::UInt8::ConstPtr& msg); void flight_status_callback(const std_msgs::UInt8::ConstPtr& msg); void gps_callback(const sensor_msgs::NavSatFix::ConstPtr& msg); void attitude_callback(const geometry_msgs::QuaternionStamped::ConstPtr& msg); void local_position_callback(const geometry_msgs::PointStamped::ConstPtr& msg); void mission_control_callback(const std_msgs::Float32MultiArray::ConstPtr &missioninfo, const std_msgs::Float32MultiArray::ConstPtr &attitudeinfo); void getvisiontarget(std_msgs::Float32MultiArray Array[100][3]); void frametrans(geometry_msgs::Quaternion atti, std_msgs::Float32MultiArray Array[3]); void land_info_callback(const cam::vision_msgConstPtr& land_info); void vision_navigation(); float sum_vision(std_msgs::Float32MultiArray data); bool is_get_data(); bool correct_ok();
[ "1462452788@qq.com" ]
1462452788@qq.com
05a3794ce91e1b4d3a75b0046ca8c4815c41a5e6
0fc87c143bf53a034c6047724576959757ee45f3
/Some Other Interestings/Week6_Task2/Week6_Task2.cpp
b7c6a3acab435e03f573c257a70d9b10a96b9197
[]
no_license
ivanalexeenko/C-Plus-Plus-Start
0cb43bf23a503500516669deb6b3a32555983f88
46d8cda23790a789aea2229497daf09cc8240c54
refs/heads/master
2021-01-20T07:35:58.528402
2017-09-30T12:15:39
2017-09-30T12:15:39
101,546,399
0
0
null
null
null
null
UTF-8
C++
false
false
2,795
cpp
#include "stdafx.h" #include <iostream> #include<cmath> using namespace std; int InputArray(int *A, int n) { for (int i = 0; i < n; i++) { cin >> A[i]; } return A[0]; } int OutputArray(int*A, int n) { for (int i = 0; i < n; i++) cout<< A[i] << "\t"; return A[0]; } int InputMatrix(int **A, int str,int stlb) { cout << "Input matrix" << endl; for (int i = 0; i < str; i++) { for (int j = 0; j < stlb; j++) cin >> A[i][j]; } return A[0][0]; } int OutputMatrix(int**A, int str,int stlb) { cout << "Matrix" << endl; for (int i = 0; i<str; i++) { for (int j = 0; j<stlb; j++) cout << A[i][j] << "\t"; cout << endl; } return A[0][0]; } int DeleteStr(int**A, int str, int stlb, int l) { if (l<1 || l>str) cout << "Wrong input " << endl; else { cout << "New matrix without string number " << l << " is :" << endl; for (int i = 0; i < l - 1; i++) { for (int j = 0; j < stlb; j++) cout << A[i][j] << "\t"; cout << endl; } for (int i = l; i < str; i++) { for (int j = 0; j < stlb; j++) cout << A[i][j] << "\t"; cout << endl; } return l; } } int InsertStr(int**A, int*B, int str, int stlb, int m ) { if (m == 0) { for (int i = 0; i < stlb; i++) cout << B[i] << "\t"; cout << "Matrix" << endl; for (int i = 0; i<str; i++) { for (int j = 0; j<stlb; j++) cout << A[i][j] << "\t"; cout << endl; } } else if (m == str + 1) { cout << "Matrix" << endl; for (int i = 0; i<str; i++) { for (int j = 0; j<stlb; j++) cout << A[i][j] << "\t"; cout << endl; } for (int i = 0; i < stlb; i++) cout << B[i] << "\t"; } else if (m != str + 1 || m != 0) { for (int i = 0; i < m - 1; i++) { for (int j = 0; j < stlb; j++) cout << A[i][j] << "\t"; cout << endl; } for (int i = 0; i < stlb; i++) { cout<< B[i]<<"\t"; } cout << endl; for (int i = m - 1; i < str; i++) { for (int j = 0; j < stlb; j++) cout << A[i][j] << "\t"; cout << endl; } } return m; } int main() { int str,stlb; cout << "Set a size of matrix :" << endl; cin >> str >> stlb; int**A = new int *[str]; for (int i = 0; i < str; i++) A[i] = new int[stlb]; InputMatrix(A, str, stlb); system("cls"); OutputMatrix(A, str, stlb); cout << endl; int choice; cout << "Choose an option,bro: " << endl; cout << "1. Add new string " << endl; cout << "2. Delete one string " << endl; cin >> choice; switch(choice){ case 1: { cout << endl; int m; cout << "Our string should be inserted as : "; cin >> m; int*B = new int[stlb]; cout << "Input a new string to be inserted:" << endl; InputArray(B, stlb); InsertStr(A, B, str, stlb, m); break; } case 2: { int l; cout << "Choose a string to delete: "; cin >> l; DeleteStr(A, str, stlb, l); break; } } return 0; }
[ "think8about23it@gmail.com" ]
think8about23it@gmail.com
173d84cb5b1975f0a2f24f33366246d1b0da351a
c9e61524cb9496cca51ddca1b56af1a221cbff55
/src/latFit/latNum.cc
26b7c0b5364488d6b2ec1e79f51a7adb5f8e2ac3
[ "MIT" ]
permissive
csi-greifflab/Absolut
d46dbe93dd3ea64e416c5797a27845719f0e791e
0f672a19c9fdec561e4d6d2470471ea016f949ad
refs/heads/main
2023-05-25T14:24:59.429104
2023-05-16T05:13:18
2023-05-16T05:13:18
301,980,293
66
20
null
2023-03-09T15:03:28
2020-10-07T08:59:39
Jupyter Notebook
UTF-8
C++
false
false
9,231
cc
#include <iostream> #include <iomanip> #include <algorithm> #include <biu/OptionParser.hh> #include <biu/LatticeDescriptorSQR.hh> #include <biu/LatticeDescriptorCUB.hh> #include <biu/LatticeDescriptorFCC.hh> #include <biu/LatticeDescriptorCKW.hh> #include <biu/LatticeModel.hh> #include <biu/LatticeProteinUtil.hh> #include "version.hh" /*! * Allows for the enumeration of all lattice protein structures. * * Done via an exhaustive enumeration of all possible absolute move strings. * Each is checked if self-avoiding. Symmetric structures are identified by * the comparison of the move string to its normalized version: only if equal * the move string is non-symmetric and thus reported. * * @author (c) 2010 Martin Mann http://www.bioinf.uni-freiburg.de/~mmann/ * */ enum OUTMODE { OUT_SILENT, OUT_NORMAL, OUT_VERBOSE }; size_t extendAndCheck_BM( const size_t curPos , biu::IPointVec & P , biu::MoveSequence & M , const biu::LatticeDescriptor& latDescr , OUTMODE outMode ) { // recursion abortion if (curPos == P.size()) { // check if M equals its normalization, i.e. is a non-symmetric structure if ( std::equal( M.begin(), M.end(), latDescr.normalizeSequence( M ).begin()) ) { if (outMode != OUT_SILENT) { std::cout <<latDescr.getString( M ) <<"\n"; } return 1; } else { return 0; } } // neighborhood access const biu::LatticeNeighborhood & neigh = latDescr.getNeighborhood(); // special handling of first if (curPos == 1) { // use first neighboring vector P[curPos] = P[curPos-1] + (neigh.getElementByIndex(0)); M[curPos-1] = neigh.getElementByIndex(0).getMove(); return extendAndCheck_BM( curPos + 1, P, M, latDescr, outMode ); } else { size_t structureNumber = 0; for (biu::LatticeNeighborhood::const_iterator n = neigh.begin(); n != neigh.end(); n++) { // update position information P[curPos] = P[curPos-1] + (*n); // check if selfavoiding bool isSelfAvoiding = true; for (size_t i = curPos-1; isSelfAvoiding && i > 0; i--) { isSelfAvoiding = (P[curPos] != P[i-1]); } if (isSelfAvoiding) { // recursive call if selfavoiding M[curPos-1] = n->getMove(); structureNumber += extendAndCheck_BM( curPos + 1, P, M, latDescr, outMode ); } } return structureNumber; } } size_t extendAndCheck_SC( const size_t curPos , biu::IPointVec & P , biu::MoveSequence & M , const biu::LatticeDescriptor& latDescr , OUTMODE outMode ) { // recursion abortion if (curPos == P.size()) { // check if M equals its normalization, i.e. is a non-symmetric structure if ( M == latDescr.normalizeSequence( M ) ) { if (outMode != OUT_SILENT) { std::cout <<latDescr.getString( M ) <<"\n"; } return 1; } else { return 0; } } // neighborhood access const biu::LatticeNeighborhood & neigh = latDescr.getNeighborhood(); // special handling of first if (curPos == 1) { // use first neighboring vector P[curPos] = P[curPos-1] + (neigh.getElementByIndex(0)); M[curPos-1] = neigh.getElementByIndex(0).getMove(); return extendAndCheck_SC( curPos + 1, P, M, latDescr, outMode ); } else { size_t structureNumber = 0; const size_t lastPos = (curPos%2 == 0) ? curPos-2 : curPos-1; for (biu::LatticeNeighborhood::const_iterator n = neigh.begin(); n != neigh.end(); n++) { // update position information P[curPos] = P[lastPos] + (*n); // check if selfavoiding bool isSelfAvoiding = true; for (size_t i = curPos; isSelfAvoiding && i > 0; i--) { isSelfAvoiding = (P[curPos] != P[i-1]); } if (isSelfAvoiding) { // recursive call if selfavoiding M[curPos-1] = n->getMove(); structureNumber += extendAndCheck_SC( curPos + 1, P, M, latDescr, outMode ); } } return structureNumber; } } ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // DEFINITIONS ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// /*! The parameter setup for this tools. * * @param allowedArgs the provided parameters to fill * @param infoText the additional information text to setup */ void initAllowedArguments(biu::OptionMap & allowedArgs, std::string &infoText ); ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // IMPLEMENTATIONS ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// int main( int argc, char** argv ) { ////////////////////////////////////////////////////////////// // parameter parsing and checking ////////////////////////////////////////////////////////////// biu::OptionMap allowedArgs; std::string infoText; initAllowedArguments(allowedArgs,infoText); // init // parse programm arguments biu::COptionParser opts = biu::COptionParser( allowedArgs, argc, argv, infoText); // check if arguments parseable and all mandatory arguments given if (!opts.noErrors()) { return -1; } // help output if (opts.getBoolVal("help")) { opts.coutUsage(); return 0; } // version information requested if (opts.getBoolVal("version")) { giveVersion(); return 0; } ////////////////////////////////////////////////////////////////////// // setup parameters etc. ////////////////////////////////////////////////////////////////////// OUTMODE outMode = OUT_NORMAL; // if (opts.argExist("s") && opts.argExist("v")) { // std::cerr <<"\n ERROR : cannot be silent and verbose at the same time!\n"; // return -1; // } if (opts.argExist("s")) { outMode = OUT_SILENT; } // if (opts.argExist("v")){ // outMode = OUT_VERBOSE; // } biu::LatticeDescriptor* latDescr = NULL; std::string latStr = opts.getStrVal("lat"); if (latStr.compare("SQR") == 0) latDescr = new biu::LatticeDescriptorSQR(); else if (latStr.compare("CUB") == 0) latDescr = new biu::LatticeDescriptorCUB(); else if (latStr.compare("FCC") == 0) latDescr = new biu::LatticeDescriptorFCC(); else if (latStr.compare("210") == 0) latDescr = new biu::LatticeDescriptorCKW(); else { std::cerr <<"\n ERROR : Unknown lattice type '"+latStr+"'\n\n"; return -1; } // create lattice biu::LatticeModel lattice(latDescr); // check if side chain structure const bool sidechain = opts.argExist("sideChain"); // get and convert structures if (opts.getIntVal("len") < 2) { std::cerr <<"\n ERROR : structure length has to be >= 2\n\n"; return -1; } const size_t length = (size_t)opts.getIntVal("len"); ////////////////////////////////////////////////////////////////////// // setup data structures ////////////////////////////////////////////////////////////////////// // generate points vector to fill biu::IPointVec P( sidechain ? (2*length) : length ); biu::MoveSequence M( sidechain ? ((2*length)-1) : (length-1) ); ////////////////////////////////////////////////////////////////////// // run enumeration ////////////////////////////////////////////////////////////////////// P[0] = biu::IntPoint(0,0,0); size_t structureNumber = 0; if (sidechain) { // sidechain models structureNumber = extendAndCheck_SC( 1, P, M, *latDescr, outMode ); } else { // backbone-only models structureNumber = extendAndCheck_BM( 1, P, M, *latDescr, outMode ); } if (outMode != OUT_SILENT) { std::cout <<"\n number of structures of length " <<length <<" = "; } std::cout <<structureNumber <<std::endl; ////////////////////////////////////////////////////////////////////// // clear data structures ////////////////////////////////////////////////////////////////////// delete latDescr; return 0; } void initAllowedArguments(biu::OptionMap & allowedArgs, std::string &infoText ) { allowedArgs.push_back(biu::COption( "len", false, biu::COption::INT, "the length of the structures to enumerate")); allowedArgs.push_back(biu::COption( "lat", false, biu::COption::STRING, "lattice of the structures : SQR - 2D square, CUB - 3D cubic, FCC - 3D face-centered-cubic, 210 - 3D chess knights walk)")); allowedArgs.push_back(biu::COption( "sideChain", true, biu::COption::BOOL, "use when given structures are side chain structures")); allowedArgs.push_back(biu::COption( "s", true, biu::COption::BOOL, "silent : no output except results")); allowedArgs.push_back(biu::COption( "help", true, biu::COption::BOOL, "program parameters and help")); allowedArgs.push_back(biu::COption( "version", true, biu::COption::BOOL, "version information of this program")); infoText = std::string( "LatNum allows for the enumeration of all lattice protein structures of a given length."); } // initArguments //////////////////////////////////////////////////////////////////////////
[ "pprobert@uio.no" ]
pprobert@uio.no
141e441074afb780f499b9b00169fd6ee2c936d7
0f8e4dc7773bf82e6c4c863b96d13b4919a2634f
/src/AthleteRecord.h
f0752cc6b588aef6d90707d1cbedc1cc24c88590
[]
no_license
jasjeetIM/OlympicMedalistSearch
17ce8bdf670e4d0b616f83302904a99c9f464b30
a4af4dc46e29eb7281bc52507110a7655f855d13
refs/heads/master
2016-09-15T15:16:58.602529
2015-08-05T19:19:04
2015-08-05T19:19:04
40,149,896
0
0
null
null
null
null
UTF-8
C++
false
false
2,153
h
#ifndef _AthleteRecord_H_ #define _AthleteRecord_H_ #include "BinarySearchTree.h" #include "HeapMostSearch.h" #include "Athlete.h" #include "HashedTable.h" #include "BinaryTree.h" class AthleteRecord { private: int count; BinarySearchTree<Athlete*> item; Athlete indentedTree; HashedTable *hashPtr; HeapMostSearch<Athlete*> heapSearch; int backupCount; BinarySearchTree<Athlete*> backupItem; HashedTable * backupHashPtr; HeapMostSearch<Athlete*> backupHeapSearch; public: static Athlete * copyValue(Athlete * copyItem); AthleteRecord(); ~AthleteRecord() { delete hashPtr; delete backupHashPtr; } static void printFull(Athlete* & sample) { sample->printAll(); cout << endl; } static void print(Athlete * & sample) { sample->printKey(); } static void visit(Athlete* ptr) { cout << ptr->getName() << endl; } static void copy(Athlete*ptr, HashedTable* hashPtr); void add(string input, string age, string country, string year); // Adds into BST and HashedTable void deleteData(string input); // Delete function bool search(string input); // Search function (HashedTable) void hashList() const { hashPtr->display(visit); cout << endl; } // Displays the HashedTable void bstKey() const { item.inOrder(print); cout << endl; } // Prints out the BST data in order void breadthSave() const { item.breadthTraversal(printFull); cout << "The data has been outputted using breadth first traversal of the BST. :) " << endl; } void postOrder() const { item.postOrderPrint(print); cout << endl; } // print out indented tree void preOrder() const { item.preOrderPrint(print); cout << endl; } void inOrder() const { item.inOrderPrint(print); cout << endl; } void hashStats() const { hashPtr->displayStats(); cout << endl; } // Prints out the Hash Statistics void compare(); // Compare function void mostSearched(int num); // HONORS: Shows the most searched for items //void printTree() { int width = 0; item.RNLOrder(width); } // Prints out the indented tree Athlete& getAth() { return indentedTree; } BinarySearchTree<Athlete *> getTree() { return item; } }; #endif _AthleteRecord_H_
[ "jasjeetim@gmail.com" ]
jasjeetim@gmail.com
2c52664f70d8f848822dcf6423963510ea25d0f3
cfeac52f970e8901871bd02d9acb7de66b9fb6b4
/generated/src/aws-cpp-sdk-databrew/source/GlueDataBrewErrorMarshaller.cpp
97d5bf95de871dcb50367be99c6d01a2e54823dc
[ "Apache-2.0", "MIT", "JSON" ]
permissive
aws/aws-sdk-cpp
aff116ddf9ca2b41e45c47dba1c2b7754935c585
9a7606a6c98e13c759032c2e920c7c64a6a35264
refs/heads/main
2023-08-25T11:16:55.982089
2023-08-24T18:14:53
2023-08-24T18:14:53
35,440,404
1,681
1,133
Apache-2.0
2023-09-12T15:59:33
2015-05-11T17:57:32
null
UTF-8
C++
false
false
641
cpp
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/core/client/AWSError.h> #include <aws/databrew/GlueDataBrewErrorMarshaller.h> #include <aws/databrew/GlueDataBrewErrors.h> using namespace Aws::Client; using namespace Aws::GlueDataBrew; AWSError<CoreErrors> GlueDataBrewErrorMarshaller::FindErrorByName(const char* errorName) const { AWSError<CoreErrors> error = GlueDataBrewErrorMapper::GetErrorForName(errorName); if(error.GetErrorType() != CoreErrors::UNKNOWN) { return error; } return AWSErrorMarshaller::FindErrorByName(errorName); }
[ "sdavtaker@users.noreply.github.com" ]
sdavtaker@users.noreply.github.com
93673795ab68edc312614c5ee54d6849a031e544
7d349fac414430b60a8acf28d4807fc78c56e5fe
/TLX/Kelas Pembelajaran Pemrograman/Pemrograman Dasar/15 Rekursi Lanjut/Permutasi Zig-Zag.cpp
d51cd52361880b8cb8f561416167ea8a059a4a22
[]
no_license
daspers/CP
945f3eee1066ea59093a06072dddc3a397dd3b1f
6e3f0427d697cb727fe3f55eb5adef5c01998510
refs/heads/master
2022-09-13T03:05:26.465309
2022-08-27T02:20:26
2022-08-27T02:20:26
99,011,358
1
0
null
null
null
null
UTF-8
C++
false
false
697
cpp
#include <iostream> #include <iomanip> using namespace std; int n; int *x; bool y[10]={false}; void per(int a, int b, int c){ if(a>=n){ for(int i=0;i<a;i++) cout<<x[i]; cout<<endl; } else{ for(int i=0;i<n;i++){ if(!y[i+1]){ if(b==0&&c==0){ y[i+1]=true; x[a]=i+1; per(a+1,c,x[a]); y[i+1]=false; } else if(b==0 && i+1!=c){ y[i+1]=true; x[a]=i+1; per(a+1,c,x[a]); y[i+1]=false; } else if((c<b&&i+1>c)||(c>b&&i+1<c)){ y[i+1]=true; x[a]=i+1; per(a+1,c,x[a]); y[i+1]=false; } } } } } int main(){ cin>>n; x= new int[n]; per(0,0,0); return 0; }
[ "noreply@github.com" ]
noreply@github.com
3702bedfcef6b4d4ab645e4ad06dd50eb6d2f9cb
2e7f8237976e765ef6b9aac864e4e1a23b36acb7
/include/script/tokens/L2Token.h
98e7d9c7b75b832fda7b9980231651a07f054821
[]
no_license
kopaka1822/CppScriptEngine
794c4b5e8dfcd2c75997023ebf7b73dbd24db4b2
1073c86e5116c4d3cf244d8cb2ae8563ac674393
refs/heads/master
2021-06-25T03:06:01.671335
2020-11-24T08:39:49
2020-11-24T08:39:49
170,923,776
0
0
null
null
null
null
UTF-8
C++
false
false
225
h
#pragma once #include <string> #include "../ScriptEngine.h" namespace script { class L2Token { public: virtual ~L2Token() = default; virtual ScriptObjectPtr execute(ScriptEngine& engine) const = 0; }; }
[ "felixbruell@live.de" ]
felixbruell@live.de
c500390667675e79208710e8d0f1a2b820236000
12464de017755c15531558ec82bd08c3a62ba3de
/C++/Boost/Include/Boost/log/extra/functions_ts.hpp
83734d0cc49c335811c2bb2897252813f0d9f4e3
[]
no_license
DanielShangHai/RedosMiscellaneousLib
5bb17f865cf7484b3a3d059bdfd02736db336fc7
064b9f1ae370b72cc59212348ffce14e1288e555
refs/heads/master
2021-01-10T17:58:19.230826
2016-12-22T08:53:08
2016-12-22T08:53:08
48,574,365
0
0
null
null
null
null
UTF-8
C++
false
false
6,033
hpp
// functions.hpp // Boost Logging Template library // // Author: John Torjo // // Copyright (C) 2004-2005 John Torjo (john@torjo.com) // Copyright (C) 2004-2005 Caleb Epstein (caleb.epstein@gmail.com) // // Permission to copy, use, sell and distribute this software is granted // provided this copyright notice appears in all copies. // Permission to modify the code and to distribute modified code is granted // provided this copyright notice appears in all copies, and a notice // that the code was modified is included with the copyright notice. // // This software is provided "as is" without express or implied warranty, // and with no claim as to its suitability for any purpose. // See http://www.boost.org for updates, documentation, and revision history. /* Helper Logging functions Note: including this file brings a boost_thread dependency */ #ifndef JT_BOOST_FUNCTIONS_TS_HPP #define JT_BOOST_FUNCTIONS_TS_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include <sstream> #include <boost/shared_ptr.hpp> #include <boost/function.hpp> #include <boost/log/log_impl.hpp> #if defined(BOOST_HAS_THREADS) #include <boost/thread/thread.hpp> #include <boost/bind.hpp> #ifndef BOOST_LOG_WIN32 // for do_sleep #include <boost/thread/xtime.hpp> #endif namespace boost { namespace logging { /////////////////////////////////////////////////////////////////////////////////////////////////////// // Log functions (thread-safe) /* Thread-safe appender Caches all messages written to it, and writes them, once at X milliseconds ON A DEDICATED THREAD. (writes them = calls the functor you passed at constructor with the cached messages that have been concatenated) If you want to forward to multiple appenders you can use an appender_array as the underlying appender. Note: normally, the first parameter passed to the appender function is the log's name. In our case, when we cache multiple messages, it would be way too complex to remember the log name for each message (in order to forward them, to the underlying appender). In this implementation, we will always pass an empty string ("") as the first argument to the underlying appender. */ struct BOOST_LOG_DECL ts_appender { ts_appender( appender_func func, int sleep_ms = 100) : m_info(new info) { m_info->func = func; m_info->sleep_ms = sleep_ms; } ~ts_appender() { if ( !m_info.unique() ) return; // we'll terminate the thread only when we're the only thread left // note: even if we're the only object left, we still need to use locks // there could be another thread: the log_thread; so we still need to be thread-safe int sleep_ms; { logging_types::lock lk( m_info->cs); if ( m_info->h_log == 0) return; /* this thread was not even started... */ sleep_ms = m_info->sleep_ms; m_info->terminated = true; } // FIXME in the future, when thread library settles down, I could use conditions // wait for other thread to exit - note: join() might be too much. It could end up waiting forever... do_sleep( (int)(m_info->sleep_ms * 1.5) ); // m_info->h_log->join (); } void operator()( const logging_types::string &, const logging_types::string & msg) { bool create_now = false; // FIXME maybe I can create the thread in the constructor? { logging_types::lock lk( m_info->cs); m_info->str += msg; if ( m_info->h_log == 0) create_now = true; } if (create_now) create_thread(); } private: struct info { info() : terminated(false), sleep_ms(0), h_log(0) { } logging_types::mutex cs; appender_func func; bool terminated; logging_types::string str; int sleep_ms; // FIXME leak - use boost::shared_ptr!!!! boost::thread * h_log; }; static void log_thread(info * self) { logging_types::string msg; bool terminated = false; int sleep_ms; while ( !terminated) { { logging_types::lock lk( self->cs); msg = self->str; self->str.erase(); sleep_ms = self->sleep_ms; } if ( !msg.empty() ) try { self->func(logging_types::string(), msg); } catch (...) {} { logging_types::lock lk( self->cs); terminated = self->terminated; } if ( !terminated) do_sleep( sleep_ms); } } static void do_sleep(int ms) { #ifdef BOOST_LOG_WIN32 ::Sleep(ms); #else using namespace boost; xtime next; xtime_get(&next, TIME_UTC); next.sec += ms / 1000; next.nsec += (ms % 1000) * 1000; thread::sleep(next); #endif } void create_thread() { { logging_types::lock lk( m_info->cs); if ( m_info->h_log != 0) return; // already created using namespace boost; m_info->h_log = new thread( bind( ts_appender::log_thread,m_info.get()) ); } // make sure the thread gets created and gets a chance to access the info do_sleep(100); } private: // every data should be shared. The log_thread needs all this info. // // log_thread should not get a reference to this, because objects of type 'ts_appender' could get moved around. // // For example, every time you add a Log Func (add_appender_func), the log functions might get rearranged, // thus existing 'ts_appender' objects could get moved around, so a 'this' pointer could later become invalid! // boost::shared_ptr<info> m_info; }; }} #endif // BOOST_HAS_THREADS #endif
[ "Dier.Song@videojet.com" ]
Dier.Song@videojet.com
998e31632fe285872acca0e36369fca555f0b4d2
cfbd17e5901975744a28e46c34df2f123431187d
/string_binary_decimal.cpp
e518705169863a0a2a5e61a4c35c67f66b811f76
[]
no_license
Kamrul-Hasan-1971/String
18dde3365d902f3e0a5304e35c1bfcca3bc05baa
0021541b8aa10cb205c23dcb319c704560850370
refs/heads/master
2023-08-27T12:53:47.431018
2021-11-08T05:09:29
2021-11-08T05:09:29
192,223,764
0
0
null
null
null
null
UTF-8
C++
false
false
1,985
cpp
string multiply(string num1, string num2) { ll n1 = num1.size(); ll n2 = num2.size(); if (n1 == 0 || n2 == 0) return "0"; vector<ll> result(n1 + n2, 0); ll i_n1 = 0; ll i_n2 = 0; for (ll i=n1-1; i>=0; i--) { ll carry = 0; ll n1 = num1[i] - '0'; i_n2 = 0; for (ll j=n2-1; j>=0; j--) { ll n2 = num2[j] - '0'; ll sum = n1*n2 + result[i_n1 + i_n2] + carry; carry = sum/10; result[i_n1 + i_n2] = sum % 10; i_n2++; } if (carry > 0) result[i_n1 + i_n2] += carry; i_n1++; } ll i = result.size() - 1; while (i>=0 && result[i] == 0) i--; if (i == -1) return "0"; string s = ""; while (i >= 0){ char pp = result[i--] +'0'; s += pp; } return s; } string summation(string str1, string str2) { if (str1.length() > str2.length()) swap(str1, str2); string str = ""; ll n1 = str1.length(), n2 = str2.length(); reverse(str1.begin(), str1.end()); reverse(str2.begin(), str2.end()); ll carry = 0; for (ll i=0; i<n1; i++) { ll sum = ((str1[i]-'0')+(str2[i]-'0')+carry); str.push_back(sum%10 + '0'); carry = sum/10; } for (ll i=n1; i<n2; i++) { ll sum = ((str2[i]-'0')+carry); str.push_back(sum%10 + '0'); carry = sum/10; } if (carry) str.push_back(carry+'0'); reverse(str.begin(), str.end()); return str; } string binaryToDecimal(string n) { string num = n; string dec_value = "0"; string base = "1"; ull len = (ull)num.length(); for (ll i = len - 1; i >= 0; i--) { if (num[i] == '1') dec_value=summation(dec_value, base); base = multiply(base , "2"); } return dec_value; }
[ "noreply@github.com" ]
noreply@github.com
a61e622b90a3b2ad12570d88ff515e79c08846cf
66e947762ec5c04f6dd88e027a3f8e80e0eda684
/unscented-kalman-filter-master/unscented-kalman-filter-master/src/tools.h
194868a99dab1054044fc3b95725b48fc8844efc
[ "MIT" ]
permissive
Swaroopainapurapu/sensor_fusion
edb5f49236c2489142ebb580926e55fe45007a52
7d851ca868221fde8c216879ed08e7823c0bad0d
refs/heads/master
2022-10-25T21:54:03.126188
2020-06-11T12:32:35
2020-06-11T12:32:35
271,503,648
0
0
null
null
null
null
UTF-8
C++
false
false
1,383
h
#pragma once #include <vector> #include "Eigen/Dense" #include "render/render.h" #include <pcl/io/pcd_io.h> using Eigen::MatrixXd; using Eigen::VectorXd; using namespace std; struct lmarker { double x, y; lmarker(double setX, double setY) : x(setX), y(setY) {} }; struct rmarker { double rho, phi, rho_dot; rmarker(double setRho, double setPhi, double setRhoDot) : rho(setRho), phi(setPhi), rho_dot(setRhoDot) {} }; class Tools { public: /** * Constructor. */ Tools() = default; /** * Destructor. */ virtual ~Tools() = default; // Members std::vector<VectorXd> estimations; std::vector<VectorXd> ground_truth; double noise(double stddev, long long seedNum); lmarker lidarSense(Car& car, pcl::visualization::PCLVisualizer::Ptr& viewer, long long timestamp, bool visualize); rmarker radarSense(Car& car, Car ego, pcl::visualization::PCLVisualizer::Ptr& viewer, long long timestamp, bool visualize); void ukfResults(Car car, pcl::visualization::PCLVisualizer::Ptr& viewer, double time, int steps); /** * A helper method to calculate RMSE. */ VectorXd CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth); void savePcd(typename pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, std::string file); pcl::PointCloud<pcl::PointXYZ>::Ptr loadPcd(std::string file); };
[ "noreply@github.com" ]
noreply@github.com
19bb0f4030e6ffc40dd2048e34038bcb4d8da344
2d361696ad060b82065ee116685aa4bb93d0b701
/src/corelib/syslog.cpp
e48c030d625b790cd9f6a994825798616355587d
[ "LicenseRef-scancode-public-domain" ]
permissive
AaronNGray/GenomeWorkbench
5151714257ce73bdfb57aec47ea3c02f941602e0
7156b83ec589e0de8f7b0a85699d2a657f3e1c47
refs/heads/master
2022-11-16T12:45:40.377330
2020-07-10T00:54:19
2020-07-10T00:54:19
278,501,064
1
1
null
null
null
null
UTF-8
C++
false
false
8,647
cpp
/* $Id: syslog.cpp 591546 2019-08-16 16:59:06Z vasilche $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Author: Aaron Ucko * * File Description: * Portable system-logging API. * * =========================================================================== */ #include <ncbi_pch.hpp> #include <corelib/syslog.hpp> #include <corelib/ncbiapp_api.hpp> #include <corelib/ncbireg.hpp> #include <corelib/error_codes.hpp> #ifdef NCBI_OS_UNIX # include <syslog.h> # ifndef LOG_MAKEPRI # define LOG_MAKEPRI(facility, priority) ((facility) | (priority)) # endif #endif #define NCBI_USE_ERRCODE_X Corelib_Diag BEGIN_NCBI_SCOPE DEFINE_CLASS_STATIC_MUTEX(CSysLog::sm_Mutex); CSysLog* CSysLog::sm_Current = NULL; const char* CSysLog::kLogName_Syslog = "SYSLOG"; CSysLog::CSysLog(const string& ident, TFlags flags, EFacility default_facility) : m_Ident(ident), m_Flags(flags), m_DefaultFacility((default_facility == eDefaultFacility) ? 0 : x_TranslateFacility(default_facility)) { #ifndef NCBI_OS_UNIX NCBI_THROW(CCoreException, eInvalidArg, "CSysLog not implemented for this platform"); #endif if (flags & fConnectNow) { CMutexGuard GUARD(sm_Mutex); x_Connect(); } } CSysLog::CSysLog(const string& ident, TFlags flags, int default_facility) : m_Ident(ident), m_Flags(flags), m_DefaultFacility(default_facility) { #ifndef NCBI_OS_UNIX NCBI_THROW(CCoreException, eInvalidArg, "CSysLog not implemented for this platform"); #endif if (flags & fConnectNow) { CMutexGuard GUARD(sm_Mutex); x_Connect(); } } CSysLog::~CSysLog() { CMutexGuard GUARD(sm_Mutex); if (sm_Current == this) { #ifdef NCBI_OS_UNIX closelog(); #endif sm_Current = NULL; } } void CSysLog::Post(const SDiagMessage& mess) { string message_str; mess.Write(message_str, SDiagMessage::fNoEndl); EPriority priority; switch (mess.m_Severity) { case eDiag_Info: priority = eInfo; break; case eDiag_Warning: priority = eWarning; break; case eDiag_Error: priority = eError; break; case eDiag_Critical: priority = eCritical; break; case eDiag_Fatal: priority = eAlert; break; case eDiag_Trace: priority = eDebug; break; default: priority = eNotice; break; } Post(message_str, priority); } void CSysLog::Post(const string& message, EPriority priority, EFacility facility) { Post(message, priority, x_TranslateFacility(facility)); } void CSysLog::Post(const string& message, EPriority priority, int facility) { #ifdef NCBI_OS_UNIX CMutexGuard GUARD(sm_Mutex); if (sm_Current != this && !(m_Flags & fNoOverride)) { x_Connect(); } # ifndef LOG_PID if (m_Flags & fIncludePID) { syslog(LOG_MAKEPRI(facility, priority), "[%d] %s", getpid(), message.c_str()); } else # endif { syslog(LOG_MAKEPRI(facility, priority), "%s", message.c_str()); } # ifndef LOG_PERROR // crudely implement it ourselves... if (m_Flags & fCopyToStderr) { clog << message << endl; } # endif #else clog << message << endl; #endif } int CSysLog::x_TranslateFlags(TFlags flags) { if (flags & fNoOverride) { #ifdef _DEBUG if (flags != fNoOverride) { ERR_POST_X(15, Warning << "CSysLog::x_TranslateFlags:" " fNoOverride is incompatible with other flags."); } #endif return 0; } int result = 0; #ifdef _DEBUG if (flags & ~fAllFlags) { ERR_POST_X(16, Warning << "CSysLog::x_TranslateFlags: ignoring extra flags."); } #endif #ifdef NCBI_OS_UNIX # ifdef LOG_PERROR if (flags & fCopyToStderr) { result |= LOG_PERROR; } # endif # ifdef LOG_CONS if (flags & fFallBackToConsole) { result |= LOG_CONS; } # endif # ifdef LOG_PID if (flags & fIncludePID) { result |= LOG_PID; } # endif # ifdef LOG_NDELAY if (flags & fConnectNow) { result |= LOG_NDELAY; } # elif defined(LOG_ODELAY) if ( !(flags & fConnectNow) ) { result |= LOG_ODELAY; } # endif # ifdef LOG_NOWAIT if (flags & fNoChildWait) { result |= LOG_NOWAIT; } # endif #endif return result; } int CSysLog::x_TranslateFacility(EFacility facility) { switch (facility) { case eDefaultFacility: return m_DefaultFacility; #ifdef NCBI_OS_UNIX case eKernel: return LOG_KERN; case eUser: return LOG_USER; case eMail: return LOG_MAIL; case eDaemon: return LOG_DAEMON; case eAuth: return LOG_AUTH; case eSysLog: return LOG_SYSLOG; case eLPR: return LOG_LPR; case eNews: return LOG_NEWS; case eUUCP: return LOG_UUCP; case eCron: return LOG_CRON; # ifdef LOG_AUTHPRIV case eAuthPriv: return LOG_AUTHPRIV; # else case eAuthPriv: return LOG_AUTH; # endif # ifdef LOG_FTP case eFTP: return LOG_FTP; # endif case eLocal0: return LOG_LOCAL0; case eLocal1: return LOG_LOCAL1; case eLocal2: return LOG_LOCAL2; case eLocal3: return LOG_LOCAL3; case eLocal4: return LOG_LOCAL4; case eLocal5: return LOG_LOCAL5; case eLocal6: return LOG_LOCAL6; case eLocal7: return LOG_LOCAL7; #endif default: return m_DefaultFacility; } } void CSysLog::x_Connect(void) { #ifdef NCBI_OS_UNIX if (m_Flags & fNoOverride) { return; } openlog(m_Ident.empty() ? NULL : m_Ident.c_str(), x_TranslateFlags(m_Flags), m_DefaultFacility); sm_Current = this; #endif } void CSysLog::HonorRegistrySettings(const IRegistry* reg) { if (reg == NULL && CNcbiApplication::Instance()) { reg = &CNcbiApplication::Instance()->GetConfig(); } if (reg == NULL || !(m_Flags & fNoOverride) ) { return; } string fac_name = reg->Get("LOG", "SysLogFacility"); if ( !fac_name.empty() ){ // just check for the few possibilities that make sense EFacility facility = eDefaultFacility; if (fac_name.size() == 6 && NStr::StartsWith(fac_name, "local", NStr::eNocase) && fac_name[5] >= '0' && fac_name[5] <= '7') { facility = static_cast<EFacility>(eLocal0 + fac_name[5] - '0'); } else if (NStr::EqualNocase(fac_name, "user")) { facility = eUser; } else if (NStr::EqualNocase(fac_name, "mail")) { facility = eMail; } else if (NStr::EqualNocase(fac_name, "daemon")) { facility = eDaemon; } else if (NStr::EqualNocase(fac_name, "auth")) { facility = eAuth; } else if (NStr::EqualNocase(fac_name, "authpriv")) { facility = eAuthPriv; } else if (NStr::EqualNocase(fac_name, "ftp")) { facility = eFTP; } if (facility != eDefaultFacility) { CMutexGuard GUARD(sm_Mutex); m_Flags &= ~fNoOverride; m_DefaultFacility = facility; if (sm_Current == this) { // x_Connect(); sm_Current = NULL; } } } } END_NCBI_SCOPE
[ "aaronngray@gmail.com" ]
aaronngray@gmail.com
2bfcbc35ef7188ced892f3de132a42f529c1a78d
cef6aa553e47bc17eb8d88c6afcc47cd71914488
/cardboardXCode/src/ofApp.cpp
f0ddb90b863f9420afcc956652e8e3b27e318558
[]
no_license
sAbhay/XCode-Projects
95085b4cf3f3198c2bb08892d1c9a2a6e58e6dfc
3614f676aca1b13b1f21bb204bae18dfb913327b
refs/heads/master
2020-04-17T21:24:33.585121
2019-01-22T09:46:19
2019-01-22T09:46:19
163,640,802
0
0
null
null
null
null
UTF-8
C++
false
false
5,882
cpp
#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetVerticalSync(true); ofSetFrameRate(60); tracking.setup(); // SensorEvent gyro; // gyro.reading.set(0, 0, 0); // gyro.timestamp = ofGetElapsedTimeMillis(); // gyro.type = GYRO; // tracking.processSensorEvent(gyro); // // // SensorEvent accel; // accel.reading.set(sin(ofGetElapsedTimef()*0.091231), sin(ofGetElapsedTimef()*0.091231), sin(ofGetElapsedTimef()*0.091231)*-9.0); // accel.timestamp = ofGetElapsedTimeMillis(); // accel.type = ACCEL; // tracking.processSensorEvent(accel); // easycam.enableMouseInput(); planet.set(1000, 100); planet.setPosition(0, 0, 0); // ofLog() << "setup" << endl; // easycam.setDistance(20); cam.setPosition(0, 0, 0); easycam.setPosition(0, 0, -100); } //-------------------------------------------------------------- void ofApp::update(){ SensorEvent gyro; float foo = ofSignedNoise(ofGetElapsedTimef(), 0, 0)*9.8; float bar = (9.8-foo)/2.0; gyro.reading.set(foo/9.8,bar/9.8 , bar/9.8); gyro.timestamp = ofGetElapsedTimeMicros(); gyro.type = GYRO; tracking.processSensorEvent(gyro); SensorEvent accel; accel.reading.set(foo, bar , bar); accel.reading.normalize(); accel.reading.scale(9.8); accel.timestamp = ofGetElapsedTimeMicros(); accel.type = ACCEL; tracking.processSensorEvent(accel); // SensorEvent gyro; // gyro.reading.set(abs(ofSignedNoise(sin(ofGetElapsedTimef())))*0.01, abs(ofSignedNoise(sin(ofGetElapsedTimef())))*0.01, abs(ofSignedNoise(sin(ofGetElapsedTimef())))*0.01); // gyro.timestamp = ofGetElapsedTimeMicros(); // gyro.type = GYRO; // tracking.processSensorEvent(gyro); // // // SensorEvent accel; // accel.reading.set(9.8-abs(ofSignedNoise(cos(ofGetElapsedTimef())))*9.8, 9.8-abs(ofSignedNoise(sin(ofGetElapsedTimef())))*9.8, 0.01*abs(ofSignedNoise(sin(ofGetElapsedTimef())))); // accel.timestamp = ofGetElapsedTimeMicros(); // accel.type = ACCEL; // tracking.processSensorEvent(accel); } //-------------------------------------------------------------- void ofApp::draw(){ ofBackground(0, 0, 0); ofDrawBitmapStringHighlight("Rot :"+ofToString(view.getRotate()), 10, 500); ofMatrix4x4 headView; headView = tracking.getLastHeadView(transform.getHeadView()); ofMatrix4x4 translate; translate.makeTranslationMatrix(ofVec3f(0.06, 0, 0)); view.makeIdentityMatrix(); view=headView*translate; transform.setMatrix(view); ofSetColor(255, 0, 255); ofDrawBitmapStringHighlight("HeadView: "+ofToString(transform.getHeadView(), 10), 10, 100); ofDrawBitmapStringHighlight("Gyro :" + ofToString(tracking.mTracker.getLastGyro()), 10, 200); ofDrawBitmapStringHighlight("Accel :"+ofToString(tracking.mTracker.getLastAccel()), 10, 300); node.setTransformMatrix(view); cam.setOrientation(node.getOrientationQuat()); // cam.setOrientation(rot*cam.getOrientationQuat()); ofSetColor(255, 0, 255); ofDrawBitmapStringHighlight("HeadView: "+ofToString(transform.getHeadView(), 10), 10, 100); ofDrawBitmapStringHighlight("Gyro :" + ofToString(tracking.mTracker.getLastGyro()), 10, 200); ofDrawBitmapStringHighlight("Accel :"+ofToString(tracking.mTracker.getLastAccel()), 10, 300); ofDrawBitmapStringHighlight("Rot :"+ofToString(view.getRotate()), 10, 400); ofDrawBitmapStringHighlight("Cardboard Camera", ofGetWidth()-ofGetHeight(), ofGetHeight()/2-20); cam.begin(ofRectangle(ofGetWidth()-ofGetHeight(), ofGetHeight()/2, ofGetHeight()/2, ofGetHeight()/2)); ofSetColor(255, 0, 255); ofPushMatrix(); // ofVec3f axis; // float angle; // rot.getRotate(angle, axis); // ofRotate(angle, axis.x, axis.y, axis.z); planet.drawWireframe(); ofSetColor(255, 255, 0); ofDrawBox(50, 0, 0, 10, 10, 10); ofDrawBox(0, 50, 0, 10, 10, 10); ofDrawBox(0, 0, 50, 10, 10, 10); ofDrawBox(0, 50, 50, 10, 10, 10); ofDrawBox(50, 50, 50, 10, 10, 10); ofDrawBox(-50, 0, 0, 10, 10, 10); ofDrawBox(0, -50, 0, 10, 10, 10); ofDrawBox(0, 0, -50, 10, 10, 10); ofDrawBox(0, -50, -50, 10, 10, 10); ofDrawBox(-50, -50, -50, 10, 10, 10); ofPopMatrix(); cam.end(); ofDrawBitmapStringHighlight("EasyCam View", ofGetWidth()-ofGetHeight()/2, ofGetHeight()/2-20); easycam.lookAt(node); easycam.begin(ofRectangle(ofGetWidth()-ofGetHeight()/2, ofGetHeight()/2, ofGetHeight()/2, ofGetHeight()/2)); node.draw(); easycam.end(); easycam.lookAt(cam); easycam.begin(ofRectangle(ofGetWidth()-ofGetHeight()/2, 0, ofGetHeight()/2, ofGetHeight()/2)); cam.draw(); easycam.end(); } //-------------------------------------------------------------- void ofApp::keyPressed(int key){ } //-------------------------------------------------------------- void ofApp::keyReleased(int key){ } //-------------------------------------------------------------- void ofApp::mouseMoved(int x, int y ){ } //-------------------------------------------------------------- void ofApp::mouseDragged(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mousePressed(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::mouseReleased(int x, int y, int button){ } //-------------------------------------------------------------- void ofApp::windowResized(int w, int h){ } //-------------------------------------------------------------- void ofApp::gotMessage(ofMessage msg){ } //-------------------------------------------------------------- void ofApp::dragEvent(ofDragInfo dragInfo){ }
[ "abhayaaditsinghal@gmail.com" ]
abhayaaditsinghal@gmail.com
cd486cd0cefa0220b12e182499e06a793713c0c8
94723afe6ef15a0eb7798c26117eaf3cbaa857fc
/Montercarlo/montecarlo.cpp
01d0f3a7a4c0ec760ecffa34c33ef3144268919e
[]
no_license
Jose26398/SS_Ejercicios
8bf8b2b993ea7d13060a7f681d9762b895141ae1
9ef87f7f745bc641118cec39c0b41191c8f9f78e
refs/heads/master
2022-03-29T08:06:13.134064
2020-01-20T14:46:45
2020-01-20T14:46:45
232,676,072
0
0
null
null
null
null
UTF-8
C++
false
false
1,764
cpp
#include <cmath> #include <iostream> #include <stdlib.h> using namespace std; int a = 2000, b = 3000, c = 2600; float uniforme(){ float u; u = (float) random(); u = u/(float)(RAND_MAX+1.0); return u; } int generademanda(){ float u, x; u = uniforme(); if (u < (c-a)/(b-a)) x = a+sqrt((b-a)*(c-a)*u); else x = b-sqrt((b-a)*(b-c)*(1-u)); return (int) x; //se convierte a entero porque es la demanda de huevos de pascua } int main(int argc, char* argv[]) { double x = 0.6, // Ganancia por unidad vendida y1 = 0.25, // Pérdida por unidad no vendida con chocolate comprado en agosto y2 = 0.375; // Pérdida por unidad no vendida con chocolate comprado en diciembre int veces = 10000; int demanda, ganancia, s_maxima; double ganancia_maxima = 0; srand(time(NULL)); //Inicializa el generador de numeros pseudoaleatorios // Ejecutar modelo de Montecarlo for (int s = a; s <= b; s++){ double sum = 0.0, sum2 = 0.0; for (int i = 0; i < veces; i++){ demanda = generademanda(); if (s > demanda) ganancia = demanda*x - s*y1; else ganancia = demanda*x - (s*y1 + (demanda-s)*y2); sum += ganancia; sum2 += ganancia*ganancia; } // Obtener ganancia media y desviacion tipica double ganancia_esperada = sum/veces, desviacion = sqrt((sum2-veces*ganancia_esperada*ganancia_esperada)/(veces - 1)); if (ganancia_esperada > ganancia_maxima){ ganancia_maxima = ganancia_esperada; s_maxima = s; } printf("s: %d, ganancia: %f, desv: %f\n", s, ganancia_esperada, desviacion); } printf("\nValor de x: %f, valor de y1: %f, valor de y2: %f, numero de veces: %d", x, y1, y2, veces); printf("\nValor maximo de ganancia: %f || s --> %d\n", ganancia_maxima, s_maxima); return 0; }
[ "jsg26398@gmail.com" ]
jsg26398@gmail.com
379dd6813041924739d41ab997acc224b5e3cdbb
1a20961af3b03b46c109b09812143a7ef95c6caa
/Book/3dlearn/DirectX/3DGraphicsProgrammingCD/chap07/framebuffer_cubemap/render_data.cpp
34a914b27cf4851f54ec1a2cdc4a98d8dcbe5bef
[]
no_license
JetAr/ZNginx
eff4ae2457b7b28115787d6af7a3098c121e8368
698b40085585d4190cf983f61b803ad23468cdef
refs/heads/master
2021-07-16T13:29:57.438175
2017-10-23T02:05:43
2017-10-23T02:05:43
26,522,265
3
1
null
null
null
null
UTF-8
C++
false
false
1,148
cpp
#include "Vector4.h" #include "render_data.h" #include "gut.h" #include "GutModel.h" // 畫cubemap 6個面時的鏡頭位置跟面向 Vector4 g_vCubemap_Eye(0.0f, 0.0f, 0.0f); Vector4 g_vCubemap_Up[6] = { Vector4(0.0f, 1.0f, 0.0f), // +x Vector4(0.0f, 1.0f, 0.0f), // -x Vector4(0.0f, 0.0f,-1.0f), // +y Vector4(0.0f, 0.0f, 1.0f), // -y Vector4(0.0f, 1.0f, 0.0f), // +z Vector4(0.0f, 1.0f, 0.0f) // -z }; Vector4 g_vCubemap_Lookat[6] = { Vector4(1.0f, 0.0f, 0.0f), // +x Vector4(-1.0f, 0.0f, 0.0f), // -x Vector4(0.0f, 1.0f, 0.0f), // +y Vector4(0.0f,-1.0f, 0.0f), // -y Vector4(0.0f, 0.0f, 1.0f), // +z Vector4(0.0f, 0.0f,-1.0f) // -z }; // 鏡頭位置 Vector4 g_eye(0.0f, 0.0f, 15.0f, 1.0f); // 鏡頭對準的點 Vector4 g_lookat(0.0f, 0.0f, 0.0f, 1.0f); // 鏡頭正上方的方向 Vector4 g_up(0.0f, 1.0f, 0.0f, 1.0f); // 鏡頭轉換矩陣 Matrix4x4 g_view_matrix; // Matrix4x4 g_world_matrix; Matrix4x4 g_scale_matrix; // Matrix4x4 g_sun_matrix, g_earth_matrix, g_moon_matrix, g_mars_matrix; // 鏡頭視向 float g_fFOV = 45.0f; // 模型 CGutModel g_Models[4]; // controller object CGutUserControl g_Control;
[ "126.org@gmail.com" ]
126.org@gmail.com
998ca2cf6c8c8a80750fee09ec489a9e25a88d8c
f890a3ce88f49d4b53d2fa326b4ed39caed67234
/isValidParentheses/main.cpp
b84f18a30853c897f19654dbf5d40386c1edcf26
[]
no_license
chenyzcs/LintCode
03c96b89a4eda709c8cd592f1efdfc7a712ee70b
292fcb091fb7aafd55859008bccafcaba5c35090
refs/heads/master
2021-01-20T14:58:54.093802
2017-08-19T10:39:35
2017-08-19T10:39:35
90,699,278
0
0
null
null
null
null
UTF-8
C++
false
false
728
cpp
#include <iostream> #include <vector> #include <string> using namespace std; bool isValidParentheses(string& s); int main() { string s = "()"; cout << char(124); cout << isValidParentheses(s) << endl; return 0; } bool isValidParentheses(string& s) { vector<char> char_stack; char_stack.push_back(s[0]); if (s.size() <= 1) return false; for (int i = 1; i < s.size(); i++) { if (char_stack.size() == 0) { char_stack.push_back(s[i]); continue; } if (int(s[i]) - int(char_stack.back()) < 3 && int(s[i]) - int(char_stack.back()) > 0) //&& int(s[i]) != int(char_stack.back())) { char_stack.pop_back(); } else { char_stack.push_back(s[i]); } } return char_stack.size() == 0; }
[ "chenyzcs@163.com" ]
chenyzcs@163.com
99788ba1cf0936f5d22cb86ae69362bedff0dcb1
ef187d259d33e97c7b9ed07dfbf065cec3e41f59
/work/atcoder/arc/arc059/F/answers/36693_emiexp.cpp
d2f64aeac2e51e280ad28fb2e63ef0dd00ea7b7b
[]
no_license
kjnh10/pcw
847f7295ea3174490485ffe14ce4cdea0931c032
8f677701bce15517fb9362cc5b596644da62dca8
refs/heads/master
2020-03-18T09:54:23.442772
2018-07-19T00:26:09
2018-07-19T00:26:09
134,586,379
0
0
null
null
null
null
UTF-8
C++
false
false
1,295
cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <vector> #include <string> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> using namespace std; #define MOD 1000000007 #define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD) typedef long long i64; typedef vector<int> ivec; typedef vector<string> svec; int N, L; char S[5050]; unsigned int dp[5050][5050]; int C[5050][5050]; int main() { scanf("%d%s", &N, S); L = strlen(S); dp[0][0] = 1; for (int i = 0; i <= N; ++i) { for (int j = 0; j <= i; ++j) { if (i == 0 && j == 0) continue; dp[i][j] = ((i > 0 ? dp[i - 1][j] : 0) + (j > 0 ? (2 * dp[i][j - 1]) : 0)) % MOD; // printf("%d %d %lld\n", i, j, dp[i][j]); } } C[0][0] = 1; for (int i = 1; i <= N; ++i) { C[i][0] = 1; for (int j = 1; j <= N; ++j) { C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD; } } i64 ans = 0; for (int i = 0; L + 2 * i <= N; ++i) { i64 tmp = dp[L + i - 1][i]; //for (int j = 0; j < i; ++j) tmp = tmp * 2 % MOD; i64 tmp2 = 0; int rem = N - (L + 2 * i); for (int b = 0; b <= rem; ++b) { int c = rem - b; if (c <= b) ADD(tmp2, dp[b][c]); } // printf("%d %d: %lld %lld\n", i, rem, tmp, tmp2); ADD(ans, tmp * tmp2); } printf("%lld\n", ans); return 0; }
[ "kojinho10@gmail.com" ]
kojinho10@gmail.com
a6ac783f9b00748a221cc72bcb188adff5b88279
59c5e92aec94bba70144c62f81b000c4f0abde40
/src/server/sdk/amxplugin.cpp
b558d5634f336e012b1b964e4f81bc9d8a04f540
[]
no_license
RussellLVP/playground
f6205b8f2c3bafe8c83495b40efce1011f855bbd
803e6fe7a30d33900bab61056eb62ba0a60da5cd
refs/heads/master
2020-12-24T13:52:18.583120
2014-10-26T01:49:41
2014-10-26T01:49:41
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,200
cpp
//---------------------------------------------------------- // // SA-MP Multiplayer Modification For GTA:SA // Copyright 2004-2009 SA-MP Team // //---------------------------------------------------------- // // This provides an interface to call amx library functions // within samp-server. // //---------------------------------------------------------- #include "server/sdk/amx.h" #include "server/sdk/plugincommon.h" //---------------------------------------------------------- void *pAMXFunctions; //---------------------------------------------------------- typedef uint16_t * AMXAPI (*amx_Align16_t)(uint16_t *v); uint16_t * AMXAPI amx_Align16(uint16_t *v) { amx_Align16_t fn = ((amx_Align16_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Align16]; return fn(v); } typedef uint32_t * AMXAPI (*amx_Align32_t)(uint32_t *v); uint32_t * AMXAPI amx_Align32(uint32_t *v) { amx_Align32_t fn = ((amx_Align32_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Align32]; return fn(v); } #if defined _I64_MAX || defined HAVE_I64 typedef uint64_t * AMXAPI (*amx_Align64_t)(uint64_t *v); uint64_t * AMXAPI amx_Align64(uint64_t *v) { amx_Align64_t fn = ((amx_Align64_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Align64]; return fn(v); } #endif typedef int AMXAPI (*amx_Allot_t)(AMX *amx, int cells, cell *amx_addr, cell **phys_addr); int AMXAPI amx_Allot(AMX *amx, int cells, cell *amx_addr, cell **phys_addr) { amx_Allot_t fn = ((amx_Allot_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Allot]; return fn(amx, cells, amx_addr, phys_addr); } typedef int AMXAPI (*amx_Callback_t)(AMX *amx, cell index, cell *result, cell *params); int AMXAPI amx_Callback(AMX *amx, cell index, cell *result, cell *params) { amx_Callback_t fn = ((amx_Callback_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Callback]; return fn(amx, index, result, params); } typedef int AMXAPI (*amx_Cleanup_t)(AMX *amx); int AMXAPI amx_Cleanup(AMX *amx) { amx_Cleanup_t fn = ((amx_Cleanup_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Cleanup]; return fn(amx); } typedef int AMXAPI (*amx_Clone_t)(AMX *amxClone, AMX *amxSource, void *data); int AMXAPI amx_Clone(AMX *amxClone, AMX *amxSource, void *data) { amx_Clone_t fn = ((amx_Clone_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Clone]; return fn(amxClone, amxSource, data); } typedef int AMXAPI (*amx_Exec_t)(AMX *amx, cell *retval, int index); int AMXAPI amx_Exec(AMX *amx, cell *retval, int index) { amx_Exec_t fn = ((amx_Exec_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Exec]; return fn(amx, retval, index); } typedef int AMXAPI (*amx_FindNative_t)(AMX *amx, const char *name, int *index); int AMXAPI amx_FindNative(AMX *amx, const char *name, int *index) { amx_FindNative_t fn = ((amx_FindNative_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_FindNative]; return fn(amx, name, index); } typedef int AMXAPI (*amx_FindPublic_t)(AMX *amx, const char *funcname, int *index); int AMXAPI amx_FindPublic(AMX *amx, const char *funcname, int *index) { amx_FindPublic_t fn = ((amx_FindPublic_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_FindPublic]; return fn(amx, funcname, index); } typedef int AMXAPI (*amx_FindPubVar_t)(AMX *amx, const char *varname, cell *amx_addr); int AMXAPI amx_FindPubVar(AMX *amx, const char *varname, cell *amx_addr) { amx_FindPubVar_t fn = ((amx_FindPubVar_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_FindPubVar]; return fn(amx, varname, amx_addr); } typedef int AMXAPI (*amx_FindTagId_t)(AMX *amx, cell tag_id, char *tagname); int AMXAPI amx_FindTagId(AMX *amx, cell tag_id, char *tagname) { amx_FindTagId_t fn = ((amx_FindTagId_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_FindTagId]; return fn(amx, tag_id, tagname); } typedef int AMXAPI (*amx_Flags_t)(AMX *amx,uint16_t *flags); int AMXAPI amx_Flags(AMX *amx,uint16_t *flags) { amx_Flags_t fn = ((amx_Flags_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Flags]; return fn(amx,flags); } typedef int AMXAPI (*amx_GetAddr_t)(AMX *amx,cell amx_addr,cell **phys_addr); int AMXAPI amx_GetAddr(AMX *amx,cell amx_addr,cell **phys_addr) { amx_GetAddr_t fn = ((amx_GetAddr_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetAddr]; return fn(amx,amx_addr,phys_addr); } typedef int AMXAPI (*amx_GetNative_t)(AMX *amx, int index, char *funcname); int AMXAPI amx_GetNative(AMX *amx, int index, char *funcname) { amx_GetNative_t fn = ((amx_GetNative_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetNative]; return fn(amx, index, funcname); } typedef int AMXAPI (*amx_GetPublic_t)(AMX *amx, int index, char *funcname); int AMXAPI amx_GetPublic(AMX *amx, int index, char *funcname) { amx_GetPublic_t fn = ((amx_GetPublic_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetPublic]; return fn(amx, index, funcname); } typedef int AMXAPI (*amx_GetPubVar_t)(AMX *amx, int index, char *varname, cell *amx_addr); int AMXAPI amx_GetPubVar(AMX *amx, int index, char *varname, cell *amx_addr) { amx_GetPubVar_t fn = ((amx_GetPubVar_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetPubVar]; return fn(amx, index, varname, amx_addr); } typedef int AMXAPI (*amx_GetString_t)(char *dest,const cell *source, int use_wchar, size_t size); int AMXAPI amx_GetString(char *dest,const cell *source, int use_wchar, size_t size) { amx_GetString_t fn = ((amx_GetString_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetString]; return fn(dest,source, use_wchar, size); } typedef int AMXAPI (*amx_GetTag_t)(AMX *amx, int index, char *tagname, cell *tag_id); int AMXAPI amx_GetTag(AMX *amx, int index, char *tagname, cell *tag_id) { amx_GetTag_t fn = ((amx_GetTag_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetTag]; return fn(amx, index, tagname, tag_id); } typedef int AMXAPI (*amx_GetUserData_t)(AMX *amx, long tag, void **ptr); int AMXAPI amx_GetUserData(AMX *amx, long tag, void **ptr) { amx_GetUserData_t fn = ((amx_GetUserData_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_GetUserData]; return fn(amx, tag, ptr); } typedef int AMXAPI (*amx_Init_t)(AMX *amx, void *program); int AMXAPI amx_Init(AMX *amx, void *program) { amx_Init_t fn = ((amx_Init_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Init]; return fn(amx, program); } typedef int AMXAPI (*amx_InitJIT_t)(AMX *amx, void *reloc_table, void *native_code); int AMXAPI amx_InitJIT(AMX *amx, void *reloc_table, void *native_code) { amx_InitJIT_t fn = ((amx_InitJIT_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_InitJIT]; return fn(amx, reloc_table, native_code); } typedef int AMXAPI (*amx_MemInfo_t)(AMX *amx, long *codesize, long *datasize, long *stackheap); int AMXAPI amx_MemInfo(AMX *amx, long *codesize, long *datasize, long *stackheap) { amx_MemInfo_t fn = ((amx_MemInfo_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_MemInfo]; return fn(amx, codesize, datasize, stackheap); } typedef int AMXAPI (*amx_NameLength_t)(AMX *amx, int *length); int AMXAPI amx_NameLength(AMX *amx, int *length) { amx_NameLength_t fn = ((amx_NameLength_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_NameLength]; return fn(amx, length); } typedef AMX_NATIVE_INFO * AMXAPI (*amx_NativeInfo_t)(const char *name, AMX_NATIVE func); AMX_NATIVE_INFO * AMXAPI amx_NativeInfo(const char *name, AMX_NATIVE func) { amx_NativeInfo_t fn = ((amx_NativeInfo_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_NativeInfo]; return fn(name, func); } typedef int AMXAPI (*amx_NumNatives_t)(AMX *amx, int *number); int AMXAPI amx_NumNatives(AMX *amx, int *number) { amx_NumNatives_t fn = ((amx_NumNatives_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_NumNatives]; return fn(amx, number); } typedef int AMXAPI (*amx_NumPublics_t)(AMX *amx, int *number); int AMXAPI amx_NumPublics(AMX *amx, int *number) { amx_NumPublics_t fn = ((amx_NumPublics_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_NumPublics]; return fn(amx, number); } typedef int AMXAPI (*amx_NumPubVars_t)(AMX *amx, int *number); int AMXAPI amx_NumPubVars(AMX *amx, int *number) { amx_NumPubVars_t fn = ((amx_NumPubVars_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_NumPubVars]; return fn(amx, number); } typedef int AMXAPI (*amx_NumTags_t)(AMX *amx, int *number); int AMXAPI amx_NumTags(AMX *amx, int *number) { amx_NumTags_t fn = ((amx_NumTags_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_NumTags]; return fn(amx, number); } typedef int AMXAPI (*amx_Push_t)(AMX *amx, cell value); int AMXAPI amx_Push(AMX *amx, cell value) { amx_Push_t fn = ((amx_Push_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Push]; return fn(amx, value); } typedef int AMXAPI (*amx_PushArray_t)(AMX *amx, cell *amx_addr, cell **phys_addr, const cell array[], int numcells); int AMXAPI amx_PushArray(AMX *amx, cell *amx_addr, cell **phys_addr, const cell array[], int numcells) { amx_PushArray_t fn = ((amx_PushArray_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_PushArray]; return fn(amx, amx_addr, phys_addr, array, numcells); } typedef int AMXAPI (*amx_PushString_t)(AMX *amx, cell *amx_addr, cell **phys_addr, const char *string, int pack, int use_wchar); int AMXAPI amx_PushString(AMX *amx, cell *amx_addr, cell **phys_addr, const char *string, int pack, int use_wchar) { amx_PushString_t fn = ((amx_PushString_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_PushString]; return fn(amx, amx_addr, phys_addr, string, pack, use_wchar); } typedef int AMXAPI (*amx_RaiseError_t)(AMX *amx, int error); int AMXAPI amx_RaiseError(AMX *amx, int error) { amx_RaiseError_t fn = ((amx_RaiseError_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_RaiseError]; return fn(amx, error); } typedef int AMXAPI (*amx_Register_t)(AMX *amx, const AMX_NATIVE_INFO *nativelist, int number); int AMXAPI amx_Register(AMX *amx, const AMX_NATIVE_INFO *nativelist, int number) { amx_Register_t fn = ((amx_Register_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Register]; return fn(amx, nativelist, number); } typedef int AMXAPI (*amx_Release_t)(AMX *amx, cell amx_addr); int AMXAPI amx_Release(AMX *amx, cell amx_addr) { amx_Release_t fn = ((amx_Release_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_Release]; return fn(amx, amx_addr); } typedef int AMXAPI (*amx_SetCallback_t)(AMX *amx, AMX_CALLBACK callback); int AMXAPI amx_SetCallback(AMX *amx, AMX_CALLBACK callback) { amx_SetCallback_t fn = ((amx_SetCallback_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_SetCallback]; return fn(amx, callback); } typedef int AMXAPI (*amx_SetDebugHook_t)(AMX *amx, AMX_DEBUG debug); int AMXAPI amx_SetDebugHook(AMX *amx, AMX_DEBUG debug) { amx_SetDebugHook_t fn = ((amx_SetDebugHook_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_SetDebugHook]; return fn(amx, debug); } typedef int AMXAPI (*amx_SetString_t)(cell *dest, const char *source, int pack, int use_wchar, size_t size); int AMXAPI amx_SetString(cell *dest, const char *source, int pack, int use_wchar, size_t size) { amx_SetString_t fn = ((amx_SetString_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_SetString]; return fn(dest, source, pack, use_wchar, size); } typedef int AMXAPI (*amx_SetUserData_t)(AMX *amx, long tag, void *ptr); int AMXAPI amx_SetUserData(AMX *amx, long tag, void *ptr) { amx_SetUserData_t fn = ((amx_SetUserData_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_SetUserData]; return fn(amx, tag, ptr); } typedef int AMXAPI (*amx_StrLen_t)(const cell *cstring, int *length); int AMXAPI amx_StrLen(const cell *cstring, int *length) { amx_StrLen_t fn = ((amx_StrLen_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_StrLen]; return fn(cstring, length); } typedef int AMXAPI (*amx_UTF8Check_t)(const char *string, int *length); int AMXAPI amx_UTF8Check(const char *string, int *length) { amx_UTF8Check_t fn = ((amx_UTF8Check_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_UTF8Check]; return fn(string, length); } typedef int AMXAPI (*amx_UTF8Get_t)(const char *string, const char **endptr, cell *value); int AMXAPI amx_UTF8Get(const char *string, const char **endptr, cell *value) { amx_UTF8Get_t fn = ((amx_UTF8Get_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_UTF8Get]; return fn(string, endptr, value); } typedef int AMXAPI (*amx_UTF8Len_t)(const cell *cstr, int *length); int AMXAPI amx_UTF8Len(const cell *cstr, int *length) { amx_UTF8Len_t fn = ((amx_UTF8Len_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_UTF8Len]; return fn(cstr, length); } typedef int AMXAPI (*amx_UTF8Put_t)(char *string, char **endptr, int maxchars, cell value); int AMXAPI amx_UTF8Put(char *string, char **endptr, int maxchars, cell value) { amx_UTF8Put_t fn = ((amx_UTF8Put_t*)pAMXFunctions)[PLUGIN_AMX_EXPORT_UTF8Put]; return fn(string, endptr, maxchars, value); } //---------------------------------------------------------- // EOF
[ "russell@sa-mp.nl" ]
russell@sa-mp.nl
8d4777a5c6c86ca1353eed76e700cb6e709da186
4fefd1ffea2c29af31422ae3dc0a84cdf5951345
/json_gssapi/test/JSONParseTest.cpp
9b81aef3d0ad1b241c976a47f888f05f5a2ed81d
[]
no_license
janetuk/gssweb
08d8a1b51d23576e330b5621f56e410a91fa609c
6e55e668ed481d25ab544112c56b9b2be35799b2
refs/heads/master
2021-01-18T15:23:50.508124
2015-08-02T13:57:07
2015-08-02T13:57:07
42,654,917
0
0
null
null
null
null
UTF-8
C++
false
false
1,874
cpp
/* * Copyright (c) 2014, 2015 JANET(UK) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of JANET(UK) nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "JSONParseTest.h" // Registers the fixture into the 'registry' CPPUNIT_TEST_SUITE_REGISTRATION( JSONParseTest ); void JSONParseTest::setUp() { } void JSONParseTest::tearDown() { } void JSONParseTest::testConstructor() { // CPPUNIT_FAIL( "not implemented, go away" ); }
[ "mark@painless-security.com" ]
mark@painless-security.com
615d2acf610fe7e6a71c54efec09fee5d25ed667
ca33114900917da77e1d006c7318730ab3b15890
/Server/Server/Source.cpp
bb63b8d7ce8cc87d9f7a220d41399f254f7eec97
[ "Unlicense" ]
permissive
hurnhu/open-kattis
d9fd8410a2796130943b07dcf66b1f7828d569be
7da80c09e173336c9869d04f0a3cbf3dff197883
refs/heads/master
2023-03-08T16:42:42.247048
2023-03-02T15:25:29
2023-03-02T15:25:29
83,372,047
4
0
Unlicense
2020-10-01T13:59:46
2017-02-28T00:40:20
C#
UTF-8
C++
false
false
460
cpp
#include <iostream> using namespace std; int main(){ int num = 0; int maxTime = 0; int temp = 0; cin >> num >> maxTime; int* array1 = new int[num]; for (int i = 0; i < num; i++) { cin >> array1[i]; } int a = 0; bool run = true; while (run) { if ((temp + array1[a]) >= maxTime+1 || a == num) { run = false; } else { temp += array1[a]; a++; } } cout << a; delete[] array1; return 0; }
[ "noreply@github.com" ]
noreply@github.com
4cbe09e4889dee8ccb27dab28837e6b5694dd62f
51a40742a6fe3548ed9a5349385c21ff62d50e71
/libInput/include/InputController.h
efd0dd6f31e31a13656629091b5a486acfb294ab
[ "MIT" ]
permissive
netpipe/frostWM
9f79317e55b0af193692ecb6d133d473b9cb54ff
de8ed81c9df6d4a87039ae2389b3e72ef307bb15
refs/heads/master
2023-04-29T11:44:25.904064
2023-04-16T18:11:25
2023-04-16T18:11:25
169,099,513
0
1
null
null
null
null
UTF-8
C++
false
false
636
h
/* * InputController.h * * Created on: 2 Dec 2021 * Author: ykhan */ #ifndef INPUTCONTROLLER_H_ #define INPUTCONTROLLER_H_ #include "InputDevice.h" #include "Keyboard.h" #include "Mouse.h" #include <vector> class InputController; using InputControllerPtr = std::shared_ptr<InputController>; class InputController { protected: std::vector<InputDevicePtr> m_devices; public: virtual bool initialize() = 0; virtual void enumerate() = 0; std::vector<KeyboardPtr> getKeyboards(); std::vector<MousePtr> getMice(); KeyboardPtr getKeyboardById(int id); MousePtr getMouseById(int id); }; #endif /* INPUTCONTROLLER_H_ */
[ "netpipe@localhost.localdomain" ]
netpipe@localhost.localdomain
6d3087bd60fc05e3755ffdfafafe7f107f52a8ed
59fc4e1fc22de27ae2f12bddcddbf447277c76b8
/debugger/src/cpu_sysc_plugin/riverlib/core/dbg_port.cpp
aa543ffae51a48780792b03653f3b8685cad8f6e
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
logicdomain/riscv_vhdl
a74d328cb96549708b4ff8dc4af18ad709c9720a
2c11ef45f4876cbdf563486b740c629f4b94a6bc
refs/heads/master
2023-06-13T04:01:23.600210
2021-07-11T18:54:43
2021-07-11T18:54:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
8,668
cpp
/* * Copyright 2019 Sergey Khabarov, sergeykhbr@gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "dbg_port.h" #include <riscv-isa.h> namespace debugger { DbgPort::DbgPort(sc_module_name name_, bool async_reset) : sc_module(name_), i_clk("i_clk"), i_nrst("i_nrst"), i_dport_req_valid("i_dport_req_valid"), i_dport_write("i_dport_write"), i_dport_addr("i_dport_addr"), i_dport_wdata("i_dport_wdata"), o_dport_req_ready("o_dport_req_ready"), i_dport_resp_ready("i_dport_resp_ready"), o_dport_resp_valid("o_dport_resp_valid"), o_dport_rdata("o_dport_rdata"), o_csr_addr("o_csr_addr"), o_reg_addr("o_reg_addr"), o_core_wdata("o_core_wdata"), o_csr_ena("o_csr_ena"), o_csr_write("o_csr_write"), i_csr_valid("i_csr_valid"), i_csr_rdata("i_csr_rdata"), o_ireg_ena("o_ireg_ena"), o_ireg_write("o_ireg_write"), i_ireg_rdata("i_ireg_rdata"), i_pc("i_pc"), i_npc("i_npc"), i_e_call("i_e_call"), i_e_ret("i_e_ret") { async_reset_ = async_reset; SC_METHOD(comb); sensitive << i_nrst; sensitive << i_dport_req_valid; sensitive << i_dport_write; sensitive << i_dport_addr; sensitive << i_dport_wdata; sensitive << i_dport_resp_ready; sensitive << i_ireg_rdata; sensitive << i_csr_valid; sensitive << i_csr_rdata; sensitive << i_pc; sensitive << i_npc; sensitive << i_e_call; sensitive << i_e_ret; sensitive << r.dport_write; sensitive << r.dport_addr; sensitive << r.dport_wdata; sensitive << r.dport_rdata; sensitive << r.dstate; sensitive << r.rdata; sensitive << wb_stack_rdata; SC_METHOD(registers); sensitive << i_nrst; sensitive << i_clk.pos(); if (CFG_LOG2_STACK_TRACE_ADDR != 0) { trbuf0 = new StackTraceBuffer("trbuf0"); trbuf0->i_clk(i_clk); trbuf0->i_raddr(wb_stack_raddr); trbuf0->o_rdata(wb_stack_rdata); trbuf0->i_we(w_stack_we); trbuf0->i_waddr(wb_stack_waddr); trbuf0->i_wdata(wb_stack_wdata); } }; DbgPort::~DbgPort() { if (CFG_LOG2_STACK_TRACE_ADDR != 0) { delete trbuf0; } } void DbgPort::generateVCD(sc_trace_file *i_vcd, sc_trace_file *o_vcd) { if (o_vcd) { sc_trace(o_vcd, i_dport_req_valid, i_dport_req_valid.name()); sc_trace(o_vcd, i_dport_write, i_dport_write.name()); sc_trace(o_vcd, i_dport_addr, i_dport_addr.name()); sc_trace(o_vcd, i_dport_wdata, i_dport_wdata.name()); sc_trace(o_vcd, o_dport_req_ready, o_dport_req_ready.name()); sc_trace(o_vcd, i_dport_resp_ready, i_dport_resp_ready.name()); sc_trace(o_vcd, o_dport_resp_valid, o_dport_resp_valid.name()); sc_trace(o_vcd, o_dport_rdata, o_dport_rdata.name()); sc_trace(o_vcd, o_csr_addr, o_csr_addr.name()); sc_trace(o_vcd, o_reg_addr, o_reg_addr.name()); sc_trace(o_vcd, o_core_wdata, o_core_wdata.name()); sc_trace(o_vcd, o_csr_ena, o_csr_ena.name()); sc_trace(o_vcd, o_csr_write, o_csr_write.name()); sc_trace(o_vcd, i_csr_valid, i_csr_valid.name()); sc_trace(o_vcd, i_csr_rdata, i_csr_rdata.name()); sc_trace(o_vcd, o_ireg_ena, o_ireg_ena.name()); sc_trace(o_vcd, o_ireg_write, o_ireg_write.name()); sc_trace(o_vcd, i_ireg_rdata, i_ireg_rdata.name()); sc_trace(o_vcd, i_pc, i_pc.name()); sc_trace(o_vcd, i_npc, i_npc.name()); sc_trace(o_vcd, i_e_call, i_e_call.name()); sc_trace(o_vcd, i_e_ret, i_e_ret.name()); } if (CFG_LOG2_STACK_TRACE_ADDR != 0) { trbuf0->generateVCD(i_vcd, o_vcd); } } void DbgPort::comb() { sc_uint<12> wb_o_csr_addr; sc_uint<6> wb_o_reg_addr; sc_uint<RISCV_ARCH> wb_o_core_wdata; sc_uint<12> wb_idx; bool w_o_csr_ena; bool w_o_csr_write; bool w_o_ireg_ena; bool w_o_ireg_write; bool v_req_ready; bool v_resp_valid; sc_uint<64> vrdata; v = r; wb_o_csr_addr = 0; wb_o_reg_addr = 0; wb_o_core_wdata = 0; wb_idx = i_dport_addr.read()(11, 0); w_o_csr_ena = 0; w_o_csr_write = 0; w_o_ireg_ena = 0; w_o_ireg_write = 0; wb_stack_raddr = 0; w_stack_we = 0; wb_stack_waddr = 0; wb_stack_wdata = 0; v_req_ready = 0; v_resp_valid = 0; vrdata = r.dport_rdata; if (CFG_LOG2_STACK_TRACE_ADDR != 0) { if (i_e_call.read() && r.stack_trace_cnt.read() != (STACK_TRACE_BUF_SIZE - 1)) { w_stack_we = 1; wb_stack_waddr = r.stack_trace_cnt.read(); wb_stack_wdata = (i_npc, i_pc); v.stack_trace_cnt = r.stack_trace_cnt.read() + 1; } else if (i_e_ret.read() && r.stack_trace_cnt.read() != 0) { v.stack_trace_cnt = r.stack_trace_cnt.read() - 1; } } switch (r.dstate.read()) { case idle: v_req_ready = 1; vrdata = 0; if (i_dport_req_valid.read() == 1) { v.dport_write = i_dport_write; v.dport_addr = i_dport_addr; v.dport_wdata = i_dport_wdata; if (i_dport_addr.read()(CFG_DPORT_ADDR_BITS-1, 12) == 0x0) { v.dstate = csr_region; } else if (i_dport_addr.read()(CFG_DPORT_ADDR_BITS-1, 12) == 0x1) { if (wb_idx < 64) { v.dstate = reg_bank; } else if (wb_idx == 64) { v.dstate = reg_stktr_cnt; } else if ((wb_idx >= 128) && (wb_idx < (128 + 2 * STACK_TRACE_BUF_SIZE))) { v.dstate = reg_stktr_buf_adr; } else { vrdata = 0; v.dstate = wait_to_accept; } } else { v.dstate = wait_to_accept; } } break; case csr_region: w_o_csr_ena = 1; wb_o_csr_addr = r.dport_addr.read()(11,0); if (r.dport_write == 1) { w_o_csr_write = 1; wb_o_core_wdata = r.dport_wdata; } if (i_csr_valid.read() == 1) { vrdata = i_csr_rdata.read(); v.dstate = wait_to_accept; } break; case reg_bank: w_o_ireg_ena = 1; wb_o_reg_addr = r.dport_addr.read()(5,0); vrdata = i_ireg_rdata.read(); if (r.dport_write.read() == 1) { w_o_ireg_write = 1; wb_o_core_wdata = r.dport_wdata; } v.dstate = wait_to_accept; break; case reg_stktr_cnt: vrdata = 0; vrdata(CFG_LOG2_STACK_TRACE_ADDR-1, 0) = r.stack_trace_cnt; if (r.dport_write == 1) { v.stack_trace_cnt = r.dport_wdata.read()(CFG_LOG2_STACK_TRACE_ADDR-1, 0); } v.dstate = wait_to_accept; break; case reg_stktr_buf_adr: wb_stack_raddr = r.dport_addr.read()(CFG_LOG2_STACK_TRACE_ADDR, 1); v.dstate = reg_stktr_buf_dat; break; case reg_stktr_buf_dat: if (r.dport_addr.read()[0] == 0) { vrdata(CFG_CPU_ADDR_BITS-1, 0) = wb_stack_rdata.read()(CFG_CPU_ADDR_BITS-1, 0); } else { vrdata(CFG_CPU_ADDR_BITS-1, 0) = wb_stack_rdata.read()(2*CFG_CPU_ADDR_BITS-1, CFG_CPU_ADDR_BITS); } v.dstate = wait_to_accept; break; case wait_to_accept: v_resp_valid = 1; if (i_dport_resp_ready.read() == 1) { v.dstate = idle; } break; default:; } v.dport_rdata = vrdata; if (!async_reset_ && !i_nrst.read()) { R_RESET(v); } o_csr_addr = wb_o_csr_addr; o_reg_addr = wb_o_reg_addr; o_core_wdata = wb_o_core_wdata; o_csr_ena = w_o_csr_ena; o_csr_write = w_o_csr_write; o_ireg_ena = w_o_ireg_ena; o_ireg_write = w_o_ireg_write; o_dport_req_ready = v_req_ready; o_dport_resp_valid = v_resp_valid; o_dport_rdata = r.dport_rdata; } void DbgPort::registers() { if (async_reset_ && i_nrst.read() == 0) { R_RESET(r); } else { r = v; } } } // namespace debugger
[ "sergeykhbr@gmail.com" ]
sergeykhbr@gmail.com
3dfd0c945d21cea209059674ce2fd6f4a928ab1a
e5fc671efd9c606a82d534fa2e62acb912f3a0a1
/Dungeon-Quest/Dungeon-Quest/src/systems/PlayerEntitySystem.cpp
4d5d51cf687b8a5457348aa4c1d5918dae0b6b63
[ "MIT" ]
permissive
milos-mkv/Dungeon-Quest
9be506aabf820835b20d6c5739747e1892962d46
209d8bc050d108a9bcfbd9d6d6e80927c5ee6bfb
refs/heads/main
2023-03-29T14:16:31.414197
2021-04-02T08:32:49
2021-04-02T08:32:49
345,574,836
0
0
null
null
null
null
UTF-8
C++
false
false
3,915
cpp
#include <systems/PlayerEntitySystem.hpp> #include <components/CharacterComponent.h> #include <components/SpriteComponent.hpp> #include <components/AttackComponent.hpp> #include <components/AnimationComponent.hpp> #include <Game.h> #include <EntityFactory.hpp> #include <iostream> static sf::Vector2f VecAdd(const sf::Vector2f& vec, int i) { return { vec.x + i, vec.y + i }; } static sf::Vector2f GetCursorWordPosition(const PTR<sf::View>& camera) { sf::Vector2f mouse = static_cast<sf::Vector2f>(sf::Mouse::getPosition()); sf::Vector2f winsize = static_cast<sf::Vector2f>(Game::window->getSize()); return { Map(mouse.x, 0, winsize.x, camera->getCenter().x - VIEWPORT_WIDTH / 2, camera->getCenter().x + VIEWPORT_WIDTH / 2), Map(mouse.y, 0, winsize.y, camera->getCenter().y - VIEWPORT_HEIGHT / 2, camera->getCenter().y + VIEWPORT_HEIGHT / 2) }; } static void FlipTexture(CharacterType type, sf::Sprite& sprite, bool flip); PlayerEntitySystem::PlayerEntitySystem(const PTR<Level>& level) : level(level) { } void PlayerEntitySystem::Update(float delta) { auto characterComponent = level->player->GetComponent<CharacterComponent>(); auto spriteComponent = level->player->GetComponent<SpriteComponent>(); auto attackComponent = level->player->GetComponent<AttackComponent>(); auto animationComponent = level->player->GetComponent<AnimationComponent>(); auto colliderComponent = level->player->GetComponent<ColliderComponent>(); characterComponent->speed = { 0, 0 }; if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) { characterComponent->speed.x = -CharacterProperties[characterComponent->type].moveSpeed * delta; FlipTexture(characterComponent->type, spriteComponent->sprite, true); } if (sf::Keyboard::isKeyPressed(sf::Keyboard::D)) { characterComponent->speed.x = CharacterProperties[characterComponent->type].moveSpeed * delta; FlipTexture(characterComponent->type, spriteComponent->sprite, false); } if (sf::Keyboard::isKeyPressed(sf::Keyboard::W)) { characterComponent->speed.y = -CharacterProperties[characterComponent->type].moveSpeed * delta; } if (sf::Keyboard::isKeyPressed(sf::Keyboard::S)) { characterComponent->speed.y = CharacterProperties[characterComponent->type].moveSpeed * delta; } characterComponent->state = (characterComponent->speed.x || characterComponent->speed.y) ? CharacterState::RUN : CharacterState::IDLE; attackComponent->UpdateAttackStatus(delta); UpdatePlayerAnimation(animationComponent, delta); spriteComponent->sprite.setTexture(Assets::CharacterTextures[characterComponent->type][characterComponent->state][animationComponent->index]); if (sf::Mouse::isButtonPressed(sf::Mouse::Button::Left) && attackComponent->timer == 0.f) { attackComponent->timer += delta; level->projectiles.push_back(EntityFactory::CreateProjectile(CharacterProperties[characterComponent->type].projectileType, colliderComponent->GetCenter(), VecAdd(GetCursorWordPosition(level->camera) , RandInt(-7, 7)), true)); } } void PlayerEntitySystem::UpdatePlayerAnimation(const PTR<AnimationComponent>& animationComponent, float delta) const { if ((animationComponent->timer += delta) >= animationComponent->changeTimer) { animationComponent->index = (animationComponent->index + 1) % 4; animationComponent->timer = 0; } } static void FlipTexture(CharacterType type, sf::Sprite& sprite, bool flip) { if (flip) sprite.setTextureRect(sf::IntRect((int)CharacterProperties[type].spriteSize.x, 0, -(int)CharacterProperties[type].spriteSize.x, (int)CharacterProperties[type].spriteSize.y)); else sprite.setTextureRect(sf::IntRect(0, 0, (int)CharacterProperties[type].spriteSize.x, (int)CharacterProperties[type].spriteSize.y)); }
[ "milos.milicevic@endava.com" ]
milos.milicevic@endava.com
1d39205f27bc292646d3b701007d6ab02b385fd1
4475543cb2faf92ff0232682aa798a079de51f40
/ESP32BitcoinTradeMonitor.ino
b37eb69f0249f72c4e94fa8715749239446838bc
[]
no_license
mosfex/ESP32-BitcoinTradeMonitor
2b94654c8977162706796ba9b682a4e43bcae0ed
309706f76475928e8be30a9699377e7101bdaf80
refs/heads/master
2021-07-06T02:42:03.140388
2017-10-01T00:35:48
2017-10-01T00:35:48
105,409,947
0
0
null
null
null
null
UTF-8
C++
false
false
2,424
ino
/* * Written by Mosfex : www.mosfex.com * www.fb.com/mosfex * plese refer to this when using the code */ #include <Arduino.h> #include <WiFi.h> #include <WiFiMulti.h> #include <Wire.h> #include <LiquidCrystal_I2C.h> #include <WiFiClientSecure.h> WiFiMulti wifiMulti; LiquidCrystal_I2C lcd(0x3F, 16, 2); //maybe 27 2F 3F const char* ssid = "mosfex.com"; const char* pass = "123456789"; const char* api_endpoint = "https://www.bx.in.th/api/"; const char* host_endpoint = "www.bx.in.th"; void parsePrint(String btc_str) { int last_pos_st = btc_str.indexOf("last_price") + 12; int bits_pos_st = btc_str.indexOf("highbid") + 9; int asks_pos_st = btc_str.indexOf("highbid", bits_pos_st) + 9; String last = btc_str.substring(last_pos_st, btc_str.indexOf(",", last_pos_st)); String bits = btc_str.substring(bits_pos_st, btc_str.indexOf("}", bits_pos_st)); String asks = btc_str.substring(asks_pos_st, btc_str.indexOf("}", asks_pos_st)); Serial.print("Last : "); Serial.println(last); Serial.print("sell : "); Serial.println(bits); Serial.print("buy : "); Serial.println(asks); lcd.clear(); lcd.setCursor(0,0); lcd.print("BTC : "); lcd.print(last); lcd.setCursor(0,1); lcd.print(">"); lcd.print(bits); lcd.print(">"); lcd.print(asks); } void parseSecurePrint(WiFiClientSecure client) { String line = client.readStringUntil('\n'); parsePrint(line); client.stop(); } WiFiClientSecure getSecureBtc() { WiFiClientSecure client; //client.setCACert(ca); if (!client.connect(host_endpoint, 443)) Serial.println("Connection failed!"); else { Serial.println("Connected to server!"); client.println(String("GET ") + api_endpoint + " HTTP/1.0"); client.println(String("Host: ") + host_endpoint); client.println("Connection: close"); client.println(); delay(1000); //parse header while (client.connected()) { String line = client.readStringUntil('\n'); if (line == "\r") { break; } } return client; } } void setup() { Serial.begin(115200); lcd.init(); lcd.backlight(); Serial.println(); for (uint8_t t = 4; t > 0; t--) { Serial.printf("[SETUP] WAIT %d...\n", t); Serial.flush(); delay(1000); } wifiMulti.addAP(ssid, pass); lcd.setCursor(0,0); lcd.print("WiFi Setup ..."); } void loop() { if ((wifiMulti.run() == WL_CONNECTED)) { parseSecurePrint(getSecureBtc()); } delay(5 * 1000); }
[ "mosfexshop@gmail.com" ]
mosfexshop@gmail.com
d8ac35484601f4c33b030ec458a04e4bdb2f4187
d58c8780e2ee95e584c523e0c4ceb88e06a6329a
/mapdrawplay_5.ino
38a4eb15530bb289be49f2e30218d9ec2bed5aa2
[]
no_license
Cragjock/mapgraphics
95ba6f9a8e32a3e8b6fa34b08d03f598ff4b8027
5cbfd1f8007e5105ab281ade0b651e2d584ce1cf
refs/heads/master
2021-08-23T06:57:34.391135
2017-12-04T01:38:47
2017-12-04T01:38:47
112,141,075
0
0
null
null
null
null
UTF-8
C++
false
false
14,238
ino
/****************************************************************** BSD license, check license.txt for more information. All text above must be included in any redistribution. ******************************************************************/ #include <SPI.h> #include <stdint.h> #include "Adafruit_GFX.h" #include "Adafruit_RA8875.h" #include "Fonts/FreeMonoBoldOblique9pt7b.h" #include "Fonts/FreeSerifItalic24pt8b.h" // includes extended ASCII characters #include "Fonts/FreeSerifItalic18pt8b.h" #include "Fonts/FreeSerifItalic24pt7b.h" #include <Adafruit_Sensor.h> #include "Adafruit_BME280.h" #include "sdc.h" #define RA8875_INT 3 #define RA8875_CS 2 // tied to blue LED too? #define RA8875_RESET 16 #define SEALEVELPRESSURE_HPA (1013.25) Adafruit_RA8875 tft = Adafruit_RA8875(RA8875_CS, RA8875_RESET); Adafruit_BME280 bme; // I2C uint16_t tx, ty; /************************************************** * SETUP START */ void setup() { bool status; Serial.begin(115200); Serial.println(F("BME start")); status = bme.begin(); if (!status) { Serial.println(F("Could not find a valid BME280 sensor, check wiring!")); while (1); } Serial.println(F("RA8875 start")); #ifdef ESP8266 // THIS IS CORRECT Serial.println(F("ESP8266 yes")); #else Serial.println(F("ESP8266 = no")); #endif if (!tft.begin(RA8875_800x480)) { Serial.println(F("RA8875 Not Found!")); while (1); } tft.displayOn(true); tft.GPIOX(true); // Enable TFT - display enable tied to GPIOX tft.PWM1config(true, RA8875_PWM_CLK_DIV1024); // PWM output for backlight tft.PWM1out(255); tft.fillScreen(RA8875_PURPLE); //tft.fillScreen(RA8875_LIGHT_GREY); // ============ BASIC SETUP Complete ================= const char string1[15] = "start where! "; const char sdceng[] ={0x53,0x74,0x65,0x76,0x65,0x6e,0xB0,0x0}; //const char sdceng1[] ={0x53,0x74,0x65,0x76,0x65,0x6e,0xB0,0x0}; const char sdceng1[] ={'S','t','e','v','e','n',0xB0,0x0}; uint16_t row=0; uint16_t column=0; int d_position = 0; // draw position tft.textMode(); // =========TEXT MODE ON ==== tft.textSetCursor(20,400); tft.textTransparent(RA8875_WHITE); tft.textWrite(string1); tft.textSetCursor(20,416); // one line down ? newline does not work the same tft.textWrite(sdceng); // === load satellite icon ===== uploadUserChar(bmSatLeft, location_1); // sat bmp uploadUserChar(bmSatright, location_2); tft.textMode(); // =========TEXT MODE ON ==== tft.writeReg(RA8875_FNCR0, 0xA0); // select CGRAM tft.writeReg(RA8875_MWCR1, 0x0); // ========== Set up and display satellite icon tft.textSetCursor(400,400); tft.textEnlarge(2); // set to 3x size tft.textColor(RA8875_WHITE, RA8875_RED); tft.writeCommand(RA8875_MRWC); tft.writeData(location_1); delay(1); // need or the images on topc of each other if text Enlarge set tft.writeData(location_2); tft.writeReg(RA8875_FNCR0, 0x00); // select CGROM // ========== Sat out done tft.textEnlarge(0); // set back to 1x size // ============== graphics cursor items start tft.writeCommand(RA8875_GCC0); tft.writeData(0xE0); // RGB RED tft.writeCommand(RA8875_GCC1); tft.writeData(0x1C); // RGB BLUE tft.writeCommand(RA8875_MWCR1); tft.writeData(0x08); //write to graphics cursor buffers & gr cursor off tft.writeCommand(RA8875_MRWC); for(int i=0; i<255; i++) { tft.writeData(pgm_read_byte(&g1_cursor[i])); // read from EEPROM } tft.writeCommand(RA8875_MWCR1); tft.writeData(0x80); // graphics cursor on & write location set to layer 1 tft.writeCommand(RA8875_GCHP0); // horiz position tft.writeData(0x64); // 100 decimal tft.writeCommand(RA8875_GCVP0); // vertical position tft.writeData(0x64); // 100 decimal // ========== graphics cursor items end tft.graphicsMode(); // ==== GRAPHICS MODE ON tft.setFont(&FreeMonoBoldOblique9pt7b); // setFont sets the gfxFont variable in the GFX lib //tft.drawCircle(400, 100, 50, RA8875_BLACK); tft.fillCircle(400, 100, 50, RA8875_GREEN); tft.setCursor(10,150); tft.write(0x34); // number 4 tft.write('S'); tft.write('D'); //tft.setTextColor(RA8875_RED); // this works for garphic fonts //tft.setTextColor(RA8875_GREEN, RA8875_RED); // this works for graphic fonts but no bg color for write print etc tft.write('C'); tft.write(' '); tft.write('!'); tft.drawRect(10, 300, 16*5, 18*1, RA8875_YELLOW); tft.print("9 Steven"); // this works too tft.drawChar(10, 200, 'D', RA8875_YELLOW, RA8875_WHITE, 1); // this works to set graphic font color too and size! tft.setFont(&FreeSerifItalic18pt8b); tft.setCursor(10,250); tft.print("18 Steven"); // this works too tft.setFont(&FreeSerifItalic24pt7b); tft.setCursor(10,300); tft.print("24 Steven"); // this works too tft.setFont(&FreeSerifItalic24pt7b); const char testarr[]="Does this work?"; for(int i=0; i<strlen(testarr); i++) tft.write(testarr[i]); tft.setFont(&FreeSerifItalic24pt8b); tft.setCursor(235,400); for(int i=0; i<strlen(sdceng1); i++) tft.write(sdceng1[i]); tft.println(string1); // oh crap. this works! tft.setFont(&FreeSerifItalic24pt7b); tft.setXY(20,100); // or should this be setcursor ??? /************** this is hamclock type data ***** for(row=0; row<EARTH_H; row++) { yield(); for(d_position=0; d_position<(EARTH_W*2); (d_position++)*2) { tft.drawPixel((d_position), (row), pgm_read_word(&DEARTH[row][d_position/2])); // this works to stretch it out tft.drawPixel(((d_position)+1), (row), pgm_read_word(&DEARTH[row][d_position/2])); // this works //Serial.println(d_position); } } *******************/ int j=0; uint16_t HB=0; uint16_t LB=0; int ALL=0; uint16_t border = 10; const uint16_t* cc=0; Box mapbox={150,127,500,225, RA8875_RED}; // was 321 x 163 for world 565, 213 for charmap fpt LCD2, 320 x144 tft.drawRect(mapbox.x, mapbox.y, mapbox.w, mapbox.h, mapbox.c); Box LCDbox={400,200,321,145, RA8875_RED}; // LCD2, 321 145 //drawBorder(mapbox, border); tft.drawBorder(mapbox.x ,mapbox.y, mapbox.w, mapbox.h, border); // i added drawborder into Adafruit lib //drawBorder(LCDbox, border); // ===== draws the LCD Display image ===== /************************ KEEP JUST IN CASE ***************** for(row=0; row<225; row++) // was 163 for world 565, 213 for charmap fpt LCD2, 320 x144 { yield(); for(column=0; column<500; column++) { //tft.drawPixel((column + mapbox.x), (row+mapbox.y), pgm_read_word(&charmap[j])); // 320x215 //tft.drawPixel((column + mapbox.x), (row+mapbox.y), pgm_read_word(&world565[j])); //320x163 tft.drawPixel((column + mapbox.x), (row+mapbox.y), pgm_read_word(&lcd3[j])); // GOOD j=j+1; } } **************************************************************/ draw_map(lcd3,225,500, mapbox); // the BIG LCD graphic Box testbox={10,20,321,145, RA8875_RED}; // draw_map(LCD2,144,320, testbox); // the smaller LCD graphic //int lcdsize = sizeof(LCD2)/sizeof(LCD2[0]); //Serial.print("lcdsize "); //Serial.println(lcdsize/320); //tft.drawRect(200, 200, 272, 33, RA8875_YELLOW); // for row 1 box tft.drawRect(210, 200, 272, 33, RA8875_YELLOW); // for row 1 box // better alignment // tft.drawRect(200, 250, 272, 33, RA8875_YELLOW); // for row 2 box //mapbox={10,150,660,330, RA8875_WHITE}; //tft.drawRect(0,0,660,330, RA8875_WHITE); //tft.drawRect(mapbox.x, mapbox.y, mapbox.w, mapbox.h, mapbox.c); /* Set a solid for + bg color ... */ /* ... or a fore color plus a transparent background */ /* Set the cursor location (in pixels) */ tft.textSetCursor(10, 10); // ========== top header area ============= /* Render some text! */ Box header_L = {0,5,266,20}; //tft.drawRect(0,5,266,20, RA8875_WHITE); Box header_C = {266,5,268,20}; //tft.drawRect(266,5,268,20, RA8875_WHITE); Box header_R = {534,5,266,20}; //tft.drawRect(534,5,266,20, RA8875_WHITE); tft.textMode(); // ==== TEXT MODE ON ==== char string[17] = " Hey de KC6FEW! "; tft.textSetCursor(header_L.x, header_L.y); tft.textTransparent(RA8875_WHITE); tft.textWrite(string); tft.textColor(RA8875_WHITE, RA8875_RED); // only changes text mode, not graphics mode tft.textWrite(string); tft.graphicsMode(); // ==== GRAPHICS MODE ON ==== tft.setTextColor(RA8875_YELLOW); tft.setFont(&FreeSerifItalic24pt7b); tft.setCursor(header_C.x,header_C.y+40); tft.print("-[Welcome!]-"); // this works too tft.setTextColor(RA8875_WHITE); /******************** int16_t px; int16_t py; uint16_t pw; uint16_t ph; tft.getTextBounds("-[Welcome!]-", 266, 5, &px, &py, &pw, &ph); // this works ok Serial.println(px); Serial.println(py); Serial.println(pw); Serial.println(ph); ***************************/ tft.textMode(); // ==== TEXT MODE ON ==== tft.textSetCursor(header_R.x, header_R.y); //tft.textTransparent(RA8875_CYAN); //tft.textWrite(string); //tft.textTransparent(RA8875_GREEN); //tft.textWrite(string); tft.textColor(RA8875_YELLOW, RA8875_CYAN); tft.textWrite(string); tft.textColor(RA8875_BLACK, RA8875_MAGENTA); //tft.print(string); tft.textWrite(string); /* Change the cursor location and color ... */ tft.textEnlarge(1); tft.textSetCursor(235, 200); tft.textTransparent(RA8875_YELLOW); // tft.textColor(RA8875_YELLOW, RA8875_BLACK); char h_buffer[20]; float bm_humid = bme.readHumidity(); //tft.textWrite(dtostrf(bm_humid, 3,3, h_buffer) ); // tft.textWrite(string); tft.textSetCursor(10, 40); tft.textEnlarge(2); float bm_temp = bme.readTemperature(); char t_buffer[20]; // tft.textWrite(dtostrf(bm_temp, 3,3, t_buffer) ); // tft.drawRect(10,40,(8*3*16), 16*3+3, RA8875_YELLOW); printValues(); tft.graphicsMode(); // ==== GRAPHICS MODE ON ==== // === redraws data in the LCD image test tft.setFont(&FreeSerifItalic24pt8b); tft.setCursor(200,200); for(int i=0; i<strlen(sdceng1); i++) tft.write(sdceng1[i]); mapbox={150,127,500,225, RA8875_RED}; for(row=50; row<100; row++) { yield(); for(column=50; column<100; column++) { tft.drawPixel((column + mapbox.x), (row+mapbox.y), pgm_read_word(&lcd3[column + row*500])); // GOOD } } tft.setFont(&FreeSerifItalic24pt8b); tft.setCursor(200,200); for(int i=0; i<strlen(sdceng1); i++) tft.write(sdceng1[i]); tft.textMode(); // ==== TEXT MODE ON ==== } // ================== END ============= float bm_temp=0; float bm_prior=0; const char degreefont[] ={0xB0,0x0}; //const char newline[] = {0x0d, 0x0a, 0x00}; // newline is not in the internal font map uint8_t newline = '\n'; // still not working void loop() { uint16_t row=0; uint16_t column=0; tft.textEnlarge(1); printValues(); tft.textMode(); tft.textColor(RA8875_YELLOW, RA8875_PURPLE); tft.textSetCursor(10+1, 40+1); //Serial.println("in main loop ~~~~..."); delay(1000); char t_buffer[20]; tft.textSetCursor(10+1, 40+1); tft.textSetCursor(10+1, 40+1); bm_temp = bme.readTemperature(); bm_temp = bm_temp*(9.0/5.0) + 32.0; tft.textWrite("Temp("); tft.textWrite(degreefont); tft.textWrite("f): "); tft.textWrite(dtostrf(bm_temp, 3,3, t_buffer) ); float bm_humid = bme.readHumidity(); tft.textSetCursor(10+1, 40+1+48); //tft.write(newline); tft.textWrite("Humidity: "); tft.textWrite(dtostrf(bm_humid, 3,3, t_buffer) ); tft.textWrite("%"); tft.graphicsMode(); // ==== GRAPHICS MODE ON ==== // tft.drawRect(200, 200, 272, 33, RA8875_YELLOW); // for row 1 box // redraw tft.drawRect(200, 250, 272, 33, RA8875_YELLOW); // for row 2 box // Box mapbox={150,127,500,225, RA8875_RED} for big LCD // tft.drawRect(475, 250, 90, 30, RA8875_WHITE); Box source = {471, 250, 95, 31, RA8875_WHITE}; //tft.drawRect(source.x, source.y, source.w, source.h, source.c); // for flicker avoidance ============ /*************************************/ BTE_block_move ( source.x, //SourceX source.y, //SourceY source.w, //Width 125 source.h, //Height 210, //DestX 250, //DestY 0x02); /************************************/ Box mapbox={150,127,500,225, RA8875_RED}; // for(row=125; row<168; row++) // { // yield(); // for(column=50; column<175; column++) // { // tft.drawPixel((column + mapbox.x), (row+mapbox.y), pgm_read_word(&lcd3[column + row*500])); // GOOD // // } // } Box fontposition ={210, 250, 99, 24, RA8875_GREEN}; tft.drawRect(fontposition.x, fontposition.y, fontposition.w, fontposition.h, fontposition.c); // font posiioning rect tft.setFont(&FreeSerifItalic18pt8b); tft.setCursor(fontposition.x,fontposition.y + fontposition.h); // font position is lower left !! need pad ? tft.print(bm_temp); // this works too tft.print(degreefont); //int16_t px; //int16_t py; //uint16_t pw; //uint16_t ph; //tft.getTextBounds(t_buffer, 205, 280, &px, &py, &pw, &ph); // this works ok //Serial.println(px); //Serial.println(py); //Serial.println(pw); //Serial.println(ph); tft.textMode(); } // ============== END END END =============== void printValues() { delay(100); // let sensor boot up Serial.print("Temperature = "); Serial.print(bme.readTemperature()); Serial.println(" *C"); Serial.print("Pressure = "); Serial.print(bme.readPressure() / 100.0F); Serial.println(" hPa"); Serial.print("Approx. Altitude = "); Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); Serial.println(" m"); Serial.print("Humidity = "); Serial.print(bme.readHumidity()); Serial.println(" %"); Serial.println(); }
[ "noreply@github.com" ]
noreply@github.com
9f7d8c4f36e8eca5b891f4b0d406a7040b4500bc
0eff74b05b60098333ad66cf801bdd93becc9ea4
/second/download/httpd/gumtree/httpd_repos_function_94_httpd-2.4.3.cpp
5841a32c50b93a3b8b4a4205a9a6567385ed0758
[]
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
8,679
cpp
static void test(void) { apr_time_t stoptime; apr_int16_t rtnev; apr_status_t rv; int i; apr_status_t status; int snprintf_res = 0; #ifdef NOT_ASCII apr_size_t inbytes_left, outbytes_left; #endif if (isproxy) { connecthost = apr_pstrdup(cntxt, proxyhost); connectport = proxyport; } else { connecthost = apr_pstrdup(cntxt, hostname); connectport = port; } if (!use_html) { printf("Benchmarking %s ", hostname); if (isproxy) printf("[through %s:%d] ", proxyhost, proxyport); printf("(be patient)%s", (heartbeatres ? "\n" : "...")); fflush(stdout); } con = calloc(concurrency, sizeof(struct connection)); /* * XXX: a way to calculate the stats without requiring O(requests) memory * XXX: would be nice. */ stats = calloc(requests, sizeof(struct data)); if (stats == NULL || con == NULL) { err("Cannot allocate memory for result statistics"); } if ((status = apr_pollset_create(&readbits, concurrency, cntxt, APR_POLLSET_NOCOPY)) != APR_SUCCESS) { apr_err("apr_pollset_create failed", status); } /* add default headers if necessary */ if (!opt_host) { /* Host: header not overridden, add default value to hdrs */ hdrs = apr_pstrcat(cntxt, hdrs, "Host: ", host_field, colonhost, "\r\n", NULL); } else { /* Header overridden, no need to add, as it is already in hdrs */ } if (!opt_useragent) { /* User-Agent: header not overridden, add default value to hdrs */ hdrs = apr_pstrcat(cntxt, hdrs, "User-Agent: ApacheBench/", AP_AB_BASEREVISION, "\r\n", NULL); } else { /* Header overridden, no need to add, as it is already in hdrs */ } if (!opt_accept) { /* Accept: header not overridden, add default value to hdrs */ hdrs = apr_pstrcat(cntxt, hdrs, "Accept: */*\r\n", NULL); } else { /* Header overridden, no need to add, as it is already in hdrs */ } /* setup request */ if (!send_body) { snprintf_res = apr_snprintf(request, sizeof(_request), "%s %s HTTP/1.0\r\n" "%s" "%s" "%s" "%s" "\r\n", method_str[method], (isproxy) ? fullurl : path, keepalive ? "Connection: Keep-Alive\r\n" : "", cookie, auth, hdrs); } else { snprintf_res = apr_snprintf(request, sizeof(_request), "%s %s HTTP/1.0\r\n" "%s" "%s" "%s" "Content-length: %" APR_SIZE_T_FMT "\r\n" "Content-type: %s\r\n" "%s" "\r\n", method_str[method], (isproxy) ? fullurl : path, keepalive ? "Connection: Keep-Alive\r\n" : "", cookie, auth, postlen, (content_type[0]) ? content_type : "text/plain", hdrs); } if (snprintf_res >= sizeof(_request)) { err("Request too long\n"); } if (verbosity >= 2) printf("INFO: %s header == \n---\n%s\n---\n", method_str[method], request); reqlen = strlen(request); /* * Combine headers and (optional) post file into one continuous buffer */ if (send_body) { char *buff = malloc(postlen + reqlen + 1); if (!buff) { fprintf(stderr, "error creating request buffer: out of memory\n"); return; } strcpy(buff, request); memcpy(buff + reqlen, postdata, postlen); request = buff; } #ifdef NOT_ASCII inbytes_left = outbytes_left = reqlen; status = apr_xlate_conv_buffer(to_ascii, request, &inbytes_left, request, &outbytes_left); if (status || inbytes_left || outbytes_left) { fprintf(stderr, "only simple translation is supported (%d/%" APR_SIZE_T_FMT "/%" APR_SIZE_T_FMT ")\n", status, inbytes_left, outbytes_left); exit(1); } #endif /* NOT_ASCII */ if (myhost) { /* This only needs to be done once */ if ((rv = apr_sockaddr_info_get(&mysa, myhost, APR_UNSPEC, 0, 0, cntxt)) != APR_SUCCESS) { char buf[120]; apr_snprintf(buf, sizeof(buf), "apr_sockaddr_info_get() for %s", myhost); apr_err(buf, rv); } } /* This too */ if ((rv = apr_sockaddr_info_get(&destsa, connecthost, myhost ? mysa->family : APR_UNSPEC, connectport, 0, cntxt)) != APR_SUCCESS) { char buf[120]; apr_snprintf(buf, sizeof(buf), "apr_sockaddr_info_get() for %s", connecthost); apr_err(buf, rv); } /* ok - lets start */ start = lasttime = apr_time_now(); stoptime = tlimit ? (start + apr_time_from_sec(tlimit)) : AB_MAX; #ifdef SIGINT /* Output the results if the user terminates the run early. */ apr_signal(SIGINT, output_results); #endif /* initialise lots of requests */ for (i = 0; i < concurrency; i++) { con[i].socknum = i; start_connect(&con[i]); } do { apr_int32_t n; const apr_pollfd_t *pollresults, *pollfd; n = concurrency; do { status = apr_pollset_poll(readbits, aprtimeout, &n, &pollresults); } while (APR_STATUS_IS_EINTR(status)); if (status != APR_SUCCESS) apr_err("apr_pollset_poll", status); for (i = 0, pollfd = pollresults; i < n; i++, pollfd++) { struct connection *c; c = pollfd->client_data; /* * If the connection isn't connected how can we check it? */ if (c->state == STATE_UNCONNECTED) continue; rtnev = pollfd->rtnevents; #ifdef USE_SSL if (c->state == STATE_CONNECTED && c->ssl && SSL_in_init(c->ssl)) { ssl_proceed_handshake(c); continue; } #endif /* * Notes: APR_POLLHUP is set after FIN is received on some * systems, so treat that like APR_POLLIN so that we try to read * again. * * Some systems return APR_POLLERR with APR_POLLHUP. We need to * call read_connection() for APR_POLLHUP, so check for * APR_POLLHUP first so that a closed connection isn't treated * like an I/O error. If it is, we never figure out that the * connection is done and we loop here endlessly calling * apr_poll(). */ if ((rtnev & APR_POLLIN) || (rtnev & APR_POLLPRI) || (rtnev & APR_POLLHUP)) read_connection(c); if ((rtnev & APR_POLLERR) || (rtnev & APR_POLLNVAL)) { bad++; err_except++; /* avoid apr_poll/EINPROGRESS loop on HP-UX, let recv discover ECONNREFUSED */ if (c->state == STATE_CONNECTING) { read_connection(c); } else { start_connect(c); } continue; } if (rtnev & APR_POLLOUT) { if (c->state == STATE_CONNECTING) { rv = apr_socket_connect(c->aprsock, destsa); if (rv != APR_SUCCESS) { set_conn_state(c, STATE_UNCONNECTED); apr_socket_close(c->aprsock); err_conn++; if (bad++ > 10) { fprintf(stderr, "\nTest aborted after 10 failures\n\n"); apr_err("apr_socket_connect()", rv); } start_connect(c); continue; } else { set_conn_state(c, STATE_CONNECTED); #ifdef USE_SSL if (c->ssl) ssl_proceed_handshake(c); else #endif write_request(c); } } else { write_request(c); } } } } while (lasttime < stoptime && done < requests); if (heartbeatres) fprintf(stderr, "Finished %d requests\n", done); else printf("..done\n"); if (use_html) output_html_results(); else output_results(0); }
[ "993273596@qq.com" ]
993273596@qq.com
f39b7ff5f2a381cd8c6438d360a276c935b53bb7
4158772a17e898801b6b681536f5c37440bcd96c
/libyasmine/source/transition_impl.cpp
235be5c341891106e547023ba4b3e74a7a0e52c1
[]
no_license
netaudio/yasmine
2780a2f6b0f2f7995a225568dd346f7b3e20c1cf
908adc64557ab008ea4fb4a2610fff22408aae92
refs/heads/master
2021-08-30T16:14:47.240236
2017-12-18T15:49:02
2017-12-18T15:49:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
15,081
cpp
////////////////////////////////////////////////////////////////////////////////////////////////////// // // // This file is part of the Seadex yasmine ecosystem (http://yasmine.seadex.de). // // Copyright (C) 2016-2017 Seadex GmbH // // // // Licensing information is available in the folder "license" which is part of this distribution. // // The same information is available on the www @ http://yasmine.seadex.de/Licenses.html. // // // ////////////////////////////////////////////////////////////////////////////////////////////////////// #include "transition_impl.hpp" #include <algorithm> #include "essentials/uri.hpp" #include "hermes/log.hpp" #include "vertex.hpp" #include "behavior.hpp" #include "constraint.hpp" #include "event.hpp" #include "state_machine_defect.hpp" #include "region.hpp" #include "state.hpp" #include "pseudostate.hpp" #include "composite_state.hpp" #include "initial_pseudostate.hpp" #include "exit_point.hpp" namespace sxy { #ifdef SX_CPP03_BOOST #ifdef _MSC_VER #pragma warning( push ) #pragma warning( disable : 4100 ) #endif #endif #ifdef SX_CPP03_BOOST transition_impl::transition_impl( const event_id _event_id, vertex& _source, vertex& _target, const sxy::transition_kind _kind, constraint_uptr _guard, behavior_uptr _behavior ) : state_machine_element_impl( get_transition_name(_source, _target, event_ids( 1, _event_id ) ) ), event_ids_( event_ids( 1, _event_id ) ), source_( _source ), target_( _target ), guard_( sxe::move( _guard ) ), behavior_( sxe::move( _behavior ) ), kind_( _kind ) { source_.add_outgoing_transition( *this ); target_.add_incoming_transition( *this ); } #else #ifdef _MSC_VER #if _MSC_VER <= 1800 transition_impl::transition_impl( const event_id _event_id, vertex& _source, vertex& _target, const sxy::transition_kind _kind, constraint_uptr _guard, behavior_uptr _behavior ) :state_machine_element_impl( get_transition_name( _source, _target, event_ids( 1, _event_id ) ) ), event_ids_( event_ids( 1, _event_id ) ), source_( _source ), target_( _target ), guard_( sxe::move( _guard ) ), behavior_( sxe::move( _behavior ) ), kind_( _kind ) { source_.add_outgoing_transition( *this ); target_.add_incoming_transition( *this ); } #else transition_impl::transition_impl( const event_id _event_id, vertex& _source, vertex& _target, const sxy::transition_kind _kind, constraint_uptr _guard, behavior_uptr _behavior ) : transition_impl( event_ids( 1, _event_id ), _source, _target, _kind, sxe::move( _guard ), sxe::move( _behavior ) ) { // Nothing to do... } #endif #else transition_impl::transition_impl( const event_id _event_id, vertex& _source, vertex& _target, const sxy::transition_kind _kind, constraint_uptr _guard, behavior_uptr _behavior ) :state_machine_element_impl( get_transition_name( _source, _target, event_ids( 1, _event_id ) ) ), event_ids_( event_ids( 1, _event_id ) ), source_( _source ), target_( _target ), guard_( sxe::move( _guard ) ), behavior_( sxe::move( _behavior ) ), kind_( _kind ) { source_.add_outgoing_transition( *this ); target_.add_incoming_transition( *this ); } #endif #endif #ifdef SX_CPP03_BOOST #ifdef _MSC_VER #pragma warning( pop ) #endif #endif transition_impl::transition_impl( const event_ids _event_ids, vertex& _source, vertex& _target, const sxy::transition_kind _kind, constraint_uptr _guard, behavior_uptr _behavior ) : state_machine_element_impl( get_transition_name( _source, _target, _event_ids ) ), event_ids_( _event_ids ), source_( _source ), target_( _target ), guard_( sxe::move( _guard ) ), behavior_( sxe::move( _behavior ) ), kind_( _kind ) { source_.add_outgoing_transition( *this ); target_.add_incoming_transition( *this ); } transition_impl::~transition_impl() SX_NOEXCEPT { source_.remove_outgoing_transition( *this ); target_.remove_incoming_transition( *this ); } const vertex& transition_impl::get_source() const { return( source_ ); } const vertex& transition_impl::get_target() const { return( target_ ); } vertex& transition_impl::get_target() { return( target_ ); } const constraint* transition_impl::get_guard() const { return( guard_.get() ); } const behavior* transition_impl::get_behavior() const { return( behavior_.get() ); } sxe::uri transition_impl::get_uri() const { sxe::uri uri( get_name() ); add_ancestor_uri( uri ); return( uri ); } const state_machine_element* transition_impl::get_parent() const { return( SX_NULLPTR ); } sxy::transition_kind transition_impl::get_kind() const { return( kind_ ); } void transition_impl::add_ancestor_uri( sxe::uri& _uri ) const { SX_UNUSED_PARAMETER( _uri ); } void transition_impl::on_transition_behavior( const event& _event, event_collector& _event_collector ) const { SX_LOG( hermes::log_level::LL_TRACE, "Executing transition '%' from '%' to '%'.", get_name(), get_source().get_name(), get_target().get_name() ); const behavior* const behavior = get_behavior(); if( behavior != SX_NULLPTR ) { ( *behavior )( _event, _event_collector ); } SX_LOG( hermes::log_level::LL_TRACE, "Executed transition '%' from '%' to '%'.", get_name(), get_source().get_name(), get_target().get_name() ); } bool transition_impl::check_guard( const event& _event, event_collector& _event_collector ) const { bool is_checked = true; if( guard_ ) { is_checked = ( *guard_ )( _event, _event_collector ); } return( is_checked ); } bool transition_impl::check( state_machine_defects& _defects ) const { bool check_ok = check_for_cross_region_transition( _defects ); if( sxy::transition_kind::INTERNAL == get_kind() ) { const state* const source_state = dynamic_cast< const state* >( &get_source() ); if( source_state ) { if( get_source().get_uri().to_string() != get_target().get_uri().to_string() ) { const std::string message = "Transition '%' has '%' kind, but it has different states as source and target! (source= '%', target = '%')."; _defects.push_back( state_machine_defect( *this, message, get_name(), to_string( get_kind() ), source_.get_name(), target_.get_name() ) ); check_ok = false; } } else { _defects.push_back( state_machine_defect( *this, "Source '%' of transition '%' (kind: '%') is not a state!", get_source().get_name(), get_name(), to_string( get_kind() ) ) ); check_ok = false; } } // Transition that enters a pseudostate cannot have a transition kind (it must be EXTERNAL). if( dynamic_cast< const pseudostate* >( &get_target() ) ) { if( get_kind() != transition_kind::EXTERNAL ) { _defects.push_back( state_machine_defect( *this, "Transition '%' enters pseudostate '%' but has '%' kind! It is not possible!", get_name(), get_target().get_name(), to_string( get_kind() ) ) ); check_ok = false; } } if( transition_kind::LOCAL == get_kind() ) { if( !check_if_source_and_target_are_in_ancestor_relationship( get_source(), get_target() ) ) { _defects.push_back( state_machine_defect( *this, "Transition's '%' source '%' and target '%' are not in a ancestor relationship!", get_name(), get_source().get_name(), get_target().get_name() ) ); check_ok = false; } if( check_ok ) { check_ok = check_child_parent_relationship_of_source_target_of_transition( _defects ); } else { check_child_parent_relationship_of_source_target_of_transition( _defects ); } } if( check_ok ) { check_ok = check_initial_pseudostate( _defects ); } else { check_initial_pseudostate( _defects ); } if( check_ok ) { check_ok = check_exit_point( _defects ); } else { check_exit_point( _defects ); } return( check_ok ); } bool transition_impl::can_accept_event( const event_id _event ) const { bool accept = false; if( std::find( event_ids_.begin(), event_ids_.end(), _event ) != event_ids_.end() ) { accept = true; } return( accept ); } bool transition_impl::check_if_source_and_target_are_in_ancestor_relationship( const vertex& _source, const vertex& _target ) { bool are_in_ancestor_relationship = false; const composite_state* const target_as_composite_state = dynamic_cast< const composite_state* >( &_target ); if( target_as_composite_state ) { are_in_ancestor_relationship = check_relationship( _source, target_as_composite_state ); } if( !are_in_ancestor_relationship ) { const composite_state* const source_as_composite_state = dynamic_cast< const composite_state* >( &_source ); if( source_as_composite_state ) { are_in_ancestor_relationship = check_relationship( _target, source_as_composite_state ); } } return( are_in_ancestor_relationship ); } bool transition_impl::check_relationship( const vertex& _lhs, const composite_state* _rhs ) { bool are_in_relationship = false; const raw_composite_states& lhs_ancestors = _lhs.get_ancestors( SX_NULLPTR ); SX_FOR( const composite_state* const ancestor, lhs_ancestors ) { if( ancestor == _rhs ) { are_in_relationship = true; break; } } return( are_in_relationship ); } std::string transition_impl::get_transition_name( vertex& _source, vertex& _target, const event_ids& _event_ids ) { std::string transition_name = _source.get_name() + "->" + _target.get_name(); if( !_event_ids.empty() ) { std::stringstream ids_as_string; for( size_t i = 0; i < _event_ids.size(); ++i ) { if( i != 0 ) { ids_as_string << ","; } ids_as_string << _event_ids[ i ]; } transition_name += "(" + ids_as_string.str() + ")"; } return( transition_name ); } bool transition_impl::check_for_cross_region_transition( state_machine_defects& _defects ) const { bool check_ok = true; const vertex& source = get_source(); const vertex& target = get_target(); const region* const lca_of_source_target = source.LCA_region( target ); if( lca_of_source_target ) { const raw_regions& source_ancestors = source.get_ancestors_as_regions(); raw_regions::const_iterator found_source_itr = std::find( source_ancestors.begin(), source_ancestors.end(), lca_of_source_target ); if( found_source_itr != source_ancestors.begin() ) { --found_source_itr; } const raw_regions& target_ancestors = target.get_ancestors_as_regions(); raw_regions::const_iterator found_target_itr = std::find( target_ancestors.begin(), target_ancestors.end(), lca_of_source_target ); if( found_target_itr != target_ancestors.begin() ) { --found_target_itr; } if( ( ( **found_source_itr ).get_uri().to_string() == lca_of_source_target->get_uri().to_string() ) || ( ( **found_target_itr ).get_uri().to_string() == lca_of_source_target->get_uri().to_string() ) ) { } else if( ( **found_source_itr ).get_uri().to_string() != ( **found_target_itr ).get_uri().to_string() ) { const composite_state& source_composite_state = ( **found_source_itr ).get_parent_state(); const composite_state& target_composite_state = ( **found_target_itr ).get_parent_state(); if( source_composite_state.get_uri().to_string() == target_composite_state.get_uri().to_string() ) { const std::string message = "Transition '%' has source ('%') and target ('%') in different regions of the same composite state."; _defects.push_back( state_machine_defect( *this, message, get_name(), source.get_name(), target.get_name() ) ); check_ok = false; } } } return( check_ok ); } bool transition_impl::check_child_parent_relationship_of_source_target_of_transition( state_machine_defects& _defects ) const { bool check_ok = true; const vertex& target = get_target(); const vertex& source = get_source(); if( &target != &source ) { raw_composite_states ancestors = target.get_ancestors( SX_NULLPTR ); raw_composite_states::const_iterator found_source_itr = std::find( ancestors.begin(), ancestors.end(), &source ); if( found_source_itr == ancestors.end() ) { _defects.push_back( state_machine_defect( *this, "Transition's '%' target '%' is not a child of the source '%' or the source vertex.", get_name(), get_target().get_name(), get_source().get_name() ) ); check_ok = false; } } return ( check_ok ); } bool transition_impl::check_initial_pseudostate( state_machine_defects& _defects ) const { bool check_ok = true; const initial_pseudostate* const initial = dynamic_cast< const initial_pseudostate* const >( &get_source() ); if( initial ) { const state* const target_state = dynamic_cast< const state* const >( &get_target() ); if( !target_state ) { _defects.push_back( state_machine_defect( *this, "Transition's '%' target '%' is not a state! The target of the transition emanating from initial pseudostate is always a state.", get_name(), get_target().get_name() ) ); check_ok = false; } else { if( initial->get_parent_region() != initial->LCA_region( *target_state ) ) { _defects.push_back( state_machine_defect( *this, "Transition '%' is targeting a state('%') out of the parent region of the initial pseudostate(source)!", get_name(), get_target().get_name() ) ); check_ok = false; } } } return( check_ok ); } // Transition's source is a child of target's parent state or the parent state itself, when the target is an exit point. bool transition_impl::check_exit_point( state_machine_defects& _defects ) const { bool check_ok = true; const exit_point* const target_exit_point = dynamic_cast< const exit_point* const >( &get_target() ); if( target_exit_point ) { sxy::composite_state& parent_of_exit_point = target_exit_point->get_parent_state(); raw_composite_states ancestors = get_source().get_ancestors( SX_NULLPTR ); raw_composite_states::const_iterator found_source_itr = std::find( ancestors.begin(), ancestors.end(), &parent_of_exit_point ); if( found_source_itr == ancestors.end() ) { _defects.push_back( state_machine_defect( *this, "Transition '%' emanates from outside of the parent state of the exit point '%', which is the target of the transition.", get_name(), get_target().get_name() ) ); check_ok = false; } } return( check_ok ); } }
[ "noreply@github.com" ]
noreply@github.com
11f08213bc8647dd95d6350356d0538eae8b29df
0e2b0b78dbd0d8539fea8ea15746d265a33fef48
/include/Field.h
9489cf9f780efdb533f98c05ce4341b521de5144
[]
no_license
whattopick/--CrazyTanks--old-version-don-t-look
2a48f3a24f3df74de46fda3304eae910ccc6ec84
f8e783f950fed3568ecea79dc4345fe9c6987967
refs/heads/master
2021-04-12T02:42:37.742074
2018-03-19T05:47:05
2018-03-19T05:47:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
9,012
h
#ifndef FIELD_H #define FIELD_H #include "CursorController.h" class Field { public: Field(int,int, int, int); virtual ~Field(); int getTotalKills(); int getTotalDefeats(); int fieldLeftCorner_[2] = {0, 2}; const static int fieldWidth_ = 30; const static int fieldHeight_=15; bool isEmpty(int, int, int); bool isEnemy(int, int, int); int getLevel(); void drawTime(); protected: private: int level_; int enemiesCount_; int previousEnemiesCount_; int enemiesKilled_; int totalKills_; int defeats_; int previousHealth_; int health_; CursorController * cursorController_; char * level0_[fieldHeight_][fieldWidth_] ={ {" ","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_"," "}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," ","_","_"," "," "," "," "," "," "," "," "," ","_","_","_","_"," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," ","_","_","_","_","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","_","_","_"," "," "," ","|"}, {"|"," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {" ","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-"," "} }; char * level1_[fieldHeight_][fieldWidth_] ={ {" ","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_"," "}, {"|"," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," ","|","_","_","_"," "," "," "," ","_","_","_","_","_"," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," ","_","_","_"," "," "," "," "," "," "," "," "," "," ","_","|","_","_","_"," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {" ","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-"," "} }; char * level2_[fieldHeight_][fieldWidth_] ={ {" ","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_"," "}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," ","_","_","_"," "," "," "," ","_","_","_","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," ","|"," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," ","|"," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," ","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {"|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|"}, {" ","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-"," "} }; // public: // char * levelAdd0_[fieldHeight_][fieldWidth_]; // char * levelAdd1_[fieldHeight_][fieldWidth_]; // char * levelAdd2_[fieldHeight_][fieldWidth_]; // // int levelSp0_[9][2] = { // {1, 1}, // {8, 2}, // {1, 7}, // {14,3}, // {19, 1}, // {24, 3}, // {17, 5}, // {22, 8}, // {9, 6} // }; // // int levelSp1_[9][2] = { // {1,1}, // {1,5}, // {1,9}, // {6,7}, // {6,11}, // {10,1}, // {15,1}, // {26,1}, // {26,9} // }; // // int levelSp2_[9][2] = { // {2,1}, // {7,1}, // {3,5}, // {12,2}, // {17, 1}, // {26, 3}, // {22,7}, // {6, 11}, // {22,11} // }; // // private: int getEnemiesCount(); void drawField(); // void drawHealth(); //++++++++++ void drawEnemiesLeft(); //++++++++++ void drawKills(); //++++++++++ void drawDefeats(); // void drawTotalKills(); // void drawTime(); // void drawHelp(); // void drawDisclaimer(); // void drawHeader(); //++++++++++ void drawLevel(int); //++++++++++ int getMaxHealth(); //++++++++++ /*static STATE state_; static STATE handlerKeypressQ(); static STATE handlerKeypressP(); static STATE handlerKeypressU(); static STATE handlerSigDefeat(); static STATE handlerSigVictory(); static STATE handlerKeypressR(); typedef STATE (*SIGNAL_HANDLER)(void); const static SIGNAL_HANDLER handlerKeypressQ_, handlerKeypressP_, handlerKeypressU_, handlerSigDefeat_, handlerSigVictory_, handlerKeypressR_; SIGNAL_HANDLER handlers_[]={ handlerKeypressQ_, handlerKeypressP_, handlerKeypressU_, handlerSigDefeat_, handlerSigVictory_, handlerKeypressR_ }; void fieldStateMachine(SIGNAL);*/ }; #endif // FIELD_H
[ "37048109+whattopick@users.noreply.github.com" ]
37048109+whattopick@users.noreply.github.com
6f00a83f8e2d5f3ec392721861fd53777b0ac13d
93c38ea1f4f2fc6cdded9066e320d5e356ad5bd4
/example1_vecmult/vecmult.cpp
bc6b3e7b017a23c16d2b9ec6dcea9369c05ce523
[]
no_license
apaznikov/multithreading-course
d2db11cad73b8a593fa0d53352db1f903430f0e1
6a1e070eb09a31f1a8799af1f7379719f73e1c5e
refs/heads/master
2020-04-07T19:33:01.478115
2019-01-17T06:34:41
2019-01-17T06:38:12
158,652,988
0
0
null
null
null
null
UTF-8
C++
false
false
3,620
cpp
// // vecmult.cpp: Parallel two vector multiplication // // (C) 2018 Alexey Paznikov <apaznikov@gmail.com> // #include <iostream> #include <vector> #include <random> #include <algorithm> #include <thread> #include <mutex> #include <chrono> #include <fstream> const auto nelem = 64000000; const auto maxrand = 100; const auto nruns = 10; using vectype = double; using vec_t = std::vector<vectype>; // #define _DEBUG #ifdef _DEBUG std::mutex mutex; #endif class thread_raii { public: thread_raii(std::thread&& _t): t{std::move(_t)} { } thread_raii(thread_raii &&thr_raii): t{std::move(thr_raii.t)} { } ~thread_raii() { if (t.joinable()) { t.join(); } } std::thread& get() { return t; } private: std::thread t; }; static auto rand_gen() { static std::random_device rnd_device; static std::mt19937 mersenne_engine{rnd_device()}; static std::uniform_int_distribution<int> dist{1, maxrand}; return dist(mersenne_engine); } static void genrandvec(vec_t &vec) { std::generate(begin(vec), end(vec), rand_gen); } #ifdef _DEBUG static void printvec(vec_t &vec) { for (auto elem: vec) std::cout << elem << " "; std::cout << std::endl; } #endif static void mult_k_chunk(int thr_id, int nthreads, vec_t &vec, vectype k) { const auto chunk_size = vec.size() / nthreads; const auto chunk_low = chunk_size * thr_id; const auto chunk_high = chunk_size * (thr_id + 1); #ifdef _DEBUG std::unique_lock<std::mutex> lock(mutex); std::cout << "I am thread " << thr_id << std::endl; lock.unlock(); #endif auto vec_data = vec.data(); for (auto i = chunk_low; i < chunk_high; i++) vec_data[i] *= k; } static void parallel_mult_k(vec_t &vec, int max_threads, vectype k) { std::vector<thread_raii> threads; for (auto thr_id = 0; thr_id < max_threads; thr_id++) threads.emplace_back(thread_raii{ std::thread{mult_k_chunk, thr_id, max_threads, std::ref(vec), k}}); // for (auto &thr: threads) // thr.join(); } int main(int argc, const char *argv[]) { vec_t vec(nelem); genrandvec(vec); #ifdef _DEBUG printvec(vec); #endif const auto max_threads = std::thread::hardware_concurrency(); auto get_time = std::chrono::steady_clock::now; decltype(get_time()) start, end; // Serial start = get_time(); for (auto i = 0; i < nruns; i++) { auto k = rand_gen(); mult_k_chunk(0, 1, vec, k); } end = get_time(); auto elapsed = std::chrono::duration_cast <std::chrono::milliseconds>(end - start).count(); auto ser_time = double(elapsed) / nruns; std::cout << "Serial time: " << ser_time << std::endl; // Parallel std::ofstream speedupfile{"speedup"}; if (!speedupfile.is_open()) { std::cerr << "can't open file" << std::endl; return 1; } for (auto nthr = 2u; nthr <= max_threads; nthr++) { start = get_time(); for (auto i = 0; i < nruns; i++) { auto k = rand_gen(); parallel_mult_k(vec, nthr, k); } end = get_time(); elapsed = std::chrono::duration_cast <std::chrono::milliseconds>(end - start).count(); auto par_time = double(elapsed) / nruns; std::cout << "Threads: " << nthr << " elapsed time " << par_time << " speedup " << ser_time / par_time << std::endl; speedupfile << nthr << "\t" << ser_time / par_time << std::endl; } speedupfile.close(); #ifdef _DEBUG printvec(vec); #endif return 0; }
[ "apaznikov@gmail.com" ]
apaznikov@gmail.com
39cada52c70fb2540049d31e595ffbc80f748117
cea791ea54a82c7ea2794a953d322930cec03424
/Tarea 2/loglog.hpp
74c117cf1a6bb7692a69aaf0a3ac280a49b97d7e
[]
no_license
Cocobio/BigData
dcd3097eee3059600a15f9f161fe7f6d431bc2ce
74b3a5a7d5cee5e37eb7a14c95d3dcbf6d7b83ea
refs/heads/master
2023-04-05T03:35:40.871829
2021-04-13T04:02:57
2021-04-13T04:02:57
308,225,098
0
0
null
null
null
null
UTF-8
C++
false
false
662
hpp
#ifndef LOGLOG #define LOGLOG #include <cmath> #include <cstring> #include <algorithm> #include <functional> #include <ctime> #include <cstdlib> template <class T> class LogLog { public: typedef T element; typedef unsigned long long hashed; protected: unsigned char* M; // hash<element> h; std::function<hashed(element&,unsigned&)> hash; unsigned hash_seed; unsigned char b; unsigned int m; // 2^b float fc; void fc_table(); public: LogLog(std::function<hashed(element&,unsigned&)> h, int b=4); ~LogLog() { delete[] M; } void update(element x_i); unsigned int cardinal(); size_t size_in_bytes(); }; #include "loglog.cpp" #endif
[ "iosorio@udec.cl" ]
iosorio@udec.cl
0cae18dc6e204dc651bcb5d324b583d7438fabe6
a0f45dac9048e2fcb1297c73c4f14811e91d2fdb
/src/3DModules/Fitter/ReconBuffer.hh
8a847ea43f79a6798526b191a294509e8fe1514f
[]
no_license
snoplus/snogoggles
ef6bd1078d5327d8263362e0cc6a04fac24243b6
ae6051ba5b0fe9caf0bd569d4f3577b28afa421b
refs/heads/master
2016-09-05T21:19:38.710515
2013-06-13T15:10:16
2013-06-13T15:10:16
3,463,699
4
1
null
2013-03-29T23:44:57
2012-02-16T20:34:27
C++
UTF-8
C++
false
false
955
hh
//////////////////////////////////////////////////////////////////////// /// \class ReconBuffer /// /// \brief Special VBO to create, store and render vertices for fitted /// positions. /// /// \author Phil G Jones <p.g.jones@qmul.ac.uk> /// /// REVISION HISTORY:\n /// 05/04/13 : P.Jones - First Revision, new file. \n /// /// \detail For each position draws a 3d cross. /// Rendering is done using the parent VBO class. \n /// //////////////////////////////////////////////////////////////////////// #ifndef __Viewer_ReconBuffer__ #define __Viewer_ReconBuffer__ #include <map> #include <string> #include <Viewer/VBO.hh> namespace Viewer { class Colour; namespace RIDS { class Vertex; } class ReconBuffer { public: void Clear(); void Render(); void AddVertex( const RIDS::Vertex& vertex, const Colour& colour ); private: std::map< std::string, VBO > fVertices; }; } // namespace Viewer #endif
[ "p.g.jones@qmul.ac.uk" ]
p.g.jones@qmul.ac.uk
e0eac2984d0654b86dd8ce4be4e6403e91a8feca
d826dc564134ef85a6bd8b7ec7f8268a5049d5c3
/src/tools.cpp
3eb120350b55bc4bd7afa544fe6913cac289a57c
[]
no_license
kenshi84/lmdbcpp-monero
fa83940bf64b65c46837871c5baf75fdaadc5a60
786ff5309dd2bc00a6d63cd71b25c017bfeb7d8c
refs/heads/master
2021-01-12T00:16:12.675279
2017-01-12T02:06:27
2017-01-12T02:06:27
78,700,943
0
0
null
2017-01-12T02:34:00
2017-01-12T02:34:00
null
UTF-8
C++
false
false
20,112
cpp
// // Created by marcin on 5/11/15. // #include "tools.h" namespace xmreg { /** * Parse key string, e.g., a viewkey in a string * into crypto::secret_key or crypto::public_key * depending on the template argument. */ template <typename T> bool parse_str_secret_key(const string& key_str, T& secret_key) { // hash and keys have same structure, so to parse string of // a key, e.g., a view key, we can first parse it into the hash // object using parse_hash256 function, and then copy the reslting // hash data into secret key. crypto::hash hash_; if(!parse_hash256(key_str, hash_)) { cerr << "Cant parse a key (e.g. viewkey): " << key_str << endl; return false; } // crypto::hash and crypto::secret_key have basicly same // structure. They both keep they key/hash as c-style char array // of fixed size. Thus we can just copy data from hash // to key copy(begin(hash_.data), end(hash_.data), secret_key.data); return true; } // explicit instantiations of get template function template bool parse_str_secret_key<crypto::secret_key>(const string& key_str, crypto::secret_key& secret_key); template bool parse_str_secret_key<crypto::public_key>(const string& key_str, crypto::public_key& secret_key); template bool parse_str_secret_key<crypto::hash>(const string& key_str, crypto::hash& secret_key); /** * Get transaction tx using given tx hash. Hash is represent as string here, * so before we can tap into the blockchain, we need to pare it into * crypto::hash object. */ bool get_tx_pub_key_from_str_hash(Blockchain& core_storage, const string& hash_str, transaction& tx) { crypto::hash tx_hash; parse_hash256(hash_str, tx_hash); try { // get transaction with given hash tx = core_storage.get_db().get_tx(tx_hash); } catch (const TX_DNE& e) { cerr << e.what() << endl; return false; } return true; } /** * Parse monero address in a string form into * cryptonote::account_public_address object */ bool parse_str_address(const string& address_str, account_public_address& address, bool testnet) { if (!get_account_address_from_str(address, testnet, address_str)) { cerr << "Error getting address: " << address_str << endl; return false; } return true; } /** * Return string representation of monero address */ string print_address(const account_public_address& address, bool testnet) { return "<" + get_account_address_as_str(testnet, address) + ">"; } string print_sig (const signature& sig) { stringstream ss; ss << "c: <" << epee::string_tools::pod_to_hex(sig.c) << "> " << "r: <" << epee::string_tools::pod_to_hex(sig.r) << ">"; return ss.str(); } /** * Check if a character is a path seprator */ inline bool is_separator(char c) { // default linux path separator const char separator = PATH_SEPARARTOR; return c == separator; } /** * Remove trailinig path separator. */ string remove_trailing_path_separator(const string& in_path) { string new_string = in_path; if (!new_string.empty() && is_separator(new_string[new_string.size() - 1])) new_string.erase(new_string.size() - 1); return new_string; } bf::path remove_trailing_path_separator(const bf::path& in_path) { string path_str = in_path.native(); return bf::path(remove_trailing_path_separator(path_str)); } string timestamp_to_str(time_t timestamp, const char* format) { const int TIME_LENGTH = 60; char str_buff[TIME_LENGTH]; tm *tm_ptr; tm_ptr = localtime(&timestamp); size_t len; len = std::strftime(str_buff, TIME_LENGTH, format, tm_ptr); return string(str_buff, len); } ostream& operator<< (ostream& os, const account_public_address& addr) { os << get_account_address_as_str(false, addr); return os; } /* * Generate key_image of foran ith output */ bool generate_key_image(const crypto::key_derivation& derivation, const std::size_t i, const crypto::secret_key& sec_key, const crypto::public_key& pub_key, crypto::key_image& key_img) { cryptonote::keypair in_ephemeral; if (!crypto::derive_public_key(derivation, i, pub_key, in_ephemeral.pub)) { cerr << "Error generating publick key " << pub_key << endl; return false; } try { crypto::derive_secret_key(derivation, i, sec_key, in_ephemeral.sec); } catch(const std::exception& e) { cerr << "Error generate secret image: " << e.what() << endl; return false; } try { crypto::generate_key_image(in_ephemeral.pub, in_ephemeral.sec, key_img); } catch(const std::exception& e) { cerr << "Error generate key image: " << e.what() << endl; return false; } return true; } string get_default_lmdb_folder(bool testnet) { // default path to monero folder // on linux this is /home/<username>/.bitmonero string default_monero_dir = tools::get_default_data_dir(); if (testnet) default_monero_dir += "/testnet"; // the default folder of the lmdb blockchain database // is therefore as follows return default_monero_dir + string("/lmdb"); } /* * Ge blockchain exception from command line option * * If not given, provide default path */ bool get_blockchain_path(const boost::optional<string>& bc_path, bf::path& blockchain_path, bool testnet) { // the default folder of the lmdb blockchain database string default_lmdb_dir = xmreg::get_default_lmdb_folder(testnet); blockchain_path = bc_path ? bf::path(*bc_path) : bf::path(default_lmdb_dir); if (!bf::is_directory(blockchain_path)) { cerr << "Given path \"" << blockchain_path << "\" " << "is not a folder or does not exist" << " " << endl; return false; } blockchain_path = xmreg::remove_trailing_path_separator(blockchain_path); return true; } uint64_t sum_money_in_outputs(const transaction& tx) { uint64_t sum_xmr {0}; for (const tx_out& txout: tx.vout) { sum_xmr += txout.amount; } return sum_xmr; } uint64_t sum_money_in_inputs(const transaction& tx) { uint64_t sum_xmr {0}; size_t input_no = tx.vin.size(); for (size_t i = 0; i < input_no; ++i) { if(tx.vin[i].type() != typeid(cryptonote::txin_to_key)) { continue; } // get tx input key const cryptonote::txin_to_key& tx_in_to_key = boost::get<cryptonote::txin_to_key>(tx.vin[i]); sum_xmr += tx_in_to_key.amount; } return sum_xmr; } array<uint64_t, 2> sum_money_in_tx(const transaction& tx) { array<uint64_t, 2> sum_xmr; sum_xmr[0] = sum_money_in_inputs(tx); sum_xmr[1] = sum_money_in_outputs(tx); return sum_xmr; }; array<uint64_t, 2> sum_money_in_txs(const vector<transaction>& txs) { array<uint64_t, 2> sum_xmr {0,0}; for (const transaction& tx: txs) { sum_xmr[0] += sum_money_in_inputs(tx); sum_xmr[1] += sum_money_in_outputs(tx); } return sum_xmr; }; uint64_t sum_fees_in_txs(const vector<transaction>& txs) { uint64_t fees_sum {0}; for (const transaction& tx: txs) { fees_sum += get_tx_fee(tx); } return fees_sum; } vector<pair<txout_to_key, uint64_t>> get_ouputs(const transaction& tx) { vector<pair<txout_to_key, uint64_t>> outputs; for (const tx_out& txout: tx.vout) { if (txout.target.type() != typeid(txout_to_key)) { continue; } // get tx input key const txout_to_key& txout_key = boost::get<cryptonote::txout_to_key>(txout.target); outputs.push_back(make_pair(txout_key, txout.amount)); } return outputs; }; vector<tuple<txout_to_key, uint64_t, uint64_t>> get_ouputs_tuple(const transaction& tx) { vector<tuple<txout_to_key, uint64_t, uint64_t>> outputs; for (uint64_t n = 0; n < tx.vout.size(); ++n) { if (tx.vout[n].target.type() != typeid(txout_to_key)) { continue; } // get tx input key const txout_to_key& txout_key = boost::get<cryptonote::txout_to_key>(tx.vout[n].target); outputs.push_back(make_tuple(txout_key, tx.vout[n].amount, n)); } return outputs; }; uint64_t get_mixin_no(const transaction& tx) { uint64_t mixin_no {0}; size_t input_no = tx.vin.size(); for (size_t i = 0; i < input_no; ++i) { if(tx.vin[i].type() != typeid(cryptonote::txin_to_key)) { continue; } // get tx input key const txin_to_key& tx_in_to_key = boost::get<cryptonote::txin_to_key>(tx.vin[i]); mixin_no = tx_in_to_key.key_offsets.size(); // look for first mixin number. // all inputs in a single transaction have same number if (mixin_no > 0) { break; } } return mixin_no; } vector<uint64_t> get_mixin_no_in_txs(const vector<transaction>& txs) { vector<uint64_t> mixin_no; for (const transaction& tx: txs) { mixin_no.push_back(get_mixin_no(tx)); } return mixin_no; } vector<txin_to_key> get_key_images(const transaction& tx) { vector<txin_to_key> key_images; size_t input_no = tx.vin.size(); for (size_t i = 0; i < input_no; ++i) { if(tx.vin[i].type() != typeid(txin_to_key)) { continue; } // get tx input key const txin_to_key& tx_in_to_key = boost::get<cryptonote::txin_to_key>(tx.vin[i]); key_images.push_back(tx_in_to_key); } return key_images; } bool get_payment_id(const vector<uint8_t>& extra, crypto::hash& payment_id, crypto::hash8& payment_id8) { payment_id = null_hash; payment_id8 = null_hash8; std::vector<tx_extra_field> tx_extra_fields; if(!parse_tx_extra(extra, tx_extra_fields)) { return false; } tx_extra_nonce extra_nonce; if (find_tx_extra_field_by_type(tx_extra_fields, extra_nonce)) { // first check for encrypted id and then for normal one if(get_encrypted_payment_id_from_tx_extra_nonce(extra_nonce.nonce, payment_id8)) { return true; } else if (get_payment_id_from_tx_extra_nonce(extra_nonce.nonce, payment_id)) { return true; } } return false; } bool get_payment_id(const transaction& tx, crypto::hash& payment_id, crypto::hash8& payment_id8) { return get_payment_id(tx.extra, payment_id, payment_id8); } /** * Rough estimate of block height from the time provided * */ uint64_t estimate_bc_height(const string& date, const char* format) { const pt::ptime MONERO_START {gt::date(2014,04,18)}; const uint64_t MONERO_BLOCK_TIME {60}; // seconds dateparser parser {format}; if (!parser(date)) { throw runtime_error(string("Date format is incorrect: ") + date); } pt::ptime requested_date = parser.pt; if (requested_date < MONERO_START) { return 0; } pt::time_duration td = requested_date - MONERO_START; return static_cast<uint64_t>(td.total_seconds()) / MONERO_BLOCK_TIME; } array<size_t, 5> timestamp_difference(uint64_t t1, uint64_t t2) { uint64_t timestamp_diff = t1 - t2; // calculate difference of timestamps from current block to the mixin one if (t2 > t1) { timestamp_diff = t2 - t1; } uint64_t time_diff_years = timestamp_diff / 31536000; timestamp_diff -= time_diff_years * 31536000; uint64_t time_diff_days = timestamp_diff / 86400; timestamp_diff -= time_diff_days * 86400; uint64_t time_diff_hours = timestamp_diff / 3600; timestamp_diff -= time_diff_hours * 3600; uint64_t time_diff_minutes = timestamp_diff / 60; timestamp_diff -= time_diff_minutes * 60; uint64_t time_diff_seconds = timestamp_diff ; return array<size_t, 5> {time_diff_years, time_diff_days, time_diff_hours, time_diff_minutes, time_diff_seconds}; }; string read(string filename) { if (!bf::exists(bf::path(filename))) { cerr << "File does not exist: " << filename << endl; return string(); } std::ifstream t(filename); return string(std::istreambuf_iterator<char>(t), std::istreambuf_iterator<char>()); } pair<string, double> timestamps_time_scale(const vector<uint64_t>& timestamps, uint64_t timeN, uint64_t resolution, uint64_t time0) { string empty_time = string(resolution, '_'); size_t time_axis_length = empty_time.size(); uint64_t interval_length = timeN-time0; double scale = double(interval_length) / double(time_axis_length); for (const auto& timestamp: timestamps) { if (timestamp < time0 || timestamp > timeN) { cout << "Out of range" << endl; continue; } uint64_t timestamp_place = double(timestamp-time0) / double(interval_length)*(time_axis_length - 1); empty_time[timestamp_place + 1] = '*'; } return make_pair(empty_time, scale); } bool decode_ringct(const rct::rctSig& rv, const crypto::public_key pub, const crypto::secret_key &sec, unsigned int i, rct::key & mask, uint64_t & amount) { crypto::key_derivation derivation; bool r = crypto::generate_key_derivation(pub, sec, derivation); if (!r) { cerr <<"Failed to generate key derivation to decode rct output " << i << endl; return false; } crypto::secret_key scalar1; crypto::derivation_to_scalar(derivation, i, scalar1); try { switch (rv.type) { case rct::RCTTypeSimple: amount = rct::decodeRctSimple(rv, rct::sk2rct(scalar1), i, mask); break; case rct::RCTTypeFull: amount = rct::decodeRct(rv, rct::sk2rct(scalar1), i, mask); break; default: cerr << "Unsupported rct type: " << rv.type << endl; return false; } } catch (const std::exception &e) { cerr << "Failed to decode input " << i << endl; return false; } return true; } bool url_decode(const std::string& in, std::string& out) { out.clear(); out.reserve(in.size()); for (std::size_t i = 0; i < in.size(); ++i) { if (in[i] == '%') { if (i + 3 <= in.size()) { int value = 0; std::istringstream is(in.substr(i + 1, 2)); if (is >> std::hex >> value) { out += static_cast<char>(value); i += 2; } else { return false; } } else { return false; } } else if (in[i] == '+') { out += ' '; } else { out += in[i]; } } return true; } map<std::string, std::string> parse_crow_post_data(const string& req_body) { map<std::string, std::string> body; vector<string> vec; string tmp; bool result = url_decode(req_body, tmp); if (result) { boost::algorithm::split(vec, tmp, [](char x) {return x == '&'; }); for(auto &it : vec) { auto pos = it.find("="); if (pos != string::npos) { body[it.substr(0, pos)] = it.substr(pos + 1); } else { break; } } } return body; } bool get_dummy_account_keys(account_keys& dummy_keys, bool testnet) { secret_key adress_prv_viewkey; secret_key adress_prv_spendkey; account_public_address dummy_address; if (!get_account_address_from_str(dummy_address, testnet, "4BAyX63gVQgDqKS1wmqNVHdcCNjq1jooLYCXsKEY9w7VdGh45oZbPLvN7y8oVg2zmnhECkRBXpREWb97KtfAcT6p1UNXm9K")) { return false; } if (!epee::string_tools::hex_to_pod("f238be69411631f35b76c5a9148b3b7e8327eb41bfd0b396e090aeba40235d01", adress_prv_viewkey)) { return false; } if (!epee::string_tools::hex_to_pod("5db8e1d2c505f888e54aca15b1a365c8814d7deebc1a246690db3bf71324950d", adress_prv_spendkey)) { return false; } dummy_keys = account_keys { dummy_address, adress_prv_spendkey, adress_prv_viewkey }; return true; } }
[ "moneroexamples@tuta.io" ]
moneroexamples@tuta.io
fe85d3661aaa45c12f1949923b7c7fefe6effc53
f458038b0fd4ed79fc5ad8efa1e1170a57a7e769
/Bootcamp/Session7/LargestElementInArray.cpp
278be74eb598023da144543333cbf770c3102075
[ "MIT" ]
permissive
sgpritam/DSAlgo
c000519d1bde0907d5af477893e3dff0e0806add
3e0e6b19d4f8978b2fc3be48195705a285dbdce8
refs/heads/master
2021-02-26T09:27:36.594473
2020-10-01T14:22:27
2020-10-01T14:22:27
245,515,797
1
0
MIT
2020-10-01T14:22:28
2020-03-06T21:01:36
C++
UTF-8
C++
false
false
281
cpp
#include<bits/stdc++.h> using namespace std; int main(){ int a[1000]; int n; cin>>n; int max = a[0]; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<n;i++){ if(a[i]>max){ max = a[i]; } } cout<<max<<endl; }
[ "pritam1bnk@gmail.com" ]
pritam1bnk@gmail.com
512aef0a583a4511955a800c9666e60d28d572ca
785df77400157c058a934069298568e47950e40b
/include/Geo2d_SegmentCloud_SamplesLev1.hxx
8712ec8e691984a0cd449043b31c8ca7b5141696
[]
no_license
amir5200fx/Tonb
cb108de09bf59c5c7e139435e0be008a888d99d5
ed679923dc4b2e69b12ffe621fc5a6c8e3652465
refs/heads/master
2023-08-31T08:59:00.366903
2023-08-31T07:42:24
2023-08-31T07:42:24
230,028,961
9
3
null
2023-07-20T16:53:31
2019-12-25T02:29:32
C++
UTF-8
C++
false
false
254
hxx
#pragma once #ifndef _Geo2d_SegmentCloud_SamplesLev1_Header #define _Geo2d_SegmentCloud_SamplesLev1_Header #include <Geo2d_SegmentCloud_SamplesLev1Fwd.hxx> #include <Geo3d_SegmentCloud_SamplesLev1.hxx> #endif // !_Geo2d_SegmentCloud_SamplesLev1_Header
[ "aasoleimani86@gmail.com" ]
aasoleimani86@gmail.com
e26c52ff704fdbfef0d0f14f41fa39a93f6d7ba2
a230afa027a8a672c3d3581df13439127c795a55
/Rendrer/Physics/PhysicsManager.h
1327ed6332d5e8ec354c1ca4c8cd765430892041
[]
no_license
ASDen/CGsp
fbecb2463d975412f85fa343e87fda9707b7801a
2657b72269566c59cc0127239e3827f359197f9e
refs/heads/master
2021-01-25T12:02:10.331018
2010-09-22T12:43:19
2010-09-22T12:43:19
503,933
1
0
null
null
null
null
UTF-8
C++
false
false
3,459
h
#pragma once class CGSP_CC PhysicsManager : public BaseManager { public: //typedef RigidBodyUpdateCallBack UpdateCallback; NxPhysicsSDK* gPhysicsSDK; NxScene* gScene; UserAllocator* gAllocator; NxVec3 gDefaultGravity; ErrorStream gErrorStream; bool gHardwareSimulation; bool gCookingInitialized; bool InitNx(void) { // Initialize PhysicsSDK NxPhysicsSDKDesc desc; NxSDKCreateError errorCode = NXCE_NO_ERROR; gAllocator = new UserAllocator; gPhysicsSDK = NxCreatePhysicsSDK(NX_PHYSICS_SDK_VERSION, gAllocator, &gErrorStream, desc, &errorCode); if(gPhysicsSDK == NULL) { printf("\nSDK create error (%d - %s).\nUnable to initialize the PhysX SDK.\n\n", errorCode, getNxSDKCreateError(errorCode)); return false; } #if PHYSX_USE_VRD // The settings for the VRD host and port are found in SampleCommonCode/SamplesVRDSettings.h if (gPhysicsSDK->getFoundationSDK().getRemoteDebugger() && !gPhysicsSDK->getFoundationSDK().getRemoteDebugger()->isConnected()) gPhysicsSDK->getFoundationSDK().getRemoteDebugger()->connect(SAMPLES_VRD_HOST, SAMPLES_VRD_PORT, SAMPLES_VRD_EVENTMASK); #endif NxHWVersion hwCheck = gPhysicsSDK->getHWVersion(); if (hwCheck == NX_HW_VERSION_NONE) { printf("\nWarning: Unable to find a PhysX card...\n\n"); gHardwareSimulation = false; } if (!gCookingInitialized) { gCookingInitialized = true; if (!InitCooking(NULL, &gErrorStream)) { printf("\nError: Unable to initialize the cooking library.\n\n"); return false; } } // Set the physics parameters gPhysicsSDK->setParameter(NX_SKIN_WIDTH, 0.005f); // Set the debug visualization parameters gPhysicsSDK->setParameter(NX_VISUALIZATION_SCALE, 1); gPhysicsSDK->setParameter(NX_VISUALIZE_CLOTH_MESH, 1); gPhysicsSDK->setParameter(NX_VISUALIZE_CLOTH_VALIDBOUNDS, 1); // setup the scene NxSceneDesc sceneDesc; sceneDesc.gravity = gDefaultGravity; gScene = gPhysicsSDK->createScene(sceneDesc); if(gScene == NULL) { printf("\nError: Unable to create a PhysX scene.\n\n"); return false; } // Create the default material NxMaterialDesc m; m.restitution = 0.5f; m.staticFriction = 0.2f; m.dynamicFriction= 0.2f; NxMaterial * mat = gScene->getMaterialFromIndex(0); mat->loadFromDesc(m); //gScene->setTiming(1.0f/60.0f, 5, NX_TIMESTEP_FIXED); return true; } // releases physx void ReleaseNx() { if (gCookingInitialized) CloseCooking(); gCookingInitialized = false; if(gPhysicsSDK != NULL) { if(gScene != NULL) gPhysicsSDK->releaseScene(*gScene); gScene = NULL; NxReleasePhysicsSDK(gPhysicsSDK); gPhysicsSDK = NULL; } } // physx reset void ResetNx() { ReleaseNx(); if (!InitNx()) exit(0); } void InitOsg(int width=640,int height=480) { BaseManager::InitOsg(); viewer->addEventHandler(new PhysicsEventHandler(this)); InitNx(); } NxActor* AddActor(PolyhedronNode* Pn) { return gScene->createActor((Pn->ActorDesc)); } NxSceneDesc sceneDesc; void UpdateScene() { //update scence gScene->simulate(1/rate); gScene->flushStream(); gScene->fetchResults(NX_ALL_FINISHED, true); } PhysicsManager() { gCookingInitialized = false; gHardwareSimulation = true; gDefaultGravity = NxVec3(0,-9.8,0); } };
[ "harrrrpo@gmail.com" ]
harrrrpo@gmail.com
628daefafc2b28322779c76d842e7c4d81f62adf
ff5313a6e6c9f9353f7505a37a57255c367ff6af
/hdstart/StdAfx.cpp
f1915ce7fd58adbccac162e10adf82fd27cb1e97
[]
no_license
badcodes/vc6
467d6d513549ac4d435e947927d619abf93ee399
0c11d7a81197793e1106c8dd3e7ec6b097a68248
refs/heads/master
2016-08-07T19:14:15.611418
2011-07-09T18:05:18
2011-07-09T18:05:18
1,220,419
1
0
null
null
null
null
UTF-8
C++
false
false
296
cpp
// stdafx.cpp : source file that includes just the standard includes // hdstart.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file
[ "eotect@gmail.com" ]
eotect@gmail.com
c1c624b31d97d1fb234ff5fd18ab88aa26b1196f
39bc6a37973c1b3369defd137ace6951ae8675cf
/Core/KCollider2D.cpp
4cd53bcb9f0d7140aa761f984bfeaefaec07c385
[]
no_license
hki2345/DirectX11_FrameWork
facdc03671da7dee07344413c2ea3d0ef2d0fa7b
70db10de425da6c68add18bd18a9b27080ff916b
refs/heads/master
2021-06-24T13:53:01.411290
2019-08-05T15:43:42
2019-08-05T15:43:42
150,975,486
0
0
null
null
null
null
UTF-8
C++
false
false
1,309
cpp
#include "KCollider2D.h" #include "State.h" #include "TransPosition.h" #include "DebugManager.h" KCollider2D::KCollider2D() { m_2DCol = CreateColFi<Figure2D_DE>(COLTYPE::CT_RECT2D); } KCollider2D::~KCollider2D() { } bool KCollider2D::Init(int _Order /*= 0*/) { m_Order = _Order; state()->This_Col2DManager.PushCol(this); return true; } void KCollider2D::Update_Figure() { m_2DCol->m_Vec.m_Pos = Pivot + m_Trans->pos_world(); if (false == m_SizeSelf) { switch (m_2DCol->m_ColType) { case CT_RECT2D: m_2DCol->m_Vec.m_Size.set_vector2(fabsf(m_Trans->scale_local().x), fabsf(m_Trans->scale_local().y)); break; case CT_CIRCLE2D: m_2DCol->m_Vec.m_Vec3.Radius = (fabsf(m_Trans->scale_local().x) * 0.5f); break; default: break; } } else { switch (m_2DCol->m_ColType) { case CT_RECT2D: m_2DCol->m_Vec.m_Size.set_vector2(fabsf(Size.x), fabsf(Size.y)); break; case CT_CIRCLE2D: m_2DCol->m_Vec.m_Vec3.Radius = (fabsf(Size.x) * 0.5f); break; default: break; } } } void KCollider2D::Mode(COLTYPE _Type) { switch (_Type) { case CT_POINT2D: case CT_RECT2D: case CT_CIRCLE2D: m_2DCol->m_ColType = _Type; break; } } void KCollider2D::DebugRender() { // #ifdef _DEBUG Update_Figure(); // #endif DebugManager::Draw_Rect(m_2DCol->m_Vec); }
[ "hki2345@users.noreply.github.com" ]
hki2345@users.noreply.github.com
1b342df7adb28e4b3dcafc115c57982afc8a79e6
22549a867445219745da0a7446ed4963a0502167
/bai90.cpp
cbb8726517b9127e65e01da8ca44a17384a0bef4
[]
no_license
hoangtrung1999/Code-Bai-Tap-Ky-Thuat-Lap-Trinh---thay-Nguyen-Tan-Trang-Minh-Khang
afb5273db9b575548c60d352ca498c141a0fcaf1
033e37ea6018bd2450f414c5af60896eb28e5d3c
refs/heads/master
2022-10-04T04:50:05.020285
2018-01-06T03:48:21
2018-01-06T03:48:21
114,956,184
0
1
null
2022-09-16T12:16:30
2017-12-21T03:06:29
C++
UTF-8
C++
false
false
256
cpp
#include <iostream> using namespace std; int Calculate (int n) { int S = 0; int i = 1; while ( S < n) { S += i; cout<<S<<endl; if ( S < n) ++i; cout<<i<<endl; } return i-1; } int main() { int N; cin>>N; cout<<Calculate(N); return 0; }
[ "hoangtrung1999@yahoo.com.vn" ]
hoangtrung1999@yahoo.com.vn
abdf0b8f8c50f9e82c88f7f064ed3ab7278a53fc
b343430beace53ac8b1336dc44a1570ad9a51618
/SFMLEngine/src/SFMLEngine/ECS/Components/Animator.h
9f77cd7fffcc88ca58d1e86ae95d3f9942245b5b
[]
no_license
jambuttenshaw/SFMLEngine
26f2a1de76e286595d12c536ca6779995c36b34f
5c9e421d01821d1d867b228fec6af798176179f4
refs/heads/master
2023-04-22T00:54:36.756273
2021-05-11T17:00:29
2021-05-11T17:00:29
332,728,822
0
0
null
null
null
null
UTF-8
C++
false
false
4,413
h
#pragma once #include "SFMLEngine/ECS/System.h" #include "SFMLEngine/Core.h" #include <SFML/Graphics.hpp> #include <unordered_map> namespace SFMLEngine { class AnimationFrame { public: AnimationFrame() : m_ImageRect(), m_Offset() {} AnimationFrame(const sf::IntRect& rect) : m_ImageRect(rect), m_Offset() {} AnimationFrame(const sf::IntRect& rect, const sf::Vector2f& offset) : m_ImageRect(rect), m_Offset(offset) {} AnimationFrame(int x, int y, int w, int h) : m_ImageRect(x, y, w, h), m_Offset() {} AnimationFrame(int x, int y, int w, int h, float oX, float oY) : m_ImageRect(x, y, w, h), m_Offset(oX, oY) {} inline const sf::IntRect& GetRect() const { return m_ImageRect; } inline const sf::Vector2f& GetOffset() const { return m_Offset; } private: sf::IntRect m_ImageRect; sf::Vector2f m_Offset; }; class Animation { public: Animation() {} Animation(const std::string& name, std::initializer_list<AnimationFrame> frames, float speed = 1.0f) : m_Name(name), m_Frames(frames), m_AnimationSpeed(speed) {} inline void AddFrame(sf::IntRect frame) { m_Frames.push_back(frame); } void Animate(float ts) { if (m_Playing) { m_ElapsedTime += ts; if (m_ElapsedTime >= m_AnimationSpeed) { m_FrameIndex++; if (m_FrameIndex >= m_Frames.size()) { if (m_Looping) { m_FrameIndex = 0; } else { m_FrameIndex--; m_Playing = false; } } m_CurrentFrame = &m_Frames[m_FrameIndex]; m_ElapsedTime = 0; } } } inline void Reset() { m_ElapsedTime = 0; m_FrameIndex = 0; m_CurrentFrame = &m_Frames[m_FrameIndex]; m_Playing = true; } inline const std::string& GetName() const { return m_Name; } inline const AnimationFrame* const GetCurrentFrame() const { return m_CurrentFrame; } inline bool IsFlipped() const { return m_Flipped; } inline void SetFlipped(bool flipped) { m_Flipped = flipped; } inline bool IsLooping() const { return m_Looping; } inline void SetLooping(bool looping) { m_Looping = looping; } inline bool IsPlaying() const { return m_Playing; } inline void SetPlaying(bool playing) { m_Playing = playing; } private: std::string m_Name; AnimationFrame* m_CurrentFrame = nullptr; size_t m_FrameIndex = 0; std::vector<AnimationFrame> m_Frames; bool m_Flipped = false; bool m_Looping = true; bool m_Playing = true; float m_AnimationSpeed = 1.0f; float m_ElapsedTime = 0; }; enum class AnimableType { Invalid = 0, Sprite, GUIImage }; class Animator { public: friend class System; Animator() : m_Animations() {} Animator(AnimableType type) : m_Animations(), m_ObjectType(type) {} inline AnimableType GetAnimableType() const { return m_ObjectType; } inline bool GetFlipped() const { return m_Flip; } inline void SetFlipped(bool flip) { m_Flip = flip; } void AddAnimation(Animation anim) { SFMLE_CORE_ASSERT(m_Animations.find(anim.GetName()) == m_Animations.end(), "Animation with that name already exists!"); SFMLE_CORE_ASSERT(anim.GetName() != "null", "Cannot create animation with that name!"); m_Animations.insert(std::make_pair(anim.GetName(), anim)); } void SetCurrentAnimation(const std::string& name) { SFMLE_CORE_ASSERT(m_Animations.find(name) != m_Animations.end(), "Animation doesn't exist!"); if (m_CurrentAnimation != name) { m_CurrentAnimation = name; m_Animations[m_CurrentAnimation].Reset(); } } inline void Stop() { m_CurrentAnimation = "null"; } inline void PauseMusic() { m_Animations[m_CurrentAnimation].SetPlaying(false); } inline void Resume() { m_Animations[m_CurrentAnimation].SetPlaying(true); } inline const std::string& GetCurrentAnimationName() const { return m_CurrentAnimation; } inline Animation& GetCurrentAnimation() { return m_Animations[m_CurrentAnimation]; } inline const AnimationFrame& GetCurrentFrame() { return *m_Animations[m_CurrentAnimation].GetCurrentFrame(); } inline void Reset() { for (auto& anim : m_Animations) anim.second.Reset(); } private: bool m_Modified = false; std::unordered_map<std::string, Animation> m_Animations; std::string m_CurrentAnimation = "null"; bool m_Flip = false; AnimableType m_ObjectType{ AnimableType::Invalid }; }; }
[ "sigton.scratch@gmail.com" ]
sigton.scratch@gmail.com
6a7feb3cddf844f4ebc969e7b5b93bc042a3e71a
238a20f03ec4c2e8b55718324bec7a6c8d58dfa7
/src/widget/image.hpp
22b0e12c8267281db815db454eca9e8c79ea27e2
[]
no_license
Muzol-Code/Space_Invaders
acb1bf8e3ee1a29cc45a5ffecb1bf1937fd916a1
eea0f86cecda9df4c9b1c0f1cf99480f06bdd869
refs/heads/master
2022-06-20T21:29:46.807370
2020-05-06T19:49:36
2020-05-06T19:49:36
260,938,531
0
0
null
null
null
null
UTF-8
C++
false
false
555
hpp
#ifndef IMAGE_HPP #define IMAGE_HPP #include <SDL_surface.h> #include <SDL_render.h> #include <SDL_rect.h> #include <SDL_image.h> #include <string> class Image { private: SDL_Rect m_body; SDL_Texture* m_texture; public: Image(){} Image(int x, int y); ~Image(); bool load_image(std::string file_path, SDL_Renderer* render); void set_position(int x, int y); void fit(int x, int y, int width, int height, int perc); void set_size(int width, int height); void draw(SDL_Renderer* render); }; #endif //IMAGE_HPP
[ "muzolbytes@gmail.com" ]
muzolbytes@gmail.com
0008d9943e5ac1066d0e75b7c0d4e4aca1b45791
c3782a52da4479a5ca3d0131cbacd3ff23cea572
/Codeforces/contest/1245/a/66252147.cpp
b20d6513fe96f8dc1f4118c3af519b478d01a574
[]
no_license
misclicked/Codes
5def6d488bfd028d415f3dc6f18ff6d904226e6f
1aa53cf585abf0eed1a47e0a95d894d34942e3b1
refs/heads/master
2021-07-16T00:28:05.717259
2020-05-25T06:20:37
2020-05-25T06:20:37
142,436,632
6
0
null
null
null
null
UTF-8
C++
false
false
520
cpp
#include<bits/stdc++.h> using namespace std; namespace IO{ char ss[1<<17],*A=ss,*B=ss; inline char gc(){return A==B&&(B=(A=ss)+fread(ss,1,1<<17,stdin),A==B)?-1:*A++;} template<class T>inline void sd(T&x){ char c;T y=1;while(c=gc(),(c<48||57<c)&&c!=-1)if(c==45){y=-1;}x=c-48; while(c=gc(),47<c&&c<58){x=x*10+c-48;}x*=y; } } using namespace IO; int main(){ int n; sd(n); while(n--){ int a,b; sd(a);sd(b); if(__gcd(a,b)==1){ puts("Finite"); }else{ puts("Infinite"); } } }
[ "lspss92189@gmail.com" ]
lspss92189@gmail.com
bee6afbb387834217614850869886f3bf3faf722
ae93512408d40ca63995500191c6ddd4317d91e4
/bfu/lab3/1 на 1/main.cpp
8706b150a720faae54b3369bfdf04daff03a9582
[]
no_license
jojo4444/-practice
90f832151e4e38d318c869d5bf2873d775ab870a
7e0f1fd29dfb9e99ca75f3c94e8f8f179abf00bc
refs/heads/master
2020-04-12T20:49:09.951482
2019-05-25T23:32:16
2019-05-25T23:32:16
162,747,613
0
0
null
null
null
null
UTF-8
C++
false
false
759
cpp
#pragma once #include <iostream> #include "war.hpp" using std::cout; int main() { knight shrek = knight(200, 0, 44); fairy fiona = fairy(100, 0, 0); war<knight, fairy> battle = war<knight, fairy>(shrek, fiona); while(battle.next()) { /* set hit(up, middle, down) and block for warriors */ battle.goWar(); } int finish = battle.win(); if (finish == ALL_DEATH) { cout << "-good news, all death\n\ -oh, shit, you mad?\n\ -no, im batman\n"; } else if (finish == FIRST) { cout << "shrek is THANOS (watch meme on google)\n"; } else { cout << "its true?!\nNo way...\n"; } return 0; }
[ "noreply@github.com" ]
noreply@github.com