hexsha
stringlengths
40
40
size
int64
7
1.05M
ext
stringclasses
13 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
269
max_stars_repo_name
stringlengths
5
108
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
9
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
269
max_issues_repo_name
stringlengths
5
116
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
9
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
269
max_forks_repo_name
stringlengths
5
116
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
9
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
7
1.05M
avg_line_length
float64
1.21
330k
max_line_length
int64
6
990k
alphanum_fraction
float64
0.01
0.99
author_id
stringlengths
2
40
878abcf148a3850557bb810a51b4c8dc7ddef060
2,372
cpp
C++
src/main.cpp
mystery124/MilestoneRoomController
1101c110f25d1cc348cf7da304dd9fe5d33a5876
[ "MIT" ]
null
null
null
src/main.cpp
mystery124/MilestoneRoomController
1101c110f25d1cc348cf7da304dd9fe5d33a5876
[ "MIT" ]
7
2020-03-23T17:48:57.000Z
2020-04-21T19:48:20.000Z
src/main.cpp
mystery124/MilestoneRoomController
1101c110f25d1cc348cf7da304dd9fe5d33a5876
[ "MIT" ]
null
null
null
#include <Arduino.h> #include <Ticker.h> #define LOGGING_SERIAL #include "Logger.h" #include "WifiManager.h" #include "BME280Sensor.h" /* #include <ESP8266WebServer.h> #include <WiFiClient.h> #include <ArduinoJson.h> #include <Adafruit_Sensor.h> #include <Adafruit_BME280.h> //local #include <OTAHandler.h> #define SEALEVELPRESSURE_HPA (1013.25) OTAHandler otaHandler; ESP8266WebServer server(80); Adafruit_BME280 bme; // hold uploaded file File fsUploadFile; void handleFileUpload(){ HTTPUpload& upload = server.upload(); if(upload.status == UPLOAD_FILE_START) { String filename = upload.filename; if(!filename.startsWith("/")) filename = "/d/"+filename; Serial.print("handleFileUpload Name: "); Serial.println(filename); fsUploadFile = SPIFFS.open(filename, "w+"); } else if(upload.status == UPLOAD_FILE_WRITE) { if(fsUploadFile) fsUploadFile.write(upload.buf, upload.currentSize); } else if(upload.status == UPLOAD_FILE_END) { if(fsUploadFile) fsUploadFile.close(); Serial.print("handleFileUpload Size: "); Serial.println(upload.totalSize); } } */ void pinOn(); void readSensorAndPrint(); void goToSleep(); WiFiManagment::WifiManager wifiService; Sensors::BME280Sensor bmeSensor; bool sendFlag = false; Ticker tick; void setup(){ pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, HIGH); LOGGER bmeSensor.init(); LOG("Start WIFI"); wifiService.attachConnectionHandler(pinOn); wifiService.attachConnectionHandler(readSensorAndPrint); wifiService.startWifi(); LOG("config WIFI done"); tick.attach(30, goToSleep); } void loop(){ wifiService.handleClient(); //otaHandler.handleOTA(); //server.handleClient(); LOGGER; if(sendFlag){ goToSleep(); } } void goToSleep(){ int val = 60; LOG("Going Sleep"); ESP.deepSleep(val*1000*1000); } void readSensorAndPrint(){ LOGGER; bmeSensor.setMode(Adafruit_BME280::MODE_NORMAL); Sensors::BME20SensorData data = bmeSensor.read(); bmeSensor.setMode(Adafruit_BME280::MODE_SLEEP); LOG("Temp: "); LOG(data.temperature); LOG("Humidity: "); LOG(data.humidity); LOG("Pressure: "); LOG(data.pressure); sendFlag = true; }; void pinOn(){ digitalWrite(LED_BUILTIN, LOW); };
20.448276
82
0.673693
mystery124
878dfa2d8a0a9c3551d0a33681169ff2e5e67e79
311
cpp
C++
solutions/1550. Three Consecutive Odds.cpp
MayThirtyOne/Practice-Problems
fe945742d6bc785fffcb29ce011251406ba7c695
[ "MIT" ]
1
2020-09-27T17:36:58.000Z
2020-09-27T17:36:58.000Z
solutions/1550. Three Consecutive Odds.cpp
MayThirtyOne/Practice-Problems
fe945742d6bc785fffcb29ce011251406ba7c695
[ "MIT" ]
null
null
null
solutions/1550. Three Consecutive Odds.cpp
MayThirtyOne/Practice-Problems
fe945742d6bc785fffcb29ce011251406ba7c695
[ "MIT" ]
1
2020-09-21T15:16:24.000Z
2020-09-21T15:16:24.000Z
class Solution { public:    bool threeConsecutiveOdds(vector<int>& arr) {        if(arr.size()<3) return false;        for(int i=0;i<arr.size()-2;i++){            if(arr[i]%2==1 && arr[i+1]%2==1 && arr[i+2]%2==1){                return true;           }       }        return false;           } };
22.214286
62
0.440514
MayThirtyOne
878e3776a8d736c0b3088de2e71b503a645511ae
1,652
cpp
C++
examples/matrices/Walsh.cpp
pjt1988/Elemental
71d3e2b98829594e9f52980a8b1ef7c1e99c724b
[ "Apache-2.0" ]
473
2015-01-11T03:22:11.000Z
2022-03-31T05:28:39.000Z
examples/matrices/Walsh.cpp
pjt1988/Elemental
71d3e2b98829594e9f52980a8b1ef7c1e99c724b
[ "Apache-2.0" ]
205
2015-01-10T20:33:45.000Z
2021-07-25T14:53:25.000Z
examples/matrices/Walsh.cpp
pjt1988/Elemental
71d3e2b98829594e9f52980a8b1ef7c1e99c724b
[ "Apache-2.0" ]
109
2015-02-16T14:06:42.000Z
2022-03-23T21:34:26.000Z
/* Copyright (c) 2009-2016, Jack Poulson All rights reserved. This file is part of Elemental and is under the BSD 2-Clause License, which can be found in the LICENSE file in the root directory, or at http://opensource.org/licenses/BSD-2-Clause */ #include <El.hpp> int main( int argc, char* argv[] ) { El::Environment env( argc, argv ); El::mpi::Comm comm = El::mpi::COMM_WORLD; try { const El::Int k = El::Input("--order","generate 2^k x 2^k matrix",4); const bool binary = El::Input("--binary","binary data?",false); const bool display = El::Input("--display","display matrix?",false); const bool print = El::Input("--print","print matrix?",true); El::ProcessInput(); El::PrintInputReport(); const El::Grid grid( comm ); // Generate a Walsh matrix of order k (a 2^k x 2^k matrix) El::DistMatrix<double> W(grid); El::Walsh( W, k, binary ); if( display ) El::Display( W, "Walsh matrix" ); if( print ) El::Print( W, "W(2^k)"); if( !binary ) { El::LDL( W, true ); auto d = El::GetDiagonal(W); El::MakeTrapezoidal( El::LOWER, W ); El::FillDiagonal( W, 1. ); if( display ) { El::Display( W, "Lower factor" ); El::Display( d, "Diagonal factor" ); } if( print ) { El::Print( W, "L" ); El::Print( d, "d" ); } } } catch( std::exception& e ) { El::ReportException(e); } return 0; }
28
77
0.502421
pjt1988
8791dc97f1c0913b534a4bd6811d48e963ade9d0
264
cc
C++
construct-the-rectangle.cc
ArCan314/leetcode
8e22790dc2f34f5cf2892741ff4e5d492bb6d0dd
[ "MIT" ]
null
null
null
construct-the-rectangle.cc
ArCan314/leetcode
8e22790dc2f34f5cf2892741ff4e5d492bb6d0dd
[ "MIT" ]
null
null
null
construct-the-rectangle.cc
ArCan314/leetcode
8e22790dc2f34f5cf2892741ff4e5d492bb6d0dd
[ "MIT" ]
null
null
null
#include <vector> #include <cmath> class Solution { public: std::vector<int> constructRectangle(int area) { for (int i = std::sqrt(area); i >= 1; i--) if (area % i == 0) return {area / i, i}; return {}; } };
18.857143
50
0.484848
ArCan314
87999efbe681268cd7a72ca49fd41f6ead2cd9e6
2,542
cxx
C++
Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmUUIDGenerator.cxx
nalinimsingh/ITK_4D
95a2eacaeaffe572889832ef0894239f89e3f303
[ "Apache-2.0" ]
3
2018-10-01T20:46:17.000Z
2019-12-17T19:39:50.000Z
Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmUUIDGenerator.cxx
nalinimsingh/ITK_4D
95a2eacaeaffe572889832ef0894239f89e3f303
[ "Apache-2.0" ]
null
null
null
Modules/ThirdParty/GDCM/src/gdcm/Source/MediaStorageAndFileFormat/gdcmUUIDGenerator.cxx
nalinimsingh/ITK_4D
95a2eacaeaffe572889832ef0894239f89e3f303
[ "Apache-2.0" ]
4
2018-05-17T16:34:54.000Z
2020-09-24T02:12:40.000Z
/*========================================================================= Program: GDCM (Grassroots DICOM). A DICOM library Copyright (c) 2006-2011 Mathieu Malaterre All rights reserved. See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "gdcmUUIDGenerator.h" #include "gdcmTrace.h" #include "gdcmSystem.h" #include <cstring> // memcpy // FIXME... #if defined(_WIN32) || defined(__CYGWIN__) #define HAVE_UUIDCREATE #else #define HAVE_UUID_GENERATE #endif #ifdef HAVE_UUID_GENERATE #include "gdcm_uuid.h" #endif #ifdef GDCM_HAVE_RPC_H #include <rpc.h> #endif namespace gdcm { const char* UUIDGenerator::Generate() { Unique.resize( 36 ); char *uuid_data = &Unique[0]; #if defined(HAVE_UUID_GENERATE) assert( sizeof(uuid_t) == 16 ); uuid_t g; uuid_generate(g); uuid_unparse(g, uuid_data); #elif defined(HAVE_UUID_CREATE) uint32_t rv; uuid_t g; uuid_create(&g, &rv); if (rv != uuid_s_ok) return NULL; uuid_to_string(&g, &uuid_data, &rv); if (rv != uuid_s_ok) return NULL; #elif defined(HAVE_UUIDCREATE) UUID uuid; UuidCreate(&uuid); BYTE * str = 0; UuidToString(&uuid, &str); Unique = (char*)str; RpcStringFree(&str); #else #error should not happen #endif assert( IsValid( Unique.c_str() ) ); return Unique.c_str(); } bool UUIDGenerator::IsValid(const char *suid) { if( !suid ) return false; #if defined(HAVE_UUID_GENERATE) uuid_t uu; // technically the specification wants char* input not const char*: // this makes compilation fails otherwise on OpenIndiana: int res = uuid_parse((char*)suid, uu); if( res ) return false; #elif defined(HAVE_UUID_CREATE) // http://www.freebsd.org/cgi/man.cgi?query=uuid_create uint32_t status; uuid_t uuid; uuid_from_string(suid, &uuid, &status); if( status != uuid_s_ok ) return false; #elif defined(HAVE_UUIDCREATE) // http://msdn.microsoft.com/en-us/library/windows/desktop/aa379336(v=vs.85).aspx UUID uuid; if (FAILED(UuidFromString((unsigned char*)suid, &uuid))) { return false; } #else #error should not happen #endif // no error found ! return true; } } // end namespace gdcm
25.42
84
0.643588
nalinimsingh
879b1cf03bb04a7572a7dc1a8fdf103e28db55be
16,426
cpp
C++
src/xmol/io/pdb/BundledPDBRecordTypesBaseInit.cpp
sizmailov/pyxmolpp2
9395ba1b1ddc957e0b33dc6decccdb711e720764
[ "MIT" ]
4
2020-06-24T11:07:57.000Z
2022-01-15T23:00:30.000Z
src/xmol/io/pdb/BundledPDBRecordTypesBaseInit.cpp
sizmailov/pyxmolpp2
9395ba1b1ddc957e0b33dc6decccdb711e720764
[ "MIT" ]
84
2018-04-22T12:29:31.000Z
2020-06-17T15:03:37.000Z
src/xmol/io/pdb/BundledPDBRecordTypesBaseInit.cpp
sizmailov/pyxmolpp2
9395ba1b1ddc957e0b33dc6decccdb711e720764
[ "MIT" ]
6
2018-06-04T09:16:26.000Z
2022-03-12T11:05:54.000Z
#include "xmol/io/pdb/PdbRecord.h" using namespace xmol::io::pdb; std::map<RecordName,PdbRecordType> detail::get_bundled_records() { auto as_field = [](const std::string& fieldName, std::vector<int> colons){ auto shortend = fieldName.substr(0,std::min(size_t(FieldName::max_length),fieldName.size())); return std::make_pair(FieldName(shortend),std::move(colons)); }; auto as_record = [](const char* recordName, std::map<FieldName,std::vector<int>> fields){ return std::pair<RecordName,PdbRecordType>(RecordName(recordName),PdbRecordType(std::move(fields))); }; std::map<RecordName,PdbRecordType> result { as_record("ANISOU",{ as_field("serial",{7,11}), as_field("name",{13,16}), as_field("altLoc",{17,17}), as_field("resName",{18,20}), as_field("chainID",{22,22}), as_field("resSeq",{23,26}), as_field("iCode",{27,27}), as_field("u[0][0]",{29,35}), as_field("u[1][1]",{36,42}), as_field("u[2][2]",{43,49}), as_field("u[0][1]",{50,56}), as_field("u[0][2]",{57,63}), as_field("u[1][2]",{64,70}), as_field("element",{77,78}), as_field("charge",{79,80}), }), // ANISOU as_record("ATOM",{ as_field("serial",{7,11}), as_field("name",{13,16}), as_field("altLoc",{17,17}), as_field("resName",{18,20}), as_field("chainID",{22,22}), as_field("resSeq",{23,26}), as_field("iCode",{27,27}), as_field("x",{31,38}), as_field("y",{39,46}), as_field("z",{47,54}), as_field("occupancy",{55,60}), as_field("tempFactor",{61,66}), as_field("element",{77,78}), as_field("charge",{79,80}), }), // ATOM as_record("AUTHOR",{ as_field("continuation",{9,10}), as_field("authorList",{11,79}), }), // AUTHOR as_record("CAVEAT",{ as_field("continuation",{9,10}), as_field("idCode",{12,15}), as_field("comment",{20,79}), }), // CAVEAT as_record("CISPEP",{ as_field("serNum",{8,10}), as_field("pep1",{12,14}), as_field("chainID1",{16,16}), as_field("seqNum1",{18,21}), as_field("icode1",{22,22}), as_field("pep2",{26,28}), as_field("chainID2",{30,30}), as_field("seqNum2",{32,35}), as_field("icode2",{36,36}), as_field("modNum",{44,46}), as_field("measure",{54,59}), }), // CISPEP as_record("COMPND",{ as_field("continuation",{8,10}), as_field("compound",{11,80}), }), // COMPND as_record("CONECT",{ as_field("serial",{7,11,12,16,17,21,22,26,27,31}), }), // CONECT as_record("CRYST1",{ as_field("a",{7,15}), as_field("b",{16,24}), as_field("c",{25,33}), as_field("alpha",{34,40}), as_field("beta",{41,47}), as_field("gamma",{48,54}), as_field("sGroup",{56,66}), as_field("z",{67,70}), }), // CRYST1 as_record("DBREF",{ as_field("idCode",{8,11}), as_field("chainID",{13,13}), as_field("seqBegin",{15,18}), as_field("insertBegin",{19,19}), as_field("seqEnd",{21,24}), as_field("insertEnd",{25,25}), as_field("database",{27,32}), as_field("dbAccession",{34,41}), as_field("dbIdCode",{43,54}), as_field("dbseqBegin",{56,60}), as_field("idbnsBeg",{61,61}), as_field("dbseqEnd",{63,67}), as_field("dbinsEnd",{68,68}), }), // DBREF as_record("DBREF1",{ as_field("idCode",{8,11}), as_field("chainID",{13,13}), as_field("seqBegin",{15,18}), as_field("insertBegin",{19,19}), as_field("seqEnd",{21,24}), as_field("insertEnd",{25,25}), as_field("database",{27,32}), as_field("dbIdCode",{48,67}), }), // DBREF1 as_record("DBREF2",{ as_field("idCode",{8,11}), as_field("chainID",{13,13}), as_field("dbAccession",{19,40}), as_field("seqBegin",{46,55}), as_field("seqEnd",{58,67}), }), // DBREF2 as_record("END",{ }), // END as_record("ENDMDL",{ }), // ENDMDL as_record("EXPDTA",{ as_field("continuation",{9,10}), as_field("technique",{11,79}), }), // EXPDTA as_record("FORMUL",{ as_field("compNum",{9,10}), as_field("hetID",{13,15}), as_field("continuation",{17,18}), as_field("asterisk",{19,19}), as_field("text",{20,70}), }), // FORMUL as_record("HEADER",{ as_field("classification",{11,50}), as_field("depDate",{51,59}), as_field("idCode",{63,66}), }), // HEADER as_record("HELIX",{ as_field("serNum",{8,10}), as_field("helixID",{12,14}), as_field("initResName",{16,18}), as_field("initChainID",{20,20}), as_field("initSeqNum",{22,25}), as_field("initICode",{26,26}), as_field("endResName",{28,30}), as_field("endChainID",{32,32}), as_field("endSeqNum",{34,37}), as_field("endICode",{38,38}), as_field("helixClass",{39,40}), as_field("comment",{41,70}), as_field("length",{72,76}), }), // HELIX as_record("HET",{ as_field("hetID",{8,10}), as_field("ChainID",{13,13}), as_field("seqNum",{14,17}), as_field("iCode",{18,18}), as_field("numHetAtoms",{21,25}), as_field("text",{31,70}), }), // HET as_record("HETATM",{ as_field("serial",{7,11}), as_field("name",{13,16}), as_field("altLoc",{17,17}), as_field("resName",{18,20}), as_field("chainID",{22,22}), as_field("resSeq",{23,26}), as_field("iCode",{27,27}), as_field("x",{31,38}), as_field("y",{39,46}), as_field("z",{47,54}), as_field("occupancy",{55,60}), as_field("tempFactor",{61,66}), as_field("element",{77,78}), as_field("charge",{79,80}), }), // HETATM as_record("HETNAM",{ as_field("continuation",{9,10}), as_field("hetID",{12,14}), as_field("text",{16,70}), }), // HETNAM as_record("HETSYN",{ as_field("continuation",{9,10}), as_field("hetID",{12,14}), as_field("hetSynonyms",{16,70}), }), // HETSYN as_record("JRNL",{ as_field("text",{13,79}), }), // JRNL as_record("KEYWDS",{ as_field("continuation",{9,10}), as_field("keywds",{11,79}), }), // KEYWDS as_record("LINK",{ as_field("name1",{13,16}), as_field("altLoc1",{17,17}), as_field("resName1",{18,20}), as_field("chainID1",{22,22}), as_field("resSeq1",{23,26}), as_field("iCode1",{27,27}), as_field("name2",{43,46}), as_field("altLoc2",{47,47}), as_field("resName2",{48,50}), as_field("chainID2",{52,52}), as_field("resSeq2",{53,56}), as_field("iCode2",{57,57}), as_field("sym1",{60,65}), as_field("sym2",{67,72}), as_field("Length",{74,78}), }), // LINK as_record("MASTER",{ as_field("numRemark",{11,15}), as_field("0",{16,20}), as_field("numHet",{21,25}), as_field("numHelix",{26,30}), as_field("numSheet",{31,35}), as_field("numTurn",{36,40}), as_field("numSite",{41,45}), as_field("numXform",{46,50}), as_field("numCoord",{51,55}), as_field("numTer",{56,60}), as_field("numConect",{61,65}), as_field("numSeq",{66,70}), }), // MASTER as_record("MDLTYP",{ as_field("continuation",{9,10}), as_field("comment",{11,80}), }), // MDLTYP as_record("MODEL",{ as_field("serial",{11,14}), }), // MODEL as_record("MODRES",{ as_field("idCode",{8,11}), as_field("resName",{13,15}), as_field("chainID",{17,17}), as_field("seqNum",{19,22}), as_field("iCode",{23,23}), as_field("stdRes",{25,27}), as_field("comment",{30,70}), }), // MODRES as_record("MTRIX1",{ as_field("serial",{8,10}), as_field("m[1][1]",{11,20}), as_field("m[1][2]",{21,30}), as_field("m[1][3]",{31,40}), as_field("v[1]",{46,55}), as_field("iGiven",{60,60}), }), // MTRIX1 as_record("MTRIX2",{ as_field("serial",{8,10}), as_field("m[2][1]",{11,20}), as_field("m[2][2]",{21,30}), as_field("m[2][3]",{31,40}), as_field("v[2]",{46,55}), as_field("iGiven",{60,60}), }), // MTRIX2 as_record("MTRIX3",{ as_field("serial",{8,10}), as_field("m[3][1]",{11,20}), as_field("m[3][2]",{21,30}), as_field("m[3][3]",{31,40}), as_field("v[3]",{46,55}), as_field("iGiven",{60,60}), }), // MTRIX3 as_record("NUMMDL",{ as_field("modelNumber",{11,14}), }), // NUMMDL as_record("OBSLTE",{ as_field("continuation",{9,10}), as_field("repDate",{12,20}), as_field("idCode",{22,25}), as_field("rIdCode",{32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75}), }), // OBSLTE as_record("ORIGX1",{ as_field("o[1][1]",{11,20}), as_field("o[1][2]",{21,30}), as_field("o[1][3]",{31,40}), as_field("t[1]",{46,55}), }), // ORIGX1 as_record("ORIGX2",{ as_field("o[2][1]",{11,20}), as_field("o[2][2]",{21,30}), as_field("o[2][3]",{31,40}), as_field("t[2]",{46,55}), }), // ORIGX2 as_record("ORIGX3",{ as_field("o[3][1]",{11,20}), as_field("o[3][2]",{21,30}), as_field("o[3][3]",{31,40}), as_field("t[3]",{46,55}), }), // ORIGX3 as_record("REMARK",{ as_field("remarkNum",{8,10}), as_field("empty",{12,79}), }), // REMARK as_record("REVDAT",{ as_field("modNum",{8,10}), as_field("continuation",{11,12}), as_field("modDate",{14,22}), as_field("modId",{24,27}), as_field("modType",{32,32}), as_field("record",{40,45,47,52,54,59,61,66}), }), // REVDAT as_record("SCALE1",{ as_field("s[1][1]",{11,20}), as_field("s[1][2]",{21,30}), as_field("s[1][3]",{31,40}), as_field("u[1]",{46,55}), }), // SCALE1 as_record("SCALE2",{ as_field("s[2][1]",{11,20}), as_field("s[2][2]",{21,30}), as_field("s[2][3]",{31,40}), as_field("u[2]",{46,55}), }), // SCALE2 as_record("SCALE3",{ as_field("s[3][1]",{11,20}), as_field("s[3][2]",{21,30}), as_field("s[3][3]",{31,40}), as_field("u[3]",{46,55}), }), // SCALE3 as_record("SEQADV",{ as_field("idCode",{8,11}), as_field("resName",{13,15}), as_field("chainID",{17,17}), as_field("seqNum",{19,22}), as_field("iCode",{23,23}), as_field("database",{25,28}), as_field("dbAccession",{30,38}), as_field("dbRes",{40,42}), as_field("dbSeq",{44,48}), as_field("conflict",{50,70}), }), // SEQADV as_record("SEQRES",{ as_field("serNum",{8,10}), as_field("chainID",{12,12}), as_field("numRes",{14,17}), as_field("resName",{20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70}), }), // SEQRES as_record("SHEET",{ as_field("strand",{8,10}), as_field("sheetID",{12,14}), as_field("numStrands",{15,16}), as_field("initResName",{18,20}), as_field("initChainID",{22,22}), as_field("initSeqNum",{23,26}), as_field("initICode",{27,27}), as_field("endResName",{29,31}), as_field("endChainID",{33,33}), as_field("endSeqNum",{34,37}), as_field("endICode",{38,38}), as_field("sense",{39,40}), as_field("curAtom",{42,45}), as_field("curResName",{46,48}), as_field("curChainId",{50,50}), as_field("curResSeq",{51,54}), as_field("curICode",{55,55}), as_field("prevAtom",{57,60}), as_field("prevResName",{61,63}), as_field("prevChainId",{65,65}), as_field("prevResSeq",{66,69}), as_field("prevICode",{70,70}), }), // SHEET as_record("SIGATM",{ as_field("serial",{7,11}), as_field("name",{13,16}), as_field("altLoc",{17,17}), as_field("resName",{18,20}), as_field("chainID",{22,22}), as_field("resSeq",{23,26}), as_field("iCode",{27,27}), as_field("sigX",{31,38}), as_field("sigY",{39,46}), as_field("sigZ",{47,54}), as_field("sigOcc",{55,60}), as_field("sigTemp",{61,66}), as_field("element",{77,78}), as_field("charge",{79,80}), }), // SIGATM as_record("SIGUIJ",{ as_field("serial",{7,11}), as_field("name",{13,16}), as_field("altLoc",{17,17}), as_field("resName",{18,20}), as_field("chainID",{22,22}), as_field("resSeq",{23,26}), as_field("iCode",{27,27}), as_field("sig[0][0]",{29,35}), as_field("sig[1][1]",{36,42}), as_field("sig[2][2]",{43,49}), as_field("sig[0][1]",{50,56}), as_field("sig[0][2]",{57,63}), as_field("sig[1][2]",{64,70}), as_field("element",{77,78}), as_field("charge",{79,80}), }), // SIGUIJ as_record("SITE",{ as_field("seqNum",{8,10}), as_field("siteID",{12,14}), as_field("numRes",{16,17}), as_field("resName1",{19,21}), as_field("chainID1",{23,23}), as_field("seq1",{24,27}), as_field("iCode1",{28,28}), as_field("resName2",{30,32}), as_field("chainID2",{34,34}), as_field("seq2",{35,38}), as_field("iCode2",{39,39}), as_field("resName3",{41,43}), as_field("chainID3",{45,45}), as_field("seq3",{46,49}), as_field("iCode3",{50,50}), as_field("resName4",{52,54}), as_field("chainID4",{56,56}), as_field("seq4",{57,60}), as_field("iCode4",{61,61}), }), // SITE as_record("SOURCE",{ as_field("continuation",{8,10}), as_field("srcName",{11,79}), }), // SOURCE as_record("SPLIT",{ as_field("continuation",{9,10}), as_field("idCode",{12,15,17,20,22,25,27,30,32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75,77,80}), }), // SPLIT as_record("SPRSDE",{ as_field("continuation",{9,10}), as_field("sprsdeDate",{12,20}), as_field("idCode",{22,25}), as_field("sIdCode",{32,35,37,40,42,45,47,50,52,55,57,60,62,65,67,70,72,75}), }), // SPRSDE as_record("SSBOND",{ as_field("serNum",{8,10}), as_field("CYS",{26,28}), as_field("chainID1",{16,16}), as_field("seqNum1",{18,21}), as_field("icode1",{22,22}), as_field("chainID2",{30,30}), as_field("seqNum2",{32,35}), as_field("icode2",{36,36}), as_field("sym1",{60,65}), as_field("sym2",{67,72}), as_field("Length",{74,78}), }), // SSBOND as_record("TER",{ as_field("serial",{7,11}), as_field("resName",{18,20}), as_field("chainID",{22,22}), as_field("resSeq",{23,26}), as_field("iCode",{27,27}), }), // TER as_record("TITLE",{ as_field("continuation",{9,10}), as_field("title",{11,80}), }), // TITLE }; return result; }
35.708696
115
0.479362
sizmailov
879c83b5fd1a9a0bb93c7d4ff07905c6adc1dcd2
672
cpp
C++
marsyas-vamp/marsyas/src/qt5apps/common/realvec_table_widget.cpp
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/qt5apps/common/realvec_table_widget.cpp
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
marsyas-vamp/marsyas/src/qt5apps/common/realvec_table_widget.cpp
jaouahbi/VampPlugins
27c2248d1c717417fe4d448cdfb4cb882a8a336a
[ "Apache-2.0" ]
null
null
null
#include "realvec_table_widget.h" #include <QtAlgorithms> #include <QKeyEvent> #include <QApplication> #include <QClipboard> namespace MarsyasQt { void RealvecTableWidget::keyPressEvent(QKeyEvent *event) { if (event == QKeySequence::Copy) { QModelIndexList selection = selectedIndexes(); qSort(selection); QStringList strings; foreach ( const QModelIndex & index, selection ) { strings << model()->data(index, Qt::DisplayRole).toString(); } QString text = strings.join(", "); QApplication::clipboard()->setText(text); return; } QTableView::keyPressEvent(event); } }
21.677419
72
0.635417
jaouahbi
879f573b97bc57846b43a90f84ea7574c8208275
561
cpp
C++
codeforces/1385C.cpp
mhilmyh/algo-data-struct
6a9b1e5220e3c4e4a41200a09cb27f3f55560693
[ "MIT" ]
null
null
null
codeforces/1385C.cpp
mhilmyh/algo-data-struct
6a9b1e5220e3c4e4a41200a09cb27f3f55560693
[ "MIT" ]
null
null
null
codeforces/1385C.cpp
mhilmyh/algo-data-struct
6a9b1e5220e3c4e4a41200a09cb27f3f55560693
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; int solve(int n, vector<int> &a) { if (n == 1) return 0; bool asc = true; int i; for (i = n - 1; i > 0; i--) { if (asc && a[i] > a[i - 1]) asc = false; else if (!asc && a[i] < a[i - 1]) break; } return i; }; int main() { int t, n; cin >> t; while (t--) { cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; cout << solve(n, a) << "\n"; } return 0; }
15.583333
41
0.367201
mhilmyh
87a4484cf38bc3b272462cb5a146491658546250
1,971
hpp
C++
board.hpp
Zilleplus/Cpp8Queen
52adc77f6e657881eb1b9360c235b677b263dcfa
[ "MIT" ]
null
null
null
board.hpp
Zilleplus/Cpp8Queen
52adc77f6e657881eb1b9360c235b677b263dcfa
[ "MIT" ]
null
null
null
board.hpp
Zilleplus/Cpp8Queen
52adc77f6e657881eb1b9360c235b677b263dcfa
[ "MIT" ]
null
null
null
struct Queen { int x; int y; }; bool hasHorizonalClash(const Queen& q1, const Queen& q2) { return q1.y == q2.y; } bool hasVerticalClash(const Queen& q1, const Queen& q2) { return q1.x == q2.x; } bool hasDiagonalClash(const Queen& q1, const Queen& q2) { return (q1.x - q1.y) == (q1.x - q1.y) || (q1.x + q1.y) == (q1.x + q1.y); } int numberOfClashes(const Queen& q1, const Queen& q2) { int numberOfClashes = 0; if (hasHorizonalClash(q1, q2)) { numberOfClashes++; } if (hasVerticalClash(q1, q2)) { numberOfClashes++; } if (hasDiagonalClash(q1, q2)) { numberOfClashes++; } return numberOfClashes; } template <typename TBoard, int size = TBoard::size> int cost(TBoard& board) { if (size < 2) return 0; int cost = 0; for (int i = 0; i < size - 1; ++i) { for (int j = i + 1; j < size; ++j) { cost += numberOfClashes(board[i], board[j]); } } return cost; } template <typename TBoard, int sizeBoard = std::remove_reference_t<TBoard>::size> bool hasQueen(TBoard&& board, int x, int y) { for (int i = 0; i < sizeBoard; ++i) { if (board[i].x == x && board[i].y == y) { return true; } } return false; } template <int sizeBoard> class Board { private: Queen* queens; public: static constexpr int size = sizeBoard; template <typename... Queens> Board(Queens... qs) : queens{new Queen[]{qs...}} { static_assert(sizeof...(Queens) == sizeBoard, "Invalid number of queens in constructor"); } Queen operator[](int index) const { return queens[index]; } ~Board() { if (queens != nullptr) { delete queens; } } Board(Board&& b) : queens(b.queens) { b.queens = nullptr; } void setQueen(int queenIndex, int newX, int newY) { queens[queenIndex].x = newX; queens[queenIndex].y = newY; } };
23.746988
80
0.559107
Zilleplus
87a449e86ce31e79d5d47b50629b9ec2f6f62f4d
4,934
cpp
C++
src/main.cpp
jonco3/dynamic
76d10b012a7860595c7d9abbdf542c7d8f2a4d53
[ "MIT" ]
1
2020-11-26T23:37:19.000Z
2020-11-26T23:37:19.000Z
src/main.cpp
jonco3/dynamic
76d10b012a7860595c7d9abbdf542c7d8f2a4d53
[ "MIT" ]
null
null
null
src/main.cpp
jonco3/dynamic
76d10b012a7860595c7d9abbdf542c7d8f2a4d53
[ "MIT" ]
null
null
null
#include "common.h" #include "block.h" #include "builtin.h" #include "compiler.h" #include "dict.h" #include "interp.h" #include "input.h" #include "list.h" #include "module.h" #include "string.h" #include "sysexits.h" #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #define Function Readline_Function #include <readline/readline.h> #include <readline/history.h> #undef Function static char *lineRead = (char *)NULL; char *readOneLine() { if (lineRead) { free(lineRead); lineRead = (char *)NULL; } lineRead = readline("> "); if (lineRead && *lineRead) add_history(lineRead); return lineRead; } void maybeAbortTests(string what) {} static int runRepl() { char* line; Stack<Env*> topLevel(createTopLevel()); while (line = readOneLine(), line != NULL) { Stack<Value> result; bool ok = execModule(line, "<none>", topLevel, result); if (ok) cout << result << endl; else printException(result); } cout << endl; return EX_OK; } static int runProgram(const char* filename, int arg_count, const char* args[]) { Stack<Env*> topLevel(createTopLevel()); RootVector<Value> argStrings(arg_count); for (int i = 0 ; i < arg_count ; ++i) argStrings[i] = gc.create<String>(args[i]); Stack<Value> argv(gc.create<List>(argStrings)); Module::Sys->setAttr(Names::argv, argv); Stack<Value> main(gc.create<String>("__main__")); topLevel->setAttr(Names::__name__, main); if (!execModule(readFile(filename), filename, topLevel)) return EX_SOFTWARE; return EX_OK; } static int runModule(const char* name, int arg_count, const char* args[]) { Stack<String*> nameStr(gc.create<String>(name)); Stack<Value> result; bool ok = interp->call(LoadModule, nameStr, result); if (!ok) { printException(result); return EX_SOFTWARE; } if (result.isNone()) { cerr << "Module not found: " << name << endl; return EX_SOFTWARE; } return EX_OK; } static int runExprs(int count, const char* args[]) { Stack<Env*> globals; for (int i = 0 ; i < count ; ++i) { // todo: should probably parse thse as expressions if (!execModule(args[i], "<none>", globals)) return EX_SOFTWARE; } return EX_OK; } const char* usageMessage = "usage:\n" " dynamic -- enter the REPL\n" " dynamic FILE ARG* -- run script from file\n" " dynamic -e EXPRS -- execute expressions from commandline\n" "options:\n" " -m MODULENAME -- locate and execute module\n" " -i INTERNALSDIR -- set directory to load internals from\n" #ifdef LOG_EXECUTION " -le -- log interpreter execution\n" " -lf -- log interpreter frames only\n" #endif #ifdef DEBUG " -lg -- log GC activity\n" " -lc -- log compiled bytecode\n" " -lb -- log big integer arithmetic\n" " -z N -- perform GC every N allocations\n" #endif " -sg -- print GC stats\n" #ifdef DEBUG " -si -- print instruction count stats\n" #endif ; static void badUsage() { cerr << usageMessage; exit(EX_USAGE); } int main(int argc, const char* argv[]) { int r = 0; int pos = 1; bool expr = false; const char* moduleName = nullptr; const char* internalsDir = "internals"; while (pos != argc && argv[pos][0] == '-') { const char* opt = argv[pos++]; if (strcmp("-e", opt) == 0 && !moduleName) expr = true; else if (strcmp("-m", opt) == 0 && pos != argc && !expr) moduleName = argv[pos++]; else if (strcmp("-i", opt) == 0 && pos != argc) internalsDir = argv[pos++]; #ifdef LOG_EXECUTION else if (strcmp("-le", opt) == 0) logFrames = logExecution = true; else if (strcmp("-lf", opt) == 0) logFrames = true; #endif #ifdef DEBUG else if (strcmp("-lg", opt) == 0) logGC = true; else if (strcmp("-lc", opt) == 0) logCompile = true; else if (strcmp("-lb", opt) == 0) logBigInt = true; else if (strcmp("-z", opt) == 0) gcZealPeriod = atol(argv[pos++]); #endif else if (strcmp("-sg", opt) == 0) logGCStats = true; #ifdef DEBUG else if (strcmp("-si", opt) == 0) logInstrCounts = true; #endif else badUsage(); } init1(); init2(internalsDir); if (moduleName) r = runModule(moduleName, argc - pos, &argv[pos]); else if (expr) r = runExprs(argc - pos, &argv[pos]); else if ((argc - pos) == 0) r = runRepl(); else r = runProgram(argv[pos], argc - pos, &argv[pos]); final(); return r; }
25.045685
78
0.556749
jonco3
87a4b78e9d2044e990eec03989d946dad3d6c1eb
312
cpp
C++
homework6/merge_sort/readFile.cpp
mxprshn/homework
809635858a5bf01af7f63f398fe47fba7c688ecc
[ "Apache-2.0" ]
null
null
null
homework6/merge_sort/readFile.cpp
mxprshn/homework
809635858a5bf01af7f63f398fe47fba7c688ecc
[ "Apache-2.0" ]
null
null
null
homework6/merge_sort/readFile.cpp
mxprshn/homework
809635858a5bf01af7f63f398fe47fba7c688ecc
[ "Apache-2.0" ]
2
2018-11-06T19:31:20.000Z
2018-12-17T19:39:07.000Z
#include "list.h" #include <fstream> #include <string> bool readFile(std::ifstream &file, List *list) { if (!file.is_open()) { return false; } while (!file.eof()) { std::string name; std::string number; getline(file, name); getline(file, number); add(list, name, number); } return true; }
13
46
0.63141
mxprshn
87a5035a692af7645d12a631dbfcea1fd8c2ebbb
1,086
hpp
C++
.sandbox/hybrid-daes/dae-drumboiler/src/discrete_system.hpp
vacary/siconos-tutorials
93c0158321077a313692ed52fed69ff3c256ae32
[ "Apache-2.0" ]
6
2017-01-12T23:09:28.000Z
2021-03-20T17:03:58.000Z
.sandbox/hybrid-daes/dae-drumboiler/src/discrete_system.hpp
vacary/siconos-tutorials
93c0158321077a313692ed52fed69ff3c256ae32
[ "Apache-2.0" ]
3
2019-01-14T13:44:51.000Z
2021-05-17T13:57:27.000Z
.sandbox/hybrid-daes/dae-drumboiler/src/discrete_system.hpp
vacary/siconos-tutorials
93c0158321077a313692ed52fed69ff3c256ae32
[ "Apache-2.0" ]
2
2019-10-22T13:30:39.000Z
2020-10-06T10:19:57.000Z
#ifndef DISCRETE_SYSTEM_HPP #define DISCRETE_SYSTEM_HPP #include "model_common.hpp" #include "model.hpp" /* Information needed for the numerical simulation*/ typedef struct { int nb_eqs; // square system assumed int nb_diff_eqs; int nb_compl_eqs; // TODO extended to double** (NumericsMatrix**) in case of theta/multistep methods (or use c++ std::array<T>) double* system_rhs; double* system_lhs; NumericsMatrix* system_rhs_jac; NumericsMatrix* system_lhs_jac; double* z_prev; // time step double h; double Tfinal; }NumericalSimuInfo; double finiteDifference(void* env, double z_i, int i); double finiteDifferenceDz(void* env, double z_i, int i); void implicitEulerDiscr(void* env, int size, double *z, double * system); void implicitEulerDiscrJac(void* env, int size, double *z, NumericsMatrix * jacobian); void initialize_simu(NumericalSimuInfo* simu_info, const double &P0, const double &M10, const double &x10, const double &T10, const double &M20, const double &x20, const double &T20); #endif // DISCRETE_SYSTEM_HPP
31.028571
183
0.732965
vacary
87a6137215523a94877098b08bedb8addcdd866b
1,086
hpp
C++
bg/curves/euriborcurve.hpp
bondgeek/pybg
046a25074b78409c6d29302177aeac581ade90d1
[ "Unlicense", "MIT" ]
1
2017-03-14T05:39:15.000Z
2017-03-14T05:39:15.000Z
bg/curves/euriborcurve.hpp
bondgeek/pybg
046a25074b78409c6d29302177aeac581ade90d1
[ "Unlicense", "MIT" ]
null
null
null
bg/curves/euriborcurve.hpp
bondgeek/pybg
046a25074b78409c6d29302177aeac581ade90d1
[ "Unlicense", "MIT" ]
null
null
null
/* * euriborcurve.hpp * pybg * * Created by Bart Mosley on 7/2/12. * Copyright 2012 BG Research LLC. All rights reserved. * */ #ifndef EURIBORCURVE_HPP #define EURIBORCURVE_HPP #include <bg/curvebase.hpp> #include <bg/date_utilities.hpp> using namespace QuantLib; namespace bondgeek { class EURiborCurve : public CurveBase { protected: public: EURiborCurve(): CurveBase(boost::shared_ptr<IborIndex>(new Euribor(Period(6, Months))), 2, Annual, Unadjusted, Thirty360(Thirty360::European), ActualActual(ActualActual::ISDA) ) {} EURiborCurve(string tenor, Frequency fixedFrequency=Annual): CurveBase(boost::shared_ptr<IborIndex>(new Euribor( Tenor(tenor) )), 2, fixedFrequency, Unadjusted, Thirty360(Thirty360::European), ActualActual(ActualActual::ISDA) ) { } }; } #endif
24.133333
79
0.54512
bondgeek
87a79139386d672e8b4c8a45dbdb6efffa951bca
3,398
cpp
C++
RUNETag/hirestimer.cpp
GeReV/RUNEtag
e8319a132e325d73cdd7759a0d8a5f45f26dd129
[ "MIT" ]
31
2017-12-29T16:39:07.000Z
2022-03-25T03:26:29.000Z
RUNETag/hirestimer.cpp
GeReV/RUNEtag
e8319a132e325d73cdd7759a0d8a5f45f26dd129
[ "MIT" ]
7
2018-06-29T07:30:14.000Z
2021-02-16T23:19:20.000Z
RUNETag/hirestimer.cpp
GeReV/RUNEtag
e8319a132e325d73cdd7759a0d8a5f45f26dd129
[ "MIT" ]
13
2018-09-27T13:19:12.000Z
2022-03-02T08:48:42.000Z
/** * RUNETag fiducial markers library * * ----------------------------------------------------------------------------- * The MIT License (MIT) * * Copyright (c) 2015 Filippo Bergamasco * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * */ #include "hirestimer.hpp" HiresTimer::HiresTimer(void) { started = false; stopped = true; } HiresTimer::~HiresTimer(void) { } #ifdef WIN32 /* * Win32 Hi-res timer code */ double LI1D(LARGE_INTEGER *i) { return(i->LowPart+(i->HighPart*4294967296.0)); } void HiresTimer::start() { started = true; stopped = false; QueryPerformanceFrequency(&frequency); QueryPerformanceCounter(&start_time); } double HiresTimer::elapsed() { if( !started ) return 0.0; if( !stopped ) { LARGE_INTEGER end_time; QueryPerformanceCounter(&end_time); elapsed_time = (LI1D(&end_time) - LI1D(&start_time)) / LI1D(&frequency); } return elapsed_time; } void HiresTimer::stop() { LARGE_INTEGER end_time; QueryPerformanceCounter(&end_time); elapsed_time = (LI1D(&end_time) - LI1D(&start_time)) / LI1D(&frequency); stopped = true; } void HiresTimer::reset() { started = false; stopped = false; } #else #ifdef UNIX /* * Unix Hi-res timer code */ void HiresTimer::start() { started = true; stopped = false; start_time = 0.0; struct timeval start_timeval; gettimeofday( &start_timeval, NULL ); start_time = (double)start_timeval.tv_sec + (double)start_timeval.tv_usec/1000000.0; } double HiresTimer::elapsed() { if( !started ) return 0.0; if( !stopped ) { struct timeval end_timeval; gettimeofday( &end_timeval, NULL ); double tnow = (double)end_timeval.tv_sec + (double)end_timeval.tv_usec/1000000.0; elapsed_time = tnow-start_time; } return elapsed_time; } void HiresTimer::stop() { struct timeval end_timeval; gettimeofday( &end_timeval, NULL ); double tnow = (double)end_timeval.tv_sec + (double)end_timeval.tv_usec/1000000.0; elapsed_time = tnow-start_time; stopped = true; } void HiresTimer::reset() { started = false; stopped = false; } #else /* * Standard timer (NOT yet implemented) */ //#error Default standard timer not yet implemented. You see this error probably because you are trying to compile against an unsupported platform #endif #endif
24.985294
147
0.685992
GeReV
87a95e3db8fcbb1816a328097c375065212d8b99
24,965
cpp
C++
api/src/SAM_Windpower.cpp
nickdiorio/SAM
4288d4261f4f88f44106867b561b81c2ba480c85
[ "BSD-3-Clause" ]
null
null
null
api/src/SAM_Windpower.cpp
nickdiorio/SAM
4288d4261f4f88f44106867b561b81c2ba480c85
[ "BSD-3-Clause" ]
null
null
null
api/src/SAM_Windpower.cpp
nickdiorio/SAM
4288d4261f4f88f44106867b561b81c2ba480c85
[ "BSD-3-Clause" ]
null
null
null
#include <string> #include <utility> #include <vector> #include <memory> #include <iostream> #include <ssc/sscapi.h> #include "SAM_api.h" #include "ErrorHandler.h" #include "SAM_Windpower.h" SAM_EXPORT SAM_Windpower SAM_Windpower_construct(const char* def, SAM_error* err){ SAM_Windpower result = nullptr; translateExceptions(err, [&]{ result = ssc_data_create(); }); return result; } SAM_EXPORT int SAM_Windpower_execute(SAM_Windpower data, int verbosity, SAM_error* err){ int n_err = 0; translateExceptions(err, [&]{ n_err += SAM_module_exec("windpower", data, verbosity, err); }); return n_err; } SAM_EXPORT void SAM_Windpower_destruct(SAM_Windpower system) { ssc_data_free(system); } SAM_EXPORT void SAM_Windpower_Resource_weibull_k_factor_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "weibull_k_factor", number); }); } SAM_EXPORT void SAM_Windpower_Resource_weibull_reference_height_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "weibull_reference_height", number); }); } SAM_EXPORT void SAM_Windpower_Resource_weibull_wind_speed_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "weibull_wind_speed", number); }); } SAM_EXPORT void SAM_Windpower_Resource_wind_resource_data_tset(SAM_Windpower ptr, SAM_table tab, SAM_error *err){ SAM_table_set_table(ptr, "wind_resource_data", tab, err); } SAM_EXPORT void SAM_Windpower_Resource_wind_resource_distribution_mset(SAM_Windpower ptr, double* mat, int nrows, int ncols, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_matrix(ptr, "wind_resource_distribution", mat, nrows, ncols); }); } SAM_EXPORT void SAM_Windpower_Resource_wind_resource_filename_sset(SAM_Windpower ptr, const char* str, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_string(ptr, "wind_resource_filename", str); }); } SAM_EXPORT void SAM_Windpower_Resource_wind_resource_model_choice_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_resource_model_choice", number); }); } SAM_EXPORT void SAM_Windpower_Turbine_wind_resource_shear_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_resource_shear", number); }); } SAM_EXPORT void SAM_Windpower_Turbine_wind_turbine_hub_ht_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_turbine_hub_ht", number); }); } SAM_EXPORT void SAM_Windpower_Turbine_wind_turbine_max_cp_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_turbine_max_cp", number); }); } SAM_EXPORT void SAM_Windpower_Turbine_wind_turbine_powercurve_powerout_aset(SAM_Windpower ptr, double* arr, int length, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_array(ptr, "wind_turbine_powercurve_powerout", arr, length); }); } SAM_EXPORT void SAM_Windpower_Turbine_wind_turbine_powercurve_windspeeds_aset(SAM_Windpower ptr, double* arr, int length, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_array(ptr, "wind_turbine_powercurve_windspeeds", arr, length); }); } SAM_EXPORT void SAM_Windpower_Turbine_wind_turbine_rotor_diameter_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_turbine_rotor_diameter", number); }); } SAM_EXPORT void SAM_Windpower_Farm_system_capacity_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "system_capacity", number); }); } SAM_EXPORT void SAM_Windpower_Farm_wind_farm_wake_model_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_farm_wake_model", number); }); } SAM_EXPORT void SAM_Windpower_Farm_wind_farm_xCoordinates_aset(SAM_Windpower ptr, double* arr, int length, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_array(ptr, "wind_farm_xCoordinates", arr, length); }); } SAM_EXPORT void SAM_Windpower_Farm_wind_farm_yCoordinates_aset(SAM_Windpower ptr, double* arr, int length, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_array(ptr, "wind_farm_yCoordinates", arr, length); }); } SAM_EXPORT void SAM_Windpower_Farm_wind_resource_turbulence_coeff_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wind_resource_turbulence_coeff", number); }); } SAM_EXPORT void SAM_Windpower_Losses_avail_bop_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "avail_bop_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_avail_grid_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "avail_grid_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_avail_turb_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "avail_turb_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_elec_eff_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "elec_eff_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_en_icing_cutoff_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "en_icing_cutoff", number); }); } SAM_EXPORT void SAM_Windpower_Losses_en_low_temp_cutoff_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "en_low_temp_cutoff", number); }); } SAM_EXPORT void SAM_Windpower_Losses_env_degrad_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "env_degrad_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_env_exposure_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "env_exposure_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_env_ext_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "env_ext_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_env_icing_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "env_icing_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_icing_cutoff_rh_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "icing_cutoff_rh", number); }); } SAM_EXPORT void SAM_Windpower_Losses_icing_cutoff_temp_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "icing_cutoff_temp", number); }); } SAM_EXPORT void SAM_Windpower_Losses_low_temp_cutoff_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "low_temp_cutoff", number); }); } SAM_EXPORT void SAM_Windpower_Losses_ops_env_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "ops_env_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_ops_grid_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "ops_grid_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_ops_load_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "ops_load_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_ops_strategies_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "ops_strategies_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_turb_generic_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "turb_generic_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_turb_hysteresis_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "turb_hysteresis_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_turb_perf_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "turb_perf_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_turb_specific_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "turb_specific_loss", number); }); } SAM_EXPORT void SAM_Windpower_Losses_wake_loss_nset(SAM_Windpower ptr, double number, SAM_error *err){ translateExceptions(err, [&]{ ssc_data_set_number(ptr, "wake_loss", number); }); } SAM_EXPORT double SAM_Windpower_Resource_weibull_k_factor_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "weibull_k_factor", &result)) make_access_error("SAM_Windpower", "weibull_k_factor"); }); return result; } SAM_EXPORT double SAM_Windpower_Resource_weibull_reference_height_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "weibull_reference_height", &result)) make_access_error("SAM_Windpower", "weibull_reference_height"); }); return result; } SAM_EXPORT double SAM_Windpower_Resource_weibull_wind_speed_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "weibull_wind_speed", &result)) make_access_error("SAM_Windpower", "weibull_wind_speed"); }); return result; } SAM_EXPORT SAM_table SAM_Windpower_Resource_wind_resource_data_tget(SAM_Windpower ptr, SAM_error *err){ SAM_table result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_table(ptr, "wind_resource_data"); if (!result) make_access_error("SAM_Windpower", "wind_resource_data"); }); return result; } SAM_EXPORT double* SAM_Windpower_Resource_wind_resource_distribution_mget(SAM_Windpower ptr, int* nrows, int* ncols, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_matrix(ptr, "wind_resource_distribution", nrows, ncols); if (!result) make_access_error("SAM_Windpower", "wind_resource_distribution"); }); return result; } SAM_EXPORT const char* SAM_Windpower_Resource_wind_resource_filename_sget(SAM_Windpower ptr, SAM_error *err){ const char* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_string(ptr, "wind_resource_filename"); if (!result) make_access_error("SAM_Windpower", "wind_resource_filename"); }); return result; } SAM_EXPORT double SAM_Windpower_Resource_wind_resource_model_choice_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_resource_model_choice", &result)) make_access_error("SAM_Windpower", "wind_resource_model_choice"); }); return result; } SAM_EXPORT double SAM_Windpower_Turbine_wind_resource_shear_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_resource_shear", &result)) make_access_error("SAM_Windpower", "wind_resource_shear"); }); return result; } SAM_EXPORT double SAM_Windpower_Turbine_wind_turbine_hub_ht_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_turbine_hub_ht", &result)) make_access_error("SAM_Windpower", "wind_turbine_hub_ht"); }); return result; } SAM_EXPORT double SAM_Windpower_Turbine_wind_turbine_max_cp_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_turbine_max_cp", &result)) make_access_error("SAM_Windpower", "wind_turbine_max_cp"); }); return result; } SAM_EXPORT double* SAM_Windpower_Turbine_wind_turbine_powercurve_powerout_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "wind_turbine_powercurve_powerout", length); if (!result) make_access_error("SAM_Windpower", "wind_turbine_powercurve_powerout"); }); return result; } SAM_EXPORT double* SAM_Windpower_Turbine_wind_turbine_powercurve_windspeeds_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "wind_turbine_powercurve_windspeeds", length); if (!result) make_access_error("SAM_Windpower", "wind_turbine_powercurve_windspeeds"); }); return result; } SAM_EXPORT double SAM_Windpower_Turbine_wind_turbine_rotor_diameter_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_turbine_rotor_diameter", &result)) make_access_error("SAM_Windpower", "wind_turbine_rotor_diameter"); }); return result; } SAM_EXPORT double SAM_Windpower_Farm_system_capacity_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "system_capacity", &result)) make_access_error("SAM_Windpower", "system_capacity"); }); return result; } SAM_EXPORT double SAM_Windpower_Farm_wind_farm_wake_model_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_farm_wake_model", &result)) make_access_error("SAM_Windpower", "wind_farm_wake_model"); }); return result; } SAM_EXPORT double* SAM_Windpower_Farm_wind_farm_xCoordinates_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "wind_farm_xCoordinates", length); if (!result) make_access_error("SAM_Windpower", "wind_farm_xCoordinates"); }); return result; } SAM_EXPORT double* SAM_Windpower_Farm_wind_farm_yCoordinates_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "wind_farm_yCoordinates", length); if (!result) make_access_error("SAM_Windpower", "wind_farm_yCoordinates"); }); return result; } SAM_EXPORT double SAM_Windpower_Farm_wind_resource_turbulence_coeff_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wind_resource_turbulence_coeff", &result)) make_access_error("SAM_Windpower", "wind_resource_turbulence_coeff"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_avail_bop_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "avail_bop_loss", &result)) make_access_error("SAM_Windpower", "avail_bop_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_avail_grid_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "avail_grid_loss", &result)) make_access_error("SAM_Windpower", "avail_grid_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_avail_turb_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "avail_turb_loss", &result)) make_access_error("SAM_Windpower", "avail_turb_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_elec_eff_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "elec_eff_loss", &result)) make_access_error("SAM_Windpower", "elec_eff_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_en_icing_cutoff_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "en_icing_cutoff", &result)) make_access_error("SAM_Windpower", "en_icing_cutoff"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_en_low_temp_cutoff_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "en_low_temp_cutoff", &result)) make_access_error("SAM_Windpower", "en_low_temp_cutoff"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_env_degrad_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "env_degrad_loss", &result)) make_access_error("SAM_Windpower", "env_degrad_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_env_exposure_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "env_exposure_loss", &result)) make_access_error("SAM_Windpower", "env_exposure_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_env_ext_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "env_ext_loss", &result)) make_access_error("SAM_Windpower", "env_ext_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_env_icing_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "env_icing_loss", &result)) make_access_error("SAM_Windpower", "env_icing_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_icing_cutoff_rh_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "icing_cutoff_rh", &result)) make_access_error("SAM_Windpower", "icing_cutoff_rh"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_icing_cutoff_temp_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "icing_cutoff_temp", &result)) make_access_error("SAM_Windpower", "icing_cutoff_temp"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_low_temp_cutoff_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "low_temp_cutoff", &result)) make_access_error("SAM_Windpower", "low_temp_cutoff"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_ops_env_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "ops_env_loss", &result)) make_access_error("SAM_Windpower", "ops_env_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_ops_grid_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "ops_grid_loss", &result)) make_access_error("SAM_Windpower", "ops_grid_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_ops_load_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "ops_load_loss", &result)) make_access_error("SAM_Windpower", "ops_load_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_ops_strategies_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "ops_strategies_loss", &result)) make_access_error("SAM_Windpower", "ops_strategies_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_turb_generic_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "turb_generic_loss", &result)) make_access_error("SAM_Windpower", "turb_generic_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_turb_hysteresis_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "turb_hysteresis_loss", &result)) make_access_error("SAM_Windpower", "turb_hysteresis_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_turb_perf_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "turb_perf_loss", &result)) make_access_error("SAM_Windpower", "turb_perf_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_turb_specific_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "turb_specific_loss", &result)) make_access_error("SAM_Windpower", "turb_specific_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Losses_wake_loss_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "wake_loss", &result)) make_access_error("SAM_Windpower", "wake_loss"); }); return result; } SAM_EXPORT double SAM_Windpower_Outputs_annual_energy_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "annual_energy", &result)) make_access_error("SAM_Windpower", "annual_energy"); }); return result; } SAM_EXPORT double SAM_Windpower_Outputs_annual_gross_energy_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "annual_gross_energy", &result)) make_access_error("SAM_Windpower", "annual_gross_energy"); }); return result; } SAM_EXPORT double SAM_Windpower_Outputs_capacity_factor_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "capacity_factor", &result)) make_access_error("SAM_Windpower", "capacity_factor"); }); return result; } SAM_EXPORT double SAM_Windpower_Outputs_cutoff_losses_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "cutoff_losses", &result)) make_access_error("SAM_Windpower", "cutoff_losses"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_gen_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "gen", length); if (!result) make_access_error("SAM_Windpower", "gen"); }); return result; } SAM_EXPORT double SAM_Windpower_Outputs_kwh_per_kw_nget(SAM_Windpower ptr, SAM_error *err){ double result; translateExceptions(err, [&]{ if (!ssc_data_get_number(ptr, "kwh_per_kw", &result)) make_access_error("SAM_Windpower", "kwh_per_kw"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_monthly_energy_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "monthly_energy", length); if (!result) make_access_error("SAM_Windpower", "monthly_energy"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_pressure_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "pressure", length); if (!result) make_access_error("SAM_Windpower", "pressure"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_temp_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "temp", length); if (!result) make_access_error("SAM_Windpower", "temp"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_turbine_output_by_windspeed_bin_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "turbine_output_by_windspeed_bin", length); if (!result) make_access_error("SAM_Windpower", "turbine_output_by_windspeed_bin"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_wind_direction_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "wind_direction", length); if (!result) make_access_error("SAM_Windpower", "wind_direction"); }); return result; } SAM_EXPORT double* SAM_Windpower_Outputs_wind_speed_aget(SAM_Windpower ptr, int* length, SAM_error *err){ double* result = nullptr; translateExceptions(err, [&]{ result = ssc_data_get_array(ptr, "wind_speed", length); if (!result) make_access_error("SAM_Windpower", "wind_speed"); }); return result; }
28.995354
141
0.779852
nickdiorio
87ab8ec991ad3bfaf9c59a402180820e98d05ecc
5,853
hpp
C++
Include/FishEngine/Serialization/CloneArchive.hpp
yushroom/FishEngine_-Experiment
81e4c06f20f6b94dc561b358f8a11a092678aeeb
[ "MIT" ]
1
2018-12-20T02:38:44.000Z
2018-12-20T02:38:44.000Z
Include/FishEngine/Serialization/CloneArchive.hpp
yushroom/FishEngine_-Experiment
81e4c06f20f6b94dc561b358f8a11a092678aeeb
[ "MIT" ]
null
null
null
Include/FishEngine/Serialization/CloneArchive.hpp
yushroom/FishEngine_-Experiment
81e4c06f20f6b94dc561b358f8a11a092678aeeb
[ "MIT" ]
1
2018-10-25T19:40:22.000Z
2018-10-25T19:40:22.000Z
#pragma once #include <FishEngine/Serialization/Archive.hpp> #include <set> #include <vector> #include <FishEngine/Prefab.hpp> namespace FishEngine { class CollectObjectsArchive : public OutputArchive { public: void Collect(Object* obj) { if (obj->Is<Prefab>()) return; this->SerializeObject(obj); } void CollectPrefab(Prefab* prefab) { prefab->Serialize(*this); } protected: virtual void Serialize(short t) override {} virtual void Serialize(unsigned short t) override {} virtual void Serialize(int t) override {} virtual void Serialize(unsigned int t) override {} virtual void Serialize(long t) override {} virtual void Serialize(unsigned long t) override {} virtual void Serialize(long long t) override {} virtual void Serialize(unsigned long long t) override {} virtual void Serialize(float t) override {} virtual void Serialize(double t) override {} virtual void Serialize(bool t) override {} virtual void Serialize(std::string const & t) override {} virtual void SerializeNullPtr() override {} // nullptr void SerializeObject(Object* t) override { auto it = m_Objects.find(t); if (it == m_Objects.end()) { m_Objects.insert(t); t->Serialize(*this); } } void MapKey(const char* name) override {} public: std::set<Object*> m_Objects; }; class CloneOutputArchive : public OutputArchive { public: void AssertEmpty() { assert(m_IntValues.empty()); assert(m_UIntValues.empty()); assert(m_FloatValues.empty()); assert(m_StringValues.empty()); assert(m_ObjectValues.empty()); assert(m_MapKeys.empty()); } protected: virtual void Serialize(short t) override { m_IntValues.push_back(t); } virtual void Serialize(unsigned short t) override { m_UIntValues.push_back(t); } virtual void Serialize(int t) override { m_IntValues.push_back(t); } virtual void Serialize(unsigned int t) override { m_UIntValues.push_back(t); } virtual void Serialize(long t) override { m_IntValues.push_back(t); } virtual void Serialize(unsigned long t) override { m_UIntValues.push_back(t); } virtual void Serialize(long long t) override { m_IntValues.push_back(t); } virtual void Serialize(unsigned long long t) override { m_UIntValues.push_back(t); } virtual void Serialize(float t) override { m_FloatValues.push_back(t); } virtual void Serialize(double t) override { m_FloatValues.push_back(t); } virtual void Serialize(bool t) override { m_IntValues.push_back(t ? 1 : 0); } virtual void Serialize(std::string const & t) override { m_StringValues.push_back(t); } virtual void SerializeNullPtr() override { m_ObjectValues.push_back(nullptr); } // nullptr virtual void SerializeObject(Object* t) override { m_ObjectValues.push_back(t); }; void MapKey(const char* name) override { m_MapKeys.push_back(name); } //// Map //virtual void AfterValue() {} //// Sequence virtual void BeginSequence(int size) override { m_SequenceSize.push_back(size); } //virtual void BeforeSequenceItem() {} //virtual void AfterSequenceItem() {} //virtual void EndSequence() {} public: std::deque<int64_t> m_IntValues; std::deque<uint64_t> m_UIntValues; std::deque<double> m_FloatValues; std::deque<std::string> m_StringValues; std::deque<Object*> m_ObjectValues; std::deque<const char*> m_MapKeys; std::deque<int> m_SequenceSize; }; class CloneInputArchive : public InputArchive { public: CloneOutputArchive & values; std::map<Object*, Object*> & objectMemo; CloneInputArchive(CloneOutputArchive& values, std::map<Object*, Object*>& objectMemo) : values(values), objectMemo(objectMemo) { } protected: virtual void Deserialize(short & t) override { t = values.m_IntValues.front(); values.m_IntValues.pop_front(); } virtual void Deserialize(unsigned short & t) override { t = values.m_UIntValues.front(); values.m_UIntValues.pop_front(); } virtual void Deserialize(int & t) override { t = values.m_IntValues.front(); values.m_IntValues.pop_front(); } virtual void Deserialize(unsigned int & t) override { t = values.m_UIntValues.front(); values.m_UIntValues.pop_front(); } virtual void Deserialize(long & t) override { t = values.m_IntValues.front(); values.m_IntValues.pop_front(); } virtual void Deserialize(unsigned long & t) override { t = values.m_UIntValues.front(); values.m_UIntValues.pop_front(); } virtual void Deserialize(long long & t) override { t = values.m_IntValues.front(); values.m_IntValues.pop_front(); } virtual void Deserialize(unsigned long long & t) override { t = values.m_UIntValues.front(); values.m_UIntValues.pop_front(); } virtual void Deserialize(float & t) override { t = values.m_FloatValues.front(); values.m_FloatValues.pop_front(); } virtual void Deserialize(double & t) override { t = values.m_FloatValues.front(); values.m_FloatValues.pop_front(); } virtual void Deserialize(bool & t) override { t = values.m_IntValues.front(); values.m_IntValues.pop_front(); } virtual void Deserialize(std::string & t) override { t = values.m_StringValues.front(); values.m_StringValues.pop_front(); } virtual Object* DeserializeObject() override { auto obj = values.m_ObjectValues.front(); values.m_ObjectValues.pop_front(); if (obj != nullptr) { obj = this->objectMemo[obj]; } return obj; } // Map virtual bool MapKey(const char* name) override { assert(values.m_MapKeys.front() == std::string(name)); values.m_MapKeys.pop_front(); return true; } virtual void AfterValue() override {} // Sequence virtual int BeginSequence() override { int size = values.m_SequenceSize.front(); values.m_SequenceSize.pop_front(); return size; } virtual void BeginSequenceItem() override {} virtual void AfterSequenceItem() override {} virtual void EndSequence() override {} }; }
34.429412
129
0.718606
yushroom
87b089091f45aaf7a85fa23dfb980553b5aeff5b
1,138
cpp
C++
UVA/10189.cpp
DT3264/ProgrammingContestsSolutions
a297f2da654c2ca2815b9aa375c2b4ca0052269d
[ "MIT" ]
null
null
null
UVA/10189.cpp
DT3264/ProgrammingContestsSolutions
a297f2da654c2ca2815b9aa375c2b4ca0052269d
[ "MIT" ]
null
null
null
UVA/10189.cpp
DT3264/ProgrammingContestsSolutions
a297f2da654c2ca2815b9aa375c2b4ca0052269d
[ "MIT" ]
null
null
null
#include<stdio.h> int x, y; int i, j; char t; char arr[100][100]; int prob[100][100]; void mine(){ if(i-1>=0 && j-1>=0) prob[i-1][j-1]++; if(i-1>=0) prob[i-1][j]++; if(i-1>=0 && j+1<y) prob[i-1][j+1]++; /// if(j-1>=0) prob[i][j-1]++; if(j+1<y) prob[i][j+1]++; /// if(i+1<x && j-1>=0) prob[i+1][j-1]++; if(i+1<x) prob[i+1][j]++; if(i+1<x && j+1<y) prob[i+1][j+1]++; } void printPath(){ int i, j; for(i=0; i<x; i++){ for(j=0; j<y; j++){ if(arr[i][j]=='*') printf("*"); else printf("%d", prob[i][j]); } printf("\n"); } } int main(){ int cont=1; while(scanf("%d %d", &x, &y) && x!=0 && y!=0){ if(cont>1) printf("\n"); for(i=0; i<x; i++){ for(j=0; j<y; j++){ prob[i][j]=0; } } printf("Field #%d:\n", cont++); for(i=0; i<x; i++){ for(j=0; j<y; j++){ scanf(" %c", &arr[i][j]); if(arr[i][j]=='*'){ mine(); } } } printPath(); } return 0; }
21.074074
50
0.339192
DT3264
87b235e46241c19f5544be53b2589737713ffef8
1,403
cpp
C++
friend.cpp
OmairK/OOP_LAB
2cf73a7764529a68e210f2f8c9b65c441577a670
[ "MIT" ]
null
null
null
friend.cpp
OmairK/OOP_LAB
2cf73a7764529a68e210f2f8c9b65c441577a670
[ "MIT" ]
null
null
null
friend.cpp
OmairK/OOP_LAB
2cf73a7764529a68e210f2f8c9b65c441577a670
[ "MIT" ]
null
null
null
#include <iostream> #include <fstream> using namespace std; void readName(string filename){ ifstream file; file.open(filename, ios::in); string line; if (file.is_open()) { while (getline(file, line)) { cout << line << endl; } } file.close(); } class Box{ public: float length,breadth,height; Box(){} Box(float l,float b,float h):length(l),breadth(b),height(h){} friend double Volume(Box box); friend double SurfaceArea(Box box); inline void display(); }; inline void Box::display(){ cout<<"\n Dimensions \n Height: "<<height<<"\n Length: "<<length<<"\n Breadth: "<<breadth<<endl; } double volume(Box box){ return(box.length*box.height*box.breadth); } double surfaceArea(Box box){ return(2*(box.length*box.height + box.breadth*box.height + box.length*box.breadth)); } int main(){ float len,bre,hei; cout<<"Enter the dimensions of the box"<<endl; cout<<"Enter the length"<<endl; cin>>len; cout<<"Enter the breadth"<<endl; cin>>bre; cout<<"Enter the height"<<endl; cin>>hei; Box box = Box(len,bre,hei); box.display(); cout<<"The surface area is "<<surfaceArea(box)<<endl; cout<<"The volume is "<<volume(box)<<endl; readName("name.txt"); return 1; }
21.257576
118
0.568068
OmairK
87b455f92a2a238c2f2a245f15e6126c6553e68b
18,473
cpp
C++
LibCarla/source/carla/trafficmanager/CollisionStage.cpp
pirate-lofy/carla
b46117685e2e037dd6c0e6246998e5988bdc2bfb
[ "MIT" ]
1
2019-12-17T12:28:57.000Z
2019-12-17T12:28:57.000Z
LibCarla/source/carla/trafficmanager/CollisionStage.cpp
Tarfand123/carla
b46117685e2e037dd6c0e6246998e5988bdc2bfb
[ "MIT" ]
null
null
null
LibCarla/source/carla/trafficmanager/CollisionStage.cpp
Tarfand123/carla
b46117685e2e037dd6c0e6246998e5988bdc2bfb
[ "MIT" ]
null
null
null
// Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma // de Barcelona (UAB). // // This work is licensed under the terms of the MIT license. // For a copy, see <https://opensource.org/licenses/MIT>. #include "CollisionStage.h" namespace carla { namespace traffic_manager { namespace CollisionStageConstants { static const float VERTICAL_OVERLAP_THRESHOLD = 2.0f; static const float BOUNDARY_EXTENSION_MINIMUM = 2.0f; static const float EXTENSION_SQUARE_POINT = 7.5f; static const float TIME_HORIZON = 0.5f; static const float HIGHWAY_SPEED = 50.0f / 3.6f; static const float HIGHWAY_TIME_HORIZON = 5.0f; static const float CRAWL_SPEED = 10.0f / 3.6f; static const float BOUNDARY_EDGE_LENGTH = 2.0f; static const float MAX_COLLISION_RADIUS = 100.0f; } // namespace CollisionStageConstants using namespace CollisionStageConstants; CollisionStage::CollisionStage( std::string stage_name, std::shared_ptr<LocalizationToCollisionMessenger> localization_messenger, std::shared_ptr<CollisionToPlannerMessenger> planner_messenger, cc::World &world, Parameters &parameters, cc::DebugHelper &debug_helper) : PipelineStage(stage_name), localization_messenger(localization_messenger), planner_messenger(planner_messenger), world(world), parameters(parameters), debug_helper(debug_helper){ // Initializing clock for checking unregistered actors periodically. last_world_actors_pass_instance = chr::system_clock::now(); // Initializing output array selector. frame_selector = true; // Initializing messenger states. localization_messenger_state = localization_messenger->GetState(); // Initializing this messenger to preemptively write since it precedes // motion planner stage. planner_messenger_state = planner_messenger->GetState() - 1; // Initializing the number of vehicles to zero in the beginning. number_of_vehicles = 0u; } CollisionStage::~CollisionStage() {} void CollisionStage::Action() { const auto current_planner_frame = frame_selector ? planner_frame_a : planner_frame_b; // Handle vehicles not spawned by TrafficManager. const auto current_time = chr::system_clock::now(); const chr::duration<double> diff = current_time - last_world_actors_pass_instance; // Periodically check for actors not spawned by TrafficManager. if (diff.count() > 1.0f) { const auto world_actors = world.GetActors()->Filter("vehicle.*"); const auto world_walker = world.GetActors()->Filter("walker.*"); // Scanning for vehicles. for (auto actor: *world_actors.get()) { const auto unregistered_id = actor->GetId(); if (vehicle_id_to_index.find(unregistered_id) == vehicle_id_to_index.end() && unregistered_actors.find(unregistered_id) == unregistered_actors.end()) { unregistered_actors.insert({unregistered_id, actor}); } } // Scanning for pedestrians. for (auto walker: *world_walker.get()) { const auto unregistered_id = walker->GetId(); if (unregistered_actors.find(unregistered_id) == unregistered_actors.end()) { unregistered_actors.insert({unregistered_id, walker}); } } // Regularly update unregistered actors. std::vector<ActorId> actor_ids_to_erase; for (auto actor_info: unregistered_actors) { if (actor_info.second->IsAlive()) { vicinity_grid.UpdateGrid(actor_info.second); } else { vicinity_grid.EraseActor(actor_info.first); actor_ids_to_erase.push_back(actor_info.first); } } for (auto actor_id: actor_ids_to_erase) { unregistered_actors.erase(actor_id); } last_world_actors_pass_instance = current_time; } // Looping over registered actors. for (uint64_t i = 0u; i < number_of_vehicles; ++i) { const LocalizationToCollisionData &data = localization_frame->at(i); const Actor ego_actor = data.actor; const ActorId ego_actor_id = ego_actor->GetId(); // Retrieve actors around the path of the ego vehicle. std::unordered_set<ActorId> actor_id_list = GetPotentialVehicleObstacles(ego_actor); bool collision_hazard = false; // Generate number between 0 and 100 const int r = rand() % 101; // Continue only if random number is lower than our %, default is 0. if (parameters.GetPercentageIgnoreActors(boost::shared_ptr<cc::Actor>(ego_actor)) <= r) { // Check every actor in the vicinity if it poses a collision hazard. for (auto j = actor_id_list.begin(); (j != actor_id_list.end()) && !collision_hazard; ++j) { const ActorId actor_id = *j; try { Actor actor = nullptr; if (vehicle_id_to_index.find(actor_id) != vehicle_id_to_index.end()) { actor = localization_frame->at(vehicle_id_to_index.at(actor_id)).actor; } else if (unregistered_actors.find(actor_id) != unregistered_actors.end()) { actor = unregistered_actors.at(actor_id); } const cg::Location ego_location = ego_actor->GetLocation(); const cg::Location other_location = actor->GetLocation(); if (actor_id != ego_actor_id && (cg::Math::DistanceSquared(ego_location, other_location) < std::pow(MAX_COLLISION_RADIUS, 2)) && (std::abs(ego_location.z - other_location.z) < VERTICAL_OVERLAP_THRESHOLD)) { if (parameters.GetCollisionDetection(ego_actor, actor) && NegotiateCollision(ego_actor, actor)) { collision_hazard = true; } } } catch (const std::exception &e) { carla::log_warning("Encountered problem while determining collision \n"); carla::log_info("Actor might not be alive \n"); } } } CollisionToPlannerData &message = current_planner_frame->at(i); message.hazard = collision_hazard; } } void CollisionStage::DataReceiver() { const auto packet = localization_messenger->ReceiveData(localization_messenger_state); localization_frame = packet.data; localization_messenger_state = packet.id; if (localization_frame != nullptr) { // Connecting actor ids to their position indices on data arrays. // This map also provides us the additional benefit of being able to // quickly identify // if a vehicle id is registered with the traffic manager or not. uint64_t index = 0u; for (auto &element: *localization_frame.get()) { vehicle_id_to_index.insert({element.actor->GetId(), index++}); } // Allocating new containers for the changed number of registered // vehicles. if (number_of_vehicles != (*localization_frame.get()).size()) { number_of_vehicles = static_cast<uint>((*localization_frame.get()).size()); // Allocating output arrays to be shared with motion planner stage. planner_frame_a = std::make_shared<CollisionToPlannerFrame>(number_of_vehicles); planner_frame_b = std::make_shared<CollisionToPlannerFrame>(number_of_vehicles); } } } void CollisionStage::DataSender() { const DataPacket<std::shared_ptr<CollisionToPlannerFrame>> packet{ planner_messenger_state, frame_selector ? planner_frame_a : planner_frame_b }; frame_selector = !frame_selector; planner_messenger_state = planner_messenger->SendData(packet); } bool CollisionStage::NegotiateCollision(const Actor &reference_vehicle, const Actor &other_vehicle) const { bool hazard = false; auto& data_packet = localization_frame->at(vehicle_id_to_index.at(reference_vehicle->GetId())); Buffer& waypoint_buffer = data_packet.buffer; auto& other_packet = localization_frame->at(vehicle_id_to_index.at(other_vehicle->GetId())); Buffer& other_buffer = other_packet.buffer; const cg::Location reference_location = reference_vehicle->GetLocation(); const cg::Location other_location = other_vehicle->GetLocation(); const cg::Vector3D reference_heading = reference_vehicle->GetTransform().GetForwardVector(); cg::Vector3D reference_to_other = other_location - reference_location; reference_to_other = reference_to_other.MakeUnitVector(); const auto reference_vehicle_ptr = boost::static_pointer_cast<cc::Vehicle>(reference_vehicle); const auto other_vehicle_ptr = boost::static_pointer_cast<cc::Vehicle>(other_vehicle); if (waypoint_buffer.front()->CheckJunction() && other_buffer.front()->CheckJunction()) { const Polygon reference_geodesic_polygon = GetPolygon(GetGeodesicBoundary(reference_vehicle)); const Polygon other_geodesic_polygon = GetPolygon(GetGeodesicBoundary(other_vehicle)); const Polygon reference_polygon = GetPolygon(GetBoundary(reference_vehicle)); const Polygon other_polygon = GetPolygon(GetBoundary(other_vehicle)); const double reference_vehicle_to_other_geodesic = bg::distance(reference_polygon, other_geodesic_polygon); const double other_vehicle_to_reference_geodesic = bg::distance(other_polygon, reference_geodesic_polygon); const auto inter_geodesic_distance = bg::distance(reference_geodesic_polygon, other_geodesic_polygon); const auto inter_bbox_distance = bg::distance(reference_polygon, other_polygon); const cg::Vector3D other_heading = other_vehicle->GetTransform().GetForwardVector(); cg::Vector3D other_to_reference = reference_vehicle->GetLocation() - other_vehicle->GetLocation(); other_to_reference = other_to_reference.MakeUnitVector(); // Whichever vehicle's path is farthest away from the other vehicle gets // priority to move. if (inter_geodesic_distance < 0.1 && (( inter_bbox_distance > 0.1 && reference_vehicle_to_other_geodesic > other_vehicle_to_reference_geodesic ) || ( inter_bbox_distance < 0.1 && cg::Math::Dot(reference_heading, reference_to_other) > cg::Math::Dot(other_heading, other_to_reference) )) ) { hazard = true; } } else if (!waypoint_buffer.front()->CheckJunction()) { const float reference_vehicle_length = reference_vehicle_ptr->GetBoundingBox().extent.x; const float other_vehicle_length = other_vehicle_ptr->GetBoundingBox().extent.x; const float vehicle_length_sum = reference_vehicle_length + other_vehicle_length; const float bbox_extension_length = GetBoundingBoxExtention(reference_vehicle); if ((cg::Math::Dot(reference_heading, reference_to_other) > 0.0f) && (cg::Math::DistanceSquared(reference_location, other_location) < std::pow(bbox_extension_length+vehicle_length_sum, 2))) { hazard = true; } } return hazard; } traffic_manager::Polygon CollisionStage::GetPolygon(const LocationList &boundary) const { std::string boundary_polygon_wkt; for (const cg::Location &location: boundary) { boundary_polygon_wkt += std::to_string(location.x) + " " + std::to_string(location.y) + ","; } boundary_polygon_wkt += std::to_string(boundary[0].x) + " " + std::to_string(boundary[0].y); traffic_manager::Polygon boundary_polygon; bg::read_wkt("POLYGON((" + boundary_polygon_wkt + "))", boundary_polygon); return boundary_polygon; } LocationList CollisionStage::GetGeodesicBoundary(const Actor &actor) const { const LocationList bbox = GetBoundary(actor); if (vehicle_id_to_index.find(actor->GetId()) != vehicle_id_to_index.end()) { const cg::Location vehicle_location = actor->GetLocation(); float bbox_extension = GetBoundingBoxExtention(actor); const float specific_distance_margin = parameters.GetDistanceToLeadingVehicle(actor); if (specific_distance_margin > 0.0f) { bbox_extension = std::max(specific_distance_margin, bbox_extension); } const auto &waypoint_buffer = localization_frame->at(vehicle_id_to_index.at(actor->GetId())).buffer; LocationList left_boundary; LocationList right_boundary; const auto vehicle = boost::static_pointer_cast<cc::Vehicle>(actor); const float width = vehicle->GetBoundingBox().extent.y; const float length = vehicle->GetBoundingBox().extent.x; SimpleWaypointPtr boundary_start = waypoint_buffer.front(); uint64_t boundary_start_index = 0u; while (boundary_start->DistanceSquared(vehicle_location) < std::pow(length, 2) && boundary_start_index < waypoint_buffer.size() -1) { boundary_start = waypoint_buffer.at(boundary_start_index); ++boundary_start_index; } SimpleWaypointPtr boundary_end = nullptr; SimpleWaypointPtr current_point = waypoint_buffer.at(boundary_start_index); const auto vehicle_reference = boost::static_pointer_cast<cc::Vehicle>(actor); // At non-signalized junctions, we extend the boundary across the junction // and in all other situations, boundary length is velocity-dependent. bool reached_distance = false; for (uint64_t j = boundary_start_index; !reached_distance && (j < waypoint_buffer.size()); ++j) { if (boundary_start->DistanceSquared(current_point) > std::pow(bbox_extension, 2)) { reached_distance = true; } if (boundary_end == nullptr || boundary_end->DistanceSquared(current_point) > std::pow(BOUNDARY_EDGE_LENGTH, 2) || reached_distance) { const cg::Vector3D heading_vector = current_point->GetForwardVector(); const cg::Location location = current_point->GetLocation(); cg::Vector3D perpendicular_vector = cg::Vector3D(-heading_vector.y, heading_vector.x, 0.0f); perpendicular_vector = perpendicular_vector.MakeUnitVector(); // Direction determined for the left-handed system. const cg::Vector3D scaled_perpendicular = perpendicular_vector * width; left_boundary.push_back(location + cg::Location(scaled_perpendicular)); right_boundary.push_back(location + cg::Location(-1.0f * scaled_perpendicular)); boundary_end = current_point; } current_point = waypoint_buffer.at(j); } // Connecting the geodesic path boundary with the vehicle bounding box. LocationList geodesic_boundary; // Reversing right boundary to construct clockwise (left-hand system) // boundary. This is so because both left and right boundary vectors have // the closest point to the vehicle at their starting index for the right // boundary, // we want to begin at the farthest point to have a clockwise trace. std::reverse(right_boundary.begin(), right_boundary.end()); geodesic_boundary.insert(geodesic_boundary.end(), right_boundary.begin(), right_boundary.end()); geodesic_boundary.insert(geodesic_boundary.end(), bbox.begin(), bbox.end()); geodesic_boundary.insert(geodesic_boundary.end(), left_boundary.begin(), left_boundary.end()); return geodesic_boundary; } else { return bbox; } } float CollisionStage::GetBoundingBoxExtention(const Actor &actor) const { const float velocity = actor->GetVelocity().Length(); float bbox_extension = BOUNDARY_EXTENSION_MINIMUM; if (velocity > HIGHWAY_SPEED) { bbox_extension = HIGHWAY_TIME_HORIZON * velocity; } else if (velocity < CRAWL_SPEED) { bbox_extension = BOUNDARY_EXTENSION_MINIMUM; } else { bbox_extension = std::sqrt( EXTENSION_SQUARE_POINT * velocity) + velocity * TIME_HORIZON + BOUNDARY_EXTENSION_MINIMUM; } return bbox_extension; } std::unordered_set<ActorId> CollisionStage::GetPotentialVehicleObstacles(const Actor &ego_vehicle) { vicinity_grid.UpdateGrid(ego_vehicle); const auto& data_packet = localization_frame->at(vehicle_id_to_index.at(ego_vehicle->GetId())); const Buffer &waypoint_buffer = data_packet.buffer; const float velocity = ego_vehicle->GetVelocity().Length(); std::unordered_set<ActorId> actor_id_list = data_packet.overlapping_actors; if (waypoint_buffer.front()->CheckJunction() && velocity < HIGHWAY_SPEED) { actor_id_list = vicinity_grid.GetActors(ego_vehicle); } else { actor_id_list = data_packet.overlapping_actors; } return actor_id_list; } LocationList CollisionStage::GetBoundary(const Actor &actor) const { const auto actor_type = actor->GetTypeId(); cg::BoundingBox bbox; cg::Location location; cg::Vector3D heading_vector; if (actor_type[0] == 'v') { const auto vehicle = boost::static_pointer_cast<cc::Vehicle>(actor); bbox = vehicle->GetBoundingBox(); location = vehicle->GetLocation(); heading_vector = vehicle->GetTransform().GetForwardVector(); } else if (actor_type[0] == 'w') { const auto walker = boost::static_pointer_cast<cc::Walker>(actor); bbox = walker->GetBoundingBox(); location = walker->GetLocation(); heading_vector = walker->GetTransform().GetForwardVector(); } const cg::Vector3D extent = bbox.extent; heading_vector.z = 0.0f; const cg::Vector3D perpendicular_vector = cg::Vector3D(-heading_vector.y, heading_vector.x, 0.0f); // Four corners of the vehicle in top view clockwise order (left-handed // system). const cg::Vector3D x_boundary_vector = heading_vector * extent.x; const cg::Vector3D y_boundary_vector = perpendicular_vector * extent.y; return { location + cg::Location(x_boundary_vector - y_boundary_vector), location + cg::Location(-1.0f * x_boundary_vector - y_boundary_vector), location + cg::Location(-1.0f * x_boundary_vector + y_boundary_vector), location + cg::Location(x_boundary_vector + y_boundary_vector), }; } void CollisionStage::DrawBoundary(const LocationList &boundary) const { for (uint64_t i = 0u; i < boundary.size(); ++i) { debug_helper.DrawLine( boundary[i] + cg::Location(0.0f, 0.0f, 1.0f), boundary[(i + 1) % boundary.size()] + cg::Location(0.0f, 0.0f, 1.0f), 0.1f, {255u, 0u, 0u}, 0.1f); } } } // namespace traffic_manager } // namespace carla
41.419283
115
0.69469
pirate-lofy
87b4ac8c46deb92a0c290e44da493eee0e0aee0d
2,633
hpp
C++
src/base/LifeCycleComponent.hpp
inexorgame/entity-system
230a6f116fb02caeace79bc9b32f17fe08687c36
[ "MIT" ]
19
2018-10-11T09:19:48.000Z
2020-04-19T16:36:58.000Z
src/base/LifeCycleComponent.hpp
inexorgame-obsolete/entity-system-inactive
230a6f116fb02caeace79bc9b32f17fe08687c36
[ "MIT" ]
132
2018-07-28T12:30:54.000Z
2020-04-25T23:05:33.000Z
src/base/LifeCycleComponent.hpp
inexorgame-obsolete/entity-system-inactive
230a6f116fb02caeace79bc9b32f17fe08687c36
[ "MIT" ]
3
2019-03-02T16:19:23.000Z
2020-02-18T05:15:29.000Z
#pragma once #include <cstdint> #include <memory> #include <tuple> #include <vector> #include <boost/range/adaptor/reversed.hpp> #include <spdlog/spdlog.h> namespace inexor { /** * Derived classes profits from automatic initialization and destruction * of the sub components. */ class LifeCycleComponent { protected: /// @brief Constructor. template <class... LifeCycleComponents> LifeCycleComponent(LifeCycleComponents... _sub_components) : sub_components{_sub_components...} {}; /// @brief Destructor. ~LifeCycleComponent() = default; public: virtual void pre_init() {} void pre_init_components() { // Pre-Initialize before sub components are constructed pre_init(); spdlog::trace("Pre-Initializing {} sub components of {}", sub_components.size(), this->get_component_name()); for (const std::shared_ptr<LifeCycleComponent> &sub_component : sub_components) { sub_component->pre_init_components(); } } virtual void init() {} void init_components() { // Initialize before sub components are constructed init(); spdlog::trace("Initializing {} sub components of {}", sub_components.size(), this->get_component_name()); for (const std::shared_ptr<LifeCycleComponent> &sub_component : sub_components) { sub_component->init_components(); } } virtual void destroy() {} void destroy_components() { spdlog::trace("Destroying {} sub components of {}", sub_components.size(), this->get_component_name()); // Destruction in reverse order for (const std::shared_ptr<LifeCycleComponent> &sub_component : boost::adaptors::reverse(sub_components)) { sub_component->destroy_components(); } // Destruction after sub components are destructed destroy(); } virtual void post_destroy() {} void post_destroy_components() { spdlog::trace("Post-Destroying {} sub components of {}", sub_components.size(), this->get_component_name()); // Destruction in reverse order for (const std::shared_ptr<LifeCycleComponent> &sub_component : boost::adaptors::reverse(sub_components)) { sub_component->post_destroy_components(); } // Destruction after sub components are destructed post_destroy(); } virtual std::string get_component_name() { return typeid(this).name(); } private: std::vector<std::shared_ptr<LifeCycleComponent>> sub_components; }; } // namespace inexor
28.010638
117
0.651348
inexorgame
87b4fff92f1e8214a275f1a0536a306b57c090b5
796
cpp
C++
Array/Move_Even_Odd_Numbers.cpp
susantabiswas/placementPrep
22a7574206ddc63eba89517f7b68a3d2f4d467f5
[ "MIT" ]
19
2018-12-02T05:59:44.000Z
2021-07-24T14:11:54.000Z
Array/Move_Even_Odd_Numbers.cpp
susantabiswas/placementPrep
22a7574206ddc63eba89517f7b68a3d2f4d467f5
[ "MIT" ]
null
null
null
Array/Move_Even_Odd_Numbers.cpp
susantabiswas/placementPrep
22a7574206ddc63eba89517f7b68a3d2f4d467f5
[ "MIT" ]
13
2019-04-25T16:20:00.000Z
2021-09-06T19:50:04.000Z
//given an array.Arrange the elements st even nos. are at the begining and //the odd nos. are the end #include<iostream> #include<vector> using namespace std; //moves the even and odd nums void moveEvenOddNums(vector<int> &arr){ int i = 0; //this is for keeping track of even numbers int j = arr.size()-1; //for keeping track of odd numbers int temp = 0 ;//for swapping while(i<j){ //when the num. is odd,move it to the odd number position if(arr[i]%2 != 0){ temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; --j; } else ++i; } } //for displaying the numbers void disp(vector<int> &arr){ for (int i = 0; i < arr.size(); ++i) { cout<<arr[i]<<" "; } } int main(){ vector<int> arr = {12,33,14,12411,23,134,443,77}; moveEvenOddNums(arr); disp(arr); return 0; }
20.410256
74
0.626884
susantabiswas
87b695cf0ca441f75eb5d6ab731d9e0eed4e9e06
3,886
cc
C++
src/audio/synthesizer.cc
stanford-stagecast/pancake
e9cfd547edf2dd797f324b159252757190211ff2
[ "Apache-2.0" ]
2
2022-01-05T08:58:11.000Z
2022-01-06T05:33:14.000Z
src/audio/synthesizer.cc
stanford-stagecast/pancake
e9cfd547edf2dd797f324b159252757190211ff2
[ "Apache-2.0" ]
null
null
null
src/audio/synthesizer.cc
stanford-stagecast/pancake
e9cfd547edf2dd797f324b159252757190211ff2
[ "Apache-2.0" ]
null
null
null
#include "synthesizer.hh" #include <cmath> #include <iostream> constexpr unsigned int NUM_KEYS = 88; constexpr unsigned int KEY_OFFSET = 21; constexpr unsigned int KEY_DOWN = 144; constexpr unsigned int KEY_UP = 128; constexpr unsigned int SUSTAIN = 176; using namespace std; Synthesizer::Synthesizer( const string& sample_directory ) : note_repo( sample_directory ) { for ( size_t i = 0; i < NUM_KEYS; i++ ) { keys.push_back( { {}, {} } ); } } void Synthesizer::process_new_data( uint8_t event_type, uint8_t event_note, uint8_t event_velocity ) { if ( event_type == SUSTAIN ) { // std::cerr << (size_t) midi_processor.get_event_type() << " " << (size_t) event_note << " " << // (size_t)event_velocity << "\n"; if ( event_velocity == 127 ) sustain_down = true; else sustain_down = false; } else if ( event_type == KEY_DOWN || event_type == KEY_UP ) { bool direction = event_type == KEY_DOWN ? true : false; auto& k = keys.at( event_note - KEY_OFFSET ); if ( !direction ) { k.releases.push_back( { 0, event_velocity, 1.0, false } ); k.presses.back().released = true; } else { k.presses.push_back( { 0, event_velocity, 1.0, false } ); } } } wav_frame_t Synthesizer::calculate_curr_sample() const { std::pair<float, float> total_sample = { 0, 0 }; for ( size_t i = 0; i < NUM_KEYS; i++ ) { auto& k = keys.at( i ); size_t active_presses = k.presses.size(); size_t active_releases = k.releases.size(); for ( size_t j = 0; j < active_presses; j++ ) { // auto t1 = high_resolution_clock::now(); float amplitude_multiplier = k.presses.at( j ).vol_ratio * 0.2; /* to avoid clipping */ const std::pair<float, float> curr_sample = note_repo.get_sample( true, i, k.presses.at( j ).velocity, k.presses.at( j ).offset ); total_sample.first += curr_sample.first * amplitude_multiplier; total_sample.second += curr_sample.second * amplitude_multiplier; // auto t2 = high_resolution_clock::now(); // if (frames_processed % 50000 == 0) std::cerr << "Time to get one key press sample: " << duration_cast<nanoseconds>(t2 - t1).count() << "\n"; } for ( size_t j = 0; j < active_releases; j++ ) { //auto t1 = high_resolution_clock::now(); float amplitude_multiplier = exp10( -37 / 20.0 ) * 0.2; /* to avoid clipping */ const std::pair<float, float> curr_sample = note_repo.get_sample( false, i, k.releases.at( j ).velocity, k.releases.at( j ).offset ); total_sample.first += curr_sample.first * amplitude_multiplier; total_sample.second += curr_sample.second * amplitude_multiplier; //auto t2 = high_resolution_clock::now(); //if (frames_processed % 50000 == 0) std::cerr << "Time to get one key release sample: " << duration_cast<nanoseconds>(t2 - t1).count() << "\n"; } } return total_sample; } void Synthesizer::advance_sample() { frames_processed++; for ( size_t i = 0; i < NUM_KEYS; i++ ) { auto& k = keys.at( i ); size_t active_presses = k.presses.size(); size_t active_releases = k.releases.size(); for ( size_t j = 0; j < active_presses; j++ ) { k.presses.at( j ).offset++; if ( note_repo.note_finished( true, i, k.presses.at( j ).velocity, k.presses.at( j ).offset ) ) { k.presses.erase( k.presses.begin() ); j--; active_presses--; } else if ( ( k.presses.at( j ).released && !sustain_down ) & ( k.presses.at( j ).vol_ratio > 0 ) ) { k.presses.at( j ).vol_ratio -= 0.0001; } } for ( size_t j = 0; j < active_releases; j++ ) { k.releases.at( j ).offset++; if ( note_repo.note_finished( false, i, k.releases.at( j ).velocity, k.releases.at( j ).offset ) ) { k.releases.erase( k.releases.begin() ); j--; active_releases--; } } } }
33.791304
150
0.617859
stanford-stagecast
87b870a79ffa203ac6f3a4eeceb49a047389ebab
56,469
cc
C++
src/client/client.cc
Caesar-github/rkmedia
953f22f7a5965a04ca2688d251ccce9683ce993c
[ "BSD-3-Clause" ]
2
2021-07-01T00:51:48.000Z
2022-03-01T23:46:02.000Z
src/client/client.cc
Caesar-github/rkmedia
953f22f7a5965a04ca2688d251ccce9683ce993c
[ "BSD-3-Clause" ]
2
2021-02-03T12:47:35.000Z
2021-12-12T13:30:00.000Z
src/client/client.cc
Caesar-github/rkmedia
953f22f7a5965a04ca2688d251ccce9683ce993c
[ "BSD-3-Clause" ]
2
2020-11-02T09:13:23.000Z
2021-07-07T11:29:24.000Z
#include <assert.h> #include <drm_fourcc.h> #include <fcntl.h> #include <malloc.h> #include <pthread.h> #include <signal.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/poll.h> #include <sys/shm.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/un.h> #include <time.h> #include <unistd.h> #include <xf86drm.h> #include "../socket/socket.h" #include "rkmedia_api.h" #define CONST_STRING_NUM 256 const char *const_string[CONST_STRING_NUM] = {NULL}; typedef enum rkCB_TYPE { CB_TYPE_EVENT = 0, CB_TYPE_OUT } CB_TYPE_E; typedef struct EVENT_CALL_LIST { int id; MPP_CHN_S stChn; void *cb; RK_VOID *pHandle; CB_TYPE_E type; struct EVENT_CALL_LIST *next; } EVENT_CALL_LIST_S; typedef struct MB_LIST { MEDIA_BUFFER mb; void *ptr; int devfd; int fd; int handle; int size; struct MB_LIST *next; } MB_LIST_S; static EVENT_CALL_LIST_S *event_cb_list = NULL; static pthread_mutex_t event_mutex = PTHREAD_MUTEX_INITIALIZER; static MB_LIST_S *mb_list = NULL; static pthread_mutex_t mb_mutex = PTHREAD_MUTEX_INITIALIZER; MB_LIST_S *mb_list_add(MEDIA_BUFFER mb, void *ptr, int devfd, int fd, int handle, int size) { MB_LIST_S *ret = NULL; MB_LIST_S *tmp = NULL; pthread_mutex_lock(&mb_mutex); if (mb_list) { tmp = mb_list; while (tmp) { if (tmp->mb == mb) { ret = tmp; break; } tmp = tmp->next; } } if (ret == NULL) { tmp = (MB_LIST_S *)malloc(sizeof(MB_LIST_S)); tmp->next = mb_list; tmp->mb = mb; tmp->ptr = ptr; tmp->devfd = devfd; tmp->fd = fd; tmp->handle = handle; tmp->size = size; mb_list = tmp; ret = mb_list; } pthread_mutex_unlock(&mb_mutex); return ret; } int mb_list_update(MEDIA_BUFFER mb, MB_LIST_S *info) { int ret = -1; MB_LIST_S *tmp = NULL; pthread_mutex_lock(&mb_mutex); if (mb_list) { tmp = mb_list; while (tmp) { if (tmp->mb == mb) { break; } tmp = tmp->next; } } if (tmp) { ret = 0; tmp->ptr = info->ptr; tmp->devfd = info->devfd; tmp->fd = info->fd; tmp->handle = info->handle; tmp->size = info->size; } pthread_mutex_unlock(&mb_mutex); return ret; } int mb_list_get(MEDIA_BUFFER mb, MB_LIST_S *info) { int ret = -1; MB_LIST_S *tmp = NULL; pthread_mutex_lock(&mb_mutex); if (mb_list) { tmp = mb_list; while (tmp) { if (tmp->mb == mb) { break; } tmp = tmp->next; } } if (tmp) { ret = 0; memcpy(info, tmp, sizeof(MB_LIST_S)); } pthread_mutex_unlock(&mb_mutex); return ret; } void del_list_del(MEDIA_BUFFER mb) { pthread_mutex_lock(&mb_mutex); again: if (mb_list) { MB_LIST_S *tmp = mb_list; MB_LIST_S *next = tmp->next; if (tmp->mb == mb) { mb_list = tmp->next; free(tmp); goto again; } while (next) { if (next->mb == mb) { tmp->next = next->next; free(next); } tmp = next; next = tmp->next; } } pthread_mutex_unlock(&mb_mutex); } void *MbMap(int devfd, int handle, int size) { struct drm_mode_map_dumb dmmd; memset(&dmmd, 0, sizeof(dmmd)); dmmd.handle = handle; if (drmIoctl(devfd, DRM_IOCTL_MODE_MAP_DUMB, &dmmd)) printf("Failed to map dumb\n"); return mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, devfd, dmmd.offset); } int MbHandleToFD(int devfd, int handle) { int fd; drmPrimeHandleToFD(devfd, handle, DRM_CLOEXEC, &fd); return fd; } EVENT_CALL_LIST_S *event_list_add(const MPP_CHN_S *pstChn, RK_VOID *pHandle, void *cb, CB_TYPE_E type) { EVENT_CALL_LIST_S *ret = NULL; EVENT_CALL_LIST_S *tmp = NULL; int id = (pstChn->enModId << 16) + pstChn->s32ChnId; pthread_mutex_lock(&event_mutex); if (event_cb_list) { tmp = event_cb_list; while (tmp) { if (tmp->id == id && tmp->cb == cb) { ret = tmp; break; } tmp = tmp->next; } } if (ret == NULL) { tmp = (EVENT_CALL_LIST_S *)malloc(sizeof(EVENT_CALL_LIST_S)); memcpy(&tmp->stChn, pstChn, sizeof(MPP_CHN_S)); tmp->next = event_cb_list; tmp->id = id; tmp->pHandle = pHandle; tmp->cb = cb; tmp->type = type; event_cb_list = tmp; ret = event_cb_list; } pthread_mutex_unlock(&event_mutex); return ret; } void *event_server_run(void *arg) { int fd; EVENT_CALL_LIST_S *node = (EVENT_CALL_LIST_S *)arg; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &node->stChn, sizeof(MPP_CHN_S)); sock_write(fd, &node->type, sizeof(CB_TYPE_E)); while (1) { if (node->cb) { if (node->type == CB_TYPE_EVENT) { int len; RK_VOID *data = NULL; if (sock_read(fd, &len, sizeof(int)) <= 0) break; data = (RK_VOID *)malloc(len); if (sock_read(fd, data, len) <= 0) break; EventCbFunc cb = (EventCbFunc)node->cb; cb(node->pHandle, data); if (data) free(data); } else if (node->type == CB_TYPE_OUT) { MEDIA_BUFFER mb; if (sock_read(fd, &mb, sizeof(MEDIA_BUFFER)) <= 0) break; OutCbFunc cb = (OutCbFunc)node->cb; cb(mb); } } } /* End transmission parameters */ cli_end(fd); pthread_exit(NULL); return 0; } void example_0(void) { int fd; printf("%s, in\n", __func__); fd = cli_begin((char *)__func__); /* Transmission parameters */ /* End transmission parameters */ cli_end(fd); printf("%s, out\n", __func__); } int example_1(int a, int b, int *c) { int fd; int ret = 0; printf("%s, in\n", __func__); fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &a, sizeof(int)); sock_write(fd, &b, sizeof(int)); sock_read(fd, c, sizeof(int)); sock_read(fd, &ret, sizeof(int)); printf("%s, a = %d, b = %d, c = %d, ret = %d\n", __func__, a, b, *c, ret); /* End transmission parameters */ cli_end(fd); printf("%s, out\n", __func__); return ret; } #if 0 _CAPI RK_S32 SAMPLE_COMM_ISP_Init(RK_S32 CamId, rk_aiq_working_mode_t WDRMode, RK_BOOL MultiCam, const char *iq_file_dir) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &CamId, sizeof(RK_S32)); sock_write(fd, &WDRMode, sizeof(rk_aiq_working_mode_t)); sock_write(fd, &MultiCam, sizeof(RK_BOOL)); len = strlen(iq_file_dir) + 1; sock_write(fd, &len, sizeof(int)); sock_write(fd, iq_file_dir, len); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 SAMPLE_COMM_ISP_Stop(RK_S32 CamId) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &CamId, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 SAMPLE_COMM_ISP_Run(RK_S32 CamId) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &CamId, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 SAMPLE_COMM_ISP_SetFrameRate(RK_S32 CamId, RK_U32 uFps) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &CamId, sizeof(RK_S32)); sock_write(fd, &uFps, sizeof(RK_U32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 ISP_RUN(int s32CamId, int fps) { int fd; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &s32CamId, sizeof(int)); sock_write(fd, &fps, sizeof(int)); /* End transmission parameters */ cli_end(fd); return RK_ERR_SYS_OK; } _CAPI RK_S32 ISP_STOP(int s32CamId) { int fd; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &s32CamId, sizeof(int)); /* End transmission parameters */ cli_end(fd); return RK_ERR_SYS_OK; } #endif _CAPI RK_S32 RK_MPI_SYS_Init() { int fd; fd = cli_begin((char *)__func__); /* Transmission parameters */ /* End transmission parameters */ cli_end(fd); return RK_ERR_SYS_OK; } _CAPI RK_S32 RK_MPI_SYS_Bind(const MPP_CHN_S *pstSrcChn, const MPP_CHN_S *pstDestChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, pstSrcChn, sizeof(MPP_CHN_S)); sock_write(fd, pstDestChn, sizeof(MPP_CHN_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_SYS_UnBind(const MPP_CHN_S *pstSrcChn, const MPP_CHN_S *pstDestChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, pstSrcChn, sizeof(MPP_CHN_S)); sock_write(fd, pstDestChn, sizeof(MPP_CHN_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_SetChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_CHN_ATTR_S *pstChnAttr) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViPipe, sizeof(VI_PIPE)); sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_write(fd, pstChnAttr, sizeof(VI_CHN_ATTR_S)); len = strlen(pstChnAttr->pcVideoNode) + 1; sock_write(fd, &len, sizeof(int)); if (len) sock_write(fd, pstChnAttr->pcVideoNode, len); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_EnableChn(VI_PIPE ViPipe, VI_CHN ViChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViPipe, sizeof(VI_PIPE)); sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_DisableChn(VI_PIPE ViPipe, VI_CHN ViChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViPipe, sizeof(VI_PIPE)); sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_StartRegionLuma(VI_CHN ViChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_StopRegionLuma(VI_CHN ViChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_GetChnRegionLuma( VI_PIPE ViPipe, VI_CHN ViChn, const VIDEO_REGION_INFO_S *pstRegionInfo, RK_U64 *pu64LumaData, RK_S32 s32MilliSec) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViPipe, sizeof(VI_PIPE)); sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_write(fd, pstRegionInfo, sizeof(VIDEO_REGION_INFO_S)); sock_write(fd, &s32MilliSec, sizeof(RK_S32)); sock_read(fd, pu64LumaData, sizeof(RK_U64) * 2); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_RGN_SetCover(VI_PIPE ViPipe, VI_CHN ViChn, const OSD_REGION_INFO_S *pstRgnInfo, const COVER_INFO_S *pstCoverInfo) { int fd; RK_S32 ret = 0; int haveinfo = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViPipe, sizeof(VI_PIPE)); sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_write(fd, pstRgnInfo, sizeof(OSD_REGION_INFO_S)); if (pstCoverInfo) { haveinfo = 1; sock_write(fd, &haveinfo, sizeof(int)); sock_write(fd, pstCoverInfo, sizeof(COVER_INFO_S)); } else { sock_write(fd, &haveinfo, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VI_StartStream(VI_PIPE ViPipe, VI_CHN ViChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &ViPipe, sizeof(VI_PIPE)); sock_write(fd, &ViChn, sizeof(VI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_RGA_CreateChn(RGA_CHN RgaChn, RGA_ATTR_S *pstAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &RgaChn, sizeof(RGA_CHN)); sock_write(fd, pstAttr, sizeof(RGA_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_RGA_DestroyChn(RGA_CHN RgaChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &RgaChn, sizeof(RGA_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_RGA_GetChnAttr(RGA_CHN RgaChn, RGA_ATTR_S *pstAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &RgaChn, sizeof(RGA_CHN)); sock_read(fd, pstAttr, sizeof(RGA_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_RGA_SetChnAttr(RGA_CHN RgaChn, const RGA_ATTR_S *pstAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &RgaChn, sizeof(RGA_CHN)); sock_write(fd, pstAttr, sizeof(RGA_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VO_CreateChn(VO_CHN VoChn, const VO_CHN_ATTR_S *pstAttr) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VoChn, sizeof(VO_CHN)); sock_write(fd, pstAttr, sizeof(VO_CHN_ATTR_S)); if (pstAttr->pcDevNode) { len = strlen(pstAttr->pcDevNode) + 1; sock_write(fd, &len, sizeof(int)); sock_write(fd, pstAttr->pcDevNode, len); } else { len = 0; sock_write(fd, &len, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VO_GetChnAttr(VO_CHN VoChn, VO_CHN_ATTR_S *pstAttr) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; char *pcDevNode = NULL; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VoChn, sizeof(VO_CHN)); if (sock_read(fd, pstAttr, sizeof(VO_CHN_ATTR_S)) == SOCKERR_CLOSED) { ret = -1; goto out; } if (sock_read(fd, &len, sizeof(int)) == SOCKERR_CLOSED) { ret = -1; goto out; } if (len) { pcDevNode = (char *)malloc(len); if (sock_read(fd, pcDevNode, len) == SOCKERR_CLOSED) { ret = -1; free(pcDevNode); goto out; } for (unsigned int i = 0; i < CONST_STRING_NUM; i++) { if (const_string[i]) { if (strcmp(pcDevNode, const_string[i]) == 0) { pstAttr->pcDevNode = const_string[i]; free(pcDevNode); break; } } else { const_string[i] = pcDevNode; pstAttr->pcDevNode = const_string[i]; break; } } } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ out: cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VO_SetChnAttr(VO_CHN VoChn, const VO_CHN_ATTR_S *pstAttr) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VoChn, sizeof(VO_CHN)); sock_write(fd, pstAttr, sizeof(VO_CHN_ATTR_S)); if (pstAttr->pcDevNode) { len = strlen(pstAttr->pcDevNode) + 1; sock_write(fd, &len, sizeof(int)); sock_write(fd, pstAttr->pcDevNode, len); } else { len = 0; sock_write(fd, &len, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VO_DestroyChn(VO_CHN VoChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VoChn, sizeof(VO_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ALGO_MD_CreateChn(ALGO_MD_CHN MdChn, const ALGO_MD_ATTR_S *pstChnAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &MdChn, sizeof(ALGO_MD_CHN)); sock_write(fd, pstChnAttr, sizeof(ALGO_MD_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ALGO_MD_DestroyChn(ALGO_MD_CHN MdChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &MdChn, sizeof(ALGO_MD_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ALGO_MD_EnableSwitch(ALGO_MD_CHN MdChn, RK_BOOL bEnable) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &MdChn, sizeof(ALGO_MD_CHN)); sock_write(fd, &bEnable, sizeof(RK_BOOL)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ALGO_OD_CreateChn(ALGO_OD_CHN OdChn, const ALGO_OD_ATTR_S *pstChnAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &OdChn, sizeof(ALGO_OD_CHN)); sock_write(fd, pstChnAttr, sizeof(ALGO_OD_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ALGO_OD_DestroyChn(ALGO_OD_CHN OdChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &OdChn, sizeof(ALGO_OD_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ALGO_OD_EnableSwitch(ALGO_OD_CHN OdChn, RK_BOOL bEnable) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &OdChn, sizeof(ALGO_OD_CHN)); sock_write(fd, &bEnable, sizeof(RK_BOOL)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ADEC_CreateChn(ADEC_CHN AdecChn, const ADEC_CHN_ATTR_S *pstAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AdecChn, sizeof(ADEC_CHN)); sock_write(fd, pstAttr, sizeof(ADEC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_ADEC_DestroyChn(ADEC_CHN AdecChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AdecChn, sizeof(ADEC_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_SYS_RegisterEventCb(const MPP_CHN_S *pstChn, RK_VOID *pHandle, EventCbFunc cb) { printf("%s 1\n", __func__); EVENT_CALL_LIST_S *node = event_list_add(pstChn, pHandle, (void *)cb, CB_TYPE_EVENT); printf("%s 2\n", __func__); if (node) { pthread_t tid = 0; printf("%s 3\n", __func__); pthread_create(&tid, NULL, event_server_run, (void *)node); } printf("%s 4\n", __func__); return 0; } _CAPI RK_S32 RK_MPI_SYS_RegisterOutCb(const MPP_CHN_S *pstChn, OutCbFunc cb) { EVENT_CALL_LIST_S *node = event_list_add(pstChn, NULL, (void *)cb, CB_TYPE_OUT); if (node) { pthread_t tid = 0; pthread_create(&tid, NULL, event_server_run, (void *)node); } return 0; } _CAPI RK_S32 RK_MPI_SYS_SendMediaBuffer(MOD_ID_E enModID, RK_S32 s32ChnID, MEDIA_BUFFER buffer) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &enModID, sizeof(MOD_ID_E)); sock_write(fd, &s32ChnID, sizeof(RK_S32)); sock_write(fd, &buffer, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER RK_MPI_SYS_GetMediaBuffer(MOD_ID_E enModID, RK_S32 s32ChnID, RK_S32 s32MilliSec) { int fd; MEDIA_BUFFER mb; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &enModID, sizeof(MOD_ID_E)); sock_write(fd, &s32ChnID, sizeof(RK_S32)); sock_write(fd, &s32MilliSec, sizeof(RK_S32)); sock_read(fd, &mb, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return mb; } _CAPI RK_S32 RK_MPI_MB_ReleaseBuffer(MEDIA_BUFFER mb) { int fd; RK_S32 ret = RK_ERR_SYS_OK; MB_LIST_S info; if (mb_list_get(mb, &info) == 0) { del_list_del(mb); if (info.ptr) munmap(info.ptr, info.size); close(info.fd); close(info.devfd); } fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI void *RK_MPI_MB_GetPtr(MEDIA_BUFFER mb) { int fd; int handle = 0; int size = 0; int mbfd = 0; void *ptr = NULL; MB_LIST_S info; int devfd; if (mb_list_get(mb, &info) == 0) { if (info.ptr == NULL) { info.ptr = MbMap(info.devfd, info.handle, info.size); mb_list_update(mb, &info); } printf("%s 1 ptr = %p\n", __func__, info.ptr); return info.ptr; } fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_recv_devfd(fd, &devfd); sock_read(fd, &handle, sizeof(int)); sock_read(fd, &size, sizeof(int)); /* End transmission parameters */ cli_end(fd); ptr = MbMap(devfd, handle, size); mbfd = MbHandleToFD(devfd, handle); mb_list_add(mb, ptr, devfd, mbfd, handle, size); printf("%s 2 ptr = %p, handle = %d, mbfd = %d\n", __func__, ptr, handle, mbfd); return ptr; } _CAPI int RK_MPI_MB_GetFD(MEDIA_BUFFER mb) { int fd; int handle = 0; int size = 0; int mbfd = 0; MB_LIST_S info; int devfd; if (mb_list_get(mb, &info) == 0) { return info.fd; } fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_recv_devfd(fd, &devfd); sock_read(fd, &handle, sizeof(int)); sock_read(fd, &size, sizeof(int)); /* End transmission parameters */ cli_end(fd); mbfd = MbHandleToFD(devfd, handle); mb_list_add(mb, NULL, devfd, mbfd, handle, size); return mbfd; } _CAPI RK_S32 RK_MPI_MB_GetImageInfo(MEDIA_BUFFER mb, MB_IMAGE_INFO_S *pstImageInfo) { int fd; int ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, pstImageInfo, sizeof(MB_IMAGE_INFO_S)); sock_read(fd, &ret, sizeof(int)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI size_t RK_MPI_MB_GetSize(MEDIA_BUFFER mb) { int fd; size_t ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(size_t)); /* End transmission parameters */ cli_end(fd); printf("%s size = %d\n", __func__, ret); return ret; } _CAPI MOD_ID_E RK_MPI_MB_GetModeID(MEDIA_BUFFER mb) { int fd; MOD_ID_E ret; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(MOD_ID_E)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S16 RK_MPI_MB_GetChannelID(MEDIA_BUFFER mb) { int fd; RK_S16 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_S16)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_U64 RK_MPI_MB_GetTimestamp(MEDIA_BUFFER mb) { int fd; RK_U64 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_U64)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_MB_SetTimestamp(MEDIA_BUFFER mb, RK_U64 timestamp) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_write(fd, &timestamp, sizeof(RK_U64)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_MB_SetSize(MEDIA_BUFFER mb, RK_U32 size) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_write(fd, &size, sizeof(RK_U32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER RK_MPI_MB_CreateBuffer(RK_U32 u32Size, RK_BOOL boolHardWare, RK_U8 u8Flag) { int fd; MEDIA_BUFFER ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &u32Size, sizeof(RK_U32)); sock_write(fd, &boolHardWare, sizeof(RK_BOOL)); sock_write(fd, &u8Flag, sizeof(RK_U8)); sock_read(fd, &ret, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER RK_MPI_MB_CreateImageBuffer(MB_IMAGE_INFO_S *pstImageInfo, RK_BOOL boolHardWare, RK_U8 u8Flag) { int fd; MEDIA_BUFFER ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, pstImageInfo, sizeof(MB_IMAGE_INFO_S)); sock_write(fd, &boolHardWare, sizeof(RK_BOOL)); sock_write(fd, &u8Flag, sizeof(RK_U8)); sock_read(fd, &ret, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER RK_MPI_MB_CreateAudioBuffer(RK_U32 u32BufferSize, RK_BOOL boolHardWare) { int fd; MEDIA_BUFFER ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &u32BufferSize, sizeof(RK_U32)); sock_write(fd, &boolHardWare, sizeof(RK_BOOL)); sock_read(fd, &ret, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER_POOL RK_MPI_MB_POOL_Create(MB_POOL_PARAM_S *pstPoolParam) { int fd; MEDIA_BUFFER ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, pstPoolParam, sizeof(MB_POOL_PARAM_S)); sock_read(fd, &ret, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_MB_POOL_Destroy(MEDIA_BUFFER_POOL MBPHandle) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &MBPHandle, sizeof(MEDIA_BUFFER_POOL)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER RK_MPI_MB_POOL_GetBuffer(MEDIA_BUFFER_POOL MBPHandle, RK_BOOL bIsBlock) { int fd; MEDIA_BUFFER ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &MBPHandle, sizeof(MEDIA_BUFFER_POOL)); sock_write(fd, &bIsBlock, sizeof(RK_BOOL)); sock_read(fd, &ret, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI MEDIA_BUFFER RK_MPI_MB_ConvertToImgBuffer(MEDIA_BUFFER mb, MB_IMAGE_INFO_S *pstImageInfo) { int fd; MEDIA_BUFFER ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_write(fd, pstImageInfo, sizeof(MB_IMAGE_INFO_S)); sock_read(fd, &ret, sizeof(MEDIA_BUFFER)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_MB_GetFlag(MEDIA_BUFFER mb) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_MB_GetTsvcLevel(MEDIA_BUFFER mb) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_BOOL RK_MPI_MB_IsViFrame(MEDIA_BUFFER mb) { int fd; RK_BOOL ret; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_BOOL)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_MB_TsNodeDump(MEDIA_BUFFER mb) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &mb, sizeof(MEDIA_BUFFER)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VDEC_CreateChn(VDEC_CHN VdChn, const VDEC_CHN_ATTR_S *pstAttr) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VdChn, sizeof(VDEC_CHN)); sock_write(fd, pstAttr, sizeof(VDEC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VDEC_DestroyChn(VDEC_CHN VdChn) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VdChn, sizeof(VDEC_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_CreateChn(VENC_CHN VencChn, VENC_CHN_ATTR_S *stVencChnAttr) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, stVencChnAttr, sizeof(VENC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_DestroyChn(VENC_CHN VencChn) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_CreateJpegLightChn(VENC_CHN VencChn, VENC_CHN_ATTR_S *stVencChnAttr) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, stVencChnAttr, sizeof(VENC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_GetVencChnAttr(VENC_CHN VencChn, VENC_CHN_ATTR_S *stVencChnAttr) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_read(fd, stVencChnAttr, sizeof(VENC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_SetVencChnAttr(VENC_CHN VencChn, VENC_CHN_ATTR_S *stVencChnAttr) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, stVencChnAttr, sizeof(VENC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_GetRcParam(VENC_CHN VencChn, VENC_RC_PARAM_S *pstRcParam) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_read(fd, pstRcParam, sizeof(VENC_RC_PARAM_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_SetRcParam(VENC_CHN VencChn, const VENC_RC_PARAM_S *pstRcParam) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstRcParam, sizeof(VENC_RC_PARAM_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_SetJpegParam(VENC_CHN VencChn, const VENC_JPEG_PARAM_S *pstJpegParam) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstJpegParam, sizeof(VENC_JPEG_PARAM_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_RGN_Init(VENC_CHN VencChn, VENC_COLOR_TBL_S *stColorTbl) { int fd; RK_S32 ret = 0; int havetbl = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); if (stColorTbl) { havetbl = 1; sock_write(fd, &havetbl, sizeof(int)); sock_write(fd, stColorTbl, sizeof(VENC_COLOR_TBL_S)); } else { sock_write(fd, &havetbl, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_RGN_SetBitMap(VENC_CHN VencChn, const OSD_REGION_INFO_S *pstRgnInfo, const BITMAP_S *pstBitmap) { int fd; RK_S32 ret = 0; int len = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstRgnInfo, sizeof(OSD_REGION_INFO_S)); sock_write(fd, pstBitmap, sizeof(BITMAP_S)); if (pstBitmap->pData) { if (pstBitmap->enPixelFormat == PIXEL_FORMAT_ARGB_8888) len = pstBitmap->u32Width * pstBitmap->u32Height * 4; // len = malloc_usable_size(pstBitmap->pData) - 4; printf("%s %d, %d\n", __func__, len, malloc_usable_size(pstBitmap->pData) - 4); } sock_write(fd, &len, sizeof(int)); if (len > 0) { sock_write(fd, pstBitmap->pData, len); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_StartRecvFrame( VENC_CHN VencChn, const VENC_RECV_PIC_PARAM_S *pstRecvParam) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstRecvParam, sizeof(VENC_RECV_PIC_PARAM_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_RGN_SetCover(VENC_CHN VencChn, const OSD_REGION_INFO_S *pstRgnInfo, const COVER_INFO_S *pstCoverInfo) { int fd; RK_S32 ret = 0; int haveinfo = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstRgnInfo, sizeof(OSD_REGION_INFO_S)); if (pstCoverInfo) { haveinfo = 1; sock_write(fd, &haveinfo, sizeof(int)); sock_write(fd, pstCoverInfo, sizeof(COVER_INFO_S)); } else { sock_write(fd, &haveinfo, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_RGN_SetCoverEx(VENC_CHN VencChn, const OSD_REGION_INFO_S *pstRgnInfo, const COVER_INFO_S *pstCoverInfo) { int fd; RK_S32 ret = 0; int haveinfo = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstRgnInfo, sizeof(OSD_REGION_INFO_S)); if (pstCoverInfo) { haveinfo = 1; sock_write(fd, &haveinfo, sizeof(int)); sock_write(fd, pstCoverInfo, sizeof(COVER_INFO_S)); } else { sock_write(fd, &haveinfo, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_SetGopMode(VENC_CHN VencChn, VENC_GOP_ATTR_S *pstGopModeAttr) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstGopModeAttr, sizeof(VENC_GOP_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_GetRoiAttr(VENC_CHN VencChn, VENC_ROI_ATTR_S *pstRoiAttr, RK_S32 roi_index) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, &roi_index, sizeof(RK_S32)); sock_read(fd, pstRoiAttr, sizeof(VENC_ROI_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_SetRoiAttr(VENC_CHN VencChn, const VENC_ROI_ATTR_S *pstRoiAttr, RK_S32 region_cnt) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, pstRoiAttr, sizeof(VENC_ROI_ATTR_S)); sock_write(fd, &region_cnt, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VENC_SetResolution( VENC_CHN VencChn, VENC_RESOLUTION_PARAM_S stResolutionParam) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VencChn, sizeof(VENC_CHN)); sock_write(fd, &stResolutionParam, sizeof(VENC_RESOLUTION_PARAM_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_CreateDev(VMIX_DEV VmDev, VMIX_DEV_INFO_S *pstDevInfo) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, pstDevInfo, sizeof(VMIX_DEV_INFO_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_DestroyDev(VMIX_DEV VmDev) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_EnableChn(VMIX_DEV VmDev, VMIX_CHN VmChn) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_DisableChn(VMIX_DEV VmDev, VMIX_CHN VmChn) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_SetLineInfo(VMIX_DEV VmDev, VMIX_CHN VmChn, VMIX_LINE_INFO_S VmLine) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_write(fd, &VmLine, sizeof(VMIX_LINE_INFO_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_ShowChn(VMIX_DEV VmDev, VMIX_CHN VmChn) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_HideChn(VMIX_DEV VmDev, VMIX_CHN VmChn) { int fd; RK_S32 ret = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_GetChnRegionLuma( VMIX_DEV VmDev, VMIX_CHN VmChn, const VIDEO_REGION_INFO_S *pstRegionInfo, RK_U64 *pu64LumaData, RK_S32 s32MilliSec) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_write(fd, pstRegionInfo, sizeof(VIDEO_REGION_INFO_S)); sock_write(fd, &s32MilliSec, sizeof(RK_S32)); sock_read(fd, pu64LumaData, sizeof(RK_U64) * 2); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_VMIX_RGN_SetCover(VMIX_DEV VmDev, VMIX_CHN VmChn, const OSD_REGION_INFO_S *pstRgnInfo, const COVER_INFO_S *pstCoverInfo) { int fd; RK_S32 ret = 0; int haveinfo = 0; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &VmDev, sizeof(VMIX_DEV)); sock_write(fd, &VmChn, sizeof(VMIX_CHN)); sock_write(fd, pstRgnInfo, sizeof(OSD_REGION_INFO_S)); if (pstCoverInfo) { haveinfo = 1; sock_write(fd, &haveinfo, sizeof(int)); sock_write(fd, pstCoverInfo, sizeof(COVER_INFO_S)); } else { sock_write(fd, &haveinfo, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_SetChnAttr(AO_CHN AoChn, const AO_CHN_ATTR_S *pstAttr) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_write(fd, pstAttr, sizeof(AO_CHN_ATTR_S)); if (pstAttr->pcAudioNode) { len = strlen(pstAttr->pcAudioNode) + 1; sock_write(fd, &len, sizeof(int)); sock_write(fd, pstAttr->pcAudioNode, len); } else { len = 0; sock_write(fd, &len, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_EnableChn(AO_CHN AoChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_DisableChn(AO_CHN AoChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_SetVolume(AO_CHN AoChn, RK_S32 s32Volume) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_write(fd, &s32Volume, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_GetVolume(AO_CHN AoChn, RK_S32 *ps32Volume) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, ps32Volume, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_SetVqeAttr(AO_CHN AoChn, AO_VQE_CONFIG_S *pstVqeConfig) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_write(fd, pstVqeConfig, sizeof(AO_VQE_CONFIG_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_GetVqeAttr(AO_CHN AoChn, AO_VQE_CONFIG_S *pstVqeConfig) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, pstVqeConfig, sizeof(AO_VQE_CONFIG_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_EnableVqe(AO_CHN AoChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_DisableVqe(AO_CHN AoChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_QueryChnStat(AO_CHN AoChn, AO_CHN_STATE_S *pstStatus) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, pstStatus, sizeof(AO_CHN_STATE_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AO_ClearChnBuf(AO_CHN AoChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AoChn, sizeof(AO_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AENC_CreateChn(AENC_CHN AencChn, const AENC_CHN_ATTR_S *pstAttr) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AencChn, sizeof(AENC_CHN)); sock_write(fd, pstAttr, sizeof(AENC_CHN_ATTR_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AENC_DestroyChn(AENC_CHN AencChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AencChn, sizeof(AENC_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_SetChnAttr(VENC_CHN AiChn, const AI_CHN_ATTR_S *pstAttr) { int fd; int len; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(VENC_CHN)); sock_write(fd, pstAttr, sizeof(AI_CHN_ATTR_S)); if (pstAttr->pcAudioNode) { len = strlen(pstAttr->pcAudioNode) + 1; sock_write(fd, &len, sizeof(int)); sock_write(fd, pstAttr->pcAudioNode, len); } else { len = 0; sock_write(fd, &len, sizeof(int)); } sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_EnableChn(AI_CHN AiChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_DisableChn(AI_CHN AiChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_SetVolume(AI_CHN AiChn, RK_S32 s32Volume) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_write(fd, &s32Volume, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_GetVolume(AI_CHN AiChn, RK_S32 *ps32Volume) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, ps32Volume, sizeof(RK_S32)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_SetTalkVqeAttr(AI_CHN AiChn, AI_TALKVQE_CONFIG_S *pstVqeConfig) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_write(fd, pstVqeConfig, sizeof(AI_TALKVQE_CONFIG_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_GetTalkVqeAttr(AI_CHN AiChn, AI_TALKVQE_CONFIG_S *pstVqeConfig) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, pstVqeConfig, sizeof(AI_TALKVQE_CONFIG_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_SetRecordVqeAttr(AI_CHN AiChn, AI_RECORDVQE_CONFIG_S *pstVqeConfig) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_write(fd, pstVqeConfig, sizeof(AI_RECORDVQE_CONFIG_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_GetRecordVqeAttr(AI_CHN AiChn, AI_RECORDVQE_CONFIG_S *pstVqeConfig) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, pstVqeConfig, sizeof(AI_RECORDVQE_CONFIG_S)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_EnableVqe(AI_CHN AiChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_StartStream(AI_CHN AiChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; } _CAPI RK_S32 RK_MPI_AI_DisableVqe(AI_CHN AiChn) { int fd; RK_S32 ret = RK_ERR_SYS_OK; fd = cli_begin((char *)__func__); /* Transmission parameters */ sock_write(fd, &AiChn, sizeof(AI_CHN)); sock_read(fd, &ret, sizeof(RK_S32)); /* End transmission parameters */ cli_end(fd); return ret; }
25.030585
81
0.630452
Caesar-github
87b8a0aa6812d30e13c12400662c46eea59acae6
3,018
cpp
C++
Frameworks/Starboard/dlfcn.cpp
Art52123103/WinObjC
5672d1c99851b6125514381c39f4243692514b0b
[ "MIT" ]
null
null
null
Frameworks/Starboard/dlfcn.cpp
Art52123103/WinObjC
5672d1c99851b6125514381c39f4243692514b0b
[ "MIT" ]
null
null
null
Frameworks/Starboard/dlfcn.cpp
Art52123103/WinObjC
5672d1c99851b6125514381c39f4243692514b0b
[ "MIT" ]
null
null
null
//****************************************************************************** // // Copyright (c) 2016 Microsoft Corporation. All rights reserved. // // This code is licensed under the MIT License (MIT). // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. // //****************************************************************************** #include <dlfcn.h> #include <windows.h> #include <memory> #include <string> #include <string.h> /** @Status Caveat @Notes This function can only find libraries in the root of the current package. The mode parameter is ignored. In addition, error information is not available on failure. */ void* dlopen(const char* path, int mode) { try { // We can only load libraries from within our own package or any dependent // packages, so absolute paths are not much use to us. From whatever path // we're given, just strip off everything but the leaf file name and try // to load that. This isn't always correct, but it is sometimes correct. std::wstring widePath(path, path + strlen(path)); DWORD pathLength = GetFullPathNameW(widePath.c_str(), 0, nullptr, nullptr); auto fullPath = std::make_unique<WCHAR[]>(pathLength); LPWSTR fileName = nullptr; GetFullPathNameW(widePath.c_str(), pathLength, fullPath.get(), &fileName); return LoadPackagedLibrary(fileName, 0); } catch (...) { } return NULL; } /** @Status Caveat @Notes Error information is not available on failure */ void* dlsym(void* handle, const char* symbol) { HMODULE module = static_cast<HMODULE>(handle); // This platform doesn't represent Objective-C class symbols in the same way as // the reference platform, so some mapping of symbols is necessary static const char OUR_CLASS_PREFIX[] = "_OBJC_CLASS_"; static const char THEIR_CLASS_PREFIX[] = "OBJC_CLASS_$_"; static const size_t THEIR_CLASS_PREFIX_LENGTH = sizeof(THEIR_CLASS_PREFIX) - 1; try { if (0 == strncmp(symbol, THEIR_CLASS_PREFIX, THEIR_CLASS_PREFIX_LENGTH)) { std::string transformedSymbol(OUR_CLASS_PREFIX); transformedSymbol.append(symbol + THEIR_CLASS_PREFIX_LENGTH); return GetProcAddress(module, transformedSymbol.c_str()); } } catch (...) { return nullptr; } return GetProcAddress(module, symbol); } /** @Status Caveat @Notes Error information is not available on failure */ int dlclose(void* handle) { HMODULE module = static_cast<HMODULE>(handle); return !FreeLibrary(module); }
34.295455
83
0.66004
Art52123103
87bddd84c173926dd88f416cdc59985934e6e6da
906
cpp
C++
test/logger_test.cpp
OpenWinch/OpenWinch-C
efbce8f0c892927560f6b719d347578c85babade
[ "Apache-2.0" ]
1
2020-11-23T23:52:19.000Z
2020-11-23T23:52:19.000Z
test/logger_test.cpp
OpenWinch/OpenWinch-C
efbce8f0c892927560f6b719d347578c85babade
[ "Apache-2.0" ]
3
2020-11-24T22:00:01.000Z
2021-02-23T22:32:31.000Z
test/logger_test.cpp
OpenWinch/OpenWinch-C
efbce8f0c892927560f6b719d347578c85babade
[ "Apache-2.0" ]
null
null
null
/** * @file logger_test.cpp * @author Mickael GAILLARD (mick.gaillard@gmail.com) * @brief OpenWinch Project * * @copyright Copyright © 2020-2021 */ #include "logger.hpp" #include "gmock/gmock.h" #include "gtest/gtest.h" class LoggerTest : public ::testing::Test { protected: Logger *logger = nullptr; LoggerTest() { } ~LoggerTest() override { } void SetUp() override { this->logger = &Logger::get(); } void TearDown() override { } }; TEST_F(LoggerTest, MethodLive) { this->logger->live("Log live."); } TEST_F(LoggerTest, MethodInfo) { this->logger->info("Log info."); } TEST_F(LoggerTest, MethodDebug) { this->logger->debug("Log debug."); } TEST_F(LoggerTest, MethodWarning) { this->logger->warning("Log warning."); } TEST_F(LoggerTest, MethodError) { this->logger->error("Log error."); } TEST_F(LoggerTest, MethodFatal) { this->logger->fatal("Log fatal."); }
18.489796
53
0.664459
OpenWinch
87c3980da828df91b88b169e33fcd02054647039
1,061
cpp
C++
Stack/parenthesis_matching.cpp
ahanavish/DSA-using-CPP
cc96ae5cabef1dfa4ac183c1ea1510f74e3f42d9
[ "MIT" ]
null
null
null
Stack/parenthesis_matching.cpp
ahanavish/DSA-using-CPP
cc96ae5cabef1dfa4ac183c1ea1510f74e3f42d9
[ "MIT" ]
null
null
null
Stack/parenthesis_matching.cpp
ahanavish/DSA-using-CPP
cc96ae5cabef1dfa4ac183c1ea1510f74e3f42d9
[ "MIT" ]
1
2021-11-29T06:12:05.000Z
2021-11-29T06:12:05.000Z
#include <iostream> #include <string.h> using namespace std; class stack { int size; int top; char *sta; char *str; public: stack(char *s) { str = s; size = strlen(s); top = -1; sta = new char[size]; } ~stack() { delete []sta; sta = 0; } bool balance() { int i=0; while(str[i] != '\0') { if(str[i] == '(') push(str[i]); else if(str[i] == ')') if(pop() == 0) return false; i++; } if(top == -1) return true; else return false; } void push(int n) { top++; sta[top] = n; } int pop() { if(top == -1) return 0; sta[top] = -10; top--; return 1; } }; int main() { char s[] = "(a+b)*(c/6)"; stack st(s); if(st.balance() == true) cout<<"-> Balanced"; else cout<<"-> Not balanced"; }
15.157143
34
0.356268
ahanavish
d7acb86feb64b28b4c6bd8012f4577137f0defb3
1,450
hpp
C++
test/timer/classes.hpp
smart-cloud/actor-zeta
9597d6c21843a5e24a7998d09ff041d2f948cc63
[ "BSD-3-Clause" ]
20
2016-01-07T07:37:52.000Z
2019-06-02T12:04:25.000Z
test/timer/classes.hpp
smart-cloud/actor-zeta
9597d6c21843a5e24a7998d09ff041d2f948cc63
[ "BSD-3-Clause" ]
30
2017-03-10T14:47:46.000Z
2019-05-09T19:23:25.000Z
test/timer/classes.hpp
jinncrafters/actor-zeta
9597d6c21843a5e24a7998d09ff041d2f948cc63
[ "BSD-3-Clause" ]
6
2017-03-10T14:06:01.000Z
2018-08-13T18:19:37.000Z
#pragma once #include <cassert> #include <chrono> #include <memory> #include <vector> #include <actor-zeta.hpp> #include <actor-zeta/detail/memory_resource.hpp> #include "tooltestsuites/scheduler_test.hpp" #include "tooltestsuites/clock_test.hpp" static std::atomic<uint64_t> alarm_counter{0}; using actor_zeta::detail::pmr::memory_resource; /// non thread safe constexpr static auto alarm_id = actor_zeta::make_message_id(0); class supervisor_lite final : public actor_zeta::cooperative_supervisor<supervisor_lite> { public: explicit supervisor_lite(memory_resource* ptr) : cooperative_supervisor(ptr, "network") , executor_(new actor_zeta::test::scheduler_test_t(1, 1)) { add_handler(alarm_id, &supervisor_lite::alarm); scheduler()->start(); } auto clock() noexcept -> actor_zeta::test::clock_test& { return executor_->clock(); } ~supervisor_lite() override = default; void alarm() { alarm_counter += 1; } protected: auto scheduler_impl() noexcept -> actor_zeta::scheduler_abstract_t* final { return executor_.get(); } auto enqueue_impl(actor_zeta::message_ptr msg, actor_zeta::execution_unit*) -> void final { { set_current_message(std::move(msg)); execute(this, current_message()); } } private: std::unique_ptr<actor_zeta::test::scheduler_test_t> executor_; std::vector<actor_zeta::actor> actors_; };
29
105
0.696552
smart-cloud
d7ad55b4b9ea461df80b04f74b7d2b28f7565485
2,185
cpp
C++
bcos-gateway/bcos-gateway/protocol/GatewayNodeStatus.cpp
contropist/FISCO-BCOS
1605c371448b410674559bb1c9e98bab722f036b
[ "Apache-2.0" ]
null
null
null
bcos-gateway/bcos-gateway/protocol/GatewayNodeStatus.cpp
contropist/FISCO-BCOS
1605c371448b410674559bb1c9e98bab722f036b
[ "Apache-2.0" ]
null
null
null
bcos-gateway/bcos-gateway/protocol/GatewayNodeStatus.cpp
contropist/FISCO-BCOS
1605c371448b410674559bb1c9e98bab722f036b
[ "Apache-2.0" ]
null
null
null
/* * Copyright (C) 2021 FISCO BCOS. * SPDX-License-Identifier: Apache-2.0 * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * @file GatewayNodeStatus.cpp * @author: yujiechen * @date 2021-12-31 */ #include "GatewayNodeStatus.h" #include <bcos-tars-protocol/Common.h> #include <bcos-tars-protocol/protocol/GroupNodeInfoImpl.h> using namespace bcos; using namespace bcos::protocol; using namespace bcos::gateway; GatewayNodeStatus::GatewayNodeStatus() : m_tarsStatus(std::make_shared<bcostars::GatewayNodeStatus>()) {} bytesPointer GatewayNodeStatus::encode() { // append groupInfos to m_tarsStatus m_tarsStatus->nodeList.clear(); for (auto const& it : m_groupNodeInfos) { auto groupNodeInfoImpl = std::dynamic_pointer_cast<bcostars::protocol::GroupNodeInfoImpl>(it); m_tarsStatus->nodeList.emplace_back(groupNodeInfoImpl->inner()); } auto encodeData = std::make_shared<bytes>(); tars::TarsOutputStream<bcostars::protocol::BufferWriterByteVector> output; m_tarsStatus->writeTo(output); output.getByteBuffer().swap(*encodeData); return encodeData; } void GatewayNodeStatus::decode(bytesConstRef _data) { tars::TarsInputStream<tars::BufferReader> input; input.setBuffer((const char*)_data.data(), _data.size()); m_tarsStatus->readFrom(input); // decode into m_groupNodeInfos m_groupNodeInfos.clear(); for (auto& it : m_tarsStatus->nodeList) { auto groupNodeInfo = std::make_shared<bcostars::protocol::GroupNodeInfoImpl>( [m_groupNodeInfo = it]() mutable { return &m_groupNodeInfo; }); m_groupNodeInfos.emplace_back(groupNodeInfo); } }
35.819672
85
0.722197
contropist
d7afdb497afd4db9747e33ac791f78e58c0dcd1b
77,409
cpp
C++
test_apps/STM32Cube_FW_F4_V1.24.0/Projects/STM32469I_EVAL/Demonstrations/TouchGFX/Gui/generated/images/src/CarouselMenu/st_menu_button_pressed.cpp
hwiwonl/ACES
9b9a6766a177c531384b863854459a7e016dbdcc
[ "NCSA" ]
null
null
null
test_apps/STM32Cube_FW_F4_V1.24.0/Projects/STM32469I_EVAL/Demonstrations/TouchGFX/Gui/generated/images/src/CarouselMenu/st_menu_button_pressed.cpp
hwiwonl/ACES
9b9a6766a177c531384b863854459a7e016dbdcc
[ "NCSA" ]
null
null
null
test_apps/STM32Cube_FW_F4_V1.24.0/Projects/STM32469I_EVAL/Demonstrations/TouchGFX/Gui/generated/images/src/CarouselMenu/st_menu_button_pressed.cpp
hwiwonl/ACES
9b9a6766a177c531384b863854459a7e016dbdcc
[ "NCSA" ]
null
null
null
// Generated by imageconverter. Please, do not edit! #include <touchgfx/hal/Config.hpp> LOCATION_EXTFLASH_PRAGMA KEEP extern const unsigned char _st_menu_button_pressed[] LOCATION_EXTFLASH_ATTRIBUTE = { // 62x62 ARGB8888 pixels. 0x18,0x0c,0x00,0x00,0x18,0x0c,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x0c,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x20,0x10,0x00,0x00,0x20,0x14,0x00,0x00,0x18,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00, 0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00, 0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x20,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00, 0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0x18,0x0c,0x00,0x00,0x18,0x10,0x00,0x00, 0x18,0x0c,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x18,0x10,0x00,0x00,0x20,0x10,0x00,0x00,0x20,0x14,0x00,0x00,0x18,0x10,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00, 0x28,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x08,0x28,0x1c,0x00,0x24,0x28,0x1c,0x00,0x3c,0x28,0x1c,0x00,0x55,0x28,0x1c,0x00,0x65,0x28,0x1c,0x00,0x71,0x28,0x1c,0x00,0x79,0x28,0x20,0x00,0x82,0x28,0x1c,0x00,0x82,0x28,0x1c,0x00,0x79,0x28,0x1c,0x00,0x71, 0x28,0x1c,0x00,0x65,0x28,0x1c,0x00,0x55,0x28,0x1c,0x00,0x3c,0x28,0x1c,0x00,0x24,0x28,0x1c,0x00,0x08,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0x18,0x10,0x00,0x00,0x18,0x0c,0x00,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0x28,0x1c,0x00,0x0c,0x28,0x1c,0x00,0x38,0x28,0x20,0x00,0x65,0x28,0x20,0x00,0x7d,0x28,0x20,0x00,0x82,0x28,0x20,0x00,0x82,0x28,0x20,0x00,0x82,0x30,0x20,0x00,0x82,0x30,0x20,0x00,0x7d,0x30,0x20,0x00,0x82,0x30,0x20,0x00,0x82,0x30,0x20,0x00,0x7d,0x30,0x20,0x00,0x82,0x28,0x20,0x00,0x82,0x30,0x20,0x00,0x82,0x28,0x20,0x00,0x82, 0x28,0x20,0x00,0x82,0x28,0x20,0x00,0x82,0x28,0x20,0x00,0x7d,0x28,0x20,0x00,0x61,0x28,0x1c,0x00,0x38,0x28,0x1c,0x00,0x10,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,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f8,0xf8,0xf7,0x38,0x2c,0x00,0x82,0x38,0x28,0x00,0x7d,0x30,0x24,0x00,0x08,0xf8,0xfc,0xf8,0x00, 0x30,0x20,0x00,0x00,0x48,0x3c,0x18,0x28,0x30,0x28,0x00,0x82,0x78,0x70,0x50,0x96,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xd0,0xcc,0xb8,0xc7,0x60,0x4c,0x08,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82, 0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x54,0x10,0x82,0x90,0x80,0x50,0x96,0xd0,0xd0,0xb8,0xcb,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0x78,0x70,0x50,0x9a,0x30,0x28,0x00,0x82,0x48,0x3c,0x20,0x28,0xf8,0xfc,0xf8,0x00, 0x30,0x20,0x00,0x00,0x58,0x50,0x38,0x4d, 0x38,0x28,0x00,0x82,0xb0,0xa8,0x98,0xb6,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb0,0xa8,0x88,0xae, 0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x4c,0x00,0x7d,0x60,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x4c,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x7d, 0x58,0x4c,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x4c,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0xb0,0xa4,0x80,0xaa,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb0,0xac,0xa0,0xb6,0x38,0x28,0x00,0x82,0x58,0x50,0x30,0x4d,0xf8,0xfc,0xf8,0x00, 0x30,0x24,0x00,0x00,0x58,0x4c,0x30,0x65,0x38,0x28,0x00,0x82,0xd0,0xc8,0xc0,0xcb, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xb8,0xac,0x90,0xb2,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x7d, 0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x60,0x4c,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x7d,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x7d,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x7d,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x7d,0x58,0x48,0x00,0x82, 0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0xd8,0xd0,0xc0,0xcb,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xd0,0xc8,0xc0,0xcb,0x38,0x28,0x00,0x7d,0x58,0x4c,0x28,0x65,0xf8,0xfc,0xf8,0x00, 0x30,0x24,0x00,0x00,0x50,0x44,0x20,0x75,0x38,0x2c,0x00,0x82,0xe0,0xe0,0xd8,0xdf,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xd0,0xcc,0xb8,0xcb,0x60,0x50,0x08,0x82,0x60,0x48,0x00,0x7d,0x58,0x48,0x00,0x82, 0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x58,0x4c,0x00,0x82,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x60,0x4c,0x00,0x82,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x82, 0x60,0x4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xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0x98,0x90,0x60,0x9e, 0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x82,0x58,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x7d,0x58,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x4c,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x4c,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0x60,0x4c,0x00,0x7d, 0x90,0x84,0x50,0x96,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0x80,0x74,0x58,0x9a,0x38,0x2c,0x00,0x82,0x98,0x94,0x80,0x49,0xf8,0xfc,0xf8,0x00, 0x30,0x24,0x00,0x00,0xd8,0xd4,0xc8,0x24,0x40,0x30,0x00,0x7d,0x40,0x34,0x08,0x82,0xf8,0xf8,0xf8,0xf7,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82, 0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x4c,0x00,0x7d,0x60,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x82,0x58,0x48,0x00,0x82,0xd8,0xd0,0xc0,0xcb,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xf8,0xf8,0xf7,0x40,0x34,0x00,0x82,0x40,0x30,0x00,0x7d, 0xd0,0xd0,0xc8,0x24,0xf8,0xfc,0xf8,0x00, 0x30,0x24,0x00,0x00,0xf8,0xfc,0xf8,0x04,0x60,0x58,0x30,0x79,0x40,0x30,0x00,0x82,0xd8,0xd4,0xc8,0xd3,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0x58,0x48,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x4c,0x00,0x82,0x60,0x4c,0x00,0x7d,0x58,0x48,0x00,0x7d, 0x60,0x48,0x00,0x82,0x58,0x4c,0x00,0x82,0x58,0x48,0x00,0x7d,0x60,0x48,0x00,0x82,0x58,0x4c,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x4c,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x4c,0x00,0x82,0x60,0x48,0x00,0x7d,0x58,0x4c,0x00,0x7d,0xb0,0xa4,0x80,0xaa,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff, 0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xf8,0xfc,0xf8,0xff,0xd8,0xd4,0xc8,0xd3,0x40,0x30,0x00,0x82,0x60,0x54,0x30,0x79,0xf8,0xfc,0xf8,0x08,0xf8,0xfc,0xf8,0x00, 0x30,0x24,0x00,0x00,0x38,0x28,0x00,0x00,0x90,0x88,0x70,0x65,0x40,0x2c,0x00,0x82,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0x00,0x82,0x48,0x38,0x00,0x82,0x48,0x38,0x00,0x7d,0x48,0x38,0x00,0x82,0x48,0x38,0x00,0x7d,0x48,0x38,0x00,0x82,0x48,0x38,0x00,0x82,0x48,0x38,0x00,0x82,0x48,0x38,0x00,0x7d,0x48,0x38,0x00,0x82,0x48,0x38,0x00,0x82, 0x48,0x38,0x00,0x7d,0x68,0x5c,0x30,0x79,0xa0,0x98,0x80,0x75,0xe0,0xe4,0xd8,0x6d,0xf8,0xfc,0xf8,0x49,0xf8,0xfc,0xf8,0x18,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0x18,0x10,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x1c,0x00,0x00, 0x28,0x1c,0x00,0x00,0x28,0x20,0x00,0x00,0x30,0x20,0x00,0x00,0x30,0x20,0x00,0x00,0x30,0x24,0x00,0x00,0x30,0x24,0x00,0x00,0x38,0x28,0x00,0x00,0x38,0x28,0x00,0x00,0x38,0x28,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x40,0x30,0x00,0x00,0xf8,0xfc,0xf8,0x0c,0xf8,0xfc,0xf8,0x30,0xf8,0xfc,0xf8,0x51,0xf0,0xf0,0xf0,0x69, 0xc0,0xbc,0xb0,0x71,0x98,0x94,0x78,0x75,0x78,0x70,0x48,0x75,0x68,0x58,0x30,0x79,0x58,0x4c,0x18,0x7d,0x50,0x40,0x10,0x7d,0x48,0x38,0x00,0x7d,0x48,0x38,0x08,0x7d,0x50,0x40,0x10,0x7d,0x58,0x4c,0x18,0x7d,0x68,0x58,0x30,0x79,0x78,0x70,0x48,0x79,0x98,0x94,0x78,0x75,0xc0,0xbc,0xb0,0x71,0xf0,0xf0,0xe8,0x69,0xf8,0xfc,0xf8,0x51, 0xf8,0xfc,0xf8,0x30,0xf8,0xfc,0xf8,0x0c,0x40,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x28,0x00,0x00,0x30,0x28,0x00,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0x18,0x10,0x00,0x00,0x18,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x14,0x00,0x00,0x20,0x18,0x00,0x00,0x20,0x18,0x00,0x00,0x28,0x18,0x00,0x00,0x28,0x1c,0x00,0x00,0x28,0x1c,0x00,0x00, 0x28,0x1c,0x00,0x00,0x28,0x20,0x00,0x00,0x30,0x20,0x00,0x00,0x30,0x24,0x00,0x00,0x30,0x24,0x00,0x00,0x30,0x28,0x00,0x00,0x38,0x28,0x00,0x00,0x38,0x28,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x30,0x00,0x00,0x40,0x30,0x00,0x00,0xf8,0xfc,0xf8,0x08,0xf8,0xfc,0xf8,0x1c,0xf8,0xfc,0xf8,0x34, 0xf8,0xfc,0xf8,0x45,0xf8,0xfc,0xf8,0x55,0xf8,0xfc,0xf8,0x5d,0xf8,0xfc,0xf8,0x65,0xf8,0xfc,0xf8,0x69,0xf8,0xfc,0xf8,0x69,0xf8,0xfc,0xf8,0x61,0xf8,0xfc,0xf8,0x5d,0xf8,0xfc,0xf8,0x55,0xf8,0xfc,0xf8,0x45,0xf8,0xfc,0xf8,0x34,0xf8,0xfc,0xf8,0x1c,0xf8,0xfc,0xf8,0x08,0x40,0x30,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00, 0x38,0x2c,0x00,0x00,0x38,0x2c,0x00,0x00,0x38,0x28,0x00,0x00,0x38,0x28,0x00,0x00,0x30,0x24,0x00,0x00,0x30,0x24,0x00,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00, 0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00,0xf8,0xfc,0xf8,0x00 };
254.634868
320
0.796949
hwiwonl
d7b22815eee156cd9b13741615d7f4d43ffe1b30
7,417
cpp
C++
ds/adsi/oledsvw/qstatus.cpp
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
ds/adsi/oledsvw/qstatus.cpp
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
ds/adsi/oledsvw/qstatus.cpp
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
// QueryStatus.cpp : implementation file // #include "stdafx.h" #include "viewex.h" #include "qstatus.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CQueryStatus dialog /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ CQueryStatus::CQueryStatus(CWnd* pParent /*=NULL*/) : CDialog(CQueryStatus::IDD, pParent) { //{{AFX_DATA_INIT(CQueryStatus) //}}AFX_DATA_INIT m_nUser = 0; m_nGroup = 0; m_nService = 0; m_nFileService = 0; m_nPrintQueue = 0; m_nToDisplay = 0; m_nComputer = 0; m_nOtherObjects = 0; m_pbAbort = NULL; } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CQueryStatus::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CQueryStatus) //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CQueryStatus, CDialog) //{{AFX_MSG_MAP(CQueryStatus) ON_BN_CLICKED(IDCANCEL, OnStop) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CQueryStatus message handlers /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CQueryStatus::IncrementType( DWORD dwType, BOOL bDisplay ) { switch( dwType ) { case USER: m_nUser++; break; case GROUP: m_nGroup++; break; case SERVICE: m_nService++; break; case FILESERVICE: m_nFileService++; break; case PRINTQUEUE: m_nPrintQueue++; break; case COMPUTER: m_nComputer++; break; default: m_nOtherObjects++; break; } if( bDisplay ) { m_nToDisplay++; } DisplayStatistics( ); UpdateWindow( ); MSG aMsg; while( PeekMessage( &aMsg, NULL, 0, 0, PM_REMOVE ) && !IsDialogMessage( &aMsg ) ) { TranslateMessage( &aMsg ); DispatchMessage( &aMsg ); } } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CQueryStatus::DisplayStatistics( void ) { SetDlgItemInt( IDS_USER, m_nUser ); SetDlgItemInt( IDS_GROUP, m_nGroup ); SetDlgItemInt( IDS_SERVICE, m_nService ); SetDlgItemInt( IDS_FILESERVICE, m_nFileService ); SetDlgItemInt( IDS_PRINTQUEUE, m_nPrintQueue ); SetDlgItemInt( IDS_OTHEROBJECTS, m_nOtherObjects ); SetDlgItemInt( IDS_COMPUTER, m_nComputer ); SetDlgItemInt( IDC_ITEMSTODISPLAY, m_nToDisplay ); } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ BOOL CQueryStatus::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here DisplayStatistics( ); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CQueryStatus::SetAbortFlag( BOOL* pAbort ) { m_pbAbort = pAbort; *pAbort = FALSE; } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CQueryStatus::OnStop() { // TODO: Add your control notification handler code here if( NULL != m_pbAbort ) { *m_pbAbort = TRUE; } } ///////////////////////////////////////////////////////////////////////////// // CDeleteStatus dialog CDeleteStatus::CDeleteStatus(CWnd* pParent /*=NULL*/) : CDialog(CDeleteStatus::IDD, pParent) { //{{AFX_DATA_INIT(CDeleteStatus) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT m_pbAbort = NULL; } void CDeleteStatus::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDeleteStatus) // NOTE: the ClassWizard will add DDX and DDV calls here //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDeleteStatus, CDialog) //{{AFX_MSG_MAP(CDeleteStatus) ON_BN_CLICKED(IDCANCEL, OnStop) //}}AFX_MSG_MAP END_MESSAGE_MAP() /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CDeleteStatus::SetAbortFlag( BOOL* pAbort ) { m_pbAbort = pAbort; *pAbort = FALSE; } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CDeleteStatus::SetCurrentObjectText ( TCHAR* szName ) { SetDlgItemText( IDC_CURRENTDELETEOBJECT, szName ); UpdateWindow( ); MSG aMsg; while( PeekMessage( &aMsg, NULL, 0, 0, PM_REMOVE ) && !IsDialogMessage( &aMsg ) ) { TranslateMessage( &aMsg ); DispatchMessage( &aMsg ); } } /*********************************************************** Function: Arguments: Return: Purpose: Author(s): Revision: Date: ***********************************************************/ void CDeleteStatus::SetStatusText( TCHAR* szStatus ) { //SetDlgItemText( IDC_DELETESTATUS, szStatus ); GetDlgItem( IDC_DELETESTATUS )->ShowWindow( SW_HIDE ); //UpdateWindow( ); /*MSG aMsg; while( PeekMessage( &aMsg, NULL, 0, 0, PM_REMOVE ) && !IsDialogMessage( &aMsg ) ) { TranslateMessage( &aMsg ); DispatchMessage( &aMsg ); }*/ } ///////////////////////////////////////////////////////////////////////////// // CDeleteStatus message handlers void CDeleteStatus::OnStop() { // TODO: Add your control notification handler code here if( NULL != m_pbAbort ) { *m_pbAbort = TRUE; } }
23.178125
78
0.443171
npocmaka
d7b77646f63e6a8074b6bf09160e7b8297afa4d4
1,376
cpp
C++
src/semana-10/Range-Minimum-Query.cpp
RicardoLopes1/desafios-prog-2021-1
1e698f0696b5636fa5608d669dd58d170f8049ea
[ "MIT" ]
null
null
null
src/semana-10/Range-Minimum-Query.cpp
RicardoLopes1/desafios-prog-2021-1
1e698f0696b5636fa5608d669dd58d170f8049ea
[ "MIT" ]
null
null
null
src/semana-10/Range-Minimum-Query.cpp
RicardoLopes1/desafios-prog-2021-1
1e698f0696b5636fa5608d669dd58d170f8049ea
[ "MIT" ]
null
null
null
#include <bits/stdc++.h> using namespace std; // https://practice.geeksforgeeks.org/problems/range-minimum-query/1/ // Range Minimum Query // Not completed class SegmentTree{ private: int n, t[4*10000]; map <string, int> rmq; public: SegmentTree( int * arr, int sz){ n = sz; build(arr, 1, 0, n-1); } void build( int * arr, int idx, int tl, int tr){ if( tl == tr ){ t[idx] = arr[tl]; }else{ int tm = (tl+tr)/2; build(arr, idx << 1, tl, tm); build(arr, idx << 1 | 1 , tm+1, tr); t[idx] = min(t[idx << 1], t[idx << 1 | 1]); } //printf("min(%d, %d) = %d\n", tl, tr, t[idx]); rmq[to_string(tl) + to_string(tr)] = t[idx]; } int searchRMQ(int l, int r){ if(l == r){ return rmq[to_string(l) + to_string(l)]; }else if(rmq[to_string(l) + to_string(r)] == 0){ int mid = (l + r)/2; //cout << l << " - " << mid << endl; int resl = searchRMQ(l, mid); //cout << mid+1 << " - " << r << endl; int resr = searchRMQ(mid+1, r); return min(resl, resr); } return rmq[to_string(l) + to_string(r)]; } }; int main(){ int arr[] = {3,2,4,2,4,3,7,1}; int n = sizeof(arr)/sizeof(int); SegmentTree st(arr, n); cout << "minimu between 0 and 4: " << st.searchRMQ(0, 4) << endl; return 0; }
23.724138
69
0.494913
RicardoLopes1
d7b806c937b4cbda5936c0e2d330a4a136c7d835
1,647
cpp
C++
Assignments/homework_03/main.cpp
Landon-Brown1/1063-DS-Brown
64220948fbc69f7bfbd1ab234fe22da5de97fa6e
[ "MIT" ]
1
2019-12-23T16:26:20.000Z
2019-12-23T16:26:20.000Z
Assignments/homework_03/main.cpp
Landon-Brown1/1063-DS-Brown
64220948fbc69f7bfbd1ab234fe22da5de97fa6e
[ "MIT" ]
null
null
null
Assignments/homework_03/main.cpp
Landon-Brown1/1063-DS-Brown
64220948fbc69f7bfbd1ab234fe22da5de97fa6e
[ "MIT" ]
null
null
null
/*AUTHOR: Landon M. Brown *ASSIGNMENT TITLE: homework_03 *ASSIGNMENT DESCRIPTION: Edit the ListStack and main so that the * overloaded constructor is used instead of the default one. *DUE DATE: 10/15/2019 *DATE CREATED: 10/12/2019 *DATE LAST MODIFIED: 10/12/2019 */ #include <iostream> #include <fstream> #include "ListStack.h" using namespace std; int main(){ ifstream inFile; // input file of animal info inFile.open("animals.txt"); ofstream outFile; // output results of main functions outFile.open("output_file.dat"); Animal *a; // animal pointer used to hold popped animals ListStack s; // List based stack object while (!inFile.eof()) { inFile >> a->name >> a->weight >> a->scary; // load animal with file data Animal *b = new Animal(a->name, a->weight, a->scary); // allocate memory for an animal s.Push(b); } inFile.close(); outFile << "INITIAL LIST:" << endl; s.Print(outFile); // Print the stack outFile << endl; // ummm a = s.Pop(); // get animal off top of stack outFile << "Pop -> " << a << endl; // print animal (cout operator overloaded) a = s.Pop(); // get animal off top of stack again outFile << "Pop -> " << a << endl; // print animal (cout operator overloaded) outFile << endl; // ummm outFile << "ENDING LIST:" << endl; s.Print(outFile); // print the stack outFile.close(); return 0; }
31.673077
97
0.549484
Landon-Brown1
d7b9aadbf4f61c98406583b50fd3f0881c6aeaf5
37,820
cpp
C++
framegraph/Vulkan/CommandBuffer/VCmdBatch.cpp
zann1x/FrameGraph
ea06e28147a51f6d7cab219b4d8f30428a539faa
[ "BSD-2-Clause" ]
null
null
null
framegraph/Vulkan/CommandBuffer/VCmdBatch.cpp
zann1x/FrameGraph
ea06e28147a51f6d7cab219b4d8f30428a539faa
[ "BSD-2-Clause" ]
null
null
null
framegraph/Vulkan/CommandBuffer/VCmdBatch.cpp
zann1x/FrameGraph
ea06e28147a51f6d7cab219b4d8f30428a539faa
[ "BSD-2-Clause" ]
null
null
null
// Copyright (c) 2018-2019, Zhirnov Andrey. For more information see 'LICENSE' #include "VCmdBatch.h" #include "VFrameGraph.h" namespace FG { /* ================================================= constructor ================================================= */ VCmdBatch::VCmdBatch (VFrameGraph &fg, uint indexInPool) : _state{ EState::Initial }, _frameGraph{ fg }, _indexInPool{ indexInPool } { STATIC_ASSERT( decltype(_state)::is_always_lock_free ); _counter.store( 0 ); _shaderDebugger.bufferAlign = BytesU{fg.GetDevice().GetDeviceLimits().minStorageBufferOffsetAlignment}; if ( FG_EnableShaderDebugging ) { CHECK( fg.GetDevice().GetDeviceLimits().maxBoundDescriptorSets > FG_DebugDescriptorSet ); } } /* ================================================= destructor ================================================= */ VCmdBatch::~VCmdBatch () { EXLOCK( _drCheck ); CHECK( _counter.load( memory_order_relaxed ) == 0 ); } /* ================================================= Initialize ================================================= */ void VCmdBatch::Initialize (EQueueType type, ArrayView<CommandBuffer> dependsOn) { EXLOCK( _drCheck ); ASSERT( _dependencies.empty() ); ASSERT( _batch.commands.empty() ); ASSERT( _batch.signalSemaphores.empty() ); ASSERT( _batch.waitSemaphores.empty() ); ASSERT( _staging.hostToDevice.empty() ); ASSERT( _staging.deviceToHost.empty() ); ASSERT( _staging.onBufferLoadedEvents.empty() ); ASSERT( _staging.onImageLoadedEvents.empty() ); ASSERT( _resourcesToRelease.empty() ); ASSERT( _swapchains.empty() ); ASSERT( _shaderDebugger.buffers.empty() ); ASSERT( _shaderDebugger.modes.empty() ); ASSERT( _submitted == null ); ASSERT( _counter.load( memory_order_relaxed ) == 0 ); _queueType = type; _state.store( EState::Initial, memory_order_relaxed ); for (auto& dep : dependsOn) { if ( auto* batch = Cast<VCmdBatch>(dep.GetBatch()) ) _dependencies.push_back( batch ); } } /* ================================================= Release ================================================= */ void VCmdBatch::Release () { EXLOCK( _drCheck ); CHECK( GetState() == EState::Complete ); ASSERT( _counter.load( memory_order_relaxed ) == 0 ); _frameGraph.RecycleBatch( this ); } /* ================================================= SignalSemaphore ================================================= */ void VCmdBatch::SignalSemaphore (VkSemaphore sem) { EXLOCK( _drCheck ); ASSERT( GetState() < EState::Submitted ); CHECK_ERR( _batch.signalSemaphores.size() < _batch.signalSemaphores.capacity(), void()); _batch.signalSemaphores.push_back( sem ); } /* ================================================= WaitSemaphore ================================================= */ void VCmdBatch::WaitSemaphore (VkSemaphore sem, VkPipelineStageFlags stage) { EXLOCK( _drCheck ); ASSERT( GetState() < EState::Submitted ); CHECK_ERR( _batch.waitSemaphores.size() < _batch.waitSemaphores.capacity(), void()); _batch.waitSemaphores.push_back( sem, stage ); } /* ================================================= PushFrontCommandBuffer / PushBackCommandBuffer ================================================= */ void VCmdBatch::PushFrontCommandBuffer (VkCommandBuffer cmd, const VCommandPool *pool) { EXLOCK( _drCheck ); ASSERT( GetState() < EState::Submitted ); CHECK_ERR( _batch.commands.size() < _batch.commands.capacity(), void()); _batch.commands.insert( 0, cmd, pool ); } void VCmdBatch::PushBackCommandBuffer (VkCommandBuffer cmd, const VCommandPool *pool) { EXLOCK( _drCheck ); ASSERT( GetState() < EState::Submitted ); CHECK_ERR( _batch.commands.size() < _batch.commands.capacity(), void()); _batch.commands.push_back( cmd, pool ); } /* ================================================= AddDependency ================================================= */ void VCmdBatch::AddDependency (VCmdBatch *batch) { EXLOCK( _drCheck ); ASSERT( GetState() < EState::Backed ); CHECK_ERR( _dependencies.size() < _dependencies.capacity(), void()); _dependencies.push_back( batch ); } /* ================================================= DestroyPostponed ================================================= */ void VCmdBatch::DestroyPostponed (VkObjectType type, uint64_t handle) { EXLOCK( _drCheck ); ASSERT( GetState() < EState::Backed ); _readyToDelete.push_back({ type, handle }); } /* ================================================= _SetState ================================================= */ void VCmdBatch::_SetState (EState newState) { EXLOCK( _drCheck ); ASSERT( uint(newState) > uint(GetState()) ); _state.store( newState, memory_order_relaxed ); } /* ================================================= OnBegin ================================================= */ bool VCmdBatch::OnBegin (const CommandBufferDesc &desc) { EXLOCK( _drCheck ); _SetState( EState::Recording ); //_submitImmediatly = // TODO _staging.hostWritableBufferSize = desc.hostWritableBufferSize; _staging.hostReadableBufferSize = desc.hostWritableBufferSize; _staging.hostWritebleBufferUsage = desc.hostWritebleBufferUsage | EBufferUsage::TransferSrc; _statistic = Default; return true; } /* ================================================= OnBeginRecording ================================================= */ void VCmdBatch::OnBeginRecording (VkCommandBuffer cmd) { EXLOCK( _drCheck ); CHECK( GetState() == EState::Recording ); VDevice const& dev = _frameGraph.GetDevice(); VkQueryPool pool = _frameGraph.GetQueryPool(); dev.vkCmdWriteTimestamp( cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, pool, _indexInPool*2 ); _BeginShaderDebugger( cmd ); } /* ================================================= OnEndRecording ================================================= */ void VCmdBatch::OnEndRecording (VkCommandBuffer cmd) { EXLOCK( _drCheck ); CHECK( GetState() == EState::Recording ); _EndShaderDebugger( cmd ); VDevice const& dev = _frameGraph.GetDevice(); VkQueryPool pool = _frameGraph.GetQueryPool(); dev.vkCmdWriteTimestamp( cmd, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, pool, _indexInPool*2 + 1 ); } /* ================================================= OnBaked ================================================= */ bool VCmdBatch::OnBaked (INOUT ResourceMap_t &resources) { EXLOCK( _drCheck ); _SetState( EState::Backed ); std::swap( _resourcesToRelease, resources ); return true; } /* ================================================= OnReadyToSubmit ================================================= */ bool VCmdBatch::OnReadyToSubmit () { EXLOCK( _drCheck ); _SetState( EState::Ready ); return true; } /* ================================================= BeforeSubmit ================================================= */ bool VCmdBatch::BeforeSubmit (OUT VkSubmitInfo &submitInfo) { EXLOCK( _drCheck ); submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; submitInfo.pNext = null; submitInfo.pCommandBuffers = _batch.commands.get<0>().data(); submitInfo.commandBufferCount = uint(_batch.commands.size()); submitInfo.pSignalSemaphores = _batch.signalSemaphores.data(); submitInfo.signalSemaphoreCount = uint(_batch.signalSemaphores.size()); submitInfo.pWaitSemaphores = _batch.waitSemaphores.get<0>().data(); submitInfo.pWaitDstStageMask = _batch.waitSemaphores.get<1>().data(); submitInfo.waitSemaphoreCount = uint(_batch.waitSemaphores.size()); return true; } /* ================================================= AfterSubmit ================================================= */ bool VCmdBatch::AfterSubmit (OUT Appendable<VSwapchain const*> swapchains, VSubmitted *ptr) { EXLOCK( _drCheck ); _SetState( EState::Submitted ); for (auto& sw : _swapchains) { swapchains.push_back( sw ); } _swapchains.clear(); _dependencies.clear(); _submitted = ptr; return true; } /* ================================================= OnComplete ================================================= */ bool VCmdBatch::OnComplete (VDebugger &debugger, const ShaderDebugCallback_t &shaderDbgCallback, INOUT Statistic_t &outStatistic) { EXLOCK( _drCheck ); ASSERT( _submitted ); _SetState( EState::Complete ); _FinalizeCommands(); _ParseDebugOutput( shaderDbgCallback ); _FinalizeStagingBuffers(); _ReleaseResources(); _ReleaseVkObjects(); debugger.AddBatchDump( std::move(_debugDump) ); debugger.AddBatchGraph( std::move(_debugGraph) ); _debugDump.clear(); _debugGraph = Default; // read frame time { VDevice const& dev = _frameGraph.GetDevice(); VkQueryPool pool = _frameGraph.GetQueryPool(); uint64_t query_results[2]; VK_CALL( dev.vkGetQueryPoolResults( dev.GetVkDevice(), pool, _indexInPool*2, uint(CountOf(query_results)), sizeof(query_results), OUT query_results, sizeof(query_results[0]), VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT )); _statistic.renderer.gpuTime += Nanoseconds{query_results[1] - query_results[0]}; } outStatistic.Merge( _statistic ); _submitted = null; return true; } /* ================================================= _FinalizeCommands ================================================= */ void VCmdBatch::_FinalizeCommands () { for (size_t i = 0; i < _batch.commands.size(); ++i) { if ( auto* pool = _batch.commands.get<1>()[i] ) pool->RecyclePrimary( _batch.commands.get<0>()[i] ); } _batch.commands.clear(); _batch.signalSemaphores.clear(); _batch.waitSemaphores.clear(); } /* ================================================= _FinalizeStagingBuffers ================================================= */ void VCmdBatch::_FinalizeStagingBuffers () { using T = BufferView::value_type; // map device-to-host staging buffers for (auto& buf : _staging.deviceToHost) { // buffer may be recreated on defragmentation pass, so we need to obtain actual pointer every frame CHECK( _MapMemory( INOUT buf )); } // trigger buffer events for (auto& ev : _staging.onBufferLoadedEvents) { FixedArray< ArrayView<T>, MaxBufferParts > data_parts; BytesU total_size; for (auto& part : ev.parts) { ArrayView<T> view{ Cast<T>(part.buffer->mappedPtr + part.offset), size_t(part.size) }; data_parts.push_back( view ); total_size += part.size; } ASSERT( total_size == ev.totalSize ); ev.callback( BufferView{data_parts} ); } _staging.onBufferLoadedEvents.clear(); // trigger image events for (auto& ev : _staging.onImageLoadedEvents) { FixedArray< ArrayView<T>, MaxImageParts > data_parts; BytesU total_size; for (auto& part : ev.parts) { ArrayView<T> view{ Cast<T>(part.buffer->mappedPtr + part.offset), size_t(part.size) }; data_parts.push_back( view ); total_size += part.size; } ASSERT( total_size == ev.totalSize ); ev.callback( ImageView{ data_parts, ev.imageSize, ev.rowPitch, ev.slicePitch, ev.format, ev.aspect }); } _staging.onImageLoadedEvents.clear(); // release resources { auto& rm = _frameGraph.GetResourceManager(); for (auto& sb : _staging.hostToDevice) { rm.ReleaseResource( sb.bufferId.Release() ); } _staging.hostToDevice.clear(); for (auto& sb : _staging.deviceToHost) { rm.ReleaseResource( sb.bufferId.Release() ); } _staging.deviceToHost.clear(); } } /* ================================================= _ParseDebugOutput ================================================= */ void VCmdBatch::_ParseDebugOutput (const ShaderDebugCallback_t &cb) { if ( _shaderDebugger.buffers.empty() ) return; ASSERT( cb ); auto& dev = _frameGraph.GetDevice(); auto& rm = _frameGraph.GetResourceManager(); VK_CHECK( dev.vkDeviceWaitIdle( dev.GetVkDevice() ), void()); // release descriptor sets for (auto& ds : _shaderDebugger.descCache) { rm.GetDescriptorManager().DeallocDescriptorSet( ds.second ); } _shaderDebugger.descCache.clear(); // process shader debug output if ( cb ) { Array<String> temp_strings; for (auto& dbg : _shaderDebugger.modes) { _ParseDebugOutput2( cb, dbg, temp_strings ); } } _shaderDebugger.modes.clear(); // release storage buffers for (auto& sb : _shaderDebugger.buffers) { rm.ReleaseResource( sb.shaderTraceBuffer.Release() ); rm.ReleaseResource( sb.readBackBuffer.Release() ); } _shaderDebugger.buffers.clear(); } /* ================================================= _ParseDebugOutput2 ================================================= */ bool VCmdBatch::_ParseDebugOutput2 (const ShaderDebugCallback_t &cb, const DebugMode &dbg, Array<String> &tempStrings) const { CHECK_ERR( dbg.modules.size() ); auto& rm = _frameGraph.GetResourceManager(); auto read_back_buf = _shaderDebugger.buffers[ dbg.sbIndex ].readBackBuffer.Get(); VBuffer const* buf = rm.GetResource( read_back_buf ); CHECK_ERR( buf ); VMemoryObj const* mem = rm.GetResource( buf->GetMemoryID() ); CHECK_ERR( mem ); VMemoryObj::MemoryInfo info; CHECK_ERR( mem->GetInfo( rm.GetMemoryManager(), OUT info )); CHECK_ERR( info.mappedPtr ); for (auto& shader : dbg.modules) { CHECK_ERR( shader->ParseDebugOutput( dbg.mode, ArrayView<uint8_t>{ Cast<uint8_t>(info.mappedPtr + dbg.offset), size_t(dbg.size) }, OUT tempStrings )); cb( dbg.taskName, shader->GetDebugName(), dbg.shaderStages, tempStrings ); } return true; } //----------------------------------------------------------------------------- /* ================================================= _MapMemory ================================================= */ bool VCmdBatch::_MapMemory (INOUT StagingBuffer &buf) const { VMemoryObj::MemoryInfo info; auto& rm = _frameGraph.GetResourceManager(); if ( rm.GetResource( buf.memoryId )->GetInfo( rm.GetMemoryManager(),OUT info ) ) { buf.mappedPtr = info.mappedPtr; buf.memOffset = info.offset; buf.mem = info.mem; buf.isCoherent = EnumEq( info.flags, VK_MEMORY_PROPERTY_HOST_COHERENT_BIT ); return true; } return false; } /* ================================================= _ReleaseResources ================================================= */ void VCmdBatch::_ReleaseResources () { auto& rm = _frameGraph.GetResourceManager(); for (auto[res, count] : _resourcesToRelease) { switch ( res.GetUID() ) { case RawBufferID::GetUID() : rm.ReleaseResource( RawBufferID{ res.Index(), res.InstanceID() }, count ); break; case RawImageID::GetUID() : rm.ReleaseResource( RawImageID{ res.Index(), res.InstanceID() }, count ); break; case RawGPipelineID::GetUID() : rm.ReleaseResource( RawGPipelineID{ res.Index(), res.InstanceID() }, count ); break; case RawMPipelineID::GetUID() : rm.ReleaseResource( RawMPipelineID{ res.Index(), res.InstanceID() }, count ); break; case RawCPipelineID::GetUID() : rm.ReleaseResource( RawCPipelineID{ res.Index(), res.InstanceID() }, count ); break; case RawRTPipelineID::GetUID() : rm.ReleaseResource( RawRTPipelineID{ res.Index(), res.InstanceID() }, count ); break; case RawSamplerID::GetUID() : rm.ReleaseResource( RawSamplerID{ res.Index(), res.InstanceID() }, count ); break; case RawDescriptorSetLayoutID::GetUID():rm.ReleaseResource( RawDescriptorSetLayoutID{ res.Index(), res.InstanceID() }, count ); break; case RawPipelineResourcesID::GetUID() : rm.ReleaseResource( RawPipelineResourcesID{ res.Index(), res.InstanceID() }, count ); break; case RawRTSceneID::GetUID() : rm.ReleaseResource( RawRTSceneID{ res.Index(), res.InstanceID() }, count ); break; case RawRTGeometryID::GetUID() : rm.ReleaseResource( RawRTGeometryID{ res.Index(), res.InstanceID() }, count ); break; case RawRTShaderTableID::GetUID() : rm.ReleaseResource( RawRTShaderTableID{ res.Index(), res.InstanceID() }, count ); break; case RawSwapchainID::GetUID() : rm.ReleaseResource( RawSwapchainID{ res.Index(), res.InstanceID() }, count ); break; case RawMemoryID::GetUID() : rm.ReleaseResource( RawMemoryID{ res.Index(), res.InstanceID() }, count ); break; case RawPipelineLayoutID::GetUID() : rm.ReleaseResource( RawPipelineLayoutID{ res.Index(), res.InstanceID() }, count ); break; case RawRenderPassID::GetUID() : rm.ReleaseResource( RawRenderPassID{ res.Index(), res.InstanceID() }, count ); break; case RawFramebufferID::GetUID() : rm.ReleaseResource( RawFramebufferID{ res.Index(), res.InstanceID() }, count ); break; default : CHECK( !"not supported" ); break; } } _resourcesToRelease.clear(); } /* ================================================= _ReleaseVkObjects ================================================= */ void VCmdBatch::_ReleaseVkObjects () { VDevice const& dev = _frameGraph.GetDevice(); VkDevice vdev = dev.GetVkDevice(); for (auto& pair : _readyToDelete) { switch ( pair.first ) { case VK_OBJECT_TYPE_SEMAPHORE : dev.vkDestroySemaphore( vdev, VkSemaphore(pair.second), null ); break; case VK_OBJECT_TYPE_FENCE : dev.vkDestroyFence( vdev, VkFence(pair.second), null ); break; case VK_OBJECT_TYPE_DEVICE_MEMORY : dev.vkFreeMemory( vdev, VkDeviceMemory(pair.second), null ); break; case VK_OBJECT_TYPE_IMAGE : dev.vkDestroyImage( vdev, VkImage(pair.second), null ); break; case VK_OBJECT_TYPE_EVENT : dev.vkDestroyEvent( vdev, VkEvent(pair.second), null ); break; case VK_OBJECT_TYPE_QUERY_POOL : dev.vkDestroyQueryPool( vdev, VkQueryPool(pair.second), null ); break; case VK_OBJECT_TYPE_BUFFER : dev.vkDestroyBuffer( vdev, VkBuffer(pair.second), null ); break; case VK_OBJECT_TYPE_BUFFER_VIEW : dev.vkDestroyBufferView( vdev, VkBufferView(pair.second), null ); break; case VK_OBJECT_TYPE_IMAGE_VIEW : dev.vkDestroyImageView( vdev, VkImageView(pair.second), null ); break; case VK_OBJECT_TYPE_PIPELINE_LAYOUT : dev.vkDestroyPipelineLayout( vdev, VkPipelineLayout(pair.second), null ); break; case VK_OBJECT_TYPE_RENDER_PASS : dev.vkDestroyRenderPass( vdev, VkRenderPass(pair.second), null ); break; case VK_OBJECT_TYPE_PIPELINE : dev.vkDestroyPipeline( vdev, VkPipeline(pair.second), null ); break; case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT : dev.vkDestroyDescriptorSetLayout( vdev, VkDescriptorSetLayout(pair.second), null ); break; case VK_OBJECT_TYPE_SAMPLER : dev.vkDestroySampler( vdev, VkSampler(pair.second), null ); break; case VK_OBJECT_TYPE_DESCRIPTOR_POOL : dev.vkDestroyDescriptorPool( vdev, VkDescriptorPool(pair.second), null ); break; case VK_OBJECT_TYPE_FRAMEBUFFER : dev.vkDestroyFramebuffer( vdev, VkFramebuffer(pair.second), null ); break; case VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION : dev.vkDestroySamplerYcbcrConversion( vdev, VkSamplerYcbcrConversion(pair.second), null ); break; case VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE : dev.vkDestroyDescriptorUpdateTemplate( vdev, VkDescriptorUpdateTemplate(pair.second), null ); break; case VK_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV : dev.vkDestroyAccelerationStructureNV( vdev, VkAccelerationStructureNV(pair.second), null ); break; default : FG_LOGE( "resource type is not supported" ); break; } } _readyToDelete.clear(); } /* ================================================= _GetWritable ================================================= */ bool VCmdBatch::GetWritable (const BytesU srcRequiredSize, const BytesU blockAlign, const BytesU offsetAlign, const BytesU dstMinSize, OUT RawBufferID &dstBuffer, OUT BytesU &dstOffset, OUT BytesU &outSize, OUT void* &mappedPtr) { EXLOCK( _drCheck ); ASSERT( blockAlign > 0_b and offsetAlign > 0_b ); ASSERT( dstMinSize == AlignToSmaller( dstMinSize, blockAlign )); auto& staging_buffers = _staging.hostToDevice; // search in existing StagingBuffer* suitable = null; StagingBuffer* max_available = null; BytesU max_size; for (auto& buf : staging_buffers) { const BytesU off = AlignToLarger( buf.size, offsetAlign ); const BytesU av = AlignToSmaller( buf.capacity - off, blockAlign ); if ( av >= srcRequiredSize ) { suitable = &buf; break; } if ( not max_available or av > max_size ) { max_available = &buf; max_size = av; } } // no suitable space, try to use max available block if ( not suitable and max_available and max_size >= dstMinSize ) { suitable = max_available; } // allocate new buffer if ( not suitable ) { ASSERT( dstMinSize < _staging.hostWritableBufferSize ); CHECK_ERR( staging_buffers.size() < staging_buffers.capacity() ); BufferID buf_id = _frameGraph.CreateBuffer( BufferDesc{ _staging.hostWritableBufferSize, _staging.hostWritebleBufferUsage }, MemoryDesc{ EMemoryType::HostWrite }, "HostWriteBuffer" ); CHECK_ERR( buf_id ); RawMemoryID mem_id = _frameGraph.GetResourceManager().GetResource( buf_id.Get() )->GetMemoryID(); CHECK_ERR( mem_id ); staging_buffers.push_back({ std::move(buf_id), mem_id, _staging.hostWritableBufferSize }); suitable = &staging_buffers.back(); CHECK( _MapMemory( *suitable )); } // write data to buffer dstOffset = AlignToLarger( suitable->size, offsetAlign ); outSize = Min( AlignToSmaller( suitable->capacity - dstOffset, blockAlign ), srcRequiredSize ); dstBuffer = suitable->bufferId.Get(); mappedPtr = suitable->mappedPtr + dstOffset; suitable->size = dstOffset + outSize; return true; } /* ================================================= _AddPendingLoad ================================================= */ bool VCmdBatch::_AddPendingLoad (const BytesU srcRequiredSize, const BytesU blockAlign, const BytesU offsetAlign, const BytesU dstMinSize, OUT RawBufferID &dstBuffer, OUT OnBufferDataLoadedEvent::Range &range) { ASSERT( blockAlign > 0_b and offsetAlign > 0_b ); ASSERT( dstMinSize == AlignToSmaller( dstMinSize, blockAlign )); auto& staging_buffers = _staging.deviceToHost; // search in existing StagingBuffer* suitable = null; StagingBuffer* max_available = null; BytesU max_size; for (auto& buf : staging_buffers) { const BytesU off = AlignToLarger( buf.size, offsetAlign ); const BytesU av = AlignToSmaller( buf.capacity - off, blockAlign ); if ( av >= srcRequiredSize ) { suitable = &buf; break; } if ( not max_available or av > max_size ) { max_available = &buf; max_size = av; } } // no suitable space, try to use max available block if ( not suitable and max_available and max_size >= dstMinSize ) { suitable = max_available; } // allocate new buffer if ( not suitable ) { ASSERT( dstMinSize < _staging.hostReadableBufferSize ); CHECK_ERR( staging_buffers.size() < staging_buffers.capacity() ); BufferID buf_id = _frameGraph.CreateBuffer( BufferDesc{ _staging.hostReadableBufferSize, EBufferUsage::TransferDst }, MemoryDesc{ EMemoryType::HostRead }, "HostReadBuffer" ); CHECK_ERR( buf_id ); RawMemoryID mem_id = _frameGraph.GetResourceManager().GetResource( buf_id.Get() )->GetMemoryID(); CHECK_ERR( mem_id ); // TODO: make immutable because read after write happens after waiting for fences and it implicitly make changes visible to the host staging_buffers.push_back({ std::move(buf_id), mem_id, _staging.hostReadableBufferSize }); suitable = &staging_buffers.back(); CHECK( _MapMemory( *suitable )); } // write data to buffer range.buffer = suitable; range.offset = AlignToLarger( suitable->size, offsetAlign ); range.size = Min( AlignToSmaller( suitable->capacity - range.offset, blockAlign ), srcRequiredSize ); dstBuffer = suitable->bufferId.Get(); suitable->size = range.offset + range.size; return true; } /* ================================================= AddPendingLoad ================================================= */ bool VCmdBatch::AddPendingLoad (const BytesU srcOffset, const BytesU srcTotalSize, OUT RawBufferID &dstBuffer, OUT OnBufferDataLoadedEvent::Range &range) { EXLOCK( _drCheck ); // skip blocks less than 1/N of data size const BytesU min_size = (srcTotalSize + MaxBufferParts-1) / MaxBufferParts; return _AddPendingLoad( srcTotalSize - srcOffset, 1_b, 16_b, min_size, OUT dstBuffer, OUT range ); } /* ================================================= AddDataLoadedEvent ================================================= */ bool VCmdBatch::AddDataLoadedEvent (OnBufferDataLoadedEvent &&ev) { EXLOCK( _drCheck ); CHECK_ERR( ev.callback and not ev.parts.empty() ); _staging.onBufferLoadedEvents.push_back( std::move(ev) ); return true; } /* ================================================= AddPendingLoad ================================================= */ bool VCmdBatch::AddPendingLoad (const BytesU srcOffset, const BytesU srcTotalSize, const BytesU srcPitch, OUT RawBufferID &dstBuffer, OUT OnImageDataLoadedEvent::Range &range) { EXLOCK( _drCheck ); // skip blocks less than 1/N of total data size const BytesU min_size = Max( (srcTotalSize + MaxImageParts-1) / MaxImageParts, srcPitch ); return _AddPendingLoad( srcTotalSize - srcOffset, srcPitch, 16_b, min_size, OUT dstBuffer, OUT range ); } /* ================================================= AddDataLoadedEvent ================================================= */ bool VCmdBatch::AddDataLoadedEvent (OnImageDataLoadedEvent &&ev) { EXLOCK( _drCheck ); CHECK_ERR( ev.callback and not ev.parts.empty() ); _staging.onImageLoadedEvents.push_back( std::move(ev) ); return true; } //----------------------------------------------------------------------------- /* ================================================= _BeginShaderDebugger ================================================= */ void VCmdBatch::_BeginShaderDebugger (VkCommandBuffer cmd) { if ( _shaderDebugger.buffers.empty() ) return; auto& dev = _frameGraph.GetDevice(); auto& rm = _frameGraph.GetResourceManager(); // copy data for (auto& dbg : _shaderDebugger.modes) { auto buf = rm.GetResource( _shaderDebugger.buffers[dbg.sbIndex].shaderTraceBuffer.Get() )->Handle(); BytesU size = rm.GetDebugShaderStorageSize( dbg.shaderStages ) + SizeOf<uint>; // per shader data + position ASSERT( size <= BytesU::SizeOf(dbg.data) ); dev.vkCmdUpdateBuffer( cmd, buf, VkDeviceSize(dbg.offset), VkDeviceSize(size), dbg.data ); } // add pipeline barriers FixedArray< VkBufferMemoryBarrier, 16 > barriers; VkPipelineStageFlags dst_stage_flags = 0; for (auto& sb : _shaderDebugger.buffers) { VkBufferMemoryBarrier barrier = {}; barrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; barrier.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; barrier.buffer = rm.GetResource( sb.shaderTraceBuffer.Get() )->Handle(); barrier.offset = 0; barrier.size = VkDeviceSize(sb.size); barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; dst_stage_flags |= sb.stages; barriers.push_back( barrier ); if ( barriers.size() == barriers.capacity() ) { dev.vkCmdPipelineBarrier( cmd, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_stage_flags, 0, 0, null, uint(barriers.size()), barriers.data(), 0, null ); barriers.clear(); } } if ( barriers.size() ) { dev.vkCmdPipelineBarrier( cmd, VK_PIPELINE_STAGE_TRANSFER_BIT, dst_stage_flags, 0, 0, null, uint(barriers.size()), barriers.data(), 0, null ); } } /* ================================================= _EndShaderDebugger ================================================= */ void VCmdBatch::_EndShaderDebugger (VkCommandBuffer cmd) { if ( _shaderDebugger.buffers.empty() ) return; auto& dev = _frameGraph.GetDevice(); auto& rm = _frameGraph.GetResourceManager(); // copy to staging buffer for (auto& sb : _shaderDebugger.buffers) { VkBuffer src_buf = rm.GetResource( sb.shaderTraceBuffer.Get() )->Handle(); VkBuffer dst_buf = rm.GetResource( sb.readBackBuffer.Get() )->Handle(); VkBufferMemoryBarrier barrier = {}; barrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; barrier.srcAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; barrier.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; barrier.buffer = src_buf; barrier.offset = 0; barrier.size = VkDeviceSize(sb.size); barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; dev.vkCmdPipelineBarrier( cmd, sb.stages, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, null, 1, &barrier, 0, null ); VkBufferCopy region = {}; region.size = VkDeviceSize(sb.size); dev.vkCmdCopyBuffer( cmd, src_buf, dst_buf, 1, &region ); } } /* ================================================= SetShaderModule ================================================= */ bool VCmdBatch::SetShaderModule (ShaderDbgIndex id, const SharedShaderPtr &module) { EXLOCK( _drCheck ); CHECK_ERR( uint(id) < _shaderDebugger.modes.size() ); auto& dbg = _shaderDebugger.modes[ uint(id) ]; dbg.modules.emplace_back( module ); return true; } /* ================================================= GetDebugModeInfo ================================================= */ bool VCmdBatch::GetDebugModeInfo (ShaderDbgIndex id, OUT EShaderDebugMode &mode, OUT EShaderStages &stages) const { EXLOCK( _drCheck ); CHECK_ERR( uint(id) < _shaderDebugger.modes.size() ); auto& dbg = _shaderDebugger.modes[ uint(id) ]; mode = dbg.mode; stages = dbg.shaderStages; return true; } /* ================================================= GetDescriptotSet ================================================= */ bool VCmdBatch::GetDescriptotSet (ShaderDbgIndex id, OUT uint &binding, OUT VkDescriptorSet &descSet, OUT uint &dynamicOffset) const { EXLOCK( _drCheck ); CHECK_ERR( uint(id) < _shaderDebugger.modes.size() ); auto& dbg = _shaderDebugger.modes[ uint(id) ]; binding = FG_DebugDescriptorSet; descSet = dbg.descriptorSet; dynamicOffset = uint(dbg.offset); return true; } /* ================================================= AppendShader ================================================= */ ShaderDbgIndex VCmdBatch::AppendShader (INOUT ArrayView<RectI> &, const TaskName_t &name, const _fg_hidden_::GraphicsShaderDebugMode &mode, BytesU size) { EXLOCK( _drCheck ); CHECK_ERR( FG_EnableShaderDebugging ); DebugMode dbg_mode; dbg_mode.taskName = name; dbg_mode.mode = mode.mode; dbg_mode.shaderStages = mode.stages; CHECK_ERR( _AllocStorage( INOUT dbg_mode, size )); dbg_mode.data[0] = mode.fragCoord.x; dbg_mode.data[1] = mode.fragCoord.y; dbg_mode.data[2] = 0; dbg_mode.data[3] = 0; _shaderDebugger.modes.push_back( std::move(dbg_mode) ); return ShaderDbgIndex(_shaderDebugger.modes.size() - 1); } /* ================================================= AppendShader ================================================= */ ShaderDbgIndex VCmdBatch::AppendShader (const TaskName_t &name, const _fg_hidden_::ComputeShaderDebugMode &mode, BytesU size) { EXLOCK( _drCheck ); CHECK_ERR( FG_EnableShaderDebugging ); DebugMode dbg_mode; dbg_mode.taskName = name; dbg_mode.mode = mode.mode; dbg_mode.shaderStages = EShaderStages::Compute; CHECK_ERR( _AllocStorage( INOUT dbg_mode, size )); MemCopy( OUT dbg_mode.data, mode.globalID ); dbg_mode.data[3] = 0; _shaderDebugger.modes.push_back( std::move(dbg_mode) ); return ShaderDbgIndex(_shaderDebugger.modes.size() - 1); } /* ================================================= AppendShader ================================================= */ ShaderDbgIndex VCmdBatch::AppendShader (const TaskName_t &name, const _fg_hidden_::RayTracingShaderDebugMode &mode, BytesU size) { EXLOCK( _drCheck ); CHECK_ERR( FG_EnableShaderDebugging ); DebugMode dbg_mode; dbg_mode.taskName = name; dbg_mode.mode = mode.mode; dbg_mode.shaderStages = EShaderStages::AllRayTracing; CHECK_ERR( _AllocStorage( INOUT dbg_mode, size )); MemCopy( OUT dbg_mode.data, mode.launchID ); dbg_mode.data[3] = 0; _shaderDebugger.modes.push_back( std::move(dbg_mode) ); return ShaderDbgIndex(_shaderDebugger.modes.size() - 1); } /* ================================================= _AllocStorage ================================================= */ bool VCmdBatch::_AllocStorage (INOUT DebugMode &dbgMode, const BytesU size) { VkPipelineStageFlags stage = 0; for (EShaderStages s = EShaderStages(1); s <= dbgMode.shaderStages; s = EShaderStages(uint(s) << 1)) { if ( not EnumEq( dbgMode.shaderStages, s ) ) continue; ENABLE_ENUM_CHECKS(); switch ( s ) { case EShaderStages::Vertex : stage = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT; break; case EShaderStages::TessControl : stage = VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT; break; case EShaderStages::TessEvaluation: stage = VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT; break; case EShaderStages::Geometry : stage = VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT; break; case EShaderStages::Fragment : stage = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; break; case EShaderStages::Compute : stage = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT; break; case EShaderStages::MeshTask : stage = VK_PIPELINE_STAGE_TASK_SHADER_BIT_NV; break; case EShaderStages::Mesh : stage = VK_PIPELINE_STAGE_MESH_SHADER_BIT_NV; break; case EShaderStages::RayGen : case EShaderStages::RayAnyHit : case EShaderStages::RayClosestHit : case EShaderStages::RayMiss : case EShaderStages::RayIntersection: case EShaderStages::RayCallable : stage = VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV; break; case EShaderStages::_Last : case EShaderStages::Unknown : case EShaderStages::AllGraphics : case EShaderStages::AllRayTracing : case EShaderStages::All : // to shutup warnings default : RETURN_ERR( "unknown shader type" ); } DISABLE_ENUM_CHECKS(); } dbgMode.size = Min( size, _shaderDebugger.bufferSize ); // find place in existing storage buffers for (auto& sb : _shaderDebugger.buffers) { dbgMode.offset = AlignToLarger( sb.size, _shaderDebugger.bufferAlign ); if ( dbgMode.size <= (sb.capacity - dbgMode.offset) ) { dbgMode.sbIndex = uint(Distance( _shaderDebugger.buffers.data(), &sb )); sb.size = dbgMode.offset + size; sb.stages |= stage; break; } } // create new storage buffer if ( dbgMode.sbIndex == UMax ) { StorageBuffer sb; sb.capacity = _shaderDebugger.bufferSize * (1 + _shaderDebugger.buffers.size() / 2); sb.shaderTraceBuffer = _frameGraph.CreateBuffer( BufferDesc{ sb.capacity, EBufferUsage::Storage | EBufferUsage::Transfer }, Default, "DebugOutputStorage" ); sb.readBackBuffer = _frameGraph.CreateBuffer( BufferDesc{ sb.capacity, EBufferUsage::TransferDst }, MemoryDesc{EMemoryType::HostRead}, "ReadBackDebugOutput" ); CHECK_ERR( sb.shaderTraceBuffer and sb.readBackBuffer ); dbgMode.sbIndex = uint(_shaderDebugger.buffers.size()); dbgMode.offset = 0_b; sb.size = dbgMode.offset + size; sb.stages |= stage; _shaderDebugger.buffers.push_back( std::move(sb) ); } CHECK_ERR( _AllocDescriptorSet( dbgMode.mode, dbgMode.shaderStages, _shaderDebugger.buffers[dbgMode.sbIndex].shaderTraceBuffer.Get(), dbgMode.size, OUT dbgMode.descriptorSet )); return true; } /* ================================================= _AllocDescriptorSet ================================================= */ bool VCmdBatch::_AllocDescriptorSet (EShaderDebugMode debugMode, EShaderStages stages, RawBufferID storageBuffer, BytesU size, OUT VkDescriptorSet &descSet) { auto& dev = _frameGraph.GetDevice(); auto& rm = _frameGraph.GetResourceManager(); auto layout_id = rm.GetDescriptorSetLayout( debugMode, stages ); auto* layout = rm.GetResource( layout_id ); auto* buffer = rm.GetResource( storageBuffer ); CHECK_ERR( layout and buffer ); // find descriptor set in cache auto iter = _shaderDebugger.descCache.find({ storageBuffer, layout_id }); if ( iter != _shaderDebugger.descCache.end() ) { descSet = iter->second.first; return true; } // allocate descriptor set { VDescriptorSetLayout::DescriptorSet ds; CHECK_ERR( rm.GetDescriptorManager().AllocDescriptorSet( layout->Handle(), OUT ds )); descSet = ds.first; _shaderDebugger.descCache.insert_or_assign( {storageBuffer, layout_id}, ds ); } // update descriptor set { VkDescriptorBufferInfo buffer_desc = {}; buffer_desc.buffer = buffer->Handle(); buffer_desc.offset = 0; buffer_desc.range = VkDeviceSize(size); VkWriteDescriptorSet write = {}; write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; write.dstSet = descSet; write.dstBinding = 0; write.descriptorCount = 1; write.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC; write.pBufferInfo = &buffer_desc; dev.vkUpdateDescriptorSets( dev.GetVkDevice(), 1, &write, 0, null ); } return true; } } // FG
30.722989
158
0.6266
zann1x
d7b9c3af34674fcfe0367e66b87fbf1bd1209ed3
939
cpp
C++
leetcode-cn/cpp/Decode String.cpp
MU001999/codeex
23e300f9121a8d6bf4f4c9ec103510193808e9ba
[ "MIT" ]
2
2019-01-27T14:16:09.000Z
2019-05-25T10:05:24.000Z
leetcode-cn/cpp/Decode String.cpp
MU001999/codeex
23e300f9121a8d6bf4f4c9ec103510193808e9ba
[ "MIT" ]
null
null
null
leetcode-cn/cpp/Decode String.cpp
MU001999/codeex
23e300f9121a8d6bf4f4c9ec103510193808e9ba
[ "MIT" ]
1
2020-11-05T05:17:28.000Z
2020-11-05T05:17:28.000Z
/* Q-URL: https://leetcode-cn.com/problems/decode-string/ # BEATS 100% */ class Solution { private: string helper(string &s, string::iterator &it) { if (it == s.end()) return ""; string pre1, pre2, res, ens; while (isalpha(*it)) pre1 += *it++; if (it == s.end()) return pre1; while (isdigit(*it)) pre2 += *it++; if (pre2.empty()) return pre1; ++it; while (*it != ']') { if (isdigit(*it)) ens += helper(s, it); else ens += *it++; } ++it; auto k = stoi(pre2); while (k--) res += ens; return pre1 + res; } public: string decodeString(string s) { string res; auto it = s.begin(); while (it != s.end()) res += helper(s, it); return res; } };
19.5625
54
0.407881
MU001999
d7ba6a5cc53bc9abc7ffa4a01147e332e4679947
973
cpp
C++
Volume102/10281 - Average Speed/10281.cpp
rstancioiu/uva-online-judge
31c536d764462d389b48b4299b9731534824c9f5
[ "MIT" ]
1
2017-01-25T18:07:49.000Z
2017-01-25T18:07:49.000Z
Volume102/10281 - Average Speed/10281.cpp
rstancioiu/uva-online-judge
31c536d764462d389b48b4299b9731534824c9f5
[ "MIT" ]
null
null
null
Volume102/10281 - Average Speed/10281.cpp
rstancioiu/uva-online-judge
31c536d764462d389b48b4299b9731534824c9f5
[ "MIT" ]
null
null
null
// Author: Stancioiu Nicu Razvan // Problem: http://uva.onlinejudge.org/external/102/10281.html #include <string> #include <iostream> #include <sstream> #include <cstdio> using namespace std; int main() { int speed,currentSpeed=0; int hour,min,sec; int currentHour=0; int prevHour=0; string s; double km=0; while(getline(cin,s)) { istringstream iss(s); iss>>s; int i=0; hour=min=sec=0; while(s[i]>='0' && s[i]<='9') { hour*=10; hour+=s[i]-'0'; i++; } i++; while(s[i]>='0' && s[i]<='9') { min*=10; min+=s[i]-'0'; i++; } i++; while(s[i]>='0' && s[i]<='9') { sec=sec*10 + s[i]-'0'; i++; } currentHour=hour*3600+min*60+sec; if(!(iss>>speed)) { km+=(double)(currentHour-prevHour)/3600*currentSpeed; prevHour=currentHour; printf("%s %.2f km\n",s.c_str(),km); } else { km+=(double)(currentHour-prevHour)/3600*currentSpeed; prevHour=currentHour; currentSpeed=speed; } } return 0; }
16.775862
62
0.579651
rstancioiu
d7bad70d390416bbdc5854f14fe5275cebb5a585
2,089
cpp
C++
Raven.CppClient.Tests/PutDocumentCommandTest.cpp
mlawsonca/ravendb-cpp-client
c3a3d4960c8b810156547f62fa7aeb14a121bf74
[ "MIT" ]
3
2019-04-24T02:34:53.000Z
2019-08-01T08:22:26.000Z
Raven.CppClient.Tests/PutDocumentCommandTest.cpp
mlawsonca/ravendb-cpp-client
c3a3d4960c8b810156547f62fa7aeb14a121bf74
[ "MIT" ]
2
2019-03-21T09:00:02.000Z
2021-02-28T23:49:26.000Z
Raven.CppClient.Tests/PutDocumentCommandTest.cpp
mlawsonca/ravendb-cpp-client
c3a3d4960c8b810156547f62fa7aeb14a121bf74
[ "MIT" ]
3
2019-03-04T11:58:54.000Z
2021-03-01T00:25:49.000Z
#include "pch.h" #include "RavenTestDriver.h" #include "raven_test_definitions.h" #include "DocumentSession.h" #include "AdvancedSessionOperations.h" #include "RequestExecutor.h" #include "User.h" #include "PutDocumentCommand.h" namespace ravendb::client::tests::client::documents::commands { class PutDocumentCommandTest : public driver::RavenTestDriver { protected: void customise_store(std::shared_ptr<ravendb::client::documents::DocumentStore> store) override { //store->set_before_perform(infrastructure::set_for_fiddler); } }; TEST_F(PutDocumentCommandTest, CanPutDocumentUsingCommand) { auto store = get_document_store(TEST_NAME); auto user = std::make_shared<infrastructure::entities::User>(); user->name = "Alexander"; user->age = 38; nlohmann::json json = *user; auto command = ravendb::client::documents::commands::PutDocumentCommand("users/1", {}, json); store->get_request_executor()->execute(command); auto res = command.get_result(); ASSERT_EQ("users/1", res->id); ASSERT_FALSE(res->change_vector.empty()); { auto session = store->open_session(); auto loaded_user = session.load<infrastructure::entities::User>("users/1"); ASSERT_EQ("Alexander", loaded_user->name); } } TEST_F(PutDocumentCommandTest, CanPutLargeDocumentUsingCommand) { auto store = get_document_store(TEST_NAME); auto user = std::make_shared<infrastructure::entities::User>(); constexpr std::size_t LARGE_STRING_SIZE{ 1024 * 1024 }; user->name.reserve(LARGE_STRING_SIZE); for(std::size_t i = 0; i < LARGE_STRING_SIZE/4; ++i) { user->name.append("AbCd"); } nlohmann::json json = *user; auto command = ravendb::client::documents::commands::PutDocumentCommand("users/1", {}, json); store->get_request_executor()->execute(command); auto res = command.get_result(); ASSERT_EQ("users/1", res->id); ASSERT_FALSE(res->change_vector.empty()); { auto session = store->open_session(); auto loaded_user = session.load<infrastructure::entities::User>("users/1"); ASSERT_EQ(user->name, loaded_user->name); } } }
27.853333
97
0.721398
mlawsonca
d7bd45c05e0eec748467f5543c97fbf349a019c8
3,375
hpp
C++
examples/CBuilder/Compound/Locking/Server/comserv.hpp
LenakeTech/BoldForDelphi
3ef25517d5c92ebccc097c6bc2f2af62fc506c71
[ "MIT" ]
121
2020-09-22T10:46:20.000Z
2021-11-17T12:33:35.000Z
examples/CBuilder/Compound/Locking/Server/comserv.hpp
LenakeTech/BoldForDelphi
3ef25517d5c92ebccc097c6bc2f2af62fc506c71
[ "MIT" ]
8
2020-09-23T12:32:23.000Z
2021-07-28T07:01:26.000Z
examples/CBuilder/Compound/Locking/Server/comserv.hpp
LenakeTech/BoldForDelphi
3ef25517d5c92ebccc097c6bc2f2af62fc506c71
[ "MIT" ]
42
2020-09-22T14:37:20.000Z
2021-10-04T10:24:12.000Z
// Borland C++ Builder // Copyright (c) 1995, 1999 by Borland International // All rights reserved // (DO NOT EDIT: machine generated header) 'ComServ.pas' rev: 5.00 #ifndef ComServHPP #define ComServHPP #pragma delphiheader begin #pragma option push -w- #pragma option push -Vx #include <ComObj.hpp> // Pascal unit #include <SysUtils.hpp> // Pascal unit #include <ActiveX.hpp> // Pascal unit #include <Messages.hpp> // Pascal unit #include <Windows.hpp> // Pascal unit #include <SysInit.hpp> // Pascal unit #include <System.hpp> // Pascal unit //-- user supplied ----------------------------------------------------------- namespace Comserv { //-- type declarations ------------------------------------------------------- #pragma option push -b- enum TStartMode { smStandalone, smAutomation, smRegServer, smUnregServer }; #pragma option pop typedef void __fastcall (__closure *TLastReleaseEvent)(bool &Shutdown); class DELPHICLASS TComServer; class PASCALIMPLEMENTATION TComServer : public Comobj::TComServerObject { typedef Comobj::TComServerObject inherited; private: int FObjectCount; int FFactoryCount; _di_ITypeLib FTypeLib; AnsiString FServerName; AnsiString FHelpFileName; bool FIsInprocServer; TStartMode FStartMode; bool FStartSuspended; bool FRegister; bool FUIInteractive; TLastReleaseEvent FOnLastRelease; void __fastcall FactoryFree(TComObjectFactory* Factory); void __fastcall FactoryRegisterClassObject(TComObjectFactory* Factory); void __fastcall FactoryUpdateRegistry(TComObjectFactory* Factory); void __fastcall LastReleased(void); protected: virtual int __fastcall CountObject(bool Created); virtual int __fastcall CountFactory(bool Created); virtual AnsiString __fastcall GetHelpFileName(); virtual AnsiString __fastcall GetServerFileName(); virtual AnsiString __fastcall GetServerKey(); virtual AnsiString __fastcall GetServerName(); virtual bool __fastcall GetStartSuspended(void); virtual _di_ITypeLib __fastcall GetTypeLib(); virtual void __fastcall SetHelpFileName(const AnsiString Value); public: __fastcall TComServer(void); __fastcall virtual ~TComServer(void); void __fastcall Initialize(void); void __fastcall LoadTypeLib(void); void __fastcall SetServerName(const AnsiString Name); void __fastcall UpdateRegistry(bool Register); __property bool IsInprocServer = {read=FIsInprocServer, write=FIsInprocServer, nodefault}; __property int ObjectCount = {read=FObjectCount, nodefault}; __property TStartMode StartMode = {read=FStartMode, nodefault}; __property bool UIInteractive = {read=FUIInteractive, write=FUIInteractive, nodefault}; __property TLastReleaseEvent OnLastRelease = {read=FOnLastRelease, write=FOnLastRelease}; }; //-- var, const, procedure --------------------------------------------------- extern PACKAGE TComServer* ComServer; extern PACKAGE HRESULT __stdcall DllGetClassObject(const GUID &CLSID, const GUID &IID, void *Obj); extern PACKAGE HRESULT __stdcall DllCanUnloadNow(void); extern PACKAGE HRESULT __stdcall DllRegisterServer(void); extern PACKAGE HRESULT __stdcall DllUnregisterServer(void); } /* namespace Comserv */ #if !defined(NO_IMPLICIT_NAMESPACE_USE) using namespace Comserv; #endif #pragma option pop // -w- #pragma option pop // -Vx #pragma delphiheader end. //-- end unit ---------------------------------------------------------------- #endif // ComServ
34.793814
98
0.740741
LenakeTech
d7c13f44bef3d292f68e382ce674ad2d932c8482
3,531
cpp
C++
samples/lab3/SphereRolling/sphere.cpp
wiali/opengl-labs
8160bd495f38eacb46cd37847a8881a6dc7a8fe8
[ "MIT" ]
1
2021-05-05T15:24:49.000Z
2021-05-05T15:24:49.000Z
samples/lab3/SphereRolling/sphere.cpp
wiali/opengl-labs
8160bd495f38eacb46cd37847a8881a6dc7a8fe8
[ "MIT" ]
null
null
null
samples/lab3/SphereRolling/sphere.cpp
wiali/opengl-labs
8160bd495f38eacb46cd37847a8881a6dc7a8fe8
[ "MIT" ]
null
null
null
/* * Implementation of sphere * Author: Weichen Xu * Date: 11/10/2015 */ #include "sphere.h" WCX_sphere::WCX_sphere(){ this->radius = 1.0; this->rollingSpeed = 0.02; this->accumuRollingM = mat4(); } void WCX_sphere::loadSphereFromFile(){ int Index = 0, triangleNum = 0; std::string sphereFileName; std::ifstream inputFile(sphereFileName); std::string line; while(!inputFile.is_open()){ std::cout<<"Please input the file name for the sphere info: "<<std::endl; std::cin>>sphereFileName; sphereFileName = "./"+sphereFileName; inputFile.open(sphereFileName, std::ifstream::in); if(!inputFile.is_open()){ std::cout<<"Can not open the file, do this again!"<<std::endl; continue; } } std::getline(inputFile, line); char *chr = new char[line.size()+1]; strcpy_s(chr, line.length()+1, line.c_str()); triangleNum = atoi(chr); this->vertex_size = triangleNum*3; delete chr; for(int i=0; i<triangleNum; i++){ // get each vertex info // since all vertex, skip a readline which n = 3 std::getline(inputFile, line); for(int j=0; j<3; j++){ std::getline(inputFile, line); char *chr = NULL, *tok = NULL; chr = new char[line.length()+1]; strcpy_s(chr,line.length()+1, line.c_str()); for(int k = 0; k<3; k++){ if(!k){ sphere_points[Index].x = atof(chr); tok = std::strtok(chr, " "); } if(k == 1){sphere_points[Index].y = atof(tok);} if(k == 2){ sphere_points[Index].z = atof(tok); sphere_points[Index].w = 1.0; } tok = std::strtok(NULL, " "); } Index ++; delete chr; } } } void WCX_sphere::setColor(color4 uniformColor){ for(int i=0; i<this->vertex_size; i++){ this->sphere_colors[i] = uniformColor; } } int WCX_sphere::rollingFromAToB(point4 A, point4 B, mat4 lastRotateM){ accumuRollingM = lastRotateM; this->rollingDirection = B-A; this->rollingAxis = cross(vec4(0.0,1.0,0.0,0.0),rollingDirection); this->rollingStart = A; return int(length(A-B)/radius/rollingSpeed); } mat4 WCX_sphere::rollingFramePosition(int frame){ vec4 currentCenter = this->rollingStart + frame*this->rollingSpeed*this->radius*normalize(this->rollingDirection); return Translate(currentCenter.x,currentCenter.y,currentCenter.z); } mat4 WCX_sphere::rollingFrameRotate(int frame){ mat4 currentRotateM = Rotate(this->rollingSpeed*frame*180/PI, rollingAxis.x, rollingAxis.y, rollingAxis.z); return currentRotateM*accumuRollingM; } void WCX_sphere::setShadowColor(color4 sColor){ for(int i=0; i<this->vertex_size; i++){ this->shadow_colors[i] = sColor; } } void WCX_sphere::setMaterial(){ this->lp.material_ambient = color4(0.2, 0.2, 0.2, 1.0); this->lp.material_diffuse = color4(1.0, 0.84, 0.0, 1.0); this->lp.material_specular = color4(1.0, 0.84, 0.0, 1.0); this->lp.material_shininess = 125.0; } void WCX_sphere::setFlatNormals(){ for(int i=0; i<this->vertex_size/3; i++){ point4 a = this->sphere_points[i*3+1] - this->sphere_points[i*3]; point4 b = this->sphere_points[i*3+2] - this->sphere_points[i*3+1]; point3 a3(a.x, a.y, a.z), b3(b.x, b.y, b.z); point3 vNormal = cross(a3,b3); vNormal = normalize(vNormal); for(int j=0; j<3; j++) this->sphere_normals[i*3+j] = vNormal; } } /* 1: texture mapping for ground 2: vertical in obj frame 3: slanted in obj frame 4: vertical in eye frame 5: slanted in eye frame in 2D, +4 default: no texture */ int WCX_sphere::getTextureAppFlag(){ if(!this->textureFlag || !this->fill_flag) return 0; return this->textureCoordFrame+this->textureCoordDir+4*this->texture2D; }
31.247788
115
0.676012
wiali
d7c423c2acd7b2ced416356011573640a72a63a2
1,028
cpp
C++
Test/Header Generator/Sheet.cpp
BartoszMilewski/CodeCoop
7d29f53ccf65b0d29ea7d6781a74507b52c08d0d
[ "MIT" ]
67
2018-03-02T10:50:02.000Z
2022-03-23T18:20:29.000Z
Test/Header Generator/Sheet.cpp
BartoszMilewski/CodeCoop
7d29f53ccf65b0d29ea7d6781a74507b52c08d0d
[ "MIT" ]
null
null
null
Test/Header Generator/Sheet.cpp
BartoszMilewski/CodeCoop
7d29f53ccf65b0d29ea7d6781a74507b52c08d0d
[ "MIT" ]
9
2018-03-01T16:38:28.000Z
2021-03-02T16:17:09.000Z
//--------------------------- // Sheet.cpp // (c) Reliable Software 2000 //--------------------------- #include "HeaderDetails.h" #include "GeneralPage.h" #include "AddressPage.h" #include "AddendumPage.h" #include "DestinationPage.h" #include "resource.h" #include <Ctrl/PropertySheet.h> bool CollectData (HINSTANCE hInst, HeaderDetails & details) { Property::Sheet sheet (hInst, "Script Generator", 5); GeneralCtrl generalCtrl (details); sheet.InitPage (0, IDD_GENERAL, generalCtrl, false, "General"); AddressCtrl senderAddressCtrl (details, false); sheet.InitPage (1, IDD_ADDRESS, senderAddressCtrl, false, "Sender"); AddressCtrl recipAddressCtrl (details, true); sheet.InitPage (2, IDD_ADDRESS, recipAddressCtrl, false, "Recipient"); AddendumCtrl addendumCtrl (details); sheet.InitPage (3, IDD_ADDENDUM, addendumCtrl, false, "Addendums"); DestinationCtrl destinationCtrl (details); sheet.InitPage (4, IDD_DESTINATION, destinationCtrl, false, "Destination"); return sheet.Run () && !details._wasCanceled; }
34.266667
76
0.715953
BartoszMilewski
d7c52c07b55bbcdf6c475fff9bad6c8f03d98826
477
cpp
C++
PAT_B/PAT_B1038.cpp
EnhydraGod/PATCode
ff38ea33ba319af78b3aeba8aa6c385cc5e8329f
[ "BSD-2-Clause" ]
3
2019-07-08T05:20:28.000Z
2021-09-22T10:53:26.000Z
PAT_B/PAT_B1038.cpp
EnhydraGod/PATCode
ff38ea33ba319af78b3aeba8aa6c385cc5e8329f
[ "BSD-2-Clause" ]
null
null
null
PAT_B/PAT_B1038.cpp
EnhydraGod/PATCode
ff38ea33ba319af78b3aeba8aa6c385cc5e8329f
[ "BSD-2-Clause" ]
null
null
null
#include <bits/stdc++.h> using namespace std; int n, tempScore; int scores[110]; int main() { fill(scores, scores+110, 0); scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &tempScore); scores[tempScore]++; } int m; scanf("%d", &m); for (int i = 0; i < m; i++) { scanf("%d", &tempScore); if(i == 0) printf("%d", scores[tempScore]); else printf(" %d", scores[tempScore]); } return 0; }
20.73913
51
0.480084
EnhydraGod
d7ca74d143c157dbac612bcd2295f0ece5f07117
411
cpp
C++
c++/maratona/cultivando string/cultivando strings.cpp
felipeMachado92/programas-em-C-
55d675110e495c7bcceb2b1bf2d32d582a445b40
[ "MIT" ]
null
null
null
c++/maratona/cultivando string/cultivando strings.cpp
felipeMachado92/programas-em-C-
55d675110e495c7bcceb2b1bf2d32d582a445b40
[ "MIT" ]
null
null
null
c++/maratona/cultivando string/cultivando strings.cpp
felipeMachado92/programas-em-C-
55d675110e495c7bcceb2b1bf2d32d582a445b40
[ "MIT" ]
null
null
null
#include<iostream> #include<string.h> using namespace std; string menorString(string vt[], int n){ string menor; for(int i = 0; i < n; i++){ if((i == 0) || (menor.length()>vt[i].length())){ menor = vt[i]; } } return menor; } int main(){ int n=-1; int contadorSeq=0; while(n!=0){ cin>>n; string vetorString[n]; for(int i = 0; i < n;i++){ cin>>vetorString[i]; } } return 0; }
13.258065
50
0.557178
felipeMachado92
d7cb9259cca5dfbb1b966b73343dc2ef145fb884
4,873
cpp
C++
Pawns.cpp
White-Hare/SuperChess
70ee3e7129df13f002330e31e5112dc229a3aed5
[ "MIT" ]
1
2019-12-03T17:58:15.000Z
2019-12-03T17:58:15.000Z
Pawns.cpp
White-Hare/SuperChess
70ee3e7129df13f002330e31e5112dc229a3aed5
[ "MIT" ]
null
null
null
Pawns.cpp
White-Hare/SuperChess
70ee3e7129df13f002330e31e5112dc229a3aed5
[ "MIT" ]
null
null
null
#include "Pawns.h" #include <iostream> #include <string> Pawns::Pawns(const char* ID, SDL_Rect map_rect, unsigned rows, unsigned columns, Vec2D<int> offset) :Enemies(ID, map_rect) { selected = UNSELECTED; this->rows = rows; this->columns = columns; this->offset = offset; this->placed = false; this->moving = false; this->target_rect = nullptr; } void Pawns::select(int x, int y) { std::vector<int> vec = this->collision_list({ x,y }); if (vec.size() != 0) selected = vec[0]; } int Pawns::get_selected() { return selected; } int Pawns::get_column(int index) { if (index >= 0 && index < get_size()) return (locations_[index].first->x - offset.x) / locations_[index].first->w; else { std::cerr << "Index Not Found\n"; return -1; } } int Pawns::get_row(int index) { if (index >= 0 && index < get_size()) return (locations_[index].first->y - offset.y) / locations_[index].first->h; else { std::cerr << "Index Not Found\n"; return -1; } } void Pawns::set_targeted_tile(SDL_Rect* tile_rect, Board *board) { if (selected != UNSELECTED) { const int t_column = (tile_rect->x - offset.x) / tile_rect->w, t_row = (tile_rect->y - offset.y) / tile_rect->h; if (is_possible_path(t_row, t_column, board)) { if (board->getCellID(t_column, t_row)[0] != ID[0]) { board->setCellID(get_column(selected), get_row(selected), "."); target_rect = new SDL_Rect{*tile_rect}; moving = true; board->setCellID(t_column, t_row, this->ID); } } } } SDL_Rect* Pawns::get_targeted_tile() { return target_rect; } void Pawns::go_to_targeted_tile(float delta, Board* board) { if (selected == UNSELECTED || target_rect == nullptr) { check_erased_pieces(board); return; } const float dx = target_rect->x - locations_[selected].first->x; const float dy = target_rect->y - locations_[selected].first->y; if (abs(dx) < 9 && abs(dy) < 9) { locations_[selected].first->x = target_rect->x; locations_[selected].first->y = target_rect->y; moving = false; unselect(); return; } if (dx == 0) locations_[selected].first->y += static_cast<float>(velocity) * delta * (dy / abs(dy)); else if (dy == 0) locations_[selected].first->x += static_cast<float>(velocity) * delta * (dx / abs(dx)); else { locations_[selected].first->x += static_cast<float>(velocity) * delta * cos(atan2(dy, dx)); locations_[selected].first->y += static_cast<float>(velocity) * delta * sin(atan2(dy, dx)); } } bool Pawns::is_possible_path(int row, int column, Board *board) {/* //use it for other projects return (abs(get_row(selected) - row) <= 1 && abs(get_column(selected) - column) <= 1) && abs(get_row(selected) - row) != abs(get_column(selected) - column);*/ bool possible = false; if (ID[0] == 'B') { if (column == get_column(selected) && row + 1 == get_row(selected) && board->getCellID(column, row) == ".") return true; if (abs(column - get_column(selected)) == 1 && row + 1 == get_row(selected)) if (board->getCellID(column, row) != ".") return true; if (get_row(selected) == rows - 2 && column == get_column(selected) && row + 2 == get_row(selected) && board->getCellID(column, row) == "." && board->getCellID(column, row + 1) == ".") return true; return false; } if (ID[0] == 'W') { if (column == get_column(selected) && row - 1 == get_row(selected) && board->getCellID(column, row) == ".") return true; if (abs(column - get_column(selected)) == 1 && row - 1 == get_row(selected)) if (board->getCellID(column, row) != ".") return true; if (get_row(selected) == 1 && column == get_column(selected) && row - 2 == get_row(selected) && board->getCellID(column, row) == "." && board->getCellID(column, row - 1) == ".") return true; return false; } } void Pawns::promote(unsigned index, Pawns* to_what, Board* board, float delta) { while (moving) go_to_targeted_tile(delta, board); board->setCellID(get_column(index), get_row(index), to_what->ID); to_what->add_enemy(*locations_[index].first); erase_enemy(index); } void Pawns::check_erased_pieces(Board* board) { for(int i=0; i < locations_.size(); i++) if (board->getCellID(get_column(i), get_row(i)) != this->ID) erase_enemy(i); } void Pawns::place_pieces(Board* board) { if (!placed) { for (int y = 0; y < rows; y++) for (int x = 0; x < columns; x++) if (board->getCellID(x, y) == this->ID) add_enemy(x * self_rect->w + offset.x, y * self_rect->h + offset.y); placed = true; } } void Pawns::unselect() { if (!moving) { target_rect = nullptr; selected = UNSELECTED; } } Pawns::~Pawns() { delete gun; }
23.315789
123
0.604145
White-Hare
d7cd71f8304620cc89a76c972ef28f4d1f999641
253,833
cpp
C++
Library/Il2cppBuildCache/iOS/il2cppOutput/Unity.Mathematics.cpp
Alex-Greenen/Spectral-Animation-Unity-Unity
fbd4983c2e260e21b353bf44c682e1413e480ce5
[ "MIT" ]
null
null
null
Library/Il2cppBuildCache/iOS/il2cppOutput/Unity.Mathematics.cpp
Alex-Greenen/Spectral-Animation-Unity-Unity
fbd4983c2e260e21b353bf44c682e1413e480ce5
[ "MIT" ]
null
null
null
Library/Il2cppBuildCache/iOS/il2cppOutput/Unity.Mathematics.cpp
Alex-Greenen/Spectral-Animation-Unity-Unity
fbd4983c2e260e21b353bf44c682e1413e480ce5
[ "MIT" ]
null
null
null
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // System.Object[] struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE; // System.IFormatProvider struct IFormatProvider_tF2AECC4B14F41D36718920D67F930CED940412DF; // System.String struct String_t; IL2CPP_EXTERN_C RuntimeClass* Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* float2_tCB7B81181978EDE17722C533A55E345D9A413274_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* float3_t9500D105F273B3D86BD354142E891C48FFF9F71D_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* uint2_t31B88562B6681D249453803230869FBE9ED565E7_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C RuntimeClass* uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635_il2cpp_TypeInfo_var; IL2CPP_EXTERN_C String_t* _stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A; IL2CPP_EXTERN_C String_t* _stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033; IL2CPP_EXTERN_C String_t* _stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58; IL2CPP_EXTERN_C String_t* _stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA; IL2CPP_EXTERN_C String_t* _stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945; IL2CPP_EXTERN_C String_t* _stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2; struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE; IL2CPP_EXTERN_C_BEGIN IL2CPP_EXTERN_C_END #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-offsetof" #pragma clang diagnostic ignored "-Wunused-variable" #endif // <Module> struct U3CModuleU3E_t916C2921FF960F72004923FC1240DBADFB79491C { public: public: }; // System.Object struct Il2CppArrayBounds; // System.Array // 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((void**)(&___Empty_5), (void*)value); } }; // System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52 : public RuntimeObject { public: public: }; // Native definition for P/Invoke marshalling of System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_pinvoke { }; // Native definition for COM marshalling of System.ValueType struct ValueType_tDBF999C1B75C48C68621878250DBF6CDBCF51E52_marshaled_com { }; // Unity.Mathematics.math struct math_t4C8D40FC641C7FE575DD19ED65B962B3E792AF5C : public RuntimeObject { public: public: }; // Unity.Mathematics.float2/DebuggerProxy struct DebuggerProxy_t3A175858992CDE4C80C7D76CCD40E6CE50B04766 : public RuntimeObject { public: public: }; // Unity.Mathematics.float3/DebuggerProxy struct DebuggerProxy_tF241B21D166E001A0FB777E403C2D7939743EB1B : public RuntimeObject { public: public: }; // Unity.Mathematics.float4/DebuggerProxy struct DebuggerProxy_t496313EE9F0BCD4DFDE932CFB00FA8D1390778CF : public RuntimeObject { public: public: }; // Unity.Mathematics.uint2/DebuggerProxy struct DebuggerProxy_t7E1A6191A0211F31BD9D1DD3746CC85CA9128090 : public RuntimeObject { public: public: }; // Unity.Mathematics.uint3/DebuggerProxy struct DebuggerProxy_t5454684BB1A7BCDF062804DC4C8C5BD77525881C : public RuntimeObject { public: public: }; // Unity.Mathematics.uint4/DebuggerProxy struct DebuggerProxy_t004DFEB9E37EC428BC11273322DF51330F83AE41 : public RuntimeObject { public: public: }; // System.Boolean struct Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37 { 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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37, ___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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_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_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_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((void**)(&___TrueString_5), (void*)value); } inline static int32_t get_offset_of_FalseString_6() { return static_cast<int32_t>(offsetof(Boolean_t07D1E3F34E4813023D64F584DFF7B34C9D922F37_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((void**)(&___FalseString_6), (void*)value); } }; // System.Double struct Double_t42821932CB52DE2057E685D0E1AF3DE5033D2181 { public: // System.Double System.Double::m_value double ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(Double_t42821932CB52DE2057E685D0E1AF3DE5033D2181, ___m_value_0)); } inline double get_m_value_0() const { return ___m_value_0; } inline double* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(double value) { ___m_value_0 = value; } }; struct Double_t42821932CB52DE2057E685D0E1AF3DE5033D2181_StaticFields { public: // System.Double System.Double::NegativeZero double ___NegativeZero_7; public: inline static int32_t get_offset_of_NegativeZero_7() { return static_cast<int32_t>(offsetof(Double_t42821932CB52DE2057E685D0E1AF3DE5033D2181_StaticFields, ___NegativeZero_7)); } inline double get_NegativeZero_7() const { return ___NegativeZero_7; } inline double* get_address_of_NegativeZero_7() { return &___NegativeZero_7; } inline void set_NegativeZero_7(double value) { ___NegativeZero_7 = value; } }; // System.Int32 struct Int32_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046 { 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_tFDE5F8CD43D10453F6A2E0C77FE48C6CC7009046, ___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; } }; // System.Single struct Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E { 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_tE07797BA3C98D4CA9B5A19413C19A76688AB899E, ___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; } }; // System.UInt32 struct UInt32_tE60352A06233E4E69DD198BCC67142159F686B15 { public: // System.UInt32 System.UInt32::m_value uint32_t ___m_value_0; public: inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15, ___m_value_0)); } inline uint32_t get_m_value_0() const { return ___m_value_0; } inline uint32_t* get_address_of_m_value_0() { return &___m_value_0; } inline void set_m_value_0(uint32_t value) { ___m_value_0 = value; } }; // UnityEngine.Vector2 struct Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 { 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_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9, ___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_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9, ___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_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields { public: // UnityEngine.Vector2 UnityEngine.Vector2::zeroVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___zeroVector_2; // UnityEngine.Vector2 UnityEngine.Vector2::oneVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___oneVector_3; // UnityEngine.Vector2 UnityEngine.Vector2::upVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___upVector_4; // UnityEngine.Vector2 UnityEngine.Vector2::downVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___downVector_5; // UnityEngine.Vector2 UnityEngine.Vector2::leftVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___leftVector_6; // UnityEngine.Vector2 UnityEngine.Vector2::rightVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___rightVector_7; // UnityEngine.Vector2 UnityEngine.Vector2::positiveInfinityVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___positiveInfinityVector_8; // UnityEngine.Vector2 UnityEngine.Vector2::negativeInfinityVector Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___negativeInfinityVector_9; public: inline static int32_t get_offset_of_zeroVector_2() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___zeroVector_2)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_zeroVector_2() const { return ___zeroVector_2; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_zeroVector_2() { return &___zeroVector_2; } inline void set_zeroVector_2(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___zeroVector_2 = value; } inline static int32_t get_offset_of_oneVector_3() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___oneVector_3)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_oneVector_3() const { return ___oneVector_3; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_oneVector_3() { return &___oneVector_3; } inline void set_oneVector_3(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___oneVector_3 = value; } inline static int32_t get_offset_of_upVector_4() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___upVector_4)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_upVector_4() const { return ___upVector_4; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_upVector_4() { return &___upVector_4; } inline void set_upVector_4(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___upVector_4 = value; } inline static int32_t get_offset_of_downVector_5() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___downVector_5)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_downVector_5() const { return ___downVector_5; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_downVector_5() { return &___downVector_5; } inline void set_downVector_5(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___downVector_5 = value; } inline static int32_t get_offset_of_leftVector_6() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___leftVector_6)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_leftVector_6() const { return ___leftVector_6; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_leftVector_6() { return &___leftVector_6; } inline void set_leftVector_6(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___leftVector_6 = value; } inline static int32_t get_offset_of_rightVector_7() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___rightVector_7)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_rightVector_7() const { return ___rightVector_7; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_rightVector_7() { return &___rightVector_7; } inline void set_rightVector_7(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___rightVector_7 = value; } inline static int32_t get_offset_of_positiveInfinityVector_8() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___positiveInfinityVector_8)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_positiveInfinityVector_8() const { return ___positiveInfinityVector_8; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_positiveInfinityVector_8() { return &___positiveInfinityVector_8; } inline void set_positiveInfinityVector_8(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___positiveInfinityVector_8 = value; } inline static int32_t get_offset_of_negativeInfinityVector_9() { return static_cast<int32_t>(offsetof(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9_StaticFields, ___negativeInfinityVector_9)); } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 get_negativeInfinityVector_9() const { return ___negativeInfinityVector_9; } inline Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 * get_address_of_negativeInfinityVector_9() { return &___negativeInfinityVector_9; } inline void set_negativeInfinityVector_9(Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 value) { ___negativeInfinityVector_9 = value; } }; // UnityEngine.Vector3 struct Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E { 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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E, ___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_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields { public: // UnityEngine.Vector3 UnityEngine.Vector3::zeroVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___zeroVector_5; // UnityEngine.Vector3 UnityEngine.Vector3::oneVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___oneVector_6; // UnityEngine.Vector3 UnityEngine.Vector3::upVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___upVector_7; // UnityEngine.Vector3 UnityEngine.Vector3::downVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___downVector_8; // UnityEngine.Vector3 UnityEngine.Vector3::leftVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___leftVector_9; // UnityEngine.Vector3 UnityEngine.Vector3::rightVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___rightVector_10; // UnityEngine.Vector3 UnityEngine.Vector3::forwardVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___forwardVector_11; // UnityEngine.Vector3 UnityEngine.Vector3::backVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___backVector_12; // UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___positiveInfinityVector_13; // UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___negativeInfinityVector_14; public: inline static int32_t get_offset_of_zeroVector_5() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___zeroVector_5)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_zeroVector_5() const { return ___zeroVector_5; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_zeroVector_5() { return &___zeroVector_5; } inline void set_zeroVector_5(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___zeroVector_5 = value; } inline static int32_t get_offset_of_oneVector_6() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___oneVector_6)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_oneVector_6() const { return ___oneVector_6; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_oneVector_6() { return &___oneVector_6; } inline void set_oneVector_6(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___oneVector_6 = value; } inline static int32_t get_offset_of_upVector_7() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___upVector_7)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_upVector_7() const { return ___upVector_7; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_upVector_7() { return &___upVector_7; } inline void set_upVector_7(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___upVector_7 = value; } inline static int32_t get_offset_of_downVector_8() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___downVector_8)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_downVector_8() const { return ___downVector_8; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_downVector_8() { return &___downVector_8; } inline void set_downVector_8(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___downVector_8 = value; } inline static int32_t get_offset_of_leftVector_9() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___leftVector_9)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_leftVector_9() const { return ___leftVector_9; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_leftVector_9() { return &___leftVector_9; } inline void set_leftVector_9(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___leftVector_9 = value; } inline static int32_t get_offset_of_rightVector_10() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___rightVector_10)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_rightVector_10() const { return ___rightVector_10; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_rightVector_10() { return &___rightVector_10; } inline void set_rightVector_10(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___rightVector_10 = value; } inline static int32_t get_offset_of_forwardVector_11() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___forwardVector_11)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_forwardVector_11() const { return ___forwardVector_11; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_forwardVector_11() { return &___forwardVector_11; } inline void set_forwardVector_11(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___forwardVector_11 = value; } inline static int32_t get_offset_of_backVector_12() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___backVector_12)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_backVector_12() const { return ___backVector_12; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_backVector_12() { return &___backVector_12; } inline void set_backVector_12(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___backVector_12 = value; } inline static int32_t get_offset_of_positiveInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___positiveInfinityVector_13)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_positiveInfinityVector_13() const { return ___positiveInfinityVector_13; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_positiveInfinityVector_13() { return &___positiveInfinityVector_13; } inline void set_positiveInfinityVector_13(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___positiveInfinityVector_13 = value; } inline static int32_t get_offset_of_negativeInfinityVector_14() { return static_cast<int32_t>(offsetof(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E_StaticFields, ___negativeInfinityVector_14)); } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E get_negativeInfinityVector_14() const { return ___negativeInfinityVector_14; } inline Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * get_address_of_negativeInfinityVector_14() { return &___negativeInfinityVector_14; } inline void set_negativeInfinityVector_14(Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E value) { ___negativeInfinityVector_14 = value; } }; // System.Void struct Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5 { public: union { struct { }; uint8_t Void_t700C6383A2A510C2CF4DD86DABD5CA9FF70ADAC5__padding[1]; }; public: }; // Unity.Mathematics.float2 struct float2_tCB7B81181978EDE17722C533A55E345D9A413274 { public: // System.Single Unity.Mathematics.float2::x float ___x_0; // System.Single Unity.Mathematics.float2::y float ___y_1; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(float2_tCB7B81181978EDE17722C533A55E345D9A413274, ___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(float2_tCB7B81181978EDE17722C533A55E345D9A413274, ___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; } }; // Unity.Mathematics.float3 struct float3_t9500D105F273B3D86BD354142E891C48FFF9F71D { public: // System.Single Unity.Mathematics.float3::x float ___x_0; // System.Single Unity.Mathematics.float3::y float ___y_1; // System.Single Unity.Mathematics.float3::z float ___z_2; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D, ___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(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D, ___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(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D, ___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; } }; struct float3_t9500D105F273B3D86BD354142E891C48FFF9F71D_StaticFields { public: // Unity.Mathematics.float3 Unity.Mathematics.float3::zero float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___zero_3; public: inline static int32_t get_offset_of_zero_3() { return static_cast<int32_t>(offsetof(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D_StaticFields, ___zero_3)); } inline float3_t9500D105F273B3D86BD354142E891C48FFF9F71D get_zero_3() const { return ___zero_3; } inline float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * get_address_of_zero_3() { return &___zero_3; } inline void set_zero_3(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D value) { ___zero_3 = value; } }; // Unity.Mathematics.float4 struct float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 { public: // System.Single Unity.Mathematics.float4::x float ___x_0; // System.Single Unity.Mathematics.float4::y float ___y_1; // System.Single Unity.Mathematics.float4::z float ___z_2; // System.Single Unity.Mathematics.float4::w float ___w_3; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861, ___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(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861, ___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(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861, ___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(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861, ___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; } }; // Unity.Mathematics.uint2 struct uint2_t31B88562B6681D249453803230869FBE9ED565E7 { public: // System.UInt32 Unity.Mathematics.uint2::x uint32_t ___x_0; // System.UInt32 Unity.Mathematics.uint2::y uint32_t ___y_1; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(uint2_t31B88562B6681D249453803230869FBE9ED565E7, ___x_0)); } inline uint32_t get_x_0() const { return ___x_0; } inline uint32_t* get_address_of_x_0() { return &___x_0; } inline void set_x_0(uint32_t value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(uint2_t31B88562B6681D249453803230869FBE9ED565E7, ___y_1)); } inline uint32_t get_y_1() const { return ___y_1; } inline uint32_t* get_address_of_y_1() { return &___y_1; } inline void set_y_1(uint32_t value) { ___y_1 = value; } }; // Unity.Mathematics.uint3 struct uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A { public: // System.UInt32 Unity.Mathematics.uint3::x uint32_t ___x_0; // System.UInt32 Unity.Mathematics.uint3::y uint32_t ___y_1; // System.UInt32 Unity.Mathematics.uint3::z uint32_t ___z_2; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A, ___x_0)); } inline uint32_t get_x_0() const { return ___x_0; } inline uint32_t* get_address_of_x_0() { return &___x_0; } inline void set_x_0(uint32_t value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A, ___y_1)); } inline uint32_t get_y_1() const { return ___y_1; } inline uint32_t* get_address_of_y_1() { return &___y_1; } inline void set_y_1(uint32_t value) { ___y_1 = value; } inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A, ___z_2)); } inline uint32_t get_z_2() const { return ___z_2; } inline uint32_t* get_address_of_z_2() { return &___z_2; } inline void set_z_2(uint32_t value) { ___z_2 = value; } }; // Unity.Mathematics.uint4 struct uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 { public: // System.UInt32 Unity.Mathematics.uint4::x uint32_t ___x_0; // System.UInt32 Unity.Mathematics.uint4::y uint32_t ___y_1; // System.UInt32 Unity.Mathematics.uint4::z uint32_t ___z_2; // System.UInt32 Unity.Mathematics.uint4::w uint32_t ___w_3; public: inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635, ___x_0)); } inline uint32_t get_x_0() const { return ___x_0; } inline uint32_t* get_address_of_x_0() { return &___x_0; } inline void set_x_0(uint32_t value) { ___x_0 = value; } inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635, ___y_1)); } inline uint32_t get_y_1() const { return ___y_1; } inline uint32_t* get_address_of_y_1() { return &___y_1; } inline void set_y_1(uint32_t value) { ___y_1 = value; } inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635, ___z_2)); } inline uint32_t get_z_2() const { return ___z_2; } inline uint32_t* get_address_of_z_2() { return &___z_2; } inline void set_z_2(uint32_t value) { ___z_2 = value; } inline static int32_t get_offset_of_w_3() { return static_cast<int32_t>(offsetof(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635, ___w_3)); } inline uint32_t get_w_3() const { return ___w_3; } inline uint32_t* get_address_of_w_3() { return &___w_3; } inline void set_w_3(uint32_t value) { ___w_3 = value; } }; // Unity.Mathematics.math/IntFloatUnion struct IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 { public: union { #pragma pack(push, tp, 1) struct { // System.Int32 Unity.Mathematics.math/IntFloatUnion::intValue int32_t ___intValue_0; }; #pragma pack(pop, tp) struct { int32_t ___intValue_0_forAlignmentOnly; }; #pragma pack(push, tp, 1) struct { // System.Single Unity.Mathematics.math/IntFloatUnion::floatValue float ___floatValue_1; }; #pragma pack(pop, tp) struct { float ___floatValue_1_forAlignmentOnly; }; }; public: inline static int32_t get_offset_of_intValue_0() { return static_cast<int32_t>(offsetof(IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463, ___intValue_0)); } inline int32_t get_intValue_0() const { return ___intValue_0; } inline int32_t* get_address_of_intValue_0() { return &___intValue_0; } inline void set_intValue_0(int32_t value) { ___intValue_0 = value; } inline static int32_t get_offset_of_floatValue_1() { return static_cast<int32_t>(offsetof(IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463, ___floatValue_1)); } inline float get_floatValue_1() const { return ___floatValue_1; } inline float* get_address_of_floatValue_1() { return &___floatValue_1; } inline void set_floatValue_1(float value) { ___floatValue_1 = value; } }; #ifdef __clang__ #pragma clang diagnostic pop #endif // System.Object[] struct ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE : public RuntimeArray { public: ALIGN_FIELD (8) RuntimeObject * m_Items[1]; public: inline RuntimeObject * GetAt(il2cpp_array_size_t index) const { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); return m_Items[index]; } inline RuntimeObject ** 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, RuntimeObject * value) { IL2CPP_ARRAY_BOUNDS_CHECK(index, (uint32_t)(this)->max_length); m_Items[index] = value; Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value); } inline RuntimeObject * GetAtUnchecked(il2cpp_array_size_t index) const { return m_Items[index]; } inline RuntimeObject ** GetAddressAtUnchecked(il2cpp_array_size_t index) { return m_Items + index; } inline void SetAtUnchecked(il2cpp_array_size_t index, RuntimeObject * value) { m_Items[index] = value; Il2CppCodeGenWriteBarrier((void**)m_Items + index, (void*)value); } }; // System.Void Unity.Mathematics.float2::.ctor(System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, float ___x0, float ___y1, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.float2::Equals(Unity.Mathematics.float2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool float2_Equals_mD7E0010E86764F768D155F084C5049B1A37451AB_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___rhs0, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.float2::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float2_Equals_m2B929D2B1750063ED9C8F71F517E707629A2865D (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, RuntimeObject * ___o0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.float2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_m02C3B1E016522A7C4B32A4FCD30DED6807391ED9_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___v0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.float2::GetHashCode() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t float2_GetHashCode_m14F0A1D75CEB912B8D368074F8EC66E768800FE9_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, const RuntimeMethod* method); // System.String System.String::Format(System.String,System.Object,System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66 (String_t* ___format0, RuntimeObject * ___arg01, RuntimeObject * ___arg12, const RuntimeMethod* method); // System.String Unity.Mathematics.float2::ToString() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float2_ToString_mDD9456E5C3F28889E650CED5533DCD06219F3A28_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, const RuntimeMethod* method); // System.String System.Single::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B (float* __this, String_t* ___format0, RuntimeObject* ___provider1, const RuntimeMethod* method); // System.String Unity.Mathematics.float2::ToString(System.String,System.IFormatProvider) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float2_ToString_mCCF46926AC2D48D3344DC9373B33F0E005071C78_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method); // System.Void Unity.Mathematics.float3::.ctor(System.Single,System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method); // System.Void Unity.Mathematics.float3::.ctor(System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float3__ctor_m9E3A136F0CAD409A42B39B54E95C86ECE24FC35C_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float ___v0, const RuntimeMethod* method); // Unity.Mathematics.float3 Unity.Mathematics.float3::get_yzx() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.float3::Equals(Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool float3_Equals_m21D80AD2B9F37B1210C6F36BE86F76AA527BF2CF_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs0, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.float3::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float3_Equals_m3C3B40E46D39C1FC39D250269E33EFC955235B2B (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, RuntimeObject * ___o0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_mE7D1E0FE1B3FB42A30188A62D737426389918F84_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___v0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.float3::GetHashCode() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t float3_GetHashCode_m127685CE1D48644B6DC250A3CA9B989A54BA1AF3_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method); // System.String System.String::Format(System.String,System.Object,System.Object,System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6 (String_t* ___format0, RuntimeObject * ___arg01, RuntimeObject * ___arg12, RuntimeObject * ___arg23, const RuntimeMethod* method); // System.String Unity.Mathematics.float3::ToString() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float3_ToString_mB8035CAC163C19E11A35ADFE448E5B362A56D8AF_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.float3::ToString(System.String,System.IFormatProvider) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float3_ToString_mAA3FEBFB0473D5C7F22CB3B6B56E52BEE6054F5F_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method); // System.Void UnityEngine.Vector3::.ctor(System.Single,System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method); // System.Void Unity.Mathematics.float4::.ctor(System.Single,System.Single,System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float4__ctor_mD7DD9759C791823116719CAE8EE693E9C173E241_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, float ___x0, float ___y1, float ___z2, float ___w3, const RuntimeMethod* method); // Unity.Mathematics.float3 Unity.Mathematics.float4::get_xyz() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float4_get_xyz_m4737722995A5B3DC8DD7C8064525E79FC8327AAC_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.float4::Equals(Unity.Mathematics.float4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool float4_Equals_mC17658EE14E0595E33E170A1CF5325AD7240B508_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___rhs0, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.float4::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float4_Equals_m6247D066192E1714DDC2CC001D0D20D10D60228B (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, RuntimeObject * ___o0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.float4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_mE2E294D89343D0C0D08ABE6E8D97BFDBD5AD60A5_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___v0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.float4::GetHashCode() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t float4_GetHashCode_mDAE54F7570659BE4963BEA7F347A137B7EFC5230_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method); // System.String System.String::Format(System.String,System.Object[]) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B (String_t* ___format0, ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* ___args1, const RuntimeMethod* method); // System.String Unity.Mathematics.float4::ToString() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float4_ToString_mF8E4242AD739E6BC3CFDAF96C26236D385DF7850_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.float4::ToString(System.String,System.IFormatProvider) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float4_ToString_m643BEBFFE6AE7B5E0366C777BEE1178924D5374B_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method); // Unity.Mathematics.uint2 Unity.Mathematics.math::asuint(Unity.Mathematics.float2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 math_asuint_m351AD372B79DB7BEFB5AC7667CDF3409544E3863_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___x0, const RuntimeMethod* method); // Unity.Mathematics.uint2 Unity.Mathematics.math::uint2(System.UInt32,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline (uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method); // Unity.Mathematics.uint2 Unity.Mathematics.uint2::op_Multiply(Unity.Mathematics.uint2,Unity.Mathematics.uint2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___lhs0, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs1, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::csum(Unity.Mathematics.uint2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___x0, const RuntimeMethod* method); // Unity.Mathematics.uint3 Unity.Mathematics.math::asuint(Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A math_asuint_m7BB84B6113F67FF1E002B1E0414D8A4754070550_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, const RuntimeMethod* method); // Unity.Mathematics.uint3 Unity.Mathematics.math::uint3(System.UInt32,System.UInt32,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline (uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method); // Unity.Mathematics.uint3 Unity.Mathematics.uint3::op_Multiply(Unity.Mathematics.uint3,Unity.Mathematics.uint3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___lhs0, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs1, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::csum(Unity.Mathematics.uint3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___x0, const RuntimeMethod* method); // Unity.Mathematics.uint4 Unity.Mathematics.math::asuint(Unity.Mathematics.float4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 math_asuint_m6BECD59CBEEAB7DBA7EB79A50D54424B974B760D_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___x0, const RuntimeMethod* method); // Unity.Mathematics.uint4 Unity.Mathematics.math::uint4(System.UInt32,System.UInt32,System.UInt32,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline (uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method); // Unity.Mathematics.uint4 Unity.Mathematics.uint4::op_Multiply(Unity.Mathematics.uint4,Unity.Mathematics.uint4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___lhs0, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs1, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::csum(Unity.Mathematics.uint4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___x0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.math::asint(System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t math_asint_mAB46275EA58D5FC95717224B4214F3C9987A8C86_inline (float ___x0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::asuint(System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline (float ___x0, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::asfloat(System.Int32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_asfloat_mFC74F5F38E8967C1320B94E1AF95AB1D55D46181_inline (int32_t ___x0, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::asfloat(System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline (uint32_t ___x0, const RuntimeMethod* method); // Unity.Mathematics.float2 Unity.Mathematics.math::float2(System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_float2_mDA355E0A30FD4D9FCFA20C1816C3AAE674DFD9B9_inline (float ___x0, float ___y1, const RuntimeMethod* method); // System.Boolean System.Single::IsNaN(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool Single_IsNaN_m458FF076EF1944D4D888A585F7C6C49DA4730599 (float ___f0, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::min(System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89_inline (float ___x0, float ___y1, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::max(System.Single,System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_max_mD8541933650D81292540BAFF46DE531FA1B333FC_inline (float ___x0, float ___y1, const RuntimeMethod* method); // Unity.Mathematics.uint2 Unity.Mathematics.uint2::op_BitwiseAnd(Unity.Mathematics.uint2,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 uint2_op_BitwiseAnd_mCF4B68B8031E03CF2287FC12BBBB17DF8614EDEE_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___lhs0, uint32_t ___rhs1, const RuntimeMethod* method); // Unity.Mathematics.float2 Unity.Mathematics.math::asfloat(Unity.Mathematics.uint2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_asfloat_m7A105E6392497188C3D5014278B85008BC9FDC07_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___x0, const RuntimeMethod* method); // System.Double System.Math::Pow(System.Double,System.Double) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR double Math_Pow_mC2C8700DAAD1316AA457A1D271F78CDF0D61AC2F (double ___x0, double ___y1, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::sqrt(System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_sqrt_mCFFE475634B2765D4E1A8DE9A9B331742E0637CF_inline (float ___x0, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::dot(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_dot_mF7AC1B7E5E29630523124BDBFA34A2672CB852A9_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___y1, const RuntimeMethod* method); // System.Single Unity.Mathematics.math::rsqrt(System.Single) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_rsqrt_m4BCAD96F434850A62C649607F810ED996C19D896_inline (float ___x0, const RuntimeMethod* method); // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Multiply(System.Single,Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m4A0B40DB4725F815AD14147DA2D00F1A7B1E88BE_inline (float ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method); // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Multiply(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m6E5382EBCA40ADBD10C11AB231C4A8629279CCF1_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method); // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Subtraction(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Subtraction_m3093AF71655C11E35349271AB39F99183B75B7E2_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method); // System.Void Unity.Mathematics.uint2::.ctor(System.UInt32,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method); // System.Void Unity.Mathematics.uint3::.ctor(System.UInt32,System.UInt32,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method); // System.Void Unity.Mathematics.uint4::.ctor(System.UInt32,System.UInt32,System.UInt32,System.UInt32) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.uint2::Equals(Unity.Mathematics.uint2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool uint2_Equals_m4D6B7E58271563553964C88B0C6C11B11E9DDEFF_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs0, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.uint2::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint2_Equals_mDC5AF9975359EB05CA526D9D132038CC07BA610C (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, RuntimeObject * ___o0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.uint2) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_mA46BEA1D3896F53E98145896C8F7136062532F90_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___v0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.uint2::GetHashCode() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t uint2_GetHashCode_m1AA42656371544BEFEF58990F0F5D3375771BDED_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.uint2::ToString() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint2_ToString_m11C8B65BDF3EE9F3E076886108F29C7085311CD8_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, const RuntimeMethod* method); // System.String System.UInt32::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B (uint32_t* __this, String_t* ___format0, RuntimeObject* ___provider1, const RuntimeMethod* method); // System.String Unity.Mathematics.uint2::ToString(System.String,System.IFormatProvider) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint2_ToString_m82A6C25A6E380499B47B6D45037EC327449303A1_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.uint3::Equals(Unity.Mathematics.uint3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool uint3_Equals_m13DA44E1022044FEBBA2066ECD1A8AC1CB53DF91_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs0, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.uint3::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint3_Equals_mAAD3238F59F9CA833513E94E33A329834CB205FE (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, RuntimeObject * ___o0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.uint3) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_m93543A4E24AB7FC17AA2810F0AEDF9ADABE333E6_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___v0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.uint3::GetHashCode() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t uint3_GetHashCode_mD983DD667EC5C064E237BFA773C185AB36599B76_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.uint3::ToString() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint3_ToString_mEADE36DE83569B87E7DF9B37EB4A04357B83B277_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.uint3::ToString(System.String,System.IFormatProvider) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint3_ToString_mF1C800E07DAF3C5478742C64CD0C4C76C7E63167_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.uint4::Equals(Unity.Mathematics.uint4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool uint4_Equals_mA01BD6C642C7AA15938773343109B65A7017A8E5_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs0, const RuntimeMethod* method); // System.Boolean Unity.Mathematics.uint4::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint4_Equals_mA36D75D93A16B63C63FF5556877325DE7209CA0C (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, RuntimeObject * ___o0, const RuntimeMethod* method); // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.uint4) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_m5E517FEDA0EC60364F96435FEFECAC5E5B7A1811_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___v0, const RuntimeMethod* method); // System.Int32 Unity.Mathematics.uint4::GetHashCode() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t uint4_GetHashCode_m0ACFBA8EEEBE72824B814A9147C62BA2DAD67E04_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.uint4::ToString() IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint4_ToString_m88626950AE1516CF95F414CFC9D3328308CFFD21_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, const RuntimeMethod* method); // System.String Unity.Mathematics.uint4::ToString(System.String,System.IFormatProvider) IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint4_ToString_m89A2419938888294462214E4F1B77BFB2A6D6622_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, 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 Unity.Mathematics.float2::.ctor(System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, float ___x0, float ___y1, const RuntimeMethod* method) { { // this.x = x; float L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; float L_1 = ___y1; __this->set_y_1(L_1); // } return; } } IL2CPP_EXTERN_C void float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_AdjustorThunk (RuntimeObject * __this, float ___x0, float ___y1, const RuntimeMethod* method) { int32_t _offset = 1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 * _thisAdjusted = reinterpret_cast<float2_tCB7B81181978EDE17722C533A55E345D9A413274 *>(__this + _offset); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline(_thisAdjusted, ___x0, ___y1, method); } // Unity.Mathematics.float2 Unity.Mathematics.float2::op_Multiply(Unity.Mathematics.float2,Unity.Mathematics.float2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 float2_op_Multiply_m417FD0A3E8DA1C470B32FC1595A7EF1169B7612B (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___lhs0, float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___rhs1, const RuntimeMethod* method) { { // public static float2 operator * (float2 lhs, float2 rhs) { return new float2 (lhs.x * rhs.x, lhs.y * rhs.y); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_8; memset((&L_8), 0, sizeof(L_8)); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline((&L_8), ((float)il2cpp_codegen_multiply((float)L_1, (float)L_3)), ((float)il2cpp_codegen_multiply((float)L_5, (float)L_7)), /*hidden argument*/NULL); return L_8; } } // Unity.Mathematics.float2 Unity.Mathematics.float2::op_Multiply(Unity.Mathematics.float2,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 float2_op_Multiply_m7262BDAFAD6CB1D6D980929C82826C82C86F5039 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___lhs0, float ___rhs1, const RuntimeMethod* method) { { // public static float2 operator * (float2 lhs, float rhs) { return new float2 (lhs.x * rhs, lhs.y * rhs); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float L_2 = ___rhs1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_3 = ___lhs0; float L_4 = L_3.get_y_1(); float L_5 = ___rhs1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_6; memset((&L_6), 0, sizeof(L_6)); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline((&L_6), ((float)il2cpp_codegen_multiply((float)L_1, (float)L_2)), ((float)il2cpp_codegen_multiply((float)L_4, (float)L_5)), /*hidden argument*/NULL); return L_6; } } // Unity.Mathematics.float2 Unity.Mathematics.float2::op_Subtraction(Unity.Mathematics.float2,Unity.Mathematics.float2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 float2_op_Subtraction_mD7E1752FB29F54A98A4A52140E8BCFD659471E19 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___lhs0, float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___rhs1, const RuntimeMethod* method) { { // public static float2 operator - (float2 lhs, float2 rhs) { return new float2 (lhs.x - rhs.x, lhs.y - rhs.y); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_8; memset((&L_8), 0, sizeof(L_8)); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline((&L_8), ((float)il2cpp_codegen_subtract((float)L_1, (float)L_3)), ((float)il2cpp_codegen_subtract((float)L_5, (float)L_7)), /*hidden argument*/NULL); return L_8; } } // System.Boolean Unity.Mathematics.float2::Equals(Unity.Mathematics.float2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float2_Equals_mD7E0010E86764F768D155F084C5049B1A37451AB (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(float2 rhs) { return x == rhs.x && y == rhs.y; } float L_0 = __this->get_x_0(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_1 = ___rhs0; float L_2 = L_1.get_x_0(); if ((!(((float)L_0) == ((float)L_2)))) { goto IL_001d; } } { float L_3 = __this->get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_4 = ___rhs0; float L_5 = L_4.get_y_1(); return (bool)((((float)L_3) == ((float)L_5))? 1 : 0); } IL_001d: { return (bool)0; } } IL2CPP_EXTERN_C bool float2_Equals_mD7E0010E86764F768D155F084C5049B1A37451AB_AdjustorThunk (RuntimeObject * __this, float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___rhs0, const RuntimeMethod* method) { int32_t _offset = 1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 * _thisAdjusted = reinterpret_cast<float2_tCB7B81181978EDE17722C533A55E345D9A413274 *>(__this + _offset); bool _returnValue; _returnValue = float2_Equals_mD7E0010E86764F768D155F084C5049B1A37451AB_inline(_thisAdjusted, ___rhs0, method); return _returnValue; } // System.Boolean Unity.Mathematics.float2::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float2_Equals_m2B929D2B1750063ED9C8F71F517E707629A2865D (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&float2_tCB7B81181978EDE17722C533A55E345D9A413274_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public override bool Equals(object o) { return Equals((float2)o); } RuntimeObject * L_0 = ___o0; bool L_1; L_1 = float2_Equals_mD7E0010E86764F768D155F084C5049B1A37451AB_inline((float2_tCB7B81181978EDE17722C533A55E345D9A413274 *)__this, ((*(float2_tCB7B81181978EDE17722C533A55E345D9A413274 *)((float2_tCB7B81181978EDE17722C533A55E345D9A413274 *)UnBox(L_0, float2_tCB7B81181978EDE17722C533A55E345D9A413274_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C bool float2_Equals_m2B929D2B1750063ED9C8F71F517E707629A2865D_AdjustorThunk (RuntimeObject * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { int32_t _offset = 1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 * _thisAdjusted = reinterpret_cast<float2_tCB7B81181978EDE17722C533A55E345D9A413274 *>(__this + _offset); bool _returnValue; _returnValue = float2_Equals_m2B929D2B1750063ED9C8F71F517E707629A2865D(_thisAdjusted, ___o0, method); return _returnValue; } // System.Int32 Unity.Mathematics.float2::GetHashCode() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t float2_GetHashCode_m14F0A1D75CEB912B8D368074F8EC66E768800FE9 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = (*(float2_tCB7B81181978EDE17722C533A55E345D9A413274 *)__this); uint32_t L_1; L_1 = math_hash_m02C3B1E016522A7C4B32A4FCD30DED6807391ED9_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C int32_t float2_GetHashCode_m14F0A1D75CEB912B8D368074F8EC66E768800FE9_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 * _thisAdjusted = reinterpret_cast<float2_tCB7B81181978EDE17722C533A55E345D9A413274 *>(__this + _offset); int32_t _returnValue; _returnValue = float2_GetHashCode_m14F0A1D75CEB912B8D368074F8EC66E768800FE9_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.float2::ToString() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* float2_ToString_mDD9456E5C3F28889E650CED5533DCD06219F3A28 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58); s_Il2CppMethodInitialized = true; } { // return string.Format("float2({0}f, {1}f)", x, y); float L_0 = __this->get_x_0(); float L_1 = L_0; RuntimeObject * L_2 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_1); float L_3 = __this->get_y_1(); float L_4 = L_3; RuntimeObject * L_5 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_4); String_t* L_6; L_6 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58, L_2, L_5, /*hidden argument*/NULL); return L_6; } } IL2CPP_EXTERN_C String_t* float2_ToString_mDD9456E5C3F28889E650CED5533DCD06219F3A28_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 * _thisAdjusted = reinterpret_cast<float2_tCB7B81181978EDE17722C533A55E345D9A413274 *>(__this + _offset); String_t* _returnValue; _returnValue = float2_ToString_mDD9456E5C3F28889E650CED5533DCD06219F3A28_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.float2::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* float2_ToString_mCCF46926AC2D48D3344DC9373B33F0E005071C78 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58); s_Il2CppMethodInitialized = true; } { // return string.Format("float2({0}f, {1}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); float* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_0, L_1, L_2, /*hidden argument*/NULL); float* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_4, L_5, L_6, /*hidden argument*/NULL); String_t* L_8; L_8 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58, L_3, L_7, /*hidden argument*/NULL); return L_8; } } IL2CPP_EXTERN_C String_t* float2_ToString_mCCF46926AC2D48D3344DC9373B33F0E005071C78_AdjustorThunk (RuntimeObject * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { int32_t _offset = 1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 * _thisAdjusted = reinterpret_cast<float2_tCB7B81181978EDE17722C533A55E345D9A413274 *>(__this + _offset); String_t* _returnValue; _returnValue = float2_ToString_mCCF46926AC2D48D3344DC9373B33F0E005071C78_inline(_thisAdjusted, ___format0, ___formatProvider1, method); return _returnValue; } // Unity.Mathematics.float2 Unity.Mathematics.float2::op_Implicit(UnityEngine.Vector2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 float2_op_Implicit_m0420F14AC6B5FF9CB49A86C2E49A96026A835FAC (Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 ___v0, const RuntimeMethod* method) { { // public static implicit operator float2(Vector2 v) { return new float2(v.x, v.y); } Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_0 = ___v0; float L_1 = L_0.get_x_0(); Vector2_tBB32F2736AEC229A7BFBCE18197EC0F6AC7EC2D9 L_2 = ___v0; float L_3 = L_2.get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_4; memset((&L_4), 0, sizeof(L_4)); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline((&L_4), L_1, L_3, /*hidden argument*/NULL); return L_4; } } #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 Unity.Mathematics.float3::.ctor(System.Single,System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method) { { // this.x = x; float L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; float L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; float L_2 = ___z2; __this->set_z_2(L_2); // } return; } } IL2CPP_EXTERN_C void float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_AdjustorThunk (RuntimeObject * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline(_thisAdjusted, ___x0, ___y1, ___z2, method); } // System.Void Unity.Mathematics.float3::.ctor(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void float3__ctor_m9E3A136F0CAD409A42B39B54E95C86ECE24FC35C (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float ___v0, const RuntimeMethod* method) { { // this.x = v; float L_0 = ___v0; __this->set_x_0(L_0); // this.y = v; float L_1 = ___v0; __this->set_y_1(L_1); // this.z = v; float L_2 = ___v0; __this->set_z_2(L_2); // } return; } } IL2CPP_EXTERN_C void float3__ctor_m9E3A136F0CAD409A42B39B54E95C86ECE24FC35C_AdjustorThunk (RuntimeObject * __this, float ___v0, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); float3__ctor_m9E3A136F0CAD409A42B39B54E95C86ECE24FC35C_inline(_thisAdjusted, ___v0, method); } // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Multiply(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m6E5382EBCA40ADBD10C11AB231C4A8629279CCF1 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator * (float3 lhs, float3 rhs) { return new float3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___lhs0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___rhs1; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12; memset((&L_12), 0, sizeof(L_12)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_12), ((float)il2cpp_codegen_multiply((float)L_1, (float)L_3)), ((float)il2cpp_codegen_multiply((float)L_5, (float)L_7)), ((float)il2cpp_codegen_multiply((float)L_9, (float)L_11)), /*hidden argument*/NULL); return L_12; } } // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Multiply(Unity.Mathematics.float3,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m0F61C5933324CAE6D497DED1EBB85E4DA759AB13 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float ___rhs1, const RuntimeMethod* method) { { // public static float3 operator * (float3 lhs, float rhs) { return new float3 (lhs.x * rhs, lhs.y * rhs, lhs.z * rhs); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float L_2 = ___rhs1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3 = ___lhs0; float L_4 = L_3.get_y_1(); float L_5 = ___rhs1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___lhs0; float L_7 = L_6.get_z_2(); float L_8 = ___rhs1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_9; memset((&L_9), 0, sizeof(L_9)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_9), ((float)il2cpp_codegen_multiply((float)L_1, (float)L_2)), ((float)il2cpp_codegen_multiply((float)L_4, (float)L_5)), ((float)il2cpp_codegen_multiply((float)L_7, (float)L_8)), /*hidden argument*/NULL); return L_9; } } // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Multiply(System.Single,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m4A0B40DB4725F815AD14147DA2D00F1A7B1E88BE (float ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator * (float lhs, float3 rhs) { return new float3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); } float L_0 = ___lhs0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1 = ___rhs1; float L_2 = L_1.get_x_0(); float L_3 = ___lhs0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___rhs1; float L_5 = L_4.get_y_1(); float L_6 = ___lhs0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7 = ___rhs1; float L_8 = L_7.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_9; memset((&L_9), 0, sizeof(L_9)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_9), ((float)il2cpp_codegen_multiply((float)L_0, (float)L_2)), ((float)il2cpp_codegen_multiply((float)L_3, (float)L_5)), ((float)il2cpp_codegen_multiply((float)L_6, (float)L_8)), /*hidden argument*/NULL); return L_9; } } // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Addition(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Addition_m7247CCD21BDA2187158DE59FD2C609D6BC966978 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator + (float3 lhs, float3 rhs) { return new float3 (lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___lhs0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___rhs1; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12; memset((&L_12), 0, sizeof(L_12)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_12), ((float)il2cpp_codegen_add((float)L_1, (float)L_3)), ((float)il2cpp_codegen_add((float)L_5, (float)L_7)), ((float)il2cpp_codegen_add((float)L_9, (float)L_11)), /*hidden argument*/NULL); return L_12; } } // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Subtraction(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Subtraction_m3093AF71655C11E35349271AB39F99183B75B7E2 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator - (float3 lhs, float3 rhs) { return new float3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___lhs0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___rhs1; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12; memset((&L_12), 0, sizeof(L_12)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_12), ((float)il2cpp_codegen_subtract((float)L_1, (float)L_3)), ((float)il2cpp_codegen_subtract((float)L_5, (float)L_7)), ((float)il2cpp_codegen_subtract((float)L_9, (float)L_11)), /*hidden argument*/NULL); return L_12; } } // Unity.Mathematics.float3 Unity.Mathematics.float3::get_yzx() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method) { { // get { return new float3(y, z, x); } float L_0 = __this->get_y_1(); float L_1 = __this->get_z_2(); float L_2 = __this->get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3; memset((&L_3), 0, sizeof(L_3)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_3), L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } IL2CPP_EXTERN_C float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D _returnValue; _returnValue = float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_inline(_thisAdjusted, method); return _returnValue; } // System.Boolean Unity.Mathematics.float3::Equals(Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float3_Equals_m21D80AD2B9F37B1210C6F36BE86F76AA527BF2CF (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs0, const RuntimeMethod* method) { { // public bool Equals(float3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } float L_0 = __this->get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1 = ___rhs0; float L_2 = L_1.get_x_0(); if ((!(((float)L_0) == ((float)L_2)))) { goto IL_002b; } } { float L_3 = __this->get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___rhs0; float L_5 = L_4.get_y_1(); if ((!(((float)L_3) == ((float)L_5)))) { goto IL_002b; } } { float L_6 = __this->get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7 = ___rhs0; float L_8 = L_7.get_z_2(); return (bool)((((float)L_6) == ((float)L_8))? 1 : 0); } IL_002b: { return (bool)0; } } IL2CPP_EXTERN_C bool float3_Equals_m21D80AD2B9F37B1210C6F36BE86F76AA527BF2CF_AdjustorThunk (RuntimeObject * __this, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs0, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); bool _returnValue; _returnValue = float3_Equals_m21D80AD2B9F37B1210C6F36BE86F76AA527BF2CF_inline(_thisAdjusted, ___rhs0, method); return _returnValue; } // System.Boolean Unity.Mathematics.float3::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float3_Equals_m3C3B40E46D39C1FC39D250269E33EFC955235B2B (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&float3_t9500D105F273B3D86BD354142E891C48FFF9F71D_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public override bool Equals(object o) { return Equals((float3)o); } RuntimeObject * L_0 = ___o0; bool L_1; L_1 = float3_Equals_m21D80AD2B9F37B1210C6F36BE86F76AA527BF2CF_inline((float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)__this, ((*(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)((float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)UnBox(L_0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C bool float3_Equals_m3C3B40E46D39C1FC39D250269E33EFC955235B2B_AdjustorThunk (RuntimeObject * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); bool _returnValue; _returnValue = float3_Equals_m3C3B40E46D39C1FC39D250269E33EFC955235B2B(_thisAdjusted, ___o0, method); return _returnValue; } // System.Int32 Unity.Mathematics.float3::GetHashCode() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t float3_GetHashCode_m127685CE1D48644B6DC250A3CA9B989A54BA1AF3 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = (*(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)__this); uint32_t L_1; L_1 = math_hash_mE7D1E0FE1B3FB42A30188A62D737426389918F84_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C int32_t float3_GetHashCode_m127685CE1D48644B6DC250A3CA9B989A54BA1AF3_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); int32_t _returnValue; _returnValue = float3_GetHashCode_m127685CE1D48644B6DC250A3CA9B989A54BA1AF3_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.float3::ToString() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* float3_ToString_mB8035CAC163C19E11A35ADFE448E5B362A56D8AF (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A); s_Il2CppMethodInitialized = true; } { // return string.Format("float3({0}f, {1}f, {2}f)", x, y, z); float L_0 = __this->get_x_0(); float L_1 = L_0; RuntimeObject * L_2 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_1); float L_3 = __this->get_y_1(); float L_4 = L_3; RuntimeObject * L_5 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_4); float L_6 = __this->get_z_2(); float L_7 = L_6; RuntimeObject * L_8 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_7); String_t* L_9; L_9 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A, L_2, L_5, L_8, /*hidden argument*/NULL); return L_9; } } IL2CPP_EXTERN_C String_t* float3_ToString_mB8035CAC163C19E11A35ADFE448E5B362A56D8AF_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); String_t* _returnValue; _returnValue = float3_ToString_mB8035CAC163C19E11A35ADFE448E5B362A56D8AF_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.float3::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* float3_ToString_mAA3FEBFB0473D5C7F22CB3B6B56E52BEE6054F5F (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A); s_Il2CppMethodInitialized = true; } { // return string.Format("float3({0}f, {1}f, {2}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); float* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_0, L_1, L_2, /*hidden argument*/NULL); float* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_4, L_5, L_6, /*hidden argument*/NULL); float* L_8 = __this->get_address_of_z_2(); String_t* L_9 = ___format0; RuntimeObject* L_10 = ___formatProvider1; String_t* L_11; L_11 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_8, L_9, L_10, /*hidden argument*/NULL); String_t* L_12; L_12 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A, L_3, L_7, L_11, /*hidden argument*/NULL); return L_12; } } IL2CPP_EXTERN_C String_t* float3_ToString_mAA3FEBFB0473D5C7F22CB3B6B56E52BEE6054F5F_AdjustorThunk (RuntimeObject * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { int32_t _offset = 1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * _thisAdjusted = reinterpret_cast<float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *>(__this + _offset); String_t* _returnValue; _returnValue = float3_ToString_mAA3FEBFB0473D5C7F22CB3B6B56E52BEE6054F5F_inline(_thisAdjusted, ___format0, ___formatProvider1, method); return _returnValue; } // UnityEngine.Vector3 Unity.Mathematics.float3::op_Implicit(Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E float3_op_Implicit_m10DFE908DCDD18D73FA11E4C9CDB23E16FA3ABE8 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___v0, const RuntimeMethod* method) { { // public static implicit operator Vector3(float3 v) { return new Vector3(v.x, v.y, v.z); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___v0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___v0; float L_3 = L_2.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___v0; float L_5 = L_4.get_z_2(); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_6; memset((&L_6), 0, sizeof(L_6)); Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline((&L_6), L_1, L_3, L_5, /*hidden argument*/NULL); return L_6; } } // Unity.Mathematics.float3 Unity.Mathematics.float3::op_Implicit(UnityEngine.Vector3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Implicit_mC2BC870EF4246C5C3A2FC27EE9ABEDAFF49DC1EF (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E ___v0, const RuntimeMethod* method) { { // public static implicit operator float3(Vector3 v) { return new float3(v.x, v.y, v.z); } Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_0 = ___v0; float L_1 = L_0.get_x_2(); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_2 = ___v0; float L_3 = L_2.get_y_3(); Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E L_4 = ___v0; float L_5 = L_4.get_z_4(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6; memset((&L_6), 0, sizeof(L_6)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_6), L_1, L_3, L_5, /*hidden argument*/NULL); return L_6; } } #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 Unity.Mathematics.float4::.ctor(System.Single,System.Single,System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void float4__ctor_mD7DD9759C791823116719CAE8EE693E9C173E241 (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, float ___x0, float ___y1, float ___z2, float ___w3, const RuntimeMethod* method) { { // this.x = x; float L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; float L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; float L_2 = ___z2; __this->set_z_2(L_2); // this.w = w; float L_3 = ___w3; __this->set_w_3(L_3); // } return; } } IL2CPP_EXTERN_C void float4__ctor_mD7DD9759C791823116719CAE8EE693E9C173E241_AdjustorThunk (RuntimeObject * __this, float ___x0, float ___y1, float ___z2, float ___w3, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); float4__ctor_mD7DD9759C791823116719CAE8EE693E9C173E241_inline(_thisAdjusted, ___x0, ___y1, ___z2, ___w3, method); } // Unity.Mathematics.float3 Unity.Mathematics.float4::get_xyz() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float4_get_xyz_m4737722995A5B3DC8DD7C8064525E79FC8327AAC (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method) { { // get { return new float3(x, y, z); } float L_0 = __this->get_x_0(); float L_1 = __this->get_y_1(); float L_2 = __this->get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3; memset((&L_3), 0, sizeof(L_3)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_3), L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } IL2CPP_EXTERN_C float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float4_get_xyz_m4737722995A5B3DC8DD7C8064525E79FC8327AAC_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D _returnValue; _returnValue = float4_get_xyz_m4737722995A5B3DC8DD7C8064525E79FC8327AAC_inline(_thisAdjusted, method); return _returnValue; } // System.Boolean Unity.Mathematics.float4::Equals(Unity.Mathematics.float4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float4_Equals_mC17658EE14E0595E33E170A1CF5325AD7240B508 (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(float4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } float L_0 = __this->get_x_0(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_1 = ___rhs0; float L_2 = L_1.get_x_0(); if ((!(((float)L_0) == ((float)L_2)))) { goto IL_0039; } } { float L_3 = __this->get_y_1(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_4 = ___rhs0; float L_5 = L_4.get_y_1(); if ((!(((float)L_3) == ((float)L_5)))) { goto IL_0039; } } { float L_6 = __this->get_z_2(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_7 = ___rhs0; float L_8 = L_7.get_z_2(); if ((!(((float)L_6) == ((float)L_8)))) { goto IL_0039; } } { float L_9 = __this->get_w_3(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_10 = ___rhs0; float L_11 = L_10.get_w_3(); return (bool)((((float)L_9) == ((float)L_11))? 1 : 0); } IL_0039: { return (bool)0; } } IL2CPP_EXTERN_C bool float4_Equals_mC17658EE14E0595E33E170A1CF5325AD7240B508_AdjustorThunk (RuntimeObject * __this, float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___rhs0, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); bool _returnValue; _returnValue = float4_Equals_mC17658EE14E0595E33E170A1CF5325AD7240B508_inline(_thisAdjusted, ___rhs0, method); return _returnValue; } // System.Boolean Unity.Mathematics.float4::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool float4_Equals_m6247D066192E1714DDC2CC001D0D20D10D60228B (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public override bool Equals(object o) { return Equals((float4)o); } RuntimeObject * L_0 = ___o0; bool L_1; L_1 = float4_Equals_mC17658EE14E0595E33E170A1CF5325AD7240B508_inline((float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *)__this, ((*(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *)((float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *)UnBox(L_0, float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C bool float4_Equals_m6247D066192E1714DDC2CC001D0D20D10D60228B_AdjustorThunk (RuntimeObject * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); bool _returnValue; _returnValue = float4_Equals_m6247D066192E1714DDC2CC001D0D20D10D60228B(_thisAdjusted, ___o0, method); return _returnValue; } // System.Int32 Unity.Mathematics.float4::GetHashCode() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t float4_GetHashCode_mDAE54F7570659BE4963BEA7F347A137B7EFC5230 (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_0 = (*(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *)__this); uint32_t L_1; L_1 = math_hash_mE2E294D89343D0C0D08ABE6E8D97BFDBD5AD60A5_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C int32_t float4_GetHashCode_mDAE54F7570659BE4963BEA7F347A137B7EFC5230_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); int32_t _returnValue; _returnValue = float4_GetHashCode_mDAE54F7570659BE4963BEA7F347A137B7EFC5230_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.float4::ToString() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* float4_ToString_mF8E4242AD739E6BC3CFDAF96C26236D385DF7850 (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033); s_Il2CppMethodInitialized = true; } { // return string.Format("float4({0}f, {1}f, {2}f, {3}f)", x, y, z, w); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; float L_2 = __this->get_x_0(); float L_3 = L_2; RuntimeObject * L_4 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_3); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_4); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_5 = L_1; float L_6 = __this->get_y_1(); float L_7 = L_6; RuntimeObject * L_8 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_7); NullCheck(L_5); ArrayElementTypeCheck (L_5, L_8); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_8); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_9 = L_5; float L_10 = __this->get_z_2(); float L_11 = L_10; RuntimeObject * L_12 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_11); NullCheck(L_9); ArrayElementTypeCheck (L_9, L_12); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_12); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_13 = L_9; float L_14 = __this->get_w_3(); float L_15 = L_14; RuntimeObject * L_16 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_15); NullCheck(L_13); ArrayElementTypeCheck (L_13, L_16); (L_13)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_16); String_t* L_17; L_17 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033, L_13, /*hidden argument*/NULL); return L_17; } } IL2CPP_EXTERN_C String_t* float4_ToString_mF8E4242AD739E6BC3CFDAF96C26236D385DF7850_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); String_t* _returnValue; _returnValue = float4_ToString_mF8E4242AD739E6BC3CFDAF96C26236D385DF7850_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.float4::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* float4_ToString_m643BEBFFE6AE7B5E0366C777BEE1178924D5374B (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033); s_Il2CppMethodInitialized = true; } { // return string.Format("float4({0}f, {1}f, {2}f, {3}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; float* L_2 = __this->get_address_of_x_0(); String_t* L_3 = ___format0; RuntimeObject* L_4 = ___formatProvider1; String_t* L_5; L_5 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_2, L_3, L_4, /*hidden argument*/NULL); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_5); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_5); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_6 = L_1; float* L_7 = __this->get_address_of_y_1(); String_t* L_8 = ___format0; RuntimeObject* L_9 = ___formatProvider1; String_t* L_10; L_10 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_7, L_8, L_9, /*hidden argument*/NULL); NullCheck(L_6); ArrayElementTypeCheck (L_6, L_10); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_10); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_11 = L_6; float* L_12 = __this->get_address_of_z_2(); String_t* L_13 = ___format0; RuntimeObject* L_14 = ___formatProvider1; String_t* L_15; L_15 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_12, L_13, L_14, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_15); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_15); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_16 = L_11; float* L_17 = __this->get_address_of_w_3(); String_t* L_18 = ___format0; RuntimeObject* L_19 = ___formatProvider1; String_t* L_20; L_20 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_17, L_18, L_19, /*hidden argument*/NULL); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_20); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_20); String_t* L_21; L_21 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033, L_16, /*hidden argument*/NULL); return L_21; } } IL2CPP_EXTERN_C String_t* float4_ToString_m643BEBFFE6AE7B5E0366C777BEE1178924D5374B_AdjustorThunk (RuntimeObject * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { int32_t _offset = 1; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * _thisAdjusted = reinterpret_cast<float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *>(__this + _offset); String_t* _returnValue; _returnValue = float4_ToString_m643BEBFFE6AE7B5E0366C777BEE1178924D5374B_inline(_thisAdjusted, ___format0, ___formatProvider1, method); return _returnValue; } #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 // Unity.Mathematics.float2 Unity.Mathematics.math::float2(System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_float2_mDA355E0A30FD4D9FCFA20C1816C3AAE674DFD9B9 (float ___x0, float ___y1, const RuntimeMethod* method) { { // public static float2 float2(float x, float y) { return new float2(x, y); } float L_0 = ___x0; float L_1 = ___y1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_2; memset((&L_2), 0, sizeof(L_2)); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline((&L_2), L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.float2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_hash_m02C3B1E016522A7C4B32A4FCD30DED6807391ED9 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___v0, const RuntimeMethod* method) { { // return csum(asuint(v) * uint2(0xFA3A3285u, 0xAD55999Du)) + 0xDCDD5341u; float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___v0; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1; L_1 = math_asuint_m351AD372B79DB7BEFB5AC7667CDF3409544E3863_inline(L_0, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; L_2 = math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline(((int32_t)-96849275), ((int32_t)-1386899043), /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_3; L_3 = uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D_inline(L_1, L_2, /*hidden argument*/NULL); uint32_t L_4; L_4 = math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1_inline(L_3, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)-589475007))); } } // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_hash_mE7D1E0FE1B3FB42A30188A62D737426389918F84 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___v0, const RuntimeMethod* method) { { // return csum(asuint(v) * uint3(0x9B13B92Du, 0x4ABF0813u, 0x86068063u)) + 0xD75513F9u; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___v0; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_1; L_1 = math_asuint_m7BB84B6113F67FF1E002B1E0414D8A4754070550_inline(L_0, /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2; L_2 = math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline(((int32_t)-1693206227), ((int32_t)1254033427), ((int32_t)-2046394269), /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_3; L_3 = uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A_inline(L_1, L_2, /*hidden argument*/NULL); uint32_t L_4; L_4 = math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751_inline(L_3, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)-682290183))); } } // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.float4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_hash_mE2E294D89343D0C0D08ABE6E8D97BFDBD5AD60A5 (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___v0, const RuntimeMethod* method) { { // return csum(asuint(v) * uint4(0xE69626FFu, 0xBD010EEBu, 0x9CEDE1D1u, 0x43BE0B51u)) + 0xAF836EE1u; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_0 = ___v0; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_1; L_1 = math_asuint_m6BECD59CBEEAB7DBA7EB79A50D54424B974B760D_inline(L_0, /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2; L_2 = math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline(((int32_t)-426367233), ((int32_t)-1124004117), ((int32_t)-1662131759), ((int32_t)1136528209), /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_3; L_3 = uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6_inline(L_1, L_2, /*hidden argument*/NULL); uint32_t L_4; L_4 = math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5_inline(L_3, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)-1350340895))); } } // System.Int32 Unity.Mathematics.math::asint(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t math_asint_mAB46275EA58D5FC95717224B4214F3C9987A8C86 (float ___x0, const RuntimeMethod* method) { IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 V_0; memset((&V_0), 0, sizeof(V_0)); { // u.intValue = 0; (&V_0)->set_intValue_0(0); // u.floatValue = x; float L_0 = ___x0; (&V_0)->set_floatValue_1(L_0); // return u.intValue; IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 L_1 = V_0; int32_t L_2 = L_1.get_intValue_0(); return L_2; } } // System.UInt32 Unity.Mathematics.math::asuint(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC (float ___x0, const RuntimeMethod* method) { { // public static uint asuint(float x) { return (uint)asint(x); } float L_0 = ___x0; int32_t L_1; L_1 = math_asint_mAB46275EA58D5FC95717224B4214F3C9987A8C86_inline(L_0, /*hidden argument*/NULL); return L_1; } } // Unity.Mathematics.uint2 Unity.Mathematics.math::asuint(Unity.Mathematics.float2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 math_asuint_m351AD372B79DB7BEFB5AC7667CDF3409544E3863 (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___x0, const RuntimeMethod* method) { { // public static uint2 asuint(float2 x) { return uint2(asuint(x.x), asuint(x.y)); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___x0; float L_1 = L_0.get_x_0(); uint32_t L_2; L_2 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_1, /*hidden argument*/NULL); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_3 = ___x0; float L_4 = L_3.get_y_1(); uint32_t L_5; L_5 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_4, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_6; L_6 = math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline(L_2, L_5, /*hidden argument*/NULL); return L_6; } } // Unity.Mathematics.uint3 Unity.Mathematics.math::asuint(Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A math_asuint_m7BB84B6113F67FF1E002B1E0414D8A4754070550 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, const RuntimeMethod* method) { { // public static uint3 asuint(float3 x) { return uint3(asuint(x.x), asuint(x.y), asuint(x.z)); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float L_1 = L_0.get_x_0(); uint32_t L_2; L_2 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_1, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3 = ___x0; float L_4 = L_3.get_y_1(); uint32_t L_5; L_5 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_4, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___x0; float L_7 = L_6.get_z_2(); uint32_t L_8; L_8 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_7, /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_9; L_9 = math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline(L_2, L_5, L_8, /*hidden argument*/NULL); return L_9; } } // Unity.Mathematics.uint4 Unity.Mathematics.math::asuint(Unity.Mathematics.float4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 math_asuint_m6BECD59CBEEAB7DBA7EB79A50D54424B974B760D (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___x0, const RuntimeMethod* method) { { // public static uint4 asuint(float4 x) { return uint4(asuint(x.x), asuint(x.y), asuint(x.z), asuint(x.w)); } float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_0 = ___x0; float L_1 = L_0.get_x_0(); uint32_t L_2; L_2 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_1, /*hidden argument*/NULL); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_3 = ___x0; float L_4 = L_3.get_y_1(); uint32_t L_5; L_5 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_4, /*hidden argument*/NULL); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_6 = ___x0; float L_7 = L_6.get_z_2(); uint32_t L_8; L_8 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_7, /*hidden argument*/NULL); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_9 = ___x0; float L_10 = L_9.get_w_3(); uint32_t L_11; L_11 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_10, /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_12; L_12 = math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline(L_2, L_5, L_8, L_11, /*hidden argument*/NULL); return L_12; } } // System.Single Unity.Mathematics.math::asfloat(System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_asfloat_mFC74F5F38E8967C1320B94E1AF95AB1D55D46181 (int32_t ___x0, const RuntimeMethod* method) { IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 V_0; memset((&V_0), 0, sizeof(V_0)); { // u.floatValue = 0; (&V_0)->set_floatValue_1((0.0f)); // u.intValue = x; int32_t L_0 = ___x0; (&V_0)->set_intValue_0(L_0); // return u.floatValue; IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 L_1 = V_0; float L_2 = L_1.get_floatValue_1(); return L_2; } } // System.Single Unity.Mathematics.math::asfloat(System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF (uint32_t ___x0, const RuntimeMethod* method) { { // public static float asfloat(uint x) { return asfloat((int)x); } uint32_t L_0 = ___x0; float L_1; L_1 = math_asfloat_mFC74F5F38E8967C1320B94E1AF95AB1D55D46181_inline(L_0, /*hidden argument*/NULL); return L_1; } } // Unity.Mathematics.float2 Unity.Mathematics.math::asfloat(Unity.Mathematics.uint2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_asfloat_m7A105E6392497188C3D5014278B85008BC9FDC07 (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___x0, const RuntimeMethod* method) { { // public static float2 asfloat(uint2 x) { return float2(asfloat(x.x), asfloat(x.y)); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); float L_2; L_2 = math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline(L_1, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_3 = ___x0; uint32_t L_4 = L_3.get_y_1(); float L_5; L_5 = math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline(L_4, /*hidden argument*/NULL); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_6; L_6 = math_float2_mDA355E0A30FD4D9FCFA20C1816C3AAE674DFD9B9_inline(L_2, L_5, /*hidden argument*/NULL); return L_6; } } // System.Int32 Unity.Mathematics.math::min(System.Int32,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t math_min_mD5F9F74A53F030155B9E68672EF5B4415FB0AB4A (int32_t ___x0, int32_t ___y1, const RuntimeMethod* method) { { // public static int min(int x, int y) { return x < y ? x : y; } int32_t L_0 = ___x0; int32_t L_1 = ___y1; if ((((int32_t)L_0) < ((int32_t)L_1))) { goto IL_0006; } } { int32_t L_2 = ___y1; return L_2; } IL_0006: { int32_t L_3 = ___x0; return L_3; } } // System.Single Unity.Mathematics.math::min(System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89 (float ___x0, float ___y1, const RuntimeMethod* method) { { // public static float min(float x, float y) { return float.IsNaN(y) || x < y ? x : y; } float L_0 = ___y1; bool L_1; L_1 = Single_IsNaN_m458FF076EF1944D4D888A585F7C6C49DA4730599(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000e; } } { float L_2 = ___x0; float L_3 = ___y1; if ((((float)L_2) < ((float)L_3))) { goto IL_000e; } } { float L_4 = ___y1; return L_4; } IL_000e: { float L_5 = ___x0; return L_5; } } // Unity.Mathematics.float3 Unity.Mathematics.math::min(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D math_min_m6BF29A95DEDC36F4E386F4C02122671FCC271BC8 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___y1, const RuntimeMethod* method) { { // public static float3 min(float3 x, float3 y) { return new float3(min(x.x, y.x), min(x.y, y.y), min(x.z, y.z)); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___y1; float L_3 = L_2.get_x_0(); float L_4; L_4 = math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89_inline(L_1, L_3, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_5 = ___x0; float L_6 = L_5.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7 = ___y1; float L_8 = L_7.get_y_1(); float L_9; L_9 = math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89_inline(L_6, L_8, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___x0; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12 = ___y1; float L_13 = L_12.get_z_2(); float L_14; L_14 = math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89_inline(L_11, L_13, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_15; memset((&L_15), 0, sizeof(L_15)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_15), L_4, L_9, L_14, /*hidden argument*/NULL); return L_15; } } // System.Int32 Unity.Mathematics.math::max(System.Int32,System.Int32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t math_max_mC3AC72A0590480D0AEFE3E45D34C9DD72057FEDF (int32_t ___x0, int32_t ___y1, const RuntimeMethod* method) { { // public static int max(int x, int y) { return x > y ? x : y; } int32_t L_0 = ___x0; int32_t L_1 = ___y1; if ((((int32_t)L_0) > ((int32_t)L_1))) { goto IL_0006; } } { int32_t L_2 = ___y1; return L_2; } IL_0006: { int32_t L_3 = ___x0; return L_3; } } // System.Single Unity.Mathematics.math::max(System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_max_mD8541933650D81292540BAFF46DE531FA1B333FC (float ___x0, float ___y1, const RuntimeMethod* method) { { // public static float max(float x, float y) { return float.IsNaN(y) || x > y ? x : y; } float L_0 = ___y1; bool L_1; L_1 = Single_IsNaN_m458FF076EF1944D4D888A585F7C6C49DA4730599(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000e; } } { float L_2 = ___x0; float L_3 = ___y1; if ((((float)L_2) > ((float)L_3))) { goto IL_000e; } } { float L_4 = ___y1; return L_4; } IL_000e: { float L_5 = ___x0; return L_5; } } // Unity.Mathematics.float3 Unity.Mathematics.math::max(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D math_max_m7E3D48AE84E0E23DD089176B4C0CD6886303ABCF (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___y1, const RuntimeMethod* method) { { // public static float3 max(float3 x, float3 y) { return new float3(max(x.x, y.x), max(x.y, y.y), max(x.z, y.z)); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___y1; float L_3 = L_2.get_x_0(); float L_4; L_4 = math_max_mD8541933650D81292540BAFF46DE531FA1B333FC_inline(L_1, L_3, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_5 = ___x0; float L_6 = L_5.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7 = ___y1; float L_8 = L_7.get_y_1(); float L_9; L_9 = math_max_mD8541933650D81292540BAFF46DE531FA1B333FC_inline(L_6, L_8, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___x0; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12 = ___y1; float L_13 = L_12.get_z_2(); float L_14; L_14 = math_max_mD8541933650D81292540BAFF46DE531FA1B333FC_inline(L_11, L_13, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_15; memset((&L_15), 0, sizeof(L_15)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_15), L_4, L_9, L_14, /*hidden argument*/NULL); return L_15; } } // System.Single Unity.Mathematics.math::clamp(System.Single,System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_clamp_m3FDC8AAE05842733E193852C929DAAC6F5E8C931 (float ___x0, float ___a1, float ___b2, const RuntimeMethod* method) { { // public static float clamp(float x, float a, float b) { return max(a, min(b, x)); } float L_0 = ___a1; float L_1 = ___b2; float L_2 = ___x0; float L_3; L_3 = math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89_inline(L_1, L_2, /*hidden argument*/NULL); float L_4; L_4 = math_max_mD8541933650D81292540BAFF46DE531FA1B333FC_inline(L_0, L_3, /*hidden argument*/NULL); return L_4; } } // System.Single Unity.Mathematics.math::abs(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_abs_m684426E813FD887C103114B2E15FCBAFFF32D3B0 (float ___x0, const RuntimeMethod* method) { { // public static float abs(float x) { return asfloat(asuint(x) & 0x7FFFFFFF); } float L_0 = ___x0; uint32_t L_1; L_1 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_0, /*hidden argument*/NULL); float L_2; L_2 = math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline(((int32_t)((int32_t)L_1&(int32_t)((int32_t)2147483647LL))), /*hidden argument*/NULL); return L_2; } } // Unity.Mathematics.float2 Unity.Mathematics.math::abs(Unity.Mathematics.float2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_abs_m56870BC75A3C437A67AFBFBA442C519A5295C52E (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___x0, const RuntimeMethod* method) { { // public static float2 abs(float2 x) { return asfloat(asuint(x) & 0x7FFFFFFF); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___x0; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1; L_1 = math_asuint_m351AD372B79DB7BEFB5AC7667CDF3409544E3863_inline(L_0, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; L_2 = uint2_op_BitwiseAnd_mCF4B68B8031E03CF2287FC12BBBB17DF8614EDEE_inline(L_1, ((int32_t)2147483647LL), /*hidden argument*/NULL); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_3; L_3 = math_asfloat_m7A105E6392497188C3D5014278B85008BC9FDC07_inline(L_2, /*hidden argument*/NULL); return L_3; } } // System.Single Unity.Mathematics.math::dot(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_dot_mF7AC1B7E5E29630523124BDBFA34A2672CB852A9 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___y1, const RuntimeMethod* method) { { // public static float dot(float3 x, float3 y) { return x.x * y.x + x.y * y.y + x.z * y.z; } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___y1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___x0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___y1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___x0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___y1; float L_11 = L_10.get_z_2(); return ((float)il2cpp_codegen_add((float)((float)il2cpp_codegen_add((float)((float)il2cpp_codegen_multiply((float)L_1, (float)L_3)), (float)((float)il2cpp_codegen_multiply((float)L_5, (float)L_7)))), (float)((float)il2cpp_codegen_multiply((float)L_9, (float)L_11)))); } } // System.Single Unity.Mathematics.math::tan(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_tan_mE8368089E0E075927E24667054F6647E82BF78F7 (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float tan(float x) { return (float)System.Math.Tan(x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = tan(((double)((double)L_0))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::tanh(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_tanh_m10063AE24957B698590CF0245A92711D70DBC51C (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float tanh(float x) { return (float)System.Math.Tanh(x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = tanh(((double)((double)L_0))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::atan(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_atan_m2FF111E187E3D8070E0CE1675840B73851CDF676 (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float atan(float x) { return (float)System.Math.Atan(x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = atan(((double)((double)L_0))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::cos(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_cos_m210EFB3DFB9561CDEEF523635CF60E1406678424 (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float cos(float x) { return (float)System.Math.Cos(x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = cos(((double)((double)L_0))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::acos(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_acos_mDF4948B8CF18EF8052C38D7914802E7869B79B6C (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float acos(float x) { return (float)System.Math.Acos((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = acos(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::sin(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_sin_mFE9768BE04BEBBD19B08FB6694319C9FECCC95FE (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float sin(float x) { return (float)System.Math.Sin((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = sin(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::asin(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_asin_mE18222163641CA18E4CA38E5FCA1ECBD18A67E2C (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float asin(float x) { return (float)System.Math.Asin((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = asin(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::floor(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_floor_m292DE338C9AC58EEEF598B246CB3406533709F3B (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float floor(float x) { return (float)System.Math.Floor((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = floor(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::ceil(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_ceil_m09F7522539A79883D220617019957CCF0CB4DA8B (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float ceil(float x) { return (float)System.Math.Ceiling((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = ceil(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::round(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_round_mBE2C0372A91ADC7AA8450F5D439D1B73E663A90E (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float round(float x) { return (float)System.Math.Round((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = bankers_round(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::pow(System.Single,System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_pow_m792865DB1E3BCC792726FFB800ABDE9FF109D3B4 (float ___x0, float ___y1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float pow(float x, float y) { return (float)System.Math.Pow((float)x, (float)y); } float L_0 = ___x0; float L_1 = ___y1; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_2; L_2 = Math_Pow_mC2C8700DAAD1316AA457A1D271F78CDF0D61AC2F(((double)((double)((float)((float)L_0)))), ((double)((double)((float)((float)L_1)))), /*hidden argument*/NULL); return ((float)((float)L_2)); } } // System.Single Unity.Mathematics.math::exp(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_exp_m73F09480463BE26326F55F0D181CCE8F7EF97668 (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float exp(float x) { return (float)System.Math.Exp((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = exp(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::log(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_log_m32923945396EF294F36A8CA9848ED0771A77F50F (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float log(float x) { return (float)System.Math.Log((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = log(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::sqrt(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_sqrt_mCFFE475634B2765D4E1A8DE9A9B331742E0637CF (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float sqrt(float x) { return (float)System.Math.Sqrt((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = sqrt(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } // System.Single Unity.Mathematics.math::rsqrt(System.Single) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_rsqrt_m4BCAD96F434850A62C649607F810ED996C19D896 (float ___x0, const RuntimeMethod* method) { { // public static float rsqrt(float x) { return 1.0f / sqrt(x); } float L_0 = ___x0; float L_1; L_1 = math_sqrt_mCFFE475634B2765D4E1A8DE9A9B331742E0637CF_inline(L_0, /*hidden argument*/NULL); return ((float)((float)(1.0f)/(float)L_1)); } } // Unity.Mathematics.float3 Unity.Mathematics.math::normalize(Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D math_normalize_m06189F2D06A4C6DEB81C6623B802A878E3356975 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, const RuntimeMethod* method) { { // public static float3 normalize(float3 x) { return rsqrt(dot(x, x)) * x; } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1 = ___x0; float L_2; L_2 = math_dot_mF7AC1B7E5E29630523124BDBFA34A2672CB852A9_inline(L_0, L_1, /*hidden argument*/NULL); float L_3; L_3 = math_rsqrt_m4BCAD96F434850A62C649607F810ED996C19D896_inline(L_2, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___x0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_5; L_5 = float3_op_Multiply_m4A0B40DB4725F815AD14147DA2D00F1A7B1E88BE_inline(L_3, L_4, /*hidden argument*/NULL); return L_5; } } // System.Single Unity.Mathematics.math::length(Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float math_length_mECD912F8B5F13E8FDFEFC19DDC928AC69C9669D4 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, const RuntimeMethod* method) { { // public static float length(float3 x) { return sqrt(dot(x, x)); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1 = ___x0; float L_2; L_2 = math_dot_mF7AC1B7E5E29630523124BDBFA34A2672CB852A9_inline(L_0, L_1, /*hidden argument*/NULL); float L_3; L_3 = math_sqrt_mCFFE475634B2765D4E1A8DE9A9B331742E0637CF_inline(L_2, /*hidden argument*/NULL); return L_3; } } // Unity.Mathematics.float3 Unity.Mathematics.math::cross(Unity.Mathematics.float3,Unity.Mathematics.float3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D math_cross_mB8F4E8BD47C40A250C155CA18704F0ECDE9F7019 (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___y1, const RuntimeMethod* method) { float3_t9500D105F273B3D86BD354142E891C48FFF9F71D V_0; memset((&V_0), 0, sizeof(V_0)); { // public static float3 cross(float3 x, float3 y) { return (x * y.yzx - x.yzx * y).yzx; } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1; L_1 = float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_inline((float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)(&___y1), /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2; L_2 = float3_op_Multiply_m6E5382EBCA40ADBD10C11AB231C4A8629279CCF1_inline(L_0, L_1, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3; L_3 = float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_inline((float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)(&___x0), /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___y1; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_5; L_5 = float3_op_Multiply_m6E5382EBCA40ADBD10C11AB231C4A8629279CCF1_inline(L_3, L_4, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6; L_6 = float3_op_Subtraction_m3093AF71655C11E35349271AB39F99183B75B7E2_inline(L_2, L_5, /*hidden argument*/NULL); V_0 = L_6; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7; L_7 = float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_inline((float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)(&V_0), /*hidden argument*/NULL); return L_7; } } // System.UInt32 Unity.Mathematics.math::select(System.UInt32,System.UInt32,System.Boolean) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_select_mEE7EFE23C97C83C60CE9CBE07C0F2FEB177D026A (uint32_t ___a0, uint32_t ___b1, bool ___c2, const RuntimeMethod* method) { { // public static uint select(uint a, uint b, bool c) { return c ? b : a; } bool L_0 = ___c2; if (L_0) { goto IL_0005; } } { uint32_t L_1 = ___a0; return L_1; } IL_0005: { uint32_t L_2 = ___b1; return L_2; } } // System.UInt32 Unity.Mathematics.math::csum(Unity.Mathematics.uint2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1 (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___x0, const RuntimeMethod* method) { { // public static uint csum(uint2 x) { return x.x + x.y; } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2 = ___x0; uint32_t L_3 = L_2.get_y_1(); return ((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_3)); } } // System.UInt32 Unity.Mathematics.math::csum(Unity.Mathematics.uint3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751 (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___x0, const RuntimeMethod* method) { { // public static uint csum(uint3 x) { return x.x + x.y + x.z; } uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2 = ___x0; uint32_t L_3 = L_2.get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_4 = ___x0; uint32_t L_5 = L_4.get_z_2(); return ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_3)), (int32_t)L_5)); } } // System.UInt32 Unity.Mathematics.math::csum(Unity.Mathematics.uint4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___x0, const RuntimeMethod* method) { { // public static uint csum(uint4 x) { return x.x + x.y + x.z + x.w; } uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2 = ___x0; uint32_t L_3 = L_2.get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4 = ___x0; uint32_t L_5 = L_4.get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_6 = ___x0; uint32_t L_7 = L_6.get_w_3(); return ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_3)), (int32_t)L_5)), (int32_t)L_7)); } } // Unity.Mathematics.uint2 Unity.Mathematics.math::uint2(System.UInt32,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2 (uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method) { { // public static uint2 uint2(uint x, uint y) { return new uint2(x, y); } uint32_t L_0 = ___x0; uint32_t L_1 = ___y1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; memset((&L_2), 0, sizeof(L_2)); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline((&L_2), L_0, L_1, /*hidden argument*/NULL); return L_2; } } // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.uint2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_hash_mA46BEA1D3896F53E98145896C8F7136062532F90 (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___v0, const RuntimeMethod* method) { { // return csum(v * uint2(0x4473BBB1u, 0xCBA11D5Fu)) + 0x685835CFu; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___v0; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1; L_1 = math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline(((int32_t)1148435377), ((int32_t)-878633633), /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; L_2 = uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D_inline(L_0, L_1, /*hidden argument*/NULL); uint32_t L_3; L_3 = math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1_inline(L_2, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)1750611407))); } } // Unity.Mathematics.uint3 Unity.Mathematics.math::uint3(System.UInt32,System.UInt32,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729 (uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method) { { // public static uint3 uint3(uint x, uint y, uint z) { return new uint3(x, y, z); } uint32_t L_0 = ___x0; uint32_t L_1 = ___y1; uint32_t L_2 = ___z2; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_3; memset((&L_3), 0, sizeof(L_3)); uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline((&L_3), L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.uint3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_hash_m93543A4E24AB7FC17AA2810F0AEDF9ADABE333E6 (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___v0, const RuntimeMethod* method) { { // return csum(v * uint3(0xCD266C89u, 0xF1852A33u, 0x77E35E77u)) + 0x863E3729u; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = ___v0; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_1; L_1 = math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline(((int32_t)-853119863), ((int32_t)-242931149), ((int32_t)2011389559), /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2; L_2 = uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A_inline(L_0, L_1, /*hidden argument*/NULL); uint32_t L_3; L_3 = math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751_inline(L_2, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)-2042742999))); } } // Unity.Mathematics.uint4 Unity.Mathematics.math::uint4(System.UInt32,System.UInt32,System.UInt32,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777 (uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method) { { // public static uint4 uint4(uint x, uint y, uint z, uint w) { return new uint4(x, y, z, w); } uint32_t L_0 = ___x0; uint32_t L_1 = ___y1; uint32_t L_2 = ___z2; uint32_t L_3 = ___w3; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4; memset((&L_4), 0, sizeof(L_4)); uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline((&L_4), L_0, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } } // System.UInt32 Unity.Mathematics.math::hash(Unity.Mathematics.uint4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint32_t math_hash_m5E517FEDA0EC60364F96435FEFECAC5E5B7A1811 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___v0, const RuntimeMethod* method) { { // return csum(v * uint4(0xB492BF15u, 0xD37220E3u, 0x7AA2C2BDu, 0xE16BC89Du)) + 0x7AA07CD3u; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = ___v0; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_1; L_1 = math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline(((int32_t)-1265451243), ((int32_t)-747495197), ((int32_t)2057487037), ((int32_t)-513029987), /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2; L_2 = uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6_inline(L_0, L_1, /*hidden argument*/NULL); uint32_t L_3; L_3 = math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5_inline(L_2, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)2057338067))); } } #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 Unity.Mathematics.uint2::.ctor(System.UInt32,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727 (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method) { { // this.x = x; uint32_t L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; uint32_t L_1 = ___y1; __this->set_y_1(L_1); // } return; } } IL2CPP_EXTERN_C void uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_AdjustorThunk (RuntimeObject * __this, uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method) { int32_t _offset = 1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 * _thisAdjusted = reinterpret_cast<uint2_t31B88562B6681D249453803230869FBE9ED565E7 *>(__this + _offset); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline(_thisAdjusted, ___x0, ___y1, method); } // Unity.Mathematics.uint2 Unity.Mathematics.uint2::op_Multiply(Unity.Mathematics.uint2,Unity.Mathematics.uint2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___lhs0, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs1, const RuntimeMethod* method) { { // public static uint2 operator * (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x * rhs.x, lhs.y * rhs.y); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2 = ___rhs1; uint32_t L_3 = L_2.get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_4 = ___lhs0; uint32_t L_5 = L_4.get_y_1(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_6 = ___rhs1; uint32_t L_7 = L_6.get_y_1(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_8; memset((&L_8), 0, sizeof(L_8)); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline((&L_8), ((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)L_3)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_5, (int32_t)L_7)), /*hidden argument*/NULL); return L_8; } } // Unity.Mathematics.uint2 Unity.Mathematics.uint2::op_BitwiseAnd(Unity.Mathematics.uint2,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 uint2_op_BitwiseAnd_mCF4B68B8031E03CF2287FC12BBBB17DF8614EDEE (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___lhs0, uint32_t ___rhs1, const RuntimeMethod* method) { { // public static uint2 operator & (uint2 lhs, uint rhs) { return new uint2 (lhs.x & rhs, lhs.y & rhs); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint32_t L_2 = ___rhs1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_3 = ___lhs0; uint32_t L_4 = L_3.get_y_1(); uint32_t L_5 = ___rhs1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_6; memset((&L_6), 0, sizeof(L_6)); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline((&L_6), ((int32_t)((int32_t)L_1&(int32_t)L_2)), ((int32_t)((int32_t)L_4&(int32_t)L_5)), /*hidden argument*/NULL); return L_6; } } // System.Boolean Unity.Mathematics.uint2::Equals(Unity.Mathematics.uint2) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint2_Equals_m4D6B7E58271563553964C88B0C6C11B11E9DDEFF (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(uint2 rhs) { return x == rhs.x && y == rhs.y; } uint32_t L_0 = __this->get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1 = ___rhs0; uint32_t L_2 = L_1.get_x_0(); if ((!(((uint32_t)L_0) == ((uint32_t)L_2)))) { goto IL_001d; } } { uint32_t L_3 = __this->get_y_1(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_4 = ___rhs0; uint32_t L_5 = L_4.get_y_1(); return (bool)((((int32_t)L_3) == ((int32_t)L_5))? 1 : 0); } IL_001d: { return (bool)0; } } IL2CPP_EXTERN_C bool uint2_Equals_m4D6B7E58271563553964C88B0C6C11B11E9DDEFF_AdjustorThunk (RuntimeObject * __this, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs0, const RuntimeMethod* method) { int32_t _offset = 1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 * _thisAdjusted = reinterpret_cast<uint2_t31B88562B6681D249453803230869FBE9ED565E7 *>(__this + _offset); bool _returnValue; _returnValue = uint2_Equals_m4D6B7E58271563553964C88B0C6C11B11E9DDEFF_inline(_thisAdjusted, ___rhs0, method); return _returnValue; } // System.Boolean Unity.Mathematics.uint2::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint2_Equals_mDC5AF9975359EB05CA526D9D132038CC07BA610C (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&uint2_t31B88562B6681D249453803230869FBE9ED565E7_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public override bool Equals(object o) { return Equals((uint2)o); } RuntimeObject * L_0 = ___o0; bool L_1; L_1 = uint2_Equals_m4D6B7E58271563553964C88B0C6C11B11E9DDEFF_inline((uint2_t31B88562B6681D249453803230869FBE9ED565E7 *)__this, ((*(uint2_t31B88562B6681D249453803230869FBE9ED565E7 *)((uint2_t31B88562B6681D249453803230869FBE9ED565E7 *)UnBox(L_0, uint2_t31B88562B6681D249453803230869FBE9ED565E7_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C bool uint2_Equals_mDC5AF9975359EB05CA526D9D132038CC07BA610C_AdjustorThunk (RuntimeObject * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { int32_t _offset = 1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 * _thisAdjusted = reinterpret_cast<uint2_t31B88562B6681D249453803230869FBE9ED565E7 *>(__this + _offset); bool _returnValue; _returnValue = uint2_Equals_mDC5AF9975359EB05CA526D9D132038CC07BA610C(_thisAdjusted, ___o0, method); return _returnValue; } // System.Int32 Unity.Mathematics.uint2::GetHashCode() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t uint2_GetHashCode_m1AA42656371544BEFEF58990F0F5D3375771BDED (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = (*(uint2_t31B88562B6681D249453803230869FBE9ED565E7 *)__this); uint32_t L_1; L_1 = math_hash_mA46BEA1D3896F53E98145896C8F7136062532F90_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C int32_t uint2_GetHashCode_m1AA42656371544BEFEF58990F0F5D3375771BDED_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 * _thisAdjusted = reinterpret_cast<uint2_t31B88562B6681D249453803230869FBE9ED565E7 *>(__this + _offset); int32_t _returnValue; _returnValue = uint2_GetHashCode_m1AA42656371544BEFEF58990F0F5D3375771BDED_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.uint2::ToString() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* uint2_ToString_m11C8B65BDF3EE9F3E076886108F29C7085311CD8 (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945); s_Il2CppMethodInitialized = true; } { // return string.Format("uint2({0}, {1})", x, y); uint32_t L_0 = __this->get_x_0(); uint32_t L_1 = L_0; RuntimeObject * L_2 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_1); uint32_t L_3 = __this->get_y_1(); uint32_t L_4 = L_3; RuntimeObject * L_5 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_4); String_t* L_6; L_6 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945, L_2, L_5, /*hidden argument*/NULL); return L_6; } } IL2CPP_EXTERN_C String_t* uint2_ToString_m11C8B65BDF3EE9F3E076886108F29C7085311CD8_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 * _thisAdjusted = reinterpret_cast<uint2_t31B88562B6681D249453803230869FBE9ED565E7 *>(__this + _offset); String_t* _returnValue; _returnValue = uint2_ToString_m11C8B65BDF3EE9F3E076886108F29C7085311CD8_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.uint2::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* uint2_ToString_m82A6C25A6E380499B47B6D45037EC327449303A1 (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945); s_Il2CppMethodInitialized = true; } { // return string.Format("uint2({0}, {1})", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); uint32_t* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_0, L_1, L_2, /*hidden argument*/NULL); uint32_t* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_4, L_5, L_6, /*hidden argument*/NULL); String_t* L_8; L_8 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945, L_3, L_7, /*hidden argument*/NULL); return L_8; } } IL2CPP_EXTERN_C String_t* uint2_ToString_m82A6C25A6E380499B47B6D45037EC327449303A1_AdjustorThunk (RuntimeObject * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { int32_t _offset = 1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 * _thisAdjusted = reinterpret_cast<uint2_t31B88562B6681D249453803230869FBE9ED565E7 *>(__this + _offset); String_t* _returnValue; _returnValue = uint2_ToString_m82A6C25A6E380499B47B6D45037EC327449303A1_inline(_thisAdjusted, ___format0, ___formatProvider1, method); return _returnValue; } #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 Unity.Mathematics.uint3::.ctor(System.UInt32,System.UInt32,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method) { { // this.x = x; uint32_t L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; uint32_t L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; uint32_t L_2 = ___z2; __this->set_z_2(L_2); // } return; } } IL2CPP_EXTERN_C void uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_AdjustorThunk (RuntimeObject * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method) { int32_t _offset = 1; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * _thisAdjusted = reinterpret_cast<uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *>(__this + _offset); uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline(_thisAdjusted, ___x0, ___y1, ___z2, method); } // Unity.Mathematics.uint3 Unity.Mathematics.uint3::op_Multiply(Unity.Mathematics.uint3,Unity.Mathematics.uint3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___lhs0, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs1, const RuntimeMethod* method) { { // public static uint3 operator * (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2 = ___rhs1; uint32_t L_3 = L_2.get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_4 = ___lhs0; uint32_t L_5 = L_4.get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_6 = ___rhs1; uint32_t L_7 = L_6.get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_8 = ___lhs0; uint32_t L_9 = L_8.get_z_2(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_10 = ___rhs1; uint32_t L_11 = L_10.get_z_2(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_12; memset((&L_12), 0, sizeof(L_12)); uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline((&L_12), ((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)L_3)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_5, (int32_t)L_7)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_9, (int32_t)L_11)), /*hidden argument*/NULL); return L_12; } } // System.Boolean Unity.Mathematics.uint3::Equals(Unity.Mathematics.uint3) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint3_Equals_m13DA44E1022044FEBBA2066ECD1A8AC1CB53DF91 (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs0, const RuntimeMethod* method) { { // public bool Equals(uint3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } uint32_t L_0 = __this->get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_1 = ___rhs0; uint32_t L_2 = L_1.get_x_0(); if ((!(((uint32_t)L_0) == ((uint32_t)L_2)))) { goto IL_002b; } } { uint32_t L_3 = __this->get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_4 = ___rhs0; uint32_t L_5 = L_4.get_y_1(); if ((!(((uint32_t)L_3) == ((uint32_t)L_5)))) { goto IL_002b; } } { uint32_t L_6 = __this->get_z_2(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_7 = ___rhs0; uint32_t L_8 = L_7.get_z_2(); return (bool)((((int32_t)L_6) == ((int32_t)L_8))? 1 : 0); } IL_002b: { return (bool)0; } } IL2CPP_EXTERN_C bool uint3_Equals_m13DA44E1022044FEBBA2066ECD1A8AC1CB53DF91_AdjustorThunk (RuntimeObject * __this, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs0, const RuntimeMethod* method) { int32_t _offset = 1; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * _thisAdjusted = reinterpret_cast<uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *>(__this + _offset); bool _returnValue; _returnValue = uint3_Equals_m13DA44E1022044FEBBA2066ECD1A8AC1CB53DF91_inline(_thisAdjusted, ___rhs0, method); return _returnValue; } // System.Boolean Unity.Mathematics.uint3::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint3_Equals_mAAD3238F59F9CA833513E94E33A329834CB205FE (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public override bool Equals(object o) { return Equals((uint3)o); } RuntimeObject * L_0 = ___o0; bool L_1; L_1 = uint3_Equals_m13DA44E1022044FEBBA2066ECD1A8AC1CB53DF91_inline((uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *)__this, ((*(uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *)((uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *)UnBox(L_0, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C bool uint3_Equals_mAAD3238F59F9CA833513E94E33A329834CB205FE_AdjustorThunk (RuntimeObject * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { int32_t _offset = 1; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * _thisAdjusted = reinterpret_cast<uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *>(__this + _offset); bool _returnValue; _returnValue = uint3_Equals_mAAD3238F59F9CA833513E94E33A329834CB205FE(_thisAdjusted, ___o0, method); return _returnValue; } // System.Int32 Unity.Mathematics.uint3::GetHashCode() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t uint3_GetHashCode_mD983DD667EC5C064E237BFA773C185AB36599B76 (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = (*(uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *)__this); uint32_t L_1; L_1 = math_hash_m93543A4E24AB7FC17AA2810F0AEDF9ADABE333E6_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C int32_t uint3_GetHashCode_mD983DD667EC5C064E237BFA773C185AB36599B76_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * _thisAdjusted = reinterpret_cast<uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *>(__this + _offset); int32_t _returnValue; _returnValue = uint3_GetHashCode_mD983DD667EC5C064E237BFA773C185AB36599B76_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.uint3::ToString() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* uint3_ToString_mEADE36DE83569B87E7DF9B37EB4A04357B83B277 (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2); s_Il2CppMethodInitialized = true; } { // return string.Format("uint3({0}, {1}, {2})", x, y, z); uint32_t L_0 = __this->get_x_0(); uint32_t L_1 = L_0; RuntimeObject * L_2 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_1); uint32_t L_3 = __this->get_y_1(); uint32_t L_4 = L_3; RuntimeObject * L_5 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_4); uint32_t L_6 = __this->get_z_2(); uint32_t L_7 = L_6; RuntimeObject * L_8 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_7); String_t* L_9; L_9 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2, L_2, L_5, L_8, /*hidden argument*/NULL); return L_9; } } IL2CPP_EXTERN_C String_t* uint3_ToString_mEADE36DE83569B87E7DF9B37EB4A04357B83B277_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * _thisAdjusted = reinterpret_cast<uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *>(__this + _offset); String_t* _returnValue; _returnValue = uint3_ToString_mEADE36DE83569B87E7DF9B37EB4A04357B83B277_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.uint3::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* uint3_ToString_mF1C800E07DAF3C5478742C64CD0C4C76C7E63167 (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2); s_Il2CppMethodInitialized = true; } { // return string.Format("uint3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); uint32_t* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_0, L_1, L_2, /*hidden argument*/NULL); uint32_t* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_4, L_5, L_6, /*hidden argument*/NULL); uint32_t* L_8 = __this->get_address_of_z_2(); String_t* L_9 = ___format0; RuntimeObject* L_10 = ___formatProvider1; String_t* L_11; L_11 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_8, L_9, L_10, /*hidden argument*/NULL); String_t* L_12; L_12 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2, L_3, L_7, L_11, /*hidden argument*/NULL); return L_12; } } IL2CPP_EXTERN_C String_t* uint3_ToString_mF1C800E07DAF3C5478742C64CD0C4C76C7E63167_AdjustorThunk (RuntimeObject * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { int32_t _offset = 1; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * _thisAdjusted = reinterpret_cast<uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *>(__this + _offset); String_t* _returnValue; _returnValue = uint3_ToString_mF1C800E07DAF3C5478742C64CD0C4C76C7E63167_inline(_thisAdjusted, ___format0, ___formatProvider1, method); return _returnValue; } #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 Unity.Mathematics.uint4::.ctor(System.UInt32,System.UInt32,System.UInt32,System.UInt32) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method) { { // this.x = x; uint32_t L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; uint32_t L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; uint32_t L_2 = ___z2; __this->set_z_2(L_2); // this.w = w; uint32_t L_3 = ___w3; __this->set_w_3(L_3); // } return; } } IL2CPP_EXTERN_C void uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_AdjustorThunk (RuntimeObject * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method) { int32_t _offset = 1; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * _thisAdjusted = reinterpret_cast<uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *>(__this + _offset); uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline(_thisAdjusted, ___x0, ___y1, ___z2, ___w3, method); } // Unity.Mathematics.uint4 Unity.Mathematics.uint4::op_Multiply(Unity.Mathematics.uint4,Unity.Mathematics.uint4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___lhs0, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs1, const RuntimeMethod* method) { { // public static uint4 operator * (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2 = ___rhs1; uint32_t L_3 = L_2.get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4 = ___lhs0; uint32_t L_5 = L_4.get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_6 = ___rhs1; uint32_t L_7 = L_6.get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_8 = ___lhs0; uint32_t L_9 = L_8.get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_10 = ___rhs1; uint32_t L_11 = L_10.get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_12 = ___lhs0; uint32_t L_13 = L_12.get_w_3(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_14 = ___rhs1; uint32_t L_15 = L_14.get_w_3(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_16; memset((&L_16), 0, sizeof(L_16)); uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline((&L_16), ((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)L_3)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_5, (int32_t)L_7)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_9, (int32_t)L_11)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_13, (int32_t)L_15)), /*hidden argument*/NULL); return L_16; } } // System.Boolean Unity.Mathematics.uint4::Equals(Unity.Mathematics.uint4) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint4_Equals_mA01BD6C642C7AA15938773343109B65A7017A8E5 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(uint4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } uint32_t L_0 = __this->get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_1 = ___rhs0; uint32_t L_2 = L_1.get_x_0(); if ((!(((uint32_t)L_0) == ((uint32_t)L_2)))) { goto IL_0039; } } { uint32_t L_3 = __this->get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4 = ___rhs0; uint32_t L_5 = L_4.get_y_1(); if ((!(((uint32_t)L_3) == ((uint32_t)L_5)))) { goto IL_0039; } } { uint32_t L_6 = __this->get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_7 = ___rhs0; uint32_t L_8 = L_7.get_z_2(); if ((!(((uint32_t)L_6) == ((uint32_t)L_8)))) { goto IL_0039; } } { uint32_t L_9 = __this->get_w_3(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_10 = ___rhs0; uint32_t L_11 = L_10.get_w_3(); return (bool)((((int32_t)L_9) == ((int32_t)L_11))? 1 : 0); } IL_0039: { return (bool)0; } } IL2CPP_EXTERN_C bool uint4_Equals_mA01BD6C642C7AA15938773343109B65A7017A8E5_AdjustorThunk (RuntimeObject * __this, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs0, const RuntimeMethod* method) { int32_t _offset = 1; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * _thisAdjusted = reinterpret_cast<uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *>(__this + _offset); bool _returnValue; _returnValue = uint4_Equals_mA01BD6C642C7AA15938773343109B65A7017A8E5_inline(_thisAdjusted, ___rhs0, method); return _returnValue; } // System.Boolean Unity.Mathematics.uint4::Equals(System.Object) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool uint4_Equals_mA36D75D93A16B63C63FF5556877325DE7209CA0C (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public override bool Equals(object o) { return Equals((uint4)o); } RuntimeObject * L_0 = ___o0; bool L_1; L_1 = uint4_Equals_mA01BD6C642C7AA15938773343109B65A7017A8E5_inline((uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *)__this, ((*(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *)((uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *)UnBox(L_0, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635_il2cpp_TypeInfo_var)))), /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C bool uint4_Equals_mA36D75D93A16B63C63FF5556877325DE7209CA0C_AdjustorThunk (RuntimeObject * __this, RuntimeObject * ___o0, const RuntimeMethod* method) { int32_t _offset = 1; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * _thisAdjusted = reinterpret_cast<uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *>(__this + _offset); bool _returnValue; _returnValue = uint4_Equals_mA36D75D93A16B63C63FF5556877325DE7209CA0C(_thisAdjusted, ___o0, method); return _returnValue; } // System.Int32 Unity.Mathematics.uint4::GetHashCode() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR int32_t uint4_GetHashCode_m0ACFBA8EEEBE72824B814A9147C62BA2DAD67E04 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = (*(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *)__this); uint32_t L_1; L_1 = math_hash_m5E517FEDA0EC60364F96435FEFECAC5E5B7A1811_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_EXTERN_C int32_t uint4_GetHashCode_m0ACFBA8EEEBE72824B814A9147C62BA2DAD67E04_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * _thisAdjusted = reinterpret_cast<uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *>(__this + _offset); int32_t _returnValue; _returnValue = uint4_GetHashCode_m0ACFBA8EEEBE72824B814A9147C62BA2DAD67E04_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.uint4::ToString() IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* uint4_ToString_m88626950AE1516CF95F414CFC9D3328308CFFD21 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA); s_Il2CppMethodInitialized = true; } { // return string.Format("uint4({0}, {1}, {2}, {3})", x, y, z, w); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; uint32_t L_2 = __this->get_x_0(); uint32_t L_3 = L_2; RuntimeObject * L_4 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_3); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_4); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_5 = L_1; uint32_t L_6 = __this->get_y_1(); uint32_t L_7 = L_6; RuntimeObject * L_8 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_7); NullCheck(L_5); ArrayElementTypeCheck (L_5, L_8); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_8); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_9 = L_5; uint32_t L_10 = __this->get_z_2(); uint32_t L_11 = L_10; RuntimeObject * L_12 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_11); NullCheck(L_9); ArrayElementTypeCheck (L_9, L_12); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_12); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_13 = L_9; uint32_t L_14 = __this->get_w_3(); uint32_t L_15 = L_14; RuntimeObject * L_16 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_15); NullCheck(L_13); ArrayElementTypeCheck (L_13, L_16); (L_13)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_16); String_t* L_17; L_17 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA, L_13, /*hidden argument*/NULL); return L_17; } } IL2CPP_EXTERN_C String_t* uint4_ToString_m88626950AE1516CF95F414CFC9D3328308CFFD21_AdjustorThunk (RuntimeObject * __this, const RuntimeMethod* method) { int32_t _offset = 1; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * _thisAdjusted = reinterpret_cast<uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *>(__this + _offset); String_t* _returnValue; _returnValue = uint4_ToString_m88626950AE1516CF95F414CFC9D3328308CFFD21_inline(_thisAdjusted, method); return _returnValue; } // System.String Unity.Mathematics.uint4::ToString(System.String,System.IFormatProvider) IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR String_t* uint4_ToString_m89A2419938888294462214E4F1B77BFB2A6D6622 (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA); s_Il2CppMethodInitialized = true; } { // return string.Format("uint4({0}, {1}, {2}, {3})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; uint32_t* L_2 = __this->get_address_of_x_0(); String_t* L_3 = ___format0; RuntimeObject* L_4 = ___formatProvider1; String_t* L_5; L_5 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_2, L_3, L_4, /*hidden argument*/NULL); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_5); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_5); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_6 = L_1; uint32_t* L_7 = __this->get_address_of_y_1(); String_t* L_8 = ___format0; RuntimeObject* L_9 = ___formatProvider1; String_t* L_10; L_10 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_7, L_8, L_9, /*hidden argument*/NULL); NullCheck(L_6); ArrayElementTypeCheck (L_6, L_10); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_10); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_11 = L_6; uint32_t* L_12 = __this->get_address_of_z_2(); String_t* L_13 = ___format0; RuntimeObject* L_14 = ___formatProvider1; String_t* L_15; L_15 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_12, L_13, L_14, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_15); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_15); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_16 = L_11; uint32_t* L_17 = __this->get_address_of_w_3(); String_t* L_18 = ___format0; RuntimeObject* L_19 = ___formatProvider1; String_t* L_20; L_20 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_17, L_18, L_19, /*hidden argument*/NULL); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_20); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_20); String_t* L_21; L_21 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA, L_16, /*hidden argument*/NULL); return L_21; } } IL2CPP_EXTERN_C String_t* uint4_ToString_m89A2419938888294462214E4F1B77BFB2A6D6622_AdjustorThunk (RuntimeObject * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { int32_t _offset = 1; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * _thisAdjusted = reinterpret_cast<uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *>(__this + _offset); String_t* _returnValue; _returnValue = uint4_ToString_m89A2419938888294462214E4F1B77BFB2A6D6622_inline(_thisAdjusted, ___format0, ___formatProvider1, method); return _returnValue; } #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 #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 #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 #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 IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, float ___x0, float ___y1, const RuntimeMethod* method) { { // this.x = x; float L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; float L_1 = ___y1; __this->set_y_1(L_1); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool float2_Equals_mD7E0010E86764F768D155F084C5049B1A37451AB_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(float2 rhs) { return x == rhs.x && y == rhs.y; } float L_0 = __this->get_x_0(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_1 = ___rhs0; float L_2 = L_1.get_x_0(); if ((!(((float)L_0) == ((float)L_2)))) { goto IL_001d; } } { float L_3 = __this->get_y_1(); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_4 = ___rhs0; float L_5 = L_4.get_y_1(); return (bool)((((float)L_3) == ((float)L_5))? 1 : 0); } IL_001d: { return (bool)0; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_m02C3B1E016522A7C4B32A4FCD30DED6807391ED9_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___v0, const RuntimeMethod* method) { { // return csum(asuint(v) * uint2(0xFA3A3285u, 0xAD55999Du)) + 0xDCDD5341u; float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___v0; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1; L_1 = math_asuint_m351AD372B79DB7BEFB5AC7667CDF3409544E3863_inline(L_0, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; L_2 = math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline(((int32_t)-96849275), ((int32_t)-1386899043), /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_3; L_3 = uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D_inline(L_1, L_2, /*hidden argument*/NULL); uint32_t L_4; L_4 = math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1_inline(L_3, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)-589475007))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t float2_GetHashCode_m14F0A1D75CEB912B8D368074F8EC66E768800FE9_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = (*(float2_tCB7B81181978EDE17722C533A55E345D9A413274 *)__this); uint32_t L_1; L_1 = math_hash_m02C3B1E016522A7C4B32A4FCD30DED6807391ED9_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float2_ToString_mDD9456E5C3F28889E650CED5533DCD06219F3A28_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58); s_Il2CppMethodInitialized = true; } { // return string.Format("float2({0}f, {1}f)", x, y); float L_0 = __this->get_x_0(); float L_1 = L_0; RuntimeObject * L_2 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_1); float L_3 = __this->get_y_1(); float L_4 = L_3; RuntimeObject * L_5 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_4); String_t* L_6; L_6 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58, L_2, L_5, /*hidden argument*/NULL); return L_6; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float2_ToString_mCCF46926AC2D48D3344DC9373B33F0E005071C78_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58); s_Il2CppMethodInitialized = true; } { // return string.Format("float2({0}f, {1}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); float* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_0, L_1, L_2, /*hidden argument*/NULL); float* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_4, L_5, L_6, /*hidden argument*/NULL); String_t* L_8; L_8 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteral50EDAD5CFB15084F3338C313ED64018C8F78CD58, L_3, L_7, /*hidden argument*/NULL); return L_8; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method) { { // this.x = x; float L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; float L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; float L_2 = ___z2; __this->set_z_2(L_2); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float3__ctor_m9E3A136F0CAD409A42B39B54E95C86ECE24FC35C_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float ___v0, const RuntimeMethod* method) { { // this.x = v; float L_0 = ___v0; __this->set_x_0(L_0); // this.y = v; float L_1 = ___v0; __this->set_y_1(L_1); // this.z = v; float L_2 = ___v0; __this->set_z_2(L_2); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_get_yzx_m38F00E0047938E610A1D5B7F3A6289321927E024_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method) { { // get { return new float3(y, z, x); } float L_0 = __this->get_y_1(); float L_1 = __this->get_z_2(); float L_2 = __this->get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3; memset((&L_3), 0, sizeof(L_3)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_3), L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool float3_Equals_m21D80AD2B9F37B1210C6F36BE86F76AA527BF2CF_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs0, const RuntimeMethod* method) { { // public bool Equals(float3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } float L_0 = __this->get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1 = ___rhs0; float L_2 = L_1.get_x_0(); if ((!(((float)L_0) == ((float)L_2)))) { goto IL_002b; } } { float L_3 = __this->get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___rhs0; float L_5 = L_4.get_y_1(); if ((!(((float)L_3) == ((float)L_5)))) { goto IL_002b; } } { float L_6 = __this->get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7 = ___rhs0; float L_8 = L_7.get_z_2(); return (bool)((((float)L_6) == ((float)L_8))? 1 : 0); } IL_002b: { return (bool)0; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_mE7D1E0FE1B3FB42A30188A62D737426389918F84_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___v0, const RuntimeMethod* method) { { // return csum(asuint(v) * uint3(0x9B13B92Du, 0x4ABF0813u, 0x86068063u)) + 0xD75513F9u; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___v0; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_1; L_1 = math_asuint_m7BB84B6113F67FF1E002B1E0414D8A4754070550_inline(L_0, /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2; L_2 = math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline(((int32_t)-1693206227), ((int32_t)1254033427), ((int32_t)-2046394269), /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_3; L_3 = uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A_inline(L_1, L_2, /*hidden argument*/NULL); uint32_t L_4; L_4 = math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751_inline(L_3, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)-682290183))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t float3_GetHashCode_m127685CE1D48644B6DC250A3CA9B989A54BA1AF3_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = (*(float3_t9500D105F273B3D86BD354142E891C48FFF9F71D *)__this); uint32_t L_1; L_1 = math_hash_mE7D1E0FE1B3FB42A30188A62D737426389918F84_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float3_ToString_mB8035CAC163C19E11A35ADFE448E5B362A56D8AF_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A); s_Il2CppMethodInitialized = true; } { // return string.Format("float3({0}f, {1}f, {2}f)", x, y, z); float L_0 = __this->get_x_0(); float L_1 = L_0; RuntimeObject * L_2 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_1); float L_3 = __this->get_y_1(); float L_4 = L_3; RuntimeObject * L_5 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_4); float L_6 = __this->get_z_2(); float L_7 = L_6; RuntimeObject * L_8 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_7); String_t* L_9; L_9 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A, L_2, L_5, L_8, /*hidden argument*/NULL); return L_9; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float3_ToString_mAA3FEBFB0473D5C7F22CB3B6B56E52BEE6054F5F_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A); s_Il2CppMethodInitialized = true; } { // return string.Format("float3({0}f, {1}f, {2}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); float* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_0, L_1, L_2, /*hidden argument*/NULL); float* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_4, L_5, L_6, /*hidden argument*/NULL); float* L_8 = __this->get_address_of_z_2(); String_t* L_9 = ___format0; RuntimeObject* L_10 = ___formatProvider1; String_t* L_11; L_11 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_8, L_9, L_10, /*hidden argument*/NULL); String_t* L_12; L_12 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteral1578CABA4FF62AC9986DD5D0BA4C26A5CCB44A6A, L_3, L_7, L_11, /*hidden argument*/NULL); return L_12; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void Vector3__ctor_m57495F692C6CE1CEF278CAD9A98221165D37E636_inline (Vector3_t65B972D6A585A0A5B63153CF1177A90D3C90D65E * __this, float ___x0, float ___y1, float ___z2, const RuntimeMethod* method) { { float L_0 = ___x0; __this->set_x_2(L_0); float L_1 = ___y1; __this->set_y_3(L_1); float L_2 = ___z2; __this->set_z_4(L_2); return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void float4__ctor_mD7DD9759C791823116719CAE8EE693E9C173E241_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, float ___x0, float ___y1, float ___z2, float ___w3, const RuntimeMethod* method) { { // this.x = x; float L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; float L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; float L_2 = ___z2; __this->set_z_2(L_2); // this.w = w; float L_3 = ___w3; __this->set_w_3(L_3); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float4_get_xyz_m4737722995A5B3DC8DD7C8064525E79FC8327AAC_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method) { { // get { return new float3(x, y, z); } float L_0 = __this->get_x_0(); float L_1 = __this->get_y_1(); float L_2 = __this->get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3; memset((&L_3), 0, sizeof(L_3)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_3), L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool float4_Equals_mC17658EE14E0595E33E170A1CF5325AD7240B508_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(float4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } float L_0 = __this->get_x_0(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_1 = ___rhs0; float L_2 = L_1.get_x_0(); if ((!(((float)L_0) == ((float)L_2)))) { goto IL_0039; } } { float L_3 = __this->get_y_1(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_4 = ___rhs0; float L_5 = L_4.get_y_1(); if ((!(((float)L_3) == ((float)L_5)))) { goto IL_0039; } } { float L_6 = __this->get_z_2(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_7 = ___rhs0; float L_8 = L_7.get_z_2(); if ((!(((float)L_6) == ((float)L_8)))) { goto IL_0039; } } { float L_9 = __this->get_w_3(); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_10 = ___rhs0; float L_11 = L_10.get_w_3(); return (bool)((((float)L_9) == ((float)L_11))? 1 : 0); } IL_0039: { return (bool)0; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_mE2E294D89343D0C0D08ABE6E8D97BFDBD5AD60A5_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___v0, const RuntimeMethod* method) { { // return csum(asuint(v) * uint4(0xE69626FFu, 0xBD010EEBu, 0x9CEDE1D1u, 0x43BE0B51u)) + 0xAF836EE1u; float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_0 = ___v0; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_1; L_1 = math_asuint_m6BECD59CBEEAB7DBA7EB79A50D54424B974B760D_inline(L_0, /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2; L_2 = math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline(((int32_t)-426367233), ((int32_t)-1124004117), ((int32_t)-1662131759), ((int32_t)1136528209), /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_3; L_3 = uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6_inline(L_1, L_2, /*hidden argument*/NULL); uint32_t L_4; L_4 = math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5_inline(L_3, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_4, (int32_t)((int32_t)-1350340895))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t float4_GetHashCode_mDAE54F7570659BE4963BEA7F347A137B7EFC5230_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_0 = (*(float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 *)__this); uint32_t L_1; L_1 = math_hash_mE2E294D89343D0C0D08ABE6E8D97BFDBD5AD60A5_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float4_ToString_mF8E4242AD739E6BC3CFDAF96C26236D385DF7850_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033); s_Il2CppMethodInitialized = true; } { // return string.Format("float4({0}f, {1}f, {2}f, {3}f)", x, y, z, w); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; float L_2 = __this->get_x_0(); float L_3 = L_2; RuntimeObject * L_4 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_3); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_4); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_5 = L_1; float L_6 = __this->get_y_1(); float L_7 = L_6; RuntimeObject * L_8 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_7); NullCheck(L_5); ArrayElementTypeCheck (L_5, L_8); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_8); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_9 = L_5; float L_10 = __this->get_z_2(); float L_11 = L_10; RuntimeObject * L_12 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_11); NullCheck(L_9); ArrayElementTypeCheck (L_9, L_12); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_12); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_13 = L_9; float L_14 = __this->get_w_3(); float L_15 = L_14; RuntimeObject * L_16 = Box(Single_tE07797BA3C98D4CA9B5A19413C19A76688AB899E_il2cpp_TypeInfo_var, &L_15); NullCheck(L_13); ArrayElementTypeCheck (L_13, L_16); (L_13)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_16); String_t* L_17; L_17 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033, L_13, /*hidden argument*/NULL); return L_17; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* float4_ToString_m643BEBFFE6AE7B5E0366C777BEE1178924D5374B_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033); s_Il2CppMethodInitialized = true; } { // return string.Format("float4({0}f, {1}f, {2}f, {3}f)", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; float* L_2 = __this->get_address_of_x_0(); String_t* L_3 = ___format0; RuntimeObject* L_4 = ___formatProvider1; String_t* L_5; L_5 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_2, L_3, L_4, /*hidden argument*/NULL); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_5); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_5); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_6 = L_1; float* L_7 = __this->get_address_of_y_1(); String_t* L_8 = ___format0; RuntimeObject* L_9 = ___formatProvider1; String_t* L_10; L_10 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_7, L_8, L_9, /*hidden argument*/NULL); NullCheck(L_6); ArrayElementTypeCheck (L_6, L_10); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_10); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_11 = L_6; float* L_12 = __this->get_address_of_z_2(); String_t* L_13 = ___format0; RuntimeObject* L_14 = ___formatProvider1; String_t* L_15; L_15 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_12, L_13, L_14, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_15); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_15); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_16 = L_11; float* L_17 = __this->get_address_of_w_3(); String_t* L_18 = ___format0; RuntimeObject* L_19 = ___formatProvider1; String_t* L_20; L_20 = Single_ToString_m7631D332703B4197EAA7DC0BA067CE7E16334D8B((float*)L_17, L_18, L_19, /*hidden argument*/NULL); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_20); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_20); String_t* L_21; L_21 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteral43DDB8ABCD260FFF159CAB7520989AEB22E45033, L_16, /*hidden argument*/NULL); return L_21; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 math_asuint_m351AD372B79DB7BEFB5AC7667CDF3409544E3863_inline (float2_tCB7B81181978EDE17722C533A55E345D9A413274 ___x0, const RuntimeMethod* method) { { // public static uint2 asuint(float2 x) { return uint2(asuint(x.x), asuint(x.y)); } float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_0 = ___x0; float L_1 = L_0.get_x_0(); uint32_t L_2; L_2 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_1, /*hidden argument*/NULL); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_3 = ___x0; float L_4 = L_3.get_y_1(); uint32_t L_5; L_5 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_4, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_6; L_6 = math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline(L_2, L_5, /*hidden argument*/NULL); return L_6; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline (uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method) { { // public static uint2 uint2(uint x, uint y) { return new uint2(x, y); } uint32_t L_0 = ___x0; uint32_t L_1 = ___y1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; memset((&L_2), 0, sizeof(L_2)); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline((&L_2), L_0, L_1, /*hidden argument*/NULL); return L_2; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___lhs0, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs1, const RuntimeMethod* method) { { // public static uint2 operator * (uint2 lhs, uint2 rhs) { return new uint2 (lhs.x * rhs.x, lhs.y * rhs.y); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2 = ___rhs1; uint32_t L_3 = L_2.get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_4 = ___lhs0; uint32_t L_5 = L_4.get_y_1(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_6 = ___rhs1; uint32_t L_7 = L_6.get_y_1(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_8; memset((&L_8), 0, sizeof(L_8)); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline((&L_8), ((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)L_3)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_5, (int32_t)L_7)), /*hidden argument*/NULL); return L_8; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___x0, const RuntimeMethod* method) { { // public static uint csum(uint2 x) { return x.x + x.y; } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2 = ___x0; uint32_t L_3 = L_2.get_y_1(); return ((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_3)); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A math_asuint_m7BB84B6113F67FF1E002B1E0414D8A4754070550_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, const RuntimeMethod* method) { { // public static uint3 asuint(float3 x) { return uint3(asuint(x.x), asuint(x.y), asuint(x.z)); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float L_1 = L_0.get_x_0(); uint32_t L_2; L_2 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_1, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_3 = ___x0; float L_4 = L_3.get_y_1(); uint32_t L_5; L_5 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_4, /*hidden argument*/NULL); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___x0; float L_7 = L_6.get_z_2(); uint32_t L_8; L_8 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_7, /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_9; L_9 = math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline(L_2, L_5, L_8, /*hidden argument*/NULL); return L_9; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline (uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method) { { // public static uint3 uint3(uint x, uint y, uint z) { return new uint3(x, y, z); } uint32_t L_0 = ___x0; uint32_t L_1 = ___y1; uint32_t L_2 = ___z2; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_3; memset((&L_3), 0, sizeof(L_3)); uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline((&L_3), L_0, L_1, L_2, /*hidden argument*/NULL); return L_3; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___lhs0, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs1, const RuntimeMethod* method) { { // public static uint3 operator * (uint3 lhs, uint3 rhs) { return new uint3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2 = ___rhs1; uint32_t L_3 = L_2.get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_4 = ___lhs0; uint32_t L_5 = L_4.get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_6 = ___rhs1; uint32_t L_7 = L_6.get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_8 = ___lhs0; uint32_t L_9 = L_8.get_z_2(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_10 = ___rhs1; uint32_t L_11 = L_10.get_z_2(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_12; memset((&L_12), 0, sizeof(L_12)); uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline((&L_12), ((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)L_3)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_5, (int32_t)L_7)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_9, (int32_t)L_11)), /*hidden argument*/NULL); return L_12; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___x0, const RuntimeMethod* method) { { // public static uint csum(uint3 x) { return x.x + x.y + x.z; } uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2 = ___x0; uint32_t L_3 = L_2.get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_4 = ___x0; uint32_t L_5 = L_4.get_z_2(); return ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_3)), (int32_t)L_5)); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 math_asuint_m6BECD59CBEEAB7DBA7EB79A50D54424B974B760D_inline (float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 ___x0, const RuntimeMethod* method) { { // public static uint4 asuint(float4 x) { return uint4(asuint(x.x), asuint(x.y), asuint(x.z), asuint(x.w)); } float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_0 = ___x0; float L_1 = L_0.get_x_0(); uint32_t L_2; L_2 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_1, /*hidden argument*/NULL); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_3 = ___x0; float L_4 = L_3.get_y_1(); uint32_t L_5; L_5 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_4, /*hidden argument*/NULL); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_6 = ___x0; float L_7 = L_6.get_z_2(); uint32_t L_8; L_8 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_7, /*hidden argument*/NULL); float4_tE704FC67CF9AC634EBA989ADFB15A4737CDA2861 L_9 = ___x0; float L_10 = L_9.get_w_3(); uint32_t L_11; L_11 = math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline(L_10, /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_12; L_12 = math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline(L_2, L_5, L_8, L_11, /*hidden argument*/NULL); return L_12; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline (uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method) { { // public static uint4 uint4(uint x, uint y, uint z, uint w) { return new uint4(x, y, z, w); } uint32_t L_0 = ___x0; uint32_t L_1 = ___y1; uint32_t L_2 = ___z2; uint32_t L_3 = ___w3; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4; memset((&L_4), 0, sizeof(L_4)); uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline((&L_4), L_0, L_1, L_2, L_3, /*hidden argument*/NULL); return L_4; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___lhs0, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs1, const RuntimeMethod* method) { { // public static uint4 operator * (uint4 lhs, uint4 rhs) { return new uint4 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z, lhs.w * rhs.w); } uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2 = ___rhs1; uint32_t L_3 = L_2.get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4 = ___lhs0; uint32_t L_5 = L_4.get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_6 = ___rhs1; uint32_t L_7 = L_6.get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_8 = ___lhs0; uint32_t L_9 = L_8.get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_10 = ___rhs1; uint32_t L_11 = L_10.get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_12 = ___lhs0; uint32_t L_13 = L_12.get_w_3(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_14 = ___rhs1; uint32_t L_15 = L_14.get_w_3(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_16; memset((&L_16), 0, sizeof(L_16)); uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline((&L_16), ((int32_t)il2cpp_codegen_multiply((int32_t)L_1, (int32_t)L_3)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_5, (int32_t)L_7)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_9, (int32_t)L_11)), ((int32_t)il2cpp_codegen_multiply((int32_t)L_13, (int32_t)L_15)), /*hidden argument*/NULL); return L_16; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___x0, const RuntimeMethod* method) { { // public static uint csum(uint4 x) { return x.x + x.y + x.z + x.w; } uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2 = ___x0; uint32_t L_3 = L_2.get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4 = ___x0; uint32_t L_5 = L_4.get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_6 = ___x0; uint32_t L_7 = L_6.get_w_3(); return ((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)((int32_t)il2cpp_codegen_add((int32_t)L_1, (int32_t)L_3)), (int32_t)L_5)), (int32_t)L_7)); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t math_asint_mAB46275EA58D5FC95717224B4214F3C9987A8C86_inline (float ___x0, const RuntimeMethod* method) { IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 V_0; memset((&V_0), 0, sizeof(V_0)); { // u.intValue = 0; (&V_0)->set_intValue_0(0); // u.floatValue = x; float L_0 = ___x0; (&V_0)->set_floatValue_1(L_0); // return u.intValue; IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 L_1 = V_0; int32_t L_2 = L_1.get_intValue_0(); return L_2; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_asuint_mE13F6DE596F0D55A1A5BC805D1801FB3822042AC_inline (float ___x0, const RuntimeMethod* method) { { // public static uint asuint(float x) { return (uint)asint(x); } float L_0 = ___x0; int32_t L_1; L_1 = math_asint_mAB46275EA58D5FC95717224B4214F3C9987A8C86_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_asfloat_mFC74F5F38E8967C1320B94E1AF95AB1D55D46181_inline (int32_t ___x0, const RuntimeMethod* method) { IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 V_0; memset((&V_0), 0, sizeof(V_0)); { // u.floatValue = 0; (&V_0)->set_floatValue_1((0.0f)); // u.intValue = x; int32_t L_0 = ___x0; (&V_0)->set_intValue_0(L_0); // return u.floatValue; IntFloatUnion_t72279F27DE421D0251D66DEE108164593D88F463 L_1 = V_0; float L_2 = L_1.get_floatValue_1(); return L_2; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline (uint32_t ___x0, const RuntimeMethod* method) { { // public static float asfloat(uint x) { return asfloat((int)x); } uint32_t L_0 = ___x0; float L_1; L_1 = math_asfloat_mFC74F5F38E8967C1320B94E1AF95AB1D55D46181_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_float2_mDA355E0A30FD4D9FCFA20C1816C3AAE674DFD9B9_inline (float ___x0, float ___y1, const RuntimeMethod* method) { { // public static float2 float2(float x, float y) { return new float2(x, y); } float L_0 = ___x0; float L_1 = ___y1; float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_2; memset((&L_2), 0, sizeof(L_2)); float2__ctor_mDEC8A4039E029926E0424F0FB614C7F679AE7449_inline((&L_2), L_0, L_1, /*hidden argument*/NULL); return L_2; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_min_m61425DAA42F41CE3CD08A5DEDD02206F7A704F89_inline (float ___x0, float ___y1, const RuntimeMethod* method) { { // public static float min(float x, float y) { return float.IsNaN(y) || x < y ? x : y; } float L_0 = ___y1; bool L_1; L_1 = Single_IsNaN_m458FF076EF1944D4D888A585F7C6C49DA4730599(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000e; } } { float L_2 = ___x0; float L_3 = ___y1; if ((((float)L_2) < ((float)L_3))) { goto IL_000e; } } { float L_4 = ___y1; return L_4; } IL_000e: { float L_5 = ___x0; return L_5; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_max_mD8541933650D81292540BAFF46DE531FA1B333FC_inline (float ___x0, float ___y1, const RuntimeMethod* method) { { // public static float max(float x, float y) { return float.IsNaN(y) || x > y ? x : y; } float L_0 = ___y1; bool L_1; L_1 = Single_IsNaN_m458FF076EF1944D4D888A585F7C6C49DA4730599(L_0, /*hidden argument*/NULL); if (L_1) { goto IL_000e; } } { float L_2 = ___x0; float L_3 = ___y1; if ((((float)L_2) > ((float)L_3))) { goto IL_000e; } } { float L_4 = ___y1; return L_4; } IL_000e: { float L_5 = ___x0; return L_5; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint2_t31B88562B6681D249453803230869FBE9ED565E7 uint2_op_BitwiseAnd_mCF4B68B8031E03CF2287FC12BBBB17DF8614EDEE_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___lhs0, uint32_t ___rhs1, const RuntimeMethod* method) { { // public static uint2 operator & (uint2 lhs, uint rhs) { return new uint2 (lhs.x & rhs, lhs.y & rhs); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___lhs0; uint32_t L_1 = L_0.get_x_0(); uint32_t L_2 = ___rhs1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_3 = ___lhs0; uint32_t L_4 = L_3.get_y_1(); uint32_t L_5 = ___rhs1; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_6; memset((&L_6), 0, sizeof(L_6)); uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline((&L_6), ((int32_t)((int32_t)L_1&(int32_t)L_2)), ((int32_t)((int32_t)L_4&(int32_t)L_5)), /*hidden argument*/NULL); return L_6; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float2_tCB7B81181978EDE17722C533A55E345D9A413274 math_asfloat_m7A105E6392497188C3D5014278B85008BC9FDC07_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___x0, const RuntimeMethod* method) { { // public static float2 asfloat(uint2 x) { return float2(asfloat(x.x), asfloat(x.y)); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___x0; uint32_t L_1 = L_0.get_x_0(); float L_2; L_2 = math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline(L_1, /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_3 = ___x0; uint32_t L_4 = L_3.get_y_1(); float L_5; L_5 = math_asfloat_m6ABF86DC7492891584574087116E4904661A73DF_inline(L_4, /*hidden argument*/NULL); float2_tCB7B81181978EDE17722C533A55E345D9A413274 L_6; L_6 = math_float2_mDA355E0A30FD4D9FCFA20C1816C3AAE674DFD9B9_inline(L_2, L_5, /*hidden argument*/NULL); return L_6; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_sqrt_mCFFE475634B2765D4E1A8DE9A9B331742E0637CF_inline (float ___x0, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); s_Il2CppMethodInitialized = true; } { // public static float sqrt(float x) { return (float)System.Math.Sqrt((float)x); } float L_0 = ___x0; IL2CPP_RUNTIME_CLASS_INIT(Math_tA269614262430118C9FC5C4D9EF4F61C812568F0_il2cpp_TypeInfo_var); double L_1; L_1 = sqrt(((double)((double)((float)((float)L_0))))); return ((float)((float)L_1)); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_dot_mF7AC1B7E5E29630523124BDBFA34A2672CB852A9_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___x0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___y1, const RuntimeMethod* method) { { // public static float dot(float3 x, float3 y) { return x.x * y.x + x.y * y.y + x.z * y.z; } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___x0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___y1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___x0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___y1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___x0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___y1; float L_11 = L_10.get_z_2(); return ((float)il2cpp_codegen_add((float)((float)il2cpp_codegen_add((float)((float)il2cpp_codegen_multiply((float)L_1, (float)L_3)), (float)((float)il2cpp_codegen_multiply((float)L_5, (float)L_7)))), (float)((float)il2cpp_codegen_multiply((float)L_9, (float)L_11)))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float math_rsqrt_m4BCAD96F434850A62C649607F810ED996C19D896_inline (float ___x0, const RuntimeMethod* method) { { // public static float rsqrt(float x) { return 1.0f / sqrt(x); } float L_0 = ___x0; float L_1; L_1 = math_sqrt_mCFFE475634B2765D4E1A8DE9A9B331742E0637CF_inline(L_0, /*hidden argument*/NULL); return ((float)((float)(1.0f)/(float)L_1)); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m4A0B40DB4725F815AD14147DA2D00F1A7B1E88BE_inline (float ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator * (float lhs, float3 rhs) { return new float3 (lhs * rhs.x, lhs * rhs.y, lhs * rhs.z); } float L_0 = ___lhs0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_1 = ___rhs1; float L_2 = L_1.get_x_0(); float L_3 = ___lhs0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___rhs1; float L_5 = L_4.get_y_1(); float L_6 = ___lhs0; float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_7 = ___rhs1; float L_8 = L_7.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_9; memset((&L_9), 0, sizeof(L_9)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_9), ((float)il2cpp_codegen_multiply((float)L_0, (float)L_2)), ((float)il2cpp_codegen_multiply((float)L_3, (float)L_5)), ((float)il2cpp_codegen_multiply((float)L_6, (float)L_8)), /*hidden argument*/NULL); return L_9; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Multiply_m6E5382EBCA40ADBD10C11AB231C4A8629279CCF1_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator * (float3 lhs, float3 rhs) { return new float3 (lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___lhs0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___rhs1; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12; memset((&L_12), 0, sizeof(L_12)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_12), ((float)il2cpp_codegen_multiply((float)L_1, (float)L_3)), ((float)il2cpp_codegen_multiply((float)L_5, (float)L_7)), ((float)il2cpp_codegen_multiply((float)L_9, (float)L_11)), /*hidden argument*/NULL); return L_12; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR float3_t9500D105F273B3D86BD354142E891C48FFF9F71D float3_op_Subtraction_m3093AF71655C11E35349271AB39F99183B75B7E2_inline (float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___lhs0, float3_t9500D105F273B3D86BD354142E891C48FFF9F71D ___rhs1, const RuntimeMethod* method) { { // public static float3 operator - (float3 lhs, float3 rhs) { return new float3 (lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z); } float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_0 = ___lhs0; float L_1 = L_0.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_2 = ___rhs1; float L_3 = L_2.get_x_0(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_4 = ___lhs0; float L_5 = L_4.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_6 = ___rhs1; float L_7 = L_6.get_y_1(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_8 = ___lhs0; float L_9 = L_8.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_10 = ___rhs1; float L_11 = L_10.get_z_2(); float3_t9500D105F273B3D86BD354142E891C48FFF9F71D L_12; memset((&L_12), 0, sizeof(L_12)); float3__ctor_mA1B0F2B6874F0DEDFC715C334892EB2FAB31B40A_inline((&L_12), ((float)il2cpp_codegen_subtract((float)L_1, (float)L_3)), ((float)il2cpp_codegen_subtract((float)L_5, (float)L_7)), ((float)il2cpp_codegen_subtract((float)L_9, (float)L_11)), /*hidden argument*/NULL); return L_12; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void uint2__ctor_m15E587DF7FC128857586EA962472021625CB0727_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, uint32_t ___x0, uint32_t ___y1, const RuntimeMethod* method) { { // this.x = x; uint32_t L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; uint32_t L_1 = ___y1; __this->set_y_1(L_1); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void uint3__ctor_m6000FC36B0AD34E3897EBB27D734326F63D5198E_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, const RuntimeMethod* method) { { // this.x = x; uint32_t L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; uint32_t L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; uint32_t L_2 = ___z2; __this->set_z_2(L_2); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR void uint4__ctor_mE2EF35B487246E995E6B5226C41B2ABF7D695852_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, uint32_t ___x0, uint32_t ___y1, uint32_t ___z2, uint32_t ___w3, const RuntimeMethod* method) { { // this.x = x; uint32_t L_0 = ___x0; __this->set_x_0(L_0); // this.y = y; uint32_t L_1 = ___y1; __this->set_y_1(L_1); // this.z = z; uint32_t L_2 = ___z2; __this->set_z_2(L_2); // this.w = w; uint32_t L_3 = ___w3; __this->set_w_3(L_3); // } return; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool uint2_Equals_m4D6B7E58271563553964C88B0C6C11B11E9DDEFF_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(uint2 rhs) { return x == rhs.x && y == rhs.y; } uint32_t L_0 = __this->get_x_0(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1 = ___rhs0; uint32_t L_2 = L_1.get_x_0(); if ((!(((uint32_t)L_0) == ((uint32_t)L_2)))) { goto IL_001d; } } { uint32_t L_3 = __this->get_y_1(); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_4 = ___rhs0; uint32_t L_5 = L_4.get_y_1(); return (bool)((((int32_t)L_3) == ((int32_t)L_5))? 1 : 0); } IL_001d: { return (bool)0; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_mA46BEA1D3896F53E98145896C8F7136062532F90_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 ___v0, const RuntimeMethod* method) { { // return csum(v * uint2(0x4473BBB1u, 0xCBA11D5Fu)) + 0x685835CFu; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = ___v0; uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_1; L_1 = math_uint2_m01CB3A33D39ACAB2FC3FB5E6AB23FED049C2D5B2_inline(((int32_t)1148435377), ((int32_t)-878633633), /*hidden argument*/NULL); uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_2; L_2 = uint2_op_Multiply_mAFCBB08307277608981FD1631CAF3E7C009C569D_inline(L_0, L_1, /*hidden argument*/NULL); uint32_t L_3; L_3 = math_csum_m8D93664E8D149EFD78EC8DEBC03CD3D53AF12DC1_inline(L_2, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)1750611407))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t uint2_GetHashCode_m1AA42656371544BEFEF58990F0F5D3375771BDED_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } uint2_t31B88562B6681D249453803230869FBE9ED565E7 L_0 = (*(uint2_t31B88562B6681D249453803230869FBE9ED565E7 *)__this); uint32_t L_1; L_1 = math_hash_mA46BEA1D3896F53E98145896C8F7136062532F90_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint2_ToString_m11C8B65BDF3EE9F3E076886108F29C7085311CD8_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945); s_Il2CppMethodInitialized = true; } { // return string.Format("uint2({0}, {1})", x, y); uint32_t L_0 = __this->get_x_0(); uint32_t L_1 = L_0; RuntimeObject * L_2 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_1); uint32_t L_3 = __this->get_y_1(); uint32_t L_4 = L_3; RuntimeObject * L_5 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_4); String_t* L_6; L_6 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945, L_2, L_5, /*hidden argument*/NULL); return L_6; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint2_ToString_m82A6C25A6E380499B47B6D45037EC327449303A1_inline (uint2_t31B88562B6681D249453803230869FBE9ED565E7 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945); s_Il2CppMethodInitialized = true; } { // return string.Format("uint2({0}, {1})", x.ToString(format, formatProvider), y.ToString(format, formatProvider)); uint32_t* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_0, L_1, L_2, /*hidden argument*/NULL); uint32_t* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_4, L_5, L_6, /*hidden argument*/NULL); String_t* L_8; L_8 = String_Format_m8D1CB0410C35E052A53AE957C914C841E54BAB66(_stringLiteralE368123B559BBC0EC2335D3AF9EC37C25C8B5945, L_3, L_7, /*hidden argument*/NULL); return L_8; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool uint3_Equals_m13DA44E1022044FEBBA2066ECD1A8AC1CB53DF91_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___rhs0, const RuntimeMethod* method) { { // public bool Equals(uint3 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z; } uint32_t L_0 = __this->get_x_0(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_1 = ___rhs0; uint32_t L_2 = L_1.get_x_0(); if ((!(((uint32_t)L_0) == ((uint32_t)L_2)))) { goto IL_002b; } } { uint32_t L_3 = __this->get_y_1(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_4 = ___rhs0; uint32_t L_5 = L_4.get_y_1(); if ((!(((uint32_t)L_3) == ((uint32_t)L_5)))) { goto IL_002b; } } { uint32_t L_6 = __this->get_z_2(); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_7 = ___rhs0; uint32_t L_8 = L_7.get_z_2(); return (bool)((((int32_t)L_6) == ((int32_t)L_8))? 1 : 0); } IL_002b: { return (bool)0; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_m93543A4E24AB7FC17AA2810F0AEDF9ADABE333E6_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A ___v0, const RuntimeMethod* method) { { // return csum(v * uint3(0xCD266C89u, 0xF1852A33u, 0x77E35E77u)) + 0x863E3729u; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = ___v0; uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_1; L_1 = math_uint3_m16B75AEC39C187586C9AAAAA5EFF23DB7237C729_inline(((int32_t)-853119863), ((int32_t)-242931149), ((int32_t)2011389559), /*hidden argument*/NULL); uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_2; L_2 = uint3_op_Multiply_m398023D1304A0332CD32AA2E89B7E5CBAB38AE8A_inline(L_0, L_1, /*hidden argument*/NULL); uint32_t L_3; L_3 = math_csum_m65FAB8CE28E024565B82659E352D7C3A6CA0C751_inline(L_2, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)-2042742999))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t uint3_GetHashCode_mD983DD667EC5C064E237BFA773C185AB36599B76_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A L_0 = (*(uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A *)__this); uint32_t L_1; L_1 = math_hash_m93543A4E24AB7FC17AA2810F0AEDF9ADABE333E6_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint3_ToString_mEADE36DE83569B87E7DF9B37EB4A04357B83B277_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2); s_Il2CppMethodInitialized = true; } { // return string.Format("uint3({0}, {1}, {2})", x, y, z); uint32_t L_0 = __this->get_x_0(); uint32_t L_1 = L_0; RuntimeObject * L_2 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_1); uint32_t L_3 = __this->get_y_1(); uint32_t L_4 = L_3; RuntimeObject * L_5 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_4); uint32_t L_6 = __this->get_z_2(); uint32_t L_7 = L_6; RuntimeObject * L_8 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_7); String_t* L_9; L_9 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2, L_2, L_5, L_8, /*hidden argument*/NULL); return L_9; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint3_ToString_mF1C800E07DAF3C5478742C64CD0C4C76C7E63167_inline (uint3_tDE8894AE6A23EC78B6580A66D1CF9A526095AF4A * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2); s_Il2CppMethodInitialized = true; } { // return string.Format("uint3({0}, {1}, {2})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider)); uint32_t* L_0 = __this->get_address_of_x_0(); String_t* L_1 = ___format0; RuntimeObject* L_2 = ___formatProvider1; String_t* L_3; L_3 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_0, L_1, L_2, /*hidden argument*/NULL); uint32_t* L_4 = __this->get_address_of_y_1(); String_t* L_5 = ___format0; RuntimeObject* L_6 = ___formatProvider1; String_t* L_7; L_7 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_4, L_5, L_6, /*hidden argument*/NULL); uint32_t* L_8 = __this->get_address_of_z_2(); String_t* L_9 = ___format0; RuntimeObject* L_10 = ___formatProvider1; String_t* L_11; L_11 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_8, L_9, L_10, /*hidden argument*/NULL); String_t* L_12; L_12 = String_Format_m039737CCD992C5BFC8D16DFD681F5E8786E87FA6(_stringLiteralFEC52A4F763D4C868968D018DEC2AF8064D4C8E2, L_3, L_7, L_11, /*hidden argument*/NULL); return L_12; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR bool uint4_Equals_mA01BD6C642C7AA15938773343109B65A7017A8E5_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___rhs0, const RuntimeMethod* method) { { // public bool Equals(uint4 rhs) { return x == rhs.x && y == rhs.y && z == rhs.z && w == rhs.w; } uint32_t L_0 = __this->get_x_0(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_1 = ___rhs0; uint32_t L_2 = L_1.get_x_0(); if ((!(((uint32_t)L_0) == ((uint32_t)L_2)))) { goto IL_0039; } } { uint32_t L_3 = __this->get_y_1(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_4 = ___rhs0; uint32_t L_5 = L_4.get_y_1(); if ((!(((uint32_t)L_3) == ((uint32_t)L_5)))) { goto IL_0039; } } { uint32_t L_6 = __this->get_z_2(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_7 = ___rhs0; uint32_t L_8 = L_7.get_z_2(); if ((!(((uint32_t)L_6) == ((uint32_t)L_8)))) { goto IL_0039; } } { uint32_t L_9 = __this->get_w_3(); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_10 = ___rhs0; uint32_t L_11 = L_10.get_w_3(); return (bool)((((int32_t)L_9) == ((int32_t)L_11))? 1 : 0); } IL_0039: { return (bool)0; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR uint32_t math_hash_m5E517FEDA0EC60364F96435FEFECAC5E5B7A1811_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 ___v0, const RuntimeMethod* method) { { // return csum(v * uint4(0xB492BF15u, 0xD37220E3u, 0x7AA2C2BDu, 0xE16BC89Du)) + 0x7AA07CD3u; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = ___v0; uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_1; L_1 = math_uint4_mB8BA57231B5CA2C79825112A5B8895CCD7241777_inline(((int32_t)-1265451243), ((int32_t)-747495197), ((int32_t)2057487037), ((int32_t)-513029987), /*hidden argument*/NULL); uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_2; L_2 = uint4_op_Multiply_m6625351DAB9491A1C68523349071700C2BE353F6_inline(L_0, L_1, /*hidden argument*/NULL); uint32_t L_3; L_3 = math_csum_m6790689A2E1340EB594A26E4942D6C9537AB22F5_inline(L_2, /*hidden argument*/NULL); return ((int32_t)il2cpp_codegen_add((int32_t)L_3, (int32_t)((int32_t)2057338067))); } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR int32_t uint4_GetHashCode_m0ACFBA8EEEBE72824B814A9147C62BA2DAD67E04_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, const RuntimeMethod* method) { { // public override int GetHashCode() { return (int)math.hash(this); } uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 L_0 = (*(uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 *)__this); uint32_t L_1; L_1 = math_hash_m5E517FEDA0EC60364F96435FEFECAC5E5B7A1811_inline(L_0, /*hidden argument*/NULL); return L_1; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint4_ToString_m88626950AE1516CF95F414CFC9D3328308CFFD21_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA); s_Il2CppMethodInitialized = true; } { // return string.Format("uint4({0}, {1}, {2}, {3})", x, y, z, w); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; uint32_t L_2 = __this->get_x_0(); uint32_t L_3 = L_2; RuntimeObject * L_4 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_3); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_4); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_5 = L_1; uint32_t L_6 = __this->get_y_1(); uint32_t L_7 = L_6; RuntimeObject * L_8 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_7); NullCheck(L_5); ArrayElementTypeCheck (L_5, L_8); (L_5)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_8); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_9 = L_5; uint32_t L_10 = __this->get_z_2(); uint32_t L_11 = L_10; RuntimeObject * L_12 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_11); NullCheck(L_9); ArrayElementTypeCheck (L_9, L_12); (L_9)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_12); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_13 = L_9; uint32_t L_14 = __this->get_w_3(); uint32_t L_15 = L_14; RuntimeObject * L_16 = Box(UInt32_tE60352A06233E4E69DD198BCC67142159F686B15_il2cpp_TypeInfo_var, &L_15); NullCheck(L_13); ArrayElementTypeCheck (L_13, L_16); (L_13)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_16); String_t* L_17; L_17 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA, L_13, /*hidden argument*/NULL); return L_17; } } IL2CPP_MANAGED_FORCE_INLINE IL2CPP_METHOD_ATTR String_t* uint4_ToString_m89A2419938888294462214E4F1B77BFB2A6D6622_inline (uint4_t646D1C6030F449510629C1CDBC418BC46ABE3635 * __this, String_t* ___format0, RuntimeObject* ___formatProvider1, const RuntimeMethod* method) { static bool s_Il2CppMethodInitialized; if (!s_Il2CppMethodInitialized) { il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var); il2cpp_codegen_initialize_runtime_metadata((uintptr_t*)&_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA); s_Il2CppMethodInitialized = true; } { // return string.Format("uint4({0}, {1}, {2}, {3})", x.ToString(format, formatProvider), y.ToString(format, formatProvider), z.ToString(format, formatProvider), w.ToString(format, formatProvider)); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_0 = (ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE*)SZArrayNew(ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE_il2cpp_TypeInfo_var, (uint32_t)4); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_1 = L_0; uint32_t* L_2 = __this->get_address_of_x_0(); String_t* L_3 = ___format0; RuntimeObject* L_4 = ___formatProvider1; String_t* L_5; L_5 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_2, L_3, L_4, /*hidden argument*/NULL); NullCheck(L_1); ArrayElementTypeCheck (L_1, L_5); (L_1)->SetAt(static_cast<il2cpp_array_size_t>(0), (RuntimeObject *)L_5); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_6 = L_1; uint32_t* L_7 = __this->get_address_of_y_1(); String_t* L_8 = ___format0; RuntimeObject* L_9 = ___formatProvider1; String_t* L_10; L_10 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_7, L_8, L_9, /*hidden argument*/NULL); NullCheck(L_6); ArrayElementTypeCheck (L_6, L_10); (L_6)->SetAt(static_cast<il2cpp_array_size_t>(1), (RuntimeObject *)L_10); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_11 = L_6; uint32_t* L_12 = __this->get_address_of_z_2(); String_t* L_13 = ___format0; RuntimeObject* L_14 = ___formatProvider1; String_t* L_15; L_15 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_12, L_13, L_14, /*hidden argument*/NULL); NullCheck(L_11); ArrayElementTypeCheck (L_11, L_15); (L_11)->SetAt(static_cast<il2cpp_array_size_t>(2), (RuntimeObject *)L_15); ObjectU5BU5D_tC1F4EE0DB0B7300255F5FD4AF64FE4C585CF5ADE* L_16 = L_11; uint32_t* L_17 = __this->get_address_of_w_3(); String_t* L_18 = ___format0; RuntimeObject* L_19 = ___formatProvider1; String_t* L_20; L_20 = UInt32_ToString_mAF0A46E9EC70EA43A02EBE522FF287E20DEE691B((uint32_t*)L_17, L_18, L_19, /*hidden argument*/NULL); NullCheck(L_16); ArrayElementTypeCheck (L_16, L_20); (L_16)->SetAt(static_cast<il2cpp_array_size_t>(3), (RuntimeObject *)L_20); String_t* L_21; L_21 = String_Format_mCED6767EA5FEE6F15ABCD5B4F9150D1284C2795B(_stringLiteralE134155080D59FDE2A83A55D0BB359039175A4EA, L_16, /*hidden argument*/NULL); return L_21; } }
50.51403
356
0.813819
Alex-Greenen
d7ce3d3980409beaceb63c7c627b415ef4291722
873
cpp
C++
DMOJ/VM7WC/VM7WC_16_C5P5_Gold_Jayden_Studies_Trees.cpp
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
null
null
null
DMOJ/VM7WC/VM7WC_16_C5P5_Gold_Jayden_Studies_Trees.cpp
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-10-14T18:26:56.000Z
2021-10-14T18:26:56.000Z
DMOJ/VM7WC/VM7WC_16_C5P5_Gold_Jayden_Studies_Trees.cpp
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-08-06T03:39:55.000Z
2021-08-06T03:39:55.000Z
#include <bits/stdc++.h> using namespace std; const int M = 1e4+2; int N, deep, def, ans; vector<int> adj[M]; void bfs(int u) { ans = -1; queue<int> q; vector<int> vis(M, 0), dist(M, 0); q.push(u); vis[u] = true; while (!q.empty()) { int cur = q.front(); q.pop(); for (int nxt : adj[cur]) { if (!vis[nxt]) { q.push(nxt); vis[nxt] = true; dist[nxt] = dist[cur] + 1; ans = max(ans, dist[nxt]); deep = nxt; } } } } int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> N; for (int i = 1, x, y; i < N; i++) { cin >> x >> y; def = x; adj[x].push_back(y); adj[y].push_back(x); } bfs(def); bfs(deep); cout << ans << '\n'; }
16.788462
42
0.404353
Togohogo1
d7d3baf1538d4aec4ab2a38d23f58c9d1a36c1fd
2,936
cpp
C++
src/ast/ast_visitor.cpp
profelis/daScript
eea57f39dec4dd6168ee64c8ae5139cbcf2937bc
[ "BSD-3-Clause" ]
421
2019-08-15T15:40:04.000Z
2022-03-29T06:59:06.000Z
src/ast/ast_visitor.cpp
profelis/daScript
eea57f39dec4dd6168ee64c8ae5139cbcf2937bc
[ "BSD-3-Clause" ]
55
2019-08-17T13:50:53.000Z
2022-03-25T17:58:38.000Z
src/ast/ast_visitor.cpp
profelis/daScript
eea57f39dec4dd6168ee64c8ae5139cbcf2937bc
[ "BSD-3-Clause" ]
58
2019-08-22T17:04:13.000Z
2022-03-25T17:43:28.000Z
#include "daScript/misc/platform.h" #include "daScript/ast/ast_visitor.h" #include "daScript/ast/ast_expressions.h" namespace das { struct AstContextVisitor : Visitor { AstContextVisitor ( Expression * expr ) : refExpr(expr) { } AstContext astc, astr; Expression * refExpr = nullptr; int32_t count = 0; // expression virtual void preVisitExpression ( Expression * expr ) override { Visitor::preVisitExpression(expr); if ( expr==refExpr ) { count ++; if ( count==1 ) { astr = astc; astr.valid = true; } } } // function virtual void preVisit ( Function * f ) override { Visitor::preVisit(f); astc.func = f; } virtual FunctionPtr visit ( Function * that ) override { // if any of this asserts failed, there is logic error in how we pop DAS_ASSERT(astc.loop.size()==0); DAS_ASSERT(astc.scopes.size()==0); DAS_ASSERT(astc.blocks.size()==0); DAS_ASSERT(astc.with.size()==0); astc.func.reset(); return Visitor::visit(that); } // ExprWith virtual void preVisit ( ExprWith * expr ) override { Visitor::preVisit(expr); astc.with.push_back(expr); } virtual ExpressionPtr visit ( ExprWith * expr ) override { astc.with.pop_back(); return Visitor::visit(expr); } // ExprFor virtual void preVisit ( ExprFor * expr ) override { Visitor::preVisit(expr); astc.loop.push_back(expr); } virtual ExpressionPtr visit ( ExprFor * expr ) override { astc.loop.pop_back(); return Visitor::visit(expr); } // ExprWhile virtual void preVisit ( ExprWhile * expr ) override { Visitor::preVisit(expr); astc.loop.push_back(expr); } virtual ExpressionPtr visit ( ExprWhile * expr ) override { astc.loop.pop_back(); return Visitor::visit(expr); } // ExprBlock virtual void preVisit ( ExprBlock * block ) override { Visitor::preVisit(block); if ( block->isClosure ) { astc.blocks.push_back(block); } astc.scopes.push_back(block); } virtual ExpressionPtr visit ( ExprBlock * block ) override { astc.scopes.pop_back(); if ( block->isClosure ) { astc.blocks.pop_back(); } return Visitor::visit(block); } }; AstContext generateAstContext( const ProgramPtr & prog, Expression * expr ) { AstContextVisitor acv(expr); prog->visit(acv); return acv.count==1 ? acv.astr : AstContext(); } }
32.988764
81
0.530313
profelis
d7d7cb00808619b584c4f783452209d095657916
15,633
cpp
C++
src/test/test_parser_expr.cpp
paramah/hiphop-php-osx
5ed8c24abe8ad9fd7bc6dd4c28b4ffff23e54362
[ "PHP-3.01", "Zend-2.0" ]
1
2015-11-05T21:45:07.000Z
2015-11-05T21:45:07.000Z
src/test/test_parser_expr.cpp
brion/hiphop-php
df70a236e6418d533ac474be0c01f0ba87034d7f
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
src/test/test_parser_expr.cpp
brion/hiphop-php
df70a236e6418d533ac474be0c01f0ba87034d7f
[ "PHP-3.01", "Zend-2.0" ]
null
null
null
/* +----------------------------------------------------------------------+ | HipHop for PHP | +----------------------------------------------------------------------+ | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ */ #include <test/test_parser_expr.h> /////////////////////////////////////////////////////////////////////////////// bool TestParserExpr::RunTests(const std::string &which) { bool ret = true; RUN_TEST(TestExpressionList); RUN_TEST(TestAssignmentExpression); RUN_TEST(TestSimpleVariable); RUN_TEST(TestDynamicVariable); RUN_TEST(TestStaticMemberExpression); RUN_TEST(TestArrayElementExpression); RUN_TEST(TestStringOffsetExpression); RUN_TEST(TestDynamicFunctionCall); RUN_TEST(TestSimpleFunctionCall); RUN_TEST(TestScalarExpression); RUN_TEST(TestObjectPropertyExpression); RUN_TEST(TestObjectMethodExpression); RUN_TEST(TestListAssignment); RUN_TEST(TestNewObjectExpression); RUN_TEST(TestUnaryOpExpression); RUN_TEST(TestBinaryOpExpression); RUN_TEST(TestQOpExpression); RUN_TEST(TestArrayPairExpression); RUN_TEST(TestClassConstantExpression); RUN_TEST(TestParameterExpression); RUN_TEST(TestModifierExpression); RUN_TEST(TestConstant); RUN_TEST(TestEncapsListExpression); return ret; } /////////////////////////////////////////////////////////////////////////////// bool TestParserExpr::TestExpressionList() { // TestUnsetStatement // TestEchoStatement // TestForStatement // TestObjectPropertyExpression // TestListAssignment // TestUnaryOpExpression - internal_functions - isset_variables return true; } bool TestParserExpr::TestAssignmentExpression() { V("<?php $a = 1;", "$a = 1;\n"); V("<?php $a = &$b;", "$a = &$b;\n"); V("<?php $a = &new Test();", "$a = &new test();\n"); V("<?php $a = &new $b();", "$a = &new $b();\n"); V("<?php $a = &new $$b();", "$a = &new ${$b}();\n"); V("<?php $a = &new Test::$b();", "$a = &new test::$b();\n"); V("<?php $a = &new $b->c();", "$a = &new $b->c();\n"); V("<?php $a = &new $b->c->d();", "$a = &new $b->c->d();\n"); return true; } bool TestParserExpr::TestSimpleVariable() { V("<?php $a = $a;", "$a = $a;\n"); return true; } bool TestParserExpr::TestDynamicVariable() { V("<?php $a = ${$a + $b};", "$a = ${$a + $b};\n"); V("<?php $a = $$a;", "$a = ${$a};\n"); V("<?php $a = ${$a};", "$a = ${$a};\n"); V("<?php $a = $$$a;", "$a = ${${$a}};\n"); return true; } bool TestParserExpr::TestStaticMemberExpression() { V("<?php $a = Test::$a;", "$a = test::$a;\n"); return true; } bool TestParserExpr::TestArrayElementExpression() { V("<?php $a = $b[$a + $b];", "$a = $b[$a + $b];\n"); V("<?php $a = $b[];", "$a = $b[];\n"); return true; } bool TestParserExpr::TestStringOffsetExpression() { V("<?php $a = $b{$a + $b};", "$a = $b[$a + $b];\n"); return true; } bool TestParserExpr::TestDynamicFunctionCall() { V("<?php $test();", "$test();\n"); V("<?php Test::$test();", "test::$test();\n"); return true; } bool TestParserExpr::TestSimpleFunctionCall() { V("<?php test();", "test();\n"); V("<?php Test::test();", "test::test();\n"); V("<?php test(&$a);", "test($a);\n"); return true; } bool TestParserExpr::TestScalarExpression() { V("<?php A;", "A;\n"); // T_STRING V("<?php \"$a[0xFF]\";", "$a[0xFF];\n"); // T_NUM_STRING V("<?php 12;", "12;\n"); // T_LNUMBER V("<?php 0xFF;", "0xFF;\n"); // T_LNUMBER V("<?php 1.2;", "1.2;\n"); // T_DNUMBER V("<?php 'A';", "'A';\n"); // T_CONSTANT_ENCAPSED_STRING V("<?php \"A\";", "'A';\n"); // T_CONSTANT_ENCAPSED_STRING V("<?php __LINE__;", "__LINE__;\n"); // T_LINE V("<?php __FILE__;", "__FILE__;\n"); // T_FILE V("<?php __CLASS__;", "__CLASS__;\n"); // T_CLASS_C V("<?php __METHOD__;", "__METHOD__;\n"); // T_METHOD_C V("<?php __FUNCTION__;", "__FUNCTION__;\n"); // T_FUNC_C V("<?php \"${a}\";", "$a;\n"); // T_STRING_VARNAME return true; } bool TestParserExpr::TestObjectPropertyExpression() { V("<?php print $b->c;", "print $b->c;\n"); V("<?php print ${b}->c;", "print ${b}->c;\n"); V("<?php print ${$b}->c;", "print ${$b}->c;\n"); V("<?php print $b[]->c;", "print $b[]->c;\n"); V("<?php print $b[$a]->c;", "print $b[$a]->c;\n"); V("<?php print $b{$a}->c;", "print $b[$a]->c;\n"); V("<?php print $b{$a}[]->c;", "print $b[$a][]->c;\n"); V("<?php print $b{$a}[$c]->c;", "print $b[$a][$c]->c;\n"); V("<?php print $b{$a}[$c]{$d}->c;", "print $b[$a][$c][$d]->c;\n"); V("<?php print $b{$a}[$c]{$d}->c[];", "print $b[$a][$c][$d]->c[];\n"); V("<?php print $b{$a}[$c]{$d}->c[$e];", "print $b[$a][$c][$d]->c[$e];\n"); V("<?php print $b{$a}[$c]{$d}->c{$e};", "print $b[$a][$c][$d]->c[$e];\n"); V("<?php print $b{$a}[$c]{$d}->c{$e}->f;", "print $b[$a][$c][$d]->c[$e]->f;\n"); V("<?php print $b{$a}[$c]{$d}->c{$e}->f[];", "print $b[$a][$c][$d]->c[$e]->f[];\n"); return true; } bool TestParserExpr::TestObjectMethodExpression() { V("<?php echo $b->c();", "echo $b->c();\n"); V("<?php echo ${b}->c();", "echo ${b}->c();\n"); V("<?php echo ${$b}->c();", "echo ${$b}->c();\n"); V("<?php echo $b[]->c();", "echo $b[]->c();\n"); V("<?php echo $b[$a]->c();", "echo $b[$a]->c();\n"); V("<?php echo $b{$a}->c();", "echo $b[$a]->c();\n"); V("<?php echo $b{$a}[]->c();", "echo $b[$a][]->c();\n"); V("<?php echo $b{$a}[$c]->c();", "echo $b[$a][$c]->c();\n"); V("<?php echo $b{$a}[$c]{$d}->c();", "echo $b[$a][$c][$d]->c();\n"); V("<?php echo $b{$a}[$c]{$d}->c[]();", "echo $b[$a][$c][$d]->c[]();\n"); V("<?php echo $b{$a}[$c]{$d}->c[$e]();", "echo $b[$a][$c][$d]->c[$e]();\n"); V("<?php echo $b{$a}[$c]{$d}->c{$e}();", "echo $b[$a][$c][$d]->c[$e]();\n"); V("<?php echo $b{$a}[$c]{$d}->c{$e}->f();", "echo $b[$a][$c][$d]->c[$e]->f();\n"); V("<?php echo $b{$a}[$c]{$d}->c{$e}->f[]();", "echo $b[$a][$c][$d]->c[$e]->f[]();\n"); V("<?php $b{$a}[$c]{$d}($p1,$p2)->c{$e}($p3,$p4)->f[]($p5,$p6);", "$b[$a][$c][$d]($p1, $p2)->c[$e]($p3, $p4)->f[]($p5, $p6);\n"); return true; } bool TestParserExpr::TestListAssignment() { V("<?php list() = 1;", "list() = 1;\n"); V("<?php list(,) = 1;", "list(, ) = 1;\n"); V("<?php list($a,) = 1;", "list($a, ) = 1;\n"); V("<?php list(,$b) = 1;", "list(, $b) = 1;\n"); V("<?php list($b) = 1;", "list($b) = 1;\n"); V("<?php list($a,$b) = 1;", "list($a, $b) = 1;\n"); V("<?php list($a,list($c),$b) = 1;", "list($a, list($c), $b) = 1;\n"); V("<?php list($a,list(),$b) = 1;", "list($a, list(), $b) = 1;\n"); return true; } bool TestParserExpr::TestNewObjectExpression() { V("<?php new Test;", "new test();\n"); V("<?php new $b();", "new $b();\n"); V("<?php new $b;", "new $b();\n"); return true; } bool TestParserExpr::TestUnaryOpExpression() { V("<?php clone $a;", "clone $a;\n"); V("<?php ++$a;", "++$a;\n"); V("<?php --$a;", "--$a;\n"); V("<?php $a++;", "$a++;\n"); V("<?php $a--;", "$a--;\n"); V("<?php +$a;", "+$a;\n"); V("<?php -$a;", "-$a;\n"); V("<?php !$a;", "!$a;\n"); V("<?php ~$a;", "~$a;\n"); V("<?php ($a);", "($a);\n"); V("<?php (int)$a;", "(int)$a;\n"); V("<?php (real)$a;", "(real)$a;\n"); V("<?php (string)$a;", "(string)$a;\n"); V("<?php (array)$a;", "(array)$a;\n"); V("<?php (object)$a;", "(object)$a;\n"); V("<?php (bool)$a;", "(bool)$a;\n"); V("<?php (unset)$a;", "(unset)$a;\n"); V("<?php exit;", "exit();\n"); V("<?php exit();", "exit();\n"); V("<?php exit($a);", "exit($a);\n"); V("<?php @$a;", "@$a;\n"); V("<?php array($a);", "array($a);\n"); V("<?php print $a;", "print $a;\n"); V("<?php isset($a);", "isset($a);\n"); V("<?php empty($a);", "empty($a);\n"); V("<?php include $a;", "include $a;\n"); V("<?php include_once 1;", "include_once 1;\n"); V("<?php eval($a);", "eval($a);\n"); V("<?php require $a;", "require $a;\n"); V("<?php require_once 1;", "require_once 1;\n"); return true; } bool TestParserExpr::TestBinaryOpExpression() { V("<?php $a += A;", "$a += A;\n"); V("<?php $a -= A;", "$a -= A;\n"); V("<?php $a *= A;", "$a *= A;\n"); V("<?php $a /= A;", "$a /= A;\n"); V("<?php $a .= A;", "$a .= A;\n"); V("<?php $a %= A;", "$a %= A;\n"); V("<?php $a &= A;", "$a &= A;\n"); V("<?php $a |= A;", "$a |= A;\n"); V("<?php $a ^= A;", "$a ^= A;\n"); V("<?php $a <<= A;", "$a <<= A;\n"); V("<?php $a >>= A;", "$a >>= A;\n"); V("<?php $a || A;", "$a || A;\n"); V("<?php $a && A;", "$a && A;\n"); V("<?php $a or A;", "$a or A;\n"); V("<?php $a and A;", "$a and A;\n"); V("<?php $a xor A;", "$a xor A;\n"); V("<?php $a | A;", "$a | A;\n"); V("<?php $a & A;", "$a & A;\n"); V("<?php $a ^ A;", "$a ^ A;\n"); V("<?php $a . A;", "$a . A;\n"); V("<?php $a + A;", "$a + A;\n"); V("<?php $a - A;", "$a - A;\n"); V("<?php $a * A;", "$a * A;\n"); V("<?php $a / A;", "$a / A;\n"); V("<?php $a % A;", "$a % A;\n"); V("<?php $a << A;", "$a << A;\n"); V("<?php $a >> A;", "$a >> A;\n"); V("<?php $a === A;", "$a === A;\n"); V("<?php $a !== A;", "$a !== A;\n"); V("<?php $a == A;", "$a == A;\n"); V("<?php $a != A;", "$a != A;\n"); V("<?php $a < A;", "$a < A;\n"); V("<?php $a <= A;", "$a <= A;\n"); V("<?php $a > A;", "$a > A;\n"); V("<?php $a >= A;", "$a >= A;\n"); V("<?php $a instanceof A;", "$a instanceof A;\n"); return true; } bool TestParserExpr::TestQOpExpression() { V("<?php $a ? 2 : 3;", "$a ? 2 : 3;\n"); return true; } bool TestParserExpr::TestArrayPairExpression() { V("<?php array();", "array();\n"); V("<?php array($a);", "array($a);\n"); V("<?php array($a, $b);", "array($a, $b);\n"); V("<?php array($a, $b,);", "array($a, $b);\n"); V("<?php array($a => $b);", "array($a => $b);\n"); V("<?php array($a => $b, $c => $d);", "array($a => $b, $c => $d);\n"); V("<?php array($a => $b, $c => $d,);", "array($a => $b, $c => $d);\n"); V("<?php array(&$a);", "array(&$a);\n"); V("<?php array(&$a, &$b);", "array(&$a, &$b);\n"); V("<?php array($a => &$b);", "array($a => &$b);\n"); V("<?php array($a => &$b, $c => &$d);", "array($a => &$b, $c => &$d);\n"); V("<?php function a() { static $a = array();}", "function a() {\n static $a = array();\n}\n"); V("<?php function a() { static $a = array(a);}", "function a() {\n static $a = array(a);\n}\n"); V("<?php function a() { static $a = array(a, b);}", "function a() {\n static $a = array(a, b);\n}\n"); V("<?php function a() { static $a = array(a, b,);}", "function a() {\n static $a = array(a, b);\n}\n"); V("<?php function a() { static $a = array(a => b);}", "function a() {\n static $a = array(a => b);\n}\n"); V("<?php function a() { static $a = array(a => b, c => d);}", "function a() {\n static $a = array(a => b, c => d);\n}\n"); V("<?php function a() { static $a = array(a => b, c => d,);}", "function a() {\n static $a = array(a => b, c => d);\n}\n"); return true; } bool TestParserExpr::TestClassConstantExpression() { V("<?php function a() { static $a = A::b;}", "function a() {\n static $a = a::b;\n}\n"); return true; } bool TestParserExpr::TestParameterExpression() { V("<?php function a() {}", "function a() {\n}\n"); V("<?php function a($a) {}", "function a($a) {\n}\n"); V("<?php function a($a,$b) {}", "function a($a, $b) {\n}\n"); V("<?php function a(&$a) {}", "function a(&$a) {\n}\n"); V("<?php function a(&$a,$b) {}", "function a(&$a, $b) {\n}\n"); V("<?php function a($a,&$b) {}", "function a($a, &$b) {\n}\n"); V("<?php function a(TT $a) {}", "function a(tt $a) {\n}\n"); V("<?php function a(array $a) {}", "function a(array $a) {\n}\n"); V("<?php function a($a=1) {}", "function a($a = 1) {\n}\n"); V("<?php function a($a=1,$b) {}", "function a($a = 1, $b = null) {\n}\n"); V("<?php function a($a,$b=1) {}", "function a($a, $b = 1) {\n}\n"); return true; } bool TestParserExpr::TestModifierExpression() { V("<?php class a { public $a;}", "class a {\n public $a = null;\n}\n"); V("<?php class a { protected $a;}", "class a {\n protected $a = null;\n}\n"); V("<?php class a { private $a;}", "class a {\n private $a = null;\n}\n"); V("<?php class a { static $a;}", "class a {\n static $a = null;\n}\n"); V("<?php class a { abstract $a;}", "class a {\n abstract $a = null;\n}\n"); V("<?php class a { final $a;}", "class a {\n final $a = null;\n}\n"); V("<?php class a { public static $a;}", "class a {\n public static $a = null;\n}\n"); return true; } bool TestParserExpr::TestConstant() { V("<?php class a { const A = 1;}", "class a {\n const A = 1;\n}\n"); V("<?php class a { const A=1,B=2;}","class a {\n const A = 1, B = 2;\n}\n"); return true; } bool TestParserExpr::TestEncapsListExpression() { V("<?php '\\'\\\\\\\"';", "\"'\\\\\\\\\".'\"';\n"); V("<?php '$a$b';", "'$a$b';\n"); V("<?php \"$a$b\";", "$a . $b;\n"); V("<?php <<<EOM\n$a$b\nEOM;\n", "$a . $b . '';\n"); V("<?php `$a$b`;", "shell_exec($a . $b);\n"); V("<?php \"[\\b$/\";", "'['.\"\\\\\".'b$/';\n"); V("<?php \"]\\b$/\";", "']'.\"\\\\\".'b$/';\n"); V("<?php \"{\\b$/\";", "'{'.\"\\\\\".'b$/';\n"); V("<?php \"}\\b$/\";", "'}'.\"\\\\\".'b$/';\n"); V("<?php \"->\\b$/\";", "'->'.\"\\\\\".'b$/';\n"); V("<?php \"$a[b]\";", "$a['b'];\n"); V("<?php \"\\\"\";", "'\"';\n"); V("<?php \"\\n\";", "\"\\n\";\n"); V("<?php \"\\n$a\";", "\"\\n\" . $a;\n"); V("<?php \"\\\"$a\";", "'\"' . $a;\n"); V("<?php \"\\$a\";", "'$a';\n"); V("<?php \"${a}\";", "$a;\n"); return true; }
42.024194
80
0.398196
paramah
d7d8c3d0b913511300546c46a03953144eb644bc
1,121
hpp
C++
engine/include/xe/gfx/framebuffer.hpp
trbflxr/x808
d5ab9e96c5a6109283151a591c261e4183628075
[ "MIT" ]
null
null
null
engine/include/xe/gfx/framebuffer.hpp
trbflxr/x808
d5ab9e96c5a6109283151a591c261e4183628075
[ "MIT" ]
null
null
null
engine/include/xe/gfx/framebuffer.hpp
trbflxr/x808
d5ab9e96c5a6109283151a591c261e4183628075
[ "MIT" ]
null
null
null
// // Created by FLXR on 8/8/2018. // #ifndef X808_FRAMEBUFFER_HPP #define X808_FRAMEBUFFER_HPP #include <unordered_map> #include <xe/gfx/texture.hpp> namespace xe { namespace internal { class PlatformFrameBuffer; } class XE_API FrameBuffer { public: explicit FrameBuffer(const string &name); ~FrameBuffer(); void load(const std::unordered_map<Attachment, const Texture *> &attachments); void copy(FrameBuffer *dest); void bindDrawAttachment(Attachment attachment) const; void bindDrawAttachments(Attachment *attachments, uint size) const; void bindReadAttachment(Attachment attachment) const; void bindDraw(Attachment attachment) const; void bindDraw(Attachment *attachments, uint size) const; void bindRead(Attachment attachment) const; void unbind() const; void bindTexture(Attachment attachment, const Texture *texture) const; uint getHandle() const; const string &getName() const; const Texture *getTexture(Attachment attachment) const; private: internal::PlatformFrameBuffer *buffer; }; } #endif //X808_FRAMEBUFFER_HPP
22.42
82
0.734166
trbflxr
d7d9a9b77bc897d28a739d934517a1a4ed23375b
1,702
hpp
C++
client/Controller/Exceptions.hpp
iElden/RConsole
77aaad891327ccc93c1b7c48f41be6e462983b17
[ "MIT" ]
null
null
null
client/Controller/Exceptions.hpp
iElden/RConsole
77aaad891327ccc93c1b7c48f41be6e462983b17
[ "MIT" ]
null
null
null
client/Controller/Exceptions.hpp
iElden/RConsole
77aaad891327ccc93c1b7c48f41be6e462983b17
[ "MIT" ]
null
null
null
// // Created by Gegel85 on 30/06/2020. // #ifndef RCONSOLE_CONTROLLER_EXCEPTIONS_HPP #define RCONSOLE_CONTROLLER_EXCEPTIONS_HPP #include <string> #include "../Exceptions.hpp" namespace RC::Client::Controller { class ControllerException : public ClientException { public: ControllerException(const std::string &&msg): ClientException(static_cast<const std::string &&>(msg)) {}; }; class InvalidHandshakeException : public ControllerException { public: InvalidHandshakeException(const std::string &&msg): ControllerException(static_cast<const std::string &&>(msg)) {}; }; class SocketNotReadyException : public ControllerException { public: SocketNotReadyException(): ControllerException("The socket is not ready") {}; }; class DisconnectedException : public ControllerException { public: DisconnectedException(): ControllerException("The socket is not connected") {}; }; class SocketErrorException : public ControllerException { public: SocketErrorException(): ControllerException("The socket encountered an unexpected error") {}; }; class BindFailedException : public ControllerException { public: BindFailedException(unsigned short port, const std::string &msg): ControllerException("Binding on port " + std::to_string(port) + " UDP failed: " + msg) {}; }; class TimeOutException : public ControllerException { public: TimeOutException(size_t time): ControllerException("Connection timed out after " + std::to_string(time) + " second(s)") {}; }; class NotConnectedException : public ControllerException { public: NotConnectedException(): ControllerException("The controller is not connected.") {}; }; } #endif //RCONSOLE_CONTROLLER_EXCEPTIONS_HPP
29.859649
158
0.759107
iElden
d7da649564f7783142a2ed74288a07ebdf6b16c7
1,668
hpp
C++
EdenEngine/ComponentHeader/EditorGUI.hpp
HuajiKojima/EdenEngine
9445df98b3735570ded80ca018c01db1819fc944
[ "MIT" ]
null
null
null
EdenEngine/ComponentHeader/EditorGUI.hpp
HuajiKojima/EdenEngine
9445df98b3735570ded80ca018c01db1819fc944
[ "MIT" ]
null
null
null
EdenEngine/ComponentHeader/EditorGUI.hpp
HuajiKojima/EdenEngine
9445df98b3735570ded80ca018c01db1819fc944
[ "MIT" ]
null
null
null
// Eden Engine #pragma once #ifndef EDEN_EDITOR_GUI #define EDEN_EDITOR_GUI #include "DevelopmentKit/ImGui/imgui.h" #include "DevelopmentKit/ImGui/imgui_impl_glfw.h" #include "DevelopmentKit/ImGui/imgui_impl_opengl3.h" #include <GLFW/glfw3.h> #define EDEN_GUI_CLASSIC 0 #define EDEN_GUI_DARK 1 #define EDEN_GUI_LIGHT 2 namespace EDEN { void GUIInit(GLFWwindow *window, int editorStyle, const char *editorFont); void GUINewFrame(); void GUIRender(); void GUIShutdown(); void GUIInit(GLFWwindow *window, int editorStyle, const char *editorFont) { IMGUI_CHECKVERSION(); ImGui::CreateContext(); ImGuiIO & io = ImGui::GetIO(); (void)io; io.Fonts->AddFontFromFileTTF(editorFont, 24.0f, NULL, io.Fonts->GetGlyphRangesChineseFull()); // Init Editor Style //----------------------------------------------------------------------------------------------- switch (editorStyle) { case EDEN_GUI_CLASSIC: ImGui::StyleColorsClassic(); break; case EDEN_GUI_DARK: ImGui::StyleColorsDark(); break; case EDEN_GUI_LIGHT: ImGui::StyleColorsLight(); break; default: // Throw the exception break; } //----------------------------------------------------------------------------------------------- ImGui_ImplGlfw_InitForOpenGL(window, true); ImGui_ImplOpenGL3_Init("#version 330"); } void GUINewFrame() { ImGui_ImplOpenGL3_NewFrame(); ImGui_ImplGlfw_NewFrame(); ImGui::NewFrame(); } void GUIRender() { ImGui::Render(); ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); } void GUIShutdown() { ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); } } #endif
23.166667
99
0.645084
HuajiKojima
d7dc304a0965470e8bc5fc1224291e205ed68e0d
132
cc
C++
src/code_writen_when_learning/boost/boost_assert/1/main.cc
NobodyXu/snippet
8f0308e48dab1d166dc9e5ff43b00db2d35b616b
[ "MIT" ]
1
2019-04-02T04:38:15.000Z
2019-04-02T04:38:15.000Z
src/code_writen_when_learning/boost/boost_assert/1/main.cc
NobodyXu/snippet
8f0308e48dab1d166dc9e5ff43b00db2d35b616b
[ "MIT" ]
null
null
null
src/code_writen_when_learning/boost/boost_assert/1/main.cc
NobodyXu/snippet
8f0308e48dab1d166dc9e5ff43b00db2d35b616b
[ "MIT" ]
null
null
null
#define BOOST_DISABLE_ASSERTS #include "1.hpp" #undef BOOST_DISABLE_ASSERTS #include "2.hpp" int main() { A::F(); B::F(); }
14.666667
29
0.651515
NobodyXu
d7e8f956541e660cb9911c92aba3612797edb98c
1,623
hpp
C++
attic/src/main/include/fmp/utils.hpp
yamasdais/asaki-yumemishi
d6220e489da613a634e6ce474a869f5d2932f89d
[ "BSL-1.0" ]
null
null
null
attic/src/main/include/fmp/utils.hpp
yamasdais/asaki-yumemishi
d6220e489da613a634e6ce474a869f5d2932f89d
[ "BSL-1.0" ]
8
2017-09-28T14:39:37.000Z
2021-03-09T22:55:55.000Z
attic/src/main/include/fmp/utils.hpp
yamasdais/asaki-yumemishi
d6220e489da613a634e6ce474a869f5d2932f89d
[ "BSL-1.0" ]
null
null
null
// Copyright Yamashta, Daisuke 2017 // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #if !defined(FMP_34923AEE_9F31_49B2_AD8D_D975BE25512D) #define FMP_34923AEE_9F31_49B2_AD8D_D975BE25512D #include <fmp/primitive.hpp> #include <fmp/utils_fwd.hpp> #include <fmp/apply.hpp> #include <fmp/sequence.hpp> namespace fmp { template <typename T> using head_t = typename head<T>::type; template <typename F> struct get_mf { using type = undefined_type; }; template <template <class...> typename F, typename... A> struct get_mf<F<A...>> { template <typename... P> using type = F<P...>; }; template <typename F, typename A0, typename A1> struct flip { using type = apply_t<F, A1, A0>; }; template <template <class...> typename C, typename... A> using flipf = make_curried_hf<flip, C, A...>; template <typename... T> struct first { using type = head_t<sequence<T...>>; }; template <typename... T> using first_t = typename first<T...>::type; template <typename... Args> struct apply_args { template <typename... F> using apply = id<apply_t<first_t<F...>, Args...>>; }; template <template <class...> typename Src, template <class...> typename Dest, typename... P> struct copy<Src<P...>, Dest> { using type = Dest<P...>; }; template <typename Src, template <class...> typename Dest > using copy_t = typename copy<Src, Dest>::type; } /* ns: fmp */ #endif /* if not defined 'FMP_34923AEE_9F31_49B2_AD8D_D975BE25512D' */
23.521739
70
0.661121
yamasdais
d7eb22608da22edc3c6fdcb9b0988d71deaa9c6f
399
cpp
C++
Cplus/MaximumNumberofBalloons.cpp
JumHorn/leetcode
1447237ae8fc3920b19f60b30c71a84b088cc200
[ "MIT" ]
1
2018-01-22T12:06:28.000Z
2018-01-22T12:06:28.000Z
Cplus/MaximumNumberofBalloons.cpp
JumHorn/leetcode
1447237ae8fc3920b19f60b30c71a84b088cc200
[ "MIT" ]
null
null
null
Cplus/MaximumNumberofBalloons.cpp
JumHorn/leetcode
1447237ae8fc3920b19f60b30c71a84b088cc200
[ "MIT" ]
null
null
null
#include <algorithm> #include <climits> #include <string> #include <unordered_map> using namespace std; class Solution { public: int maxNumberOfBalloons(string text) { unordered_map<char, int> m; //{char,count} for (auto c : text) ++m[c]; int res = INT_MAX; m['l'] /= 2; m['o'] /= 2; string balloon = "balloon"; for (auto c : balloon) res = min(res, m[c]); return res; } };
17.347826
44
0.62406
JumHorn
d7ef421d8abdee626af4096012e776b6e3bd8f5c
1,569
cpp
C++
10-23/hideAndSeek.cpp
hanzhi713/data
ca1da71334b47154efc27fd0d97ace0daa5f0758
[ "MIT" ]
null
null
null
10-23/hideAndSeek.cpp
hanzhi713/data
ca1da71334b47154efc27fd0d97ace0daa5f0758
[ "MIT" ]
null
null
null
10-23/hideAndSeek.cpp
hanzhi713/data
ca1da71334b47154efc27fd0d97ace0daa5f0758
[ "MIT" ]
null
null
null
/** * To compile and run: * clang++ -o h h.cpp && ./h */ #include <bits/stdc++.h> #define ll long long using namespace std; ll x1, y_1, x2, y2; bool cut(ll x, ll y){ if(x >= x1 && x <= x2 && y >= y_1 && y <= y2){ return true; } return false; } int main(){ ll xb, yb; cin>>xb>>yb>>x1>>y_1>>x2>>y2; ll gcd = __gcd(xb, yb); ll unit_x = xb / gcd; ll unit_y = yb / gcd; bool flag = false; if(gcd == 1){ cout<<"Yes"<<endl; }else if(!cut(unit_x, unit_y)){ cout<<"No"<<endl; cout<<unit_x<<" "<<unit_y<<endl; }else{ if(cut(xb, yb) || cut(xb - unit_x, yb - unit_y)){ cout<<"Yes"<<endl; }else{ cout<<"No"<<endl; double y_intercept = ((double)x2 / (double)unit_x) * unit_y; double x_intercept = ((double)y2 / (double)unit_y) * unit_x; if(y_intercept > y_1 && y_intercept < y2){ ll n = x2 / unit_x; cout<<(n + 1) * unit_x <<" "<<(n + 1) * unit_y<<endl; }else{ ll n = y2 / unit_y; cout<<(n + 1) * unit_x <<" "<<(n + 1) * unit_y<<endl; } } } // for(ll i = 1; i < gcd; i++){ // ll tx = i * unit_x; // ll ty = i * unit_y; // if(!cut(tx, ty)){ // cout<<"No"<<endl; // cout<<tx<<" "<<ty<<endl; // flag = true; // break; // } // } // cout<<gcd<<endl; // if(!flag){ // cout<<"Yes"<<endl; // } return 0; }
22.73913
72
0.41109
hanzhi713
d7f0d2fc58ddbc364e7fd1e3b7727940141a5c29
2,767
cpp
C++
unity-screen-capture-plugin/dllmain.cpp
BillWCJ/unity-windows-screen-capture
a8cbadb7d0607b3d3f69673e2f5ded377d4cc620
[ "MIT" ]
null
null
null
unity-screen-capture-plugin/dllmain.cpp
BillWCJ/unity-windows-screen-capture
a8cbadb7d0607b3d3f69673e2f5ded377d4cc620
[ "MIT" ]
null
null
null
unity-screen-capture-plugin/dllmain.cpp
BillWCJ/unity-windows-screen-capture
a8cbadb7d0607b3d3f69673e2f5ded377d4cc620
[ "MIT" ]
null
null
null
#include "pch.h" BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } /* // debug event static FuncPtr s_debug; extern "C" void UNITY_INTERFACE_EXPORT SetDebugFunction(FuncPtr debug) { s_debug = debug; } // -------------------------------------------------------------------------- // UnitySetInterfaces static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType eventType); static IUnityInterfaces* s_UnityInterfaces = NULL; static IUnityGraphics* s_Graphics = NULL; extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces * unityInterfaces) { std::cout << "Starting Plugin" << std::endl; s_UnityInterfaces = unityInterfaces; s_Graphics = s_UnityInterfaces->Get<IUnityGraphics>(); s_Graphics->RegisterDeviceEventCallback(OnGraphicsDeviceEvent); // Run OnGraphicsDeviceEvent(initialize) manually on plugin load OnGraphicsDeviceEvent(kUnityGfxDeviceEventInitialize); } extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload() { s_Graphics->UnregisterDeviceEventCallback(OnGraphicsDeviceEvent); } // -------------------------------------------------------------------------- // GraphicsDeviceEvent static PluginManager* s_CurrentAPI = NULL; static UnityGfxRenderer s_DeviceType = kUnityGfxRendererNull; static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType eventType) { // Create graphics API implementation upon initialization if (eventType == kUnityGfxDeviceEventInitialize) { assert(s_CurrentAPI == NULL); s_DeviceType = s_Graphics->GetRenderer(); s_CurrentAPI = CreatePluginManager(s_DeviceType, s_debug, s_UnityInterfaces); } // Let the implementation process the device related events if (s_CurrentAPI) { s_CurrentAPI->ProcessDeviceEvent(eventType, s_UnityInterfaces); } // Cleanup graphics API implementation upon shutdown if (eventType == kUnityGfxDeviceEventShutdown) { delete s_CurrentAPI; s_CurrentAPI = NULL; s_DeviceType = kUnityGfxRendererNull; } } static void UNITY_INTERFACE_API OnRenderEvent(int eventID) { // Unknown / unsupported graphics device type? Do nothing if (s_CurrentAPI == NULL) return; //DrawColoredTriangle(); //ModifyTexturePixels(); //ModifyVertexBuffer(); } // -------------------------------------------------------------------------- // GetRenderEventFunc, an example function we export which is used to get a rendering event callback function. extern "C" UnityRenderingEvent UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API GetRenderEventFunc() { return OnRenderEvent; } */
26.605769
110
0.73184
BillWCJ
d7f5defa2bf394c33ebe012669b294fe54c34af2
2,358
hpp
C++
src/hardware/memory/register.hpp
geaz/emu-gameboy
da8a3e6898a0075dcb4371eb772e31695300ae54
[ "MIT" ]
47
2019-10-12T14:23:47.000Z
2022-03-22T03:31:43.000Z
src/hardware/memory/register.hpp
geaz/emu-gameboy
da8a3e6898a0075dcb4371eb772e31695300ae54
[ "MIT" ]
null
null
null
src/hardware/memory/register.hpp
geaz/emu-gameboy
da8a3e6898a0075dcb4371eb772e31695300ae54
[ "MIT" ]
2
2021-09-20T20:47:21.000Z
2021-10-12T12:10:46.000Z
#pragma once #ifndef REGISTER_H #define REGISTER_H #include <string> namespace GGB::Hardware { template <class T> class Register { public: Register(const T initialValue); T read(); uint8_t readBit(const uint8_t bitNr); void writeBit(const uint8_t bitNr, const bool bitValue); void operator=(T newValue); void operator+=(T addValue); void operator-=(T subValue); void operator++(int ignored); void operator--(int ignored); private: T value = 0; }; template<class T> Register<T>::Register(const T initialValue) : value(initialValue) { } template<class T> T Register<T>::read() { return value; } template<class T> uint8_t Register<T>::readBit(const uint8_t bitNr) { return (value >> bitNr) & 0x1; } template<class T> void Register<T>::writeBit(const uint8_t bitNr, const bool bitValue) { if(bitValue) value |= (0x1 << bitNr); else value &= ~(0x1 << bitNr); } template<class T> void Register<T>::operator=(T newValue) { value = newValue; } template<class T> void Register<T>::operator+=(T addValue) { value += addValue; } template<class T> void Register<T>::operator-=(T subValue) { value -= subValue; } template<class T> void Register<T>::operator++(int ignored) { value ++; } template<class T> void Register<T>::operator--(int ignored) { value --; } class RegisterPair { public: RegisterPair(Register<uint8_t>& high, Register<uint8_t>& low) : high(high), low(low) { } void write(uint16_t newValue) { high = (newValue & 0xFF00) >> 8; low = (newValue & 0x00FF); } uint16_t read() { return (high.read() << 8) | low.read(); } void operator++(int ignored) { uint16_t combined = read(); combined++; write(combined); } void operator--(int ignored) { uint16_t combined = read(); combined--; write(combined); } private: Register<uint8_t>& high; Register<uint8_t>& low; }; } #endif // REGISTER_H
31.44
163
0.534775
geaz
d7f93776653b25a3465ac8fefd089c38b6d4401e
382
hpp
C++
examples/12_pubsvc/generated/src/NECommon.hpp
Ali-Nasrolahi/areg-sdk
4fbc2f2644220196004a31672a697a864755f0b6
[ "Apache-2.0" ]
70
2021-07-20T11:26:16.000Z
2022-03-27T11:17:43.000Z
examples/12_pubsvc/generated/src/NECommon.hpp
Ali-Nasrolahi/areg-sdk
4fbc2f2644220196004a31672a697a864755f0b6
[ "Apache-2.0" ]
32
2021-07-31T05:20:44.000Z
2022-03-20T10:11:52.000Z
examples/12_pubsvc/generated/src/NECommon.hpp
Ali-Nasrolahi/areg-sdk
4fbc2f2644220196004a31672a697a864755f0b6
[ "Apache-2.0" ]
40
2021-11-02T09:45:38.000Z
2022-03-27T11:17:46.000Z
#pragma once /************************************************************************ * \file generated/src/NECommon.hpp * \ingroup 12_pubsvc * \brief Namespace contains common constants. ************************************************************************/ namespace NECommon { constexpr char ServiceHelloName[] { "ServiceHello" }; }
29.384615
74
0.387435
Ali-Nasrolahi
d7fb35577f44d1f67139fd49e9a7e9af1d4d0987
3,946
cpp
C++
tmain_form.cpp
stasinek/Koperek
35b241fe37d7e1b3b0215368b0e35c43c3c16660
[ "BSD-2-Clause" ]
null
null
null
tmain_form.cpp
stasinek/Koperek
35b241fe37d7e1b3b0215368b0e35c43c3c16660
[ "BSD-2-Clause" ]
null
null
null
tmain_form.cpp
stasinek/Koperek
35b241fe37d7e1b3b0215368b0e35c43c3c16660
[ "BSD-2-Clause" ]
null
null
null
/*Koperek32(R) Copyright (c) Stanislaw Stasiak, sstoft@wp.pl <2014> All rights reserved. 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. Permission is granted to anyone use this software for any purpose, including commercial application, and to alter it, and may be redistributed freely, in subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 2. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. This notice may not be removed or altered from any source distribution. */ #include "tmain_form.h" #include "ui_tmain_form.h" #include "../Kop32/kop32_main.h" TMain_form::TMain_form(QWidget *a_parent) : QDialog(a_parent), ui(new Ui::TMain_form) { ui->setupUi(this); ui->tableWidget->setColumnCount(3); QStringList Header; Header << "Path"; Header << "Name"; Header << "Size"; ui->tableWidget->setHorizontalHeaderLabels(Header); ui->tableWidget->setAlternatingRowColors(true); //ui->Animation_graphicsView->setScene(Application->FileAnimationScene); //ui->Chart_graphicsView->setScene(Application->FileChartScene); ui->Animation_graphicsView->setVisible(0); // QWidget *p = ui->Animation_graphicsView->parentWidget(); // while (p) { // p->adjustSize(); // p = parent->parentWidget(); // } ui->toolButton_F->click(); //ui->verticalLayout_4->setSizeConstraint(QLayout::SetFixedSize); } TMain_form::~TMain_form() { delete ui; } /* bool TMain_form::nativeEvent(const QByteArray& eventType, void* message, long* result) { return QWidget::nativeEvent(eventType,message,result); MSG *msg = reinterpret_cast<MSG*>(message); switch (msg->message) { case WM_NCLBUTTONDOWN: //return false; break; default: break; } *result = 0; return QWidget::nativeEvent(eventType,message,result); } */ void TMain_form::on_toolButton_F_clicked(bool checked) { //ui->verticalLayout_4->setSizeConstraint(QLayout::SetFixedSize); if (checked) ui->widget_5->setVisible(1); else ui->widget_5->setVisible(0); QWidget *p = ui->widget_5->parentWidget(); while (p) { p->adjustSize(); p = p->parentWidget(); } } void TMain_form::on_tableWidget_2_cellChanged(int row, int column) { ui->stackedWidget->setCurrentIndex(row); } void TMain_form::on_progressBar_1_valueChanged(int value) { } void TMain_form::on_progressBar_2_valueChanged(int value) { } void TMain_form::on_toolButton_2_clicked(bool checked) { } void TMain_form::on_toolButton_3_clicked() { Application->Finished = true; reject(); } void TMain_form::on_toolButton_MENU_clicked() { Application->Menu->exec( QWidget::mapToGlobal(ui->toolButton_MENU->pos()+QPoint(ui->toolButton_MENU->width(),0))); } void TMain_form::showEvent(QShowEvent *e) { //static int first = 0; Application->MenuActions_SwitchToMainWindow->setEnabled(0); Application->MenuActions_SwitchToMiniWindow->setEnabled(1); Application->MenuActions_SwitchToConsoleWindow->setEnabled(1); QDialog::showEvent(e); //if (!first); //first = 1; } void TMain_form::hideEvent(QHideEvent *e) { if (Application->Finished) Application->closeAllWindows(); }
34.313043
460
0.714901
stasinek
d7ff5d4fd97327cc62a6fd222e54de480b4a9c0c
290
hpp
C++
TreeWalkInterpreter/includes/Stmt/ExprStmt.hpp
dipeshkaphle/Lox-cpp
9c73987f08aa366234b291df938261f5592a140f
[ "MIT" ]
null
null
null
TreeWalkInterpreter/includes/Stmt/ExprStmt.hpp
dipeshkaphle/Lox-cpp
9c73987f08aa366234b291df938261f5592a140f
[ "MIT" ]
null
null
null
TreeWalkInterpreter/includes/Stmt/ExprStmt.hpp
dipeshkaphle/Lox-cpp
9c73987f08aa366234b291df938261f5592a140f
[ "MIT" ]
null
null
null
#pragma once #include "Stmt.hpp" #include "StmtVisitor.hpp" #include "includes/Expr/Expr.hpp" #include <memory> class expr_stmt : public Stmt { public: std::unique_ptr<Expr> expr; expr_stmt(std::unique_ptr<Expr> expr); std::any accept(stmt_visitor<std::any> &visitor) override; };
19.333333
60
0.724138
dipeshkaphle
cc0292e649925aa7477e0379208870b2960160e7
12,879
cpp
C++
src/xrCore/XML/XMLDocument.cpp
clayne/xray-16
32ebf81a252c7179e2824b2874f911a91e822ad1
[ "OML", "Linux-OpenIB" ]
2
2015-02-23T10:43:02.000Z
2015-06-11T14:45:08.000Z
src/xrCore/XML/XMLDocument.cpp
clayne/xray-16
32ebf81a252c7179e2824b2874f911a91e822ad1
[ "OML", "Linux-OpenIB" ]
17
2022-01-25T08:58:23.000Z
2022-03-28T17:18:28.000Z
src/xrCore/XML/XMLDocument.cpp
clayne/xray-16
32ebf81a252c7179e2824b2874f911a91e822ad1
[ "OML", "Linux-OpenIB" ]
1
2015-06-05T20:04:00.000Z
2015-06-05T20:04:00.000Z
#include "stdafx.h" #include "XMLDocument.hpp" pcstr UI_PATH = UI_PATH_DEFAULT; pcstr UI_PATH_WITH_DELIMITER = UI_PATH_DEFAULT_WITH_DELIMITER; XMLDocument::XMLDocument() : m_xml_file_name(), m_root(nullptr), m_pLocalRoot(nullptr) {} XMLDocument::~XMLDocument() { ClearInternal(); } void XMLDocument::ClearInternal() { m_Doc.Clear(); } void ParseFile(pcstr path, CMemoryWriter& W, IReader* F, XMLDocument* xml) { string4096 str; const auto tryOpenFile = [&](IReader*& file, pcstr includeName, pcstr comparePath, pcstr uiPath, pcstr uiPathDelim) { if (file) return; if (includeName == strstr(includeName, comparePath)) { shared_str fn = xml->correct_file_name(uiPath, strchr(includeName, _DELIMITER) + 1); string_path buff; strconcat(buff, uiPathDelim, fn.c_str()); file = FS.r_open(path, buff); } }; while (!F->eof()) { F->r_string(str, sizeof str); if (str[0] && str[0] == '#' && strstr(str, "#include")) { string256 inc_name; if (_GetItem(str, 1, inc_name, '"')) { IReader* I = nullptr; tryOpenFile(I, inc_name, UI_PATH, UI_PATH, UI_PATH_WITH_DELIMITER); tryOpenFile(I, inc_name, UI_PATH_DEFAULT_WITH_DELIMITER, UI_PATH, UI_PATH_WITH_DELIMITER); tryOpenFile(I, inc_name, UI_PATH_DEFAULT_WITH_DELIMITER, UI_PATH_DEFAULT, UI_PATH_DEFAULT_WITH_DELIMITER); if (!I) I = FS.r_open(path, inc_name); if (!I) FATAL_F("XML file[%s] parsing failed. Can't find include file: [%s]", path, inc_name); ParseFile(path, W, I, xml); FS.r_close(I); } } else W.w_string(str); } } bool XMLDocument::Load(pcstr path_alias, pcstr path, pcstr xml_filename, bool fatal) { shared_str fn = correct_file_name(path, xml_filename); string_path str; xr_sprintf(str, "%s" DELIMITER "%s", path, *fn); return Load(path_alias, str, fatal); } // Try to load from the first path, and if it's failed then try the second one bool XMLDocument::Load(pcstr path_alias, pcstr path, pcstr path2, pcstr xml_filename, bool fatal /*= true*/) { shared_str fn = correct_file_name(path, xml_filename); string_path str; xr_sprintf(str, "%s" DELIMITER "%s", path, *fn); if (Load(path_alias, str, false)) return true; fn = correct_file_name(path2, xml_filename); xr_sprintf(str, "%s" DELIMITER "%s", path2, *fn); return Load(path_alias, str, fatal); } // Load and parse xml file bool XMLDocument::Load(pcstr path, pcstr xml_filename, bool fatal) { IReader* F = FS.r_open(path, xml_filename); if (!F) { R_ASSERT3(!fatal, "Can't find specified xml file", xml_filename); return false; } xr_strcpy(m_xml_file_name, xml_filename); CMemoryWriter W; ParseFile(path, W, F, this); W.w_stringZ(""); FS.r_close(F); return Set(reinterpret_cast<pcstr>(W.pointer()), fatal); } bool XMLDocument::Set(pcstr text, bool fatal) { R_ASSERT(text != nullptr); m_Doc.Parse(&m_Doc, text); if (m_Doc.Error()) { const bool canSkipError = IgnoringMissingEndTagError() && m_Doc.ErrorId() == TiXmlBase::TIXML_ERROR_READING_END_TAG; R_ASSERT3(!fatal || canSkipError, m_Doc.ErrorDesc(), m_xml_file_name); if (!canSkipError) return false; } m_root = m_Doc.FirstChildElement(); return true; } XML_NODE XMLDocument::NavigateToNode(CONST_XML_NODE start_node, pcstr path, const size_t node_index) const { R_ASSERT3(start_node && path, "NavigateToNode failed in XML file ", m_xml_file_name); CONST_XML_NODE node{}; string_path buf_str; VERIFY(xr_strlen(path) < 200); buf_str[0] = 0; xr_strcpy(buf_str, path); const char seps[] = ":"; size_t tmp = 0; //разбить путь на отдельные подпути char* token = strtok(buf_str, seps); if (token != nullptr) { node = start_node->FirstChild(token); while (tmp++ < node_index && node) node = node->NextSibling(token); } while (token) { // Get next token: token = strtok(nullptr, seps); if (token != nullptr) if (node) { CONST_XML_NODE node_parent = node; node = node_parent->FirstChild(token); } } return const_cast<XML_NODE>(node); } XML_NODE XMLDocument::NavigateToNode(pcstr path, const size_t node_index) const { return NavigateToNode(GetLocalRoot() ? GetLocalRoot() : GetRoot(), path, node_index); } XML_NODE XMLDocument::NavigateToNodeWithAttribute(pcstr tag_name, pcstr attrib_name, pcstr attrib_value) { CONST_XML_NODE root = GetLocalRoot() ? GetLocalRoot() : GetRoot(); int tabsCount = GetNodesNum(root, tag_name); for (int i = 0; i < tabsCount; ++i) { pcstr result = ReadAttrib(root, tag_name, i, attrib_name, ""); if (result && xr_strcmp(result, attrib_value) == 0) { return NavigateToNode(root, tag_name, i); } } return nullptr; } pcstr XMLDocument::Read(pcstr path, const size_t index, pcstr default_str_val) const { CONST_XML_NODE node = NavigateToNode(path, index); pcstr result = Read(node, default_str_val); return result; } pcstr XMLDocument::Read(CONST_XML_NODE start_node, pcstr path, const size_t index, pcstr default_str_val) const { CONST_XML_NODE node = NavigateToNode(start_node, path, index); pcstr result = Read(node, default_str_val); return result; } pcstr XMLDocument::Read(CONST_XML_NODE node, pcstr default_str_val) const { if (!node) return default_str_val; node = node->FirstChild(); if (!node) return default_str_val; const auto text = node->ToText(); if (text) return text->Value(); return default_str_val; } int XMLDocument::ReadInt(CONST_XML_NODE node, const int default_int_val) const { pcstr result_str = Read(node, nullptr); if (result_str == nullptr) return default_int_val; return atoi(result_str); } int XMLDocument::ReadInt(pcstr path, const size_t index, const int default_int_val) const { pcstr result_str = Read(path, index, nullptr); if (result_str == nullptr) return default_int_val; return atoi(result_str); } int XMLDocument::ReadInt(CONST_XML_NODE start_node, pcstr path, const size_t index, const int default_int_val) const { pcstr result_str = Read(start_node, path, index, nullptr); if (result_str == nullptr) return default_int_val; return atoi(result_str); } float XMLDocument::ReadFlt(pcstr path, const size_t index, float default_flt_val) const { pcstr result_str = Read(path, index, nullptr); if (result_str == nullptr) return default_flt_val; return static_cast<float>(atof(result_str)); } float XMLDocument::ReadFlt(CONST_XML_NODE start_node, pcstr path, const size_t index, float default_flt_val) const { pcstr result_str = Read(start_node, path, index, nullptr); if (result_str == nullptr) return default_flt_val; return static_cast<float>(atof(result_str)); } float XMLDocument::ReadFlt(CONST_XML_NODE node, float default_flt_val) const { pcstr result_str = Read(node, nullptr); if (result_str == nullptr) return default_flt_val; return static_cast<float>(atof(result_str)); } pcstr XMLDocument::ReadAttrib(CONST_XML_NODE start_node, pcstr path, const size_t index, pcstr attrib, pcstr default_str_val) const { CONST_XML_NODE node = NavigateToNode(start_node, path, index); return ReadAttrib(node, attrib, default_str_val); } pcstr XMLDocument::ReadAttrib(pcstr path, const size_t index, pcstr attrib, pcstr default_str_val) const { CONST_XML_NODE node = NavigateToNode(path, index); return ReadAttrib(node, attrib, default_str_val); } pcstr XMLDocument::ReadAttrib(CONST_XML_NODE node, pcstr attrib, pcstr default_str_val) const { pcstr result = nullptr; if (node) { // Кастаем ниже по иерархии const auto el = node->ToElement(); if (el) result = el->Attribute(attrib); } return result ? result : default_str_val; } int XMLDocument::ReadAttribInt(CONST_XML_NODE node, pcstr attrib, const int default_int_val) const { pcstr result_str = ReadAttrib(node, attrib, nullptr); if (result_str == nullptr) return default_int_val; return atoi(result_str); } int XMLDocument::ReadAttribInt(pcstr path, const size_t index, pcstr attrib, int default_int_val) const { pcstr result_str = ReadAttrib(path, index, attrib, nullptr); if (result_str == nullptr) return default_int_val; return atoi(result_str); } int XMLDocument::ReadAttribInt(CONST_XML_NODE start_node, pcstr path, const size_t index, pcstr attrib, const int default_int_val) const { pcstr result_str = ReadAttrib(start_node, path, index, attrib, nullptr); if (result_str == nullptr) return default_int_val; return atoi(result_str); } float XMLDocument::ReadAttribFlt(pcstr path, const size_t index, pcstr attrib, const float default_flt_val) const { pcstr result_str = ReadAttrib(path, index, attrib, nullptr); if (result_str == nullptr) return default_flt_val; return static_cast<float>(atof(result_str)); } float XMLDocument::ReadAttribFlt(CONST_XML_NODE start_node, pcstr path, const size_t index, pcstr attrib, const float default_flt_val) const { pcstr result_str = ReadAttrib(start_node, path, index, attrib, nullptr); if (result_str == nullptr) return default_flt_val; return static_cast<float>(atof(result_str)); } float XMLDocument::ReadAttribFlt(CONST_XML_NODE node, pcstr attrib, const float default_flt_val) const { pcstr result_str = ReadAttrib(node, attrib, nullptr); if (result_str == nullptr) return default_flt_val; return static_cast<float>(atof(result_str)); } size_t XMLDocument::GetNodesNum(pcstr path, const size_t index, pcstr tag_name) const { CONST_XML_NODE node; CONST_XML_NODE root = GetLocalRoot() ? GetLocalRoot() : GetRoot(); if (path != nullptr) { node = NavigateToNode(path, index); if (!node) node = root; } else node = root; if (!node) return 0; return GetNodesNum(node, tag_name); } size_t XMLDocument::GetNodesNum(CONST_XML_NODE node, pcstr tag_name, bool includingComments /*= true*/) const { if (!node) return 0; CONST_XML_NODE el; if (!tag_name) el = node->FirstChild(); else el = node->FirstChild(tag_name); size_t result = 0; while (el) { if (includingComments || el->Type() != TiXmlNode::NodeType::COMMENT) ++result; if (!tag_name) el = el->NextSibling(); else el = el->NextSibling(tag_name); } return result; } //нахождение элемента по его атрибуту XML_NODE XMLDocument::SearchForAttribute( pcstr path, const size_t index, pcstr tag_name, pcstr attrib, pcstr attrib_value_pattern) const { CONST_XML_NODE start_node = NavigateToNode(path, index); return SearchForAttribute(start_node, tag_name, attrib, attrib_value_pattern);; } XML_NODE XMLDocument::SearchForAttribute( CONST_XML_NODE start_node, pcstr tag_name, pcstr attrib, pcstr attrib_value_pattern) const { while (start_node) { const auto el = start_node->ToElement(); if (el) { pcstr attribStr = el->Attribute(attrib); pcstr valueStr = el->Value(); if (attribStr && 0 == xr_strcmp(attribStr, attrib_value_pattern) && valueStr && 0 == xr_strcmp(valueStr, tag_name)) { return const_cast<TiXmlElement*>(el); } } CONST_XML_NODE newEl = start_node->FirstChild(tag_name); newEl = SearchForAttribute(newEl, tag_name, attrib, attrib_value_pattern); if (newEl) return const_cast<XML_NODE>(newEl); start_node = start_node->NextSibling(tag_name); } return nullptr; } pcstr XMLDocument::CheckUniqueAttrib(CONST_XML_NODE start_node, pcstr tag_name, pcstr attrib_name) { m_AttribValues.clear(); int tags_num = GetNodesNum(start_node, tag_name); for (int i = 0; i < tags_num; i++) { pcstr attrib = ReadAttrib(start_node, tag_name, i, attrib_name, nullptr); auto it = std::find(m_AttribValues.begin(), m_AttribValues.end(), attrib); if (m_AttribValues.end() != it) return attrib; m_AttribValues.push_back(attrib); } m_AttribValues.clear(); return nullptr; }
27.997826
140
0.658126
clayne
cc02baac478f37d7d0a3db1d9d02eb223d2b63ca
1,238
cpp
C++
android/android_9/device/google/cuttlefish_common/common/vsoc/lib/screen_region_view_test.cpp
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
null
null
null
android/android_9/device/google/cuttlefish_common/common/vsoc/lib/screen_region_view_test.cpp
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
null
null
null
android/android_9/device/google/cuttlefish_common/common/vsoc/lib/screen_region_view_test.cpp
yakuizhao/intel-vaapi-driver
b2bb0383352694941826543a171b557efac2219b
[ "MIT" ]
null
null
null
/* * Copyright (C) 2017 The Android Open Source Project * * 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 "screen_region_view.h" #include "host/libs/config/cuttlefish_config.h" #include <stdio.h> using vsoc::screen::ScreenRegionView; int main() { uint32_t frame_num = 0; int buffer_id = 0; #if defined(CUTTLEFISH_HOST) auto region = ScreenRegionView::GetInstance(vsoc::GetDomain().c_str()); #else auto region = ScreenRegionView::GetInstance(); #endif if (!region) { fprintf(stderr, "Error opening region\n"); return 1; } while (1) { buffer_id = region->WaitForNewFrameSince(&frame_num); printf("Signaled frame_num = %d, buffer_id = %d\n", frame_num, buffer_id); } return 0; }
28.790698
78
0.71567
yakuizhao
cc047f3556dcd9d4e2ebccffebff5f9c42567681
2,921
cpp
C++
paint/solutions/modified2-ryno-full.cpp
acio-olympiad/ACIO2022Contest2
53c7ced66ae916b118cfab8c72e4531dd08defd2
[ "MIT" ]
null
null
null
paint/solutions/modified2-ryno-full.cpp
acio-olympiad/ACIO2022Contest2
53c7ced66ae916b118cfab8c72e4531dd08defd2
[ "MIT" ]
null
null
null
paint/solutions/modified2-ryno-full.cpp
acio-olympiad/ACIO2022Contest2
53c7ced66ae916b118cfab8c72e4531dd08defd2
[ "MIT" ]
null
null
null
/* N <= 2e3, K <= 2e3 fracturing search O(NK log NK) */ #include <algorithm> #include <iostream> #include <queue> #include <vector> #include <assert.h> using namespace std; typedef long long ll; ll N, K, D; vector<ll> costs[2005]; vector<ll> prevUsed[2005]; struct State { // used is represented by prevUsed[i] ll i; // modify day `d`, if d == -1 dont modify ll d = -1; // what to increment it to. if itemI == costs[d].size(), then remove this day ll itemI = -1; // updated stats ll numItems, cost = 0; ll hasChoice; // day is discarded when used[d] = cost[d].size() bool operator<(State o) const { if (numItems == o.numItems) return cost > o.cost; return numItems < o.numItems; } vector<ll> applyUpdate() { vector<ll> used = prevUsed[i]; if (d != -1) used[d] = itemI; return used; } }; priority_queue<State> pq; State initState() { State output; prevUsed[0].resize(D + 1); output.i = 0; output.numItems = D; for (ll d = 0; d < D; ++d) output.cost += costs[d][0]; output.hasChoice = 0; return output; } void fracturingSearch() { pq.push(initState()); for (ll i = 0; i < K - 1; ++i) { State curr = pq.top(); pq.pop(); // apply update, store in prevUsed[i] prevUsed[i] = curr.applyUpdate(); // find children for (ll d = curr.hasChoice; d < D; ++d) { // option 1: increment the cost for (ll itemI = prevUsed[i][d] + 1; itemI < (ll)costs[d].size(); ++itemI) { State neighbour; neighbour.i = i; neighbour.d = d; neighbour.itemI = itemI; neighbour.cost = curr.cost + costs[d][itemI] - costs[d][prevUsed[i][d]]; neighbour.numItems = curr.numItems; neighbour.hasChoice = d + 1; pq.push(neighbour); } // option 2: remove this day if (prevUsed[i][d] != (ll)costs[d].size()) { State neighbour; neighbour.i = i; neighbour.d = d; neighbour.itemI = costs[d].size(); neighbour.cost = curr.cost - costs[d][prevUsed[i][d]]; neighbour.numItems = curr.numItems - 1; neighbour.hasChoice = d + 1; pq.push(neighbour); } } } cout << pq.top().numItems << " " << pq.top().cost << "\n"; } int main() { cin.tie(0); ios::sync_with_stdio(0); cin >> N >> K >> D; for (ll d, w, i = 0; i < N; ++i) { cin >> d >> w; --d; costs[d].push_back(w); } for (ll d = 0; d < D; ++d) sort(costs[d].begin(), costs[d].end()); fracturingSearch(); }
26.080357
89
0.480315
acio-olympiad
cc07184363eb3095efc9e4fd5dad22f7bd4ef33c
1,783
cpp
C++
android-31/android/view/ActionProvider.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
12
2020-03-26T02:38:56.000Z
2022-03-14T08:17:26.000Z
android-31/android/view/ActionProvider.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
1
2021-01-27T06:07:45.000Z
2021-11-13T19:19:43.000Z
android-29/android/view/ActionProvider.cpp
YJBeetle/QtAndroidAPI
1468b5dc6eafaf7709f0b00ba1a6ec2b70684266
[ "Apache-2.0" ]
3
2021-02-02T12:34:55.000Z
2022-03-08T07:45:57.000Z
#include "../content/Context.hpp" #include "./View.hpp" #include "./ActionProvider.hpp" namespace android::view { // Fields // QJniObject forward ActionProvider::ActionProvider(QJniObject obj) : JObject(obj) {} // Constructors ActionProvider::ActionProvider(android::content::Context arg0) : JObject( "android.view.ActionProvider", "(Landroid/content/Context;)V", arg0.object() ) {} // Methods jboolean ActionProvider::hasSubMenu() const { return callMethod<jboolean>( "hasSubMenu", "()Z" ); } jboolean ActionProvider::isVisible() const { return callMethod<jboolean>( "isVisible", "()Z" ); } android::view::View ActionProvider::onCreateActionView() const { return callObjectMethod( "onCreateActionView", "()Landroid/view/View;" ); } android::view::View ActionProvider::onCreateActionView(JObject arg0) const { return callObjectMethod( "onCreateActionView", "(Landroid/view/MenuItem;)Landroid/view/View;", arg0.object() ); } jboolean ActionProvider::onPerformDefaultAction() const { return callMethod<jboolean>( "onPerformDefaultAction", "()Z" ); } void ActionProvider::onPrepareSubMenu(JObject arg0) const { callMethod<void>( "onPrepareSubMenu", "(Landroid/view/SubMenu;)V", arg0.object() ); } jboolean ActionProvider::overridesItemVisibility() const { return callMethod<jboolean>( "overridesItemVisibility", "()Z" ); } void ActionProvider::refreshVisibility() const { callMethod<void>( "refreshVisibility", "()V" ); } void ActionProvider::setVisibilityListener(JObject arg0) const { callMethod<void>( "setVisibilityListener", "(Landroid/view/ActionProvider$VisibilityListener;)V", arg0.object() ); } } // namespace android::view
20.033708
75
0.691531
YJBeetle
cc092514a72cc121ea98bccb6c1f87a8b945138b
8,229
cpp
C++
source/rrSBMLModelSimulation.cpp
gregmedlock/roadrunnerwork
11f18f78ef3e381bc59c546a8d5e3ed46d8ab596
[ "Apache-2.0" ]
null
null
null
source/rrSBMLModelSimulation.cpp
gregmedlock/roadrunnerwork
11f18f78ef3e381bc59c546a8d5e3ed46d8ab596
[ "Apache-2.0" ]
null
null
null
source/rrSBMLModelSimulation.cpp
gregmedlock/roadrunnerwork
11f18f78ef3e381bc59c546a8d5e3ed46d8ab596
[ "Apache-2.0" ]
null
null
null
#ifdef USE_PCH #include "rr_pch.h" #endif #pragma hdrstop #include <iomanip> #include <map> #include "rrLogger.h" #include "rrSBMLModelSimulation.h" #include "rrUtils.h" #include "rrRoadRunner.h" //--------------------------------------------------------------------------- #if defined(__CODEGEARC__) #pragma package(smart_init) #endif namespace rr { SBMLModelSimulation::SBMLModelSimulation(const string& dataOutputFolder, const string& tempDataFilePath) : mModelFilePath(""), mModelFileName(""), mDataOutputFolder(dataOutputFolder), mCompileIfDllExists(true), mTempDataFolder(tempDataFilePath) { mSettings.mAbsolute = 1.e-7; mSettings.mRelative = 1.e-4; } SBMLModelSimulation::~SBMLModelSimulation() {} string SBMLModelSimulation::GetTempDataFolder() { return mTempDataFolder; } void SBMLModelSimulation::CompileIfDllExists(const bool& doIt) { mCompileIfDllExists = doIt; } bool SBMLModelSimulation::SetModelFilePath(const string& path) { mModelFilePath = path; return true; } SimulationData SBMLModelSimulation::GetResult() { if(mEngine) { return mEngine->GetSimulationResult(); } else { return SimulationData(); } } bool SBMLModelSimulation::SetModelFileName(const string& name) { if(ExtractFilePath(name).size() > 0) { mModelFilePath = ExtractFilePath(name); } mModelFileName = ExtractFileName(name); if(!FileExists(JoinPath(mModelFilePath, mModelFileName))) { Log(lError)<<"The file: "<<JoinPath(mModelFilePath, mModelFileName)<<" don't exist."; return false; } return true; } bool SBMLModelSimulation::SetDataOutputFolder(const string& name) { mDataOutputFolder = name; return true; } string SBMLModelSimulation::GetModelsFullFilePath() { return JoinPath(mModelFilePath, mModelFileName); } string SBMLModelSimulation::GetDataOutputFolder() { return mDataOutputFolder; } bool SBMLModelSimulation::CompileIfDllExists() { return mCompileIfDllExists; } bool SBMLModelSimulation::UseEngine(RoadRunner* engine) { mEngine = engine; if(mEngine) { mEngine->PartOfSimulation(this); //Road runner then gets access to data oupt folders etc.. } return true; } bool SBMLModelSimulation::GenerateModelCode() { if(!mEngine) { return false; } return mEngine->GenerateModelCode(""); } bool SBMLModelSimulation::CompileModel() { if(!mEngine) { return false; } return mEngine->CompileCurrentModel(); } bool SBMLModelSimulation::LoadSettings(const string& settingsFName) { string fName(settingsFName); if(!fName.size()) { Log(lError)<<"Empty file name for setings file"; return false; } else { map<string, string> settings; map<string, string>::iterator it; //Read each line in the settings file vector<string> lines = GetLinesInFile(fName); for(u_int i = 0; i < lines.size(); i++) { vector<string> line = SplitString(lines[i], ":"); if(line.size() == 2) { settings.insert( pair<string, string>(line[0], line[1])); } else { Log(lDebug2)<<"Empty line in settings file: "<<lines[i]; } } Log(lDebug3)<<"Settings File ============="; for (it = settings.begin() ; it != settings.end(); it++ ) { Log(lDebug) << (*it).first << " => " << (*it).second; } Log(lDebug)<<"==========================="; //Assign values it = settings.find("start"); mSettings.mStartTime = (it != settings.end()) ? ToDouble((*it).second) : 0; it = settings.find("duration"); mSettings.mDuration = (it != settings.end()) ? ToDouble((*it).second) : 0; it = settings.find("steps"); mSettings.mSteps = (it != settings.end()) ? ToInt((*it).second) : 50; it = settings.find("absolute"); mSettings.mAbsolute = (it != settings.end()) ? ToDouble((*it).second) : 1.e-7; it = settings.find("relative"); mSettings.mRelative = (it != settings.end()) ? ToDouble((*it).second) : 1.e-4; mSettings.mEndTime = mSettings.mStartTime + mSettings.mDuration; it = settings.find("variables"); if(it != settings.end()) { vector<string> vars = SplitString((*it).second, ","); for(int i=0; i < vars.size(); i++) { mSettings.mVariables.push_back(Trim(vars[i])); } } it = settings.find("amount"); if(it != settings.end()) { vector<string> vars = SplitString((*it).second, ","); for(int i=0; i < vars.size(); i++) { string rec = Trim(vars[i]); if(rec.size()) { mSettings.mAmount.push_back(rec); } } } it = settings.find("concentration"); if(it != settings.end()) { vector<string> vars = SplitString((*it).second, ","); for(int i=0; i < vars.size(); i++) { string rec = Trim(vars[i]); if(rec.size()) { mSettings.mConcentration.push_back(rec); } } } } if(mEngine) { mEngine->UseSimulationSettings(mSettings); //This one creates the list of what we will look at in the result mEngine->createTimeCourseSelectionList(); } return true; } bool SBMLModelSimulation::SetTimeStart(const double& startTime) { mSettings.mStartTime = startTime; return true; } bool SBMLModelSimulation::SetTimeEnd(const double& endTime) { mSettings.mEndTime = endTime; mSettings.mDuration = mSettings.mEndTime - mSettings.mStartTime; return true; } bool SBMLModelSimulation::SetNumberOfPoints(const int& steps) { mSettings.mSteps = steps; return true; } bool SBMLModelSimulation::SetSelectionList(const string& selectionList) { vector<string> vars = SplitString(selectionList, ", "); for(int i=0; i < vars.size(); i++) { mSettings.mVariables.push_back(Trim(vars[i])); } mEngine->UseSimulationSettings(mSettings); mEngine->createTimeCourseSelectionList(); //This one creates the list of what we will look at in the result return true; } bool SBMLModelSimulation::LoadSBMLFromFile() //Use current file information to load sbml from file { if(!mEngine) { return false; } bool val = mEngine->loadSBMLFromFile(GetModelsFullFilePath()); return val; } bool SBMLModelSimulation::SaveModelAsXML(const string& folder) { if(!mEngine) { return false; } string fName = JoinPath(folder, mModelFileName); fName = ChangeFileExtensionTo(fName, "xml"); fstream fs(fName.c_str(), fstream::out); if(!fs) { Log(lError)<<"Failed writing sbml to file "<< fName; return false; } fs<<mEngine->getSBML(); fs.close(); return true; } bool SBMLModelSimulation::CreateModel() { if(!mEngine) { return false; } return (mEngine->CreateModel() != NULL) ? true : false; } bool SBMLModelSimulation::InitializeModel() { if(!mEngine) { return false; } return mEngine->InitializeModel(); } bool SBMLModelSimulation::GenerateAndCompileModel() { if(!mEngine) { return false; } return mEngine->GenerateAndCompileModel(); } bool SBMLModelSimulation::Simulate() { if(!mEngine) { return false; } return mEngine->Simulate(); } bool SBMLModelSimulation::SaveResult() { string resultFileName(JoinPath(mDataOutputFolder, "rr_" + mModelFileName)); resultFileName = ChangeFileExtensionTo(resultFileName, ".csv"); Log(lInfo)<<"Saving result to file: "<<resultFileName; SimulationData resultData = mEngine->GetSimulationResult(); ofstream fs(resultFileName.c_str()); fs << resultData; fs.close(); return true; } } //end of namespace
23.311615
117
0.595577
gregmedlock
cc0a20905abad9eac184c28663875b7fe134c9d3
14,635
hpp
C++
third_party/jsonxx.v0.9.2/include/jsonxx/json_unicode.hpp
vectordb-io/vectordb
3175b0d7f795d4f5daa22eb58ff86a01cf66780d
[ "Apache-2.0" ]
9
2021-06-16T08:02:19.000Z
2021-11-04T11:49:27.000Z
third_party/jsonxx.v0.9.2/include/jsonxx/json_unicode.hpp
vectordb-io/vectordb
3175b0d7f795d4f5daa22eb58ff86a01cf66780d
[ "Apache-2.0" ]
null
null
null
third_party/jsonxx.v0.9.2/include/jsonxx/json_unicode.hpp
vectordb-io/vectordb
3175b0d7f795d4f5daa22eb58ff86a01cf66780d
[ "Apache-2.0" ]
2
2021-06-17T14:21:03.000Z
2021-08-13T16:37:35.000Z
// Copyright (c) 2018-2020 jsonxx - Nomango // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. #pragma once #include "json_exception.hpp" #include <array> // std::array #include <cstdint> // uint32_t #include <string> // std::string, std::wstring, std::u16string, std::u32string #include <type_traits> // std::char_traits, std::true_type, std::false_type #include <vector> // std::vector // unicode constants #define JSONXX_UNICODE_SUR_BASE 0x10000 #define JSONXX_UNICODE_SUR_LEAD_BEGIN 0xD800 #define JSONXX_UNICODE_SUR_LEAD_END 0xDBFF #define JSONXX_UNICODE_SUR_TRAIL_BEGIN 0xDC00 #define JSONXX_UNICODE_SUR_TRAIL_END 0xDFFF #define JSONXX_UNICODE_SUR_BITS 10 #define JSONXX_UNICODE_SUR_MAX 0x3FF namespace jsonxx { namespace detail { inline uint32_t merge_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate) { uint32_t code = ((lead_surrogate - JSONXX_UNICODE_SUR_LEAD_BEGIN) << JSONXX_UNICODE_SUR_BITS); code += (trail_surrogate - JSONXX_UNICODE_SUR_TRAIL_BEGIN); code += JSONXX_UNICODE_SUR_BASE; return code; } // // unicode_reader // template <typename _StrTy> struct unicode_reader; template <> struct unicode_reader<std::string> { using string_type = std::string; const string_type& val; const bool escape_unicode; uint8_t state = 0; unicode_reader(const string_type& val, const bool escape_unicode) : val(val) , escape_unicode(escape_unicode) { } inline uint8_t get_byte(size_t i) const { return static_cast<uint8_t>(val.at(i)); } bool get_code(size_t& i, uint32_t& code_output) { // Unicode UTF-8 // U+0000...U+007F 0xxxxxxx // U+0080...U+07FF 110xxxxx 10xxxxxx // U+0800...U+FFFF 1110xxxx 10xxxxxx 10xxxxxx // U+10000...U+10FFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx static const std::array<std::uint8_t, 256> utf8_extra_bytes = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, }; static const std::array<std::uint32_t, 6> utf8_offsets = { 0x00000000, 0x00003080, 0x000E2080, 0x03C82080, 0xFA082080, 0x82082080, }; if (i >= val.size()) { return false; } if (!escape_unicode) { // code point will not be escaped const auto byte = get_byte(i); code_output = static_cast<uint32_t>(byte); i++; return true; } const auto first_byte = get_byte(i); const auto extra_bytes_to_read = utf8_extra_bytes[first_byte]; if ((i + static_cast<size_t>(extra_bytes_to_read)) >= val.size()) { throw json_serialize_error("string was incomplete"); } // read bytes uint32_t code = 0; switch (extra_bytes_to_read) { case 5: code += static_cast<uint32_t>(get_byte(i)); i++; code <<= 6; case 4: code += static_cast<uint32_t>(get_byte(i)); i++; code <<= 6; case 3: code += static_cast<uint32_t>(get_byte(i)); i++; code <<= 6; case 2: code += static_cast<uint32_t>(get_byte(i)); i++; code <<= 6; case 1: code += static_cast<uint32_t>(get_byte(i)); i++; code <<= 6; case 0: code += static_cast<uint32_t>(get_byte(i)); i++; } code -= utf8_offsets[extra_bytes_to_read]; code_output = code; return true; } }; template <> struct unicode_reader<std::wstring> { using string_type = std::wstring; using char_type = typename string_type::value_type; const string_type& val; const bool escape_unicode; unicode_reader(const string_type& val, const bool escape_unicode) : val(val) , escape_unicode(escape_unicode) { } bool get_code(size_t& i, uint32_t& code) { return get_code(i, code, std::integral_constant<bool, sizeof(char_type) == 4>()); } bool get_code(size_t& i, uint32_t& code, std::true_type /* sizeof(wchar_t) == 4 */) { if (i >= val.size()) { return false; } code = static_cast<uint32_t>(val.at(i)); i++; return true; } bool get_code(size_t& i, uint32_t& code, std::false_type /* sizeof(wchar_t) == 2 */) { if (i >= val.size()) { return false; } code = static_cast<uint32_t>(static_cast<uint16_t>(val.at(i))); i++; if (!escape_unicode) { // code point will not be escaped return true; } if (JSONXX_UNICODE_SUR_LEAD_BEGIN <= code && code <= JSONXX_UNICODE_SUR_LEAD_END) { if (i >= val.size()) { throw json_serialize_error("string was incomplete"); } uint32_t lead_surrogate = code; uint32_t trail_surrogate = static_cast<uint32_t>(static_cast<uint16_t>(val.at(i))); code = merge_surrogates(lead_surrogate, trail_surrogate); i++; } return true; } }; template <> struct unicode_reader<std::u32string> { using string_type = std::u32string; using char_type = typename string_type::value_type; const string_type& val; const bool escape_unicode; unicode_reader(const string_type& val, const bool escape_unicode) : val(val) , escape_unicode(escape_unicode) { } bool get_code(size_t& i, uint32_t& code) { if (i >= val.size()) { return false; } code = static_cast<uint32_t>(val.at(i)); i++; return true; } }; template <> struct unicode_reader<std::u16string> { using string_type = std::u16string; using char_type = typename string_type::value_type; const string_type& val; const bool escape_unicode; unicode_reader(const string_type& val, const bool escape_unicode) : val(val) , escape_unicode(escape_unicode) { } bool get_code(size_t& i, uint32_t& code) { if (i >= val.size()) { return false; } code = static_cast<uint32_t>(static_cast<uint16_t>(val.at(i))); i++; if (!escape_unicode) { // code point will not be escaped return true; } if (JSONXX_UNICODE_SUR_LEAD_BEGIN <= code && code <= JSONXX_UNICODE_SUR_LEAD_END) { if (i >= val.size()) { throw json_serialize_error("string was incomplete"); } uint32_t lead_surrogate = code; uint32_t trail_surrogate = static_cast<uint32_t>(static_cast<uint16_t>(val.at(i))); code = merge_surrogates(lead_surrogate, trail_surrogate); i++; } return true; } }; // // unicode_writer // template <typename _StrTy> struct unicode_writer; template <> struct unicode_writer<std::string> { using string_type = std::string; using char_type = typename string_type::value_type; using char_traits = std::char_traits<char_type>; using char_int_type = typename char_traits::int_type; string_type& buffer; unicode_writer(string_type& buffer) : buffer(buffer){}; inline void add_char(const char_int_type ch) { buffer.push_back(char_traits::to_char_type(ch)); } inline void add_code(uint32_t code) { if (!(0x00 <= code && code <= 0x10FFFF)) { // invalid unicode return; } // Unicode UTF-8 // U+0000...U+007F 0xxxxxxx // U+0080...U+07FF 110xxxxx 10xxxxxx // U+0800...U+FFFF 1110xxxx 10xxxxxx 10xxxxxx // U+10000...U+10FFFF 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx if (code < 0x80) { // 0xxxxxxx add_char(static_cast<char_int_type>(code)); } else if (code <= 0x7FF) { // 110xxxxx 10xxxxxx add_char(static_cast<char_int_type>(0xC0 | (code >> 6))); add_char(static_cast<char_int_type>(0x80 | (code & 0x3F))); } else if (code <= 0xFFFF) { // 1110xxxx 10xxxxxx 10xxxxxx add_char(static_cast<char_int_type>(0xE0 | (code >> 12))); add_char(static_cast<char_int_type>(0x80 | ((code >> 6) & 0x3F))); add_char(static_cast<char_int_type>(0x80 | (code & 0x3F))); } else { // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx add_char(static_cast<char_int_type>(0xF0 | (code >> 18))); add_char(static_cast<char_int_type>(0x80 | ((code >> 12) & 0x3F))); add_char(static_cast<char_int_type>(0x80 | ((code >> 6) & 0x3F))); add_char(static_cast<char_int_type>(0x80 | (code & 0x3F))); } } inline void add_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate) { add_code(merge_surrogates(lead_surrogate, trail_surrogate)); } }; template <> struct unicode_writer<std::wstring> { using string_type = std::wstring; using char_type = typename string_type::value_type; using char_traits = std::char_traits<char_type>; using char_int_type = typename char_traits::int_type; string_type& buffer; unicode_writer(string_type& buffer) : buffer(buffer){}; inline void add_char(const char_int_type ch) { buffer.push_back(char_traits::to_char_type(ch)); } inline void add_code(uint32_t code) { add_code(code, std::integral_constant<bool, sizeof(char_type) == 4>()); } inline void add_code(uint32_t code, std::true_type /* sizeof(wchar_t) == 4 */) { add_char(static_cast<char_int_type>(code)); } inline void add_code(uint32_t code, std::false_type /* sizeof(wchar_t) == 2 */) { if (code < 0xFFFF) { add_char(static_cast<char_int_type>(code)); } else { throw json_parse_error("invalid 16-bits unicode character"); } } inline void add_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate) { add_surrogates(lead_surrogate, trail_surrogate, std::integral_constant<bool, sizeof(char_type) == 4>()); } inline void add_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate, std::true_type /* sizeof(wchar_t) == 4 */) { add_code(merge_surrogates(lead_surrogate, trail_surrogate)); } inline void add_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate, std::false_type /* sizeof(wchar_t) == 2 */) { add_code(lead_surrogate); add_code(trail_surrogate); } }; template <> struct unicode_writer<std::u16string> { using string_type = std::u16string; using char_type = typename string_type::value_type; using char_traits = std::char_traits<char_type>; using char_int_type = typename char_traits::int_type; string_type& buffer; unicode_writer(string_type& buffer) : buffer(buffer){}; inline void add_char(const char_int_type ch) { buffer.push_back(char_traits::to_char_type(ch)); } inline void add_code(uint32_t code) { if (code < 0xFFFF) { add_char(static_cast<char_int_type>(code)); } else { throw json_parse_error("invalid 16-bits unicode character"); } } inline void add_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate) { add_code(lead_surrogate); add_code(trail_surrogate); } }; template <> struct unicode_writer<std::u32string> { using string_type = std::u32string; using char_type = typename string_type::value_type; using char_traits = std::char_traits<char_type>; using char_int_type = typename char_traits::int_type; string_type& buffer; unicode_writer(string_type& buffer) : buffer(buffer){}; inline void add_char(const char_int_type ch) { buffer.push_back(char_traits::to_char_type(ch)); } inline void add_code(uint32_t code) { add_char(static_cast<char_int_type>(code)); } inline void add_surrogates(uint32_t lead_surrogate, uint32_t trail_surrogate) { add_code(merge_surrogates(lead_surrogate, trail_surrogate)); } }; } // namespace detail } // namespace jsonxx
29.685598
112
0.586334
vectordb-io
cc0b2d9025a30e467a2e7cb6ccabe8a48551991f
8,228
hpp
C++
Libraries/C++/CommonHelpers/v1.0/CommonHelpers/Details/boost_extract/vmd/detail/recurse/equal/equal_10.hpp
davidbrownell/Common_cpp_Helpers
9e68c95873b5a4eff3a32b991d2c18dff176d6c9
[ "BSL-1.0" ]
null
null
null
Libraries/C++/CommonHelpers/v1.0/CommonHelpers/Details/boost_extract/vmd/detail/recurse/equal/equal_10.hpp
davidbrownell/Common_cpp_Helpers
9e68c95873b5a4eff3a32b991d2c18dff176d6c9
[ "BSL-1.0" ]
null
null
null
Libraries/C++/CommonHelpers/v1.0/CommonHelpers/Details/boost_extract/vmd/detail/recurse/equal/equal_10.hpp
davidbrownell/Common_cpp_Helpers
9e68c95873b5a4eff3a32b991d2c18dff176d6c9
[ "BSL-1.0" ]
null
null
null
// (C) Copyright Edward Diener 2011-2015 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #if !defined(BOOST_VMD_DETAIL_EQUAL_10_HPP) #define BOOST_VMD_DETAIL_EQUAL_10_HPP #include "equal_headers.hpp" #define BOOST_VMD_DETAIL_EQUAL_10_CNI_CHK(vseq1,vseq2,vtype) \ BOOST_PP_IIF \ ( \ BOOST_PP_BITOR \ ( \ BOOST_PP_BITOR \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_ARRAY), \ BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_LIST) \ ), \ BOOST_PP_BITOR \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_SEQ), \ BOOST_VMD_DETAIL_EQUAL_TYPE(vtype,BOOST_VMD_TYPE_TUPLE) \ ) \ ), \ BOOST_VMD_DETAIL_DATA_EQUAL_10, \ BOOST_VMD_DETAIL_EQUAL_CNI_SMP \ ) \ (vseq1,vseq2,vtype) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_CNI_CHK_D(d,vseq1,vseq2,vtype) \ BOOST_PP_IIF \ ( \ BOOST_PP_BITOR \ ( \ BOOST_PP_BITOR \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_ARRAY), \ BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_LIST) \ ), \ BOOST_PP_BITOR \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_SEQ), \ BOOST_VMD_DETAIL_EQUAL_TYPE_D(d,vtype,BOOST_VMD_TYPE_TUPLE) \ ) \ ), \ BOOST_VMD_DETAIL_DATA_EQUAL_10_D, \ BOOST_VMD_DETAIL_EQUAL_CNI_SMP_D \ ) \ (d,vseq1,vseq2,vtype) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_VSEQ(vseq1,vseq2,vtype) \ BOOST_VMD_DETAIL_DATA_EQUAL_10 \ ( \ BOOST_VMD_TO_SEQ(vseq1), \ BOOST_VMD_TO_SEQ(vseq2), \ BOOST_VMD_TYPE_SEQ \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_VSEQ_D(d,vseq1,vseq2,vtype) \ BOOST_VMD_DETAIL_DATA_EQUAL_10_D \ ( \ d, \ BOOST_VMD_TO_SEQ_D(d,vseq1), \ BOOST_VMD_TO_SEQ_D(d,vseq2), \ BOOST_VMD_TYPE_SEQ \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_CNI(vseq1,vseq2,vtype) \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE \ ( \ vtype, \ BOOST_VMD_TYPE_SEQUENCE \ ), \ BOOST_VMD_DETAIL_EQUAL_10_VSEQ, \ BOOST_VMD_DETAIL_EQUAL_10_CNI_CHK \ ) \ (vseq1,vseq2,vtype) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_CNI_D(d,vseq1,vseq2,vtype) \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE_D \ ( \ d, \ vtype, \ BOOST_VMD_TYPE_SEQUENCE \ ), \ BOOST_VMD_DETAIL_EQUAL_10_VSEQ_D, \ BOOST_VMD_DETAIL_EQUAL_10_CNI_CHK_D \ ) \ (d,vseq1,vseq2,vtype) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_WT_CHECK(vseq1,vseq2,vtype1,vtype2) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE \ ( \ vtype1, \ vtype2 \ ), \ BOOST_VMD_DETAIL_EQUAL_10_CNI, \ BOOST_VMD_IDENTITY(0) \ ) \ (vseq1,vseq2,vtype1) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_WT_CHECK_D(d,vseq1,vseq2,vtype1,vtype2) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_EQUAL_TYPE_D \ ( \ d, \ vtype1, \ vtype2 \ ), \ BOOST_VMD_DETAIL_EQUAL_10_CNI_D, \ BOOST_VMD_IDENTITY(0) \ ) \ (d,vseq1,vseq2,vtype1) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_WT_CONVERT(vseq1,vseq2,vtype1,vtype2) \ BOOST_VMD_DETAIL_EQUAL_10_WT_CHECK \ ( \ vseq1, \ vseq2, \ BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE(vseq1,vtype1), \ BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE(vseq2,vtype2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_WT_CONVERT_D(d,vseq1,vseq2,vtype1,vtype2) \ BOOST_VMD_DETAIL_EQUAL_10_WT_CHECK_D \ ( \ d, \ vseq1, \ vseq2, \ BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE_D(d,vseq1,vtype1), \ BOOST_VMD_DETAIL_ADJUST_TUPLE_TYPE_D(d,vseq2,vtype2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_WT(vseq1,vseq2,vtype1,vtype2) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_EQUAL_IS_TUPLE_MISMATCH(vseq1,vseq2,vtype1,vtype2), \ BOOST_VMD_IDENTITY(0), \ BOOST_VMD_DETAIL_EQUAL_10_WT_CONVERT \ ) \ (vseq1,vseq2,vtype1,vtype2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_WT_D(d,vseq1,vseq2,vtype1,vtype2) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_VMD_DETAIL_EQUAL_IS_TUPLE_MISMATCH_D(d,vseq1,vseq2,vtype1,vtype2), \ BOOST_VMD_IDENTITY(0), \ BOOST_VMD_DETAIL_EQUAL_10_WT_CONVERT_D \ ) \ (d,vseq1,vseq2,vtype1,vtype2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_GTYPE(vseq1,vseq2) \ BOOST_VMD_DETAIL_EQUAL_10_WT \ ( \ vseq1, \ vseq2, \ BOOST_VMD_GET_TYPE(vseq1,BOOST_VMD_RETURN_TYPE_TUPLE), \ BOOST_VMD_GET_TYPE(vseq2,BOOST_VMD_RETURN_TYPE_TUPLE) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_GTYPE_D(d,vseq1,vseq2) \ BOOST_VMD_DETAIL_EQUAL_10_WT_D \ ( \ d, \ vseq1, \ vseq2, \ BOOST_VMD_GET_TYPE_D(d,vseq1,BOOST_VMD_RETURN_TYPE_TUPLE), \ BOOST_VMD_GET_TYPE_D(d,vseq2,BOOST_VMD_RETURN_TYPE_TUPLE) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_EBP(vseq1,vseq2,be1,be2) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_PP_BITAND \ ( \ BOOST_VMD_DETAIL_EQUAL_CHK_MATCH(be1,be2), \ BOOST_VMD_DETAIL_EQUAL_CHK_PARENS_MATCH(vseq1,vseq2) \ ), \ BOOST_VMD_DETAIL_EQUAL_10_GTYPE, \ BOOST_VMD_IDENTITY(0) \ ) \ (vseq1,vseq2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_EBP_D(d,vseq1,vseq2,be1,be2) \ BOOST_VMD_IDENTITY_RESULT \ ( \ BOOST_PP_IIF \ ( \ BOOST_PP_BITAND \ ( \ BOOST_VMD_DETAIL_EQUAL_CHK_MATCH(be1,be2), \ BOOST_VMD_DETAIL_EQUAL_CHK_PARENS_MATCH(vseq1,vseq2) \ ), \ BOOST_VMD_DETAIL_EQUAL_10_GTYPE_D, \ BOOST_VMD_IDENTITY(0) \ ) \ (d,vseq1,vseq2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_EMPTY(vseq1,vseq2,be1,be2) \ BOOST_PP_IIF \ ( \ BOOST_PP_BITAND(be1,be2), \ BOOST_VMD_DETAIL_EQUAL_BOTH_EMPTY, \ BOOST_VMD_DETAIL_EQUAL_10_EBP \ ) \ (vseq1,vseq2,be1,be2) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_EMPTY_D(d,vseq1,vseq2,be1,be2) \ BOOST_PP_IIF \ ( \ BOOST_PP_BITAND(be1,be2), \ BOOST_VMD_DETAIL_EQUAL_BOTH_EMPTY, \ BOOST_VMD_DETAIL_EQUAL_10_EBP_D \ ) \ (d,vseq1,vseq2,be1,be2) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10(vseq1,vseq2) \ BOOST_VMD_DETAIL_EQUAL_10_EMPTY \ ( \ vseq1, \ vseq2, \ BOOST_VMD_IS_EMPTY(vseq1), \ BOOST_VMD_IS_EMPTY(vseq2) \ ) \ /**/ #define BOOST_VMD_DETAIL_EQUAL_10_D(d,vseq1,vseq2) \ BOOST_VMD_DETAIL_EQUAL_10_EMPTY_D \ ( \ d, \ vseq1, \ vseq2, \ BOOST_VMD_IS_EMPTY(vseq1), \ BOOST_VMD_IS_EMPTY(vseq2) \ ) \ /**/ #endif /* BOOST_VMD_DETAIL_EQUAL_10_HPP */
29.074205
87
0.555785
davidbrownell
cc0d28d510e6dbac65cfd501c410ebe8d8cdccc9
14,246
hpp
C++
src/smilesection.hpp
quantlibnode/quantlibnode
b50348131af77a2b6c295f44ef3245daf05c4afc
[ "MIT" ]
27
2016-11-19T16:51:21.000Z
2021-09-08T16:44:15.000Z
src/smilesection.hpp
quantlibnode/quantlibnode
b50348131af77a2b6c295f44ef3245daf05c4afc
[ "MIT" ]
1
2016-12-28T16:38:38.000Z
2017-02-17T05:32:13.000Z
src/smilesection.hpp
quantlibnode/quantlibnode
b50348131af77a2b6c295f44ef3245daf05c4afc
[ "MIT" ]
10
2016-12-28T02:31:38.000Z
2021-06-15T09:02:07.000Z
/* Copyright (C) 2016 -2017 Jerry Jin */ #ifndef smilesection_h #define smilesection_h #include <nan.h> #include <string> #include <queue> #include <utility> #include "../quantlibnode.hpp" #include <oh/objecthandler.hpp> using namespace node; using namespace v8; using namespace std; class FlatSmileSectionWorker : public Nan::AsyncWorker { public: string mObjectID; ObjectHandler::property_t mOptionDate; double mVolatility; string mDayCounter; ObjectHandler::property_t mRefDate; double mAtmValue; string mVolatilityType; double mDisplacement; string mReturnValue; string mError; FlatSmileSectionWorker( Nan::Callback *callback ,string ObjectID ,ObjectHandler::property_t OptionDate ,double Volatility ,string DayCounter ,ObjectHandler::property_t RefDate ,double AtmValue ,string VolatilityType ,double Displacement ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mOptionDate(OptionDate) ,mVolatility(Volatility) ,mDayCounter(DayCounter) ,mRefDate(RefDate) ,mAtmValue(AtmValue) ,mVolatilityType(VolatilityType) ,mDisplacement(Displacement) { }; //~FlatSmileSectionWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionWorker : public Nan::AsyncWorker { public: string mObjectID; ObjectHandler::property_t mOptionDate; double mForwardRate; std::vector<double> mStrike; bool mFloatingStrike; double mAtmVolatility; std::vector<double> mVolatilitySpreads; double mAlpha; double mBeta; double mNu; double mRho; bool mAlphaIsFixed; bool mBetaIsFixed; bool mNuIsFixed; bool mRhoIsFixed; bool mVegaWeighted; string mEndCriteria; string mMethod; string mDayCounter; string mReturnValue; string mError; SabrInterpolatedSmileSectionWorker( Nan::Callback *callback ,string ObjectID ,ObjectHandler::property_t OptionDate ,double ForwardRate ,std::vector<double> Strike ,bool FloatingStrike ,double AtmVolatility ,std::vector<double> VolatilitySpreads ,double Alpha ,double Beta ,double Nu ,double Rho ,bool AlphaIsFixed ,bool BetaIsFixed ,bool NuIsFixed ,bool RhoIsFixed ,bool VegaWeighted ,string EndCriteria ,string Method ,string DayCounter ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mOptionDate(OptionDate) ,mForwardRate(ForwardRate) ,mStrike(Strike) ,mFloatingStrike(FloatingStrike) ,mAtmVolatility(AtmVolatility) ,mVolatilitySpreads(VolatilitySpreads) ,mAlpha(Alpha) ,mBeta(Beta) ,mNu(Nu) ,mRho(Rho) ,mAlphaIsFixed(AlphaIsFixed) ,mBetaIsFixed(BetaIsFixed) ,mNuIsFixed(NuIsFixed) ,mRhoIsFixed(RhoIsFixed) ,mVegaWeighted(VegaWeighted) ,mEndCriteria(EndCriteria) ,mMethod(Method) ,mDayCounter(DayCounter) { }; //~SabrInterpolatedSmileSectionWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSection1Worker : public Nan::AsyncWorker { public: string mObjectID; ObjectHandler::property_t mOptionDate; ObjectHandler::property_t mForwardRate; std::vector<double> mStrike; bool mFloatingStrike; ObjectHandler::property_t mAtmVolatility; std::vector<ObjectHandler::property_t> mVolatilitySpreads; double mAlpha; double mBeta; double mNu; double mRho; bool mAlphaIsFixed; bool mBetaIsFixed; bool mNuIsFixed; bool mRhoIsFixed; bool mVegaWeighted; string mEndCriteria; string mMethod; string mDayCounter; string mReturnValue; string mError; SabrInterpolatedSmileSection1Worker( Nan::Callback *callback ,string ObjectID ,ObjectHandler::property_t OptionDate ,ObjectHandler::property_t ForwardRate ,std::vector<double> Strike ,bool FloatingStrike ,ObjectHandler::property_t AtmVolatility ,std::vector<ObjectHandler::property_t> VolatilitySpreads ,double Alpha ,double Beta ,double Nu ,double Rho ,bool AlphaIsFixed ,bool BetaIsFixed ,bool NuIsFixed ,bool RhoIsFixed ,bool VegaWeighted ,string EndCriteria ,string Method ,string DayCounter ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mOptionDate(OptionDate) ,mForwardRate(ForwardRate) ,mStrike(Strike) ,mFloatingStrike(FloatingStrike) ,mAtmVolatility(AtmVolatility) ,mVolatilitySpreads(VolatilitySpreads) ,mAlpha(Alpha) ,mBeta(Beta) ,mNu(Nu) ,mRho(Rho) ,mAlphaIsFixed(AlphaIsFixed) ,mBetaIsFixed(BetaIsFixed) ,mNuIsFixed(NuIsFixed) ,mRhoIsFixed(RhoIsFixed) ,mVegaWeighted(VegaWeighted) ,mEndCriteria(EndCriteria) ,mMethod(Method) ,mDayCounter(DayCounter) { }; //~SabrInterpolatedSmileSection1Worker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrSmileSectionWorker : public Nan::AsyncWorker { public: string mObjectID; double mOptionTime; std::vector<double> mStrikes; std::vector<ObjectHandler::property_t> mStdDevs; ObjectHandler::property_t mForward; double mAlpha; double mBeta; double mNu; double mRho; bool mAlphaIsFixed; bool mBetaIsFixed; bool mNuIsFixed; bool mRhoIsFixed; bool mVegaWeighted; string mEndCriteria; string mMethod; string mReturnValue; string mError; SabrSmileSectionWorker( Nan::Callback *callback ,string ObjectID ,double OptionTime ,std::vector<double> Strikes ,std::vector<ObjectHandler::property_t> StdDevs ,ObjectHandler::property_t Forward ,double Alpha ,double Beta ,double Nu ,double Rho ,bool AlphaIsFixed ,bool BetaIsFixed ,bool NuIsFixed ,bool RhoIsFixed ,bool VegaWeighted ,string EndCriteria ,string Method ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mOptionTime(OptionTime) ,mStrikes(Strikes) ,mStdDevs(StdDevs) ,mForward(Forward) ,mAlpha(Alpha) ,mBeta(Beta) ,mNu(Nu) ,mRho(Rho) ,mAlphaIsFixed(AlphaIsFixed) ,mBetaIsFixed(BetaIsFixed) ,mNuIsFixed(NuIsFixed) ,mRhoIsFixed(RhoIsFixed) ,mVegaWeighted(VegaWeighted) ,mEndCriteria(EndCriteria) ,mMethod(Method) { }; //~SabrSmileSectionWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class InterpolatedSmileSectionWorker : public Nan::AsyncWorker { public: string mObjectID; ObjectHandler::property_t mOptionDate; std::vector<double> mStrikes; std::vector<ObjectHandler::property_t> mStdDevs; ObjectHandler::property_t mAtmLevel; string mDayCounter; string mVolatilityType; double mDisplacement; string mReturnValue; string mError; InterpolatedSmileSectionWorker( Nan::Callback *callback ,string ObjectID ,ObjectHandler::property_t OptionDate ,std::vector<double> Strikes ,std::vector<ObjectHandler::property_t> StdDevs ,ObjectHandler::property_t AtmLevel ,string DayCounter ,string VolatilityType ,double Displacement ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mOptionDate(OptionDate) ,mStrikes(Strikes) ,mStdDevs(StdDevs) ,mAtmLevel(AtmLevel) ,mDayCounter(DayCounter) ,mVolatilityType(VolatilityType) ,mDisplacement(Displacement) { }; //~InterpolatedSmileSectionWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SmileSectionFromSabrVolSurfaceWorker : public Nan::AsyncWorker { public: string mObjectID; ObjectHandler::property_t mSabrVolSurface; double mOptionTime; string mReturnValue; string mError; SmileSectionFromSabrVolSurfaceWorker( Nan::Callback *callback ,string ObjectID ,ObjectHandler::property_t SabrVolSurface ,double OptionTime ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mSabrVolSurface(SabrVolSurface) ,mOptionTime(OptionTime) { }; //~SmileSectionFromSabrVolSurfaceWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SmileSectionVolatilityWorker : public Nan::AsyncWorker { public: string mObjectID; double mStrike; double mReturnValue; string mError; SmileSectionVolatilityWorker( Nan::Callback *callback ,string ObjectID ,double Strike ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mStrike(Strike) { }; //~SmileSectionVolatilityWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SmileSectionVarianceWorker : public Nan::AsyncWorker { public: string mObjectID; double mStrike; double mReturnValue; string mError; SmileSectionVarianceWorker( Nan::Callback *callback ,string ObjectID ,double Strike ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) ,mStrike(Strike) { }; //~SmileSectionVarianceWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SmileSectionAtmLevelWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SmileSectionAtmLevelWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SmileSectionAtmLevelWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SmileSectionExerciseDateWorker : public Nan::AsyncWorker { public: string mObjectID; long mReturnValue; string mError; SmileSectionExerciseDateWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SmileSectionExerciseDateWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SmileSectionDayCounterWorker : public Nan::AsyncWorker { public: string mObjectID; string mReturnValue; string mError; SmileSectionDayCounterWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SmileSectionDayCounterWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionAlphaWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SabrInterpolatedSmileSectionAlphaWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionAlphaWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionBetaWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SabrInterpolatedSmileSectionBetaWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionBetaWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionNuWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SabrInterpolatedSmileSectionNuWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionNuWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionRhoWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SabrInterpolatedSmileSectionRhoWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionRhoWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionErrorWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SabrInterpolatedSmileSectionErrorWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionErrorWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionMaxErrorWorker : public Nan::AsyncWorker { public: string mObjectID; double mReturnValue; string mError; SabrInterpolatedSmileSectionMaxErrorWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionMaxErrorWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; class SabrInterpolatedSmileSectionEndCriteriaWorker : public Nan::AsyncWorker { public: string mObjectID; string mReturnValue; string mError; SabrInterpolatedSmileSectionEndCriteriaWorker( Nan::Callback *callback ,string ObjectID ): Nan::AsyncWorker(callback) ,mObjectID(ObjectID) { }; //~SabrInterpolatedSmileSectionEndCriteriaWorker(); //void Destroy(); void Execute(); void HandleOKCallback(); }; #endif
19.435198
79
0.659273
quantlibnode
cc0ee718e93af0c434dd888f299c64c242d010ad
2,013
cc
C++
libs/xmi/operation.cc
sandtreader/obtools
2382e2d90bb62c9665433d6d01bbd31b8ad66641
[ "MIT" ]
null
null
null
libs/xmi/operation.cc
sandtreader/obtools
2382e2d90bb62c9665433d6d01bbd31b8ad66641
[ "MIT" ]
null
null
null
libs/xmi/operation.cc
sandtreader/obtools
2382e2d90bb62c9665433d6d01bbd31b8ad66641
[ "MIT" ]
null
null
null
//========================================================================== // ObTools::XMI: operation.cc // // UML::Operation functionality // // Copyright (c) 2003 Paul Clark. All rights reserved // This code comes with NO WARRANTY and is subject to licence agreement //========================================================================== #include "ot-uml.h" using namespace ObTools::UML; //-------------------------------------------------------------------------- // Constructor Operation::Operation(XMI::Reader& rdr, XML::Element& xe) :BehaviouralFeature(rdr, xe) { // Read parameter sub-elements from XML source read_subelements("UML:Parameter", create_element<Parameter>); // Get basic properties is_abstract = get_bool_property("isAbstract", "UML:Operation.isAbstract"); is_root = get_bool_property("isRoot", "UML:Operation.isRoot"); is_leaf = get_bool_property("isLeaf", "UML:Operation.isLeaf"); string cck = get_property("concurrency", "UML:Operation.concurrency"); if (cck=="sequential") concurrency=CONCURRENCY_SEQUENTIAL; else if (cck=="guarded") concurrency=CONCURRENCY_GUARDED; else if (cck.empty() || cck=="concurrent") concurrency=CONCURRENCY_CONCURRENT; else { reader.warning("Unknown operation concurrency: ", cck); concurrency=CONCURRENCY_SEQUENTIAL; // Safest } } //-------------------------------------------------------------------------- // Printer void Operation::print_header(ostream& sout) { BehaviouralFeature::print_header(sout); if (is_abstract) sout << " (abstract)"; if (is_root) sout << " (root)"; if (is_leaf) sout << " (leaf)"; switch (concurrency) { case CONCURRENCY_SEQUENTIAL: sout << " (sequential)"; break; case CONCURRENCY_GUARDED: sout << " (guarded)"; break; case CONCURRENCY_CONCURRENT: // Default - don't clutter break; } }
27.575342
76
0.545951
sandtreader
cc0ee9a73145bbbca35e45e7a96a494223a2dc46
1,117
cpp
C++
BAC/exercises/ch9/UVa103.cpp
Anyrainel/aoapc-code
e787a01380698fb9236d933462052f97b20e6132
[ "Apache-2.0" ]
3
2017-08-15T06:00:01.000Z
2018-12-10T09:05:53.000Z
BAC/exercises/ch9/UVa103.cpp
Anyrainel/aoapc-related-code
e787a01380698fb9236d933462052f97b20e6132
[ "Apache-2.0" ]
null
null
null
BAC/exercises/ch9/UVa103.cpp
Anyrainel/aoapc-related-code
e787a01380698fb9236d933462052f97b20e6132
[ "Apache-2.0" ]
2
2017-09-16T18:46:27.000Z
2018-05-22T05:42:03.000Z
// UVa103 Stacking Boxes // Rujia Liu // 题意:输入k个n维盒子(k<=30, n<=10),找一个最长嵌套序列。 // 算法:DAG上的最长路。首先把盒子的各个维排序,这样判断起来比较简单 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxk = 30 + 5; const int maxn = 10 + 5; int n, k, box[maxk][maxn], d[maxk], next[maxk]; int dp(int i) { int& ans = d[i]; if(ans > 0) return ans; ans = 1; next[i] = -1; for(int j = 0; j < k; j++) { bool bigger = true; for(int dim = 0; dim < n; dim++) if(box[j][dim] <= box[i][dim]) { bigger = false; break; } if(bigger && dp(j) + 1 > ans) { ans = dp(j) + 1; next[i] = j; } } return ans; } int main() { while(scanf("%d%d", &k, &n) == 2) { for(int i = 0; i < k; i++) { for(int j = 0; j < n; j++) scanf("%d", &box[i][j]); sort(box[i], box[i]+n); } memset(d, 0, sizeof(d)); int ans = 0, first = -1; for(int i = 0; i < k; i++) if(dp(i) > ans) { ans = dp(i); first = i; } printf("%d\n%d", ans, first+1); for(int idx = next[first]; idx >= 0; idx = next[idx]) printf(" %d", idx+1); printf("\n"); } return 0; }
22.795918
63
0.498657
Anyrainel
cc1733618c8c9d3d16f8ff8bce6fba2e120a08b7
1,507
cpp
C++
VPKReader/VPKReader.cpp
hufuman/VPKReader
d17af846a8212caa1e739852e266fe8ee6a5c1ea
[ "MIT" ]
14
2015-05-07T15:05:38.000Z
2020-12-04T07:00:45.000Z
VPKReader/VPKReader.cpp
hufuman/VPKReader
d17af846a8212caa1e739852e266fe8ee6a5c1ea
[ "MIT" ]
null
null
null
VPKReader/VPKReader.cpp
hufuman/VPKReader
d17af846a8212caa1e739852e266fe8ee6a5c1ea
[ "MIT" ]
6
2015-05-21T16:03:03.000Z
2021-05-17T17:17:52.000Z
// VPKReader.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "VPKReader.h" #include "VPKReaderDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif // CVPKReaderApp BEGIN_MESSAGE_MAP(CVPKReaderApp, CWinApp) END_MESSAGE_MAP() // CVPKReaderApp construction CVPKReaderApp::CVPKReaderApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } // The one and only CVPKReaderApp object CVPKReaderApp theApp; // CVPKReaderApp initialization BOOL CVPKReaderApp::InitInstance() { // InitCommonControlsEx() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // Set this to include all the common control classes you want to use // in your application. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinApp::InitInstance(); CVPKReaderDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
22.161765
71
0.746516
hufuman
cc182522136bfe6534e23bb5db502489f80c5c6f
1,296
cpp
C++
code/RegulaFalsi.cpp
Shiv-sharma-111/Numerical-Methods
3a85a1b643f3b4c00fb1b6d3c13af124e9d084e9
[ "MIT" ]
null
null
null
code/RegulaFalsi.cpp
Shiv-sharma-111/Numerical-Methods
3a85a1b643f3b4c00fb1b6d3c13af124e9d084e9
[ "MIT" ]
null
null
null
code/RegulaFalsi.cpp
Shiv-sharma-111/Numerical-Methods
3a85a1b643f3b4c00fb1b6d3c13af124e9d084e9
[ "MIT" ]
null
null
null
// Program for implementation of Bisection Method for #include<bits/stdc++.h> using namespace std; #define MAX_ITER 1000000 //Define the maximium iteration according to your questio // An example function whose solution is determined using // Bisection Method. The function is x^3 - x^2 + 2 double func(double x) { return x*x*x - x*x + 2; } // Prints root of func(x) in interval [a, b] void regulaFalsi(double a, double b) { if (func(a) * func(b) >= 0) { cout << "You have not assumed right a and b"<<endl; return; } double c = a; // Initialize result for (int i=0; i < MAX_ITER; i++) { // Find the point that touches x axis c = (a*func(b) - b*func(a))/ (func(b) - func(a)); // Check if the above found point is root if (func(c)==0) break; // Decide the side to repeat the steps else if (func(c)*func(a) < 0) b = c; else a = c; } cout << "The value of root is : " << c; } // main function int main() { // Plz enter the initial values of A & B; cout<<"Plz Enter the value A and B"; double a,b; cin>>a>>b; //double a =-200, b = 300; regulaFalsi(a, b); return 0; }
24
60
0.53858
Shiv-sharma-111
cc206c1d19bcb55dc116a958b9577bed9b183c6f
31,377
cpp
C++
Sources/Elastos/Frameworks/Droid/Base/Packages/SystemUI/src/elastos/droid/systemui/CSearchPanelCircleView.cpp
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
7
2017-07-13T10:34:54.000Z
2021-04-16T05:40:35.000Z
Sources/Elastos/Frameworks/Droid/Base/Packages/SystemUI/src/elastos/droid/systemui/CSearchPanelCircleView.cpp
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
null
null
null
Sources/Elastos/Frameworks/Droid/Base/Packages/SystemUI/src/elastos/droid/systemui/CSearchPanelCircleView.cpp
jingcao80/Elastos
d0f39852356bdaf3a1234743b86364493a0441bc
[ "Apache-2.0" ]
9
2017-07-13T12:33:20.000Z
2021-06-19T02:46:48.000Z
//========================================================================= // Copyright (C) 2012 The Elastos Open Source Project // // 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 "elastos/droid/systemui/CSearchPanelCircleView.h" #include "elastos/droid/systemui/statusbar/phone/CPhoneStatusBar.h" #include "elastos/droid/R.h" #include "R.h" #include <elastos/core/Math.h> using Elastos::Droid::Animation::CValueAnimatorHelper; using Elastos::Droid::Animation::EIID_IAnimatorUpdateListener; using Elastos::Droid::Animation::IAnimatorListener; using Elastos::Droid::Animation::IPropertyValuesHolder; using Elastos::Droid::Animation::ITimeInterpolator; using Elastos::Droid::Animation::IValueAnimatorHelper; using Elastos::Droid::Content::Res::IResources; using Elastos::Droid::Graphics::CPaint; using Elastos::Droid::Graphics::CRect; using Elastos::Droid::SystemUI::StatusBar::Phone::CPhoneStatusBar; using Elastos::Droid::View::Animation::CAnimationUtils; using Elastos::Droid::View::Animation::CLinearInterpolator; using Elastos::Droid::View::Animation::IAnimationUtils; using Elastos::Droid::R; using Elastos::Core::IFloat; using Elastos::Core::Math; using Elastos::Utility::CArrayList; namespace Elastos { namespace Droid { namespace SystemUI { //======================================================== // CSearchPanelCircleView::Ripple::MyAnimatorUpdateListener //======================================================== CAR_INTERFACE_IMPL(CSearchPanelCircleView::Ripple::MyAnimatorUpdateListener, Object, IAnimatorUpdateListener) CSearchPanelCircleView::Ripple::MyAnimatorUpdateListener::MyAnimatorUpdateListener( /* [in] */ Ripple* host) : mHost(host) {} ECode CSearchPanelCircleView::Ripple::MyAnimatorUpdateListener::OnAnimationUpdate( /* [in] */ IValueAnimator* animation) { Float f1; animation->GetAnimatedFraction(&f1); mHost->mAlpha = 1.0f - f1; ITimeInterpolator::Probe(mHost->mHost->mDisappearInterpolator)->GetInterpolation(mHost->mAlpha, &(mHost->mAlpha)); ITimeInterpolator::Probe(mHost->mHost->mAppearInterpolator)->GetInterpolation(f1, &(mHost->mRadius)); mHost->mRadius *= mHost->mEndRadius; mHost->mHost->Invalidate(); return NOERROR; } //======================================================== // CSearchPanelCircleView::Ripple::MyAnimatorListenerAdapter //======================================================== CSearchPanelCircleView::Ripple::MyAnimatorListenerAdapter::MyAnimatorListenerAdapter( /* [in] */ Ripple* host) : mHost(host) {} ECode CSearchPanelCircleView::Ripple::MyAnimatorListenerAdapter::OnAnimationEnd( /* [in] */ IAnimator* animation) { mHost->mHost->mRipples->Remove((IAnimatorListener*)this); mHost->mHost->UpdateClipping(); return NOERROR; } ECode CSearchPanelCircleView::Ripple::MyAnimatorListenerAdapter::OnAnimationStart( /* [in] */ IAnimator* animation) { mHost->mHost->mRipples->Add((IAnimatorListener*)this); mHost->mHost->UpdateClipping(); return NOERROR; } //======================================================== // CSearchPanelCircleView::Ripple //======================================================== CSearchPanelCircleView::Ripple::Ripple( /* [in] */ Float x, /* [in] */ Float y, /* [in] */ Float endRadius, /* [in] */ CSearchPanelCircleView* host) : mX(x) , mY(y) , mEndRadius(endRadius) , mHost(host) { } void CSearchPanelCircleView::Ripple::Start() { AutoPtr<IValueAnimatorHelper> vah; CValueAnimatorHelper::AcquireSingleton((IValueAnimatorHelper**)&vah); AutoPtr<ArrayOf<Float> > fs = ArrayOf<Float>::Alloc(2); (*fs)[0] = 0.0f; (*fs)[1] = 1.0f; AutoPtr<IValueAnimator> animator; vah->OfFloat(fs, (IValueAnimator**)&animator); // Linear since we are animating multiple values AutoPtr<ITimeInterpolator> ti; CLinearInterpolator::New((ITimeInterpolator**)&ti); IAnimator::Probe(animator)->SetInterpolator(ti); AutoPtr<MyAnimatorUpdateListener> aul = new MyAnimatorUpdateListener(this); animator->AddUpdateListener((IAnimatorUpdateListener*)aul); AutoPtr<MyAnimatorListenerAdapter> ala = new MyAnimatorListenerAdapter(this); IAnimator::Probe(animator)->AddListener((IAnimatorListener*)ala); animator->SetDuration(400); IAnimator::Probe(animator)->Start(); } void CSearchPanelCircleView::Ripple::Draw( /* [in] */ ICanvas* canvas) { mHost->mRipplePaint->SetAlpha((Int32) (mAlpha * 255)); canvas->DrawCircle(mX, mY, mRadius, mHost->mRipplePaint); } //======================================================== // CSearchPanelCircleView::CircleUpdateListener //======================================================== CAR_INTERFACE_IMPL(CSearchPanelCircleView::CircleUpdateListener, Object, IAnimatorUpdateListener) CSearchPanelCircleView::CircleUpdateListener::CircleUpdateListener( /* [in] */ CSearchPanelCircleView* host) : mHost(host) { } ECode CSearchPanelCircleView::CircleUpdateListener::OnAnimationUpdate( /* [in] */ IValueAnimator* animation) { AutoPtr<IInterface> av; animation->GetAnimatedValue((IInterface**)&av); AutoPtr<IFloat> f = IFloat::Probe(av); Float v; f->GetValue(&v); mHost->ApplyCircleSize(v); mHost->UpdateElevation(); return NOERROR; } //======================================================== // CSearchPanelCircleView::ClearAnimatorListener //======================================================== CSearchPanelCircleView::ClearAnimatorListener::ClearAnimatorListener( /* [in] */ CSearchPanelCircleView* host) : mHost(host) { } ECode CSearchPanelCircleView::ClearAnimatorListener::OnAnimationEnd( /* [in] */ IAnimator* animation) { mHost->mCircleAnimator = NULL; return NOERROR; } //======================================================== // CSearchPanelCircleView::OffsetUpdateListener //======================================================== CAR_INTERFACE_IMPL(CSearchPanelCircleView::OffsetUpdateListener, Object, IAnimatorUpdateListener) CSearchPanelCircleView::OffsetUpdateListener::OffsetUpdateListener( /* [in] */ CSearchPanelCircleView* host) : mHost(host) { } ECode CSearchPanelCircleView::OffsetUpdateListener::OnAnimationUpdate( /* [in] */ IValueAnimator* animation) { AutoPtr<IInterface> av; animation->GetAnimatedValue((IInterface**)&av); AutoPtr<IFloat> f = IFloat::Probe(av); Float v; f->GetValue(&v); mHost->SetOffset(v); return NOERROR; } //======================================================== // CSearchPanelCircleView::MyViewOutlineProvider //======================================================== CSearchPanelCircleView::MyViewOutlineProvider::MyViewOutlineProvider( /* [in] */ CSearchPanelCircleView* host) : mHost(host) {} ECode CSearchPanelCircleView::MyViewOutlineProvider::GetOutline( /* [in] */ IView* view, /* [in] */ IOutline* outline) { if (mHost->mCircleSize > 0.0f) { outline->SetOval(mHost->mCircleRect); } else { outline->SetEmpty(); } outline->SetAlpha(mHost->mOutlineAlpha); return NOERROR; } //======================================================== // CSearchPanelCircleView::MyAnimatorListenerAdapter2 //======================================================== CSearchPanelCircleView::MyAnimatorListenerAdapter2::MyAnimatorListenerAdapter2( /* [in] */ CSearchPanelCircleView* host, /* [in] */ IRunnable* endRunnable) : mHost(host) , mEndRunnable(endRunnable) {} ECode CSearchPanelCircleView::MyAnimatorListenerAdapter2::OnAnimationEnd( /* [in] */ IAnimator* animation) { if (mEndRunnable != NULL) { mEndRunnable->Run(); } return NOERROR; } //======================================================== // CSearchPanelCircleView::MyAnimatorListenerAdapter3 //======================================================== CSearchPanelCircleView::MyAnimatorListenerAdapter3::MyAnimatorListenerAdapter3( /* [in] */ CSearchPanelCircleView* host, /* [in] */ IRunnable* endRunnable) : mHost(host) , mEndRunnable(endRunnable) {} ECode CSearchPanelCircleView::MyAnimatorListenerAdapter3::OnAnimationEnd( /* [in] */ IAnimator* animation) { mHost->mOffsetAnimator = NULL; if (mEndRunnable != NULL) { mEndRunnable->Run(); } return NOERROR; } //======================================================== // CSearchPanelCircleView::MyAnimatorListenerAdapter4 //======================================================== CSearchPanelCircleView::MyAnimatorListenerAdapter4::MyAnimatorListenerAdapter4( /* [in] */ CSearchPanelCircleView* host, /* [in] */ IRunnable* runnable) : mHost(host) , mRunnable(runnable) {} ECode CSearchPanelCircleView::MyAnimatorListenerAdapter4::OnAnimationEnd( /* [in] */ IAnimator* animation) { if (mRunnable != NULL) { mRunnable->Run(); } return NOERROR; } //======================================================== // CSearchPanelCircleView::MyRunnable //======================================================== CSearchPanelCircleView::MyRunnable::MyRunnable( /* [in] */ CSearchPanelCircleView* host) : mHost(host) {} ECode CSearchPanelCircleView::MyRunnable::Run() { mHost->AddRipple(); return NOERROR; } //======================================================== // CSearchPanelCircleView::MyAnimatorUpdateListener2 //======================================================== CAR_INTERFACE_IMPL(CSearchPanelCircleView::MyAnimatorUpdateListener2, Object, IAnimatorUpdateListener) CSearchPanelCircleView::MyAnimatorUpdateListener2::MyAnimatorUpdateListener2( /* [in] */ CSearchPanelCircleView* host) : mHost(host) {} ECode CSearchPanelCircleView::MyAnimatorUpdateListener2::OnAnimationUpdate( /* [in] */ IValueAnimator* animation) { Float animatedFraction; animation->GetAnimatedFraction(&animatedFraction); Float logoValue = animatedFraction > 0.5f ? 1.0f : animatedFraction / 0.5f; ITimeInterpolator::Probe(CPhoneStatusBar::ALPHA_OUT)->GetInterpolation(1.0f - logoValue, &logoValue); Float backgroundValue; ITimeInterpolator::Probe(CPhoneStatusBar::ALPHA_OUT)->GetInterpolation( (animatedFraction - 0.2f) / 0.8f, &backgroundValue); backgroundValue = animatedFraction < 0.2f ? 0.0f : backgroundValue; backgroundValue = 1.0f - backgroundValue; mHost->mBackgroundPaint->SetAlpha((Int32) (backgroundValue * 255)); mHost->mOutlineAlpha = backgroundValue; IView::Probe(mHost->mLogo)->SetAlpha(logoValue); mHost->InvalidateOutline(); mHost->Invalidate(); return NOERROR; } //======================================================== // CSearchPanelCircleView::MyAnimatorListenerAdapter5 //======================================================== CSearchPanelCircleView::MyAnimatorListenerAdapter5::MyAnimatorListenerAdapter5( /* [in] */ CSearchPanelCircleView* host, /* [in] */ IRunnable* endRunnable) : mHost(host) , mEndRunnable(endRunnable) {} ECode CSearchPanelCircleView::MyAnimatorListenerAdapter5::OnAnimationEnd( /* [in] */ IAnimator* animation) { if (mEndRunnable != NULL) { mEndRunnable->Run(); } IView::Probe(mHost->mLogo)->SetAlpha(1.0f); mHost->mBackgroundPaint->SetAlpha(255); mHost->mOutlineAlpha = 1.0f; mHost->mFadeOutAnimator = NULL; return NOERROR; } //======================================================== // CSearchPanelCircleView //======================================================== CAR_OBJECT_IMPL(CSearchPanelCircleView) CAR_INTERFACE_IMPL(CSearchPanelCircleView, FrameLayout, ISearchPanelCircleView) CSearchPanelCircleView::CSearchPanelCircleView() : mClipToOutline(FALSE) , mAnimatingOut(FALSE) , mOutlineAlpha(0.0f) , mOffset(0.0f) , mCircleSize(0.0f) , mHorizontal(FALSE) , mCircleHidden(FALSE) , mDraggedFarEnough(FALSE) , mOffsetAnimatingIn(FALSE) , mCircleAnimationEndValue(0.0f) {} ECode CSearchPanelCircleView::constructor( /* [in] */ IContext* context) { return constructor(context, NULL); } ECode CSearchPanelCircleView::constructor( /* [in] */ IContext* context, /* [in] */ IAttributeSet* attrs) { return constructor(context, attrs, 0); } ECode CSearchPanelCircleView::constructor( /* [in] */ IContext* context, /* [in] */ IAttributeSet* attrs, /* [in] */ Int32 defStyleAttr) { return constructor(context, attrs, defStyleAttr, 0); } ECode CSearchPanelCircleView::constructor( /* [in] */ IContext* context, /* [in] */ IAttributeSet* attrs, /* [in] */ Int32 defStyleAttr, /* [in] */ Int32 defStyleRes) { CPaint::New((IPaint**)&mBackgroundPaint); CPaint::New((IPaint**)&mRipplePaint); CRect::New((IRect**)&mCircleRect); CRect::New((IRect**)&mStaticRect); CArrayList::New((IArrayList**)&mRipples); mCircleUpdateListener = new CircleUpdateListener(this); mClearAnimatorListener = new ClearAnimatorListener(this); mOffsetUpdateListener = new OffsetUpdateListener(this); FrameLayout::constructor(context, attrs, defStyleAttr, defStyleRes); AutoPtr<MyViewOutlineProvider> vop = new MyViewOutlineProvider(this); SetOutlineProvider(vop); SetWillNotDraw(FALSE); AutoPtr<IResources> res; context->GetResources((IResources**)&res); res->GetDimensionPixelSize(R::dimen::search_panel_circle_size, &mCircleMinSize); res->GetDimensionPixelSize(R::dimen::search_panel_circle_base_margin, &mBaseMargin); res->GetDimensionPixelSize(R::dimen::search_panel_circle_travel_distance, &mStaticOffset); res->GetDimensionPixelSize(R::dimen::search_panel_circle_elevation, &mMaxElevation); AutoPtr<IAnimationUtils> au; CAnimationUtils::AcquireSingleton((IAnimationUtils**)&au); au->LoadInterpolator(mContext, Elastos::Droid::R::interpolator::linear_out_slow_in, (IInterpolator**)&mAppearInterpolator); au->LoadInterpolator(mContext, Elastos::Droid::R::interpolator::fast_out_slow_in, (IInterpolator**)&mFastOutSlowInInterpolator); au->LoadInterpolator(mContext, Elastos::Droid::R::interpolator::fast_out_linear_in, (IInterpolator**)&mDisappearInterpolator); mBackgroundPaint->SetAntiAlias(TRUE); AutoPtr<IResources> res2; GetResources((IResources**)&res2); Int32 color; res2->GetColor(R::color::search_panel_circle_color, &color); mBackgroundPaint->SetColor(color); res2->GetColor(R::color::search_panel_ripple_color, &color); mRipplePaint->SetColor(color); mRipplePaint->SetAntiAlias(TRUE); return NOERROR; } void CSearchPanelCircleView::OnDraw( /* [in] */ ICanvas* canvas) { FrameLayout::OnDraw(canvas); DrawBackground(canvas); DrawRipples(canvas); } void CSearchPanelCircleView::DrawRipples( /* [in] */ ICanvas* canvas) { Int32 size; mRipples->GetSize(&size); for (Int32 i = 0; i < size; i++) { AutoPtr<IInterface> _ripple; mRipples->Get(i, (IInterface**)&_ripple); AutoPtr<Ripple> ripple = (Ripple*)(IObject::Probe(_ripple)); ripple->Draw(canvas); } } void CSearchPanelCircleView::DrawBackground( /* [in] */ ICanvas* canvas) { Int32 centerX, centerY; mCircleRect->GetCenterX(&centerX); mCircleRect->GetCenterY(&centerY); canvas->DrawCircle(centerX, centerY, mCircleSize / 2, mBackgroundPaint); } ECode CSearchPanelCircleView::OnFinishInflate() { FrameLayout::OnFinishInflate(); AutoPtr<IView> view; FindViewById(R::id::search_logo, (IView**)&view); mLogo = IImageView::Probe(view); return NOERROR; } ECode CSearchPanelCircleView::OnLayout( /* [in] */ Boolean changed, /* [in] */ Int32 l, /* [in] */ Int32 t, /* [in] */ Int32 r, /* [in] */ Int32 b) { Int32 w, h; IView::Probe(mLogo)->GetMeasuredWidth(&w); IView::Probe(mLogo)->GetMeasuredHeight(&h); IView::Probe(mLogo)->Layout(0, 0, w, h); if (changed) { UpdateCircleRect(mStaticRect, mStaticOffset, TRUE); } return NOERROR; } ECode CSearchPanelCircleView::SetCircleSize( /* [in] */ Float circleSize) { return SetCircleSize(circleSize, FALSE, NULL, 0, NULL); } ECode CSearchPanelCircleView::SetCircleSize( /* [in] */ Float circleSize, /* [in] */ Boolean animated, /* [in] */ IRunnable* endRunnable, /* [in] */ Int32 startDelay, /* [in] */ IInterpolator* interpolator) { IAnimator* animator = IAnimator::Probe(mCircleAnimator); Boolean isAnimating = mCircleAnimator != NULL; Boolean isRunning = FALSE; if (animator) { animator->IsRunning(&isRunning); } Boolean animationPending = isAnimating && !isRunning; Boolean animatingOut = isAnimating && mCircleAnimationEndValue == 0; if (animated || animationPending || animatingOut) { if (isAnimating) { if (circleSize == mCircleAnimationEndValue) { return E_NULL_POINTER_EXCEPTION; } animator->Cancel(); } AutoPtr<IValueAnimatorHelper> vah; CValueAnimatorHelper::AcquireSingleton((IValueAnimatorHelper**)&vah); AutoPtr<ArrayOf<Float> > fs = ArrayOf<Float>::Alloc(2); (*fs)[0] = mCircleSize; (*fs)[1] = circleSize; mCircleAnimator = NULL; vah->OfFloat(fs, (IValueAnimator**)&mCircleAnimator); animator = IAnimator::Probe(mCircleAnimator); mCircleAnimator->AddUpdateListener(mCircleUpdateListener); animator->AddListener(mClearAnimatorListener); AutoPtr<MyAnimatorListenerAdapter2> ala = new MyAnimatorListenerAdapter2(this, endRunnable); animator->AddListener(ala); AutoPtr<IInterpolator> desiredInterpolator = interpolator != NULL ? interpolator : circleSize == 0 ? mDisappearInterpolator.Get() : mAppearInterpolator.Get(); animator->SetInterpolator(ITimeInterpolator::Probe(desiredInterpolator)); mCircleAnimator->SetDuration(300); animator->SetStartDelay(startDelay); animator->Start(); mCircleAnimationEndValue = circleSize; } else { if (isAnimating) { Float diff = circleSize - mCircleAnimationEndValue; AutoPtr<ArrayOf<IPropertyValuesHolder*> > values; mCircleAnimator->GetValues((ArrayOf<IPropertyValuesHolder*>**)&values); AutoPtr<ArrayOf<Float> > fvs = ArrayOf<Float>::Alloc(2); (*fvs)[0] = diff; (*fvs)[1] = circleSize; (*values)[0]->SetFloatValues(fvs); Int64 currentPlayTime; mCircleAnimator->GetCurrentPlayTime(&currentPlayTime); mCircleAnimator->SetCurrentPlayTime(currentPlayTime); mCircleAnimationEndValue = circleSize; } else { ApplyCircleSize(circleSize); UpdateElevation(); } } return NOERROR; } void CSearchPanelCircleView::ApplyCircleSize( /* [in] */ Float circleSize) { mCircleSize = circleSize; UpdateLayout(); } void CSearchPanelCircleView::UpdateElevation() { Float t = (mStaticOffset - mOffset) / (Float) mStaticOffset; t = 1.0f - Elastos::Core::Math::Max(t, 0.0f); Float offset = t * mMaxElevation; SetElevation(offset); } ECode CSearchPanelCircleView::SetOffset( /* [in] */ Float offset) { SetOffset(offset, FALSE, 0, NULL, NULL); return NOERROR; } void CSearchPanelCircleView::SetOffset( /* [in] */ Float offset, /* [in] */ Boolean animate, /* [in] */ Int32 startDelay, /* [in] */ IInterpolator* interpolator, /* [in] */ IRunnable* endRunnable) { if (!animate) { mOffset = offset; UpdateLayout(); if (endRunnable != NULL) { endRunnable->Run(); } } else { if (mOffsetAnimator != NULL) { IAnimator::Probe(mOffsetAnimator)->RemoveAllListeners(); IAnimator::Probe(mOffsetAnimator)->Cancel(); } AutoPtr<IValueAnimatorHelper> vah; CValueAnimatorHelper::AcquireSingleton((IValueAnimatorHelper**)&vah); AutoPtr<ArrayOf<Float> > fs = ArrayOf<Float>::Alloc(2); (*fs)[0] = mOffset; (*fs)[1] = offset; vah->OfFloat(fs, (IValueAnimator**)&mOffsetAnimator); mOffsetAnimator->AddUpdateListener(mOffsetUpdateListener); AutoPtr<MyAnimatorListenerAdapter3> ala = new MyAnimatorListenerAdapter3(this, endRunnable); IAnimator::Probe(mOffsetAnimator)->AddListener(ala); AutoPtr<IInterpolator> desiredInterpolator = interpolator != NULL ? interpolator : offset == 0 ? mDisappearInterpolator.Get() : mAppearInterpolator.Get(); IAnimator::Probe(mOffsetAnimator)->SetInterpolator(ITimeInterpolator::Probe(desiredInterpolator)); IAnimator::Probe(mOffsetAnimator)->SetStartDelay(startDelay); mOffsetAnimator->SetDuration(300); IAnimator::Probe(mOffsetAnimator)->Start(); mOffsetAnimatingIn = offset != 0; } } void CSearchPanelCircleView::UpdateLayout() { UpdateCircleRect(); UpdateLogo(); InvalidateOutline(); Invalidate(); UpdateClipping(); } void CSearchPanelCircleView::UpdateClipping() { Boolean isEmpty; mRipples->IsEmpty(&isEmpty); Boolean clip = mCircleSize < mCircleMinSize || !isEmpty; if (clip != mClipToOutline) { SetClipToOutline(clip); mClipToOutline = clip; } } void CSearchPanelCircleView::UpdateLogo() { Boolean exitAnimationRunning = mFadeOutAnimator != NULL; AutoPtr<IRect> rect = exitAnimationRunning ? mCircleRect : mStaticRect; Int32 left, right, top, bottom, width, height; rect->GetLeft(&left); rect->GetRight(&right); rect->GetTop(&top); rect->GetBottom(&bottom); IView::Probe(mLogo)->GetWidth(&width); IView::Probe(mLogo)->GetHeight(&height); Float translationX = (left + right) / 2.0f - width / 2.0f; Float translationY = (top + bottom) / 2.0f - height / 2.0f; Float t = (mStaticOffset - mOffset) / (Float) mStaticOffset; if (!exitAnimationRunning) { if (mHorizontal) { translationX += t * mStaticOffset * 0.3f; } else { translationY += t * mStaticOffset * 0.3f; } Float alpha = 1.0f-t; alpha = Elastos::Core::Math::Max((alpha - 0.5f) * 2.0f, 0.0f); mLogo->SetAlpha(alpha); } else { translationY += (mOffset - mStaticOffset) / 2; } IView::Probe(mLogo)->SetTranslationX(translationX); IView::Probe(mLogo)->SetTranslationY(translationY); } void CSearchPanelCircleView::UpdateCircleRect() { UpdateCircleRect(mCircleRect, mOffset, FALSE); } void CSearchPanelCircleView::UpdateCircleRect( /* [in] */ IRect* rect, /* [in] */ Float offset, /* [in] */ Boolean useStaticSize) { Int32 left, top; Float circleSize = useStaticSize ? mCircleMinSize : mCircleSize; Int32 width, height; GetWidth(&width); GetHeight(&height); if (mHorizontal) { left = (Int32) (width - circleSize / 2 - mBaseMargin - offset); top = (Int32) ((height - circleSize) / 2); } else { left = (Int32) (width - circleSize) / 2; top = (Int32) (height - circleSize / 2 - mBaseMargin - offset); } rect->Set(left, top, (Int32) (left + circleSize), (Int32) (top + circleSize)); } ECode CSearchPanelCircleView::SetHorizontal( /* [in] */ Boolean horizontal) { mHorizontal = horizontal; UpdateCircleRect(mStaticRect, mStaticOffset, TRUE); UpdateLayout(); return NOERROR; } ECode CSearchPanelCircleView::SetDragDistance( /* [in] */ Float distance) { if (!mAnimatingOut && (!mCircleHidden || mDraggedFarEnough)) { Float circleSize = mCircleMinSize + Rubberband(distance); SetCircleSize(circleSize); } return NOERROR; } Float CSearchPanelCircleView::Rubberband( /* [in] */ Float diff) { return (Float) Elastos::Core::Math::Pow(Elastos::Core::Math::Abs(diff), 0.6f); } ECode CSearchPanelCircleView::StartAbortAnimation( /* [in] */ IRunnable* endRunnable) { if (mAnimatingOut) { if (endRunnable != NULL) { endRunnable->Run(); } return E_NULL_POINTER_EXCEPTION; } SetCircleSize(0, TRUE, NULL, 0, NULL); SetOffset(0, TRUE, 0, NULL, endRunnable); mCircleHidden = TRUE; return NOERROR; } ECode CSearchPanelCircleView::StartEnterAnimation() { if (mAnimatingOut) { return E_NULL_POINTER_EXCEPTION; } ApplyCircleSize(0); SetOffset(0); SetCircleSize(mCircleMinSize, TRUE, NULL, 50, NULL); SetOffset(mStaticOffset, TRUE, 50, NULL, NULL); mCircleHidden = FALSE; return NOERROR; } ECode CSearchPanelCircleView::StartExitAnimation( /* [in] */ IRunnable* endRunnable) { if (!mHorizontal) { Int32 width, height; GetWidth(&width); GetHeight(&height); Float offset = height / 2.0f; SetOffset(offset - mBaseMargin, TRUE, 50, mFastOutSlowInInterpolator, NULL); Float xMax = width / 2; Float yMax = height / 2; Float maxRadius = (Float) Elastos::Core::Math::Ceil(Elastos::Core::Math::Hypot(xMax, yMax) * 2); SetCircleSize(maxRadius, TRUE, NULL, 50, mFastOutSlowInInterpolator); PerformExitFadeOutAnimation(50, 300, endRunnable); } else { // when in landscape, we don't wan't the animation as it interferes with the general // rotation animation to the homescreen. endRunnable->Run(); } return NOERROR; } void CSearchPanelCircleView::PerformExitFadeOutAnimation( /* [in] */ Int32 startDelay, /* [in] */ Int32 duration, /* [in] */ IRunnable* endRunnable) { AutoPtr<IValueAnimatorHelper> vah; CValueAnimatorHelper::AcquireSingleton((IValueAnimatorHelper**)&vah); AutoPtr<ArrayOf<Float> > fs = ArrayOf<Float>::Alloc(2); Int32 alpha; mBackgroundPaint->GetAlpha(&alpha); (*fs)[0] = alpha / 255.0f; (*fs)[1] = 0.0f; AutoPtr<IValueAnimator> animator; vah->OfFloat(fs, (IValueAnimator**)&mFadeOutAnimator); // Linear since we are animating multiple values AutoPtr<ITimeInterpolator> ti; CLinearInterpolator::New((ITimeInterpolator**)&ti); IAnimator::Probe(mFadeOutAnimator)->SetInterpolator(ti); AutoPtr<MyAnimatorUpdateListener2> aul = new MyAnimatorUpdateListener2(this); mFadeOutAnimator->AddUpdateListener(aul); AutoPtr<MyAnimatorListenerAdapter5> ala = new MyAnimatorListenerAdapter5(this, endRunnable); IAnimator::Probe(mFadeOutAnimator)->AddListener(ala); IAnimator::Probe(mFadeOutAnimator)->SetStartDelay(startDelay); mFadeOutAnimator->SetDuration(duration); IAnimator::Probe(mFadeOutAnimator)->Start(); } ECode CSearchPanelCircleView::SetDraggedFarEnough( /* [in] */ Boolean farEnough) { if (farEnough != mDraggedFarEnough) { if (farEnough) { if (mCircleHidden) { StartEnterAnimation(); } if (mOffsetAnimator == NULL) { AddRipple(); } else { AutoPtr<MyRunnable> mr = new MyRunnable(this); Boolean isPost; PostDelayed(mr, 100, &isPost); } } else { StartAbortAnimation(NULL); } mDraggedFarEnough = farEnough; } return NOERROR; } void CSearchPanelCircleView::AddRipple() { Int32 size; mRipples->GetSize(&size); if (size > 1) { // we only want 2 ripples at the time return; } Float xInterpolation, yInterpolation; if (mHorizontal) { xInterpolation = 0.75f; yInterpolation = 0.5f; } else { xInterpolation = 0.5f; yInterpolation = 0.75f; } Int32 left, right, top, bottom; mStaticRect->GetLeft(&left); mStaticRect->GetRight(&right); mStaticRect->GetTop(&top); mStaticRect->GetBottom(&bottom); Float circleCenterX = left * (1.0f - xInterpolation) + right * xInterpolation; Float circleCenterY = top * (1.0f - yInterpolation) + bottom * yInterpolation; Float radius = Elastos::Core::Math::Max(mCircleSize, mCircleMinSize * 1.25f) * 0.75f; AutoPtr<Ripple> ripple = new Ripple(circleCenterX, circleCenterY, radius, this); ripple->Start(); } ECode CSearchPanelCircleView::Reset() { mDraggedFarEnough = FALSE; mAnimatingOut = FALSE; mCircleHidden = TRUE; mClipToOutline = FALSE; if (mFadeOutAnimator != NULL) { IAnimator::Probe(mFadeOutAnimator)->Cancel(); } mBackgroundPaint->SetAlpha(255); mOutlineAlpha = 1.0f; return NOERROR; } ECode CSearchPanelCircleView::IsAnimationRunning( /* [in] */ Boolean enterAnimation, /* [out] */ Boolean* result) { VALIDATE_NOT_NULL(result) *result = mOffsetAnimator != NULL && (enterAnimation == mOffsetAnimatingIn); return NOERROR; } ECode CSearchPanelCircleView::PerformOnAnimationFinished( /* [in] */ IRunnable* runnable) { if (mOffsetAnimator != NULL) { AutoPtr<MyAnimatorListenerAdapter4> ala = new MyAnimatorListenerAdapter4(this, runnable); IAnimator::Probe(mOffsetAnimator)->AddListener(ala); } else { if (runnable != NULL) { runnable->Run(); } } return NOERROR; } ECode CSearchPanelCircleView::SetAnimatingOut( /* [in] */ Boolean animatingOut) { mAnimatingOut = animatingOut; return NOERROR; } ECode CSearchPanelCircleView::IsAnimatingOut( /* [out] */ Boolean* result) { VALIDATE_NOT_NULL(result) *result = mAnimatingOut; return NOERROR; } ECode CSearchPanelCircleView::HasOverlappingRendering( /* [out] */ Boolean* result) { VALIDATE_NOT_NULL(result) // not really true but it's ok during an animation, as it's never permanent *result = FALSE; return NOERROR; } } // namespace SystemUI } // namespace Droid } // namespace Elastos
33.666309
133
0.622972
jingcao80
cc216d860d51144982fd80709e6f1d1178ebfd37
270
hpp
C++
src/pulse/extensions/Vector.hpp
Rypac/pulse
c3d6ae0cab947aa6d380a0e225913b62b8883d8b
[ "Apache-2.0" ]
2
2016-10-12T01:31:55.000Z
2017-01-06T21:07:25.000Z
src/pulse/extensions/Vector.hpp
Rypac/pulse
c3d6ae0cab947aa6d380a0e225913b62b8883d8b
[ "Apache-2.0" ]
1
2016-10-28T22:36:04.000Z
2016-11-18T07:59:50.000Z
src/pulse/extensions/Vector.hpp
Rypac/pulse
c3d6ae0cab947aa6d380a0e225913b62b8883d8b
[ "Apache-2.0" ]
null
null
null
#pragma once #include "cocos2d.h" namespace pulse { template <typename T> inline cocos2d::Vector<T> toVector(const std::vector<T>& vec) { cocos2d::Vector<T> out; for (auto&& element : vec) { out.pushBack(element); } return out; } } // pulse
15.882353
63
0.622222
Rypac
cc22eb5c2ee4b4475fb0962b2590c0cd830c552d
47,400
cpp
C++
drishti/networkobject.cpp
stranddw/drishti
63973422fd0272e55f755aa51378ee1da0f4ef8a
[ "MIT" ]
118
2016-11-01T06:01:44.000Z
2022-03-30T05:20:19.000Z
drishti/networkobject.cpp
stranddw/drishti
63973422fd0272e55f755aa51378ee1da0f4ef8a
[ "MIT" ]
56
2016-09-30T09:29:36.000Z
2022-03-31T17:15:32.000Z
drishti/networkobject.cpp
stranddw/drishti
63973422fd0272e55f755aa51378ee1da0f4ef8a
[ "MIT" ]
28
2016-07-31T23:48:51.000Z
2021-05-25T05:32:47.000Z
#include "global.h" #include "staticfunctions.h" #include "networkobject.h" #include "matrix.h" #if defined(Q_OS_WIN32) #include <netcdfcpp.h> #endif void NetworkObject::setScale(float s) { m_scaleV = m_scaleE = s; } float NetworkObject::scaleV() { return m_scaleV; } void NetworkObject::setScaleV(float s) { m_scaleV = s; } float NetworkObject::scaleE() { return m_scaleE; } void NetworkObject::setScaleE(float s) { m_scaleE = s; } void NetworkObject::gridSize(int &nx, int &ny, int &nz) { nx = m_nX; ny = m_nY; nz = m_nZ; } void NetworkObject::setVstops(QGradientStops stops) { m_Vstops = stops; m_resampledVstops = StaticFunctions::resampleGradientStops(stops); } void NetworkObject::setEstops(QGradientStops stops) { m_Estops = stops; m_resampledEstops = StaticFunctions::resampleGradientStops(stops); } QString NetworkObject::vertexAttributeString(int va) { if (va < m_vertexAttribute.count()) return m_vertexAttribute[va].first; return QString(); } QString NetworkObject::edgeAttributeString(int ea) { if (ea < m_edgeAttribute.count()) return m_edgeAttribute[ea].first; return QString(); } bool NetworkObject::vMinmax(int va, float& vmin, float& vmax) { if (va < m_vertexAttribute.count()) { vmin = m_Vminmax[va].first; vmax = m_Vminmax[va].second; return true; } return false; } bool NetworkObject::userVminmax(int va, float& vmin, float& vmax) { if (va < m_vertexAttribute.count()) { vmin = m_userVminmax[va].first; vmax = m_userVminmax[va].second; return true; } return false; } void NetworkObject::setVminmax(int va, float vmin, float vmax) { if (va < m_vertexAttribute.count()) m_Vminmax[va] = qMakePair(vmin, vmax); } void NetworkObject::setUserVminmax(int va, float vmin, float vmax) { if (va < m_vertexAttribute.count()) m_userVminmax[va] = qMakePair(vmin, vmax); } void NetworkObject::setUserVminmax(float vmin, float vmax) { m_userVminmax[m_Vatt] = qMakePair(vmin, vmax); } bool NetworkObject::eMinmax(int ea, float& emin, float& emax) { if (ea < m_edgeAttribute.count()) { emin = m_Eminmax[ea].first; emax = m_Eminmax[ea].second; return true; } return false; } bool NetworkObject::userEminmax(int ea, float& emin, float& emax) { if (ea < m_edgeAttribute.count()) { emin = m_userEminmax[ea].first; emax = m_userEminmax[ea].second; return true; } return false; } void NetworkObject::setEminmax(int ea, float emin, float emax) { if (ea < m_edgeAttribute.count()) m_Eminmax[ea] = qMakePair(emin, emax); } void NetworkObject::setUserEminmax(int ea, float emin, float emax) { if (ea < m_edgeAttribute.count()) m_userEminmax[ea] = qMakePair(emin, emax); } void NetworkObject::setUserEminmax(float emin, float emax) { m_userEminmax[m_Eatt] = qMakePair(emin, emax); } NetworkObject::NetworkObject() { clear(); } NetworkObject::~NetworkObject() { clear(); } void NetworkObject::enclosingBox(Vec &boxMin, Vec &boxMax) { boxMin = m_enclosingBox[0]; boxMax = m_enclosingBox[6]; } void NetworkObject::clear() { m_show = true; m_fileName.clear(); m_centroid = Vec(0,0,0); m_nX = m_nY = m_nZ = 0; m_Vopacity = 1.0; m_Eopacity = 1.0; m_Vstops << QGradientStop(0.0, QColor(250,230,200,255)) << QGradientStop(1.0, QColor(200,100,50,255)); m_resampledVstops = StaticFunctions::resampleGradientStops(m_Vstops); m_Estops << QGradientStop(0.0, QColor(200,230,250,255)) << QGradientStop(1.0, QColor(50,100,200,255)); m_resampledEstops = StaticFunctions::resampleGradientStops(m_Estops); m_Vatt = 0; m_Eatt = 0; m_Vminmax.clear(); m_Eminmax.clear(); m_userVminmax.clear(); m_userEminmax.clear(); m_Vvertices.clear(); m_Vovertices.clear(); m_Vocolor.clear(); m_VtexValues.clear(); m_Evertices.clear(); m_Eovertices.clear(); m_EtexValues.clear(); m_scaleV = 1; m_scaleE = 1; m_vertexRadiusAttribute = -1; m_edgeRadiusAttribute = -1; m_vertexAttribute.clear(); m_edgeAttribute.clear(); m_vertexCenters.clear(); m_edgeNeighbours.clear(); } bool NetworkObject::load(QString flnm) { if (StaticFunctions::checkExtension(flnm, "network")) return loadTextNetwork(flnm); else if (StaticFunctions::checkExtension(flnm, "graphml")) return loadGraphML(flnm); else return loadNetCDF(flnm); return false; } bool NetworkObject::loadTextNetwork(QString flnm) { m_fileName = flnm; m_nodeAtt.clear(); m_edgeAtt.clear(); QFile fl(m_fileName); if (!fl.open(QIODevice::ReadOnly | QIODevice::Text)) return false; QTextStream in(&fl); QString line; QStringList words; int nvert = 0; int nedge = 0; int nva = 0; int nea = 0; line = in.readLine(); words = line.split(" ", QString::SkipEmptyParts); nvert = words[0].toInt(); if (words.count() > 1) nva = words[1].toInt(); line = in.readLine(); words = line.split(" ", QString::SkipEmptyParts); nedge = words[0].toInt(); if (words.count() > 1) nea = words[1].toInt(); for(int i=0; i<nva; i++) { line = in.readLine(); words = line.split("#", QString::SkipEmptyParts); m_nodeAtt << words[0]; } for(int i=0; i<nea; i++) { line = in.readLine(); words = line.split("#", QString::SkipEmptyParts); m_edgeAtt << words[0]; } m_vertexRadiusAttribute = -1; m_edgeRadiusAttribute = -1; for(int i=0; i<m_nodeAtt.count(); i++) { if (m_nodeAtt[i].contains("radius", Qt::CaseInsensitive) || m_nodeAtt[i].contains("diameter", Qt::CaseInsensitive)) { m_vertexRadiusAttribute = i; break; } } for(int i=0; i<m_edgeAtt.count(); i++) { if (m_edgeAtt[i].contains("radius", Qt::CaseInsensitive) || m_edgeAtt[i].contains("diameter", Qt::CaseInsensitive)) { m_edgeRadiusAttribute = i; break; } } //------------------------------------ // read node information { m_vertexAttribute.clear(); m_vertexCenters.clear(); QVector<float> *vat; // not expecting more than 20 attributes int nvat = m_nodeAtt.count(); vat = new QVector<float> [nvat]; for(int i=0; i<nvert; i++) { line = in.readLine(); line = line.simplified(); words = line.split(" ", QString::SkipEmptyParts); float x, y, z; x = words[0].toFloat(); y = words[1].toFloat(); z = words[2].toFloat(); m_vertexCenters << Vec(x,y,z); for (int j=0; j<qMin((int)(words.count()-3),nvat); j++) vat[j] << words[3+j].toFloat(); } int nv = m_vertexCenters.count(); for(int c=0; c<m_nodeAtt.count(); c++) { if (vat[c].count() < nv) vat[c] << 0.0; } for(int vi=0; vi<m_nodeAtt.count(); vi++) m_vertexAttribute << qMakePair(m_nodeAtt[vi], vat[vi]); if (m_vertexRadiusAttribute == -1) { m_vertexRadiusAttribute = m_nodeAtt.count(); QVector<float> rad; rad.resize(m_vertexCenters.count()); rad.fill(2); m_nodeAtt << "vertex_radius"; m_vertexAttribute << qMakePair(QString("vertex_radius"), rad); } for(int i=0; i<nvat; i++) vat[i].clear(); delete [] vat; } //------------------------------------ //------------------------------------ // read edge information { m_edgeAttribute.clear(); m_edgeNeighbours.clear(); QVector<float> *vat; // not expecting more than 20 attributes int nvat = m_edgeAtt.count(); vat = new QVector<float> [nvat]; for(int i=0; i<nedge; i++) { line = in.readLine(); line = line.simplified(); words = line.split(" ", QString::SkipEmptyParts); int a, b; a = words[0].toInt(); b = words[1].toInt(); m_edgeNeighbours << qMakePair(a,b); for (int j=0; j<qMin((int)(words.count()-2),nvat); j++) vat[j] << words[2+j].toFloat(); } int nv = m_edgeNeighbours.count(); for(int c=0; c<m_edgeAtt.count(); c++) { if (vat[c].count() < nv) vat[c] << 0.0; } for(int e=0; e<m_edgeAtt.count(); e++) { if (m_edgeAtt[e].contains("diameter", Qt::CaseInsensitive)) { for(int vi=0; vi<vat[e].count(); vi++) vat[e][vi] /= 2; } } for(int vi=0; vi<m_edgeAtt.count(); vi++) m_edgeAttribute << qMakePair(m_edgeAtt[vi], vat[vi]); if (m_edgeRadiusAttribute == -1) { m_edgeRadiusAttribute = m_edgeAtt.count(); QVector<float> rad; rad.resize(m_edgeNeighbours.count()); rad.fill(2); m_edgeAtt << "edge_radius"; m_edgeAttribute << qMakePair(QString("edge_radius"), rad); } for(int i=0; i<nvat; i++) vat[i].clear(); delete [] vat; } //------------------------------------ //--------------------- Vec bmin = m_vertexCenters[0]; Vec bmax = m_vertexCenters[0]; for(int i=0; i<m_vertexCenters.count(); i++) { bmin = StaticFunctions::minVec(bmin, m_vertexCenters[i]); bmax = StaticFunctions::maxVec(bmax, m_vertexCenters[i]); } m_centroid = (bmin + bmax)/2; m_enclosingBox[0] = Vec(bmin.x, bmin.y, bmin.z); m_enclosingBox[1] = Vec(bmax.x, bmin.y, bmin.z); m_enclosingBox[2] = Vec(bmax.x, bmax.y, bmin.z); m_enclosingBox[3] = Vec(bmin.x, bmax.y, bmin.z); m_enclosingBox[4] = Vec(bmin.x, bmin.y, bmax.z); m_enclosingBox[5] = Vec(bmax.x, bmin.y, bmax.z); m_enclosingBox[6] = Vec(bmax.x, bmax.y, bmax.z); m_enclosingBox[7] = Vec(bmin.x, bmax.y, bmax.z); // m_nZ = (bmax.x - bmin.x) + 1; // m_nY = (bmax.y - bmin.y) + 1; // m_nX = (bmax.z - bmin.z) + 1; m_nZ = bmax.x; m_nY = bmax.y; m_nX = bmax.z; if (!Global::batchMode()) { QString str; str = QString("Grid Size : %1 %2 %3\n").arg(m_nX).arg(m_nY).arg(m_nZ); str += QString("Vertices : %1\n").arg(m_vertexCenters.count()); str += QString("Edges : %1\n").arg(m_edgeNeighbours.count()); str += QString("\n"); str += QString("Vertex Attributes : %1\n").arg(m_vertexAttribute.count()); for(int i=0; i<m_vertexAttribute.count(); i++) str += QString(" %1\n").arg(m_vertexAttribute[i].first); str += QString("\n"); str += QString("Edge Attributes : %1\n").arg(m_edgeAttribute.count()); for(int i=0; i<m_edgeAttribute.count(); i++) str += QString(" %1\n").arg(m_edgeAttribute[i].first); QMessageBox::information(0, "Network loaded", str); } m_Vatt = 0; m_Eatt = 0; m_Vminmax.clear(); m_Eminmax.clear(); m_userVminmax.clear(); m_userEminmax.clear(); for(int i=0; i<m_vertexAttribute.count(); i++) { float vmin = m_vertexAttribute[i].second[0]; float vmax = m_vertexAttribute[i].second[0]; for(int j=1; j<m_vertexAttribute[i].second.count(); j++) { vmin = qMin((float)m_vertexAttribute[i].second[j], vmin); vmax = qMax((float)m_vertexAttribute[i].second[j], vmax); } m_Vminmax.append(qMakePair(vmin, vmax)); m_userVminmax.append(qMakePair((vmin+vmax)/2, vmax)); } for(int i=0; i<m_edgeAttribute.count(); i++) { float emin = m_edgeAttribute[i].second[0]; float emax = m_edgeAttribute[i].second[0]; for(int j=1; j<m_edgeAttribute[i].second.count(); j++) { emin = qMin((float)m_edgeAttribute[i].second[j], emin); emax = qMax((float)m_edgeAttribute[i].second[j], emax); } m_Eminmax.append(qMakePair(emin, emax)); m_userEminmax.append(qMakePair((emin+emax)/2, emax)); } return true; } bool NetworkObject::loadNetCDF(QString flnm) { #if defined(Q_OS_WIN32) m_fileName = flnm; NcError err(NcError::verbose_nonfatal); NcFile ncfFile(flnm.toLatin1().data(), NcFile::ReadOnly); NcAtt *att; NcVar *var; // ---- get gridsize ----- att = ncfFile.get_att("gridsize"); m_nX = att->as_int(0); m_nY = att->as_int(1); m_nZ = att->as_int(2); //------------------------ // ---- get vertex centers ----- var = ncfFile.get_var("vertex_centers"); if (!var) var = ncfFile.get_var("vertex_center"); if (!var) var = ncfFile.get_var("vertex_centres"); if (!var) var = ncfFile.get_var("vertex_centre"); int nv = var->get_dim(0)->size(); float *vc = new float [3*nv]; var->get(vc, nv, 3); m_vertexCenters.resize(nv); for(int i=0; i<nv; i++) m_vertexCenters[i] = Vec(vc[3*i+0], vc[3*i+1], vc[3*i+2]); delete [] vc; //------------------------ // ---- get edges ----- var = ncfFile.get_var("edge_neighbours"); int ne = var->get_dim(0)->size(); int *ed = new int [2*ne]; var->get(ed, ne, 2); m_edgeNeighbours.resize(ne); for(int i=0; i<ne; i++) m_edgeNeighbours[i] = qMakePair(ed[2*i], ed[2*i+1]); delete [] ed; //------------------------ Vec bmin = m_vertexCenters[0]; Vec bmax = m_vertexCenters[0]; for(int i=0; i<m_vertexCenters.count(); i++) { bmin = StaticFunctions::minVec(bmin, m_vertexCenters[i]); bmax = StaticFunctions::maxVec(bmax, m_vertexCenters[i]); } m_centroid = (bmin + bmax)/2; m_enclosingBox[0] = Vec(bmin.x, bmin.y, bmin.z); m_enclosingBox[1] = Vec(bmax.x, bmin.y, bmin.z); m_enclosingBox[2] = Vec(bmax.x, bmax.y, bmin.z); m_enclosingBox[3] = Vec(bmin.x, bmax.y, bmin.z); m_enclosingBox[4] = Vec(bmin.x, bmin.y, bmax.z); m_enclosingBox[5] = Vec(bmax.x, bmin.y, bmax.z); m_enclosingBox[6] = Vec(bmax.x, bmax.y, bmax.z); m_enclosingBox[7] = Vec(bmin.x, bmax.y, bmax.z); // QStringList vatt, eatt; int nvars = ncfFile.num_vars(); // for (int i=0; i < nvars; i++) // { // var = ncfFile.get_var(i); // QString attname = var->name(); // attname.toLower(); // if (attname.contains("vertex_") && // ( attname != "vertex_centers" || // attname != "vertex_centres")) // vatt.append(attname); // else if (attname.contains("edge_") && // attname != "edge_neighbours") // eatt.append(attname); // } m_vertexAttribute.clear(); m_edgeAttribute.clear(); m_vertexRadiusAttribute = -1; m_edgeRadiusAttribute = -1; int vri = 0; int eri = 0; for (int i=0; i < nvars; i++) { var = ncfFile.get_var(i); QString attname = var->name(); attname.toLower(); if (attname.contains("vertex_") && attname != "vertex_center" && attname != "vertex_centre" && attname != "vertex_centers" && attname != "vertex_centres") { if (attname == "vertex_radius") m_vertexRadiusAttribute = vri; vri++; QVector<float> val; val.clear(); if (var->type() == ncByte || var->type() == ncChar) { uchar *v = new uchar[nv]; var->get((ncbyte *)v, nv); for(int j=0; j<nv; j++) val.append(v[j]); delete [] v; } else if (var->type() == ncShort) { short *v = new short[nv]; var->get((short *)v, nv); for(int j=0; j<nv; j++) val.append(v[j]); delete [] v; } else if (var->type() == ncInt) { int *v = new int[nv]; var->get((int *)v, nv); for(int j=0; j<nv; j++) val.append(v[j]); delete [] v; } else if (var->type() == ncFloat) { float *v = new float[nv]; var->get((float *)v, nv); for(int j=0; j<nv; j++) val.append(v[j]); delete [] v; } if (val.count() > 0) m_vertexAttribute.append(qMakePair(attname, val)); } else if (attname.contains("edge_") && attname != "edge_neighbours") { if (attname == "edge_radius") m_edgeRadiusAttribute = eri; eri++; QVector<float> val; val.clear(); if (var->type() == ncByte || var->type() == ncChar) { uchar *v = new uchar[ne]; var->get((ncbyte *)v, ne); for(int j=0; j<ne; j++) val.append(v[j]); delete [] v; } else if (var->type() == ncShort) { short *v = new short[ne]; var->get((short *)v, ne); for(int j=0; j<ne; j++) val.append(v[j]); delete [] v; } else if (var->type() == ncInt) { int *v = new int[ne]; var->get((int *)v, ne); for(int j=0; j<ne; j++) val.append(v[j]); delete [] v; } else if (var->type() == ncFloat) { float *v = new float[ne]; var->get((float *)v, ne); for(int j=0; j<ne; j++) val.append(v[j]); delete [] v; } if (val.count() > 0) m_edgeAttribute.append(qMakePair(attname, val)); } } ncfFile.close(); if (!Global::batchMode()) { QString str; str = QString("Grid Size : %1 %2 %3\n").arg(m_nX).arg(m_nY).arg(m_nZ); str += QString("Vertices : %1\n").arg(m_vertexCenters.count()); str += QString("Edges : %1\n").arg(m_edgeNeighbours.count()); str += QString("\n"); str += QString("Vertex Attributes : %1\n").arg(m_vertexAttribute.count()); for(int i=0; i<m_vertexAttribute.count(); i++) str += QString(" %1\n").arg(m_vertexAttribute[i].first); str += QString("\n"); str += QString("Edge Attributes : %1\n").arg(m_edgeAttribute.count()); for(int i=0; i<m_edgeAttribute.count(); i++) str += QString(" %1\n").arg(m_edgeAttribute[i].first); QMessageBox::information(0, "Network loaded", str); } m_Vatt = 0; m_Eatt = 0; m_Vminmax.clear(); m_Eminmax.clear(); m_userVminmax.clear(); m_userEminmax.clear(); for(int i=0; i<m_vertexAttribute.count(); i++) { float vmin = m_vertexAttribute[i].second[0]; float vmax = m_vertexAttribute[i].second[0]; for(int j=1; j<m_vertexAttribute[i].second.count(); j++) { vmin = qMin((float)m_vertexAttribute[i].second[j], vmin); vmax = qMax((float)m_vertexAttribute[i].second[j], vmax); } m_Vminmax.append(qMakePair(vmin, vmax)); m_userVminmax.append(qMakePair((vmin+vmax)/2, vmax)); } for(int i=0; i<m_edgeAttribute.count(); i++) { float emin = m_edgeAttribute[i].second[0]; float emax = m_edgeAttribute[i].second[0]; for(int j=1; j<m_edgeAttribute[i].second.count(); j++) { emin = qMin((float)m_edgeAttribute[i].second[j], emin); emax = qMax((float)m_edgeAttribute[i].second[j], emax); } m_Eminmax.append(qMakePair(emin, emax)); m_userEminmax.append(qMakePair((emin+emax)/2, emax)); } #endif return true; } bool NetworkObject::save(QString flnm) { return true; } void NetworkObject::postdraw(QGLViewer *viewer, int x, int y, bool active, int idx) { if (!m_show || !active) return; viewer->startScreenCoordinatesSystem(); glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); // blend on top QString str = QString("network %1").arg(idx); QFont font = QFont(); QFontMetrics metric(font); int ht = metric.height(); int wd = metric.width(str); //x -= wd/2; x += 10; StaticFunctions::renderText(x+2, y, str, font, Qt::black, Qt::white); viewer->stopScreenCoordinatesSystem(); } void NetworkObject::draw(QGLViewer *viewer, bool active, float pnear, float pfar, bool backToFront) { if (!m_show) return; if (active) { Vec lineColor = Vec(0.7f, 0.3f, 0.0f); StaticFunctions::drawEnclosingCube(m_tenclosingBox, lineColor); } if (m_Vopacity < 0.05 && m_Eopacity < 0.05) return; glShadeModel(GL_SMOOTH); // emissive when active if (active) { float emiss[] = { 0.5f, 0, 0, 1.0f }; glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emiss); } else { float emiss[] = { 0, 0, 0, 1.0f }; glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emiss); } drawNetwork(pnear, pfar, backToFront); { // reset emissivity float emiss[] = { 0, 0, 0, 1.0f }; glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emiss); } } void NetworkObject::predraw(QGLViewer *viewer, double *Xform, Vec pn, QList<Vec> clipPos, QList<Vec> clipNormal, QList<CropObject> crops, Vec lightVector) { if (!m_show) return; generateSphereSpriteTexture(lightVector); generateCylinderSpriteTexture(lightVector); predrawVertices(viewer, Xform, pn, clipPos, clipNormal, crops); predrawEdges(viewer, Xform, pn, clipPos, clipNormal, crops); // m_tcentroid = Matrix::xformVec(Xform, m_centroid); // // for(int i=0; i<8; i++) // m_tenclosingBox[i] = Matrix::xformVec(Xform, m_enclosingBox[i]); Vec bmin, bmax; Global::bounds(bmin, bmax); Vec vmin = m_enclosingBox[0]; Vec vmax = m_enclosingBox[6]; vmin.x = qMax(vmin.x, bmin.x); vmin.y = qMax(vmin.y, bmin.y); vmin.z = qMax(vmin.z, bmin.z); vmax.x = qMin(vmax.x, bmax.x); vmax.y = qMin(vmax.y, bmax.y); vmax.z = qMin(vmax.z, bmax.z); Vec centroid = (vmin + vmax)/2; m_tcentroid = Matrix::xformVec(Xform, centroid); Vec box[8]; box[0] = Vec(vmin.x, vmin.y, vmin.z); box[1] = Vec(vmax.x, vmin.y, vmin.z); box[2] = Vec(vmax.x, vmax.y, vmin.z); box[3] = Vec(vmin.x, vmax.y, vmin.z); box[4] = Vec(vmin.x, vmin.y, vmax.z); box[5] = Vec(vmax.x, vmin.y, vmax.z); box[6] = Vec(vmax.x, vmax.y, vmax.z); box[7] = Vec(vmin.x, vmax.y, vmax.z); for(int i=0; i<8; i++) m_tenclosingBox[i] = Matrix::xformVec(Xform, box[i]); } void NetworkObject::generateSphereSpriteTexture(Vec lightVector) { int texsize = 64; int t2 = texsize/2; int fx, fy; fx = t2 - (t2-1)*lightVector.x; fy = t2 + (t2-1)*lightVector.y; QRadialGradient rg(t2, t2, t2-1, fx, fy); rg.setColorAt(0.0, Qt::white); rg.setColorAt(1.0, Qt::black); QImage texImage(texsize, texsize, QImage::Format_ARGB32); texImage.fill(0); QPainter p(&texImage); p.setBrush(QBrush(rg)); p.setPen(Qt::transparent); p.drawEllipse(0, 0, texsize, texsize); uchar *thetexture = new uchar[2*texsize*texsize]; const uchar *bits = texImage.bits(); for(int i=0; i<texsize*texsize; i++) { uchar lum = 255; float a = (float)bits[4*i+2]/255.0f; a = 1-a; if (a < 0.5) { if (lightVector.z >= 0.0) a = qMax(a/0.5f, 0.5f); else { a = 0.7f; lum = 50; } } else if (a >= 1) { a = 0; lum = 0; } else { if (lightVector.z >= 0.0) { a = 1-(a-0.5f)/0.5f; lum *= a; a = 0.9f; } else { lum *= 1-fabs(a-0.75f)/0.25f; a = 0.9f; } } a *= 255; thetexture[2*i] = lum; thetexture[2*i+1] = a; } glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Global::sphereTexture()); glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, texsize, texsize, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, thetexture); delete [] thetexture; } void NetworkObject::generateCylinderSpriteTexture(Vec lightVector) { int texsize = 64; float fp = 0.5f+0.5f*lightVector.y; QLinearGradient lg(0, 0, texsize, 0); lg.setColorAt(0.0, Qt::black); lg.setColorAt(1.0, Qt::black); lg.setColorAt(fp, Qt::white); QImage texImage(texsize, texsize, QImage::Format_ARGB32); texImage.fill(0); QPainter p(&texImage); p.setBrush(QBrush(lg)); p.setPen(Qt::transparent); //p.drawEllipse(0, 0, texsize, texsize); p.drawRect(0, 0, texsize, texsize); uchar *thetexture = new uchar[2*texsize*texsize]; const uchar *bits = texImage.bits(); for(int i=0; i<texsize*texsize; i++) { uchar lum = 255; float a = (float)bits[4*i+2]/255.0f; a = 1-a; if (a < 0.5) { if (lightVector.z >= 0.0) a = qMax(a/0.5f, 0.5f); else { a = 0.7f; lum = 50; } } else if (a >= 1) { a = 0; lum = 0; } else { if (lightVector.z >= 0.0f) { a = 1-(a-0.5f)/0.5f; lum *= a; a = 0.9f; } else { lum *= 1-fabs(a-0.75f)/0.25f; a = 0.9f; } } a *= 255; thetexture[2*i] = lum; thetexture[2*i+1] = a; } glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Global::cylinderTexture()); glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, texsize, texsize, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, thetexture); delete [] thetexture; } void NetworkObject::predrawVertices(QGLViewer *viewer, double *Xform, Vec pn, QList<Vec> clipPos, QList<Vec> clipNormal, QList<CropObject> crops) { Vec bmin, bmax; Global::bounds(bmin, bmax); // QMessageBox::information(0, "", QString("%1 %2 %3\n%4 %5 %6").\ // arg(bmin.x).arg(bmin.y).arg(bmin.z).\ // arg(bmax.x).arg(bmax.y).arg(bmax.z)); m_Vovertices.resize(m_vertexCenters.count()); m_Vocolor.resize(m_vertexCenters.count()); QVector<float> rad; rad.resize(m_vertexCenters.count()); int stopsCount = m_resampledVstops.count()-1; float aint = (m_userVminmax[m_Vatt].second-m_userVminmax[m_Vatt].first); if (aint <= 0.0001) aint = 1; QString txt; int nv=0; for(int i=0; i<m_vertexCenters.count(); i++) { bool ok = true; if (m_vertexAttribute[m_Vatt].second[i] < m_userVminmax[m_Vatt].first || m_vertexAttribute[m_Vatt].second[i] > m_userVminmax[m_Vatt].second) ok = false; if (ok) { for(int c=0; c<clipPos.count(); c++) { if ((m_vertexCenters[i]-clipPos[c])*clipNormal[c] > 0) { ok = false; break; } } if (ok) { for(int ci=0; ci<crops.count(); ci++) { ok &= crops[ci].checkCropped(m_vertexCenters[i]); if (!ok) break; } } if (ok) { if (m_vertexCenters[i].x >= bmin.x && m_vertexCenters[i].y >= bmin.y && m_vertexCenters[i].z >= bmin.z && m_vertexCenters[i].x <= bmax.x && m_vertexCenters[i].y <= bmax.y && m_vertexCenters[i].z <= bmax.z) { m_Vovertices[nv] = Matrix::xformVec(Xform, m_vertexCenters[i]); //rad[nv] = 1.5*m_vertexAttribute[m_vertexRadiusAttribute].second[i]; rad[nv] = m_scaleV * m_vertexAttribute[m_vertexRadiusAttribute].second[i]; float stp = (m_vertexAttribute[m_Vatt].second[i] - m_userVminmax[m_Vatt].first) / aint; QColor col = m_resampledVstops[stp*stopsCount].second; float r = col.red()/255.0; float g = col.green()/255.0; float b = col.blue()/255.0; m_Vocolor[nv] = Vec(r,g,b); nv++; } } } } m_Vovertices.resize(nv+1); m_VtexValues.resize(m_Vovertices.count()); for(int i=0; i<m_Vovertices.count(); i++) m_VtexValues[i] = pn*m_Vovertices[i]; Vec p = pn^viewer->camera()->upVector(); Vec q = pn^p; p.normalize(); q.normalize(); m_Vvertices.resize(4*m_Vovertices.count()); for(int i=0; i<m_Vovertices.count(); i++) { m_Vvertices[4*i+0] = m_Vovertices[i]-rad[i]*p-rad[i]*q; m_Vvertices[4*i+1] = m_Vovertices[i]-rad[i]*p+rad[i]*q; m_Vvertices[4*i+2] = m_Vovertices[i]+rad[i]*p+rad[i]*q; m_Vvertices[4*i+3] = m_Vovertices[i]+rad[i]*p-rad[i]*q; } } void NetworkObject::predrawEdges(QGLViewer *viewer, double *Xform, Vec pn, QList<Vec> clipPos, QList<Vec> clipNormal, QList<CropObject> crops) { Vec bmin, bmax; Global::bounds(bmin, bmax); m_Eovertices.resize(2*m_edgeNeighbours.count()); m_Eocolor.resize(m_edgeNeighbours.count()); QVector<float> rad; rad.resize(m_edgeNeighbours.count()); int stopsCount = m_resampledEstops.count()-1; float aint = (m_userEminmax[m_Eatt].second-m_userEminmax[m_Eatt].first); if (aint <= 0.0001) aint = 1; int nv = 0; for(int i=0; i<m_edgeNeighbours.count(); i++) { bool ok = true; if (m_edgeAttribute[m_Eatt].second[i] < m_userEminmax[m_Eatt].first || m_edgeAttribute[m_Eatt].second[i] > m_userEminmax[m_Eatt].second) ok = false; if (ok) { int a = m_edgeNeighbours[i].first; int b = m_edgeNeighbours[i].second; Vec pa = m_vertexCenters[a]; Vec pb = m_vertexCenters[b]; for(int c=0; c<clipPos.count(); c++) { if ((pa-clipPos[c])*clipNormal[c] > 0 || (pb-clipPos[c])*clipNormal[c] > 0) { ok = false; break; } } if (ok) { for(int ci=0; ci<crops.count(); ci++) { ok &= crops[ci].checkCropped(pa); if (!ok) break; ok &= crops[ci].checkCropped(pb); if (!ok) break; } } if (ok) { pa = Matrix::xformVec(Xform, pa); pb = Matrix::xformVec(Xform, pb); if (m_vertexCenters[a].x >= bmin.x && m_vertexCenters[a].y >= bmin.y && m_vertexCenters[a].z >= bmin.z && m_vertexCenters[a].x <= bmax.x && m_vertexCenters[a].y <= bmax.y && m_vertexCenters[a].z <= bmax.z && m_vertexCenters[b].x >= bmin.x && m_vertexCenters[b].y >= bmin.y && m_vertexCenters[b].z >= bmin.z && m_vertexCenters[b].x <= bmax.x && m_vertexCenters[b].y <= bmax.y && m_vertexCenters[b].z <= bmax.z) { if (m_Vopacity > 0.5) { Vec p = pb-pa; p.normalize(); pa = pa + p*m_vertexAttribute[m_vertexRadiusAttribute].second[a]; pb = pb - p*m_vertexAttribute[m_vertexRadiusAttribute].second[b]; } m_Eovertices[2*nv] = pa; m_Eovertices[2*nv+1] = pb; //rad[nv] = m_edgeAttribute[m_edgeRadiusAttribute].second[i]; rad[nv] = m_scaleE * m_edgeAttribute[m_edgeRadiusAttribute].second[i]; float stp = (m_edgeAttribute[m_Eatt].second[i] - m_userEminmax[m_Eatt].first) / aint; QColor col = m_resampledEstops[stp*stopsCount].second; float r = col.red()/255.0; float g = col.green()/255.0; float b = col.blue()/255.0; m_Eocolor[nv] = Vec(r,g,b); nv ++; } } } } m_Eovertices.resize(2*(nv+1)); m_EtexValues.resize(m_Eovertices.count()); for(int i=0; i<m_Eovertices.count(); i++) m_EtexValues[i] = pn*m_Eovertices[i]; Vec p = pn^viewer->camera()->upVector(); Vec q = pn^p; p.normalize(); q.normalize(); m_Evertices.resize(2*m_Eovertices.count()); for(int i=0; i<m_Eovertices.count()/2; i++) { Vec pa = m_Eovertices[2*i]; Vec pb = m_Eovertices[2*i+1]; Vec p = pn^(pa-pb); p.normalize(); p *= rad[i]; m_Evertices[4*i+0] = pa-p; m_Evertices[4*i+1] = pb-p; m_Evertices[4*i+2] = pb+p; m_Evertices[4*i+3] = pa+p; } } void NetworkObject::drawNetwork(float pnear, float pfar, bool backToFront) { if (backToFront) { if (m_Eopacity > 0.01) drawEdges(pnear, pfar); if (m_Vopacity > 0.01) drawVertices(pnear, pfar); } else { if (m_Vopacity > 0.01) drawVertices(pnear, pfar); if (m_Eopacity > 0.01) drawEdges(pnear, pfar); } } void NetworkObject::drawEdges(float pnear, float pfar) { // glColor4f(m_Ecolor.x*m_Eopacity, // m_Ecolor.y*m_Eopacity, // m_Ecolor.z*m_Eopacity, // m_Eopacity); glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Global::cylinderTexture()); glBegin(GL_QUADS); for(int i=0; i<m_Eovertices.count()/2; i++) { if ( ! (m_EtexValues[2*i] < pnear && m_EtexValues[2*i+1] < pnear) || (m_EtexValues[2*i] > pfar && m_EtexValues[2*i+1] > pfar) ) { glColor4f(m_Eocolor[i].x*m_Eopacity, m_Eocolor[i].y*m_Eopacity, m_Eocolor[i].z*m_Eopacity, m_Eopacity); glTexCoord2f(0, 0); glVertex3fv(m_Evertices[4*i+0]); glTexCoord2f(0, 1); glVertex3fv(m_Evertices[4*i+1]); glTexCoord2f(1, 1); glVertex3fv(m_Evertices[4*i+2]); glTexCoord2f(1, 0); glVertex3fv(m_Evertices[4*i+3]); } } glEnd(); glActiveTexture(GL_TEXTURE0); glDisable(GL_TEXTURE_2D); } void NetworkObject::drawVertices(float pnear, float pfar) { glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, Global::sphereTexture()); glBegin(GL_QUADS); for(int i=0; i<m_Vovertices.count(); i++) { if ( m_VtexValues[i] >= pnear && m_VtexValues[i] <= pfar ) { glColor4f(m_Vocolor[i].x*m_Vopacity, m_Vocolor[i].y*m_Vopacity, m_Vocolor[i].z*m_Vopacity, m_Vopacity); glTexCoord2f(0, 0); glVertex3fv(m_Vvertices[4*i+0]); glTexCoord2f(0, 1); glVertex3fv(m_Vvertices[4*i+1]); glTexCoord2f(1, 1); glVertex3fv(m_Vvertices[4*i+2]); glTexCoord2f(1, 0); glVertex3fv(m_Vvertices[4*i+3]); } } glEnd(); glActiveTexture(GL_TEXTURE0); glDisable(GL_TEXTURE_2D); } QDomElement NetworkObject::domElement(QDomDocument &doc) { QDomElement de = doc.createElement("network"); { QDomElement de0 = doc.createElement("name"); QDomText tn0 = doc.createTextNode(m_fileName); de0.appendChild(tn0); de.appendChild(de0); } { QDomElement de0 = doc.createElement("vopacity"); QDomText tn0 = doc.createTextNode(QString("%1").arg(m_Vopacity)); de0.appendChild(tn0); de.appendChild(de0); } { QDomElement de0 = doc.createElement("vstops"); QString str; for(int s=0; s<m_Vstops.count(); s++) { float pos = m_Vstops[s].first; QColor col = m_Vstops[s].second; int r = col.red(); int g = col.green(); int b = col.blue(); int a = col.alpha(); str += QString("%1 %2 %3 %4 %5 ").\ arg(pos).arg(r).arg(g).arg(b).arg(a); } QDomText tn0 = doc.createTextNode(str); de0.appendChild(tn0); de.appendChild(de0); } { QDomElement de0 = doc.createElement("eopacity"); QDomText tn0 = doc.createTextNode(QString("%1").arg(m_Eopacity)); de0.appendChild(tn0); de.appendChild(de0); } { QDomElement de0 = doc.createElement("estops"); QString str; for(int s=0; s<m_Estops.count(); s++) { float pos = m_Estops[s].first; QColor col = m_Estops[s].second; int r = col.red(); int g = col.green(); int b = col.blue(); int a = col.alpha(); str += QString("%1 %2 %3 %4 %5 ").\ arg(pos).arg(r).arg(g).arg(b).arg(a); } QDomText tn0 = doc.createTextNode(str); de0.appendChild(tn0); de.appendChild(de0); } return de; } bool NetworkObject::fromDomElement(QDomElement de) { clear(); bool ok = false; QString name; QDomNodeList dlist = de.childNodes(); for(int i=0; i<dlist.count(); i++) { QDomElement dnode = dlist.at(i).toElement(); QString str = dnode.toElement().text(); if (dnode.tagName() == "name") ok = load(str); else if (dnode.tagName() == "vopacity") m_Vopacity = str.toFloat(); else if (dnode.tagName() == "vstops") { QStringList xyz = str.split(" "); for(int s=0; s<xyz.count()/5; s++) { float pos; int r,g,b,a; pos = xyz[5*s+0].toFloat(); r = xyz[5*s+1].toInt(); g = xyz[5*s+2].toInt(); b = xyz[5*s+3].toInt(); a = xyz[5*s+4].toInt(); m_Vstops << QGradientStop(pos, QColor(r,g,b,a)); } } else if (dnode.tagName() == "eopacity") m_Eopacity = str.toFloat(); else if (dnode.tagName() == "estops") { QStringList xyz = str.split(" "); for(int s=0; s<xyz.count()/5; s++) { float pos; int r,g,b,a; pos = xyz[5*s+0].toFloat(); r = xyz[5*s+1].toInt(); g = xyz[5*s+2].toInt(); b = xyz[5*s+3].toInt(); a = xyz[5*s+4].toInt(); m_Vstops << QGradientStop(pos, QColor(r,g,b,a)); } } } return ok; } NetworkInformation NetworkObject::get() { NetworkInformation ti; ti.filename = m_fileName; ti.Vopacity = m_Vopacity; ti.Eopacity = m_Eopacity; ti.Vatt = m_Vatt; ti.Eatt = m_Eatt; ti.userVmin = m_userVminmax[m_Vatt].first; ti.userVmax = m_userVminmax[m_Vatt].second; ti.userEmin = m_userEminmax[m_Eatt].first; ti.userEmax = m_userEminmax[m_Eatt].second; ti.Vstops = m_Vstops; ti.Estops = m_Estops; ti.scalee = m_scaleE; ti.scalev = m_scaleV; return ti; } bool NetworkObject::set(NetworkInformation ti) { bool ok = false; if (m_fileName != ti.filename) ok = load(ti.filename); else ok = true; m_Vopacity = ti.Vopacity; m_Eopacity = ti.Eopacity; m_Vatt = ti.Vatt; m_Eatt = ti.Eatt; m_userVminmax[m_Vatt] = qMakePair(ti.userVmin, ti.userVmax); m_userEminmax[m_Eatt] = qMakePair(ti.userEmin, ti.userEmax); m_Vstops = ti.Vstops; m_resampledVstops = StaticFunctions::resampleGradientStops(m_Vstops); m_Estops = ti.Estops; m_resampledEstops = StaticFunctions::resampleGradientStops(m_Estops); m_scaleE = ti.scalee; m_scaleV = ti.scalev; return ok; } void NetworkObject::getKey(QDomElement main) { m_nodeAtt.clear(); m_edgeAtt.clear(); m_nodeAttName.clear(); m_edgeAttName.clear(); m_nodePosAttr.clear(); m_nodePosAttr << "x"; m_nodePosAttr << "y"; m_nodePosAttr << "z"; QDomNodeList dlist = main.childNodes(); for(int i=0; i<dlist.count(); i++) { if (dlist.at(i).isElement()) { QDomElement ele = dlist.at(i).toElement(); QString str = ele.nodeName(); if (str == "key") { QDomNamedNodeMap attr = ele.attributes(); int nattr = attr.count(); bool isnode = false; bool isedge = false; for(int na=0; na<nattr; na++) { QDomNode node = attr.item(na); QString name = node.nodeName(); QString val = node.nodeValue(); if (name == "for" && val == "node") { isnode = true; break; } if (name == "for" && val == "edge") { isedge = true; break; } } if (isedge) { bool notstr = true; for(int na=0; na<nattr; na++) { QDomNode node = attr.item(na); QString name = node.nodeName(); QString val = node.nodeValue(); if (name == "attr.type" && val == "string") { notstr = false; break; } } if (notstr) { for(int na=0; na<nattr; na++) { QDomNode node = attr.item(na); QString name = node.nodeName(); QString val = node.nodeValue(); if (name == "id") m_edgeAtt << val; if (name == "attr.name") m_edgeAttName << val; } } } if (isnode) { bool posatt = false; for(int na=0; na<nattr; na++) { QDomNode node = attr.item(na); QString name = node.nodeName(); QString val = node.nodeValue(); if (name == "attr.name" && (val == "Position X" || val == "Position Y" || val == "Position Z")) { posatt = true; for(int a=0; a<nattr; a++) { QDomNode nde = attr.item(a); QString nme = nde.nodeName(); QString vle = nde.nodeValue(); if (nme == "id") { int pa = 0; if (val == "Position X") pa = 0; if (val == "Position Y") pa = 1; if (val == "Position Z") pa = 2; m_nodePosAttr[pa] = vle; } } break; } } if (!posatt) // not position attribute { for(int na=0; na<nattr; na++) { QDomNode node = attr.item(na); QString name = node.nodeName(); QString val = node.nodeValue(); //if (val == "attr.name") if (name == "id") m_nodeAtt << val; if (name == "attr.name") m_nodeAttName << val; } } } } } } m_vertexRadiusAttribute = -1; m_edgeRadiusAttribute = -1; for(int i=0; i<m_nodeAtt.count(); i++) { if (m_nodeAtt[i].contains("radius", Qt::CaseInsensitive) || m_nodeAtt[i].contains("diameter", Qt::CaseInsensitive)) { m_vertexRadiusAttribute = i; break; } } for(int i=0; i<m_edgeAtt.count(); i++) { if (m_edgeAtt[i].contains("radius", Qt::CaseInsensitive) || m_edgeAtt[i].contains("diameter", Qt::CaseInsensitive)) { m_edgeRadiusAttribute = i; break; } } } void NetworkObject::loadNodeInfo(QDomNodeList nnodes) { m_vertexAttribute.clear(); m_vertexCenters.clear(); m_nodeId.clear(); QVector<float> *vat; // not expecting more than 20 attributes int nvat = m_nodeAtt.count(); vat = new QVector<float> [nvat]; int nn = nnodes.count(); for(int n=0; n<nn; n++) { QDomElement ele = nnodes.item(n).toElement(); QString id = ele.attributeNode("id").value(); m_nodeId << id; Vec pos; QDomNodeList nlist = nnodes.item(n).childNodes(); int nc = nlist.count(); for(int c=0; c<nc; c++) { QDomNode node = nlist.item(c); QDomElement ele = node.toElement(); QString et = ele.text(); QDomNamedNodeMap attr = ele.attributes(); QString name = attr.item(0).nodeName(); QString val = attr.item(0).nodeValue(); if (val == m_nodePosAttr[0]) pos.x = et.toFloat(); else if (val == m_nodePosAttr[1]) pos.y = et.toFloat(); else if (val == m_nodePosAttr[2]) pos.z = et.toFloat(); else { int vi = m_nodeAtt.indexOf(val); if (vi >= 0) vat[vi] << et.toFloat(); } } m_vertexCenters << pos; int nv = m_vertexCenters.count(); for(int c=0; c<m_nodeAtt.count(); c++) { if (vat[c].count() < nv) vat[c] << 0.0; } } for(int e=0; e<m_nodeAtt.count(); e++) { if (m_nodeAtt[e].contains("diameter", Qt::CaseInsensitive)) { for(int vi=0; vi<vat[e].count(); vi++) vat[e][vi] /= 2; } } for(int vi=0; vi<m_nodeAtt.count(); vi++) m_vertexAttribute << qMakePair(m_nodeAttName[vi], vat[vi]); if (m_vertexRadiusAttribute == -1) { m_vertexRadiusAttribute = m_nodeAtt.count(); QVector<float> rad; rad.resize(m_vertexCenters.count()); rad.fill(2); m_nodeAtt << "vertex_radius"; m_vertexAttribute << qMakePair(QString("vertex_radius"), rad); } for(int i=0; i<nvat; i++) vat[i].clear(); delete [] vat; } void NetworkObject::loadEdgeInfo(QDomNodeList nnodes) { m_edgeAttribute.clear(); m_edgeNeighbours.clear(); QVector<float> *vat; // not expecting more than 20 attributes int nvat = m_edgeAtt.count(); vat = new QVector<float> [nvat]; int nn = nnodes.count(); for(int n=0; n<nn; n++) { QDomElement ele = nnodes.item(n).toElement(); QString id = ele.attributeNode("id").value(); QString src = ele.attributeNode("source").value(); QString tar = ele.attributeNode("target").value(); int a,b; a = m_nodeId.indexOf(src); b = m_nodeId.indexOf(tar); if (a >= 0 && b >= 0) m_edgeNeighbours << qMakePair(a,b); QDomNodeList nlist = nnodes.item(n).childNodes(); int nc = nlist.count(); for(int c=0; c<nc; c++) { QDomNode node = nlist.item(c); QDomElement ele = node.toElement(); QString et = ele.text(); QDomNamedNodeMap attr = ele.attributes(); QString name = attr.item(0).nodeName(); QString val = attr.item(0).nodeValue(); int vi = m_edgeAtt.indexOf(val); if (vi >= 0) vat[vi] << et.toFloat(); } int nv = m_edgeNeighbours.count(); for(int c=0; c<m_edgeAtt.count(); c++) { if (vat[c].count() < nv) vat[c] << 0.0; } } for(int e=0; e<m_edgeAtt.count(); e++) { if (m_edgeAtt[e].contains("diameter", Qt::CaseInsensitive)) { for(int vi=0; vi<vat[e].count(); vi++) vat[e][vi] /= 2; } } for(int vi=0; vi<m_edgeAtt.count(); vi++) m_edgeAttribute << qMakePair(m_edgeAttName[vi], vat[vi]); if (m_edgeRadiusAttribute == -1) { m_edgeRadiusAttribute = m_edgeAtt.count(); QVector<float> rad; rad.resize(m_edgeNeighbours.count()); rad.fill(2); m_edgeAtt << "edge_radius"; m_edgeAttribute << qMakePair(QString("edge_radius"), rad); } for(int i=0; i<nvat; i++) vat[i].clear(); delete [] vat; } bool NetworkObject::loadGraphML(QString flnm) { m_fileName = flnm; QDomDocument doc; QFile f(flnm.toLatin1().data()); if (f.open(QIODevice::ReadOnly)) { doc.setContent(&f); f.close(); } QDomElement main = doc.documentElement(); getKey(main); // m_log->insertPlainText("Node Attributes \n"); // for(int i=0; i<m_nodeAtt.count(); i++) // m_log->insertPlainText(" "+m_nodeAtt[i]+"\n"); // m_log->insertPlainText("\n"); // m_log->insertPlainText("Edge Attributes \n"); // for(int i=0; i<m_edgeAtt.count(); i++) // m_log->insertPlainText(" "+m_edgeAtt[i]+"\n"); // m_log->insertPlainText("\n"); QDomNodeList dlist = main.childNodes(); for(int i=0; i<dlist.count(); i++) { if (dlist.at(i).isElement()) { QDomElement ele = dlist.at(i).toElement(); QString str = ele.nodeName(); if (str == "graph") { QDomNodeList nnodes = ele.elementsByTagName("node"); loadNodeInfo(nnodes); QDomNodeList nedges = ele.elementsByTagName("edge"); loadEdgeInfo(nedges); } } } //--------------------- Vec bmin = m_vertexCenters[0]; Vec bmax = m_vertexCenters[0]; for(int i=0; i<m_vertexCenters.count(); i++) { bmin = StaticFunctions::minVec(bmin, m_vertexCenters[i]); bmax = StaticFunctions::maxVec(bmax, m_vertexCenters[i]); } m_centroid = (bmin + bmax)/2; m_enclosingBox[0] = Vec(bmin.x, bmin.y, bmin.z); m_enclosingBox[1] = Vec(bmax.x, bmin.y, bmin.z); m_enclosingBox[2] = Vec(bmax.x, bmax.y, bmin.z); m_enclosingBox[3] = Vec(bmin.x, bmax.y, bmin.z); m_enclosingBox[4] = Vec(bmin.x, bmin.y, bmax.z); m_enclosingBox[5] = Vec(bmax.x, bmin.y, bmax.z); m_enclosingBox[6] = Vec(bmax.x, bmax.y, bmax.z); m_enclosingBox[7] = Vec(bmin.x, bmax.y, bmax.z); // m_nX = (bmax.x - bmin.x) + 1; // m_nY = (bmax.y - bmin.y) + 1; // m_nZ = (bmax.z - bmin.z) + 1; m_nX = bmax.x; m_nY = bmax.y; m_nZ = bmax.z; if (!Global::batchMode()) { QString str; str = QString("Grid Size : %1 %2 %3\n").arg(m_nX).arg(m_nY).arg(m_nZ); str += QString("Vertices : %1\n").arg(m_vertexCenters.count()); str += QString("Edges : %1\n").arg(m_edgeNeighbours.count()); str += QString("\n"); str += QString("Vertex Attributes : %1\n").arg(m_vertexAttribute.count()); for(int i=0; i<m_vertexAttribute.count(); i++) str += QString(" %1\n").arg(m_vertexAttribute[i].first); str += QString("\n"); str += QString("Edge Attributes : %1\n").arg(m_edgeAttribute.count()); for(int i=0; i<m_edgeAttribute.count(); i++) str += QString(" %1\n").arg(m_edgeAttribute[i].first); QMessageBox::information(0, "Network loaded", str); } m_Vatt = 0; m_Eatt = 0; m_Vminmax.clear(); m_Eminmax.clear(); m_userVminmax.clear(); m_userEminmax.clear(); for(int i=0; i<m_vertexAttribute.count(); i++) { float vmin = m_vertexAttribute[i].second[0]; float vmax = m_vertexAttribute[i].second[0]; for(int j=1; j<m_vertexAttribute[i].second.count(); j++) { vmin = qMin((float)m_vertexAttribute[i].second[j], vmin); vmax = qMax((float)m_vertexAttribute[i].second[j], vmax); } m_Vminmax.append(qMakePair(vmin, vmax)); m_userVminmax.append(qMakePair((vmin+vmax)/2, vmax)); } for(int i=0; i<m_edgeAttribute.count(); i++) { float emin = m_edgeAttribute[i].second[0]; float emax = m_edgeAttribute[i].second[0]; for(int j=1; j<m_edgeAttribute[i].second.count(); j++) { emin = qMin((float)m_edgeAttribute[i].second[j], emin); emax = qMax((float)m_edgeAttribute[i].second[j], emax); } m_Eminmax.append(qMakePair(emin, emax)); m_userEminmax.append(qMakePair((emin+emax)/2, emax)); } // QString str; // str += "Vertex\n"; // for(int i=0; i<m_vertexAttribute.count(); i++) // { // str += m_vertexAttribute[i].first + QString(" %1 %2\n").\ // arg(m_Vminmax[i].first). // arg(m_Vminmax[i].second); // } // str += "\n\nEdges\n"; // for(int i=0; i<m_edgeAttribute.count(); i++) // { // str += m_edgeAttribute[i].first + QString(" %1 %2\n").\ // arg(m_Eminmax[i].first). // arg(m_Eminmax[i].second); // } // QMessageBox::information(0, "", str); return true; }
24.295233
80
0.593397
stranddw
cc23a8ba22778c5cf90dd9e8b25bcd5e96664c77
1,295
cpp
C++
cutrod.cpp
W-YXN/MyNOIPProjects
0269a8385a6c8d87511236146f374f39dcdd2b82
[ "Apache-2.0" ]
null
null
null
cutrod.cpp
W-YXN/MyNOIPProjects
0269a8385a6c8d87511236146f374f39dcdd2b82
[ "Apache-2.0" ]
null
null
null
cutrod.cpp
W-YXN/MyNOIPProjects
0269a8385a6c8d87511236146f374f39dcdd2b82
[ "Apache-2.0" ]
1
2019-01-19T01:05:07.000Z
2019-01-19T01:05:07.000Z
#include <iostream> #include <cstdlib> #include <cmath> #include <algorithm> #include <string> #include <cstring> #include <iomanip> using std::cerr; using std::cin; using std::cout; using std::endl; using std::string; int n, k; int ropes[10010] = {0}; bool check(int len) { int tot = 0; for (int i = 1; i <= n; i++) { tot += (ropes[i] / len); } return (tot >= k); } int find(int l, int r, int n) { //nothing to do } int main() { cin >> n >> k; for (int i = 1; i <= n; i++) { double tmp; cin >> tmp; //cout << tmp; ropes[i] = (tmp * 100); } // for (int i = 0; i < n; i++) // { // cout << ropes[i + 1]; // } int l = 0; int r = 1e8 + 10; int res = 0; while (l <= r) { int mid = (l + r) >> 1; if (mid == 0) break; //Very Important!!!!!!!!!!! // if (check(mid)) // r = mid - 1; // else // { // l = mid + 1; // res = mid; // } if (!check(mid)) r = mid - 1; else { l = mid + 1; res = mid; } } double ans = (res * 1.0) / 100.0; cout << std::fixed << std::setprecision(2) << ans << endl; return 0; }
17.986111
62
0.403861
W-YXN
cc27786440b04f33de133a068781e3ae14798a24
5,392
inl
C++
private/inet/urlmon/utils/ctime.inl
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
inetcore/urlmon/utils/ctime.inl
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
inetcore/urlmon/utils/ctime.inl
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2019-01-16T01:01:23.000Z
2022-02-20T15:54:27.000Z
// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1995 Microsoft Corporation // All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes Reference and related // electronic documentation provided with the library. // See these sources for detailed information regarding the // Microsoft Foundation Classes product. // Inlines for AFX.H #ifdef _AFX_INLINE // CTime and CTimeSpan _AFX_INLINE CTimeSpan::CTimeSpan() { } _AFX_INLINE CTimeSpan::CTimeSpan(time_t time) { m_timeSpan = time; } _AFX_INLINE CTimeSpan::CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs) { m_timeSpan = nSecs + 60* (nMins + 60* (nHours + 24* lDays)); } _AFX_INLINE CTimeSpan::CTimeSpan(const CTimeSpan& timeSpanSrc) { m_timeSpan = timeSpanSrc.m_timeSpan; } _AFX_INLINE const CTimeSpan& CTimeSpan::operator=(const CTimeSpan& timeSpanSrc) { m_timeSpan = timeSpanSrc.m_timeSpan; return *this; } _AFX_INLINE LONG CTimeSpan::GetDays() const { return (LONG)(m_timeSpan / (24*3600L)); } _AFX_INLINE LONG CTimeSpan::GetTotalHours() const { return (LONG)(m_timeSpan/3600); } _AFX_INLINE int CTimeSpan::GetHours() const { return (int)(GetTotalHours() - GetDays()*24); } _AFX_INLINE LONG CTimeSpan::GetTotalMinutes() const { return (LONG)(m_timeSpan/60); } _AFX_INLINE int CTimeSpan::GetMinutes() const { return (int)(GetTotalMinutes() - GetTotalHours()*60); } _AFX_INLINE LONG_PTR CTimeSpan::GetTotalSeconds() const { return m_timeSpan; } _AFX_INLINE int CTimeSpan::GetSeconds() const { return (int)(GetTotalSeconds() - GetTotalMinutes()*60); } _AFX_INLINE CTimeSpan CTimeSpan::operator-(CTimeSpan timeSpan) const { return CTimeSpan(m_timeSpan - timeSpan.m_timeSpan); } _AFX_INLINE CTimeSpan CTimeSpan::operator+(CTimeSpan timeSpan) const { return CTimeSpan(m_timeSpan + timeSpan.m_timeSpan); } _AFX_INLINE const CTimeSpan& CTimeSpan::operator+=(CTimeSpan timeSpan) { m_timeSpan += timeSpan.m_timeSpan; return *this; } _AFX_INLINE const CTimeSpan& CTimeSpan::operator-=(CTimeSpan timeSpan) { m_timeSpan -= timeSpan.m_timeSpan; return *this; } _AFX_INLINE BOOL CTimeSpan::operator==(CTimeSpan timeSpan) const { return m_timeSpan == timeSpan.m_timeSpan; } _AFX_INLINE BOOL CTimeSpan::operator!=(CTimeSpan timeSpan) const { return m_timeSpan != timeSpan.m_timeSpan; } _AFX_INLINE BOOL CTimeSpan::operator<(CTimeSpan timeSpan) const { return m_timeSpan < timeSpan.m_timeSpan; } _AFX_INLINE BOOL CTimeSpan::operator>(CTimeSpan timeSpan) const { return m_timeSpan > timeSpan.m_timeSpan; } _AFX_INLINE BOOL CTimeSpan::operator<=(CTimeSpan timeSpan) const { return m_timeSpan <= timeSpan.m_timeSpan; } _AFX_INLINE BOOL CTimeSpan::operator>=(CTimeSpan timeSpan) const { return m_timeSpan >= timeSpan.m_timeSpan; } _AFX_INLINE CTime::CTime() { } _AFX_INLINE CTime::CTime(time_t time) { m_time = time; } _AFX_INLINE CTime::CTime(const CTime& timeSrc) { m_time = timeSrc.m_time; } _AFX_INLINE const CTime& CTime::operator=(const CTime& timeSrc) { m_time = timeSrc.m_time; return *this; } _AFX_INLINE const CTime& CTime::operator=(time_t t) { m_time = t; return *this; } _AFX_INLINE time_t CTime::GetTime() const { return m_time; } _AFX_INLINE int CTime::GetYear() const { return (GetLocalTm(NULL)->tm_year) + 1900; } _AFX_INLINE int CTime::GetMonth() const { return GetLocalTm(NULL)->tm_mon + 1; } _AFX_INLINE int CTime::GetDay() const { return GetLocalTm(NULL)->tm_mday; } _AFX_INLINE int CTime::GetHour() const { return GetLocalTm(NULL)->tm_hour; } _AFX_INLINE int CTime::GetMinute() const { return GetLocalTm(NULL)->tm_min; } _AFX_INLINE int CTime::GetSecond() const { return GetLocalTm(NULL)->tm_sec; } _AFX_INLINE int CTime::GetDayOfWeek() const { return GetLocalTm(NULL)->tm_wday + 1; } _AFX_INLINE CTimeSpan CTime::operator-(CTime time) const { return CTimeSpan(m_time - time.m_time); } _AFX_INLINE CTime CTime::operator-(CTimeSpan timeSpan) const { return CTime(m_time - timeSpan.m_timeSpan); } _AFX_INLINE CTime CTime::operator+(CTimeSpan timeSpan) const { return CTime(m_time + timeSpan.m_timeSpan); } _AFX_INLINE const CTime& CTime::operator+=(CTimeSpan timeSpan) { m_time += timeSpan.m_timeSpan; return *this; } _AFX_INLINE const CTime& CTime::operator-=(CTimeSpan timeSpan) { m_time -= timeSpan.m_timeSpan; return *this; } _AFX_INLINE BOOL CTime::operator==(CTime time) const { return m_time == time.m_time; } _AFX_INLINE BOOL CTime::operator!=(CTime time) const { return m_time != time.m_time; } _AFX_INLINE BOOL CTime::operator<(CTime time) const { return m_time < time.m_time; } _AFX_INLINE BOOL CTime::operator>(CTime time) const { return m_time > time.m_time; } _AFX_INLINE BOOL CTime::operator<=(CTime time) const { return m_time <= time.m_time; } _AFX_INLINE BOOL CTime::operator>=(CTime time) const { return m_time >= time.m_time; } ///////////////////////////////////////////////////////////////////////////// #endif //_AFX_INLINE
47.716814
80
0.685089
King0987654
cc280a5d7476322d006fa06d8955609bb5b6a495
3,794
hpp
C++
hpx/plugins/parcel/message_buffer.hpp
andreasbuhr/hpx
4366a90aacbd3e95428a94ab24a1646a67459cc2
[ "BSL-1.0" ]
null
null
null
hpx/plugins/parcel/message_buffer.hpp
andreasbuhr/hpx
4366a90aacbd3e95428a94ab24a1646a67459cc2
[ "BSL-1.0" ]
null
null
null
hpx/plugins/parcel/message_buffer.hpp
andreasbuhr/hpx
4366a90aacbd3e95428a94ab24a1646a67459cc2
[ "BSL-1.0" ]
null
null
null
// Copyright (c) 2007-2013 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if !defined(HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_BUFFER_MAR_07_2013_1250PM) #define HPX_RUNTIME_PARCELSET_POLICIES_COALESCING_MESSAGE_BUFFER_MAR_07_2013_1250PM #include <hpx/hpx_fwd.hpp> #include <hpx/runtime/parcelset/parcelport.hpp> #include <hpx/util/move.hpp> #include <vector> #include <boost/noncopyable.hpp> namespace hpx { namespace plugins { namespace parcel { namespace detail { class message_buffer { BOOST_COPYABLE_AND_MOVABLE(message_buffer); public: enum message_buffer_append_state { normal = 0, first_message = 1, buffer_now_full = 2, singleton_buffer = 3 }; message_buffer() : max_messages_(0) {} message_buffer(std::size_t max_messages) : max_messages_(max_messages) {} message_buffer(message_buffer const& rhs) : messages_(rhs.messages_), handlers_(rhs.handlers_), max_messages_(rhs.max_messages_) {} message_buffer(BOOST_RV_REF(message_buffer) rhs) : messages_(boost::move(rhs.messages_)), handlers_(boost::move(rhs.handlers_)), max_messages_(rhs.max_messages_) {} message_buffer& operator=(BOOST_COPY_ASSIGN_REF(message_buffer) rhs) { if (&rhs != this) { max_messages_ = rhs.max_messages_; messages_ = rhs.messages_; handlers_ = rhs.handlers_; } return *this; } message_buffer& operator=(BOOST_RV_REF(message_buffer) rhs) { if (&rhs != this) { max_messages_ = rhs.max_messages_; messages_ = boost::move(rhs.messages_); handlers_ = boost::move(rhs.handlers_); } return *this; } void operator()(parcelset::parcelport* set) { if (!messages_.empty()) set->put_parcels(messages_, handlers_); } message_buffer_append_state append(parcelset::parcel& p, parcelset::parcelport::write_handler_type const& f) { BOOST_ASSERT(messages_.size() == handlers_.size()); int result = normal; if (messages_.empty()) result = first_message; messages_.push_back(p); handlers_.push_back(f); if (messages_.size() >= max_messages_) result = buffer_now_full; return message_buffer_append_state(result); } bool empty() const { BOOST_ASSERT(messages_.size() == handlers_.size()); return messages_.empty(); } void clear() { messages_.clear(); handlers_.clear(); } std::size_t size() const { BOOST_ASSERT(messages_.size() == handlers_.size()); return messages_.size(); } double fill_ratio() const { return double(messages_.size()) / double(max_messages_); } void swap(message_buffer& o) { std::swap(max_messages_, o.max_messages_); std::swap(messages_, o.messages_); std::swap(handlers_, o.handlers_); } std::size_t capacity() const { return max_messages_; } private: std::vector<parcelset::parcel> messages_; std::vector<parcelset::parcelport::write_handler_type> handlers_; std::size_t max_messages_; }; }}}} #endif
27.897059
89
0.576173
andreasbuhr
cc2d969996b8bac167e7ae8d39eb97bf2473fc70
4,582
cpp
C++
CHIP8-Emu/main.cpp
hugo19941994/chip8-emu
5d2d7c92a8e7d9566e5c6564006160788201cfdb
[ "MIT" ]
1
2016-11-21T00:55:52.000Z
2016-11-21T00:55:52.000Z
CHIP8-Emu/main.cpp
hugo19941994/CHIP8-Emu
5d2d7c92a8e7d9566e5c6564006160788201cfdb
[ "MIT" ]
null
null
null
CHIP8-Emu/main.cpp
hugo19941994/CHIP8-Emu
5d2d7c92a8e7d9566e5c6564006160788201cfdb
[ "MIT" ]
null
null
null
#ifdef _WIN32 #include <windows.h> #include <stdlib.h> #include <SDL.h> #endif #if __linux__ || __APPLE__ #include <cstdlib> #include <gtk/gtk.h> #include "SDL.h" #endif #include <stdio.h> //#include <string.h> //#include <conio.h> #include "vars.h" //Screen dimension constants const int SCREEN_WIDTH = 580; const int SCREEN_HEIGHT = 320; //The window we'll be rendering to SDL_Window* gWindow = NULL; //The window renderer SDL_Renderer* gRenderer = NULL; void emulateCycle(); void initialize(); void loadgame(); bool init() { //Initialization flag bool success = true; //Initialize SDL if (SDL_Init(SDL_INIT_VIDEO) < 0) { printf("SDL could not initialize! SDL Error: %s\n", SDL_GetError()); success = false; } else { //Set texture filtering to linear if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1")) { printf("Warning: Linear texture filtering not enabled!"); } //Create window gWindow = SDL_CreateWindow("CHIP8-Emu", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN); if (gWindow == NULL) { printf("Window could not be created! SDL Error: %s\n", SDL_GetError()); success = false; } else { //Create renderer for window gRenderer = SDL_CreateRenderer(gWindow, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); if (gRenderer == NULL) { printf("Renderer could not be created! SDL Error: %s\n", SDL_GetError()); success = false; } else { //Initialize renderer color SDL_SetRenderDrawColor(gRenderer, 0xFF, 0xFF, 0xFF, 0xFF); } } } return success; } int main(int argc, char* args[]) { //Start up SDL and create window if (!init()) { printf("Failed to initialize!\n"); } else { //Main loop flag bool quit = false; initialize(); #if __linux__ || __APPLE__ gtk_init(&argc, &args); #endif loadgame(); //Event handler SDL_Event e; while (!quit) { //Handle events on queue while (SDL_PollEvent(&e) != 0) { if (e.type == SDL_QUIT) quit = true; if (e.type == SDL_KEYDOWN){ switch (e.key.keysym.sym){ case (SDLK_1) : key[0] = 1; break; case (SDLK_2) : key[1] = 1; break; case (SDLK_3) : key[2] = 1; break; case (SDLK_4) : key[3] = 1; break; case (SDLK_q) : key[4] = 1; break; case (SDLK_w) : key[5] = 1; break; case (SDLK_e) : key[6] = 1; break; case (SDLK_r) : key[7] = 1; break; case (SDLK_a) : key[8] = 1; break; case (SDLK_s) : key[9] = 1; break; case (SDLK_d) : key[10] = 1; break; case (SDLK_f) : key[11] = 1; break; case (SDLK_z) : key[12] = 1; break; case (SDLK_x) : key[13] = 1; break; case (SDLK_c) : key[14] = 1; break; case (SDLK_v) : key[15] = 1; break; } } if (e.type == SDL_KEYUP){ switch (e.key.keysym.sym){ case (SDLK_1) : key[0] = 0; break; case (SDLK_2) : key[1] = 0; break; case (SDLK_3) : key[2] = 0; break; case (SDLK_4) : key[3] = 0; break; case (SDLK_q) : key[4] = 0; break; case (SDLK_w) : key[5] = 0; break; case (SDLK_e) : key[6] = 0; break; case (SDLK_r) : key[7] = 0; break; case (SDLK_a) : key[8] = 0; break; case (SDLK_s) : key[9] = 0; break; case (SDLK_d) : key[10] = 0; break; case (SDLK_f) : key[11] = 0; break; case (SDLK_z) : key[12] = 0; break; case (SDLK_x) : key[13] = 0; break; case (SDLK_c) : key[14] = 0; break; case (SDLK_v) : key[15] = 0; break; } } } emulateCycle(); if (drawFlag == 1){ //Clear screen SDL_SetRenderDrawColor(gRenderer, 0x00, 0x00, 0x00, 0xFF); SDL_RenderClear(gRenderer); int chgline = 0; int chgcol = 0; //Render red filled quad for (int i = 0; i < 64 * 32; i++){ if ((i % 64) == 0){ chgline += 9; chgcol = 0; } if (gfx[i] == 1){ SDL_Rect fillRect = { chgcol, chgline, 10, 10 }; SDL_SetRenderDrawColor(gRenderer, 0x00, 0xFF, 0x00, 0xFF); SDL_RenderFillRect(gRenderer, &fillRect); } chgcol += 9; } //Update screen SDL_RenderPresent(gRenderer); drawFlag = 0; } } } //Free resources and close SDL //close(); return 0; }
18.933884
139
0.543867
hugo19941994
cc33a61e7eb6b7d24d5b18d88053f1ecc17ee91d
7,772
cpp
C++
Tree/binaryTree.cpp
harshallgarg/Diversified-Programming
7e6fb135c4639dbaa0651b85f98397f994a5b11d
[ "MIT" ]
2
2020-08-09T02:09:50.000Z
2020-08-09T07:07:47.000Z
Tree/binaryTree.cpp
harshallgarg/Diversified-Programming
7e6fb135c4639dbaa0651b85f98397f994a5b11d
[ "MIT" ]
null
null
null
Tree/binaryTree.cpp
harshallgarg/Diversified-Programming
7e6fb135c4639dbaa0651b85f98397f994a5b11d
[ "MIT" ]
5
2020-09-21T12:49:07.000Z
2020-09-29T16:13:09.000Z
// // binaryTree.cpp // AnishC++ // // Created by Anish Mookherjee on 01/11/19. // Copyright © 2019 Anish Mookherjee. All rights reserved. // #include <iostream> using namespace std; struct node { int data; struct node *left; struct node *right; }*tree; void createTree(struct node* tree) { tree=NULL; } struct node* searchElement(struct node *tree,int val) { if(tree->data==val||tree==NULL) return tree; else if(val<tree->data) return searchElement(tree->left, val); else return searchElement(tree->right, val); } struct node *insertElement(struct node *tree, int val) { struct node *ptr, *nodeptr, *parentptr; ptr=(struct node*)malloc(sizeof(struct node)); ptr->data = val; ptr->left = NULL; ptr->right = NULL; if(tree==NULL) { tree=ptr; tree->left=NULL; tree->right=NULL; } else { parentptr=NULL; nodeptr=tree; while(nodeptr!=NULL) { parentptr=nodeptr; if(val<nodeptr->data) nodeptr=nodeptr->left; else nodeptr = nodeptr->right; } if(val<parentptr->data) parentptr->left = ptr; else parentptr->right = ptr; } return tree; } void preorder(struct node* tree) { if(tree!=NULL) { cout<<tree->data<<" "; preorder(tree->left); preorder(tree->right); } } void inorder(struct node* tree) { if(tree!=NULL) { inorder(tree->left); cout<<tree->data<<" "; inorder(tree->right); } } void postorder(struct node* tree) { if(tree!=NULL) { postorder(tree->left); postorder(tree->right); cout<<tree->data<<" "; } } struct node* largest(struct node* tree) { if(tree==NULL||tree->right==NULL) return tree; else return largest(tree->right); } struct node* smallest(struct node* tree) { if(tree==NULL||tree->left==NULL) return tree; else return smallest(tree->left); } struct node *deleteElement(struct node *tree, int val) { struct node *cur, *parent, *suc, *psuc, *ptr; if(tree->left==NULL) { printf("\nThe tree is empty "); return(tree); } parent = tree; cur = tree->left; while(cur!=NULL && val!= cur->data) { parent = cur; cur = (val<cur->data)? cur->left:cur->right; } if(cur == NULL) { printf("\nThe value to be deleted is not present in the tree"); return(tree); } if(cur->left == NULL) ptr = cur->right; else if(cur->right == NULL) ptr = cur->left; else { // Find the in–order successor and its parent psuc = cur; cur = cur->left; while(suc->left!=NULL) { psuc = suc; suc = suc->left; } if(cur==psuc) { // Situation 1 suc->left = cur->right; } else { // Situation 2 suc->left = cur->left; psuc->left = suc->right; suc->right = cur->right; } ptr = suc; } // Attach ptr to the parent node if(parent->left == cur) parent->left=ptr; else parent->right=ptr; free(cur); return tree; } int height(struct node* tree) { int lh,rh; if(tree==NULL) { return 0; } else { lh=height(tree->left); rh=height(tree->right); if(lh>rh) return lh+1; else return rh+1; } } int totalNodes(struct node* tree) { if(tree==NULL) return 0; else return totalNodes(tree->left)+totalNodes(tree->right)+1; } int internalNodes(struct node* tree) { if(tree==NULL) return 0; else if(tree->left==NULL&&tree->right==NULL) return 0; else return internalNodes(tree->left)+internalNodes(tree->right)+1; } int externalNodes(struct node* tree) { if(tree==NULL) return 0; else if(tree->left==NULL&&tree->right==NULL) return 1; else return externalNodes(tree->left)+externalNodes(tree->right); } void deleteTree(struct node* tree) { if(tree!=NULL) { deleteTree(tree->left); deleteTree(tree->right); free(tree); } } int main() { int option,val; struct node* ptr; ptr=(struct node*)malloc(sizeof(struct node)); createTree(tree); do { cout<<"1.INSERT ELEMENT"<<endl; cout<<"2.SEARCH ELEMENT"<<endl; cout<<"3.SMALLEST ELEMENT"<<endl; cout<<"4.LARGEST ELEMENT"<<endl; cout<<"5.DELETE ELEMENT"<<endl; cout<<"6.HEIGHT"<<endl; cout<<"7.TOTAL NODES"<<endl; cout<<"8.TOTAL INTERNAL NODES"<<endl; cout<<"9.TOTAL EXTERNAL NODES"<<endl; cout<<"10.DELETE TREE"<<endl; cout<<"11.PRE-ORDER TRAVERSAL"<<endl; cout<<"12.IN-ORDER TRAVERSAL"<<endl; cout<<"13.POST-ORDER TRAVERSAL"<<endl; cout<<"14.EXIT"<<endl; cin>>option; switch(option) { case 1: cout<<"Insert the element you want to enter:"<<endl; cin>>val; tree=insertElement(tree, val); break; case 2: cout<<"Enter element you want to search:"<<endl; cin>>val; if(searchElement(tree, val)==NULL) cout<<"Element not found"<<endl; else cout<<"Element found"<<endl; break; case 3: ptr=smallest(tree); cout<<"The smallest element is: "<<ptr->data<<endl; break; case 4: ptr=largest(tree); cout<<"The largest element is: "<<ptr->data<<endl; break; case 5: cout<<"Enter the element to be deleted"<<endl; cin>>val; tree=deleteElement(tree, val); if(tree==NULL) cout<<"Element not found"<<endl; else cout<<"Element deleted"<<endl; break; case 6: cout<<"Height of the tree is: "<<height(tree)<<endl; break; case 7: cout<<"Total no. of nodes present are: "<<totalNodes(tree)<<endl; break; case 8: cout<<"Total no. of internal nodes are: "<<internalNodes(tree)<<endl; break; case 9: cout<<"Total no. of external nodes are: "<<externalNodes(tree)<<endl; break; case 10: cout<<"Deleting the entire tree."<<endl; deleteTree(tree); break; case 11: cout<<"Pre-order traversal:"<<endl; preorder(tree); cout<<endl; break; case 12: cout<<"In-order traversal:"<<endl; inorder(tree); cout<<endl; break; case 13: cout<<"Post-order traversal:"<<endl; postorder(tree); cout<<endl; break; case 14: cout<<"EXIT"<<endl; break; default: cout<<"Wrong choice, enter again."<<endl; } }while(option!=14); return 0; }
25.233766
85
0.476969
harshallgarg
cc34aa7ac8c65869c77ecb684d326d21e6cca705
4,204
cpp
C++
demos/glut/multibody/src/scenes/setup_domino_spiral.cpp
ricortiz/OpenTissue
f8c8ebc5137325b77ba90bed897f6be2795bd6fb
[ "Zlib" ]
null
null
null
demos/glut/multibody/src/scenes/setup_domino_spiral.cpp
ricortiz/OpenTissue
f8c8ebc5137325b77ba90bed897f6be2795bd6fb
[ "Zlib" ]
null
null
null
demos/glut/multibody/src/scenes/setup_domino_spiral.cpp
ricortiz/OpenTissue
f8c8ebc5137325b77ba90bed897f6be2795bd6fb
[ "Zlib" ]
null
null
null
// // OpenTissue Template Library Demo // - A specific demonstration of the flexibility of OTTL. // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. // // OTTL and OTTL Demos are licensed under zlib. // #include "setup_domino_spiral.h" #include <OpenTissue/core/geometry/geometry_compute_box_mass_properties.h> #include <OpenTissue/core/geometry/geometry_compute_sphere_mass_properties.h> #include <OpenTissue/core/math/math_random.h> void setup_domino_spiral(Data & data) { real_type const friction = .25; real_type const restitution = .4; real_type density = 10,mass; vector3_type r,diag_inertia; matrix3x3_type R,I; R = OpenTissue::math::diag(value_traits::one()); quaternion_type Q; data.m_configuration.clear(); data.m_library.clear(); data.m_simulator.clear(); data.m_bodies.resize(502); data.m_box.set(vector3_type(value_traits::zero(),value_traits::zero(),value_traits::zero()),R,vector3_type(700,700,.5)); data.m_bodies[0].set_fixed(true); data.m_bodies[0].set_geometry(&data.m_box); data.m_configuration.add(&data.m_bodies[0]); int i = 1; real_type W = .8; real_type H = .2; real_type D = value_traits::two(); real_type W2 = .4; real_type H2 = .1; real_type D2 = value_traits::one(); size_type N = 500; real_type radius = 3*W; assert(radius>=W); real_type theta = 0; data.m_sphere[0].radius(.25); OpenTissue::geometry::compute_sphere_mass_properties(data.m_sphere[0].radius(),density,mass,diag_inertia); I= OpenTissue::math::diag(diag_inertia(0),diag_inertia(1),diag_inertia(2)); real_type x = radius*cos(theta-0.05); real_type y = radius*sin(theta-0.05); real_type z = 3.0*D; Q.Rz(theta); data.m_bodies[i].set_position(vector3_type(x,y,z)); data.m_bodies[i].set_orientation(Q); data.m_bodies[i].attach(&data.m_gravity); data.m_bodies[i].set_geometry(&data.m_sphere[0]); data.m_bodies[i].set_mass(mass); data.m_bodies[i].set_inertia_bf(I); data.m_configuration.add(&data.m_bodies[i]); ++i; data.m_small_box.set(vector3_type(value_traits::zero(),value_traits::zero(),value_traits::zero()),R,vector3_type(W2,H2,D2)); OpenTissue::geometry::compute_box_mass_properties(data.m_small_box.ext(),density,mass,diag_inertia); I= OpenTissue::math::diag(diag_inertia(0),diag_inertia(1),diag_inertia(2)); for(size_type n=0;n<N;++n) { x = radius*cos(theta); y = radius*sin(theta); z = D2 + .5; Q.Rz(theta); data.m_bodies[i].set_position(vector3_type(x,y,z)); data.m_bodies[i].set_orientation(Q); data.m_bodies[i].attach(&data.m_gravity); data.m_bodies[i].set_geometry(&data.m_small_box); data.m_bodies[i].set_mass(mass); data.m_bodies[i].set_inertia_bf(I); data.m_configuration.add(&data.m_bodies[i]); real_type delta_theta = 0; real_type D4 = D*.25; if ((D4 +H)<=(value_traits::two()*radius)) delta_theta = value_traits::two()* asin((D4+H)/(value_traits::two()*radius)); else delta_theta = value_traits::two()*asin(H/radius); theta += delta_theta; radius = theta + 3*W; ++i; } //data.m_sphere[1].radius(.75); //compute_sphere_mass_properties(data.m_sphere[1].radius(),density,mass,diag_inertia); //I= OpenTissue::math::diag(diag_inertia(0),diag_inertia(1),diag_inertia(2)); //x = 600; //y = 0; //z = data.m_sphere[1].radius() + .5; //Q.identity(); //data.m_bodies[i].set_position(vector3_type(x,y,z)); //data.m_bodies[i].set_velocity(vector3_type(-20,0,0)); //data.m_bodies[i].set_orientation(Q); //data.m_bodies[i].attach(&data.m_gravity); //data.m_bodies[i].set_geometry(&data.m_sphere[1]); //data.m_bodies[i].set_mass(mass); //data.m_bodies[i].set_inertia_bf(I); //data.m_configuration.add(&data.m_bodies[i]); //++i; data.m_gravity.set_acceleration(vector3_type(0,0,-9.81)); data.m_simulator.init(data.m_configuration); material_type * default_material = data.m_library.default_material(); default_material->set_friction_coefficient(friction); default_material->normal_restitution() = (restitution); data.m_configuration.set_material_library(data.m_library); data.m_simulator.get_stepper()->get_solver()->set_max_iterations(10); }
33.903226
126
0.709087
ricortiz
cc3615ff211ed0a434cab0856157758739c55d1d
19,385
cpp
C++
src/Mobs.cpp
Cavantar/RoqueLike
c2466c5950730f51a9d582d3757548299b226327
[ "WTFPL" ]
null
null
null
src/Mobs.cpp
Cavantar/RoqueLike
c2466c5950730f51a9d582d3757548299b226327
[ "WTFPL" ]
null
null
null
src/Mobs.cpp
Cavantar/RoqueLike
c2466c5950730f51a9d582d3757548299b226327
[ "WTFPL" ]
null
null
null
#include "Mobs.h" #include <sstream> #include <iomanip> #include <iostream> Mob::Mob(const EntityPosition& position, int mobLevel, int health) : mobLevel(mobLevel), health(health) { this->position = position; renderData.type = ER_MOB; } void Mob::addHealth(float amount) { if(amount < 0) { amount += getShieldValue(); if(amount > 0) amount = 0; } health += amount; if(health > maxHealth) health = maxHealth; else if(health < 0) die(); OverlayTextData overlayTextData = {"", 2.0f, Vec3f(), 1.1f}; std::stringstream tempText; tempText << std::fixed << std::setw(11) << std::setprecision(2); if(amount != 0) tempText << amount << " Health"; if(amount > 0) { overlayTextData.color = Vec3f(0, 200.0f, 0); } else if(amount < 0) { overlayTextData.color = Vec3f(200.0f, 0, 0); } else { tempText << "Blocked"; overlayTextData.color = Vec3f(0, 0, 250); } overlayTextData.text = tempText.str(); Entity* overlayText = new OverlayText(position, overlayTextData); level->addOverlayEntity(EntityPtr(overlayText)); } void Mob::spawnXp(int xpToSpawn) const { assert(!(xpToSpawn%10)); //xpToSpawn *= 20; while(xpToSpawn) { float value = -1; // Getting Randomly valued experience orb (in range) // I assume that the xp is divisible by 10 value = (((rand() % (xpToSpawn/10)) + 1) * 10) % (xpToSpawn + 10); if(value > 50) value = 50; Entity* entity = new XpOrb(getCollisionCenter(), Vec2f::directionVector() * (1.0f + 0.25f * ((rand()%12) + 1)), value); level->addEntity(EntityPtr(entity)); //std::cout << "Spawning: " << value << " xp \n"; xpToSpawn -= value; } } void Mob::performDeathAction() { int xpToSpawn = mobLevel * 20; spawnXp(xpToSpawn); } const EntityRenderData* Mob::getRenderData() { renderData.life = health / maxHealth; return &renderData; } MobSpawner::MobSpawner(const EntityPosition& position, int level, MOB_TYPE mobType) : Mob(position, level), mobType(mobType) { dimensions = Vec2f(1.0f, 1.0f); renderData.spriteName = "cannonBase"; std::stringstream caption; caption << "MobSpawner"; switch(mobType) { case MT_RAT: caption << "(Rat)"; break; case MT_SNAKE: caption << "(Snake)"; break; case MT_FOLLOWER: caption << "(Follower)"; break; case MT_VARIOUS: caption << "(Various)"; break; } caption << " lvl: " << level; renderData.caption = caption.str(); maxHealth = 20 + (level - 1) * 10; health = maxHealth; damageValue = (level + 1.0f) / 5.0f; localTime = (rand()%100000) / 100.0f; renderData.spriteColor = Vec3f(138, 7, 7); } void MobSpawner::update(const float lastDelta) { float spawnPeriod = 10.0f - (mobLevel * 0.5f); renderData.spriteColorAlpha = 0.2f + (localTime / spawnPeriod) * 0.8f; Player* player = level->getPlayer(); if(localTime < 0) localTime = 0; if(player) { EntityPosition playerPosition = player->getCollisionCenter(); Vec2f distanceVec = EntityPosition::calculateDistanceInTiles(position, playerPosition, level->getTileMap()->getTileChunkSize()); // If There's Player in Radius of given length if(distanceVec.getLength() < 15.0f) { localTime += lastDelta; if(localTime >= spawnPeriod) { localTime = fmodf(localTime, spawnPeriod); distanceVec.normalize(); Entity* entity; do { Vec2f directionVec = Vec2f::directionVector(); switch(mobType) { case MT_RAT: entity = new Rat(position + directionVec * 2.0f, mobLevel); break; case MT_SNAKE: entity = new Snake(position + directionVec * 2.0f, mobLevel); break; case MT_FOLLOWER: entity = new Follower(position + directionVec * 2.0f, mobLevel); break; case MT_VARIOUS: if(rand()%3 == 0) entity = new Rat(position + directionVec * 2.0f, mobLevel); else if(rand()%3 == 1) entity = new Snake(position + directionVec * 2.0f, mobLevel); else entity = new Follower(position + directionVec * 2.0f, mobLevel); break; } } while(!level->addEntity(EntityPtr(entity))); } } else localTime -= lastDelta; } else localTime -= lastDelta; } void MobSpawner::performDeathAction() { int xpToSpawn = mobLevel * 50; spawnXp(xpToSpawn); } Cannon::Cannon(const EntityPosition& position, int level) : Mob(position, level) { dimensions = Vec2f(1.0f, 1.0f); renderData.spriteName = "cannonBase"; std::stringstream caption; caption << "Cannon lvl: " << level; renderData.caption = caption.str(); maxHealth = 10 + (level - 1) * 5; health = maxHealth; damageValue = (level + 1.0f) / 5.0f; } void Cannon::update(const float lastDelta) { float shootPeriod = 5.0f / mobLevel; localTime += lastDelta; if(localTime >= shootPeriod) { localTime = fmodf(localTime, shootPeriod); Player* player = level->getPlayer(); if(player && level->canSeeEachOther(this, player, 15.0f)) { EntityPosition playerPosition = player->getCollisionCenter(); Vec2f distanceVec = EntityPosition::calculateDistanceInTiles(position, playerPosition, level->getTileMap()->getTileChunkSize()); // If There's Player in Radius of given length if(distanceVec.getLength() < 15.0f) { distanceVec.normalize(); Vec2f directionVec = distanceVec; float bulletRadius = 0.7f + mobLevel / 10; float bulletSpeedModifier = (mobLevel / 10.0f) + 1.0f; Entity* bullet; bullet = new Bullet(position + directionVec * 2.0f, directionVec * 10.0f * bulletSpeedModifier, Vec2f(bulletRadius, bulletRadius), damageValue); level->addEntity(EntityPtr(bullet)); } } } } Follower::Follower(const EntityPosition& position, int level) : Mob(position, level) { dimensions = Vec2f(1.0f, 2.0f); renderData.spriteName = "followerBase"; std::stringstream caption; caption << "Follower lvl: " << level; renderData.caption = caption.str(); maxHealth = 5 + (level - 1) * 5; health = maxHealth; damageValue = (level + 1.0f) / 5.0f; } void Follower::update(const float lastDelta) { Player* player = level->getPlayer(); if(player && level->canSeeEachOther(this, player, 15.0f)) { EntityPosition playerPosition = player->getCollisionCenter(); EntityPosition followerPosition = getCollisionCenter(); Vec2f distanceVec = EntityPosition::calculateDistanceInTiles(followerPosition, playerPosition, level->getTileMap()->getTileChunkSize()); // If There's Player in Radius of given length if(distanceVec.getLength() < 15.0f) { distanceVec.normalize(); Vec2f directionVec = distanceVec; acceleration = directionVec; } } EntityPosition collisionCenter = getCollisionCenter(); float friction = level->getFrictionValueAtPosition(collisionCenter); float accelerationModifier = level->getAccelerationModifierAtPosition(collisionCenter); Vec2f positionDeltaVec = getPositionDeltaVec(lastDelta, friction, accelerationModifier); EntityCollisionResult collisionResult = level->checkCollisions(this, positionDeltaVec); handleCollisionResult(collisionResult, positionDeltaVec); } FloatRect Follower::getCollisionRect() const { const float width = 0.6f; const float height = 0.3f; return FloatRect(0.5f - (width / 2.0f), 2.0f - height, width, height); } void Follower::onWorldCollision(COLLISION_PLANE collisionPlane) { velocity = getReflectedVelocity(collisionPlane, 0.5f); } void Follower::onEntityCollision(COLLISION_PLANE collisionPlane, Entity* entity) { if(entity->isPlayer()) { entity->addHealth(-damageValue); entity->addVelocity(velocity * 2.5f); } else entity->addVelocity(velocity * 0.5f); velocity = getReflectedVelocity(collisionPlane, 0.5f); } Snake::Snake(const EntityPosition& position, int level) : Mob(position, level) { dimensions = Vec2f(1.0f, 1.0f); renderData.spriteName = "snakeBase"; std::stringstream caption; caption << "Snake lvl: " << level; renderData.caption = caption.str(); maxHealth = 5 + (level - 1) * 5; health = maxHealth; damageValue = (level + 1.0f) / 5.0f; currentDirection = Vec2f::cardinalDirection((CARDINAL_DIRECTION)(rand()%4)); metersPerSecondSquared = idleSpeedValue; localAttackingTime = 0; } void Snake::update(const float lastDelta) { Player* player = level->getPlayer(); if(player && metersPerSecondSquared != attackSpeedValue) { Vec2f checkResult = level->canSeeEachOtherCardinal(this, player, 15.0f); if(checkResult != Vec2f()) { velocity = 0; currentDirection = checkResult; metersPerSecondSquared = attackSpeedValue; } } if(metersPerSecondSquared == attackSpeedValue) { localAttackingTime += lastDelta; } static const float maxAttackingTime = 2.0f; if(localAttackingTime > maxAttackingTime) { localAttackingTime = 0; metersPerSecondSquared = idleSpeedValue; } acceleration = currentDirection; EntityPosition collisionCenter = getCollisionCenter(); float friction = level->getFrictionValueAtPosition(collisionCenter); float accelerationModifier = level->getAccelerationModifierAtPosition(collisionCenter); Vec2f positionDeltaVec = getPositionDeltaVec(lastDelta, friction, accelerationModifier); EntityCollisionResult collisionResult = level->checkCollisions(this, positionDeltaVec); handleCollisionResult(collisionResult, positionDeltaVec); } FloatRect Snake::getCollisionRect() const { const float width = 0.8f; const float height = 0.3f; return FloatRect(0.5f - (width / 2.0f), 1.0f - height, width, height); } void Snake::onWorldCollision(COLLISION_PLANE collisionPlane) { velocity = 0; if(currentDirection.x != 0) currentDirection = Vec2f::cardinalDirection(rand()%2 ? CD_UP : CD_DOWN); else currentDirection = Vec2f::cardinalDirection(rand()%2 ? CD_LEFT : CD_RIGHT); metersPerSecondSquared = idleSpeedValue; } void Snake::onEntityCollision(COLLISION_PLANE collisionPlane, Entity* entity) { if(entity->isPlayer()) entity->addHealth(-damageValue); entity->addVelocity(velocity * 2.5f); //velocity = getReflectedVelocity(collisionPlane, 0.5f); velocity = 0; if(currentDirection.x != 0) currentDirection = Vec2f::cardinalDirection(rand()%2 ? CD_UP : CD_DOWN); else currentDirection = Vec2f::cardinalDirection(rand()%2 ? CD_LEFT : CD_RIGHT); metersPerSecondSquared = idleSpeedValue; } Rat::Rat(const EntityPosition& position, int level) : Mob(position, level) { dimensions = Vec2f(1.0f, 1.0f); renderData.spriteName = "ratBase"; std::stringstream caption; caption << "Rat lvl: " << level; renderData.caption = caption.str(); maxHealth = 5 + (mobLevel - 1) * 5; health = maxHealth; damageValue = 1.0f + ((mobLevel - 1.0f) * 2.0f); currentDirection = Vec2f::directionVector(); metersPerSecondSquared = 10.0f; ratState = RS_SNIFFING; localStateTime = 2.0f + (rand()%5) * 0.5f; } void Rat::update(const float lastDelta) { bool dying = (health / maxHealth) < 0.2f; bool shouldUpdateState = true; Player* player = level->getPlayer(); // If There's player in close Proximity if(player && level->canSeeEachOther(this, player, 15.0f)) { EntityPosition playerPosition = player->getCollisionCenter(); EntityPosition followerPosition = getCollisionCenter(); Vec2f distanceVec = EntityPosition::calculateDistanceInTiles(followerPosition, playerPosition, level->getTileMap()->getTileChunkSize()); // I either move towards him if(distanceVec.getLength() < 4.0f + (mobLevel * 0.5f) && !dying) { distanceVec.normalize(); currentDirection = distanceVec; shouldUpdateState = false; } // Or go Away from him if I'm dying else if(dying) { distanceVec.normalize(); currentDirection = distanceVec * -1.0f; shouldUpdateState = false; } } if(shouldUpdateState) { localStateTime -= lastDelta; if(localStateTime < 0) { switch(ratState) { case RS_SNIFFING: { // Going into thinking state if(rand()%3 == 0) { localStateTime = 0.5f + (rand()%5) * 0.2f; ratState = RS_THINKING; currentDirection = Vec2f(); } // Still Sniffing else { localStateTime = 2.0f + (rand()%5) * 0.5f; currentDirection = Vec2f::directionVector(); } } break; case RS_THINKING: { localStateTime = 2.0f + (rand()%5) * 0.5f; ratState = RS_SNIFFING; } break; } } } acceleration = currentDirection; EntityPosition collisionCenter = getCollisionCenter(); float friction = level->getFrictionValueAtPosition(collisionCenter); float accelerationModifier = level->getAccelerationModifierAtPosition(collisionCenter); Vec2f positionDeltaVec = getPositionDeltaVec(lastDelta, friction, accelerationModifier); EntityCollisionResult collisionResult = level->checkCollisions(this, positionDeltaVec); handleCollisionResult(collisionResult, positionDeltaVec); } FloatRect Rat::getCollisionRect() const { const float width = 0.8f; const float height = 0.3f; return FloatRect(0.5f - (width / 2.0f), 1.0f - height, width, height); } void Rat::onWorldCollision(COLLISION_PLANE collisionPlane) { velocity = getReflectedVelocity(collisionPlane, 1.0f); if(collisionPlane == COLLISION_PLANE_VERTICAL) { currentDirection.x *= -1.0f; } else currentDirection.y *= -1.0f; } void Rat::onEntityCollision(COLLISION_PLANE collisionPlane, Entity* entity) { if(entity->isPlayer()) { entity->addHealth(-damageValue); entity->addVelocity(velocity * 2.5f); } else { entity->addVelocity(velocity * 1.5f); } //velocity = getReflectedVelocity(collisionPlane, 0.5f); velocity = 0; } Player::Player(const EntityPosition& position) : Mob(position, 1, 1.0f) { dimensions = Vec2f(1.0f, 2.0f); renderData.spriteName = "playerBase"; renderData.caption = "Player"; damageValue = 1.0f; } void Player::update(const float lastDelta) { EntityPosition collisionCenter = getCollisionCenter(); float friction = level->getFrictionValueAtPosition(collisionCenter); float accelerationModifier = level->getAccelerationModifierAtPosition(collisionCenter); Vec2f positionDeltaVec = getPositionDeltaVec(lastDelta, friction, accelerationModifier); EntityCollisionResult collisionResult = level->checkCollisions(this, positionDeltaVec); handleCollisionResult(collisionResult, positionDeltaVec); if(xpAmount >= getNextLevelXp()) levelUp(); stamina += (lastDelta / 5.0f) * maxStamina; if(stamina >= maxStamina) stamina = maxStamina; } void Player::onWorldCollision(COLLISION_PLANE collisionPlane) { const float bounceFactor = 0.5f; velocity = getReflectedVelocity(collisionPlane, bounceFactor); spawnDustParticles(getCollisionCenter(), 10, 2); } void Player::onEntityCollision(COLLISION_PLANE collisionPlane, Entity* entity) { static const float speedIncrease = 1.05f; entity->addVelocity(velocity * 0.01f); velocity = getReflectedVelocity(collisionPlane, speedIncrease); } FloatRect Player::getCollisionRect() const { const float width = 0.5f; const float height = 0.3f; return FloatRect(width / 2.0f, 2.0f - height, width, height); } void Player::addXp(const float amount) { xpAmount += amount; OverlayTextData overlayTextData = {"", 2.0f, Vec3f(), 1.1f}; std::stringstream tempText; tempText << std::fixed << std::setw(11) << std::setprecision(2); tempText << amount << " Xp"; overlayTextData.color = Vec3f(0, 200.0f, 0); overlayTextData.text = tempText.str(); Entity* overlayText = new OverlayText(position, overlayTextData); level->addOverlayEntity(EntityPtr(overlayText)); } void Player::levelUp() { mobLevel++; skillPointCount++; maxHealth += 5.0f; health = maxHealth; maxStamina += 20.0f; OverlayTextData overlayTextData = {"", 4.0f, Vec3f(), 1.5f}; overlayTextData.color = Vec3f(0, 200.0f, 0); overlayTextData.text = "Leveled Up !"; Entity* overlayText = new OverlayText(position, overlayTextData); level->addOverlayEntity(EntityPtr(overlayText)); } EventNameList Player::getEntityEvents() { EventNameList eventNameList; eventNameList.push_back("HelloThere"); eventNameList.push_back("Player"); return eventNameList; } void Player::handlePlayerInput(const PlayerInput& playerInput) { if(playerInput.up) { direction = MOB_FACING_UP; acceleration += Vec2f(0, -1.0f); } if(playerInput.right) { direction = MOB_FACING_RIGHT; acceleration += Vec2f(1.0f, 0); } if(playerInput.down) { direction = MOB_FACING_DOWN; acceleration += Vec2f(0, 1.0f); } if(playerInput.left) { direction = MOB_FACING_LEFT; acceleration += Vec2f(-1.0f, 0); } if(playerInput.actionUp || playerInput.actionRight || playerInput.actionDown || playerInput.actionLeft) { float bulletRadius = 0.5f; static const float bulletDistance = 1.5f; Vec2f tempDirectionVec; if(playerInput.actionUp) tempDirectionVec = Vec2f(0, -1.0f); if(playerInput.actionRight) tempDirectionVec = Vec2f(1.0f, 0); if(playerInput.actionDown) tempDirectionVec = Vec2f(0, 1.0f); if(playerInput.actionLeft) tempDirectionVec = Vec2f(-1.0f, 0); EntityPosition bulletPosition = position + getLocalCollisionCenter() + tempDirectionVec * bulletDistance; bulletPosition -=Vec2f(0, bulletRadius); if(playerInput.actionRight || playerInput.actionLeft) bulletPosition -= Vec2f(0, 1.0f); Entity* bullet = new Bullet(bulletPosition, velocity + tempDirectionVec * bulletVelocity, Vec2f(bulletRadius, bulletRadius), damageValue); if(stamina > 20 && level->addEntity(EntityPtr(bullet))) stamina -= 20; //spawnDustParticles(getCollisionCenter(), 10, 10); } if(skillPointCount > 0) { if(playerInput.playerKey1) upgradeAbility(PU_SHIELD); if(playerInput.playerKey2) upgradeAbility(PU_DAMAGE); if(playerInput.playerKey3) upgradeAbility(PU_MOVESPEED); if(playerInput.playerKey4) upgradeAbility(PU_BULLETSPEED); if(playerInput.playerKey5) upgradeAbility(PU_HEALTH); if(playerInput.playerKey6) upgradeAbility(PU_STAMINA); } } void Player::onEvent(const std::string& eventName, EventArgumentDataMap eventDataMap) { if(eventName == "HelloThere") { std::cout << eventName << ": " << eventDataMap["text"].asString() << " "; std::cout << eventDataMap["number"].asFloat() << std::endl; WorldPosition worldPos = eventDataMap["position"].asWorldPosition(); std::cout << worldPos.tilePosition.x << std::endl; } } void Player::performDeathAction() { int xpToSpawn = mobLevel * 100 + xpAmount; spawnXp(xpToSpawn); } void Player::upgradeAbility(PLAYER_UPGRADE upgrade) { switch(upgrade) { case PU_SHIELD: shieldValue *= 1.5f; break; case PU_DAMAGE: damageValue *= 1.5f; break; case PU_MOVESPEED: metersPerSecondSquared += 5.0f; break; case PU_BULLETSPEED: bulletVelocity *= 1.2f; break; case PU_HEALTH: maxHealth *= 1.5f; break; case PU_STAMINA: maxStamina *= 1.5f; break; } --skillPointCount; }
25.373037
124
0.682177
Cavantar
cc365f8b2bffd09ab59c4e654f53bcb02cc8951b
442
cpp
C++
solved/0-b/ant-on-a-chessboard/uva/gen.cpp
abuasifkhan/pc-code
77ce51d692acf6edcb9e47aeb7b7f06bf56e4e90
[ "Unlicense" ]
13
2015-09-30T19:18:04.000Z
2021-06-26T21:11:30.000Z
solved/0-b/ant-on-a-chessboard/uva/gen.cpp
sbmaruf/pc-code
77ce51d692acf6edcb9e47aeb7b7f06bf56e4e90
[ "Unlicense" ]
null
null
null
solved/0-b/ant-on-a-chessboard/uva/gen.cpp
sbmaruf/pc-code
77ce51d692acf6edcb9e47aeb7b7f06bf56e4e90
[ "Unlicense" ]
13
2015-01-04T09:49:54.000Z
2021-06-03T13:18:44.000Z
#include <cstdio> #include <cstdlib> #include <ctime> #define MAXT 100 #define MAXN 2000000000 int T; void gen() { int n = rand() % MAXN + 1; int r = rand() % 10; if (n >= 100 && r < 1) n = rand() % 100 + 1; if (n >= 10000 && r < 3) n = rand() % 10000 + 1; if (n >= 1000000 && r < 5) n = rand() % 1000000 + 1; printf("%d\n", n); --T; } int main() { srand(time(NULL)); T = MAXT; while (T) gen(); puts("0"); return 0; }
11.945946
53
0.50905
abuasifkhan
cc38878a5553da50f5beb70eae85b22c6c2fc7d6
245
cpp
C++
src/common/Spinlock.cpp
cas1k/rewind-viewer
6307158c6b99dd2da0be23f1816e3418eea5771f
[ "MIT" ]
71
2017-10-28T14:34:34.000Z
2020-12-30T06:55:55.000Z
src/common/Spinlock.cpp
cas1k/rewind-viewer
6307158c6b99dd2da0be23f1816e3418eea5771f
[ "MIT" ]
42
2017-11-02T12:12:25.000Z
2020-12-10T09:53:31.000Z
src/common/Spinlock.cpp
cas1k/rewind-viewer
6307158c6b99dd2da0be23f1816e3418eea5771f
[ "MIT" ]
30
2017-11-05T18:09:48.000Z
2020-12-06T20:03:46.000Z
// // Created by Vladimir A. Kiselev on 08.11.2020. // #include "Spinlock.h" void Spinlock::lock() { while (lock_.test_and_set(std::memory_order_acquire)) ; } void Spinlock::unlock() { lock_.clear(std::memory_order_release); }
17.5
57
0.665306
cas1k
cc395d389d520027d5325d925f9085f1ead925e4
285
cpp
C++
ExpressionEvaluation/parse/mock/compiler_for_parser_mock/compiler_for_parser_mock.cpp
suiyili/Algorithms
d6ddc8262c5d681ecc78938b6140510793a29d91
[ "MIT" ]
null
null
null
ExpressionEvaluation/parse/mock/compiler_for_parser_mock/compiler_for_parser_mock.cpp
suiyili/Algorithms
d6ddc8262c5d681ecc78938b6140510793a29d91
[ "MIT" ]
null
null
null
ExpressionEvaluation/parse/mock/compiler_for_parser_mock/compiler_for_parser_mock.cpp
suiyili/Algorithms
d6ddc8262c5d681ecc78938b6140510793a29d91
[ "MIT" ]
null
null
null
#ifdef TEST #include "compiler_for_parser_mock.hpp" compiler_for_parser_mock::compiler_for_parser_mock(size_t &merge_called) : merge_called_(merge_called) {} void compiler_for_parser_mock::merge(std::unique_ptr<compiler_i> other) { merge_called_++; return; } #endif // TEST
21.923077
73
0.782456
suiyili
cc39868dc2e2a56022643ac78bd67bf109a533c4
547
cpp
C++
engine/calculators/source/MagicalAttackSpeedCalculator.cpp
sidav/shadow-of-the-wyrm
747afdeebed885b1a4f7ab42f04f9f756afd3e52
[ "MIT" ]
60
2019-08-21T04:08:41.000Z
2022-03-10T13:48:04.000Z
engine/calculators/source/MagicalAttackSpeedCalculator.cpp
cleancoindev/shadow-of-the-wyrm
51b23e98285ecb8336324bfd41ebf00f67b30389
[ "MIT" ]
3
2021-03-18T15:11:14.000Z
2021-10-20T12:13:07.000Z
engine/calculators/source/MagicalAttackSpeedCalculator.cpp
cleancoindev/shadow-of-the-wyrm
51b23e98285ecb8336324bfd41ebf00f67b30389
[ "MIT" ]
8
2019-11-16T06:29:05.000Z
2022-01-23T17:33:43.000Z
#include "Game.hpp" #include "MagicalAttackSpeedCalculator.hpp" using namespace std; ActionCostValue MagicalAttackSpeedCalculator::calculate(CreaturePtr creature) { ActionCostValue action_cost_value = ActionCostConstants::DEFAULT; if (creature) { string spell_id = creature->get_spell_knowledge_ref().get_most_recently_cast_spell_id(); if (!spell_id.empty()) { Spell spell = Game::instance().get_spells_ref().find(spell_id)->second; action_cost_value = spell.get_speed(); } } return action_cost_value; }
23.782609
92
0.744059
sidav
cc3c467c959a7d153ef63099a9c5e0aa100c596a
8,920
cpp
C++
Source/SystemQOR/MSWindows/WinQL/System/Devices/Interfaces/WinQLDeviceInterfaceClassCollection.cpp
mfaithfull/QOR
0fa51789344da482e8c2726309265d56e7271971
[ "BSL-1.0" ]
9
2016-05-27T01:00:39.000Z
2021-04-01T08:54:46.000Z
Source/SystemQOR/MSWindows/WinQL/System/Devices/Interfaces/WinQLDeviceInterfaceClassCollection.cpp
mfaithfull/QOR
0fa51789344da482e8c2726309265d56e7271971
[ "BSL-1.0" ]
1
2016-03-03T22:54:08.000Z
2016-03-03T22:54:08.000Z
Source/SystemQOR/MSWindows/WinQL/System/Devices/Interfaces/WinQLDeviceInterfaceClassCollection.cpp
mfaithfull/QOR
0fa51789344da482e8c2726309265d56e7271971
[ "BSL-1.0" ]
4
2016-05-27T01:00:43.000Z
2018-08-19T08:47:49.000Z
//WinQLDeviceInterfaceClassCollection.cpp // Copyright Querysoft Limited 2013, 2017 // // Permission is hereby granted, free of charge, to any person or organization // obtaining a copy of the software and accompanying documentation covered by // this license (the "Software") to use, reproduce, display, distribute, // execute, and transmit the Software, and to prepare derivative works of the // Software, and to permit third-parties to whom the Software is furnished to // do so, all subject to the following: // // The copyright notices in the Software and this entire statement, including // the above license grant, this restriction and the following disclaimer, // must be included in all copies of the Software, in whole or in part, and // all derivative works of the Software, unless such copies or derivative // works are solely in the form of machine-executable object code generated by // a source language processor. // // 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #include "WinQL/CodeServices/WinQLPolicy.h" #include "WinQL/Application/Threading/WinQLCriticalSection.h" #include "WinQL/Application/ErrorSystem/WinQLError.h" #include "WinQL/CodeServices/Text/WinString.h" #include "WinQL/System/Devices/Interfaces/WinQLDeviceInterfaceClassCollection.h" #include "WinQL/System/Devices/Interfaces/WinQLDeviceInterfaceClass.h" #include "WinQL/Definitions/Constants.h" #include "WinQL/GUI/Window.h" #include "WinQL/System/WinQLSystem.h" #include "WinQAPI/Kernel32.h" #include "WinQAPI/SetupAPI.h" //-------------------------------------------------------------------------------- namespace nsWin32 { using namespace nsWinQAPI; //-------------------------------------------------------------------------------- __QOR_IMPLEMENT_OCLASS_LUID( CDeviceInterfaceClassCollection ); nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::BUS1394_CLASS_GUID = { 0x6BDD1FC1, 0x810F, 0x11d0, { 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_61883_CLASS = { 0x7EBEFBC0, 0x3200, 0x11d2, { 0xB4, 0xC2, 0x00, 0xA0, 0xC9, 0x69, 0x7D, 0x07 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_APPLICATIONLAUNCH_BUTTON = { 0x629758EE, 0x986E, 0x4D9E, { 0x8E, 0x47, 0xDE, 0x27, 0xF8, 0xAB, 0x05, 0x4D } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_BATTERY = { 0x72631E54, 0x78A4, 0x11D0, { 0xBC, 0xF7, 0x00, 0xAA, 0x00, 0xB7, 0xB3, 0x2A } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_LID = { 0x4AFA3D52, 0x74A7, 0x11d0, { 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_MEMORY = { 0x3FD0F03D, 0x92E0, 0x45FB, { 0xB7, 0x5C, 0x5E, 0xD8, 0xFF, 0xB0, 0x10, 0x21 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_MESSAGE_INDICATOR = { 0xCD48A365, 0xFA94, 0x4CE2, { 0xA2, 0x32, 0xA1, 0xB7, 0x64, 0xE5, 0xD8, 0xB4 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_PROCESSOR = { 0x97FADB10, 0x4E33, 0x40AE, { 0x35, 0x9C, 0x8B, 0xEF, 0x02, 0x9D, 0xBD, 0xD0 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_SYS_BUTTON = { 0x4AFA3D53, 0x74A7, 0x11d0, { 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVICE_THERMAL_ZONE = { 0x4AFA3D51, 0x74A7, 0x11d0, { 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_BTHPORT_DEVICE_INTERFACE = { 0x0850302A, 0xB344, 0x4fda, { 0x9B, 0xE9, 0x90, 0x57, 0x6B, 0x8D, 0x46, 0xF0 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_BRIGHTNESS = { 0xFDE5BBA4, 0xB3F9, 0x46FB, { 0xBD, 0xAA, 0x07, 0x28, 0xCE, 0x31, 0x00, 0xB4 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_DISPLAY_ADAPTER = { 0x5B45201D, 0xF2F2, 0x4F3B, { 0x85, 0xBB, 0x30, 0xFF, 0x1F, 0x95, 0x35, 0x99 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_I2C = { 0x2564AA4F, 0xDDDB, 0x4495, { 0xB4, 0x97, 0x6A, 0xD4, 0xA8, 0x41, 0x63, 0xD7 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_IMAGE = { 0x6BDD1FC6, 0x810F, 0x11D0, { 0xBE, 0xC7, 0x08, 0x00, 0x2B, 0xE2, 0x09, 0x2F } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_MONITOR = { 0xE6F07B5F, 0xEE97, 0x4a90, { 0xB0, 0x76, 0x33, 0xF5, 0x7B, 0xF4, 0xEA, 0xA7 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_OPM = { 0xBF4672DE, 0x6B4E, 0x4BE4, { 0xA3, 0x25, 0x68, 0xA9, 0x1E, 0xA4, 0x9C, 0x09 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_VIDEO_OUTPUT_ARRIVAL = { 0x1AD9E4F0, 0xF88D, 0x4360, { 0xBA, 0xB9, 0x4C, 0x2D, 0x55, 0xE5, 0x64, 0xCD } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DISPLAY_DEVICE_ARRIVAL = { 0x1CA05180, 0xA699, 0x450A, { 0x9A, 0x0C, 0xDE, 0x4F, 0xBE, 0x3D, 0xDD, 0x89 } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_KEYBOARD = { 0x884b96c3, 0x56ef, 0x11d1, { 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd } }; nsCodeQOR::__mxGUID CDeviceInterfaceClassCollection::GUID_DEVINTERFACE_MOUSE = { 0x378de44c, 0x56ef, 0x11d1, { 0xbc, 0x8c, 0x00, 0xa0, 0xc9, 0x14, 0x05, 0xdd } }; //-------------------------------------------------------------------------------- CDeviceInterfaceClassCollection::CDeviceInterfaceClassCollection( const mxTCHAR* szMachine ) : std::map< nsCodeQOR::__mxGUID*, CDeviceInterfaceClass* >(), m_Library( CSetupAPI::Instance() ) , m_szMachine( szMachine ) { _WINQ_FCONTEXT( "CDeviceInterfaceClassCollection::CDeviceInterfaceClassCollection" ); RegisterInterfaceClass( &BUS1394_CLASS_GUID ); RegisterInterfaceClass( &GUID_61883_CLASS ); RegisterInterfaceClass( &GUID_DEVICE_APPLICATIONLAUNCH_BUTTON ); RegisterInterfaceClass( &GUID_DEVICE_BATTERY ); RegisterInterfaceClass( &GUID_DEVICE_LID ); RegisterInterfaceClass( &GUID_DEVICE_MEMORY ); RegisterInterfaceClass( &GUID_DEVICE_MESSAGE_INDICATOR ); RegisterInterfaceClass( &GUID_DEVICE_PROCESSOR ); RegisterInterfaceClass( &GUID_DEVICE_SYS_BUTTON ); RegisterInterfaceClass( &GUID_DEVICE_THERMAL_ZONE ); RegisterInterfaceClass( &GUID_BTHPORT_DEVICE_INTERFACE ); RegisterInterfaceClass( &GUID_DEVINTERFACE_KEYBOARD ); RegisterInterfaceClass( &GUID_DEVINTERFACE_MOUSE ); RegisterInterfaceClass( &GUID_DEVINTERFACE_BRIGHTNESS ); RegisterInterfaceClass( &GUID_DEVINTERFACE_DISPLAY_ADAPTER ); RegisterInterfaceClass( &GUID_DEVINTERFACE_I2C ); RegisterInterfaceClass( &GUID_DEVINTERFACE_IMAGE ); RegisterInterfaceClass( &GUID_DEVINTERFACE_MONITOR ); RegisterInterfaceClass( &GUID_DEVINTERFACE_OPM ); RegisterInterfaceClass( &GUID_DEVINTERFACE_VIDEO_OUTPUT_ARRIVAL ); RegisterInterfaceClass( &GUID_DISPLAY_DEVICE_ARRIVAL ); } //-------------------------------------------------------------------------------- CDeviceInterfaceClassCollection::CDeviceInterfaceClassCollection( const CDeviceInterfaceClassCollection& src ) : m_Library( CSetupAPI::Instance() ) { _WINQ_FCONTEXT( "CDeviceInterfaceClassCollection::CDeviceInterfaceClassCollection" ); *this = src; } //-------------------------------------------------------------------------------- CDeviceInterfaceClassCollection& CDeviceInterfaceClassCollection::operator = ( const CDeviceInterfaceClassCollection& src ) { _WINQ_FCONTEXT( "CDeviceInterfaceClassCollection::operator =" ); if( &src != this ) { m_szMachine = src.m_szMachine; BaseType::operator=(src); } return *this; } //-------------------------------------------------------------------------------- CDeviceInterfaceClassCollection::~CDeviceInterfaceClassCollection() { _WINQ_FCONTEXT( "CDeviceInterfaceClassCollection::~CDeviceInterfaceClassCollection" ); } //-------------------------------------------------------------------------------- nsCodeQOR::CTLRef< CDeviceInterfaceClass > CDeviceInterfaceClassCollection::RegisterInterfaceClass( nsCodeQOR::__mxGUID* pGUID ) { _WINQ_FCONTEXT( "CDeviceInterfaceClassCollection::RegisterInterfaceClass" ); CDeviceInterfaceClass* pDeviceInterfaceClass = new CDeviceInterfaceClass( *pGUID, m_szMachine ); insert( std::make_pair( pGUID, pDeviceInterfaceClass ) ); nsCodeQOR::CTLRef< CDeviceInterfaceClass > Result( pDeviceInterfaceClass, false ); return Result; } }//nsWin32
63.262411
190
0.726682
mfaithfull
cc3ec7713db5e387daeb5c2614a49d6be4c640a5
2,514
cpp
C++
RemoteMessage/Message.cpp
deping/RemoteMessage
cb6782814a51904ca45cb3c00fefc48594d40789
[ "MIT" ]
null
null
null
RemoteMessage/Message.cpp
deping/RemoteMessage
cb6782814a51904ca45cb3c00fefc48594d40789
[ "MIT" ]
null
null
null
RemoteMessage/Message.cpp
deping/RemoteMessage
cb6782814a51904ca45cb3c00fefc48594d40789
[ "MIT" ]
null
null
null
/*************************************************************************** * Copyright (C) 2017, Deping Chen, cdp97531@sina.com * * All rights reserved. * For permission requests, write to the publisher. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. ***************************************************************************/ #include "Message.h" #include "utility.h" namespace RMsg { Message::Message() : m_SessionId(0) , m_MsgIdEx(KEEP_ALIVE_MSG) , m_MsgCat(0) , m_MsgCls(0) , m_MsgRst(0) , m_pNext(nullptr) { } Message::~Message() { } void Message::CopyHeader(const Message & src) { m_MsgIdEx = src.m_MsgIdEx; m_MsgCat = src.m_MsgCat; m_MsgCls = src.m_MsgCls; m_MsgRst = src.m_MsgRst; } void Message::SerializeToVector(std::vector<char>& header) { ASSERT_DEBUG_INFO(header.size() == s_SizeOfHeader); char* buffer = header.data(); memcpy(buffer, &m_MsgIdEx, sizeof(m_MsgIdEx)); buffer += sizeof(m_MsgIdEx); memcpy(buffer, &m_MsgCat, sizeof(m_MsgCat)); buffer += sizeof(m_MsgCat); memcpy(buffer, &m_MsgCls, sizeof(m_MsgCls)); buffer += sizeof(m_MsgCls); memcpy(buffer, &m_MsgRst, sizeof(m_MsgRst)); buffer += sizeof(m_MsgRst); // Assume payload size is less than 4G. uint32_t payloadSize = uint32_t(m_Payload.size()); memcpy(buffer, &payloadSize, sizeof(payloadSize)); buffer += sizeof(payloadSize); } uint32_t Message::ParseFromVector(const std::vector<char>& header) { ASSERT_DEBUG_INFO(header.size() == s_SizeOfHeader); const char* buffer = header.data(); memcpy(&m_MsgIdEx, buffer, sizeof(m_MsgIdEx)); buffer += sizeof(m_MsgIdEx); memcpy(&m_MsgCat, buffer, sizeof(m_MsgCat)); buffer += sizeof(m_MsgCat); memcpy(&m_MsgCls, buffer, sizeof(m_MsgCls)); buffer += sizeof(m_MsgCls); memcpy(&m_MsgRst, buffer, sizeof(m_MsgRst)); buffer += sizeof(m_MsgRst); uint32_t payloadSize; memcpy(&payloadSize, buffer, sizeof(payloadSize)); buffer += sizeof(payloadSize); return payloadSize; } void AppendList(Message*& pList1, Message* pList2) { if (!pList1) { pList1 = pList2; return; } if (!pList2) { return; } Message* curr = pList1; while (curr->m_pNext) { curr = curr->m_pNext; } curr->m_pNext = pList2; } Message* ReverseList(Message* pMsg) { Message* prev = nullptr; Message* curr = pMsg; while (curr) { // keep next Message* next = curr->m_pNext; // revert curr->m_pNext = prev; // advance prev = curr; curr = next; } // here, curr is nullptr return prev; } }
22.247788
76
0.658313
deping
cc40b34a90096d376091f0eb6ff64a32fd9f48dd
15,609
hh
C++
dune/gdt/operators/darcy.hh
tobiasleibner/dune-gdt
5d3dc6c7f5fd66db78ebb294d7ee4803f8e0bf5b
[ "BSD-2-Clause" ]
null
null
null
dune/gdt/operators/darcy.hh
tobiasleibner/dune-gdt
5d3dc6c7f5fd66db78ebb294d7ee4803f8e0bf5b
[ "BSD-2-Clause" ]
null
null
null
dune/gdt/operators/darcy.hh
tobiasleibner/dune-gdt
5d3dc6c7f5fd66db78ebb294d7ee4803f8e0bf5b
[ "BSD-2-Clause" ]
null
null
null
// This file is part of the dune-gdt project: // https://github.com/dune-community/dune-gdt // Copyright 2010-2017 dune-gdt developers and contributors. All rights reserved. // License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) // or GPL-2.0+ (http://opensource.org/licenses/gpl-license) // with "runtime exception" (http://www.dune-project.org/license.html) // Authors: // Felix Schindler (2014 - 2017) // Rene Milk (2016 - 2017) // Tobias Leibner (2014) #ifndef DUNE_GDT_OPERATORS_DARCY_HH #define DUNE_GDT_OPERATORS_DARCY_HH #include <limits> #include <boost/numeric/conversion/cast.hpp> #include <dune/geometry/quadraturerules.hh> #include <dune/xt/common/exceptions.hh> #include <dune/xt/common/fvector.hh> #include <dune/xt/common/fmatrix.hh> #include <dune/xt/common/type_traits.hh> #include <dune/xt/grid/type_traits.hh> #include <dune/xt/functions/interfaces.hh> #include <dune/xt/la/container.hh> #include <dune/xt/la/solver.hh> #include <dune/gdt/discretefunction/default.hh> #include <dune/gdt/exceptions.hh> #include <dune/gdt/spaces/cg/interface.hh> #include <dune/gdt/spaces/rt/interface.hh> #include "interfaces.hh" namespace Dune { namespace GDT { // forward, to be used in the traits template <class GridLayerImp, class FunctionImp> class DarcyOperator; namespace internal { template <class GridLayerImp, class FunctionImp> class DarcyOperatorTraits { static_assert(XT::Functions::is_localizable_function<FunctionImp>::value, "FunctionImp has to be derived from XT::Functions::is_localizable_function!"); static_assert(std::is_same<typename GridLayerImp::ctype, typename FunctionImp::DomainFieldType>::value, "Types do not match!"); static_assert(GridLayerImp::dimension == FunctionImp::dimDomain, "Dimensions do not match!"); static_assert(FunctionImp::dimRange == FunctionImp::dimRangeCols, "Dimensions do not match!"); public: typedef DarcyOperator<GridLayerImp, FunctionImp> derived_type; typedef GridLayerImp GridLayerType; typedef typename FunctionImp::RangeFieldType FieldType; typedef NoJacobian JacobianType; }; // class DarcyOperatorTraits } // namespace internal /** * \note Only works for scalar valued function atm. * \todo add make_darcy_operator **/ template <class GridLayerImp, class FunctionImp> class DarcyOperator : public OperatorInterface<internal::DarcyOperatorTraits<GridLayerImp, FunctionImp>> { typedef OperatorInterface<internal::DarcyOperatorTraits<GridLayerImp, FunctionImp>> BaseType; public: typedef internal::DarcyOperatorTraits<GridLayerImp, FunctionImp> Traits; typedef typename Traits::GridLayerType GridLayerType; typedef typename Traits::FieldType FieldType; typedef typename Traits::JacobianType JacobianType; using EntityType = XT::Grid::extract_entity_t<GridLayerType>; typedef typename GridLayerType::ctype DomainFieldType; static const size_t dimDomain = GridLayerType::dimension; DarcyOperator(const GridLayerType& grd_vw, const FunctionImp& function) : grid_layer_(grd_vw) , function_(function) { } /** * \brief Applies the operator. * \note See redirect_apply for the implementation (depending on the type of the range space). * \sa redirect_apply */ template <class S, class V, size_t r, size_t rC> void apply(const XT::Functions::LocalizableFunctionInterface<EntityType, DomainFieldType, dimDomain, FieldType, r, rC>& source, DiscreteFunction<S, V>& range, const Dune::XT::Common::Parameter& param = {}) const { redirect_apply(range.space(), source, range, param); } template <class SourceType> JacobianType jacobian(const SourceType& /*source*/, const Dune::XT::Common::Parameter& /*param*/ = {}) const { DUNE_THROW(NotImplemented, "This operator does not provide a jacobian (yet)!"); return JacobianType(); } template <class SourceType> void jacobian(const SourceType& /*source*/, JacobianType& /*jac*/, const Dune::XT::Common::Parameter& /*param*/ = {}) const { DUNE_THROW(NotImplemented, "This operator does not provide a jacobian (yet)!"); } private: template <class R, size_t r, size_t rC> struct Helper { static_assert(AlwaysFalse<R>::value, "This should not happen (see check in Traits)!"); }; template <class R, size_t r> struct Helper<R, r, r> { typedef XT::Common::FieldMatrix<R, r, r> type; }; template <class R> struct Helper<R, 1, 1> { typedef XT::Common::FieldVector<R, 1> type; }; typedef typename Helper<typename FunctionImp::RangeFieldType, FunctionImp::dimRange, FunctionImp::dimRangeCols>::type ValueType; /** * \brief Does an L2 projection of '- function * \gradient source' onto range. */ template <class T, class S, class V> void redirect_apply( const CgSpaceInterface<T, dimDomain, dimDomain, 1>& /*space*/, const XT::Functions::LocalizableFunctionInterface<EntityType, DomainFieldType, dimDomain, FieldType, 1, 1>& source, DiscreteFunction<S, V>& range, const XT::Common::Parameter param) const { typedef typename XT::LA::Container<FieldType, V::sparse_matrix_type>::MatrixType MatrixType; MatrixType lhs( range.space().mapper().size(), range.space().mapper().size(), range.space().compute_volume_pattern()); V rhs(range.space().mapper().size()); // walk the grid const auto entity_it_end = grid_layer_.template end<0>(); for (auto entity_it = grid_layer_.template begin<0>(); entity_it != entity_it_end; ++entity_it) { const auto& entity = *entity_it; const auto local_function = function_.local_function(entity); const auto local_source = source.local_function(entity); const auto basis = range.space().base_function_set(entity); // do a volume quadrature const size_t integrand_order = std::max(local_function->order() + ssize_t(local_source->order()) - 1, basis.order()) + basis.order(); const auto& quadrature = QuadratureRules<DomainFieldType, dimDomain>::rule(entity.type(), boost::numeric_cast<int>(integrand_order)); const auto quadrature_it_end = quadrature.end(); for (auto quadrature_it = quadrature.begin(); quadrature_it != quadrature_it_end; ++quadrature_it) { const auto xx = quadrature_it->position(); const auto quadrature_weight = quadrature_it->weight(); const auto integration_element = entity.geometry().integrationElement(xx); const ValueType function_value = local_function->evaluate(xx, param); const auto source_gradient = local_source->jacobian(xx, param); const auto basis_value = basis.evaluate(xx, param); for (size_t ii = 0; ii < basis.size(); ++ii) { const size_t global_ii = range.space().mapper().mapToGlobal(entity, ii); rhs.add_to_entry(global_ii, integration_element * quadrature_weight * -1.0 * ((function_value * source_gradient[0]) * basis_value[ii])); for (size_t jj = 0; jj < basis.size(); ++jj) { const size_t global_jj = range.space().mapper().mapToGlobal(entity, jj); lhs.add_to_entry( global_ii, global_jj, integration_element * quadrature_weight * (basis_value[ii] * basis_value[jj])); } } } // do a volume quadrature } // walk the grid // solve try { XT::LA::Solver<MatrixType>(lhs).apply(rhs, range.vector()); } catch (XT::LA::Exceptions::linear_solver_failed& ee) { DUNE_THROW(operator_error, "Application of the Darcy operator failed because a matrix could not be inverted!\n\n" << "This was the original error: " << ee.what()); } } // ... redirect_apply(...) template <class T, class S, class V> void redirect_apply( const RtSpaceInterface<T, dimDomain, dimDomain, 1>& /*space*/, const XT::Functions::LocalizableFunctionInterface<EntityType, DomainFieldType, dimDomain, FieldType, 1>& source, DiscreteFunction<S, V>& range, const XT::Common::Parameter param) const { static_assert(RtSpaceInterface<T, dimDomain, 1>::polOrder == 0, "Untested!"); const auto& rtn0_space = range.space(); auto& range_vector = range.vector(); const auto infinity = std::numeric_limits<FieldType>::infinity(); for (size_t ii = 0; ii < range_vector.size(); ++ii) range_vector[ii] = infinity; // walk the grid const auto entity_it_end = grid_layer_.template end<0>(); for (auto entity_it = grid_layer_.template begin<0>(); entity_it != entity_it_end; ++entity_it) { const auto& entity = *entity_it; const auto local_DoF_indices = rtn0_space.local_DoF_indices(entity); const auto global_DoF_indices = rtn0_space.mapper().globalIndices(entity); assert(global_DoF_indices.size() == local_DoF_indices.size()); const auto local_function = function_.local_function(entity); const auto local_source = source.local_function(entity); const auto local_basis = rtn0_space.base_function_set(entity); // walk the intersections const auto intersection_it_end = grid_layer_.iend(entity); for (auto intersection_it = grid_layer_.ibegin(entity); intersection_it != intersection_it_end; ++intersection_it) { const auto& intersection = *intersection_it; if (intersection.neighbor() && !intersection.boundary()) { const auto neighbor = intersection.outside(); if (grid_layer_.indexSet().index(entity) < grid_layer_.indexSet().index(neighbor)) { const auto local_function_neighbor = function_.local_function(neighbor); const auto local_source_neighbor = source.local_function(neighbor); const size_t local_intersection_index = intersection.indexInInside(); const size_t local_DoF_index = local_DoF_indices[local_intersection_index]; // do a face quadrature FieldType lhs = 0; FieldType rhs = 0; const size_t integrand_order = local_function->order(); const auto& quadrature = QuadratureRules<DomainFieldType, dimDomain - 1>::rule( intersection.type(), boost::numeric_cast<int>(integrand_order)); const auto quadrature_it_end = quadrature.end(); for (auto quadrature_it = quadrature.begin(); quadrature_it != quadrature_it_end; ++quadrature_it) { const auto xx_intersection = quadrature_it->position(); const auto normal = intersection.unitOuterNormal(xx_intersection); const FieldType integration_factor = intersection.geometry().integrationElement(xx_intersection); const FieldType weight = quadrature_it->weight(); const auto xx_entity = intersection.geometryInInside().global(xx_intersection); const auto xx_neighbor = intersection.geometryInOutside().global(xx_intersection); // evaluate ValueType function_value = local_function->evaluate(xx_entity, param); function_value *= 0.5; ValueType function_value_neighbor = local_function_neighbor->evaluate(xx_neighbor, param); function_value_neighbor *= 0.5; function_value += function_value_neighbor; auto source_gradient = local_source->jacobian(xx_entity, param)[0]; source_gradient *= 0.5; auto source_gradient_neighbor = local_source_neighbor->jacobian(xx_neighbor, param)[0]; source_gradient_neighbor *= 0.5; source_gradient += source_gradient_neighbor; const auto basis_values = local_basis.evaluate(xx_entity, param); const auto basis_value = basis_values[local_DoF_index]; // compute integrals lhs += integration_factor * weight * (basis_value * normal); rhs += integration_factor * weight * -1.0 * compute_value(function_value, source_gradient, normal); } // do a face quadrature // set DoF const size_t global_DoF_index = global_DoF_indices[local_DoF_index]; assert(!(range_vector[global_DoF_index] < infinity)); range_vector[global_DoF_index] = rhs / lhs; } } else if (intersection.boundary() && !intersection.neighbor()) { const size_t local_intersection_index = intersection.indexInInside(); const size_t local_DoF_index = local_DoF_indices[local_intersection_index]; // do a face quadrature FieldType lhs = 0; FieldType rhs = 0; const size_t integrand_order = local_function->order(); const auto& quadrature = QuadratureRules<DomainFieldType, dimDomain - 1>::rule( intersection.type(), boost::numeric_cast<int>(integrand_order)); const auto quadrature_it_end = quadrature.end(); for (auto quadrature_it = quadrature.begin(); quadrature_it != quadrature_it_end; ++quadrature_it) { const auto xx_intersection = quadrature_it->position(); const auto normal = intersection.unitOuterNormal(xx_intersection); const auto integration_factor = intersection.geometry().integrationElement(xx_intersection); const auto weight = quadrature_it->weight(); const auto xx_entity = intersection.geometryInInside().global(xx_intersection); // evalaute const ValueType function_value = local_function->evaluate(xx_entity, param); const auto source_gradient = local_source->jacobian(xx_entity, param)[0]; const auto basis_values = local_basis.evaluate(xx_entity, param); const auto basis_value = basis_values[local_DoF_index]; // compute integrals lhs += integration_factor * weight * (basis_value * normal); rhs += integration_factor * weight * -1.0 * compute_value(function_value, source_gradient, normal); } // do a face quadrature // set DoF const size_t global_DoF_index = global_DoF_indices[local_DoF_index]; assert(!(range_vector[global_DoF_index] < infinity)); range_vector[global_DoF_index] = rhs / lhs; } else DUNE_THROW(XT::Common::Exceptions::internal_error, "Unknown intersection type!"); } // walk the intersections } // walk the grid } // ... redirect_apply(...) template <class R, int d> R compute_value(const FieldVector<R, 1>& function_value, const FieldVector<R, d>& source_gradient, const FieldVector<R, d>& normal) const { return function_value * (source_gradient * normal); } template <class R, int d> typename std::enable_if<(d > 1), R>::type compute_value(const XT::Common::FieldMatrix<R, d, d>& function_value, const FieldVector<R, d>& source_gradient, const FieldVector<R, d>& normal) const { return (function_value * source_gradient) * normal; } const GridLayerType& grid_layer_; const FunctionImp& function_; }; // class DarcyOperator template <class G, class F> std::unique_ptr<DarcyOperator<G, F>> make_darcy(const G& grid_layer, const F& function) { return std::unique_ptr<DarcyOperator<G, F>>(new DarcyOperator<G, F>(grid_layer, function)); } } // namespace GDT } // namespace Dune #endif // DUNE_GDT_OPERATORS_DARCY_HH
45.375
120
0.677622
tobiasleibner
cc4386b024c86e93e6b869b484c6fabb046a50b6
19,738
cpp
C++
test/src/test_lib/property_set.cpp
falko-strenzke/fleaTLS
613a7cb977333f5f193f91b9e2c780d08aa8a3d5
[ "Apache-2.0" ]
null
null
null
test/src/test_lib/property_set.cpp
falko-strenzke/fleaTLS
613a7cb977333f5f193f91b9e2c780d08aa8a3d5
[ "Apache-2.0" ]
null
null
null
test/src/test_lib/property_set.cpp
falko-strenzke/fleaTLS
613a7cb977333f5f193f91b9e2c780d08aa8a3d5
[ "Apache-2.0" ]
1
2020-08-06T10:25:03.000Z
2020-08-06T10:25:03.000Z
/* fleaTLS cryptographic library Copyright (C) 2015-2019 cryptosource GmbH 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 "flea_test/property_set.h" #include "flea_test/exceptn.h" #include <cstring> #include <fstream> #include <iostream> #include <string> #include <stdio.h> /* linux only ==> */ #include <sys/types.h> #include <dirent.h> /* <== linux only */ using namespace std; std::vector<flea_u8_t> hex_to_bin(std::string const& hex) { std::vector<flea_u8_t> result; unsigned cnt = 0; flea_u8_t current_char = 0; for(char c : hex) { flea_u8_t offset = 0; if(c == ' ') { continue; } if(c >= 0x30 && c <= 0x39) { offset = 0x30; } else if(c >= 0x41 && c <= 0x46) { offset = 0x41 - 10; } else if(c >= 0x61 && c <= 0x66) { offset = 0x61 - 10; } else { throw test_utils_exceptn_t("illegal character in hex string '" + hex + "'"); } current_char |= c - offset; if(cnt % 2) // one byte completed { result.push_back(current_char); current_char = 0; } else { current_char <<= 4; } cnt++; } if(cnt % 2) { throw test_utils_exceptn_t("odd number of nibles: " + hex); } return result; } // hex_to_bin std::string bin_to_hex( const unsigned char* bin, size_t len ) { std::string result; for(size_t i = 0; i < len; i++) { char byte_chars [3] = {0, 0, 0}; sprintf(byte_chars, "%02x", bin[i]); result += std::string(const_cast<const char*>(byte_chars)); /*if(with_ws) * { * result += " "; * }*/ } return result; } std::vector<flea_u8_t> parse_hex_prop_line( const char* name, flea_u16_t result_size, std::ifstream & input ) { std::string line; if(!getline(input, line)) { throw test_utils_exceptn_t("error parsing line from file"); } std::vector<std::string> tokens = tokenize_string(line, '=', true); if(tokens.size() == 1) { tokens.push_back(""); } if(tokens.size() != 2) { throw test_utils_exceptn_t("error parsing line '" + line + "' from file: wrong token count for line"); } std::string const& tok_name = tokens[0]; if(tok_name != name) { throw test_utils_exceptn_t("error parsing line '" + line + "' from file: wrong property"); } std::string const& value = tokens[1]; if(value.size() % 2) { std::cout << "size of string not multiple of 2" << std::endl; } std::vector<flea_u8_t> result; if(result_size) { result.resize(result_size); } else { result.resize(value.size() / 2); result_size = result.size(); } if(value.size()) { int offset = result_size - (value.size() + 1) / 2; if(offset < 0) { std::cerr << "value size error: name = " << std::string(name) << ", result_size = " << result_size << ", value.size() = " << value.size() << ", offset = " << offset << std::endl; throw test_utils_exceptn_t("string parsing error in test configuration"); } for(unsigned i = 0; i < value.size(); i++) { unsigned shift = i % 2 ? 0 : 4; unsigned char byte = 0; if(((unsigned) value[i]) >= 0x30 + 0 && ((unsigned) value[i]) <= 0x30 + 9) { byte = value[i] - 0x30; } else if(((unsigned) value[i]) >= 0x41 + 0 && ((unsigned) value[i]) <= 0x41 + 6) { byte = value[i] - 0x41 + 10; } else if(((unsigned) value[i]) >= 0x61 + 0 && ((unsigned) value[i]) <= 0x61 + 6) { byte = value[i] - 0x61 + 10; } else { std::memset(&result[0], 0, result.size()); std::cout << "value encoding error: '" << value[i] << "'" << std::endl; throw std::exception(); } result[i / 2 + offset] |= byte << shift; } } return result; } // parse_line namespace { std::string remove_ws(std::string const& s) { std::string result; for(char c : s) { if(c != ' ') { result.push_back(c); } } return result; } bool is_string_only_whitespaces(std::string const& str) { std::string::const_iterator it; for(it = str.begin(); it != str.end(); it++) { if(*it != ' ') { return false; } } return true; } std::vector<std::string> read_file_line_wise(std::string const& filename) { std::ifstream input(filename); if(!input) { throw test_utils_exceptn_t("could not open file " + filename); } std::vector<std::string> result; for(std::string line; getline(input, line);) { result.push_back(line); } return result; } bool is_string_only_numeric(std::string const& str) { for(unsigned i = 0; i < str.size(); i++) { if(str[i] != '0' && str[i] != '1' && str[i] != '2' && str[i] != '3' && str[i] != '4' && str[i] != '5' && str[i] != '6' && str[i] != '7' && str[i] != '8' && str[i] != '9') { return false; } } return true; } flea_u32_t string_to_u32bit_unchecked(std::string const& str) { std::istringstream is(str); flea_u32_t result; is >> result; return result; } } bool string_ends_with( std::string const &fullString, std::string const &ending ) { if(fullString.length() >= ending.length()) { return (0 == fullString.compare(fullString.length() - ending.length(), ending.length(), ending)); } else { return false; } } std::vector<std::string> tokenize_string( std::string const& value, char sep, bool crop_ws ) { size_t pos = 0; std::string sep_str; sep_str.push_back(sep); std::vector<std::string> result; while(pos < value.size()) { auto seperator_pos = value.find(sep, pos); // std::cout << "seperator_pos = " << seperator_pos << std::endl; string token; if(seperator_pos == std::string::npos) { token = value.substr(pos, value.size() - pos); } else { token = value.substr(pos, seperator_pos - pos); } // std::cout << "file name would be '" << token << "'" << std::endl; if(!crop_ws) { if(token.size() && token != sep_str) { result.push_back(token); } } else { std::vector<std::string> ws_crop_tok = tokenize_string(token, ' ', false); for(std::string const& s : ws_crop_tok) { if(s.size() && s != sep_str) { result.push_back(s); } } } if(seperator_pos == std::string::npos) { break; } pos = seperator_pos + 1; } return result; } // tokenize_string flea_u32_t string_to_u32bit(std::string const& str) { if(!is_string_only_numeric(str)) { throw test_utils_exceptn_t("error parsing string '" + str + "' as numeric value"); } return string_to_u32bit_unchecked(str); } std::vector<unsigned char> read_bin_file(std::string const& filename) { std::ifstream file(filename.c_str(), ios::in | ios::binary | ios::ate); if(!file.is_open()) { throw test_utils_exceptn_t("could not open file '" + filename + "'"); } std::ifstream::pos_type size; size = file.tellg(); std::vector<unsigned char> result(size); file.seekg(0, ios::beg); file.read((char*) (&result[0]), size); file.close(); return result; } void write_bin_file( std::string const & filename, const unsigned char* data, size_t data_len ) { fstream myfile(filename, ios::out | ios::binary); myfile.write((const char*) &data[0], data_len); myfile.close(); } bool is_dir_existent(std::string const& dir_name) { DIR* dir = opendir(dir_name.c_str()); if(dir) { /* Directory exists. */ closedir(dir); return true; } return false; } std::vector<std::string> get_entries_of_dir( std::string const & dir_name, dir_entry_extract_mode_t extr_mode, std::string const & postfix, std::string const & prefix ) { std::vector<std::string> result; DIR* dir; struct dirent* ent; if((dir = opendir(dir_name.c_str())) != NULL) { /* print all the files and directories within directory */ while((ent = readdir(dir)) != NULL) { // printf ("%s\n", ent->d_name); std::string s(ent->d_name); if(s.find(".") == 0) { continue; } if((prefix != "") && s.find(prefix) != 0) { continue; } if((postfix != "") && !string_ends_with(s, postfix)) { continue; } std::string prefix = ""; if(extr_mode == dir_entries_with_path) { prefix = dir_name + "/"; } result.push_back(prefix + s); // std::vector<unsigned char> cert = read_bin_file(dir_name + "/" + s); // if(FLEA_ERR_FINE != THR_flea_x509_verify_cert_signature(&cert[0], cert.size(), &cert[0], cert.size())) } closedir(dir); } else { /* could not open directory */ // perror (""); /*FLEA_PRINTF_1_SWITCHTED("could not open test data directory\n"); * FLEA_PRINTF_1_SWITCHTED("be sure to run unit tests from main folder as build/unit_tests\n");*/ throw test_utils_exceptn_t( "could not open directory " + dir_name + ", be sure to run unit tests from main folder as build/unit_tests" ); } return result; } // get_entries_of_dir void property_set_t::add_index_name_string_with_equation_mark( std::string const & s, property_string_form_t form ) { size_t equ_pos = s.find("="); std::string value, name; if(equ_pos == std::string::npos) { if(form == value_in_property_str_is_required_e) { throw test_utils_exceptn_t("could not parse s '" + s + "' in file " + m_filename); } name = remove_ws(s); } else { name = s.substr(0, equ_pos); if(equ_pos == s.size()) { return; } value = s.substr(equ_pos + 1, s.size()); name = remove_ws(name); value = remove_ws(value); } if(m_spec.size() != 0) { if(m_spec.find(name) == m_spec.end()) { throw_exception(std::string("error with unspecified property"), name); } } if(m_spec.size() && m_spec.find(name)->second.arg_placeholder.size() && (value == "")) { throw_exception(std::string("missing argument for parameter"), name); } if(m_spec.size() && !m_spec.find(name)->second.arg_placeholder.size() && (value != "")) { throw_exception(std::string("superfluous argument for parameter"), name); } (*this)[name] = value; // add_index_whitelist_check(name,value); } // property_set_t::add_index_name_string_with_equation_mark /* void property_set_t::add_index_whitelist_check( std::string const& name, std::string const& value ) { if(m_do_enforce_params_whitelisting) { if(!m_spec.count(name)) { throw test_utils_exceptn_t("invalid command parameter '" + name + "'"); } } (*this)[name] = value; } */ property_set_t::property_set_t( int argc, const char** argv, properties_spec_t const& spec ) : m_spec(spec) { for(unsigned i = 1; i < static_cast<unsigned>(argc); i++) { std::string arg_string(argv[i]); if(arg_string.find("--") != 0) { throw test_utils_exceptn_t("invalid command line arg " + arg_string); } arg_string = arg_string.substr(2, arg_string.size() - 2); // std::cout << "parse arg = " << arg_string << std::endl; add_index_name_string_with_equation_mark(arg_string, value_in_property_str_is_not_required_e); } // add default values: properties_spec_t::const_iterator it; for(it = m_spec.begin(); it != m_spec.end(); it++) { std::string key = it->first; if(!this->count(key) && it->second.have_default_value) { (*this)[key] = it->second.default_value; } } } property_set_t::property_set_t( std::string const & filename, properties_spec_t const& spec ) : m_filename(filename), m_spec(spec) { vector<string> lines = read_file_line_wise(filename); for(string line: lines) { if((line.find("#") == 0) || is_string_only_whitespaces(line)) { continue; } add_index_name_string_with_equation_mark(line, value_in_property_str_is_required_e); /* * size_t equ_pos = line.find("="); * if(equ_pos == std::string::npos) * { * throw test_utils_exceptn_t("could not parse line '" + line + "' in file " + filename); * } * string name = line.substr(0, equ_pos); * if(equ_pos == line.size()) * { * return; * } * string value = line.substr(equ_pos + 1, line.size()); * name = remove_ws(name); * value = remove_ws(value); * (*this)[name] = value; */ } } void property_set_t::throw_exception( std::string const& text, std::string const& property ) const { /*if(property == "") { throw test_utils_exceptn_t("error in configuration " + ( m_filename.size() ? m_filename : "") + ": " + text); } else {*/ std::string value_inf; if(have_index(property)) { value_inf = " with value '" + get_property_as_string(property) + "'"; } throw test_utils_exceptn_t( "error in configuration " + (m_filename.size() ? ("in file + '" + m_filename + "'") : std::string("")) + (property.size() == 0 ? "" : "with property '" + property + "'") + " " + value_inf + ": " + text ); // } } flea_bool_t property_set_t::get_property_as_bool( std::string const& index, bool* default_val ) const { if(default_val == nullptr) { ensure_index(index); } else if(!have_index(index)) { return *default_val; } if(find(index)->second == "true") { return FLEA_TRUE; } else if(find(index)->second == "false") { return FLEA_FALSE; } /*else //if(default_val != nullptr) * { * //return *default_val; * }*/ else { // throw test_utils_exceptn_t("could not parse property '" + index + "' as boolean in file " + m_filename); throw_exception(std::string("could not parse propery"), index); return FLEA_FALSE; // to make compiler happy, never reached } } std::string property_set_t::get_property_as_string(std::string const& index) const { ensure_index(index); return find(index)->second; } std::string property_set_t::get_property_as_string_default_empty(std::string const& index) const { if(!have_index(index)) { return std::string(""); } return find(index)->second; } bool property_set_t::have_index(std::string const& index) const { return (find(index) != this->end()); } void property_set_t::ensure_index(std::string const& index) const { /*if(!have_index(index) && m_spec.have_default_value(index)) { (*this)[index] = m_spec.get_default_value(index); return; } else*/ if(!have_index(index)) { throw test_utils_exceptn_t("did not find index '" + index + "' in file " + m_filename); } } flea_u32_t property_set_t::get_property_as_u32_default( std::string const& index, flea_u32_t default_val ) const { if(have_index(index)) { return get_property_as_u32(index); } return default_val; } flea_u32_t property_set_t::get_property_as_u32(std::string const& index) const { ensure_index(index); string value = find(index)->second; if(!value.size()) { throw test_utils_exceptn_t( std::string("value of property '") + index + std::string( "' in file " ) + m_filename + " is not numeric as expected" ); } return string_to_u32bit(value); } std::vector<unsigned char> property_set_t::get_bin_file(std::string const& index) const { string value = get_property_as_string(index); return read_bin_file(value); } std::vector<std::vector<unsigned char> > property_set_t::get_bin_file_list_property(std::string const& index) const { std::vector<std::vector<unsigned char> > result; if(!have_index(index)) { return result; } string value = get_property_as_string(index); std::vector<string> strings = tokenize_string(value, ','); for(auto s : strings) { result.push_back(read_bin_file(s)); } return result; } std::string property_set_t::get_help_str() const { return m_spec.get_help_str(); } std::vector<unsigned char> read_binary_from_std_in() { std::vector<unsigned char> result; const unsigned BLOCK_SIZE = 1024; unsigned char buffer[BLOCK_SIZE]; for(;;) { size_t bytes = fread(buffer, sizeof(char), BLOCK_SIZE, stdin); for(unsigned i = 0; i < bytes; i++) { result.push_back(buffer[i]); } // fwrite(buffer, sizeof(char), bytes, stdout); // fflush(stdout); if(bytes < BLOCK_SIZE) { if(feof(stdin)) break; } } return result; } unsigned properties_spec_t::have_default_value(std::string const& index) const { if(this->count(index) && this->find(index)->second.have_default_value) { return true; } return false; } std::string properties_spec_t::get_default_value(std::string const& index) const { if(!this->count(index) || !this->find(index)->second.have_default_value) { throw test_utils_exceptn_t("internal error: no default value for index = '" + index + "'"); } return this->find(index)->second.default_value; } unsigned properties_spec_t::get_max_key_and_arg_len() const { properties_spec_t::const_iterator it; unsigned max = 0; for(it = this->begin(); it != this->end(); it++) { std::string key = it->first; unsigned print_len = key.size() + it->second.arg_placeholder.size() + 1; if(print_len > max) { max = print_len; } } return max; } std::string properties_spec_t::get_help_str() const { std::multimap<std::string, std::string> grouped = get_help_str_map(); std::string result; std::string current_group = ""; std::multimap<std::string, std::string>::const_iterator it; for(it = grouped.begin(); it != grouped.end(); it++) { if(it->first != current_group) { current_group = it->first; result += current_group + ":\n"; } result += " " + it->second; } return result; } std::multimap<std::string, std::string> properties_spec_t::get_help_str_map() const { std::multimap<std::string, std::string> result; // std::string result; unsigned key_spacing = get_max_key_and_arg_len() + 2; properties_spec_t::const_iterator it; for(it = this->begin(); it != this->end(); it++) { std::string this_entry; std::string key = it->first; properties_spec_entry_t e = it->second; unsigned pad_len = key_spacing - (key.size() + e.arg_placeholder.size()); if(e.arg_placeholder.size() == 0) { pad_len++; // account for "=" } this_entry += "--" + key; if(e.arg_placeholder.size()) { this_entry += "=" + e.arg_placeholder; } for(unsigned i = 0; i < pad_len; i++) { this_entry += " "; } this_entry += e.description; if(e.have_default_value) { if(this_entry.size() && this_entry[this_entry.size() - 1] != '.') { this_entry += "."; } this_entry += " Default value is '" + e.default_value + "'."; } this_entry += "\n"; result.insert(std::make_pair(it->second.group, this_entry)); } return result; } // properties_spec_t::get_help_str
24.159119
119
0.601885
falko-strenzke
cc4a9577fb50e1a12d7044ea8c8f5779059d7f55
1,620
cpp
C++
app_modules/01_keyboard_module/src/application.cpp
LucaRitz/learn_with_tello
f7fc45e7a9e9a2903638ec8367c9b355a4f1afc9
[ "Apache-2.0" ]
null
null
null
app_modules/01_keyboard_module/src/application.cpp
LucaRitz/learn_with_tello
f7fc45e7a9e9a2903638ec8367c9b355a4f1afc9
[ "Apache-2.0" ]
null
null
null
app_modules/01_keyboard_module/src/application.cpp
LucaRitz/learn_with_tello
f7fc45e7a9e9a2903638ec8367c9b355a4f1afc9
[ "Apache-2.0" ]
null
null
null
#include "application.hpp" #include <tello/tello.hpp> #include "keyboard_view.hpp" #include "keyboard_controller.hpp" using tello::Tello; using tello::Response; Application::Application() : _baseSettings(nullptr), _keyboardView(std::make_unique<KeyboardView>()), _keyboardController(std::make_unique<KeyboardController>(_keyboardView.get(), this)){ } ModuleId Application::id() const { return ModuleId::KEYBOARD_MODULE; } string* Application::name() const { return new string {"Keyboard"}; } vector<ModuleId> Application::dependsOn() const { return vector<ModuleId>{ModuleId::BASE}; } uint8_t Application::init() { return 0; } void Application::tearDown() { } #include <iostream> void Application::update(ModuleId moduleId, const ISettings* settings) { switch (moduleId) { case ModuleId::BASE: { _baseSettings = dynamic_cast<const BaseSettings*>(settings); std::cout << "Update settings in module 1: " << _baseSettings->tellos().at(0)->ip() << std::endl; /* auto& tello = _baseSettings->tellos().at(0); future<Response> command_future = tello->command(); command_future.wait(); future<Response> takeoff_future = tello->takeoff(); takeoff_future.wait(); future<Response> land_future = tello->land(); land_future.wait();*/ break; } default: break; } } BaseController* Application::controller() { return _keyboardController.get(); } ISettingsController* Application::settingsController() { return nullptr; }
24.179104
109
0.652469
LucaRitz
cc4a9be52935ca5f7693107b03a076fe5b10b430
6,487
cpp
C++
Uebungen/Aufgabe1/main.cpp
StefanoD/Geometric_Modeling
0997f8d57bf2bc7bd5eb4b4e2524b0fdbc7a125c
[ "Apache-2.0" ]
null
null
null
Uebungen/Aufgabe1/main.cpp
StefanoD/Geometric_Modeling
0997f8d57bf2bc7bd5eb4b4e2524b0fdbc7a125c
[ "Apache-2.0" ]
null
null
null
Uebungen/Aufgabe1/main.cpp
StefanoD/Geometric_Modeling
0997f8d57bf2bc7bd5eb4b4e2524b0fdbc7a125c
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////// // // Georg Umlauf, (c) 2012 // //////////////////////////////////////////////////////////////////// //#include "stdafx.h" #include "color.h" #include "vec.h" #include "mat.h" #include "quader.h" #include "viewSystem.h" #include <iostream> using namespace std; // might be you have to switch to // #include "glut.h" depending on your GLUT installation //#include "glut.h" // Include-File für die GLUT-Library #if defined(HAVE_FREEGLUT) #ifdef WIN32 #include "../include/GL/freeglut.h" #else #include <GL/freeglut.h> #endif #else #include <GL/glut.h> #endif //////////////////////////////////////////////////////////// // // system relevant global variables // const int g_iWidth = 500; // window width (choose an appropriate size) const int g_iHeight = 500; // window height (choose an appropriate size) // ///////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // // private, global variables ... replace by your own ones viewSystem view; Quader Q1,Q2,Q3; float relativeStep; // ///////////////////////////////////////////////////////////// void init () { // function to initialize our own variables view.setData(CVec4f(0, 0, 0, 1), // EyePoint CVec4f(0, 0,-1, 0), // ViewDir CVec4f(0, 1, 0, 0), // ViewUp 299); view.setMode(VIEW_QUATERNION_MODE); // Hier für AUFGABE01 auf VIEW_MATRIX_MODE setzen. Q1.setData(CVec4f( -25, -25, -25, 1),CVec4f( 25, 25, 25, 1)); Q2.setData(CVec4f( 0, 0, 0, 1),CVec4f( 100, 100, 100, 1)); Q3.setData(CVec4f(-155, -55, -75, 1),CVec4f( -90, 50, 50, 1)); relativeStep = 0.1; } void initGL () { // function to initialize the view to ortho-projection glViewport (0, 0, g_iWidth, g_iHeight); // Establish viewing area to cover entire window. glMatrixMode (GL_PROJECTION); // Start modifying the projection matrix. glLoadIdentity (); // Reset project matrix. glOrtho (-g_iWidth/2, g_iWidth/2, -g_iHeight/2, g_iHeight/2, 0, 1); // Map abstract coords directly to window coords. // tell GL that we draw to the back buffer and // swap buffers when image is ready to avoid flickering glDrawBuffer (GL_BACK); // tell which color to use to clear image glClearColor (0,0,0,1); } void display (void) { glClear (GL_COLOR_BUFFER_BIT); // /////// Q1.draw(view,Color(1,1,1)); Q2.draw(view,Color(1,1,0)); Q3.draw(view,Color(0,1,0)); glFlush (); glutSwapBuffers (); // swap front and back buffer } void keyboard (unsigned char key, int x, int y) { float angle=0.05; CVec4f Translation; CVec4f startPoint(1, 1, 1, 0); CVec4f endPoint(0, -1, 0, 0); switch (key) { case 'f': view.Zoom(-5); break; case 'F': view.Zoom(5); break; // Rotationen des Sichtsystems um die Achsen des Weltkoordinatensystems case 'X': view.RotateX(angle); break; case 'x': view.RotateX(-angle); break; case 'Y': view.RotateY(angle); break; case 'y': view.RotateY(-angle); break; case 'Z': view.RotateZ(angle); break; case 'z': view.RotateZ(-angle); break; // Rotationen des Sichtsystems um die Achsen des Sichtkoordinatensystem case 'A': view.RotateDir(angle); break; case 'a': view.RotateDir(-angle); break; case 'B': view.RotateUp(angle); break; case 'b': view.RotateUp(-angle); break; case 'C': view.RotateHor(angle); break; case 'c': view.RotateHor(-angle); break; // Verschiebung des Sichtsystems entlang der Achsen des Sichtkoordinatensystem case 'U': Translation(0) = 3; view.Translate(Translation); break; case 'u': Translation(0) = -3; view.Translate(Translation); break; case 'V': Translation(1) = 3; view.Translate(Translation); break; case 'v': Translation(1) = -3; view.Translate(Translation); break; case 'W': Translation(2) = 3; view.Translate(Translation); break; case 'w': Translation(2) = -3; view.Translate(Translation); break; case '1': if (relativeStep <= 1) { std::cout << "LERP with relative step: " << relativeStep << std::endl; relativeStep += 0.1; view.lerpUp(startPoint, endPoint, relativeStep); } break; case '2': if (relativeStep <= 1) { std::cout << "SLERP with relative step: " << relativeStep << std::endl; relativeStep += 0.1; view.slerpUp(startPoint, endPoint, relativeStep); } break; case '3': if (relativeStep <= 1) { std::cout << "NSLERP with relative step: " << relativeStep << std::endl; relativeStep += 0.1; view.nslerpUP(startPoint, endPoint, relativeStep); } break; // Reset case 'r': init(); break; case 'R': init(); break; // Quit case 'q': case 'Q': exit (0); break; default: break; } glutPostRedisplay (); } int main (int argc, char **argv) { glutInit (&argc, argv); glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB); glutCreateWindow ("Aufgabe 2"); init (); // init my variables first initGL(); // init the GL (i.e. view settings, ...) // assign callbacks glutKeyboardFunc(keyboard); glutDisplayFunc (display); // start main loop glutMainLoop (); return 0; }
26.586066
122
0.478341
StefanoD
cc4d488f19a45a637ad4a82810a5eb173f26c8e0
16,538
cc
C++
util/unittest/iostream.cc
stablecc/scclib
cedcb3b37a814d3a393e128db7aa9753f518cbaf
[ "BSD-3-Clause" ]
null
null
null
util/unittest/iostream.cc
stablecc/scclib
cedcb3b37a814d3a393e128db7aa9753f518cbaf
[ "BSD-3-Clause" ]
10
2022-02-27T18:52:11.000Z
2022-03-21T14:11:35.000Z
util/unittest/iostream.cc
stablecc/scclib
cedcb3b37a814d3a393e128db7aa9753f518cbaf
[ "BSD-3-Clause" ]
null
null
null
/* BSD 3-Clause License Copyright (c) 2022, Stable Cloud Computing, Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <util/iostream.h> #include <util/rwloopbuf.h> #include <util/rwcounter.h> #include <gtest/gtest.h> #include <iostream> #include <string> #include <vector> #include <sstream> /** \addtogroup util_iostream @{ */ /** Tests for \ref util_iostream \file */ /** \example util/unittest/iostream.cc */ /** @} */ using std::cout; using std::endl; using std::string; using std::stringstream; using std::ios; using scc::util::RwLoopBuffer; using scc::util::InStream; using scc::util::OutStream; using scc::util::IoStream; using scc::util::RwCounter; using scc::util::Reader; using scc::util::Writer; //! [I/O stream decorator stack] static string test_word = "QuotesFromOscarWilde"; static string test_line = "It is always a silly thing to give advice, but to give good advice is fatal."; static string test_long = "One can survive everything, nowadays, except death, and live down everything except a good reputation.\n" "One should always play fairly when one has the winning cards.\n" "Patriotism is the virtue of the vicious.\n" "Selfishness is not living as one wishes to live, it is asking others to live as one wishes to live."; TEST(iostream_test, example_decorator_stack) { RwLoopBuffer rwbuf; // loopback stream buffer RwCounter rwcount(rwbuf, rwbuf); // decorator provides read() and write() for the stream buffer IoStream rws(rwcount, rwcount); // provides std::iostream std::stringstream sstr; // std::stringstream is a std::iostream // verify stream write behavior rws << test_line << endl; // std::endl writes a newline char and flushes the stream rws << test_long << endl; sstr << test_line << endl; sstr << test_long << endl; ASSERT_EQ(rwbuf.str(), sstr.str()); ASSERT_EQ(rwcount.write_count(), sstr.str().size()); ASSERT_EQ(rwcount.read_count(), 0); // verify stream read behavior string reads, tests; while (sstr >> reads) { ASSERT_TRUE(rws >> tests); ASSERT_EQ(reads, tests); } ASSERT_FALSE(rws >> tests); // verify the RwLoopBuffer stream is done as well ASSERT_EQ(rwcount.read_count(), sstr.str().size()); ASSERT_EQ(rwbuf.str().size(), 0); // the loopback buffer is now empty } struct iostreamTest : public testing::Test { std::vector<string> all; iostreamTest() { all.push_back(test_word); all.push_back(test_line); all.push_back(test_long); } virtual ~iostreamTest() {} void readwords_test(const string s, int recvbuf_size=10) { stringstream sstr(s); RwLoopBuffer rw(s); InStream ins(rw); ins.recvbuf_size(recvbuf_size); ASSERT_EQ(ins.recvbuf_size(), recvbuf_size); cout << "readwords_test: " << s.substr(0,10) << "... size=" << s.size() << " recvbuf_size= " << ins.recvbuf_size() << endl; string reads, tests; while (sstr >> reads) { ASSERT_TRUE(ins >> tests); ASSERT_EQ(reads, tests); } } void readlines_test(const string s, int recvbuf_size=10) { stringstream sstr(s); RwLoopBuffer rw(s); InStream ins(rw); ins.recvbuf_size(recvbuf_size); ASSERT_EQ(ins.recvbuf_size(), recvbuf_size); cout << "readlines_test: " << s.substr(0,10) << "... size=" << s.size() << " recvbuf_size= " << ins.recvbuf_size() << endl; string reads, tests; while (std::getline(sstr, reads)) { ASSERT_TRUE(std::getline(ins, tests)); ASSERT_EQ(reads, tests); } } void writewords_test(const string s, int sendbuf_size=10) { stringstream sstr(s); RwLoopBuffer rw; OutStream ous(rw); ous.sendbuf_size(sendbuf_size); ASSERT_EQ(ous.sendbuf_size(), sendbuf_size); cout << "writewords_test: " << s.substr(0,10) << "... size=" << s.size() << " sendbuf_size= " << ous.sendbuf_size() << endl; string reads; stringstream writess; while (sstr >> reads) { writess << reads; ASSERT_TRUE(ous << reads); } writess.flush(); ous.flush(); ASSERT_EQ(writess.str(), rw.str()); } void writelines_test(const string s, int sendbuf_size=10) { stringstream sstr(s); RwLoopBuffer rw; OutStream ous(rw); ous.sendbuf_size(sendbuf_size); ASSERT_EQ(ous.sendbuf_size(), sendbuf_size); cout << "writelines_test: " << s.substr(0,10) << "... size=" << s.size() << " sendbuf_size= " << ous.sendbuf_size() << endl; string reads; stringstream writess; while (std::getline(sstr, reads)) { writess << reads << endl; ASSERT_TRUE(ous << reads << endl); } writess.flush(); ous.flush(); ASSERT_EQ(writess.str(), rw.str()); } void readchunks_test(const string s, int rbuf1=10, int rsz1=1024, int rbuf2=10) { RwLoopBuffer rw(s); InStream ins(rw); ins.recvbuf_size(rbuf1); ASSERT_EQ(ins.recvbuf_size(), rbuf1); int toread = s.size(); cout << "readchunks_test1: " << s.substr(0,10) << "... read=" << rsz1 << " toread=" << toread << " recvbuf_size= " << ins.recvbuf_size() << endl; char bin1[rsz1]; ins.read(bin1, rsz1); auto lastread = ins.gcount(); ASSERT_EQ(lastread, std::min(rsz1, toread)); ASSERT_EQ(memcmp(s.data(), bin1, lastread), 0); toread -= lastread; if (lastread < rsz1) { ASSERT_EQ((ins.rdstate()&std::ios_base::eofbit), std::ios_base::eofbit); } if (toread) { ins.recvbuf_size(rbuf2); ASSERT_EQ(ins.recvbuf_size(), rbuf2); cout << "readchunks_test2: " << s.substr(0,10) << "... read=" << toread << " toread=" << toread << " recvbuf_size= " << ins.recvbuf_size() << endl; char bin2[toread]; ins.read(bin2, toread); auto lastread2 = ins.gcount(); ASSERT_EQ(lastread2, toread); ASSERT_EQ(memcmp(s.data()+lastread, bin2, lastread2), 0); ASSERT_NE((ins.rdstate()&std::ios_base::eofbit), std::ios_base::eofbit); } } void writechunks_test(const string s, int wbuf1=10, int wsz1=1024, int wbuf2=10) { RwLoopBuffer rw; OutStream ous(rw); ous.sendbuf_size(wbuf1); ASSERT_EQ(ous.sendbuf_size(), wbuf1); int towrite = s.size(); wsz1 = std::min(wsz1, towrite); cout << "writechunks_test1: " << s.substr(0,10) << "... write=" << wsz1 << " towrite=" << towrite << " sendbuf_size= " << ous.sendbuf_size() << endl; ASSERT_TRUE(ous.write(s.data(), wsz1)); towrite -= wsz1; if (towrite) { ous.sendbuf_size(wbuf2); ASSERT_EQ(ous.sendbuf_size(), wbuf2); cout << "writechunks_test2: " << s.substr(0,10) << "... write=" << towrite << " towrite=" << towrite << " sendbuf_size= " << ous.sendbuf_size() << endl; ASSERT_TRUE(ous.write(s.data()+wsz1, towrite)); } ous.flush(); ASSERT_EQ(s, rw.str()); } }; TEST_F(iostreamTest, read) { for (auto& s : all) { readwords_test(s); } for (auto& s : all) { readlines_test(s); } } TEST_F(iostreamTest, write) { for (auto& s : all) { writewords_test(s); } for (auto& s : all) { writelines_test(s); } } TEST_F(iostreamTest, readchunks) { for (auto& s : all) { readchunks_test(s); // buf 10, read all readchunks_test(s, 10, 5, 20); // buf 10, read 5, buf 20, read all readchunks_test(s, 10, 8, 5); // buf 10, read 8, buf 5, read all } } TEST_F(iostreamTest, writechunks) { for (auto& s : all) { writechunks_test(s); // buf 10, write all writechunks_test(s, 10, 5, 20); // buf 10, write 5, buf 20, write all writechunks_test(s, 10, 8, 5); // buf 10, write 8, buf 5, write all } } TEST(iostream_test, write_read) { string val("this\nis\na\ntest\n"); RwLoopBuffer rw; IoStream ios(rw, rw); ASSERT_TRUE(ios.write(val.data(), val.size())); ios.flush(); char buf[sizeof(val)]; ASSERT_TRUE(ios.read(buf, val.size())); ASSERT_EQ(ios.gcount(), val.size()); ASSERT_EQ(memcmp(buf, val.data(), val.size()), 0); ASSERT_FALSE(ios.read(buf, val.size())); } TEST(iostream_test, stream_write_read) { string val("this\nis\na\ntest\n"); RwLoopBuffer rw; IoStream ios(rw, rw); ASSERT_TRUE(ios << val); ios.flush(); string s; ASSERT_TRUE(ios >> s); ASSERT_EQ(s, "this"); ASSERT_TRUE(ios >> s); ASSERT_EQ(s, "is"); ASSERT_TRUE(ios >> s); ASSERT_EQ(s, "a"); ASSERT_TRUE(ios >> s); ASSERT_EQ(s, "test"); } string printstate(int state) { stringstream st; st << "state: "; if (state == 0) st << "good "; if ((state&std::ios_base::badbit)==std::ios_base::badbit) st << "bad "; if ((state&std::ios_base::failbit)==std::ios_base::failbit) st << "fail "; if ((state&std::ios_base::eofbit)==std::ios_base::eofbit) st << "eof "; return st.str(); } TEST(iostream_test, write_buffer_states_test) { RwLoopBuffer rw; OutStream st(rw, 10); string s1 = "This is a test", s2 = " of the stream bit stuff."; cout << "***OutStream test" << endl; cout << "Before " << printstate(st.rdstate()) << endl; ASSERT_EQ(st.rdstate(), 0); st << s1; cout << "write '"<<s1<<"' string: '" << rw.str() << "' " << printstate(st.rdstate()) << endl; ASSERT_EQ(st.rdstate(), 0); ASSERT_EQ(rw.str(), s1.substr(0, 10)); st.setstate(std::ios_base::eofbit); cout << "seteof string: '" << rw.str() << "' " << printstate(st.rdstate()) << endl; ASSERT_EQ(st.rdstate(), std::ios_base::eofbit); st << s2; cout << "write '"<<s2<<"' string: '" << rw.str() << "' " << printstate(st.rdstate()) << endl; ASSERT_EQ(st.rdstate(), std::ios_base::eofbit|std::ios_base::failbit); ASSERT_EQ(rw.str(), s1.substr(0, 10)); st.clear(); cout << "clear string: '" << rw.str() << "' " << printstate(st.rdstate()) << endl; st << s2; cout << "write '"<<s2<<"' string: '" << rw.str() << "' " << printstate(st.rdstate()) << endl; st.flush(); cout << "flush string: '" << rw.str() << "' " << printstate(st.rdstate()) << endl; ASSERT_EQ(st.rdstate(), 0); ASSERT_EQ(rw.str(), s1+s2); } TEST(iostream_test, move_assign) { RwLoopBuffer rw; IoStream io1(rw, rw); io1 << "test"; io1.flush(); IoStream io2 = std::move(io1); string s; io2 >> s; cout << "got: " << s << endl; ASSERT_EQ(s, "test"); } TEST(iostream_test, move_moveconstruct) { RwLoopBuffer rw; IoStream io1(rw, rw); io1 << "test"; io1.flush(); IoStream io2(std::move(io1)); string s; io2 >> s; cout << "got: " << s << endl; ASSERT_EQ(s, "test"); } TEST(instream_test, move_assign) { RwLoopBuffer rw("test"); InStream in1(rw); InStream in2 = std::move(in1); string s; in2 >> s; cout << "got: " << s << endl; ASSERT_EQ(s, "test"); } TEST(instream_test, move_construct) { RwLoopBuffer rw("test"); InStream in1(rw); InStream in2(std::move(in1)); string s; in2 >> s; cout << "got: " << s << endl; ASSERT_EQ(s, "test"); } TEST(outstream_test, move_assign) { RwLoopBuffer rw; OutStream ou1(rw); OutStream ou2 = std::move(ou1); ou2 << "test"; ou2.flush(); cout << "got: " << rw.str() << endl; ASSERT_EQ(rw.str(), "test"); } TEST(outstream_test, move_construct) { RwLoopBuffer rw; OutStream ou1(rw); OutStream ou2(std::move(ou1)); ou2 << "test"; ou2.flush(); cout << "got: " << rw.str() << endl; ASSERT_EQ(rw.str(), "test"); } TEST(fail_test, outstream_except) { string line("test"); struct ExReader : public Reader { bool fail; ExReader() : fail(true) {} size_t read(void* loc, size_t len) { if (fail) throw std::runtime_error("test"); return len; } }; struct ExWriter : public Writer { bool fail; ExWriter() : fail(true) {} size_t write(const void*, size_t len) { if (fail) throw std::runtime_error("test"); return len; } }; ExReader rd; ExWriter wr; InStream is(rd); OutStream os(wr); IoStream io(rd, wr); is.read((char*)line.data(), 4); ASSERT_TRUE(is.fail()); ASSERT_EQ(is.rdstate() & ios::badbit, ios::badbit); ASSERT_EQ(is.recv_fail(), "test"); is.clear(); ASSERT_EQ(is.recv_fail(), ""); rd.fail = false; is.read((char*)line.data(), 4); ASSERT_FALSE(is.fail()); ASSERT_EQ(is.recv_fail(), ""); os << "test"; os.flush(); ASSERT_TRUE(os.fail()); ASSERT_EQ(os.rdstate() & ios::badbit, ios::badbit); ASSERT_EQ(os.send_fail(), "test"); os.clear(); ASSERT_EQ(os.send_fail(), ""); wr.fail = false; os << "test"; os.flush(); ASSERT_FALSE(os.fail()); ASSERT_EQ(os.send_fail(), ""); io.clear(); rd.fail = true; wr.fail = true; io.read((char*)line.data(), 4); io << "test"; io.flush(); ASSERT_TRUE(io.fail()); ASSERT_EQ(io.rdstate() & ios::badbit, ios::badbit); ASSERT_EQ(io.send_fail(), ""); ASSERT_EQ(io.recv_fail(), "test"); io.clear(); io << "test"; io.flush(); io.read((char*)line.data(), 4); ASSERT_TRUE(io.fail()); ASSERT_EQ(io.send_fail(), "test"); ASSERT_EQ(io.recv_fail(), ""); io.clear(); rd.fail = false; wr.fail = false; io << "test"; io.flush(); io.read((char*)line.data(), 4); ASSERT_FALSE(io.fail()); ASSERT_EQ(io.send_fail(), ""); ASSERT_EQ(io.recv_fail(), ""); } TEST(shared_ptr_test, shared_io) { std::shared_ptr<RwLoopBuffer> buf(new RwLoopBuffer); IoStream io(buf, buf); for (char ch : test_long) io.put(ch); io.flush(); ASSERT_EQ(test_long, buf->str()); string got; for (char ch; io.get(ch);) got.push_back(ch); ASSERT_EQ(test_long, got); cout << "io buf references: " << buf.use_count() << endl; ASSERT_EQ(buf.use_count(), 3); } TEST(shared_ptr_test, shared_in) { std::shared_ptr<RwLoopBuffer> buf(new RwLoopBuffer); InStream io(buf); buf->set(test_long.data(), test_long.size()); string got; for (char ch; io.get(ch);) got.push_back(ch); ASSERT_EQ(test_long, got); cout << "in buf references: " << buf.use_count() << endl; ASSERT_EQ(buf.use_count(), 2); } TEST(shared_ptr_test, shared_out) { std::shared_ptr<RwLoopBuffer> buf(new RwLoopBuffer); OutStream io(buf); for (char ch : test_long) io.put(ch); io.flush(); ASSERT_EQ(test_long, buf->str()); cout << "out buf references: " << buf.use_count() << endl; ASSERT_EQ(buf.use_count(), 2); } TEST(basic_stream_test, sync_n_flush) { RwLoopBuffer buf; RwCounter count(buf, buf); IoStream io(count, count, 10, 10); for (unsigned i = 0; i < 7; i++) io.put(test_long[i]); cout << "partial put buf size: " << buf.size() << endl; cout << "partial put idx: " << buf.idx() << endl; // ASSERT_TRUE(buf.empty()); // ASSERT_EQ(buf.idx(), 0); io.flush(); // flush the write buffer cout << "partial write buf size: " << buf.size() << endl; cout << "partial write idx: " << buf.idx() << endl; // ASSERT_EQ(buf.str(), test_long.substr(0, 7)); // ASSERT_EQ(buf.idx(), 0); for (unsigned i = 7; i < test_long.size(); i++) io.put(test_long[i]); io.flush(); cout << "full write buf size: " << buf.size() << endl; cout << "full write idx: " << buf.idx() << endl; // ASSERT_EQ(buf.str(), test_long); // ASSERT_EQ(buf.idx(), 0); string got; char ch; for (unsigned i = 0; i < 7 && io.get(ch); i++) got.push_back(ch); cout << "partial read got: " << got << endl; cout << "partial read buf size: " << buf.size() << endl; cout << "partial read idx: " << buf.idx() << endl; io.sync(); // sync the read buffer for (unsigned i = 0; i < 2 && io.get(ch); i++) got.push_back(ch); cout << "sync & read 2 more got: " << got << endl; cout << "sync & read 2 more buf size: " << buf.size() << endl; cout << "sync & read 2 more idx: " << buf.idx() << endl; while (io.get(ch)) got.push_back(ch); cout << "full read got: " << got << endl; cout << "full read buf size: " << buf.size() << endl; cout << "full read idx: " << buf.idx() << endl; }
25.365031
126
0.649837
stablecc
cc55f374e84a9a62381d34ad987b19ff57fc8d09
3,135
cpp
C++
encode/encode.avx512.cpp
WojciechMula/base64simd
6bde46e13d42f962620c0c496f0e5b288043ff5d
[ "BSD-2-Clause" ]
133
2016-09-15T18:38:00.000Z
2022-02-01T14:09:10.000Z
encode/encode.avx512.cpp
pkpioneer/base64simd
6bde46e13d42f962620c0c496f0e5b288043ff5d
[ "BSD-2-Clause" ]
8
2016-11-26T07:21:50.000Z
2021-07-12T14:49:22.000Z
encode/encode.avx512.cpp
pkpioneer/base64simd
6bde46e13d42f962620c0c496f0e5b288043ff5d
[ "BSD-2-Clause" ]
12
2016-11-25T20:31:06.000Z
2021-03-22T12:01:48.000Z
namespace base64 { namespace avx512 { template <typename LOOKUP_FN, typename UNPACK_FN> void encode_load_gather(LOOKUP_FN lookup, UNPACK_FN unpack, const uint8_t* input, size_t bytes, uint8_t* output) { uint8_t* out = output; const __m512i input_offsets = _mm512_setr_epi32( 0*3, 1*3, 2*3, 3*3, 4*3, 5*3, 6*3, 7*3, 8*3, 9*3, 10*3, 11*3, 12*3, 13*3, 14*3, 15*3 ); for (size_t i = 0; i < bytes; i += 4 * 12) { // load bytes const __m512i in = _mm512_i32gather_epi32(input_offsets, (const int*)(input + i), 1); const __m512i indices = unpack(in); // do lookup const __m512i result = lookup(indices); _mm512_storeu_si512(reinterpret_cast<__m512i*>(out), result); out += 64; } } template <typename LOOKUP_FN, typename UNPACK_FN> void encode(LOOKUP_FN lookup, UNPACK_FN unpack, const uint8_t* input, size_t bytes, uint8_t* output) { uint8_t* out = output; const uint8_t BIT_MERGE = 0xac; for (size_t i = 0; i < bytes; i += 4 * 12) { // load input 4 x 12 bytes, layout of 12-byte subarray: // tmp1 = [D2 D1 D0 C2|C1 C0 B2 B1|B0 A2 A1 A0] x 4, plus unused 16 bytes // dword 2 dword 1 dword 0 const __m512i tmp1 = _mm512_loadu_si512(input + i); // place each 12-byte subarray in seprate 128-bit lane // Note that dword 1 is duplicated // tmp2 = [D2 D1 D0 C2|C1 C0 B2 B1|C1 C0 B2 B1|B0 A2 A1 A0] x 4 const __m512i tmp2 = _mm512_permutexvar_epi32( _mm512_set_epi32(11, 10, 10, 9, 8, 7, 7, 6, 5, 4, 4, 3, 2, 1, 1, 0), tmp1 ); // tmp3 = [.. .. D2 D1|D0 C2 C1 C0|C1 C0 B2 B1|B0 A2 A1 A0] x 4 // 24-byte bundles C and A are now on desired positions const __m512i tmp3 = _mm512_mask_srli_epi64(tmp2, 0xaa, tmp2, 16); // tmp4 = [.. D2 D1 D0|C2 C1 C0 ..|C0 B2 B1 B0|A2 A1 A0 ..] x 4 // 24-byte bundles D and B are now on desired positions const __m512i tmp4 = _mm512_slli_epi64(tmp3, 8); // tmp5 = [.. D2 D1 D0|.. C2 C1 C0|C0 B2 B1 B0|.. A2 A1 A0] x 4 // all 24-byte bundles merged // Note: the 3rd byte of each dword will be ommited by a lookup procedure, // thus no masking is needed const __m512i tmp5 = _mm512_ternarylogic_epi64(_mm512_set1_epi64(0x00ffffff), tmp4, tmp3, BIT_MERGE); const __m512i indices = unpack(tmp5); // do lookup const __m512i result = lookup(indices); _mm512_storeu_si512(reinterpret_cast<__m512i*>(out), result); out += 64; } } } // namespace avx512 } // namespace base64
38.703704
122
0.511005
WojciechMula
cc5684e092292d8ad5f042a20f9f0c835fd1938b
863
cpp
C++
Baekjoon/2098.cpp
Twinparadox/AlgorithmProblem
0190d17555306600cfd439ad5d02a77e663c9a4e
[ "MIT" ]
null
null
null
Baekjoon/2098.cpp
Twinparadox/AlgorithmProblem
0190d17555306600cfd439ad5d02a77e663c9a4e
[ "MIT" ]
null
null
null
Baekjoon/2098.cpp
Twinparadox/AlgorithmProblem
0190d17555306600cfd439ad5d02a77e663c9a4e
[ "MIT" ]
null
null
null
#include <algorithm> #include <iostream> #include <vector> using namespace std; const int INF = 1e9; int N; vector<vector<int> > W; vector<vector<int> > dp; int TSP(int cur, int visited) { int ret = dp[cur][visited]; if (ret != 0) return ret; if (visited == (1 << N) - 1) { if (W[cur][0] != 0) return W[cur][0]; return INF; } ret = INF; for (int i = 0; i < N; i++) { if (visited & (1 << i) || W[cur][i] == 0) continue; int sub = TSP(i, visited | (1 << i)) + W[cur][i]; ret = ret < sub ? ret : sub; } dp[cur][visited] = ret; return ret; } int main(void) { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); cin >> N; W = vector<vector<int> >(N, vector<int>(N)); dp = vector<vector<int> >(N, vector<int>(1 << N, 0)); for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) cin >> W[i][j]; cout << TSP(0, 1); }
17.612245
54
0.537659
Twinparadox
cc58c8ded1a47b95895c1fbd2e86d3a79e75e503
3,343
hpp
C++
tests/unit_tests/neutral/precompiled_headers.hpp
dbremner/cxxreflect
bbf1649b00755f8463e4a73b28dec4cd5b609493
[ "BSL-1.0" ]
5
2019-03-21T14:52:16.000Z
2021-02-20T13:14:25.000Z
tests/unit_tests/neutral/precompiled_headers.hpp
dbremner/cxxreflect
bbf1649b00755f8463e4a73b28dec4cd5b609493
[ "BSL-1.0" ]
null
null
null
tests/unit_tests/neutral/precompiled_headers.hpp
dbremner/cxxreflect
bbf1649b00755f8463e4a73b28dec4cd5b609493
[ "BSL-1.0" ]
2
2017-02-17T23:24:23.000Z
2021-07-06T18:10:35.000Z
// Copyright James P. McNellis 2011 - 2013. // // Distributed under the Boost Software License, Version 1.0. // // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef CXXREFLECTTEST_UNITTESTS_NEUTRAL_PRECOMPILED_HEADERS_HPP_ #define CXXREFLECTTEST_UNITTESTS_NEUTRAL_PRECOMPILED_HEADERS_HPP_ #include "cxxreflect/cxxreflect.hpp" #include "tests/unit_tests/infrastructure/test_driver.hpp" #include <CppUnitTest.h> namespace cxr { using namespace cxxreflect; using namespace cxxreflect::core; using namespace cxxreflect::metadata; using namespace cxxreflect::reflection; } namespace cxxreflect_test { inline auto create_beta_test_loader(context const& c) -> cxr::loader_root { cxr::search_path_module_locator::search_path_sequence paths; paths.push_back(c.get_property(known_property::test_assemblies_path())); paths.push_back(c.get_property(known_property::framework_path())); cxr::search_path_module_locator const locator(paths); cxr::loader_root root(cxr::create_loader_root(locator, cxr::default_loader_configuration())); root.get().load_assembly(cxr::module_location( c.get_property(known_property::primary_assembly_path()).c_str())); return root; } inline auto load_beta_assembly(context const& c, cxr::loader_root const& root) -> cxr::assembly { cxr::module_location const location( (c.get_property(known_property::test_assemblies_path()) + L"\\beta.dll").c_str()); cxr::assembly const a(root.get().load_assembly(location)); c.verify(a.is_initialized()); return a; } #define CXXREFLECTTEST_DEFINE_BETA_TEST(name) \ auto CXXREFLECTTEST_CONCATENATE(name, _)(context const& c, cxr::loader root, cxr::assembly beta) -> void; \ auto name(context const& c) -> void \ { \ cxr::loader_root const root(create_beta_test_loader(c)); \ \ cxr::assembly const beta(load_beta_assembly(c, root)); \ c.verify(beta.is_initialized()); \ CXXREFLECTTEST_CONCATENATE(name, _)(c, root.get(), beta); \ } \ CXXREFLECTTEST_REGISTER(name); \ auto CXXREFLECTTEST_CONCATENATE(name, _)(context const& c, cxr::loader const root, cxr::assembly const beta) -> void } #endif
50.651515
124
0.49297
dbremner
7fde3da7497c8b023c3281fcd01f899d9fdfd495
323
hpp
C++
library/ATF/CPageSetupDialog.hpp
lemkova/Yorozuya
f445d800078d9aba5de28f122cedfa03f26a38e4
[ "MIT" ]
29
2017-07-01T23:08:31.000Z
2022-02-19T10:22:45.000Z
library/ATF/CPageSetupDialog.hpp
kotopes/Yorozuya
605c97d3a627a8f6545cc09f2a1b0a8afdedd33a
[ "MIT" ]
90
2017-10-18T21:24:51.000Z
2019-06-06T02:30:33.000Z
library/ATF/CPageSetupDialog.hpp
kotopes/Yorozuya
605c97d3a627a8f6545cc09f2a1b0a8afdedd33a
[ "MIT" ]
44
2017-12-19T08:02:59.000Z
2022-02-24T23:15:01.000Z
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> #include <CCommonDialog.hpp> #include <tagPSDA.hpp> START_ATF_NAMESPACE struct CPageSetupDialog : CCommonDialog { tagPSDA m_psd; }; END_ATF_NAMESPACE
21.533333
108
0.736842
lemkova
7fe2db7f70c1efb40eb82b01c4ee839fdb9f6500
3,280
cpp
C++
src/VerifyModel.cpp
squarefk/spheretree-fixed
79ec91538030a271f7aba16e22dc20c9ebb63444
[ "Unlicense" ]
17
2016-08-12T13:15:41.000Z
2021-11-11T10:03:48.000Z
src/VerifyModel.cpp
squarefk/spheretree-fixed
79ec91538030a271f7aba16e22dc20c9ebb63444
[ "Unlicense" ]
null
null
null
src/VerifyModel.cpp
squarefk/spheretree-fixed
79ec91538030a271f7aba16e22dc20c9ebb63444
[ "Unlicense" ]
9
2016-04-26T16:15:45.000Z
2020-10-29T00:12:12.000Z
/*************************************************************************\ C O P Y R I G H T Copyright 2003 Image Synthesis Group, Trinity College Dublin, Ireland. All Rights Reserved. Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and the following paragraphs appear in all copies. D I S C L A I M E R IN NO EVENT SHALL TRININTY COLLEGE DUBLIN BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING, BUT NOT LIMITED TO, LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF TRINITY COLLEGE DUBLIN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. TRINITY COLLEGE DUBLIN DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREIN IS ON AN "AS IS" BASIS, AND TRINITY COLLEGE DUBLIN HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. The authors may be contacted at the following e-mail addresses: Gareth_Bradshaw@yahoo.co.uk isg@cs.tcd.ie Further information about the ISG and it's project can be found at the ISG web site : isg.cs.tcd.ie \**************************************************************************/ #include "VerifyModel.h" /* model verification routine */ bool verifyModel(const Surface &sur, const MedialTester *mt){ // test model properties int badVerts, badNeighs, openEdges, multEdges, badFaces; sur.testSurface(&badVerts, &badNeighs, &openEdges, &multEdges, &badFaces); // check if surface is ok bool ok = badVerts == 0 && badNeighs == 0 && openEdges == 0 && multEdges == 0 && badFaces == 0; // test in/out routine int numPts = 1000, numProbs = 0; if (ok && mt){ printf("Testing In/Out...\n"); float lX = sur.pMax.x - sur.pMin.x; float lY = sur.pMax.y - sur.pMin.y; float lZ = sur.pMax.z - sur.pMin.z; for (int i = 0; i < numPts; i++){ float r1 = 1.2*rand()/(float)RAND_MAX - 0.1; float r2 = 1.2*rand()/(float)RAND_MAX - 0.1; float r3 = 1.2*rand()/(float)RAND_MAX - 0.1; Point3D pTest; pTest.x = sur.pMin.x + r1 * lX; pTest.y = sur.pMin.y + r2 * lY; pTest.z = sur.pMin.z + r3 * lZ; //bool inClose = insideSurfaceClosest(pTest, sur, mt.getFaceHash()); bool inCross = insideSurfaceCrossingIter(pTest, sur, mt->getFaceHash()); bool inGem = insideSurfaceGem(pTest, sur); if (/*inClose != inCross ||*/ inGem != inCross) numProbs++; } } // write out results printf("Verification Results : \n"); printf("\tBad Vertices\t:\t%d\n", badVerts); printf("\tBad Neigh\t:\t%d\n", badNeighs); printf("\tOpen Edges\t:\t%d\n", openEdges); printf("\tMulti Edges\t:\t%d\n", multEdges); printf("\tBad Faces\t:\t%d\n", badFaces); if (ok && mt) printf("\tBad in/out\t:\t%f%%\n", 100.0*numProbs/(float)numPts); printf("\n"); return ok; }
35.652174
97
0.623476
squarefk
7fe32f55f8b033fbae671487495b6bf009a3d4c1
360
hpp
C++
mlprodict/onnxrt/ops_cpu/op_common_num_.hpp
sdpython/mlprodic
9367dacc91d35ec670c8a8a76708300a75bbc993
[ "MIT" ]
32
2018-03-04T23:33:30.000Z
2022-03-10T19:15:06.000Z
mlprodict/onnxrt/ops_cpu/op_common_num_.hpp
sdpython/mlprodic
9367dacc91d35ec670c8a8a76708300a75bbc993
[ "MIT" ]
184
2017-11-30T14:10:35.000Z
2022-02-21T08:29:31.000Z
mlprodict/onnxrt/ops_cpu/op_common_num_.hpp
sdpython/mlprodic
9367dacc91d35ec670c8a8a76708300a75bbc993
[ "MIT" ]
9
2019-07-24T13:18:00.000Z
2022-03-07T04:08:07.000Z
#pragma once #include <cmath> #include <vector> #include <stdio.h> float vector_dot_product_pointer16_sse(const float *p1, const float *p2, size_t size); double vector_dot_product_pointer16_sse(const double *p1, const double *p2, size_t size); template <typename NTYPE> NTYPE vector_dot_product_pointer_sse(const NTYPE *p1, const NTYPE *p2, size_t size);
25.714286
89
0.786111
sdpython
7fe573db8c51212b03c5026a081fb67862125d1a
4,701
cpp
C++
examples/triangleTesselation.cpp
maldicion069/monkeybrush-
2bccca097402ff1f5344e356f06de19c8c70065b
[ "MIT" ]
1
2016-11-15T09:04:12.000Z
2016-11-15T09:04:12.000Z
examples/triangleTesselation.cpp
maldicion069/monkeybrush-
2bccca097402ff1f5344e356f06de19c8c70065b
[ "MIT" ]
null
null
null
examples/triangleTesselation.cpp
maldicion069/monkeybrush-
2bccca097402ff1f5344e356f06de19c8c70065b
[ "MIT" ]
null
null
null
/* * Copyright (c) 2016 maldicion069 * * Authors: Cristian Rodríguez Bernal <ccrisrober@gmail.com> * * This file is part of MonkeyBrushPlusPlus * <https://github.com/maldicion069/monkeybrushplusplus> * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License version 3.0 as published * by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License * along with this library; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * */ #include <iostream> #include <mb/mb.h> mb::ScenePtr scene; void renderFunc( float dt ); class ChangeTessLevelComponent : public mb::Component { public: ChangeTessLevelComponent( const float& tessLevel ) : mb::Component( ) , _tessLevel( tessLevel ) { } virtual void fixedUpdate( const float& ) override { if ( mb::Input::isKeyPressed( mb::Keyboard::Key::Plus ) ) { _tessLevel += 0.1f; getNode( )->getMesh( )->getMaterial( )->uniform( "tess_level" )->value( _tessLevel ); } else if ( mb::Input::isKeyPressed( mb::Keyboard::Key::Minus ) ) { _tessLevel -= 0.1f; getNode( )->getMesh( )->getMaterial( )->uniform( "tess_level" )->value( _tessLevel ); } } protected: float _tessLevel; }; int main(void) { mb::GLContext context( 4, 4, 1024, 768, "Triangle tesselation" ); auto engine = std::make_shared<mb::Engine>( &context, false ); scene = std::make_shared<mb::Scene>( engine, new mb::SimpleCamera( mb::Vect3( 0.2f, 0.18f, 8.44f ) ) ); mb::DrawablePtr model = std::make_shared<mb::Tetrahedron>( 1.0f ); std::vector<std::pair<mb::ShaderType, const char*> > shaders = { { mb::VertexShader, R"( #version 440 layout(location = 0) in vec3 position; uniform mat4 projection; uniform mat4 view; uniform mat4 model; void main( void ) { gl_Position = projection * view * model * vec4(position, 1.0f); } )" }, { mb::TesselationControlShader, R"( #version 440 layout (vertices = 3) out; uniform float tess_level; #define ID gl_InvocationID void main(void) { if (ID == 0) { gl_TessLevelInner[0] = tess_level; gl_TessLevelOuter[0] = tess_level; gl_TessLevelOuter[1] = tess_level; gl_TessLevelOuter[2] = tess_level; } gl_out[ID].gl_Position = gl_in[ID].gl_Position; } )" }, { mb::TesselationEvaluationShader, R"( #version 440 layout (triangles) in; void main(void) { gl_Position = (gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position); } )" }, { mb::FragmentShader, R"( #version 440 out vec4 fragColor; uniform vec3 color; void main( void ) { fragColor = vec4(color, 1.0); } )" } }; float tess_level = 2.0f; std::vector<std::pair<const char*, mb::Uniform*> > uniforms = { std::make_pair( "projection", new mb::Uniform( mb::Matrix4 ) ), std::make_pair( "view", new mb::Uniform( mb::Matrix4 ) ), std::make_pair( "model", new mb::Uniform( mb::Matrix4 ) ), std::make_pair( "color", new mb::Uniform( mb::Vector3, mb::Vect3( mb::Color3::Pink ) ) ), std::make_pair( "tess_level", new mb::Uniform( mb::Float, tess_level ) ) }; mb::ShaderMaterialPtr material = std::make_shared<mb::ShaderMaterial>( "triangleTesselation", shaders, uniforms ); material->Cull = false; material->PolygonMode = GL_LINE; mb::NodePtr mbNode = std::make_shared<mb::Node>( std::string( "model" ) ); // Same as MeshRenderer(model, &material, GL_PATCHES) mbNode->addComponent( std::make_shared<mb::MeshRendererTesselation>( model, material ) ); mbNode->addComponent( std::make_shared<mb::ChangeTransformationComponent>( ) ); mbNode->addComponent( std::make_shared<mb::MoveComponent>( ) ); mbNode->addComponent( std::make_shared<ChangeTessLevelComponent>( tess_level ) ); scene->root( )->addChild( mbNode ); engine->run( renderFunc ); return 0; } void renderFunc( float dt ) { glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); scene->render( dt ); }
29.753165
91
0.633057
maldicion069
7fe5b6df0ea263422344d078e4029abaf769af29
1,557
cpp
C++
Data Structures/fixed_parities.cpp
abdzitter/Daily-Coding-DS-ALGO-Practice
26ddbf7a3673608039a07d26d812fce31b69871a
[ "MIT" ]
289
2021-05-15T22:56:03.000Z
2022-03-28T23:13:25.000Z
Data Structures/fixed_parities.cpp
abdzitter/Daily-Coding-DS-ALGO-Practice
26ddbf7a3673608039a07d26d812fce31b69871a
[ "MIT" ]
1,812
2021-05-09T13:49:58.000Z
2022-01-15T19:27:17.000Z
Data Structures/fixed_parities.cpp
abdzitter/Daily-Coding-DS-ALGO-Practice
26ddbf7a3673608039a07d26d812fce31b69871a
[ "MIT" ]
663
2021-05-09T16:57:58.000Z
2022-03-27T14:15:07.000Z
#include<bits/stdc++.h> using namespace std; // Fixed Parities // Link to the problem: https://www.hackerearth.com/practice/data-structures/arrays/1-d/practice-problems/algorithm/fixed-parity-440254c0/ // Alice and Bob are playing a board game. They have n×n boards and two arrays a and b of length n. The value of each cell in the ith row and jth row is a[i]+b[j]. Alice asks q questions to Bob. In each question, Alice provides two cells A and B. She asks the following questions to Bob: // Are there any paths from A to B that contains the same parity as A and B. // Note: Bob can move from one cell to 8 neighbor cells in each step. // Sample Input // 3 // 0 3 1 // 1 5 3 // 2 // 2 1 // 3 3 // 3 1 // 1 3 // Sample Output // YES // NO // Explanation // In the first query, we can move from (2,1) to (2,2) then to (3,3). // In the second query, the parity of two cells is different and therefore there isn't such a way. int main() { int n; cin>>n; int a[n],b[n]; for(int i=1;i<=n;i++) { cin>>a[i]; } for(int i=1;i<=n;i++) { cin>>b[i]; } int q; //testcases cin>>q; while(q--) { int r1,c1; int r2,c2; cin>>r1>>c1; cin>>r2>>c2; int num1=a[r1]+b[c1]; int num2=a[r2]+b[c2]; if((num1%2==0 && num2%2==0) || (num1%2!=0 && num2%2!=0)) { cout<<"YES"<<endl; } else { cout<<"NO"<<endl; } } return 0; } // In this code if we check if the no. in a row and column is similar to the no, in other row and column so we print yes, otherwise no. // Similarity if both the no. are even or odd
21.328767
287
0.624277
abdzitter
7fe5c7d528dd139c01f6168246f8953b5a03993f
1,164
cpp
C++
Data Structures/Graph/directed-weighted-graph-using-matrix.cpp
luchev/uni-data-structures-and-algorithms-assistant-2019
3dcb1efc6f65b4736d3761c0bad858cb236bc213
[ "MIT" ]
3
2019-10-24T08:38:34.000Z
2019-12-03T10:46:10.000Z
Data Structures/Graph/directed-weighted-graph-using-matrix.cpp
luchev/uni-data-structures-and-algorithms-2019
3dcb1efc6f65b4736d3761c0bad858cb236bc213
[ "MIT" ]
null
null
null
Data Structures/Graph/directed-weighted-graph-using-matrix.cpp
luchev/uni-data-structures-and-algorithms-2019
3dcb1efc6f65b4736d3761c0bad858cb236bc213
[ "MIT" ]
2
2019-10-22T11:51:18.000Z
2019-11-03T21:51:33.000Z
#include <iostream> #include <vector> using namespace std; class Graph { private: vector<vector<int>> adjacencyMatrix; public: Graph(int nodeCount) { adjacencyMatrix.resize(nodeCount); for (int row = 0; row < adjacencyMatrix.size(); row++) { adjacencyMatrix[row].resize(nodeCount); for (int col = 0; col < adjacencyMatrix.size(); col++) { adjacencyMatrix[row][col] = 0; // 0 means there is no connection } } } void print() const { for (auto neighbours : adjacencyMatrix) { for (auto neighbour : neighbours) { cout << neighbour << " "; } cout << "\n"; } } void connect(int from, int to, int weight = 1) { // The outer vector contains the node where we start // The inner vector contains the weight to each neighbour adjacencyMatrix[from][to] = weight; // If the graph wasn't directed we would need to uncomment the row below // adjacencyMatrix[to][from] = weight; } }; int main() { Graph g(4); // By not specifying weight of each edge the graph becomes unweighted g.connect(0, 1); g.connect(1, 0); g.connect(1, 2); g.connect(1, 3); g.connect(2, 1); g.connect(3, 1); g.connect(3, 2); g.print(); }
22.823529
74
0.65378
luchev