blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 264 | content_id stringlengths 40 40 | detected_licenses listlengths 0 85 | license_type stringclasses 2
values | repo_name stringlengths 5 140 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 986
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 3.89k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 145
values | src_encoding stringclasses 34
values | language stringclasses 1
value | is_vendor bool 1
class | is_generated bool 2
classes | length_bytes int64 3 10.4M | extension stringclasses 122
values | content stringlengths 3 10.4M | authors listlengths 1 1 | author_id stringlengths 0 158 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30ef68d4be7387083d1dc1f141379145db42a532 | 6ccaee717224338ba1889619a4c73454785588b5 | /GFG Random Problems/Foldable Binary Tree.cpp | b92f4be8e596f04e9c8c411752634037d62b3b44 | [] | no_license | nikhil-seth/cp-log | 7dc69b15d79603637976018f8269d8ed11adb08a | faf123aa41096b19303ecaff00fbc2974491c32f | refs/heads/master | 2021-06-22T02:57:05.031734 | 2021-01-04T14:26:11 | 2021-01-04T14:26:11 | 143,634,576 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 435 | cpp | // https://practice.geeksforgeeks.org/problems/foldable-binary-tree/1
// Foldable Binary Tree
bool fn(node *r1,node *r2){
if(!r1 && !r2)
return 1;
if(!r1 || !r2)
return 0;
if(r1->left && !r2->right)
return 0;
if(r1->right && !r2->left)
return 0;
return fn(r1->left,r2->right) && fn(r1->right,r2->left);
}
bool isFoldable(struct node *root)
{
return fn(root->left,root->right);
} | [
"rootedguy24@gmail.com"
] | rootedguy24@gmail.com |
e1492299cbaed00e13325d3c3b2ac4fddcc33c5d | 0d37a489416e75ff013ebec2fbc2fdad80a521ac | /lib-rdm/src/rdmdevicecontroller.cpp | 8c2cb9b47dfab58b147b0b81bf42a3a33d451b5c | [] | no_license | JohnSHoover/rpidmx512 | fc26f7ee9ead5c1a9cb4dbbac5b4963744d3353d | ed1416b693d28030ba9ae45a25adf0f280bfc70b | refs/heads/master | 2022-04-10T17:31:36.334680 | 2020-04-10T16:48:45 | 2020-04-10T16:48:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,978 | cpp | /**
* @file rdmdevicecontroller.cpp
*
*/
/* Copyright (C) 2017-2019 by Arjan van Vught mailto:info@orangepi-dmx.nl
*
* 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 <stdint.h>
#include <string.h>
#include "rdmdevicecontroller.h"
#include "rdmdevice.h"
#include "debug.h"
#ifndef ALIGNED
#define ALIGNED __attribute__ ((aligned (4)))
#endif
#if defined (H3)
static const char DEVICE_LABEL[] ALIGNED = "Orange Pi RDM Controller";
#else
static const char DEVICE_LABEL[] ALIGNED = "Raspberry Pi RDM Controller";
#endif
RDMDeviceController::RDMDeviceController(void) {
DEBUG_ENTRY
struct TRDMDeviceInfoData info;
info.data = (uint8_t *) DEVICE_LABEL;
info.length = sizeof(DEVICE_LABEL) - 1;
SetLabel(&info);
DEBUG_EXIT
}
RDMDeviceController::~RDMDeviceController(void) {
}
void RDMDeviceController::Init(void) {
DEBUG_ENTRY
RDMDevice::Init();
DEBUG_EXIT
}
void RDMDeviceController::Print(void) {
RDMDevice::Print();
}
| [
"Arjan.van.Vught@gmail.com"
] | Arjan.van.Vught@gmail.com |
9c5a3c5de2737603ad4f1535e4d201a8046e2c9e | 0b77403b8605b49fe26d3888c60b70f509b91bb7 | /cad/elar_operator.cpp | 9dab29a664fcd7b1d8da8a1c3f7d0cc61d1ea161 | [] | no_license | wb-finalking/sweeping_based_on_Brep | 747376cbeb6a931b705f3968d2ecf9648aa012d4 | c12e85b277ba05f643ef7f780a5f91d3ebd9779e | refs/heads/master | 2021-08-24T10:58:04.139730 | 2017-12-09T11:12:19 | 2017-12-09T11:12:19 | 110,979,739 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,156 | cpp | #include "elar_operator.h"
#include <cstdio>
Solid *ElarOperator::mvfs(double point[3], Vertex *&vertex)
{
Solid *solid = new Solid();
Face *face = new Face();
Loop *out_lp = new Loop();
vertex = new Vertex(point[0], point[1], point[2]);
vertex->id = solid->vnum;
out_lp->id = solid->lnum;
face->id = solid->fnum;
solid->vnum += 1;
solid->fnum += 1;
solid->lnum += 1;
solid->faces = face;
face->solid = solid;
face->out_lp = out_lp;
out_lp->face = face;
return solid;
}
HalfEdge *ElarOperator::mev(Vertex *sv, double point[3], Loop *loop)
{
Solid *solid = loop->face->solid;
Edge *edge = new Edge();
HalfEdge *half_l = new HalfEdge();
HalfEdge *half_r = new HalfEdge();
Vertex *ev = new Vertex(point[0], point[1], point[2]);
ev->id = solid->vnum;
solid->vnum += 1;
half_l->sv = sv;
half_l->ev = ev;
half_r->sv = ev;
half_r->ev = sv;
edge->half_l = half_l;
edge->half_r = half_r;
half_l->edge = edge;
half_r->edge = edge;
half_r->brother = half_l;
half_l->brother = half_r;
half_l->lp = loop;
half_r->lp = loop;
//add the new two halfedges into the loop
if (loop->halfedges == NULL)
{
half_l->next = half_r;
half_r->next = half_l;
half_l->pre = half_r;
half_r->pre = half_l;
loop->halfedges = half_l;
}
else
{
HalfEdge *thalf = loop->halfedges;
while (thalf->ev != sv)thalf = thalf->next;
half_r->next = thalf->next;
thalf->next->pre = half_r;
thalf->next = half_l;
half_l->pre = thalf;
half_l->next = half_r;
half_r->pre = half_l;
}
//add the edge into the edge list of solid
addEdgeIntoSolid(edge, solid);
return half_l;
}
Loop *ElarOperator::mef(Vertex *sv, Vertex *ev, Loop *loop, bool mark)
{
Solid *solid = loop->face->solid;
Edge *edge = new Edge();
HalfEdge *half_l = new HalfEdge();
HalfEdge *half_r = new HalfEdge();
Loop *newLoop = new Loop();
half_l->sv = sv;
half_l->ev = ev;
half_r->sv = ev;
half_r->ev = sv;
half_r->brother = half_l;
half_l->brother = half_r;
half_l->edge = edge;
half_r->edge = edge;
edge->half_l = half_l;
edge->half_r = half_r;
//add the new two halfedge into the loop
HalfEdge *thalf = loop->halfedges;
HalfEdge *tmpa, *tmpb, *tmpc;
while (thalf->ev != sv)thalf = thalf->next;
tmpa = thalf;
while (thalf->ev != ev)thalf = thalf->next;
tmpb = thalf;
thalf = thalf->next;
while (thalf->ev != ev)thalf = thalf->next;
tmpc = thalf;
//divide the big loop into two small loop
half_r->next = tmpa->next;
tmpa->next->pre = half_r;
tmpa->next = half_l;
half_l->pre = tmpa;
half_l->next = tmpb->next;
tmpb->next->pre = half_l;
tmpb->next = half_r;
half_r->pre = tmpb;
loop->halfedges = half_l;
newLoop->halfedges = half_r;
half_l->lp = loop;
half_r->lp = newLoop;
Face *face = new Face();
newLoop->id = solid->lnum;
solid->lnum += 1;
addFaceIntoSolid(face, solid);
addLoopIntoFace(newLoop, face);
addEdgeIntoSolid(edge, solid);
return loop;
}
Loop *ElarOperator::kemr(Vertex *sv, Vertex *ev, Loop *loop)
{
HalfEdge *tmpa, *tmpb, *hal;
Face *face = loop->face;
Loop *inlp = new Loop();
Solid *solid = loop->face->solid;
hal = loop->halfedges;
while (hal->sv != sv || hal->ev != ev)hal = hal->next;
tmpa = hal;
while (hal->sv != ev || hal->ev != sv)hal = hal->next;
tmpb = hal;
tmpb->pre->next = tmpa->next;
tmpa->pre->next = tmpb->next;
loop->face->solid->faces->out_lp->halfedges = tmpa->pre;
inlp->halfedges = tmpb->pre;
tmpb->pre->lp = inlp;
inlp->id = solid->lnum;
solid->lnum += 1;
addLoopIntoFace(inlp, face);
delete tmpa;
delete tmpb;
return NULL;
}
void ElarOperator::kfmrh(Face *fa, Face *fb)
{
Loop *loop = fb->out_lp;
addLoopIntoFace(loop, fa);
fa->solid->lnum -= 1;
fa->solid->fnum -= 1;
Solid *solid = fa->solid;
Face *face = solid->faces;
if (face == fb)
{
solid->faces = face->next;
}
else
{
Face *tf = face;
while (face != fb && face != NULL)
{
tf = face;
face = face->next;
}
tf->next = face->next;
}
//delete fb;
}
void ElarOperator::sweep(Solid* solid,double dir[3], double d)
{
Vertex *startv, *nextv, *upv, *upprev;
HalfEdge *he, *suphe, *uphe;
double point[3];
int num = 0;
Face* f = solid->faces->next;
while (f != NULL)
{
num++;
f = f->next;
}
f = solid->faces->next;
for (int i = 0; i < num;i++)
{
Loop *loop = f->out_lp;
f = f->next;
he = loop->halfedges;
startv = he->sv;
point[0] = startv->coordinate[0] + d*dir[0];
point[1] = startv->coordinate[1] + d*dir[1];
point[2] = startv->coordinate[2] + d*dir[2];
suphe = mev(startv, point, loop);
upprev = suphe->ev;
he = he->next;
nextv = he->sv;
Loop *lp = loop;
while (nextv != startv)
{
point[0] = nextv->coordinate[0] + d*dir[0];
point[1] = nextv->coordinate[1] + d*dir[1];
point[2] = nextv->coordinate[2] + d*dir[2];
uphe = mev(nextv, point, lp);
upv = uphe->ev;
lp = mef(upprev, upv, loop, false);
upprev = upv;
he = he->next;
nextv = he->sv;
}
mef(upprev, suphe->ev, loop, false);
}
f = solid->faces->next;
Face* tmpf=f;
for (int i = 1; i < num; i++)
{
f = f->next;
kfmrh(tmpf,f);
//addLoopIntoFace(f->out_lp, tmpf);
//tmpf->next = f->next;
}
}
inline void ElarOperator::addEdgeIntoSolid(Edge *edge, Solid *&solid)
{
Edge *te = solid->edges;
if (te == NULL)solid->edges = edge;
else{
while (te->next != NULL)te = te->next;
te->next = edge;
edge->pre = te;
}
}
inline void ElarOperator::addFaceIntoSolid(Face *face, Solid *&solid)
{
Face *tface = solid->faces;
if (tface == NULL)
{
solid->faces = face;
}
else
{
while (tface->next != NULL)tface = tface->next;
tface->next = face;
face->pre = tface;
}
face->solid = solid;
face->id = solid->fnum;
solid->fnum += 1;// increase the num of faces
}
inline void ElarOperator::addLoopIntoFace(Loop *loop, Face *face)
{
loop->face = face;
//there is only one out loop but there may have lots of inner loop
if (face->out_lp == NULL)
{
face->out_lp = loop;
}
else
{
Loop *tlp = face->inner_lp;
if (tlp == NULL)face->inner_lp = loop;
else
{
while (tlp->next != NULL)tlp = tlp->next;
tlp->next = loop;
loop->pre = tlp;
}
face->innum += 1;
}
}
| [
"wbyx7071009@163.com"
] | wbyx7071009@163.com |
6f73a85619583c8550dfe7251e4d14d0a55be431 | 786de89be635eb21295070a6a3452f3a7fe6712c | /psddl_psana/tags/V00-03-00/src/princeton.ddl.cpp | e319a983a16e8a0f276e58caaf9c08c154e700fd | [] | no_license | connectthefuture/psdmrepo | 85267cfe8d54564f99e17035efe931077c8f7a37 | f32870a987a7493e7bf0f0a5c1712a5a030ef199 | refs/heads/master | 2021-01-13T03:26:35.494026 | 2015-09-03T22:22:11 | 2015-09-03T22:22:11 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 280 | cpp |
// *** Do not edit this file, it is auto-generated ***
#include <cstddef>
#include "psddl_psana/princeton.ddl.h"
namespace Psana {
namespace Princeton {
ConfigV1::~ConfigV1() {}
ConfigV2::~ConfigV2() {}
FrameV1::~FrameV1() {}
} // namespace Princeton
} // namespace Psana
| [
"salnikov@SLAC.STANFORD.EDU@b967ad99-d558-0410-b138-e0f6c56caec7"
] | salnikov@SLAC.STANFORD.EDU@b967ad99-d558-0410-b138-e0f6c56caec7 |
98e543e31f0d4e2529876231c8d724aa9908425d | 70b3436f940e9a28e8119f16ba121ac8a6352145 | /codeforces/archive/003/a.cpp | 14825b62b260be224fdff75d094571a76110866d | [] | no_license | Erumaru/ACM | 59f85d4861e3055da3a612065a4051beafed8798 | 8a61e387a595bb50d34c7ffb78f597e6a413aefe | refs/heads/master | 2021-04-26T16:20:13.555674 | 2016-11-22T18:12:05 | 2016-11-22T18:12:05 | 70,470,175 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,900 | cpp | #pragma comment(linker, "/STACK:64000000")
#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <sstream>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#define ft first
#define st second
#define mp make_pair
#define pb push_back
#define sz(n) int(n.size())
#define all(n) n.begin(), n.end()
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int N = 1e5 + 123;
const int inf = 1e9 + 7;
const ll INF = 1e18 + 7;
vector <int> zf(string s)
{
int n = sz(s);
vector <int> z (n);
for (int i = 1, j = 0; i < n; i ++)
{
if (i < j + z[j]) z[i] = min(z[i - j], z[j] + j - i);
while (i + z[i] < n && s[z[i]] == s[z[i] + i]) z[i] ++;
if (i + z[i] > j + z[j]) j = i;
}
return z;
}
string s;
vector <int> z;
int t[4000100];
void build (int v, int tl, int tr)
{
if (tl == tr) t[v] = z[tl];
else
{
int mid = (tl + tr) / 2;
build (2 * v, tl, mid);
build (2 * v + 1, mid + 1, tr);
t[v] = max(t[2 * v], t[2 * v + 1]);
}
}
int get(int v, int tl, int tr, int l, int r)
{
if (tl > r || tr < l) return 0;
if (tl >= l && tr <= r) return t[v];
int mid = (tl + tr) / 2;
return max(get(2 * v, tl, mid, l, r), get(2 * v + 1, mid + 1, tr, l, r));
}
int main ()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin >> s;
z = zf(s);
int n = sz(s);
build (1, 0, n - 1);
//for (int i = 0; i < n; i ++) cout << z[i] << " ";
//cout << "\n";
int ans = 0;
for (int i = 2; i < n; i ++)
{
if (z[i] == sz(s) - i)
{
int cur = get(1, 0, n - 1, 1, i - 1);
//cout << cur << " ";
if (cur != inf && cur >= z[i])
{
ans = max(ans, z[i]);
}
}
}
if (ans == 0) cout << "Just a legend\n";
else cout << s.substr(0, ans) << "\n";
}
| [
"toremuratuly.abzal@gmail.com"
] | toremuratuly.abzal@gmail.com |
6f23cfe4c5f012dfd215e8027eaa536b1727d920 | 969628b6cfc2f726fcbee28f19f47bcddb5cabfd | /走迷宫/tool.cpp | cfad40af869613eb6a563bc8a9e4b613a132a2b2 | [] | no_license | MallocGad/little-game | 94c04427ed7b179e0583c2c430d759052f05c8d7 | 4bb3a9be19a9f4f8b3095f10adb96ab94b4ad917 | refs/heads/master | 2021-01-15T12:59:21.642390 | 2017-08-09T12:55:04 | 2017-08-09T12:55:04 | 99,663,089 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,946 | cpp | /*******************************************
所需函数的实现
********************************************/
#include"tool.h"
Person::Person()
{
_edirection = UP;
_rPos = p_rPos = { 7,2 };
}
void Person::direction(char a[][11])
{
switch (_edirection)
{
case UP:
if (a[_rPos.x][_rPos.y + 1] == '1')
{
if (a[_rPos.x - 1][_rPos.y] == '1')
_edirection = LEFT;
}
else
_edirection = RIGHT;
break;
case LEFT:
if (a[_rPos.x - 1][_rPos.y] == '1') {
if (a[_rPos.x][_rPos.y - 1] == '1')
_edirection = DOWN;
}
else
_edirection = UP;
break;
case RIGHT:
if (a[_rPos.x + 1][_rPos.y] == '1')
{
if (a[_rPos.x][_rPos.y + 1] == '1')
_edirection = UP;
}
else
_edirection = DOWN;
break;
case DOWN:
if (a[_rPos.x][_rPos.y - 1] == '1')
{
if (a[_rPos.x + 1][_rPos.y] == '1')
_edirection = RIGHT;
}
else
_edirection = LEFT;
break;
default:cout << "erro" << endl; exit(0); break;
}
}
void Person::move(char a[][11])
{
p_rPos = _rPos;
step++;
switch (_edirection)
{
case UP:
_rPos.x--;
if (a[_rPos.x][_rPos.y] == '1')
_rPos.x++;
break;
case LEFT:_rPos.y--;
if (a[_rPos.x][_rPos.y] == '1')
_rPos.y++;
break;
case RIGHT:_rPos.y++;
if (a[_rPos.x][_rPos.y] == '1')
_rPos.y--;
break;
case DOWN:_rPos.x++;
if (a[_rPos.x][_rPos.y] == '1')
_rPos.x--;
break;
default:
cout << "erro!" << endl; exit(0);
break;
}
}
int Person::Juge()
{
if (_rPos.x == _exity && _rPos.y == _exitx)
{
return 1;
}
return 0;
}
Manp::Manp(char a[][11], int x, int y)
{
int i , j;
for (i = 0; i < x; i++)
{
for (j = 0; j < y; j++)
cout << a[i][j];
cout << endl;
}
}
void Manp::Drowp(struct Pos p, struct Pos p2,char e)
{
Gotoxy(p2.y, p2.x);
cout << '0';
Gotoxy(p.y, p.x);
cout << e;
}
void Manp::Gotoxy(int x, int y)
{
COORD Pos;
Pos.X = x;
Pos.Y = y;
HANDLE hout;
hout = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hout, Pos);
} | [
"1165318097@qq.com"
] | 1165318097@qq.com |
5bfbbf7e528dc68db230ac4df9b570b1f27d9a2d | b8194fee4ddf498b2c1bd302ec4ba9466746250d | /build/Android/Debug/app/src/main/include/Fuse.SystemFont.Weight.h | ab880743dd7b10d6cc58bcdb21b432d2cb5ed2dc | [] | no_license | color0e/Fabric_Fuse_Project | e49e7371c9579d80c9ec96c1f2d3a90de7b52149 | 9b20a0347e5249315cf7af587e04234ec611c6be | refs/heads/master | 2020-03-30T16:49:34.363764 | 2018-10-03T16:26:28 | 2018-10-03T16:26:28 | 151,428,896 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 337 | h | // This file was generated based on '../../AppData/Local/Fusetools/Packages/Fuse.Common/1.9.0/SystemFont.uno'.
// WARNING: Changes might be lost if you edit this file directly.
#pragma once
#include <Uno.Int.h>
namespace g{
namespace Fuse{
// public enum SystemFont.Weight :38
uEnumType* SystemFont__Weight_typeof();
}} // ::g::Fuse
| [
"limjangsoon@naver.com"
] | limjangsoon@naver.com |
3c7cdeb936f4fd2c44ff3ff0b2eba29529681160 | 24316e8888a959dec8a4af3e98e86e96a454f025 | /include/threadedcanvas.h | b3d46c17be727a28c686d14149f99050c2c57c30 | [
"Apache-2.0"
] | permissive | aerccu/LedDisplay | a1b33c271e3a89ae61f2e68ca9641b92d8786dd8 | 2152e8d56b51123cff1cfc657a887d51a05c3a70 | refs/heads/master | 2020-06-06T19:45:26.260394 | 2020-04-26T14:37:41 | 2020-04-26T14:37:41 | 192,838,056 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,692 | h | /*
* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: 4; -*-
* Author : aerccu
* Created : 16.08.19
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef THREADEDCANVAS_H
#define THREADEDCANVAS_H
#include "thread.h"
#include "canvas.h"
namespace display {
class ThreadedCanvas : public Thread {
public:
ThreadedCanvas(Canvas* canvas) : running_(false), canvas_(canvas) {}
virtual ~ThreadedCanvas() {}
virtual void start(int rt_priority = 0, uint32_t affinity_mask = 0)
{
{
Mutexlock mLock(&mutex_);
running_ = true;
}
Thread::start(rt_priority, affinity_mask);
}
void stop()
{
Mutexlock mLock(&mutex_);
running_ = false;
}
virtual void run() = 0;
protected:
inline Canvas* canvas() { return canvas_; }
inline bool running()
{
Mutexlock mLock(&mutex_);
return running_;
}
private:
Mutex mutex_;
bool running_;
Canvas* const canvas_;
};
}
#endif // THEADEDCANVAS_H
| [
"aerccu@gmail.com"
] | aerccu@gmail.com |
895e8f900ab69053fc48faaff37e9e79041f973d | 0160c375f0f49778fa2d58cf14595d581dbfc308 | /test/test.utils.cpp | ae8d8b9802dee1eb8fb0e180dfe4a03c218e49e6 | [
"MIT"
] | permissive | chensoft/libfs | 4d81c845b9264244ac5c12043ccc0c666de5a130 | 3288a865ffa71cfc197ea0fb54c042fa2c9546a6 | refs/heads/master | 2020-03-25T04:46:08.588642 | 2018-12-27T11:15:54 | 2018-12-27T11:15:54 | 143,412,033 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 910 | cpp | /**
* Created by Jian Chen
* @since 2018.09.03
* @author Jian Chen <admin@chensoft.com>
* @link http://chensoft.com
*/
#include "fs/fs.hpp"
#include "catch.hpp"
TEST_CASE("fs.utils")
{
CHECK(std::string(u8"\u9648\u5251") == "\xE9\x99\x88\xE5\x89\x91");
CHECK(fs::widen(u8"\u9648\u5251") == L"\u9648\u5251");
CHECK(fs::narrow(L"\u9648\u5251") == "\xE9\x99\x88\xE5\x89\x91");
CHECK(fs::prune("").empty());
CHECK(fs::prune("/") == "/");
CHECK(fs::prune("//") == "/");
CHECK(fs::prune("/usr/local") == "/usr/local");
CHECK(fs::prune("/usr/local/") == "/usr/local");
CHECK(fs::prune("/usr/local//") == "/usr/local");
CHECK(fs::prune("C:\\") == "C:\\");
CHECK(fs::prune("C:\\\\") == "C:\\");
CHECK(fs::prune("C:\\Windows") == "C:\\Windows");
CHECK(fs::prune("C:\\Windows\\") == "C:\\Windows");
CHECK(fs::prune("C:\\Windows\\\\") == "C:\\Windows");
} | [
"admin@chensoft.com"
] | admin@chensoft.com |
3e9172cb8b65853efe9dd6032616749442a61044 | 09c5c4baed3d26701e866be100e4e52d9a34b856 | /StudyAlone/StudyAlone/SupervisorCCTV.h | 40b0907e07a0d00705931f64f298a4f8aee493a8 | [] | no_license | sangdo913/Algorithms | 556ac5fc789e35df2f65601e4439caca967edd7b | ee11265895d8ce3314f009df38166defc4b946c7 | refs/heads/master | 2022-09-11T12:00:58.615980 | 2022-07-31T11:11:04 | 2022-07-31T11:11:04 | 116,484,870 | 3 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,789 | h | #pragma once
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
struct CCTVInfo
{
typedef struct Cod { int r, c; } cod;
typedef enum {UP = 0b1, RIGHT = 0b0010, DOWN = 0b0100, LEFT = 0b1000} DIR;
typedef enum {floor = 0, wall = 6, sensing = 7, final = -1} OBSTACLE;
typedef enum {U = 0, R, D, L} CONV;
const int CCTVCount[6] = { -1,4,2,4,4,1 };
const int CCTVDirect[6] = { -1,RIGHT, LEFT | RIGHT, UP | RIGHT, LEFT | UP | RIGHT, 0b1111};
const int dr[4] = { -1,0,1,0 };
const int dc[4] = { 0,1,0,-1 };
int conv[4];
cod camera[8];
int map[10][10];
int n, m;
int cNum, minArea;
int check[10][10];
int checkFloor()
{
int res = 0;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= m; j++)
{
res += (map[i][j] == floor);
}
}
return res;
}
void sense(cod &pos, int direct, int cnt)
{
cod next;
next.r = pos.r + dr[direct];
next.c = pos.c + dc[direct];
while (map[next.r][next.c] != wall && map[next.r][next.c] != final)
{
if (check[next.r][next.c] == -1 && map[next.r][next.c] == floor)
{
map[next.r][next.c] = sensing;
check[next.r][next.c] = cnt;
}
next.r += dr[direct];
next.c += dc[direct];
}
}
void cancleSensing(cod &pos, int direct, int cnt)
{
cod next;
next.r = pos.r + dr[direct];
next.c = pos.c + dc[direct];
while (map[next.r][next.c] != wall && map[next.r][next.c] != final)
{
if (map[next.r][next.c] == sensing && check[next.r][next.c] == cnt)
{
map[next.r][next.c] = 0;
check[next.r][next.c] = -1;
}
next.r += dr[direct];
next.c += dc[direct];
}
}
int min(int i1, int i2)
{
return i1 < i2 ? i1 : i2;
}
void getSafeArea(int cnt)
{
if (cnt == cNum)
{
minArea = min(minArea, checkFloor());
return;
}
for (int d = 0; d < CCTVCount[map[camera[cnt].r][camera[cnt].c]]; d++)
{
int directions = CCTVDirect[map[camera[cnt].r][camera[cnt].c]];
for (int i = 0; i < 4; i++)
{
if (directions & conv[i])
{
sense(camera[cnt], (i + d) % 4,cnt );
}
}
getSafeArea(cnt + 1);
for (int i = 0; i < 4; i++)
{
if (directions & conv[i])
{
cancleSensing(camera[cnt], (i + d) % 4,cnt);
}
}
}
}
void init()
{
memset(map, -1, sizeof(map));
memset(check, -1, sizeof(check));
cNum = 0;
conv[U] = UP;
conv[R] = RIGHT;
conv[D] = DOWN;
conv[L] = LEFT;
minArea = 100;
scanf("%d %d\n", &n, &m);
for(int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
{
scanf("%d ", &map[i][j]);
if (map[i][j] != wall && map[i][j] != floor)
{
camera[cNum].r = i;
camera[cNum++].c = j;
}
}
}
}CCTV_info;
int CCTV()
{
CCTV_info.init();
CCTV_info.getSafeArea(0);
int res = CCTV_info.minArea;
cout << res << '\n';
return 0;
} | [
"sangdo913@naver.com"
] | sangdo913@naver.com |
ca56c2a64be6538942e31ba2db189f2405cec3ca | e38fe12f1573c98ada37520292b64d2c454cd17c | /SlowakCodeTests/AIWonder.cpp | 990b2ec4e80fff576e17ff67fb2aeb0c1bcfd941 | [] | no_license | marzix/7Wonders | 08d85ab7687f74e528138a6fea092584336e1f26 | 6a8665f1d327b9c34c8e1dc156f50066bce9b219 | refs/heads/master | 2020-04-06T07:06:37.443853 | 2018-06-29T14:55:56 | 2018-06-29T14:55:56 | 65,573,965 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,038 | cpp | #include "AIWonder.h"
#include <ios>
#include <iostream>
#include <fstream>
#include <iomanip>
using std::cout;
using std::cerr;
using std::endl;
using std::setw;
using std::left;
using std::right;
using std::showpos;
using std::noshowpos;
#define netFileName "AIWonder.net"
#define trainingDataFile "AIWonder.data"
#pragma warning(disable: 4996)
AIWonder AIWonder::AI;
FANN::neural_net AIWonder::net;
AIWonder::AIWonder()
{
}
AIWonder::AIWonder(const AIWonder &)
{
}
AIWonder & AIWonder::getSingleton()
{
return AI;
}
int AIWonder::takeCard(char * cardsData)
{
int taken = 0;
float temp = 0.0f;
fann_type inputData[6];
char * codes = strtok(cardsData, " ");
for (int i = 0; i < 6; i++)
{
inputData[i] = atof(codes);
codes = strtok(NULL, " ");
}
fann_type *calc_out = net.run(inputData);
for (int j = 0; j < 5; j++)
{
if (calc_out[j] > temp)
{
temp = calc_out[j];
taken = j + 1;
}
}
return taken;
}
void AIWonder::train()
{
std::ifstream dataFile(trainingDataFile);
if (!dataFile.good())
{
cout << "No dataFile for training AI\n";
system("pause");
exit(0);
}
const float learning_rate = 0.005f;
const unsigned int num_layers = 3;
const unsigned int num_input = 6;
const unsigned int num_hidden = 8;
const unsigned int num_output = 5;
const float desired_error = 0.0001f;
const unsigned int max_iterations = 500000;
const unsigned int iterations_between_reports = 100000;
cout << endl << "Creating network." << endl;
if (!net.create_standard(num_layers, num_input, num_hidden, num_output))
{
system("pause");
exit(0);
}
net.set_learning_rate(learning_rate);
net.set_activation_steepness_hidden(0.4);
net.set_activation_steepness_output(0.4);
net.set_activation_function_hidden(FANN::SIGMOID_SYMMETRIC_STEPWISE);
net.set_activation_function_output(FANN::SIGMOID_SYMMETRIC_STEPWISE);
// Set additional properties such as the training algorithm
net.set_training_algorithm(FANN::TRAIN_RPROP);
// Output network type and parameters
cout << endl << "Training network." << endl;
FANN::training_data data;
if (data.read_train_from_file(trainingDataFile))
{
// Initialize and train the network with the data
net.init_weights(data);
cout << "Max Epochs " << setw(8) << max_iterations << ". "
<< "Desired Error: " << left << desired_error << right << endl;
net.train_on_data(data, max_iterations,
iterations_between_reports, desired_error);
/*
cout << endl << "Testing network." << endl;
for (unsigned int i = 0; i < data.length_train_data(); ++i)
{
// Run the network on the test data
fann_type *calc_out = net.run(data.get_input()[i]);
cout << "XOR test (" << showpos << data.get_input()[i][0] << ", " << data.get_input()[i][1] << ", " << data.get_input()[i][2] << ", " << data.get_input()[i][3] << ", " << data.get_input()[i][4] << ", " << data.get_input()[i][5] << ") -> "
<< calc_out[0] << ", " << calc_out[1] << ", " << calc_out[2] << ", " << calc_out[3] << ", " << calc_out[4] << ", "
<< ", should be " << data.get_output()[i][0] << ", " << data.get_output()[i][1] << ", " << data.get_output()[i][2] << ", " << data.get_output()[i][3] << ", " << data.get_output()[i][4] << ", "
<< "difference = " << noshowpos
<< fann_abs(*calc_out - data.get_output()[i][0]) << endl;
int taken = 0;
float temp = 0.0f;
for (int j = 0; j < 5; j++)
{
if (abs(calc_out[j]) > temp)
{
temp = abs(calc_out[j]);
taken = j + 1;
}
}
cout << "Taken : " << taken << endl;
}
system("pause\n");
*/
cout << endl << "Saving network." << endl;
// Save the network in floating point and fixed point
net.save(netFileName);
cout << endl << "Training AI completed\n" << endl;
}
}
void AIWonder::initAI()
{
std::ifstream netFile(netFileName);
if (netFile.good())
{
cout << "Reading neural network from file\n";
net.create_from_file(netFileName);
}
else
{
cout << "Neural network have not been found. Try to train on data from file " << trainingDataFile << endl;
train();
}
} | [
"rafal.potoczek@gmail.com"
] | rafal.potoczek@gmail.com |
601463a3f4a936ca6f5ed9a1a33f787917361316 | 3543b7f88aea464dc4b26148196e53c46b70d38e | /cgg06_Normal_Mapping_and_OBJ/Renderer3DRaycasting.h | a9ae288fd492e46bd234a34f2ebb770a2ff73672 | [] | no_license | vanish87/CGG | 77e76450062edd8743beda2bb80590bd5a172738 | b1f6f6d924c7bf08af078572f78a98fcad782f20 | refs/heads/master | 2020-09-04T21:31:46.534548 | 2015-09-13T23:50:12 | 2015-09-13T23:50:12 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 416 | h | #ifndef RENDERER3DRAYCASTING_H_
#define RENDERER3DRAYCASTING_H_
#include "Renderer3D.h"
class Color;
class Ray;
class Renderer3DRaycasting : public Renderer3D
{
private:
Color raycasting(Ray& ray, double* dist);
Renderer3DRaycasting(const Renderer3DRaycasting& src);
public:
Renderer3DRaycasting();
Renderer3DRaycasting(Camera3D& camera);
virtual ~Renderer3DRaycasting();
virtual void render();
};
#endif | [
"rumpf@student.tugraz.at"
] | rumpf@student.tugraz.at |
06590f44c0accf67cb35df7410e6c29f278da85a | d6b48d0260beee183aa97d051b80373475a7e7c0 | /build-SLStudio-Desktop-Debug/moc_PoseFilter.cpp | bfcc265293bfa80994a0273254b72d25a87f0117 | [] | no_license | hehongyu1995/slstudio | c624f5fcae94f200560ec59137857391369a4904 | 2d85bec24382e609504030463001d16bd4aa1f5d | refs/heads/master | 2020-12-02T22:47:14.502981 | 2017-07-14T05:23:34 | 2017-07-14T05:23:34 | 96,179,511 | 0 | 0 | null | 2017-07-04T05:43:28 | 2017-07-04T05:43:28 | null | UTF-8 | C++ | false | false | 4,467 | cpp | /****************************************************************************
** Meta object code from reading C++ file 'PoseFilter.h'
**
** Created by: The Qt Meta Object Compiler version 67 (Qt 5.5.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../src/tracker/PoseFilter.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qmetatype.h>
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'PoseFilter.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 67
#error "This file was generated using the moc from 5.5.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
struct qt_meta_stringdata_PoseFilter_t {
QByteArrayData data[6];
char stringdata0[73];
};
#define QT_MOC_LITERAL(idx, ofs, len) \
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
qptrdiff(offsetof(qt_meta_stringdata_PoseFilter_t, stringdata0) + ofs \
- idx * sizeof(QByteArrayData)) \
)
static const qt_meta_stringdata_PoseFilter_t qt_meta_stringdata_PoseFilter = {
{
QT_MOC_LITERAL(0, 0, 10), // "PoseFilter"
QT_MOC_LITERAL(1, 11, 23), // "newFilteredPoseEstimate"
QT_MOC_LITERAL(2, 35, 0), // ""
QT_MOC_LITERAL(3, 36, 15), // "Eigen::Affine3f"
QT_MOC_LITERAL(4, 52, 1), // "T"
QT_MOC_LITERAL(5, 54, 18) // "filterPoseEstimate"
},
"PoseFilter\0newFilteredPoseEstimate\0\0"
"Eigen::Affine3f\0T\0filterPoseEstimate"
};
#undef QT_MOC_LITERAL
static const uint qt_meta_data_PoseFilter[] = {
// content:
7, // revision
0, // classname
0, 0, // classinfo
2, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: name, argc, parameters, tag, flags
1, 1, 24, 2, 0x06 /* Public */,
// slots: name, argc, parameters, tag, flags
5, 1, 27, 2, 0x0a /* Public */,
// signals: parameters
QMetaType::Void, 0x80000000 | 3, 4,
// slots: parameters
QMetaType::Void, 0x80000000 | 3, 4,
0 // eod
};
void PoseFilter::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
PoseFilter *_t = static_cast<PoseFilter *>(_o);
Q_UNUSED(_t)
switch (_id) {
case 0: _t->newFilteredPoseEstimate((*reinterpret_cast< Eigen::Affine3f(*)>(_a[1]))); break;
case 1: _t->filterPoseEstimate((*reinterpret_cast< Eigen::Affine3f(*)>(_a[1]))); break;
default: ;
}
} else if (_c == QMetaObject::IndexOfMethod) {
int *result = reinterpret_cast<int *>(_a[0]);
void **func = reinterpret_cast<void **>(_a[1]);
{
typedef void (PoseFilter::*_t)(Eigen::Affine3f );
if (*reinterpret_cast<_t *>(func) == static_cast<_t>(&PoseFilter::newFilteredPoseEstimate)) {
*result = 0;
}
}
}
}
const QMetaObject PoseFilter::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_PoseFilter.data,
qt_meta_data_PoseFilter, qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
};
const QMetaObject *PoseFilter::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
}
void *PoseFilter::qt_metacast(const char *_clname)
{
if (!_clname) return Q_NULLPTR;
if (!strcmp(_clname, qt_meta_stringdata_PoseFilter.stringdata0))
return static_cast<void*>(const_cast< PoseFilter*>(this));
return QObject::qt_metacast(_clname);
}
int PoseFilter::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 2)
qt_static_metacall(this, _c, _id, _a);
_id -= 2;
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
if (_id < 2)
*reinterpret_cast<int*>(_a[0]) = -1;
_id -= 2;
}
return _id;
}
// SIGNAL 0
void PoseFilter::newFilteredPoseEstimate(Eigen::Affine3f _t1)
{
void *_a[] = { Q_NULLPTR, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_END_MOC_NAMESPACE
| [
"hehongyu1995@github.com"
] | hehongyu1995@github.com |
073e10196e543065c089b2527c2c23cf2370900e | 6cc10a9754ef04f5fa30bee1681ebe044312a881 | /includes/InputSource.hpp | b16feb9db8f44e36ba1fb21fd355c3358935a31d | [] | no_license | Adubedat/AbstractVM | 3955a5bad63b960266ba81b37709291958dbf07e | 7f04a7c422d62e12bfe7bf2d40b744f84bd8cbc7 | refs/heads/master | 2021-01-25T14:33:47.314535 | 2018-04-23T17:59:00 | 2018-04-23T17:59:00 | 123,711,795 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,025 | hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* InputSource.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adubedat <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/03/06 16:31:10 by adubedat #+# #+# */
/* Updated: 2018/03/07 19:32:11 by adubedat ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef INPUT_SOURCE_HPP
# define INPUT_SOURCE_HPP
# include <iostream>
# include <fstream>
class InputSource
{
public:
InputSource(void);
InputSource(InputSource const & src);
virtual ~InputSource(void);
static unsigned int getLineNbr();
virtual int getNextLine(std::string &line) = 0;
virtual bool isCin();
protected:
static unsigned int _lineNbr;
};
class FileInputSource : public InputSource
{
public:
FileInputSource(void);
FileInputSource(FileInputSource const & src);
FileInputSource(std::string file_name);
virtual ~FileInputSource(void);
std::ifstream *get_ifs(void) const;
virtual FileInputSource &operator=(FileInputSource const & rhs);
virtual int getNextLine(std::string &line);
private:
std::ifstream *_ifs;
};
class StandardInputSource : public InputSource
{
public:
StandardInputSource(void);
StandardInputSource(StandardInputSource const & src);
virtual ~StandardInputSource(void);
virtual StandardInputSource &operator=(StandardInputSource const & rhs);
virtual int getNextLine(std::string &line);
virtual bool isCin();
private:
int _eof;
};
#endif
| [
"arthur.dubedat@gmail.com"
] | arthur.dubedat@gmail.com |
6818879aa7b2e099e80b0370a1ba9aa7219e512b | 1da3359f98a505276df2592ff995687ad7d29064 | /104/solution.cpp | 1e4bf24d8e59509ef07e2f9f26de5b70ebe96bad | [] | no_license | rfliu6/leetcode | cbc485c5a5e9222285774c929f018995bc7b9fae | b1a689e05653911ddfd9cc47a4aaaf543c13cabb | refs/heads/master | 2021-01-20T14:48:28.358582 | 2017-03-10T09:34:42 | 2017-03-10T09:34:42 | 82,775,034 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 200 | cpp | class Solution {
public:
int maxDepth(TreeNode* root) {
if(root == NULL)
return 0;
else
return max(maxDepth(root->left), maxDepth(root->right))+1;
}
};
| [
"noreply@github.com"
] | rfliu6.noreply@github.com |
f45010a6e5b008d3fe2513dd36a06195dc0147f2 | b5b4d7b9afe4405d7c20c65b22a17a4201aa3765 | /src/Magnum/SceneGraph/MatrixTransformation3D.hpp | 916b72733eefcc66f2d781884bfaa718e0b137f4 | [
"MIT"
] | permissive | guangbinl/magnum | bfb8fbd949261092d0f9b3645ed2478a92544e98 | a5d58aaab74f6ecb5d6678055b280b831e045e59 | refs/heads/master | 2023-02-18T02:10:51.396888 | 2021-01-10T11:24:25 | 2021-01-10T11:24:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,148 | hpp | #ifndef Magnum_SceneGraph_MatrixTransformation3D_hpp
#define Magnum_SceneGraph_MatrixTransformation3D_hpp
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
2020 Vladimír Vondruš <mosra@centrum.cz>
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.
*/
/** @file
* @brief @ref compilation-speedup-hpp "Template implementation" for @ref MatrixTransformation3D.h
* @m_since{2020,06}
*/
#include "MatrixTransformation3D.h"
#include "Magnum/Math/Quaternion.h"
namespace Magnum { namespace SceneGraph {
/* These are here to avoid including Quaternion in MatrixTransformation3D.h */
template<class T> Object<BasicMatrixTransformation3D<T>>& BasicMatrixTransformation3D<T>::rotate(const Math::Quaternion<T>& quaternion) {
return transform(Math::Matrix4<T>::from(quaternion.toMatrix(), {}));
}
template<class T> Object<BasicMatrixTransformation3D<T>>& BasicMatrixTransformation3D<T>::rotateLocal(const Math::Quaternion<T>& quaternion) {
return transformLocal(Math::Matrix4<T>::from(quaternion.toMatrix(), {}));
}
}}
#endif
| [
"mosra@centrum.cz"
] | mosra@centrum.cz |
aef8427d73ac89fbd587419700f2dcee76c41630 | f6737c532718980a62d5d19753be9b1e94f908c1 | /boost/asynchronous/scheduler/stealing_multiqueue_threadpool_scheduler.hpp | b285f73e86866ce42ae09cf2f13504f0641444d8 | [] | no_license | Shevchenko-Alexander/asynchronous | 8096228eda9b1e6455edcda746c91722f16973e9 | 1f0acf7bcd628d3ad0db50d8b921d5494f43f8a1 | refs/heads/master | 2020-04-03T11:41:37.695317 | 2018-10-29T15:06:26 | 2018-10-29T15:06:26 | 155,228,999 | 0 | 0 | null | 2018-10-29T14:47:59 | 2018-10-29T14:47:57 | null | UTF-8 | C++ | false | false | 16,250 | hpp | // Boost.Asynchronous library
// Copyright (C) Christophe Henry 2013
//
// Use, modification and distribution is subject to the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org
#ifndef BOOST_ASYNC_SCHEDULER_STEALING_MULTIQUEUE_THREADPOOL_SCHEDULER_HPP
#define BOOST_ASYNC_SCHEDULER_STEALING_MULTIQUEUE_THREADPOOL_SCHEDULER_HPP
#include <utility>
#include <vector>
#include <cstddef>
#include <memory>
#include <functional>
#include <future>
#include <boost/thread/thread.hpp>
#include <boost/thread/tss.hpp>
#include <boost/asynchronous/scheduler/detail/scheduler_helpers.hpp>
#include <boost/asynchronous/scheduler/detail/exceptions.hpp>
#include <boost/asynchronous/detail/any_interruptible.hpp>
#include <boost/asynchronous/scheduler/detail/interruptible_job.hpp>
#include <boost/asynchronous/diagnostics/default_loggable_job.hpp>
#include <boost/asynchronous/job_traits.hpp>
#include <boost/asynchronous/scheduler/detail/job_diagnostic_closer.hpp>
#include <boost/asynchronous/queue/find_queue_position.hpp>
#include <boost/asynchronous/queue/any_queue.hpp>
#include <boost/asynchronous/scheduler/detail/multi_queue_scheduler_policy.hpp>
#include <boost/asynchronous/detail/any_joinable.hpp>
#include <boost/asynchronous/queue/lockfree_queue.hpp>
#include <boost/asynchronous/scheduler/tss_scheduler.hpp>
#include <boost/asynchronous/scheduler/detail/lockable_weak_scheduler.hpp>
#include <boost/asynchronous/scheduler/detail/any_continuation.hpp>
#include <boost/asynchronous/scheduler/cpu_load_policies.hpp>
#include <boost/asynchronous/scheduler/detail/execute_in_all_threads.hpp>
namespace boost { namespace asynchronous
{
//TODO boost.parameter
template<class Q,
class FindPosition=boost::asynchronous::default_find_position< >,
class CPULoad =
#ifdef BOOST_ASYNCHRONOUS_NO_SAVING_CPU_LOAD
boost::asynchronous::no_cpu_load_saving
#else
boost::asynchronous::default_save_cpu_load<>
#endif
,
// just for testing, ignore
bool IsImmediate=false >
class stealing_multiqueue_threadpool_scheduler: public boost::asynchronous::detail::multi_queue_scheduler_policy<Q,FindPosition>
{
public:
typedef Q queue_type;
typedef typename Q::job_type job_type;
typedef typename boost::asynchronous::job_traits<typename Q::job_type>::diagnostic_table_type diag_type;
typedef stealing_multiqueue_threadpool_scheduler<Q,FindPosition,CPULoad,IsImmediate> this_type;
template<typename... Args>
stealing_multiqueue_threadpool_scheduler(size_t number_of_workers, Args... args)
: boost::asynchronous::detail::multi_queue_scheduler_policy<Q,FindPosition>(number_of_workers,std::move(args)...)
, m_number_of_workers(number_of_workers)
{
m_private_queues.reserve(number_of_workers);
for (size_t i = 0; i< number_of_workers;++i)
{
m_private_queues.push_back(
std::make_shared<boost::asynchronous::lockfree_queue<boost::asynchronous::any_callable> >());
}
}
template<typename... Args>
stealing_multiqueue_threadpool_scheduler(size_t number_of_workers, std::string const& name, Args... args)
: boost::asynchronous::detail::multi_queue_scheduler_policy<Q,FindPosition>(number_of_workers,std::move(args)...)
, m_number_of_workers(number_of_workers)
, m_name(name)
{
m_private_queues.reserve(number_of_workers);
for (size_t i = 0; i< number_of_workers;++i)
{
m_private_queues.push_back(
std::make_shared<boost::asynchronous::lockfree_queue<boost::asynchronous::any_callable> >());
}
set_name(name);
}
void constructor_done(std::weak_ptr<this_type> weak_self)
{
m_weak_self = weak_self;
if (IsImmediate)
init(m_number_of_workers,std::vector<boost::asynchronous::any_queue_ptr<job_type> >(),m_weak_self);
}
void init(size_t number_of_workers,std::vector<boost::asynchronous::any_queue_ptr<job_type> > const& others,std::weak_ptr<this_type> weak_self)
{
m_diagnostics = std::make_shared<diag_type>(number_of_workers);
m_thread_ids.reserve(number_of_workers);
m_group.reset(new boost::thread_group);
for (size_t i = 0; i< number_of_workers;++i)
{
std::promise<boost::thread*> new_thread_promise;
std::shared_future<boost::thread*> fu = new_thread_promise.get_future();
boost::thread* new_thread =
m_group->create_thread(std::bind(&stealing_multiqueue_threadpool_scheduler::run,this->m_queues,
m_private_queues[i],others,i,m_diagnostics,fu,weak_self));
new_thread_promise.set_value(new_thread);
m_thread_ids.push_back(new_thread->get_id());
}
}
~stealing_multiqueue_threadpool_scheduler()
{
for (size_t i = 0; i< m_number_of_workers;++i)
{
auto fct = m_diagnostics_fct;
auto diag = m_diagnostics;
auto l = [fct,diag]() mutable
{
if (fct)
fct(boost::asynchronous::scheduler_diagnostics(diag->get_map(),diag->get_current()));
};
boost::asynchronous::detail::default_termination_task<typename Q::diagnostic_type,boost::thread_group>
ttask(std::move(l));
// this task has to be executed lat => lowest prio
#ifndef BOOST_NO_RVALUE_REFERENCES
boost::asynchronous::any_callable job(std::move(ttask));
m_private_queues[i]->push(std::move(job),std::numeric_limits<std::size_t>::max());
#else
m_private_queues[i]->push(boost::asynchronous::any_callable(ttask),std::numeric_limits<std::size_t>::max());
#endif
}
}
//TODO move?
boost::asynchronous::any_joinable get_worker()const
{
return boost::asynchronous::any_joinable (boost::asynchronous::detail::worker_wrap<boost::thread_group>(m_group));
}
std::vector<boost::thread::id> thread_ids()const
{
return m_thread_ids;
}
boost::asynchronous::scheduler_diagnostics
get_diagnostics(std::size_t =0)const
{
return boost::asynchronous::scheduler_diagnostics(m_diagnostics->get_map(),m_diagnostics->get_current());
}
void clear_diagnostics()
{
m_diagnostics->clear();
}
void register_diagnostics_functor(std::function<void(boost::asynchronous::scheduler_diagnostics)> fct,
boost::asynchronous::register_diagnostics_type =
boost::asynchronous::register_diagnostics_type())
{
m_diagnostics_fct = fct;
}
void set_steal_from_queues(std::vector<boost::asynchronous::any_queue_ptr<job_type> > const& others)
{
init(m_number_of_workers,others,m_weak_self);
}
void set_name(std::string const& name)
{
for (size_t i = 0; i< m_number_of_workers;++i)
{
boost::asynchronous::detail::set_name_task<typename Q::diagnostic_type> ntask(name);
#ifndef BOOST_NO_RVALUE_REFERENCES
boost::asynchronous::any_callable job(std::move(ntask));
m_private_queues[i]->push(std::move(job),std::numeric_limits<std::size_t>::max());
#else
m_private_queues[i]->push(boost::asynchronous::any_callable(ntask),std::numeric_limits<std::size_t>::max());
#endif
}
}
void processor_bind(std::vector<std::tuple<unsigned int/*first core*/,unsigned int/*number of threads*/>> p)
{
// our thread (queue) index. 0 means "don't care" and is therefore not desirable)
size_t t = 0;
for(auto const& v : p)
{
for (size_t i = 0; i< std::get<1>(v) && (t < m_number_of_workers);++i)
{
boost::asynchronous::detail::processor_bind_task task(std::get<0>(v)+i);
boost::asynchronous::any_callable job(std::move(task));
m_private_queues[t++]->push(std::move(job),std::numeric_limits<std::size_t>::max());
}
}
}
std::vector<std::future<void>> execute_in_all_threads(boost::asynchronous::any_callable c)
{
std::vector<std::future<void>> res;
res.reserve(m_number_of_workers);
for (size_t i = 0; i< m_number_of_workers;++i)
{
std::promise<void> p;
auto fu = p.get_future();
res.emplace_back(std::move(fu));
boost::asynchronous::detail::execute_in_all_threads_task task(c,std::move(p));
m_private_queues[i]->push(std::move(task),std::numeric_limits<std::size_t>::max());
}
return res;
}
std::string get_name()const
{
return m_name;
}
// try to execute a job, return true
static bool execute_one_job(std::vector<std::shared_ptr<queue_type> > const& queues,size_t index,
std::vector<boost::asynchronous::any_queue_ptr<job_type> > const& other_queues,
CPULoad& cpu_load,std::shared_ptr<diag_type> diagnostics,
std::list<boost::asynchronous::any_continuation>& waiting)
{
bool popped = false;
// get a job
typename Q::job_type job;
try
{
bool popped = queues[index]->try_pop(job);
if (!popped)
{
// ok we have nothing to do, maybe we can steal some work?
for (std::size_t i=1; i< queues.size(); ++i)
{
if (index >= i)
{
popped = queues[(index-i)%queues.size()]->try_steal(job);
}
else
{
popped = queues[queues.size()-(i-index)]->try_steal(job);
}
if (popped)
break;
}
}
if (!popped)
{
// ok we have nothing to do, maybe we can steal some work from other pools?
for (std::size_t i=0; i< other_queues.size(); ++i)
{
popped = (*other_queues[i]).try_steal(job);
if (popped)
break;
}
}
// did we manage to pop or steal?
if (popped)
{
cpu_load.popped_job();
// log time
boost::asynchronous::job_traits<typename Q::job_type>::set_started_time(job);
// log thread
boost::asynchronous::job_traits<typename Q::job_type>::set_executing_thread_id(job,boost::this_thread::get_id());
// log current
boost::asynchronous::job_traits<typename Q::job_type>::add_current_diagnostic(index,job,diagnostics.get());
// execute job
job();
boost::asynchronous::job_traits<typename Q::job_type>::reset_current_diagnostic(index,diagnostics.get());
boost::asynchronous::job_traits<typename Q::job_type>::set_finished_time(job);
boost::asynchronous::job_traits<typename Q::job_type>::add_diagnostic(job,diagnostics.get());
}
else
{
// look for waiting tasks
if (!waiting.empty())
{
for (std::list<boost::asynchronous::any_continuation>::iterator it = waiting.begin(); it != waiting.end();)
{
if ((*it).is_ready())
{
boost::asynchronous::any_continuation c = std::move(*it);
it = waiting.erase(it);
c();
}
else
{
++it;
}
}
}
}
}
catch(boost::thread_interrupted&)
{
// task interrupted, no problem, just continue
}
catch(std::exception&)
{
if (popped)
{
boost::asynchronous::job_traits<typename Q::job_type>::set_failed(job);
boost::asynchronous::job_traits<typename Q::job_type>::set_finished_time(job);
boost::asynchronous::job_traits<typename Q::job_type>::add_diagnostic(job,diagnostics.get());
boost::asynchronous::job_traits<typename Q::job_type>::reset_current_diagnostic(index,diagnostics.get());
}
}
return popped;
}
static void run(std::vector<std::shared_ptr<queue_type> > const& queues,
std::shared_ptr<boost::asynchronous::lockfree_queue<boost::asynchronous::any_callable> > const& private_queue,
std::vector<boost::asynchronous::any_queue_ptr<job_type> > const& other_queues,
size_t index,std::shared_ptr<diag_type> diagnostics,std::shared_future<boost::thread*> self,
std::weak_ptr<this_type> this_)
{
boost::thread* t = self.get();
boost::asynchronous::detail::multi_queue_scheduler_policy<Q,FindPosition>::m_self_thread.reset(new thread_ptr_wrapper(t));
// thread scheduler => tss
boost::asynchronous::any_weak_scheduler<job_type> self_as_weak = boost::asynchronous::detail::lockable_weak_scheduler<this_type>(this_);
boost::asynchronous::get_thread_scheduler<job_type>(self_as_weak,true);
boost::asynchronous::get_own_queue_index<>(index+1,true);
std::list<boost::asynchronous::any_continuation>& waiting =
boost::asynchronous::get_continuations(std::list<boost::asynchronous::any_continuation>(),true);
CPULoad cpu_load;
while(true)
{
try
{
{
bool popped = execute_one_job(queues,index,other_queues,cpu_load,diagnostics,waiting);
if (!popped)
{
cpu_load.loop_done_no_job();
// nothing for us to do, give up our time slice
boost::this_thread::yield();
}
// check for shutdown
boost::asynchronous::any_callable djob;
popped = private_queue->try_pop(djob);
if (popped)
{
djob();
}
} // job destroyed (for destruction useful)
// check if we got an interruption job
boost::this_thread::interruption_point();
}
catch(boost::asynchronous::detail::shutdown_exception&)
{
// we are done, execute jobs posted short before to the end, then shutdown
while(execute_one_job(queues,index,other_queues,cpu_load,diagnostics,waiting));
delete boost::asynchronous::detail::multi_queue_scheduler_policy<Q,FindPosition>::m_self_thread.release();
return;
}
catch(boost::thread_interrupted&)
{
// task interrupted, no problem, just continue
}
catch(std::exception&)
{
// TODO, user-defined error
}
}
}
private:
size_t m_number_of_workers;
std::shared_ptr<boost::thread_group> m_group;
std::vector<boost::thread::id> m_thread_ids;
std::shared_ptr<diag_type> m_diagnostics;
std::weak_ptr<this_type> m_weak_self;
std::vector<std::shared_ptr<
boost::asynchronous::lockfree_queue<boost::asynchronous::any_callable>>> m_private_queues;
std::function<void(boost::asynchronous::scheduler_diagnostics)> m_diagnostics_fct;
const std::string m_name;
};
}} // boost::async::scheduler
#endif // BOOST_ASYNC_SCHEDULER_STEALING_MULTIQUEUE_THREADPOOL_SCHEDULER_HPP
| [
"christophe.j.henry@googlemail.com"
] | christophe.j.henry@googlemail.com |
a078be2d0024efc7b378e3a6a1508818642413b4 | 020aa89d2205271caa1023aeba139539f9a621a3 | /list/seqList.h | 2b73a2fd0200e8d230c1811dc752b99ddac2de14 | [] | no_license | pengzi2017/Data-Structure | 39344f7d0bca9d73be438e6a9aae906f3a661a13 | 1c135b416ddb4e43219cbee39babdc46c232e00e | refs/heads/master | 2021-01-22T21:21:51.644461 | 2017-09-13T09:09:38 | 2017-09-13T09:09:38 | 85,414,711 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 3,583 | h | //顺序表
#ifndef SEQLIST_H
#define SEQLIST_H
#include"list.h"
#include<iostream>
using namespace std;
const int defaultSize = 100;
template<class T>
class SeqList:public List<T>
{
public:
SeqList(int sz=defaultSize);
SeqList(SeqList<T>&L);
~SeqList() { delete[] data; };
int Size()const {return size;};//表的最大体积
void resize();//调整表的大小
int Length()const {return length;};//表的长度
int search(const T x)const;//查找x,返回x的位置,找不到则返回负值;
bool getData(int i, T&x)const;//取第i个数,传值给x
bool setData(int i, const T x);//将第i个数的值设置成x
bool insert(int i, const T x);//在i位置 后一位 插入x(i从1计数)
bool remove(int i, T&x);//删除第i位的值,传值给x(i从1计数)
bool isEmpty()const//判断是否空
{
if (length == 0)
return true;
else
return false;
}
bool isFull()const//判断是否满
{
if (length == size)
return true;
else
return false;
}
void sort();//排序
void input(T endTag);
void output()const;
//friend ostream operator<<(ostream &out,SeqList<T>&L);
SeqList<T>operator=(SeqList<T>&L);
private:
T *data;
int length;//长度,从1计数
int size;//最大容量
};
template<class T>
SeqList<T>::SeqList(int sz)
{
size = sz;
data = new T[size];
length = 0;
}
template<class T>
SeqList<T>::SeqList(SeqList<T>& L)
{
size = L.size;
length = L.length;
data = new T[size + defaultSize];
if (data == NULL)
{
cout << "内存分配错误" << endl;
exit(1);
}
for (int i = 0; i < length; i++)
data[i] = L.data[i];
}
template<class T>
void SeqList<T>::resize()
{
T *datas = new T[size];
for (int i = 0; i < length; i++)
datas[i] = data[i];
data = new T[size + defaultSize];
for (int i = 0; i < length; i++)
data[i] = datas[i];
size = size + defaultSize;
delete[] datas;
}
template<class T>
int SeqList<T>::search(const T x) const
{
for (int i = 0; i < length; i++)
{
if (data[i] == x)
return i + 1;
}
return -1;
}
template<class T>
bool SeqList<T>::getData(int i, T & x) const
{
if (i<1 || i>length)
return false;
else
{
x = data[i - 1];
return true;
}
}
template<class T>
bool SeqList<T>::setData(int i, const T x)
{
if (i<1 || i>length)
return false;
else
data[i - 1] = x;
return true;
}
template<class T>
bool SeqList<T>::insert(int i, const T x)
{
if (i<0 || i>length)return false;
if (size - length < 10)
resize();
for (int j = length; j > i; j--)
data[j] = data[j - 1];
data[i] = x;
length++;
return true;
}
template<class T>
bool SeqList<T>::remove(int i, T & x)
{
if (i < 1 || i>length)return false;
x = data[i - 1];
for (int j = i - 1; i < length; i++)
data[j] = data[j + 1];
length--;
return true;
}
template<class T>
void SeqList<T>::sort()
{
//升序,冒泡排序
int bubbleNum;
do
{
bubbleNum = 0;
for (int i = 0; i<length - 1; i++)
if (data[i] > data[i + 1])
{
T temp = data[i + 1];
data[i + 1] = data[i];
data[i] = temp;
bubbleNum++;
}
} while (bubbleNum != 0);
}
template<class T>
void SeqList<T>::input(T endTag)
{
T value;
cin >> value;
while (value != endTag)
{
if (size - length < 10)
resize();
data[length] = value;
length++;
cin >> value;
}
}
template<class T>
void SeqList<T>::output() const
{
for (int i = 0; i < length; i++)
cout << data[i] << ",";
cout << endl;
}
template<class T>
SeqList<T> SeqList<T>::operator=(SeqList<T>& L)
{
size = L.size;
length = L.length;
data = new T[size];
for (int i = 0; i < length; i++)
data[i] = L.data[i];
return *this;
}
#endif
| [
"15804052717@163.com"
] | 15804052717@163.com |
527bd8c247ab6e21fae107748a47e302d78f7cec | a594b8ad0d1efc7edd752a95b67b87d1aadae2cd | /src/conventions/x86MsFastcall.cpp | dbdc08d3c1ce079cb8489e50ce14b16948e62464 | [] | no_license | CookStar/DynamicHooks | 2d4cf86826923f0800e0311cc926b712d6e5eb2e | b7cb7ce02e0eb3d2db9d52c08a6b8b093c684347 | refs/heads/master | 2023-03-02T13:53:03.622213 | 2020-10-17T16:37:23 | 2020-10-17T16:37:23 | 276,172,822 | 0 | 0 | null | 2020-06-30T18:00:35 | 2020-06-30T18:00:35 | null | UTF-8 | C++ | false | false | 4,096 | cpp | /**
* =============================================================================
* DynamicHooks
* Copyright (C) 2015 Robin Gohmert. All rights reserved.
* =============================================================================
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in a
* product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
* asm.h/cpp from devmaster.net (thanks cybermind) edited by pRED* to handle gcc
* -fPIC thunks correctly
*
* Idea and trampoline code taken from DynDetours (thanks your-name-here).
*/
// ============================================================================
// >> INCLUDES
// ============================================================================
#include "x86MsFastcall.h"
#include <string.h>
// ============================================================================
// >> x86MsFastcall
// ============================================================================
x86MsFastcall::x86MsFastcall(std::vector<DataType_t> vecArgTypes, DataType_t returnType, int iAlignment) :
ICallingConvention(vecArgTypes, returnType, iAlignment)
{
int iSize = GetDataTypeSize(m_returnType);
if (iSize > 4)
{
m_pReturnBuffer = malloc(iSize);
}
else
{
m_pReturnBuffer = NULL;
}
}
x86MsFastcall::~x86MsFastcall()
{
if (m_pReturnBuffer)
{
free(m_pReturnBuffer);
}
}
std::list<Register_t> x86MsFastcall::GetRegisters()
{
std::list<Register_t> registers;
registers.push_back(ESP);
int iArgSize = m_vecArgTypes.size();
if (iArgSize > 0)
{
registers.push_back(ECX);
}
if (iArgSize > 1)
{
registers.push_back(EDX);
}
if (m_returnType == DATA_TYPE_FLOAT || m_returnType == DATA_TYPE_DOUBLE)
{
registers.push_back(ST0);
}
else
{
registers.push_back(EAX);
if (m_pReturnBuffer && iArgSize <= 1)
{
registers.push_back(EDX);
}
}
return registers;
}
int x86MsFastcall::GetPopSize()
{
int iPopSize = 0;
for(unsigned int i=2; i < m_vecArgTypes.size(); i++)
{
iPopSize += GetDataTypeSize(m_vecArgTypes[i], m_iAlignment);
}
return iPopSize;
}
void* x86MsFastcall::GetArgumentPtr(int iIndex, CRegisters* pRegisters)
{
if (iIndex == 0)
{
return pRegisters->m_ecx->m_pAddress;
}
if (iIndex == 1)
{
return pRegisters->m_edx->m_pAddress;
}
int iOffset = 4;
for(int i=2; i < iIndex; i++)
{
iOffset += GetDataTypeSize(m_vecArgTypes[i], m_iAlignment);
}
return (void *) (pRegisters->m_esp->GetValue<unsigned long>() + iOffset);
}
void x86MsFastcall::ArgumentPtrChanged(int iIndex, CRegisters* pRegisters, void* pArgumentPtr)
{
}
void* x86MsFastcall::GetReturnPtr(CRegisters* pRegisters)
{
if (m_returnType == DATA_TYPE_FLOAT || m_returnType == DATA_TYPE_DOUBLE)
return pRegisters->m_st0->m_pAddress;
if (m_pReturnBuffer)
{
// First half in eax, second half in edx
memcpy(m_pReturnBuffer, pRegisters->m_eax, 4);
memcpy((void *) ((unsigned long) m_pReturnBuffer + 4), pRegisters->m_edx, 4);
return m_pReturnBuffer;
}
return pRegisters->m_eax->m_pAddress;
}
void x86MsFastcall::ReturnPtrChanged(CRegisters* pRegisters, void* pReturnPtr)
{
if (m_returnType == DATA_TYPE_FLOAT || m_returnType == DATA_TYPE_DOUBLE)
return;
if (m_pReturnBuffer)
{
// First half in eax, second half in edx
memcpy(pRegisters->m_eax, m_pReturnBuffer, 4);
memcpy(pRegisters->m_edx, (void *) ((unsigned long) m_pReturnBuffer + 4), 4);
}
} | [
"noreply@github.com"
] | CookStar.noreply@github.com |
63ebed55dcb891723fe16d631f8d263b443b5835 | 1e5d25a8e0e31b78c4e979af55ee2ad64687c258 | /92 Reverse Linked List II/reverseLinkedListII.cpp | f34ee72a31caa0ceb3380a3f5bdb8ddae0e35387 | [] | no_license | charlenellll/LeetCodeSolution | ed02ee9b4059d6c1c6972af8cc56ea7bc85d401f | 3b846bf4cc1817aaae9e4e392547ad9ccde04e76 | refs/heads/master | 2021-01-01T16:18:58.440351 | 2019-11-19T15:48:04 | 2019-11-19T15:48:04 | 97,808,314 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,117 | cpp | //2nd round
class Solution {
public:
ListNode* reverseBetween(ListNode* head, int m, int n) {
ListNode* pre = NULL, *cur = head;
for(int i = 1; i < m; i++ ){
pre = cur;
cur = cur->next;
}
if( !cur->next ) return head;
ListNode* before = pre, *tail = cur;
pre = cur, cur = cur->next;
for(int i = 0; i < n-m; i++ ){
ListNode* after = cur->next;
cur->next = pre;
pre = cur;
cur = after;
}
if(before) // Notice here! In some test cases m=1, before is NULL, then there is nothing before the new head, the new head is the tempHead of the middle reversed part.
before->next = pre;
else
head = pre;
tail->next = cur;
return head;
}
};
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* reverseBetween(ListNode* head, int m, int n) {
if(m == n)
return head;
ListNode* cur = head;
ListNode* pre = NULL;
ListNode* next;
int index = 1;
// Point 1 : No need to use "next" in this loop
while(cur != NULL){
if( index == m )
break;
pre = cur;
cur = cur->next;
index++;
}
ListNode* head_point = pre;
ListNode* tail_point = cur;
// Point 2: Important step! Set pre to NULL again.
pre = NULL;
for( int i = 0; i < n-m+1; i++){
next = cur->next;
cur->next = pre;
pre = cur;
cur = next;
}
// Point 3 & 4
if(head_point != NULL)
head_point->next = pre;
else
head = pre;
tail_point->next = cur;
return head;
}
};
// I've made a few mistakes which are marked in the comments. Think about it thoroughly.
// Linked list and pointers can be a bit tricky | [
"charleneliaojl@gmail.com"
] | charleneliaojl@gmail.com |
05ee3fbd5b2648a390d996fbb8b4e6a96521f66a | 31c6face9f3a545a0b4df81a2f6c36362b9c5f81 | /mechanics/Widgets/actionentitywidget.h | d1671118e45e240cf81d010ec860d2b540129344 | [] | no_license | drblallo/Mapper | e92e5540e2b654b1d4408ffd77ed3f081d5c1968 | 8770fa4ec8a7faae4059f9652656fe699979134a | refs/heads/master | 2021-01-01T19:57:46.839135 | 2017-11-26T09:51:51 | 2017-11-26T09:51:51 | 98,729,413 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 476 | h | #ifndef ACTIONENTITYWIDGET_H
#define ACTIONENTITYWIDGET_H
#include <QWidget>
namespace mechanics
{
class EntityAction;
}
using namespace mechanics;
namespace Ui {
class ActionEntityWidget;
}
class ActionEntityWidget : public QWidget
{
Q_OBJECT
public:
explicit ActionEntityWidget(QWidget *parent = 0, EntityAction* act = NULL);
~ActionEntityWidget();
private:
Ui::ActionEntityWidget *ui;
EntityAction* action;
};
#endif // ACTIONENTITYWIDGET_H
| [
"blalloscompany@gmail.com"
] | blalloscompany@gmail.com |
9694e535e1cb20131840c1281b5a9f2b7b9aeaa1 | c1b7e15de90d3b7ce33d51f002c99b1d9b6ca715 | /ChineseChess/CommonLib/CommandDecoder.h | f4b8c68f4f26ce2226cc47ff5bfbfe873f15bac5 | [] | no_license | mainina/ChineseChess | a4c60be7ce31228b98f850e6514bb59114d7e6cc | 40a3191bd9ecc8e2297079446d95752e73d73611 | refs/heads/master | 2021-01-02T08:13:29.982351 | 2017-08-25T07:34:18 | 2017-08-25T07:34:18 | 96,449,367 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 480 | h | #pragma once
#include <string>
#include "Decoder.h"
#include "CmdData.h"
#include <vector>
class CommandDecoder: public Decoder
{
public:
CommandDecoder(char bufRecv[]);
~CommandDecoder();
virtual bool decode();
CmdData* getData() { return mCmdData; }
int getCommand() { return cmd; }
const char getChBegin() { return chBegin; }
const char getChEnd() { return chEnd; }
protected:
const char chBegin = 0x02;
const char chEnd = 0x03;
int cmd;
CmdData* mCmdData;
};
| [
"mainina200@sohu.com"
] | mainina200@sohu.com |
ce46a56086a3e463dd5b2a593504331fcab6d8b5 | 90c720b09228236ac0a0419b83bb4c870b1c7714 | /src/qt/addressbookpage.cpp | f660c870bc433e97170ee9f85d86e02bc6160471 | [
"MIT"
] | permissive | FilokOfficial/filok | 80b6fb2d4a47a20da21d8b41aeede290a80cfcb7 | 20dbb5f6e6f5f73b0676f4bf302233644d4d7ce1 | refs/heads/master | 2020-04-18T18:43:48.645184 | 2019-02-05T21:28:24 | 2019-02-05T21:28:24 | 167,693,244 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,169 | cpp | // Copyright (c) 2011-2014 The Bitcoin developers
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The PIVX developers
// Copyright (c) 2018 The Filok developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/filok-config.h"
#endif
#include "addressbookpage.h"
#include "ui_addressbookpage.h"
#include "addresstablemodel.h"
#include "bitcoingui.h"
#include "csvmodelwriter.h"
#include "editaddressdialog.h"
#include "guiutil.h"
#include <QIcon>
#include <QMenu>
#include <QMessageBox>
#include <QSortFilterProxyModel>
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget* parent) : QDialog(parent),
ui(new Ui::AddressBookPage),
model(0),
mode(mode),
tab(tab)
{
ui->setupUi(this);
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->newAddress->setIcon(QIcon());
ui->copyAddress->setIcon(QIcon());
ui->deleteAddress->setIcon(QIcon());
ui->exportButton->setIcon(QIcon());
#endif
switch (mode) {
case ForSelection:
switch (tab) {
case SendingTab:
setWindowTitle(tr("Choose the address to send coins to"));
break;
case ReceivingTab:
setWindowTitle(tr("Choose the address to receive coins with"));
break;
}
connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept()));
ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->tableView->setFocus();
ui->closeButton->setText(tr("C&hoose"));
ui->exportButton->hide();
break;
case ForEditing:
switch (tab) {
case SendingTab:
setWindowTitle(tr("Sending addresses"));
break;
case ReceivingTab:
setWindowTitle(tr("Receiving addresses"));
break;
}
break;
}
switch (tab) {
case SendingTab:
ui->labelExplanation->setText(tr("These are your FLK addresses for sending payments. Always check the amount and the receiving address before sending coins."));
ui->deleteAddress->setVisible(true);
break;
case ReceivingTab:
ui->labelExplanation->setText(tr("These are your FLK addresses for receiving payments. It is recommended to use a new receiving address for each transaction."));
ui->deleteAddress->setVisible(false);
break;
}
// Context menu actions
QAction* copyAddressAction = new QAction(tr("&Copy Address"), this);
QAction* copyLabelAction = new QAction(tr("Copy &Label"), this);
QAction* editAction = new QAction(tr("&Edit"), this);
deleteAction = new QAction(ui->deleteAddress->text(), this);
// Build context menu
contextMenu = new QMenu();
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(editAction);
if (tab == SendingTab)
contextMenu->addAction(deleteAction);
contextMenu->addSeparator();
// Connect signals for context menu actions
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyAddress_clicked()));
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction()));
connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction()));
connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteAddress_clicked()));
connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(accept()));
}
AddressBookPage::~AddressBookPage()
{
delete ui;
}
void AddressBookPage::setModel(AddressTableModel* model)
{
this->model = model;
if (!model)
return;
proxyModel = new QSortFilterProxyModel(this);
proxyModel->setSourceModel(model);
proxyModel->setDynamicSortFilter(true);
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
proxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
switch (tab) {
case ReceivingTab:
// Receive filter
proxyModel->setFilterRole(AddressTableModel::TypeRole);
proxyModel->setFilterFixedString(AddressTableModel::Receive);
break;
case SendingTab:
// Send filter
proxyModel->setFilterRole(AddressTableModel::TypeRole);
proxyModel->setFilterFixedString(AddressTableModel::Send);
break;
}
ui->tableView->setModel(proxyModel);
ui->tableView->sortByColumn(0, Qt::AscendingOrder);
// Set column widths
#if QT_VERSION < 0x050000
ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
#else
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Label, QHeaderView::Stretch);
ui->tableView->horizontalHeader()->setSectionResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents);
#endif
connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
this, SLOT(selectionChanged()));
// Select row for newly created address
connect(model, SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(selectNewAddress(QModelIndex, int, int)));
selectionChanged();
}
void AddressBookPage::on_copyAddress_clicked()
{
GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Address);
}
void AddressBookPage::onCopyLabelAction()
{
GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Label);
}
void AddressBookPage::onEditAction()
{
if (!model)
return;
if (!ui->tableView->selectionModel())
return;
QModelIndexList indexes = ui->tableView->selectionModel()->selectedRows();
if (indexes.isEmpty())
return;
EditAddressDialog dlg(
tab == SendingTab ?
EditAddressDialog::EditSendingAddress :
EditAddressDialog::EditReceivingAddress,
this);
dlg.setModel(model);
QModelIndex origIndex = proxyModel->mapToSource(indexes.at(0));
dlg.loadRow(origIndex.row());
dlg.exec();
}
void AddressBookPage::on_newAddress_clicked()
{
if (!model)
return;
EditAddressDialog dlg(
tab == SendingTab ?
EditAddressDialog::NewSendingAddress :
EditAddressDialog::NewReceivingAddress,
this);
dlg.setModel(model);
if (dlg.exec()) {
newAddressToSelect = dlg.getAddress();
}
}
void AddressBookPage::on_deleteAddress_clicked()
{
QTableView* table = ui->tableView;
if (!table->selectionModel())
return;
QModelIndexList indexes = table->selectionModel()->selectedRows();
if (!indexes.isEmpty()) {
table->model()->removeRow(indexes.at(0).row());
}
}
void AddressBookPage::selectionChanged()
{
// Set button states based on selected tab and selection
QTableView* table = ui->tableView;
if (!table->selectionModel())
return;
if (table->selectionModel()->hasSelection()) {
switch (tab) {
case SendingTab:
// In sending tab, allow deletion of selection
ui->deleteAddress->setEnabled(true);
ui->deleteAddress->setVisible(true);
deleteAction->setEnabled(true);
break;
case ReceivingTab:
// Deleting receiving addresses, however, is not allowed
ui->deleteAddress->setEnabled(false);
ui->deleteAddress->setVisible(false);
deleteAction->setEnabled(false);
break;
}
ui->copyAddress->setEnabled(true);
} else {
ui->deleteAddress->setEnabled(false);
ui->copyAddress->setEnabled(false);
}
}
void AddressBookPage::done(int retval)
{
QTableView* table = ui->tableView;
if (!table->selectionModel() || !table->model())
return;
// Figure out which address was selected, and return it
QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address);
foreach (QModelIndex index, indexes) {
QVariant address = table->model()->data(index);
returnValue = address.toString();
}
if (returnValue.isEmpty()) {
// If no address entry selected, return rejected
retval = Rejected;
}
QDialog::done(retval);
}
void AddressBookPage::on_exportButton_clicked()
{
// CSV is currently the only supported format
QString filename = GUIUtil::getSaveFileName(this,
tr("Export Address List"), QString(),
tr("Comma separated file (*.csv)"), NULL);
if (filename.isNull())
return;
CSVModelWriter writer(filename);
// name, column, role
writer.setModel(proxyModel);
writer.addColumn("Label", AddressTableModel::Label, Qt::EditRole);
writer.addColumn("Address", AddressTableModel::Address, Qt::EditRole);
if (!writer.write()) {
QMessageBox::critical(this, tr("Exporting Failed"),
tr("There was an error trying to save the address list to %1. Please try again.").arg(filename));
}
}
void AddressBookPage::contextualMenu(const QPoint& point)
{
QModelIndex index = ui->tableView->indexAt(point);
if (index.isValid()) {
contextMenu->exec(QCursor::pos());
}
}
void AddressBookPage::selectNewAddress(const QModelIndex& parent, int begin, int /*end*/)
{
QModelIndex idx = proxyModel->mapFromSource(model->index(begin, AddressTableModel::Address, parent));
if (idx.isValid() && (idx.data(Qt::EditRole).toString() == newAddressToSelect)) {
// Select row of newly created address, once
ui->tableView->setFocus();
ui->tableView->selectRow(idx.row());
newAddressToSelect.clear();
}
}
| [
"root"
] | root |
018621d8b2cd6dd8510fa9c0f020671775000083 | 1ac3f7213b2c4cda9872275d5c735dee27333825 | /codes/data_structures/stack/cpp/templated_stack.cpp | 4f72da0bff8462f87633cad5ae592efdd7f18371 | [
"MIT"
] | permissive | basu0001/first-pr-Hacktoberfest--2019 | b13a805590bd80f955a158a841dc657c6439dfd9 | 479553e67728fa8409dbceed7cb3d7554127c946 | refs/heads/master | 2021-06-28T10:24:15.910424 | 2021-02-02T07:38:31 | 2021-02-02T07:38:31 | 212,898,561 | 8 | 55 | MIT | 2021-02-01T18:11:35 | 2019-10-04T20:37:04 | Java | UTF-8 | C++ | false | false | 571 | cpp | #include <exception>
#include <iostream>
#include "Stack.hpp"
/*
* Main is only used to test different
* methods on my stack
*
*/
int main(void) {
Stack<int> s;
std::cout << "Initializing stack" << std::endl;
for (int i = 0; i < 10; ++i)
s.push(i);
std::cout << "Done!" << std::endl;
while ( !s.empty() )
{
std::cout << s.top() << std::endl;
s.pop();
}
std::cout << "Popping off another (inexistant) element" << std::endl;
try
{
s.pop();
}
catch (std::exception& e)
{
std::cerr << "[ERR] " << e.what() << std::endl;
}
return 0;
}
| [
"rajarshee1234@gmail.com"
] | rajarshee1234@gmail.com |
38c5dc7e95318507648e92b0226103c93feeaa62 | e49b23d9112411dd763311aed589ea47ab3a5029 | /src/stacker_attribute_buffer.cpp | 15f811dafa741fd421fd050d592e44150e16e517 | [
"MIT"
] | permissive | scullion/stacker | 754992aa9d583c5250a765f41ec22fad8c1bb380 | 541890f5c56971653138b991e70d0a64bbf9e852 | refs/heads/master | 2020-06-03T17:09:46.040380 | 2014-06-11T15:54:53 | 2014-06-11T15:54:53 | 20,300,216 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 52,340 | cpp | #include "stacker_attribute.h"
#include <cstddef>
#include <cstring>
#include <cfloat>
#include <algorithm>
#include "stacker_shared.h"
#include "stacker_util.h"
#include "stacker_attribute_buffer.h"
namespace stkr {
#pragma pack(push, 1)
/* Helper used to read attribute data located after the header in memory. */
union AttributeData {
int16_t int16;
int32_t int32;
float float32;
char string[1];
};
struct BufferEntry {
Attribute header;
AttributeData data;
};
#pragma pack(pop)
/* Constants used to form operator masks, used in validation. */
enum AttributeOperatorBit {
AOP_BIT_SET = 1 << AOP_SET,
AOP_BIT_OVERRIDE = 1 << AOP_OVERRIDE,
AOP_BIT_ADD = 1 << AOP_ADD,
AOP_BIT_SUBTRACT = 1 << AOP_SUBTRACT,
AOP_BIT_MULTIPLY = 1 << AOP_MULTIPLY,
AOP_BIT_DIVIDE = 1 << AOP_DIVIDE,
AOP_BIT_ASSIGNMENT = AOP_BIT_SET | AOP_BIT_OVERRIDE,
AOP_BIT_ADDITIVE = AOP_BIT_ADD | AOP_BIT_SUBTRACT,
AOP_BIT_MULTIPLICATIVE = AOP_BIT_MULTIPLY | AOP_BIT_DIVIDE,
AOP_BIT_ARITHMETIC = AOP_BIT_ADDITIVE | AOP_BIT_MULTIPLICATIVE
};
extern const char * const STORAGE_STRINGS[NUM_ATTRIBUTE_TYPES] =
{ "none", "int16", "int32", "float32", "string" };
/* Returns the attribute operator corresponding to a token, or -1 if the token
* is not an operator token. */
int token_to_attribute_operator(int name)
{
switch (name) {
case TOKEN_EQUALS:
return AOP_SET;
case TOKEN_COLON_EQUALS:
return AOP_OVERRIDE;
case TOKEN_PLUS_EQUALS:
return AOP_ADD;
case TOKEN_DASH_EQUALS:
return AOP_SUBTRACT;
case TOKEN_STAR_EQUALS:
return AOP_MULTIPLY;
case TOKEN_SLASH_EQUALS:
return AOP_DIVIDE;
}
return -1;
}
/* Returns the storage type and mode set of an attribute given its name. */
AttributeSemantic attribute_semantic(int name)
{
switch (name) {
case TOKEN_WIDTH:
case TOKEN_HEIGHT:
case TOKEN_MIN_WIDTH:
case TOKEN_MIN_HEIGHT:
case TOKEN_MAX_WIDTH:
case TOKEN_MAX_HEIGHT:
case TOKEN_BACKGROUND_WIDTH:
case TOKEN_BACKGROUND_HEIGHT:
case TOKEN_BACKGROUND_OFFSET_X:
case TOKEN_BACKGROUND_OFFSET_Y:
return ASEM_DIMENSON;
case TOKEN_GROW:
case TOKEN_SHRINK:
return ASEM_GROWTH_FACTOR;
case TOKEN_PADDING:
case TOKEN_PADDING_LEFT:
case TOKEN_PADDING_RIGHT:
case TOKEN_PADDING_TOP:
case TOKEN_PADDING_BOTTOM:
case TOKEN_MARGIN:
case TOKEN_MARGIN_LEFT:
case TOKEN_MARGIN_RIGHT:
case TOKEN_MARGIN_TOP:
case TOKEN_MARGIN_BOTTOM:
case TOKEN_LEADING:
case TOKEN_INDENT:
return ASEM_ABSOLUTE_DIMENSION;
case TOKEN_URL:
return ASEM_URL;
case TOKEN_ARRANGE:
case TOKEN_ALIGN:
case TOKEN_BACKGROUND_HORIZONTAL_ALIGNMENT:
case TOKEN_BACKGROUND_VERTICAL_ALIGNMENT:
return ASEM_ALIGNMENT;
case TOKEN_JUSTIFY:
return ASEM_JUSTIFICATION;
case TOKEN_FONT:
case TOKEN_MATCH:
return ASEM_STRING;
case TOKEN_CLASS:
return ASEM_STRING_SET;
case TOKEN_FONT_SIZE:
case TOKEN_BORDER_WIDTH:
return ASEM_ABSOLUTE_DIMENSION;
case TOKEN_COLOR:
case TOKEN_BACKGROUND_COLOR:
case TOKEN_BORDER_COLOR:
case TOKEN_SELECTION_COLOR:
case TOKEN_SELECTION_FILL_COLOR:
case TOKEN_TINT:
return ASEM_COLOR;
case TOKEN_GLOBAL:
case TOKEN_BOLD:
case TOKEN_ITALIC:
case TOKEN_UNDERLINE:
case TOKEN_ENABLED:
case TOKEN_CLIP_LEFT:
case TOKEN_CLIP_RIGHT:
case TOKEN_CLIP_TOP:
case TOKEN_CLIP_BOTTOM:
return ASEM_FLAG;
case TOKEN_BACKGROUND:
return ASEM_BACKGROUND;
case TOKEN_LAYOUT:
return ASEM_LAYOUT;
case TOKEN_CLIP:
return ASEM_EDGES;
case TOKEN_WHITE_SPACE:
return ASEM_WHITE_SPACE;
case TOKEN_WRAP:
return ASEM_WRAP_MODE;
case TOKEN_BACKGROUND_SIZE:
return ASEM_BACKGROUND_SIZE;
case TOKEN_BACKGROUND_BOX:
case TOKEN_CLIP_BOX:
return ASEM_BOUNDING_BOX;
case TOKEN_CURSOR:
return ASEM_CURSOR;
}
return ASEM_INVALID;
}
/* Returns a mask of the storage types permitted for a (semantic, mode)
* combination. */
static unsigned storage_mask(AttributeSemantic semantic, int mode)
{
switch (semantic) {
case ASEM_DIMENSON:
case ASEM_ABSOLUTE_DIMENSION:
case ASEM_GROWTH_FACTOR:
return STORAGE_BIT_NUMERIC;
case ASEM_REAL:
return STORAGE_BIT_FLOAT32;
case ASEM_STRING:
case ASEM_STRING_SET:
case ASEM_URL:
return mode != ADEF_UNDEFINED ? STORAGE_BIT_STRING :
STORAGE_BIT_NONE;
case ASEM_BACKGROUND:
if (mode == BGMODE_URL)
return STORAGE_BIT_STRING;
if (mode == BGMODE_COLOR)
return STORAGE_BIT_INT32;
return STORAGE_BIT_NONE;
case ASEM_COLOR:
return STORAGE_BIT_INT32;
case ASEM_FLAG:
case ASEM_ALIGNMENT:
case ASEM_JUSTIFICATION:
case ASEM_LAYOUT:
case ASEM_WHITE_SPACE:
case ASEM_WRAP_MODE:
case ASEM_BACKGROUND_SIZE:
case ASEM_BOUNDING_BOX:
case ASEM_CURSOR:
case ASEM_EDGES:
return STORAGE_BIT_NONE;
}
ensure(false);
return STORAGE_NONE;
}
/* Given an attribute value token, returns a number specifying any special
* interpretation that should be used during the value's validation and
* conversion. For example, a number might be a percentage, or a string might be
* a URL. */
ValueSemantic value_semantic(int type_token)
{
switch (type_token) {
case TOKEN_INTEGER:
case TOKEN_STRING:
case TOKEN_FLOAT:
return VSEM_NONE;
case TOKEN_BOOLEAN:
return VSEM_BOOLEAN;
case TOKEN_PERCENTAGE:
return VSEM_PERCENTAGE;
case TOKEN_COLOR_LITERAL:
return VSEM_COLOR;
case TOKEN_URL_LITERAL:
return VSEM_URL;
default:
if (is_enum_token(type_token))
return VSEM_TOKEN;
break;
}
return VSEM_INVALID;
}
/* Returns a mask of operators that can be applied to a particular kind of
* attribute. */
static unsigned supported_operators(AttributeSemantic semantic)
{
switch (semantic) {
case ASEM_DIMENSON:
case ASEM_ABSOLUTE_DIMENSION:
case ASEM_REAL:
return AOP_BIT_ASSIGNMENT | AOP_BIT_ARITHMETIC;
case ASEM_STRING:
case ASEM_URL:
return AOP_BIT_ASSIGNMENT | AOP_BIT_ADD;
case ASEM_EDGES:
case ASEM_STRING_SET:
return AOP_BIT_ASSIGNMENT | AOP_BIT_ADDITIVE;
case ASEM_COLOR:
return AOP_BIT_ASSIGNMENT | AOP_BIT_MULTIPLY;
default:
break;
}
return AOP_BIT_ASSIGNMENT;
}
/* True if 'mode' means "auto" for a particular attribute. */
bool is_auto_mode(int name, int mode)
{
AttributeSemantic semantic = attribute_semantic(name);
switch (semantic) {
case ASEM_DIMENSON:
case ASEM_ABSOLUTE_DIMENSION:
return (mode == DMODE_AUTO);
}
return false;
}
/* True if an attribute can be inherited from parent nodes. */
bool is_inheritable(int name)
{
switch (name) {
case TOKEN_LEADING:
case TOKEN_INDENT:
case TOKEN_ARRANGE:
case TOKEN_ALIGN:
case TOKEN_JUSTIFY:
case TOKEN_FONT:
case TOKEN_FONT_SIZE:
case TOKEN_COLOR:
case TOKEN_BORDER_COLOR:
case TOKEN_BACKGROUND_COLOR:
case TOKEN_SELECTION_COLOR:
case TOKEN_SELECTION_FILL_COLOR:
case TOKEN_TINT:
case TOKEN_BOLD:
case TOKEN_ITALIC:
case TOKEN_UNDERLINE:
case TOKEN_ENABLED:
case TOKEN_WHITE_SPACE:
case TOKEN_WRAP:
case TOKEN_CURSOR:
return true;
}
return false;
}
AttributeAssignment make_assignment(Token name, int value,
ValueSemantic vs, AttributeOperator op)
{
AttributeAssignment assignment;
assignment.name = name;
assignment.op = op;
variant_set_integer(&assignment.value, value, vs);
return assignment;
}
AttributeAssignment make_assignment(Token name, unsigned value,
ValueSemantic vs, AttributeOperator op)
{
return make_assignment(name, (int)value, vs, op);
}
AttributeAssignment make_assignment(Token name, float value,
ValueSemantic vs, AttributeOperator op)
{
AttributeAssignment assignment;
assignment.name = name;
assignment.op = op;
variant_set_float(&assignment.value, value, vs);
return assignment;
}
AttributeAssignment make_assignment(Token name, const char *value,
ValueSemantic vs, AttributeOperator op)
{
AttributeAssignment assignment;
assignment.name = name;
assignment.op = op;
variant_set_string(&assignment.value, value, vs);
return assignment;
}
/* Parses a string of space- or comma-delimited tokens into the attribute
* storage form for string sets: zero or more null-terminated strings
* concatenated end to end, terminated by an extra null at the end. Returns
* a negative error code if the string has inconsistent delimiters. */
int parse_string_list(const char *s, int length, char *buffer,
unsigned buffer_size)
{
int result_length = 0, elements = 0;
char delimiter = 0;
for (int i = 0; i != length; ) {
while (i != length && isspace(s[i]))
i++;
if (i == length)
break;
if (elements != 0 && ((delimiter != 0) || s[i] == ',')) {
if ((delimiter != 0) != (s[i] == ',')) {
if (elements > 1)
return -1;
delimiter = s[i];
}
do { ++i; } while (i != length && isspace(s[i]));
}
int start = i;
while (i != length && !isspace(s[i]) && s[i] != ',')
++i;
if (i != start) {
unsigned token_length = i - start;
if (buffer != NULL && result_length + token_length + 1 < buffer_size) {
memcpy(buffer + result_length, s + start, token_length);
buffer[result_length + token_length] = '\0';
}
result_length += token_length + 1;
}
elements++;
}
if (buffer != NULL) {
if ((unsigned)result_length >= buffer_size)
buffer[buffer_size - 1] = '\0';
else
buffer[result_length] = '\0';
}
return result_length;
}
static bool string_set_contains(const char *s, unsigned length, const char *p)
{
const char *end = s + length;
while (s != end) {
if (0 == strcmp(p, s))
return true;
s += 1 + strlen(s);
}
return false;
}
/* Eliminates duplicates from a string set, returning the size delta. */
static int string_set_unique(char *s, unsigned length)
{
char *d = s;
while (*s != '\0') {
unsigned item_length = 1 + strlen(s);
length -= item_length;
if (!string_set_contains(s + item_length, length, s)) {
memmove(d, s, item_length);
d += item_length;
}
s += item_length;
}
*d = '\0';
return d - s;
}
/* Deletes entries in A that are part of B. A and B are null-terminated lists
* of null-terminated strings. Returns the (zero or negative) adjustment in
* the number of characters in A. */
static int string_set_difference(char *a, const char *b, unsigned length_b)
{
unsigned length_p;
const char *p;
for (p = a; *p != '\0'; p += 1 + length_p) {
length_p = strlen(p);
if (!string_set_contains(b, length_b, p)) {
strcpy(a, p);
a += length_p + 1;
}
}
*a = '\0';
return a - p;
}
static const unsigned VALIDATION_BUFFER_SIZE = 1024;
/* Temporary container for the result of validation. */
struct ValidationResult {
AttributeSemantic semantic;
AttributeStorage storage;
char buffer[VALIDATION_BUFFER_SIZE];
AttributeData *data;
int size;
int capacity;
int terminators;
};
static void vresult_init(ValidationResult *vr)
{
vr->storage = STORAGE_NONE;
vr->capacity = 0;
vr->size = 0;
vr->data = (AttributeData *)vr->buffer;
vr->terminators = 0;
}
static void vresult_set_static(ValidationResult *vr, const char *s, unsigned length)
{
vr->storage = STORAGE_STRING;
vr->data = (AttributeData *)s;
vr->size = (int)length;
vr->capacity = 0;
vr->terminators = 1;
}
static char *vresult_allocate(ValidationResult *vr, unsigned capacity)
{
vr->storage = STORAGE_STRING;
if (capacity > VALIDATION_BUFFER_SIZE) {
vr->data = (AttributeData *)(new char[capacity]);
vr->capacity = (int)capacity;
} else {
vr->data = (AttributeData *)vr->buffer;
vr->capacity = -int(capacity);
}
return vr->data->string;
}
static void vresult_free(ValidationResult *vr)
{
if (vr->capacity > 0)
delete [] (char *)vr->data;
}
/* Performs validation checks common to all attributes. A return value <= 0
* indicates that validation has succeded or failed in the pre-check. */
static int initialize_validation(int name, ValueSemantic vs,
AttributeOperator op, ValidationResult *result)
{
vs;
/* Make sure the token is an attribute name. */
AttributeSemantic as = attribute_semantic(name);
if (as == ASEM_INVALID)
return STKR_NO_SUCH_ATTRIBUTE;
result->semantic = as;
/* A valid operation for this kind of attribute? */
if (((1 << op) & supported_operators(as)) == 0)
return STKR_INVALID_OPERATION;
return ADEF_DEFINED;
}
/* Determines whether an integer (value, semantic) pair can be assigned to an
* attribute with the specified semantic. If it can, the mode the attribute
* will be switched into is returned. Otherwise, a validation error code is
* returned. */
static int validate_integer(int name, ValueSemantic vs, int value,
AttributeOperator op, ValidationResult *result)
{
int rc = initialize_validation(name, vs, op, result);
if (rc < ADEF_DEFINED)
return rc;
/* Every attribute can be undefined. */
if (vs == VSEM_TOKEN && value == TOKEN_UNDEFINED)
return ADEF_UNDEFINED;
/* What mode will this (value, semantic) pair switch the attribute into? */
int mode = STKR_TYPE_MISMATCH;
AttributeSemantic as = result->semantic;
switch (as) {
case ASEM_DIMENSON:
if (vs == VSEM_PERCENTAGE) {
mode = unsigned(value) > 100 ?
STKR_OUT_OF_BOUNDS : DMODE_FRACTIONAL;
}
/* Fall through. */
case ASEM_ABSOLUTE_DIMENSION:
if (vs == VSEM_TOKEN && value == TOKEN_AUTO)
mode = DMODE_AUTO;
else if (vs == VSEM_NONE)
mode = DMODE_ABSOLUTE;
break;
case ASEM_GROWTH_FACTOR:
if (vs == VSEM_NONE)
mode = value < 0 ? STKR_OUT_OF_BOUNDS : ADEF_DEFINED;
break;
case ASEM_COLOR:
if (vs == VSEM_COLOR || vs == VSEM_NONE)
mode = ADEF_DEFINED;
break;
case ASEM_FLAG:
if (vs == VSEM_BOOLEAN) {
if (value == 0)
mode = FLAGMODE_FALSE;
else if (value == 1)
mode = FLAGMODE_TRUE;
else
mode = STKR_OUT_OF_BOUNDS;
}
break;
case ASEM_ALIGNMENT:
if (vs == VSEM_TOKEN) {
mode = ALIGN_START + (value - TOKEN_START);
if (mode < ALIGN_START || mode >= ALIGN_SENTINEL)
mode = STKR_TYPE_MISMATCH;
}
break;
case ASEM_JUSTIFICATION:
if (vs == VSEM_TOKEN) {
switch (value) {
case TOKEN_LEFT:
mode = JUSTIFY_LEFT;
break;
case TOKEN_RIGHT:
mode = JUSTIFY_RIGHT;
break;
case TOKEN_CENTER:
mode = JUSTIFY_CENTER;
break;
case TOKEN_FLUSH:
mode = JUSTIFY_FLUSH;
break;
default:
mode = STKR_TYPE_MISMATCH;
break;
}
}
break;
case ASEM_LAYOUT:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_NONE) {
mode = LAYOUT_NONE;
} else {
mode = LAYOUT_BLOCK + (value - TOKEN_BLOCK);
if (mode < LAYOUT_BLOCK || mode >= LAYOUT_SENTINEL)
mode = STKR_TYPE_MISMATCH;
}
}
break;
case ASEM_EDGES:
if (vs == VSEM_TOKEN) {
switch (value) {
case TOKEN_NONE:
mode = EDGE_FLAG_NONE;
break;
case TOKEN_ALL:
mode = EDGE_FLAG_ALL;
break;
case TOKEN_HORIZONTAL:
mode = EDGE_FLAG_HORIZONTAL;
break;
case TOKEN_VERTICAL:
mode = EDGE_FLAG_VERTICAL;
break;
case TOKEN_LEFT:
mode = EDGE_FLAG_LEFT;
break;
case TOKEN_RIGHT:
mode = EDGE_FLAG_RIGHT;
break;
case TOKEN_TOP:
mode = EDGE_FLAG_TOP;
break;
case TOKEN_BOTTOM:
mode = EDGE_FLAG_BOTTOM;
break;
default:
mode = STKR_TYPE_MISMATCH;
break;
}
} else if (vs == VSEM_EDGES) {
mode = (value == (value & EDGE_FLAG_ALL)) ?
value : STKR_OUT_OF_BOUNDS;
}
break;
case ASEM_WHITE_SPACE:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_NORMAL)
mode = WSM_NORMAL;
else if (value == TOKEN_PRESERVE)
mode = WSM_PRESERVE;
else
mode = STKR_TYPE_MISMATCH;
}
break;
case ASEM_WRAP_MODE:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_WORD_WRAP)
mode = WRAPMODE_WORD;
else if (value == TOKEN_CHARACTER_WRAP)
mode = WRAPMODE_CHARACTER;
else
mode = STKR_TYPE_MISMATCH;
}
break;
case ASEM_BOUNDING_BOX:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_AUTO || value == TOKEN_NONE) {
mode = BBOX_PADDING;
} else {
mode = BBOX_CONTENT + (value - TOKEN_CONTENT_BOX);
if (mode < BBOX_CONTENT || mode >= BBOX_SENTINEL)
mode = STKR_TYPE_MISMATCH;
}
}
break;
case ASEM_BACKGROUND_SIZE:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_AUTO || value == TOKEN_NONE) {
mode = VLPM_STANDARD;
} else {
mode = VLPM_FIT + (value - TOKEN_FIT);
if (mode < VLPM_FIT || mode >= VLPM_SENTINEL)
mode = STKR_TYPE_MISMATCH;
}
}
break;
case ASEM_BACKGROUND:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_NONE) {
mode = ADEF_UNDEFINED;
} else {
mode = BGMODE_PANE_FIRST + (value - TOKEN_FLAT);
if (mode < BGMODE_PANE_FIRST || mode > BGMODE_PANE_LAST)
mode = STKR_TYPE_MISMATCH;
}
} else if (vs == VSEM_COLOR) {
mode = BGMODE_COLOR;
}
break;
case ASEM_CURSOR:
if (vs == VSEM_TOKEN) {
if (value == TOKEN_DEFAULT || value == TOKEN_AUTO ||
value == TOKEN_NONE) {
mode = CT_DEFAULT;
} else {
mode = CT_HAND + (value - TOKEN_CURSOR_HAND);
if (mode < CT_HAND || mode >= CT_SENTINEL)
mode = STKR_TYPE_MISMATCH;
}
}
break;
}
if (mode < 0)
return mode;
/* Choose the smallest storage type that can represent the value without
* loss of information, or, failing that, the widest permitted type. */
unsigned permitted_types = storage_mask(as, mode);
if ((permitted_types & STORAGE_BIT_INT16) != 0 &&
value >= SHRT_MIN && value <= SHRT_MAX) {
result->storage = STORAGE_INT16;
} else if ((permitted_types & STORAGE_BIT_INT32) != 0) {
result->storage = STORAGE_INT32;
} else if ((permitted_types & STORAGE_BIT_FLOAT32) != 0) {
result->storage = STORAGE_FLOAT32;
} else if ((permitted_types & STORAGE_BIT_INT16) != 0) {
result->storage = STORAGE_INT16;
} else if ((permitted_types & STORAGE_BIT_NONE) != 0) {
result->storage = STORAGE_NONE;
} else {
assertb(false);
return 0;
}
/* Convert the value to its storage type. */
switch (result->storage) {
case STORAGE_NONE:
result->size = 0;
break;
case STORAGE_INT16:
if (value < SHRT_MIN || value > SHRT_MAX)
return STKR_OUT_OF_BOUNDS;
if (as == ASEM_DIMENSON && mode == DMODE_FRACTIONAL) {
ensure(vs == VSEM_PERCENTAGE);
value = int((uint32_t)value * INT16_MAX / 100u);
}
result->data->int16 = (int16_t)value;
result->size = sizeof(int16_t);
break;
case STORAGE_INT32:
if (as == ASEM_DIMENSON && mode == DMODE_FRACTIONAL) {
ensure(vs == VSEM_PERCENTAGE);
value = int((uint64_t)value * INT32_MAX / 100ull);
}
result->data->int32 = value;
result->size = sizeof(int32_t);
break;
case STORAGE_FLOAT32:
result->data->float32 = (float)value;
result->size = sizeof(float);
break;
default:
assertb(false);
return 0;
}
return mode;
}
static int validate_float(int name, ValueSemantic vs, float value,
AttributeOperator op, ValidationResult *result)
{
int rc = initialize_validation(name, vs, op, result);
if (rc < ADEF_DEFINED)
return rc;
/* Determine the mode. */
int mode = STKR_TYPE_MISMATCH;
AttributeSemantic as = result->semantic;
switch (as) {
case ASEM_DIMENSON:
if (vs == VSEM_PERCENTAGE) {
float tolerance = 100.0f * FLT_EPSILON;
mode = (value < -tolerance || value > 100.0f + tolerance) ?
STKR_OUT_OF_BOUNDS : DMODE_FRACTIONAL;
break;
}
/* Fall through. */
case ASEM_ABSOLUTE_DIMENSION:
if (vs == VSEM_NONE)
mode = DMODE_ABSOLUTE;
break;
case ASEM_GROWTH_FACTOR:
if (vs == VSEM_NONE) {
mode = ADEF_DEFINED;
if (value < 0.0f)
mode = STKR_OUT_OF_BOUNDS;
}
break;
}
if (mode < 0)
return mode;
/* Choose the widest numeric type permitted. */
unsigned permitted_types = storage_mask(as, mode);
if ((permitted_types & STORAGE_BIT_FLOAT32) != 0) {
result->storage = STORAGE_FLOAT32;
} else if ((permitted_types & STORAGE_BIT_INT32) != 0) {
result->storage = STORAGE_INT32;
} else if ((permitted_types & STORAGE_BIT_INT16) != 0) {
result->storage = STORAGE_INT16;
} else if ((permitted_types & STORAGE_BIT_NONE) != 0) {
result->storage = STORAGE_NONE;
} else {
assertb(false);
return 0;
}
/* Convert the value to its storage type. */
if (vs == VSEM_PERCENTAGE)
value *= 1.0f / 100.0f;
switch (result->storage) {
case STORAGE_NONE:
result->size = 0;
break;
case STORAGE_INT16:
if (value < float(SHRT_MIN) || value > float(SHRT_MAX))
return STKR_OUT_OF_BOUNDS;
if (as == ASEM_DIMENSON && mode == DMODE_FRACTIONAL) {
result->data->int16 = (int16_t)round_signed(value * float(INT16_MAX));
} else {
result->data->int16 = (int16_t)round_signed(value);
}
result->size = sizeof(int16_t);
break;
case STORAGE_INT32:
if (as == ASEM_DIMENSON && mode == DMODE_FRACTIONAL) {
result->data->int32 = round_signed(value * float(INT32_MAX));
} else {
result->data->int32 = round_signed(value);
}
result->size = sizeof(int32_t);
break;
case STORAGE_FLOAT32:
result->data->float32 = value;
result->size = sizeof(float);
break;
default:
assertb(false);
return 0;
}
return mode;
}
/* Determines whether an string (value, semantic) pair can be assigned to an
* attribute with the specified semantic. If it can, the mode the attribute
* will be switched into is returned. Otherwise, a validation error code is
* returned. */
static int validate_string(int name, ValueSemantic vs,
const char *value, int length, AttributeOperator op,
ValidationResult *result)
{
int rc = initialize_validation(name, vs, op, result);
if (rc < ADEF_DEFINED)
return rc;
if (length < 0)
length = (int)strlen(value);
vresult_set_static(result, value, length);
/* Determine the new mode. */
int mode = STKR_TYPE_MISMATCH;
AttributeSemantic as = result->semantic;
switch (as) {
case ASEM_STRING:
if (vs == VSEM_NONE)
mode = ADEF_DEFINED;
break;
case ASEM_STRING_SET:
if (vs == VSEM_NONE || vs == VSEM_LIST)
mode = ADEF_DEFINED;
break;
case ASEM_URL:
if (vs == VSEM_NONE || vs == VSEM_URL)
mode = ADEF_DEFINED;
break;
case ASEM_BACKGROUND:
if (vs == VSEM_URL)
mode = BGMODE_URL;
break;
}
if (mode < 0)
return mode;
/* Choose the storage type. */
unsigned permitted_types = storage_mask(as, mode);
if ((permitted_types & STORAGE_BIT_STRING) != 0) {
result->storage = STORAGE_STRING;
} else if ((permitted_types & STORAGE_BIT_NONE) != 0) {
result->storage = STORAGE_NONE;
} else {
assertb(false);
return 0;
}
/* Convert the value to storage form if required. */
if (as == ASEM_STRING_SET) {
rc = parse_string_list(value, length, result->buffer,
sizeof(result->buffer));
if (rc < 0)
return rc;
if (rc >= sizeof(result->buffer)) {
rc = parse_string_list(value, length,
vresult_allocate(result, rc + 1), rc + 1);
} else {
result->data = (AttributeData *)result->buffer;
}
result->size = rc;
result->terminators = 1;
if (rc >= 0)
result->size += string_set_unique(result->data->string, rc);
mode = rc < 0 ? rc : ADEF_DEFINED;
}
return mode;
}
static BufferEntry *abuf_allocate_replace(
AttributeBuffer *abuf,
int name,
int mode,
AttributeStorage storage_type,
AttributeOperator op,
unsigned required_size);
static int abuf_fold(
AttributeBuffer *abuf,
BufferEntry *ea,
AttributeStorage type_b,
int mode_b,
AttributeOperator op_b,
const AttributeData *data_b,
unsigned size_b,
BufferEntry **out_folded);
/*
* Attribute Buffers
*/
inline BufferEntry *abuf_next_entry(BufferEntry *entry)
{
return (BufferEntry *)((char *)entry + sizeof(Attribute) +
entry->header.size);
}
inline BufferEntry *abuf_end(AttributeBuffer *abuf)
{
return (BufferEntry *)(abuf->buffer + abuf->size);
}
/* Returns the number of attributes in the range [start, end). */
static unsigned count_attributes_between(const BufferEntry *start,
const BufferEntry *end)
{
unsigned count = 0;
while (start != end) {
start = abuf_next_entry((BufferEntry *)start);
count++;
}
return count;
}
static void abuf_reallocate(AttributeBuffer *abuf, unsigned new_size)
{
if (int(new_size) > abs(abuf->capacity)) {
char *block = new char[new_size];
if (abuf->buffer != NULL) {
memcpy(block, abuf->buffer, abuf->size);
if (abuf->capacity > 0)
delete [] abuf->buffer;
}
abuf->buffer = block;
abuf->capacity = int(new_size);
}
abuf->size = int(new_size);
}
/* Allocates a new entry at the end of the buffer. */
static BufferEntry *abuf_create_attribute(AttributeBuffer *abuf, int name,
int mode, AttributeStorage storage, AttributeOperator op,
unsigned data_size)
{
unsigned offset = abuf->size;
unsigned new_size = abuf->size + sizeof(Attribute) + data_size;
abuf_reallocate(abuf, new_size);
BufferEntry *entry = (BufferEntry *)((char *)abuf->buffer + offset);
entry->header.name = (uint8_t)name;
entry->header.mode = mode;
entry->header.type = storage;
entry->header.folded = false;
entry->header.op = op;
entry->header.size = check16(data_size);
abuf->num_attributes++;
return entry;
}
/* Deletes a single buffer entry. */
static void abuf_remove_one(AttributeBuffer *abuf, Attribute *attribute)
{
unsigned attr_size = sizeof(Attribute) + attribute->size;
char *buf_end = (char *)abuf->buffer + abuf->size;
char *attr_end = (char *)attribute + attr_size;
unsigned suffix = buf_end - attr_end;
memmove(attribute, attr_end, suffix);
abuf->size -= int(attr_size);
abuf->num_attributes--;
}
/* Removes all entries for a name. */
static void abuf_remove_all(AttributeBuffer *abuf, int name)
{
BufferEntry *entry = (BufferEntry *)abuf->buffer;
BufferEntry *end = (BufferEntry *)(abuf->buffer + abuf->size);
unsigned bytes_removed = 0;
while (entry != end) {
unsigned entry_size = sizeof(Attribute) + entry->header.size;
unsigned gap = 0;
if (entry->header.name == name) {
gap = entry_size;
abuf->num_attributes--;
}
memmove((char *)entry - bytes_removed, entry, entry_size);
entry = (BufferEntry *)((char *)entry + entry_size);
bytes_removed += gap;
}
abuf->size -= bytes_removed;
}
/* Allocates or reallocates storage for a single buffer entry. Any existing
* entries for the attribute are removed. */
static BufferEntry *abuf_allocate_replace(AttributeBuffer *abuf, int name,
int mode, AttributeStorage storage_type, AttributeOperator op,
unsigned required_size)
{
/* FIXME (TJM): reuse memory. */
abuf_remove_all(abuf, name);
return abuf_create_attribute(abuf, name, mode, storage_type,
op, required_size);
}
/* Resizes a buffer entry. Existing entry data is preserved (but will be
* truncated if the new size is smaller than the old). */
static BufferEntry *abuf_resize_entry(AttributeBuffer *abuf,
BufferEntry *entry, unsigned data_size)
{
unsigned new_size = abuf->size + (data_size - entry->header.size);
unsigned start_offset = (char *)entry - (char *)abuf->buffer;
unsigned old_end_offset = start_offset + sizeof(Attribute) + entry->header.size;
unsigned new_end_offset = start_offset + sizeof(Attribute) + data_size;
char *old_end = abuf->buffer + old_end_offset;
if (int(new_size) > abs(abuf->capacity)) {
char *new_buffer = new char[new_size];
char *new_end = new_buffer + new_end_offset;
unsigned copy_size = std::min(old_end_offset, new_end_offset);
memcpy(new_buffer, abuf->buffer, copy_size);
memcpy(new_end, old_end, abuf->size - old_end_offset);
entry = (BufferEntry *)(new_buffer + start_offset);
if (abuf->capacity > 0)
delete [] abuf->buffer;
abuf->buffer = new_buffer;
abuf->capacity = int(new_size);
} else {
char *new_end = (char *)abuf->buffer + new_end_offset;
memmove(new_end, old_end, abuf->size - old_end_offset);
}
abuf->size = int(new_size);
entry->header.size = check16(data_size);
return entry;
}
void abuf_init(AttributeBuffer *abuf, void *storage, unsigned storage_size)
{
abuf->buffer = storage_size != 0 ? (char *)storage : NULL;
abuf->size = 0;
abuf->capacity = -int(storage_size);
abuf->num_attributes = 0;
}
void abuf_clear(AttributeBuffer *abuf)
{
if (abuf->capacity > 0) {
delete [] abuf->buffer;
abuf->buffer = NULL;
abuf->capacity = 0;
}
abuf->size = 0;
abuf->num_attributes = 0;
}
const Attribute *abuf_first(const AttributeBuffer *abuf)
{
return abuf->size != 0 ? (const Attribute *)(abuf->buffer) : NULL;
}
const Attribute *abuf_next(const AttributeBuffer *abuf,
const Attribute *attribute)
{
if (attribute != NULL) {
const BufferEntry *end = abuf_end((AttributeBuffer *)abuf);
const BufferEntry *next = abuf_next_entry((BufferEntry *)attribute);
attribute = (next != end) ? (const Attribute *)next : NULL;
}
return attribute;
}
/* Appends an entry to the end of the buffer. */
Attribute *abuf_append(AttributeBuffer *abuf, const Attribute *attribute)
{
unsigned attr_size = sizeof(Attribute) + attribute->size;
abuf_reallocate(abuf, abuf->size + attr_size);
BufferEntry *dest = (BufferEntry *)(abuf->buffer + abuf->size - attr_size);
memcpy(dest, attribute, attr_size);
abuf->num_attributes++;
return &dest->header;
}
/* Adds an entry to the start of the buffer. */
Attribute *abuf_prepend(AttributeBuffer *abuf, const Attribute *attribute)
{
unsigned attr_size = sizeof(Attribute) + attribute->size;
abuf_reallocate(abuf, abuf->size + attr_size);
memmove(abuf->buffer + attr_size, abuf->buffer, abuf->size - attr_size);
memcpy(abuf->buffer, attribute, attr_size);
abuf->num_attributes++;
return (Attribute *)abuf_first(abuf);
}
/* Overwrites one attribute with another in place. */
Attribute *abuf_replace(AttributeBuffer *abuf, Attribute *a,
const Attribute *b)
{
BufferEntry *ea = (BufferEntry *)a;
if (ea->header.size != b->size)
ea = abuf_resize_entry(abuf, ea, b->size);
memcpy(ea, b, sizeof(Attribute) + b->size);
return &ea->header;
}
/* Replaces the range of attributes [start, end) with the attributes from a
* source buffer. */
void abuf_replace_range(AttributeBuffer *abuf, const Attribute *start,
const Attribute *end, const AttributeBuffer *source)
{
if (start == NULL)
start = (const Attribute *)abuf_first(abuf);
if (end == NULL)
end = (const Attribute *)abuf_end(abuf);
unsigned old_start = 0;
unsigned new_range_size = 0;
if (source != NULL) {
new_range_size = source->size;
abuf->num_attributes += source->num_attributes;
}
if (start != NULL && end != NULL) {
old_start = (char *)start - abuf->buffer;
unsigned old_end = (char *)end - abuf->buffer;
unsigned old_range_size = old_end - old_start;
unsigned old_size = abuf->size;
abuf->num_attributes -= count_attributes_between(
(const BufferEntry *)start,
(const BufferEntry *)end);
unsigned new_end = old_start + new_range_size;
unsigned new_size = abuf->size + new_range_size - old_range_size;
abuf_reallocate(abuf, new_size);
memmove(abuf->buffer + new_end, abuf->buffer + old_end,
old_size - old_end);
} else {
abuf_reallocate(abuf, new_range_size);
}
if (new_range_size != 0)
memcpy(abuf->buffer + old_start, source->buffer, new_range_size);
}
/* Returns the value of a numerical attribute as an integer. */
static int unpack_integer(AttributeSemantic semantic, int mode,
AttributeStorage storage, const AttributeData *data)
{
semantic; mode;
switch (storage) {
case STORAGE_INT16:
return (int)data->int16;
case STORAGE_INT32:
return data->int32;
case STORAGE_FLOAT32:
return round_signed(data->float32);
}
assertb(false);
return 0;
}
/* Returns the value of numerical attribute as a float. */
static float unpack_float(AttributeSemantic semantic, int mode,
AttributeStorage storage, const AttributeData *data)
{
float result;
switch (storage) {
case STORAGE_INT16:
result = float(data->int16);
if (semantic == ASEM_DIMENSON && mode == DMODE_FRACTIONAL)
result *= 1.0f / float(INT16_MAX);
break;
case STORAGE_INT32:
result = float(data->int32);
if (semantic == ASEM_DIMENSON && mode == DMODE_FRACTIONAL)
result *= 1.0f / float(INT32_MAX);
break;
case STORAGE_FLOAT32:
result = data->float32;
break;
default:
assertb(false);
result = 0.0f;
break;
}
return result;
}
static int do_integer_op(AttributeOperator op, int va, int vb)
{
switch (op) {
case AOP_ADD:
return va + vb;
case AOP_SUBTRACT:
return va - vb;
case AOP_MULTIPLY:
return va * vb;
case AOP_DIVIDE:
return vb != 0 ? va / vb : 0;
case AOP_SET:
case AOP_OVERRIDE:
return vb;
}
assertb(false);
return 0;
}
static float do_float_op(AttributeOperator op, float va, float vb)
{
switch (op) {
case AOP_ADD:
return va + vb;
case AOP_SUBTRACT:
return va - vb;
case AOP_MULTIPLY:
return va * vb;
case AOP_DIVIDE:
return vb != 0.0f ? va / vb : 0.0f;
case AOP_SET:
case AOP_OVERRIDE:
return vb;
}
assertb(false);
return 0.0f;
}
/* Attempts to replace operation A with an operation that does the same thing
* as A followed by B. Returns a pointer to the modified A if folding occurred,
* otherwise returns NULL. */
static int abuf_fold(
AttributeBuffer *abuf,
BufferEntry *ea,
AttributeStorage type_b,
int mode_b,
AttributeOperator op_b,
const AttributeData *data_b,
unsigned size_b,
BufferEntry **out_folded)
{
/* Assignments just replace the existing attribute with a SET. */
AttributeOperator op_a = (AttributeOperator)ea->header.op;
if (op_b <= AOP_OVERRIDE) {
if (ea->header.size != size_b)
ea = abuf_resize_entry(abuf, ea, size_b);
ea->header.mode = mode_b;
ea->header.folded = false;
ea->header.op = op_b;
ea->header.size = size_b;
ea->header.type = type_b;
memcpy(&ea->data, data_b, size_b);
if (out_folded != NULL)
*out_folded = ea;
return true;
}
/* Arithmetic with an undefined RHS is a no-op. */
if (mode_b == ADEF_UNDEFINED) {
if (out_folded != NULL)
*out_folded = ea;
return false;
}
/* The type of the result is the wider of the operand types. */
AttributeSemantic as = attribute_semantic(ea->header.name);
AttributeStorage type_a = (AttributeStorage)ea->header.type;
AttributeStorage type_ab = type_a > type_b ? type_a : type_b;
/* Determine the operation to execute and the operation represented by the
* result. */
AttributeOperator op = op_b, result_op = op_a;
if (op_a <= AOP_OVERRIDE) {
/* A is a set. The result is the same kind set. */
result_op = op_a;
} else {
/* Neither op is a set. The result is a modifier. */
if (op_a == op_b) {
/* The operators are the same. We can always fold, but if the
* operator is non-associative, we have to invert it so that the
* folded operation has the same effect as applying A followed
* by B, e.g. -(a - b) => -(a + b) == - a - b. */
if (op == AOP_SUBTRACT || op == AOP_DIVIDE)
op = (AttributeOperator)(int(op) + 1);
} else {
/* Different operators can be folded only if they are closed over
* the result type. This is true of the arithmetic operators but not
* of set-difference. For example, the sequence "+ 4 - 3" can be
* folded into "+1", but the sequence "union {x} diff {y}" cannot be
* represented as a single set union or difference. */
if (as == ASEM_STRING_SET)
return STKR_CANNOT_FOLD;
}
}
/* Perform the operation. */
bool changed = false;
if (type_ab == STORAGE_NONE) {
assertb(as == ASEM_EDGES);
int new_mode = ea->header.mode;
switch (op) {
case AOP_ADD:
new_mode |= mode_b;
break;
case AOP_SUBTRACT:
new_mode &= ~mode_b;
break;
}
if ((new_mode & EDGE_FLAG_ALL) != 0)
new_mode &= ~EDGE_FLAG_NONE;
if (new_mode != ea->header.mode) {
ea->header.mode = new_mode;
changed = true;
}
} else if (type_ab == STORAGE_INT16 || type_ab == STORAGE_INT32) {
int va = unpack_integer(as, ea->header.mode, type_a, &ea->data);
int vb = unpack_integer(as, mode_b, type_b, data_b);
int result = do_integer_op(op, va, vb);
if (type_a != type_ab) {
unsigned data_size = (type_ab == STORAGE_INT16) ?
sizeof(int16_t) : sizeof(int32_t);
ea = abuf_resize_entry(abuf, ea, data_size);
ea->header.type = type_ab;
changed = true;
}
if (type_ab == STORAGE_INT16) {
if (as == ASEM_DIMENSON && (ea->header.mode == DMODE_FRACTIONAL ||
mode_b == DMODE_FRACTIONAL))
result >>= 16;
int16_t converted = saturate16(result);
if (converted != ea->data.int16) {
ea->data.int16 = converted;
changed = true;
}
} else {
if (ea->data.int32 != result) {
ea->data.int32 = result;
changed = true;
}
}
} else if (type_ab == STORAGE_FLOAT32) {
float va = unpack_float(as, ea->header.mode, type_a, &ea->data);
float vb = unpack_float(as, mode_b, type_b, data_b);
float result = do_float_op(op, va, vb);
if (type_a != STORAGE_FLOAT32) {
ea = abuf_resize_entry(abuf, ea, sizeof(float));
ea->header.type = STORAGE_FLOAT32;
changed = true;
}
if (result != ea->data.float32) {
ea->data.float32 = result;
changed = true;
}
} else if (type_ab == STORAGE_STRING) {
if (type_a == STORAGE_NONE) {
ea = abuf_resize_entry(abuf, ea, size_b);
ea->header.mode = mode_b;
ea->header.folded = false;
ea->header.op = op_b;
ea->header.size = size_b;
ea->header.type = type_b;
memcpy(&ea->data, data_b, size_b);
changed = true;
} else {
unsigned length_a = ea->header.size - 1;
unsigned length_b = size_b - 1;
unsigned length_ab;
ea->header.type = STORAGE_STRING;
char *p = ea->data.string, *q = (char *)data_b->string;
if (op == AOP_ADD) {
length_ab = length_a + length_b;
if (ea->header.size != length_ab + 1) {
ea = abuf_resize_entry(abuf, ea, length_ab + 1);
p = ea->data.string;
}
memcpy(p + length_a, q, length_b + 1);
q = p + length_a;
} else {
length_ab = length_a;
}
if (as == ASEM_STRING_SET) {
unsigned length_q = length_b;
if (op == AOP_ADD) {
std::swap(p, q);
length_q = length_a;
}
length_ab += string_set_difference(p, q, length_q);
if (ea->header.size != length_ab + 1)
ea = abuf_resize_entry(abuf, ea, length_ab + 1);
}
changed = length_ab != length_a;
}
}
ea->header.op = result_op;
if (out_folded != NULL)
*out_folded = ea;
return changed;
}
int abuf_fold(AttributeBuffer *abuf, Attribute *a, const Attribute *b,
Attribute **out_folded)
{
return abuf_fold(
abuf,
(BufferEntry *)a,
(AttributeStorage)b->type,
b->mode,
(AttributeOperator)b->op,
&((const BufferEntry *)b)->data,
b->size,
(BufferEntry **)out_folded);
}
/* Returns an attribute's current mode, or 'defmode' if the attribute is
* undefined. */
int abuf_read_mode(const Attribute *attribute, int defmode)
{
return attribute != NULL && attribute->mode != ADEF_UNDEFINED ?
attribute->mode : defmode;
}
/* Reads an attribute as an integer. */
int abuf_read_integer(const Attribute *attribute, int32_t *result,
int32_t defval)
{
if (attribute == NULL || attribute->mode == ADEF_UNDEFINED) {
*result = defval;
return ADEF_UNDEFINED;
}
AttributeSemantic as = attribute_semantic(attribute->name);
const BufferEntry *entry = (const BufferEntry *)attribute;
*result = unpack_integer(as, entry->header.mode,
(AttributeStorage)entry->header.type, &entry->data);
return attribute->mode;
}
/* Reads an attribute as an integer. If the attribute represent a partially
* evaluated expression, it is evaluated with the supplied LHS.*/
int abuf_evaluate_integer(const Attribute *attribute, int32_t *result,
int32_t lhs, int32_t defval)
{
int mode = abuf_read_integer(attribute, result, defval);
if (mode != ADEF_UNDEFINED)
*result = do_integer_op((AttributeOperator)attribute->op, lhs, *result);
return mode;
}
/* Reads an attribute as a float. */
int abuf_read_float(const Attribute *attribute, float *result, float defval)
{
if (attribute == NULL || attribute->mode == ADEF_UNDEFINED) {
*result = defval;
return ADEF_UNDEFINED;
}
AttributeSemantic as = attribute_semantic(attribute->name);
const BufferEntry *entry = (const BufferEntry *)attribute;
*result = unpack_float(as, entry->header.mode,
(AttributeStorage)entry->header.type, &entry->data);
return attribute->mode;
}
/* Reads an attribute as a float. If the attribute represent a partially
* evaluated expression, it is evaluated with the supplied LHS. */
int abuf_evaluate_float(const Attribute *attribute, float *result,
float lhs, float defval)
{
int mode = abuf_read_float(attribute, result, defval);
if (mode != ADEF_UNDEFINED)
*result = do_float_op((AttributeOperator)attribute->op, lhs, *result);
return mode;
}
/* Reads an attribute value as a string, returning a pointer to the data inside
* the buffer via 'result'. The result string is guaranteed to be null
* terminated. The result pointer is invalidated by any mutation of the
* attribute buffer. */
int abuf_read_string(const Attribute *attribute, const char **result,
uint32_t *length, const char *defval)
{
if (attribute == NULL || attribute->mode == ADEF_UNDEFINED)
goto missing;
switch (attribute->type) {
case STORAGE_STRING:
*result = ((const BufferEntry *)attribute)->data.string;
if (length != NULL)
*length = attribute->size - 1;
break;
default:
assertb(false);
goto missing;
}
return attribute->mode;
missing:
*result = defval;
if (length != NULL)
*length = defval != NULL ? strlen(defval) : 0;
return ADEF_UNDEFINED;
}
/* Reads an attribute value as a string, copying the result to 'buffer', which
* is guaranteed to be null terminated. */
int abuf_read_string(const Attribute *attribute, char *buffer,
uint32_t buffer_size, uint32_t *out_length, const char *defval,
StringSetRepresentation ssr)
{
const char *data = NULL;
uint32_t length = 0;
int mode = abuf_read_string(attribute, &data, &length, defval);
if (buffer != NULL && buffer_size != 0) {
if (length + 1 > buffer_size)
length = buffer_size - 1;
memcpy(buffer, data, length);
buffer[length] = '\0';
/* If this is a set, format a set literal of the requested type. */
if (attribute_semantic(attribute->name) == ASEM_STRING_SET &&
ssr != SSR_INTERNAL) {
char delimiter = (ssr == SSR_COMMA_DELIMITED) ? ',' : ' ';
for (unsigned i = 0; i < length; ++i)
if (buffer[i] == '\0')
buffer[i] = delimiter;
if (length != 0)
buffer[--length] = '\0';
}
}
if (out_length != NULL)
*out_length = length;
return mode;
}
/* Creates a new attribute at the end of the buffer and stores the supplied
* value in it. Does not check for existing values. */
static Attribute *append_validated_attribute(AttributeBuffer *abuf, int name,
int mode, AttributeOperator op, const ValidationResult *vr)
{
if (mode < 0)
return NULL;
BufferEntry *entry = abuf_create_attribute(abuf, name, mode, vr->storage,
op, vr->size + vr->terminators);
memcpy(&entry->data, vr->data, vr->size);
memset(&entry->data.string[vr->size], 0, vr->terminators);
return &entry->header;
}
/* Copies the result of attribute validation into an attribute buffer entry,
* returning true if the stored value was changed. */
static int store_validated_attribute(AttributeBuffer *abuf, int name, int mode,
AttributeOperator op, const ValidationResult *vr, bool fold)
{
/* Do nothing if validation failed. */
if (mode < 0)
return mode;
/* Validated strings are not necessarily null terminated. */
unsigned stored_size = vr->size + vr->terminators;
/* A size query? */
if (abuf == NULL)
return sizeof(Attribute) + stored_size;
BufferEntry *entry;
if (fold) {
/* Try to fold with any existing entries. */
entry = (BufferEntry *)abuf->buffer;
BufferEntry *end = (BufferEntry *)(abuf->buffer + abuf->size);
while (entry != end) {
if (entry->header.name == name) {
int rc = abuf_fold(abuf, entry, vr->storage, mode,
op, vr->data, stored_size, NULL);
if (rc >= 0)
return rc;
}
entry = abuf_next_entry(entry);
}
/* Folding wasn't possible. Create a new attribute. */
entry = abuf_create_attribute(abuf, name, mode, vr->storage, op,
stored_size);
} else {
/* Reallocate memory for the attribute. */
entry = abuf_allocate_replace(abuf, name, mode, vr->storage,
op, stored_size);
/* Is the new value different from the old? */
if (mode == (int)entry->header.mode &&
op == (AttributeOperator)entry->header.op &&
entry->header.size == stored_size &&
(0 == memcmp(&entry->data, vr->data, vr->size))) {
return false;
}
}
/* Copy the validated data into the attribute and pad with the specified
* number of zero bytes. */
memcpy(&entry->data, vr->data, vr->size);
memset(&entry->data.string[vr->size], 0, vr->terminators);
return true;
}
static int abuf_handle_shorthand_integer(AttributeBuffer *abuf, int name,
ValueSemantic vs, int value, AttributeOperator op, bool fold);
static int abuf_handle_shorthand_float(AttributeBuffer *abuf, int name,
ValueSemantic vs, float value, AttributeOperator op, bool fold);
int abuf_set_integer(AttributeBuffer *abuf, int name, ValueSemantic vs,
int value, AttributeOperator op, bool fold)
{
/* Handle shorthand attributes like 'pad'. */
int rc = abuf_handle_shorthand_integer(abuf, name, vs, value, op, fold);
if (rc >= 0)
return rc;
/* Validate the value and determine the new mode. */
ValidationResult vr;
vresult_init(&vr);
int new_mode = validate_integer(name, vs, value, op, &vr);
/* Store the validated value. */
int result = store_validated_attribute(abuf, name, new_mode, op, &vr, fold);
vresult_free(&vr);
return result;
}
int abuf_set_float(AttributeBuffer *abuf, int name, ValueSemantic vs,
float value, AttributeOperator op, bool fold)
{
/* Handle shorthand atributes. */
int rc = abuf_handle_shorthand_float(abuf, name, vs, value, op, fold);
if (rc >= 0)
return rc;
/* Validate the value and determine the new mode. */
ValidationResult vr;
vresult_init(&vr);
int new_mode = validate_float(name, vs, value, op, &vr);
/* Store the validated value. */
int result = store_validated_attribute(abuf, name, new_mode, op, &vr, fold);
vresult_free(&vr);
return result;
}
int abuf_set_string(AttributeBuffer *abuf, int name, ValueSemantic vs,
const char *value, int length, AttributeOperator op, bool fold)
{
/* Validate the value and determine the new mode. */
ValidationResult vr;
vresult_init(&vr);
int new_mode = validate_string(name, vs, value, length, op, &vr);
/* Store the validated value. */
int result = store_validated_attribute(abuf, name, new_mode, op, &vr, fold);
vresult_free(&vr);
return result;
}
/* Calls the appropriate function to store a variant into an attribute buffer. */
int abuf_set(AttributeBuffer *abuf, Token name, const Variant *value,
AttributeOperator op, bool fold)
{
switch (value->type) {
case VTYPE_INTEGER:
/* Note that tokens representing enum values go through this path.
* Their integer value is the token itself. */
return abuf_set_integer(abuf, name, value->semantic,
value->integer, op, fold);
case VTYPE_FLOAT:
return abuf_set_float(abuf, name, value->semantic,
value->real, op, fold);
case VTYPE_STRING:
return abuf_set_string(abuf, name, value->semantic,
value->string.data, value->string.length, op, fold);
}
assertb(false);
return -1;
}
/* Convenience function to add a new integer attribute without checking for
* existing values. */
Attribute *abuf_append_integer(AttributeBuffer *abuf, int name,
ValueSemantic vs, int value, AttributeOperator op)
{
ValidationResult vr;
vresult_init(&vr);
int mode = validate_integer(name, vs, value, op, &vr);
return append_validated_attribute(abuf, name, mode, op, &vr);
}
/* Convenience function to add a new float attribute without checking for
* existing values. */
Attribute *abuf_append_float(AttributeBuffer *abuf, int name,
ValueSemantic vs, float value, AttributeOperator op)
{
ValidationResult vr;
vresult_init(&vr);
int mode = validate_float(name, vs, value, op, &vr);
return append_validated_attribute(abuf, name, mode, op, &vr);
}
/* Convenience function to add a new string attribute without checking for
* existing values. */
Attribute *abuf_append_string(AttributeBuffer *abuf, int name,
ValueSemantic vs, const char *value, int length, AttributeOperator op)
{
ValidationResult vr;
vresult_init(&vr);
int mode = validate_string(name, vs, value, length, op, &vr);
return append_validated_attribute(abuf, name, mode, op, &vr);
}
/* Handles the storage of shorthand attributes like 'pad', which set other
* attributes but have no storage of their own. */
int abuf_handle_shorthand_integer(AttributeBuffer *abuf, int name,
ValueSemantic vs, int value, AttributeOperator op, bool fold)
{
int rc = -1;
if (name == TOKEN_PADDING) {
rc = abuf_set_integer(abuf, TOKEN_PADDING_LEFT, vs, value, op, fold);
rc += abuf_set_integer(abuf, TOKEN_PADDING_RIGHT, vs, value, op, fold);
rc += abuf_set_integer(abuf, TOKEN_PADDING_TOP, vs, value, op, fold);
rc += abuf_set_integer(abuf, TOKEN_PADDING_BOTTOM, vs, value, op, fold);
} else if (name == TOKEN_MARGIN) {
rc = abuf_set_integer(abuf, TOKEN_MARGIN_LEFT, vs, value, op, fold);
rc += abuf_set_integer(abuf, TOKEN_MARGIN_RIGHT, vs, value, op, fold);
rc += abuf_set_integer(abuf, TOKEN_MARGIN_TOP, vs, value, op, fold);
rc += abuf_set_integer(abuf, TOKEN_MARGIN_BOTTOM, vs, value, op, fold);
} else if (name >= TOKEN_CLIP_LEFT && name <= TOKEN_CLIP_BOTTOM) {
int edges = EDGE_FLAG_LEFT << (name - TOKEN_CLIP_LEFT);
op = (value == FLAGMODE_TRUE) ? AOP_ADD : AOP_SUBTRACT;
rc = abuf_set_integer(abuf, TOKEN_CLIP, VSEM_EDGES, edges, op, true);
}
return rc;
}
/* Handles the storage of shorthand attributes like 'pad', which set other
* attributes but have no storage of their own. */
int abuf_handle_shorthand_float(AttributeBuffer *abuf, int name,
ValueSemantic vs, float value, AttributeOperator op, bool fold)
{
int rc = -1;
if (name == TOKEN_PADDING) {
rc = abuf_set_float(abuf, TOKEN_PADDING_LEFT, vs, value, op, fold);
rc += abuf_set_float(abuf, TOKEN_PADDING_RIGHT, vs, value, op, fold);
rc += abuf_set_float(abuf, TOKEN_PADDING_TOP, vs, value, op, fold);
rc += abuf_set_float(abuf, TOKEN_PADDING_BOTTOM, vs, value, op, fold);
} else if (name == TOKEN_MARGIN) {
rc = abuf_set_float(abuf, TOKEN_MARGIN_LEFT, vs, value, op, fold);
rc += abuf_set_float(abuf, TOKEN_MARGIN_RIGHT, vs, value, op, fold);
rc += abuf_set_float(abuf, TOKEN_MARGIN_TOP, vs, value, op, fold);
rc += abuf_set_float(abuf, TOKEN_MARGIN_BOTTOM, vs, value, op, fold);
}
return rc;
}
/* Generates a string representation of an attribute value for use in a
* diagnostic message. */
int attribute_value_string(char *buffer, unsigned buffer_size,
const Attribute *attribute)
{
char value_buffer[1024];
const char *data = (const char *)(attribute + 1);
int length = 0;
AttributeSemantic as = attribute_semantic(attribute->name);
switch (attribute->type) {
case STORAGE_NONE:
length = snprintf(buffer, buffer_size, "none/%u", attribute->mode);
break;
case STORAGE_STRING:
{
unsigned value_length = 0;
abuf_read_string(attribute, value_buffer, sizeof(value_buffer),
&value_length, NULL, SSR_COMMA_DELIMITED);
if (as == ASEM_STRING_SET) {
length = snprintf(buffer, buffer_size, "{%s}/%u",
value_buffer, attribute->mode);
} else {
length = snprintf(buffer, buffer_size, "%s/%u",
value_buffer, attribute->mode);
}
}
break;
case STORAGE_INT16:
case STORAGE_INT32:
{
int32_t value = (attribute->type == STORAGE_INT16) ?
*(int16_t *)data : *(int32_t *)data;
if (as == ASEM_DIMENSON && attribute->mode == DMODE_FRACTIONAL) {
uint32_t divisor = (attribute->type == STORAGE_INT16) ?
INT16_MAX : INT32_MAX;
float percentage = 100.0f * (float)value / (float)divisor;
length = snprintf(buffer, buffer_size, "%.1f%%/%u", percentage, attribute->mode);
} else {
length = snprintf(buffer, buffer_size, "%d/%u", value, attribute->mode);
}
}
break;
case STORAGE_FLOAT32:
length = snprintf(buffer, buffer_size, "%.2f/%u", *(float *)data, attribute->mode);
break;
default:
length = snprintf(buffer, buffer_size, "corrupt");
}
if (length < 0 || length == (int)buffer_size)
length = buffer_size - 1;
buffer[length] = '\0';
return length;
}
} // namespace stkr
| [
"thomasjamesmoran@gmail.com"
] | thomasjamesmoran@gmail.com |
5823f5f0c88476ed68ec683e504041eef7742720 | 14a2979c0baeb2ef14b3f34bb4017d541c8b0d8f | /apps/DataCollections/chainblock.h | a39b8a6a29db0a6392469762861d24c074bfcac3 | [
"MIT"
] | permissive | MangoCats/aosuite | 1fb6d3c929ad0634b07beb3a2fc7548dbcb6f0e9 | bddabf44eb965f55a6f8628040c73fea4902db2f | refs/heads/master | 2021-12-07T18:59:35.991784 | 2021-09-16T21:55:53 | 2021-09-16T21:55:53 | 144,416,778 | 0 | 0 | MIT | 2018-08-11T20:39:07 | 2018-08-11T20:39:06 | null | UTF-8 | C++ | false | false | 2,437 | h | /* MIT License
*
* Copyright (c) 2018 Assign Onward
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef CHAINBLOCK_H
#define CHAINBLOCK_H
#include "datavarlength.h"
#include "hash.h"
#include <QMap>
#define PropertyMap QMap<typeCode_t,DataItem *>
/**
* @brief The ChainBlock class - contains a block in the chain
*/
class ChainBlock : public DataVarLength
{
Q_OBJECT
public:
explicit ChainBlock( QByteArray di = QByteArray(), QObject *p = NULL );
ChainBlock( const ChainBlock &r, QObject *p = NULL )
: DataVarLength( QByteArray(), AO_GENESIS_BLOCK, p ? p : r.parent() ),
hash( r.hash ), properties( r.properties ) {}
void operator = ( const QByteArray &di );
Hash getHash() const { return hash; }
void setHash( const Hash &h ) { hash = h; }
QByteArray toDataItem( bool cf = false );
bool isValid() { return hash.isValid(); }
DataItem *getProp( typeCode_t key ) { return ( properties.contains( key ) ) ? properties.value( key ) : new DataItem(AO_UNDEFINED_DATAITEM,this); }
void add( const typeCode_t& key, DataItem *value ) { properties.insert( key, value ); }
private:
Hash hash; // hash signature (unique ID) of the genesis block
PropertyMap properties; // Collection of properties that describe the chain
};
#endif // CHAINBLOCK_H
| [
"assign.onward@gmail.com"
] | assign.onward@gmail.com |
fa4b183133a5c27c90ebe74ae3677c1c0fa42d1a | 2bae07914bcd383fefe415194ffb63e2b007aff2 | /engine/modules/tool/tool_generic_data/include/tiki/tool_generic_data/generic_data_tag.hpp | 74455d3db07ed51ba7575a2491cd8e08c723b03a | [] | no_license | TikiTek/mechanica | ec4972b541bfb7dc685b0b7918785c5ca99622d2 | d151a818a279f1969b977ff7a935148b18ab9546 | refs/heads/master | 2021-10-09T07:27:23.308704 | 2021-10-08T07:42:04 | 2021-10-08T07:42:04 | 71,704,579 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 891 | hpp | #pragma once
#include "tiki/base/dynamic_string.hpp"
#include "tiki/base/types.hpp"
namespace tiki
{
class GenericDataTag
{
TIKI_NONCOPYABLE_CLASS( GenericDataTag );
public:
explicit GenericDataTag();
explicit GenericDataTag( const GenericDataTag* pCopyFrom );
~GenericDataTag();
const DynamicString& getTag() const;
void setTag( const DynamicString& tag );
const DynamicString& getContent() const;
void setContent( const DynamicString& content );
GenericDataTag* getChildTag() const;
const GenericDataTag* getChildTag();
void setChildTag( GenericDataTag* pChildTag );
bool parseTagString( const DynamicString& rawText );
DynamicString toString() const;
static bool isTagString( const DynamicString& rawText );
private:
DynamicString m_tag;
DynamicString m_content;
GenericDataTag* m_pChildTag;
};
}
| [
"mail@timboden.de"
] | mail@timboden.de |
2f46e7d443385f15002c2da7e449317e4657d52b | 12e2e6e9b050f8916bf372ee725c9d1112d6c7ce | /Car/Core.cpp | 5b4fd1fc0d34c3d3c41f8a2932ec27870d39cf6b | [] | no_license | Sozary-zz/Car | 49f6796471f082231e33a87daf15405cd3d5635d | 520bea5519c8bf3b72e2ab13a372b164208c429a | refs/heads/master | 2022-04-30T22:06:36.717325 | 2017-09-27T11:45:20 | 2017-09-27T11:45:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,400 | cpp | #include "core.hpp"
#define GAME_FPS 60.f
#include <iostream>
using namespace std;
using namespace sf;
Core::Core(int w, int h, const string& title) :
m_window(VideoMode(w, h), title, Style::Close, ContextSettings{ 0,0,8 }), TimePerFrame(seconds(1.f / (float)GAME_FPS))
{
m_sim = new Simulation();
}
Core::~Core()
{
delete m_sim;
}
void Core::run()
{
Clock clock;
Time timeSinceLastUpdate;
timeSinceLastUpdate = Time::Zero;
while (m_window.isOpen())
{
processEvent(TimePerFrame);
timeSinceLastUpdate += clock.restart();
while (timeSinceLastUpdate > TimePerFrame)
{
timeSinceLastUpdate -= TimePerFrame;
processEvent(TimePerFrame);
update(TimePerFrame);
}
render();
}
}
void Core::processEvent(Time delta)
{
Event event;
while (m_window.pollEvent(event))
{
switch (event.type)
{
case Event::KeyReleased:
break;
case Event::KeyPressed:
switch (event.key.code)
{
case Keyboard::Left:
break;
case Keyboard::Up:
break;
case Keyboard::Right:
break;
case Keyboard::Escape:
m_window.close();
break;
}
break;
case Event::Closed:
m_window.close();
break;
}
}
}
void Core::update(Time deltaTime)
{
m_sim->update(deltaTime);
m_window.setTitle("Max fitness: " + to_string(m_sim->getMaxFitness()));
}
void Core::render()
{
m_window.clear();
m_window.draw(*m_sim);
m_window.display();
}
| [
"mehdiayache@hotmail.fr"
] | mehdiayache@hotmail.fr |
36c1395b78dabd497d5fdbd98587c5feb080f233 | 2927dcbbb0723e8e76710040407c5561fb6b0121 | /04096/windows/architectures/source/tool/GLView.h | cd51ff3227d26f939d10f18f4dbef14653f17bd3 | [] | no_license | cafferta10/hardcode | 9583599825010c16d46e199aaff9b15834730c65 | 2033e906d3a7850f88dda431f15a70f0981729b9 | refs/heads/master | 2021-05-22T01:06:19.072005 | 2019-10-26T03:28:44 | 2019-10-26T03:28:44 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 927 | h | #ifndef GLView_h
#define GLView_h
#include <stdint.h>
#include <QtGui>
#include <QGLWidget>
#include "project.h"
namespace aurora {
// opengl view
class GLWidget : public QGLWidget
{
Q_OBJECT
public:
GLWidget(const QGLWidget* shareWidget = 0);
~GLWidget();
project::Project *project;
QSize minimumSizeHint() const;
QSize sizeHint() const;
signals:
void initialize();
protected:
void initializeGL();
void resizeGL(int width, int height);
void paintGL();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
};
// opengl viewport with menu bar (e.g. for camera selection) and opengl view
class GLView : public QWidget
{
public:
GLView(QMenu* cameraMenu, const QGLWidget* shareWidget = 0);
virtual ~GLView();
virtual void paintEvent(QPaintEvent* e);
GLWidget* inner;
};
} // namespace aurora
#endif
| [
"youngthug@youngthug.com"
] | youngthug@youngthug.com |
b1cec771674ec0612b9e53bcffded6463ca2f901 | b74c55900714564461dee9be5c5f26607b1143b8 | /Circle & square.cpp | 9bee699a2f06f951b11cecc7c1fa0db84047d2d8 | [] | no_license | sayeed-rana/DevSkill-Problem-Solution- | c0be776383e1003568fbb055dea3f67519b2515b | 2ba63a2252ae5e5e2b9f1b57b89ab0dc98ebce88 | refs/heads/master | 2021-01-20T03:39:24.924325 | 2017-06-09T06:26:15 | 2017-06-09T06:26:15 | 89,566,613 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 451 | cpp | #include<iostream>
#include<math.h>
using namespace std;
int main()
{
int t=1;
int n;
cin>>n;
double d[n],corno[n];
double s[n],r[n];
while(t<=n)
{
cin>>r[t];
cin>>s[t];
d[t]=floor(2*r[t]);
corno[t]=floor(s[t]*sqrt(2));
t++;
}
for(int i=1;i<=n;i=i+1)
{
if(d[i]==corno[i])
{
cout<<"Yes\n";
}
else
cout<<"No\n";
}
return 0;
}
| [
"noreply@github.com"
] | sayeed-rana.noreply@github.com |
48dedb912397a01916cd58169e0dd5ada1ede497 | 98157b3124db71ca0ffe4e77060f25503aa7617f | /codeforces/470/c.cpp | f46ccf3e2eb53cd918b4f8761615e823ceb4c394 | [] | no_license | wiwitrifai/competitive-programming | c4130004cd32ae857a7a1e8d670484e236073741 | f4b0044182f1d9280841c01e7eca4ad882875bca | refs/heads/master | 2022-10-24T05:31:46.176752 | 2022-09-02T07:08:05 | 2022-09-02T07:08:35 | 59,357,984 | 37 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 1,468 | cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
struct trie {
int l, r, cnt;
trie() : l(0), r(0), cnt(0) {}
} node[N * 55];
int p[N], a[N], cntr;
void add(int x) {
int now = 1;
++node[now].cnt;
for (int i = 29; i >= 0; --i) {
if (x & (1 << i)) {
if (node[now].r == 0) node[now].r = cntr++;
now = node[now].r;
}
else {
if (node[now].l == 0) node[now].l = cntr++;
now = node[now].l;
}
++node[now].cnt;
}
}
void remove(int x) {
int now = 1;
--node[now].cnt;
for (int i = 29; i >= 0; --i) {
if (x & (1 << i))
now = node[now].r;
else
now = node[now].l;
if (!now) break;
--node[now].cnt;
}
}
int get(int x) {
int now = 1, ret = 0;
for (int i = 29; i >= 0; --i) {
int il = node[now].l, ir = node[now].r;
if ((x & (1 << i)) == 0) {
if (il > 0 && node[il].cnt > 0) {
now = il;
}
else {
ret |= (1 << i);
now = ir;
}
}
else {
if (ir > 0 && node[ir].cnt > 0) {
now = ir;
}
else {
ret |= (1 << i);
now = il;
}
}
}
return ret;
}
int main() {
int n;
scanf("%d", &n);
cntr = 2;
for (int i = 0; i < n; ++i)
scanf("%d", a+i);
for (int i = 0; i < n; ++i) {
scanf("%d", p+i), add(p[i]);
}
for (int i = 0; i < n; ++i) {
int ans = get(a[i]);
remove(ans^a[i]);
printf("%d ", ans);
}
printf("\n");
return 0;
} | [
"wiwitrifai@gmail.com"
] | wiwitrifai@gmail.com |
d7e454abbaa3ab965ed867ac3cf97a42f17e3eb2 | 37ff29a9a83eafbf0f54e2ce0bf2c0255b1663a1 | /devel/.private/map_msgs/include/map_msgs/GetMapROIResponse.h | 77b136b55ea4b20e5d092b076594262f1cc1801c | [] | no_license | wy7727/husky | f8d9c2a05487f66efbfb58e8fc1c141efc10e177 | 7925bc34ae316639aef88fc3e6a8d36aba12620b | refs/heads/master | 2020-04-09T12:09:41.420418 | 2019-12-01T09:24:24 | 2019-12-01T09:24:24 | 160,337,603 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,838 | h | // Generated by gencpp from file map_msgs/GetMapROIResponse.msg
// DO NOT EDIT!
#ifndef MAP_MSGS_MESSAGE_GETMAPROIRESPONSE_H
#define MAP_MSGS_MESSAGE_GETMAPROIRESPONSE_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <nav_msgs/OccupancyGrid.h>
namespace map_msgs
{
template <class ContainerAllocator>
struct GetMapROIResponse_
{
typedef GetMapROIResponse_<ContainerAllocator> Type;
GetMapROIResponse_()
: sub_map() {
}
GetMapROIResponse_(const ContainerAllocator& _alloc)
: sub_map(_alloc) {
(void)_alloc;
}
typedef ::nav_msgs::OccupancyGrid_<ContainerAllocator> _sub_map_type;
_sub_map_type sub_map;
typedef boost::shared_ptr< ::map_msgs::GetMapROIResponse_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::map_msgs::GetMapROIResponse_<ContainerAllocator> const> ConstPtr;
}; // struct GetMapROIResponse_
typedef ::map_msgs::GetMapROIResponse_<std::allocator<void> > GetMapROIResponse;
typedef boost::shared_ptr< ::map_msgs::GetMapROIResponse > GetMapROIResponsePtr;
typedef boost::shared_ptr< ::map_msgs::GetMapROIResponse const> GetMapROIResponseConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::map_msgs::GetMapROIResponse_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace map_msgs
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': False}
// {'nav_msgs': ['/opt/ros/kinetic/share/nav_msgs/cmake/../msg'], 'std_msgs': ['/opt/ros/kinetic/share/std_msgs/cmake/../msg'], 'actionlib_msgs': ['/opt/ros/kinetic/share/actionlib_msgs/cmake/../msg'], 'sensor_msgs': ['/opt/ros/kinetic/share/sensor_msgs/cmake/../msg'], 'geometry_msgs': ['/opt/ros/kinetic/share/geometry_msgs/cmake/../msg'], 'map_msgs': ['/home/ying/wy_ws/src/navigation_msgs/map_msgs/msg']}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::map_msgs::GetMapROIResponse_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct IsMessage< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::map_msgs::GetMapROIResponse_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct HasHeader< ::map_msgs::GetMapROIResponse_<ContainerAllocator> const>
: FalseType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
{
static const char* value()
{
return "4d1986519c00d81967d2891a606b234c";
}
static const char* value(const ::map_msgs::GetMapROIResponse_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0x4d1986519c00d819ULL;
static const uint64_t static_value2 = 0x67d2891a606b234cULL;
};
template<class ContainerAllocator>
struct DataType< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
{
static const char* value()
{
return "map_msgs/GetMapROIResponse";
}
static const char* value(const ::map_msgs::GetMapROIResponse_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
{
static const char* value()
{
return "nav_msgs/OccupancyGrid sub_map\n\
\n\
================================================================================\n\
MSG: nav_msgs/OccupancyGrid\n\
# This represents a 2-D grid map, in which each cell represents the probability of\n\
# occupancy.\n\
\n\
Header header \n\
\n\
#MetaData for the map\n\
MapMetaData info\n\
\n\
# The map data, in row-major order, starting with (0,0). Occupancy\n\
# probabilities are in the range [0,100]. Unknown is -1.\n\
int8[] data\n\
\n\
================================================================================\n\
MSG: std_msgs/Header\n\
# Standard metadata for higher-level stamped data types.\n\
# This is generally used to communicate timestamped data \n\
# in a particular coordinate frame.\n\
# \n\
# sequence ID: consecutively increasing ID \n\
uint32 seq\n\
#Two-integer timestamp that is expressed as:\n\
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
# time-handling sugar is provided by the client library\n\
time stamp\n\
#Frame this data is associated with\n\
# 0: no frame\n\
# 1: global frame\n\
string frame_id\n\
\n\
================================================================================\n\
MSG: nav_msgs/MapMetaData\n\
# This hold basic information about the characterists of the OccupancyGrid\n\
\n\
# The time at which the map was loaded\n\
time map_load_time\n\
# The map resolution [m/cell]\n\
float32 resolution\n\
# Map width [cells]\n\
uint32 width\n\
# Map height [cells]\n\
uint32 height\n\
# The origin of the map [m, m, rad]. This is the real-world pose of the\n\
# cell (0,0) in the map.\n\
geometry_msgs/Pose origin\n\
================================================================================\n\
MSG: geometry_msgs/Pose\n\
# A representation of pose in free space, composed of position and orientation. \n\
Point position\n\
Quaternion orientation\n\
\n\
================================================================================\n\
MSG: geometry_msgs/Point\n\
# This contains the position of a point in free space\n\
float64 x\n\
float64 y\n\
float64 z\n\
\n\
================================================================================\n\
MSG: geometry_msgs/Quaternion\n\
# This represents an orientation in free space in quaternion form.\n\
\n\
float64 x\n\
float64 y\n\
float64 z\n\
float64 w\n\
";
}
static const char* value(const ::map_msgs::GetMapROIResponse_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.sub_map);
}
ROS_DECLARE_ALLINONE_SERIALIZER
}; // struct GetMapROIResponse_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::map_msgs::GetMapROIResponse_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::map_msgs::GetMapROIResponse_<ContainerAllocator>& v)
{
s << indent << "sub_map: ";
s << std::endl;
Printer< ::nav_msgs::OccupancyGrid_<ContainerAllocator> >::stream(s, indent + " ", v.sub_map);
}
};
} // namespace message_operations
} // namespace ros
#endif // MAP_MSGS_MESSAGE_GETMAPROIRESPONSE_H
| [
"wuying277727@gmail.com"
] | wuying277727@gmail.com |
95ac183ce96fcefdc06183e8167fc7302bc299fa | f0bd63eddce3d90c1d56ce6782b99557a6daf04b | /homework/assignment26.cpp | 23c88294ee26ad014374b8b07ec857d8d4306627 | [] | no_license | rsguru/cs124 | 205092b65b43c916d2abe456cf33dad93b160edd | 0579cc77c7e38c79781a72cc425668ae8bce58eb | refs/heads/master | 2021-01-11T20:42:38.138083 | 2016-12-22T04:43:02 | 2016-12-22T04:43:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,124 | cpp | /***********************************************************************
* Program:
* Assignment ##, ???? (e.g. Assignment 10, Hello World)
* Brother {Cook, Comeau, Falin, Lilya, Honeycutt, Unsicker, Peterson, Phair, Ellsworth}, CS124
* Author:
* your name
* Summary:
* Enter a brief description of your program here! Please note that if
* you do not take the time to fill out this block, YOU WILL LOSE POINTS.
* Before you begin working, estimate the time you think it will
* take you to do the assignment and include it in this header block.
* Before you submit the assignment include the actual time it took.
*
* Estimated: 0.0 hrs
* Actual: 0.0 hrs
* Please describe briefly what was the most difficult part.
************************************************************************/
#include <iostream>
#include <fstream>
using namespace std;
void getFileName(char fileName[]);
float readFile(char fileName[]);
void displayAverage(float sum);
/**********************************************************************
* Add text here to describe what the function "main" does. Also don't forget
* to fill this out with meaningful text or YOU WILL LOSE POINTS.
***********************************************************************/
int main()
{
char fileName[256];
getFileName(fileName);
float sum = readFile(fileName);
if (sum != -1)
displayAverage(sum);
else
cout << "Error reading file \"" << fileName << "\""
<< endl;
return 0;
}
void getFileName(char fileName[])
{
cout << "Please enter the filename: ";
cin >> fileName;
}
float readFile(char fileName[])
{
ifstream fin(fileName);
if (fin.fail())
{
return -1;
}
float data[10];
float sum = 0;
int count = 0;
while (fin >> data[count])
{
sum += data;
count++;
}
if (count != 10)
{
fin.close();
return -1;
}
fin.close();
cout.precision(0);
cout.setf(ios::fixed);
return sum / 10;
}
void displayAverage(float sum)
{
cout << "Average Grade: " << sum << "%\n";
}
| [
"drew@lundgren.us"
] | drew@lundgren.us |
77b4ff4fcda9d342922628dc69fa158589930e33 | 464c01e2298eea56e4c78f1c30f65492090b02f3 | /MP3/NachOS-4.0_MP3/code/threads/scheduler.cc | aa68cab86316ca6191fcc129e005afaa11077456 | [
"MIT-Modern-Variant"
] | permissive | lijunhaoabroad/Operating-System-Project-NachOS | bff820b68005550aa55796f2ae4946f7176506bc | 7ccbb19354de953c6f504408ffbe1489c2f5319c | refs/heads/master | 2023-02-22T06:11:12.339265 | 2021-01-23T07:51:56 | 2021-01-23T07:51:56 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 37,379 | cc | // scheduler.cc
// Routines to choose the next thread to run, and to dispatch to
// that thread.
//
// These routines assume that interrupts are already disabled.
// If interrupts are disabled, we can assume mutual exclusion
// (since we are on a uniprocessor).
//
// NOTE: We can't use Locks to provide mutual exclusion here, since
// if we needed to wait for a lock, and the lock was busy, we would
// end up calling FindNextToRun(), and that would put us in an
// infinite loop.
//
// Very simple implementation -- no priorities, straight FIFO.
// Might need to be improved in later assignments.
//
// Copyright (c) 1992-1996 The Regents of the University of California.
// All rights reserved. See copyright.h for copyright notice and limitation
// of liability and disclaimer of warranty provisions.
#include "copyright.h"
#include "debug.h"
#include "scheduler.h"
#include "main.h"
//----------------------------------------------------------------------
// Scheduler::Scheduler
// Initialize the list of ready but not running threads.
// Initially, no ready threads.
//----------------------------------------------------------------------
/////////////// 12/12 Added ////////////////////
//----------------------------------------------------------------------
// SchedulingCompare
// Compare to thread's priority and put them in decreasing order.
// First thread should have the highest priority (149)
//----------------------------------------------------------------------
// #define LIST_QUEUE_CONTENTS
// #define DEBUG_QUEUES
// #define DEBUG_PREEMPT
// #define DEBUG_AGING
static int
L1SchedulingCompare (Thread *x, Thread *y)
{
if (x->approx_bursttime < y->approx_bursttime) { return -1; }
else if (x->approx_bursttime > y->approx_bursttime) { return 1; }
else { return 0; }
}
static int
L2SchedulingCompare (Thread *x, Thread *y)
{
if (x->priority < y->priority) { return 1; }
else if (x->priority > y->priority) { return -1; }
else { return 0; }
}
Scheduler::Scheduler()
{
readyList = new List<Thread *>;
toBeDestroyed = NULL;
//////// 12/10 Added ////////
L1List = new SortedList<Thread*>(L1SchedulingCompare);
L2List = new SortedList<Thread*>(L2SchedulingCompare);
// L1List = new List<Thread *>;
// L2List = new List<Thread *>;
L3List = new List<Thread *>; // Just insert, no need to sort!
}
//----------------------------------------------------------------------
// Scheduler::~Scheduler
// De-allocate the list of ready threads.
//----------------------------------------------------------------------
Scheduler::~Scheduler()
{
delete readyList;
delete L1List;
delete L2List;
delete L3List;
}
//----------------------------------------------------------------------
// Scheduler::ReadyToRun
// Mark a thread as ready, but not running.
// Put it on the ready list, for later scheduling onto the CPU.
//
// "thread" is the thread to be put on the ready list.
//----------------------------------------------------------------------
void
Scheduler::ReadyToRun (Thread *thread)
{
ASSERT(kernel->interrupt->getLevel() == IntOff);
DEBUG(dbgThread, "Putting thread on ready list: " << thread->getName());
//cout << "Putting thread on ready list: " << thread->getName() << endl ;
thread->setStatus(READY);
readyList->Append(thread);
}
////////////////// 12/12 ////////////////////////
//----------------------------------------------------------------------
// Scheduler::AddThreadPriority => NO USE!
// For aging mechanism, add priority by 10 to each thread
// Error here. access Item() on NULL list.
// ----------------------------------------------------------------------
void
Scheduler::AddThreadPriority(){
// Thread* first = L1List->first;
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L1List);
if(!L1List->IsEmpty()){
for (; !iter->IsDone(); iter->Next()) {
// Operation on iter->Item()
// TODO : should prevent >149 case. in DEBUG
if(iter->Item()->priority+10>=149){
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter->Item()->ID<<"} ] changes its priority from [ {"<<iter->Item()->priority<<"} ] to [ {149} ]");
}else{
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter->Item()->ID<<"} ] changes its priority from [ {"<<iter->Item()->priority<<"} ] to [ {"<<iter->Item()->priority+10 <<"} ]");
}
if(iter->Item()->priority +10 <= 149)
iter->Item()->priority += 10;
else iter->Item()->priority = 149;
// first = first->next;
}
}
ListIterator<Thread*> *iter2;
iter2 = new ListIterator<Thread*>(L2List);
if(!L2List->IsEmpty()){
for (; !iter2->IsDone(); iter2->Next()) {
// Operation on iter->Item()
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter2->Item()->ID<<"} ] changes its priority from [ {"<<iter2->Item()->priority<<"} ] to [ {"<<iter2->Item()->priority+10 <<"} ]");
if(iter2->Item()->priority +10 <= 149)
iter2->Item()->priority += 10;
else iter2->Item()->priority = 149;
// first = first->next;
}
}
ListIterator<Thread*> *iter3;
iter3 = new ListIterator<Thread*>(L3List);
if(!L3List->IsEmpty()){
for (; !iter3->IsDone(); iter3->Next()) {
// Operation on iter->Item()
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter3->Item()->ID<<"} ] changes its priority from [ {"<<iter3->Item()->priority<<"} ] to [ {"<<iter3->Item()->priority+10 <<"} ]");
if(iter3->Item()->priority +10 <= 149)
iter3->Item()->priority += 10;
else iter3->Item()->priority = 149;
// first = first->next;
}
}
}
//----------------------------------------------------------------------
// Scheduler::ReArrangeThreads
// For aging mechanism, since a thread(process) might migrate from lower
// level queue to higher level queue due to the increase of its priority,
// the scheduler should re-arrange the queue each thread belongs to.
// Check_Preempt here!
// ----------------------------------------------------------------------
void
Scheduler::ReArrangeThreads(){
Thread* migrate_thread;
// First, check L3List
ListIterator<Thread*> *iter3;
iter3 = new ListIterator<Thread*>(L3List);
// Note: We cannot use this method on L3, since L3 is NOT a SortedList!
// We should just Re-Insert every thread in L3!
for (; !iter3->IsDone(); iter3->Next()) {
// Operation on iter->Item()
migrate_thread = L3List->RemoveFront();
// This case is NOT possible!
if(migrate_thread->priority>=100){
// Insert into L1
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is removed from queue L[ {3} ]");
L1List->Insert(migrate_thread);
DEBUG(dbgZ, "[A] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is inserted into queue L[ {1} ]");
this->Check_Preempt(migrate_thread);
}
else if(migrate_thread->priority >= 50){
// Insert into L2
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is removed from queue L[ {3} ]");
L2List->Insert(migrate_thread);
DEBUG(dbgZ, "[A] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is inserted into queue L[ {2} ]");
this->Check_Preempt(migrate_thread);
}else{
// Insert Back.
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is removed from queue L[ {3} ]");
L3List->Append(migrate_thread);
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is inserted into queue L[ {3} ]");
// Don't need to check preempt!
}
}
// Then, check L2List
ListIterator<Thread*> *iter2;
iter2 = new ListIterator<Thread*>(L2List);
for (; !iter2->IsDone(); iter2->Next()) {
// Operation on iter->Item()
if(iter2->Item()->priority >=100){
// should move to L1list
migrate_thread = L2List->RemoveFront();
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is removed from queue L[ {2} ]");
L1List->Insert(migrate_thread);
DEBUG(dbgZ, "[A] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<migrate_thread->ID<<"} ] is inserted into queue L[ {1} ]");
this->Check_Preempt(migrate_thread);
}
}
}
///////////////////////// 12/12 Updated ///////////////////////////////
//----------------------------------------------------------------------
// Scheduler::Scheduling
// When a thread is added to multi-level feedback queue,
// (Come back from WAITING state or from NEW state)
// The scheduler should schedule which thread can take
// over CPU and be executed.
//
// Three scenario where Scheduling() would be called:
// (1) Thread::Fork() (NEW -> READY)
// (2) Semaphore::V() (WAIT -> READY)
// (3) Thread::Yield() (RUNNING -> READY) // This one I am not sure!
//
//
// 12/13 TODO :
// Originally, we will call ReadyToRun to add threads(proc) into ready-queue (readyList)
// Now, we change them to AddToQueue(thread)
//
// For scheduler->Run(nextThread, finishing)
// We change to scheduler->Scheduling(finishing)
//
//
// For 'aging' mechanism, in every 'yieldOnReturn' from timer interrupt,
// we 'update' the priority of all threads?
//
// For each thread, when they call Sleep(FALSE): update their burst time.
// When they are switching back to CPU : resume accumulating T. (ticks)
//
//----------------------------------------------------------------------
// TODO(1) : Add a scheduling function when a threads is add to ready-queue.(readyList)
// i.e. : When someone calls "kernel->scheduler->ReadyToRun(this)".
// Add to L1List/ L2List / L3List according to its priority (aging).
// TODO : should change the last " accumulated total ticks"
// void
// Scheduler::Scheduling(bool finishing){
// Return the thread to be executed.
Thread*
Scheduler::Scheduling(){
Thread* nextThread;
#ifdef DEBUG_QUEUES
cout<<"\nSb. calls scheduling, current Thread in Running state (holds CPU): "<<kernel->currentThread->getName()<<"\n";
this->List_All_thread();
// cout<< kernel->synchConsoleOut->waitFor->queue->NumInList();
// cout<<"WAIT queue: "<<kernel->synchConsoleOut->waitFor->queue->NumInList() <<" threads\n";
#endif
if(!L1List->IsEmpty()){
// Pick a thread from L1List.
// SFJ
// if(L1List->Front()->priority < kernel->currentThread->priority) return;
nextThread = L1List->RemoveFront();
// cout<<"now t"<<kernel->currentThread->getID()<<", to t"<<nextThread->getID()<<"\n";
nextThread->record_start_ticks(kernel->stats->totalTicks);
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<nextThread->ID<<"} ] is removed from queue L[ {1} ]");
DEBUG(dbgZ, "[E] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<nextThread->ID<<"} ] is now selected for execution, thread [ {"<<kernel->currentThread->ID<<"} ] is replaced, and it has executed [ {"<<kernel->stats->totalTicks - kernel->currentThread->cpu_start_ticks<<"} ] ticks ");
#ifdef DEBUG_QUEUES
cout<<"Pick: "<<nextThread->getName()<<"\n";
#endif
return nextThread;
// this->Run(nextThread, finishing);
// nextThread->record_start_ticks(kernel->stats->totalTicks);
}
else{
if(!L2List->IsEmpty()){
// if(kernel->currentThread->InWhichQueue()==1) return;// L2 Cannot preempt it.
// Pick a thread from L2List.
nextThread = L2List->RemoveFront();
nextThread->record_start_ticks(kernel->stats->totalTicks);
// cout<<"now t"<<kernel->currentThread->getID()<<", to t"<<nextThread->getID()<<"\n";
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<nextThread->ID<<"} ] is removed from queue L[ {2} ]");
DEBUG(dbgZ, "[E] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<nextThread->ID<<"} ] is now selected for execution, thread [ {"<<kernel->currentThread->ID<<"} ] is replaced, and it has executed [ {"<<kernel->stats->totalTicks - kernel->currentThread->cpu_start_ticks<<"} ] ticks ");
#ifdef DEBUG_QUEUES
cout<<"Pick: "<<nextThread->getName()<<"\n";
#endif
// this->Run(nextThread, finishing);
return nextThread;
// nextThread->record_start_ticks(kernel->stats->totalTicks);
}
else{
// Pick a thread from L3List.
// Round-Robin
// Run(,FALSE);
// TODO : should change the last " accumulated total ticks"
// if(kernel->currentThread->InWhichQueue()==1 || kernel->currentThread->InWhichQueue()==2) return;
if( !L3List->IsEmpty()){
nextThread = L3List->RemoveFront();
// cout<<"now t"<<kernel->currentThread->getID()<<", to t"<<nextThread->getID()<<"\n";
nextThread->record_start_ticks(kernel->stats->totalTicks);
DEBUG(dbgZ, "[B] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<nextThread->ID<<"} ] is removed from queue L[ {3} ]");
DEBUG(dbgZ, "[E] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<nextThread->ID<<"} ] is now selected for execution, thread [ {"<<kernel->currentThread->ID<<"} ] is replaced, and it has executed [ {"<<kernel->stats->totalTicks - kernel->currentThread->cpu_start_ticks<<"} ] ticks ");
#ifdef DEBUG_QUEUES
cout<<"Pick: "<<nextThread->getName()<<"\n";
#endif
return nextThread;
// this->Run(nextThread, finishing);
}
else{
// cout<<"Error! NULL threads in ready-queue\n";
return NULL;
}
}
}
}
//----------------------------------------------------------------------
// Scheduler::AddToQueue
// Add a thread into L1/L2/L3 queue according to its priority.
//----------------------------------------------------------------------
// TODO(2) : Add a function similar to "ReadyToRun" but with
// arguments: 1. Thread* 2. Its Priority to decide
// which level queue it should be added. (L1, L2, L3)
void
Scheduler::Check_Preempt(Thread* thread){
// cout<<kernel->currentThread->getName()<<"\n";
// Check for Preemption
//========== From RUNNING to READY state ===================//
#ifdef DEBUG_PREEMPT
cout<<"Check Preempt: Cur t: "<<kernel->currentThread->getName()<<" Add t: "<<thread->getName()<<"\n";
#endif
// Case 1: Running L3 but L1 or L2 has threads.
if( kernel->currentThread->InWhichQueue()==3 && (thread->InWhichQueue()==2||thread->InWhichQueue()==1)){
#ifdef DEBUG_PREEMPT
cout<<"\nShould Preempt!\n";
cout<<"cur priority: "<< kernel->currentThread->priority <<"in queue: "<<kernel->currentThread->InWhichQueue()<<"\n";
cout<<"Add priority: "<< thread->priority<<" belongs to queue " <<thread->InWhichQueue()<<"\n";
#endif
kernel->currentThread->True_ticks += kernel->stats->totalTicks - kernel->currentThread->cpu_start_ticks;
#ifdef DEBUG_PREEMPT
cout<<"Current ready-queue contents:\n";
this->List_All_thread();
#endif
Thread* nextThread = this->Scheduling(); // Should retun L1 thread.
#ifdef DEBUG_PREEMPT
cout<<"Thus, pick "<<nextThread->getName()<<"\n";
#endif
this->AddToQueue(kernel->currentThread, kernel->currentThread->priority); // from RUNNING to READY state.
this->Run(nextThread, FALSE);
}
// Case 2: Running L2 but L1 has threads.
else if (kernel->currentThread->InWhichQueue()==2 && thread->InWhichQueue()==1) {
#ifdef DEBUG_PREEMPT
cout<<"\nShould Preempt!\n";
cout<<"cur priority: "<< kernel->currentThread->priority <<"in queue: "<<kernel->currentThread->InWhichQueue()<<"\n";
cout<<"Add priority: "<< thread->priority<<" belongs to queue " <<thread->InWhichQueue()<<"\n";
#endif
kernel->currentThread->True_ticks += kernel->stats->totalTicks - kernel->currentThread->cpu_start_ticks;
#ifdef DEBUG_PREEMPT
cout<<"Current ready-queue contents:\n";
this->List_All_thread();
#endif
Thread* nextThread = this->Scheduling(); // Should retun L1 thread.
#ifdef DEBUG_PREEMPT
cout<<"Thus, pick "<<nextThread->getName()<<"\n";
#endif
// cout<<"\n";
this->AddToQueue(kernel->currentThread, kernel->currentThread->priority); // from RUNNING to READY state.
this->Run(nextThread, FALSE);
}
// Case 3: Running L1 but the thread to be added has
// higher priority (smaller approx_bursttime)
else if (kernel->currentThread->InWhichQueue()==1 && (thread->approx_bursttime < kernel->currentThread->approx_bursttime &&thread->InWhichQueue()==1) ) {
#ifdef DEBUG_PREEMPT
cout<<"\nShould Preempt!\n";
cout<<"cur bursttime: "<< kernel->currentThread->approx_bursttime <<"in queue: "<<kernel->currentThread->InWhichQueue()<<"\n";
cout<<"Add bursstime: "<< thread->approx_bursttime<<" belongs to queue " <<thread->InWhichQueue()<<"\n";
#endif
kernel->currentThread->True_ticks += kernel->stats->totalTicks - kernel->currentThread->cpu_start_ticks;
#ifdef DEBUG_PREEMPT
cout<<"Current ready-queue contents:\n";
this->List_All_thread();
#endif
Thread* nextThread = this->Scheduling(); // Should retun L1 thread.
#ifdef DEBUG_PREEMPT
cout<<"Thus, pick "<<nextThread->getName()<<"\n";
#endif
// cout<<"\n";
this->AddToQueue(kernel->currentThread, kernel->currentThread->priority); // from RUNNING to READY state.
this->Run(nextThread, FALSE);
}
}
// Don't check preempt.
void
Scheduler::AddToQueue2(Thread* thread, int Priority){
// DEBUG(dbgZ, "[A] Tick [ {%d} ]: Thread [ {%d} ] is inserted into queueL[ {L1} ]");
cout<<"AddToQueue2: ";
if(Priority>=100){
// Add to L1 list.
// L1List->Append(thread);
thread->setStatus(READY);
DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {1} ]" );
L1List->Insert(thread);
// DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {1} ]" );
}
else if(Priority >=50){
// L2List->Append(thread);
thread->setStatus(READY);
DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {2} ]" );
L2List->Insert(thread);
// DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {2} ]" );
}
else{
thread->setStatus(READY);
DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {3} ]" );
#ifdef DEBUG_QUEUES
if(!L3List->IsEmpty()){
cout<<"Before: ";
this->List_All_thread();
}
#endif
L3List->Append(thread);
#ifdef DEBUG_QUEUES
if(!L3List->IsEmpty()){
cout<<"After: ";
this->List_All_thread();
}
#endif
// DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {3} ]" );
}
}
void
Scheduler::AddToQueue(Thread* thread, int Priority){
// DEBUG(dbgZ, "[A] Tick [ {%d} ]: Thread [ {%d} ] is inserted into queueL[ {L1} ]");
// set START WAIT time in the ready-queue
thread->set_wait_starttime(kernel->stats->totalTicks); // update reference point.
if(Priority>=100){
// Add to L1 list.
// L1List->Append(thread);
thread->setStatus(READY);
DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {1} ]" );
L1List->Insert(thread);
// DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {1} ]" );
}
else if(Priority >=50){
// L2List->Append(thread);
thread->setStatus(READY);
DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {2} ]" );
L2List->Insert(thread);
// DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {2} ]" );
}
else{
thread->setStatus(READY);
DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {3} ]" );
#ifdef DEBUG_QUEUES
if(!L3List->IsEmpty()){
cout<<"Before: ";
this->List_All_thread();
}
#endif
L3List->Append(thread);
#ifdef DEBUG_QUEUES
if(!L3List->IsEmpty()){
cout<<"After: ";
this->List_All_thread();
}
#endif
// DEBUG(dbgZ, "[A] Tick [ {"<< kernel->stats->totalTicks<<"} ]: Thread [ {"<<thread->ID<<"} ] is inserted into queueL[ {3} ]" );
}
}
// #ifdef DEBUG_QUEUE
// cout<<"AddToQueue: After Add: "<<thread->getName() <<"\n";
// this->List_All_thread();
// #endif
// if(kernel->currentThread->getID()!=0){
// kernel->scheduler->Check_Preempt(thread);
// }
//----------------------------------------------------------------------
// Scheduler::FindNextToRun
// Return the next thread to be scheduled onto the CPU.
// If there are no ready threads, return NULL.
// Side effect:
// Thread is removed from the ready list.
//----------------------------------------------------------------------
Thread *
Scheduler::FindNextToRun ()
{
ASSERT(kernel->interrupt->getLevel() == IntOff);
if (readyList->IsEmpty()) {
return NULL;
} else {
return readyList->RemoveFront();
}
}
Thread*
Scheduler::FindNextToRun2(){
ASSERT(kernel->interrupt->getLevel() == IntOff);
if( ! L1List->IsEmpty()){
return L1List->RemoveFront();
}
else{
if(!L2List->IsEmpty()){
return L2List->RemoveFront();
}
else{
if(!L3List->IsEmpty()){
return L3List->RemoveFront();
}
else return NULL;
}
}
}
/// 12/19 ///
//----------------------------------------------------------------------
// Scheduler::Aging
// Iterate through all threads in multi-level ready-queues
// And check whether to add priorities to each READY thread.
//
//----------------------------------------------------------------------
void
Scheduler::Aging(){
Thread* thread;
int totalTicks = kernel->stats->totalTicks;
// L1 queue : note MAX 149
if(!L1List->IsEmpty()){
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L1List);
for (; !iter->IsDone(); iter->Next()) {
thread = iter->Item();
// thread->accu_wait_ticks += 100;
thread->accu_wait_ticks += totalTicks - thread->start_wait_ticks;
thread->start_wait_ticks = totalTicks; // update reference point.
#ifdef DEBUG_AGING
cout<<"Ticks: "<<totalTicks<<", thread "<<thread->getID()<<"wait tick: "<<thread->accu_wait_ticks<<"\n";
#endif
if(thread->accu_wait_ticks >= 1500){
if(thread->priority+10>=149){
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter->Item()->ID<<"} ] changes its priority from [ {"<<iter->Item()->priority<<"} ] to [ {149} ]");
thread->priority = 149;
}
else{
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter->Item()->ID<<"} ] changes its priority from [ {"<<iter->Item()->priority<<"} ] to [ {"<<iter->Item()->priority+10 <<"} ]");
thread->priority += 10;
}
// reset wait ticks.
// thread->accu_wait_ticks = 0;
thread->accu_wait_ticks -= 1500; // Should NOT reset!
}
}
}
// L2
if(!L2List->IsEmpty()){
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L2List);
for (; !iter->IsDone(); iter->Next()) {
thread = iter->Item();
// thread->accu_wait_ticks += 100;
thread->accu_wait_ticks += totalTicks - thread->start_wait_ticks;
thread->start_wait_ticks = totalTicks; // update reference point.
#ifdef DEBUG_AGING
cout<<"Ticks: "<<totalTicks<<", thread "<<thread->getID()<<"wait tick: "<<thread->accu_wait_ticks<<"\n";
#endif
// thread->accu_wait_ticks = totalTicks - thread->start_wait_ticks;
if(thread->accu_wait_ticks >= 1500){
// Print DEBUG message.
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter->Item()->ID<<"} ] changes its priority from [ {"<<iter->Item()->priority<<"} ] to [ {"<<iter->Item()->priority+10 <<"} ]");
thread->priority += 10;
// reset wait ticks.
// thread->set_wait_starttime(totalTicks);
// thread->accu_wait_ticks = 0;
thread->accu_wait_ticks -= 1500; // Should NOT reset!
}
}
}
// L3 queue
if(!L3List->IsEmpty()){
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L3List);
for (; !iter->IsDone(); iter->Next()) {
thread = iter->Item();
// thread->accu_wait_ticks += 100;
thread->accu_wait_ticks += totalTicks - thread->start_wait_ticks;
thread->start_wait_ticks = totalTicks; // update reference point.
#ifdef DEBUG_AGING
cout<<"Ticks: "<<totalTicks<<", thread "<<thread->getID()<<"wait tick: "<<thread->accu_wait_ticks<<"\n";
#endif
// thread->accu_wait_ticks = totalTicks - thread->start_wait_ticks;
if(thread->accu_wait_ticks >= 1500){
DEBUG(dbgZ, "[C] Tick [ {"<<kernel->stats->totalTicks<<"} ]: Thread [ {"<<iter->Item()->ID<<"} ] changes its priority from [ {"<<iter->Item()->priority<<"} ] to [ {"<<iter->Item()->priority+10 <<"} ]");
thread->priority += 10;
// thread->set_wait_starttime(totalTicks);
// thread->accu_wait_ticks = 0;
thread->accu_wait_ticks -= 1500; // Should NOT reset!
}
}
}
}
////////////////////////// 12/15 ///////////////////
// Display all thread in ready queues.
void
Scheduler::List_All_thread(){
cout<<"L1 queue: ";
if(!L1List->IsEmpty()){
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L1List);
for (; !iter->IsDone(); iter->Next()) {
// cout<< iter->Item()->getName()<<" id "<<iter->Item()->ID <<" /";
cout<< iter->Item()->getName()<<" ";
}
cout<<" \n";
}
// else cout<< "empty\n";
else cout<< "\n";
cout<<"L2 queue: ";
if(!L2List->IsEmpty()){
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L2List);
for (; !iter->IsDone(); iter->Next()) {
// cout<< iter->Item()->getName()<<" id "<<iter->Item()->ID <<" /";
cout<< iter->Item()->getName()<<" ";
}
cout<<" \n";
}
// else cout<< "empty\n";
else cout<< "\n";
cout<<"L3 queue: ";
if(!L3List->IsEmpty()){
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L3List);
for (; !iter->IsDone(); iter->Next()) {
// cout<< iter->Item()->getName()<<" id "<<iter->Item()->ID <<" /";
cout<< iter->Item()->getName()<<" ";
}
cout<<" \n";
}
// else cout<< "empty\n";
else cout<< "\n";
}
//----------------------------------------------------------------------
// Scheduler::StillHasThreadToRun
// Return the next thread to be scheduled onto the CPU.
// If there are no ready threads, return NULL.
// Side effect:
// Thread is removed from the ready list.
//----------------------------------------------------------------------
bool
Scheduler::StillHasThreadToRun ()
{
ASSERT(kernel->interrupt->getLevel() == IntOff);
if( ! L1List->IsEmpty()){
#ifdef LIST_QUEUE_CONTENTS
cout<<"L1 queue: ";
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L1List);
for (; !iter->IsDone(); iter->Next()) {
// cout<< iter->Item()->getName()<<" id "<<iter->Item()->ID <<" /";
cout<< iter->Item()->getName()<<" /";
}
cout<<" \n";
#endif
return TRUE;
}
else{
if(!L2List->IsEmpty()){
#ifdef LIST_QUEUE_CONTENTS
cout<<"L2 queue: ";
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L2List);
for (; !iter->IsDone(); iter->Next()) {
// cout<< iter->Item()->getName()<<" id "<<iter->Item()->ID <<" /";
cout<< iter->Item()->getName()<<" /";
}
cout<<" \n";
#endif
return TRUE;
}
else{
if(!L3List->IsEmpty()){
#ifdef LIST_QUEUE_CONTENTS
cout<<"L3 queue: ";
ListIterator<Thread*> *iter;
iter = new ListIterator<Thread*>(L3List);
for (; !iter->IsDone(); iter->Next()) {
// cout<< iter->Item()->getName()<<" id "<<iter->Item()->ID <<" /";
cout<< iter->Item()->getName()<<" /";
}
cout<<" \n";
#endif
return TRUE;
}
else return FALSE;
}
}
// if (readyList->IsEmpty()) {
// return NULL;
// } else {
// return readyList->RemoveFront();
// }
}
// // Return kernel->currentThread and remove it from
// Thread*
// Scheduler::ReturnCurrentThread(){
// }
//----------------------------------------------------------------------
// Scheduler::Run
// Dispatch the CPU to nextThread. Save the state of the old thread,
// and load the state of the new thread, by calling the machine
// dependent context switch routine, SWITCH.
//
// Note: we assume the state of the previously running thread has
// already been changed from running to blocked or ready (depending).
// Side effect:
// The global variable kernel->currentThread becomes nextThread.
//
// "nextThread" is the thread to be put into the CPU.
// "finishing" is set if the current thread is to be deleted
// once we're no longer running on its stack
// (when the next thread starts running)
//----------------------------------------------------------------------
void
Scheduler::Run (Thread *nextThread, bool finishing)
{
Thread *oldThread = kernel->currentThread;
ASSERT(kernel->interrupt->getLevel() == IntOff);
if (finishing) { // mark that we need to delete current thread
ASSERT(toBeDestroyed == NULL);
toBeDestroyed = oldThread;
}
if (oldThread->space != NULL) { // if this thread is a user program,
oldThread->SaveUserState(); // save the user's CPU registers
oldThread->space->SaveState();
}
oldThread->CheckOverflow(); // check if the old thread
// had an undetected stack overflow
///////// 12/15 /////////
// Should UPDATE BURST TIME when call thread->Sleep(FALSE)!!!
// Update approx. burst time for OLD thread.
// Get current ticks. (Update this thread's approx. cpu burst ticks)
// oldThread->update_burst_time(kernel->stats->totalTicks);
kernel->currentThread = nextThread; // switch to the next thread
nextThread->setStatus(RUNNING); // nextThread is now running
DEBUG(dbgThread, "Switching from: " << oldThread->getName() << " to: " << nextThread->getName());
// This is a machine-dependent assembly language routine defined
// in switch.s. You may have to think
// a bit to figure out what happens after this, both from the point
// of view of the thread and from the perspective of the "outside world".
SWITCH(oldThread, nextThread);
// we're back, running oldThread
///////// 12/10 /////////
// Resume accumulating CPU burst ticks.
// kernel->currentThread->record_start_ticks(kernel->stats->totalTicks);
// cout<<"thread "<<kernel->currentThread->getID()<<" update start ticks: "<< kernel->currentThread->cpu_start_ticks<<std::endl;
// // interrupts are off when we return from switch!
ASSERT(kernel->interrupt->getLevel() == IntOff);
DEBUG(dbgThread, "Now in thread: " << oldThread->getName());
CheckToBeDestroyed(); // check if thread we were running
// before this one has finished
// and needs to be cleaned up
if (oldThread->space != NULL) { // if there is an address space
oldThread->RestoreUserState(); // to restore, do it.
oldThread->space->RestoreState();
}
}
//----------------------------------------------------------------------
// Scheduler::CheckToBeDestroyed
// If the old thread gave up the processor because it was finishing,
// we need to delete its carcass. Note we cannot delete the thread
// before now (for example, in Thread::Finish()), because up to this
// point, we were still running on the old thread's stack!
//----------------------------------------------------------------------
void
Scheduler::CheckToBeDestroyed()
{
if (toBeDestroyed != NULL) {
delete toBeDestroyed;
toBeDestroyed = NULL;
}
}
//----------------------------------------------------------------------
// Scheduler::Print
// Print the scheduler state -- in other words, the contents of
// the ready list. For debugging.
//----------------------------------------------------------------------
void
Scheduler::Print()
{
cout << "Ready list contents:\n";
readyList->Apply(ThreadPrint);
}
| [
"jennyyeh56789@gmail.com"
] | jennyyeh56789@gmail.com |
b17cad2cd536c4dcef182031a32efe6fdd0618a0 | 094cd67dd4904fbb7d7befd32f1684275e994d5b | /src/utilstrencodings.cpp | bca98360b0695d9d73b3cf2a4b0417d01875476c | [
"MIT"
] | permissive | Arinerron/jobecoin | a9219ee50b927fefe657e1844987c69e422fb81f | d6c966cf94c44061c157da77def3e15ecb866a2b | refs/heads/master | 2021-08-20T02:55:06.170471 | 2017-11-28T02:05:06 | 2017-11-28T02:05:06 | 112,209,637 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 23,962 | cpp | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Jobecoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <utilstrencodings.h>
#include <tinyformat.h>
#include <cstdlib>
#include <cstring>
#include <errno.h>
#include <limits>
static const std::string CHARS_ALPHA_NUM = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
static const std::string SAFE_CHARS[] =
{
CHARS_ALPHA_NUM + " .,;-_/:?@()", // SAFE_CHARS_DEFAULT
CHARS_ALPHA_NUM + " .,;-_?@", // SAFE_CHARS_UA_COMMENT
CHARS_ALPHA_NUM + ".-_", // SAFE_CHARS_FILENAME
};
std::string SanitizeString(const std::string& str, int rule)
{
std::string strResult;
for (std::string::size_type i = 0; i < str.size(); i++)
{
if (SAFE_CHARS[rule].find(str[i]) != std::string::npos)
strResult.push_back(str[i]);
}
return strResult;
}
const signed char p_util_hexdigit[256] =
{ -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,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,
-1,0xa,0xb,0xc,0xd,0xe,0xf,-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,0xa,0xb,0xc,0xd,0xe,0xf,-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,-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,-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,-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,-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, };
signed char HexDigit(char c)
{
return p_util_hexdigit[(unsigned char)c];
}
bool IsHex(const std::string& str)
{
for(std::string::const_iterator it(str.begin()); it != str.end(); ++it)
{
if (HexDigit(*it) < 0)
return false;
}
return (str.size() > 0) && (str.size()%2 == 0);
}
bool IsHexNumber(const std::string& str)
{
size_t starting_location = 0;
if (str.size() > 2 && *str.begin() == '0' && *(str.begin()+1) == 'x') {
starting_location = 2;
}
for (auto c : str.substr(starting_location)) {
if (HexDigit(c) < 0) return false;
}
// Return false for empty string or "0x".
return (str.size() > starting_location);
}
std::vector<unsigned char> ParseHex(const char* psz)
{
// convert hex dump to vector
std::vector<unsigned char> vch;
while (true)
{
while (isspace(*psz))
psz++;
signed char c = HexDigit(*psz++);
if (c == (signed char)-1)
break;
unsigned char n = (c << 4);
c = HexDigit(*psz++);
if (c == (signed char)-1)
break;
n |= c;
vch.push_back(n);
}
return vch;
}
std::vector<unsigned char> ParseHex(const std::string& str)
{
return ParseHex(str.c_str());
}
void SplitHostPort(std::string in, int &portOut, std::string &hostOut) {
size_t colon = in.find_last_of(':');
// if a : is found, and it either follows a [...], or no other : is in the string, treat it as port separator
bool fHaveColon = colon != in.npos;
bool fBracketed = fHaveColon && (in[0]=='[' && in[colon-1]==']'); // if there is a colon, and in[0]=='[', colon is not 0, so in[colon-1] is safe
bool fMultiColon = fHaveColon && (in.find_last_of(':',colon-1) != in.npos);
if (fHaveColon && (colon==0 || fBracketed || !fMultiColon)) {
int32_t n;
if (ParseInt32(in.substr(colon + 1), &n) && n > 0 && n < 0x10000) {
in = in.substr(0, colon);
portOut = n;
}
}
if (in.size()>0 && in[0] == '[' && in[in.size()-1] == ']')
hostOut = in.substr(1, in.size()-2);
else
hostOut = in;
}
std::string EncodeBase64(const unsigned char* pch, size_t len)
{
static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
std::string strRet = "";
strRet.reserve((len+2)/3*4);
int mode=0, left=0;
const unsigned char *pchEnd = pch+len;
while (pch<pchEnd)
{
int enc = *(pch++);
switch (mode)
{
case 0: // we have no bits
strRet += pbase64[enc >> 2];
left = (enc & 3) << 4;
mode = 1;
break;
case 1: // we have two bits
strRet += pbase64[left | (enc >> 4)];
left = (enc & 15) << 2;
mode = 2;
break;
case 2: // we have four bits
strRet += pbase64[left | (enc >> 6)];
strRet += pbase64[enc & 63];
mode = 0;
break;
}
}
if (mode)
{
strRet += pbase64[left];
strRet += '=';
if (mode == 1)
strRet += '=';
}
return strRet;
}
std::string EncodeBase64(const std::string& str)
{
return EncodeBase64((const unsigned char*)str.c_str(), str.size());
}
std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
{
static const int decode64_table[256] =
{
-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, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1,
-1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
49, 50, 51, -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, -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, -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, -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, -1, -1, -1, -1, -1
};
if (pfInvalid)
*pfInvalid = false;
std::vector<unsigned char> vchRet;
vchRet.reserve(strlen(p)*3/4);
int mode = 0;
int left = 0;
while (1)
{
int dec = decode64_table[(unsigned char)*p];
if (dec == -1) break;
p++;
switch (mode)
{
case 0: // we have no bits and get 6
left = dec;
mode = 1;
break;
case 1: // we have 6 bits and keep 4
vchRet.push_back((left<<2) | (dec>>4));
left = dec & 15;
mode = 2;
break;
case 2: // we have 4 bits and get 6, we keep 2
vchRet.push_back((left<<4) | (dec>>2));
left = dec & 3;
mode = 3;
break;
case 3: // we have 2 bits and get 6
vchRet.push_back((left<<6) | dec);
mode = 0;
break;
}
}
if (pfInvalid)
switch (mode)
{
case 0: // 4n base64 characters processed: ok
break;
case 1: // 4n+1 base64 character processed: impossible
*pfInvalid = true;
break;
case 2: // 4n+2 base64 characters processed: require '=='
if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1)
*pfInvalid = true;
break;
case 3: // 4n+3 base64 characters processed: require '='
if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1)
*pfInvalid = true;
break;
}
return vchRet;
}
std::string DecodeBase64(const std::string& str)
{
std::vector<unsigned char> vchRet = DecodeBase64(str.c_str());
return std::string((const char*)vchRet.data(), vchRet.size());
}
std::string EncodeBase32(const unsigned char* pch, size_t len)
{
static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567";
std::string strRet="";
strRet.reserve((len+4)/5*8);
int mode=0, left=0;
const unsigned char *pchEnd = pch+len;
while (pch<pchEnd)
{
int enc = *(pch++);
switch (mode)
{
case 0: // we have no bits
strRet += pbase32[enc >> 3];
left = (enc & 7) << 2;
mode = 1;
break;
case 1: // we have three bits
strRet += pbase32[left | (enc >> 6)];
strRet += pbase32[(enc >> 1) & 31];
left = (enc & 1) << 4;
mode = 2;
break;
case 2: // we have one bit
strRet += pbase32[left | (enc >> 4)];
left = (enc & 15) << 1;
mode = 3;
break;
case 3: // we have four bits
strRet += pbase32[left | (enc >> 7)];
strRet += pbase32[(enc >> 2) & 31];
left = (enc & 3) << 3;
mode = 4;
break;
case 4: // we have two bits
strRet += pbase32[left | (enc >> 5)];
strRet += pbase32[enc & 31];
mode = 0;
}
}
static const int nPadding[5] = {0, 6, 4, 3, 1};
if (mode)
{
strRet += pbase32[left];
for (int n=0; n<nPadding[mode]; n++)
strRet += '=';
}
return strRet;
}
std::string EncodeBase32(const std::string& str)
{
return EncodeBase32((const unsigned char*)str.c_str(), str.size());
}
std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid)
{
static const int decode32_table[256] =
{
-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, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 0, 1, 2,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
23, 24, 25, -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, -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, -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, -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, -1, -1, -1, -1, -1
};
if (pfInvalid)
*pfInvalid = false;
std::vector<unsigned char> vchRet;
vchRet.reserve((strlen(p))*5/8);
int mode = 0;
int left = 0;
while (1)
{
int dec = decode32_table[(unsigned char)*p];
if (dec == -1) break;
p++;
switch (mode)
{
case 0: // we have no bits and get 5
left = dec;
mode = 1;
break;
case 1: // we have 5 bits and keep 2
vchRet.push_back((left<<3) | (dec>>2));
left = dec & 3;
mode = 2;
break;
case 2: // we have 2 bits and keep 7
left = left << 5 | dec;
mode = 3;
break;
case 3: // we have 7 bits and keep 4
vchRet.push_back((left<<1) | (dec>>4));
left = dec & 15;
mode = 4;
break;
case 4: // we have 4 bits, and keep 1
vchRet.push_back((left<<4) | (dec>>1));
left = dec & 1;
mode = 5;
break;
case 5: // we have 1 bit, and keep 6
left = left << 5 | dec;
mode = 6;
break;
case 6: // we have 6 bits, and keep 3
vchRet.push_back((left<<2) | (dec>>3));
left = dec & 7;
mode = 7;
break;
case 7: // we have 3 bits, and keep 0
vchRet.push_back((left<<5) | dec);
mode = 0;
break;
}
}
if (pfInvalid)
switch (mode)
{
case 0: // 8n base32 characters processed: ok
break;
case 1: // 8n+1 base32 characters processed: impossible
case 3: // +3
case 6: // +6
*pfInvalid = true;
break;
case 2: // 8n+2 base32 characters processed: require '======'
if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || p[4] != '=' || p[5] != '=' || decode32_table[(unsigned char)p[6]] != -1)
*pfInvalid = true;
break;
case 4: // 8n+4 base32 characters processed: require '===='
if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || decode32_table[(unsigned char)p[4]] != -1)
*pfInvalid = true;
break;
case 5: // 8n+5 base32 characters processed: require '==='
if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || decode32_table[(unsigned char)p[3]] != -1)
*pfInvalid = true;
break;
case 7: // 8n+7 base32 characters processed: require '='
if (left || p[0] != '=' || decode32_table[(unsigned char)p[1]] != -1)
*pfInvalid = true;
break;
}
return vchRet;
}
std::string DecodeBase32(const std::string& str)
{
std::vector<unsigned char> vchRet = DecodeBase32(str.c_str());
return std::string((const char*)vchRet.data(), vchRet.size());
}
static bool ParsePrechecks(const std::string& str)
{
if (str.empty()) // No empty string allowed
return false;
if (str.size() >= 1 && (isspace(str[0]) || isspace(str[str.size()-1]))) // No padding allowed
return false;
if (str.size() != strlen(str.c_str())) // No embedded NUL characters allowed
return false;
return true;
}
bool ParseInt32(const std::string& str, int32_t *out)
{
if (!ParsePrechecks(str))
return false;
char *endp = nullptr;
errno = 0; // strtol will not set errno if valid
long int n = strtol(str.c_str(), &endp, 10);
if(out) *out = (int32_t)n;
// Note that strtol returns a *long int*, so even if strtol doesn't report an over/underflow
// we still have to check that the returned value is within the range of an *int32_t*. On 64-bit
// platforms the size of these types may be different.
return endp && *endp == 0 && !errno &&
n >= std::numeric_limits<int32_t>::min() &&
n <= std::numeric_limits<int32_t>::max();
}
bool ParseInt64(const std::string& str, int64_t *out)
{
if (!ParsePrechecks(str))
return false;
char *endp = nullptr;
errno = 0; // strtoll will not set errno if valid
long long int n = strtoll(str.c_str(), &endp, 10);
if(out) *out = (int64_t)n;
// Note that strtoll returns a *long long int*, so even if strtol doesn't report an over/underflow
// we still have to check that the returned value is within the range of an *int64_t*.
return endp && *endp == 0 && !errno &&
n >= std::numeric_limits<int64_t>::min() &&
n <= std::numeric_limits<int64_t>::max();
}
bool ParseUInt32(const std::string& str, uint32_t *out)
{
if (!ParsePrechecks(str))
return false;
if (str.size() >= 1 && str[0] == '-') // Reject negative values, unfortunately strtoul accepts these by default if they fit in the range
return false;
char *endp = nullptr;
errno = 0; // strtoul will not set errno if valid
unsigned long int n = strtoul(str.c_str(), &endp, 10);
if(out) *out = (uint32_t)n;
// Note that strtoul returns a *unsigned long int*, so even if it doesn't report an over/underflow
// we still have to check that the returned value is within the range of an *uint32_t*. On 64-bit
// platforms the size of these types may be different.
return endp && *endp == 0 && !errno &&
n <= std::numeric_limits<uint32_t>::max();
}
bool ParseUInt64(const std::string& str, uint64_t *out)
{
if (!ParsePrechecks(str))
return false;
if (str.size() >= 1 && str[0] == '-') // Reject negative values, unfortunately strtoull accepts these by default if they fit in the range
return false;
char *endp = nullptr;
errno = 0; // strtoull will not set errno if valid
unsigned long long int n = strtoull(str.c_str(), &endp, 10);
if(out) *out = (uint64_t)n;
// Note that strtoull returns a *unsigned long long int*, so even if it doesn't report an over/underflow
// we still have to check that the returned value is within the range of an *uint64_t*.
return endp && *endp == 0 && !errno &&
n <= std::numeric_limits<uint64_t>::max();
}
bool ParseDouble(const std::string& str, double *out)
{
if (!ParsePrechecks(str))
return false;
if (str.size() >= 2 && str[0] == '0' && str[1] == 'x') // No hexadecimal floats allowed
return false;
std::istringstream text(str);
text.imbue(std::locale::classic());
double result;
text >> result;
if(out) *out = result;
return text.eof() && !text.fail();
}
std::string FormatParagraph(const std::string& in, size_t width, size_t indent)
{
std::stringstream out;
size_t ptr = 0;
size_t indented = 0;
while (ptr < in.size())
{
size_t lineend = in.find_first_of('\n', ptr);
if (lineend == std::string::npos) {
lineend = in.size();
}
const size_t linelen = lineend - ptr;
const size_t rem_width = width - indented;
if (linelen <= rem_width) {
out << in.substr(ptr, linelen + 1);
ptr = lineend + 1;
indented = 0;
} else {
size_t finalspace = in.find_last_of(" \n", ptr + rem_width);
if (finalspace == std::string::npos || finalspace < ptr) {
// No place to break; just include the entire word and move on
finalspace = in.find_first_of("\n ", ptr);
if (finalspace == std::string::npos) {
// End of the string, just add it and break
out << in.substr(ptr);
break;
}
}
out << in.substr(ptr, finalspace - ptr) << "\n";
if (in[finalspace] == '\n') {
indented = 0;
} else if (indent) {
out << std::string(indent, ' ');
indented = indent;
}
ptr = finalspace + 1;
}
}
return out.str();
}
std::string i64tostr(int64_t n)
{
return strprintf("%d", n);
}
std::string itostr(int n)
{
return strprintf("%d", n);
}
int64_t atoi64(const char* psz)
{
#ifdef _MSC_VER
return _atoi64(psz);
#else
return strtoll(psz, nullptr, 10);
#endif
}
int64_t atoi64(const std::string& str)
{
#ifdef _MSC_VER
return _atoi64(str.c_str());
#else
return strtoll(str.c_str(), nullptr, 10);
#endif
}
int atoi(const std::string& str)
{
return atoi(str.c_str());
}
/** Upper bound for mantissa.
* 10^18-1 is the largest arbitrary decimal that will fit in a signed 64-bit integer.
* Larger integers cannot consist of arbitrary combinations of 0-9:
*
* 999999999999999999 1^18-1
* 9223372036854775807 (1<<63)-1 (max int64_t)
* 9999999999999999999 1^19-1 (would overflow)
*/
static const int64_t UPPER_BOUND = 1000000000000000000LL - 1LL;
/** Helper function for ParseFixedPoint */
static inline bool ProcessMantissaDigit(char ch, int64_t &mantissa, int &mantissa_tzeros)
{
if(ch == '0')
++mantissa_tzeros;
else {
for (int i=0; i<=mantissa_tzeros; ++i) {
if (mantissa > (UPPER_BOUND / 10LL))
return false; /* overflow */
mantissa *= 10;
}
mantissa += ch - '0';
mantissa_tzeros = 0;
}
return true;
}
bool ParseFixedPoint(const std::string &val, int decimals, int64_t *amount_out)
{
int64_t mantissa = 0;
int64_t exponent = 0;
int mantissa_tzeros = 0;
bool mantissa_sign = false;
bool exponent_sign = false;
int ptr = 0;
int end = val.size();
int point_ofs = 0;
if (ptr < end && val[ptr] == '-') {
mantissa_sign = true;
++ptr;
}
if (ptr < end)
{
if (val[ptr] == '0') {
/* pass single 0 */
++ptr;
} else if (val[ptr] >= '1' && val[ptr] <= '9') {
while (ptr < end && val[ptr] >= '0' && val[ptr] <= '9') {
if (!ProcessMantissaDigit(val[ptr], mantissa, mantissa_tzeros))
return false; /* overflow */
++ptr;
}
} else return false; /* missing expected digit */
} else return false; /* empty string or loose '-' */
if (ptr < end && val[ptr] == '.')
{
++ptr;
if (ptr < end && val[ptr] >= '0' && val[ptr] <= '9')
{
while (ptr < end && val[ptr] >= '0' && val[ptr] <= '9') {
if (!ProcessMantissaDigit(val[ptr], mantissa, mantissa_tzeros))
return false; /* overflow */
++ptr;
++point_ofs;
}
} else return false; /* missing expected digit */
}
if (ptr < end && (val[ptr] == 'e' || val[ptr] == 'E'))
{
++ptr;
if (ptr < end && val[ptr] == '+')
++ptr;
else if (ptr < end && val[ptr] == '-') {
exponent_sign = true;
++ptr;
}
if (ptr < end && val[ptr] >= '0' && val[ptr] <= '9') {
while (ptr < end && val[ptr] >= '0' && val[ptr] <= '9') {
if (exponent > (UPPER_BOUND / 10LL))
return false; /* overflow */
exponent = exponent * 10 + val[ptr] - '0';
++ptr;
}
} else return false; /* missing expected digit */
}
if (ptr != end)
return false; /* trailing garbage */
/* finalize exponent */
if (exponent_sign)
exponent = -exponent;
exponent = exponent - point_ofs + mantissa_tzeros;
/* finalize mantissa */
if (mantissa_sign)
mantissa = -mantissa;
/* convert to one 64-bit fixed-point value */
exponent += decimals;
if (exponent < 0)
return false; /* cannot represent values smaller than 10^-decimals */
if (exponent >= 18)
return false; /* cannot represent values larger than or equal to 10^(18-decimals) */
for (int i=0; i < exponent; ++i) {
if (mantissa > (UPPER_BOUND / 10LL) || mantissa < -(UPPER_BOUND / 10LL))
return false; /* overflow */
mantissa *= 10;
}
if (mantissa > UPPER_BOUND || mantissa < -UPPER_BOUND)
return false; /* overflow */
if (amount_out)
*amount_out = mantissa;
return true;
}
| [
"arinesau@gmail.com"
] | arinesau@gmail.com |
70fa4b3fe5aa99d79dfcdca4b04c33c071d38848 | 040eab433f00786ec34142f242c0735e8c19fd9c | /samples/threat_level/src/GameOverState.hpp | bc9d7f62528ec2774a79ee22dcebb55783e72e48 | [
"Zlib"
] | permissive | MORTAL2000/crogine | d7c73f174dfd7b1cf89ee693f98c7ecd41bb11f4 | 488b46dc3f706def8fdae30346c248f01c95b49c | refs/heads/master | 2020-12-20T20:52:56.810085 | 2020-01-24T15:41:32 | 2020-01-24T15:41:32 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,220 | hpp | /*-----------------------------------------------------------------------
Matt Marchant 2017
http://trederia.blogspot.com
crogine test application - Zlib license.
This software is provided 'as-is', without any express or
implied warranty.In no event will the authors be held
liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions :
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but
is not required.
2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any
source distribution.
-----------------------------------------------------------------------*/
#ifndef TL_GAMEOVER_STATE_HPP_
#define TL_GAMEOVER_STATE_HPP_
#include <crogine/core/State.hpp>
#include <crogine/ecs/Scene.hpp>
#include <crogine/graphics/ResourceAutomation.hpp>
#include <crogine/graphics/Texture.hpp>
#include "StateIDs.hpp"
#include "ResourceIDs.hpp"
namespace cro
{
class UISystem;
class SpriteSheet;
}
struct SharedResources;
using ResourcePtr = std::unique_ptr<SharedResources>;
class GameOverState final : public cro::State
{
public:
GameOverState(cro::StateStack&, cro::State::Context, ResourcePtr&);
~GameOverState() = default;
cro::StateID getStateID() const override { return States::GameOver; }
bool handleEvent(const cro::Event&) override;
void handleMessage(const cro::Message&) override;
bool simulate(cro::Time) override;
void render() override;
private:
cro::Scene m_uiScene;
SharedResources& m_sharedResources;
cro::UISystem* m_uiSystem;
cro::Texture m_backgroundTexture;
void load();
void updateView();
void createTextBox(const cro::SpriteSheet&);
void handleTextEvent(const cro::Event&);
void updateTextBox();
};
#endif //TL_GAMEOVER_STATE_HPP_ | [
"matty_styles@hotmail.com"
] | matty_styles@hotmail.com |
6e44e6b0822fdf556c9fd9c994639569be259640 | dc37e235701de22d0609d47fab3687ef6dfa2eca | /minionsOOP/Game.cpp | 1b1092c1b7bf3eaa83b1252b4f6b7bd0baff2308 | [] | no_license | zhivkopetrov/CacheFriendlyCode | ae3295e9806d9271fa16bf6cb1e54cb7370902e6 | 45d6593274979846b74d9a1c8827e3b1860404d2 | refs/heads/master | 2021-04-06T11:27:28.635505 | 2019-09-30T19:12:44 | 2019-09-30T19:12:44 | 124,690,897 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 10,788 | cpp | /*
* Game.cpp
*
* Created on: 7 Feb 2018
* Author: Zhivko Petrov
*/
//Corresponding header
#include "Game.h"
//C system headers
#include <unistd.h>
//C++ system headers
#include <cstdlib>
#include <cstdio>
//Other libraries headers
#include <SDL2/SDL_events.h>
//Own components headers
#include "common/CommonDefines.h"
#include "common/Time.h"
#include "common/Random.hpp"
#define MONITOR_WIDTH 1920
#define MONITOR_HEIGHT 1080
Game::Game()
{
_winTimeout = 40000000; //in microseconds (40 seconds)
_remainingSecondsToWin = _winTimeout / MICROSECOND;
}
int32_t Game::init()
{
int32_t err = EXIT_SUCCESS;
//initialise monitor to FullHD
if(EXIT_SUCCESS != _renderer.init(0, 0, MONITOR_WIDTH, MONITOR_HEIGHT))
{
fprintf(stderr, "Error in _renderer.init() \n");
err = EXIT_FAILURE;
}
if(EXIT_SUCCESS == err)
{
if(EXIT_SUCCESS != _background.init(&_renderer,
Textures::TERRAIN,
0,
SDL_Point{ 0, 0 },
MONITOR_WIDTH,
MONITOR_HEIGHT))
{
fprintf(stderr, "Error in _background.init()\n");
err = EXIT_FAILURE;
}
}
if(EXIT_SUCCESS == err)
{
if(EXIT_SUCCESS != _youWin.init(&_renderer,
Textures::YOU_WIN,
0,
SDL_Point{ 440, 0 },
880,
MONITOR_HEIGHT))
{
fprintf(stderr, "Error in _youWin.init()\n");
err = EXIT_FAILURE;
}
}
if(EXIT_SUCCESS == err)
{
if(EXIT_SUCCESS != _gameOver.init(&_renderer,
Textures::GAME_OVER,
0,
SDL_Point{ 0, 0 },
MONITOR_WIDTH,
MONITOR_HEIGHT))
{
fprintf(stderr, "Error in _background.init()\n");
err = EXIT_FAILURE;
}
}
if(EXIT_SUCCESS == err)
{
_bulletIcons.resize(MAX_BULLETS);
const int32_t BULLET_ICON_START_X = 1500;
const int32_t BULLET_ICON_START_Y = 10;
const int32_t OFFSET_X = 35;
for(int32_t i = 0; i < MAX_BULLETS; ++i)
{
if(EXIT_SUCCESS != _bulletIcons[i].init(
&_renderer,
Textures::BULLET_ICON,
0,
SDL_Point{ BULLET_ICON_START_X +
((MAX_BULLETS - i - 1) * OFFSET_X),
BULLET_ICON_START_Y },
29, //bullet icon width
85)) //bullet icon height
{
fprintf(stderr, "Error in _bulletIcons[%d].init()\n", i);
err = EXIT_FAILURE;
break;
}
}
}
if(EXIT_SUCCESS == err)
{
_monsters.resize(MAX_MONSTERS);
for(int32_t i = 0; i < MAX_MONSTERS; ++i)
{
if(EXIT_SUCCESS != _monsters[i].init(
&_renderer,
Textures::MONSTER,
0,
SDL_Point{
Random::getInstance().generate(0, _monsters[i].getMaxX()),
Random::getInstance().generate(0, _monsters[i].getMaxY()) }))
{
fprintf(stderr, "Error in _monsters[%d].init()\n", i);
err = EXIT_FAILURE;
break;
}
else
{
_monsters[i].setBulletsVec(&_bullets);
}
}
}
if(EXIT_SUCCESS == err)
{
if(EXIT_SUCCESS != _hero.init(&_renderer,
Textures::HERO,
0,
SDL_Point{ 0, 0 }))
{
fprintf(stderr, "Error in _hero.init()\n");
err = EXIT_FAILURE;
}
else
{
_hero.setMonstersVec(&_monsters);
_hero.setBulletsVec(&_bullets);
_hero.setBulletIconsVec(&_bulletIcons);
_hero.chooseNonLosingStartPosition();
}
}
if(EXIT_SUCCESS == err)
{
if(EXIT_SUCCESS !=
_debugConsole.init(&_renderer, _renderer.getTextureContainer()))
{
fprintf(stderr, "Error in _debugConsole.init()\n");
err = EXIT_FAILURE;
}
}
if(EXIT_SUCCESS == err)
{
if(EXIT_SUCCESS != _countdownText.init(&_renderer,
_renderer.getTextureContainer(),
Textures::COUNTDOWN_TEXT,
SDL_Point { 880, 450 },
"3",
FontSize::BIG))
{
fprintf(stderr, "Error in _countdownText.init()\n");
err = EXIT_FAILURE;
}
}
if(EXIT_SUCCESS == err)
{
std::string text = "Survive for: ";
text.append(std::to_string(_remainingSecondsToWin)).append(" s");
if(EXIT_SUCCESS != _winTimeoutText.init(&_renderer,
_renderer.getTextureContainer(),
Textures::WIN_TIMEOUT_TEXT,
SDL_Point { 800, 20 },
text.c_str(),
FontSize::SMALL))
{
fprintf(stderr, "Error in _winTimeoutText.init()\n");
err = EXIT_FAILURE;
}
}
if(EXIT_SUCCESS == err)
{
_bullets.reserve(MAX_BULLETS);
//+1 for the hero, +1 for the background, +1 for the winTimeoutText
//MAX_BULLETS * 2 (for both real bullets and bullet icons)
_entities.resize(MAX_MONSTERS + (MAX_BULLETS * 2) + 3, nullptr);
}
return err;
}
void Game::deinit()
{
_renderer.deinit();
}
void Game::mainLoop()
{
volatile bool shouldQuit = false;
SDL_Event e;
memset(&e, 0, sizeof(e));
Time time;
while(!shouldQuit)
{
if(checkWinOrLoseConditions())
{
shouldQuit = true;
continue;
}
if(handleUserEvent(e))
{
shouldQuit = true;
continue;
}
_renderer.clearScreen();
const int64_t elapsedTime = time.getElapsed().toMicroseconds();
updateTimeoutText(elapsedTime);
if(_debugConsole.isActive())
{
_debugConsole.update(elapsedTime);
}
invalidateInactiveEntities();
uint32_t widgetsCount = 0;
loadActiveFrameEnities(&widgetsCount);
for(uint32_t i = 0; i < widgetsCount; ++i)
{
_entities[i]->updateState(elapsedTime);
_entities[i]->updatePhysics();
if(_entities[i]->isActive())
{
_entities[i]->draw();
}
}
if(_debugConsole.isActive())
{
_debugConsole.draw();
}
_renderer.finishFrame();
}
}
bool Game::handleUserEvent(SDL_Event & e)
{
if(0 != SDL_PollEvent(&e))
{
if((SDLK_ESCAPE == e.key.keysym.sym && e.type == SDL_KEYUP) ||
(SDL_QUIT == e.type))
{
return true;
}
_hero.handleEvent(e);
_debugConsole.handleEvent(e);
}
return false;
}
void Game::showGetReadyScreen()
{
int32_t secondsRemaining = 3;
while(secondsRemaining)
{
_renderer.clearScreen();
_countdownText.setText(std::to_string(secondsRemaining).c_str());
uint32_t widgetsCounts = 0;
loadActiveFrameEnities(&widgetsCounts);
for(uint32_t i = 0; i < widgetsCounts; ++i)
{
_entities[i]->draw();
}
_countdownText.draw();
--secondsRemaining;
_renderer.finishFrame();
sleep(1);
}
}
void Game::updateTimeoutText(const int64_t elapsedTime)
{
_winTimeout -= elapsedTime;
const int64_t currRemainigSecondsToWin = _winTimeout / MICROSECOND;
if(_remainingSecondsToWin != currRemainigSecondsToWin)
{
_remainingSecondsToWin = currRemainigSecondsToWin;
std::string text = "Survive for: ";
text.append(std::to_string(_remainingSecondsToWin)).append(" s");
_winTimeoutText.setText(text.c_str());
}
}
bool Game::checkWinOrLoseConditions()
{
if(0 >= _winTimeout)
{
_renderer.clearScreen();
_youWin.draw();
_renderer.finishFrame();
sleep(7);
return true;
}
else if(!_hero.isActive())
{
_renderer.clearScreen();
_gameOver.draw();
_renderer.finishFrame();
sleep(7);
return true;
}
return false;
}
void Game::loadActiveFrameEnities(uint32_t * outWidgetsCount)
{
uint32_t currIndex = 0;
//background must be first - because of image layering
// _entities[currIndex++] = &_background;
//background must be first - because of image layering
_entities[currIndex++] = &_winTimeoutText;
const uint32_t BULLET_ICONS_SIZE = _bulletIcons.size();
for(uint32_t i = 0; i < BULLET_ICONS_SIZE; ++i)
{
_entities[currIndex++] = &_bulletIcons[i];
}
_entities[currIndex++] = &_hero;
const uint32_t MONSTERS_SIZE = _monsters.size();
for(uint32_t i = 0; i < MONSTERS_SIZE; ++i)
{
_entities[currIndex++] = &_monsters[i];
}
const uint32_t BULEETS_SIZE = _bullets.size();
for(uint32_t i = 0; i < BULEETS_SIZE; ++i)
{
_entities[currIndex++] = &_bullets[i];
}
*outWidgetsCount = currIndex;
}
void Game::invalidateInactiveEntities()
{
std::vector<StaticImage>::iterator bulletIconIt;
for(bulletIconIt = _bulletIcons.begin(); bulletIconIt != _bulletIcons.end();)
{
if(bulletIconIt->isActive())
{
++bulletIconIt;
continue;
}
else
{
bulletIconIt = _bulletIcons.erase(bulletIconIt);
}
}
std::vector<Bullet>::iterator bulletIt;
for(bulletIt = _bullets.begin(); bulletIt != _bullets.end();)
{
if(bulletIt->isActive())
{
++bulletIt;
continue;
}
else
{
bulletIt = _bullets.erase(bulletIt);
}
}
std::vector<Monster>::iterator monsterIt;
for(monsterIt = _monsters.begin(); monsterIt != _monsters.end();)
{
if(monsterIt->isActive())
{
++monsterIt;
continue;
}
else
{
monsterIt = _monsters.erase(monsterIt);
}
}
}
| [
"noreply@github.com"
] | zhivkopetrov.noreply@github.com |
b9774cbe9b1df1babfbc302fb90ad3be3c93b30e | 73dd6869ad9e72ca20efc9c3881c626a08290f58 | /src/client/GameProc/CallGM.h | 44465e66de94d6f88c9bbe2f0f5a98f764a14771 | [] | no_license | rcirca/irose | 76cd50fa223375c67e6db412aea2ab941d4c1934 | 39afb7d253f66c0f5f6661d0cb0c179c64a6e64e | refs/heads/master | 2020-03-19T16:21:58.555061 | 2018-05-23T13:03:18 | 2018-05-23T13:03:18 | 136,712,714 | 4 | 4 | null | 2018-06-09T10:17:04 | 2018-06-09T10:17:04 | null | UHC | C++ | false | false | 317 | h | #ifndef _CALLGM_
#define _CALLGM_
#include <string>
///
/// 유져의 GM 호출 요청을 웹으로 전송( 각 국가별 게시판 )
///
class CCallGM
{
public:
CCallGM(void);
~CCallGM(void);
void CallGM( std::string& strServerName, std::string& strChannelName, std::string& strMsg );
};
#endif //_CALLGM_
| [
"ralphminderhoud@gmail.com"
] | ralphminderhoud@gmail.com |
e9c34021c87578f9fdeea0d685bc38848cfdf490 | eabe03e538e41b5223a605525bde6976503c1f81 | /gurobi/qt_gurobi/test.cpp | 93af2b7eac17a578cb5eaaa22a317c7f720d8488 | [] | no_license | zhengziqiang/learngit | 99a29ffa82fb6d93fdbaaa10e1c62f6624cb31cb | 66d0cb6b3a8b76d6836504514021fa7f08bbc6ee | refs/heads/master | 2020-04-04T04:08:57.674855 | 2017-07-19T09:51:13 | 2017-07-19T09:51:13 | 55,275,928 | 6 | 4 | null | null | null | null | UTF-8 | C++ | false | false | 2,324 | cpp | #include<iostream>
#include<vector>
#include "gurobi_c++.h"
#include <stdlib.h>
#include <time.h>
#include <sstream>
using namespace std;
bool sub_train(vector <vector <int> > &m_data,vector <vector <int> >&m0_data,vector <vector <int> > aim_data,int n_8_1,int n_6_1,vector<double> &ans){
GRBEnv env=GRBEnv();
GRBModel model=GRBModel(env);
GRBVar vars[n_6_1];
for(int i=0;i<n_6_1;i++){
double lower=double(aim_data[i][1]);
double upper=double(aim_data[i][2]);
string name;
stringstream stream;
stream<<i;
stream>>name;
vars[i]=model.addVar(lower,upper,0.0,GRB_INTEGER,name);
}
GRBLinExpr con_left;
GRBLinExpr con_right;
for(int i=0;i<n_8_1;i++){
con_right=double(m_data[i][0]);
con_left=0.0;
for(int j=1;j<n_6_1+1;j++){
con_left=con_left+m_data[i][j]*vars[j-1];
}
string name;
stringstream stream;
stream<<i;
stream>>name;
switch(m0_data[i][0]){
case -1:
{
model.addConstr(con_left,GRB_GREATER_EQUAL,con_right,name);
break;
}
case 0:{
model.addConstr(con_left,GRB_EQUAL,con_right,name);
break;
}
case 1:{
model.addConstr(con_left,GRB_LESS_EQUAL,con_right,name);
break;
}
default:
break;
}
}
GRBLinExpr obj = 0.0;
for(int i=0;i<n_6_1;i++){
obj+=vars[i];
}
model.setObjective(obj,GRB_MINIMIZE);
model.optimize();
if(model.get(GRB_IntAttr_Status)!=GRB_OPTIMAL){
return false;
}else{
vector <double> x(n_6_1,0);
for(int i=0;i<n_6_1;i++){
x[i]=vars[i].get(GRB_DoubleAttr_X);
}
ans=x;
return true;
}
}
//int main(){
// int n,m;
// n=5;
// m=6;
// int a=1,b=10;
// int matrix[5][6];
// for(int i=0;i<n;i++){
// for(int j=0;j<m;j++){
// matrix[i][j]=rand()%10;
// }
// }
// int ans[6];
// for(int i=0;i<m;i++){
// ans[i]=rand()%12;
// }
// double res=sub(matrix,n,m,ans);
// cout<<res<<endl;
// return 0;
//}
| [
"1174986943@qq.com"
] | 1174986943@qq.com |
d0f0b90d9b4006661d3a985b1a3e28ac6a7eb8f3 | 21ab9b42039e4559a738954680561925d531d9a6 | /pybind11/operators.h | 293d5abd29a9f99f8a2bb041bd9204ed8f4e3dc5 | [
"Apache-2.0"
] | permissive | renesugar/pph-cpp | 9f9db4ac2424873c8b79e911adb5c0dd5399e0c4 | 8df79ebf6b7c7b92af69eec3b7032eb53bbc25af | refs/heads/master | 2023-04-15T00:28:04.526648 | 2020-06-09T21:53:04 | 2020-06-09T21:53:04 | 104,619,261 | 3 | 0 | Apache-2.0 | 2021-04-20T20:08:24 | 2017-09-24T04:41:59 | C++ | UTF-8 | C++ | false | false | 9,049 | h | /*
pybind11/operator.h: Metatemplates for operator overloading
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>
All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
*/
#pragma once
#include "pybind11.h"
#if defined(__clang__) && !defined(__INTEL_COMPILER)
# pragma clang diagnostic ignored "-Wunsequenced" // multiple unsequenced modifications to 'self' (when using def(py::self OP Type()))
#elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable: 4127) // warning C4127: Conditional expression is constant
#endif
NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
NAMESPACE_BEGIN(detail)
/// Enumeration with all supported operator types
enum op_id : int {
op_add, op_sub, op_mul, op_div, op_mod, op_divmod, op_pow, op_lshift,
op_rshift, op_and, op_xor, op_or, op_neg, op_pos, op_abs, op_invert,
op_int, op_long, op_float, op_str, op_cmp, op_gt, op_ge, op_lt, op_le,
op_eq, op_ne, op_iadd, op_isub, op_imul, op_idiv, op_imod, op_ilshift,
op_irshift, op_iand, op_ixor, op_ior, op_complex, op_bool, op_nonzero,
op_repr, op_truediv, op_itruediv, op_hash
};
enum op_type : int {
op_l, /* base type on left */
op_r, /* base type on right */
op_u /* unary operator */
};
struct self_t { };
static const self_t self = self_t();
/// Type for an unused type slot
struct undefined_t { };
/// Don't warn about an unused variable
inline self_t __self() { return self; }
/// base template of operator implementations
template <op_id, op_type, typename B, typename L, typename R> struct op_impl { };
/// Operator implementation generator
template <op_id id, op_type ot, typename L, typename R> struct op_ {
template <typename Class, typename... Extra> void execute(Class &cl, const Extra&... extra) const {
using Base = typename Class::type;
using L_type = conditional_t<std::is_same<L, self_t>::value, Base, L>;
using R_type = conditional_t<std::is_same<R, self_t>::value, Base, R>;
using op = op_impl<id, ot, Base, L_type, R_type>;
cl.def(op::name(), &op::execute, is_operator(), extra...);
#if PY_MAJOR_VERSION < 3
if (id == op_truediv || id == op_itruediv)
cl.def(id == op_itruediv ? "__idiv__" : ot == op_l ? "__div__" : "__rdiv__",
&op::execute, is_operator(), extra...);
#endif
}
template <typename Class, typename... Extra> void execute_cast(Class &cl, const Extra&... extra) const {
using Base = typename Class::type;
using L_type = conditional_t<std::is_same<L, self_t>::value, Base, L>;
using R_type = conditional_t<std::is_same<R, self_t>::value, Base, R>;
using op = op_impl<id, ot, Base, L_type, R_type>;
cl.def(op::name(), &op::execute_cast, is_operator(), extra...);
#if PY_MAJOR_VERSION < 3
if (id == op_truediv || id == op_itruediv)
cl.def(id == op_itruediv ? "__idiv__" : ot == op_l ? "__div__" : "__rdiv__",
&op::execute, is_operator(), extra...);
#endif
}
};
#define PYBIND11_BINARY_OPERATOR(id, rid, op, expr) \
template <typename B, typename L, typename R> struct op_impl<op_##id, op_l, B, L, R> { \
static char const* name() { return "__" #id "__"; } \
static auto execute(const L &l, const R &r) -> decltype(expr) { return (expr); } \
static B execute_cast(const L &l, const R &r) { return B(expr); } \
}; \
template <typename B, typename L, typename R> struct op_impl<op_##id, op_r, B, L, R> { \
static char const* name() { return "__" #rid "__"; } \
static auto execute(const R &r, const L &l) -> decltype(expr) { return (expr); } \
static B execute_cast(const R &r, const L &l) { return B(expr); } \
}; \
inline op_<op_##id, op_l, self_t, self_t> op(const self_t &, const self_t &) { \
return op_<op_##id, op_l, self_t, self_t>(); \
} \
template <typename T> op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
return op_<op_##id, op_l, self_t, T>(); \
} \
template <typename T> op_<op_##id, op_r, T, self_t> op(const T &, const self_t &) { \
return op_<op_##id, op_r, T, self_t>(); \
}
#define PYBIND11_INPLACE_OPERATOR(id, op, expr) \
template <typename B, typename L, typename R> struct op_impl<op_##id, op_l, B, L, R> { \
static char const* name() { return "__" #id "__"; } \
static auto execute(L &l, const R &r) -> decltype(expr) { return expr; } \
static B execute_cast(L &l, const R &r) { return B(expr); } \
}; \
template <typename T> op_<op_##id, op_l, self_t, T> op(const self_t &, const T &) { \
return op_<op_##id, op_l, self_t, T>(); \
}
#define PYBIND11_UNARY_OPERATOR(id, op, expr) \
template <typename B, typename L> struct op_impl<op_##id, op_u, B, L, undefined_t> { \
static char const* name() { return "__" #id "__"; } \
static auto execute(const L &l) -> decltype(expr) { return expr; } \
static B execute_cast(const L &l) { return B(expr); } \
}; \
inline op_<op_##id, op_u, self_t, undefined_t> op(const self_t &) { \
return op_<op_##id, op_u, self_t, undefined_t>(); \
}
PYBIND11_BINARY_OPERATOR(sub, rsub, operator-, l - r)
PYBIND11_BINARY_OPERATOR(add, radd, operator+, l + r)
PYBIND11_BINARY_OPERATOR(mul, rmul, operator*, l * r)
PYBIND11_BINARY_OPERATOR(truediv, rtruediv, operator/, l / r)
PYBIND11_BINARY_OPERATOR(mod, rmod, operator%, l % r)
PYBIND11_BINARY_OPERATOR(lshift, rlshift, operator<<, l << r)
PYBIND11_BINARY_OPERATOR(rshift, rrshift, operator>>, l >> r)
PYBIND11_BINARY_OPERATOR(and, rand, operator&, l & r)
PYBIND11_BINARY_OPERATOR(xor, rxor, operator^, l ^ r)
PYBIND11_BINARY_OPERATOR(eq, eq, operator==, l == r)
PYBIND11_BINARY_OPERATOR(ne, ne, operator!=, l != r)
PYBIND11_BINARY_OPERATOR(or, ror, operator|, l | r)
PYBIND11_BINARY_OPERATOR(gt, lt, operator>, l > r)
PYBIND11_BINARY_OPERATOR(ge, le, operator>=, l >= r)
PYBIND11_BINARY_OPERATOR(lt, gt, operator<, l < r)
PYBIND11_BINARY_OPERATOR(le, ge, operator<=, l <= r)
//PYBIND11_BINARY_OPERATOR(pow, rpow, pow, std::pow(l, r))
PYBIND11_INPLACE_OPERATOR(iadd, operator+=, l += r)
PYBIND11_INPLACE_OPERATOR(isub, operator-=, l -= r)
PYBIND11_INPLACE_OPERATOR(imul, operator*=, l *= r)
PYBIND11_INPLACE_OPERATOR(itruediv, operator/=, l /= r)
PYBIND11_INPLACE_OPERATOR(imod, operator%=, l %= r)
PYBIND11_INPLACE_OPERATOR(ilshift, operator<<=, l <<= r)
PYBIND11_INPLACE_OPERATOR(irshift, operator>>=, l >>= r)
PYBIND11_INPLACE_OPERATOR(iand, operator&=, l &= r)
PYBIND11_INPLACE_OPERATOR(ixor, operator^=, l ^= r)
PYBIND11_INPLACE_OPERATOR(ior, operator|=, l |= r)
PYBIND11_UNARY_OPERATOR(neg, operator-, -l)
PYBIND11_UNARY_OPERATOR(pos, operator+, +l)
// WARNING: This usage of `abs` should only be done for existing STL overloads.
// Adding overloads directly in to the `std::` namespace is advised against:
// https://en.cppreference.com/w/cpp/language/extending_std
PYBIND11_UNARY_OPERATOR(abs, abs, std::abs(l))
PYBIND11_UNARY_OPERATOR(hash, hash, std::hash<L>()(l))
PYBIND11_UNARY_OPERATOR(invert, operator~, (~l))
PYBIND11_UNARY_OPERATOR(bool, operator!, !!l)
PYBIND11_UNARY_OPERATOR(int, int_, (int) l)
PYBIND11_UNARY_OPERATOR(float, float_, (double) l)
#undef PYBIND11_BINARY_OPERATOR
#undef PYBIND11_INPLACE_OPERATOR
#undef PYBIND11_UNARY_OPERATOR
NAMESPACE_END(detail)
using detail::self;
// Add named operators so that they are accessible via `py::`.
using detail::hash;
NAMESPACE_END(PYBIND11_NAMESPACE)
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
| [
"rene.sugar@gmail.com"
] | rene.sugar@gmail.com |
da4dae4a51995cf8fb66e91d448187565e9d4a42 | 425963de819e446a75441ff901adbfe5f1c5dea6 | /ui/android/view_android.cc | 7af741ca8b13b0729b0208c9374dedda9c5f1278 | [
"BSD-3-Clause"
] | permissive | Igalia/chromium | 06590680bcc074cf191979c496d84888dbb54df6 | 261db3a6f6a490742786cf841afa92e02a53b33f | refs/heads/ozone-wayland-dev | 2022-12-06T16:31:09.335901 | 2019-12-06T21:11:21 | 2019-12-06T21:11:21 | 85,595,633 | 123 | 25 | NOASSERTION | 2019-02-05T08:04:47 | 2017-03-20T15:45:36 | null | UTF-8 | C++ | false | false | 21,281 | cc | // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/android/view_android.h"
#include <algorithm>
#include <cmath>
#include <utility>
#include "base/android/jni_android.h"
#include "base/android/jni_string.h"
#include "base/containers/adapters.h"
#include "base/stl_util.h"
#include "cc/layers/layer.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
#include "jni/ViewAndroidDelegate_jni.h"
#include "third_party/blink/public/platform/web_cursor_info.h"
#include "ui/android/event_forwarder.h"
#include "ui/android/window_android.h"
#include "ui/base/layout.h"
#include "ui/events/android/drag_event_android.h"
#include "ui/events/android/event_handler_android.h"
#include "ui/events/android/gesture_event_android.h"
#include "ui/events/android/key_event_android.h"
#include "ui/events/android/motion_event_android.h"
#include "ui/gfx/android/java_bitmap.h"
#include "url/gurl.h"
namespace ui {
using base::android::ConvertUTF8ToJavaString;
using base::android::JavaRef;
using base::android::ScopedJavaLocalRef;
using blink::WebCursorInfo;
ViewAndroid::ScopedAnchorView::ScopedAnchorView(
JNIEnv* env,
const JavaRef<jobject>& jview,
const JavaRef<jobject>& jdelegate)
: view_(env, jview.obj()), delegate_(env, jdelegate.obj()) {
// If there's a view, then we need a delegate to remove it.
DCHECK(!jdelegate.is_null() || jview.is_null());
}
ViewAndroid::ScopedAnchorView::ScopedAnchorView() { }
ViewAndroid::ScopedAnchorView::ScopedAnchorView(ScopedAnchorView&& other) {
view_ = other.view_;
other.view_.reset();
delegate_ = other.delegate_;
other.delegate_.reset();
}
ViewAndroid::ScopedAnchorView&
ViewAndroid::ScopedAnchorView::operator=(ScopedAnchorView&& other) {
if (this != &other) {
view_ = other.view_;
other.view_.reset();
delegate_ = other.delegate_;
other.delegate_.reset();
}
return *this;
}
ViewAndroid::ScopedAnchorView::~ScopedAnchorView() {
Reset();
}
void ViewAndroid::ScopedAnchorView::Reset() {
JNIEnv* env = base::android::AttachCurrentThread();
const ScopedJavaLocalRef<jobject> view = view_.get(env);
const ScopedJavaLocalRef<jobject> delegate = delegate_.get(env);
if (!view.is_null() && !delegate.is_null()) {
Java_ViewAndroidDelegate_removeView(env, delegate, view);
}
view_.reset();
delegate_.reset();
}
const base::android::ScopedJavaLocalRef<jobject>
ViewAndroid::ScopedAnchorView::view() const {
JNIEnv* env = base::android::AttachCurrentThread();
return view_.get(env);
}
ViewAndroid::ViewAndroid(LayoutType layout_type)
: parent_(nullptr), layout_type_(layout_type) {}
ViewAndroid::ViewAndroid() : ViewAndroid(LayoutType::NORMAL) {}
ViewAndroid::~ViewAndroid() {
RemoveAllChildren(GetWindowAndroid() != nullptr);
observer_list_.Clear();
RemoveFromParent();
}
void ViewAndroid::SetDelegate(const JavaRef<jobject>& delegate) {
// A ViewAndroid may have its own delegate or otherwise will use the next
// available parent's delegate.
JNIEnv* env = base::android::AttachCurrentThread();
delegate_ = JavaObjectWeakGlobalRef(env, delegate);
}
void ViewAndroid::UpdateFrameInfo(const FrameInfo& frame_info) {
frame_info_ = frame_info;
}
float ViewAndroid::GetDipScale() {
return ui::GetScaleFactorForNativeView(this);
}
ScopedJavaLocalRef<jobject> ViewAndroid::GetEventForwarder() {
if (!event_forwarder_) {
DCHECK(!RootPathHasEventForwarder(parent_))
<< "The view tree path already has an event forwarder.";
DCHECK(!SubtreeHasEventForwarder(this))
<< "The view tree path already has an event forwarder.";
event_forwarder_.reset(new EventForwarder(this));
}
return event_forwarder_->GetJavaObject();
}
void ViewAndroid::AddChild(ViewAndroid* child) {
DCHECK(child);
DCHECK(!base::ContainsValue(children_, child));
DCHECK(!RootPathHasEventForwarder(this) || !SubtreeHasEventForwarder(child))
<< "Some view tree path will have more than one event forwarder "
"if the child is added.";
// The new child goes to the top, which is the end of the list.
children_.push_back(child);
if (child->parent_)
child->RemoveFromParent();
child->parent_ = this;
// Empty physical backing size need not propagating down since it can
// accidentally overwrite the valid ones in the children.
if (!physical_size_.IsEmpty())
child->OnPhysicalBackingSizeChanged(physical_size_);
// Empty view size also need not propagating down in order to prevent
// spurious events with empty size from being sent down.
if (child->match_parent() && !bounds_.IsEmpty() &&
child->GetSize() != bounds_.size()) {
child->OnSizeChangedInternal(bounds_.size());
child->DispatchOnSizeChanged();
}
if (GetWindowAndroid())
child->OnAttachedToWindow();
}
// static
bool ViewAndroid::RootPathHasEventForwarder(ViewAndroid* view) {
while (view) {
if (view->has_event_forwarder())
return true;
view = view->parent_;
}
return false;
}
// static
bool ViewAndroid::SubtreeHasEventForwarder(ViewAndroid* view) {
if (view->has_event_forwarder())
return true;
for (auto* child : view->children_) {
if (SubtreeHasEventForwarder(child))
return true;
}
return false;
}
void ViewAndroid::MoveToFront(ViewAndroid* child) {
DCHECK(child);
auto it = std::find(children_.begin(), children_.end(), child);
DCHECK(it != children_.end());
// Top element is placed at the end of the list.
if (*it != children_.back())
children_.splice(children_.end(), children_, it);
}
void ViewAndroid::MoveToBack(ViewAndroid* child) {
DCHECK(child);
auto it = std::find(children_.begin(), children_.end(), child);
DCHECK(it != children_.end());
// Bottom element is placed at the beginning of the list.
if (*it != children_.front())
children_.splice(children_.begin(), children_, it);
}
void ViewAndroid::RemoveFromParent() {
if (parent_)
parent_->RemoveChild(this);
}
ViewAndroid::ScopedAnchorView ViewAndroid::AcquireAnchorView() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return ViewAndroid::ScopedAnchorView();
JNIEnv* env = base::android::AttachCurrentThread();
return ViewAndroid::ScopedAnchorView(
env, Java_ViewAndroidDelegate_acquireView(env, delegate), delegate);
}
void ViewAndroid::SetAnchorRect(const JavaRef<jobject>& anchor,
const gfx::RectF& bounds_dip) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
float dip_scale = GetDipScale();
int left_margin = std::round(bounds_dip.x() * dip_scale);
// Note that content_offset() is in CSS scale and bounds_dip is in DIP scale
// (i.e., CSS pixels * page scale factor), but the height of browser control
// is not affected by page scale factor. Thus, content_offset() in CSS scale
// is also in DIP scale.
int top_margin = std::round((content_offset() + bounds_dip.y()) * dip_scale);
const gfx::RectF bounds_px = gfx::ScaleRect(bounds_dip, dip_scale);
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_setViewPosition(
env, delegate, anchor, bounds_px.x(), bounds_px.y(), bounds_px.width(),
bounds_px.height(), left_margin, top_margin);
}
ScopedJavaLocalRef<jobject> ViewAndroid::GetContainerView() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return nullptr;
JNIEnv* env = base::android::AttachCurrentThread();
return Java_ViewAndroidDelegate_getContainerView(env, delegate);
}
gfx::Point ViewAndroid::GetLocationOfContainerViewInWindow() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return gfx::Point();
JNIEnv* env = base::android::AttachCurrentThread();
gfx::Point result(
Java_ViewAndroidDelegate_getXLocationOfContainerViewInWindow(env,
delegate),
Java_ViewAndroidDelegate_getYLocationOfContainerViewInWindow(env,
delegate));
return result;
}
gfx::PointF ViewAndroid::GetLocationOnScreen(float x, float y) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return gfx::PointF();
JNIEnv* env = base::android::AttachCurrentThread();
float loc_x = Java_ViewAndroidDelegate_getXLocationOnScreen(env, delegate);
float loc_y = Java_ViewAndroidDelegate_getYLocationOnScreen(env, delegate);
return gfx::PointF(x + loc_x, y + loc_y);
}
void ViewAndroid::RemoveAllChildren(bool attached_to_window) {
auto it = children_.begin();
while (it != children_.end()) {
if (attached_to_window)
(*it)->OnDetachedFromWindow();
(*it)->parent_ = nullptr;
// erase returns a new iterator for the element following the ereased one.
it = children_.erase(it);
}
}
void ViewAndroid::RemoveChild(ViewAndroid* child) {
DCHECK(child);
DCHECK_EQ(child->parent_, this);
if (GetWindowAndroid())
child->OnDetachedFromWindow();
std::list<ViewAndroid*>::iterator it =
std::find(children_.begin(), children_.end(), child);
DCHECK(it != children_.end());
children_.erase(it);
child->parent_ = nullptr;
}
void ViewAndroid::AddObserver(ViewAndroidObserver* observer) {
observer_list_.AddObserver(observer);
}
void ViewAndroid::RemoveObserver(ViewAndroidObserver* observer) {
observer_list_.RemoveObserver(observer);
}
void ViewAndroid::RequestDisallowInterceptTouchEvent() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_requestDisallowInterceptTouchEvent(env, delegate);
}
void ViewAndroid::RequestUnbufferedDispatch(const MotionEventAndroid& event) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_requestUnbufferedDispatch(env, delegate,
event.GetJavaObject());
}
void ViewAndroid::SetCopyOutputCallback(CopyViewCallback callback) {
copy_view_callback_ = std::move(callback);
}
// If view does not support copy request, return back the request.
std::unique_ptr<viz::CopyOutputRequest> ViewAndroid::MaybeRequestCopyOfView(
std::unique_ptr<viz::CopyOutputRequest> request) {
if (copy_view_callback_.is_null())
return request;
copy_view_callback_.Run(std::move(request));
return nullptr;
}
void ViewAndroid::OnAttachedToWindow() {
for (auto& observer : observer_list_)
observer.OnAttachedToWindow();
for (auto* child : children_)
child->OnAttachedToWindow();
}
void ViewAndroid::OnDetachedFromWindow() {
for (auto& observer : observer_list_)
observer.OnDetachedFromWindow();
for (auto* child : children_)
child->OnDetachedFromWindow();
}
WindowAndroid* ViewAndroid::GetWindowAndroid() const {
return parent_ ? parent_->GetWindowAndroid() : nullptr;
}
const ScopedJavaLocalRef<jobject> ViewAndroid::GetViewAndroidDelegate()
const {
JNIEnv* env = base::android::AttachCurrentThread();
const ScopedJavaLocalRef<jobject> delegate = delegate_.get(env);
if (!delegate.is_null())
return delegate;
return parent_ ? parent_->GetViewAndroidDelegate() : delegate;
}
cc::Layer* ViewAndroid::GetLayer() const {
return layer_.get();
}
bool ViewAndroid::HasFocus() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return false;
JNIEnv* env = base::android::AttachCurrentThread();
return Java_ViewAndroidDelegate_hasFocus(env, delegate);
}
void ViewAndroid::RequestFocus() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_requestFocus(env, delegate);
}
void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) {
layer_ = layer;
}
bool ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext,
const JavaRef<jobject>& jimage) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return false;
JNIEnv* env = base::android::AttachCurrentThread();
return Java_ViewAndroidDelegate_startDragAndDrop(env, delegate, jtext,
jimage);
}
void ViewAndroid::OnCursorChanged(int type,
const SkBitmap& custom_image,
const gfx::Point& hotspot) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
if (type == WebCursorInfo::kTypeCustom) {
if (custom_image.drawsNothing()) {
Java_ViewAndroidDelegate_onCursorChanged(env, delegate,
WebCursorInfo::kTypePointer);
return;
}
ScopedJavaLocalRef<jobject> java_bitmap =
gfx::ConvertToJavaBitmap(&custom_image);
Java_ViewAndroidDelegate_onCursorChangedToCustom(env, delegate, java_bitmap,
hotspot.x(), hotspot.y());
} else {
Java_ViewAndroidDelegate_onCursorChanged(env, delegate, type);
}
}
void ViewAndroid::OnBackgroundColorChanged(unsigned int color) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_onBackgroundColorChanged(env, delegate, color);
}
void ViewAndroid::OnTopControlsChanged(float top_controls_offset,
float top_content_offset) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_onTopControlsChanged(
env, delegate, top_controls_offset, top_content_offset);
}
void ViewAndroid::OnBottomControlsChanged(float bottom_controls_offset,
float bottom_content_offset) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return;
JNIEnv* env = base::android::AttachCurrentThread();
Java_ViewAndroidDelegate_onBottomControlsChanged(
env, delegate, bottom_controls_offset, bottom_content_offset);
}
int ViewAndroid::GetSystemWindowInsetBottom() {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return 0;
JNIEnv* env = base::android::AttachCurrentThread();
return Java_ViewAndroidDelegate_getSystemWindowInsetBottom(env, delegate);
}
void ViewAndroid::OnSizeChanged(int width, int height) {
// Match-parent view must not receive size events.
DCHECK(!match_parent());
float scale = GetDipScale();
gfx::Size size(std::ceil(width / scale), std::ceil(height / scale));
if (bounds_.size() == size)
return;
OnSizeChangedInternal(size);
// Signal resize event after all the views in the tree get the updated size.
DispatchOnSizeChanged();
}
void ViewAndroid::OnSizeChangedInternal(const gfx::Size& size) {
if (bounds_.size() == size)
return;
bounds_.set_size(size);
for (auto* child : children_) {
if (child->match_parent())
child->OnSizeChangedInternal(size);
}
}
void ViewAndroid::DispatchOnSizeChanged() {
if (event_handler_)
event_handler_->OnSizeChanged();
for (auto* child : children_) {
if (child->match_parent())
child->DispatchOnSizeChanged();
}
}
void ViewAndroid::OnPhysicalBackingSizeChanged(const gfx::Size& size) {
if (physical_size_ == size)
return;
physical_size_ = size;
if (event_handler_)
event_handler_->OnPhysicalBackingSizeChanged();
for (auto* child : children_)
child->OnPhysicalBackingSizeChanged(size);
}
gfx::Size ViewAndroid::GetPhysicalBackingSize() const {
return physical_size_;
}
gfx::Size ViewAndroid::GetSize() const {
return bounds_.size();
}
bool ViewAndroid::OnDragEvent(const DragEventAndroid& event) {
return HitTest(base::BindRepeating(&ViewAndroid::SendDragEventToHandler),
event, event.location_f());
}
// static
bool ViewAndroid::SendDragEventToHandler(EventHandlerAndroid* handler,
const DragEventAndroid& event) {
return handler->OnDragEvent(event);
}
bool ViewAndroid::OnTouchEvent(const MotionEventAndroid& event) {
return HitTest(base::BindRepeating(&ViewAndroid::SendTouchEventToHandler),
event, event.GetPoint());
}
// static
bool ViewAndroid::SendTouchEventToHandler(EventHandlerAndroid* handler,
const MotionEventAndroid& event) {
return handler->OnTouchEvent(event);
}
bool ViewAndroid::OnMouseEvent(const MotionEventAndroid& event) {
return HitTest(base::BindRepeating(&ViewAndroid::SendMouseEventToHandler),
event, event.GetPoint());
}
// static
bool ViewAndroid::SendMouseEventToHandler(EventHandlerAndroid* handler,
const MotionEventAndroid& event) {
return handler->OnMouseEvent(event);
}
bool ViewAndroid::OnMouseWheelEvent(const MotionEventAndroid& event) {
return HitTest(
base::BindRepeating(&ViewAndroid::SendMouseWheelEventToHandler), event,
event.GetPoint());
}
// static
bool ViewAndroid::SendMouseWheelEventToHandler(
EventHandlerAndroid* handler,
const MotionEventAndroid& event) {
return handler->OnMouseWheelEvent(event);
}
bool ViewAndroid::OnGestureEvent(const GestureEventAndroid& event) {
return HitTest(base::BindRepeating(&ViewAndroid::SendGestureEventToHandler),
event, event.location());
}
// static
bool ViewAndroid::SendGestureEventToHandler(EventHandlerAndroid* handler,
const GestureEventAndroid& event) {
return handler->OnGestureEvent(event);
}
bool ViewAndroid::OnGenericMotionEvent(const MotionEventAndroid& event) {
if (event_handler_ && event_handler_->OnGenericMotionEvent(event))
return true;
for (auto* child : children_) {
if (child->OnGenericMotionEvent(event))
return true;
}
return false;
}
bool ViewAndroid::OnKeyUp(const KeyEventAndroid& event) {
if (event_handler_ && event_handler_->OnKeyUp(event))
return true;
for (auto* child : children_) {
if (child->OnKeyUp(event))
return true;
}
return false;
}
bool ViewAndroid::DispatchKeyEvent(const KeyEventAndroid& event) {
if (event_handler_ && event_handler_->DispatchKeyEvent(event))
return true;
for (auto* child : children_) {
if (child->DispatchKeyEvent(event))
return true;
}
return false;
}
bool ViewAndroid::ScrollBy(float delta_x, float delta_y) {
if (event_handler_ && event_handler_->ScrollBy(delta_x, delta_y))
return true;
for (auto* child : children_) {
if (child->ScrollBy(delta_x, delta_y))
return true;
}
return false;
}
bool ViewAndroid::ScrollTo(float x, float y) {
if (event_handler_ && event_handler_->ScrollTo(x, y))
return true;
for (auto* child : children_) {
if (child->ScrollTo(x, y))
return true;
}
return false;
}
template <typename E>
bool ViewAndroid::HitTest(EventHandlerCallback<E> handler_callback,
const E& event,
const gfx::PointF& point) {
if (event_handler_) {
if (bounds_.origin().IsOrigin()) { // (x, y) == (0, 0)
if (handler_callback.Run(event_handler_, event))
return true;
} else {
std::unique_ptr<E> e(event.CreateFor(point));
if (handler_callback.Run(event_handler_, *e))
return true;
}
}
if (!children_.empty()) {
gfx::PointF offset_point(point);
offset_point.Offset(-bounds_.x(), -bounds_.y());
gfx::Point int_point = gfx::ToFlooredPoint(offset_point);
// Match from back to front for hit testing.
for (auto* child : base::Reversed(children_)) {
bool matched = child->match_parent();
if (!matched)
matched = child->bounds_.Contains(int_point);
if (matched && child->HitTest(handler_callback, event, offset_point))
return true;
}
}
return false;
}
void ViewAndroid::SetLayoutForTesting(int x, int y, int width, int height) {
bounds_.SetRect(x, y, width, height);
}
bool ViewAndroid::OnUnconsumedKeyboardEventAck(int native_code) {
ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
if (delegate.is_null())
return false;
JNIEnv* env = base::android::AttachCurrentThread();
static bool s_has_touchless_event_handler =
Java_ViewAndroidDelegate_hasTouchlessEventHandler(env, delegate);
if (!s_has_touchless_event_handler)
return false;
return Java_ViewAndroidDelegate_onUnconsumedKeyboardEventAck(env, delegate,
native_code);
}
} // namespace ui
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
9d219a15e70b6dd7e9bc9afbc6e83775b8241bdc | ba9322f7db02d797f6984298d892f74768193dcf | /r-kvstore/src/model/ModifyGuardDomainModeRequest.cc | 94827dd2bb9f4cef6a66bb45a3e77f159d937cff | [
"Apache-2.0"
] | permissive | sdk-team/aliyun-openapi-cpp-sdk | e27f91996b3bad9226c86f74475b5a1a91806861 | a27fc0000a2b061cd10df09cbe4fff9db4a7c707 | refs/heads/master | 2022-08-21T18:25:53.080066 | 2022-07-25T10:01:05 | 2022-07-25T10:01:05 | 183,356,893 | 3 | 0 | null | 2019-04-25T04:34:29 | 2019-04-25T04:34:28 | null | UTF-8 | C++ | false | false | 3,396 | cc | /*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/r-kvstore/model/ModifyGuardDomainModeRequest.h>
using AlibabaCloud::R_kvstore::Model::ModifyGuardDomainModeRequest;
ModifyGuardDomainModeRequest::ModifyGuardDomainModeRequest() :
RpcServiceRequest("r-kvstore", "2015-01-01", "ModifyGuardDomainMode")
{}
ModifyGuardDomainModeRequest::~ModifyGuardDomainModeRequest()
{}
std::string ModifyGuardDomainModeRequest::getDomainMode()const
{
return domainMode_;
}
void ModifyGuardDomainModeRequest::setDomainMode(const std::string& domainMode)
{
domainMode_ = domainMode;
setCoreParameter("DomainMode", domainMode);
}
long ModifyGuardDomainModeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ModifyGuardDomainModeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setCoreParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ModifyGuardDomainModeRequest::getSecurityToken()const
{
return securityToken_;
}
void ModifyGuardDomainModeRequest::setSecurityToken(const std::string& securityToken)
{
securityToken_ = securityToken;
setCoreParameter("SecurityToken", securityToken);
}
std::string ModifyGuardDomainModeRequest::getResourceOwnerAccount()const
{
return resourceOwnerAccount_;
}
void ModifyGuardDomainModeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
{
resourceOwnerAccount_ = resourceOwnerAccount;
setCoreParameter("ResourceOwnerAccount", resourceOwnerAccount);
}
std::string ModifyGuardDomainModeRequest::getRegionId()const
{
return regionId_;
}
void ModifyGuardDomainModeRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setCoreParameter("RegionId", regionId);
}
std::string ModifyGuardDomainModeRequest::getOwnerAccount()const
{
return ownerAccount_;
}
void ModifyGuardDomainModeRequest::setOwnerAccount(const std::string& ownerAccount)
{
ownerAccount_ = ownerAccount;
setCoreParameter("OwnerAccount", ownerAccount);
}
std::string ModifyGuardDomainModeRequest::getReplicaId()const
{
return replicaId_;
}
void ModifyGuardDomainModeRequest::setReplicaId(const std::string& replicaId)
{
replicaId_ = replicaId;
setCoreParameter("ReplicaId", replicaId);
}
long ModifyGuardDomainModeRequest::getOwnerId()const
{
return ownerId_;
}
void ModifyGuardDomainModeRequest::setOwnerId(long ownerId)
{
ownerId_ = ownerId;
setCoreParameter("OwnerId", std::to_string(ownerId));
}
std::string ModifyGuardDomainModeRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ModifyGuardDomainModeRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
| [
"haowei.yao@alibaba-inc.com"
] | haowei.yao@alibaba-inc.com |
a2fc52808dc987e41536017958d230f54a3473cc | dbc0e3582d65bcf9d8fba29d872d6407454f9e28 | /HackerRank/game-of-stones.cpp | 4ff3386379bb41c664a0141f9ae92274bd2c0166 | [] | no_license | sirAdarsh/CP-files | 0b7430e2146620535451e0ab8959f70047bd7ea2 | 8d411224293fec547a3caa2708eed351c977ebed | refs/heads/master | 2023-04-05T09:07:21.554361 | 2021-04-08T19:57:33 | 2021-04-08T19:57:33 | 297,582,418 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 221 | cpp | #include<iostream>
using namespace std;
string solve(int n){
if(n%7<=6 && n%7>=2){
return "First";
}
return "Second";
}
int main(){
int t;
cin >> t;
while(t--){
int n;
cin >> n;
cout<<solve(n)<<endl;
}
}
| [
"aksinha.dhn@gmail.com"
] | aksinha.dhn@gmail.com |
7ad365bca6c8c1126c01f65671446ffb5ad4c53d | 2d03011927b44f5f307a51d52464a29d32169d4b | /include/cantera/thermo/NasaPoly1.h | cb11698cfc75f7795bf08834c58284fe06900b4b | [] | no_license | eburke90/Cantera-Transport-Equation | b9ef4acc0cc501bb63dc0ff2291830bad2787bb6 | b75004e8a53110e7edf2b919d6c729ae9ae2bbec | refs/heads/master | 2021-01-10T12:25:52.968356 | 2016-03-15T19:05:30 | 2016-03-15T19:05:30 | 53,939,255 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,096 | h |
/**
* @file NasaPoly1.h
* Header for a single-species standard state object derived
* from \link Cantera::SpeciesThermoInterpType SpeciesThermoInterpType\endlink based
* on the NASA temperature polynomial form applied to one temperature region
* (see \ref spthermo and class \link Cantera::NasaPoly1 NasaPoly1\endlink).
*
* This parameterization has one NASA temperature region.
*/
#ifndef CT_NASAPOLY1_H
#define CT_NASAPOLY1_H
// Copyright 2001 California Institute of Technology
#include "SpeciesThermoInterpType.h"
namespace Cantera
{
/**
* The NASA polynomial parameterization for one temperature range.
* This parameterization expresses the heat capacity as a
* fourth-order polynomial. Note that this is the form used in the
* 1971 NASA equilibrium program and by the Chemkin software
* package, but differs from the form used in the more recent NASA
* equilibrium program.
*
* Seven coefficients \f$(a_0,\dots,a_6)\f$ are used to represent
* \f$ c_p^0(T)\f$, \f$ h^0(T)\f$, and \f$ s^0(T) \f$ as
* polynomials in \f$ T \f$ :
* \f[
* \frac{c_p(T)}{R} = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4
* \f]
* \f[
* \frac{h^0(T)}{RT} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2
* + \frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}.
* \f]
* \f[
* \frac{s^0(T)}{R} = a_0\ln T + a_1 T + \frac{a_2}{2} T^2
+ \frac{a_3}{3} T^3 + \frac{a_4}{4} T^4 + a_6.
* \f]
*
* This class is designed specifically for use by class NasaThermo.
* @ingroup spthermo
*/
class NasaPoly1 : public SpeciesThermoInterpType
{
public:
//! Empty constructor
NasaPoly1()
: m_coeff(7, 0.0) {}
//! constructor used in templated instantiations
/*!
* @param n Species index
* @param tlow Minimum temperature
* @param thigh Maximum temperature
* @param pref reference pressure (Pa).
* @param coeffs Vector of coefficients used to set the parameters for the
* standard state, in the order [a5,a6,a0,a1,a2,a3,a4]
* @deprecated Use the constructor which does not take species index. To be
* removed after Cantera 2.2.
*/
NasaPoly1(size_t n, doublereal tlow, doublereal thigh, doublereal pref,
const doublereal* coeffs) :
SpeciesThermoInterpType(n, tlow, thigh, pref),
m_coeff(7)
{
for (size_t i = 0; i < 5; i++) {
m_coeff[i] = coeffs[i+2];
}
m_coeff[5] = coeffs[0];
m_coeff[6] = coeffs[1];
}
//! Normal constructor
/*!
* @param tlow Minimum temperature
* @param thigh Maximum temperature
* @param pref reference pressure (Pa).
* @param coeffs Vector of coefficients used to set the parameters for the
* standard state, in the order [a0,a1,a2,a3,a4,a5,a6]
*/
NasaPoly1(double tlow, double thigh, double pref, const double* coeffs)
: SpeciesThermoInterpType(tlow, thigh, pref)
, m_coeff(coeffs, coeffs+7)
{
}
//! copy constructor
/*!
* @param b object to be copied
*/
NasaPoly1(const NasaPoly1& b) :
SpeciesThermoInterpType(b),
m_coeff(b.m_coeff)
{
}
//! assignment operator
/*!
* @param b object to be copied
*/
NasaPoly1& operator=(const NasaPoly1& b) {
if (&b != this) {
SpeciesThermoInterpType::operator=(b);
m_coeff = b.m_coeff;
}
return *this;
}
virtual SpeciesThermoInterpType*
duplMyselfAsSpeciesThermoInterpType() const {
NasaPoly1* np = new NasaPoly1(*this);
return (SpeciesThermoInterpType*) np;
}
virtual int reportType() const {
return NASA1;
}
virtual size_t temperaturePolySize() const { return 6; }
virtual void updateTemperaturePoly(double T, double* T_poly) const {
T_poly[0] = T;
T_poly[1] = T * T;
T_poly[2] = T_poly[1] * T;
T_poly[3] = T_poly[2] * T;
T_poly[4] = 1.0 / T;
T_poly[5] = std::log(T);
}
//! Update the properties for this species, given a temperature polynomial
/*!
* This method is called with a pointer to an array containing the
* functions of temperature needed by this parameterization, and three
* pointers to arrays where the computed property values should be
* written. This method updates only one value in each array.
*
* Temperature Polynomial:
* tt[0] = t;
* tt[1] = t*t;
* tt[2] = m_t[1]*t;
* tt[3] = m_t[2]*t;
* tt[4] = 1.0/t;
* tt[5] = std::log(t);
*
* @param tt vector of temperature polynomials
* @param cp_R Vector of Dimensionless heat capacities. (length m_kk).
* @param h_RT Vector of Dimensionless enthalpies. (length m_kk).
* @param s_R Vector of Dimensionless entropies. (length m_kk).
*/
virtual void updateProperties(const doublereal* tt,
doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const {
doublereal ct0 = m_coeff[0]; // a0
doublereal ct1 = m_coeff[1]*tt[0]; // a1 * T
doublereal ct2 = m_coeff[2]*tt[1]; // a2 * T^2
doublereal ct3 = m_coeff[3]*tt[2]; // a3 * T^3
doublereal ct4 = m_coeff[4]*tt[3]; // a4 * T^4
doublereal cp, h, s;
cp = ct0 + ct1 + ct2 + ct3 + ct4;
h = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
+ m_coeff[5]*tt[4]; // last term is a5/T
s = ct0*tt[5] + ct1 + 0.5*ct2 + 1.0/3.0*ct3
+0.25*ct4 + m_coeff[6]; // last term is a6
// return the computed properties in the location in the output
// arrays for this species
cp_R[m_index] = cp;
h_RT[m_index] = h;
s_R[m_index] = s;
//writelog("NASA1: for species "+int2str(m_index)+", h_RT = "+
// fp2str(h)+"\n");
}
virtual void updatePropertiesTemp(const doublereal temp,
doublereal* cp_R, doublereal* h_RT,
doublereal* s_R) const {
double tPoly[6];
updateTemperaturePoly(temp, tPoly);
updateProperties(tPoly, cp_R, h_RT, s_R);
}
virtual void reportParameters(size_t& n, int& type,
doublereal& tlow, doublereal& thigh,
doublereal& pref,
doublereal* const coeffs) const {
n = m_index;
type = NASA1;
tlow = m_lowT;
thigh = m_highT;
pref = m_Pref;
std::copy(m_coeff.begin(), m_coeff.end(), coeffs);
}
//! Modify parameters for the standard state
/*!
* @param coeffs Vector of coefficients used to set the
* parameters for the standard state.
*/
virtual void modifyParameters(doublereal* coeffs) {
std::copy(coeffs, coeffs+7, m_coeff.begin());
}
virtual doublereal reportHf298(doublereal* const h298 = 0) const {
double tt[6];
double temp = 298.15;
updateTemperaturePoly(temp, tt);
doublereal ct0 = m_coeff[0]; // a0
doublereal ct1 = m_coeff[1]*tt[0]; // a1 * T
doublereal ct2 = m_coeff[2]*tt[1]; // a2 * T^2
doublereal ct3 = m_coeff[3]*tt[2]; // a3 * T^3
doublereal ct4 = m_coeff[4]*tt[3]; // a4 * T^4
double h_RT = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
+ m_coeff[5]*tt[4]; // last t
double h = h_RT * GasConstant * temp;
if (h298) {
h298[m_index] = h;
}
return h;
}
virtual void modifyOneHf298(const size_t k, const doublereal Hf298New) {
if (k != m_index) {
return;
}
double hcurr = reportHf298(0);
double delH = Hf298New - hcurr;
m_coeff[5] += (delH) / GasConstant;
}
protected:
//! array of polynomial coefficients, stored in the order [a0, ..., a6]
vector_fp m_coeff;
};
}
#endif
| [
"eoin.burke90@gmail.com"
] | eoin.burke90@gmail.com |
3ec7e486d8fcd13ac1d276be4a17995d74167b74 | 275e738cee33e6a903fcab4767003174088ce86b | /63.cpp | d41302177375f697a10951abd471fb757cbd0bd6 | [] | no_license | th0usandTW/LeetcodePractice | de5a45ab7a285690a33651f56eb90959af45da02 | 4f8d849ae06512af7e05dcde91507dbf7e75058c | refs/heads/main | 2023-05-12T09:35:31.244365 | 2021-05-30T05:46:08 | 2021-05-30T05:46:08 | 320,308,087 | 0 | 1 | null | 2020-12-12T07:57:48 | 2020-12-10T15:10:13 | C++ | UTF-8 | C++ | false | false | 1,606 | cpp | class Solution {
public:
int uniquePathsWithObstacles(vector<vector<int>>& obstacleGrid) {
int m = obstacleGrid.size(); // row
int n = obstacleGrid[0].size(); // column
vector<vector<int>> path(m, vector<int>(n));
int i, j;
// If start or end is blocked
if (obstacleGrid[0][0] || obstacleGrid[m-1][n-1])
return 0;
// Only can get node [i][0] from [i-1][0], so break loop if there is obstacle
for (i = 0; i < m; i++)
{
if (obstacleGrid[i][0])
{
path[i][0] = -1;
break;
}
else
path[i][0] = 1;
}
// Only can get node [0][j] from [0][j-1], so break loop if there is obstacle
for (j = 0; j < n; j++)
{
if (obstacleGrid[0][j])
{
path[0][j] = -1;
break;
}
else
path[0][j] = 1;
}
for (i = 1; i < m; i++)
{
for (j = 1; j < n; j++)
{
if (obstacleGrid[i][j])
path[i][j] = -1;
else
{
if (path[i-1][j] > 0)
{
path[i][j] += path[i-1][j];
}
if (path[i][j-1] > 0)
{
path[i][j] += path[i][j-1];
}
}
}
}
return path[m-1][n-1];
}
};
| [
"noreply@github.com"
] | th0usandTW.noreply@github.com |
8be7ad0d8620306c14527041fb329cd8aa5aea65 | 0d0cfbeda1636a3f110d8acc7212f45fe6423ba7 | /InjectDllyReflective/InjectDllyReflective/InjectDllyReflective.cpp | 5eb2f55e5e6fa19d27ab7e8b6acb750568b277e6 | [] | no_license | awrheaven/Inject | c4187d8658f17245ddb71449c38e78f987c84046 | 1f8451741c1dd4273ee3c09013bbc19ef5451bc2 | refs/heads/master | 2021-07-10T09:11:19.185835 | 2017-10-09T14:25:36 | 2017-10-09T14:25:36 | 106,294,199 | 1 | 0 | null | null | null | null | GB18030 | C++ | false | false | 7,010 | cpp | // InjectDllyReflective.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
using namespace std;
#define DLL_QUERY_HMODULE 6
typedef ULONG_PTR(WINAPI * REFLECTIVELOADER)(VOID);
typedef BOOL(WINAPI * DLLMAIN)(HINSTANCE, DWORD, LPVOID);
HANDLE LoadRemoteLibraryR(HANDLE TargetProcessHandle, LPVOID BufferData,
DWORD BufferLength, LPVOID lpParameter);
DWORD GetReflectiveLoaderOffset(LPVOID ReflectiveDllBuffer);
DWORD Rva2Offset(DWORD Rva, UINT_PTR BaseAddress);
int main()
{
DWORD TargetProcessID = 0;
HANDLE FileHandle = NULL;
HANDLE TokenHandle = NULL;
HANDLE TargetProcessHandle = NULL;
HANDLE ModuleHandle = NULL;
DWORD FileLength = 0;
LPVOID BufferData = NULL;
DWORD ReturnLength = 0;
#ifdef WIN_X64
char * DllFile = "Dll.dll";
#else
char * DllFile = "J:\\注入\\InjectDllyReflective\\x64\\Debug\\Dll.dll";
#endif
do
{
cin >> TargetProcessID;
FileHandle = CreateFileA(DllFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (FileHandle == INVALID_HANDLE_VALUE)
{
printf("Failed to open the DLL file\r\n");
return 0;
}
FileLength = GetFileSize(FileHandle, NULL);
if (FileLength == INVALID_FILE_SIZE || FileLength == 0)
{
printf("Failed to get the DLL file ");
return 0;
}
BufferData = HeapAlloc(GetProcessHeap(), 0, FileLength);
if(!BufferData)
{
printf("Failed to get the DLL file size");
return 0;
}
if (ReadFile(FileHandle, BufferData, FileLength, &ReturnLength, NULL) == FALSE)
{
HeapFree(GetProcessHeap(), 0, BufferData);
int a = GetLastError();
printf("Failed To Alloc a Buffer");
return 0;
}
//提权
TOKEN_PRIVILEGES TokenPrivileges = { 0 };
if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &TokenHandle))
{
TokenPrivileges.PrivilegeCount = 1;
TokenPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if (LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &TokenPrivileges.Privileges[0].Luid))
{
AdjustTokenPrivileges(TokenHandle, FALSE, &TokenPrivileges, 0, NULL, NULL);
}
CloseHandle(TokenHandle);
}
TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ, FALSE, TargetProcessID);
if (TargetProcessHandle == NULL)
{
printf("Failed to open the target process");
HeapFree(GetProcessHeap(), 0, BufferData);
return 0;
}
ModuleHandle = LoadRemoteLibraryR(TargetProcessHandle, BufferData, FileLength, NULL);
if (!ModuleHandle)
{
printf("Failed to inject the DLL");
HeapFree(GetProcessHeap(), 0, BufferData);
return 0;
}
printf("[+] Injected the '%s' DLL into process %d.", DllFile, TargetProcessID);
WaitForSingleObject(ModuleHandle, -1);
} while (0);
if (BufferData)
{
HeapFree(GetProcessHeap(), 0, BufferData);
}
if (TargetProcessHandle)
{
CloseHandle(TargetProcessHandle);
}
return 0;
}
HANDLE LoadRemoteLibraryR(HANDLE TargetProcessHandle, LPVOID BufferData, DWORD BufferLength, LPVOID lpParameter)
{
HANDLE ThreadHandle = NULL;
DWORD ThreadID = 0;
DWORD ReflectiveLoaderOffset = 0;
REFLECTIVELOADER ReflectiveLoader = NULL;
DWORD OldProtect = 0;
HMODULE ResultHandle = NULL;
DLLMAIN pDllMain = NULL;
__try
{
if (!TargetProcessHandle || !BufferData || !BufferLength)
{
return NULL;
}
//得到导出函数地址偏移
ReflectiveLoaderOffset = GetReflectiveLoaderOffset(BufferData);
if (ReflectiveLoaderOffset != 0)
{
//函数地址
ReflectiveLoader = (REFLECTIVELOADER)((UINT_PTR)BufferData + ReflectiveLoaderOffset);
if (VirtualProtect(BufferData, BufferLength, PAGE_EXECUTE_READWRITE, &OldProtect))
{
pDllMain = (DLLMAIN)ReflectiveLoader();
if (pDllMain != NULL)
{
if (!pDllMain(NULL, DLL_QUERY_HMODULE, &ResultHandle))
{
ResultHandle = NULL;
}
}
VirtualProtect(BufferData, BufferLength, OldProtect, &OldProtect);
}
}
}
__except (EXCEPTION_EXECUTE_HANDLER)
{
ThreadHandle = NULL;
}
return ResultHandle;
}
DWORD GetReflectiveLoaderOffset(LPVOID ReflectiveDllBuffer)
{
UINT_PTR BaseAddress = 0;
UINT_PTR NtHeader = 0;
UINT_PTR ExportRVA = 0;
UINT_PTR ExportTable = 0;
UINT_PTR NameArray = 0;
UINT_PTR AddressArray = 0;
UINT_PTR NameOrdinals = 0;
DWORD NumberOfFunctions = 0;
#ifdef _WIN64 //没什么用 检测而已
DWORD CompiledArch = 2;
#else
// This will catch Win32 and WinRT.
DWORD CompiledArch = 1;
#endif
//Dll的基地址
BaseAddress = (UINT_PTR)ReflectiveDllBuffer;
NtHeader = BaseAddress + ((PIMAGE_DOS_HEADER)BaseAddress)->e_lfanew;
//
//32位
//
if (((PIMAGE_NT_HEADERS)NtHeader)->OptionalHeader.Magic == 0x010B)
{
if (CompiledArch != 1)
{
return 0;
}
}
else if (((PIMAGE_NT_HEADERS)NtHeader)->OptionalHeader.Magic == 0x020B)
{
if (CompiledArch != 2)
{
return 0;
}
}
else
{
return 0;
}
ExportRVA = (UINT_PTR)&((PIMAGE_NT_HEADERS)NtHeader)->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT];
//得到导出表x
ExportTable = BaseAddress + Rva2Offset(((PIMAGE_DATA_DIRECTORY)ExportRVA)->VirtualAddress, BaseAddress);
NameArray = BaseAddress + Rva2Offset(((PIMAGE_EXPORT_DIRECTORY)ExportTable)->AddressOfNames, BaseAddress);
AddressArray = BaseAddress + Rva2Offset(((PIMAGE_EXPORT_DIRECTORY)ExportTable)->AddressOfFunctions, BaseAddress);
NameOrdinals = BaseAddress + Rva2Offset(((PIMAGE_EXPORT_DIRECTORY)ExportTable)->AddressOfNameOrdinals, BaseAddress);
NumberOfFunctions = ((PIMAGE_EXPORT_DIRECTORY)ExportTable)->NumberOfNames;
while (NumberOfFunctions--)
{
char* FunctionName = (char*)(BaseAddress + Rva2Offset(*(DWORD*)(NameArray), BaseAddress));
if (strstr(FunctionName, "ReflectiveLoader") != NULL)
{
AddressArray = BaseAddress + Rva2Offset(((PIMAGE_EXPORT_DIRECTORY)ExportTable)->AddressOfFunctions, BaseAddress);
AddressArray += (*(WORD*)(NameOrdinals)) * sizeof(DWORD);
return Rva2Offset(*(DWORD*)AddressArray, BaseAddress);
}
NameArray += sizeof(DWORD);
NameOrdinals += sizeof(WORD);
}
return 0;
}
DWORD Rva2Offset(DWORD Rva, UINT_PTR BaseAddress)
{
PIMAGE_SECTION_HEADER SectionHeader = NULL;
PIMAGE_NT_HEADERS NtHeader = NULL;
NtHeader = (PIMAGE_NT_HEADERS)(BaseAddress +
((PIMAGE_DOS_HEADER)BaseAddress)->e_lfanew);
//得到区块表的数据
SectionHeader = (PIMAGE_SECTION_HEADER)((UINT_PTR)(&NtHeader->OptionalHeader) + NtHeader->FileHeader.SizeOfOptionalHeader);
if (Rva < SectionHeader[0].PointerToRawData) //PointerToRawData该块在磁盘文件的偏移
{
return Rva;
}
for (int i = 0; i < NtHeader->FileHeader.NumberOfSections; i++)
{
//VirtualAddress 区块的RVA地址 SizeOfRawData在文件中对齐后的尺寸
if (Rva >= SectionHeader[i].VirtualAddress && Rva < (SectionHeader[i].VirtualAddress + SectionHeader[i].SizeOfRawData))
{
return (Rva - SectionHeader[i].VirtualAddress + SectionHeader[i].PointerToRawData);
}
}
return 0;
} | [
"17802926324@163.com"
] | 17802926324@163.com |
eca4b20f340aafbb826416794d06f3d54a625f48 | 8253f58038023ce75c65773ede6577019e10165a | /serialServer.cpp | 59f71a7157bfc7224734818caf603ecca7684764 | [
"MIT"
] | permissive | hsm-feup/full | 66b8eec6633059765fd39902746392c2cf5011a9 | 9dbf02a75daa985179eee551aabeb0b4a3d1e4c2 | refs/heads/master | 2021-01-10T19:57:17.822175 | 2020-04-17T16:41:08 | 2020-04-17T16:41:08 | 29,199,199 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 553 | cpp | #include "Arduino.h"
#include "serialServer.h"
SerialServer::SerialServer(int baudrate) {
Serial.begin(baudrate);
// sendMsg(VERSION_STR);
}
#define CMD_SIZE 10
char *SerialServer::getCmd(void) {
int c;
int static index;
char static cmd[CMD_SIZE+1];
if ((c = Serial.read()) != -1) {
if (index && ((char) c == '\r')) {
cmd[index] = '\0';
index = 0;
return cmd;
}
else {
if (index < CMD_SIZE)
cmd[index++] = (char) c;
return 0;
}
}
return 0;
}
void SerialServer::sendMsg(const char *msg) {
Serial.println(msg);
}
| [
"hsmptg@gmail.com"
] | hsmptg@gmail.com |
a4101e9ddd6e6c57339a72de808c10e8f121fcfe | 38926bfe477f933a307f51376dd3c356e7893ffc | /Source/SDKs/STLPORT/stlport/stl/_tempbuf.h | 0f3cda35b5fd4cfbed5044797cf6036a4e7ff8a0 | [
"LicenseRef-scancode-stlport-4.5"
] | permissive | richmondx/dead6 | b0e9dd94a0ebb297c0c6e9c4f24c6482ef4d5161 | 955f76f35d94ed5f991871407f3d3ad83f06a530 | refs/heads/master | 2021-12-05T14:32:01.782047 | 2008-01-01T13:13:39 | 2008-01-01T13:13:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,832 | h | /*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Copyright (c) 1996,1997
* Silicon Graphics Computer Systems, Inc.
*
* Copyright (c) 1997
* Moscow Center for SPARC Technology
*
* Copyright (c) 1999
* Boris Fomitchev
*
* This material is provided "as is", with absolutely no warranty expressed
* or implied. Any use is at your own risk.
*
* Permission to use or copy this software for any purpose is hereby granted
* without fee, provided the above notices are retained on all copies.
* Permission to modify the code and to distribute modified code is granted,
* provided the above notices are retained, and a notice that the code was
* modified is included with the above copyright notice.
*
*/
/* NOTE: This is an internal header file, included by other STL headers.
* You should not attempt to use it directly.
*/
#ifndef _STLP_INTERNAL_TEMPBUF_H
#define _STLP_INTERNAL_TEMPBUF_H
#ifndef _STLP_CLIMITS
# include <climits>
#endif
#ifndef _STLP_CSTDLIB
# include <cstdlib>
#endif
#ifndef _STLP_INTERNAL_UNINITIALIZED_H
# include <stl/_uninitialized.h>
#endif
_STLP_BEGIN_NAMESPACE
template <class _Tp>
pair<_Tp*, ptrdiff_t> _STLP_CALL
__get_temporary_buffer(ptrdiff_t __len, _Tp*);
#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
template <class _Tp>
inline pair<_Tp*, ptrdiff_t> _STLP_CALL get_temporary_buffer(ptrdiff_t __len) {
return __get_temporary_buffer(__len, (_Tp*) 0);
}
# if ! defined(_STLP_NO_EXTENSIONS)
// This overload is not required by the standard; it is an extension.
// It is supported for backward compatibility with the HP STL, and
// because not all compilers support the language feature (explicit
// function template arguments) that is required for the standard
// version of get_temporary_buffer.
template <class _Tp>
inline pair<_Tp*, ptrdiff_t> _STLP_CALL
get_temporary_buffer(ptrdiff_t __len, _Tp*) {
return __get_temporary_buffer(__len, (_Tp*) 0);
}
# endif
#endif
template <class _Tp>
inline void _STLP_CALL return_temporary_buffer(_Tp* __p) {
// SunPro brain damage
free((char*)__p);
}
template <class _ForwardIterator, class _Tp>
class _Temporary_buffer {
private:
ptrdiff_t _M_original_len;
ptrdiff_t _M_len;
_Tp* _M_buffer;
void _M_allocate_buffer() {
_M_original_len = _M_len;
_M_buffer = 0;
if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp)))
_M_len = INT_MAX / sizeof(_Tp);
while (_M_len > 0) {
_M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp));
if (_M_buffer)
break;
_M_len /= 2;
}
}
void _M_initialize_buffer(const _Tp&, const __true_type&) {}
void _M_initialize_buffer(const _Tp& val, const __false_type&) {
uninitialized_fill_n(_M_buffer, _M_len, val);
}
public:
ptrdiff_t size() const { return _M_len; }
ptrdiff_t requested_size() const { return _M_original_len; }
_Tp* begin() { return _M_buffer; }
_Tp* end() { return _M_buffer + _M_len; }
_Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) {
// Workaround for a __type_traits bug in the pre-7.3 compiler.
# if defined(__sgi) && !defined(__GNUC__) && _COMPILER_VERSION < 730
typedef typename __type_traits<_Tp>::is_POD_type _Trivial;
# else
typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Trivial;
# endif
_STLP_TRY {
_M_len = distance(__first, __last);
_M_allocate_buffer();
if (_M_len > 0)
_M_initialize_buffer(*__first, _Trivial());
}
_STLP_UNWIND(free(_M_buffer); _M_buffer = 0; _M_len = 0)
}
~_Temporary_buffer() {
_STLP_STD::_Destroy_Range(_M_buffer, _M_buffer + _M_len);
free(_M_buffer);
}
private:
// Disable copy constructor and assignment operator.
_Temporary_buffer(const _Temporary_buffer<_ForwardIterator, _Tp>&) {}
void operator=(const _Temporary_buffer<_ForwardIterator, _Tp>&) {}
};
# ifndef _STLP_NO_EXTENSIONS
// Class temporary_buffer is not part of the standard. It is an extension.
template <class _ForwardIterator,
class _Tp
#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
= typename iterator_traits<_ForwardIterator>::value_type
#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
>
struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
{
temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
: _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
~temporary_buffer() {}
};
# endif /* _STLP_NO_EXTENSIONS */
_STLP_END_NAMESPACE
# ifndef _STLP_LINK_TIME_INSTANTIATION
# include <stl/_tempbuf.c>
# endif
#endif /* _STLP_INTERNAL_TEMPBUF_H */
// Local Variables:
// mode:C++
// End:
| [
"dante.renevo@gmail.com"
] | dante.renevo@gmail.com |
5b9767761cd213187ceee6246ecafa08e53b88a8 | cdbce8b09cf43bf2e66e5e3437ae591262a55270 | /D2Ex2-master/ExListBox.h | 5cf2b600eac90b426fb0b73c350afbc5ded9db15 | [] | no_license | tokenok/Visual-Studio-Projects | b82a53f141eff01eef69f119f55dabd8b52e803e | c3947dda48fdccdba01a21b0e5052b12a18fe2a6 | refs/heads/master | 2022-05-02T11:06:46.201991 | 2018-10-28T22:07:24 | 2018-10-28T22:07:24 | 89,531,738 | 5 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 528 | h | #ifndef __EXLISTBOX_H__
#define __EXLISTBOX_H__
#include "ExControl.h"
#include "ExTextBox.h"
#include "ExScrollBar.h"
#include <vector>
class ExListBox : public ExControl
{
public:
ExListBox(int X, int Y, int Width, int Height, int Color, int Font);
void AddToList(wstring Member);
void RemoveFromList(wstring Member);
void Sort();
void Draw();
~ExListBox(void);
int aColor;
int MsgOffset;
void GfxMove(vector<ExTextBox*>::size_type Offset);
private:
vector<ExTextBox*> Members;
ExScrollBar aScrollBar;
};
#endif | [
"mrjack.is.minty@gmail.com"
] | mrjack.is.minty@gmail.com |
d12659fd9d44bb2327e08ebe94738e9a2fc1ce9d | 98054c0fc0415cd7d7733ed63c69d1d25547b338 | /src/Platform/Windows/System/TcpConnection.cpp | 11f30c7ade7ac287f900585d82f99418f49ec891 | [
"MIT"
] | permissive | freelacoin/freelabit | 18dc3f23f0671cb73d1df8a22baca43305549eae | f5a2fa5b9258e5e5688d3281e45503f14e0cb914 | refs/heads/freelabit | 2021-12-11T08:33:30.992223 | 2021-08-31T16:42:48 | 2021-08-31T16:42:48 | 102,800,887 | 3 | 6 | MIT | 2018-05-12T04:02:35 | 2017-09-08T01:01:08 | C++ | UTF-8 | C++ | false | false | 7,003 | cpp | // Copyright (c) 2011-2017 The Cryptonote developers
// Copyright (c) 2014-2017 XDN developers
// Copyright (c) 2016-2017 BXC developers
// Copyright (c) 2017 Royalties developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "TcpConnection.h"
#include <cassert>
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <winsock2.h>
#include <ws2ipdef.h>
#include <System/InterruptedException.h>
#include <System/Ipv4Address.h>
#include "Dispatcher.h"
#include "ErrorMessage.h"
namespace System {
namespace {
struct TcpConnectionContext : public OVERLAPPED {
NativeContext* context;
bool interrupted;
};
}
TcpConnection::TcpConnection() : dispatcher(nullptr) {
}
TcpConnection::TcpConnection(TcpConnection&& other) : dispatcher(other.dispatcher) {
if (dispatcher != nullptr) {
assert(other.readContext == nullptr);
assert(other.writeContext == nullptr);
connection = other.connection;
readContext = nullptr;
writeContext = nullptr;
other.dispatcher = nullptr;
}
}
TcpConnection::~TcpConnection() {
if (dispatcher != nullptr) {
assert(readContext == nullptr);
assert(writeContext == nullptr);
int result = closesocket(connection);
assert(result == 0);
}
}
TcpConnection& TcpConnection::operator=(TcpConnection&& other) {
if (dispatcher != nullptr) {
assert(readContext == nullptr);
assert(writeContext == nullptr);
if (closesocket(connection) != 0) {
throw std::runtime_error("TcpConnection::operator=, closesocket failed, " + errorMessage(WSAGetLastError()));
}
}
dispatcher = other.dispatcher;
if (dispatcher != nullptr) {
assert(other.readContext == nullptr);
assert(other.writeContext == nullptr);
connection = other.connection;
readContext = nullptr;
writeContext = nullptr;
other.dispatcher = nullptr;
}
return *this;
}
size_t TcpConnection::read(uint8_t* data, size_t size) {
assert(dispatcher != nullptr);
assert(readContext == nullptr);
if (dispatcher->interrupted()) {
throw InterruptedException();
}
WSABUF buf{static_cast<ULONG>(size), reinterpret_cast<char*>(data)};
DWORD flags = 0;
TcpConnectionContext context;
context.hEvent = NULL;
if (WSARecv(connection, &buf, 1, NULL, &flags, &context, NULL) != 0) {
int lastError = WSAGetLastError();
if (lastError != WSA_IO_PENDING) {
throw std::runtime_error("TcpConnection::read, WSARecv failed, " + errorMessage(lastError));
}
}
assert(flags == 0);
context.context = dispatcher->getCurrentContext();
context.interrupted = false;
readContext = &context;
dispatcher->getCurrentContext()->interruptProcedure = [&]() {
assert(dispatcher != nullptr);
assert(readContext != nullptr);
TcpConnectionContext* context = static_cast<TcpConnectionContext*>(readContext);
if (!context->interrupted) {
if (CancelIoEx(reinterpret_cast<HANDLE>(connection), context) != TRUE) {
DWORD lastError = GetLastError();
if (lastError != ERROR_NOT_FOUND) {
throw std::runtime_error("TcpConnection::stop, CancelIoEx failed, " + lastErrorMessage());
}
context->context->interrupted = true;
}
context->interrupted = true;
}
};
dispatcher->dispatch();
dispatcher->getCurrentContext()->interruptProcedure = nullptr;
assert(context.context == dispatcher->getCurrentContext());
assert(dispatcher != nullptr);
assert(readContext == &context);
readContext = nullptr;
DWORD transferred;
if (WSAGetOverlappedResult(connection, &context, &transferred, FALSE, &flags) != TRUE) {
int lastError = WSAGetLastError();
if (lastError != ERROR_OPERATION_ABORTED) {
throw std::runtime_error("TcpConnection::read, WSAGetOverlappedResult failed, " + errorMessage(lastError));
}
assert(context.interrupted);
throw InterruptedException();
}
assert(transferred <= size);
assert(flags == 0);
return transferred;
}
size_t TcpConnection::write(const uint8_t* data, size_t size) {
assert(dispatcher != nullptr);
assert(writeContext == nullptr);
if (dispatcher->interrupted()) {
throw InterruptedException();
}
if (size == 0) {
if (shutdown(connection, SD_SEND) != 0) {
throw std::runtime_error("TcpConnection::write, shutdown failed, " + errorMessage(WSAGetLastError()));
}
return 0;
}
WSABUF buf{static_cast<ULONG>(size), reinterpret_cast<char*>(const_cast<uint8_t*>(data))};
TcpConnectionContext context;
context.hEvent = NULL;
if (WSASend(connection, &buf, 1, NULL, 0, &context, NULL) != 0) {
int lastError = WSAGetLastError();
if (lastError != WSA_IO_PENDING) {
throw std::runtime_error("TcpConnection::write, WSASend failed, " + errorMessage(lastError));
}
}
context.context = dispatcher->getCurrentContext();
context.interrupted = false;
writeContext = &context;
dispatcher->getCurrentContext()->interruptProcedure = [&]() {
assert(dispatcher != nullptr);
assert(writeContext != nullptr);
TcpConnectionContext* context = static_cast<TcpConnectionContext*>(writeContext);
if (!context->interrupted) {
if (CancelIoEx(reinterpret_cast<HANDLE>(connection), context) != TRUE) {
DWORD lastError = GetLastError();
if (lastError != ERROR_NOT_FOUND) {
throw std::runtime_error("TcpConnection::stop, CancelIoEx failed, " + lastErrorMessage());
}
context->context->interrupted = true;
}
context->interrupted = true;
}
};
dispatcher->dispatch();
dispatcher->getCurrentContext()->interruptProcedure = nullptr;
assert(context.context == dispatcher->getCurrentContext());
assert(dispatcher != nullptr);
assert(writeContext == &context);
writeContext = nullptr;
DWORD transferred;
DWORD flags;
if (WSAGetOverlappedResult(connection, &context, &transferred, FALSE, &flags) != TRUE) {
int lastError = WSAGetLastError();
if (lastError != ERROR_OPERATION_ABORTED) {
throw std::runtime_error("TcpConnection::write, WSAGetOverlappedResult failed, " + errorMessage(lastError));
}
assert(context.interrupted);
throw InterruptedException();
}
assert(transferred == size);
assert(flags == 0);
return transferred;
}
std::pair<Ipv4Address, uint16_t> TcpConnection::getPeerAddressAndPort() const {
sockaddr_in address;
int size = sizeof(address);
if (getpeername(connection, reinterpret_cast<sockaddr*>(&address), &size) != 0) {
throw std::runtime_error("TcpConnection::getPeerAddress, getpeername failed, " + errorMessage(WSAGetLastError()));
}
assert(size == sizeof(sockaddr_in));
return std::make_pair(Ipv4Address(htonl(address.sin_addr.S_un.S_addr)), htons(address.sin_port));
}
TcpConnection::TcpConnection(Dispatcher& dispatcher, size_t connection) : dispatcher(&dispatcher), connection(connection), readContext(nullptr), writeContext(nullptr) {
}
}
| [
"ericvesprini@yahoo.com"
] | ericvesprini@yahoo.com |
154834e44163a88ef84289d2b6ced4b3bede1f51 | d7f3d311f9b50740d422678134df3cf171fd95de | /Player.h | 5fc5e3e970637e7b373ee8ccc76b972fdede70cd | [] | no_license | jagdinsky/labirinth_game | 0b0a774232464596143c68106de6d3b7859f1251 | 612dd4993ae7246158b23bf1e84b89c969a0a57a | refs/heads/master | 2023-04-10T02:14:59.799590 | 2021-04-09T19:35:06 | 2021-04-09T19:35:06 | 356,369,320 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 905 | h | #ifndef MAIN_PLAYER_H
#define MAIN_PLAYER_H
#include "Image.h"
struct Point {
int x;
int y;
};
enum class MovementDir {
UP,
DOWN,
LEFT,
RIGHT
};
struct Player {
explicit Player(Point pos = {.x = 400, .y = 400}) : coords(pos),
old_coords(coords) {
};
bool Moved() const;
void ProcessInput(MovementDir dir, char room_buff[25][25], char *curr_room_ch, bool *trap_activated,
bool *win, bool *lose);
void Draw(Image &screen, Image& background, Image& player);
void changePos(char *curr_room_ch);
void ctimeInc(float delta);
private:
float ctime = 0;
Point coords {.x = 10, .y = 10};
Point old_coords {.x = 10, .y = 10};
Pixel color {.r = 255, .g = 255, .b = 0, .a = 255};
int move_speed = 1;
};
#endif //MAIN_PLAYER_H
| [
"jagdinsky@gmail.com"
] | jagdinsky@gmail.com |
28def526fdce604ae718c5e34289043df8af31c6 | 01ff6f92885e96629de612f29453a991395f68f5 | /crc32/crc32/syn/systemc/make_hash_4.cpp | 45b61e0fe07c66ffec40e55983cdfb72fa7b7d1c | [] | no_license | drus519/SAPR_SNK | 47f361f788a38389bbdfdb2da959315242630981 | 9e0811f488c7648094465ec376ff23be6ef296f9 | refs/heads/master | 2022-11-05T15:21:29.502875 | 2020-06-20T01:11:37 | 2020-06-20T01:11:37 | 273,615,650 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 145,315 | cpp | #include "make_hash.h"
#include "AESL_pkg.h"
using namespace std;
namespace ap_rtl {
void make_hash::thread_add_ln32_fu_12174_p2() {
add_ln32_fu_12174_p2 = (!ap_const_lv32_10.is_01() || !i_0_0_reg_147.read().is_01())? sc_lv<32>(): (sc_biguint<32>(ap_const_lv32_10) + sc_biguint<32>(i_0_0_reg_147.read()));
}
void make_hash::thread_agg_result_V_0_1_fu_8436_p33() {
agg_result_V_0_1_fu_8436_p33 = esl_concat<31,1>(esl_concat<30,1>(esl_concat<29,1>(esl_concat<28,1>(esl_concat<27,1>(esl_concat<26,1>(esl_concat<25,1>(esl_concat<24,1>(esl_concat<23,1>(esl_concat<22,1>(esl_concat<21,1>(esl_concat<20,1>(esl_concat<19,1>(esl_concat<18,1>(esl_concat<17,1>(esl_concat<16,1>(esl_concat<15,1>(esl_concat<14,1>(esl_concat<13,1>(esl_concat<12,1>(esl_concat<11,1>(esl_concat<10,1>(esl_concat<9,1>(esl_concat<8,1>(esl_concat<7,1>(esl_concat<6,1>(esl_concat<5,1>(esl_concat<4,1>(esl_concat<3,1>(esl_concat<2,1>(esl_concat<1,1>(xor_ln816_35_fu_8430_p2.read(), xor_ln70_37_fu_8342_p2.read()), xor_ln816_34_fu_8243_p2.read()), xor_ln68_37_fu_8143_p2.read()), xor_ln67_37_fu_8041_p2.read()), xor_ln816_33_fu_7934_p2.read()), xor_ln816_32_fu_7815_p2.read()), xor_ln64_33_fu_7716_p2.read()), xor_ln816_31_fu_7619_p2.read()), xor_ln816_30_fu_7528_p2.read()), xor_ln816_29_fu_7424_p2.read()), xor_ln60_35_fu_7330_p2.read()), xor_ln59_39_fu_7240_p2.read()), xor_ln816_28_fu_7136_p2.read()), xor_ln816_27_fu_7023_p2.read()), xor_ln56_41_fu_6912_p2.read()), xor_ln55_41_fu_6804_p2.read()), xor_ln54_41_fu_6691_p2.read()), xor_ln816_26_fu_6578_p2.read()), xor_ln816_25_fu_6457_p2.read()), xor_ln816_24_fu_6345_p2.read()), xor_ln816_23_fu_6221_p2.read()), xor_ln49_37_fu_6111_p2.read()), xor_ln816_22_fu_6011_p2.read()), xor_ln47_45_fu_5892_p2.read()), xor_ln46_45_fu_5776_p2.read()), xor_ln45_55_fu_5655_p2.read()), xor_ln816_21_fu_5536_p2.read()), xor_ln816_20_fu_5397_p2.read()), xor_ln816_19_fu_5272_p2.read()), xor_ln41_50_fu_5128_p2.read()), xor_ln816_18_fu_5009_p2.read());
}
void make_hash::thread_agg_result_V_0_2_fu_12090_p33() {
agg_result_V_0_2_fu_12090_p33 = esl_concat<31,1>(esl_concat<30,1>(esl_concat<29,1>(esl_concat<28,1>(esl_concat<27,1>(esl_concat<26,1>(esl_concat<25,1>(esl_concat<24,1>(esl_concat<23,1>(esl_concat<22,1>(esl_concat<21,1>(esl_concat<20,1>(esl_concat<19,1>(esl_concat<18,1>(esl_concat<17,1>(esl_concat<16,1>(esl_concat<15,1>(esl_concat<14,1>(esl_concat<13,1>(esl_concat<12,1>(esl_concat<11,1>(esl_concat<10,1>(esl_concat<9,1>(esl_concat<8,1>(esl_concat<7,1>(esl_concat<6,1>(esl_concat<5,1>(esl_concat<4,1>(esl_concat<3,1>(esl_concat<2,1>(esl_concat<1,1>(xor_ln816_53_fu_12084_p2.read(), xor_ln70_56_fu_11996_p2.read()), xor_ln816_52_fu_11897_p2.read()), xor_ln68_56_fu_11797_p2.read()), xor_ln67_56_fu_11695_p2.read()), xor_ln816_51_fu_11588_p2.read()), xor_ln816_50_fu_11469_p2.read()), xor_ln64_50_fu_11370_p2.read()), xor_ln816_49_fu_11273_p2.read()), xor_ln816_48_fu_11182_p2.read()), xor_ln816_47_fu_11078_p2.read()), xor_ln60_53_fu_10984_p2.read()), xor_ln59_59_fu_10894_p2.read()), xor_ln816_46_fu_10790_p2.read()), xor_ln816_45_fu_10677_p2.read()), xor_ln56_62_fu_10566_p2.read()), xor_ln55_62_fu_10458_p2.read()), xor_ln54_62_fu_10345_p2.read()), xor_ln816_44_fu_10232_p2.read()), xor_ln816_43_fu_10111_p2.read()), xor_ln816_42_fu_9999_p2.read()), xor_ln816_41_fu_9875_p2.read()), xor_ln49_56_fu_9765_p2.read()), xor_ln816_40_fu_9665_p2.read()), xor_ln47_68_fu_9546_p2.read()), xor_ln46_68_fu_9430_p2.read()), xor_ln45_83_fu_9309_p2.read()), xor_ln816_39_fu_9190_p2.read()), xor_ln816_38_fu_9051_p2.read()), xor_ln816_37_fu_8926_p2.read()), xor_ln41_75_fu_8782_p2.read()), xor_ln816_36_fu_8663_p2.read());
}
void make_hash::thread_agg_result_V_0_3_fu_15728_p33() {
agg_result_V_0_3_fu_15728_p33 = esl_concat<31,1>(esl_concat<30,1>(esl_concat<29,1>(esl_concat<28,1>(esl_concat<27,1>(esl_concat<26,1>(esl_concat<25,1>(esl_concat<24,1>(esl_concat<23,1>(esl_concat<22,1>(esl_concat<21,1>(esl_concat<20,1>(esl_concat<19,1>(esl_concat<18,1>(esl_concat<17,1>(esl_concat<16,1>(esl_concat<15,1>(esl_concat<14,1>(esl_concat<13,1>(esl_concat<12,1>(esl_concat<11,1>(esl_concat<10,1>(esl_concat<9,1>(esl_concat<8,1>(esl_concat<7,1>(esl_concat<6,1>(esl_concat<5,1>(esl_concat<4,1>(esl_concat<3,1>(esl_concat<2,1>(esl_concat<1,1>(xor_ln816_71_fu_15722_p2.read(), xor_ln70_75_fu_15634_p2.read()), xor_ln816_70_fu_15535_p2.read()), xor_ln68_75_fu_15435_p2.read()), xor_ln67_75_fu_15333_p2.read()), xor_ln816_69_fu_15226_p2.read()), xor_ln816_68_fu_15107_p2.read()), xor_ln64_67_fu_15008_p2.read()), xor_ln816_67_fu_14911_p2.read()), xor_ln816_66_fu_14820_p2.read()), xor_ln816_65_fu_14715_p2.read()), xor_ln60_71_fu_14621_p2.read()), xor_ln59_79_fu_14531_p2.read()), xor_ln816_64_fu_14427_p2.read()), xor_ln816_63_fu_14314_p2.read()), xor_ln56_83_fu_14203_p2.read()), xor_ln55_83_fu_14095_p2.read()), xor_ln54_83_fu_13982_p2.read()), xor_ln816_62_fu_13869_p2.read()), xor_ln816_61_fu_13748_p2.read()), xor_ln816_60_fu_13636_p2.read()), xor_ln816_59_fu_13512_p2.read()), xor_ln49_75_fu_13401_p2.read()), xor_ln816_58_fu_13301_p2.read()), xor_ln47_91_fu_13182_p2.read()), xor_ln46_91_fu_13066_p2.read()), xor_ln45_111_fu_12945_p2.read()), xor_ln816_57_fu_12822_p2.read()), xor_ln816_56_fu_12683_p2.read()), xor_ln816_55_fu_12558_p2.read()), xor_ln41_99_fu_12414_p2.read()), xor_ln816_54_fu_12295_p2.read());
}
void make_hash::thread_agg_result_V_fu_4793_p33() {
agg_result_V_fu_4793_p33 = esl_concat<31,1>(esl_concat<30,1>(esl_concat<29,1>(esl_concat<28,1>(esl_concat<27,1>(esl_concat<26,1>(esl_concat<25,1>(esl_concat<24,1>(esl_concat<23,1>(esl_concat<22,1>(esl_concat<21,1>(esl_concat<20,1>(esl_concat<19,1>(esl_concat<18,1>(esl_concat<17,1>(esl_concat<16,1>(esl_concat<15,1>(esl_concat<14,1>(esl_concat<13,1>(esl_concat<12,1>(esl_concat<11,1>(esl_concat<10,1>(esl_concat<9,1>(esl_concat<8,1>(esl_concat<7,1>(esl_concat<6,1>(esl_concat<5,1>(esl_concat<4,1>(esl_concat<3,1>(esl_concat<2,1>(esl_concat<1,1>(xor_ln816_17_fu_4787_p2.read(), xor_ln70_18_fu_4691_p2.read()), xor_ln816_16_fu_4583_p2.read()), xor_ln68_18_fu_4475_p2.read()), xor_ln67_18_fu_4367_p2.read()), xor_ln816_15_fu_4253_p2.read()), xor_ln816_14_fu_4127_p2.read()), xor_ln64_16_fu_4019_p2.read()), xor_ln816_13_fu_3917_p2.read()), xor_ln816_12_fu_3821_p2.read()), xor_ln816_11_fu_3707_p2.read()), xor_ln60_17_fu_3605_p2.read()), xor_ln59_19_fu_3509_p2.read()), xor_ln816_10_fu_3395_p2.read()), xor_ln816_9_fu_3269_p2.read()), xor_ln56_20_fu_3149_p2.read()), xor_ln55_20_fu_3035_p2.read()), xor_ln54_20_fu_2915_p2.read()), xor_ln816_8_fu_2795_p2.read()), xor_ln816_7_fu_2663_p2.read()), xor_ln816_6_fu_2549_p2.read()), xor_ln816_5_fu_2417_p2.read()), xor_ln49_18_fu_2297_p2.read()), xor_ln816_4_fu_2189_p2.read()), xor_ln47_22_fu_2063_p2.read()), xor_ln46_22_fu_1929_p2.read()), xor_ln45_27_fu_1789_p2.read()), xor_ln816_3_fu_1635_p2.read()), xor_ln816_2_fu_1463_p2.read()), xor_ln816_1_fu_1301_p2.read()), xor_ln41_25_fu_1113_p2.read()), xor_ln816_fu_933_p2.read());
}
void make_hash::thread_ap_CS_fsm_state1() {
ap_CS_fsm_state1 = ap_CS_fsm.read()[0];
}
void make_hash::thread_ap_CS_fsm_state2() {
ap_CS_fsm_state2 = ap_CS_fsm.read()[1];
}
void make_hash::thread_ap_CS_fsm_state3() {
ap_CS_fsm_state3 = ap_CS_fsm.read()[2];
}
void make_hash::thread_ap_CS_fsm_state4() {
ap_CS_fsm_state4 = ap_CS_fsm.read()[3];
}
void make_hash::thread_ap_CS_fsm_state5() {
ap_CS_fsm_state5 = ap_CS_fsm.read()[4];
}
void make_hash::thread_ap_CS_fsm_state6() {
ap_CS_fsm_state6 = ap_CS_fsm.read()[5];
}
void make_hash::thread_ap_CS_fsm_state7() {
ap_CS_fsm_state7 = ap_CS_fsm.read()[6];
}
void make_hash::thread_ap_done() {
if (esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state7.read())) {
ap_done = ap_const_logic_1;
} else {
ap_done = ap_const_logic_0;
}
}
void make_hash::thread_ap_idle() {
if ((esl_seteq<1,1,1>(ap_const_logic_0, ap_start.read()) &&
esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state1.read()))) {
ap_idle = ap_const_logic_1;
} else {
ap_idle = ap_const_logic_0;
}
}
void make_hash::thread_ap_ready() {
if (esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state7.read())) {
ap_ready = ap_const_logic_1;
} else {
ap_ready = ap_const_logic_0;
}
}
void make_hash::thread_ap_return() {
ap_return = p_Val2_4_lcssa_reg_159.read();
}
void make_hash::thread_frame_address0() {
if (esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state5.read())) {
frame_address0 = (sc_lv<3>) (zext_ln36_3_fu_12163_p1.read());
} else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state4.read())) {
frame_address0 = (sc_lv<3>) (zext_ln36_2_fu_8520_p1.read());
} else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state3.read())) {
frame_address0 = (sc_lv<3>) (zext_ln36_1_fu_4877_p1.read());
} else if (esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state2.read())) {
frame_address0 = (sc_lv<3>) (zext_ln36_fu_700_p1.read());
} else {
frame_address0 = "XXX";
}
}
void make_hash::thread_frame_ce0() {
if ((esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state2.read()) ||
esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state3.read()) ||
esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state4.read()) ||
esl_seteq<1,1,1>(ap_const_logic_1, ap_CS_fsm_state5.read()))) {
frame_ce0 = ap_const_logic_1;
} else {
frame_ce0 = ap_const_logic_0;
}
}
void make_hash::thread_grp_fu_173_p3() {
grp_fu_173_p3 = frame_q0.read().range(6, 6);
}
void make_hash::thread_grp_fu_181_p3() {
grp_fu_181_p3 = frame_q0.read().range(9, 9);
}
void make_hash::thread_grp_fu_189_p3() {
grp_fu_189_p3 = frame_q0.read().range(10, 10);
}
void make_hash::thread_grp_fu_197_p3() {
grp_fu_197_p3 = frame_q0.read().range(12, 12);
}
void make_hash::thread_grp_fu_205_p3() {
grp_fu_205_p3 = frame_q0.read().range(16, 16);
}
void make_hash::thread_grp_fu_213_p3() {
grp_fu_213_p3 = frame_q0.read().range(24, 24);
}
void make_hash::thread_grp_fu_221_p3() {
grp_fu_221_p3 = frame_q0.read().range(25, 25);
}
void make_hash::thread_grp_fu_229_p3() {
grp_fu_229_p3 = frame_q0.read().range(26, 26);
}
void make_hash::thread_grp_fu_237_p3() {
grp_fu_237_p3 = frame_q0.read().range(28, 28);
}
void make_hash::thread_grp_fu_245_p3() {
grp_fu_245_p3 = frame_q0.read().range(29, 29);
}
void make_hash::thread_grp_fu_253_p3() {
grp_fu_253_p3 = frame_q0.read().range(30, 30);
}
void make_hash::thread_grp_fu_261_p2() {
grp_fu_261_p2 = (grp_fu_173_p3.read() ^ grp_fu_181_p3.read());
}
void make_hash::thread_grp_fu_267_p2() {
grp_fu_267_p2 = (grp_fu_213_p3.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_grp_fu_273_p2() {
grp_fu_273_p2 = (grp_fu_229_p3.read() ^ grp_fu_237_p3.read());
}
void make_hash::thread_grp_fu_279_p2() {
grp_fu_279_p2 = (grp_fu_245_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_grp_fu_285_p3() {
grp_fu_285_p3 = frame_q0.read().range(31, 31);
}
void make_hash::thread_grp_fu_293_p3() {
grp_fu_293_p3 = frame_q0.read().range(1, 1);
}
void make_hash::thread_grp_fu_301_p3() {
grp_fu_301_p3 = frame_q0.read().range(7, 7);
}
void make_hash::thread_grp_fu_309_p3() {
grp_fu_309_p3 = frame_q0.read().range(11, 11);
}
void make_hash::thread_grp_fu_317_p3() {
grp_fu_317_p3 = frame_q0.read().range(13, 13);
}
void make_hash::thread_grp_fu_325_p3() {
grp_fu_325_p3 = frame_q0.read().range(17, 17);
}
void make_hash::thread_grp_fu_333_p3() {
grp_fu_333_p3 = frame_q0.read().range(27, 27);
}
void make_hash::thread_grp_fu_341_p2() {
grp_fu_341_p2 = (grp_fu_293_p3.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_grp_fu_347_p2() {
grp_fu_347_p2 = (grp_fu_181_p3.read() ^ grp_fu_309_p3.read());
}
void make_hash::thread_grp_fu_353_p2() {
grp_fu_353_p2 = (grp_fu_333_p3.read() ^ grp_fu_237_p3.read());
}
void make_hash::thread_grp_fu_359_p3() {
grp_fu_359_p3 = frame_q0.read().range(2, 2);
}
void make_hash::thread_grp_fu_367_p3() {
grp_fu_367_p3 = frame_q0.read().range(8, 8);
}
void make_hash::thread_grp_fu_375_p3() {
grp_fu_375_p3 = frame_q0.read().range(14, 14);
}
void make_hash::thread_grp_fu_383_p3() {
grp_fu_383_p3 = frame_q0.read().range(18, 18);
}
void make_hash::thread_grp_fu_391_p2() {
grp_fu_391_p2 = (grp_fu_301_p3.read() ^ grp_fu_367_p3.read());
}
void make_hash::thread_grp_fu_397_p2() {
grp_fu_397_p2 = (grp_fu_181_p3.read() ^ grp_fu_317_p3.read());
}
void make_hash::thread_grp_fu_403_p2() {
grp_fu_403_p2 = (grp_fu_375_p3.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_grp_fu_409_p3() {
grp_fu_409_p3 = frame_q0.read().range(3, 3);
}
void make_hash::thread_grp_fu_417_p3() {
grp_fu_417_p3 = frame_q0.read().range(15, 15);
}
void make_hash::thread_grp_fu_425_p3() {
grp_fu_425_p3 = frame_q0.read().range(19, 19);
}
void make_hash::thread_grp_fu_433_p2() {
grp_fu_433_p2 = (grp_fu_293_p3.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_grp_fu_439_p2() {
grp_fu_439_p2 = (grp_fu_367_p3.read() ^ grp_fu_181_p3.read());
}
void make_hash::thread_grp_fu_445_p2() {
grp_fu_445_p2 = (grp_fu_189_p3.read() ^ grp_fu_375_p3.read());
}
void make_hash::thread_grp_fu_451_p2() {
grp_fu_451_p2 = (grp_fu_417_p3.read() ^ grp_fu_325_p3.read());
}
void make_hash::thread_grp_fu_457_p2() {
grp_fu_457_p2 = (grp_fu_383_p3.read() ^ grp_fu_425_p3.read());
}
void make_hash::thread_grp_fu_463_p3() {
grp_fu_463_p3 = frame_q0.read().range(4, 4);
}
void make_hash::thread_grp_fu_471_p3() {
grp_fu_471_p3 = frame_q0.read().range(20, 20);
}
void make_hash::thread_grp_fu_479_p2() {
grp_fu_479_p2 = (grp_fu_409_p3.read() ^ grp_fu_463_p3.read());
}
void make_hash::thread_grp_fu_485_p2() {
grp_fu_485_p2 = (grp_fu_367_p3.read() ^ grp_fu_309_p3.read());
}
void make_hash::thread_grp_fu_491_p3() {
grp_fu_491_p3 = frame_q0.read().range(5, 5);
}
void make_hash::thread_grp_fu_499_p3() {
grp_fu_499_p3 = frame_q0.read().range(21, 21);
}
void make_hash::thread_grp_fu_507_p2() {
grp_fu_507_p2 = (grp_fu_491_p3.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_grp_fu_513_p2() {
grp_fu_513_p2 = (grp_fu_301_p3.read() ^ grp_fu_189_p3.read());
}
void make_hash::thread_grp_fu_519_p2() {
grp_fu_519_p2 = (grp_fu_425_p3.read() ^ grp_fu_471_p3.read());
}
void make_hash::thread_grp_fu_525_p2() {
grp_fu_525_p2 = (grp_fu_499_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_grp_fu_531_p2() {
grp_fu_531_p2 = (grp_fu_237_p3.read() ^ grp_fu_245_p3.read());
}
void make_hash::thread_grp_fu_537_p3() {
grp_fu_537_p3 = frame_q0.read().range(22, 22);
}
void make_hash::thread_grp_fu_545_p2() {
grp_fu_545_p2 = (grp_fu_471_p3.read() ^ grp_fu_499_p3.read());
}
void make_hash::thread_grp_fu_551_p3() {
grp_fu_551_p3 = frame_q0.read().range(23, 23);
}
void make_hash::thread_grp_fu_559_p2() {
grp_fu_559_p2 = (grp_fu_409_p3.read() ^ grp_fu_491_p3.read());
}
void make_hash::thread_grp_fu_565_p2() {
grp_fu_565_p2 = (grp_fu_537_p3.read() ^ grp_fu_551_p3.read());
}
void make_hash::thread_grp_fu_571_p2() {
grp_fu_571_p2 = (grp_fu_359_p3.read() ^ grp_fu_463_p3.read());
}
void make_hash::thread_grp_fu_577_p2() {
grp_fu_577_p2 = (grp_fu_197_p3.read() ^ grp_fu_375_p3.read());
}
void make_hash::thread_grp_fu_583_p2() {
grp_fu_583_p2 = (grp_fu_417_p3.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_grp_fu_589_p2() {
grp_fu_589_p2 = (grp_fu_333_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_grp_fu_595_p2() {
grp_fu_595_p2 = (grp_fu_173_p3.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_grp_fu_601_p2() {
grp_fu_601_p2 = (grp_fu_189_p3.read() ^ grp_fu_317_p3.read());
}
void make_hash::thread_grp_fu_607_p2() {
grp_fu_607_p2 = (grp_fu_325_p3.read() ^ grp_fu_425_p3.read());
}
void make_hash::thread_grp_fu_613_p2() {
grp_fu_613_p2 = (grp_fu_463_p3.read() ^ grp_fu_491_p3.read());
}
void make_hash::thread_grp_fu_619_p2() {
grp_fu_619_p2 = (grp_fu_499_p3.read() ^ grp_fu_537_p3.read());
}
void make_hash::thread_grp_fu_625_p2() {
grp_fu_625_p2 = (grp_fu_213_p3.read() ^ grp_fu_229_p3.read());
}
void make_hash::thread_grp_fu_631_p2() {
grp_fu_631_p2 = (grp_fu_551_p3.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_grp_fu_637_p2() {
grp_fu_637_p2 = (grp_fu_551_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_grp_fu_643_p2() {
grp_fu_643_p2 = (grp_fu_333_p3.read() ^ grp_fu_245_p3.read());
}
void make_hash::thread_grp_fu_649_p2() {
grp_fu_649_p2 = (grp_fu_205_p3.read() ^ grp_fu_325_p3.read());
}
void make_hash::thread_grp_fu_655_p2() {
grp_fu_655_p2 = (grp_fu_237_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_grp_fu_661_p2() {
grp_fu_661_p2 = (grp_fu_643_p2.read() ^ grp_fu_625_p2.read());
}
void make_hash::thread_grp_fu_667_p2() {
grp_fu_667_p2 = (grp_fu_309_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_grp_fu_673_p2() {
grp_fu_673_p2 = (grp_fu_229_p3.read() ^ grp_fu_333_p3.read());
}
void make_hash::thread_grp_fu_679_p2() {
grp_fu_679_p2 = (grp_fu_279_p2.read() ^ grp_fu_353_p2.read());
}
void make_hash::thread_icmp_ln32_1_fu_4867_p2() {
icmp_ln32_1_fu_4867_p2 = (!or_ln32_fu_4861_p2.read().is_01() || !len.read().is_01())? sc_lv<1>(): (sc_biguint<32>(or_ln32_fu_4861_p2.read()) < sc_biguint<32>(len.read()));
}
void make_hash::thread_icmp_ln32_2_fu_8510_p2() {
icmp_ln32_2_fu_8510_p2 = (!or_ln32_1_fu_8504_p2.read().is_01() || !len.read().is_01())? sc_lv<1>(): (sc_biguint<32>(or_ln32_1_fu_8504_p2.read()) < sc_biguint<32>(len.read()));
}
void make_hash::thread_icmp_ln32_3_fu_8543_p2() {
icmp_ln32_3_fu_8543_p2 = (!or_ln32_2_fu_8537_p2.read().is_01() || !len.read().is_01())? sc_lv<1>(): (sc_biguint<32>(or_ln32_2_fu_8537_p2.read()) < sc_biguint<32>(len.read()));
}
void make_hash::thread_icmp_ln32_fu_685_p2() {
icmp_ln32_fu_685_p2 = (!i_0_0_reg_147.read().is_01() || !len.read().is_01())? sc_lv<1>(): (sc_biguint<32>(i_0_0_reg_147.read()) < sc_biguint<32>(len.read()));
}
void make_hash::thread_lshr_ln_fu_690_p4() {
lshr_ln_fu_690_p4 = i_0_0_reg_147.read().range(6, 2);
}
void make_hash::thread_or_ln32_1_fu_8504_p2() {
or_ln32_1_fu_8504_p2 = (i_0_0_reg_147.read() | ap_const_lv32_8);
}
void make_hash::thread_or_ln32_2_fu_8537_p2() {
or_ln32_2_fu_8537_p2 = (i_0_0_reg_147.read() | ap_const_lv32_C);
}
void make_hash::thread_or_ln32_fu_4861_p2() {
or_ln32_fu_4861_p2 = (i_0_0_reg_147.read() | ap_const_lv32_4);
}
void make_hash::thread_or_ln36_1_fu_8515_p2() {
or_ln36_1_fu_8515_p2 = (lshr_ln_reg_15807.read() | ap_const_lv5_2);
}
void make_hash::thread_or_ln36_2_fu_12158_p2() {
or_ln36_2_fu_12158_p2 = (lshr_ln_reg_15807.read() | ap_const_lv5_3);
}
void make_hash::thread_or_ln36_fu_4872_p2() {
or_ln36_fu_4872_p2 = (lshr_ln_reg_15807.read() | ap_const_lv5_1);
}
void make_hash::thread_tmp_10_fu_793_p3() {
tmp_10_fu_793_p3 = p_Val2_4_0_reg_135.read().range(30, 30);
}
void make_hash::thread_tmp_11_fu_871_p3() {
tmp_11_fu_871_p3 = p_Val2_4_0_reg_135.read().range(31, 31);
}
void make_hash::thread_tmp_1_fu_721_p3() {
tmp_1_fu_721_p3 = p_Val2_4_0_reg_135.read().range(9, 9);
}
void make_hash::thread_tmp_24_fu_939_p3() {
tmp_24_fu_939_p3 = p_Val2_4_0_reg_135.read().range(1, 1);
}
void make_hash::thread_tmp_25_fu_947_p3() {
tmp_25_fu_947_p3 = p_Val2_4_0_reg_135.read().range(7, 7);
}
void make_hash::thread_tmp_26_fu_955_p3() {
tmp_26_fu_955_p3 = p_Val2_4_0_reg_135.read().range(11, 11);
}
void make_hash::thread_tmp_27_fu_963_p3() {
tmp_27_fu_963_p3 = p_Val2_4_0_reg_135.read().range(13, 13);
}
void make_hash::thread_tmp_28_fu_971_p3() {
tmp_28_fu_971_p3 = p_Val2_4_0_reg_135.read().range(17, 17);
}
void make_hash::thread_tmp_29_fu_979_p3() {
tmp_29_fu_979_p3 = p_Val2_4_0_reg_135.read().range(27, 27);
}
void make_hash::thread_tmp_2_fu_729_p3() {
tmp_2_fu_729_p3 = p_Val2_4_0_reg_135.read().range(10, 10);
}
void make_hash::thread_tmp_36_fu_1119_p3() {
tmp_36_fu_1119_p3 = p_Val2_4_0_reg_135.read().range(2, 2);
}
void make_hash::thread_tmp_37_fu_1127_p3() {
tmp_37_fu_1127_p3 = p_Val2_4_0_reg_135.read().range(8, 8);
}
void make_hash::thread_tmp_38_fu_1135_p3() {
tmp_38_fu_1135_p3 = p_Val2_4_0_reg_135.read().range(14, 14);
}
void make_hash::thread_tmp_39_fu_1143_p3() {
tmp_39_fu_1143_p3 = p_Val2_4_0_reg_135.read().range(18, 18);
}
void make_hash::thread_tmp_3_fu_737_p3() {
tmp_3_fu_737_p3 = p_Val2_4_0_reg_135.read().range(12, 12);
}
void make_hash::thread_tmp_44_fu_1307_p3() {
tmp_44_fu_1307_p3 = p_Val2_4_0_reg_135.read().range(3, 3);
}
void make_hash::thread_tmp_45_fu_1315_p3() {
tmp_45_fu_1315_p3 = p_Val2_4_0_reg_135.read().range(15, 15);
}
void make_hash::thread_tmp_46_fu_1323_p3() {
tmp_46_fu_1323_p3 = p_Val2_4_0_reg_135.read().range(19, 19);
}
void make_hash::thread_tmp_4_fu_745_p3() {
tmp_4_fu_745_p3 = p_Val2_4_0_reg_135.read().range(16, 16);
}
void make_hash::thread_tmp_50_fu_1469_p3() {
tmp_50_fu_1469_p3 = p_Val2_4_0_reg_135.read().range(4, 4);
}
void make_hash::thread_tmp_51_fu_1477_p3() {
tmp_51_fu_1477_p3 = p_Val2_4_0_reg_135.read().range(20, 20);
}
void make_hash::thread_tmp_54_fu_1641_p3() {
tmp_54_fu_1641_p3 = p_Val2_4_0_reg_135.read().range(5, 5);
}
void make_hash::thread_tmp_55_fu_1649_p3() {
tmp_55_fu_1649_p3 = p_Val2_4_0_reg_135.read().range(21, 21);
}
void make_hash::thread_tmp_58_fu_1795_p3() {
tmp_58_fu_1795_p3 = p_Val2_4_0_reg_135.read().range(22, 22);
}
void make_hash::thread_tmp_5_fu_753_p3() {
tmp_5_fu_753_p3 = p_Val2_4_0_reg_135.read().range(24, 24);
}
void make_hash::thread_tmp_60_fu_1935_p3() {
tmp_60_fu_1935_p3 = p_Val2_4_0_reg_135.read().range(23, 23);
}
void make_hash::thread_tmp_6_fu_761_p3() {
tmp_6_fu_761_p3 = p_Val2_4_0_reg_135.read().range(25, 25);
}
void make_hash::thread_tmp_7_fu_769_p3() {
tmp_7_fu_769_p3 = p_Val2_4_0_reg_135.read().range(26, 26);
}
void make_hash::thread_tmp_8_fu_777_p3() {
tmp_8_fu_777_p3 = p_Val2_4_0_reg_135.read().range(28, 28);
}
void make_hash::thread_tmp_9_fu_785_p3() {
tmp_9_fu_785_p3 = p_Val2_4_0_reg_135.read().range(29, 29);
}
void make_hash::thread_tmp_fu_713_p3() {
tmp_fu_713_p3 = p_Val2_4_0_reg_135.read().range(6, 6);
}
void make_hash::thread_trunc_ln32_fu_801_p1() {
trunc_ln32_fu_801_p1 = p_Val2_4_0_reg_135.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_1_fu_709_p1() {
trunc_ln41_1_fu_709_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_2_fu_4894_p1() {
trunc_ln41_2_fu_4894_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_3_fu_4898_p1() {
trunc_ln41_3_fu_4898_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_4_fu_8548_p1() {
trunc_ln41_4_fu_8548_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_5_fu_8552_p1() {
trunc_ln41_5_fu_8552_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_6_fu_12180_p1() {
trunc_ln41_6_fu_12180_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_7_fu_12184_p1() {
trunc_ln41_7_fu_12184_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_trunc_ln41_fu_705_p1() {
trunc_ln41_fu_705_p1 = frame_q0.read().range(1-1, 0);
}
void make_hash::thread_xor_ln40_10_fu_865_p2() {
xor_ln40_10_fu_865_p2 = (xor_ln40_9_fu_859_p2.read() ^ xor_ln40_5_fu_835_p2.read());
}
void make_hash::thread_xor_ln40_11_fu_879_p2() {
xor_ln40_11_fu_879_p2 = (tmp_11_fu_871_p3.read() ^ trunc_ln41_fu_705_p1.read());
}
void make_hash::thread_xor_ln40_12_fu_885_p2() {
xor_ln40_12_fu_885_p2 = (xor_ln40_11_fu_879_p2.read() ^ xor_ln40_10_fu_865_p2.read());
}
void make_hash::thread_xor_ln40_14_fu_891_p2() {
xor_ln40_14_fu_891_p2 = (grp_fu_189_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln40_15_fu_897_p2() {
xor_ln40_15_fu_897_p2 = (xor_ln40_14_fu_891_p2.read() ^ grp_fu_261_p2.read());
}
void make_hash::thread_xor_ln40_16_fu_903_p2() {
xor_ln40_16_fu_903_p2 = (xor_ln40_15_fu_897_p2.read() ^ xor_ln40_12_fu_885_p2.read());
}
void make_hash::thread_xor_ln40_18_fu_909_p2() {
xor_ln40_18_fu_909_p2 = (grp_fu_267_p2.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln40_1_fu_811_p2() {
xor_ln40_1_fu_811_p2 = (xor_ln40_fu_805_p2.read() ^ tmp_9_fu_785_p3.read());
}
void make_hash::thread_xor_ln40_21_fu_915_p2() {
xor_ln40_21_fu_915_p2 = (grp_fu_279_p2.read() ^ grp_fu_273_p2.read());
}
void make_hash::thread_xor_ln40_22_fu_921_p2() {
xor_ln40_22_fu_921_p2 = (xor_ln40_21_fu_915_p2.read() ^ xor_ln40_18_fu_909_p2.read());
}
void make_hash::thread_xor_ln40_23_fu_927_p2() {
xor_ln40_23_fu_927_p2 = (xor_ln40_22_fu_921_p2.read() ^ xor_ln40_16_fu_903_p2.read());
}
void make_hash::thread_xor_ln40_24_fu_4902_p2() {
xor_ln40_24_fu_4902_p2 = (xor_ln70_18_reg_16254.read() ^ xor_ln816_reg_15819.read());
}
void make_hash::thread_xor_ln40_25_fu_4906_p2() {
xor_ln40_25_fu_4906_p2 = (xor_ln40_24_fu_4902_p2.read() ^ xor_ln816_16_reg_16243.read());
}
void make_hash::thread_xor_ln40_26_fu_4911_p2() {
xor_ln40_26_fu_4911_p2 = (xor_ln49_18_reg_15927.read() ^ xor_ln46_22_reg_15879.read());
}
void make_hash::thread_xor_ln40_27_fu_4915_p2() {
xor_ln40_27_fu_4915_p2 = (xor_ln816_7_reg_15986.read() ^ xor_ln56_20_reg_16037.read());
}
void make_hash::thread_xor_ln40_28_fu_4919_p2() {
xor_ln40_28_fu_4919_p2 = (xor_ln40_27_fu_4915_p2.read() ^ xor_ln816_5_reg_15950.read());
}
void make_hash::thread_xor_ln40_29_fu_4924_p2() {
xor_ln40_29_fu_4924_p2 = (xor_ln40_28_fu_4919_p2.read() ^ xor_ln40_26_fu_4911_p2.read());
}
void make_hash::thread_xor_ln40_2_fu_817_p2() {
xor_ln40_2_fu_817_p2 = (tmp_1_fu_721_p3.read() ^ tmp_fu_713_p3.read());
}
void make_hash::thread_xor_ln40_30_fu_4930_p2() {
xor_ln40_30_fu_4930_p2 = (xor_ln64_16_reg_16158.read() ^ xor_ln816_14_reg_16180.read());
}
void make_hash::thread_xor_ln40_31_fu_4934_p2() {
xor_ln40_31_fu_4934_p2 = (xor_ln68_18_reg_16226.read() ^ xor_ln40_25_fu_4906_p2.read());
}
void make_hash::thread_xor_ln40_32_fu_4939_p2() {
xor_ln40_32_fu_4939_p2 = (xor_ln40_31_fu_4934_p2.read() ^ xor_ln816_15_reg_16198.read());
}
void make_hash::thread_xor_ln40_33_fu_4944_p2() {
xor_ln40_33_fu_4944_p2 = (xor_ln40_32_fu_4939_p2.read() ^ xor_ln40_30_fu_4930_p2.read());
}
void make_hash::thread_xor_ln40_34_fu_4950_p2() {
xor_ln40_34_fu_4950_p2 = (xor_ln40_33_fu_4944_p2.read() ^ xor_ln40_29_fu_4924_p2.read());
}
void make_hash::thread_xor_ln40_35_fu_4956_p2() {
xor_ln40_35_fu_4956_p2 = (xor_ln816_17_reg_16263.read() ^ trunc_ln41_2_fu_4894_p1.read());
}
void make_hash::thread_xor_ln40_36_fu_4961_p2() {
xor_ln40_36_fu_4961_p2 = (xor_ln40_35_fu_4956_p2.read() ^ xor_ln40_34_fu_4950_p2.read());
}
void make_hash::thread_xor_ln40_38_fu_4967_p2() {
xor_ln40_38_fu_4967_p2 = (grp_fu_189_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln40_39_fu_4973_p2() {
xor_ln40_39_fu_4973_p2 = (xor_ln40_38_fu_4967_p2.read() ^ grp_fu_261_p2.read());
}
void make_hash::thread_xor_ln40_3_fu_823_p2() {
xor_ln40_3_fu_823_p2 = (tmp_3_fu_737_p3.read() ^ tmp_4_fu_745_p3.read());
}
void make_hash::thread_xor_ln40_40_fu_4979_p2() {
xor_ln40_40_fu_4979_p2 = (xor_ln40_39_fu_4973_p2.read() ^ xor_ln40_36_fu_4961_p2.read());
}
void make_hash::thread_xor_ln40_42_fu_4985_p2() {
xor_ln40_42_fu_4985_p2 = (grp_fu_267_p2.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln40_45_fu_4991_p2() {
xor_ln40_45_fu_4991_p2 = (grp_fu_279_p2.read() ^ grp_fu_273_p2.read());
}
void make_hash::thread_xor_ln40_46_fu_4997_p2() {
xor_ln40_46_fu_4997_p2 = (xor_ln40_45_fu_4991_p2.read() ^ xor_ln40_42_fu_4985_p2.read());
}
void make_hash::thread_xor_ln40_47_fu_5003_p2() {
xor_ln40_47_fu_5003_p2 = (xor_ln40_46_fu_4997_p2.read() ^ xor_ln40_40_fu_4979_p2.read());
}
void make_hash::thread_xor_ln40_48_fu_8556_p2() {
xor_ln40_48_fu_8556_p2 = (xor_ln70_37_reg_16741.read() ^ xor_ln816_18_reg_16306.read());
}
void make_hash::thread_xor_ln40_49_fu_8560_p2() {
xor_ln40_49_fu_8560_p2 = (xor_ln40_48_fu_8556_p2.read() ^ xor_ln816_34_reg_16730.read());
}
void make_hash::thread_xor_ln40_4_fu_829_p2() {
xor_ln40_4_fu_829_p2 = (xor_ln40_3_fu_823_p2.read() ^ tmp_2_fu_729_p3.read());
}
void make_hash::thread_xor_ln40_50_fu_8565_p2() {
xor_ln40_50_fu_8565_p2 = (xor_ln49_37_reg_16414.read() ^ xor_ln46_45_reg_16366.read());
}
void make_hash::thread_xor_ln40_51_fu_8569_p2() {
xor_ln40_51_fu_8569_p2 = (xor_ln816_25_reg_16473.read() ^ xor_ln56_41_reg_16524.read());
}
void make_hash::thread_xor_ln40_52_fu_8573_p2() {
xor_ln40_52_fu_8573_p2 = (xor_ln40_51_fu_8569_p2.read() ^ xor_ln816_23_reg_16437.read());
}
void make_hash::thread_xor_ln40_53_fu_8578_p2() {
xor_ln40_53_fu_8578_p2 = (xor_ln40_52_fu_8573_p2.read() ^ xor_ln40_50_fu_8565_p2.read());
}
void make_hash::thread_xor_ln40_54_fu_8584_p2() {
xor_ln40_54_fu_8584_p2 = (xor_ln64_33_reg_16645.read() ^ xor_ln816_32_reg_16667.read());
}
void make_hash::thread_xor_ln40_55_fu_8588_p2() {
xor_ln40_55_fu_8588_p2 = (xor_ln68_37_reg_16713.read() ^ xor_ln40_49_fu_8560_p2.read());
}
void make_hash::thread_xor_ln40_56_fu_8593_p2() {
xor_ln40_56_fu_8593_p2 = (xor_ln40_55_fu_8588_p2.read() ^ xor_ln816_33_reg_16685.read());
}
void make_hash::thread_xor_ln40_57_fu_8598_p2() {
xor_ln40_57_fu_8598_p2 = (xor_ln40_56_fu_8593_p2.read() ^ xor_ln40_54_fu_8584_p2.read());
}
void make_hash::thread_xor_ln40_58_fu_8604_p2() {
xor_ln40_58_fu_8604_p2 = (xor_ln40_57_fu_8598_p2.read() ^ xor_ln40_53_fu_8578_p2.read());
}
void make_hash::thread_xor_ln40_59_fu_8610_p2() {
xor_ln40_59_fu_8610_p2 = (xor_ln816_35_reg_16750.read() ^ trunc_ln41_4_fu_8548_p1.read());
}
void make_hash::thread_xor_ln40_5_fu_835_p2() {
xor_ln40_5_fu_835_p2 = (xor_ln40_4_fu_829_p2.read() ^ xor_ln40_2_fu_817_p2.read());
}
void make_hash::thread_xor_ln40_60_fu_8615_p2() {
xor_ln40_60_fu_8615_p2 = (xor_ln40_59_fu_8610_p2.read() ^ xor_ln40_58_fu_8604_p2.read());
}
void make_hash::thread_xor_ln40_62_fu_8621_p2() {
xor_ln40_62_fu_8621_p2 = (grp_fu_189_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln40_63_fu_8627_p2() {
xor_ln40_63_fu_8627_p2 = (xor_ln40_62_fu_8621_p2.read() ^ grp_fu_261_p2.read());
}
void make_hash::thread_xor_ln40_64_fu_8633_p2() {
xor_ln40_64_fu_8633_p2 = (xor_ln40_63_fu_8627_p2.read() ^ xor_ln40_60_fu_8615_p2.read());
}
void make_hash::thread_xor_ln40_66_fu_8639_p2() {
xor_ln40_66_fu_8639_p2 = (grp_fu_267_p2.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln40_69_fu_8645_p2() {
xor_ln40_69_fu_8645_p2 = (grp_fu_279_p2.read() ^ grp_fu_273_p2.read());
}
void make_hash::thread_xor_ln40_6_fu_841_p2() {
xor_ln40_6_fu_841_p2 = (tmp_5_fu_753_p3.read() ^ tmp_6_fu_761_p3.read());
}
void make_hash::thread_xor_ln40_70_fu_8651_p2() {
xor_ln40_70_fu_8651_p2 = (xor_ln40_69_fu_8645_p2.read() ^ xor_ln40_66_fu_8639_p2.read());
}
void make_hash::thread_xor_ln40_71_fu_8657_p2() {
xor_ln40_71_fu_8657_p2 = (xor_ln40_70_fu_8651_p2.read() ^ xor_ln40_64_fu_8633_p2.read());
}
void make_hash::thread_xor_ln40_72_fu_12188_p2() {
xor_ln40_72_fu_12188_p2 = (xor_ln70_56_reg_17238.read() ^ xor_ln816_36_reg_16802.read());
}
void make_hash::thread_xor_ln40_73_fu_12192_p2() {
xor_ln40_73_fu_12192_p2 = (xor_ln40_72_fu_12188_p2.read() ^ xor_ln816_52_reg_17227.read());
}
void make_hash::thread_xor_ln40_74_fu_12197_p2() {
xor_ln40_74_fu_12197_p2 = (xor_ln49_56_reg_16910.read() ^ xor_ln46_68_reg_16862.read());
}
void make_hash::thread_xor_ln40_75_fu_12201_p2() {
xor_ln40_75_fu_12201_p2 = (xor_ln816_43_reg_16969.read() ^ xor_ln56_62_reg_17020.read());
}
void make_hash::thread_xor_ln40_76_fu_12205_p2() {
xor_ln40_76_fu_12205_p2 = (xor_ln40_75_fu_12201_p2.read() ^ xor_ln816_41_reg_16933.read());
}
void make_hash::thread_xor_ln40_77_fu_12210_p2() {
xor_ln40_77_fu_12210_p2 = (xor_ln40_76_fu_12205_p2.read() ^ xor_ln40_74_fu_12197_p2.read());
}
void make_hash::thread_xor_ln40_78_fu_12216_p2() {
xor_ln40_78_fu_12216_p2 = (xor_ln64_50_reg_17141.read() ^ xor_ln816_50_reg_17163.read());
}
void make_hash::thread_xor_ln40_79_fu_12220_p2() {
xor_ln40_79_fu_12220_p2 = (xor_ln68_56_reg_17209.read() ^ xor_ln40_73_fu_12192_p2.read());
}
void make_hash::thread_xor_ln40_7_fu_847_p2() {
xor_ln40_7_fu_847_p2 = (tmp_8_fu_777_p3.read() ^ xor_ln40_1_fu_811_p2.read());
}
void make_hash::thread_xor_ln40_80_fu_12225_p2() {
xor_ln40_80_fu_12225_p2 = (xor_ln40_79_fu_12220_p2.read() ^ xor_ln816_51_reg_17181.read());
}
void make_hash::thread_xor_ln40_81_fu_12230_p2() {
xor_ln40_81_fu_12230_p2 = (xor_ln40_80_fu_12225_p2.read() ^ xor_ln40_78_fu_12216_p2.read());
}
void make_hash::thread_xor_ln40_82_fu_12236_p2() {
xor_ln40_82_fu_12236_p2 = (xor_ln40_81_fu_12230_p2.read() ^ xor_ln40_77_fu_12210_p2.read());
}
void make_hash::thread_xor_ln40_83_fu_12242_p2() {
xor_ln40_83_fu_12242_p2 = (xor_ln816_53_reg_17247.read() ^ trunc_ln41_6_fu_12180_p1.read());
}
void make_hash::thread_xor_ln40_84_fu_12247_p2() {
xor_ln40_84_fu_12247_p2 = (xor_ln40_83_fu_12242_p2.read() ^ xor_ln40_82_fu_12236_p2.read());
}
void make_hash::thread_xor_ln40_86_fu_12253_p2() {
xor_ln40_86_fu_12253_p2 = (grp_fu_189_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln40_87_fu_12259_p2() {
xor_ln40_87_fu_12259_p2 = (xor_ln40_86_fu_12253_p2.read() ^ grp_fu_261_p2.read());
}
void make_hash::thread_xor_ln40_88_fu_12265_p2() {
xor_ln40_88_fu_12265_p2 = (xor_ln40_87_fu_12259_p2.read() ^ xor_ln40_84_fu_12247_p2.read());
}
void make_hash::thread_xor_ln40_8_fu_853_p2() {
xor_ln40_8_fu_853_p2 = (xor_ln40_7_fu_847_p2.read() ^ tmp_7_fu_769_p3.read());
}
void make_hash::thread_xor_ln40_90_fu_12271_p2() {
xor_ln40_90_fu_12271_p2 = (grp_fu_267_p2.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln40_93_fu_12277_p2() {
xor_ln40_93_fu_12277_p2 = (grp_fu_279_p2.read() ^ grp_fu_273_p2.read());
}
void make_hash::thread_xor_ln40_94_fu_12283_p2() {
xor_ln40_94_fu_12283_p2 = (xor_ln40_93_fu_12277_p2.read() ^ xor_ln40_90_fu_12271_p2.read());
}
void make_hash::thread_xor_ln40_95_fu_12289_p2() {
xor_ln40_95_fu_12289_p2 = (xor_ln40_94_fu_12283_p2.read() ^ xor_ln40_88_fu_12265_p2.read());
}
void make_hash::thread_xor_ln40_9_fu_859_p2() {
xor_ln40_9_fu_859_p2 = (xor_ln40_8_fu_853_p2.read() ^ xor_ln40_6_fu_841_p2.read());
}
void make_hash::thread_xor_ln40_fu_805_p2() {
xor_ln40_fu_805_p2 = (tmp_10_fu_793_p3.read() ^ trunc_ln32_fu_801_p1.read());
}
void make_hash::thread_xor_ln41_10_fu_1041_p2() {
xor_ln41_10_fu_1041_p2 = (xor_ln41_fu_987_p2.read() ^ xor_ln41_9_fu_1035_p2.read());
}
void make_hash::thread_xor_ln41_11_fu_1047_p2() {
xor_ln41_11_fu_1047_p2 = (xor_ln41_10_fu_1041_p2.read() ^ xor_ln41_8_fu_1029_p2.read());
}
void make_hash::thread_xor_ln41_12_fu_1053_p2() {
xor_ln41_12_fu_1053_p2 = (xor_ln41_11_fu_1047_p2.read() ^ xor_ln41_6_fu_1017_p2.read());
}
void make_hash::thread_xor_ln41_14_fu_1059_p2() {
xor_ln41_14_fu_1059_p2 = (grp_fu_341_p2.read() ^ trunc_ln41_1_fu_709_p1.read());
}
void make_hash::thread_xor_ln41_16_fu_1065_p2() {
xor_ln41_16_fu_1065_p2 = (grp_fu_347_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln41_17_fu_1071_p2() {
xor_ln41_17_fu_1071_p2 = (xor_ln41_16_fu_1065_p2.read() ^ xor_ln41_14_fu_1059_p2.read());
}
void make_hash::thread_xor_ln41_18_fu_1077_p2() {
xor_ln41_18_fu_1077_p2 = (grp_fu_317_p3.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln41_19_fu_1083_p2() {
xor_ln41_19_fu_1083_p2 = (xor_ln41_18_fu_1077_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln41_1_fu_993_p2() {
xor_ln41_1_fu_993_p2 = (tmp_24_fu_939_p3.read() ^ tmp_25_fu_947_p3.read());
}
void make_hash::thread_xor_ln41_20_fu_1089_p2() {
xor_ln41_20_fu_1089_p2 = (grp_fu_325_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln41_22_fu_1095_p2() {
xor_ln41_22_fu_1095_p2 = (grp_fu_353_p2.read() ^ xor_ln41_20_fu_1089_p2.read());
}
void make_hash::thread_xor_ln41_23_fu_1101_p2() {
xor_ln41_23_fu_1101_p2 = (xor_ln41_22_fu_1095_p2.read() ^ xor_ln41_19_fu_1083_p2.read());
}
void make_hash::thread_xor_ln41_24_fu_1107_p2() {
xor_ln41_24_fu_1107_p2 = (xor_ln41_23_fu_1101_p2.read() ^ xor_ln41_17_fu_1071_p2.read());
}
void make_hash::thread_xor_ln41_25_fu_1113_p2() {
xor_ln41_25_fu_1113_p2 = (xor_ln41_24_fu_1107_p2.read() ^ xor_ln41_12_fu_1053_p2.read());
}
void make_hash::thread_xor_ln41_26_fu_5015_p2() {
xor_ln41_26_fu_5015_p2 = (xor_ln68_18_reg_16226.read() ^ xor_ln816_reg_15819.read());
}
void make_hash::thread_xor_ln41_27_fu_5019_p2() {
xor_ln41_27_fu_5019_p2 = (xor_ln41_25_reg_15825.read() ^ xor_ln47_22_reg_15893.read());
}
void make_hash::thread_xor_ln41_28_fu_5023_p2() {
xor_ln41_28_fu_5023_p2 = (xor_ln41_27_fu_5019_p2.read() ^ xor_ln46_22_reg_15879.read());
}
void make_hash::thread_xor_ln41_29_fu_5028_p2() {
xor_ln41_29_fu_5028_p2 = (xor_ln51_22_reg_15962.read() ^ xor_ln52_18_reg_15979.read());
}
void make_hash::thread_xor_ln41_2_fu_999_p2() {
xor_ln41_2_fu_999_p2 = (xor_ln41_1_fu_993_p2.read() ^ tmp_fu_713_p3.read());
}
void make_hash::thread_xor_ln41_30_fu_5032_p2() {
xor_ln41_30_fu_5032_p2 = (xor_ln41_29_fu_5028_p2.read() ^ xor_ln49_18_reg_15927.read());
}
void make_hash::thread_xor_ln41_31_fu_5037_p2() {
xor_ln41_31_fu_5037_p2 = (xor_ln41_30_fu_5032_p2.read() ^ xor_ln41_28_fu_5023_p2.read());
}
void make_hash::thread_xor_ln41_32_fu_5043_p2() {
xor_ln41_32_fu_5043_p2 = (xor_ln56_20_reg_16037.read() ^ xor_ln816_9_reg_16055.read());
}
void make_hash::thread_xor_ln41_33_fu_5047_p2() {
xor_ln41_33_fu_5047_p2 = (xor_ln41_32_fu_5043_p2.read() ^ xor_ln816_8_reg_16002.read());
}
void make_hash::thread_xor_ln41_34_fu_5052_p2() {
xor_ln41_34_fu_5052_p2 = (xor_ln64_16_reg_16158.read() ^ xor_ln67_18_reg_16212.read());
}
void make_hash::thread_xor_ln41_35_fu_5056_p2() {
xor_ln41_35_fu_5056_p2 = (xor_ln41_26_fu_5015_p2.read() ^ xor_ln41_34_fu_5052_p2.read());
}
void make_hash::thread_xor_ln41_36_fu_5062_p2() {
xor_ln41_36_fu_5062_p2 = (xor_ln41_35_fu_5056_p2.read() ^ xor_ln41_33_fu_5047_p2.read());
}
void make_hash::thread_xor_ln41_37_fu_5068_p2() {
xor_ln41_37_fu_5068_p2 = (xor_ln41_36_fu_5062_p2.read() ^ xor_ln41_31_fu_5037_p2.read());
}
void make_hash::thread_xor_ln41_39_fu_5074_p2() {
xor_ln41_39_fu_5074_p2 = (grp_fu_341_p2.read() ^ trunc_ln41_3_fu_4898_p1.read());
}
void make_hash::thread_xor_ln41_3_fu_12301_p2() {
xor_ln41_3_fu_12301_p2 = (xor_ln68_56_reg_17209.read() ^ xor_ln816_36_reg_16802.read());
}
void make_hash::thread_xor_ln41_41_fu_5080_p2() {
xor_ln41_41_fu_5080_p2 = (grp_fu_347_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln41_42_fu_5086_p2() {
xor_ln41_42_fu_5086_p2 = (xor_ln41_41_fu_5080_p2.read() ^ xor_ln41_39_fu_5074_p2.read());
}
void make_hash::thread_xor_ln41_43_fu_5092_p2() {
xor_ln41_43_fu_5092_p2 = (grp_fu_317_p3.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln41_44_fu_5098_p2() {
xor_ln41_44_fu_5098_p2 = (xor_ln41_43_fu_5092_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln41_45_fu_5104_p2() {
xor_ln41_45_fu_5104_p2 = (grp_fu_325_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln41_47_fu_5110_p2() {
xor_ln41_47_fu_5110_p2 = (grp_fu_353_p2.read() ^ xor_ln41_45_fu_5104_p2.read());
}
void make_hash::thread_xor_ln41_48_fu_5116_p2() {
xor_ln41_48_fu_5116_p2 = (xor_ln41_47_fu_5110_p2.read() ^ xor_ln41_44_fu_5098_p2.read());
}
void make_hash::thread_xor_ln41_49_fu_5122_p2() {
xor_ln41_49_fu_5122_p2 = (xor_ln41_48_fu_5116_p2.read() ^ xor_ln41_42_fu_5086_p2.read());
}
void make_hash::thread_xor_ln41_4_fu_1005_p2() {
xor_ln41_4_fu_1005_p2 = (tmp_26_fu_955_p3.read() ^ tmp_3_fu_737_p3.read());
}
void make_hash::thread_xor_ln41_50_fu_5128_p2() {
xor_ln41_50_fu_5128_p2 = (xor_ln41_49_fu_5122_p2.read() ^ xor_ln41_37_fu_5068_p2.read());
}
void make_hash::thread_xor_ln41_51_fu_8669_p2() {
xor_ln41_51_fu_8669_p2 = (xor_ln68_37_reg_16713.read() ^ xor_ln816_18_reg_16306.read());
}
void make_hash::thread_xor_ln41_52_fu_8673_p2() {
xor_ln41_52_fu_8673_p2 = (xor_ln41_50_reg_16312.read() ^ xor_ln47_45_reg_16380.read());
}
void make_hash::thread_xor_ln41_53_fu_8677_p2() {
xor_ln41_53_fu_8677_p2 = (xor_ln41_52_fu_8673_p2.read() ^ xor_ln46_45_reg_16366.read());
}
void make_hash::thread_xor_ln41_54_fu_8682_p2() {
xor_ln41_54_fu_8682_p2 = (xor_ln51_45_reg_16449.read() ^ xor_ln52_37_reg_16466.read());
}
void make_hash::thread_xor_ln41_55_fu_8686_p2() {
xor_ln41_55_fu_8686_p2 = (xor_ln41_54_fu_8682_p2.read() ^ xor_ln49_37_reg_16414.read());
}
void make_hash::thread_xor_ln41_56_fu_8691_p2() {
xor_ln41_56_fu_8691_p2 = (xor_ln41_55_fu_8686_p2.read() ^ xor_ln41_53_fu_8677_p2.read());
}
void make_hash::thread_xor_ln41_57_fu_8697_p2() {
xor_ln41_57_fu_8697_p2 = (xor_ln56_41_reg_16524.read() ^ xor_ln816_27_reg_16542.read());
}
void make_hash::thread_xor_ln41_58_fu_8701_p2() {
xor_ln41_58_fu_8701_p2 = (xor_ln41_57_fu_8697_p2.read() ^ xor_ln816_26_reg_16489.read());
}
void make_hash::thread_xor_ln41_59_fu_8706_p2() {
xor_ln41_59_fu_8706_p2 = (xor_ln64_33_reg_16645.read() ^ xor_ln67_37_reg_16699.read());
}
void make_hash::thread_xor_ln41_5_fu_1011_p2() {
xor_ln41_5_fu_1011_p2 = (xor_ln41_4_fu_1005_p2.read() ^ tmp_1_fu_721_p3.read());
}
void make_hash::thread_xor_ln41_60_fu_8710_p2() {
xor_ln41_60_fu_8710_p2 = (xor_ln41_51_fu_8669_p2.read() ^ xor_ln41_59_fu_8706_p2.read());
}
void make_hash::thread_xor_ln41_61_fu_8716_p2() {
xor_ln41_61_fu_8716_p2 = (xor_ln41_60_fu_8710_p2.read() ^ xor_ln41_58_fu_8701_p2.read());
}
void make_hash::thread_xor_ln41_62_fu_8722_p2() {
xor_ln41_62_fu_8722_p2 = (xor_ln41_61_fu_8716_p2.read() ^ xor_ln41_56_fu_8691_p2.read());
}
void make_hash::thread_xor_ln41_64_fu_8728_p2() {
xor_ln41_64_fu_8728_p2 = (grp_fu_341_p2.read() ^ trunc_ln41_5_fu_8552_p1.read());
}
void make_hash::thread_xor_ln41_66_fu_8734_p2() {
xor_ln41_66_fu_8734_p2 = (grp_fu_347_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln41_67_fu_8740_p2() {
xor_ln41_67_fu_8740_p2 = (xor_ln41_66_fu_8734_p2.read() ^ xor_ln41_64_fu_8728_p2.read());
}
void make_hash::thread_xor_ln41_68_fu_8746_p2() {
xor_ln41_68_fu_8746_p2 = (grp_fu_317_p3.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln41_69_fu_8752_p2() {
xor_ln41_69_fu_8752_p2 = (xor_ln41_68_fu_8746_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln41_6_fu_1017_p2() {
xor_ln41_6_fu_1017_p2 = (xor_ln41_5_fu_1011_p2.read() ^ xor_ln41_2_fu_999_p2.read());
}
void make_hash::thread_xor_ln41_70_fu_8758_p2() {
xor_ln41_70_fu_8758_p2 = (grp_fu_325_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln41_72_fu_8764_p2() {
xor_ln41_72_fu_8764_p2 = (grp_fu_353_p2.read() ^ xor_ln41_70_fu_8758_p2.read());
}
void make_hash::thread_xor_ln41_73_fu_8770_p2() {
xor_ln41_73_fu_8770_p2 = (xor_ln41_72_fu_8764_p2.read() ^ xor_ln41_69_fu_8752_p2.read());
}
void make_hash::thread_xor_ln41_74_fu_8776_p2() {
xor_ln41_74_fu_8776_p2 = (xor_ln41_73_fu_8770_p2.read() ^ xor_ln41_67_fu_8740_p2.read());
}
void make_hash::thread_xor_ln41_75_fu_8782_p2() {
xor_ln41_75_fu_8782_p2 = (xor_ln41_74_fu_8776_p2.read() ^ xor_ln41_62_fu_8722_p2.read());
}
void make_hash::thread_xor_ln41_76_fu_12305_p2() {
xor_ln41_76_fu_12305_p2 = (xor_ln41_75_reg_16808.read() ^ xor_ln47_68_reg_16876.read());
}
void make_hash::thread_xor_ln41_77_fu_12309_p2() {
xor_ln41_77_fu_12309_p2 = (xor_ln41_76_fu_12305_p2.read() ^ xor_ln46_68_reg_16862.read());
}
void make_hash::thread_xor_ln41_78_fu_12314_p2() {
xor_ln41_78_fu_12314_p2 = (xor_ln51_68_reg_16945.read() ^ xor_ln52_56_reg_16962.read());
}
void make_hash::thread_xor_ln41_79_fu_12318_p2() {
xor_ln41_79_fu_12318_p2 = (xor_ln41_78_fu_12314_p2.read() ^ xor_ln49_56_reg_16910.read());
}
void make_hash::thread_xor_ln41_7_fu_1023_p2() {
xor_ln41_7_fu_1023_p2 = (tmp_4_fu_745_p3.read() ^ tmp_28_fu_971_p3.read());
}
void make_hash::thread_xor_ln41_80_fu_12323_p2() {
xor_ln41_80_fu_12323_p2 = (xor_ln41_79_fu_12318_p2.read() ^ xor_ln41_77_fu_12309_p2.read());
}
void make_hash::thread_xor_ln41_81_fu_12329_p2() {
xor_ln41_81_fu_12329_p2 = (xor_ln56_62_reg_17020.read() ^ xor_ln816_45_reg_17038.read());
}
void make_hash::thread_xor_ln41_82_fu_12333_p2() {
xor_ln41_82_fu_12333_p2 = (xor_ln41_81_fu_12329_p2.read() ^ xor_ln816_44_reg_16985.read());
}
void make_hash::thread_xor_ln41_83_fu_12338_p2() {
xor_ln41_83_fu_12338_p2 = (xor_ln64_50_reg_17141.read() ^ xor_ln67_56_reg_17195.read());
}
void make_hash::thread_xor_ln41_84_fu_12342_p2() {
xor_ln41_84_fu_12342_p2 = (xor_ln41_3_fu_12301_p2.read() ^ xor_ln41_83_fu_12338_p2.read());
}
void make_hash::thread_xor_ln41_85_fu_12348_p2() {
xor_ln41_85_fu_12348_p2 = (xor_ln41_84_fu_12342_p2.read() ^ xor_ln41_82_fu_12333_p2.read());
}
void make_hash::thread_xor_ln41_86_fu_12354_p2() {
xor_ln41_86_fu_12354_p2 = (xor_ln41_85_fu_12348_p2.read() ^ xor_ln41_80_fu_12323_p2.read());
}
void make_hash::thread_xor_ln41_88_fu_12360_p2() {
xor_ln41_88_fu_12360_p2 = (grp_fu_341_p2.read() ^ trunc_ln41_7_fu_12184_p1.read());
}
void make_hash::thread_xor_ln41_8_fu_1029_p2() {
xor_ln41_8_fu_1029_p2 = (xor_ln41_7_fu_1023_p2.read() ^ tmp_27_fu_963_p3.read());
}
void make_hash::thread_xor_ln41_90_fu_12366_p2() {
xor_ln41_90_fu_12366_p2 = (grp_fu_347_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln41_91_fu_12372_p2() {
xor_ln41_91_fu_12372_p2 = (xor_ln41_90_fu_12366_p2.read() ^ xor_ln41_88_fu_12360_p2.read());
}
void make_hash::thread_xor_ln41_92_fu_12378_p2() {
xor_ln41_92_fu_12378_p2 = (grp_fu_317_p3.read() ^ grp_fu_205_p3.read());
}
void make_hash::thread_xor_ln41_93_fu_12384_p2() {
xor_ln41_93_fu_12384_p2 = (xor_ln41_92_fu_12378_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln41_94_fu_12390_p2() {
xor_ln41_94_fu_12390_p2 = (grp_fu_325_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln41_96_fu_12396_p2() {
xor_ln41_96_fu_12396_p2 = (grp_fu_353_p2.read() ^ xor_ln41_94_fu_12390_p2.read());
}
void make_hash::thread_xor_ln41_97_fu_12402_p2() {
xor_ln41_97_fu_12402_p2 = (xor_ln41_96_fu_12396_p2.read() ^ xor_ln41_93_fu_12384_p2.read());
}
void make_hash::thread_xor_ln41_98_fu_12408_p2() {
xor_ln41_98_fu_12408_p2 = (xor_ln41_97_fu_12402_p2.read() ^ xor_ln41_91_fu_12372_p2.read());
}
void make_hash::thread_xor_ln41_99_fu_12414_p2() {
xor_ln41_99_fu_12414_p2 = (xor_ln41_98_fu_12408_p2.read() ^ xor_ln41_86_fu_12354_p2.read());
}
void make_hash::thread_xor_ln41_9_fu_1035_p2() {
xor_ln41_9_fu_1035_p2 = (tmp_5_fu_753_p3.read() ^ tmp_29_fu_979_p3.read());
}
void make_hash::thread_xor_ln41_fu_987_p2() {
xor_ln41_fu_987_p2 = (tmp_8_fu_777_p3.read() ^ trunc_ln32_fu_801_p1.read());
}
void make_hash::thread_xor_ln42_101_fu_12504_p2() {
xor_ln42_101_fu_12504_p2 = (grp_fu_391_p2.read() ^ xor_ln42_99_fu_12498_p2.read());
}
void make_hash::thread_xor_ln42_102_fu_12510_p2() {
xor_ln42_102_fu_12510_p2 = (xor_ln42_101_fu_12504_p2.read() ^ xor_ln42_98_fu_12492_p2.read());
}
void make_hash::thread_xor_ln42_105_fu_12516_p2() {
xor_ln42_105_fu_12516_p2 = (grp_fu_403_p2.read() ^ grp_fu_397_p2.read());
}
void make_hash::thread_xor_ln42_106_fu_12522_p2() {
xor_ln42_106_fu_12522_p2 = (grp_fu_325_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln42_107_fu_12528_p2() {
xor_ln42_107_fu_12528_p2 = (grp_fu_229_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_xor_ln42_108_fu_12534_p2() {
xor_ln42_108_fu_12534_p2 = (xor_ln42_107_fu_12528_p2.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln42_109_fu_12540_p2() {
xor_ln42_109_fu_12540_p2 = (xor_ln42_108_fu_12534_p2.read() ^ xor_ln42_106_fu_12522_p2.read());
}
void make_hash::thread_xor_ln42_10_fu_1211_p2() {
xor_ln42_10_fu_1211_p2 = (xor_ln42_9_fu_1205_p2.read() ^ xor_ln42_6_fu_1187_p2.read());
}
void make_hash::thread_xor_ln42_110_fu_12546_p2() {
xor_ln42_110_fu_12546_p2 = (xor_ln42_109_fu_12540_p2.read() ^ xor_ln42_105_fu_12516_p2.read());
}
void make_hash::thread_xor_ln42_111_fu_12552_p2() {
xor_ln42_111_fu_12552_p2 = (xor_ln42_110_fu_12546_p2.read() ^ xor_ln42_102_fu_12510_p2.read());
}
void make_hash::thread_xor_ln42_11_fu_1217_p2() {
xor_ln42_11_fu_1217_p2 = (xor_ln42_10_fu_1211_p2.read() ^ xor_ln42_5_fu_1181_p2.read());
}
void make_hash::thread_xor_ln42_12_fu_1223_p2() {
xor_ln42_12_fu_1223_p2 = (xor_ln42_11_fu_1217_p2.read() ^ tmp_11_fu_871_p3.read());
}
void make_hash::thread_xor_ln42_13_fu_1229_p2() {
xor_ln42_13_fu_1229_p2 = (trunc_ln41_fu_705_p1.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln42_14_fu_1235_p2() {
xor_ln42_14_fu_1235_p2 = (xor_ln42_13_fu_1229_p2.read() ^ xor_ln42_12_fu_1223_p2.read());
}
void make_hash::thread_xor_ln42_15_fu_1241_p2() {
xor_ln42_15_fu_1241_p2 = (grp_fu_359_p3.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln42_17_fu_1247_p2() {
xor_ln42_17_fu_1247_p2 = (grp_fu_391_p2.read() ^ xor_ln42_15_fu_1241_p2.read());
}
void make_hash::thread_xor_ln42_18_fu_1253_p2() {
xor_ln42_18_fu_1253_p2 = (xor_ln42_17_fu_1247_p2.read() ^ xor_ln42_14_fu_1235_p2.read());
}
void make_hash::thread_xor_ln42_1_fu_1157_p2() {
xor_ln42_1_fu_1157_p2 = (tmp_fu_713_p3.read() ^ tmp_25_fu_947_p3.read());
}
void make_hash::thread_xor_ln42_21_fu_1259_p2() {
xor_ln42_21_fu_1259_p2 = (grp_fu_403_p2.read() ^ grp_fu_397_p2.read());
}
void make_hash::thread_xor_ln42_22_fu_1265_p2() {
xor_ln42_22_fu_1265_p2 = (grp_fu_325_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln42_23_fu_1271_p2() {
xor_ln42_23_fu_1271_p2 = (grp_fu_229_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_xor_ln42_24_fu_1277_p2() {
xor_ln42_24_fu_1277_p2 = (xor_ln42_23_fu_1271_p2.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln42_25_fu_1283_p2() {
xor_ln42_25_fu_1283_p2 = (xor_ln42_24_fu_1277_p2.read() ^ xor_ln42_22_fu_1265_p2.read());
}
void make_hash::thread_xor_ln42_26_fu_1289_p2() {
xor_ln42_26_fu_1289_p2 = (xor_ln42_25_fu_1283_p2.read() ^ xor_ln42_21_fu_1259_p2.read());
}
void make_hash::thread_xor_ln42_27_fu_1295_p2() {
xor_ln42_27_fu_1295_p2 = (xor_ln42_26_fu_1289_p2.read() ^ xor_ln42_18_fu_1253_p2.read());
}
void make_hash::thread_xor_ln42_28_fu_5134_p2() {
xor_ln42_28_fu_5134_p2 = (xor_ln816_1_reg_15834.read() ^ xor_ln41_25_reg_15825.read());
}
void make_hash::thread_xor_ln42_29_fu_5138_p2() {
xor_ln42_29_fu_5138_p2 = (xor_ln46_22_reg_15879.read() ^ xor_ln47_22_reg_15893.read());
}
void make_hash::thread_xor_ln42_2_fu_1163_p2() {
xor_ln42_2_fu_1163_p2 = (xor_ln42_1_fu_1157_p2.read() ^ xor_ln42_fu_1151_p2.read());
}
void make_hash::thread_xor_ln42_30_fu_5142_p2() {
xor_ln42_30_fu_5142_p2 = (xor_ln42_29_fu_5138_p2.read() ^ xor_ln42_28_fu_5134_p2.read());
}
void make_hash::thread_xor_ln42_31_fu_5148_p2() {
xor_ln42_31_fu_5148_p2 = (xor_ln49_18_reg_15927.read() ^ xor_ln816_8_reg_16002.read());
}
void make_hash::thread_xor_ln42_32_fu_5152_p2() {
xor_ln42_32_fu_5152_p2 = (xor_ln42_31_fu_5148_p2.read() ^ xor_ln816_4_reg_15914.read());
}
void make_hash::thread_xor_ln42_33_fu_5157_p2() {
xor_ln42_33_fu_5157_p2 = (xor_ln42_32_fu_5152_p2.read() ^ xor_ln42_30_fu_5142_p2.read());
}
void make_hash::thread_xor_ln42_34_fu_5163_p2() {
xor_ln42_34_fu_5163_p2 = (xor_ln41_32_fu_5043_p2.read() ^ xor_ln54_20_reg_16011.read());
}
void make_hash::thread_xor_ln42_35_fu_5168_p2() {
xor_ln42_35_fu_5168_p2 = (xor_ln816_10_reg_16071.read() ^ xor_ln64_16_reg_16158.read());
}
void make_hash::thread_xor_ln42_36_fu_5172_p2() {
xor_ln42_36_fu_5172_p2 = (xor_ln816_15_reg_16198.read() ^ xor_ln40_24_fu_4902_p2.read());
}
void make_hash::thread_xor_ln42_37_fu_5177_p2() {
xor_ln42_37_fu_5177_p2 = (xor_ln42_36_fu_5172_p2.read() ^ xor_ln42_35_fu_5168_p2.read());
}
void make_hash::thread_xor_ln42_38_fu_5183_p2() {
xor_ln42_38_fu_5183_p2 = (xor_ln42_37_fu_5177_p2.read() ^ xor_ln42_34_fu_5163_p2.read());
}
void make_hash::thread_xor_ln42_39_fu_5189_p2() {
xor_ln42_39_fu_5189_p2 = (xor_ln42_38_fu_5183_p2.read() ^ xor_ln42_33_fu_5157_p2.read());
}
void make_hash::thread_xor_ln42_3_fu_1169_p2() {
xor_ln42_3_fu_1169_p2 = (tmp_1_fu_721_p3.read() ^ tmp_27_fu_963_p3.read());
}
void make_hash::thread_xor_ln42_40_fu_5195_p2() {
xor_ln42_40_fu_5195_p2 = (xor_ln42_39_fu_5189_p2.read() ^ xor_ln816_17_reg_16263.read());
}
void make_hash::thread_xor_ln42_41_fu_5200_p2() {
xor_ln42_41_fu_5200_p2 = (trunc_ln41_2_fu_4894_p1.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln42_42_fu_5206_p2() {
xor_ln42_42_fu_5206_p2 = (xor_ln42_41_fu_5200_p2.read() ^ xor_ln42_40_fu_5195_p2.read());
}
void make_hash::thread_xor_ln42_43_fu_5212_p2() {
xor_ln42_43_fu_5212_p2 = (grp_fu_359_p3.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln42_45_fu_5218_p2() {
xor_ln42_45_fu_5218_p2 = (grp_fu_391_p2.read() ^ xor_ln42_43_fu_5212_p2.read());
}
void make_hash::thread_xor_ln42_46_fu_5224_p2() {
xor_ln42_46_fu_5224_p2 = (xor_ln42_45_fu_5218_p2.read() ^ xor_ln42_42_fu_5206_p2.read());
}
void make_hash::thread_xor_ln42_49_fu_5230_p2() {
xor_ln42_49_fu_5230_p2 = (grp_fu_403_p2.read() ^ grp_fu_397_p2.read());
}
void make_hash::thread_xor_ln42_4_fu_1175_p2() {
xor_ln42_4_fu_1175_p2 = (xor_ln42_3_fu_1169_p2.read() ^ tmp_37_fu_1127_p3.read());
}
void make_hash::thread_xor_ln42_50_fu_5236_p2() {
xor_ln42_50_fu_5236_p2 = (grp_fu_325_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln42_51_fu_5242_p2() {
xor_ln42_51_fu_5242_p2 = (grp_fu_229_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_xor_ln42_52_fu_5248_p2() {
xor_ln42_52_fu_5248_p2 = (xor_ln42_51_fu_5242_p2.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln42_53_fu_5254_p2() {
xor_ln42_53_fu_5254_p2 = (xor_ln42_52_fu_5248_p2.read() ^ xor_ln42_50_fu_5236_p2.read());
}
void make_hash::thread_xor_ln42_54_fu_5260_p2() {
xor_ln42_54_fu_5260_p2 = (xor_ln42_53_fu_5254_p2.read() ^ xor_ln42_49_fu_5230_p2.read());
}
void make_hash::thread_xor_ln42_55_fu_5266_p2() {
xor_ln42_55_fu_5266_p2 = (xor_ln42_54_fu_5260_p2.read() ^ xor_ln42_46_fu_5224_p2.read());
}
void make_hash::thread_xor_ln42_56_fu_8788_p2() {
xor_ln42_56_fu_8788_p2 = (xor_ln816_19_reg_16321.read() ^ xor_ln41_50_reg_16312.read());
}
void make_hash::thread_xor_ln42_57_fu_8792_p2() {
xor_ln42_57_fu_8792_p2 = (xor_ln46_45_reg_16366.read() ^ xor_ln47_45_reg_16380.read());
}
void make_hash::thread_xor_ln42_58_fu_8796_p2() {
xor_ln42_58_fu_8796_p2 = (xor_ln42_57_fu_8792_p2.read() ^ xor_ln42_56_fu_8788_p2.read());
}
void make_hash::thread_xor_ln42_59_fu_8802_p2() {
xor_ln42_59_fu_8802_p2 = (xor_ln49_37_reg_16414.read() ^ xor_ln816_26_reg_16489.read());
}
void make_hash::thread_xor_ln42_5_fu_1181_p2() {
xor_ln42_5_fu_1181_p2 = (xor_ln42_4_fu_1175_p2.read() ^ xor_ln42_2_fu_1163_p2.read());
}
void make_hash::thread_xor_ln42_60_fu_8806_p2() {
xor_ln42_60_fu_8806_p2 = (xor_ln42_59_fu_8802_p2.read() ^ xor_ln816_22_reg_16401.read());
}
void make_hash::thread_xor_ln42_61_fu_8811_p2() {
xor_ln42_61_fu_8811_p2 = (xor_ln42_60_fu_8806_p2.read() ^ xor_ln42_58_fu_8796_p2.read());
}
void make_hash::thread_xor_ln42_62_fu_8817_p2() {
xor_ln42_62_fu_8817_p2 = (xor_ln41_57_fu_8697_p2.read() ^ xor_ln54_41_reg_16498.read());
}
void make_hash::thread_xor_ln42_63_fu_8822_p2() {
xor_ln42_63_fu_8822_p2 = (xor_ln816_28_reg_16558.read() ^ xor_ln64_33_reg_16645.read());
}
void make_hash::thread_xor_ln42_64_fu_8826_p2() {
xor_ln42_64_fu_8826_p2 = (xor_ln816_33_reg_16685.read() ^ xor_ln40_48_fu_8556_p2.read());
}
void make_hash::thread_xor_ln42_65_fu_8831_p2() {
xor_ln42_65_fu_8831_p2 = (xor_ln42_64_fu_8826_p2.read() ^ xor_ln42_63_fu_8822_p2.read());
}
void make_hash::thread_xor_ln42_66_fu_8837_p2() {
xor_ln42_66_fu_8837_p2 = (xor_ln42_65_fu_8831_p2.read() ^ xor_ln42_62_fu_8817_p2.read());
}
void make_hash::thread_xor_ln42_67_fu_8843_p2() {
xor_ln42_67_fu_8843_p2 = (xor_ln42_66_fu_8837_p2.read() ^ xor_ln42_61_fu_8811_p2.read());
}
void make_hash::thread_xor_ln42_68_fu_8849_p2() {
xor_ln42_68_fu_8849_p2 = (xor_ln42_67_fu_8843_p2.read() ^ xor_ln816_35_reg_16750.read());
}
void make_hash::thread_xor_ln42_69_fu_8854_p2() {
xor_ln42_69_fu_8854_p2 = (trunc_ln41_4_fu_8548_p1.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln42_6_fu_1187_p2() {
xor_ln42_6_fu_1187_p2 = (xor_ln41_7_fu_1023_p2.read() ^ tmp_38_fu_1135_p3.read());
}
void make_hash::thread_xor_ln42_70_fu_8860_p2() {
xor_ln42_70_fu_8860_p2 = (xor_ln42_69_fu_8854_p2.read() ^ xor_ln42_68_fu_8849_p2.read());
}
void make_hash::thread_xor_ln42_71_fu_8866_p2() {
xor_ln42_71_fu_8866_p2 = (grp_fu_359_p3.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln42_73_fu_8872_p2() {
xor_ln42_73_fu_8872_p2 = (grp_fu_391_p2.read() ^ xor_ln42_71_fu_8866_p2.read());
}
void make_hash::thread_xor_ln42_74_fu_8878_p2() {
xor_ln42_74_fu_8878_p2 = (xor_ln42_73_fu_8872_p2.read() ^ xor_ln42_70_fu_8860_p2.read());
}
void make_hash::thread_xor_ln42_77_fu_8884_p2() {
xor_ln42_77_fu_8884_p2 = (grp_fu_403_p2.read() ^ grp_fu_397_p2.read());
}
void make_hash::thread_xor_ln42_78_fu_8890_p2() {
xor_ln42_78_fu_8890_p2 = (grp_fu_325_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln42_79_fu_8896_p2() {
xor_ln42_79_fu_8896_p2 = (grp_fu_229_p3.read() ^ grp_fu_253_p3.read());
}
void make_hash::thread_xor_ln42_7_fu_1193_p2() {
xor_ln42_7_fu_1193_p2 = (tmp_39_fu_1143_p3.read() ^ tmp_5_fu_753_p3.read());
}
void make_hash::thread_xor_ln42_80_fu_8902_p2() {
xor_ln42_80_fu_8902_p2 = (xor_ln42_79_fu_8896_p2.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln42_81_fu_8908_p2() {
xor_ln42_81_fu_8908_p2 = (xor_ln42_80_fu_8902_p2.read() ^ xor_ln42_78_fu_8890_p2.read());
}
void make_hash::thread_xor_ln42_82_fu_8914_p2() {
xor_ln42_82_fu_8914_p2 = (xor_ln42_81_fu_8908_p2.read() ^ xor_ln42_77_fu_8884_p2.read());
}
void make_hash::thread_xor_ln42_83_fu_8920_p2() {
xor_ln42_83_fu_8920_p2 = (xor_ln42_82_fu_8914_p2.read() ^ xor_ln42_74_fu_8878_p2.read());
}
void make_hash::thread_xor_ln42_84_fu_12420_p2() {
xor_ln42_84_fu_12420_p2 = (xor_ln816_37_reg_16817.read() ^ xor_ln41_75_reg_16808.read());
}
void make_hash::thread_xor_ln42_85_fu_12424_p2() {
xor_ln42_85_fu_12424_p2 = (xor_ln46_68_reg_16862.read() ^ xor_ln47_68_reg_16876.read());
}
void make_hash::thread_xor_ln42_86_fu_12428_p2() {
xor_ln42_86_fu_12428_p2 = (xor_ln42_85_fu_12424_p2.read() ^ xor_ln42_84_fu_12420_p2.read());
}
void make_hash::thread_xor_ln42_87_fu_12434_p2() {
xor_ln42_87_fu_12434_p2 = (xor_ln49_56_reg_16910.read() ^ xor_ln816_44_reg_16985.read());
}
void make_hash::thread_xor_ln42_88_fu_12438_p2() {
xor_ln42_88_fu_12438_p2 = (xor_ln42_87_fu_12434_p2.read() ^ xor_ln816_40_reg_16897.read());
}
void make_hash::thread_xor_ln42_89_fu_12443_p2() {
xor_ln42_89_fu_12443_p2 = (xor_ln42_88_fu_12438_p2.read() ^ xor_ln42_86_fu_12428_p2.read());
}
void make_hash::thread_xor_ln42_8_fu_1199_p2() {
xor_ln42_8_fu_1199_p2 = (tmp_7_fu_769_p3.read() ^ xor_ln40_fu_805_p2.read());
}
void make_hash::thread_xor_ln42_90_fu_12449_p2() {
xor_ln42_90_fu_12449_p2 = (xor_ln41_81_fu_12329_p2.read() ^ xor_ln54_62_reg_16994.read());
}
void make_hash::thread_xor_ln42_91_fu_12454_p2() {
xor_ln42_91_fu_12454_p2 = (xor_ln816_46_reg_17054.read() ^ xor_ln64_50_reg_17141.read());
}
void make_hash::thread_xor_ln42_92_fu_12458_p2() {
xor_ln42_92_fu_12458_p2 = (xor_ln816_51_reg_17181.read() ^ xor_ln40_72_fu_12188_p2.read());
}
void make_hash::thread_xor_ln42_93_fu_12463_p2() {
xor_ln42_93_fu_12463_p2 = (xor_ln42_92_fu_12458_p2.read() ^ xor_ln42_91_fu_12454_p2.read());
}
void make_hash::thread_xor_ln42_94_fu_12469_p2() {
xor_ln42_94_fu_12469_p2 = (xor_ln42_93_fu_12463_p2.read() ^ xor_ln42_90_fu_12449_p2.read());
}
void make_hash::thread_xor_ln42_95_fu_12475_p2() {
xor_ln42_95_fu_12475_p2 = (xor_ln42_94_fu_12469_p2.read() ^ xor_ln42_89_fu_12443_p2.read());
}
void make_hash::thread_xor_ln42_96_fu_12481_p2() {
xor_ln42_96_fu_12481_p2 = (xor_ln42_95_fu_12475_p2.read() ^ xor_ln816_53_reg_17247.read());
}
void make_hash::thread_xor_ln42_97_fu_12486_p2() {
xor_ln42_97_fu_12486_p2 = (trunc_ln41_6_fu_12180_p1.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln42_98_fu_12492_p2() {
xor_ln42_98_fu_12492_p2 = (xor_ln42_97_fu_12486_p2.read() ^ xor_ln42_96_fu_12481_p2.read());
}
void make_hash::thread_xor_ln42_99_fu_12498_p2() {
xor_ln42_99_fu_12498_p2 = (grp_fu_359_p3.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln42_9_fu_1205_p2() {
xor_ln42_9_fu_1205_p2 = (xor_ln42_8_fu_1199_p2.read() ^ xor_ln42_7_fu_1193_p2.read());
}
void make_hash::thread_xor_ln42_fu_1151_p2() {
xor_ln42_fu_1151_p2 = (tmp_36_fu_1119_p3.read() ^ tmp_24_fu_939_p3.read());
}
void make_hash::thread_xor_ln43_102_fu_12653_p2() {
xor_ln43_102_fu_12653_p2 = (grp_fu_451_p2.read() ^ grp_fu_445_p2.read());
}
void make_hash::thread_xor_ln43_104_fu_12659_p2() {
xor_ln43_104_fu_12659_p2 = (grp_fu_221_p3.read() ^ grp_fu_333_p3.read());
}
void make_hash::thread_xor_ln43_105_fu_12665_p2() {
xor_ln43_105_fu_12665_p2 = (xor_ln43_104_fu_12659_p2.read() ^ grp_fu_457_p2.read());
}
void make_hash::thread_xor_ln43_106_fu_12671_p2() {
xor_ln43_106_fu_12671_p2 = (xor_ln43_105_fu_12665_p2.read() ^ xor_ln43_102_fu_12653_p2.read());
}
void make_hash::thread_xor_ln43_107_fu_12677_p2() {
xor_ln43_107_fu_12677_p2 = (xor_ln43_106_fu_12671_p2.read() ^ xor_ln43_99_fu_12647_p2.read());
}
void make_hash::thread_xor_ln43_10_fu_1391_p2() {
xor_ln43_10_fu_1391_p2 = (xor_ln43_9_fu_1385_p2.read() ^ xor_ln43_7_fu_1373_p2.read());
}
void make_hash::thread_xor_ln43_11_fu_1397_p2() {
xor_ln43_11_fu_1397_p2 = (xor_ln43_10_fu_1391_p2.read() ^ xor_ln43_5_fu_1361_p2.read());
}
void make_hash::thread_xor_ln43_12_fu_1403_p2() {
xor_ln43_12_fu_1403_p2 = (xor_ln43_11_fu_1397_p2.read() ^ tmp_11_fu_871_p3.read());
}
void make_hash::thread_xor_ln43_14_fu_1409_p2() {
xor_ln43_14_fu_1409_p2 = (grp_fu_433_p2.read() ^ xor_ln43_12_fu_1403_p2.read());
}
void make_hash::thread_xor_ln43_15_fu_1415_p2() {
xor_ln43_15_fu_1415_p2 = (grp_fu_409_p3.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln43_17_fu_1421_p2() {
xor_ln43_17_fu_1421_p2 = (grp_fu_439_p2.read() ^ xor_ln43_15_fu_1415_p2.read());
}
void make_hash::thread_xor_ln43_18_fu_1427_p2() {
xor_ln43_18_fu_1427_p2 = (xor_ln43_17_fu_1421_p2.read() ^ xor_ln43_14_fu_1409_p2.read());
}
void make_hash::thread_xor_ln43_1_fu_1337_p2() {
xor_ln43_1_fu_1337_p2 = (tmp_25_fu_947_p3.read() ^ tmp_37_fu_1127_p3.read());
}
void make_hash::thread_xor_ln43_21_fu_1433_p2() {
xor_ln43_21_fu_1433_p2 = (grp_fu_451_p2.read() ^ grp_fu_445_p2.read());
}
void make_hash::thread_xor_ln43_23_fu_1439_p2() {
xor_ln43_23_fu_1439_p2 = (grp_fu_221_p3.read() ^ grp_fu_333_p3.read());
}
void make_hash::thread_xor_ln43_24_fu_1445_p2() {
xor_ln43_24_fu_1445_p2 = (xor_ln43_23_fu_1439_p2.read() ^ grp_fu_457_p2.read());
}
void make_hash::thread_xor_ln43_25_fu_1451_p2() {
xor_ln43_25_fu_1451_p2 = (xor_ln43_24_fu_1445_p2.read() ^ xor_ln43_21_fu_1433_p2.read());
}
void make_hash::thread_xor_ln43_26_fu_1457_p2() {
xor_ln43_26_fu_1457_p2 = (xor_ln43_25_fu_1451_p2.read() ^ xor_ln43_18_fu_1427_p2.read());
}
void make_hash::thread_xor_ln43_27_fu_5278_p2() {
xor_ln43_27_fu_5278_p2 = (xor_ln42_28_fu_5134_p2.read() ^ xor_ln816_2_reg_15841.read());
}
void make_hash::thread_xor_ln43_28_fu_5283_p2() {
xor_ln43_28_fu_5283_p2 = (xor_ln47_22_reg_15893.read() ^ xor_ln816_4_reg_15914.read());
}
void make_hash::thread_xor_ln43_29_fu_5287_p2() {
xor_ln43_29_fu_5287_p2 = (xor_ln43_28_fu_5283_p2.read() ^ xor_ln43_27_fu_5278_p2.read());
}
void make_hash::thread_xor_ln43_2_fu_1343_p2() {
xor_ln43_2_fu_1343_p2 = (xor_ln43_1_fu_1337_p2.read() ^ xor_ln43_fu_1331_p2.read());
}
void make_hash::thread_xor_ln43_30_fu_5293_p2() {
xor_ln43_30_fu_5293_p2 = (xor_ln816_5_reg_15950.read() ^ xor_ln54_20_reg_16011.read());
}
void make_hash::thread_xor_ln43_31_fu_5297_p2() {
xor_ln43_31_fu_5297_p2 = (xor_ln43_30_fu_5293_p2.read() ^ xor_ln49_18_reg_15927.read());
}
void make_hash::thread_xor_ln43_32_fu_5302_p2() {
xor_ln43_32_fu_5302_p2 = (xor_ln43_31_fu_5297_p2.read() ^ xor_ln43_29_fu_5287_p2.read());
}
void make_hash::thread_xor_ln43_33_fu_5308_p2() {
xor_ln43_33_fu_5308_p2 = (xor_ln57_19_reg_16048.read() ^ xor_ln58_20_reg_16065.read());
}
void make_hash::thread_xor_ln43_34_fu_5312_p2() {
xor_ln43_34_fu_5312_p2 = (xor_ln43_33_fu_5308_p2.read() ^ xor_ln55_20_reg_16024.read());
}
void make_hash::thread_xor_ln43_35_fu_5317_p2() {
xor_ln43_35_fu_5317_p2 = (xor_ln67_18_reg_16212.read() ^ xor_ln816_14_reg_16180.read());
}
void make_hash::thread_xor_ln43_36_fu_5321_p2() {
xor_ln43_36_fu_5321_p2 = (xor_ln43_35_fu_5317_p2.read() ^ xor_ln59_19_reg_16081.read());
}
void make_hash::thread_xor_ln43_37_fu_5326_p2() {
xor_ln43_37_fu_5326_p2 = (xor_ln43_36_fu_5321_p2.read() ^ xor_ln43_34_fu_5312_p2.read());
}
void make_hash::thread_xor_ln43_38_fu_5332_p2() {
xor_ln43_38_fu_5332_p2 = (xor_ln43_37_fu_5326_p2.read() ^ xor_ln43_32_fu_5302_p2.read());
}
void make_hash::thread_xor_ln43_39_fu_5338_p2() {
xor_ln43_39_fu_5338_p2 = (xor_ln43_38_fu_5332_p2.read() ^ xor_ln816_17_reg_16263.read());
}
void make_hash::thread_xor_ln43_3_fu_1349_p2() {
xor_ln43_3_fu_1349_p2 = (tmp_2_fu_729_p3.read() ^ tmp_38_fu_1135_p3.read());
}
void make_hash::thread_xor_ln43_41_fu_5343_p2() {
xor_ln43_41_fu_5343_p2 = (grp_fu_433_p2.read() ^ xor_ln43_39_fu_5338_p2.read());
}
void make_hash::thread_xor_ln43_42_fu_5349_p2() {
xor_ln43_42_fu_5349_p2 = (grp_fu_409_p3.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln43_44_fu_5355_p2() {
xor_ln43_44_fu_5355_p2 = (grp_fu_439_p2.read() ^ xor_ln43_42_fu_5349_p2.read());
}
void make_hash::thread_xor_ln43_45_fu_5361_p2() {
xor_ln43_45_fu_5361_p2 = (xor_ln43_44_fu_5355_p2.read() ^ xor_ln43_41_fu_5343_p2.read());
}
void make_hash::thread_xor_ln43_48_fu_5367_p2() {
xor_ln43_48_fu_5367_p2 = (grp_fu_451_p2.read() ^ grp_fu_445_p2.read());
}
void make_hash::thread_xor_ln43_4_fu_1355_p2() {
xor_ln43_4_fu_1355_p2 = (xor_ln43_3_fu_1349_p2.read() ^ tmp_1_fu_721_p3.read());
}
void make_hash::thread_xor_ln43_50_fu_5373_p2() {
xor_ln43_50_fu_5373_p2 = (grp_fu_221_p3.read() ^ grp_fu_333_p3.read());
}
void make_hash::thread_xor_ln43_51_fu_5379_p2() {
xor_ln43_51_fu_5379_p2 = (xor_ln43_50_fu_5373_p2.read() ^ grp_fu_457_p2.read());
}
void make_hash::thread_xor_ln43_52_fu_5385_p2() {
xor_ln43_52_fu_5385_p2 = (xor_ln43_51_fu_5379_p2.read() ^ xor_ln43_48_fu_5367_p2.read());
}
void make_hash::thread_xor_ln43_53_fu_5391_p2() {
xor_ln43_53_fu_5391_p2 = (xor_ln43_52_fu_5385_p2.read() ^ xor_ln43_45_fu_5361_p2.read());
}
void make_hash::thread_xor_ln43_54_fu_8932_p2() {
xor_ln43_54_fu_8932_p2 = (xor_ln42_56_fu_8788_p2.read() ^ xor_ln816_20_reg_16328.read());
}
void make_hash::thread_xor_ln43_55_fu_8937_p2() {
xor_ln43_55_fu_8937_p2 = (xor_ln47_45_reg_16380.read() ^ xor_ln816_22_reg_16401.read());
}
void make_hash::thread_xor_ln43_56_fu_8941_p2() {
xor_ln43_56_fu_8941_p2 = (xor_ln43_55_fu_8937_p2.read() ^ xor_ln43_54_fu_8932_p2.read());
}
void make_hash::thread_xor_ln43_57_fu_8947_p2() {
xor_ln43_57_fu_8947_p2 = (xor_ln816_23_reg_16437.read() ^ xor_ln54_41_reg_16498.read());
}
void make_hash::thread_xor_ln43_58_fu_8951_p2() {
xor_ln43_58_fu_8951_p2 = (xor_ln43_57_fu_8947_p2.read() ^ xor_ln49_37_reg_16414.read());
}
void make_hash::thread_xor_ln43_59_fu_8956_p2() {
xor_ln43_59_fu_8956_p2 = (xor_ln43_58_fu_8951_p2.read() ^ xor_ln43_56_fu_8941_p2.read());
}
void make_hash::thread_xor_ln43_5_fu_1361_p2() {
xor_ln43_5_fu_1361_p2 = (xor_ln43_4_fu_1355_p2.read() ^ xor_ln43_2_fu_1343_p2.read());
}
void make_hash::thread_xor_ln43_60_fu_8962_p2() {
xor_ln43_60_fu_8962_p2 = (xor_ln57_39_reg_16535.read() ^ xor_ln58_41_reg_16552.read());
}
void make_hash::thread_xor_ln43_61_fu_8966_p2() {
xor_ln43_61_fu_8966_p2 = (xor_ln43_60_fu_8962_p2.read() ^ xor_ln55_41_reg_16511.read());
}
void make_hash::thread_xor_ln43_62_fu_8971_p2() {
xor_ln43_62_fu_8971_p2 = (xor_ln67_37_reg_16699.read() ^ xor_ln816_32_reg_16667.read());
}
void make_hash::thread_xor_ln43_63_fu_8975_p2() {
xor_ln43_63_fu_8975_p2 = (xor_ln43_62_fu_8971_p2.read() ^ xor_ln59_39_reg_16568.read());
}
void make_hash::thread_xor_ln43_64_fu_8980_p2() {
xor_ln43_64_fu_8980_p2 = (xor_ln43_63_fu_8975_p2.read() ^ xor_ln43_61_fu_8966_p2.read());
}
void make_hash::thread_xor_ln43_65_fu_8986_p2() {
xor_ln43_65_fu_8986_p2 = (xor_ln43_64_fu_8980_p2.read() ^ xor_ln43_59_fu_8956_p2.read());
}
void make_hash::thread_xor_ln43_66_fu_8992_p2() {
xor_ln43_66_fu_8992_p2 = (xor_ln43_65_fu_8986_p2.read() ^ xor_ln816_35_reg_16750.read());
}
void make_hash::thread_xor_ln43_68_fu_8997_p2() {
xor_ln43_68_fu_8997_p2 = (grp_fu_433_p2.read() ^ xor_ln43_66_fu_8992_p2.read());
}
void make_hash::thread_xor_ln43_69_fu_9003_p2() {
xor_ln43_69_fu_9003_p2 = (grp_fu_409_p3.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln43_6_fu_1367_p2() {
xor_ln43_6_fu_1367_p2 = (tmp_28_fu_971_p3.read() ^ tmp_39_fu_1143_p3.read());
}
void make_hash::thread_xor_ln43_71_fu_9009_p2() {
xor_ln43_71_fu_9009_p2 = (grp_fu_439_p2.read() ^ xor_ln43_69_fu_9003_p2.read());
}
void make_hash::thread_xor_ln43_72_fu_9015_p2() {
xor_ln43_72_fu_9015_p2 = (xor_ln43_71_fu_9009_p2.read() ^ xor_ln43_68_fu_8997_p2.read());
}
void make_hash::thread_xor_ln43_75_fu_9021_p2() {
xor_ln43_75_fu_9021_p2 = (grp_fu_451_p2.read() ^ grp_fu_445_p2.read());
}
void make_hash::thread_xor_ln43_77_fu_9027_p2() {
xor_ln43_77_fu_9027_p2 = (grp_fu_221_p3.read() ^ grp_fu_333_p3.read());
}
void make_hash::thread_xor_ln43_78_fu_9033_p2() {
xor_ln43_78_fu_9033_p2 = (xor_ln43_77_fu_9027_p2.read() ^ grp_fu_457_p2.read());
}
void make_hash::thread_xor_ln43_79_fu_9039_p2() {
xor_ln43_79_fu_9039_p2 = (xor_ln43_78_fu_9033_p2.read() ^ xor_ln43_75_fu_9021_p2.read());
}
void make_hash::thread_xor_ln43_7_fu_1373_p2() {
xor_ln43_7_fu_1373_p2 = (xor_ln43_6_fu_1367_p2.read() ^ tmp_45_fu_1315_p3.read());
}
void make_hash::thread_xor_ln43_80_fu_9045_p2() {
xor_ln43_80_fu_9045_p2 = (xor_ln43_79_fu_9039_p2.read() ^ xor_ln43_72_fu_9015_p2.read());
}
void make_hash::thread_xor_ln43_81_fu_12564_p2() {
xor_ln43_81_fu_12564_p2 = (xor_ln42_84_fu_12420_p2.read() ^ xor_ln816_38_reg_16824.read());
}
void make_hash::thread_xor_ln43_82_fu_12569_p2() {
xor_ln43_82_fu_12569_p2 = (xor_ln47_68_reg_16876.read() ^ xor_ln816_40_reg_16897.read());
}
void make_hash::thread_xor_ln43_83_fu_12573_p2() {
xor_ln43_83_fu_12573_p2 = (xor_ln43_82_fu_12569_p2.read() ^ xor_ln43_81_fu_12564_p2.read());
}
void make_hash::thread_xor_ln43_84_fu_12579_p2() {
xor_ln43_84_fu_12579_p2 = (xor_ln816_41_reg_16933.read() ^ xor_ln54_62_reg_16994.read());
}
void make_hash::thread_xor_ln43_85_fu_12583_p2() {
xor_ln43_85_fu_12583_p2 = (xor_ln43_84_fu_12579_p2.read() ^ xor_ln49_56_reg_16910.read());
}
void make_hash::thread_xor_ln43_86_fu_12588_p2() {
xor_ln43_86_fu_12588_p2 = (xor_ln43_85_fu_12583_p2.read() ^ xor_ln43_83_fu_12573_p2.read());
}
void make_hash::thread_xor_ln43_87_fu_12594_p2() {
xor_ln43_87_fu_12594_p2 = (xor_ln57_59_reg_17031.read() ^ xor_ln58_62_reg_17048.read());
}
void make_hash::thread_xor_ln43_88_fu_12598_p2() {
xor_ln43_88_fu_12598_p2 = (xor_ln43_87_fu_12594_p2.read() ^ xor_ln55_62_reg_17007.read());
}
void make_hash::thread_xor_ln43_89_fu_12603_p2() {
xor_ln43_89_fu_12603_p2 = (xor_ln67_56_reg_17195.read() ^ xor_ln816_50_reg_17163.read());
}
void make_hash::thread_xor_ln43_8_fu_1379_p2() {
xor_ln43_8_fu_1379_p2 = (tmp_29_fu_979_p3.read() ^ tmp_6_fu_761_p3.read());
}
void make_hash::thread_xor_ln43_90_fu_12607_p2() {
xor_ln43_90_fu_12607_p2 = (xor_ln43_89_fu_12603_p2.read() ^ xor_ln59_59_reg_17064.read());
}
void make_hash::thread_xor_ln43_91_fu_12612_p2() {
xor_ln43_91_fu_12612_p2 = (xor_ln43_90_fu_12607_p2.read() ^ xor_ln43_88_fu_12598_p2.read());
}
void make_hash::thread_xor_ln43_92_fu_12618_p2() {
xor_ln43_92_fu_12618_p2 = (xor_ln43_91_fu_12612_p2.read() ^ xor_ln43_86_fu_12588_p2.read());
}
void make_hash::thread_xor_ln43_93_fu_12624_p2() {
xor_ln43_93_fu_12624_p2 = (xor_ln43_92_fu_12618_p2.read() ^ xor_ln816_53_reg_17247.read());
}
void make_hash::thread_xor_ln43_95_fu_12629_p2() {
xor_ln43_95_fu_12629_p2 = (grp_fu_433_p2.read() ^ xor_ln43_93_fu_12624_p2.read());
}
void make_hash::thread_xor_ln43_96_fu_12635_p2() {
xor_ln43_96_fu_12635_p2 = (grp_fu_409_p3.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln43_98_fu_12641_p2() {
xor_ln43_98_fu_12641_p2 = (grp_fu_439_p2.read() ^ xor_ln43_96_fu_12635_p2.read());
}
void make_hash::thread_xor_ln43_99_fu_12647_p2() {
xor_ln43_99_fu_12647_p2 = (xor_ln43_98_fu_12641_p2.read() ^ xor_ln43_95_fu_12629_p2.read());
}
void make_hash::thread_xor_ln43_9_fu_1385_p2() {
xor_ln43_9_fu_1385_p2 = (xor_ln43_8_fu_1379_p2.read() ^ tmp_46_fu_1323_p3.read());
}
void make_hash::thread_xor_ln43_fu_1331_p2() {
xor_ln43_fu_1331_p2 = (xor_ln42_fu_1151_p2.read() ^ tmp_44_fu_1307_p3.read());
}
void make_hash::thread_xor_ln44_100_fu_12774_p2() {
xor_ln44_100_fu_12774_p2 = (xor_ln44_99_fu_12768_p2.read() ^ xor_ln44_95_fu_12756_p2.read());
}
void make_hash::thread_xor_ln44_101_fu_12780_p2() {
xor_ln44_101_fu_12780_p2 = (grp_fu_197_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln44_102_fu_12786_p2() {
xor_ln44_102_fu_12786_p2 = (grp_fu_457_p2.read() ^ xor_ln44_101_fu_12780_p2.read());
}
void make_hash::thread_xor_ln44_103_fu_12792_p2() {
xor_ln44_103_fu_12792_p2 = (grp_fu_471_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln44_104_fu_12798_p2() {
xor_ln44_104_fu_12798_p2 = (grp_fu_279_p2.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln44_105_fu_12804_p2() {
xor_ln44_105_fu_12804_p2 = (xor_ln44_104_fu_12798_p2.read() ^ xor_ln44_103_fu_12792_p2.read());
}
void make_hash::thread_xor_ln44_106_fu_12810_p2() {
xor_ln44_106_fu_12810_p2 = (xor_ln44_105_fu_12804_p2.read() ^ xor_ln44_102_fu_12786_p2.read());
}
void make_hash::thread_xor_ln44_107_fu_12816_p2() {
xor_ln44_107_fu_12816_p2 = (xor_ln44_106_fu_12810_p2.read() ^ xor_ln44_100_fu_12774_p2.read());
}
void make_hash::thread_xor_ln44_10_fu_1545_p2() {
xor_ln44_10_fu_1545_p2 = (xor_ln44_9_fu_1539_p2.read() ^ xor_ln44_6_fu_1521_p2.read());
}
void make_hash::thread_xor_ln44_11_fu_1551_p2() {
xor_ln44_11_fu_1551_p2 = (xor_ln44_10_fu_1545_p2.read() ^ xor_ln44_4_fu_1509_p2.read());
}
void make_hash::thread_xor_ln44_12_fu_1557_p2() {
xor_ln44_12_fu_1557_p2 = (xor_ln44_11_fu_1551_p2.read() ^ tmp_11_fu_871_p3.read());
}
void make_hash::thread_xor_ln44_13_fu_1563_p2() {
xor_ln44_13_fu_1563_p2 = (trunc_ln41_fu_705_p1.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln44_14_fu_1569_p2() {
xor_ln44_14_fu_1569_p2 = (xor_ln44_13_fu_1563_p2.read() ^ xor_ln44_12_fu_1557_p2.read());
}
void make_hash::thread_xor_ln44_17_fu_1575_p2() {
xor_ln44_17_fu_1575_p2 = (grp_fu_485_p2.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln44_18_fu_1581_p2() {
xor_ln44_18_fu_1581_p2 = (xor_ln44_17_fu_1575_p2.read() ^ grp_fu_479_p2.read());
}
void make_hash::thread_xor_ln44_19_fu_1587_p2() {
xor_ln44_19_fu_1587_p2 = (xor_ln44_18_fu_1581_p2.read() ^ xor_ln44_14_fu_1569_p2.read());
}
void make_hash::thread_xor_ln44_1_fu_1491_p2() {
xor_ln44_1_fu_1491_p2 = (tmp_50_fu_1469_p3.read() ^ tmp_fu_713_p3.read());
}
void make_hash::thread_xor_ln44_20_fu_1593_p2() {
xor_ln44_20_fu_1593_p2 = (grp_fu_197_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln44_21_fu_1599_p2() {
xor_ln44_21_fu_1599_p2 = (grp_fu_457_p2.read() ^ xor_ln44_20_fu_1593_p2.read());
}
void make_hash::thread_xor_ln44_22_fu_1605_p2() {
xor_ln44_22_fu_1605_p2 = (grp_fu_471_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln44_23_fu_1611_p2() {
xor_ln44_23_fu_1611_p2 = (grp_fu_279_p2.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln44_24_fu_1617_p2() {
xor_ln44_24_fu_1617_p2 = (xor_ln44_23_fu_1611_p2.read() ^ xor_ln44_22_fu_1605_p2.read());
}
void make_hash::thread_xor_ln44_25_fu_1623_p2() {
xor_ln44_25_fu_1623_p2 = (xor_ln44_24_fu_1617_p2.read() ^ xor_ln44_21_fu_1599_p2.read());
}
void make_hash::thread_xor_ln44_26_fu_1629_p2() {
xor_ln44_26_fu_1629_p2 = (xor_ln44_25_fu_1623_p2.read() ^ xor_ln44_19_fu_1587_p2.read());
}
void make_hash::thread_xor_ln44_27_fu_4882_p2() {
xor_ln44_27_fu_4882_p2 = (xor_ln43_26_fu_1457_p2.read() ^ xor_ln42_27_fu_1295_p2.read());
}
void make_hash::thread_xor_ln44_28_fu_5403_p2() {
xor_ln44_28_fu_5403_p2 = (xor_ln816_3_reg_15855.read() ^ xor_ln46_22_reg_15879.read());
}
void make_hash::thread_xor_ln44_29_fu_5407_p2() {
xor_ln44_29_fu_5407_p2 = (xor_ln44_28_fu_5403_p2.read() ^ xor_ln44_27_reg_16292.read());
}
void make_hash::thread_xor_ln44_2_fu_1497_p2() {
xor_ln44_2_fu_1497_p2 = (xor_ln44_1_fu_1491_p2.read() ^ xor_ln44_fu_1485_p2.read());
}
void make_hash::thread_xor_ln44_30_fu_5412_p2() {
xor_ln44_30_fu_5412_p2 = (xor_ln41_29_fu_5028_p2.read() ^ xor_ln816_4_reg_15914.read());
}
void make_hash::thread_xor_ln44_31_fu_5417_p2() {
xor_ln44_31_fu_5417_p2 = (xor_ln44_30_fu_5412_p2.read() ^ xor_ln44_29_fu_5407_p2.read());
}
void make_hash::thread_xor_ln44_32_fu_5423_p2() {
xor_ln44_32_fu_5423_p2 = (xor_ln816_10_reg_16071.read() ^ xor_ln59_19_reg_16081.read());
}
void make_hash::thread_xor_ln44_33_fu_5427_p2() {
xor_ln44_33_fu_5427_p2 = (xor_ln44_32_fu_5423_p2.read() ^ xor_ln55_20_reg_16024.read());
}
void make_hash::thread_xor_ln44_34_fu_5432_p2() {
xor_ln44_34_fu_5432_p2 = (xor_ln60_17_reg_16094.read() ^ xor_ln64_16_reg_16158.read());
}
void make_hash::thread_xor_ln44_35_fu_5436_p2() {
xor_ln44_35_fu_5436_p2 = (xor_ln816_14_reg_16180.read() ^ xor_ln40_25_fu_4906_p2.read());
}
void make_hash::thread_xor_ln44_36_fu_5441_p2() {
xor_ln44_36_fu_5441_p2 = (xor_ln44_35_fu_5436_p2.read() ^ xor_ln44_34_fu_5432_p2.read());
}
void make_hash::thread_xor_ln44_37_fu_5447_p2() {
xor_ln44_37_fu_5447_p2 = (xor_ln44_36_fu_5441_p2.read() ^ xor_ln44_33_fu_5427_p2.read());
}
void make_hash::thread_xor_ln44_38_fu_5453_p2() {
xor_ln44_38_fu_5453_p2 = (xor_ln44_37_fu_5447_p2.read() ^ xor_ln44_31_fu_5417_p2.read());
}
void make_hash::thread_xor_ln44_39_fu_5459_p2() {
xor_ln44_39_fu_5459_p2 = (xor_ln44_38_fu_5453_p2.read() ^ xor_ln816_17_reg_16263.read());
}
void make_hash::thread_xor_ln44_3_fu_1503_p2() {
xor_ln44_3_fu_1503_p2 = (xor_ln41_4_fu_1005_p2.read() ^ tmp_37_fu_1127_p3.read());
}
void make_hash::thread_xor_ln44_40_fu_5464_p2() {
xor_ln44_40_fu_5464_p2 = (trunc_ln41_2_fu_4894_p1.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln44_41_fu_5470_p2() {
xor_ln44_41_fu_5470_p2 = (xor_ln44_40_fu_5464_p2.read() ^ xor_ln44_39_fu_5459_p2.read());
}
void make_hash::thread_xor_ln44_44_fu_5476_p2() {
xor_ln44_44_fu_5476_p2 = (grp_fu_485_p2.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln44_45_fu_5482_p2() {
xor_ln44_45_fu_5482_p2 = (xor_ln44_44_fu_5476_p2.read() ^ grp_fu_479_p2.read());
}
void make_hash::thread_xor_ln44_46_fu_5488_p2() {
xor_ln44_46_fu_5488_p2 = (xor_ln44_45_fu_5482_p2.read() ^ xor_ln44_41_fu_5470_p2.read());
}
void make_hash::thread_xor_ln44_47_fu_5494_p2() {
xor_ln44_47_fu_5494_p2 = (grp_fu_197_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln44_48_fu_5500_p2() {
xor_ln44_48_fu_5500_p2 = (grp_fu_457_p2.read() ^ xor_ln44_47_fu_5494_p2.read());
}
void make_hash::thread_xor_ln44_49_fu_5506_p2() {
xor_ln44_49_fu_5506_p2 = (grp_fu_471_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln44_4_fu_1509_p2() {
xor_ln44_4_fu_1509_p2 = (xor_ln44_3_fu_1503_p2.read() ^ xor_ln44_2_fu_1497_p2.read());
}
void make_hash::thread_xor_ln44_50_fu_5512_p2() {
xor_ln44_50_fu_5512_p2 = (grp_fu_279_p2.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln44_51_fu_5518_p2() {
xor_ln44_51_fu_5518_p2 = (xor_ln44_50_fu_5512_p2.read() ^ xor_ln44_49_fu_5506_p2.read());
}
void make_hash::thread_xor_ln44_52_fu_5524_p2() {
xor_ln44_52_fu_5524_p2 = (xor_ln44_51_fu_5518_p2.read() ^ xor_ln44_48_fu_5500_p2.read());
}
void make_hash::thread_xor_ln44_53_fu_5530_p2() {
xor_ln44_53_fu_5530_p2 = (xor_ln44_52_fu_5524_p2.read() ^ xor_ln44_46_fu_5488_p2.read());
}
void make_hash::thread_xor_ln44_54_fu_8525_p2() {
xor_ln44_54_fu_8525_p2 = (xor_ln43_53_fu_5391_p2.read() ^ xor_ln42_55_fu_5266_p2.read());
}
void make_hash::thread_xor_ln44_55_fu_9057_p2() {
xor_ln44_55_fu_9057_p2 = (xor_ln816_21_reg_16342.read() ^ xor_ln46_45_reg_16366.read());
}
void make_hash::thread_xor_ln44_56_fu_9061_p2() {
xor_ln44_56_fu_9061_p2 = (xor_ln44_55_fu_9057_p2.read() ^ xor_ln44_54_reg_16779.read());
}
void make_hash::thread_xor_ln44_57_fu_9066_p2() {
xor_ln44_57_fu_9066_p2 = (xor_ln41_54_fu_8682_p2.read() ^ xor_ln816_22_reg_16401.read());
}
void make_hash::thread_xor_ln44_58_fu_9071_p2() {
xor_ln44_58_fu_9071_p2 = (xor_ln44_57_fu_9066_p2.read() ^ xor_ln44_56_fu_9061_p2.read());
}
void make_hash::thread_xor_ln44_59_fu_9077_p2() {
xor_ln44_59_fu_9077_p2 = (xor_ln816_28_reg_16558.read() ^ xor_ln59_39_reg_16568.read());
}
void make_hash::thread_xor_ln44_5_fu_1515_p2() {
xor_ln44_5_fu_1515_p2 = (tmp_39_fu_1143_p3.read() ^ tmp_46_fu_1323_p3.read());
}
void make_hash::thread_xor_ln44_60_fu_9081_p2() {
xor_ln44_60_fu_9081_p2 = (xor_ln44_59_fu_9077_p2.read() ^ xor_ln55_41_reg_16511.read());
}
void make_hash::thread_xor_ln44_61_fu_9086_p2() {
xor_ln44_61_fu_9086_p2 = (xor_ln60_35_reg_16581.read() ^ xor_ln64_33_reg_16645.read());
}
void make_hash::thread_xor_ln44_62_fu_9090_p2() {
xor_ln44_62_fu_9090_p2 = (xor_ln816_32_reg_16667.read() ^ xor_ln40_49_fu_8560_p2.read());
}
void make_hash::thread_xor_ln44_63_fu_9095_p2() {
xor_ln44_63_fu_9095_p2 = (xor_ln44_62_fu_9090_p2.read() ^ xor_ln44_61_fu_9086_p2.read());
}
void make_hash::thread_xor_ln44_64_fu_9101_p2() {
xor_ln44_64_fu_9101_p2 = (xor_ln44_63_fu_9095_p2.read() ^ xor_ln44_60_fu_9081_p2.read());
}
void make_hash::thread_xor_ln44_65_fu_9107_p2() {
xor_ln44_65_fu_9107_p2 = (xor_ln44_64_fu_9101_p2.read() ^ xor_ln44_58_fu_9071_p2.read());
}
void make_hash::thread_xor_ln44_66_fu_9113_p2() {
xor_ln44_66_fu_9113_p2 = (xor_ln44_65_fu_9107_p2.read() ^ xor_ln816_35_reg_16750.read());
}
void make_hash::thread_xor_ln44_67_fu_9118_p2() {
xor_ln44_67_fu_9118_p2 = (trunc_ln41_4_fu_8548_p1.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln44_68_fu_9124_p2() {
xor_ln44_68_fu_9124_p2 = (xor_ln44_67_fu_9118_p2.read() ^ xor_ln44_66_fu_9113_p2.read());
}
void make_hash::thread_xor_ln44_6_fu_1521_p2() {
xor_ln44_6_fu_1521_p2 = (xor_ln44_5_fu_1515_p2.read() ^ tmp_45_fu_1315_p3.read());
}
void make_hash::thread_xor_ln44_71_fu_9130_p2() {
xor_ln44_71_fu_9130_p2 = (grp_fu_485_p2.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln44_72_fu_9136_p2() {
xor_ln44_72_fu_9136_p2 = (xor_ln44_71_fu_9130_p2.read() ^ grp_fu_479_p2.read());
}
void make_hash::thread_xor_ln44_73_fu_9142_p2() {
xor_ln44_73_fu_9142_p2 = (xor_ln44_72_fu_9136_p2.read() ^ xor_ln44_68_fu_9124_p2.read());
}
void make_hash::thread_xor_ln44_74_fu_9148_p2() {
xor_ln44_74_fu_9148_p2 = (grp_fu_197_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln44_75_fu_9154_p2() {
xor_ln44_75_fu_9154_p2 = (grp_fu_457_p2.read() ^ xor_ln44_74_fu_9148_p2.read());
}
void make_hash::thread_xor_ln44_76_fu_9160_p2() {
xor_ln44_76_fu_9160_p2 = (grp_fu_471_p3.read() ^ grp_fu_213_p3.read());
}
void make_hash::thread_xor_ln44_77_fu_9166_p2() {
xor_ln44_77_fu_9166_p2 = (grp_fu_279_p2.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln44_78_fu_9172_p2() {
xor_ln44_78_fu_9172_p2 = (xor_ln44_77_fu_9166_p2.read() ^ xor_ln44_76_fu_9160_p2.read());
}
void make_hash::thread_xor_ln44_79_fu_9178_p2() {
xor_ln44_79_fu_9178_p2 = (xor_ln44_78_fu_9172_p2.read() ^ xor_ln44_75_fu_9154_p2.read());
}
void make_hash::thread_xor_ln44_7_fu_1527_p2() {
xor_ln44_7_fu_1527_p2 = (tmp_51_fu_1477_p3.read() ^ tmp_5_fu_753_p3.read());
}
void make_hash::thread_xor_ln44_80_fu_9184_p2() {
xor_ln44_80_fu_9184_p2 = (xor_ln44_79_fu_9178_p2.read() ^ xor_ln44_73_fu_9142_p2.read());
}
void make_hash::thread_xor_ln44_81_fu_12168_p2() {
xor_ln44_81_fu_12168_p2 = (xor_ln43_80_fu_9045_p2.read() ^ xor_ln42_83_fu_8920_p2.read());
}
void make_hash::thread_xor_ln44_82_fu_12689_p2() {
xor_ln44_82_fu_12689_p2 = (xor_ln816_39_reg_16838.read() ^ xor_ln46_68_reg_16862.read());
}
void make_hash::thread_xor_ln44_83_fu_12693_p2() {
xor_ln44_83_fu_12693_p2 = (xor_ln44_82_fu_12689_p2.read() ^ xor_ln44_81_reg_17273.read());
}
void make_hash::thread_xor_ln44_84_fu_12698_p2() {
xor_ln44_84_fu_12698_p2 = (xor_ln41_78_fu_12314_p2.read() ^ xor_ln816_40_reg_16897.read());
}
void make_hash::thread_xor_ln44_85_fu_12703_p2() {
xor_ln44_85_fu_12703_p2 = (xor_ln44_84_fu_12698_p2.read() ^ xor_ln44_83_fu_12693_p2.read());
}
void make_hash::thread_xor_ln44_86_fu_12709_p2() {
xor_ln44_86_fu_12709_p2 = (xor_ln816_46_reg_17054.read() ^ xor_ln59_59_reg_17064.read());
}
void make_hash::thread_xor_ln44_87_fu_12713_p2() {
xor_ln44_87_fu_12713_p2 = (xor_ln44_86_fu_12709_p2.read() ^ xor_ln55_62_reg_17007.read());
}
void make_hash::thread_xor_ln44_88_fu_12718_p2() {
xor_ln44_88_fu_12718_p2 = (xor_ln60_53_reg_17077.read() ^ xor_ln64_50_reg_17141.read());
}
void make_hash::thread_xor_ln44_89_fu_12722_p2() {
xor_ln44_89_fu_12722_p2 = (xor_ln816_50_reg_17163.read() ^ xor_ln40_73_fu_12192_p2.read());
}
void make_hash::thread_xor_ln44_8_fu_1533_p2() {
xor_ln44_8_fu_1533_p2 = (tmp_6_fu_761_p3.read() ^ xor_ln40_1_fu_811_p2.read());
}
void make_hash::thread_xor_ln44_90_fu_12727_p2() {
xor_ln44_90_fu_12727_p2 = (xor_ln44_89_fu_12722_p2.read() ^ xor_ln44_88_fu_12718_p2.read());
}
void make_hash::thread_xor_ln44_91_fu_12733_p2() {
xor_ln44_91_fu_12733_p2 = (xor_ln44_90_fu_12727_p2.read() ^ xor_ln44_87_fu_12713_p2.read());
}
void make_hash::thread_xor_ln44_92_fu_12739_p2() {
xor_ln44_92_fu_12739_p2 = (xor_ln44_91_fu_12733_p2.read() ^ xor_ln44_85_fu_12703_p2.read());
}
void make_hash::thread_xor_ln44_93_fu_12745_p2() {
xor_ln44_93_fu_12745_p2 = (xor_ln44_92_fu_12739_p2.read() ^ xor_ln816_53_reg_17247.read());
}
void make_hash::thread_xor_ln44_94_fu_12750_p2() {
xor_ln44_94_fu_12750_p2 = (trunc_ln41_6_fu_12180_p1.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln44_95_fu_12756_p2() {
xor_ln44_95_fu_12756_p2 = (xor_ln44_94_fu_12750_p2.read() ^ xor_ln44_93_fu_12745_p2.read());
}
void make_hash::thread_xor_ln44_98_fu_12762_p2() {
xor_ln44_98_fu_12762_p2 = (grp_fu_485_p2.read() ^ grp_fu_173_p3.read());
}
void make_hash::thread_xor_ln44_99_fu_12768_p2() {
xor_ln44_99_fu_12768_p2 = (xor_ln44_98_fu_12762_p2.read() ^ grp_fu_479_p2.read());
}
void make_hash::thread_xor_ln44_9_fu_1539_p2() {
xor_ln44_9_fu_1539_p2 = (xor_ln44_8_fu_1533_p2.read() ^ xor_ln44_7_fu_1527_p2.read());
}
void make_hash::thread_xor_ln44_fu_1485_p2() {
xor_ln44_fu_1485_p2 = (tmp_44_fu_1307_p3.read() ^ tmp_36_fu_1119_p3.read());
}
void make_hash::thread_xor_ln45_102_fu_12909_p2() {
xor_ln45_102_fu_12909_p2 = (grp_fu_513_p2.read() ^ grp_fu_507_p2.read());
}
void make_hash::thread_xor_ln45_103_fu_12915_p2() {
xor_ln45_103_fu_12915_p2 = (xor_ln45_102_fu_12909_p2.read() ^ xor_ln45_99_fu_12903_p2.read());
}
void make_hash::thread_xor_ln45_105_fu_12921_p2() {
xor_ln45_105_fu_12921_p2 = (grp_fu_519_p2.read() ^ grp_fu_317_p3.read());
}
void make_hash::thread_xor_ln45_108_fu_12927_p2() {
xor_ln45_108_fu_12927_p2 = (grp_fu_531_p2.read() ^ grp_fu_525_p2.read());
}
void make_hash::thread_xor_ln45_109_fu_12933_p2() {
xor_ln45_109_fu_12933_p2 = (xor_ln45_108_fu_12927_p2.read() ^ xor_ln45_105_fu_12921_p2.read());
}
void make_hash::thread_xor_ln45_10_fu_1717_p2() {
xor_ln45_10_fu_1717_p2 = (tmp_55_fu_1649_p3.read() ^ tmp_5_fu_753_p3.read());
}
void make_hash::thread_xor_ln45_110_fu_12939_p2() {
xor_ln45_110_fu_12939_p2 = (xor_ln45_109_fu_12933_p2.read() ^ xor_ln45_103_fu_12915_p2.read());
}
void make_hash::thread_xor_ln45_111_fu_12945_p2() {
xor_ln45_111_fu_12945_p2 = (xor_ln45_110_fu_12939_p2.read() ^ xor_ln45_98_fu_12897_p2.read());
}
void make_hash::thread_xor_ln45_11_fu_1723_p2() {
xor_ln45_11_fu_1723_p2 = (xor_ln45_3_fu_1675_p2.read() ^ trunc_ln41_1_fu_709_p1.read());
}
void make_hash::thread_xor_ln45_12_fu_1729_p2() {
xor_ln45_12_fu_1729_p2 = (xor_ln45_11_fu_1723_p2.read() ^ xor_ln45_10_fu_1717_p2.read());
}
void make_hash::thread_xor_ln45_13_fu_1735_p2() {
xor_ln45_13_fu_1735_p2 = (xor_ln45_12_fu_1729_p2.read() ^ xor_ln45_9_fu_1711_p2.read());
}
void make_hash::thread_xor_ln45_14_fu_1741_p2() {
xor_ln45_14_fu_1741_p2 = (xor_ln45_13_fu_1735_p2.read() ^ xor_ln45_7_fu_1699_p2.read());
}
void make_hash::thread_xor_ln45_15_fu_1747_p2() {
xor_ln45_15_fu_1747_p2 = (grp_fu_479_p2.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln45_18_fu_1753_p2() {
xor_ln45_18_fu_1753_p2 = (grp_fu_513_p2.read() ^ grp_fu_507_p2.read());
}
void make_hash::thread_xor_ln45_19_fu_1759_p2() {
xor_ln45_19_fu_1759_p2 = (xor_ln45_18_fu_1753_p2.read() ^ xor_ln45_15_fu_1747_p2.read());
}
void make_hash::thread_xor_ln45_1_fu_1663_p2() {
xor_ln45_1_fu_1663_p2 = (tmp_24_fu_939_p3.read() ^ tmp_50_fu_1469_p3.read());
}
void make_hash::thread_xor_ln45_21_fu_1765_p2() {
xor_ln45_21_fu_1765_p2 = (grp_fu_519_p2.read() ^ grp_fu_317_p3.read());
}
void make_hash::thread_xor_ln45_24_fu_1771_p2() {
xor_ln45_24_fu_1771_p2 = (grp_fu_531_p2.read() ^ grp_fu_525_p2.read());
}
void make_hash::thread_xor_ln45_25_fu_1777_p2() {
xor_ln45_25_fu_1777_p2 = (xor_ln45_24_fu_1771_p2.read() ^ xor_ln45_21_fu_1765_p2.read());
}
void make_hash::thread_xor_ln45_26_fu_1783_p2() {
xor_ln45_26_fu_1783_p2 = (xor_ln45_25_fu_1777_p2.read() ^ xor_ln45_19_fu_1759_p2.read());
}
void make_hash::thread_xor_ln45_27_fu_1789_p2() {
xor_ln45_27_fu_1789_p2 = (xor_ln45_26_fu_1783_p2.read() ^ xor_ln45_14_fu_1741_p2.read());
}
void make_hash::thread_xor_ln45_28_fu_4888_p2() {
xor_ln45_28_fu_4888_p2 = (xor_ln69_16_fu_4577_p2.read() ^ xor_ln40_23_fu_927_p2.read());
}
void make_hash::thread_xor_ln45_29_fu_5542_p2() {
xor_ln45_29_fu_5542_p2 = (xor_ln41_25_reg_15825.read() ^ xor_ln816_3_reg_15855.read());
}
void make_hash::thread_xor_ln45_2_fu_1669_p2() {
xor_ln45_2_fu_1669_p2 = (xor_ln45_1_fu_1663_p2.read() ^ tmp_44_fu_1307_p3.read());
}
void make_hash::thread_xor_ln45_30_fu_5546_p2() {
xor_ln45_30_fu_5546_p2 = (xor_ln45_29_fu_5542_p2.read() ^ xor_ln816_2_reg_15841.read());
}
void make_hash::thread_xor_ln45_31_fu_5551_p2() {
xor_ln45_31_fu_5551_p2 = (xor_ln41_26_fu_5015_p2.read() ^ xor_ln816_16_reg_16243.read());
}
void make_hash::thread_xor_ln45_32_fu_5556_p2() {
xor_ln45_32_fu_5556_p2 = (xor_ln45_27_reg_15865.read() ^ xor_ln46_22_reg_15879.read());
}
void make_hash::thread_xor_ln45_33_fu_5560_p2() {
xor_ln45_33_fu_5560_p2 = (xor_ln47_22_reg_15893.read() ^ xor_ln816_5_reg_15950.read());
}
void make_hash::thread_xor_ln45_34_fu_5564_p2() {
xor_ln45_34_fu_5564_p2 = (xor_ln45_33_fu_5560_p2.read() ^ xor_ln45_32_fu_5556_p2.read());
}
void make_hash::thread_xor_ln45_35_fu_5570_p2() {
xor_ln45_35_fu_5570_p2 = (xor_ln45_34_fu_5564_p2.read() ^ xor_ln45_30_fu_5546_p2.read());
}
void make_hash::thread_xor_ln45_36_fu_5576_p2() {
xor_ln45_36_fu_5576_p2 = (xor_ln59_19_reg_16081.read() ^ xor_ln60_17_reg_16094.read());
}
void make_hash::thread_xor_ln45_37_fu_5580_p2() {
xor_ln45_37_fu_5580_p2 = (xor_ln45_36_fu_5576_p2.read() ^ xor_ln816_8_reg_16002.read());
}
void make_hash::thread_xor_ln45_38_fu_5585_p2() {
xor_ln45_38_fu_5585_p2 = (xor_ln816_11_reg_16115.read() ^ xor_ln64_16_reg_16158.read());
}
void make_hash::thread_xor_ln45_39_fu_5589_p2() {
xor_ln45_39_fu_5589_p2 = (xor_ln45_31_fu_5551_p2.read() ^ trunc_ln41_3_fu_4898_p1.read());
}
void make_hash::thread_xor_ln45_3_fu_1675_p2() {
xor_ln45_3_fu_1675_p2 = (xor_ln41_fu_987_p2.read() ^ tmp_9_fu_785_p3.read());
}
void make_hash::thread_xor_ln45_40_fu_5595_p2() {
xor_ln45_40_fu_5595_p2 = (xor_ln45_39_fu_5589_p2.read() ^ xor_ln45_38_fu_5585_p2.read());
}
void make_hash::thread_xor_ln45_41_fu_5601_p2() {
xor_ln45_41_fu_5601_p2 = (xor_ln45_40_fu_5595_p2.read() ^ xor_ln45_37_fu_5580_p2.read());
}
void make_hash::thread_xor_ln45_42_fu_5607_p2() {
xor_ln45_42_fu_5607_p2 = (xor_ln45_41_fu_5601_p2.read() ^ xor_ln45_35_fu_5570_p2.read());
}
void make_hash::thread_xor_ln45_43_fu_5613_p2() {
xor_ln45_43_fu_5613_p2 = (grp_fu_479_p2.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln45_46_fu_5619_p2() {
xor_ln45_46_fu_5619_p2 = (grp_fu_513_p2.read() ^ grp_fu_507_p2.read());
}
void make_hash::thread_xor_ln45_47_fu_5625_p2() {
xor_ln45_47_fu_5625_p2 = (xor_ln45_46_fu_5619_p2.read() ^ xor_ln45_43_fu_5613_p2.read());
}
void make_hash::thread_xor_ln45_49_fu_5631_p2() {
xor_ln45_49_fu_5631_p2 = (grp_fu_519_p2.read() ^ grp_fu_317_p3.read());
}
void make_hash::thread_xor_ln45_4_fu_1681_p2() {
xor_ln45_4_fu_1681_p2 = (tmp_54_fu_1641_p3.read() ^ tmp_fu_713_p3.read());
}
void make_hash::thread_xor_ln45_52_fu_5637_p2() {
xor_ln45_52_fu_5637_p2 = (grp_fu_531_p2.read() ^ grp_fu_525_p2.read());
}
void make_hash::thread_xor_ln45_53_fu_5643_p2() {
xor_ln45_53_fu_5643_p2 = (xor_ln45_52_fu_5637_p2.read() ^ xor_ln45_49_fu_5631_p2.read());
}
void make_hash::thread_xor_ln45_54_fu_5649_p2() {
xor_ln45_54_fu_5649_p2 = (xor_ln45_53_fu_5643_p2.read() ^ xor_ln45_47_fu_5625_p2.read());
}
void make_hash::thread_xor_ln45_55_fu_5655_p2() {
xor_ln45_55_fu_5655_p2 = (xor_ln45_54_fu_5649_p2.read() ^ xor_ln45_42_fu_5607_p2.read());
}
void make_hash::thread_xor_ln45_56_fu_8531_p2() {
xor_ln45_56_fu_8531_p2 = (xor_ln69_33_fu_8237_p2.read() ^ xor_ln40_47_fu_5003_p2.read());
}
void make_hash::thread_xor_ln45_57_fu_9196_p2() {
xor_ln45_57_fu_9196_p2 = (xor_ln41_50_reg_16312.read() ^ xor_ln816_21_reg_16342.read());
}
void make_hash::thread_xor_ln45_58_fu_9200_p2() {
xor_ln45_58_fu_9200_p2 = (xor_ln45_57_fu_9196_p2.read() ^ xor_ln816_20_reg_16328.read());
}
void make_hash::thread_xor_ln45_59_fu_9205_p2() {
xor_ln45_59_fu_9205_p2 = (xor_ln41_51_fu_8669_p2.read() ^ xor_ln816_34_reg_16730.read());
}
void make_hash::thread_xor_ln45_5_fu_1687_p2() {
xor_ln45_5_fu_1687_p2 = (tmp_25_fu_947_p3.read() ^ tmp_2_fu_729_p3.read());
}
void make_hash::thread_xor_ln45_60_fu_9210_p2() {
xor_ln45_60_fu_9210_p2 = (xor_ln45_55_reg_16352.read() ^ xor_ln46_45_reg_16366.read());
}
void make_hash::thread_xor_ln45_61_fu_9214_p2() {
xor_ln45_61_fu_9214_p2 = (xor_ln47_45_reg_16380.read() ^ xor_ln816_23_reg_16437.read());
}
void make_hash::thread_xor_ln45_62_fu_9218_p2() {
xor_ln45_62_fu_9218_p2 = (xor_ln45_61_fu_9214_p2.read() ^ xor_ln45_60_fu_9210_p2.read());
}
void make_hash::thread_xor_ln45_63_fu_9224_p2() {
xor_ln45_63_fu_9224_p2 = (xor_ln45_62_fu_9218_p2.read() ^ xor_ln45_58_fu_9200_p2.read());
}
void make_hash::thread_xor_ln45_64_fu_9230_p2() {
xor_ln45_64_fu_9230_p2 = (xor_ln59_39_reg_16568.read() ^ xor_ln60_35_reg_16581.read());
}
void make_hash::thread_xor_ln45_65_fu_9234_p2() {
xor_ln45_65_fu_9234_p2 = (xor_ln45_64_fu_9230_p2.read() ^ xor_ln816_26_reg_16489.read());
}
void make_hash::thread_xor_ln45_66_fu_9239_p2() {
xor_ln45_66_fu_9239_p2 = (xor_ln816_29_reg_16602.read() ^ xor_ln64_33_reg_16645.read());
}
void make_hash::thread_xor_ln45_67_fu_9243_p2() {
xor_ln45_67_fu_9243_p2 = (xor_ln45_59_fu_9205_p2.read() ^ trunc_ln41_5_fu_8552_p1.read());
}
void make_hash::thread_xor_ln45_68_fu_9249_p2() {
xor_ln45_68_fu_9249_p2 = (xor_ln45_67_fu_9243_p2.read() ^ xor_ln45_66_fu_9239_p2.read());
}
void make_hash::thread_xor_ln45_69_fu_9255_p2() {
xor_ln45_69_fu_9255_p2 = (xor_ln45_68_fu_9249_p2.read() ^ xor_ln45_65_fu_9234_p2.read());
}
void make_hash::thread_xor_ln45_6_fu_1693_p2() {
xor_ln45_6_fu_1693_p2 = (xor_ln45_5_fu_1687_p2.read() ^ xor_ln45_4_fu_1681_p2.read());
}
void make_hash::thread_xor_ln45_70_fu_9261_p2() {
xor_ln45_70_fu_9261_p2 = (xor_ln45_69_fu_9255_p2.read() ^ xor_ln45_63_fu_9224_p2.read());
}
void make_hash::thread_xor_ln45_71_fu_9267_p2() {
xor_ln45_71_fu_9267_p2 = (grp_fu_479_p2.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln45_74_fu_9273_p2() {
xor_ln45_74_fu_9273_p2 = (grp_fu_513_p2.read() ^ grp_fu_507_p2.read());
}
void make_hash::thread_xor_ln45_75_fu_9279_p2() {
xor_ln45_75_fu_9279_p2 = (xor_ln45_74_fu_9273_p2.read() ^ xor_ln45_71_fu_9267_p2.read());
}
void make_hash::thread_xor_ln45_77_fu_9285_p2() {
xor_ln45_77_fu_9285_p2 = (grp_fu_519_p2.read() ^ grp_fu_317_p3.read());
}
void make_hash::thread_xor_ln45_7_fu_1699_p2() {
xor_ln45_7_fu_1699_p2 = (xor_ln45_6_fu_1693_p2.read() ^ xor_ln45_2_fu_1669_p2.read());
}
void make_hash::thread_xor_ln45_80_fu_9291_p2() {
xor_ln45_80_fu_9291_p2 = (grp_fu_531_p2.read() ^ grp_fu_525_p2.read());
}
void make_hash::thread_xor_ln45_81_fu_9297_p2() {
xor_ln45_81_fu_9297_p2 = (xor_ln45_80_fu_9291_p2.read() ^ xor_ln45_77_fu_9285_p2.read());
}
void make_hash::thread_xor_ln45_82_fu_9303_p2() {
xor_ln45_82_fu_9303_p2 = (xor_ln45_81_fu_9297_p2.read() ^ xor_ln45_75_fu_9279_p2.read());
}
void make_hash::thread_xor_ln45_83_fu_9309_p2() {
xor_ln45_83_fu_9309_p2 = (xor_ln45_82_fu_9303_p2.read() ^ xor_ln45_70_fu_9261_p2.read());
}
void make_hash::thread_xor_ln45_84_fu_12828_p2() {
xor_ln45_84_fu_12828_p2 = (xor_ln69_50_reg_17221.read() ^ xor_ln40_71_reg_16797.read());
}
void make_hash::thread_xor_ln45_85_fu_12832_p2() {
xor_ln45_85_fu_12832_p2 = (xor_ln41_75_reg_16808.read() ^ xor_ln816_39_reg_16838.read());
}
void make_hash::thread_xor_ln45_86_fu_12836_p2() {
xor_ln45_86_fu_12836_p2 = (xor_ln45_85_fu_12832_p2.read() ^ xor_ln816_38_reg_16824.read());
}
void make_hash::thread_xor_ln45_87_fu_12841_p2() {
xor_ln45_87_fu_12841_p2 = (xor_ln41_3_fu_12301_p2.read() ^ xor_ln816_52_reg_17227.read());
}
void make_hash::thread_xor_ln45_88_fu_12846_p2() {
xor_ln45_88_fu_12846_p2 = (xor_ln45_83_reg_16848.read() ^ xor_ln46_68_reg_16862.read());
}
void make_hash::thread_xor_ln45_89_fu_12850_p2() {
xor_ln45_89_fu_12850_p2 = (xor_ln47_68_reg_16876.read() ^ xor_ln816_41_reg_16933.read());
}
void make_hash::thread_xor_ln45_8_fu_1705_p2() {
xor_ln45_8_fu_1705_p2 = (tmp_46_fu_1323_p3.read() ^ tmp_51_fu_1477_p3.read());
}
void make_hash::thread_xor_ln45_90_fu_12854_p2() {
xor_ln45_90_fu_12854_p2 = (xor_ln45_89_fu_12850_p2.read() ^ xor_ln45_88_fu_12846_p2.read());
}
void make_hash::thread_xor_ln45_91_fu_12860_p2() {
xor_ln45_91_fu_12860_p2 = (xor_ln45_90_fu_12854_p2.read() ^ xor_ln45_86_fu_12836_p2.read());
}
void make_hash::thread_xor_ln45_92_fu_12866_p2() {
xor_ln45_92_fu_12866_p2 = (xor_ln59_59_reg_17064.read() ^ xor_ln60_53_reg_17077.read());
}
void make_hash::thread_xor_ln45_93_fu_12870_p2() {
xor_ln45_93_fu_12870_p2 = (xor_ln45_92_fu_12866_p2.read() ^ xor_ln816_44_reg_16985.read());
}
void make_hash::thread_xor_ln45_94_fu_12875_p2() {
xor_ln45_94_fu_12875_p2 = (xor_ln816_47_reg_17098.read() ^ xor_ln64_50_reg_17141.read());
}
void make_hash::thread_xor_ln45_95_fu_12879_p2() {
xor_ln45_95_fu_12879_p2 = (xor_ln45_87_fu_12841_p2.read() ^ trunc_ln41_7_fu_12184_p1.read());
}
void make_hash::thread_xor_ln45_96_fu_12885_p2() {
xor_ln45_96_fu_12885_p2 = (xor_ln45_95_fu_12879_p2.read() ^ xor_ln45_94_fu_12875_p2.read());
}
void make_hash::thread_xor_ln45_97_fu_12891_p2() {
xor_ln45_97_fu_12891_p2 = (xor_ln45_96_fu_12885_p2.read() ^ xor_ln45_93_fu_12870_p2.read());
}
void make_hash::thread_xor_ln45_98_fu_12897_p2() {
xor_ln45_98_fu_12897_p2 = (xor_ln45_97_fu_12891_p2.read() ^ xor_ln45_91_fu_12860_p2.read());
}
void make_hash::thread_xor_ln45_99_fu_12903_p2() {
xor_ln45_99_fu_12903_p2 = (grp_fu_479_p2.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln45_9_fu_1711_p2() {
xor_ln45_9_fu_1711_p2 = (xor_ln45_8_fu_1705_p2.read() ^ tmp_27_fu_963_p3.read());
}
void make_hash::thread_xor_ln45_fu_1657_p2() {
xor_ln45_fu_1657_p2 = (tmp_9_fu_785_p3.read() ^ trunc_ln32_fu_801_p1.read());
}
void make_hash::thread_xor_ln46_10_fu_1863_p2() {
xor_ln46_10_fu_1863_p2 = (grp_fu_433_p2.read() ^ xor_ln46_9_fu_1857_p2.read());
}
void make_hash::thread_xor_ln46_11_fu_1869_p2() {
xor_ln46_11_fu_1869_p2 = (xor_ln46_10_fu_1863_p2.read() ^ xor_ln46_8_fu_1851_p2.read());
}
void make_hash::thread_xor_ln46_12_fu_1875_p2() {
xor_ln46_12_fu_1875_p2 = (xor_ln46_11_fu_1869_p2.read() ^ xor_ln46_6_fu_1839_p2.read());
}
void make_hash::thread_xor_ln46_13_fu_1881_p2() {
xor_ln46_13_fu_1881_p2 = (grp_fu_507_p2.read() ^ grp_fu_463_p3.read());
}
void make_hash::thread_xor_ln46_14_fu_1887_p2() {
xor_ln46_14_fu_1887_p2 = (grp_fu_485_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln46_15_fu_1893_p2() {
xor_ln46_15_fu_1893_p2 = (xor_ln46_14_fu_1887_p2.read() ^ xor_ln46_13_fu_1881_p2.read());
}
void make_hash::thread_xor_ln46_17_fu_1899_p2() {
xor_ln46_17_fu_1899_p2 = (grp_fu_545_p2.read() ^ grp_fu_375_p3.read());
}
void make_hash::thread_xor_ln46_18_fu_1905_p2() {
xor_ln46_18_fu_1905_p2 = (grp_fu_537_p3.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln46_19_fu_1911_p2() {
xor_ln46_19_fu_1911_p2 = (grp_fu_279_p2.read() ^ xor_ln46_18_fu_1905_p2.read());
}
void make_hash::thread_xor_ln46_1_fu_1809_p2() {
xor_ln46_1_fu_1809_p2 = (xor_ln46_fu_1803_p2.read() ^ xor_ln42_fu_1151_p2.read());
}
void make_hash::thread_xor_ln46_20_fu_1917_p2() {
xor_ln46_20_fu_1917_p2 = (xor_ln46_19_fu_1911_p2.read() ^ xor_ln46_17_fu_1899_p2.read());
}
void make_hash::thread_xor_ln46_21_fu_1923_p2() {
xor_ln46_21_fu_1923_p2 = (xor_ln46_20_fu_1917_p2.read() ^ xor_ln46_15_fu_1893_p2.read());
}
void make_hash::thread_xor_ln46_22_fu_1929_p2() {
xor_ln46_22_fu_1929_p2 = (xor_ln46_21_fu_1923_p2.read() ^ xor_ln46_12_fu_1875_p2.read());
}
void make_hash::thread_xor_ln46_23_fu_5661_p2() {
xor_ln46_23_fu_5661_p2 = (xor_ln816_3_reg_15855.read() ^ xor_ln45_27_reg_15865.read());
}
void make_hash::thread_xor_ln46_24_fu_5665_p2() {
xor_ln46_24_fu_5665_p2 = (xor_ln46_23_fu_5661_p2.read() ^ xor_ln42_28_fu_5134_p2.read());
}
void make_hash::thread_xor_ln46_25_fu_5671_p2() {
xor_ln46_25_fu_5671_p2 = (xor_ln816_16_reg_16243.read() ^ xor_ln70_18_reg_16254.read());
}
void make_hash::thread_xor_ln46_26_fu_5675_p2() {
xor_ln46_26_fu_5675_p2 = (xor_ln42_29_fu_5138_p2.read() ^ xor_ln46_24_fu_5665_p2.read());
}
void make_hash::thread_xor_ln46_27_fu_5681_p2() {
xor_ln46_27_fu_5681_p2 = (xor_ln816_6_reg_15968.read() ^ xor_ln54_20_reg_16011.read());
}
void make_hash::thread_xor_ln46_28_fu_5685_p2() {
xor_ln46_28_fu_5685_p2 = (xor_ln46_27_fu_5681_p2.read() ^ xor_ln816_4_reg_15914.read());
}
void make_hash::thread_xor_ln46_29_fu_5690_p2() {
xor_ln46_29_fu_5690_p2 = (xor_ln46_28_fu_5685_p2.read() ^ xor_ln46_26_fu_5675_p2.read());
}
void make_hash::thread_xor_ln46_2_fu_1815_p2() {
xor_ln46_2_fu_1815_p2 = (tmp_9_fu_785_p3.read() ^ tmp_10_fu_793_p3.read());
}
void make_hash::thread_xor_ln46_30_fu_5696_p2() {
xor_ln46_30_fu_5696_p2 = (xor_ln61_16_reg_16108.read() ^ xor_ln62_17_reg_16124.read());
}
void make_hash::thread_xor_ln46_31_fu_5700_p2() {
xor_ln46_31_fu_5700_p2 = (xor_ln46_30_fu_5696_p2.read() ^ xor_ln60_17_reg_16094.read());
}
void make_hash::thread_xor_ln46_32_fu_5705_p2() {
xor_ln46_32_fu_5705_p2 = (xor_ln816_14_reg_16180.read() ^ xor_ln46_25_fu_5671_p2.read());
}
void make_hash::thread_xor_ln46_33_fu_5710_p2() {
xor_ln46_33_fu_5710_p2 = (grp_fu_433_p2.read() ^ xor_ln46_32_fu_5705_p2.read());
}
void make_hash::thread_xor_ln46_34_fu_5716_p2() {
xor_ln46_34_fu_5716_p2 = (xor_ln46_33_fu_5710_p2.read() ^ xor_ln46_31_fu_5700_p2.read());
}
void make_hash::thread_xor_ln46_35_fu_5722_p2() {
xor_ln46_35_fu_5722_p2 = (xor_ln46_34_fu_5716_p2.read() ^ xor_ln46_29_fu_5690_p2.read());
}
void make_hash::thread_xor_ln46_36_fu_5728_p2() {
xor_ln46_36_fu_5728_p2 = (grp_fu_507_p2.read() ^ grp_fu_463_p3.read());
}
void make_hash::thread_xor_ln46_37_fu_5734_p2() {
xor_ln46_37_fu_5734_p2 = (grp_fu_485_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln46_38_fu_5740_p2() {
xor_ln46_38_fu_5740_p2 = (xor_ln46_37_fu_5734_p2.read() ^ xor_ln46_36_fu_5728_p2.read());
}
void make_hash::thread_xor_ln46_3_fu_1821_p2() {
xor_ln46_3_fu_1821_p2 = (xor_ln42_1_fu_1157_p2.read() ^ xor_ln46_1_fu_1809_p2.read());
}
void make_hash::thread_xor_ln46_40_fu_5746_p2() {
xor_ln46_40_fu_5746_p2 = (grp_fu_545_p2.read() ^ grp_fu_375_p3.read());
}
void make_hash::thread_xor_ln46_41_fu_5752_p2() {
xor_ln46_41_fu_5752_p2 = (grp_fu_537_p3.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln46_42_fu_5758_p2() {
xor_ln46_42_fu_5758_p2 = (grp_fu_279_p2.read() ^ xor_ln46_41_fu_5752_p2.read());
}
void make_hash::thread_xor_ln46_43_fu_5764_p2() {
xor_ln46_43_fu_5764_p2 = (xor_ln46_42_fu_5758_p2.read() ^ xor_ln46_40_fu_5746_p2.read());
}
void make_hash::thread_xor_ln46_44_fu_5770_p2() {
xor_ln46_44_fu_5770_p2 = (xor_ln46_43_fu_5764_p2.read() ^ xor_ln46_38_fu_5740_p2.read());
}
void make_hash::thread_xor_ln46_45_fu_5776_p2() {
xor_ln46_45_fu_5776_p2 = (xor_ln46_44_fu_5770_p2.read() ^ xor_ln46_35_fu_5722_p2.read());
}
void make_hash::thread_xor_ln46_46_fu_9315_p2() {
xor_ln46_46_fu_9315_p2 = (xor_ln816_21_reg_16342.read() ^ xor_ln45_55_reg_16352.read());
}
void make_hash::thread_xor_ln46_47_fu_9319_p2() {
xor_ln46_47_fu_9319_p2 = (xor_ln46_46_fu_9315_p2.read() ^ xor_ln42_56_fu_8788_p2.read());
}
void make_hash::thread_xor_ln46_48_fu_9325_p2() {
xor_ln46_48_fu_9325_p2 = (xor_ln816_34_reg_16730.read() ^ xor_ln70_37_reg_16741.read());
}
void make_hash::thread_xor_ln46_49_fu_9329_p2() {
xor_ln46_49_fu_9329_p2 = (xor_ln42_57_fu_8792_p2.read() ^ xor_ln46_47_fu_9319_p2.read());
}
void make_hash::thread_xor_ln46_4_fu_1827_p2() {
xor_ln46_4_fu_1827_p2 = (tmp_26_fu_955_p3.read() ^ tmp_38_fu_1135_p3.read());
}
void make_hash::thread_xor_ln46_50_fu_9335_p2() {
xor_ln46_50_fu_9335_p2 = (xor_ln816_24_reg_16455.read() ^ xor_ln54_41_reg_16498.read());
}
void make_hash::thread_xor_ln46_51_fu_9339_p2() {
xor_ln46_51_fu_9339_p2 = (xor_ln46_50_fu_9335_p2.read() ^ xor_ln816_22_reg_16401.read());
}
void make_hash::thread_xor_ln46_52_fu_9344_p2() {
xor_ln46_52_fu_9344_p2 = (xor_ln46_51_fu_9339_p2.read() ^ xor_ln46_49_fu_9329_p2.read());
}
void make_hash::thread_xor_ln46_53_fu_9350_p2() {
xor_ln46_53_fu_9350_p2 = (xor_ln61_33_reg_16595.read() ^ xor_ln62_35_reg_16611.read());
}
void make_hash::thread_xor_ln46_54_fu_9354_p2() {
xor_ln46_54_fu_9354_p2 = (xor_ln46_53_fu_9350_p2.read() ^ xor_ln60_35_reg_16581.read());
}
void make_hash::thread_xor_ln46_55_fu_9359_p2() {
xor_ln46_55_fu_9359_p2 = (xor_ln816_32_reg_16667.read() ^ xor_ln46_48_fu_9325_p2.read());
}
void make_hash::thread_xor_ln46_56_fu_9364_p2() {
xor_ln46_56_fu_9364_p2 = (grp_fu_433_p2.read() ^ xor_ln46_55_fu_9359_p2.read());
}
void make_hash::thread_xor_ln46_57_fu_9370_p2() {
xor_ln46_57_fu_9370_p2 = (xor_ln46_56_fu_9364_p2.read() ^ xor_ln46_54_fu_9354_p2.read());
}
void make_hash::thread_xor_ln46_58_fu_9376_p2() {
xor_ln46_58_fu_9376_p2 = (xor_ln46_57_fu_9370_p2.read() ^ xor_ln46_52_fu_9344_p2.read());
}
void make_hash::thread_xor_ln46_59_fu_9382_p2() {
xor_ln46_59_fu_9382_p2 = (grp_fu_507_p2.read() ^ grp_fu_463_p3.read());
}
void make_hash::thread_xor_ln46_5_fu_1833_p2() {
xor_ln46_5_fu_1833_p2 = (xor_ln46_4_fu_1827_p2.read() ^ tmp_37_fu_1127_p3.read());
}
void make_hash::thread_xor_ln46_60_fu_9388_p2() {
xor_ln46_60_fu_9388_p2 = (grp_fu_485_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln46_61_fu_9394_p2() {
xor_ln46_61_fu_9394_p2 = (xor_ln46_60_fu_9388_p2.read() ^ xor_ln46_59_fu_9382_p2.read());
}
void make_hash::thread_xor_ln46_63_fu_9400_p2() {
xor_ln46_63_fu_9400_p2 = (grp_fu_545_p2.read() ^ grp_fu_375_p3.read());
}
void make_hash::thread_xor_ln46_64_fu_9406_p2() {
xor_ln46_64_fu_9406_p2 = (grp_fu_537_p3.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln46_65_fu_9412_p2() {
xor_ln46_65_fu_9412_p2 = (grp_fu_279_p2.read() ^ xor_ln46_64_fu_9406_p2.read());
}
void make_hash::thread_xor_ln46_66_fu_9418_p2() {
xor_ln46_66_fu_9418_p2 = (xor_ln46_65_fu_9412_p2.read() ^ xor_ln46_63_fu_9400_p2.read());
}
void make_hash::thread_xor_ln46_67_fu_9424_p2() {
xor_ln46_67_fu_9424_p2 = (xor_ln46_66_fu_9418_p2.read() ^ xor_ln46_61_fu_9394_p2.read());
}
void make_hash::thread_xor_ln46_68_fu_9430_p2() {
xor_ln46_68_fu_9430_p2 = (xor_ln46_67_fu_9424_p2.read() ^ xor_ln46_58_fu_9376_p2.read());
}
void make_hash::thread_xor_ln46_69_fu_12951_p2() {
xor_ln46_69_fu_12951_p2 = (xor_ln816_39_reg_16838.read() ^ xor_ln45_83_reg_16848.read());
}
void make_hash::thread_xor_ln46_6_fu_1839_p2() {
xor_ln46_6_fu_1839_p2 = (xor_ln46_5_fu_1833_p2.read() ^ xor_ln46_3_fu_1821_p2.read());
}
void make_hash::thread_xor_ln46_70_fu_12955_p2() {
xor_ln46_70_fu_12955_p2 = (xor_ln46_69_fu_12951_p2.read() ^ xor_ln42_84_fu_12420_p2.read());
}
void make_hash::thread_xor_ln46_71_fu_12961_p2() {
xor_ln46_71_fu_12961_p2 = (xor_ln816_52_reg_17227.read() ^ xor_ln70_56_reg_17238.read());
}
void make_hash::thread_xor_ln46_72_fu_12965_p2() {
xor_ln46_72_fu_12965_p2 = (xor_ln42_85_fu_12424_p2.read() ^ xor_ln46_70_fu_12955_p2.read());
}
void make_hash::thread_xor_ln46_73_fu_12971_p2() {
xor_ln46_73_fu_12971_p2 = (xor_ln816_42_reg_16951.read() ^ xor_ln54_62_reg_16994.read());
}
void make_hash::thread_xor_ln46_74_fu_12975_p2() {
xor_ln46_74_fu_12975_p2 = (xor_ln46_73_fu_12971_p2.read() ^ xor_ln816_40_reg_16897.read());
}
void make_hash::thread_xor_ln46_75_fu_12980_p2() {
xor_ln46_75_fu_12980_p2 = (xor_ln46_74_fu_12975_p2.read() ^ xor_ln46_72_fu_12965_p2.read());
}
void make_hash::thread_xor_ln46_76_fu_12986_p2() {
xor_ln46_76_fu_12986_p2 = (xor_ln61_50_reg_17091.read() ^ xor_ln62_53_reg_17107.read());
}
void make_hash::thread_xor_ln46_77_fu_12990_p2() {
xor_ln46_77_fu_12990_p2 = (xor_ln46_76_fu_12986_p2.read() ^ xor_ln60_53_reg_17077.read());
}
void make_hash::thread_xor_ln46_78_fu_12995_p2() {
xor_ln46_78_fu_12995_p2 = (xor_ln816_50_reg_17163.read() ^ xor_ln46_71_fu_12961_p2.read());
}
void make_hash::thread_xor_ln46_79_fu_13000_p2() {
xor_ln46_79_fu_13000_p2 = (grp_fu_433_p2.read() ^ xor_ln46_78_fu_12995_p2.read());
}
void make_hash::thread_xor_ln46_7_fu_1845_p2() {
xor_ln46_7_fu_1845_p2 = (tmp_55_fu_1649_p3.read() ^ tmp_58_fu_1795_p3.read());
}
void make_hash::thread_xor_ln46_80_fu_13006_p2() {
xor_ln46_80_fu_13006_p2 = (xor_ln46_79_fu_13000_p2.read() ^ xor_ln46_77_fu_12990_p2.read());
}
void make_hash::thread_xor_ln46_81_fu_13012_p2() {
xor_ln46_81_fu_13012_p2 = (xor_ln46_80_fu_13006_p2.read() ^ xor_ln46_75_fu_12980_p2.read());
}
void make_hash::thread_xor_ln46_82_fu_13018_p2() {
xor_ln46_82_fu_13018_p2 = (grp_fu_507_p2.read() ^ grp_fu_463_p3.read());
}
void make_hash::thread_xor_ln46_83_fu_13024_p2() {
xor_ln46_83_fu_13024_p2 = (grp_fu_485_p2.read() ^ grp_fu_301_p3.read());
}
void make_hash::thread_xor_ln46_84_fu_13030_p2() {
xor_ln46_84_fu_13030_p2 = (xor_ln46_83_fu_13024_p2.read() ^ xor_ln46_82_fu_13018_p2.read());
}
void make_hash::thread_xor_ln46_86_fu_13036_p2() {
xor_ln46_86_fu_13036_p2 = (grp_fu_545_p2.read() ^ grp_fu_375_p3.read());
}
void make_hash::thread_xor_ln46_87_fu_13042_p2() {
xor_ln46_87_fu_13042_p2 = (grp_fu_537_p3.read() ^ grp_fu_221_p3.read());
}
void make_hash::thread_xor_ln46_88_fu_13048_p2() {
xor_ln46_88_fu_13048_p2 = (grp_fu_279_p2.read() ^ xor_ln46_87_fu_13042_p2.read());
}
void make_hash::thread_xor_ln46_89_fu_13054_p2() {
xor_ln46_89_fu_13054_p2 = (xor_ln46_88_fu_13048_p2.read() ^ xor_ln46_86_fu_13036_p2.read());
}
void make_hash::thread_xor_ln46_8_fu_1851_p2() {
xor_ln46_8_fu_1851_p2 = (xor_ln46_7_fu_1845_p2.read() ^ tmp_51_fu_1477_p3.read());
}
void make_hash::thread_xor_ln46_90_fu_13060_p2() {
xor_ln46_90_fu_13060_p2 = (xor_ln46_89_fu_13054_p2.read() ^ xor_ln46_84_fu_13030_p2.read());
}
void make_hash::thread_xor_ln46_91_fu_13066_p2() {
xor_ln46_91_fu_13066_p2 = (xor_ln46_90_fu_13060_p2.read() ^ xor_ln46_81_fu_13012_p2.read());
}
void make_hash::thread_xor_ln46_9_fu_1857_p2() {
xor_ln46_9_fu_1857_p2 = (tmp_6_fu_761_p3.read() ^ xor_ln46_2_fu_1815_p2.read());
}
void make_hash::thread_xor_ln46_fu_1803_p2() {
xor_ln46_fu_1803_p2 = (tmp_50_fu_1469_p3.read() ^ tmp_54_fu_1641_p3.read());
}
void make_hash::thread_xor_ln47_10_fu_2003_p2() {
xor_ln47_10_fu_2003_p2 = (xor_ln47_9_fu_1997_p2.read() ^ xor_ln47_5_fu_1973_p2.read());
}
void make_hash::thread_xor_ln47_12_fu_2009_p2() {
xor_ln47_12_fu_2009_p2 = (grp_fu_559_p2.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln47_13_fu_2015_p2() {
xor_ln47_13_fu_2015_p2 = (grp_fu_189_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln47_14_fu_2021_p2() {
xor_ln47_14_fu_2021_p2 = (xor_ln47_13_fu_2015_p2.read() ^ grp_fu_391_p2.read());
}
void make_hash::thread_xor_ln47_15_fu_2027_p2() {
xor_ln47_15_fu_2027_p2 = (xor_ln47_14_fu_2021_p2.read() ^ xor_ln47_12_fu_2009_p2.read());
}
void make_hash::thread_xor_ln47_16_fu_2033_p2() {
xor_ln47_16_fu_2033_p2 = (grp_fu_205_p3.read() ^ grp_fu_499_p3.read());
}
void make_hash::thread_xor_ln47_18_fu_2039_p2() {
xor_ln47_18_fu_2039_p2 = (grp_fu_565_p2.read() ^ xor_ln47_16_fu_2033_p2.read());
}
void make_hash::thread_xor_ln47_19_fu_2045_p2() {
xor_ln47_19_fu_2045_p2 = (grp_fu_531_p2.read() ^ grp_fu_267_p2.read());
}
void make_hash::thread_xor_ln47_1_fu_1949_p2() {
xor_ln47_1_fu_1949_p2 = (xor_ln47_fu_1943_p2.read() ^ xor_ln44_fu_1485_p2.read());
}
void make_hash::thread_xor_ln47_20_fu_2051_p2() {
xor_ln47_20_fu_2051_p2 = (xor_ln47_19_fu_2045_p2.read() ^ xor_ln47_18_fu_2039_p2.read());
}
void make_hash::thread_xor_ln47_21_fu_2057_p2() {
xor_ln47_21_fu_2057_p2 = (xor_ln47_20_fu_2051_p2.read() ^ xor_ln47_15_fu_2027_p2.read());
}
void make_hash::thread_xor_ln47_22_fu_2063_p2() {
xor_ln47_22_fu_2063_p2 = (xor_ln47_21_fu_2057_p2.read() ^ xor_ln47_10_fu_2003_p2.read());
}
void make_hash::thread_xor_ln47_23_fu_5782_p2() {
xor_ln47_23_fu_5782_p2 = (xor_ln45_27_reg_15865.read() ^ xor_ln47_22_reg_15893.read());
}
void make_hash::thread_xor_ln47_24_fu_5786_p2() {
xor_ln47_24_fu_5786_p2 = (xor_ln47_23_fu_5782_p2.read() ^ xor_ln44_27_reg_16292.read());
}
void make_hash::thread_xor_ln47_25_fu_5791_p2() {
xor_ln47_25_fu_5791_p2 = (xor_ln48_19_reg_15908.read() ^ xor_ln50_18_reg_15943.read());
}
void make_hash::thread_xor_ln47_26_fu_5795_p2() {
xor_ln47_26_fu_5795_p2 = (xor_ln55_20_reg_16024.read() ^ xor_ln56_20_reg_16037.read());
}
void make_hash::thread_xor_ln47_27_fu_5799_p2() {
xor_ln47_27_fu_5799_p2 = (xor_ln47_26_fu_5795_p2.read() ^ xor_ln47_25_fu_5791_p2.read());
}
void make_hash::thread_xor_ln47_28_fu_5805_p2() {
xor_ln47_28_fu_5805_p2 = (xor_ln47_27_fu_5799_p2.read() ^ xor_ln47_24_fu_5786_p2.read());
}
void make_hash::thread_xor_ln47_29_fu_5811_p2() {
xor_ln47_29_fu_5811_p2 = (xor_ln62_17_reg_16124.read() ^ xor_ln63_14_reg_16141.read());
}
void make_hash::thread_xor_ln47_2_fu_1955_p2() {
xor_ln47_2_fu_1955_p2 = (tmp_37_fu_1127_p3.read() ^ tmp_2_fu_729_p3.read());
}
void make_hash::thread_xor_ln47_30_fu_5815_p2() {
xor_ln47_30_fu_5815_p2 = (xor_ln47_29_fu_5811_p2.read() ^ xor_ln816_11_reg_16115.read());
}
void make_hash::thread_xor_ln47_31_fu_5820_p2() {
xor_ln47_31_fu_5820_p2 = (xor_ln45_39_fu_5589_p2.read() ^ xor_ln40_30_fu_4930_p2.read());
}
void make_hash::thread_xor_ln47_32_fu_5826_p2() {
xor_ln47_32_fu_5826_p2 = (xor_ln47_31_fu_5820_p2.read() ^ xor_ln47_30_fu_5815_p2.read());
}
void make_hash::thread_xor_ln47_33_fu_5832_p2() {
xor_ln47_33_fu_5832_p2 = (xor_ln47_32_fu_5826_p2.read() ^ xor_ln47_28_fu_5805_p2.read());
}
void make_hash::thread_xor_ln47_35_fu_5838_p2() {
xor_ln47_35_fu_5838_p2 = (grp_fu_559_p2.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln47_36_fu_5844_p2() {
xor_ln47_36_fu_5844_p2 = (grp_fu_189_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln47_37_fu_5850_p2() {
xor_ln47_37_fu_5850_p2 = (xor_ln47_36_fu_5844_p2.read() ^ grp_fu_391_p2.read());
}
void make_hash::thread_xor_ln47_38_fu_5856_p2() {
xor_ln47_38_fu_5856_p2 = (xor_ln47_37_fu_5850_p2.read() ^ xor_ln47_35_fu_5838_p2.read());
}
void make_hash::thread_xor_ln47_39_fu_5862_p2() {
xor_ln47_39_fu_5862_p2 = (grp_fu_205_p3.read() ^ grp_fu_499_p3.read());
}
void make_hash::thread_xor_ln47_3_fu_1961_p2() {
xor_ln47_3_fu_1961_p2 = (tmp_45_fu_1315_p3.read() ^ tmp_4_fu_745_p3.read());
}
void make_hash::thread_xor_ln47_41_fu_5868_p2() {
xor_ln47_41_fu_5868_p2 = (grp_fu_565_p2.read() ^ xor_ln47_39_fu_5862_p2.read());
}
void make_hash::thread_xor_ln47_42_fu_5874_p2() {
xor_ln47_42_fu_5874_p2 = (grp_fu_531_p2.read() ^ grp_fu_267_p2.read());
}
void make_hash::thread_xor_ln47_43_fu_5880_p2() {
xor_ln47_43_fu_5880_p2 = (xor_ln47_42_fu_5874_p2.read() ^ xor_ln47_41_fu_5868_p2.read());
}
void make_hash::thread_xor_ln47_44_fu_5886_p2() {
xor_ln47_44_fu_5886_p2 = (xor_ln47_43_fu_5880_p2.read() ^ xor_ln47_38_fu_5856_p2.read());
}
void make_hash::thread_xor_ln47_45_fu_5892_p2() {
xor_ln47_45_fu_5892_p2 = (xor_ln47_44_fu_5886_p2.read() ^ xor_ln47_33_fu_5832_p2.read());
}
void make_hash::thread_xor_ln47_46_fu_9436_p2() {
xor_ln47_46_fu_9436_p2 = (xor_ln45_55_reg_16352.read() ^ xor_ln47_45_reg_16380.read());
}
void make_hash::thread_xor_ln47_47_fu_9440_p2() {
xor_ln47_47_fu_9440_p2 = (xor_ln47_46_fu_9436_p2.read() ^ xor_ln44_54_reg_16779.read());
}
void make_hash::thread_xor_ln47_48_fu_9445_p2() {
xor_ln47_48_fu_9445_p2 = (xor_ln48_39_reg_16395.read() ^ xor_ln50_37_reg_16430.read());
}
void make_hash::thread_xor_ln47_49_fu_9449_p2() {
xor_ln47_49_fu_9449_p2 = (xor_ln55_41_reg_16511.read() ^ xor_ln56_41_reg_16524.read());
}
void make_hash::thread_xor_ln47_4_fu_1967_p2() {
xor_ln47_4_fu_1967_p2 = (xor_ln47_3_fu_1961_p2.read() ^ xor_ln47_2_fu_1955_p2.read());
}
void make_hash::thread_xor_ln47_50_fu_9453_p2() {
xor_ln47_50_fu_9453_p2 = (xor_ln47_49_fu_9449_p2.read() ^ xor_ln47_48_fu_9445_p2.read());
}
void make_hash::thread_xor_ln47_51_fu_9459_p2() {
xor_ln47_51_fu_9459_p2 = (xor_ln47_50_fu_9453_p2.read() ^ xor_ln47_47_fu_9440_p2.read());
}
void make_hash::thread_xor_ln47_52_fu_9465_p2() {
xor_ln47_52_fu_9465_p2 = (xor_ln62_35_reg_16611.read() ^ xor_ln63_29_reg_16628.read());
}
void make_hash::thread_xor_ln47_53_fu_9469_p2() {
xor_ln47_53_fu_9469_p2 = (xor_ln47_52_fu_9465_p2.read() ^ xor_ln816_29_reg_16602.read());
}
void make_hash::thread_xor_ln47_54_fu_9474_p2() {
xor_ln47_54_fu_9474_p2 = (xor_ln45_67_fu_9243_p2.read() ^ xor_ln40_54_fu_8584_p2.read());
}
void make_hash::thread_xor_ln47_55_fu_9480_p2() {
xor_ln47_55_fu_9480_p2 = (xor_ln47_54_fu_9474_p2.read() ^ xor_ln47_53_fu_9469_p2.read());
}
void make_hash::thread_xor_ln47_56_fu_9486_p2() {
xor_ln47_56_fu_9486_p2 = (xor_ln47_55_fu_9480_p2.read() ^ xor_ln47_51_fu_9459_p2.read());
}
void make_hash::thread_xor_ln47_58_fu_9492_p2() {
xor_ln47_58_fu_9492_p2 = (grp_fu_559_p2.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln47_59_fu_9498_p2() {
xor_ln47_59_fu_9498_p2 = (grp_fu_189_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln47_5_fu_1973_p2() {
xor_ln47_5_fu_1973_p2 = (xor_ln47_4_fu_1967_p2.read() ^ xor_ln47_1_fu_1949_p2.read());
}
void make_hash::thread_xor_ln47_60_fu_9504_p2() {
xor_ln47_60_fu_9504_p2 = (xor_ln47_59_fu_9498_p2.read() ^ grp_fu_391_p2.read());
}
void make_hash::thread_xor_ln47_61_fu_9510_p2() {
xor_ln47_61_fu_9510_p2 = (xor_ln47_60_fu_9504_p2.read() ^ xor_ln47_58_fu_9492_p2.read());
}
void make_hash::thread_xor_ln47_62_fu_9516_p2() {
xor_ln47_62_fu_9516_p2 = (grp_fu_205_p3.read() ^ grp_fu_499_p3.read());
}
void make_hash::thread_xor_ln47_64_fu_9522_p2() {
xor_ln47_64_fu_9522_p2 = (grp_fu_565_p2.read() ^ xor_ln47_62_fu_9516_p2.read());
}
void make_hash::thread_xor_ln47_65_fu_9528_p2() {
xor_ln47_65_fu_9528_p2 = (grp_fu_531_p2.read() ^ grp_fu_267_p2.read());
}
void make_hash::thread_xor_ln47_66_fu_9534_p2() {
xor_ln47_66_fu_9534_p2 = (xor_ln47_65_fu_9528_p2.read() ^ xor_ln47_64_fu_9522_p2.read());
}
void make_hash::thread_xor_ln47_67_fu_9540_p2() {
xor_ln47_67_fu_9540_p2 = (xor_ln47_66_fu_9534_p2.read() ^ xor_ln47_61_fu_9510_p2.read());
}
void make_hash::thread_xor_ln47_68_fu_9546_p2() {
xor_ln47_68_fu_9546_p2 = (xor_ln47_67_fu_9540_p2.read() ^ xor_ln47_56_fu_9486_p2.read());
}
void make_hash::thread_xor_ln47_69_fu_13072_p2() {
xor_ln47_69_fu_13072_p2 = (xor_ln45_83_reg_16848.read() ^ xor_ln47_68_reg_16876.read());
}
void make_hash::thread_xor_ln47_6_fu_1979_p2() {
xor_ln47_6_fu_1979_p2 = (tmp_58_fu_1795_p3.read() ^ tmp_60_fu_1935_p3.read());
}
void make_hash::thread_xor_ln47_70_fu_13076_p2() {
xor_ln47_70_fu_13076_p2 = (xor_ln47_69_fu_13072_p2.read() ^ xor_ln44_81_reg_17273.read());
}
void make_hash::thread_xor_ln47_71_fu_13081_p2() {
xor_ln47_71_fu_13081_p2 = (xor_ln48_59_reg_16891.read() ^ xor_ln50_56_reg_16926.read());
}
void make_hash::thread_xor_ln47_72_fu_13085_p2() {
xor_ln47_72_fu_13085_p2 = (xor_ln55_62_reg_17007.read() ^ xor_ln56_62_reg_17020.read());
}
void make_hash::thread_xor_ln47_73_fu_13089_p2() {
xor_ln47_73_fu_13089_p2 = (xor_ln47_72_fu_13085_p2.read() ^ xor_ln47_71_fu_13081_p2.read());
}
void make_hash::thread_xor_ln47_74_fu_13095_p2() {
xor_ln47_74_fu_13095_p2 = (xor_ln47_73_fu_13089_p2.read() ^ xor_ln47_70_fu_13076_p2.read());
}
void make_hash::thread_xor_ln47_75_fu_13101_p2() {
xor_ln47_75_fu_13101_p2 = (xor_ln62_53_reg_17107.read() ^ xor_ln63_44_reg_17124.read());
}
void make_hash::thread_xor_ln47_76_fu_13105_p2() {
xor_ln47_76_fu_13105_p2 = (xor_ln47_75_fu_13101_p2.read() ^ xor_ln816_47_reg_17098.read());
}
void make_hash::thread_xor_ln47_77_fu_13110_p2() {
xor_ln47_77_fu_13110_p2 = (xor_ln45_95_fu_12879_p2.read() ^ xor_ln40_78_fu_12216_p2.read());
}
void make_hash::thread_xor_ln47_78_fu_13116_p2() {
xor_ln47_78_fu_13116_p2 = (xor_ln47_77_fu_13110_p2.read() ^ xor_ln47_76_fu_13105_p2.read());
}
void make_hash::thread_xor_ln47_79_fu_13122_p2() {
xor_ln47_79_fu_13122_p2 = (xor_ln47_78_fu_13116_p2.read() ^ xor_ln47_74_fu_13095_p2.read());
}
void make_hash::thread_xor_ln47_7_fu_1985_p2() {
xor_ln47_7_fu_1985_p2 = (xor_ln47_6_fu_1979_p2.read() ^ tmp_55_fu_1649_p3.read());
}
void make_hash::thread_xor_ln47_81_fu_13128_p2() {
xor_ln47_81_fu_13128_p2 = (grp_fu_559_p2.read() ^ grp_fu_359_p3.read());
}
void make_hash::thread_xor_ln47_82_fu_13134_p2() {
xor_ln47_82_fu_13134_p2 = (grp_fu_189_p3.read() ^ grp_fu_417_p3.read());
}
void make_hash::thread_xor_ln47_83_fu_13140_p2() {
xor_ln47_83_fu_13140_p2 = (xor_ln47_82_fu_13134_p2.read() ^ grp_fu_391_p2.read());
}
void make_hash::thread_xor_ln47_84_fu_13146_p2() {
xor_ln47_84_fu_13146_p2 = (xor_ln47_83_fu_13140_p2.read() ^ xor_ln47_81_fu_13128_p2.read());
}
void make_hash::thread_xor_ln47_85_fu_13152_p2() {
xor_ln47_85_fu_13152_p2 = (grp_fu_205_p3.read() ^ grp_fu_499_p3.read());
}
void make_hash::thread_xor_ln47_87_fu_13158_p2() {
xor_ln47_87_fu_13158_p2 = (grp_fu_565_p2.read() ^ xor_ln47_85_fu_13152_p2.read());
}
void make_hash::thread_xor_ln47_88_fu_13164_p2() {
xor_ln47_88_fu_13164_p2 = (grp_fu_531_p2.read() ^ grp_fu_267_p2.read());
}
void make_hash::thread_xor_ln47_89_fu_13170_p2() {
xor_ln47_89_fu_13170_p2 = (xor_ln47_88_fu_13164_p2.read() ^ xor_ln47_87_fu_13158_p2.read());
}
void make_hash::thread_xor_ln47_8_fu_1991_p2() {
xor_ln47_8_fu_1991_p2 = (xor_ln45_11_fu_1723_p2.read() ^ xor_ln40_6_fu_841_p2.read());
}
void make_hash::thread_xor_ln47_90_fu_13176_p2() {
xor_ln47_90_fu_13176_p2 = (xor_ln47_89_fu_13170_p2.read() ^ xor_ln47_84_fu_13146_p2.read());
}
void make_hash::thread_xor_ln47_91_fu_13182_p2() {
xor_ln47_91_fu_13182_p2 = (xor_ln47_90_fu_13176_p2.read() ^ xor_ln47_79_fu_13122_p2.read());
}
void make_hash::thread_xor_ln47_9_fu_1997_p2() {
xor_ln47_9_fu_1997_p2 = (xor_ln47_8_fu_1991_p2.read() ^ xor_ln47_7_fu_1985_p2.read());
}
void make_hash::thread_xor_ln47_fu_1943_p2() {
xor_ln47_fu_1943_p2 = (tmp_54_fu_1641_p3.read() ^ tmp_25_fu_947_p3.read());
}
void make_hash::thread_xor_ln48_10_fu_2129_p2() {
xor_ln48_10_fu_2129_p2 = (grp_fu_463_p3.read() ^ grp_fu_367_p3.read());
}
void make_hash::thread_xor_ln48_11_fu_2135_p2() {
xor_ln48_11_fu_2135_p2 = (xor_ln48_10_fu_2129_p2.read() ^ xor_ln48_9_fu_2123_p2.read());
}
void make_hash::thread_xor_ln48_12_fu_2141_p2() {
xor_ln48_12_fu_2141_p2 = (xor_ln48_11_fu_2135_p2.read() ^ xor_ln48_8_fu_2117_p2.read());
}
void make_hash::thread_xor_ln48_13_fu_2147_p2() {
xor_ln48_13_fu_2147_p2 = (grp_fu_309_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln48_14_fu_2153_p2() {
xor_ln48_14_fu_2153_p2 = (xor_ln48_13_fu_2147_p2.read() ^ grp_fu_189_p3.read());
}
void make_hash::thread_xor_ln48_15_fu_2159_p2() {
xor_ln48_15_fu_2159_p2 = (grp_fu_325_p3.read() ^ grp_fu_537_p3.read());
}
void make_hash::thread_xor_ln48_16_fu_2165_p2() {
xor_ln48_16_fu_2165_p2 = (grp_fu_551_p3.read() ^ grp_fu_237_p3.read());
}
void make_hash::thread_xor_ln48_17_fu_2171_p2() {
xor_ln48_17_fu_2171_p2 = (xor_ln48_16_fu_2165_p2.read() ^ xor_ln48_15_fu_2159_p2.read());
}
void make_hash::thread_xor_ln48_18_fu_2177_p2() {
xor_ln48_18_fu_2177_p2 = (xor_ln48_17_fu_2171_p2.read() ^ xor_ln48_14_fu_2153_p2.read());
}
void make_hash::thread_xor_ln48_19_fu_2183_p2() {
xor_ln48_19_fu_2183_p2 = (xor_ln48_18_fu_2177_p2.read() ^ xor_ln48_12_fu_2141_p2.read());
}
void make_hash::thread_xor_ln48_1_fu_2075_p2() {
xor_ln48_1_fu_2075_p2 = (tmp_2_fu_729_p3.read() ^ tmp_26_fu_955_p3.read());
}
void make_hash::thread_xor_ln48_20_fu_5898_p2() {
xor_ln48_20_fu_5898_p2 = (xor_ln45_30_fu_5546_p2.read() ^ xor_ln816_4_reg_15914.read());
}
void make_hash::thread_xor_ln48_21_fu_5903_p2() {
xor_ln48_21_fu_5903_p2 = (xor_ln50_18_reg_15943.read() ^ xor_ln51_22_reg_15962.read());
}
void make_hash::thread_xor_ln48_22_fu_5907_p2() {
xor_ln48_22_fu_5907_p2 = (xor_ln48_21_fu_5903_p2.read() ^ xor_ln48_20_fu_5898_p2.read());
}
void make_hash::thread_xor_ln48_23_fu_5913_p2() {
xor_ln48_23_fu_5913_p2 = (xor_ln52_18_reg_15979.read() ^ xor_ln57_19_reg_16048.read());
}
void make_hash::thread_xor_ln48_24_fu_5917_p2() {
xor_ln48_24_fu_5917_p2 = (xor_ln816_13_reg_16149.read() ^ xor_ln41_26_fu_5015_p2.read());
}
void make_hash::thread_xor_ln48_25_fu_5922_p2() {
xor_ln48_25_fu_5922_p2 = (xor_ln48_24_fu_5917_p2.read() ^ xor_ln816_12_reg_16130.read());
}
void make_hash::thread_xor_ln48_26_fu_5927_p2() {
xor_ln48_26_fu_5927_p2 = (xor_ln48_25_fu_5922_p2.read() ^ xor_ln48_23_fu_5913_p2.read());
}
void make_hash::thread_xor_ln48_27_fu_5933_p2() {
xor_ln48_27_fu_5933_p2 = (xor_ln48_26_fu_5927_p2.read() ^ xor_ln48_22_fu_5907_p2.read());
}
void make_hash::thread_xor_ln48_28_fu_5939_p2() {
xor_ln48_28_fu_5939_p2 = (xor_ln40_35_fu_4956_p2.read() ^ xor_ln48_27_fu_5933_p2.read());
}
void make_hash::thread_xor_ln48_29_fu_5945_p2() {
xor_ln48_29_fu_5945_p2 = (grp_fu_293_p3.read() ^ grp_fu_409_p3.read());
}
void make_hash::thread_xor_ln48_2_fu_2081_p2() {
xor_ln48_2_fu_2081_p2 = (xor_ln48_1_fu_2075_p2.read() ^ xor_ln48_fu_2069_p2.read());
}
void make_hash::thread_xor_ln48_30_fu_5951_p2() {
xor_ln48_30_fu_5951_p2 = (grp_fu_463_p3.read() ^ grp_fu_367_p3.read());
}
void make_hash::thread_xor_ln48_31_fu_5957_p2() {
xor_ln48_31_fu_5957_p2 = (xor_ln48_30_fu_5951_p2.read() ^ xor_ln48_29_fu_5945_p2.read());
}
void make_hash::thread_xor_ln48_32_fu_5963_p2() {
xor_ln48_32_fu_5963_p2 = (xor_ln48_31_fu_5957_p2.read() ^ xor_ln48_28_fu_5939_p2.read());
}
void make_hash::thread_xor_ln48_33_fu_5969_p2() {
xor_ln48_33_fu_5969_p2 = (grp_fu_309_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln48_34_fu_5975_p2() {
xor_ln48_34_fu_5975_p2 = (xor_ln48_33_fu_5969_p2.read() ^ grp_fu_189_p3.read());
}
void make_hash::thread_xor_ln48_35_fu_5981_p2() {
xor_ln48_35_fu_5981_p2 = (grp_fu_325_p3.read() ^ grp_fu_537_p3.read());
}
void make_hash::thread_xor_ln48_36_fu_5987_p2() {
xor_ln48_36_fu_5987_p2 = (grp_fu_551_p3.read() ^ grp_fu_237_p3.read());
}
void make_hash::thread_xor_ln48_37_fu_5993_p2() {
xor_ln48_37_fu_5993_p2 = (xor_ln48_36_fu_5987_p2.read() ^ xor_ln48_35_fu_5981_p2.read());
}
void make_hash::thread_xor_ln48_38_fu_5999_p2() {
xor_ln48_38_fu_5999_p2 = (xor_ln48_37_fu_5993_p2.read() ^ xor_ln48_34_fu_5975_p2.read());
}
void make_hash::thread_xor_ln48_39_fu_6005_p2() {
xor_ln48_39_fu_6005_p2 = (xor_ln48_38_fu_5999_p2.read() ^ xor_ln48_32_fu_5963_p2.read());
}
void make_hash::thread_xor_ln48_3_fu_2087_p2() {
xor_ln48_3_fu_2087_p2 = (tmp_3_fu_737_p3.read() ^ tmp_28_fu_971_p3.read());
}
void make_hash::thread_xor_ln48_40_fu_9552_p2() {
xor_ln48_40_fu_9552_p2 = (xor_ln45_58_fu_9200_p2.read() ^ xor_ln816_22_reg_16401.read());
}
void make_hash::thread_xor_ln48_41_fu_9557_p2() {
xor_ln48_41_fu_9557_p2 = (xor_ln50_37_reg_16430.read() ^ xor_ln51_45_reg_16449.read());
}
void make_hash::thread_xor_ln48_42_fu_9561_p2() {
xor_ln48_42_fu_9561_p2 = (xor_ln48_41_fu_9557_p2.read() ^ xor_ln48_40_fu_9552_p2.read());
}
void make_hash::thread_xor_ln48_43_fu_9567_p2() {
xor_ln48_43_fu_9567_p2 = (xor_ln52_37_reg_16466.read() ^ xor_ln57_39_reg_16535.read());
}
void make_hash::thread_xor_ln48_44_fu_9571_p2() {
xor_ln48_44_fu_9571_p2 = (xor_ln816_31_reg_16636.read() ^ xor_ln41_51_fu_8669_p2.read());
}
void make_hash::thread_xor_ln48_45_fu_9576_p2() {
xor_ln48_45_fu_9576_p2 = (xor_ln48_44_fu_9571_p2.read() ^ xor_ln816_30_reg_16617.read());
}
void make_hash::thread_xor_ln48_46_fu_9581_p2() {
xor_ln48_46_fu_9581_p2 = (xor_ln48_45_fu_9576_p2.read() ^ xor_ln48_43_fu_9567_p2.read());
}
void make_hash::thread_xor_ln48_47_fu_9587_p2() {
xor_ln48_47_fu_9587_p2 = (xor_ln48_46_fu_9581_p2.read() ^ xor_ln48_42_fu_9561_p2.read());
}
void make_hash::thread_xor_ln48_48_fu_9593_p2() {
xor_ln48_48_fu_9593_p2 = (xor_ln40_59_fu_8610_p2.read() ^ xor_ln48_47_fu_9587_p2.read());
}
void make_hash::thread_xor_ln48_49_fu_9599_p2() {
xor_ln48_49_fu_9599_p2 = (grp_fu_293_p3.read() ^ grp_fu_409_p3.read());
}
void make_hash::thread_xor_ln48_4_fu_2093_p2() {
xor_ln48_4_fu_2093_p2 = (tmp_60_fu_1935_p3.read() ^ xor_ln41_fu_987_p2.read());
}
void make_hash::thread_xor_ln48_50_fu_9605_p2() {
xor_ln48_50_fu_9605_p2 = (grp_fu_463_p3.read() ^ grp_fu_367_p3.read());
}
void make_hash::thread_xor_ln48_51_fu_9611_p2() {
xor_ln48_51_fu_9611_p2 = (xor_ln48_50_fu_9605_p2.read() ^ xor_ln48_49_fu_9599_p2.read());
}
void make_hash::thread_xor_ln48_52_fu_9617_p2() {
xor_ln48_52_fu_9617_p2 = (xor_ln48_51_fu_9611_p2.read() ^ xor_ln48_48_fu_9593_p2.read());
}
void make_hash::thread_xor_ln48_53_fu_9623_p2() {
xor_ln48_53_fu_9623_p2 = (grp_fu_309_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln48_54_fu_9629_p2() {
xor_ln48_54_fu_9629_p2 = (xor_ln48_53_fu_9623_p2.read() ^ grp_fu_189_p3.read());
}
void make_hash::thread_xor_ln48_55_fu_9635_p2() {
xor_ln48_55_fu_9635_p2 = (grp_fu_325_p3.read() ^ grp_fu_537_p3.read());
}
void make_hash::thread_xor_ln48_56_fu_9641_p2() {
xor_ln48_56_fu_9641_p2 = (grp_fu_551_p3.read() ^ grp_fu_237_p3.read());
}
void make_hash::thread_xor_ln48_57_fu_9647_p2() {
xor_ln48_57_fu_9647_p2 = (xor_ln48_56_fu_9641_p2.read() ^ xor_ln48_55_fu_9635_p2.read());
}
void make_hash::thread_xor_ln48_58_fu_9653_p2() {
xor_ln48_58_fu_9653_p2 = (xor_ln48_57_fu_9647_p2.read() ^ xor_ln48_54_fu_9629_p2.read());
}
void make_hash::thread_xor_ln48_59_fu_9659_p2() {
xor_ln48_59_fu_9659_p2 = (xor_ln48_58_fu_9653_p2.read() ^ xor_ln48_52_fu_9617_p2.read());
}
void make_hash::thread_xor_ln48_5_fu_2099_p2() {
xor_ln48_5_fu_2099_p2 = (xor_ln48_4_fu_2093_p2.read() ^ tmp_58_fu_1795_p3.read());
}
void make_hash::thread_xor_ln48_60_fu_13188_p2() {
xor_ln48_60_fu_13188_p2 = (xor_ln45_86_fu_12836_p2.read() ^ xor_ln816_40_reg_16897.read());
}
void make_hash::thread_xor_ln48_61_fu_13193_p2() {
xor_ln48_61_fu_13193_p2 = (xor_ln50_56_reg_16926.read() ^ xor_ln51_68_reg_16945.read());
}
void make_hash::thread_xor_ln48_62_fu_13197_p2() {
xor_ln48_62_fu_13197_p2 = (xor_ln48_61_fu_13193_p2.read() ^ xor_ln48_60_fu_13188_p2.read());
}
void make_hash::thread_xor_ln48_63_fu_13203_p2() {
xor_ln48_63_fu_13203_p2 = (xor_ln52_56_reg_16962.read() ^ xor_ln57_59_reg_17031.read());
}
void make_hash::thread_xor_ln48_64_fu_13207_p2() {
xor_ln48_64_fu_13207_p2 = (xor_ln816_49_reg_17132.read() ^ xor_ln41_3_fu_12301_p2.read());
}
void make_hash::thread_xor_ln48_65_fu_13212_p2() {
xor_ln48_65_fu_13212_p2 = (xor_ln48_64_fu_13207_p2.read() ^ xor_ln816_48_reg_17113.read());
}
void make_hash::thread_xor_ln48_66_fu_13217_p2() {
xor_ln48_66_fu_13217_p2 = (xor_ln48_65_fu_13212_p2.read() ^ xor_ln48_63_fu_13203_p2.read());
}
void make_hash::thread_xor_ln48_67_fu_13223_p2() {
xor_ln48_67_fu_13223_p2 = (xor_ln48_66_fu_13217_p2.read() ^ xor_ln48_62_fu_13197_p2.read());
}
void make_hash::thread_xor_ln48_68_fu_13229_p2() {
xor_ln48_68_fu_13229_p2 = (xor_ln40_83_fu_12242_p2.read() ^ xor_ln48_67_fu_13223_p2.read());
}
void make_hash::thread_xor_ln48_69_fu_13235_p2() {
xor_ln48_69_fu_13235_p2 = (grp_fu_293_p3.read() ^ grp_fu_409_p3.read());
}
void make_hash::thread_xor_ln48_6_fu_2105_p2() {
xor_ln48_6_fu_2105_p2 = (xor_ln48_5_fu_2099_p2.read() ^ xor_ln48_3_fu_2087_p2.read());
}
void make_hash::thread_xor_ln48_70_fu_13241_p2() {
xor_ln48_70_fu_13241_p2 = (grp_fu_463_p3.read() ^ grp_fu_367_p3.read());
}
void make_hash::thread_xor_ln48_71_fu_13247_p2() {
xor_ln48_71_fu_13247_p2 = (xor_ln48_70_fu_13241_p2.read() ^ xor_ln48_69_fu_13235_p2.read());
}
void make_hash::thread_xor_ln48_72_fu_13253_p2() {
xor_ln48_72_fu_13253_p2 = (xor_ln48_71_fu_13247_p2.read() ^ xor_ln48_68_fu_13229_p2.read());
}
void make_hash::thread_xor_ln48_73_fu_13259_p2() {
xor_ln48_73_fu_13259_p2 = (grp_fu_309_p3.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln48_74_fu_13265_p2() {
xor_ln48_74_fu_13265_p2 = (xor_ln48_73_fu_13259_p2.read() ^ grp_fu_189_p3.read());
}
void make_hash::thread_xor_ln48_75_fu_13271_p2() {
xor_ln48_75_fu_13271_p2 = (grp_fu_325_p3.read() ^ grp_fu_537_p3.read());
}
void make_hash::thread_xor_ln48_76_fu_13277_p2() {
xor_ln48_76_fu_13277_p2 = (grp_fu_551_p3.read() ^ grp_fu_237_p3.read());
}
void make_hash::thread_xor_ln48_77_fu_13283_p2() {
xor_ln48_77_fu_13283_p2 = (xor_ln48_76_fu_13277_p2.read() ^ xor_ln48_75_fu_13271_p2.read());
}
void make_hash::thread_xor_ln48_78_fu_13289_p2() {
xor_ln48_78_fu_13289_p2 = (xor_ln48_77_fu_13283_p2.read() ^ xor_ln48_74_fu_13265_p2.read());
}
void make_hash::thread_xor_ln48_79_fu_13295_p2() {
xor_ln48_79_fu_13295_p2 = (xor_ln48_78_fu_13289_p2.read() ^ xor_ln48_72_fu_13253_p2.read());
}
void make_hash::thread_xor_ln48_7_fu_2111_p2() {
xor_ln48_7_fu_2111_p2 = (xor_ln48_6_fu_2105_p2.read() ^ xor_ln48_2_fu_2081_p2.read());
}
void make_hash::thread_xor_ln48_8_fu_2117_p2() {
xor_ln48_8_fu_2117_p2 = (xor_ln40_11_fu_879_p2.read() ^ xor_ln48_7_fu_2111_p2.read());
}
void make_hash::thread_xor_ln48_9_fu_2123_p2() {
xor_ln48_9_fu_2123_p2 = (grp_fu_293_p3.read() ^ grp_fu_409_p3.read());
}
void make_hash::thread_xor_ln48_fu_2069_p2() {
xor_ln48_fu_2069_p2 = (xor_ln45_2_fu_1669_p2.read() ^ tmp_37_fu_1127_p3.read());
}
void make_hash::thread_xor_ln49_10_fu_2249_p2() {
xor_ln49_10_fu_2249_p2 = (grp_fu_347_p2.read() ^ grp_fu_491_p3.read());
}
void make_hash::thread_xor_ln49_11_fu_2255_p2() {
xor_ln49_11_fu_2255_p2 = (xor_ln49_10_fu_2249_p2.read() ^ grp_fu_571_p2.read());
}
void make_hash::thread_xor_ln49_12_fu_2261_p2() {
xor_ln49_12_fu_2261_p2 = (grp_fu_317_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln49_13_fu_2267_p2() {
xor_ln49_13_fu_2267_p2 = (xor_ln49_12_fu_2261_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln49_14_fu_2273_p2() {
xor_ln49_14_fu_2273_p2 = (grp_fu_213_p3.read() ^ grp_fu_245_p3.read());
}
void make_hash::thread_xor_ln49_15_fu_2279_p2() {
xor_ln49_15_fu_2279_p2 = (xor_ln49_14_fu_2273_p2.read() ^ grp_fu_551_p3.read());
}
void make_hash::thread_xor_ln49_16_fu_2285_p2() {
xor_ln49_16_fu_2285_p2 = (xor_ln49_15_fu_2279_p2.read() ^ xor_ln49_13_fu_2267_p2.read());
}
void make_hash::thread_xor_ln49_17_fu_2291_p2() {
xor_ln49_17_fu_2291_p2 = (xor_ln49_16_fu_2285_p2.read() ^ xor_ln49_11_fu_2255_p2.read());
}
void make_hash::thread_xor_ln49_18_fu_2297_p2() {
xor_ln49_18_fu_2297_p2 = (xor_ln49_17_fu_2291_p2.read() ^ xor_ln49_8_fu_2243_p2.read());
}
void make_hash::thread_xor_ln49_19_fu_6017_p2() {
xor_ln49_19_fu_6017_p2 = (xor_ln46_24_fu_5665_p2.read() ^ xor_ln49_18_reg_15927.read());
}
void make_hash::thread_xor_ln49_1_fu_2201_p2() {
xor_ln49_1_fu_2201_p2 = (tmp_3_fu_737_p3.read() ^ tmp_27_fu_963_p3.read());
}
void make_hash::thread_xor_ln49_20_fu_6022_p2() {
xor_ln49_20_fu_6022_p2 = (xor_ln52_18_reg_15979.read() ^ xor_ln53_22_reg_15994.read());
}
void make_hash::thread_xor_ln49_21_fu_6026_p2() {
xor_ln49_21_fu_6026_p2 = (xor_ln49_20_fu_6022_p2.read() ^ xor_ln816_6_reg_15968.read());
}
void make_hash::thread_xor_ln49_22_fu_6031_p2() {
xor_ln49_22_fu_6031_p2 = (xor_ln49_21_fu_6026_p2.read() ^ xor_ln49_19_fu_6017_p2.read());
}
void make_hash::thread_xor_ln49_23_fu_6037_p2() {
xor_ln49_23_fu_6037_p2 = (xor_ln58_20_reg_16065.read() ^ xor_ln63_14_reg_16141.read());
}
void make_hash::thread_xor_ln49_24_fu_6041_p2() {
xor_ln49_24_fu_6041_p2 = (xor_ln64_16_reg_16158.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln49_25_fu_6046_p2() {
xor_ln49_25_fu_6046_p2 = (xor_ln49_24_fu_6041_p2.read() ^ xor_ln816_16_reg_16243.read());
}
void make_hash::thread_xor_ln49_26_fu_6051_p2() {
xor_ln49_26_fu_6051_p2 = (xor_ln49_25_fu_6046_p2.read() ^ xor_ln49_23_fu_6037_p2.read());
}
void make_hash::thread_xor_ln49_27_fu_6057_p2() {
xor_ln49_27_fu_6057_p2 = (xor_ln49_26_fu_6051_p2.read() ^ xor_ln49_22_fu_6031_p2.read());
}
void make_hash::thread_xor_ln49_29_fu_6063_p2() {
xor_ln49_29_fu_6063_p2 = (grp_fu_347_p2.read() ^ grp_fu_491_p3.read());
}
void make_hash::thread_xor_ln49_2_fu_2207_p2() {
xor_ln49_2_fu_2207_p2 = (xor_ln49_1_fu_2201_p2.read() ^ tmp_26_fu_955_p3.read());
}
void make_hash::thread_xor_ln49_30_fu_6069_p2() {
xor_ln49_30_fu_6069_p2 = (xor_ln49_29_fu_6063_p2.read() ^ grp_fu_571_p2.read());
}
void make_hash::thread_xor_ln49_31_fu_6075_p2() {
xor_ln49_31_fu_6075_p2 = (grp_fu_317_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln49_32_fu_6081_p2() {
xor_ln49_32_fu_6081_p2 = (xor_ln49_31_fu_6075_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln49_33_fu_6087_p2() {
xor_ln49_33_fu_6087_p2 = (grp_fu_213_p3.read() ^ grp_fu_245_p3.read());
}
void make_hash::thread_xor_ln49_34_fu_6093_p2() {
xor_ln49_34_fu_6093_p2 = (xor_ln49_33_fu_6087_p2.read() ^ grp_fu_551_p3.read());
}
void make_hash::thread_xor_ln49_35_fu_6099_p2() {
xor_ln49_35_fu_6099_p2 = (xor_ln49_34_fu_6093_p2.read() ^ xor_ln49_32_fu_6081_p2.read());
}
void make_hash::thread_xor_ln49_36_fu_6105_p2() {
xor_ln49_36_fu_6105_p2 = (xor_ln49_35_fu_6099_p2.read() ^ xor_ln49_30_fu_6069_p2.read());
}
void make_hash::thread_xor_ln49_37_fu_6111_p2() {
xor_ln49_37_fu_6111_p2 = (xor_ln49_36_fu_6105_p2.read() ^ xor_ln49_27_fu_6057_p2.read());
}
void make_hash::thread_xor_ln49_38_fu_9671_p2() {
xor_ln49_38_fu_9671_p2 = (xor_ln46_47_fu_9319_p2.read() ^ xor_ln49_37_reg_16414.read());
}
void make_hash::thread_xor_ln49_39_fu_9676_p2() {
xor_ln49_39_fu_9676_p2 = (xor_ln52_37_reg_16466.read() ^ xor_ln53_45_reg_16481.read());
}
void make_hash::thread_xor_ln49_3_fu_2213_p2() {
xor_ln49_3_fu_2213_p2 = (xor_ln49_2_fu_2207_p2.read() ^ xor_ln49_fu_2195_p2.read());
}
void make_hash::thread_xor_ln49_40_fu_9680_p2() {
xor_ln49_40_fu_9680_p2 = (xor_ln49_39_fu_9676_p2.read() ^ xor_ln816_24_reg_16455.read());
}
void make_hash::thread_xor_ln49_41_fu_9685_p2() {
xor_ln49_41_fu_9685_p2 = (xor_ln49_40_fu_9680_p2.read() ^ xor_ln49_38_fu_9671_p2.read());
}
void make_hash::thread_xor_ln49_42_fu_9691_p2() {
xor_ln49_42_fu_9691_p2 = (xor_ln58_41_reg_16552.read() ^ xor_ln63_29_reg_16628.read());
}
void make_hash::thread_xor_ln49_43_fu_9695_p2() {
xor_ln49_43_fu_9695_p2 = (xor_ln64_33_reg_16645.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln49_44_fu_9700_p2() {
xor_ln49_44_fu_9700_p2 = (xor_ln49_43_fu_9695_p2.read() ^ xor_ln816_34_reg_16730.read());
}
void make_hash::thread_xor_ln49_45_fu_9705_p2() {
xor_ln49_45_fu_9705_p2 = (xor_ln49_44_fu_9700_p2.read() ^ xor_ln49_42_fu_9691_p2.read());
}
void make_hash::thread_xor_ln49_46_fu_9711_p2() {
xor_ln49_46_fu_9711_p2 = (xor_ln49_45_fu_9705_p2.read() ^ xor_ln49_41_fu_9685_p2.read());
}
void make_hash::thread_xor_ln49_48_fu_9717_p2() {
xor_ln49_48_fu_9717_p2 = (grp_fu_347_p2.read() ^ grp_fu_491_p3.read());
}
void make_hash::thread_xor_ln49_49_fu_9723_p2() {
xor_ln49_49_fu_9723_p2 = (xor_ln49_48_fu_9717_p2.read() ^ grp_fu_571_p2.read());
}
void make_hash::thread_xor_ln49_4_fu_2219_p2() {
xor_ln49_4_fu_2219_p2 = (tmp_39_fu_1143_p3.read() ^ tmp_60_fu_1935_p3.read());
}
void make_hash::thread_xor_ln49_50_fu_9729_p2() {
xor_ln49_50_fu_9729_p2 = (grp_fu_317_p3.read() ^ grp_fu_383_p3.read());
}
void make_hash::thread_xor_ln49_51_fu_9735_p2() {
xor_ln49_51_fu_9735_p2 = (xor_ln49_50_fu_9729_p2.read() ^ grp_fu_197_p3.read());
}
void make_hash::thread_xor_ln49_52_fu_9741_p2() {
xor_ln49_52_fu_9741_p2 = (grp_fu_213_p3.read() ^ grp_fu_245_p3.read());
}
void make_hash::thread_xor_ln49_53_fu_9747_p2() {
xor_ln49_53_fu_9747_p2 = (xor_ln49_52_fu_9741_p2.read() ^ grp_fu_551_p3.read());
}
void make_hash::thread_xor_ln49_54_fu_9753_p2() {
xor_ln49_54_fu_9753_p2 = (xor_ln49_53_fu_9747_p2.read() ^ xor_ln49_51_fu_9735_p2.read());
}
void make_hash::thread_xor_ln49_55_fu_9759_p2() {
xor_ln49_55_fu_9759_p2 = (xor_ln49_54_fu_9753_p2.read() ^ xor_ln49_49_fu_9723_p2.read());
}
void make_hash::thread_xor_ln49_56_fu_9765_p2() {
xor_ln49_56_fu_9765_p2 = (xor_ln49_55_fu_9759_p2.read() ^ xor_ln49_46_fu_9711_p2.read());
}
void make_hash::thread_xor_ln49_57_fu_13307_p2() {
xor_ln49_57_fu_13307_p2 = (xor_ln46_70_fu_12955_p2.read() ^ xor_ln49_56_reg_16910.read());
}
void make_hash::thread_xor_ln49_58_fu_13312_p2() {
xor_ln49_58_fu_13312_p2 = (xor_ln52_56_reg_16962.read() ^ xor_ln53_68_reg_16977.read());
}
void make_hash::thread_xor_ln49_59_fu_13316_p2() {
xor_ln49_59_fu_13316_p2 = (xor_ln49_58_fu_13312_p2.read() ^ xor_ln816_42_reg_16951.read());
}
void make_hash::thread_xor_ln49_5_fu_2225_p2() {
xor_ln49_5_fu_2225_p2 = (tmp_5_fu_753_p3.read() ^ grp_fu_293_p3.read());
}
void make_hash::thread_xor_ln49_60_fu_13321_p2() {
xor_ln49_60_fu_13321_p2 = (xor_ln49_59_fu_13316_p2.read() ^ xor_ln49_57_fu_13307_p2.read());
}
void make_hash::thread_xor_ln49_61_fu_13327_p2() {
xor_ln49_61_fu_13327_p2 = (xor_ln58_62_reg_17048.read() ^ xor_ln63_44_reg_17124.read());
}
void make_hash::thread_xor_ln49_62_fu_13331_p2() {
xor_ln49_62_fu_13331_p2 = (xor_ln64_50_reg_17141.read() ^ grp_fu_293_p3.read());
}
}
| [
"rex-519@mail.ru"
] | rex-519@mail.ru |
8427a5f2d010fa09c9331b5927dc50a3ae04bd20 | f5a4b3e5803fc258aa5f9676293d811a9f07263d | /emetteurRFLINK_distance.ino | dfeba345e752b9befa75f54ac46672dad72323bd | [] | no_license | prunier/arduino | 80a45fd1ab883cd64c26e124d826a56a7e97dcae | f703eb889c3432732d4c735838da6fe0fb620bb4 | refs/heads/master | 2022-12-10T07:06:40.371777 | 2022-01-04T09:38:34 | 2022-01-04T09:38:34 | 104,798,942 | 0 | 0 | null | 2022-12-05T22:25:56 | 2017-09-25T20:30:11 | C++ | UTF-8 | C++ | false | false | 14,229 | ino | //**********************************************************
// Capteur de distance à ultrasons HC-SR04 avec Arduino nano
// avec émetteur RFLINK type Oregon
//
// Capteur de distance Trig -> pin 3 (pas 13)
// Capteur de distance Echo -> pin 2 (pas 12)
// Capteur de distance Haut-Parleur -> pin 9
// Emetteur RFLINK data -> pin 8
//**********************************************************
#include "LowPower.h"
#include <OneWire.h>
//**********************************************************
// Variables Globales
//**********************************************************
// ---------------------------------------
// partie Capteur de distance à ultrasons
// ---------------------------------------
#define trigPin 3 //Trig Ultrasons (sortie)
#define echoPin 2 //Echo Ultrasons (entrée)
int speakerPin = 9;
int length = 8; // le nombre de notes
char names[] = { 'D', 'R', 'M', 'F', 'S', 'L', 'I', 'd' };
int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };
char notes[] = "DRMFSLId"; // un espace = un repos
int beats[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4 };
int tempo = 300;
// ---------------------------------------
// Partie émetteur RFLINK type Oregon
// ---------------------------------------
#define DS18B20 0x28 // Adresse 1-Wire du DS18B20
#define BROCHE_ONEWIRE 10 // Broche utilisée pour le bus 1-Wire
OneWire ds(BROCHE_ONEWIRE); // Création de l'objet OneWire ds
#define THN132N
const byte TX_PIN = 8;
const unsigned long TIME = 512;
const unsigned long TWOTIME = TIME*2;
#define SEND_HIGH() digitalWrite(TX_PIN, HIGH)
#define SEND_LOW() digitalWrite(TX_PIN, LOW)
// Buffer for Oregon message
#ifdef THN132N
byte OregonMessageBuffer[8];
#else
byte OregonMessageBuffer[9];
#endif
//**********************************************************
// partie Capteur de distance à ultrasons
// TipTopBoards.com 06 01 2014 Rolland
// Càabler +5V et GND du détecteur sur l'arduino
//
// Capteur de distance Trig -> pin 3 (pas 13)
// Capteur de distance Echo -> pin 2 (pas 12)
//
//**********************************************************
/**
* \brief jouer un ton
* \param tone code ton
* \param duration durée milliseconde
*/
void playTone(int tone, int duration)
{
for (long i = 0; i < duration * 1000L; i += tone * 2)
{
digitalWrite(speakerPin, HIGH);
delayMicroseconds(tone);
digitalWrite(speakerPin, LOW);
delayMicroseconds(tone);
}
}
/**
* \brief jouer une note
* \param tone code note
* \param duration durée milliseconde
*/
void playNote(char note, int duration)
{
// jouer la tonalite correspondant au nom de la note
for (int i = 0; i < 8; i++) {
if (names[i] == note) {
playTone(tones[i], duration);
}
}
}
/**
* \brief jouer une fréquence selon la distance
* \param distance distance en cm
*/
void playFreq(int distance)
{
int tone= 1000 + (distance*10);
//Serial.println("tone = ");
//Serial.println(tone);
playTone(tone,tempo);
}
/**
* \brief jouer une mélodie
*/
void playMelody()
{
for (int i = 0; i < length; i++)
{
if (notes[i] == ' ')
{
delay(beats[i] * tempo); // repos
}
else
{
playNote(notes[i], beats[i] * tempo);
}
// pause entre les notes
delay(tempo / 2);
}
}
//**********************************************************
// partie émetteur RFLINK
// Emetteur RFLINK data -> pin 10 ?
//
//***********************************************************
/**
* \brief Send logical "0" over RF
* \details azero bit be represented by an off-to-on transition
* \ of the RF signal at the middle of a clock period.
* \ Remenber, the Oregon v2.1 protocol add an inverted bit first
*/
inline void sendZero(void)
{
SEND_HIGH();
delayMicroseconds(TIME);
SEND_LOW();
delayMicroseconds(TWOTIME);
SEND_HIGH();
delayMicroseconds(TIME);
}
/**
* \brief Send logical "1" over RF
* \details a one bit be represented by an on-to-off transition
* \ of the RF signal at the middle of a clock period.
* \ Remenber, the Oregon v2.1 protocol add an inverted bit first
*/
inline void sendOne(void)
{
SEND_LOW();
delayMicroseconds(TIME);
SEND_HIGH();
delayMicroseconds(TWOTIME);
SEND_LOW();
delayMicroseconds(TIME);
}
/**
* Send a bits quarter (4 bits = MSB from 8 bits value) over RF
*
* @param data Source data to process and sent
*/
/**
* \brief Send a bits quarter (4 bits = MSB from 8 bits value) over RF
* \param data Data to send
*/
inline void sendQuarterMSB(const byte data)
{
(bitRead(data, 4)) ? sendOne() : sendZero();
(bitRead(data, 5)) ? sendOne() : sendZero();
(bitRead(data, 6)) ? sendOne() : sendZero();
(bitRead(data, 7)) ? sendOne() : sendZero();
}
/**
* \brief Send a bits quarter (4 bits = LSB from 8 bits value) over RF
* \param data Data to send
*/
inline void sendQuarterLSB(const byte data)
{
(bitRead(data, 0)) ? sendOne() : sendZero();
(bitRead(data, 1)) ? sendOne() : sendZero();
(bitRead(data, 2)) ? sendOne() : sendZero();
(bitRead(data, 3)) ? sendOne() : sendZero();
}
/******************************************************************/
/******************************************************************/
/******************************************************************/
/**
* \brief Send a buffer over RF
* \param data Data to send
* \param size size of data to send
*/
void sendData(byte *data, byte size)
{
for(byte i = 0; i < size; ++i)
{
sendQuarterLSB(data[i]);
sendQuarterMSB(data[i]);
}
}
/**
* \brief Send an Oregon message
* \param data The Oregon message
*/
void sendOregon(byte *data, byte size)
{
sendPreamble();
//sendSync();
sendData(data, size);
sendPostamble();
}
/**
* \brief Send preamble
* \details The preamble consists of 16 "1" bits
*/
inline void sendPreamble(void)
{
byte PREAMBLE[]={0xFF,0xFF};
sendData(PREAMBLE, 2);
}
/**
* \brief Send postamble
* \details The postamble consists of 8 "0" bits
*/
inline void sendPostamble(void)
{
#ifdef THN132N
sendQuarterLSB(0x00);
#else
byte POSTAMBLE[]={0x00};
sendData(POSTAMBLE, 1);
#endif
}
/**
* \brief Send sync nibble
* \details The sync is 0xA. It is not use in this version since the sync nibble
* \ is include in the Oregon message to send.
*/
inline void sendSync(void)
{
sendQuarterLSB(0xA);
}
/******************************************************************/
/******************************************************************/
/******************************************************************/
/**
* \brief Set the sensor type
* \param data Oregon message
* \param type Sensor type
*/
inline void setType(byte *data, byte* type)
{
data[0] = type[0];
data[1] = type[1];
}
/**
* \brief Set the sensor channel
* \param data Oregon message
* \param channel Sensor channel (0x10, 0x20, 0x30)
*/
inline void setChannel(byte *data, byte channel)
{
data[2] = channel;
}
/**
* \brief Set the sensor ID
* \param data Oregon message
* \param ID Sensor unique ID
*/
inline void setId(byte *data, byte ID)
{
data[3] = ID;
}
/**
* \brief Set the sensor battery level
* \param data Oregon message
* \param level Battery level (0 = low, 1 = high)
*/
void setBatteryLevel(byte *data, byte level)
{
if(!level) data[4] = 0x0C;
else data[4] = 0x00;
}
/**
* \brief Set the sensor temperature
* \param data Oregon message
* \param temp the temperature
*/
void setTemperature(byte *data, float temp)
{
// Set temperature sign
if(temp < 0)
{
data[6] = 0x08;
temp *= -1;
}
else
{
data[6] = 0x00;
}
// Determine decimal and float part
int tempInt = (int)temp;
int td = (int)(tempInt / 10);
int tf = (int)round((float)((float)tempInt/10 - (float)td) * 10);
int tempFloat = (int)round((float)(temp - (float)tempInt) * 10);
// Set temperature decimal part
data[5] = (td << 4);
data[5] |= tf;
// Set temperature float part
data[4] |= (tempFloat << 4);
}
/**
* \brief Set the sensor humidity
* \param data Oregon message
* \param hum the humidity
*/
void setHumidity(byte* data, byte hum)
{
data[7] = (hum/10);
data[6] |= (hum - data[7]*10) << 4;
}
/**
* \brief Sum data for checksum
* \param count number of bit to sum
* \param data Oregon message
*/
int Sum(byte count, const byte* data)
{
int s = 0;
for(byte i = 0; i<count;i++)
{
s += (data[i]&0xF0) >> 4;
s += (data[i]&0xF);
}
if(int(count) != count)
s += (data[count]&0xF0) >> 4;
return s;
}
/**
* \brief Calculate checksum
* \param data Oregon message
*/
void calculateAndSetChecksum(byte* data)
{
#ifdef THN132N
int s = ((Sum(6, data) + (data[6]&0xF) - 0xa) & 0xff);
data[6] |= (s&0x0F) << 4; data[7] = (s&0xF0) >> 4;
#else
data[8] = ((Sum(8, data) - 0xa) & 0xFF);
#endif
}
/******************************************************************/
/******************************************************************/
// Fonction récupérant la température depuis le DS18B20
// Retourne true si tout va bien, ou false en cas d'erreur
boolean getTemperature(float *temp){
byte data[9], addr[8];
// data : Données lues depuis le scratchpad
// addr : adresse du module 1-Wire détecté
if (!ds.search(addr)) { // Recherche un module 1-Wire
ds.reset_search(); // Réinitialise la recherche de module
return false; // Retourne une erreur
}
if (OneWire::crc8(addr, 7) != addr[7]) // Vérifie que l'adresse a été correctement reçue
return false; // Si le message est corrompu on retourne une erreur
if (addr[0] != DS18B20) // Vérifie qu'il s'agit bien d'un DS18B20
return false; // Si ce n'est pas le cas on retourne une erreur
ds.reset(); // On reset le bus 1-Wire
ds.select(addr); // On sélectionne le DS18B20
ds.write(0x44, 1); // On lance une prise de mesure de température
delay(1000); // Et on attend la fin de la mesure
ds.reset(); // On reset le bus 1-Wire
ds.select(addr); // On sélectionne le DS18B20
ds.write(0xBE); // On envoie une demande de lecture du scratchpad
for (byte i = 0; i < 9; i++) // On lit le scratchpad
data[i] = ds.read(); // Et on stock les octets reçus
// Calcul de la température en degré Celsius
*temp = ((data[1] << 8) | data[0]) * 0.0625;
// Pas d'erreur
return true;
}
//**********************************************************
// setup
//**********************************************************
void setup() {
// ---------------------------------------
// partie Capteur de distance à ultrasons
// ---------------------------------------
Serial.begin (9600);
pinMode(trigPin, OUTPUT); //Trig est une sortie
pinMode(echoPin, INPUT); //Echo est le retour, en entrée
//pinMode(ledVerte, OUTPUT);
//pinMode(ledRouge, OUTPUT);
Serial.println("\nCapteur de distance à ultrasons");
pinMode(speakerPin, OUTPUT);
// ---------------------------------------
// Partie émetteur RFLINK type Oregon
// ---------------------------------------
digitalWrite(13,LOW);
pinMode(TX_PIN, OUTPUT);
//Serial.begin(38400);
Serial.println("\n[Oregon V2.1 encoder]");
SEND_LOW();
#ifdef THN132N
// Create the Oregon message for a temperature only sensor (TNHN132N)
byte ID[] = {0xEA,0x4C};
#else
// Create the Oregon message for a temperature/humidity sensor (THGR2228N)
byte ID[] = {0x1A,0x2D};
#endif
setType(OregonMessageBuffer, ID);
setChannel(OregonMessageBuffer, 0x20);
setId(OregonMessageBuffer, 0xBB);
}
//**********************************************************
// loop
//**********************************************************
void loop() {
// ---------------------------------------
// partie Capteur de distance à ultrasons
// ---------------------------------------
long duration;
float distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10); //Trig déclenché 10ms sur HIGH
digitalWrite(trigPin, LOW);
// Calcul de l'écho
duration = pulseIn(echoPin, HIGH);
// Distance proportionnelle à la durée de sortie
distance = duration*340/(2*10000); //Vitesse du son théorique
//Serial.print(distance);
//Serial.print(" cm ");
//Hors de portée (duration)
if ( distance <= 0){
//Serial.print(duration);
Serial.println("Hors de portee");
} else {
playFreq(distance);
Serial.print(distance);
Serial.print(" cm ");
// RFLINK
setBatteryLevel(OregonMessageBuffer, 0); // 0 : low, 1 : high
setTemperature(OregonMessageBuffer, distance);
// Calculate the checksum
calculateAndSetChecksum(OregonMessageBuffer);
// Show the Oregon Message
for (byte i = 0; i < sizeof(OregonMessageBuffer); ++i) {
Serial.print(OregonMessageBuffer[i] >> 4, HEX);
Serial.print(OregonMessageBuffer[i] & 0x0F, HEX);
}
// Send the Message over RF
sendOregon(OregonMessageBuffer, sizeof(OregonMessageBuffer));
// Send a "pause"
SEND_LOW();
delayMicroseconds(TWOTIME*8);
// Send a copie of the first message. The v2.1 protocol send the
// message two time
sendOregon(OregonMessageBuffer, sizeof(OregonMessageBuffer));
// Wait for 30 seconds before send a new message
SEND_LOW();
// LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
// LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
// LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
// LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
// capteur distance
delay(100); //0.1 sec entre deux mesures
} // if ( distance <= 0){
} //loop
| [
"noreply@github.com"
] | prunier.noreply@github.com |
d1125603f97352ea79a82c531b35dee0bb844598 | 30a34b3503decf1b4516039df3106cd152631819 | /4AL17IS024_MAYURESH_KUNDER/PradeepSir_Coding_Challenge/Coding_Challenge_3/SumSeries.cpp | 107e6aa1348b1515e209676fbb16056d68561335 | [] | no_license | alvas-education-foundation/ISE_3rd_Year_Coding_challenge | 8ddb6c325bf6ab63e2f73d16573fa0b6e2484136 | b4074cab4a47aad07ed0fa426eacccbfafdef7f8 | refs/heads/master | 2022-11-23T20:52:19.204693 | 2020-07-23T11:28:15 | 2020-07-23T11:28:15 | 265,195,514 | 4 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 247 | cpp | //sum
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
long i,n,x,sum=1;
cout<<“1+x+x^2+……+x^n”;
cout<<“nnEnter the value of x and n:”;
cin>>x>>n;
for(i=1;i<=n;++i)
sum+=pow(x,i);
cout<<“nSum=”<<sum;
} | [
"kundermayuresh249@gmail.com"
] | kundermayuresh249@gmail.com |
705e58942473e24b539a19bb4328bf0c0327ed30 | f6439b5ed1614fd8db05fa963b47765eae225eb5 | /components/usb_service/usb_service_impl.cc | 88aa98f676d5cfe7b5b05b6a5c33228e941132fe | [
"BSD-3-Clause"
] | permissive | aranajhonny/chromium | b8a3c975211e1ea2f15b83647b4d8eb45252f1be | caf5bcb822f79b8997720e589334266551a50a13 | refs/heads/master | 2021-05-11T00:20:34.020261 | 2018-01-21T03:31:45 | 2018-01-21T03:31:45 | 118,301,142 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,800 | cc | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/usb_service/usb_service.h"
#include <map>
#include <set>
#include "base/lazy_instance.h"
#include "base/message_loop/message_loop.h"
#include "base/stl_util.h"
#include "components/usb_service/usb_context.h"
#include "components/usb_service/usb_device_impl.h"
#include "components/usb_service/usb_error.h"
#include "content/public/browser/browser_thread.h"
#include "third_party/libusb/src/libusb/libusb.h"
namespace usb_service {
namespace {
base::LazyInstance<scoped_ptr<UsbService> >::Leaky g_usb_service_instance =
LAZY_INSTANCE_INITIALIZER;
} // namespace
typedef struct libusb_device* PlatformUsbDevice;
typedef struct libusb_context* PlatformUsbContext;
class UsbServiceImpl
: public UsbService,
private base::MessageLoop::DestructionObserver {
public:
explicit UsbServiceImpl(PlatformUsbContext context);
virtual ~UsbServiceImpl();
private:
// usb_service::UsbService implementation
virtual scoped_refptr<UsbDevice> GetDeviceById(uint32 unique_id) OVERRIDE;
virtual void GetDevices(
std::vector<scoped_refptr<UsbDevice> >* devices) OVERRIDE;
// base::MessageLoop::DestructionObserver implementation.
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
// Enumerate USB devices from OS and Update devices_ map.
void RefreshDevices();
scoped_refptr<UsbContext> context_;
// TODO(ikarienator): Figure out a better solution.
uint32 next_unique_id_;
// The map from PlatformUsbDevices to UsbDevices.
typedef std::map<PlatformUsbDevice, scoped_refptr<UsbDeviceImpl> > DeviceMap;
DeviceMap devices_;
DISALLOW_COPY_AND_ASSIGN(UsbServiceImpl);
};
scoped_refptr<UsbDevice> UsbServiceImpl::GetDeviceById(uint32 unique_id) {
DCHECK(CalledOnValidThread());
RefreshDevices();
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
if (it->second->unique_id() == unique_id)
return it->second;
}
return NULL;
}
void UsbServiceImpl::GetDevices(
std::vector<scoped_refptr<UsbDevice> >* devices) {
DCHECK(CalledOnValidThread());
STLClearObject(devices);
RefreshDevices();
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
devices->push_back(it->second);
}
}
void UsbServiceImpl::WillDestroyCurrentMessageLoop() {
DCHECK(CalledOnValidThread());
g_usb_service_instance.Get().reset(NULL);
}
UsbServiceImpl::UsbServiceImpl(PlatformUsbContext context)
: context_(new UsbContext(context)), next_unique_id_(0) {
base::MessageLoop::current()->AddDestructionObserver(this);
}
UsbServiceImpl::~UsbServiceImpl() {
base::MessageLoop::current()->RemoveDestructionObserver(this);
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
it->second->OnDisconnect();
}
}
void UsbServiceImpl::RefreshDevices() {
DCHECK(CalledOnValidThread());
libusb_device** platform_devices = NULL;
const ssize_t device_count =
libusb_get_device_list(context_->context(), &platform_devices);
if (device_count < 0) {
VLOG(1) << "Failed to get device list: "
<< ConvertErrorToString(device_count);
}
std::set<UsbDevice*> connected_devices;
std::vector<PlatformUsbDevice> disconnected_devices;
// Populates new devices.
for (ssize_t i = 0; i < device_count; ++i) {
if (!ContainsKey(devices_, platform_devices[i])) {
libusb_device_descriptor descriptor;
const int rv =
libusb_get_device_descriptor(platform_devices[i], &descriptor);
// This test is needed. A valid vendor/produce pair is required.
if (rv != LIBUSB_SUCCESS) {
VLOG(1) << "Failed to get device descriptor: "
<< ConvertErrorToString(rv);
continue;
}
UsbDeviceImpl* new_device = new UsbDeviceImpl(context_,
platform_devices[i],
descriptor.idVendor,
descriptor.idProduct,
++next_unique_id_);
devices_[platform_devices[i]] = new_device;
connected_devices.insert(new_device);
} else {
connected_devices.insert(devices_[platform_devices[i]].get());
}
}
// Find disconnected devices.
for (DeviceMap::iterator it = devices_.begin(); it != devices_.end(); ++it) {
if (!ContainsKey(connected_devices, it->second)) {
disconnected_devices.push_back(it->first);
}
}
// Remove disconnected devices from devices_.
for (size_t i = 0; i < disconnected_devices.size(); ++i) {
// UsbDevice will be destroyed after this. The corresponding
// PlatformUsbDevice will be unref'ed during this process.
devices_.erase(disconnected_devices[i]);
}
libusb_free_device_list(platform_devices, true);
}
// static
UsbService* UsbService::GetInstance() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
UsbService* instance = g_usb_service_instance.Get().get();
if (!instance) {
PlatformUsbContext context = NULL;
const int rv = libusb_init(&context);
if (rv != LIBUSB_SUCCESS) {
VLOG(1) << "Failed to initialize libusb: " << ConvertErrorToString(rv);
return NULL;
}
if (!context)
return NULL;
instance = new UsbServiceImpl(context);
g_usb_service_instance.Get().reset(instance);
}
return instance;
}
// static
void UsbService::SetInstanceForTest(UsbService* instance) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
g_usb_service_instance.Get().reset(instance);
}
} // namespace usb_service
| [
"jhonnyjosearana@gmail.com"
] | jhonnyjosearana@gmail.com |
13d6112e4064d1ae87c5f97ad7dac5b82c976a19 | 881f7c1b2ffc0e292c50385e2c202fde10fbb301 | /include/thectci/factory.hpp | 0aa01a783110b5fae6238bbfc340dc6c3d9e4006 | [
"MIT"
] | permissive | PeterHajdu/thectci | 322b64236564d77856d04c903a9a6ab50dbdf8df | 7ffe4c7d8ccbf55490e155f93ef8637d6f9c4119 | refs/heads/master | 2021-01-23T17:32:11.156279 | 2015-04-29T10:20:40 | 2015-04-29T10:20:40 | 21,159,578 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,543 | hpp | #pragma once
#include <thectci/id.hpp>
#include <memory>
#include <cassert>
#include <functional>
#include <unordered_map>
namespace the
{
namespace ctci
{
template < typename Base >
class Creator
{
public:
typedef std::unique_ptr< Base > base_pointer;
virtual ~Creator() {}
virtual base_pointer create() = 0;
};
template < typename Base, typename Child >
class ExactCreator : public Creator< Base >
{
public:
typedef std::unique_ptr< Base > base_pointer;
base_pointer create() override
{
return std::unique_ptr< Base >( new Child() );
}
};
template < typename Base >
class Factory
{
public:
typedef std::unique_ptr< Base > base_pointer;
typedef Creator< Base > BaseCreator;
void register_creator( Id class_id, BaseCreator& base_creator )
{
assert( !is_registered( class_id ) );
m_creators.emplace( std::make_pair( class_id, std::ref( base_creator ) ) );
}
base_pointer create( Id class_id ) const
{
typename Creators::const_iterator creator_iterator( m_creators.find( class_id ) );
if ( creator_iterator == end( m_creators ) )
{
return base_pointer( nullptr );
}
return creator_iterator->second.get().create();
}
bool is_registered( Id class_id ) const
{
return m_creators.find( class_id ) != m_creators.end();
}
private:
typedef std::reference_wrapper< BaseCreator > CreatorReference;
typedef std::unordered_map< Id, CreatorReference > Creators;
Creators m_creators;
};
}
}
| [
"peter.ferenc.hajdu@gmail.com"
] | peter.ferenc.hajdu@gmail.com |
3eecc5ca244828c49d2552eed3fe5eefd704510b | 4eb607f789578a9457ee8d686b7ba78d49f0c9b7 | /p3-largest-prime-factor.cpp | f33fefcf480738b06f06e0180820e8e98ca841ec | [] | no_license | murali026/mmurepo026 | f7e745a54239b093276023d5530efc5b4920f2b2 | bf5feeaeac215774dfbff6b4b8203aaf792de0b2 | refs/heads/master | 2022-04-17T03:49:03.362802 | 2020-04-09T23:13:14 | 2020-04-09T23:13:14 | 110,778,842 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 832 | cpp | #include<iostream>
#include<set>
using namespace std;
bool is_prime(long num) {
long i = 2;
long cur = num;
while(i < cur) {
if(num%i == 0) {
return false;
}
i++;
}
cout << num << " is a prime" << endl;
return true;
}
bool factors(long num, set<long>& fSet) {
long cur = num;
long i = 2;
while(i <= cur) {
if(num%i == 0) {
long fact = num/i;
cur = fact;
cout << i << " and " << fact << " are factors" << endl;
is_prime(cur);
is_prime(i);
fSet.insert(i);
fSet.insert(cur);
}
i++;
}
return true;
}
int main() {
long int num = 600851475143;
//long int num = 13195;
set<long> factorSet;
factors(num, factorSet);
return 0;
}
| [
"murali026@gmail.com"
] | murali026@gmail.com |
69c7b8b94d520b43d81fabfb241ec6b89918df2a | cab45323cadc79bf4d697925cb537219715c42e4 | /robot-simulator/robot_simulator.cpp | d3615fd695e7acbba9c7c6fdb11da173029366cb | [] | no_license | thefullarcticfox/cpp_exercisms | 94df1ac995ddbe764dadd65b59b2259d54341ea9 | 0e6cd10dd3c86ee393bf72ac759f4e2b6872e62b | refs/heads/master | 2023-04-21T00:57:14.911163 | 2021-05-12T17:04:36 | 2021-05-12T17:04:36 | 352,470,044 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,177 | cpp | #include "robot_simulator.h"
#include <stdexcept>
#include <cctype>
namespace robot_simulator {
Robot::Robot(pair<int, int> pos, Bearing dir) : pos(pos), dir(dir),
fmap({ { 'L', &Robot::turn_left },
{ 'R', &Robot::turn_right },
{ 'A', &Robot::advance }}) {}
pair<int, int> Robot::get_position() const {
return (this->pos);
}
Bearing Robot::get_bearing() const {
return (this->dir);
}
void Robot::turn_left() {
if (dir == Bearing::NORTH)
dir = Bearing::WEST;
else
dir = static_cast<Bearing>((static_cast<int>(dir) - 1) % 4);
}
void Robot::turn_right() {
dir = static_cast<Bearing>((static_cast<int>(dir) + 1) % 4);
}
void Robot::advance() {
if (dir == Bearing::NORTH)
++(pos.second);
else if (dir == Bearing::EAST)
++(pos.first);
else if (dir == Bearing::SOUTH)
--(pos.second);
else if (dir == Bearing::WEST)
--(pos.first);
}
void Robot::execute_sequence(const string& seq) {
for (auto& i : seq) {
try {
(this->*fmap.at(std::toupper(i)))();
} catch (const std::out_of_range& e) {
throw std::invalid_argument("unknown instruction in sequence");
}
}
}
} // namespace robot_simulator
| [
"thefullarcticfox@users.noreply.github.com"
] | thefullarcticfox@users.noreply.github.com |
3854b53ebcd58d1e5d9cb39826bd125199f64e01 | 3a3b09e11c0954865616c556a4a26580b58dd0de | /src/test/test_controller_adapter.cpp | 21bd636304159bca26bcca1d0b6ec929cc35c667 | [] | no_license | Stefan4472/TestC-Game | ed7e4d69a008b51c29bcd811c3f0dc43bb363bdd | f09f194517c0929706acdb9374658251690ab620 | refs/heads/master | 2021-07-14T21:02:49.139070 | 2021-06-28T14:22:58 | 2021-06-28T14:22:58 | 115,226,791 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,593 | cpp | // tests controller adapter via keyboard input
#include <SDL2/SDL.h>
#include <stdio.h>
#include "controller_adapter.h"
bool init();
void close();
SDL_Window* gWindow = NULL;
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
// test listener class
class TestControlReceiver : public ControllerListener
{
void onControlStart(GAME_CONTROLS gameControl)
{
printf("Control %d started\n", gameControl);
}
void onControlEnd(GAME_CONTROLS gameControl)
{
printf("Control %d ended\n", gameControl);
}
};
int main()
{
init();
ControllerAdapter control_adapter;
TestControlReceiver receiver;
control_adapter.setListener(&receiver);
SDL_Event e;
bool quit = false;
// main loop
while (!quit)
{
// handle events on queue
while( SDL_PollEvent( &e ) != 0 )
{
if( e.type == SDL_QUIT )
{
quit = true;
}
else if (control_adapter.handleKeyEvent(e))
{
}
else
{
}
}
}
close();
}
bool init()
{
//Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
printf( "SDL could not initialize! SDL Error: %s\n", SDL_GetError() );
return false;
}
// create window
gWindow = SDL_CreateWindow( "Animation Test", 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() );
return false;
}
return true;
}
void close()
{
// destroy window
SDL_DestroyWindow( gWindow );
gWindow = NULL;
printf("Destroyed Window\n");
SDL_Quit();
printf("Quit SDL\n");
}
| [
"stefan.kussmaul@gmail.com"
] | stefan.kussmaul@gmail.com |
a3000896effbf2b77776e9bdf01e7b8ed6340311 | 7e0c28dd83ae6fdf23caf0ab7e34e67bf0b22620 | /Source/ProgressTimer/Public/ProgressTimer.h | 993c8a0a563935fb4ef6e3da4482d564806af182 | [] | no_license | 1097195326/SmallWorld | fd32b1c1ec1feb6d577ed5e38747c458114f666f | 4bde46145d8091b0b375a573860a9ca728c9ccb7 | refs/heads/master | 2023-05-25T16:18:03.710953 | 2020-06-17T04:04:37 | 2020-06-17T04:04:37 | 170,458,832 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 306 | h | // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ModuleManager.h"
class PROGRESSTIMER_API FProgressTimer : public IModuleInterface
{
public:
/** IModuleInterface implementation */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};
| [
"1097195326@qq.com"
] | 1097195326@qq.com |
50f6017d69ac8685aaff353365a59ae48e90250e | 2821320191f71f01182de5c78e5494b4ff71225e | /Graph/src/Edge.cpp | e7d4dfccc5cebb79a84a7a04a4a7cf1804357654 | [] | no_license | baoxd/data-structure | 9627f0de1bb8b802588cf686a5c2f9781b0df9a6 | 0244e1c55b8d5682c80dcae13d057b1d1314cce8 | refs/heads/master | 2021-01-22T19:35:59.933681 | 2017-11-28T08:13:57 | 2017-11-28T08:13:57 | 102,420,863 | 4 | 0 | null | null | null | null | WINDOWS-1252 | C++ | false | false | 279 | cpp | /*
* Edge.cpp
*
* Created on: 2017Äê9ÔÂ19ÈÕ
* Author: baoxd
*/
#include "Edge.h"
Edge::Edge(int nodeIndexA , int nodeIndexB, int weightValue)
{
m_iNodeIndexA = nodeIndexA;
m_iNodeIndexB = nodeIndexB;
m_iWeightValue = weightValue;
m_bSelected = false;
}
| [
"1459815090@qq.com"
] | 1459815090@qq.com |
8c413c507efbaed6d41a6631172df85cf72147c0 | 612325535126eaddebc230d8c27af095c8e5cc2f | /src/net/http/http_auth_handler_factory.h | 455edb12b0edf2cf4e67d82aaac56a1e9c52a309 | [
"BSD-3-Clause"
] | permissive | TrellixVulnTeam/proto-quic_1V94 | 1a3a03ac7a08a494b3d4e9857b24bb8f2c2cd673 | feee14d96ee95313f236e0f0e3ff7719246c84f7 | refs/heads/master | 2023-04-01T14:36:53.888576 | 2019-10-17T02:23:04 | 2019-10-17T02:23:04 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,783 | h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
#define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "base/macros.h"
#include "net/base/net_export.h"
#include "net/http/http_auth.h"
#include "net/http/url_security_manager.h"
class GURL;
namespace net {
class HostResolver;
class HttpAuthChallengeTokenizer;
class HttpAuthHandler;
class HttpAuthHandlerRegistryFactory;
class HttpAuthPreferences;
class NetLogWithSource;
// An HttpAuthHandlerFactory is used to create HttpAuthHandler objects.
// The HttpAuthHandlerFactory object _must_ outlive any of the HttpAuthHandler
// objects that it creates.
class NET_EXPORT HttpAuthHandlerFactory {
public:
enum CreateReason {
CREATE_CHALLENGE, // Create a handler in response to a challenge.
CREATE_PREEMPTIVE, // Create a handler preemptively.
};
HttpAuthHandlerFactory() : http_auth_preferences_(NULL) {}
virtual ~HttpAuthHandlerFactory() {}
// Sets the source of the HTTP authentication preferences.
// HttpAuthHandlerFactory doesn't own the preferences, and the
// HttpAuthPreferences object should outlive the factory and any handlers it
// creates.
void set_http_auth_preferences(
const HttpAuthPreferences* http_auth_preferences) {
http_auth_preferences_ = http_auth_preferences;
}
// Retrieves the associated URL security manager.
const HttpAuthPreferences* http_auth_preferences() {
return http_auth_preferences_;
}
// Creates an HttpAuthHandler object based on the authentication
// challenge specified by |*challenge|. |challenge| must point to a valid
// non-NULL tokenizer.
//
// If an HttpAuthHandler object is successfully created it is passed back to
// the caller through |*handler| and OK is returned.
//
// If |*challenge| specifies an unsupported authentication scheme, |*handler|
// is set to NULL and ERR_UNSUPPORTED_AUTH_SCHEME is returned.
//
// If |*challenge| is improperly formed, |*handler| is set to NULL and
// ERR_INVALID_RESPONSE is returned.
//
// |create_reason| indicates why the handler is being created. This is used
// since NTLM and Negotiate schemes do not support preemptive creation.
//
// |digest_nonce_count| is specifically intended for the Digest authentication
// scheme, and indicates the number of handlers generated for a particular
// server nonce challenge.
//
// |ssl_info| is valid if the authentication session is being established over
// a secure connection.
//
// For the NTLM and Negotiate handlers:
// If |origin| does not match the authentication method's filters for
// the specified |target|, ERR_INVALID_AUTH_CREDENTIALS is returned.
// NOTE: This will apply to ALL |origin| values if the filters are empty.
//
// |*challenge| should not be reused after a call to |CreateAuthHandler()|,
virtual int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
CreateReason create_reason,
int digest_nonce_count,
const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) = 0;
// Creates an HTTP authentication handler based on the authentication
// challenge string |challenge|.
// This is a convenience function which creates a ChallengeTokenizer for
// |challenge| and calls |CreateAuthHandler|. See |CreateAuthHandler| for
// more details on return values.
int CreateAuthHandlerFromString(const std::string& challenge,
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler);
// Creates an HTTP authentication handler based on the authentication
// challenge string |challenge|.
// This is a convenience function which creates a ChallengeTokenizer for
// |challenge| and calls |CreateAuthHandler|. See |CreateAuthHandler| for
// more details on return values.
int CreatePreemptiveAuthHandlerFromString(
const std::string& challenge,
HttpAuth::Target target,
const GURL& origin,
int digest_nonce_count,
const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler);
// Creates a standard HttpAuthHandlerRegistryFactory. The caller is
// responsible for deleting the factory.
// The default factory supports Basic, Digest, NTLM, and Negotiate schemes.
//
// |resolver| is used by the Negotiate authentication handler to perform
// CNAME lookups to generate a Kerberos SPN for the server. It must be
// non-NULL. |resolver| must remain valid for the lifetime of the
// HttpAuthHandlerRegistryFactory and any HttpAuthHandlers created by said
// factory.
static std::unique_ptr<HttpAuthHandlerRegistryFactory> CreateDefault(
HostResolver* resolver);
private:
// The preferences for HTTP authentication.
const HttpAuthPreferences* http_auth_preferences_;
DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerFactory);
};
// The HttpAuthHandlerRegistryFactory dispatches create requests out
// to other factories based on the auth scheme.
class NET_EXPORT HttpAuthHandlerRegistryFactory
: public HttpAuthHandlerFactory {
public:
HttpAuthHandlerRegistryFactory();
~HttpAuthHandlerRegistryFactory() override;
// Sets the preferences into the factory associated with |scheme|.
void SetHttpAuthPreferences(const std::string& scheme,
const HttpAuthPreferences* prefs);
// Registers a |factory| that will be used for a particular HTTP
// authentication scheme such as Basic, Digest, or Negotiate.
// The |*factory| object is assumed to be new-allocated, and its lifetime
// will be managed by this HttpAuthHandlerRegistryFactory object (including
// deleting it when it is no longer used.
// A NULL |factory| value means that HttpAuthHandlers's will not be created
// for |scheme|. If a factory object used to exist for |scheme|, it will be
// deleted.
void RegisterSchemeFactory(const std::string& scheme,
HttpAuthHandlerFactory* factory);
// Retrieve the factory for the specified |scheme|. If no factory exists
// for the |scheme|, NULL is returned. The returned factory must not be
// deleted by the caller, and it is guaranteed to be valid until either
// a new factory is registered for the same scheme, or until this
// registry factory is destroyed.
HttpAuthHandlerFactory* GetSchemeFactory(const std::string& scheme) const;
// Creates an HttpAuthHandlerRegistryFactory.
//
// |prefs| is a pointer to the (single) authentication preferences object.
// That object tracks preference, and hence policy, updates relevant to HTTP
// authentication, and provides the current values of the preferences.
//
// |host_resolver| is used by the Negotiate authentication handler to perform
// CNAME lookups to generate a Kerberos SPN for the server. If the "negotiate"
// scheme is used and |negotiate_disable_cname_lookup| is false,
// |host_resolver| must not be NULL.
static std::unique_ptr<HttpAuthHandlerRegistryFactory> Create(
const HttpAuthPreferences* prefs,
HostResolver* host_resolver);
// Creates an auth handler by dispatching out to the registered factories
// based on the first token in |challenge|.
int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
HttpAuth::Target target,
const SSLInfo& ssl_info,
const GURL& origin,
CreateReason reason,
int digest_nonce_count,
const NetLogWithSource& net_log,
std::unique_ptr<HttpAuthHandler>* handler) override;
private:
using FactoryMap =
std::map<std::string, std::unique_ptr<HttpAuthHandlerFactory>>;
FactoryMap factory_map_;
DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory);
};
} // namespace net
#endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
| [
"2100639007@qq.com"
] | 2100639007@qq.com |
605822b74f8d31161d218b1c5dcd3ab94e19bbf6 | 270ab1f1040cd4f24751a81e4816d3bbcbd472c0 | /algorithms/240.Search_a_2D_Matrix_II/Search_a_2D_Matrix_II.cpp | 5a5327bf24271560f75a4d0cbcf9b42390743749 | [] | no_license | svcgv/leetcode | dd61add37eac451559d92e5a5f3bb7ab7f93a09e | 5c2910e1f73b1ab8a63980f60ce8287a7fe86c96 | refs/heads/master | 2021-05-16T09:01:34.870483 | 2017-03-04T12:59:37 | 2017-03-04T12:59:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 848 | cpp | <<<<<<< HEAD
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int i = 0;
int j = matrix[0].size() - 1;
while(i < matrix.size() && j >= 0) {
if(matrix[i][j] == target)
return true;
if(matrix[i][j] < target)
i++;
else
j--;
}
return false;
}
};
int main() {
return 0;
}
=======
#include <bits/stdc++.h>
using namespace std;
class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int i = 0;
int j = matrix[0].size() - 1;
while(i < matrix.size() && j >= 0) {
if(matrix[i][j] == target)
return true;
if(matrix[i][j] < target)
i++;
else
j--;
}
return false;
}
};
int main() {
return 0;
}
>>>>>>> 6200c8704614e918c8bfa5357c648dd1b4f7eb74
| [
"1012351692@qq.com"
] | 1012351692@qq.com |
1ccf31e1ec98238f21a235694d7ca811e53b6d8a | 55927a91b157766732ffaf9d53911fff5aeb7da8 | /Easy/225_MyStack/225_MyStack/main.cpp | 1b3af8318cd6ade63308565c56d129abaa5b0ed1 | [
"MIT"
] | permissive | yangbingjie/Leetcode | 3721cc4dd4b16a8dacc4b1d710c75fa5cffcf350 | 2f1e386cfb8b2d7d49cf0e7dcf0bce1c936e1916 | refs/heads/master | 2021-06-26T13:51:51.837136 | 2021-03-30T10:45:18 | 2021-03-30T10:45:18 | 224,658,947 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,787 | cpp | //
// main.cpp
// 225_MyStack
//
// Created by Bella Yang on 2019/11/18.
// Copyright © 2019 Bella Yang. All rights reserved.
//
#include <iostream>
#include <queue>
using namespace std;
class MyStack {
private:
queue<int> q1;
queue<int> q2;
bool is_q1;
public:
/** Initialize your data structure here. */
MyStack() {
this->is_q1 = false;
}
/** Push element x onto stack. */
void push(int x) {
if (this->is_q1) {
q2.push(x);
while (!q1.empty()) {
q2.push(q1.front());
q1.pop();
}
}else{
q1.push(x);
while (!q2.empty()) {
q1.push(q2.front());
q2.pop();
}
}
this->is_q1 = !this->is_q1;
}
/** Removes the element on top of the stack and returns that element. */
int pop() {
int top;
if (this->is_q1) {
top = q1.front();
q1.pop();
}else{
top = q2.front();
q2.pop();
}
return top;
}
/** Get the top element. */
int top() {
if (this->is_q1) {
return q1.front();
}else{
return q2.front();
}
}
/** Returns whether the stack is empty. */
bool empty() {
if (this->is_q1) {
return q1.empty();
}else{
return q2.empty();
}
}
};
int main(int argc, const char * argv[]) {
MyStack stack = MyStack();
stack.push(1);
stack.push(2);
stack.push(3);
stack.push(4);
cout << stack.top() << endl; // returns 2
cout << stack.pop() << endl; // returns 2
cout << stack.empty() << endl; // returns false
return 0;
}
| [
"yangbingjie1997@gmail.com"
] | yangbingjie1997@gmail.com |
0276648deaf5f6221adfbd9959c5bac2d154b21c | 3c335c0c01c9bc9c6c18d8f0b0152368f6980907 | /SelectionSort.cpp | fd60d7f499bc6c366f6efd9ed0e730f55732f9e0 | [] | no_license | laisdutra/SortingAlgorithms | 839ee078ab46f19909f0e43381b3b04f6105771b | 3c4b2cfb5e7598a5a22a31bf17b1a4313aab7ad1 | refs/heads/master | 2020-12-24T01:24:19.733431 | 2020-02-01T19:56:47 | 2020-02-01T19:56:47 | 183,835,425 | 0 | 0 | null | null | null | null | ISO-8859-1 | C++ | false | false | 765 | cpp | /*
- A cada passo, procura o menor valor do vetor e o coloca na primeira posição;
- Descarta-se a primeira posição do vetor e repete-se o processo para a segunda posição;
- Feito para todos os n elementos;
- Melhor caso: O(n^2)
- Caso médio: O(n^2)
- Pior caso: O(n^2)
- Um dos algoritmos mais rápidos para vetores pequenos
- Um dos mais lentos para grandes conjuntos de dados
*/
void selectionSort(int *v, int n){
int i_minimo, aux;
for(int i=0; i<n-1; i++){
i_minimo = i;
for(int k=i+1; k<n; k++){
if(v[k] < v[i_minimo]){
i_minimo = k;
}
}
if(v[i] != v[i_minimo]){
aux = v[i];
v[i] = v[i_minimo];
v[i_minimo] = aux;
}
}
}
| [
"laisgdtr@gmail.com"
] | laisgdtr@gmail.com |
6a1cfb171049107eca0a609e0df0a8ea1769fc58 | 71599d9781f65a725e450208944c069a5b062358 | /poj/poj-1155.cpp | 998d6d956e106c91f0c8dfc406a8d0ddee80ab3a | [] | no_license | shuangde/ACM-ICPC-Record | 74babe24f5fe13ea5b9d33b29de5af138eef54cc | 1f450d543e7c434af84c0dcaf9de752956aef94f | refs/heads/master | 2021-01-17T12:07:19.159554 | 2014-08-16T08:04:02 | 2014-08-16T08:04:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,406 | cpp | /**==========================================
* This is a solution for ACM/ICPC problem
*
* @source:poj-1155 TELE
* @author: shuangde
* @blog: blog.csdn.net/shuangde800
* @email: zengshuangde@gmail.com
* Copyright (C) 2013/08/18 19:29 All rights reserved.
*======================================================*/
/*
题意
某收费有线电视网计划转播一场重要的足球比赛。他们的转播网和用户终端构成一棵树状结构,
这棵树的根结点位于足球比赛的现场,树叶为各个用户终端,其他中转站为该树的内部节点。
从转播站到转播站以及从转播站到所有用户终端的信号传输费用都是已知的,一场转播的总费用等于传输信号的费用总和。
现在每个用户都准备了一笔费用想观看这场精彩的足球比赛,有线电视网有权决定给哪些用户提供信号而不给哪些用户提供信号。
写一个程序找出一个方案使得有线电视网在不亏本的情况下使观看转播的用户尽可能多。
思路
树形背包的入门题。
f(i, j),表示子树i转播给j个用户的最大收益值
这题可以看作是树上的分组背包,每个子树看作是一组物品,这一组物品可以取1个,2个...j个
然后就是套用分组背包的算法了
f(i, 1) = w(i), 当点i是叶子节点时
f(i, j) = max{ f(i, j-k) + f[v][k] - w(i, v) | v是i的儿子节点, 0<=k<=j}
*/
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <cstring>
#define MP make_pair
using namespace std;
typedef pair<int, int >PII;
typedef long long int64;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int MAXN = 3010;
namespace Adj{
int size, head[MAXN];
struct Node {int v, next, w; }E[MAXN];
void initAdj() { size = 0; memset(head, -1, sizeof(head)); }
void addEdge(int u, int v, int w) {
E[size].v = v;
E[size].w = w;
E[size].next = head[u];
head[u] = size++;
}
}
using namespace Adj;
/////////////////////////////
int n, m;
int val[MAXN];
int f[MAXN][MAXN];
// 返回的是有几个叶子节点
int dfs(int u) {
// init
for (int i = 1; i <= m; ++i)
f[u][i] = -INF;
if (head[u] == -1) {
f[u][1] = val[u];
return 1;
}
int sum = 0;
for (int e = head[u]; e != -1; e = E[e].next) {
int v = E[e].v, w = E[e].w;
int numLeaf = dfs(v);
sum += numLeaf;
// 做分组背包
for (int s = sum; s >= 1; --s) {
for (int k = 0; k <= numLeaf && k <= s; ++k)
for (int k = 0; k <= numLeaf; ++k)
f[u][s] = max(f[u][s], f[u][s-k] + f[v][k] + w);
}
}
return sum;
}
int main(){
while (~scanf("%d%d", &n, &m)) {
initAdj();
for (int i = 1; i <= n - m; ++i) {
int x, v, w;
scanf("%d", &x);
while (x--) {
scanf("%d%d", &v, &w);
addEdge(i, v, -w);
}
}
for (int i = n - m + 1; i <= n; ++i) {
scanf("%d", &val[i]);
}
dfs(1);
for (int i = m; i >= 0; --i) {
if (f[1][i] >= 0) {
printf("%d\n", i);
break;
}
}
}
return 0;
}
| [
"zengshuangde@gmail.com"
] | zengshuangde@gmail.com |
1aa5f0afd69197ca03dfda116a2c6301498251ec | cda2dfc07cd9ea925484aca1b2defb9047ff327c | /AudioGraph/CDXAudioWriteCallback.h | 6c2a39500abef3aa12f0ffad4fe3da03cee14078 | [] | no_license | AustinBorger/AudioGraph | fdf45a46e63913006914f91b7ec3854eb3981080 | aab49b5c8f4951bccc5f149d4736b093a45a468e | refs/heads/master | 2016-09-01T09:21:59.667788 | 2015-12-21T03:14:26 | 2015-12-21T03:14:26 | 47,859,617 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,244 | h | /*
** Copyright (C) 2015 Austin Borger <aaborger@gmail.com>
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
** API documentation is available here:
** https://github.com/AustinBorger/DXAudio
*/
#pragma once
#include <comdef.h>
#include <atlbase.h>
#include <Windows.h>
#include <queue>
#include <map>
#include "DXAudio.h"
#include "AudioGraph.h"
#include "CAudioGraph.h"
#include "QueryInterface.h"
class CDXAudioWriteCallback : public IDXAudioWriteCallback {
public:
CDXAudioWriteCallback();
~CDXAudioWriteCallback();
//IUnknown methods
ULONG STDMETHODCALLTYPE AddRef() {
return ++m_RefCount;
}
ULONG STDMETHODCALLTYPE Release() {
m_RefCount--;
if (m_RefCount <= 0) {
this->~CDXAudioWriteCallback(); //don't use delete, since placement new is used by CAudioGraphFactory
return 0;
}
return m_RefCount;
}
//IDXAudioWriteCallback methods
VOID STDMETHODCALLTYPE OnObjectFailure(LPCWSTR File, UINT Line, HRESULT hr) final;
VOID STDMETHODCALLTYPE OnProcess(FLOAT SampleRate, FLOAT* OutputBuffer, UINT BufferFrames) final;
VOID STDMETHODCALLTYPE OnThreadInit() final;
//New methods
HRESULT Initialize(IAudioGraphCallback* pAudioGraphCallback);
VOID QueueAudioGraph(IAudioGraph* pAudioGraph);
private:
long m_RefCount;
CComPtr<IAudioGraphCallback> m_Callback;
std::queue<CComPtr<CAudioGraph>> m_PlaybackQueue;
CComPtr<IMFMediaType> m_MediaType;
//IUnknown methods
STDMETHODIMP QueryInterface(REFIID riid, void** ppvObject) final {
QUERY_INTERFACE_CAST(IDXAudioWriteCallback);
QUERY_INTERFACE_CAST(IDXAudioCallback);
QUERY_INTERFACE_CAST(IUnknown);
QUERY_INTERFACE_FAIL();
}
}; | [
"aaborger@gmail.com"
] | aaborger@gmail.com |
04ba697e82ec44a45c961d58ef003d279be1bf04 | 142ddd4c42dc7ff65fd9b531cfd0adbfe2a1dd34 | /export/core/path_remap.cpp | 77044173db9e80980b332f499ffc9906bfff20bb | [
"LicenseRef-scancode-free-unknown",
"MIT",
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"CC0-1.0",
"OFL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"FTL",
"BSD-3-Clause",
"Bitstream-Vera",
"MPL-2.0",
"Zlib",
"CC-BY-4.0"
] | permissive | GhostWalker562/godot-admob-iOS-precompiled | 3fa99080f224d1b4c2dacac31e3786cebc034e2d | 18668d2fd7ea4bc5a7e84ddba36481fb20ee4095 | refs/heads/master | 2023-04-03T23:31:36.023618 | 2021-07-29T04:46:45 | 2021-07-29T04:46:45 | 195,341,087 | 24 | 2 | MIT | 2023-03-06T07:20:25 | 2019-07-05T04:55:50 | C++ | UTF-8 | C++ | false | false | 2,229 | cpp | /*************************************************************************/
/* path_remap.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* 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 "path_remap.h"
| [
"pvu2002@outlook.com"
] | pvu2002@outlook.com |
2c8dcada5d55783ec138837550e754e513d06ac1 | 0eff74b05b60098333ad66cf801bdd93becc9ea4 | /second/download/squid/gumtree/squid_repos_function_6949_last_repos.cpp | 71e9c868cf8c5c66c3ac3a9b4ffb71b2eb3e8319 | [] | no_license | niuxu18/logTracker-old | 97543445ea7e414ed40bdc681239365d33418975 | f2b060f13a0295387fe02187543db124916eb446 | refs/heads/master | 2021-09-13T21:39:37.686481 | 2017-12-11T03:36:34 | 2017-12-11T03:36:34 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 43 | cpp | void unblock() { popBlocked.store(false); } | [
"993273596@qq.com"
] | 993273596@qq.com |
834c25f6d6f4c11e1f3c7296dfd6e0b318479ed1 | 505b9695ca80c7a609a4d645ad86fd493bdfa4cf | /HW1.cpp | 25f1804d7acbb8f3ce6efd7a52cea2d813be1c0b | [] | no_license | oOIFOo/2019_spring_AI | 8d48dec2ecdaeff718b9fe957891e0674b83e7c3 | 607cedf70b19e526783389afe2e54933218c5471 | refs/heads/master | 2020-05-09T18:33:15.324352 | 2019-06-18T14:25:43 | 2019-06-18T14:25:43 | 181,345,831 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,391 | cpp | #include <iostream>
#include <fstream>
#include <string>
using namespace std;
class puzzle_info {
public:
int start_x;
int start_y;
int length;
int direction;
};
class node {
public:
int puzzle_index;
string word;
};
class binary_constraint {
public:
int puzzle1;
int puzzle2;
int index1;
int index2;
int ban_index;
char ban_list[5];
};
puzzle_info p_info[50];
node stack[10000];
string word_info[3000];
binary_constraint bin[20];
int puzzle_count;
int bin_count;
int board[100][100];
int index[21];
int top, x, y;
int visited_node;
void init() {
visited_node = 0;
top = -1;
for (int i = 0; i < 100; i++)
for (int j = 0; j < 100; j++)
board[i][j] = 0;
for (int i = 0; i < 20; i++) {
bin[i].ban_index = 0;
for (int j = 0; j < 5; j++)
bin[i].ban_list[j] = 0;
}
}
int read_puzzle(int num) {
fstream file;
int i;
char buf[200];
file.open("puzzle.txt", ios::in);
for (int i = 0; i < num;i++) file.getline(buf, sizeof(buf));
for (i = 0; buf[i] != 0; i = i + 10) {
p_info[i / 10].start_x = atoi(&buf[i]);
p_info[i / 10].start_y = atoi(&buf[i+2]);
p_info[i / 10].length = atoi(&buf[i+4]);
if(buf[i+6] == 'A') p_info[i / 10].direction = 0;
else p_info[i / 10].direction = 1;
}
file.close();
for (i = 0; p_info[i].length != 0; i++) {}
return i;
}
void read_word() {
fstream file;
string buf;
file.open("English words 3000.txt", ios::in);
for (int i = 0; i < 3000; i++) {
getline(file, buf);
word_info[i] = buf;
}
}
void count_sort() {
string word_info_sorted[3000];
int index_tmp[21];
for (int i = 0; i <= 20; i++) index[i] = 0;
for (int i = 0; i < 3000; i++) {
switch (word_info[i].size())
{
case 1 : index[ 1]++; break;
case 2 : index[ 2]++; break;
case 3 : index[ 3]++; break;
case 4 : index[ 4]++; break;
case 5 : index[ 5]++; break;
case 6 : index[ 6]++; break;
case 7 : index[ 7]++; break;
case 8 : index[ 8]++; break;
case 9 : index[ 9]++; break;
case 10: index[10]++; break;
case 11: index[11]++; break;
case 12: index[12]++; break;
case 13: index[13]++; break;
case 14: index[14]++; break;
case 15: index[15]++; break;
case 16: index[16]++; break;
case 17: index[17]++; break;
case 18: index[18]++; break;
case 19: index[19]++; break;
case 20: index[20]++; break;
default:
break;
}
}
for (int i = 2; i <= 20; i++) {
index[i] = index[i] + index[i - 1];
}
for (int i = 20; i >= 0; i--) {
index[i] = index[i - 1];
}
index[1] = 0;
for (int i = 1; i <= 20; i++) {
index_tmp[i] = index[i];
}
for (int i = 0; i < 3000; i++) {
word_info_sorted[index_tmp[word_info[i].size()]] = word_info[i];
index_tmp[word_info[i].size()]++;
}
for (int i = 0; i < 3000; i++) word_info[i] = word_info_sorted[i];
}
int com_binary_constraint() {
int x, y, tmp, count;
count = 0;
for (int i = 0; p_info[i].length != 0; i++) {
x = p_info[i].start_x;
y = p_info[i].start_y;
if (p_info[i].direction == 0) {
for (int j = 0; j < p_info[i].length; j++) {
if (board[x + j][y] == 0) {
board[x + j][y] = i * 100 + j;
}
else {
tmp = board[x + j][y]; //tmp / 100 = puzzle_index, tmp % 100 = word_index
for (int w = 0; w < count; w++) {
if ((bin[count].puzzle1 == i) && (bin[count].puzzle2 == (tmp / 100))) continue;
}
bin[count].puzzle1 = tmp / 100;
bin[count].index1 = tmp % 100;
bin[count].puzzle2 = i;
bin[count].index2 = j;
count++;
}
}
}
else {
for (int j = 0; j < p_info[i].length; j++) {
if (board[x][y + j] == 0) {
board[x][y + j] = i * 100 + j;
}
else {
tmp = board[x][y + j];
for (int w = 0; w < count; w++) {
if (bin[count].puzzle1 == i && bin[count].puzzle2 == tmp / 100) continue;
}
bin[count].puzzle1 = tmp / 100;
bin[count].index1 = tmp % 100;
bin[count].puzzle2 = i;
bin[count].index2 = j;
count++;
}
}
}
}
init();
return count;
}
string select_word(int word_num) {
string word = word_info[word_num];
return word;
}
int check_board(int puzzle_num, int word_num) {
puzzle_info puzzle = p_info[puzzle_num];
string word = select_word(word_num);
x = puzzle.start_x;
y = puzzle.start_y;
if (puzzle.direction == 0) {
for (int i = 0; i < puzzle.length; i++) {
if ((board[x + i][y] == 0) || (board[x + i][y] >= puzzle_num * 1000) || (board[x + i][y] % 1000 == word[i])) {}
else return 0;
}
}
else {
for (int i = 0; i < puzzle.length; i++) {
if ((board[x][y + i] == 0) || (board[x][y + i] >= puzzle_num * 1000) || (board[x][y + i] % 1000 == word[i])) {}
else return 0;
}
}
return 1;
}
void update_board(int puzzle_num, string word) {
puzzle_info puzzle = p_info[puzzle_num];
x = puzzle.start_x;
y = puzzle.start_y;
//cout << word << endl;
if (puzzle.direction == 0) {
for (int i = 0; i < puzzle.length; i++) {
if(board[x + i][y] % 1000 != word[i]) board[x + i][y] = puzzle_num * 1000 + word[i];
}
}
else {
for (int i = 0; i < puzzle.length; i++) {
if (board[x][y + i] % 1000 != word[i]) board[x][y + i] = puzzle_num * 1000 + word[i];
}
}
}
void forward_info(node current_node) {
int puzzle_num = current_node.puzzle_index;
string word = current_node.word;
for (int i = 0; i < bin_count; i++) {
cout << i << ' ' << bin[i].ban_index << ' ' << bin[i].index1 << endl;
if (bin[i].puzzle1 == puzzle_num) {
for (int j = 0; j < bin[i].ban_index; j++)
if (bin[i].ban_list[j] == word[bin[i].index1])
return;
bin[i].ban_list[bin[i].ban_index] = word[bin[i].index1];
bin[i].ban_index++;
}
else if (bin[i].puzzle2 == puzzle_num) {
for (int j = 0; j < bin[i].ban_index; j++)
if (bin[i].ban_list[j] == word[bin[i].index1])
return;
bin[i].ban_list[bin[i].ban_index] = word[bin[i].index2];
bin[i].ban_index++;
}
}
}
int check_forward(int puzzle_num, int word_num) {
puzzle_info puzzle = p_info[puzzle_num];
string word = select_word(word_num);
for (int i = 0; i < bin_count; i++) {
if (bin[i].puzzle1 == puzzle_num) {
for (int j = 0; j < bin[i].ban_index; j++) {
if (word[bin[i].index1] == bin[i].ban_list[j])
return 0;
}
}
else if (bin[i].puzzle2 == puzzle_num) {
for (int j = 0; j < bin[i].ban_index; j++) {
if (word[bin[i].index2] == bin[i].ban_list[j])
return 0;
}
}
}
return 1;
}
node pop() {
node current_node;
current_node = stack[top];
top--;
//forward_info(current_node);
update_board(current_node.puzzle_index, current_node.word);
return current_node;
}
void push(node current_node, int word_num) {
node tmp = current_node;
string word = select_word(word_num);
top++;
stack[top].puzzle_index = current_node.puzzle_index + 1;
stack[top].word = word;
}
void push_child(node current_node) {
puzzle_info tmp = p_info[current_node.puzzle_index + 1];
if (tmp.length != 0) {
for (int i = index[tmp.length]; i < index[tmp.length + 1]; i++) { //push all childs
if (check_board(current_node.puzzle_index + 1, i)) {
push(current_node, i);
}
}
}
}
void print_solution() {
for (int j = 0; j < 6; j++) {
for (int i = 0; i < 25; i++) {
if (board[i][j] != 0) cout << char(board[i][j] % 1000);
else cout << ' ';
}
cout << endl;
}
}
int match() {
int sol = 0;
node current_node;
current_node.puzzle_index = -1;
push_child(current_node);
while (1) {
current_node = pop();
if (current_node.puzzle_index == puzzle_count - 1) {
print_solution();
sol++;
break;
}
else if (top <= 0) {
break;
}
else {
push_child(current_node);
}
visited_node++;
//cout << current_node.puzzle_index << ' ' << top << endl;
}
return sol;
}
int main(void){
int sol;
puzzle_count = read_puzzle(4);
read_word();
count_sort();
init();
bin_count = com_binary_constraint() + 1;
sol = match();
if (sol) {
cout << "solution found!!" << endl << endl;
cout << "visited node:" << visited_node << endl;
//cout << sol << endl;
}
else {
cout << "no solution found!!" << endl;
}
system("pause");
return 0;
}
| [
"noreply@github.com"
] | oOIFOo.noreply@github.com |
2bdf1a6ede23fa1ad86219cb8a7178e7a9740282 | 560d39a4bd34e65f51294902a2be536adba8a5e7 | /timus/2002 Test Task.cpp | 3cc010ce55cf6c564efcef9401ebb21e0c18d8b4 | [] | no_license | Quinny/Online-Judge | ee4366cd3c4483054c2324a360266c48f2711bd9 | aa6ea160e7b888de7e320933d7689e1cccb62b95 | refs/heads/master | 2016-09-05T10:57:59.381735 | 2015-08-20T19:59:10 | 2015-08-20T19:59:10 | 20,700,034 | 3 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,223 | cpp | /*
Basically a psuedo login system with error messages
*/
#include <iostream>
#include <map>
using namespace std;
int main(void){
map< string, pair<string,int> > users;
int n;
string command,p1,p2;
cin>>n;
for(int i=0;i<n;i++){
cin>>command;
if(command=="register"){
cin>>p1>>p2;
if(users.empty() || users.find(p1)==users.end()){
users[p1]=make_pair(p2,0);
cout<<"success: new user added"<<endl;
}
else cout<<"fail: user already exists"<<endl;
}
if(command=="login"){
cin>>p1>>p2;
if(users.find(p1)!=users.end()){
if(users[p1].first==p2){
if(users[p1].second==0){
users[p1].second=1;
cout<<"success: user logged in"<<endl;
}
else cout<<"fail: already logged in"<<endl;
}
else cout<<"fail: incorrect password"<<endl;
}
else cout<<"fail: no such user"<<endl;
}
if(command=="logout"){
cin>>p1;
if(users.find(p1)!=users.end()){
if(users[p1].second==1){
users[p1].second=0;
cout<<"success: user logged out"<<endl;
}
else cout<<"fail: already logged out"<<endl;
}
else cout<<"fail: no such user"<<endl;
}
}
return 0;
} | [
"thequinnftw@gmail.com"
] | thequinnftw@gmail.com |
84ad5e40b9fa1cb150722fe08ccf1c5b81da3ca1 | c5d95f48e175565c3917ab1b303d2c5689921b7c | /Google Demo iOS/Classes/Native/Il2CppCompilerCalculateTypeValues_20Table.cpp | 864d964a218f1cefd4cc89255d8a0ff2eb9c8331 | [] | no_license | jleiken/Unity-Labyrinth | 5d8fb5a43e428af5b8beaa8edb7e283b76a78941 | 9f1982edf16f572ca809463ce09913b0a25cc7e5 | refs/heads/master | 2021-04-06T06:50:43.306042 | 2018-03-12T01:54:07 | 2018-03-12T01:54:07 | 122,430,515 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 213,806 | cpp | #include "il2cpp-config.h"
#ifndef _MSC_VER
# include <alloca.h>
#else
# include <malloc.h>
#endif
#include <cstring>
#include <string.h>
#include <stdio.h>
#include <cmath>
#include <limits>
#include <assert.h>
#include <stdint.h>
#include "il2cpp-class-internals.h"
#include "codegen/il2cpp-codegen.h"
#include "il2cpp-object-internals.h"
// System.Action`1<System.Boolean>
struct Action_1_t269755560;
// System.String
struct String_t;
// GvrVideoPlayerTexture
struct GvrVideoPlayerTexture_t3546202735;
// GvrKeyboard
struct GvrKeyboard_t2536560201;
// KeyboardState
struct KeyboardState_t4109162649;
// System.Void
struct Void_t1185182177;
// UnityEngine.Sprite
struct Sprite_t280657092;
// System.Char[]
struct CharU5BU5D_t3528271667;
// System.Reflection.MethodInfo
struct MethodInfo_t;
// System.DelegateData
struct DelegateData_t1677132599;
// UnityEngine.AndroidJavaClass
struct AndroidJavaClass_t32045322;
// UnityEngine.AndroidJavaObject
struct AndroidJavaObject_t4131667876;
// UnityEngine.GlobalJavaObjectRef
struct GlobalJavaObjectRef_t3225273728;
// UnityEngine.UI.Selectable
struct Selectable_t3250028441;
// UnityEngine.GameObject
struct GameObject_t1113636619;
// GvrKeyboard/KeyboardCallback
struct KeyboardCallback_t3330588312;
// System.IAsyncResult
struct IAsyncResult_t767004451;
// System.AsyncCallback
struct AsyncCallback_t3962456242;
// UnityEngine.UI.Text
struct Text_t1901882714;
// UnityEngine.TextMesh
struct TextMesh_t1536577757;
// UnityEngine.Texture
struct Texture_t3661962703;
// System.Single[]
struct SingleU5BU5D_t1444911251;
// UnityEngine.Renderer
struct Renderer_t2627027031;
// System.Collections.Generic.List`1<System.Action`1<System.Int32>>
struct List_1_t300520794;
// System.Collections.Generic.List`1<System.Action`2<System.String,System.String>>
struct List_1_t1147278120;
// System.Collections.Generic.Queue`1<System.Action>
struct Queue_1_t1110636971;
// System.Action`2<System.String,System.String>
struct Action_2_t3970170674;
// GvrVideoPlayerTexture/OnVideoEventCallback
struct OnVideoEventCallback_t2376626694;
// GvrVideoPlayerTexture/OnExceptionCallback
struct OnExceptionCallback_t1696428116;
// Gvr.Internal.IKeyboardProvider
struct IKeyboardProvider_t1978250355;
// System.Collections.IEnumerator
struct IEnumerator_t1853284238;
// GvrKeyboard/ErrorCallback
struct ErrorCallback_t2310212740;
// GvrKeyboard/StandardCallback
struct StandardCallback_t3095007891;
// GvrKeyboard/EditTextCallback
struct EditTextCallback_t1702213000;
// System.Collections.Generic.List`1<GvrKeyboardEvent>
struct List_1_t806272884;
// GvrKeyboardDelegateBase
struct GvrKeyboardDelegateBase_t30895224;
// UnityEngine.Object
struct Object_t631007953;
// System.Collections.Generic.List`1<UnityEngine.UI.Selectable>
struct List_1_t427135887;
// UnityEngine.UI.AnimationTriggers
struct AnimationTriggers_t2532145056;
// UnityEngine.UI.Graphic
struct Graphic_t1660335611;
// System.Collections.Generic.List`1<UnityEngine.CanvasGroup>
struct List_1_t1260619206;
// UnityEngine.RectTransform
struct RectTransform_t3704657025;
// UnityEngine.UI.Image
struct Image_t2670269651;
// UnityEngine.UI.Dropdown/OptionDataList
struct OptionDataList_t1438173104;
// UnityEngine.UI.Dropdown/DropdownEvent
struct DropdownEvent_t4040729994;
// System.Collections.Generic.List`1<UnityEngine.UI.Dropdown/DropdownItem>
struct List_1_t2924027637;
// UnityEngine.UI.CoroutineTween.TweenRunner`1<UnityEngine.UI.CoroutineTween.FloatTween>
struct TweenRunner_1_t3520241082;
// UnityEngine.UI.Dropdown/OptionData
struct OptionData_t3270282352;
#ifndef RUNTIMEOBJECT_H
#define RUNTIMEOBJECT_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Object
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RUNTIMEOBJECT_H
#ifndef GVRVRHELPERS_T1380670802_H
#define GVRVRHELPERS_T1380670802_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVRHelpers
struct GvrVRHelpers_t1380670802 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRVRHELPERS_T1380670802_H
#ifndef U3CLAUNCHVRHOMEASYNCU3EC__ANONSTOREY0_T1042273844_H
#define U3CLAUNCHVRHOMEASYNCU3EC__ANONSTOREY0_T1042273844_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrDaydreamApi/<LaunchVrHomeAsync>c__AnonStorey0
struct U3CLaunchVrHomeAsyncU3Ec__AnonStorey0_t1042273844 : public RuntimeObject
{
public:
// System.Action`1<System.Boolean> GvrDaydreamApi/<LaunchVrHomeAsync>c__AnonStorey0::callback
Action_1_t269755560 * ___callback_0;
public:
inline static int32_t get_offset_of_callback_0() { return static_cast<int32_t>(offsetof(U3CLaunchVrHomeAsyncU3Ec__AnonStorey0_t1042273844, ___callback_0)); }
inline Action_1_t269755560 * get_callback_0() const { return ___callback_0; }
inline Action_1_t269755560 ** get_address_of_callback_0() { return &___callback_0; }
inline void set_callback_0(Action_1_t269755560 * value)
{
___callback_0 = value;
Il2CppCodeGenWriteBarrier((&___callback_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CLAUNCHVRHOMEASYNCU3EC__ANONSTOREY0_T1042273844_H
#ifndef VALUETYPE_T3640485471_H
#define VALUETYPE_T3640485471_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.ValueType
struct ValueType_t3640485471 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.ValueType
struct ValueType_t3640485471_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.ValueType
struct ValueType_t3640485471_marshaled_com
{
};
#endif // VALUETYPE_T3640485471_H
#ifndef GVRINTENT_T255451010_H
#define GVRINTENT_T255451010_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrIntent
struct GvrIntent_t255451010 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRINTENT_T255451010_H
#ifndef GVRMATHHELPERS_T769385329_H
#define GVRMATHHELPERS_T769385329_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrMathHelpers
struct GvrMathHelpers_t769385329 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRMATHHELPERS_T769385329_H
#ifndef GVRUIHELPERS_T853958893_H
#define GVRUIHELPERS_T853958893_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrUIHelpers
struct GvrUIHelpers_t853958893 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRUIHELPERS_T853958893_H
#ifndef U3CINTERNALONVIDEOEVENTCALLBACKU3EC__ANONSTOREY0_T2222373319_H
#define U3CINTERNALONVIDEOEVENTCALLBACKU3EC__ANONSTOREY0_T2222373319_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/<InternalOnVideoEventCallback>c__AnonStorey0
struct U3CInternalOnVideoEventCallbackU3Ec__AnonStorey0_t2222373319 : public RuntimeObject
{
public:
// GvrVideoPlayerTexture GvrVideoPlayerTexture/<InternalOnVideoEventCallback>c__AnonStorey0::player
GvrVideoPlayerTexture_t3546202735 * ___player_0;
// System.Int32 GvrVideoPlayerTexture/<InternalOnVideoEventCallback>c__AnonStorey0::eventId
int32_t ___eventId_1;
public:
inline static int32_t get_offset_of_player_0() { return static_cast<int32_t>(offsetof(U3CInternalOnVideoEventCallbackU3Ec__AnonStorey0_t2222373319, ___player_0)); }
inline GvrVideoPlayerTexture_t3546202735 * get_player_0() const { return ___player_0; }
inline GvrVideoPlayerTexture_t3546202735 ** get_address_of_player_0() { return &___player_0; }
inline void set_player_0(GvrVideoPlayerTexture_t3546202735 * value)
{
___player_0 = value;
Il2CppCodeGenWriteBarrier((&___player_0), value);
}
inline static int32_t get_offset_of_eventId_1() { return static_cast<int32_t>(offsetof(U3CInternalOnVideoEventCallbackU3Ec__AnonStorey0_t2222373319, ___eventId_1)); }
inline int32_t get_eventId_1() const { return ___eventId_1; }
inline int32_t* get_address_of_eventId_1() { return &___eventId_1; }
inline void set_eventId_1(int32_t value)
{
___eventId_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CINTERNALONVIDEOEVENTCALLBACKU3EC__ANONSTOREY0_T2222373319_H
#ifndef U3CEXECUTERU3EC__ITERATOR0_T892308174_H
#define U3CEXECUTERU3EC__ITERATOR0_T892308174_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboard/<Executer>c__Iterator0
struct U3CExecuterU3Ec__Iterator0_t892308174 : public RuntimeObject
{
public:
// GvrKeyboard GvrKeyboard/<Executer>c__Iterator0::$this
GvrKeyboard_t2536560201 * ___U24this_0;
// System.Object GvrKeyboard/<Executer>c__Iterator0::$current
RuntimeObject * ___U24current_1;
// System.Boolean GvrKeyboard/<Executer>c__Iterator0::$disposing
bool ___U24disposing_2;
// System.Int32 GvrKeyboard/<Executer>c__Iterator0::$PC
int32_t ___U24PC_3;
public:
inline static int32_t get_offset_of_U24this_0() { return static_cast<int32_t>(offsetof(U3CExecuterU3Ec__Iterator0_t892308174, ___U24this_0)); }
inline GvrKeyboard_t2536560201 * get_U24this_0() const { return ___U24this_0; }
inline GvrKeyboard_t2536560201 ** get_address_of_U24this_0() { return &___U24this_0; }
inline void set_U24this_0(GvrKeyboard_t2536560201 * value)
{
___U24this_0 = value;
Il2CppCodeGenWriteBarrier((&___U24this_0), value);
}
inline static int32_t get_offset_of_U24current_1() { return static_cast<int32_t>(offsetof(U3CExecuterU3Ec__Iterator0_t892308174, ___U24current_1)); }
inline RuntimeObject * get_U24current_1() const { return ___U24current_1; }
inline RuntimeObject ** get_address_of_U24current_1() { return &___U24current_1; }
inline void set_U24current_1(RuntimeObject * value)
{
___U24current_1 = value;
Il2CppCodeGenWriteBarrier((&___U24current_1), value);
}
inline static int32_t get_offset_of_U24disposing_2() { return static_cast<int32_t>(offsetof(U3CExecuterU3Ec__Iterator0_t892308174, ___U24disposing_2)); }
inline bool get_U24disposing_2() const { return ___U24disposing_2; }
inline bool* get_address_of_U24disposing_2() { return &___U24disposing_2; }
inline void set_U24disposing_2(bool value)
{
___U24disposing_2 = value;
}
inline static int32_t get_offset_of_U24PC_3() { return static_cast<int32_t>(offsetof(U3CExecuterU3Ec__Iterator0_t892308174, ___U24PC_3)); }
inline int32_t get_U24PC_3() const { return ___U24PC_3; }
inline int32_t* get_address_of_U24PC_3() { return &___U24PC_3; }
inline void set_U24PC_3(int32_t value)
{
___U24PC_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CEXECUTERU3EC__ITERATOR0_T892308174_H
#ifndef HEADSETPROVIDERFACTORY_T520764709_H
#define HEADSETPROVIDERFACTORY_T520764709_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.HeadsetProviderFactory
struct HeadsetProviderFactory_t520764709 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HEADSETPROVIDERFACTORY_T520764709_H
#ifndef DUMMYKEYBOARDPROVIDER_T4235634217_H
#define DUMMYKEYBOARDPROVIDER_T4235634217_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.DummyKeyboardProvider
struct DummyKeyboardProvider_t4235634217 : public RuntimeObject
{
public:
// KeyboardState Gvr.Internal.DummyKeyboardProvider::dummyState
KeyboardState_t4109162649 * ___dummyState_0;
// System.String Gvr.Internal.DummyKeyboardProvider::<EditorText>k__BackingField
String_t* ___U3CEditorTextU3Ek__BackingField_1;
public:
inline static int32_t get_offset_of_dummyState_0() { return static_cast<int32_t>(offsetof(DummyKeyboardProvider_t4235634217, ___dummyState_0)); }
inline KeyboardState_t4109162649 * get_dummyState_0() const { return ___dummyState_0; }
inline KeyboardState_t4109162649 ** get_address_of_dummyState_0() { return &___dummyState_0; }
inline void set_dummyState_0(KeyboardState_t4109162649 * value)
{
___dummyState_0 = value;
Il2CppCodeGenWriteBarrier((&___dummyState_0), value);
}
inline static int32_t get_offset_of_U3CEditorTextU3Ek__BackingField_1() { return static_cast<int32_t>(offsetof(DummyKeyboardProvider_t4235634217, ___U3CEditorTextU3Ek__BackingField_1)); }
inline String_t* get_U3CEditorTextU3Ek__BackingField_1() const { return ___U3CEditorTextU3Ek__BackingField_1; }
inline String_t** get_address_of_U3CEditorTextU3Ek__BackingField_1() { return &___U3CEditorTextU3Ek__BackingField_1; }
inline void set_U3CEditorTextU3Ek__BackingField_1(String_t* value)
{
___U3CEditorTextU3Ek__BackingField_1 = value;
Il2CppCodeGenWriteBarrier((&___U3CEditorTextU3Ek__BackingField_1), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DUMMYKEYBOARDPROVIDER_T4235634217_H
#ifndef ATTRIBUTE_T861562559_H
#define ATTRIBUTE_T861562559_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Attribute
struct Attribute_t861562559 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ATTRIBUTE_T861562559_H
#ifndef GVRACTIVITYHELPER_T700161863_H
#define GVRACTIVITYHELPER_T700161863_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrActivityHelper
struct GvrActivityHelper_t700161863 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRACTIVITYHELPER_T700161863_H
#ifndef KEYBOARDPROVIDERFACTORY_T3069358895_H
#define KEYBOARDPROVIDERFACTORY_T3069358895_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.KeyboardProviderFactory
struct KeyboardProviderFactory_t3069358895 : public RuntimeObject
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYBOARDPROVIDERFACTORY_T3069358895_H
#ifndef GVRCURSORHELPER_T4026897861_H
#define GVRCURSORHELPER_T4026897861_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.GvrCursorHelper
struct GvrCursorHelper_t4026897861 : public RuntimeObject
{
public:
public:
};
struct GvrCursorHelper_t4026897861_StaticFields
{
public:
// System.Boolean Gvr.Internal.GvrCursorHelper::cachedHeadEmulationActive
bool ___cachedHeadEmulationActive_0;
// System.Boolean Gvr.Internal.GvrCursorHelper::cachedControllerEmulationActive
bool ___cachedControllerEmulationActive_1;
public:
inline static int32_t get_offset_of_cachedHeadEmulationActive_0() { return static_cast<int32_t>(offsetof(GvrCursorHelper_t4026897861_StaticFields, ___cachedHeadEmulationActive_0)); }
inline bool get_cachedHeadEmulationActive_0() const { return ___cachedHeadEmulationActive_0; }
inline bool* get_address_of_cachedHeadEmulationActive_0() { return &___cachedHeadEmulationActive_0; }
inline void set_cachedHeadEmulationActive_0(bool value)
{
___cachedHeadEmulationActive_0 = value;
}
inline static int32_t get_offset_of_cachedControllerEmulationActive_1() { return static_cast<int32_t>(offsetof(GvrCursorHelper_t4026897861_StaticFields, ___cachedControllerEmulationActive_1)); }
inline bool get_cachedControllerEmulationActive_1() const { return ___cachedControllerEmulationActive_1; }
inline bool* get_address_of_cachedControllerEmulationActive_1() { return &___cachedControllerEmulationActive_1; }
inline void set_cachedControllerEmulationActive_1(bool value)
{
___cachedControllerEmulationActive_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRCURSORHELPER_T4026897861_H
#ifndef GVRKEYBOARDINTENT_T3874861606_H
#define GVRKEYBOARDINTENT_T3874861606_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboardIntent
struct GvrKeyboardIntent_t3874861606 : public RuntimeObject
{
public:
public:
};
struct GvrKeyboardIntent_t3874861606_StaticFields
{
public:
// GvrKeyboardIntent GvrKeyboardIntent::theInstance
GvrKeyboardIntent_t3874861606 * ___theInstance_2;
public:
inline static int32_t get_offset_of_theInstance_2() { return static_cast<int32_t>(offsetof(GvrKeyboardIntent_t3874861606_StaticFields, ___theInstance_2)); }
inline GvrKeyboardIntent_t3874861606 * get_theInstance_2() const { return ___theInstance_2; }
inline GvrKeyboardIntent_t3874861606 ** get_address_of_theInstance_2() { return &___theInstance_2; }
inline void set_theInstance_2(GvrKeyboardIntent_t3874861606 * value)
{
___theInstance_2 = value;
Il2CppCodeGenWriteBarrier((&___theInstance_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRKEYBOARDINTENT_T3874861606_H
#ifndef GVRDAYDREAMAPI_T820520409_H
#define GVRDAYDREAMAPI_T820520409_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrDaydreamApi
struct GvrDaydreamApi_t820520409 : public RuntimeObject
{
public:
public:
};
struct GvrDaydreamApi_t820520409_StaticFields
{
public:
// GvrDaydreamApi GvrDaydreamApi::m_instance
GvrDaydreamApi_t820520409 * ___m_instance_4;
public:
inline static int32_t get_offset_of_m_instance_4() { return static_cast<int32_t>(offsetof(GvrDaydreamApi_t820520409_StaticFields, ___m_instance_4)); }
inline GvrDaydreamApi_t820520409 * get_m_instance_4() const { return ___m_instance_4; }
inline GvrDaydreamApi_t820520409 ** get_address_of_m_instance_4() { return &___m_instance_4; }
inline void set_m_instance_4(GvrDaydreamApi_t820520409 * value)
{
___m_instance_4 = value;
Il2CppCodeGenWriteBarrier((&___m_instance_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRDAYDREAMAPI_T820520409_H
#ifndef U3CINTERNALONEXCEPTIONCALLBACKU3EC__ANONSTOREY1_T3301768987_H
#define U3CINTERNALONEXCEPTIONCALLBACKU3EC__ANONSTOREY1_T3301768987_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/<InternalOnExceptionCallback>c__AnonStorey1
struct U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987 : public RuntimeObject
{
public:
// GvrVideoPlayerTexture GvrVideoPlayerTexture/<InternalOnExceptionCallback>c__AnonStorey1::player
GvrVideoPlayerTexture_t3546202735 * ___player_0;
// System.String GvrVideoPlayerTexture/<InternalOnExceptionCallback>c__AnonStorey1::type
String_t* ___type_1;
// System.String GvrVideoPlayerTexture/<InternalOnExceptionCallback>c__AnonStorey1::msg
String_t* ___msg_2;
public:
inline static int32_t get_offset_of_player_0() { return static_cast<int32_t>(offsetof(U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987, ___player_0)); }
inline GvrVideoPlayerTexture_t3546202735 * get_player_0() const { return ___player_0; }
inline GvrVideoPlayerTexture_t3546202735 ** get_address_of_player_0() { return &___player_0; }
inline void set_player_0(GvrVideoPlayerTexture_t3546202735 * value)
{
___player_0 = value;
Il2CppCodeGenWriteBarrier((&___player_0), value);
}
inline static int32_t get_offset_of_type_1() { return static_cast<int32_t>(offsetof(U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987, ___type_1)); }
inline String_t* get_type_1() const { return ___type_1; }
inline String_t** get_address_of_type_1() { return &___type_1; }
inline void set_type_1(String_t* value)
{
___type_1 = value;
Il2CppCodeGenWriteBarrier((&___type_1), value);
}
inline static int32_t get_offset_of_msg_2() { return static_cast<int32_t>(offsetof(U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987, ___msg_2)); }
inline String_t* get_msg_2() const { return ___msg_2; }
inline String_t** get_address_of_msg_2() { return &___msg_2; }
inline void set_msg_2(String_t* value)
{
___msg_2 = value;
Il2CppCodeGenWriteBarrier((&___msg_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CINTERNALONEXCEPTIONCALLBACKU3EC__ANONSTOREY1_T3301768987_H
#ifndef COLOR_T2555686324_H
#define COLOR_T2555686324_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Color
struct Color_t2555686324
{
public:
// System.Single UnityEngine.Color::r
float ___r_0;
// System.Single UnityEngine.Color::g
float ___g_1;
// System.Single UnityEngine.Color::b
float ___b_2;
// System.Single UnityEngine.Color::a
float ___a_3;
public:
inline static int32_t get_offset_of_r_0() { return static_cast<int32_t>(offsetof(Color_t2555686324, ___r_0)); }
inline float get_r_0() const { return ___r_0; }
inline float* get_address_of_r_0() { return &___r_0; }
inline void set_r_0(float value)
{
___r_0 = value;
}
inline static int32_t get_offset_of_g_1() { return static_cast<int32_t>(offsetof(Color_t2555686324, ___g_1)); }
inline float get_g_1() const { return ___g_1; }
inline float* get_address_of_g_1() { return &___g_1; }
inline void set_g_1(float value)
{
___g_1 = value;
}
inline static int32_t get_offset_of_b_2() { return static_cast<int32_t>(offsetof(Color_t2555686324, ___b_2)); }
inline float get_b_2() const { return ___b_2; }
inline float* get_address_of_b_2() { return &___b_2; }
inline void set_b_2(float value)
{
___b_2 = value;
}
inline static int32_t get_offset_of_a_3() { return static_cast<int32_t>(offsetof(Color_t2555686324, ___a_3)); }
inline float get_a_3() const { return ___a_3; }
inline float* get_address_of_a_3() { return &___a_3; }
inline void set_a_3(float value)
{
___a_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COLOR_T2555686324_H
#ifndef MATRIX4X4_T1817901843_H
#define MATRIX4X4_T1817901843_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Matrix4x4
struct Matrix4x4_t1817901843
{
public:
// System.Single UnityEngine.Matrix4x4::m00
float ___m00_0;
// System.Single UnityEngine.Matrix4x4::m10
float ___m10_1;
// System.Single UnityEngine.Matrix4x4::m20
float ___m20_2;
// System.Single UnityEngine.Matrix4x4::m30
float ___m30_3;
// System.Single UnityEngine.Matrix4x4::m01
float ___m01_4;
// System.Single UnityEngine.Matrix4x4::m11
float ___m11_5;
// System.Single UnityEngine.Matrix4x4::m21
float ___m21_6;
// System.Single UnityEngine.Matrix4x4::m31
float ___m31_7;
// System.Single UnityEngine.Matrix4x4::m02
float ___m02_8;
// System.Single UnityEngine.Matrix4x4::m12
float ___m12_9;
// System.Single UnityEngine.Matrix4x4::m22
float ___m22_10;
// System.Single UnityEngine.Matrix4x4::m32
float ___m32_11;
// System.Single UnityEngine.Matrix4x4::m03
float ___m03_12;
// System.Single UnityEngine.Matrix4x4::m13
float ___m13_13;
// System.Single UnityEngine.Matrix4x4::m23
float ___m23_14;
// System.Single UnityEngine.Matrix4x4::m33
float ___m33_15;
public:
inline static int32_t get_offset_of_m00_0() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m00_0)); }
inline float get_m00_0() const { return ___m00_0; }
inline float* get_address_of_m00_0() { return &___m00_0; }
inline void set_m00_0(float value)
{
___m00_0 = value;
}
inline static int32_t get_offset_of_m10_1() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m10_1)); }
inline float get_m10_1() const { return ___m10_1; }
inline float* get_address_of_m10_1() { return &___m10_1; }
inline void set_m10_1(float value)
{
___m10_1 = value;
}
inline static int32_t get_offset_of_m20_2() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m20_2)); }
inline float get_m20_2() const { return ___m20_2; }
inline float* get_address_of_m20_2() { return &___m20_2; }
inline void set_m20_2(float value)
{
___m20_2 = value;
}
inline static int32_t get_offset_of_m30_3() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m30_3)); }
inline float get_m30_3() const { return ___m30_3; }
inline float* get_address_of_m30_3() { return &___m30_3; }
inline void set_m30_3(float value)
{
___m30_3 = value;
}
inline static int32_t get_offset_of_m01_4() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m01_4)); }
inline float get_m01_4() const { return ___m01_4; }
inline float* get_address_of_m01_4() { return &___m01_4; }
inline void set_m01_4(float value)
{
___m01_4 = value;
}
inline static int32_t get_offset_of_m11_5() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m11_5)); }
inline float get_m11_5() const { return ___m11_5; }
inline float* get_address_of_m11_5() { return &___m11_5; }
inline void set_m11_5(float value)
{
___m11_5 = value;
}
inline static int32_t get_offset_of_m21_6() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m21_6)); }
inline float get_m21_6() const { return ___m21_6; }
inline float* get_address_of_m21_6() { return &___m21_6; }
inline void set_m21_6(float value)
{
___m21_6 = value;
}
inline static int32_t get_offset_of_m31_7() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m31_7)); }
inline float get_m31_7() const { return ___m31_7; }
inline float* get_address_of_m31_7() { return &___m31_7; }
inline void set_m31_7(float value)
{
___m31_7 = value;
}
inline static int32_t get_offset_of_m02_8() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m02_8)); }
inline float get_m02_8() const { return ___m02_8; }
inline float* get_address_of_m02_8() { return &___m02_8; }
inline void set_m02_8(float value)
{
___m02_8 = value;
}
inline static int32_t get_offset_of_m12_9() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m12_9)); }
inline float get_m12_9() const { return ___m12_9; }
inline float* get_address_of_m12_9() { return &___m12_9; }
inline void set_m12_9(float value)
{
___m12_9 = value;
}
inline static int32_t get_offset_of_m22_10() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m22_10)); }
inline float get_m22_10() const { return ___m22_10; }
inline float* get_address_of_m22_10() { return &___m22_10; }
inline void set_m22_10(float value)
{
___m22_10 = value;
}
inline static int32_t get_offset_of_m32_11() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m32_11)); }
inline float get_m32_11() const { return ___m32_11; }
inline float* get_address_of_m32_11() { return &___m32_11; }
inline void set_m32_11(float value)
{
___m32_11 = value;
}
inline static int32_t get_offset_of_m03_12() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m03_12)); }
inline float get_m03_12() const { return ___m03_12; }
inline float* get_address_of_m03_12() { return &___m03_12; }
inline void set_m03_12(float value)
{
___m03_12 = value;
}
inline static int32_t get_offset_of_m13_13() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m13_13)); }
inline float get_m13_13() const { return ___m13_13; }
inline float* get_address_of_m13_13() { return &___m13_13; }
inline void set_m13_13(float value)
{
___m13_13 = value;
}
inline static int32_t get_offset_of_m23_14() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m23_14)); }
inline float get_m23_14() const { return ___m23_14; }
inline float* get_address_of_m23_14() { return &___m23_14; }
inline void set_m23_14(float value)
{
___m23_14 = value;
}
inline static int32_t get_offset_of_m33_15() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843, ___m33_15)); }
inline float get_m33_15() const { return ___m33_15; }
inline float* get_address_of_m33_15() { return &___m33_15; }
inline void set_m33_15(float value)
{
___m33_15 = value;
}
};
struct Matrix4x4_t1817901843_StaticFields
{
public:
// UnityEngine.Matrix4x4 UnityEngine.Matrix4x4::zeroMatrix
Matrix4x4_t1817901843 ___zeroMatrix_16;
// UnityEngine.Matrix4x4 UnityEngine.Matrix4x4::identityMatrix
Matrix4x4_t1817901843 ___identityMatrix_17;
public:
inline static int32_t get_offset_of_zeroMatrix_16() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843_StaticFields, ___zeroMatrix_16)); }
inline Matrix4x4_t1817901843 get_zeroMatrix_16() const { return ___zeroMatrix_16; }
inline Matrix4x4_t1817901843 * get_address_of_zeroMatrix_16() { return &___zeroMatrix_16; }
inline void set_zeroMatrix_16(Matrix4x4_t1817901843 value)
{
___zeroMatrix_16 = value;
}
inline static int32_t get_offset_of_identityMatrix_17() { return static_cast<int32_t>(offsetof(Matrix4x4_t1817901843_StaticFields, ___identityMatrix_17)); }
inline Matrix4x4_t1817901843 get_identityMatrix_17() const { return ___identityMatrix_17; }
inline Matrix4x4_t1817901843 * get_address_of_identityMatrix_17() { return &___identityMatrix_17; }
inline void set_identityMatrix_17(Matrix4x4_t1817901843 value)
{
___identityMatrix_17 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MATRIX4X4_T1817901843_H
#ifndef VOID_T1185182177_H
#define VOID_T1185182177_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void
struct Void_t1185182177
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VOID_T1185182177_H
#ifndef INTPTR_T_H
#define INTPTR_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.IntPtr
struct IntPtr_t
{
public:
// System.Void* System.IntPtr::m_value
void* ___m_value_0;
public:
inline static int32_t get_offset_of_m_value_0() { return static_cast<int32_t>(offsetof(IntPtr_t, ___m_value_0)); }
inline void* get_m_value_0() const { return ___m_value_0; }
inline void** get_address_of_m_value_0() { return &___m_value_0; }
inline void set_m_value_0(void* value)
{
___m_value_0 = value;
}
};
struct IntPtr_t_StaticFields
{
public:
// System.IntPtr System.IntPtr::Zero
intptr_t ___Zero_1;
public:
inline static int32_t get_offset_of_Zero_1() { return static_cast<int32_t>(offsetof(IntPtr_t_StaticFields, ___Zero_1)); }
inline intptr_t get_Zero_1() const { return ___Zero_1; }
inline intptr_t* get_address_of_Zero_1() { return &___Zero_1; }
inline void set_Zero_1(intptr_t value)
{
___Zero_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INTPTR_T_H
#ifndef PROPERTYATTRIBUTE_T3677895545_H
#define PROPERTYATTRIBUTE_T3677895545_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.PropertyAttribute
struct PropertyAttribute_t3677895545 : public Attribute_t861562559
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // PROPERTYATTRIBUTE_T3677895545_H
#ifndef INT32_T2950945753_H
#define INT32_T2950945753_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Int32
struct Int32_t2950945753
{
public:
// System.Int32 System.Int32::m_value
int32_t ___m_value_2;
public:
inline static int32_t get_offset_of_m_value_2() { return static_cast<int32_t>(offsetof(Int32_t2950945753, ___m_value_2)); }
inline int32_t get_m_value_2() const { return ___m_value_2; }
inline int32_t* get_address_of_m_value_2() { return &___m_value_2; }
inline void set_m_value_2(int32_t value)
{
___m_value_2 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INT32_T2950945753_H
#ifndef SPRITESTATE_T1362986479_H
#define SPRITESTATE_T1362986479_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.SpriteState
struct SpriteState_t1362986479
{
public:
// UnityEngine.Sprite UnityEngine.UI.SpriteState::m_HighlightedSprite
Sprite_t280657092 * ___m_HighlightedSprite_0;
// UnityEngine.Sprite UnityEngine.UI.SpriteState::m_PressedSprite
Sprite_t280657092 * ___m_PressedSprite_1;
// UnityEngine.Sprite UnityEngine.UI.SpriteState::m_DisabledSprite
Sprite_t280657092 * ___m_DisabledSprite_2;
public:
inline static int32_t get_offset_of_m_HighlightedSprite_0() { return static_cast<int32_t>(offsetof(SpriteState_t1362986479, ___m_HighlightedSprite_0)); }
inline Sprite_t280657092 * get_m_HighlightedSprite_0() const { return ___m_HighlightedSprite_0; }
inline Sprite_t280657092 ** get_address_of_m_HighlightedSprite_0() { return &___m_HighlightedSprite_0; }
inline void set_m_HighlightedSprite_0(Sprite_t280657092 * value)
{
___m_HighlightedSprite_0 = value;
Il2CppCodeGenWriteBarrier((&___m_HighlightedSprite_0), value);
}
inline static int32_t get_offset_of_m_PressedSprite_1() { return static_cast<int32_t>(offsetof(SpriteState_t1362986479, ___m_PressedSprite_1)); }
inline Sprite_t280657092 * get_m_PressedSprite_1() const { return ___m_PressedSprite_1; }
inline Sprite_t280657092 ** get_address_of_m_PressedSprite_1() { return &___m_PressedSprite_1; }
inline void set_m_PressedSprite_1(Sprite_t280657092 * value)
{
___m_PressedSprite_1 = value;
Il2CppCodeGenWriteBarrier((&___m_PressedSprite_1), value);
}
inline static int32_t get_offset_of_m_DisabledSprite_2() { return static_cast<int32_t>(offsetof(SpriteState_t1362986479, ___m_DisabledSprite_2)); }
inline Sprite_t280657092 * get_m_DisabledSprite_2() const { return ___m_DisabledSprite_2; }
inline Sprite_t280657092 ** get_address_of_m_DisabledSprite_2() { return &___m_DisabledSprite_2; }
inline void set_m_DisabledSprite_2(Sprite_t280657092 * value)
{
___m_DisabledSprite_2 = value;
Il2CppCodeGenWriteBarrier((&___m_DisabledSprite_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of UnityEngine.UI.SpriteState
struct SpriteState_t1362986479_marshaled_pinvoke
{
Sprite_t280657092 * ___m_HighlightedSprite_0;
Sprite_t280657092 * ___m_PressedSprite_1;
Sprite_t280657092 * ___m_DisabledSprite_2;
};
// Native definition for COM marshalling of UnityEngine.UI.SpriteState
struct SpriteState_t1362986479_marshaled_com
{
Sprite_t280657092 * ___m_HighlightedSprite_0;
Sprite_t280657092 * ___m_PressedSprite_1;
Sprite_t280657092 * ___m_DisabledSprite_2;
};
#endif // SPRITESTATE_T1362986479_H
#ifndef QUATERNION_T2301928331_H
#define QUATERNION_T2301928331_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Quaternion
struct Quaternion_t2301928331
{
public:
// System.Single UnityEngine.Quaternion::x
float ___x_0;
// System.Single UnityEngine.Quaternion::y
float ___y_1;
// System.Single UnityEngine.Quaternion::z
float ___z_2;
// System.Single UnityEngine.Quaternion::w
float ___w_3;
public:
inline static int32_t get_offset_of_x_0() { return static_cast<int32_t>(offsetof(Quaternion_t2301928331, ___x_0)); }
inline float get_x_0() const { return ___x_0; }
inline float* get_address_of_x_0() { return &___x_0; }
inline void set_x_0(float value)
{
___x_0 = value;
}
inline static int32_t get_offset_of_y_1() { return static_cast<int32_t>(offsetof(Quaternion_t2301928331, ___y_1)); }
inline float get_y_1() const { return ___y_1; }
inline float* get_address_of_y_1() { return &___y_1; }
inline void set_y_1(float value)
{
___y_1 = value;
}
inline static int32_t get_offset_of_z_2() { return static_cast<int32_t>(offsetof(Quaternion_t2301928331, ___z_2)); }
inline float get_z_2() const { return ___z_2; }
inline float* get_address_of_z_2() { return &___z_2; }
inline void set_z_2(float value)
{
___z_2 = value;
}
inline static int32_t get_offset_of_w_3() { return static_cast<int32_t>(offsetof(Quaternion_t2301928331, ___w_3)); }
inline float get_w_3() const { return ___w_3; }
inline float* get_address_of_w_3() { return &___w_3; }
inline void set_w_3(float value)
{
___w_3 = value;
}
};
struct Quaternion_t2301928331_StaticFields
{
public:
// UnityEngine.Quaternion UnityEngine.Quaternion::identityQuaternion
Quaternion_t2301928331 ___identityQuaternion_4;
public:
inline static int32_t get_offset_of_identityQuaternion_4() { return static_cast<int32_t>(offsetof(Quaternion_t2301928331_StaticFields, ___identityQuaternion_4)); }
inline Quaternion_t2301928331 get_identityQuaternion_4() const { return ___identityQuaternion_4; }
inline Quaternion_t2301928331 * get_address_of_identityQuaternion_4() { return &___identityQuaternion_4; }
inline void set_identityQuaternion_4(Quaternion_t2301928331 value)
{
___identityQuaternion_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // QUATERNION_T2301928331_H
#ifndef U24ARRAYTYPEU3D12_T2488454197_H
#define U24ARRAYTYPEU3D12_T2488454197_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType=12
#pragma pack(push, tp, 1)
struct U24ArrayTypeU3D12_t2488454197
{
public:
union
{
struct
{
};
uint8_t U24ArrayTypeU3D12_t2488454197__padding[12];
};
public:
};
#pragma pack(pop, tp)
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU3D12_T2488454197_H
#ifndef U24ARRAYTYPEU3D16_T3253128244_H
#define U24ARRAYTYPEU3D16_T3253128244_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType=16
#pragma pack(push, tp, 1)
struct U24ArrayTypeU3D16_t3253128244
{
public:
union
{
struct
{
};
uint8_t U24ArrayTypeU3D16_t3253128244__padding[16];
};
public:
};
#pragma pack(pop, tp)
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU3D16_T3253128244_H
#ifndef U24ARRAYTYPEU3D20_T1702832645_H
#define U24ARRAYTYPEU3D20_T1702832645_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType=20
#pragma pack(push, tp, 1)
struct U24ArrayTypeU3D20_t1702832645
{
public:
union
{
struct
{
};
uint8_t U24ArrayTypeU3D20_t1702832645__padding[20];
};
public:
};
#pragma pack(pop, tp)
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU3D20_T1702832645_H
#ifndef U24ARRAYTYPEU3D28_T173484549_H
#define U24ARRAYTYPEU3D28_T173484549_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>/$ArrayType=28
#pragma pack(push, tp, 1)
struct U24ArrayTypeU3D28_t173484549
{
public:
union
{
struct
{
};
uint8_t U24ArrayTypeU3D28_t173484549__padding[28];
};
public:
};
#pragma pack(pop, tp)
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U24ARRAYTYPEU3D28_T173484549_H
#ifndef ENUM_T4135868527_H
#define ENUM_T4135868527_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Enum
struct Enum_t4135868527 : public ValueType_t3640485471
{
public:
public:
};
struct Enum_t4135868527_StaticFields
{
public:
// System.Char[] System.Enum::split_char
CharU5BU5D_t3528271667* ___split_char_0;
public:
inline static int32_t get_offset_of_split_char_0() { return static_cast<int32_t>(offsetof(Enum_t4135868527_StaticFields, ___split_char_0)); }
inline CharU5BU5D_t3528271667* get_split_char_0() const { return ___split_char_0; }
inline CharU5BU5D_t3528271667** get_address_of_split_char_0() { return &___split_char_0; }
inline void set_split_char_0(CharU5BU5D_t3528271667* value)
{
___split_char_0 = value;
Il2CppCodeGenWriteBarrier((&___split_char_0), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of System.Enum
struct Enum_t4135868527_marshaled_pinvoke
{
};
// Native definition for COM marshalling of System.Enum
struct Enum_t4135868527_marshaled_com
{
};
#endif // ENUM_T4135868527_H
#ifndef VECTOR3_T3722313464_H
#define VECTOR3_T3722313464_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Vector3
struct Vector3_t3722313464
{
public:
// System.Single UnityEngine.Vector3::x
float ___x_1;
// System.Single UnityEngine.Vector3::y
float ___y_2;
// System.Single UnityEngine.Vector3::z
float ___z_3;
public:
inline static int32_t get_offset_of_x_1() { return static_cast<int32_t>(offsetof(Vector3_t3722313464, ___x_1)); }
inline float get_x_1() const { return ___x_1; }
inline float* get_address_of_x_1() { return &___x_1; }
inline void set_x_1(float value)
{
___x_1 = value;
}
inline static int32_t get_offset_of_y_2() { return static_cast<int32_t>(offsetof(Vector3_t3722313464, ___y_2)); }
inline float get_y_2() const { return ___y_2; }
inline float* get_address_of_y_2() { return &___y_2; }
inline void set_y_2(float value)
{
___y_2 = value;
}
inline static int32_t get_offset_of_z_3() { return static_cast<int32_t>(offsetof(Vector3_t3722313464, ___z_3)); }
inline float get_z_3() const { return ___z_3; }
inline float* get_address_of_z_3() { return &___z_3; }
inline void set_z_3(float value)
{
___z_3 = value;
}
};
struct Vector3_t3722313464_StaticFields
{
public:
// UnityEngine.Vector3 UnityEngine.Vector3::zeroVector
Vector3_t3722313464 ___zeroVector_4;
// UnityEngine.Vector3 UnityEngine.Vector3::oneVector
Vector3_t3722313464 ___oneVector_5;
// UnityEngine.Vector3 UnityEngine.Vector3::upVector
Vector3_t3722313464 ___upVector_6;
// UnityEngine.Vector3 UnityEngine.Vector3::downVector
Vector3_t3722313464 ___downVector_7;
// UnityEngine.Vector3 UnityEngine.Vector3::leftVector
Vector3_t3722313464 ___leftVector_8;
// UnityEngine.Vector3 UnityEngine.Vector3::rightVector
Vector3_t3722313464 ___rightVector_9;
// UnityEngine.Vector3 UnityEngine.Vector3::forwardVector
Vector3_t3722313464 ___forwardVector_10;
// UnityEngine.Vector3 UnityEngine.Vector3::backVector
Vector3_t3722313464 ___backVector_11;
// UnityEngine.Vector3 UnityEngine.Vector3::positiveInfinityVector
Vector3_t3722313464 ___positiveInfinityVector_12;
// UnityEngine.Vector3 UnityEngine.Vector3::negativeInfinityVector
Vector3_t3722313464 ___negativeInfinityVector_13;
public:
inline static int32_t get_offset_of_zeroVector_4() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___zeroVector_4)); }
inline Vector3_t3722313464 get_zeroVector_4() const { return ___zeroVector_4; }
inline Vector3_t3722313464 * get_address_of_zeroVector_4() { return &___zeroVector_4; }
inline void set_zeroVector_4(Vector3_t3722313464 value)
{
___zeroVector_4 = value;
}
inline static int32_t get_offset_of_oneVector_5() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___oneVector_5)); }
inline Vector3_t3722313464 get_oneVector_5() const { return ___oneVector_5; }
inline Vector3_t3722313464 * get_address_of_oneVector_5() { return &___oneVector_5; }
inline void set_oneVector_5(Vector3_t3722313464 value)
{
___oneVector_5 = value;
}
inline static int32_t get_offset_of_upVector_6() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___upVector_6)); }
inline Vector3_t3722313464 get_upVector_6() const { return ___upVector_6; }
inline Vector3_t3722313464 * get_address_of_upVector_6() { return &___upVector_6; }
inline void set_upVector_6(Vector3_t3722313464 value)
{
___upVector_6 = value;
}
inline static int32_t get_offset_of_downVector_7() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___downVector_7)); }
inline Vector3_t3722313464 get_downVector_7() const { return ___downVector_7; }
inline Vector3_t3722313464 * get_address_of_downVector_7() { return &___downVector_7; }
inline void set_downVector_7(Vector3_t3722313464 value)
{
___downVector_7 = value;
}
inline static int32_t get_offset_of_leftVector_8() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___leftVector_8)); }
inline Vector3_t3722313464 get_leftVector_8() const { return ___leftVector_8; }
inline Vector3_t3722313464 * get_address_of_leftVector_8() { return &___leftVector_8; }
inline void set_leftVector_8(Vector3_t3722313464 value)
{
___leftVector_8 = value;
}
inline static int32_t get_offset_of_rightVector_9() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___rightVector_9)); }
inline Vector3_t3722313464 get_rightVector_9() const { return ___rightVector_9; }
inline Vector3_t3722313464 * get_address_of_rightVector_9() { return &___rightVector_9; }
inline void set_rightVector_9(Vector3_t3722313464 value)
{
___rightVector_9 = value;
}
inline static int32_t get_offset_of_forwardVector_10() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___forwardVector_10)); }
inline Vector3_t3722313464 get_forwardVector_10() const { return ___forwardVector_10; }
inline Vector3_t3722313464 * get_address_of_forwardVector_10() { return &___forwardVector_10; }
inline void set_forwardVector_10(Vector3_t3722313464 value)
{
___forwardVector_10 = value;
}
inline static int32_t get_offset_of_backVector_11() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___backVector_11)); }
inline Vector3_t3722313464 get_backVector_11() const { return ___backVector_11; }
inline Vector3_t3722313464 * get_address_of_backVector_11() { return &___backVector_11; }
inline void set_backVector_11(Vector3_t3722313464 value)
{
___backVector_11 = value;
}
inline static int32_t get_offset_of_positiveInfinityVector_12() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___positiveInfinityVector_12)); }
inline Vector3_t3722313464 get_positiveInfinityVector_12() const { return ___positiveInfinityVector_12; }
inline Vector3_t3722313464 * get_address_of_positiveInfinityVector_12() { return &___positiveInfinityVector_12; }
inline void set_positiveInfinityVector_12(Vector3_t3722313464 value)
{
___positiveInfinityVector_12 = value;
}
inline static int32_t get_offset_of_negativeInfinityVector_13() { return static_cast<int32_t>(offsetof(Vector3_t3722313464_StaticFields, ___negativeInfinityVector_13)); }
inline Vector3_t3722313464 get_negativeInfinityVector_13() const { return ___negativeInfinityVector_13; }
inline Vector3_t3722313464 * get_address_of_negativeInfinityVector_13() { return &___negativeInfinityVector_13; }
inline void set_negativeInfinityVector_13(Vector3_t3722313464 value)
{
___negativeInfinityVector_13 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VECTOR3_T3722313464_H
#ifndef GVR_RECTI_T2249612514_H
#define GVR_RECTI_T2249612514_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.AndroidNativeKeyboardProvider/gvr_recti
struct gvr_recti_t2249612514
{
public:
// System.Int32 Gvr.Internal.AndroidNativeKeyboardProvider/gvr_recti::left
int32_t ___left_0;
// System.Int32 Gvr.Internal.AndroidNativeKeyboardProvider/gvr_recti::right
int32_t ___right_1;
// System.Int32 Gvr.Internal.AndroidNativeKeyboardProvider/gvr_recti::bottom
int32_t ___bottom_2;
// System.Int32 Gvr.Internal.AndroidNativeKeyboardProvider/gvr_recti::top
int32_t ___top_3;
public:
inline static int32_t get_offset_of_left_0() { return static_cast<int32_t>(offsetof(gvr_recti_t2249612514, ___left_0)); }
inline int32_t get_left_0() const { return ___left_0; }
inline int32_t* get_address_of_left_0() { return &___left_0; }
inline void set_left_0(int32_t value)
{
___left_0 = value;
}
inline static int32_t get_offset_of_right_1() { return static_cast<int32_t>(offsetof(gvr_recti_t2249612514, ___right_1)); }
inline int32_t get_right_1() const { return ___right_1; }
inline int32_t* get_address_of_right_1() { return &___right_1; }
inline void set_right_1(int32_t value)
{
___right_1 = value;
}
inline static int32_t get_offset_of_bottom_2() { return static_cast<int32_t>(offsetof(gvr_recti_t2249612514, ___bottom_2)); }
inline int32_t get_bottom_2() const { return ___bottom_2; }
inline int32_t* get_address_of_bottom_2() { return &___bottom_2; }
inline void set_bottom_2(int32_t value)
{
___bottom_2 = value;
}
inline static int32_t get_offset_of_top_3() { return static_cast<int32_t>(offsetof(gvr_recti_t2249612514, ___top_3)); }
inline int32_t get_top_3() const { return ___top_3; }
inline int32_t* get_address_of_top_3() { return &___top_3; }
inline void set_top_3(int32_t value)
{
___top_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVR_RECTI_T2249612514_H
#ifndef RESOLUTIONSIZE_T3677657137_H
#define RESOLUTIONSIZE_T3677657137_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview/ResolutionSize
struct ResolutionSize_t3677657137
{
public:
// System.Int32 Gvr.Internal.InstantPreview/ResolutionSize::width
int32_t ___width_0;
// System.Int32 Gvr.Internal.InstantPreview/ResolutionSize::height
int32_t ___height_1;
public:
inline static int32_t get_offset_of_width_0() { return static_cast<int32_t>(offsetof(ResolutionSize_t3677657137, ___width_0)); }
inline int32_t get_width_0() const { return ___width_0; }
inline int32_t* get_address_of_width_0() { return &___width_0; }
inline void set_width_0(int32_t value)
{
___width_0 = value;
}
inline static int32_t get_offset_of_height_1() { return static_cast<int32_t>(offsetof(ResolutionSize_t3677657137, ___height_1)); }
inline int32_t get_height_1() const { return ___height_1; }
inline int32_t* get_address_of_height_1() { return &___height_1; }
inline void set_height_1(int32_t value)
{
___height_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RESOLUTIONSIZE_T3677657137_H
#ifndef UNITYRECT_T2898233164_H
#define UNITYRECT_T2898233164_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview/UnityRect
struct UnityRect_t2898233164
{
public:
// System.Single Gvr.Internal.InstantPreview/UnityRect::right
float ___right_0;
// System.Single Gvr.Internal.InstantPreview/UnityRect::left
float ___left_1;
// System.Single Gvr.Internal.InstantPreview/UnityRect::top
float ___top_2;
// System.Single Gvr.Internal.InstantPreview/UnityRect::bottom
float ___bottom_3;
public:
inline static int32_t get_offset_of_right_0() { return static_cast<int32_t>(offsetof(UnityRect_t2898233164, ___right_0)); }
inline float get_right_0() const { return ___right_0; }
inline float* get_address_of_right_0() { return &___right_0; }
inline void set_right_0(float value)
{
___right_0 = value;
}
inline static int32_t get_offset_of_left_1() { return static_cast<int32_t>(offsetof(UnityRect_t2898233164, ___left_1)); }
inline float get_left_1() const { return ___left_1; }
inline float* get_address_of_left_1() { return &___left_1; }
inline void set_left_1(float value)
{
___left_1 = value;
}
inline static int32_t get_offset_of_top_2() { return static_cast<int32_t>(offsetof(UnityRect_t2898233164, ___top_2)); }
inline float get_top_2() const { return ___top_2; }
inline float* get_address_of_top_2() { return &___top_2; }
inline void set_top_2(float value)
{
___top_2 = value;
}
inline static int32_t get_offset_of_bottom_3() { return static_cast<int32_t>(offsetof(UnityRect_t2898233164, ___bottom_3)); }
inline float get_bottom_3() const { return ___bottom_3; }
inline float* get_address_of_bottom_3() { return &___bottom_3; }
inline void set_bottom_3(float value)
{
___bottom_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNITYRECT_T2898233164_H
#ifndef GVR_CLOCK_TIME_POINT_T2797008802_H
#define GVR_CLOCK_TIME_POINT_T2797008802_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.AndroidNativeKeyboardProvider/gvr_clock_time_point
struct gvr_clock_time_point_t2797008802
{
public:
// System.Int64 Gvr.Internal.AndroidNativeKeyboardProvider/gvr_clock_time_point::monotonic_system_time_nanos
int64_t ___monotonic_system_time_nanos_0;
public:
inline static int32_t get_offset_of_monotonic_system_time_nanos_0() { return static_cast<int32_t>(offsetof(gvr_clock_time_point_t2797008802, ___monotonic_system_time_nanos_0)); }
inline int64_t get_monotonic_system_time_nanos_0() const { return ___monotonic_system_time_nanos_0; }
inline int64_t* get_address_of_monotonic_system_time_nanos_0() { return &___monotonic_system_time_nanos_0; }
inline void set_monotonic_system_time_nanos_0(int64_t value)
{
___monotonic_system_time_nanos_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVR_CLOCK_TIME_POINT_T2797008802_H
#ifndef GVRRECENTEREVENTTYPE_T513699134_H
#define GVRRECENTEREVENTTYPE_T513699134_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrRecenterEventType
struct GvrRecenterEventType_t513699134
{
public:
// System.Int32 GvrRecenterEventType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(GvrRecenterEventType_t513699134, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRRECENTEREVENTTYPE_T513699134_H
#ifndef MULTISAMPLECOUNTS_T552109702_H
#define MULTISAMPLECOUNTS_T552109702_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview/MultisampleCounts
struct MultisampleCounts_t552109702
{
public:
// System.Int32 Gvr.Internal.InstantPreview/MultisampleCounts::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(MultisampleCounts_t552109702, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MULTISAMPLECOUNTS_T552109702_H
#ifndef BITRATES_T2681405699_H
#define BITRATES_T2681405699_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview/BitRates
struct BitRates_t2681405699
{
public:
// System.Int32 Gvr.Internal.InstantPreview/BitRates::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(BitRates_t2681405699, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BITRATES_T2681405699_H
#ifndef GVREVENTTYPE_T1628138291_H
#define GVREVENTTYPE_T1628138291_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrEventType
struct GvrEventType_t1628138291
{
public:
// System.Int32 GvrEventType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(GvrEventType_t1628138291, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVREVENTTYPE_T1628138291_H
#ifndef UNITYEYEVIEWS_T678228735_H
#define UNITYEYEVIEWS_T678228735_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview/UnityEyeViews
struct UnityEyeViews_t678228735
{
public:
// UnityEngine.Matrix4x4 Gvr.Internal.InstantPreview/UnityEyeViews::leftEyePose
Matrix4x4_t1817901843 ___leftEyePose_0;
// UnityEngine.Matrix4x4 Gvr.Internal.InstantPreview/UnityEyeViews::rightEyePose
Matrix4x4_t1817901843 ___rightEyePose_1;
// Gvr.Internal.InstantPreview/UnityRect Gvr.Internal.InstantPreview/UnityEyeViews::leftEyeViewSize
UnityRect_t2898233164 ___leftEyeViewSize_2;
// Gvr.Internal.InstantPreview/UnityRect Gvr.Internal.InstantPreview/UnityEyeViews::rightEyeViewSize
UnityRect_t2898233164 ___rightEyeViewSize_3;
public:
inline static int32_t get_offset_of_leftEyePose_0() { return static_cast<int32_t>(offsetof(UnityEyeViews_t678228735, ___leftEyePose_0)); }
inline Matrix4x4_t1817901843 get_leftEyePose_0() const { return ___leftEyePose_0; }
inline Matrix4x4_t1817901843 * get_address_of_leftEyePose_0() { return &___leftEyePose_0; }
inline void set_leftEyePose_0(Matrix4x4_t1817901843 value)
{
___leftEyePose_0 = value;
}
inline static int32_t get_offset_of_rightEyePose_1() { return static_cast<int32_t>(offsetof(UnityEyeViews_t678228735, ___rightEyePose_1)); }
inline Matrix4x4_t1817901843 get_rightEyePose_1() const { return ___rightEyePose_1; }
inline Matrix4x4_t1817901843 * get_address_of_rightEyePose_1() { return &___rightEyePose_1; }
inline void set_rightEyePose_1(Matrix4x4_t1817901843 value)
{
___rightEyePose_1 = value;
}
inline static int32_t get_offset_of_leftEyeViewSize_2() { return static_cast<int32_t>(offsetof(UnityEyeViews_t678228735, ___leftEyeViewSize_2)); }
inline UnityRect_t2898233164 get_leftEyeViewSize_2() const { return ___leftEyeViewSize_2; }
inline UnityRect_t2898233164 * get_address_of_leftEyeViewSize_2() { return &___leftEyeViewSize_2; }
inline void set_leftEyeViewSize_2(UnityRect_t2898233164 value)
{
___leftEyeViewSize_2 = value;
}
inline static int32_t get_offset_of_rightEyeViewSize_3() { return static_cast<int32_t>(offsetof(UnityEyeViews_t678228735, ___rightEyeViewSize_3)); }
inline UnityRect_t2898233164 get_rightEyeViewSize_3() const { return ___rightEyeViewSize_3; }
inline UnityRect_t2898233164 * get_address_of_rightEyeViewSize_3() { return &___rightEyeViewSize_3; }
inline void set_rightEyeViewSize_3(UnityRect_t2898233164 value)
{
___rightEyeViewSize_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UNITYEYEVIEWS_T678228735_H
#ifndef GVRSAFETYREGIONTYPE_T1943469016_H
#define GVRSAFETYREGIONTYPE_T1943469016_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrSafetyRegionType
struct GvrSafetyRegionType_t1943469016
{
public:
// System.Int32 GvrSafetyRegionType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(GvrSafetyRegionType_t1943469016, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRSAFETYREGIONTYPE_T1943469016_H
#ifndef GVRKEYBOARDEVENT_T3629165438_H
#define GVRKEYBOARDEVENT_T3629165438_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboardEvent
struct GvrKeyboardEvent_t3629165438
{
public:
// System.Int32 GvrKeyboardEvent::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(GvrKeyboardEvent_t3629165438, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRKEYBOARDEVENT_T3629165438_H
#ifndef U3CPRIVATEIMPLEMENTATIONDETAILSU3E_T3057255366_H
#define U3CPRIVATEIMPLEMENTATIONDETAILSU3E_T3057255366_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// <PrivateImplementationDetails>
struct U3CPrivateImplementationDetailsU3E_t3057255366 : public RuntimeObject
{
public:
public:
};
struct U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields
{
public:
// <PrivateImplementationDetails>/$ArrayType=12 <PrivateImplementationDetails>::$field-311441405B64B3EA9097AC8E07F3274962EC6BB4
U24ArrayTypeU3D12_t2488454197 ___U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0;
// <PrivateImplementationDetails>/$ArrayType=12 <PrivateImplementationDetails>::$field-16E2B412E9C2B8E31B780DE46254349320CCAAA0
U24ArrayTypeU3D12_t2488454197 ___U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1;
// <PrivateImplementationDetails>/$ArrayType=16 <PrivateImplementationDetails>::$field-D7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8
U24ArrayTypeU3D16_t3253128244 ___U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2;
// <PrivateImplementationDetails>/$ArrayType=16 <PrivateImplementationDetails>::$field-25B4B83D2A43393F4E18624598DDA694217A6622
U24ArrayTypeU3D16_t3253128244 ___U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3;
// <PrivateImplementationDetails>/$ArrayType=20 <PrivateImplementationDetails>::$field-FADC743710841EB901D5F6FBC97F555D4BD94310
U24ArrayTypeU3D20_t1702832645 ___U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4;
// <PrivateImplementationDetails>/$ArrayType=28 <PrivateImplementationDetails>::$field-C34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F
U24ArrayTypeU3D28_t173484549 ___U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5;
public:
inline static int32_t get_offset_of_U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields, ___U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0)); }
inline U24ArrayTypeU3D12_t2488454197 get_U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0() const { return ___U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0; }
inline U24ArrayTypeU3D12_t2488454197 * get_address_of_U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0() { return &___U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0; }
inline void set_U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0(U24ArrayTypeU3D12_t2488454197 value)
{
___U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0 = value;
}
inline static int32_t get_offset_of_U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields, ___U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1)); }
inline U24ArrayTypeU3D12_t2488454197 get_U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1() const { return ___U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1; }
inline U24ArrayTypeU3D12_t2488454197 * get_address_of_U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1() { return &___U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1; }
inline void set_U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1(U24ArrayTypeU3D12_t2488454197 value)
{
___U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1 = value;
}
inline static int32_t get_offset_of_U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields, ___U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2)); }
inline U24ArrayTypeU3D16_t3253128244 get_U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2() const { return ___U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2; }
inline U24ArrayTypeU3D16_t3253128244 * get_address_of_U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2() { return &___U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2; }
inline void set_U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2(U24ArrayTypeU3D16_t3253128244 value)
{
___U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2 = value;
}
inline static int32_t get_offset_of_U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields, ___U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3)); }
inline U24ArrayTypeU3D16_t3253128244 get_U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3() const { return ___U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3; }
inline U24ArrayTypeU3D16_t3253128244 * get_address_of_U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3() { return &___U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3; }
inline void set_U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3(U24ArrayTypeU3D16_t3253128244 value)
{
___U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3 = value;
}
inline static int32_t get_offset_of_U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields, ___U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4)); }
inline U24ArrayTypeU3D20_t1702832645 get_U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4() const { return ___U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4; }
inline U24ArrayTypeU3D20_t1702832645 * get_address_of_U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4() { return &___U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4; }
inline void set_U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4(U24ArrayTypeU3D20_t1702832645 value)
{
___U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4 = value;
}
inline static int32_t get_offset_of_U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5() { return static_cast<int32_t>(offsetof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields, ___U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5)); }
inline U24ArrayTypeU3D28_t173484549 get_U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5() const { return ___U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5; }
inline U24ArrayTypeU3D28_t173484549 * get_address_of_U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5() { return &___U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5; }
inline void set_U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5(U24ArrayTypeU3D28_t173484549 value)
{
___U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // U3CPRIVATEIMPLEMENTATIONDETAILSU3E_T3057255366_H
#ifndef GVRKEYBOARDERROR_T3210682397_H
#define GVRKEYBOARDERROR_T3210682397_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboardError
struct GvrKeyboardError_t3210682397
{
public:
// System.Int32 GvrKeyboardError::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(GvrKeyboardError_t3210682397, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRKEYBOARDERROR_T3210682397_H
#ifndef RESOLUTIONS_T3321708501_H
#define RESOLUTIONS_T3321708501_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview/Resolutions
struct Resolutions_t3321708501
{
public:
// System.Int32 Gvr.Internal.InstantPreview/Resolutions::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(Resolutions_t3321708501, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RESOLUTIONS_T3321708501_H
#ifndef MODE_T1066900953_H
#define MODE_T1066900953_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.Navigation/Mode
struct Mode_t1066900953
{
public:
// System.Int32 UnityEngine.UI.Navigation/Mode::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(Mode_t1066900953, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MODE_T1066900953_H
#ifndef OBJECT_T631007953_H
#define OBJECT_T631007953_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Object
struct Object_t631007953 : public RuntimeObject
{
public:
// System.IntPtr UnityEngine.Object::m_CachedPtr
intptr_t ___m_CachedPtr_0;
public:
inline static int32_t get_offset_of_m_CachedPtr_0() { return static_cast<int32_t>(offsetof(Object_t631007953, ___m_CachedPtr_0)); }
inline intptr_t get_m_CachedPtr_0() const { return ___m_CachedPtr_0; }
inline intptr_t* get_address_of_m_CachedPtr_0() { return &___m_CachedPtr_0; }
inline void set_m_CachedPtr_0(intptr_t value)
{
___m_CachedPtr_0 = value;
}
};
struct Object_t631007953_StaticFields
{
public:
// System.Int32 UnityEngine.Object::OffsetOfInstanceIDInCPlusPlusObject
int32_t ___OffsetOfInstanceIDInCPlusPlusObject_1;
public:
inline static int32_t get_offset_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return static_cast<int32_t>(offsetof(Object_t631007953_StaticFields, ___OffsetOfInstanceIDInCPlusPlusObject_1)); }
inline int32_t get_OffsetOfInstanceIDInCPlusPlusObject_1() const { return ___OffsetOfInstanceIDInCPlusPlusObject_1; }
inline int32_t* get_address_of_OffsetOfInstanceIDInCPlusPlusObject_1() { return &___OffsetOfInstanceIDInCPlusPlusObject_1; }
inline void set_OffsetOfInstanceIDInCPlusPlusObject_1(int32_t value)
{
___OffsetOfInstanceIDInCPlusPlusObject_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of UnityEngine.Object
struct Object_t631007953_marshaled_pinvoke
{
intptr_t ___m_CachedPtr_0;
};
// Native definition for COM marshalling of UnityEngine.Object
struct Object_t631007953_marshaled_com
{
intptr_t ___m_CachedPtr_0;
};
#endif // OBJECT_T631007953_H
#ifndef SELECTIONSTATE_T2656606514_H
#define SELECTIONSTATE_T2656606514_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.Selectable/SelectionState
struct SelectionState_t2656606514
{
public:
// System.Int32 UnityEngine.UI.Selectable/SelectionState::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(SelectionState_t2656606514, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SELECTIONSTATE_T2656606514_H
#ifndef GVR_FEATURE_T1054564930_H
#define GVR_FEATURE_T1054564930_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.gvr_feature
struct gvr_feature_t1054564930
{
public:
// System.Int32 Gvr.Internal.gvr_feature::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(gvr_feature_t1054564930, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVR_FEATURE_T1054564930_H
#ifndef COLORBLOCK_T2139031574_H
#define COLORBLOCK_T2139031574_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.ColorBlock
struct ColorBlock_t2139031574
{
public:
// UnityEngine.Color UnityEngine.UI.ColorBlock::m_NormalColor
Color_t2555686324 ___m_NormalColor_0;
// UnityEngine.Color UnityEngine.UI.ColorBlock::m_HighlightedColor
Color_t2555686324 ___m_HighlightedColor_1;
// UnityEngine.Color UnityEngine.UI.ColorBlock::m_PressedColor
Color_t2555686324 ___m_PressedColor_2;
// UnityEngine.Color UnityEngine.UI.ColorBlock::m_DisabledColor
Color_t2555686324 ___m_DisabledColor_3;
// System.Single UnityEngine.UI.ColorBlock::m_ColorMultiplier
float ___m_ColorMultiplier_4;
// System.Single UnityEngine.UI.ColorBlock::m_FadeDuration
float ___m_FadeDuration_5;
public:
inline static int32_t get_offset_of_m_NormalColor_0() { return static_cast<int32_t>(offsetof(ColorBlock_t2139031574, ___m_NormalColor_0)); }
inline Color_t2555686324 get_m_NormalColor_0() const { return ___m_NormalColor_0; }
inline Color_t2555686324 * get_address_of_m_NormalColor_0() { return &___m_NormalColor_0; }
inline void set_m_NormalColor_0(Color_t2555686324 value)
{
___m_NormalColor_0 = value;
}
inline static int32_t get_offset_of_m_HighlightedColor_1() { return static_cast<int32_t>(offsetof(ColorBlock_t2139031574, ___m_HighlightedColor_1)); }
inline Color_t2555686324 get_m_HighlightedColor_1() const { return ___m_HighlightedColor_1; }
inline Color_t2555686324 * get_address_of_m_HighlightedColor_1() { return &___m_HighlightedColor_1; }
inline void set_m_HighlightedColor_1(Color_t2555686324 value)
{
___m_HighlightedColor_1 = value;
}
inline static int32_t get_offset_of_m_PressedColor_2() { return static_cast<int32_t>(offsetof(ColorBlock_t2139031574, ___m_PressedColor_2)); }
inline Color_t2555686324 get_m_PressedColor_2() const { return ___m_PressedColor_2; }
inline Color_t2555686324 * get_address_of_m_PressedColor_2() { return &___m_PressedColor_2; }
inline void set_m_PressedColor_2(Color_t2555686324 value)
{
___m_PressedColor_2 = value;
}
inline static int32_t get_offset_of_m_DisabledColor_3() { return static_cast<int32_t>(offsetof(ColorBlock_t2139031574, ___m_DisabledColor_3)); }
inline Color_t2555686324 get_m_DisabledColor_3() const { return ___m_DisabledColor_3; }
inline Color_t2555686324 * get_address_of_m_DisabledColor_3() { return &___m_DisabledColor_3; }
inline void set_m_DisabledColor_3(Color_t2555686324 value)
{
___m_DisabledColor_3 = value;
}
inline static int32_t get_offset_of_m_ColorMultiplier_4() { return static_cast<int32_t>(offsetof(ColorBlock_t2139031574, ___m_ColorMultiplier_4)); }
inline float get_m_ColorMultiplier_4() const { return ___m_ColorMultiplier_4; }
inline float* get_address_of_m_ColorMultiplier_4() { return &___m_ColorMultiplier_4; }
inline void set_m_ColorMultiplier_4(float value)
{
___m_ColorMultiplier_4 = value;
}
inline static int32_t get_offset_of_m_FadeDuration_5() { return static_cast<int32_t>(offsetof(ColorBlock_t2139031574, ___m_FadeDuration_5)); }
inline float get_m_FadeDuration_5() const { return ___m_FadeDuration_5; }
inline float* get_address_of_m_FadeDuration_5() { return &___m_FadeDuration_5; }
inline void set_m_FadeDuration_5(float value)
{
___m_FadeDuration_5 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COLORBLOCK_T2139031574_H
#ifndef TRANSITION_T1769908631_H
#define TRANSITION_T1769908631_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.Selectable/Transition
struct Transition_t1769908631
{
public:
// System.Int32 UnityEngine.UI.Selectable/Transition::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(Transition_t1769908631, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TRANSITION_T1769908631_H
#ifndef GVR_PROPERTY_TYPE_T1812416635_H
#define GVR_PROPERTY_TYPE_T1812416635_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.gvr_property_type
struct gvr_property_type_t1812416635
{
public:
// System.Int32 Gvr.Internal.gvr_property_type::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(gvr_property_type_t1812416635, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVR_PROPERTY_TYPE_T1812416635_H
#ifndef DELEGATE_T1188392813_H
#define DELEGATE_T1188392813_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Delegate
struct Delegate_t1188392813 : public RuntimeObject
{
public:
// System.IntPtr System.Delegate::method_ptr
Il2CppMethodPointer ___method_ptr_0;
// System.IntPtr System.Delegate::invoke_impl
intptr_t ___invoke_impl_1;
// System.Object System.Delegate::m_target
RuntimeObject * ___m_target_2;
// System.IntPtr System.Delegate::method
intptr_t ___method_3;
// System.IntPtr System.Delegate::delegate_trampoline
intptr_t ___delegate_trampoline_4;
// System.IntPtr System.Delegate::method_code
intptr_t ___method_code_5;
// System.Reflection.MethodInfo System.Delegate::method_info
MethodInfo_t * ___method_info_6;
// System.Reflection.MethodInfo System.Delegate::original_method_info
MethodInfo_t * ___original_method_info_7;
// System.DelegateData System.Delegate::data
DelegateData_t1677132599 * ___data_8;
public:
inline static int32_t get_offset_of_method_ptr_0() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_ptr_0)); }
inline Il2CppMethodPointer get_method_ptr_0() const { return ___method_ptr_0; }
inline Il2CppMethodPointer* get_address_of_method_ptr_0() { return &___method_ptr_0; }
inline void set_method_ptr_0(Il2CppMethodPointer value)
{
___method_ptr_0 = value;
}
inline static int32_t get_offset_of_invoke_impl_1() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___invoke_impl_1)); }
inline intptr_t get_invoke_impl_1() const { return ___invoke_impl_1; }
inline intptr_t* get_address_of_invoke_impl_1() { return &___invoke_impl_1; }
inline void set_invoke_impl_1(intptr_t value)
{
___invoke_impl_1 = value;
}
inline static int32_t get_offset_of_m_target_2() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___m_target_2)); }
inline RuntimeObject * get_m_target_2() const { return ___m_target_2; }
inline RuntimeObject ** get_address_of_m_target_2() { return &___m_target_2; }
inline void set_m_target_2(RuntimeObject * value)
{
___m_target_2 = value;
Il2CppCodeGenWriteBarrier((&___m_target_2), value);
}
inline static int32_t get_offset_of_method_3() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_3)); }
inline intptr_t get_method_3() const { return ___method_3; }
inline intptr_t* get_address_of_method_3() { return &___method_3; }
inline void set_method_3(intptr_t value)
{
___method_3 = value;
}
inline static int32_t get_offset_of_delegate_trampoline_4() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___delegate_trampoline_4)); }
inline intptr_t get_delegate_trampoline_4() const { return ___delegate_trampoline_4; }
inline intptr_t* get_address_of_delegate_trampoline_4() { return &___delegate_trampoline_4; }
inline void set_delegate_trampoline_4(intptr_t value)
{
___delegate_trampoline_4 = value;
}
inline static int32_t get_offset_of_method_code_5() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_code_5)); }
inline intptr_t get_method_code_5() const { return ___method_code_5; }
inline intptr_t* get_address_of_method_code_5() { return &___method_code_5; }
inline void set_method_code_5(intptr_t value)
{
___method_code_5 = value;
}
inline static int32_t get_offset_of_method_info_6() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___method_info_6)); }
inline MethodInfo_t * get_method_info_6() const { return ___method_info_6; }
inline MethodInfo_t ** get_address_of_method_info_6() { return &___method_info_6; }
inline void set_method_info_6(MethodInfo_t * value)
{
___method_info_6 = value;
Il2CppCodeGenWriteBarrier((&___method_info_6), value);
}
inline static int32_t get_offset_of_original_method_info_7() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___original_method_info_7)); }
inline MethodInfo_t * get_original_method_info_7() const { return ___original_method_info_7; }
inline MethodInfo_t ** get_address_of_original_method_info_7() { return &___original_method_info_7; }
inline void set_original_method_info_7(MethodInfo_t * value)
{
___original_method_info_7 = value;
Il2CppCodeGenWriteBarrier((&___original_method_info_7), value);
}
inline static int32_t get_offset_of_data_8() { return static_cast<int32_t>(offsetof(Delegate_t1188392813, ___data_8)); }
inline DelegateData_t1677132599 * get_data_8() const { return ___data_8; }
inline DelegateData_t1677132599 ** get_address_of_data_8() { return &___data_8; }
inline void set_data_8(DelegateData_t1677132599 * value)
{
___data_8 = value;
Il2CppCodeGenWriteBarrier((&___data_8), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DELEGATE_T1188392813_H
#ifndef GVR_VALUE_TYPE_T2156477760_H
#define GVR_VALUE_TYPE_T2156477760_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.gvr_value_type
struct gvr_value_type_t2156477760
{
public:
// System.Int32 Gvr.Internal.gvr_value_type::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(gvr_value_type_t2156477760, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVR_VALUE_TYPE_T2156477760_H
#ifndef GVR_RECENTER_FLAGS_T2414511954_H
#define GVR_RECENTER_FLAGS_T2414511954_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.gvr_recenter_flags
struct gvr_recenter_flags_t2414511954
{
public:
// System.Int32 Gvr.Internal.gvr_recenter_flags::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(gvr_recenter_flags_t2414511954, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVR_RECENTER_FLAGS_T2414511954_H
#ifndef ANDROIDJAVAPROXY_T2835824643_H
#define ANDROIDJAVAPROXY_T2835824643_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.AndroidJavaProxy
struct AndroidJavaProxy_t2835824643 : public RuntimeObject
{
public:
// UnityEngine.AndroidJavaClass UnityEngine.AndroidJavaProxy::javaInterface
AndroidJavaClass_t32045322 * ___javaInterface_0;
// UnityEngine.AndroidJavaObject UnityEngine.AndroidJavaProxy::proxyObject
AndroidJavaObject_t4131667876 * ___proxyObject_1;
public:
inline static int32_t get_offset_of_javaInterface_0() { return static_cast<int32_t>(offsetof(AndroidJavaProxy_t2835824643, ___javaInterface_0)); }
inline AndroidJavaClass_t32045322 * get_javaInterface_0() const { return ___javaInterface_0; }
inline AndroidJavaClass_t32045322 ** get_address_of_javaInterface_0() { return &___javaInterface_0; }
inline void set_javaInterface_0(AndroidJavaClass_t32045322 * value)
{
___javaInterface_0 = value;
Il2CppCodeGenWriteBarrier((&___javaInterface_0), value);
}
inline static int32_t get_offset_of_proxyObject_1() { return static_cast<int32_t>(offsetof(AndroidJavaProxy_t2835824643, ___proxyObject_1)); }
inline AndroidJavaObject_t4131667876 * get_proxyObject_1() const { return ___proxyObject_1; }
inline AndroidJavaObject_t4131667876 ** get_address_of_proxyObject_1() { return &___proxyObject_1; }
inline void set_proxyObject_1(AndroidJavaObject_t4131667876 * value)
{
___proxyObject_1 = value;
Il2CppCodeGenWriteBarrier((&___proxyObject_1), value);
}
};
struct AndroidJavaProxy_t2835824643_StaticFields
{
public:
// UnityEngine.GlobalJavaObjectRef UnityEngine.AndroidJavaProxy::s_JavaLangSystemClass
GlobalJavaObjectRef_t3225273728 * ___s_JavaLangSystemClass_2;
// System.IntPtr UnityEngine.AndroidJavaProxy::s_HashCodeMethodID
intptr_t ___s_HashCodeMethodID_3;
public:
inline static int32_t get_offset_of_s_JavaLangSystemClass_2() { return static_cast<int32_t>(offsetof(AndroidJavaProxy_t2835824643_StaticFields, ___s_JavaLangSystemClass_2)); }
inline GlobalJavaObjectRef_t3225273728 * get_s_JavaLangSystemClass_2() const { return ___s_JavaLangSystemClass_2; }
inline GlobalJavaObjectRef_t3225273728 ** get_address_of_s_JavaLangSystemClass_2() { return &___s_JavaLangSystemClass_2; }
inline void set_s_JavaLangSystemClass_2(GlobalJavaObjectRef_t3225273728 * value)
{
___s_JavaLangSystemClass_2 = value;
Il2CppCodeGenWriteBarrier((&___s_JavaLangSystemClass_2), value);
}
inline static int32_t get_offset_of_s_HashCodeMethodID_3() { return static_cast<int32_t>(offsetof(AndroidJavaProxy_t2835824643_StaticFields, ___s_HashCodeMethodID_3)); }
inline intptr_t get_s_HashCodeMethodID_3() const { return ___s_HashCodeMethodID_3; }
inline intptr_t* get_address_of_s_HashCodeMethodID_3() { return &___s_HashCodeMethodID_3; }
inline void set_s_HashCodeMethodID_3(intptr_t value)
{
___s_HashCodeMethodID_3 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ANDROIDJAVAPROXY_T2835824643_H
#ifndef GVRKEYBOARDINPUTMODE_T518947509_H
#define GVRKEYBOARDINPUTMODE_T518947509_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboardInputMode
struct GvrKeyboardInputMode_t518947509
{
public:
// System.Int32 GvrKeyboardInputMode::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(GvrKeyboardInputMode_t518947509, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRKEYBOARDINPUTMODE_T518947509_H
#ifndef GVRINFO_T2187998870_H
#define GVRINFO_T2187998870_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrInfo
struct GvrInfo_t2187998870 : public PropertyAttribute_t3677895545
{
public:
// System.String GvrInfo::text
String_t* ___text_0;
// System.Int32 GvrInfo::numLines
int32_t ___numLines_1;
public:
inline static int32_t get_offset_of_text_0() { return static_cast<int32_t>(offsetof(GvrInfo_t2187998870, ___text_0)); }
inline String_t* get_text_0() const { return ___text_0; }
inline String_t** get_address_of_text_0() { return &___text_0; }
inline void set_text_0(String_t* value)
{
___text_0 = value;
Il2CppCodeGenWriteBarrier((&___text_0), value);
}
inline static int32_t get_offset_of_numLines_1() { return static_cast<int32_t>(offsetof(GvrInfo_t2187998870, ___numLines_1)); }
inline int32_t get_numLines_1() const { return ___numLines_1; }
inline int32_t* get_address_of_numLines_1() { return &___numLines_1; }
inline void set_numLines_1(int32_t value)
{
___numLines_1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRINFO_T2187998870_H
#ifndef VIDEOTYPE_T2491562340_H
#define VIDEOTYPE_T2491562340_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/VideoType
struct VideoType_t2491562340
{
public:
// System.Int32 GvrVideoPlayerTexture/VideoType::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(VideoType_t2491562340, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VIDEOTYPE_T2491562340_H
#ifndef VIDEORESOLUTION_T1062057780_H
#define VIDEORESOLUTION_T1062057780_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/VideoResolution
struct VideoResolution_t1062057780
{
public:
// System.Int32 GvrVideoPlayerTexture/VideoResolution::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(VideoResolution_t1062057780, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VIDEORESOLUTION_T1062057780_H
#ifndef VIDEOPLAYERSTATE_T3323603301_H
#define VIDEOPLAYERSTATE_T3323603301_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/VideoPlayerState
struct VideoPlayerState_t3323603301
{
public:
// System.Int32 GvrVideoPlayerTexture/VideoPlayerState::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(VideoPlayerState_t3323603301, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VIDEOPLAYERSTATE_T3323603301_H
#ifndef VIDEOEVENTS_T3555787859_H
#define VIDEOEVENTS_T3555787859_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/VideoEvents
struct VideoEvents_t3555787859
{
public:
// System.Int32 GvrVideoPlayerTexture/VideoEvents::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(VideoEvents_t3555787859, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // VIDEOEVENTS_T3555787859_H
#ifndef STEREOMODE_T1039127149_H
#define STEREOMODE_T1039127149_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/StereoMode
struct StereoMode_t1039127149
{
public:
// System.Int32 GvrVideoPlayerTexture/StereoMode::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(StereoMode_t1039127149, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STEREOMODE_T1039127149_H
#ifndef POSE3D_T2649470188_H
#define POSE3D_T2649470188_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Pose3D
struct Pose3D_t2649470188 : public RuntimeObject
{
public:
// UnityEngine.Vector3 Pose3D::<Position>k__BackingField
Vector3_t3722313464 ___U3CPositionU3Ek__BackingField_1;
// UnityEngine.Quaternion Pose3D::<Orientation>k__BackingField
Quaternion_t2301928331 ___U3COrientationU3Ek__BackingField_2;
// UnityEngine.Matrix4x4 Pose3D::<Matrix>k__BackingField
Matrix4x4_t1817901843 ___U3CMatrixU3Ek__BackingField_3;
public:
inline static int32_t get_offset_of_U3CPositionU3Ek__BackingField_1() { return static_cast<int32_t>(offsetof(Pose3D_t2649470188, ___U3CPositionU3Ek__BackingField_1)); }
inline Vector3_t3722313464 get_U3CPositionU3Ek__BackingField_1() const { return ___U3CPositionU3Ek__BackingField_1; }
inline Vector3_t3722313464 * get_address_of_U3CPositionU3Ek__BackingField_1() { return &___U3CPositionU3Ek__BackingField_1; }
inline void set_U3CPositionU3Ek__BackingField_1(Vector3_t3722313464 value)
{
___U3CPositionU3Ek__BackingField_1 = value;
}
inline static int32_t get_offset_of_U3COrientationU3Ek__BackingField_2() { return static_cast<int32_t>(offsetof(Pose3D_t2649470188, ___U3COrientationU3Ek__BackingField_2)); }
inline Quaternion_t2301928331 get_U3COrientationU3Ek__BackingField_2() const { return ___U3COrientationU3Ek__BackingField_2; }
inline Quaternion_t2301928331 * get_address_of_U3COrientationU3Ek__BackingField_2() { return &___U3COrientationU3Ek__BackingField_2; }
inline void set_U3COrientationU3Ek__BackingField_2(Quaternion_t2301928331 value)
{
___U3COrientationU3Ek__BackingField_2 = value;
}
inline static int32_t get_offset_of_U3CMatrixU3Ek__BackingField_3() { return static_cast<int32_t>(offsetof(Pose3D_t2649470188, ___U3CMatrixU3Ek__BackingField_3)); }
inline Matrix4x4_t1817901843 get_U3CMatrixU3Ek__BackingField_3() const { return ___U3CMatrixU3Ek__BackingField_3; }
inline Matrix4x4_t1817901843 * get_address_of_U3CMatrixU3Ek__BackingField_3() { return &___U3CMatrixU3Ek__BackingField_3; }
inline void set_U3CMatrixU3Ek__BackingField_3(Matrix4x4_t1817901843 value)
{
___U3CMatrixU3Ek__BackingField_3 = value;
}
};
struct Pose3D_t2649470188_StaticFields
{
public:
// UnityEngine.Matrix4x4 Pose3D::FLIP_Z
Matrix4x4_t1817901843 ___FLIP_Z_0;
public:
inline static int32_t get_offset_of_FLIP_Z_0() { return static_cast<int32_t>(offsetof(Pose3D_t2649470188_StaticFields, ___FLIP_Z_0)); }
inline Matrix4x4_t1817901843 get_FLIP_Z_0() const { return ___FLIP_Z_0; }
inline Matrix4x4_t1817901843 * get_address_of_FLIP_Z_0() { return &___FLIP_Z_0; }
inline void set_FLIP_Z_0(Matrix4x4_t1817901843 value)
{
___FLIP_Z_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // POSE3D_T2649470188_H
#ifndef RENDERCOMMAND_T1121160834_H
#define RENDERCOMMAND_T1121160834_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/RenderCommand
struct RenderCommand_t1121160834
{
public:
// System.Int32 GvrVideoPlayerTexture/RenderCommand::value__
int32_t ___value___1;
public:
inline static int32_t get_offset_of_value___1() { return static_cast<int32_t>(offsetof(RenderCommand_t1121160834, ___value___1)); }
inline int32_t get_value___1() const { return ___value___1; }
inline int32_t* get_address_of_value___1() { return &___value___1; }
inline void set_value___1(int32_t value)
{
___value___1 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // RENDERCOMMAND_T1121160834_H
#ifndef MULTICASTDELEGATE_T_H
#define MULTICASTDELEGATE_T_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.MulticastDelegate
struct MulticastDelegate_t : public Delegate_t1188392813
{
public:
// System.MulticastDelegate System.MulticastDelegate::prev
MulticastDelegate_t * ___prev_9;
// System.MulticastDelegate System.MulticastDelegate::kpm_next
MulticastDelegate_t * ___kpm_next_10;
public:
inline static int32_t get_offset_of_prev_9() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___prev_9)); }
inline MulticastDelegate_t * get_prev_9() const { return ___prev_9; }
inline MulticastDelegate_t ** get_address_of_prev_9() { return &___prev_9; }
inline void set_prev_9(MulticastDelegate_t * value)
{
___prev_9 = value;
Il2CppCodeGenWriteBarrier((&___prev_9), value);
}
inline static int32_t get_offset_of_kpm_next_10() { return static_cast<int32_t>(offsetof(MulticastDelegate_t, ___kpm_next_10)); }
inline MulticastDelegate_t * get_kpm_next_10() const { return ___kpm_next_10; }
inline MulticastDelegate_t ** get_address_of_kpm_next_10() { return &___kpm_next_10; }
inline void set_kpm_next_10(MulticastDelegate_t * value)
{
___kpm_next_10 = value;
Il2CppCodeGenWriteBarrier((&___kpm_next_10), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MULTICASTDELEGATE_T_H
#ifndef HEADSETSTATE_T378905490_H
#define HEADSETSTATE_T378905490_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.HeadsetState
struct HeadsetState_t378905490
{
public:
// GvrEventType Gvr.Internal.HeadsetState::eventType
int32_t ___eventType_0;
// System.Int32 Gvr.Internal.HeadsetState::eventFlags
int32_t ___eventFlags_1;
// System.Int64 Gvr.Internal.HeadsetState::eventTimestampNs
int64_t ___eventTimestampNs_2;
// GvrRecenterEventType Gvr.Internal.HeadsetState::recenterEventType
int32_t ___recenterEventType_3;
// System.UInt32 Gvr.Internal.HeadsetState::recenterEventFlags
uint32_t ___recenterEventFlags_4;
// UnityEngine.Vector3 Gvr.Internal.HeadsetState::recenteredPosition
Vector3_t3722313464 ___recenteredPosition_5;
// UnityEngine.Quaternion Gvr.Internal.HeadsetState::recenteredRotation
Quaternion_t2301928331 ___recenteredRotation_6;
public:
inline static int32_t get_offset_of_eventType_0() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___eventType_0)); }
inline int32_t get_eventType_0() const { return ___eventType_0; }
inline int32_t* get_address_of_eventType_0() { return &___eventType_0; }
inline void set_eventType_0(int32_t value)
{
___eventType_0 = value;
}
inline static int32_t get_offset_of_eventFlags_1() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___eventFlags_1)); }
inline int32_t get_eventFlags_1() const { return ___eventFlags_1; }
inline int32_t* get_address_of_eventFlags_1() { return &___eventFlags_1; }
inline void set_eventFlags_1(int32_t value)
{
___eventFlags_1 = value;
}
inline static int32_t get_offset_of_eventTimestampNs_2() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___eventTimestampNs_2)); }
inline int64_t get_eventTimestampNs_2() const { return ___eventTimestampNs_2; }
inline int64_t* get_address_of_eventTimestampNs_2() { return &___eventTimestampNs_2; }
inline void set_eventTimestampNs_2(int64_t value)
{
___eventTimestampNs_2 = value;
}
inline static int32_t get_offset_of_recenterEventType_3() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___recenterEventType_3)); }
inline int32_t get_recenterEventType_3() const { return ___recenterEventType_3; }
inline int32_t* get_address_of_recenterEventType_3() { return &___recenterEventType_3; }
inline void set_recenterEventType_3(int32_t value)
{
___recenterEventType_3 = value;
}
inline static int32_t get_offset_of_recenterEventFlags_4() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___recenterEventFlags_4)); }
inline uint32_t get_recenterEventFlags_4() const { return ___recenterEventFlags_4; }
inline uint32_t* get_address_of_recenterEventFlags_4() { return &___recenterEventFlags_4; }
inline void set_recenterEventFlags_4(uint32_t value)
{
___recenterEventFlags_4 = value;
}
inline static int32_t get_offset_of_recenteredPosition_5() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___recenteredPosition_5)); }
inline Vector3_t3722313464 get_recenteredPosition_5() const { return ___recenteredPosition_5; }
inline Vector3_t3722313464 * get_address_of_recenteredPosition_5() { return &___recenteredPosition_5; }
inline void set_recenteredPosition_5(Vector3_t3722313464 value)
{
___recenteredPosition_5 = value;
}
inline static int32_t get_offset_of_recenteredRotation_6() { return static_cast<int32_t>(offsetof(HeadsetState_t378905490, ___recenteredRotation_6)); }
inline Quaternion_t2301928331 get_recenteredRotation_6() const { return ___recenteredRotation_6; }
inline Quaternion_t2301928331 * get_address_of_recenteredRotation_6() { return &___recenteredRotation_6; }
inline void set_recenteredRotation_6(Quaternion_t2301928331 value)
{
___recenteredRotation_6 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // HEADSETSTATE_T378905490_H
#ifndef KEYBOARDCALLBACK_T4011255843_H
#define KEYBOARDCALLBACK_T4011255843_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboardIntent/KeyboardCallback
struct KeyboardCallback_t4011255843 : public AndroidJavaProxy_t2835824643
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYBOARDCALLBACK_T4011255843_H
#ifndef ANDROIDNATIVEKEYBOARDPROVIDER_T4081466012_H
#define ANDROIDNATIVEKEYBOARDPROVIDER_T4081466012_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.AndroidNativeKeyboardProvider
struct AndroidNativeKeyboardProvider_t4081466012 : public RuntimeObject
{
public:
// System.IntPtr Gvr.Internal.AndroidNativeKeyboardProvider::renderEventFunction
intptr_t ___renderEventFunction_0;
// System.IntPtr Gvr.Internal.AndroidNativeKeyboardProvider::keyboard_context
intptr_t ___keyboard_context_9;
// GvrKeyboardInputMode Gvr.Internal.AndroidNativeKeyboardProvider::mode
int32_t ___mode_16;
// System.String Gvr.Internal.AndroidNativeKeyboardProvider::editorText
String_t* ___editorText_17;
// UnityEngine.Matrix4x4 Gvr.Internal.AndroidNativeKeyboardProvider::worldMatrix
Matrix4x4_t1817901843 ___worldMatrix_18;
// System.Boolean Gvr.Internal.AndroidNativeKeyboardProvider::isValid
bool ___isValid_19;
// System.Boolean Gvr.Internal.AndroidNativeKeyboardProvider::isReady
bool ___isReady_20;
public:
inline static int32_t get_offset_of_renderEventFunction_0() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___renderEventFunction_0)); }
inline intptr_t get_renderEventFunction_0() const { return ___renderEventFunction_0; }
inline intptr_t* get_address_of_renderEventFunction_0() { return &___renderEventFunction_0; }
inline void set_renderEventFunction_0(intptr_t value)
{
___renderEventFunction_0 = value;
}
inline static int32_t get_offset_of_keyboard_context_9() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___keyboard_context_9)); }
inline intptr_t get_keyboard_context_9() const { return ___keyboard_context_9; }
inline intptr_t* get_address_of_keyboard_context_9() { return &___keyboard_context_9; }
inline void set_keyboard_context_9(intptr_t value)
{
___keyboard_context_9 = value;
}
inline static int32_t get_offset_of_mode_16() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___mode_16)); }
inline int32_t get_mode_16() const { return ___mode_16; }
inline int32_t* get_address_of_mode_16() { return &___mode_16; }
inline void set_mode_16(int32_t value)
{
___mode_16 = value;
}
inline static int32_t get_offset_of_editorText_17() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___editorText_17)); }
inline String_t* get_editorText_17() const { return ___editorText_17; }
inline String_t** get_address_of_editorText_17() { return &___editorText_17; }
inline void set_editorText_17(String_t* value)
{
___editorText_17 = value;
Il2CppCodeGenWriteBarrier((&___editorText_17), value);
}
inline static int32_t get_offset_of_worldMatrix_18() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___worldMatrix_18)); }
inline Matrix4x4_t1817901843 get_worldMatrix_18() const { return ___worldMatrix_18; }
inline Matrix4x4_t1817901843 * get_address_of_worldMatrix_18() { return &___worldMatrix_18; }
inline void set_worldMatrix_18(Matrix4x4_t1817901843 value)
{
___worldMatrix_18 = value;
}
inline static int32_t get_offset_of_isValid_19() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___isValid_19)); }
inline bool get_isValid_19() const { return ___isValid_19; }
inline bool* get_address_of_isValid_19() { return &___isValid_19; }
inline void set_isValid_19(bool value)
{
___isValid_19 = value;
}
inline static int32_t get_offset_of_isReady_20() { return static_cast<int32_t>(offsetof(AndroidNativeKeyboardProvider_t4081466012, ___isReady_20)); }
inline bool get_isReady_20() const { return ___isReady_20; }
inline bool* get_address_of_isReady_20() { return &___isReady_20; }
inline void set_isReady_20(bool value)
{
___isReady_20 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ANDROIDNATIVEKEYBOARDPROVIDER_T4081466012_H
#ifndef COMPONENT_T1923634451_H
#define COMPONENT_T1923634451_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Component
struct Component_t1923634451 : public Object_t631007953
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // COMPONENT_T1923634451_H
#ifndef NAVIGATION_T3049316579_H
#define NAVIGATION_T3049316579_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.Navigation
struct Navigation_t3049316579
{
public:
// UnityEngine.UI.Navigation/Mode UnityEngine.UI.Navigation::m_Mode
int32_t ___m_Mode_0;
// UnityEngine.UI.Selectable UnityEngine.UI.Navigation::m_SelectOnUp
Selectable_t3250028441 * ___m_SelectOnUp_1;
// UnityEngine.UI.Selectable UnityEngine.UI.Navigation::m_SelectOnDown
Selectable_t3250028441 * ___m_SelectOnDown_2;
// UnityEngine.UI.Selectable UnityEngine.UI.Navigation::m_SelectOnLeft
Selectable_t3250028441 * ___m_SelectOnLeft_3;
// UnityEngine.UI.Selectable UnityEngine.UI.Navigation::m_SelectOnRight
Selectable_t3250028441 * ___m_SelectOnRight_4;
public:
inline static int32_t get_offset_of_m_Mode_0() { return static_cast<int32_t>(offsetof(Navigation_t3049316579, ___m_Mode_0)); }
inline int32_t get_m_Mode_0() const { return ___m_Mode_0; }
inline int32_t* get_address_of_m_Mode_0() { return &___m_Mode_0; }
inline void set_m_Mode_0(int32_t value)
{
___m_Mode_0 = value;
}
inline static int32_t get_offset_of_m_SelectOnUp_1() { return static_cast<int32_t>(offsetof(Navigation_t3049316579, ___m_SelectOnUp_1)); }
inline Selectable_t3250028441 * get_m_SelectOnUp_1() const { return ___m_SelectOnUp_1; }
inline Selectable_t3250028441 ** get_address_of_m_SelectOnUp_1() { return &___m_SelectOnUp_1; }
inline void set_m_SelectOnUp_1(Selectable_t3250028441 * value)
{
___m_SelectOnUp_1 = value;
Il2CppCodeGenWriteBarrier((&___m_SelectOnUp_1), value);
}
inline static int32_t get_offset_of_m_SelectOnDown_2() { return static_cast<int32_t>(offsetof(Navigation_t3049316579, ___m_SelectOnDown_2)); }
inline Selectable_t3250028441 * get_m_SelectOnDown_2() const { return ___m_SelectOnDown_2; }
inline Selectable_t3250028441 ** get_address_of_m_SelectOnDown_2() { return &___m_SelectOnDown_2; }
inline void set_m_SelectOnDown_2(Selectable_t3250028441 * value)
{
___m_SelectOnDown_2 = value;
Il2CppCodeGenWriteBarrier((&___m_SelectOnDown_2), value);
}
inline static int32_t get_offset_of_m_SelectOnLeft_3() { return static_cast<int32_t>(offsetof(Navigation_t3049316579, ___m_SelectOnLeft_3)); }
inline Selectable_t3250028441 * get_m_SelectOnLeft_3() const { return ___m_SelectOnLeft_3; }
inline Selectable_t3250028441 ** get_address_of_m_SelectOnLeft_3() { return &___m_SelectOnLeft_3; }
inline void set_m_SelectOnLeft_3(Selectable_t3250028441 * value)
{
___m_SelectOnLeft_3 = value;
Il2CppCodeGenWriteBarrier((&___m_SelectOnLeft_3), value);
}
inline static int32_t get_offset_of_m_SelectOnRight_4() { return static_cast<int32_t>(offsetof(Navigation_t3049316579, ___m_SelectOnRight_4)); }
inline Selectable_t3250028441 * get_m_SelectOnRight_4() const { return ___m_SelectOnRight_4; }
inline Selectable_t3250028441 ** get_address_of_m_SelectOnRight_4() { return &___m_SelectOnRight_4; }
inline void set_m_SelectOnRight_4(Selectable_t3250028441 * value)
{
___m_SelectOnRight_4 = value;
Il2CppCodeGenWriteBarrier((&___m_SelectOnRight_4), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// Native definition for P/Invoke marshalling of UnityEngine.UI.Navigation
struct Navigation_t3049316579_marshaled_pinvoke
{
int32_t ___m_Mode_0;
Selectable_t3250028441 * ___m_SelectOnUp_1;
Selectable_t3250028441 * ___m_SelectOnDown_2;
Selectable_t3250028441 * ___m_SelectOnLeft_3;
Selectable_t3250028441 * ___m_SelectOnRight_4;
};
// Native definition for COM marshalling of UnityEngine.UI.Navigation
struct Navigation_t3049316579_marshaled_com
{
int32_t ___m_Mode_0;
Selectable_t3250028441 * ___m_SelectOnUp_1;
Selectable_t3250028441 * ___m_SelectOnDown_2;
Selectable_t3250028441 * ___m_SelectOnLeft_3;
Selectable_t3250028441 * ___m_SelectOnRight_4;
};
#endif // NAVIGATION_T3049316579_H
#ifndef EMULATORKEYBOARDPROVIDER_T2389719130_H
#define EMULATORKEYBOARDPROVIDER_T2389719130_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.EmulatorKeyboardProvider
struct EmulatorKeyboardProvider_t2389719130 : public RuntimeObject
{
public:
// UnityEngine.GameObject Gvr.Internal.EmulatorKeyboardProvider::stub
GameObject_t1113636619 * ___stub_0;
// System.Boolean Gvr.Internal.EmulatorKeyboardProvider::showing
bool ___showing_1;
// GvrKeyboard/KeyboardCallback Gvr.Internal.EmulatorKeyboardProvider::keyboardCallback
KeyboardCallback_t3330588312 * ___keyboardCallback_2;
// System.String Gvr.Internal.EmulatorKeyboardProvider::editorText
String_t* ___editorText_3;
// GvrKeyboardInputMode Gvr.Internal.EmulatorKeyboardProvider::mode
int32_t ___mode_4;
// UnityEngine.Matrix4x4 Gvr.Internal.EmulatorKeyboardProvider::worldMatrix
Matrix4x4_t1817901843 ___worldMatrix_5;
// System.Boolean Gvr.Internal.EmulatorKeyboardProvider::isValid
bool ___isValid_6;
public:
inline static int32_t get_offset_of_stub_0() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___stub_0)); }
inline GameObject_t1113636619 * get_stub_0() const { return ___stub_0; }
inline GameObject_t1113636619 ** get_address_of_stub_0() { return &___stub_0; }
inline void set_stub_0(GameObject_t1113636619 * value)
{
___stub_0 = value;
Il2CppCodeGenWriteBarrier((&___stub_0), value);
}
inline static int32_t get_offset_of_showing_1() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___showing_1)); }
inline bool get_showing_1() const { return ___showing_1; }
inline bool* get_address_of_showing_1() { return &___showing_1; }
inline void set_showing_1(bool value)
{
___showing_1 = value;
}
inline static int32_t get_offset_of_keyboardCallback_2() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___keyboardCallback_2)); }
inline KeyboardCallback_t3330588312 * get_keyboardCallback_2() const { return ___keyboardCallback_2; }
inline KeyboardCallback_t3330588312 ** get_address_of_keyboardCallback_2() { return &___keyboardCallback_2; }
inline void set_keyboardCallback_2(KeyboardCallback_t3330588312 * value)
{
___keyboardCallback_2 = value;
Il2CppCodeGenWriteBarrier((&___keyboardCallback_2), value);
}
inline static int32_t get_offset_of_editorText_3() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___editorText_3)); }
inline String_t* get_editorText_3() const { return ___editorText_3; }
inline String_t** get_address_of_editorText_3() { return &___editorText_3; }
inline void set_editorText_3(String_t* value)
{
___editorText_3 = value;
Il2CppCodeGenWriteBarrier((&___editorText_3), value);
}
inline static int32_t get_offset_of_mode_4() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___mode_4)); }
inline int32_t get_mode_4() const { return ___mode_4; }
inline int32_t* get_address_of_mode_4() { return &___mode_4; }
inline void set_mode_4(int32_t value)
{
___mode_4 = value;
}
inline static int32_t get_offset_of_worldMatrix_5() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___worldMatrix_5)); }
inline Matrix4x4_t1817901843 get_worldMatrix_5() const { return ___worldMatrix_5; }
inline Matrix4x4_t1817901843 * get_address_of_worldMatrix_5() { return &___worldMatrix_5; }
inline void set_worldMatrix_5(Matrix4x4_t1817901843 value)
{
___worldMatrix_5 = value;
}
inline static int32_t get_offset_of_isValid_6() { return static_cast<int32_t>(offsetof(EmulatorKeyboardProvider_t2389719130, ___isValid_6)); }
inline bool get_isValid_6() const { return ___isValid_6; }
inline bool* get_address_of_isValid_6() { return &___isValid_6; }
inline void set_isValid_6(bool value)
{
___isValid_6 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EMULATORKEYBOARDPROVIDER_T2389719130_H
#ifndef KEYBOARDSTATE_T4109162649_H
#define KEYBOARDSTATE_T4109162649_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// KeyboardState
struct KeyboardState_t4109162649 : public RuntimeObject
{
public:
// System.String KeyboardState::editorText
String_t* ___editorText_0;
// GvrKeyboardInputMode KeyboardState::mode
int32_t ___mode_1;
// System.Boolean KeyboardState::isValid
bool ___isValid_2;
// System.Boolean KeyboardState::isReady
bool ___isReady_3;
// UnityEngine.Matrix4x4 KeyboardState::worldMatrix
Matrix4x4_t1817901843 ___worldMatrix_4;
public:
inline static int32_t get_offset_of_editorText_0() { return static_cast<int32_t>(offsetof(KeyboardState_t4109162649, ___editorText_0)); }
inline String_t* get_editorText_0() const { return ___editorText_0; }
inline String_t** get_address_of_editorText_0() { return &___editorText_0; }
inline void set_editorText_0(String_t* value)
{
___editorText_0 = value;
Il2CppCodeGenWriteBarrier((&___editorText_0), value);
}
inline static int32_t get_offset_of_mode_1() { return static_cast<int32_t>(offsetof(KeyboardState_t4109162649, ___mode_1)); }
inline int32_t get_mode_1() const { return ___mode_1; }
inline int32_t* get_address_of_mode_1() { return &___mode_1; }
inline void set_mode_1(int32_t value)
{
___mode_1 = value;
}
inline static int32_t get_offset_of_isValid_2() { return static_cast<int32_t>(offsetof(KeyboardState_t4109162649, ___isValid_2)); }
inline bool get_isValid_2() const { return ___isValid_2; }
inline bool* get_address_of_isValid_2() { return &___isValid_2; }
inline void set_isValid_2(bool value)
{
___isValid_2 = value;
}
inline static int32_t get_offset_of_isReady_3() { return static_cast<int32_t>(offsetof(KeyboardState_t4109162649, ___isReady_3)); }
inline bool get_isReady_3() const { return ___isReady_3; }
inline bool* get_address_of_isReady_3() { return &___isReady_3; }
inline void set_isReady_3(bool value)
{
___isReady_3 = value;
}
inline static int32_t get_offset_of_worldMatrix_4() { return static_cast<int32_t>(offsetof(KeyboardState_t4109162649, ___worldMatrix_4)); }
inline Matrix4x4_t1817901843 get_worldMatrix_4() const { return ___worldMatrix_4; }
inline Matrix4x4_t1817901843 * get_address_of_worldMatrix_4() { return &___worldMatrix_4; }
inline void set_worldMatrix_4(Matrix4x4_t1817901843 value)
{
___worldMatrix_4 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYBOARDSTATE_T4109162649_H
#ifndef MUTABLEPOSE3D_T3352419872_H
#define MUTABLEPOSE3D_T3352419872_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// MutablePose3D
struct MutablePose3D_t3352419872 : public Pose3D_t2649470188
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MUTABLEPOSE3D_T3352419872_H
#ifndef KEYBOARDCALLBACK_T3330588312_H
#define KEYBOARDCALLBACK_T3330588312_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboard/KeyboardCallback
struct KeyboardCallback_t3330588312 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // KEYBOARDCALLBACK_T3330588312_H
#ifndef BEHAVIOUR_T1437897464_H
#define BEHAVIOUR_T1437897464_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.Behaviour
struct Behaviour_t1437897464 : public Component_t1923634451
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // BEHAVIOUR_T1437897464_H
#ifndef ERRORCALLBACK_T2310212740_H
#define ERRORCALLBACK_T2310212740_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboard/ErrorCallback
struct ErrorCallback_t2310212740 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ERRORCALLBACK_T2310212740_H
#ifndef ONEXCEPTIONCALLBACK_T1696428116_H
#define ONEXCEPTIONCALLBACK_T1696428116_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/OnExceptionCallback
struct OnExceptionCallback_t1696428116 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ONEXCEPTIONCALLBACK_T1696428116_H
#ifndef ONVIDEOEVENTCALLBACK_T2376626694_H
#define ONVIDEOEVENTCALLBACK_T2376626694_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture/OnVideoEventCallback
struct OnVideoEventCallback_t2376626694 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // ONVIDEOEVENTCALLBACK_T2376626694_H
#ifndef STANDARDCALLBACK_T3095007891_H
#define STANDARDCALLBACK_T3095007891_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboard/StandardCallback
struct StandardCallback_t3095007891 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // STANDARDCALLBACK_T3095007891_H
#ifndef EDITTEXTCALLBACK_T1702213000_H
#define EDITTEXTCALLBACK_T1702213000_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboard/EditTextCallback
struct EditTextCallback_t1702213000 : public MulticastDelegate_t
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EDITTEXTCALLBACK_T1702213000_H
#ifndef DUMMYHEADSETPROVIDER_T3229995161_H
#define DUMMYHEADSETPROVIDER_T3229995161_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.DummyHeadsetProvider
struct DummyHeadsetProvider_t3229995161 : public RuntimeObject
{
public:
// Gvr.Internal.HeadsetState Gvr.Internal.DummyHeadsetProvider::dummyState
HeadsetState_t378905490 ___dummyState_0;
public:
inline static int32_t get_offset_of_dummyState_0() { return static_cast<int32_t>(offsetof(DummyHeadsetProvider_t3229995161, ___dummyState_0)); }
inline HeadsetState_t378905490 get_dummyState_0() const { return ___dummyState_0; }
inline HeadsetState_t378905490 * get_address_of_dummyState_0() { return &___dummyState_0; }
inline void set_dummyState_0(HeadsetState_t378905490 value)
{
___dummyState_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DUMMYHEADSETPROVIDER_T3229995161_H
#ifndef EDITORHEADSETPROVIDER_T660777464_H
#define EDITORHEADSETPROVIDER_T660777464_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.EditorHeadsetProvider
struct EditorHeadsetProvider_t660777464 : public RuntimeObject
{
public:
// Gvr.Internal.HeadsetState Gvr.Internal.EditorHeadsetProvider::dummyState
HeadsetState_t378905490 ___dummyState_0;
public:
inline static int32_t get_offset_of_dummyState_0() { return static_cast<int32_t>(offsetof(EditorHeadsetProvider_t660777464, ___dummyState_0)); }
inline HeadsetState_t378905490 get_dummyState_0() const { return ___dummyState_0; }
inline HeadsetState_t378905490 * get_address_of_dummyState_0() { return &___dummyState_0; }
inline void set_dummyState_0(HeadsetState_t378905490 value)
{
___dummyState_0 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // EDITORHEADSETPROVIDER_T660777464_H
#ifndef MONOBEHAVIOUR_T3962482529_H
#define MONOBEHAVIOUR_T3962482529_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.MonoBehaviour
struct MonoBehaviour_t3962482529 : public Behaviour_t1437897464
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // MONOBEHAVIOUR_T3962482529_H
#ifndef GAMESTATUSCONTROLLER_T1340316609_H
#define GAMESTATUSCONTROLLER_T1340316609_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GameStatusController
struct GameStatusController_t1340316609 : public MonoBehaviour_t3962482529
{
public:
// UnityEngine.GameObject GameStatusController::statusTextObject
GameObject_t1113636619 * ___statusTextObject_2;
// UnityEngine.UI.Text GameStatusController::winText
Text_t1901882714 * ___winText_3;
// UnityEngine.TextMesh GameStatusController::statusText
TextMesh_t1536577757 * ___statusText_4;
// System.Single GameStatusController::losingDepth
float ___losingDepth_5;
public:
inline static int32_t get_offset_of_statusTextObject_2() { return static_cast<int32_t>(offsetof(GameStatusController_t1340316609, ___statusTextObject_2)); }
inline GameObject_t1113636619 * get_statusTextObject_2() const { return ___statusTextObject_2; }
inline GameObject_t1113636619 ** get_address_of_statusTextObject_2() { return &___statusTextObject_2; }
inline void set_statusTextObject_2(GameObject_t1113636619 * value)
{
___statusTextObject_2 = value;
Il2CppCodeGenWriteBarrier((&___statusTextObject_2), value);
}
inline static int32_t get_offset_of_winText_3() { return static_cast<int32_t>(offsetof(GameStatusController_t1340316609, ___winText_3)); }
inline Text_t1901882714 * get_winText_3() const { return ___winText_3; }
inline Text_t1901882714 ** get_address_of_winText_3() { return &___winText_3; }
inline void set_winText_3(Text_t1901882714 * value)
{
___winText_3 = value;
Il2CppCodeGenWriteBarrier((&___winText_3), value);
}
inline static int32_t get_offset_of_statusText_4() { return static_cast<int32_t>(offsetof(GameStatusController_t1340316609, ___statusText_4)); }
inline TextMesh_t1536577757 * get_statusText_4() const { return ___statusText_4; }
inline TextMesh_t1536577757 ** get_address_of_statusText_4() { return &___statusText_4; }
inline void set_statusText_4(TextMesh_t1536577757 * value)
{
___statusText_4 = value;
Il2CppCodeGenWriteBarrier((&___statusText_4), value);
}
inline static int32_t get_offset_of_losingDepth_5() { return static_cast<int32_t>(offsetof(GameStatusController_t1340316609, ___losingDepth_5)); }
inline float get_losingDepth_5() const { return ___losingDepth_5; }
inline float* get_address_of_losingDepth_5() { return &___losingDepth_5; }
inline void set_losingDepth_5(float value)
{
___losingDepth_5 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GAMESTATUSCONTROLLER_T1340316609_H
#ifndef TILTCONTROLLER_T3275962614_H
#define TILTCONTROLLER_T3275962614_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// TiltController
struct TiltController_t3275962614 : public MonoBehaviour_t3962482529
{
public:
// System.Single TiltController::rotationSpeed
float ___rotationSpeed_2;
// System.Single TiltController::allowedAngle
float ___allowedAngle_3;
// System.Int32 TiltController::numWalls
int32_t ___numWalls_4;
// System.Int32 TiltController::numHoles
int32_t ___numHoles_5;
// UnityEngine.GameObject TiltController::marble
GameObject_t1113636619 * ___marble_6;
// UnityEngine.GameObject TiltController::wallPrefab
GameObject_t1113636619 * ___wallPrefab_7;
// UnityEngine.GameObject TiltController::holePrefab
GameObject_t1113636619 * ___holePrefab_8;
// UnityEngine.GameObject TiltController::winPrefab
GameObject_t1113636619 * ___winPrefab_9;
// UnityEngine.UI.Text TiltController::winText
Text_t1901882714 * ___winText_10;
// System.Single TiltController::worldSize
float ___worldSize_11;
public:
inline static int32_t get_offset_of_rotationSpeed_2() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___rotationSpeed_2)); }
inline float get_rotationSpeed_2() const { return ___rotationSpeed_2; }
inline float* get_address_of_rotationSpeed_2() { return &___rotationSpeed_2; }
inline void set_rotationSpeed_2(float value)
{
___rotationSpeed_2 = value;
}
inline static int32_t get_offset_of_allowedAngle_3() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___allowedAngle_3)); }
inline float get_allowedAngle_3() const { return ___allowedAngle_3; }
inline float* get_address_of_allowedAngle_3() { return &___allowedAngle_3; }
inline void set_allowedAngle_3(float value)
{
___allowedAngle_3 = value;
}
inline static int32_t get_offset_of_numWalls_4() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___numWalls_4)); }
inline int32_t get_numWalls_4() const { return ___numWalls_4; }
inline int32_t* get_address_of_numWalls_4() { return &___numWalls_4; }
inline void set_numWalls_4(int32_t value)
{
___numWalls_4 = value;
}
inline static int32_t get_offset_of_numHoles_5() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___numHoles_5)); }
inline int32_t get_numHoles_5() const { return ___numHoles_5; }
inline int32_t* get_address_of_numHoles_5() { return &___numHoles_5; }
inline void set_numHoles_5(int32_t value)
{
___numHoles_5 = value;
}
inline static int32_t get_offset_of_marble_6() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___marble_6)); }
inline GameObject_t1113636619 * get_marble_6() const { return ___marble_6; }
inline GameObject_t1113636619 ** get_address_of_marble_6() { return &___marble_6; }
inline void set_marble_6(GameObject_t1113636619 * value)
{
___marble_6 = value;
Il2CppCodeGenWriteBarrier((&___marble_6), value);
}
inline static int32_t get_offset_of_wallPrefab_7() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___wallPrefab_7)); }
inline GameObject_t1113636619 * get_wallPrefab_7() const { return ___wallPrefab_7; }
inline GameObject_t1113636619 ** get_address_of_wallPrefab_7() { return &___wallPrefab_7; }
inline void set_wallPrefab_7(GameObject_t1113636619 * value)
{
___wallPrefab_7 = value;
Il2CppCodeGenWriteBarrier((&___wallPrefab_7), value);
}
inline static int32_t get_offset_of_holePrefab_8() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___holePrefab_8)); }
inline GameObject_t1113636619 * get_holePrefab_8() const { return ___holePrefab_8; }
inline GameObject_t1113636619 ** get_address_of_holePrefab_8() { return &___holePrefab_8; }
inline void set_holePrefab_8(GameObject_t1113636619 * value)
{
___holePrefab_8 = value;
Il2CppCodeGenWriteBarrier((&___holePrefab_8), value);
}
inline static int32_t get_offset_of_winPrefab_9() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___winPrefab_9)); }
inline GameObject_t1113636619 * get_winPrefab_9() const { return ___winPrefab_9; }
inline GameObject_t1113636619 ** get_address_of_winPrefab_9() { return &___winPrefab_9; }
inline void set_winPrefab_9(GameObject_t1113636619 * value)
{
___winPrefab_9 = value;
Il2CppCodeGenWriteBarrier((&___winPrefab_9), value);
}
inline static int32_t get_offset_of_winText_10() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___winText_10)); }
inline Text_t1901882714 * get_winText_10() const { return ___winText_10; }
inline Text_t1901882714 ** get_address_of_winText_10() { return &___winText_10; }
inline void set_winText_10(Text_t1901882714 * value)
{
___winText_10 = value;
Il2CppCodeGenWriteBarrier((&___winText_10), value);
}
inline static int32_t get_offset_of_worldSize_11() { return static_cast<int32_t>(offsetof(TiltController_t3275962614, ___worldSize_11)); }
inline float get_worldSize_11() const { return ___worldSize_11; }
inline float* get_address_of_worldSize_11() { return &___worldSize_11; }
inline void set_worldSize_11(float value)
{
___worldSize_11 = value;
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TILTCONTROLLER_T3275962614_H
#ifndef GVRVIDEOPLAYERTEXTURE_T3546202735_H
#define GVRVIDEOPLAYERTEXTURE_T3546202735_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrVideoPlayerTexture
struct GvrVideoPlayerTexture_t3546202735 : public MonoBehaviour_t3962482529
{
public:
// System.IntPtr GvrVideoPlayerTexture::videoPlayerPtr
intptr_t ___videoPlayerPtr_2;
// System.Int32 GvrVideoPlayerTexture::videoPlayerEventBase
int32_t ___videoPlayerEventBase_3;
// UnityEngine.Texture GvrVideoPlayerTexture::initialTexture
Texture_t3661962703 * ___initialTexture_4;
// UnityEngine.Texture GvrVideoPlayerTexture::surfaceTexture
Texture_t3661962703 * ___surfaceTexture_5;
// System.Single[] GvrVideoPlayerTexture::videoMatrixRaw
SingleU5BU5D_t1444911251* ___videoMatrixRaw_6;
// UnityEngine.Matrix4x4 GvrVideoPlayerTexture::videoMatrix
Matrix4x4_t1817901843 ___videoMatrix_7;
// System.Int32 GvrVideoPlayerTexture::videoMatrixPropertyId
int32_t ___videoMatrixPropertyId_8;
// System.Int64 GvrVideoPlayerTexture::lastVideoTimestamp
int64_t ___lastVideoTimestamp_9;
// System.Boolean GvrVideoPlayerTexture::initialized
bool ___initialized_10;
// System.Int32 GvrVideoPlayerTexture::texWidth
int32_t ___texWidth_11;
// System.Int32 GvrVideoPlayerTexture::texHeight
int32_t ___texHeight_12;
// System.Int64 GvrVideoPlayerTexture::lastBufferedPosition
int64_t ___lastBufferedPosition_13;
// System.Single GvrVideoPlayerTexture::framecount
float ___framecount_14;
// UnityEngine.Renderer GvrVideoPlayerTexture::screen
Renderer_t2627027031 * ___screen_15;
// System.IntPtr GvrVideoPlayerTexture::renderEventFunction
intptr_t ___renderEventFunction_16;
// System.Boolean GvrVideoPlayerTexture::playOnResume
bool ___playOnResume_17;
// System.Collections.Generic.List`1<System.Action`1<System.Int32>> GvrVideoPlayerTexture::onEventCallbacks
List_1_t300520794 * ___onEventCallbacks_18;
// System.Collections.Generic.List`1<System.Action`2<System.String,System.String>> GvrVideoPlayerTexture::onExceptionCallbacks
List_1_t1147278120 * ___onExceptionCallbacks_19;
// UnityEngine.UI.Text GvrVideoPlayerTexture::statusText
Text_t1901882714 * ___statusText_21;
// GvrVideoPlayerTexture/VideoType GvrVideoPlayerTexture::videoType
int32_t ___videoType_22;
// System.String GvrVideoPlayerTexture::videoURL
String_t* ___videoURL_23;
// System.String GvrVideoPlayerTexture::videoContentID
String_t* ___videoContentID_24;
// System.String GvrVideoPlayerTexture::videoProviderId
String_t* ___videoProviderId_25;
// GvrVideoPlayerTexture/VideoResolution GvrVideoPlayerTexture::initialResolution
int32_t ___initialResolution_26;
// System.Boolean GvrVideoPlayerTexture::adjustAspectRatio
bool ___adjustAspectRatio_27;
// System.Boolean GvrVideoPlayerTexture::useSecurePath
bool ___useSecurePath_28;
public:
inline static int32_t get_offset_of_videoPlayerPtr_2() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoPlayerPtr_2)); }
inline intptr_t get_videoPlayerPtr_2() const { return ___videoPlayerPtr_2; }
inline intptr_t* get_address_of_videoPlayerPtr_2() { return &___videoPlayerPtr_2; }
inline void set_videoPlayerPtr_2(intptr_t value)
{
___videoPlayerPtr_2 = value;
}
inline static int32_t get_offset_of_videoPlayerEventBase_3() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoPlayerEventBase_3)); }
inline int32_t get_videoPlayerEventBase_3() const { return ___videoPlayerEventBase_3; }
inline int32_t* get_address_of_videoPlayerEventBase_3() { return &___videoPlayerEventBase_3; }
inline void set_videoPlayerEventBase_3(int32_t value)
{
___videoPlayerEventBase_3 = value;
}
inline static int32_t get_offset_of_initialTexture_4() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___initialTexture_4)); }
inline Texture_t3661962703 * get_initialTexture_4() const { return ___initialTexture_4; }
inline Texture_t3661962703 ** get_address_of_initialTexture_4() { return &___initialTexture_4; }
inline void set_initialTexture_4(Texture_t3661962703 * value)
{
___initialTexture_4 = value;
Il2CppCodeGenWriteBarrier((&___initialTexture_4), value);
}
inline static int32_t get_offset_of_surfaceTexture_5() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___surfaceTexture_5)); }
inline Texture_t3661962703 * get_surfaceTexture_5() const { return ___surfaceTexture_5; }
inline Texture_t3661962703 ** get_address_of_surfaceTexture_5() { return &___surfaceTexture_5; }
inline void set_surfaceTexture_5(Texture_t3661962703 * value)
{
___surfaceTexture_5 = value;
Il2CppCodeGenWriteBarrier((&___surfaceTexture_5), value);
}
inline static int32_t get_offset_of_videoMatrixRaw_6() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoMatrixRaw_6)); }
inline SingleU5BU5D_t1444911251* get_videoMatrixRaw_6() const { return ___videoMatrixRaw_6; }
inline SingleU5BU5D_t1444911251** get_address_of_videoMatrixRaw_6() { return &___videoMatrixRaw_6; }
inline void set_videoMatrixRaw_6(SingleU5BU5D_t1444911251* value)
{
___videoMatrixRaw_6 = value;
Il2CppCodeGenWriteBarrier((&___videoMatrixRaw_6), value);
}
inline static int32_t get_offset_of_videoMatrix_7() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoMatrix_7)); }
inline Matrix4x4_t1817901843 get_videoMatrix_7() const { return ___videoMatrix_7; }
inline Matrix4x4_t1817901843 * get_address_of_videoMatrix_7() { return &___videoMatrix_7; }
inline void set_videoMatrix_7(Matrix4x4_t1817901843 value)
{
___videoMatrix_7 = value;
}
inline static int32_t get_offset_of_videoMatrixPropertyId_8() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoMatrixPropertyId_8)); }
inline int32_t get_videoMatrixPropertyId_8() const { return ___videoMatrixPropertyId_8; }
inline int32_t* get_address_of_videoMatrixPropertyId_8() { return &___videoMatrixPropertyId_8; }
inline void set_videoMatrixPropertyId_8(int32_t value)
{
___videoMatrixPropertyId_8 = value;
}
inline static int32_t get_offset_of_lastVideoTimestamp_9() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___lastVideoTimestamp_9)); }
inline int64_t get_lastVideoTimestamp_9() const { return ___lastVideoTimestamp_9; }
inline int64_t* get_address_of_lastVideoTimestamp_9() { return &___lastVideoTimestamp_9; }
inline void set_lastVideoTimestamp_9(int64_t value)
{
___lastVideoTimestamp_9 = value;
}
inline static int32_t get_offset_of_initialized_10() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___initialized_10)); }
inline bool get_initialized_10() const { return ___initialized_10; }
inline bool* get_address_of_initialized_10() { return &___initialized_10; }
inline void set_initialized_10(bool value)
{
___initialized_10 = value;
}
inline static int32_t get_offset_of_texWidth_11() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___texWidth_11)); }
inline int32_t get_texWidth_11() const { return ___texWidth_11; }
inline int32_t* get_address_of_texWidth_11() { return &___texWidth_11; }
inline void set_texWidth_11(int32_t value)
{
___texWidth_11 = value;
}
inline static int32_t get_offset_of_texHeight_12() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___texHeight_12)); }
inline int32_t get_texHeight_12() const { return ___texHeight_12; }
inline int32_t* get_address_of_texHeight_12() { return &___texHeight_12; }
inline void set_texHeight_12(int32_t value)
{
___texHeight_12 = value;
}
inline static int32_t get_offset_of_lastBufferedPosition_13() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___lastBufferedPosition_13)); }
inline int64_t get_lastBufferedPosition_13() const { return ___lastBufferedPosition_13; }
inline int64_t* get_address_of_lastBufferedPosition_13() { return &___lastBufferedPosition_13; }
inline void set_lastBufferedPosition_13(int64_t value)
{
___lastBufferedPosition_13 = value;
}
inline static int32_t get_offset_of_framecount_14() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___framecount_14)); }
inline float get_framecount_14() const { return ___framecount_14; }
inline float* get_address_of_framecount_14() { return &___framecount_14; }
inline void set_framecount_14(float value)
{
___framecount_14 = value;
}
inline static int32_t get_offset_of_screen_15() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___screen_15)); }
inline Renderer_t2627027031 * get_screen_15() const { return ___screen_15; }
inline Renderer_t2627027031 ** get_address_of_screen_15() { return &___screen_15; }
inline void set_screen_15(Renderer_t2627027031 * value)
{
___screen_15 = value;
Il2CppCodeGenWriteBarrier((&___screen_15), value);
}
inline static int32_t get_offset_of_renderEventFunction_16() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___renderEventFunction_16)); }
inline intptr_t get_renderEventFunction_16() const { return ___renderEventFunction_16; }
inline intptr_t* get_address_of_renderEventFunction_16() { return &___renderEventFunction_16; }
inline void set_renderEventFunction_16(intptr_t value)
{
___renderEventFunction_16 = value;
}
inline static int32_t get_offset_of_playOnResume_17() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___playOnResume_17)); }
inline bool get_playOnResume_17() const { return ___playOnResume_17; }
inline bool* get_address_of_playOnResume_17() { return &___playOnResume_17; }
inline void set_playOnResume_17(bool value)
{
___playOnResume_17 = value;
}
inline static int32_t get_offset_of_onEventCallbacks_18() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___onEventCallbacks_18)); }
inline List_1_t300520794 * get_onEventCallbacks_18() const { return ___onEventCallbacks_18; }
inline List_1_t300520794 ** get_address_of_onEventCallbacks_18() { return &___onEventCallbacks_18; }
inline void set_onEventCallbacks_18(List_1_t300520794 * value)
{
___onEventCallbacks_18 = value;
Il2CppCodeGenWriteBarrier((&___onEventCallbacks_18), value);
}
inline static int32_t get_offset_of_onExceptionCallbacks_19() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___onExceptionCallbacks_19)); }
inline List_1_t1147278120 * get_onExceptionCallbacks_19() const { return ___onExceptionCallbacks_19; }
inline List_1_t1147278120 ** get_address_of_onExceptionCallbacks_19() { return &___onExceptionCallbacks_19; }
inline void set_onExceptionCallbacks_19(List_1_t1147278120 * value)
{
___onExceptionCallbacks_19 = value;
Il2CppCodeGenWriteBarrier((&___onExceptionCallbacks_19), value);
}
inline static int32_t get_offset_of_statusText_21() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___statusText_21)); }
inline Text_t1901882714 * get_statusText_21() const { return ___statusText_21; }
inline Text_t1901882714 ** get_address_of_statusText_21() { return &___statusText_21; }
inline void set_statusText_21(Text_t1901882714 * value)
{
___statusText_21 = value;
Il2CppCodeGenWriteBarrier((&___statusText_21), value);
}
inline static int32_t get_offset_of_videoType_22() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoType_22)); }
inline int32_t get_videoType_22() const { return ___videoType_22; }
inline int32_t* get_address_of_videoType_22() { return &___videoType_22; }
inline void set_videoType_22(int32_t value)
{
___videoType_22 = value;
}
inline static int32_t get_offset_of_videoURL_23() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoURL_23)); }
inline String_t* get_videoURL_23() const { return ___videoURL_23; }
inline String_t** get_address_of_videoURL_23() { return &___videoURL_23; }
inline void set_videoURL_23(String_t* value)
{
___videoURL_23 = value;
Il2CppCodeGenWriteBarrier((&___videoURL_23), value);
}
inline static int32_t get_offset_of_videoContentID_24() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoContentID_24)); }
inline String_t* get_videoContentID_24() const { return ___videoContentID_24; }
inline String_t** get_address_of_videoContentID_24() { return &___videoContentID_24; }
inline void set_videoContentID_24(String_t* value)
{
___videoContentID_24 = value;
Il2CppCodeGenWriteBarrier((&___videoContentID_24), value);
}
inline static int32_t get_offset_of_videoProviderId_25() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___videoProviderId_25)); }
inline String_t* get_videoProviderId_25() const { return ___videoProviderId_25; }
inline String_t** get_address_of_videoProviderId_25() { return &___videoProviderId_25; }
inline void set_videoProviderId_25(String_t* value)
{
___videoProviderId_25 = value;
Il2CppCodeGenWriteBarrier((&___videoProviderId_25), value);
}
inline static int32_t get_offset_of_initialResolution_26() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___initialResolution_26)); }
inline int32_t get_initialResolution_26() const { return ___initialResolution_26; }
inline int32_t* get_address_of_initialResolution_26() { return &___initialResolution_26; }
inline void set_initialResolution_26(int32_t value)
{
___initialResolution_26 = value;
}
inline static int32_t get_offset_of_adjustAspectRatio_27() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___adjustAspectRatio_27)); }
inline bool get_adjustAspectRatio_27() const { return ___adjustAspectRatio_27; }
inline bool* get_address_of_adjustAspectRatio_27() { return &___adjustAspectRatio_27; }
inline void set_adjustAspectRatio_27(bool value)
{
___adjustAspectRatio_27 = value;
}
inline static int32_t get_offset_of_useSecurePath_28() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735, ___useSecurePath_28)); }
inline bool get_useSecurePath_28() const { return ___useSecurePath_28; }
inline bool* get_address_of_useSecurePath_28() { return &___useSecurePath_28; }
inline void set_useSecurePath_28(bool value)
{
___useSecurePath_28 = value;
}
};
struct GvrVideoPlayerTexture_t3546202735_StaticFields
{
public:
// System.Collections.Generic.Queue`1<System.Action> GvrVideoPlayerTexture::ExecuteOnMainThread
Queue_1_t1110636971 * ___ExecuteOnMainThread_20;
// System.Action`2<System.String,System.String> GvrVideoPlayerTexture::<>f__am$cache0
Action_2_t3970170674 * ___U3CU3Ef__amU24cache0_30;
// GvrVideoPlayerTexture/OnVideoEventCallback GvrVideoPlayerTexture::<>f__mg$cache0
OnVideoEventCallback_t2376626694 * ___U3CU3Ef__mgU24cache0_31;
// GvrVideoPlayerTexture/OnExceptionCallback GvrVideoPlayerTexture::<>f__mg$cache1
OnExceptionCallback_t1696428116 * ___U3CU3Ef__mgU24cache1_32;
public:
inline static int32_t get_offset_of_ExecuteOnMainThread_20() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735_StaticFields, ___ExecuteOnMainThread_20)); }
inline Queue_1_t1110636971 * get_ExecuteOnMainThread_20() const { return ___ExecuteOnMainThread_20; }
inline Queue_1_t1110636971 ** get_address_of_ExecuteOnMainThread_20() { return &___ExecuteOnMainThread_20; }
inline void set_ExecuteOnMainThread_20(Queue_1_t1110636971 * value)
{
___ExecuteOnMainThread_20 = value;
Il2CppCodeGenWriteBarrier((&___ExecuteOnMainThread_20), value);
}
inline static int32_t get_offset_of_U3CU3Ef__amU24cache0_30() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735_StaticFields, ___U3CU3Ef__amU24cache0_30)); }
inline Action_2_t3970170674 * get_U3CU3Ef__amU24cache0_30() const { return ___U3CU3Ef__amU24cache0_30; }
inline Action_2_t3970170674 ** get_address_of_U3CU3Ef__amU24cache0_30() { return &___U3CU3Ef__amU24cache0_30; }
inline void set_U3CU3Ef__amU24cache0_30(Action_2_t3970170674 * value)
{
___U3CU3Ef__amU24cache0_30 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__amU24cache0_30), value);
}
inline static int32_t get_offset_of_U3CU3Ef__mgU24cache0_31() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735_StaticFields, ___U3CU3Ef__mgU24cache0_31)); }
inline OnVideoEventCallback_t2376626694 * get_U3CU3Ef__mgU24cache0_31() const { return ___U3CU3Ef__mgU24cache0_31; }
inline OnVideoEventCallback_t2376626694 ** get_address_of_U3CU3Ef__mgU24cache0_31() { return &___U3CU3Ef__mgU24cache0_31; }
inline void set_U3CU3Ef__mgU24cache0_31(OnVideoEventCallback_t2376626694 * value)
{
___U3CU3Ef__mgU24cache0_31 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__mgU24cache0_31), value);
}
inline static int32_t get_offset_of_U3CU3Ef__mgU24cache1_32() { return static_cast<int32_t>(offsetof(GvrVideoPlayerTexture_t3546202735_StaticFields, ___U3CU3Ef__mgU24cache1_32)); }
inline OnExceptionCallback_t1696428116 * get_U3CU3Ef__mgU24cache1_32() const { return ___U3CU3Ef__mgU24cache1_32; }
inline OnExceptionCallback_t1696428116 ** get_address_of_U3CU3Ef__mgU24cache1_32() { return &___U3CU3Ef__mgU24cache1_32; }
inline void set_U3CU3Ef__mgU24cache1_32(OnExceptionCallback_t1696428116 * value)
{
___U3CU3Ef__mgU24cache1_32 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__mgU24cache1_32), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRVIDEOPLAYERTEXTURE_T3546202735_H
#ifndef GVRKEYBOARD_T2536560201_H
#define GVRKEYBOARD_T2536560201_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboard
struct GvrKeyboard_t2536560201 : public MonoBehaviour_t3962482529
{
public:
// KeyboardState GvrKeyboard::keyboardState
KeyboardState_t4109162649 * ___keyboardState_4;
// System.Collections.IEnumerator GvrKeyboard::keyboardUpdate
RuntimeObject* ___keyboardUpdate_5;
// GvrKeyboard/ErrorCallback GvrKeyboard::errorCallback
ErrorCallback_t2310212740 * ___errorCallback_6;
// GvrKeyboard/StandardCallback GvrKeyboard::showCallback
StandardCallback_t3095007891 * ___showCallback_7;
// GvrKeyboard/StandardCallback GvrKeyboard::hideCallback
StandardCallback_t3095007891 * ___hideCallback_8;
// GvrKeyboard/EditTextCallback GvrKeyboard::updateCallback
EditTextCallback_t1702213000 * ___updateCallback_9;
// GvrKeyboard/EditTextCallback GvrKeyboard::enterCallback
EditTextCallback_t1702213000 * ___enterCallback_10;
// System.Boolean GvrKeyboard::isKeyboardHidden
bool ___isKeyboardHidden_11;
// GvrKeyboardDelegateBase GvrKeyboard::keyboardDelegate
GvrKeyboardDelegateBase_t30895224 * ___keyboardDelegate_15;
// GvrKeyboardInputMode GvrKeyboard::inputMode
int32_t ___inputMode_16;
// System.Boolean GvrKeyboard::useRecommended
bool ___useRecommended_17;
// System.Single GvrKeyboard::distance
float ___distance_18;
public:
inline static int32_t get_offset_of_keyboardState_4() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___keyboardState_4)); }
inline KeyboardState_t4109162649 * get_keyboardState_4() const { return ___keyboardState_4; }
inline KeyboardState_t4109162649 ** get_address_of_keyboardState_4() { return &___keyboardState_4; }
inline void set_keyboardState_4(KeyboardState_t4109162649 * value)
{
___keyboardState_4 = value;
Il2CppCodeGenWriteBarrier((&___keyboardState_4), value);
}
inline static int32_t get_offset_of_keyboardUpdate_5() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___keyboardUpdate_5)); }
inline RuntimeObject* get_keyboardUpdate_5() const { return ___keyboardUpdate_5; }
inline RuntimeObject** get_address_of_keyboardUpdate_5() { return &___keyboardUpdate_5; }
inline void set_keyboardUpdate_5(RuntimeObject* value)
{
___keyboardUpdate_5 = value;
Il2CppCodeGenWriteBarrier((&___keyboardUpdate_5), value);
}
inline static int32_t get_offset_of_errorCallback_6() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___errorCallback_6)); }
inline ErrorCallback_t2310212740 * get_errorCallback_6() const { return ___errorCallback_6; }
inline ErrorCallback_t2310212740 ** get_address_of_errorCallback_6() { return &___errorCallback_6; }
inline void set_errorCallback_6(ErrorCallback_t2310212740 * value)
{
___errorCallback_6 = value;
Il2CppCodeGenWriteBarrier((&___errorCallback_6), value);
}
inline static int32_t get_offset_of_showCallback_7() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___showCallback_7)); }
inline StandardCallback_t3095007891 * get_showCallback_7() const { return ___showCallback_7; }
inline StandardCallback_t3095007891 ** get_address_of_showCallback_7() { return &___showCallback_7; }
inline void set_showCallback_7(StandardCallback_t3095007891 * value)
{
___showCallback_7 = value;
Il2CppCodeGenWriteBarrier((&___showCallback_7), value);
}
inline static int32_t get_offset_of_hideCallback_8() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___hideCallback_8)); }
inline StandardCallback_t3095007891 * get_hideCallback_8() const { return ___hideCallback_8; }
inline StandardCallback_t3095007891 ** get_address_of_hideCallback_8() { return &___hideCallback_8; }
inline void set_hideCallback_8(StandardCallback_t3095007891 * value)
{
___hideCallback_8 = value;
Il2CppCodeGenWriteBarrier((&___hideCallback_8), value);
}
inline static int32_t get_offset_of_updateCallback_9() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___updateCallback_9)); }
inline EditTextCallback_t1702213000 * get_updateCallback_9() const { return ___updateCallback_9; }
inline EditTextCallback_t1702213000 ** get_address_of_updateCallback_9() { return &___updateCallback_9; }
inline void set_updateCallback_9(EditTextCallback_t1702213000 * value)
{
___updateCallback_9 = value;
Il2CppCodeGenWriteBarrier((&___updateCallback_9), value);
}
inline static int32_t get_offset_of_enterCallback_10() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___enterCallback_10)); }
inline EditTextCallback_t1702213000 * get_enterCallback_10() const { return ___enterCallback_10; }
inline EditTextCallback_t1702213000 ** get_address_of_enterCallback_10() { return &___enterCallback_10; }
inline void set_enterCallback_10(EditTextCallback_t1702213000 * value)
{
___enterCallback_10 = value;
Il2CppCodeGenWriteBarrier((&___enterCallback_10), value);
}
inline static int32_t get_offset_of_isKeyboardHidden_11() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___isKeyboardHidden_11)); }
inline bool get_isKeyboardHidden_11() const { return ___isKeyboardHidden_11; }
inline bool* get_address_of_isKeyboardHidden_11() { return &___isKeyboardHidden_11; }
inline void set_isKeyboardHidden_11(bool value)
{
___isKeyboardHidden_11 = value;
}
inline static int32_t get_offset_of_keyboardDelegate_15() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___keyboardDelegate_15)); }
inline GvrKeyboardDelegateBase_t30895224 * get_keyboardDelegate_15() const { return ___keyboardDelegate_15; }
inline GvrKeyboardDelegateBase_t30895224 ** get_address_of_keyboardDelegate_15() { return &___keyboardDelegate_15; }
inline void set_keyboardDelegate_15(GvrKeyboardDelegateBase_t30895224 * value)
{
___keyboardDelegate_15 = value;
Il2CppCodeGenWriteBarrier((&___keyboardDelegate_15), value);
}
inline static int32_t get_offset_of_inputMode_16() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___inputMode_16)); }
inline int32_t get_inputMode_16() const { return ___inputMode_16; }
inline int32_t* get_address_of_inputMode_16() { return &___inputMode_16; }
inline void set_inputMode_16(int32_t value)
{
___inputMode_16 = value;
}
inline static int32_t get_offset_of_useRecommended_17() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___useRecommended_17)); }
inline bool get_useRecommended_17() const { return ___useRecommended_17; }
inline bool* get_address_of_useRecommended_17() { return &___useRecommended_17; }
inline void set_useRecommended_17(bool value)
{
___useRecommended_17 = value;
}
inline static int32_t get_offset_of_distance_18() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201, ___distance_18)); }
inline float get_distance_18() const { return ___distance_18; }
inline float* get_address_of_distance_18() { return &___distance_18; }
inline void set_distance_18(float value)
{
___distance_18 = value;
}
};
struct GvrKeyboard_t2536560201_StaticFields
{
public:
// GvrKeyboard GvrKeyboard::instance
GvrKeyboard_t2536560201 * ___instance_2;
// Gvr.Internal.IKeyboardProvider GvrKeyboard::keyboardProvider
RuntimeObject* ___keyboardProvider_3;
// System.Collections.Generic.List`1<GvrKeyboardEvent> GvrKeyboard::threadSafeCallbacks
List_1_t806272884 * ___threadSafeCallbacks_13;
// System.Object GvrKeyboard::callbacksLock
RuntimeObject * ___callbacksLock_14;
// GvrKeyboard/KeyboardCallback GvrKeyboard::<>f__mg$cache0
KeyboardCallback_t3330588312 * ___U3CU3Ef__mgU24cache0_19;
public:
inline static int32_t get_offset_of_instance_2() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201_StaticFields, ___instance_2)); }
inline GvrKeyboard_t2536560201 * get_instance_2() const { return ___instance_2; }
inline GvrKeyboard_t2536560201 ** get_address_of_instance_2() { return &___instance_2; }
inline void set_instance_2(GvrKeyboard_t2536560201 * value)
{
___instance_2 = value;
Il2CppCodeGenWriteBarrier((&___instance_2), value);
}
inline static int32_t get_offset_of_keyboardProvider_3() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201_StaticFields, ___keyboardProvider_3)); }
inline RuntimeObject* get_keyboardProvider_3() const { return ___keyboardProvider_3; }
inline RuntimeObject** get_address_of_keyboardProvider_3() { return &___keyboardProvider_3; }
inline void set_keyboardProvider_3(RuntimeObject* value)
{
___keyboardProvider_3 = value;
Il2CppCodeGenWriteBarrier((&___keyboardProvider_3), value);
}
inline static int32_t get_offset_of_threadSafeCallbacks_13() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201_StaticFields, ___threadSafeCallbacks_13)); }
inline List_1_t806272884 * get_threadSafeCallbacks_13() const { return ___threadSafeCallbacks_13; }
inline List_1_t806272884 ** get_address_of_threadSafeCallbacks_13() { return &___threadSafeCallbacks_13; }
inline void set_threadSafeCallbacks_13(List_1_t806272884 * value)
{
___threadSafeCallbacks_13 = value;
Il2CppCodeGenWriteBarrier((&___threadSafeCallbacks_13), value);
}
inline static int32_t get_offset_of_callbacksLock_14() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201_StaticFields, ___callbacksLock_14)); }
inline RuntimeObject * get_callbacksLock_14() const { return ___callbacksLock_14; }
inline RuntimeObject ** get_address_of_callbacksLock_14() { return &___callbacksLock_14; }
inline void set_callbacksLock_14(RuntimeObject * value)
{
___callbacksLock_14 = value;
Il2CppCodeGenWriteBarrier((&___callbacksLock_14), value);
}
inline static int32_t get_offset_of_U3CU3Ef__mgU24cache0_19() { return static_cast<int32_t>(offsetof(GvrKeyboard_t2536560201_StaticFields, ___U3CU3Ef__mgU24cache0_19)); }
inline KeyboardCallback_t3330588312 * get_U3CU3Ef__mgU24cache0_19() const { return ___U3CU3Ef__mgU24cache0_19; }
inline KeyboardCallback_t3330588312 ** get_address_of_U3CU3Ef__mgU24cache0_19() { return &___U3CU3Ef__mgU24cache0_19; }
inline void set_U3CU3Ef__mgU24cache0_19(KeyboardCallback_t3330588312 * value)
{
___U3CU3Ef__mgU24cache0_19 = value;
Il2CppCodeGenWriteBarrier((&___U3CU3Ef__mgU24cache0_19), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRKEYBOARD_T2536560201_H
#ifndef INSTANTPREVIEW_T778898416_H
#define INSTANTPREVIEW_T778898416_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// Gvr.Internal.InstantPreview
struct InstantPreview_t778898416 : public MonoBehaviour_t3962482529
{
public:
// Gvr.Internal.InstantPreview/Resolutions Gvr.Internal.InstantPreview::OutputResolution
int32_t ___OutputResolution_5;
// Gvr.Internal.InstantPreview/MultisampleCounts Gvr.Internal.InstantPreview::MultisampleCount
int32_t ___MultisampleCount_6;
// Gvr.Internal.InstantPreview/BitRates Gvr.Internal.InstantPreview::BitRate
int32_t ___BitRate_7;
// System.Boolean Gvr.Internal.InstantPreview::InstallApkOnRun
bool ___InstallApkOnRun_8;
// UnityEngine.Object Gvr.Internal.InstantPreview::InstantPreviewApk
Object_t631007953 * ___InstantPreviewApk_9;
public:
inline static int32_t get_offset_of_OutputResolution_5() { return static_cast<int32_t>(offsetof(InstantPreview_t778898416, ___OutputResolution_5)); }
inline int32_t get_OutputResolution_5() const { return ___OutputResolution_5; }
inline int32_t* get_address_of_OutputResolution_5() { return &___OutputResolution_5; }
inline void set_OutputResolution_5(int32_t value)
{
___OutputResolution_5 = value;
}
inline static int32_t get_offset_of_MultisampleCount_6() { return static_cast<int32_t>(offsetof(InstantPreview_t778898416, ___MultisampleCount_6)); }
inline int32_t get_MultisampleCount_6() const { return ___MultisampleCount_6; }
inline int32_t* get_address_of_MultisampleCount_6() { return &___MultisampleCount_6; }
inline void set_MultisampleCount_6(int32_t value)
{
___MultisampleCount_6 = value;
}
inline static int32_t get_offset_of_BitRate_7() { return static_cast<int32_t>(offsetof(InstantPreview_t778898416, ___BitRate_7)); }
inline int32_t get_BitRate_7() const { return ___BitRate_7; }
inline int32_t* get_address_of_BitRate_7() { return &___BitRate_7; }
inline void set_BitRate_7(int32_t value)
{
___BitRate_7 = value;
}
inline static int32_t get_offset_of_InstallApkOnRun_8() { return static_cast<int32_t>(offsetof(InstantPreview_t778898416, ___InstallApkOnRun_8)); }
inline bool get_InstallApkOnRun_8() const { return ___InstallApkOnRun_8; }
inline bool* get_address_of_InstallApkOnRun_8() { return &___InstallApkOnRun_8; }
inline void set_InstallApkOnRun_8(bool value)
{
___InstallApkOnRun_8 = value;
}
inline static int32_t get_offset_of_InstantPreviewApk_9() { return static_cast<int32_t>(offsetof(InstantPreview_t778898416, ___InstantPreviewApk_9)); }
inline Object_t631007953 * get_InstantPreviewApk_9() const { return ___InstantPreviewApk_9; }
inline Object_t631007953 ** get_address_of_InstantPreviewApk_9() { return &___InstantPreviewApk_9; }
inline void set_InstantPreviewApk_9(Object_t631007953 * value)
{
___InstantPreviewApk_9 = value;
Il2CppCodeGenWriteBarrier((&___InstantPreviewApk_9), value);
}
};
struct InstantPreview_t778898416_StaticFields
{
public:
// Gvr.Internal.InstantPreview Gvr.Internal.InstantPreview::<Instance>k__BackingField
InstantPreview_t778898416 * ___U3CInstanceU3Ek__BackingField_3;
public:
inline static int32_t get_offset_of_U3CInstanceU3Ek__BackingField_3() { return static_cast<int32_t>(offsetof(InstantPreview_t778898416_StaticFields, ___U3CInstanceU3Ek__BackingField_3)); }
inline InstantPreview_t778898416 * get_U3CInstanceU3Ek__BackingField_3() const { return ___U3CInstanceU3Ek__BackingField_3; }
inline InstantPreview_t778898416 ** get_address_of_U3CInstanceU3Ek__BackingField_3() { return &___U3CInstanceU3Ek__BackingField_3; }
inline void set_U3CInstanceU3Ek__BackingField_3(InstantPreview_t778898416 * value)
{
___U3CInstanceU3Ek__BackingField_3 = value;
Il2CppCodeGenWriteBarrier((&___U3CInstanceU3Ek__BackingField_3), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INSTANTPREVIEW_T778898416_H
#ifndef GVRKEYBOARDDELEGATEBASE_T30895224_H
#define GVRKEYBOARDDELEGATEBASE_T30895224_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrKeyboardDelegateBase
struct GvrKeyboardDelegateBase_t30895224 : public MonoBehaviour_t3962482529
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRKEYBOARDDELEGATEBASE_T30895224_H
#ifndef INSTANTPREVIEWHELPER_T1993029064_H
#define INSTANTPREVIEWHELPER_T1993029064_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// InstantPreviewHelper
struct InstantPreviewHelper_t1993029064 : public MonoBehaviour_t3962482529
{
public:
public:
};
struct InstantPreviewHelper_t1993029064_StaticFields
{
public:
// System.String InstantPreviewHelper::AdbPath
String_t* ___AdbPath_2;
public:
inline static int32_t get_offset_of_AdbPath_2() { return static_cast<int32_t>(offsetof(InstantPreviewHelper_t1993029064_StaticFields, ___AdbPath_2)); }
inline String_t* get_AdbPath_2() const { return ___AdbPath_2; }
inline String_t** get_address_of_AdbPath_2() { return &___AdbPath_2; }
inline void set_AdbPath_2(String_t* value)
{
___AdbPath_2 = value;
Il2CppCodeGenWriteBarrier((&___AdbPath_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // INSTANTPREVIEWHELPER_T1993029064_H
#ifndef UIBEHAVIOUR_T3495933518_H
#define UIBEHAVIOUR_T3495933518_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.EventSystems.UIBehaviour
struct UIBehaviour_t3495933518 : public MonoBehaviour_t3962482529
{
public:
public:
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // UIBEHAVIOUR_T3495933518_H
#ifndef SELECTABLE_T3250028441_H
#define SELECTABLE_T3250028441_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.Selectable
struct Selectable_t3250028441 : public UIBehaviour_t3495933518
{
public:
// UnityEngine.UI.Navigation UnityEngine.UI.Selectable::m_Navigation
Navigation_t3049316579 ___m_Navigation_3;
// UnityEngine.UI.Selectable/Transition UnityEngine.UI.Selectable::m_Transition
int32_t ___m_Transition_4;
// UnityEngine.UI.ColorBlock UnityEngine.UI.Selectable::m_Colors
ColorBlock_t2139031574 ___m_Colors_5;
// UnityEngine.UI.SpriteState UnityEngine.UI.Selectable::m_SpriteState
SpriteState_t1362986479 ___m_SpriteState_6;
// UnityEngine.UI.AnimationTriggers UnityEngine.UI.Selectable::m_AnimationTriggers
AnimationTriggers_t2532145056 * ___m_AnimationTriggers_7;
// System.Boolean UnityEngine.UI.Selectable::m_Interactable
bool ___m_Interactable_8;
// UnityEngine.UI.Graphic UnityEngine.UI.Selectable::m_TargetGraphic
Graphic_t1660335611 * ___m_TargetGraphic_9;
// System.Boolean UnityEngine.UI.Selectable::m_GroupsAllowInteraction
bool ___m_GroupsAllowInteraction_10;
// UnityEngine.UI.Selectable/SelectionState UnityEngine.UI.Selectable::m_CurrentSelectionState
int32_t ___m_CurrentSelectionState_11;
// System.Boolean UnityEngine.UI.Selectable::<isPointerInside>k__BackingField
bool ___U3CisPointerInsideU3Ek__BackingField_12;
// System.Boolean UnityEngine.UI.Selectable::<isPointerDown>k__BackingField
bool ___U3CisPointerDownU3Ek__BackingField_13;
// System.Boolean UnityEngine.UI.Selectable::<hasSelection>k__BackingField
bool ___U3ChasSelectionU3Ek__BackingField_14;
// System.Collections.Generic.List`1<UnityEngine.CanvasGroup> UnityEngine.UI.Selectable::m_CanvasGroupCache
List_1_t1260619206 * ___m_CanvasGroupCache_15;
public:
inline static int32_t get_offset_of_m_Navigation_3() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_Navigation_3)); }
inline Navigation_t3049316579 get_m_Navigation_3() const { return ___m_Navigation_3; }
inline Navigation_t3049316579 * get_address_of_m_Navigation_3() { return &___m_Navigation_3; }
inline void set_m_Navigation_3(Navigation_t3049316579 value)
{
___m_Navigation_3 = value;
}
inline static int32_t get_offset_of_m_Transition_4() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_Transition_4)); }
inline int32_t get_m_Transition_4() const { return ___m_Transition_4; }
inline int32_t* get_address_of_m_Transition_4() { return &___m_Transition_4; }
inline void set_m_Transition_4(int32_t value)
{
___m_Transition_4 = value;
}
inline static int32_t get_offset_of_m_Colors_5() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_Colors_5)); }
inline ColorBlock_t2139031574 get_m_Colors_5() const { return ___m_Colors_5; }
inline ColorBlock_t2139031574 * get_address_of_m_Colors_5() { return &___m_Colors_5; }
inline void set_m_Colors_5(ColorBlock_t2139031574 value)
{
___m_Colors_5 = value;
}
inline static int32_t get_offset_of_m_SpriteState_6() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_SpriteState_6)); }
inline SpriteState_t1362986479 get_m_SpriteState_6() const { return ___m_SpriteState_6; }
inline SpriteState_t1362986479 * get_address_of_m_SpriteState_6() { return &___m_SpriteState_6; }
inline void set_m_SpriteState_6(SpriteState_t1362986479 value)
{
___m_SpriteState_6 = value;
}
inline static int32_t get_offset_of_m_AnimationTriggers_7() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_AnimationTriggers_7)); }
inline AnimationTriggers_t2532145056 * get_m_AnimationTriggers_7() const { return ___m_AnimationTriggers_7; }
inline AnimationTriggers_t2532145056 ** get_address_of_m_AnimationTriggers_7() { return &___m_AnimationTriggers_7; }
inline void set_m_AnimationTriggers_7(AnimationTriggers_t2532145056 * value)
{
___m_AnimationTriggers_7 = value;
Il2CppCodeGenWriteBarrier((&___m_AnimationTriggers_7), value);
}
inline static int32_t get_offset_of_m_Interactable_8() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_Interactable_8)); }
inline bool get_m_Interactable_8() const { return ___m_Interactable_8; }
inline bool* get_address_of_m_Interactable_8() { return &___m_Interactable_8; }
inline void set_m_Interactable_8(bool value)
{
___m_Interactable_8 = value;
}
inline static int32_t get_offset_of_m_TargetGraphic_9() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_TargetGraphic_9)); }
inline Graphic_t1660335611 * get_m_TargetGraphic_9() const { return ___m_TargetGraphic_9; }
inline Graphic_t1660335611 ** get_address_of_m_TargetGraphic_9() { return &___m_TargetGraphic_9; }
inline void set_m_TargetGraphic_9(Graphic_t1660335611 * value)
{
___m_TargetGraphic_9 = value;
Il2CppCodeGenWriteBarrier((&___m_TargetGraphic_9), value);
}
inline static int32_t get_offset_of_m_GroupsAllowInteraction_10() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_GroupsAllowInteraction_10)); }
inline bool get_m_GroupsAllowInteraction_10() const { return ___m_GroupsAllowInteraction_10; }
inline bool* get_address_of_m_GroupsAllowInteraction_10() { return &___m_GroupsAllowInteraction_10; }
inline void set_m_GroupsAllowInteraction_10(bool value)
{
___m_GroupsAllowInteraction_10 = value;
}
inline static int32_t get_offset_of_m_CurrentSelectionState_11() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_CurrentSelectionState_11)); }
inline int32_t get_m_CurrentSelectionState_11() const { return ___m_CurrentSelectionState_11; }
inline int32_t* get_address_of_m_CurrentSelectionState_11() { return &___m_CurrentSelectionState_11; }
inline void set_m_CurrentSelectionState_11(int32_t value)
{
___m_CurrentSelectionState_11 = value;
}
inline static int32_t get_offset_of_U3CisPointerInsideU3Ek__BackingField_12() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___U3CisPointerInsideU3Ek__BackingField_12)); }
inline bool get_U3CisPointerInsideU3Ek__BackingField_12() const { return ___U3CisPointerInsideU3Ek__BackingField_12; }
inline bool* get_address_of_U3CisPointerInsideU3Ek__BackingField_12() { return &___U3CisPointerInsideU3Ek__BackingField_12; }
inline void set_U3CisPointerInsideU3Ek__BackingField_12(bool value)
{
___U3CisPointerInsideU3Ek__BackingField_12 = value;
}
inline static int32_t get_offset_of_U3CisPointerDownU3Ek__BackingField_13() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___U3CisPointerDownU3Ek__BackingField_13)); }
inline bool get_U3CisPointerDownU3Ek__BackingField_13() const { return ___U3CisPointerDownU3Ek__BackingField_13; }
inline bool* get_address_of_U3CisPointerDownU3Ek__BackingField_13() { return &___U3CisPointerDownU3Ek__BackingField_13; }
inline void set_U3CisPointerDownU3Ek__BackingField_13(bool value)
{
___U3CisPointerDownU3Ek__BackingField_13 = value;
}
inline static int32_t get_offset_of_U3ChasSelectionU3Ek__BackingField_14() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___U3ChasSelectionU3Ek__BackingField_14)); }
inline bool get_U3ChasSelectionU3Ek__BackingField_14() const { return ___U3ChasSelectionU3Ek__BackingField_14; }
inline bool* get_address_of_U3ChasSelectionU3Ek__BackingField_14() { return &___U3ChasSelectionU3Ek__BackingField_14; }
inline void set_U3ChasSelectionU3Ek__BackingField_14(bool value)
{
___U3ChasSelectionU3Ek__BackingField_14 = value;
}
inline static int32_t get_offset_of_m_CanvasGroupCache_15() { return static_cast<int32_t>(offsetof(Selectable_t3250028441, ___m_CanvasGroupCache_15)); }
inline List_1_t1260619206 * get_m_CanvasGroupCache_15() const { return ___m_CanvasGroupCache_15; }
inline List_1_t1260619206 ** get_address_of_m_CanvasGroupCache_15() { return &___m_CanvasGroupCache_15; }
inline void set_m_CanvasGroupCache_15(List_1_t1260619206 * value)
{
___m_CanvasGroupCache_15 = value;
Il2CppCodeGenWriteBarrier((&___m_CanvasGroupCache_15), value);
}
};
struct Selectable_t3250028441_StaticFields
{
public:
// System.Collections.Generic.List`1<UnityEngine.UI.Selectable> UnityEngine.UI.Selectable::s_List
List_1_t427135887 * ___s_List_2;
public:
inline static int32_t get_offset_of_s_List_2() { return static_cast<int32_t>(offsetof(Selectable_t3250028441_StaticFields, ___s_List_2)); }
inline List_1_t427135887 * get_s_List_2() const { return ___s_List_2; }
inline List_1_t427135887 ** get_address_of_s_List_2() { return &___s_List_2; }
inline void set_s_List_2(List_1_t427135887 * value)
{
___s_List_2 = value;
Il2CppCodeGenWriteBarrier((&___s_List_2), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // SELECTABLE_T3250028441_H
#ifndef DROPDOWN_T2274391225_H
#define DROPDOWN_T2274391225_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// UnityEngine.UI.Dropdown
struct Dropdown_t2274391225 : public Selectable_t3250028441
{
public:
// UnityEngine.RectTransform UnityEngine.UI.Dropdown::m_Template
RectTransform_t3704657025 * ___m_Template_16;
// UnityEngine.UI.Text UnityEngine.UI.Dropdown::m_CaptionText
Text_t1901882714 * ___m_CaptionText_17;
// UnityEngine.UI.Image UnityEngine.UI.Dropdown::m_CaptionImage
Image_t2670269651 * ___m_CaptionImage_18;
// UnityEngine.UI.Text UnityEngine.UI.Dropdown::m_ItemText
Text_t1901882714 * ___m_ItemText_19;
// UnityEngine.UI.Image UnityEngine.UI.Dropdown::m_ItemImage
Image_t2670269651 * ___m_ItemImage_20;
// System.Int32 UnityEngine.UI.Dropdown::m_Value
int32_t ___m_Value_21;
// UnityEngine.UI.Dropdown/OptionDataList UnityEngine.UI.Dropdown::m_Options
OptionDataList_t1438173104 * ___m_Options_22;
// UnityEngine.UI.Dropdown/DropdownEvent UnityEngine.UI.Dropdown::m_OnValueChanged
DropdownEvent_t4040729994 * ___m_OnValueChanged_23;
// UnityEngine.GameObject UnityEngine.UI.Dropdown::m_Dropdown
GameObject_t1113636619 * ___m_Dropdown_24;
// UnityEngine.GameObject UnityEngine.UI.Dropdown::m_Blocker
GameObject_t1113636619 * ___m_Blocker_25;
// System.Collections.Generic.List`1<UnityEngine.UI.Dropdown/DropdownItem> UnityEngine.UI.Dropdown::m_Items
List_1_t2924027637 * ___m_Items_26;
// UnityEngine.UI.CoroutineTween.TweenRunner`1<UnityEngine.UI.CoroutineTween.FloatTween> UnityEngine.UI.Dropdown::m_AlphaTweenRunner
TweenRunner_1_t3520241082 * ___m_AlphaTweenRunner_27;
// System.Boolean UnityEngine.UI.Dropdown::validTemplate
bool ___validTemplate_28;
public:
inline static int32_t get_offset_of_m_Template_16() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_Template_16)); }
inline RectTransform_t3704657025 * get_m_Template_16() const { return ___m_Template_16; }
inline RectTransform_t3704657025 ** get_address_of_m_Template_16() { return &___m_Template_16; }
inline void set_m_Template_16(RectTransform_t3704657025 * value)
{
___m_Template_16 = value;
Il2CppCodeGenWriteBarrier((&___m_Template_16), value);
}
inline static int32_t get_offset_of_m_CaptionText_17() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_CaptionText_17)); }
inline Text_t1901882714 * get_m_CaptionText_17() const { return ___m_CaptionText_17; }
inline Text_t1901882714 ** get_address_of_m_CaptionText_17() { return &___m_CaptionText_17; }
inline void set_m_CaptionText_17(Text_t1901882714 * value)
{
___m_CaptionText_17 = value;
Il2CppCodeGenWriteBarrier((&___m_CaptionText_17), value);
}
inline static int32_t get_offset_of_m_CaptionImage_18() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_CaptionImage_18)); }
inline Image_t2670269651 * get_m_CaptionImage_18() const { return ___m_CaptionImage_18; }
inline Image_t2670269651 ** get_address_of_m_CaptionImage_18() { return &___m_CaptionImage_18; }
inline void set_m_CaptionImage_18(Image_t2670269651 * value)
{
___m_CaptionImage_18 = value;
Il2CppCodeGenWriteBarrier((&___m_CaptionImage_18), value);
}
inline static int32_t get_offset_of_m_ItemText_19() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_ItemText_19)); }
inline Text_t1901882714 * get_m_ItemText_19() const { return ___m_ItemText_19; }
inline Text_t1901882714 ** get_address_of_m_ItemText_19() { return &___m_ItemText_19; }
inline void set_m_ItemText_19(Text_t1901882714 * value)
{
___m_ItemText_19 = value;
Il2CppCodeGenWriteBarrier((&___m_ItemText_19), value);
}
inline static int32_t get_offset_of_m_ItemImage_20() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_ItemImage_20)); }
inline Image_t2670269651 * get_m_ItemImage_20() const { return ___m_ItemImage_20; }
inline Image_t2670269651 ** get_address_of_m_ItemImage_20() { return &___m_ItemImage_20; }
inline void set_m_ItemImage_20(Image_t2670269651 * value)
{
___m_ItemImage_20 = value;
Il2CppCodeGenWriteBarrier((&___m_ItemImage_20), value);
}
inline static int32_t get_offset_of_m_Value_21() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_Value_21)); }
inline int32_t get_m_Value_21() const { return ___m_Value_21; }
inline int32_t* get_address_of_m_Value_21() { return &___m_Value_21; }
inline void set_m_Value_21(int32_t value)
{
___m_Value_21 = value;
}
inline static int32_t get_offset_of_m_Options_22() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_Options_22)); }
inline OptionDataList_t1438173104 * get_m_Options_22() const { return ___m_Options_22; }
inline OptionDataList_t1438173104 ** get_address_of_m_Options_22() { return &___m_Options_22; }
inline void set_m_Options_22(OptionDataList_t1438173104 * value)
{
___m_Options_22 = value;
Il2CppCodeGenWriteBarrier((&___m_Options_22), value);
}
inline static int32_t get_offset_of_m_OnValueChanged_23() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_OnValueChanged_23)); }
inline DropdownEvent_t4040729994 * get_m_OnValueChanged_23() const { return ___m_OnValueChanged_23; }
inline DropdownEvent_t4040729994 ** get_address_of_m_OnValueChanged_23() { return &___m_OnValueChanged_23; }
inline void set_m_OnValueChanged_23(DropdownEvent_t4040729994 * value)
{
___m_OnValueChanged_23 = value;
Il2CppCodeGenWriteBarrier((&___m_OnValueChanged_23), value);
}
inline static int32_t get_offset_of_m_Dropdown_24() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_Dropdown_24)); }
inline GameObject_t1113636619 * get_m_Dropdown_24() const { return ___m_Dropdown_24; }
inline GameObject_t1113636619 ** get_address_of_m_Dropdown_24() { return &___m_Dropdown_24; }
inline void set_m_Dropdown_24(GameObject_t1113636619 * value)
{
___m_Dropdown_24 = value;
Il2CppCodeGenWriteBarrier((&___m_Dropdown_24), value);
}
inline static int32_t get_offset_of_m_Blocker_25() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_Blocker_25)); }
inline GameObject_t1113636619 * get_m_Blocker_25() const { return ___m_Blocker_25; }
inline GameObject_t1113636619 ** get_address_of_m_Blocker_25() { return &___m_Blocker_25; }
inline void set_m_Blocker_25(GameObject_t1113636619 * value)
{
___m_Blocker_25 = value;
Il2CppCodeGenWriteBarrier((&___m_Blocker_25), value);
}
inline static int32_t get_offset_of_m_Items_26() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_Items_26)); }
inline List_1_t2924027637 * get_m_Items_26() const { return ___m_Items_26; }
inline List_1_t2924027637 ** get_address_of_m_Items_26() { return &___m_Items_26; }
inline void set_m_Items_26(List_1_t2924027637 * value)
{
___m_Items_26 = value;
Il2CppCodeGenWriteBarrier((&___m_Items_26), value);
}
inline static int32_t get_offset_of_m_AlphaTweenRunner_27() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___m_AlphaTweenRunner_27)); }
inline TweenRunner_1_t3520241082 * get_m_AlphaTweenRunner_27() const { return ___m_AlphaTweenRunner_27; }
inline TweenRunner_1_t3520241082 ** get_address_of_m_AlphaTweenRunner_27() { return &___m_AlphaTweenRunner_27; }
inline void set_m_AlphaTweenRunner_27(TweenRunner_1_t3520241082 * value)
{
___m_AlphaTweenRunner_27 = value;
Il2CppCodeGenWriteBarrier((&___m_AlphaTweenRunner_27), value);
}
inline static int32_t get_offset_of_validTemplate_28() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225, ___validTemplate_28)); }
inline bool get_validTemplate_28() const { return ___validTemplate_28; }
inline bool* get_address_of_validTemplate_28() { return &___validTemplate_28; }
inline void set_validTemplate_28(bool value)
{
___validTemplate_28 = value;
}
};
struct Dropdown_t2274391225_StaticFields
{
public:
// UnityEngine.UI.Dropdown/OptionData UnityEngine.UI.Dropdown::s_NoOptionData
OptionData_t3270282352 * ___s_NoOptionData_29;
public:
inline static int32_t get_offset_of_s_NoOptionData_29() { return static_cast<int32_t>(offsetof(Dropdown_t2274391225_StaticFields, ___s_NoOptionData_29)); }
inline OptionData_t3270282352 * get_s_NoOptionData_29() const { return ___s_NoOptionData_29; }
inline OptionData_t3270282352 ** get_address_of_s_NoOptionData_29() { return &___s_NoOptionData_29; }
inline void set_s_NoOptionData_29(OptionData_t3270282352 * value)
{
___s_NoOptionData_29 = value;
Il2CppCodeGenWriteBarrier((&___s_NoOptionData_29), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // DROPDOWN_T2274391225_H
#ifndef GVRDROPDOWN_T2772907210_H
#define GVRDROPDOWN_T2772907210_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// GvrDropdown
struct GvrDropdown_t2772907210 : public Dropdown_t2274391225
{
public:
// UnityEngine.GameObject GvrDropdown::currentBlocker
GameObject_t1113636619 * ___currentBlocker_30;
public:
inline static int32_t get_offset_of_currentBlocker_30() { return static_cast<int32_t>(offsetof(GvrDropdown_t2772907210, ___currentBlocker_30)); }
inline GameObject_t1113636619 * get_currentBlocker_30() const { return ___currentBlocker_30; }
inline GameObject_t1113636619 ** get_address_of_currentBlocker_30() { return &___currentBlocker_30; }
inline void set_currentBlocker_30(GameObject_t1113636619 * value)
{
___currentBlocker_30 = value;
Il2CppCodeGenWriteBarrier((&___currentBlocker_30), value);
}
};
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // GVRDROPDOWN_T2772907210_H
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2000 = { sizeof (GvrSafetyRegionType_t1943469016)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2000[3] =
{
GvrSafetyRegionType_t1943469016::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2001 = { sizeof (HeadsetProviderFactory_t520764709), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2002 = { sizeof (gvr_feature_t1054564930)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2002[2] =
{
gvr_feature_t1054564930::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2003 = { sizeof (gvr_property_type_t1812416635)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2003[6] =
{
gvr_property_type_t1812416635::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2004 = { sizeof (gvr_value_type_t2156477760)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2004[15] =
{
gvr_value_type_t2156477760::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2005 = { sizeof (gvr_recenter_flags_t2414511954)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2005[2] =
{
gvr_recenter_flags_t2414511954::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2006 = { sizeof (DummyHeadsetProvider_t3229995161), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2006[1] =
{
DummyHeadsetProvider_t3229995161::get_offset_of_dummyState_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2007 = { sizeof (EditorHeadsetProvider_t660777464), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2007[1] =
{
EditorHeadsetProvider_t660777464::get_offset_of_dummyState_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2008 = { sizeof (HeadsetState_t378905490)+ sizeof (RuntimeObject), sizeof(HeadsetState_t378905490 ), 0, 0 };
extern const int32_t g_FieldOffsetTable2008[7] =
{
HeadsetState_t378905490::get_offset_of_eventType_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
HeadsetState_t378905490::get_offset_of_eventFlags_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
HeadsetState_t378905490::get_offset_of_eventTimestampNs_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
HeadsetState_t378905490::get_offset_of_recenterEventType_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
HeadsetState_t378905490::get_offset_of_recenterEventFlags_4() + static_cast<int32_t>(sizeof(RuntimeObject)),
HeadsetState_t378905490::get_offset_of_recenteredPosition_5() + static_cast<int32_t>(sizeof(RuntimeObject)),
HeadsetState_t378905490::get_offset_of_recenteredRotation_6() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2009 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2010 = { sizeof (InstantPreview_t778898416), -1, sizeof(InstantPreview_t778898416_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2010[8] =
{
0,
InstantPreview_t778898416_StaticFields::get_offset_of_U3CInstanceU3Ek__BackingField_3(),
0,
InstantPreview_t778898416::get_offset_of_OutputResolution_5(),
InstantPreview_t778898416::get_offset_of_MultisampleCount_6(),
InstantPreview_t778898416::get_offset_of_BitRate_7(),
InstantPreview_t778898416::get_offset_of_InstallApkOnRun_8(),
InstantPreview_t778898416::get_offset_of_InstantPreviewApk_9(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2011 = { sizeof (Resolutions_t3321708501)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2011[4] =
{
Resolutions_t3321708501::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2012 = { sizeof (ResolutionSize_t3677657137)+ sizeof (RuntimeObject), sizeof(ResolutionSize_t3677657137 ), 0, 0 };
extern const int32_t g_FieldOffsetTable2012[2] =
{
ResolutionSize_t3677657137::get_offset_of_width_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
ResolutionSize_t3677657137::get_offset_of_height_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2013 = { sizeof (MultisampleCounts_t552109702)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2013[5] =
{
MultisampleCounts_t552109702::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2014 = { sizeof (BitRates_t2681405699)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2014[7] =
{
BitRates_t2681405699::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2015 = { sizeof (UnityRect_t2898233164)+ sizeof (RuntimeObject), sizeof(UnityRect_t2898233164 ), 0, 0 };
extern const int32_t g_FieldOffsetTable2015[4] =
{
UnityRect_t2898233164::get_offset_of_right_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
UnityRect_t2898233164::get_offset_of_left_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
UnityRect_t2898233164::get_offset_of_top_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
UnityRect_t2898233164::get_offset_of_bottom_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2016 = { sizeof (UnityEyeViews_t678228735)+ sizeof (RuntimeObject), sizeof(UnityEyeViews_t678228735 ), 0, 0 };
extern const int32_t g_FieldOffsetTable2016[4] =
{
UnityEyeViews_t678228735::get_offset_of_leftEyePose_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
UnityEyeViews_t678228735::get_offset_of_rightEyePose_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
UnityEyeViews_t678228735::get_offset_of_leftEyeViewSize_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
UnityEyeViews_t678228735::get_offset_of_rightEyeViewSize_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2017 = { sizeof (InstantPreviewHelper_t1993029064), -1, sizeof(InstantPreviewHelper_t1993029064_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2017[1] =
{
InstantPreviewHelper_t1993029064_StaticFields::get_offset_of_AdbPath_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2018 = { sizeof (GvrKeyboardEvent_t3629165438)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2018[9] =
{
GvrKeyboardEvent_t3629165438::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2019 = { sizeof (GvrKeyboardError_t3210682397)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2019[5] =
{
GvrKeyboardError_t3210682397::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2020 = { sizeof (GvrKeyboardInputMode_t518947509)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2020[3] =
{
GvrKeyboardInputMode_t518947509::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2021 = { sizeof (GvrKeyboard_t2536560201), -1, sizeof(GvrKeyboard_t2536560201_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2021[18] =
{
GvrKeyboard_t2536560201_StaticFields::get_offset_of_instance_2(),
GvrKeyboard_t2536560201_StaticFields::get_offset_of_keyboardProvider_3(),
GvrKeyboard_t2536560201::get_offset_of_keyboardState_4(),
GvrKeyboard_t2536560201::get_offset_of_keyboardUpdate_5(),
GvrKeyboard_t2536560201::get_offset_of_errorCallback_6(),
GvrKeyboard_t2536560201::get_offset_of_showCallback_7(),
GvrKeyboard_t2536560201::get_offset_of_hideCallback_8(),
GvrKeyboard_t2536560201::get_offset_of_updateCallback_9(),
GvrKeyboard_t2536560201::get_offset_of_enterCallback_10(),
GvrKeyboard_t2536560201::get_offset_of_isKeyboardHidden_11(),
0,
GvrKeyboard_t2536560201_StaticFields::get_offset_of_threadSafeCallbacks_13(),
GvrKeyboard_t2536560201_StaticFields::get_offset_of_callbacksLock_14(),
GvrKeyboard_t2536560201::get_offset_of_keyboardDelegate_15(),
GvrKeyboard_t2536560201::get_offset_of_inputMode_16(),
GvrKeyboard_t2536560201::get_offset_of_useRecommended_17(),
GvrKeyboard_t2536560201::get_offset_of_distance_18(),
GvrKeyboard_t2536560201_StaticFields::get_offset_of_U3CU3Ef__mgU24cache0_19(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2022 = { sizeof (StandardCallback_t3095007891), sizeof(Il2CppMethodPointer), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2023 = { sizeof (EditTextCallback_t1702213000), sizeof(Il2CppMethodPointer), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2024 = { sizeof (ErrorCallback_t2310212740), sizeof(Il2CppMethodPointer), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2025 = { sizeof (KeyboardCallback_t3330588312), sizeof(Il2CppMethodPointer), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2026 = { sizeof (U3CExecuterU3Ec__Iterator0_t892308174), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2026[4] =
{
U3CExecuterU3Ec__Iterator0_t892308174::get_offset_of_U24this_0(),
U3CExecuterU3Ec__Iterator0_t892308174::get_offset_of_U24current_1(),
U3CExecuterU3Ec__Iterator0_t892308174::get_offset_of_U24disposing_2(),
U3CExecuterU3Ec__Iterator0_t892308174::get_offset_of_U24PC_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2027 = { sizeof (GvrKeyboardDelegateBase_t30895224), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2028 = { sizeof (GvrKeyboardIntent_t3874861606), -1, sizeof(GvrKeyboardIntent_t3874861606_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2028[3] =
{
0,
0,
GvrKeyboardIntent_t3874861606_StaticFields::get_offset_of_theInstance_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2029 = { sizeof (KeyboardCallback_t4011255843), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2030 = { 0, -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2031 = { sizeof (KeyboardProviderFactory_t3069358895), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2032 = { sizeof (AndroidNativeKeyboardProvider_t4081466012), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2032[21] =
{
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_renderEventFunction_0(),
0,
0,
0,
0,
0,
0,
0,
0,
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_keyboard_context_9(),
0,
0,
0,
0,
0,
0,
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_mode_16(),
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_editorText_17(),
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_worldMatrix_18(),
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_isValid_19(),
AndroidNativeKeyboardProvider_t4081466012::get_offset_of_isReady_20(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2033 = { sizeof (gvr_clock_time_point_t2797008802)+ sizeof (RuntimeObject), sizeof(gvr_clock_time_point_t2797008802 ), 0, 0 };
extern const int32_t g_FieldOffsetTable2033[1] =
{
gvr_clock_time_point_t2797008802::get_offset_of_monotonic_system_time_nanos_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2034 = { sizeof (gvr_recti_t2249612514)+ sizeof (RuntimeObject), sizeof(gvr_recti_t2249612514 ), 0, 0 };
extern const int32_t g_FieldOffsetTable2034[4] =
{
gvr_recti_t2249612514::get_offset_of_left_0() + static_cast<int32_t>(sizeof(RuntimeObject)),
gvr_recti_t2249612514::get_offset_of_right_1() + static_cast<int32_t>(sizeof(RuntimeObject)),
gvr_recti_t2249612514::get_offset_of_bottom_2() + static_cast<int32_t>(sizeof(RuntimeObject)),
gvr_recti_t2249612514::get_offset_of_top_3() + static_cast<int32_t>(sizeof(RuntimeObject)),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2035 = { sizeof (DummyKeyboardProvider_t4235634217), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2035[2] =
{
DummyKeyboardProvider_t4235634217::get_offset_of_dummyState_0(),
DummyKeyboardProvider_t4235634217::get_offset_of_U3CEditorTextU3Ek__BackingField_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2036 = { sizeof (EmulatorKeyboardProvider_t2389719130), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2036[7] =
{
EmulatorKeyboardProvider_t2389719130::get_offset_of_stub_0(),
EmulatorKeyboardProvider_t2389719130::get_offset_of_showing_1(),
EmulatorKeyboardProvider_t2389719130::get_offset_of_keyboardCallback_2(),
EmulatorKeyboardProvider_t2389719130::get_offset_of_editorText_3(),
EmulatorKeyboardProvider_t2389719130::get_offset_of_mode_4(),
EmulatorKeyboardProvider_t2389719130::get_offset_of_worldMatrix_5(),
EmulatorKeyboardProvider_t2389719130::get_offset_of_isValid_6(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2037 = { sizeof (KeyboardState_t4109162649), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2037[5] =
{
KeyboardState_t4109162649::get_offset_of_editorText_0(),
KeyboardState_t4109162649::get_offset_of_mode_1(),
KeyboardState_t4109162649::get_offset_of_isValid_2(),
KeyboardState_t4109162649::get_offset_of_isReady_3(),
KeyboardState_t4109162649::get_offset_of_worldMatrix_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2038 = { sizeof (Pose3D_t2649470188), -1, sizeof(Pose3D_t2649470188_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2038[4] =
{
Pose3D_t2649470188_StaticFields::get_offset_of_FLIP_Z_0(),
Pose3D_t2649470188::get_offset_of_U3CPositionU3Ek__BackingField_1(),
Pose3D_t2649470188::get_offset_of_U3COrientationU3Ek__BackingField_2(),
Pose3D_t2649470188::get_offset_of_U3CMatrixU3Ek__BackingField_3(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2039 = { sizeof (MutablePose3D_t3352419872), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2040 = { sizeof (GvrInfo_t2187998870), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2040[2] =
{
GvrInfo_t2187998870::get_offset_of_text_0(),
GvrInfo_t2187998870::get_offset_of_numLines_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2041 = { sizeof (GvrDropdown_t2772907210), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2041[1] =
{
GvrDropdown_t2772907210::get_offset_of_currentBlocker_30(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2042 = { sizeof (GvrActivityHelper_t700161863), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2042[2] =
{
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2043 = { sizeof (GvrCursorHelper_t4026897861), -1, sizeof(GvrCursorHelper_t4026897861_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2043[2] =
{
GvrCursorHelper_t4026897861_StaticFields::get_offset_of_cachedHeadEmulationActive_0(),
GvrCursorHelper_t4026897861_StaticFields::get_offset_of_cachedControllerEmulationActive_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2044 = { sizeof (GvrDaydreamApi_t820520409), -1, sizeof(GvrDaydreamApi_t820520409_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2044[5] =
{
0,
0,
0,
0,
GvrDaydreamApi_t820520409_StaticFields::get_offset_of_m_instance_4(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2045 = { sizeof (U3CLaunchVrHomeAsyncU3Ec__AnonStorey0_t1042273844), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2045[1] =
{
U3CLaunchVrHomeAsyncU3Ec__AnonStorey0_t1042273844::get_offset_of_callback_0(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2046 = { sizeof (GvrIntent_t255451010), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2046[5] =
{
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2047 = { sizeof (GvrMathHelpers_t769385329), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2048 = { sizeof (GvrUIHelpers_t853958893), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2049 = { sizeof (GvrVRHelpers_t1380670802), -1, 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2050 = { sizeof (GvrVideoPlayerTexture_t3546202735), -1, sizeof(GvrVideoPlayerTexture_t3546202735_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2050[31] =
{
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoPlayerPtr_2(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoPlayerEventBase_3(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_initialTexture_4(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_surfaceTexture_5(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoMatrixRaw_6(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoMatrix_7(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoMatrixPropertyId_8(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_lastVideoTimestamp_9(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_initialized_10(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_texWidth_11(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_texHeight_12(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_lastBufferedPosition_13(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_framecount_14(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_screen_15(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_renderEventFunction_16(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_playOnResume_17(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_onEventCallbacks_18(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_onExceptionCallbacks_19(),
GvrVideoPlayerTexture_t3546202735_StaticFields::get_offset_of_ExecuteOnMainThread_20(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_statusText_21(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoType_22(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoURL_23(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoContentID_24(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_videoProviderId_25(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_initialResolution_26(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_adjustAspectRatio_27(),
GvrVideoPlayerTexture_t3546202735::get_offset_of_useSecurePath_28(),
0,
GvrVideoPlayerTexture_t3546202735_StaticFields::get_offset_of_U3CU3Ef__amU24cache0_30(),
GvrVideoPlayerTexture_t3546202735_StaticFields::get_offset_of_U3CU3Ef__mgU24cache0_31(),
GvrVideoPlayerTexture_t3546202735_StaticFields::get_offset_of_U3CU3Ef__mgU24cache1_32(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2051 = { sizeof (VideoType_t2491562340)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2051[4] =
{
VideoType_t2491562340::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2052 = { sizeof (VideoResolution_t1062057780)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2052[6] =
{
VideoResolution_t1062057780::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2053 = { sizeof (VideoPlayerState_t3323603301)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2053[6] =
{
VideoPlayerState_t3323603301::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2054 = { sizeof (VideoEvents_t3555787859)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2054[6] =
{
VideoEvents_t3555787859::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2055 = { sizeof (StereoMode_t1039127149)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2055[5] =
{
StereoMode_t1039127149::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2056 = { sizeof (RenderCommand_t1121160834)+ sizeof (RuntimeObject), sizeof(int32_t), 0, 0 };
extern const int32_t g_FieldOffsetTable2056[8] =
{
RenderCommand_t1121160834::get_offset_of_value___1() + static_cast<int32_t>(sizeof(RuntimeObject)),
0,
0,
0,
0,
0,
0,
0,
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2057 = { sizeof (OnVideoEventCallback_t2376626694), sizeof(Il2CppMethodPointer), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2058 = { sizeof (OnExceptionCallback_t1696428116), sizeof(Il2CppMethodPointer), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2059 = { sizeof (U3CInternalOnVideoEventCallbackU3Ec__AnonStorey0_t2222373319), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2059[2] =
{
U3CInternalOnVideoEventCallbackU3Ec__AnonStorey0_t2222373319::get_offset_of_player_0(),
U3CInternalOnVideoEventCallbackU3Ec__AnonStorey0_t2222373319::get_offset_of_eventId_1(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2060 = { sizeof (U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2060[3] =
{
U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987::get_offset_of_player_0(),
U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987::get_offset_of_type_1(),
U3CInternalOnExceptionCallbackU3Ec__AnonStorey1_t3301768987::get_offset_of_msg_2(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2061 = { sizeof (GameStatusController_t1340316609), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2061[4] =
{
GameStatusController_t1340316609::get_offset_of_statusTextObject_2(),
GameStatusController_t1340316609::get_offset_of_winText_3(),
GameStatusController_t1340316609::get_offset_of_statusText_4(),
GameStatusController_t1340316609::get_offset_of_losingDepth_5(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2062 = { sizeof (TiltController_t3275962614), -1, 0, 0 };
extern const int32_t g_FieldOffsetTable2062[10] =
{
TiltController_t3275962614::get_offset_of_rotationSpeed_2(),
TiltController_t3275962614::get_offset_of_allowedAngle_3(),
TiltController_t3275962614::get_offset_of_numWalls_4(),
TiltController_t3275962614::get_offset_of_numHoles_5(),
TiltController_t3275962614::get_offset_of_marble_6(),
TiltController_t3275962614::get_offset_of_wallPrefab_7(),
TiltController_t3275962614::get_offset_of_holePrefab_8(),
TiltController_t3275962614::get_offset_of_winPrefab_9(),
TiltController_t3275962614::get_offset_of_winText_10(),
TiltController_t3275962614::get_offset_of_worldSize_11(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2063 = { sizeof (U3CPrivateImplementationDetailsU3E_t3057255366), -1, sizeof(U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields), 0 };
extern const int32_t g_FieldOffsetTable2063[6] =
{
U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields::get_offset_of_U24fieldU2D311441405B64B3EA9097AC8E07F3274962EC6BB4_0(),
U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields::get_offset_of_U24fieldU2D16E2B412E9C2B8E31B780DE46254349320CCAAA0_1(),
U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields::get_offset_of_U24fieldU2DD7F443D0D86C2C79F284C1CA7CCCF3C9D9B7B6D8_2(),
U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields::get_offset_of_U24fieldU2D25B4B83D2A43393F4E18624598DDA694217A6622_3(),
U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields::get_offset_of_U24fieldU2DFADC743710841EB901D5F6FBC97F555D4BD94310_4(),
U3CPrivateImplementationDetailsU3E_t3057255366_StaticFields::get_offset_of_U24fieldU2DC34ABF0A6BE7F2D67E7997A058AA0AA6985FFE6F_5(),
};
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2064 = { sizeof (U24ArrayTypeU3D12_t2488454197)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU3D12_t2488454197 ), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2065 = { sizeof (U24ArrayTypeU3D16_t3253128244)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU3D16_t3253128244 ), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2066 = { sizeof (U24ArrayTypeU3D20_t1702832645)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU3D20_t1702832645 ), 0, 0 };
extern const Il2CppTypeDefinitionSizes g_typeDefinitionSize2067 = { sizeof (U24ArrayTypeU3D28_t173484549)+ sizeof (RuntimeObject), sizeof(U24ArrayTypeU3D28_t173484549 ), 0, 0 };
#ifdef __clang__
#pragma clang diagnostic pop
#endif
| [
"jacobleiken@gmail.com"
] | jacobleiken@gmail.com |
b9e17f4c7395536ba68e8400e7fbf3557838f545 | 1291fbfd7a8d40b0cda2e9bc9d5c21efa23d7cff | /LCA/F.cpp | 79c57a75629f46bec4912d480b8f8e1b3a4445c2 | [] | no_license | HelenYO/algorithms | ebf90a469233b5b77a4144491898135716ee5ab3 | c4d4f9edaf8ee92755b1b5f00285f75a87210d2d | refs/heads/master | 2021-06-18T18:37:13.421150 | 2019-07-03T20:34:10 | 2019-07-03T20:34:10 | 135,949,409 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,519 | cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
vector<vector<int>> children(0);
vector<int> dep;
vector<int> nextDino;
vector<bool> isDelete;
vector<vector<int>> parentsBin(0);
int lg;
void dfs(int v, int height) {
dep[v] = height;
for (int i = 0; i < children[v].size(); i++) {
int child = children[v][i];
dfs(child, height + 1);
}
}
int findNext(int v) {
if (!isDelete[v]) {
return v;
}
nextDino[v] = findNext(nextDino[v]);
return nextDino[v];
}
int lca(int v, int u) {
if (dep[v] > dep[u]) {
int tmp = u;
u = v;
v = tmp;
}
for (int i = lg; i >= 0; i--) {
if (dep[parentsBin[u][i]] >= dep[v]) {
u = parentsBin[u][i];
}
}
if (v == u) {
//return v;
return findNext(v);
}
for (int i = lg; i >= 0; i--) {
if (parentsBin[v][i] != parentsBin[u][i]) {
v = parentsBin[v][i];
u = parentsBin[u][i];
}
}
//return parentsBin[v][0];
return findNext(parentsBin[v][0]);
}
void add(int v, int parent) {
children[parent].push_back(v);
nextDino[v] = parent;
dep[v] = dep[parent] + 1;
parentsBin[v][0] = parent;
for (int j = 1; j < lg + 1; j++) {
parentsBin[v][j] = parentsBin[parentsBin[v][j - 1]][j - 1];
}
}
void toDelete(int v) {
isDelete[v] = true;
}
int main() {
int m;
cin >> m;
for (int i = 0; i < m + 1; i++) {
vector<int> temp(0);
children.push_back(temp);
}
dep.resize(m + 1);
isDelete.resize(m + 1);
nextDino.resize(m + 1);
lg = (int) ceil(log(m + 1) / log(2));
for (int i = 0; i < m + 1; i++) {
vector<int> temp(lg + 1);
parentsBin.push_back(temp);
}
parentsBin[1][0] = 1;
int freeNumber = 2;
for (int i = 0; i < m; i ++) {
string whatToDo;
cin >> whatToDo;
switch (whatToDo[0]) {
case '+':
int parentTmp;
cin >> parentTmp;
add(freeNumber, parentTmp);
freeNumber++;
break;
case '?':
int a, b;
cin >> a >> b;
cout << lca(a , b) << "\n";
break;
case '-':
int tmp;
cin >> tmp;
toDelete(tmp);
break;
}
}
}
/*
* 11 + 1 + 1 + 2 ? 2 3 ? 1 3 ? 2 4 + 4 + 4 - 4 ? 5 6 ? 5 5
*/
| [
"noreply@github.com"
] | HelenYO.noreply@github.com |
763e4e131d6b16a51b4e742f95f0078b83960a1c | 3bf914538f23ddae0b37a43d489f40be846c711f | /gunMayhem/headers/Bullet.h | 0b1aa6ec8fd7f9c9cf98419475e83c88ffe0a65a | [] | no_license | 26eldrpau/gunMayhem | 61f0c9b1375eaa71dbdba36672b4cc3e9ed8a4e0 | 3b6eb5d0385365f3131c2511e29ffb5d3edcc652 | refs/heads/master | 2023-02-15T04:39:02.415073 | 2021-01-10T14:43:28 | 2021-01-10T14:43:28 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 825 | h | #ifndef GUNMAYHEM_BULLET_H
#define GUNMAYHEM_BULLET_H
#include <iostream>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Network.hpp>
#include <SFML/Audio.hpp>
using namespace sf;
class Bullet {
private:
float bulletVel;
RectangleShape bullet;
public:
Bullet(bool right,float x,float y);
virtual ~Bullet();
void initBullet(bool right,float x,float y);
void move();
RectangleShape &getRect();
float getBulletVel() const;
float getBulletPositionX();
float getBulletPositionY();
void setBulletVel(float bulletVel);
void setBulletPosition(float x, float y);
const RectangleShape &getBullet() const;
void setBullet(const RectangleShape &bullet);
};
#endif //GUNMAYHEM_BULLET_H
| [
"noreply@github.com"
] | 26eldrpau.noreply@github.com |
9be5bf043133b8259e4af6bd0678fbb2e2688e2d | 7dc1ee882e3f2ba72089ee25b26a7c6ac9917526 | /Homework2/Task2/Wizzard.h | 05332b1a1c79f5bef6bc1fb9688dc93fba246cdf | [] | no_license | xMonny/Object-oriented-programming | 0cc92b81e754a264af7759e9e9cd43b8be4872f4 | f2451bc6fbbf98d674763259843028e2c9a4f960 | refs/heads/master | 2021-02-07T16:00:30.400040 | 2020-02-29T23:04:02 | 2020-02-29T23:04:02 | 244,047,970 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 104 | h | #include "GameCharacter.h"
#pragma once
class Wizzard:public GameCharacter
{
public:
Wizzard();
};
| [
"sim0na1999@abv.bg"
] | sim0na1999@abv.bg |
c93309858f100cd752166877abbdd86fdb13c43f | 478f3cc6976b977cbc92c9d29f12d52211a35b3f | /3Dpoint/VoxelGrid重心改进降采样.cpp | b7ccacc0866fac4e02b8178bfab949764ce366d4 | [] | no_license | neophack/3DPoint | 2959b7a71fcaa7f7fc46831cfe7948fb7f398ead | 27b4e610ef8511a657805fc6ba29479158f1628a | refs/heads/master | 2023-05-08T16:09:56.509101 | 2021-05-29T02:22:44 | 2021-05-29T02:22:44 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 2,926 | cpp | //#include <iostream>
//#include <pcl/io/pcd_io.h>
//#include <pcl/point_types.h>
//#include <pcl/filters/voxel_grid.h>
//#include <pcl/visualization/pcl_visualizer.h>
//#include <time.h>
//#include<pcl/kdtree/kdtree_flann.h>
//pcl::visualization::PCLVisualizer::Ptr simpleVis(pcl::PointCloud<pcl::PointXYZ>::ConstPtr cloud)
//{
// pcl::visualization::PCLVisualizer::Ptr viewer(new pcl::visualization::PCLVisualizer("3D Viewer"));
// pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ> color(cloud, 125, 125, 125);
// viewer->setBackgroundColor(255, 255, 255);
// viewer->addPointCloud<pcl::PointXYZ>(cloud,color, "sample cloud");
// viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "sample cloud");
// //viewer->initCameraParameters();
// return (viewer);
//}
//
//
//int
//main (int argc, char** argv)
//{
//
// pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>);
// pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_filtered (new pcl::PointCloud<pcl::PointXYZ>);
// pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_out(new pcl::PointCloud<pcl::PointXYZ>);
// pcl::PCDReader reader;
//
// //reader.read ("part1_s.pcd", *cloud);
// reader.read("data/tai_s.pcd", *cloud);
//
// std::cerr << "PointCloud before filtering: " << cloud->width * cloud->height
// << " data points (" << pcl::getFieldsList (*cloud) << ").";
//
// clock_t start = clock();
//
// pcl::VoxelGrid<pcl::PointXYZ> sor;
// sor.setInputCloud (cloud);
// sor.setLeafSize (0.0005f, 0.0005f, 0.0005f);
// sor.filter (*cloud_filtered);
//
// clock_t end = clock();
// cout << "time" << end - start << endl;
// std::cerr << "PointCloud after filtering: " << cloud_filtered->width * cloud_filtered->height
// << " data points (" << pcl::getFieldsList (*cloud_filtered) << ").";
//
// pcl::KdTreeFLANN<pcl::PointXYZ> kdtree;
// kdtree.setInputCloud(cloud);
// pcl::PointXYZ searchPoint;
//
//
// int K = 1;
// std::vector<int> pointIdxNKNSearch(K);
// std::vector<float> pointNKNSquaredDistance(K);
// cloud_out->width = cloud_filtered->width;
// cloud_out->height = cloud_filtered->height;
// cloud_out->points.resize(cloud_out->width * cloud_out->height);
//
// //寻找距离重心最近的点
//
// for (int j = 0; j < cloud_filtered->width*cloud_filtered->height; j++)
// {
// if (kdtree.nearestKSearch(cloud_filtered->points[j], K, pointIdxNKNSearch, pointNKNSquaredDistance) > 0)
// {
//
// cloud_out->points[j] = cloud->points[pointIdxNKNSearch[0]];
// }
// }
// end = clock();
//
// //cout << cloud_out->points.size();
//
// cout << "time:" << end - start << endl;
//
// pcl::PCDWriter writer;
// writer.write ("data/zhou_s_VG.pcd", *cloud_filtered);
// writer.write("data/zhou_s_VG_.pcd", *cloud_out);
//
//
// pcl::visualization::PCLVisualizer::Ptr viewer = simpleVis(cloud_filtered);
// viewer->spin();
// return (0);
//}
| [
"45490618+JohnBing@users.noreply.github.com"
] | 45490618+JohnBing@users.noreply.github.com |
a104d7da9fbcbbc44f99d3f6a6e8140c1b5a1654 | 581d6eeb48dbd442dca27c1fa83689c58ffea2c9 | /Sources/Elastos/LibCore/src/org/apache/http/impl/conn/IdleConnectionHandler.cpp | 491e830d8bcc5e7a2bdf4b34b7ccf52d674a8b81 | [
"Apache-2.0"
] | permissive | TheTypoMaster/ElastosRDK5_0 | bda12b56271f38dfb0726a4b62cdacf1aa0729a7 | e59ba505e0732c903fb57a9f5755d900a33a80ab | refs/heads/master | 2021-01-20T21:00:59.528682 | 2015-09-19T21:29:08 | 2015-09-19T21:29:08 | 42,790,116 | 0 | 0 | null | 2015-09-19T21:23:27 | 2015-09-19T21:23:26 | null | UTF-8 | C++ | false | false | 5,434 | cpp |
#include "IdleConnectionHandler.h"
#include <elastos/Logger.h>
using Elastos::Core::ISystem;
using Elastos::Core::CSystem;
using Elastos::Core::Math;
using Elastos::Utility::IHashMap;
using Elastos::Utility::CHashMap;
using Elastos::Utility::ISet;
using Elastos::Utility::IIterator;
using Elastos::Utility::Logging::Logger;
namespace Org {
namespace Apache {
namespace Http {
namespace Impl {
namespace Conn {
//==============================================================================
// IdleConnectionHandler::TimeValues
//==============================================================================
IdleConnectionHandler::TimeValues::TimeValues(
/* [in] */ Int64 now,
/* [in] */ Int64 validDuration,
/* [in] */ ITimeUnit* validUnit)
: mTimeAdded(0)
, mTimeExpires(0)
{
mTimeAdded = now;
if(validDuration > 0) {
Int64 millis;
validUnit->ToMillis(validDuration, &millis)
mTimeExpires = now + millis;
} else {
mTimeExpires = Math::INT64_MAX_VALUE;
}
}
//==============================================================================
// IdleConnectionHandler
//==============================================================================
IdleConnectionHandler::IdleConnectionHandler()
{
AutoPtr<IHashMap> hm;
CHashMap::New((IHashMap**)&hm);
mConnectionToTimes = IMap::Probe(hm);
}
void IdleConnectionHandler::Add(
/* [in] */ IHttpConnection* connection,
/* [in] */ Int64 validDuration,
/* [in] */ ITimeUnit* unit)
{
AutoPtr<ISystem> system;
CSystem::AcquireSingleton((ISystem**)&system);
Int64 timeAdded;
system->GetCurrentTimeMillis(&timeAdded);
// if (log.isDebugEnabled()) {
// log.debug("Adding connection at: " + timeAdded);
// }
AutoPtr<TimeValues> timeValues = new TimeValues(timeAdded, validDuration, unit);
mConnectionToTimes->Put(connection, (IInterface*)timeValues);
}
Boolean IdleConnectionHandler::Remove(
/* [in] */ IHttpConnection* connection)
{
AutoPtr<IInterface> value;
mConnectionToTimes->Remove(connection, (IInterface**)&value);
TimeValues times = mConnectionToTimes.remove(connection);
if(value == NULL) {
Logger::D("IdleConnectionHandler", "Removing a connection that never existed!");
return TRUE;
}
else {
AutoPtr<TimeValues> times = (TimeValues*)value;
AutoPtr<ISystem> system;
CSystem::AcquireSingleton((ISystem**)&system);
Int64 current;
system->GetCurrentTimeMillis(¤t);
return current <= times->mTimeExpires;
}
}
void IdleConnectionHandler::RemoveAll()
{
mConnectionToTimes->Clear();
}
void IdleConnectionHandler::CloseIdleConnections(
/* [in] */ Int64 idleTime)
{
// the latest time for which connections will be closed
AutoPtr<ISystem> system;
CSystem::AcquireSingleton((ISystem**)&system);
Int64 current;
system->GetCurrentTimeMillis(¤t);
Int64 idleTimeout = current - idleTime;
// if (log.isDebugEnabled()) {
// log.debug("Checking for connections, idleTimeout: " + idleTimeout);
// }
AutoPtr<ISet> keySet;
mConnectionToTimes->GetKeySet((ISet**)&keySet);
AutoPtr<IIterator> it;
keySet->GetIterator((IIterator**)&it);
Boolean hasNext;
while (it->HasNext(&hasNext), hasNext) {
AutoPtr<IInterface> key;
it->GetNext((IInterface**)&key);
AutoPtr<IHttpConnection> conn = IHttpConnection::Probe(key);
AutoPtr<IInterface> value;
mConnectionToTimes->Get(conn, (IInterface**)&value);
AutoPtr<TimeValues> times = (TimeValues*)value.Get();
Int64 connectionTime = times->mTimeAdded;
if (connectionTime <= idleTimeout) {
// if (log.isDebugEnabled()) {
// log.debug("Closing connection, connection time: " + connectionTime);
// }
it->Remove();
// try {
conn->Close();
// } catch (IOException ex) {
// log.debug("I/O error closing connection", ex);
// }
}
}
}
void IdleConnectionHandler::CloseExpiredConnections()
{
AutoPtr<ISystem> system;
CSystem::AcquireSingleton((ISystem**)&system);
Int64 now;
system->GetCurrentTimeMillis(&now);
// if (log.isDebugEnabled()) {
// log.debug("Checking for expired connections, now: " + now);
// }
AutoPtr<ISet> keySet;
mConnectionToTimes->GetKeySet((ISet**)&keySet);
AutoPtr<IIterator> it;
keySet->GetIterator((IIterator**)&it);
Boolean hasNext;
while (it->HasNext(&hasNext), hasNext) {
AutoPtr<IInterface> key;
it->GetNext((IInterface**)&key);
AutoPtr<IHttpConnection> conn = IHttpConnection::Probe(key);
AutoPtr<IInterface> value;
mConnectionToTimes->Get(conn, (IInterface**)&value);
AutoPtr<TimeValues> times = (TimeValues*)value.Get();
if(times->mTimeExpires <= now) {
// if (log.isDebugEnabled()) {
// log.debug("Closing connection, expired @: " + times.timeExpires);
// }
it->Remove();
// try {
conn->Close();
// } catch (IOException ex) {
// log.debug("I/O error closing connection", ex);
// }
}
}
}
} // namespace Conn
} // namespace Impl
} // namespace Http
} // namespace Apache
} // namespace Org | [
"shao.jin@kortide.com"
] | shao.jin@kortide.com |
a0c8d76b9b0918c55e6a5f58cfe4df790fb483d6 | 97743ecaea773b4ea60856ad656989ef51f139af | /OpenGL/GraphicsEngine/project3D/Shader.cpp | 36d78975e2d061972c9d38bebe1d32f4383fc166 | [
"MIT"
] | permissive | immrsv/AIE_OpenGL | a7a7bc3de6fa8dd9fcbda32e0c5ed21374a57484 | 3a2411d49d26e97890a3355e44bf0b04470a5e8c | refs/heads/master | 2021-06-13T10:09:00.715156 | 2017-02-22T06:17:37 | 2017-02-22T06:17:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,319 | cpp | #include <gl_core_4_4.h>
#include <iostream>
#include <fstream>
#include <string>
#include "Shader.h"
#include <map>
std::map<std::string, unsigned int> Shader::collection = std::map<std::string, unsigned int>();
bool Shader::LoadShaderFromFile(const char* filePath, std::string& code)
{
code = "";
// Read the Vertex Shader code from the file
std::ifstream VertexShaderStream(filePath, std::ios::in);
if (VertexShaderStream.is_open()) {
std::string line;
while (getline(VertexShaderStream, line))
code += line + "\n";
VertexShaderStream.close();
return true;
}
else {
printf("Cannot open shader file %s.\n", filePath);
return false;
}
}
GLuint Shader::GetProgramID(std::string name)
{
std::map<std::string, unsigned int>::iterator iter = collection.find(name);
if (iter != collection.end()) {
return iter->second;
}
return 0;
}
GLuint Shader::CompileShaders(std::string name, char* vsFile, const char* fsFile)
{
std::map<std::string, unsigned int>::iterator iter = collection.find(name);
if (iter != collection.end()) {
return iter->second;
}
std::string vsCode, fsCode;
if (!(LoadShaderFromFile(vsFile, vsCode) && LoadShaderFromFile(fsFile, fsCode)))
printf("failed to load shaders");
const char* vsSource = vsCode.c_str();
const char* fsSource = fsCode.c_str();
GLuint programID;
int success = GL_FALSE;
unsigned int vertexShader = glCreateShader(GL_VERTEX_SHADER);
unsigned int fragmentShader = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(vertexShader, 1, (const char**)&vsSource, 0);
glCompileShader(vertexShader);
glShaderSource(fragmentShader, 1, (const char**)&fsSource, 0);
glCompileShader(fragmentShader);
programID = glCreateProgram();
glAttachShader(programID, vertexShader);
glAttachShader(programID, fragmentShader);
glLinkProgram(programID);
glGetProgramiv(programID, GL_LINK_STATUS, &success);
if (success == GL_FALSE) {
int infoLogLength = 0;
glGetProgramiv(programID, GL_INFO_LOG_LENGTH, &infoLogLength);
char* infoLog = new char[infoLogLength];
glGetProgramInfoLog(programID, infoLogLength, 0, infoLog);
printf("Error: Failed to link shader program!\n");
printf("%s\n", infoLog);
delete[] infoLog;
}
glDeleteShader(fragmentShader);
glDeleteShader(vertexShader);
collection[name] = programID;
return programID;
} | [
"s171866@ad.aie.edu"
] | s171866@ad.aie.edu |
d2cd39840552e2f7345987f86c07ed96d6ad18ba | d91571e3325bba9192fcb3e2108f55ce4c29c431 | /Codeforces/Death Note.cpp | 72af8e085eae39e3ceef950460f1a2e1690cf1ff | [] | no_license | rajbir21-droid/Code | 0dad69d9e8e75f1a1f8098bed9405524c894b5eb | d61b57dbd2588138b266a5f9e09e7ba721063e36 | refs/heads/main | 2023-08-13T12:18:08.546356 | 2021-09-16T18:25:55 | 2021-09-16T18:25:55 | 380,495,482 | 1 | 0 | null | 2021-07-04T17:38:26 | 2021-06-26T12:22:28 | C++ | UTF-8 | C++ | false | false | 467 | cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define vii vector<pii>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define ff first
#define ss second
#define setBits(x) builtin_popcount(x)
int main(){
int n,m;
cin>>n>>m;
vi v(n);
rep(i,0,n){
cin>>v[i];
}
int res=0,ans=0;
rep(i,0,n){
ans=(res+v[i])/m;
cout<<ans<<" ";
res=(res+v[i])%m;
//cout<<res<<" ";
}
return 0;
}
| [
"banerjeerajbir2888@gmail.com"
] | banerjeerajbir2888@gmail.com |
269ee0ebdcd9a8beed98ff1d02f371efcbd128ac | a0559b31d618ebdf229a680c835db8e4e5d4b3b3 | /heap.cpp | 93f523d740ed087d4815d013d8369e258ee98aba | [] | no_license | skancher18/310_project3 | da2dea40e6f92f86aebc4a9d694dc50fc506ffa0 | 5e774fe9db781d9b9859316fa8548fbdca8bf038 | refs/heads/main | 2023-04-13T23:00:18.892755 | 2021-04-23T01:08:44 | 2021-04-23T01:08:44 | 360,724,587 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,553 | cpp | #include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include "heap.h"
int count = 0;
HEAP *heapInit(int capacity){
HEAP *heap;
heap = (HEAP *) calloc(1, sizeof(HEAP));
heap->capacity = capacity;
heap->size = 0;
heap->elements = (ElementT *) calloc(capacity+1, sizeof(ElementT));
return heap;
}
void heapPrint(HEAP *H){
printf("capacity=%d, size=%d\n", H->capacity, H->size);
for(int j=1; j<H->size; j++){
printf("%d, ", H->elements[j]->key);
}
if(H->size!=0){
printf("%d\n", H->elements[H->size]->key);
}
}
int left(int i){
return(2 * i);
}
int right(int i){
return((2 * i) + 1);
}
int parent(int i){
return(i/2);
}
void minHeapify(HEAP *H, int index){
int l = left(index);
int r = right(index);
int smallest = index;
if( l <= H->size && H->elements[l]->key < H->elements[index]->key){
smallest = l;
}
if( r <= H->size && H->elements[r]->key < H->elements[smallest]->key){
smallest = r;
}
if(smallest != index) {
int temp = H->elements[index]->key;
H->elements[index]->key = H->elements[smallest]->key;
H->elements[smallest]->key = temp;
count++;
minHeapify(H, smallest);
}
}
int buildHeap(HEAP *H){
count = 0;
for (int i = ((H->size)/2); i >= 1; i--){
count++;
minHeapify(H, i);
}
return count;
}
int extractMin(HEAP *H){
count = 0;
int min = H->elements[1]->key;
H->elements[1]->key = H->elements[H->size]->key;
H->size--;
count++;
minHeapify(H, 1);
printf("Deleted key: %d\n", min);
return count;
}
void insert(HEAP *H, ELEMENT *E){
H->size++;
int i = H->size;
while(i > 1 && H->elements[parent(i)]->key > E->key){
H->elements[i] = H->elements[parent(i)];
i = parent(i);
}
H->elements[i] = E;
}
void decreaseKey(HEAP *H, int i, int value){
H->elements[i]->key = value;
while(i > 1 && H->elements[parent(i)]->key > H->elements[i]->key){
int temp = H->elements[i]->key;
H->elements[i]->key = H->elements[parent(i)]->key;
H->elements[parent(i)]->key = temp;
i = parent(i);
}
}
void heapWrite(HEAP *H){
FILE *ofile;
int j;
ofile = fopen("HEAPoutput.txt","w");
fprintf(ofile, "%d\n", H->size);
for(j=1; j<=H->size; j++){
fprintf(ofile, "%d\n", H->elements[j]->key);
}
fclose(ofile);
} | [
"noreply@github.com"
] | skancher18.noreply@github.com |
22ad8926cf62c253dc30d0d35e3218a33d239e6b | 00525ff9680f30a8dfb3288997f14e8ab5baf6b3 | /examples/LedStrip/LedStrip.ino | 2bbc045c1cb480cf0ed64d28d1881b52568db2e8 | [
"MIT"
] | permissive | Squirco/homie-esp8266 | 77a0aac46ae74891de8247daa48e8784e2f0fc7e | f5da4e4825271046f711d19a1aaf97caed792845 | refs/heads/master | 2021-01-21T07:35:21.047693 | 2016-10-14T05:33:38 | 2016-10-14T05:33:38 | 66,595,507 | 0 | 1 | null | 2016-08-29T15:24:10 | 2016-08-25T21:45:30 | C++ | UTF-8 | C++ | false | false | 1,146 | ino | #include <Homie.h>
const unsigned char NUMBER_OF_LED = 4;
const unsigned char LED_PINS[NUMBER_OF_LED] = { 16, 5, 4, 0 };
HomieNode stripNode("strip", "strip");
bool stripLedHandler(HomieRange range, String value) {
if (!range.isRange) return false; // if it's not a range
if (range.index < 1 || range.index > NUMBER_OF_LED) return false; // if it's not a valid range
if (value != "on" && value != "off") return false; // if the value is not valid
bool on = (value == "on");
digitalWrite(LED_PINS[range.index - 1], on ? HIGH : LOW);
Homie.setNodeProperty(stripNode, "led").setRange(range).send(value); // Update the state of the led
Serial << "Led " << range.index << " is " << value << endl;
return true;
}
void setup() {
for (int i = 0; i < NUMBER_OF_LED; i++) {
pinMode(LED_PINS[i], OUTPUT);
digitalWrite(LED_PINS[i], LOW);
}
Serial.begin(115200);
Serial << endl << endl;
Homie_setFirmware("awesome-ledstrip", "1.0.0");
stripNode.advertiseRange("led", 1, NUMBER_OF_LED).settable(stripLedHandler);
Homie.setup();
}
void loop() {
Homie.loop();
}
| [
"nivramdu94@gmail.com"
] | nivramdu94@gmail.com |
33c8a6c126f7a90a25a649e36d80ee60a2a5582c | de7e771699065ec21a340ada1060a3cf0bec3091 | /analysis/common/src/java/org/apache/lucene/analysis/core/FlattenGraphFilter.h | c5ca5c859fd90417795354006eafee02c5beeee3 | [] | no_license | sraihan73/Lucene- | 0d7290bacba05c33b8d5762e0a2a30c1ec8cf110 | 1fe2b48428dcbd1feb3e10202ec991a5ca0d54f3 | refs/heads/master | 2020-03-31T07:23:46.505891 | 2018-12-08T14:57:54 | 2018-12-08T14:57:54 | 152,020,180 | 7 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,176 | h | #pragma once
#include "../../../../../../../../../core/src/java/org/apache/lucene/analysis/TokenFilter.h"
#include "../../../../../../../../../core/src/java/org/apache/lucene/util/RollingBuffer.h"
#include "stringhelper.h"
#include <memory>
#include <deque>
// C++ NOTE: Forward class declarations:
#include "core/src/java/org/apache/lucene/util/AttributeSource.h"
#include "core/src/java/org/apache/lucene/util/State.h"
#include "core/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttribute.h"
#include "core/src/java/org/apache/lucene/analysis/tokenattributes/PositionLengthAttribute.h"
#include "core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.h"
#include "core/src/java/org/apache/lucene/analysis/TokenStream.h"
/*
* Licensed to the Syed Mamun Raihan (sraihan.com) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* sraihan.com licenses this file to You under GPLv3 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
*
* https://www.gnu.org/licenses/gpl-3.0.en.html
*
* 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.
*/
namespace org::apache::lucene::analysis::core
{
using TokenFilter = org::apache::lucene::analysis::TokenFilter;
using TokenStream = org::apache::lucene::analysis::TokenStream;
using OffsetAttribute =
org::apache::lucene::analysis::tokenattributes::OffsetAttribute;
using PositionIncrementAttribute =
org::apache::lucene::analysis::tokenattributes::PositionIncrementAttribute;
using PositionLengthAttribute =
org::apache::lucene::analysis::tokenattributes::PositionLengthAttribute;
using AttributeSource = org::apache::lucene::util::AttributeSource;
using RollingBuffer = org::apache::lucene::util::RollingBuffer;
/**
* Converts an incoming graph token stream, such as one from
* {@link SynonymGraphFilter}, into a flat form so that
* all nodes form a single linear chain with no side paths. Every
* path through the graph touches every node. This is necessary
* when indexing a graph token stream, because the index does not
* save {@link PositionLengthAttribute} and so it cannot
* preserve the graph structure. However, at search time,
* query parsers can correctly handle the graph and this token
* filter should <b>not</b> be used.
*
* <p>If the graph was not already flat to start, this
* is likely a lossy process, i.e. it will often cause the
* graph to accept token sequences it should not, and to
* reject token sequences it should not.
*
* <p>However, when applying synonyms during indexing, this
* is necessary because Lucene already does not index a graph
* and so the indexing process is already lossy
* (it ignores the {@link PositionLengthAttribute}).
*
* @lucene.experimental
*/
class FlattenGraphFilter final : public TokenFilter
{
GET_CLASS_NAME(FlattenGraphFilter)
/** Holds all tokens leaving a given input position. */
private:
class InputNode final : public std::enable_shared_from_this<InputNode>,
public RollingBuffer::Resettable
{
GET_CLASS_NAME(InputNode)
private:
const std::deque<std::shared_ptr<AttributeSource::State>> tokens =
std::deque<std::shared_ptr<AttributeSource::State>>();
/** Our input node, or -1 if we haven't been assigned yet */
public:
int node = -1;
/** Maximum to input node for all tokens leaving here; we use this
* to know when we can freeze. */
int maxToNode = -1;
/** Where we currently map_obj to; this changes (can only
* increase as we see more input tokens), until we are finished
* with this position. */
int outputNode = -1;
/** Which token (index into {@link #tokens}) we will next output. */
int nextOut = 0;
void reset() override;
};
/** Gathers up merged input positions into a single output position,
* only for the current "frontier" of nodes we've seen but can't yet
* output because they are not frozen. */
private:
class OutputNode final : public std::enable_shared_from_this<OutputNode>,
public RollingBuffer::Resettable
{
GET_CLASS_NAME(OutputNode)
private:
const std::deque<int> inputNodes = std::deque<int>();
/** Node ID for this output, or -1 if we haven't been assigned yet. */
public:
int node = -1;
/** Which input node (index into {@link #inputNodes}) we will next output.
*/
int nextOut = 0;
/** Start offset of tokens leaving this node. */
int startOffset = -1;
/** End offset of tokens arriving to this node. */
int endOffset = -1;
void reset() override;
};
private:
const std::shared_ptr<RollingBuffer<std::shared_ptr<InputNode>>> inputNodes =
std::make_shared<RollingBufferAnonymousInnerClass>();
private:
class RollingBufferAnonymousInnerClass
: public RollingBuffer<std::shared_ptr<InputNode>>
{
GET_CLASS_NAME(RollingBufferAnonymousInnerClass)
public:
RollingBufferAnonymousInnerClass();
protected:
std::shared_ptr<InputNode> newInstance() override;
protected:
std::shared_ptr<RollingBufferAnonymousInnerClass> shared_from_this()
{
return std::static_pointer_cast<RollingBufferAnonymousInnerClass>(
org.apache.lucene.util.RollingBuffer<InputNode>::shared_from_this());
}
};
private:
const std::shared_ptr<RollingBuffer<std::shared_ptr<OutputNode>>>
outputNodes = std::make_shared<RollingBufferAnonymousInnerClass2>();
private:
class RollingBufferAnonymousInnerClass2
: public RollingBuffer<std::shared_ptr<OutputNode>>
{
GET_CLASS_NAME(RollingBufferAnonymousInnerClass2)
public:
RollingBufferAnonymousInnerClass2();
protected:
std::shared_ptr<OutputNode> newInstance() override;
protected:
std::shared_ptr<RollingBufferAnonymousInnerClass2> shared_from_this()
{
return std::static_pointer_cast<RollingBufferAnonymousInnerClass2>(
org.apache.lucene.util.RollingBuffer<OutputNode>::shared_from_this());
}
};
private:
const std::shared_ptr<PositionIncrementAttribute> posIncAtt =
addAttribute(PositionIncrementAttribute::typeid);
const std::shared_ptr<PositionLengthAttribute> posLenAtt =
addAttribute(PositionLengthAttribute::typeid);
const std::shared_ptr<OffsetAttribute> offsetAtt =
addAttribute(OffsetAttribute::typeid);
/** Which input node the last seen token leaves from */
int inputFrom = 0;
/** We are currently releasing tokens leaving from this output node */
int outputFrom = 0;
// for debugging:
// private int retOutputFrom;
bool done = false;
int lastOutputFrom = 0;
int finalOffset = 0;
int finalPosInc = 0;
int maxLookaheadUsed = 0;
int lastStartOffset = 0;
public:
FlattenGraphFilter(std::shared_ptr<TokenStream> in_);
private:
bool releaseBufferedToken();
public:
bool incrementToken() override;
// Only for debugging:
/*
private void printStates() {
System.out.println("states:");
for(int i=outputFrom;i<outputNodes.getMaxPos();i++) {
OutputNode outputNode = outputNodes.get(i);
System.out.println(" output " + i + ": inputs " + outputNode.inputNodes);
for(int inputNodeID : outputNode.inputNodes) {
InputNode inputNode = inputNodes.get(inputNodeID);
assert inputNode.outputNode == i;
}
}
}
*/
void end() override;
void reset() override;
/** For testing */
int getMaxLookaheadUsed();
protected:
std::shared_ptr<FlattenGraphFilter> shared_from_this()
{
return std::static_pointer_cast<FlattenGraphFilter>(
org.apache.lucene.analysis.TokenFilter::shared_from_this());
}
};
} // #include "core/src/java/org/apache/lucene/analysis/core/
| [
"smamunr@fedora.localdomain"
] | smamunr@fedora.localdomain |
29524b7a80a852e46dbbf73ebef2dc0edc64c2d6 | 45c6756793bb5765f152e670a9607cbbc74448cc | /source/controller/InteractiveController/Classes/StartHandler.h | 34ab094c1861beeb86a6c37029f9ccfbf33089f6 | [] | no_license | marekfoltyn/InteractiveGame | 7a89a30770306ba528e113c3ba291b5a46470df3 | 84384ee352a1b5446e64a62a5431e35d855cce38 | refs/heads/master | 2021-01-24T21:26:30.398058 | 2016-05-17T14:51:44 | 2016-05-17T14:51:44 | 46,618,856 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 612 | h | //
// StartHandler.h
// InteractiveController
//
// Created by Marek Foltýn on 29.02.16.
//
//
#ifndef StartHandler_h
#define StartHandler_h
#include "Controller.h"
#include "AbstractHandlers.h"
/**
* First handler responsible for the application initialization,
* network start and first scene setup
*/
class StartHandler: public VoidHandler{
public:
StartHandler();
/**
* start networking and show the first scene
*/
void execute();
private:
Controller * controller;
Director * director;
void showMainMenu();
};
#endif /* StartHandler_h */
| [
"marek@foltynovi.cz"
] | marek@foltynovi.cz |
3ab01e48f2aa4ff8acc164569fd7f9a9be013bf5 | 39462c3882b97d4f87f952c2f217fb90033626a6 | /tablemodel.h | 0df4e3533585e79575267301c40bc80786031025 | [] | no_license | lazin87/AddressBook | f94e7acd14b2a7337e492244f3dcc33f9fa32ceb | 393b8655fd3b9e98cc1c1e88311b68672e942d3d | refs/heads/master | 2016-09-02T03:12:24.991633 | 2015-03-05T15:31:37 | 2015-03-05T15:31:37 | 31,674,669 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,244 | h | #ifndef TABLEMODEL_H
#define TABLEMODEL_H
#include <QAbstractTableModel>
class TableModel : public QAbstractTableModel
{
Q_OBJECT
public:
typedef QPair<QString, QString> DataType;
typedef QList< DataType > ListDataType;
// using DataType = QPair<QString, QString>;
// using ListDataType = QList< DataType >;
TableModel(QObject *parent = 0);
TableModel(ListDataType pairs, QObject *parent = 0);
~TableModel();
int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
int columnCount(const QModelIndex &parent) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE;
Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex() ) Q_DECL_OVERRIDE;
bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex() ) Q_DECL_OVERRIDE;
ListDataType getList();
private:
ListDataType listOfPairs;
};
#endif // TABLEMODEL_H
| [
"rafal.lazinski@gmail.com"
] | rafal.lazinski@gmail.com |
44519355dbdaca30ccc9f2337c1669c36bb3ece5 | f5055330eb2a66958e9c6a88e1c981cf5373bc87 | /src/channel/hdr/bch_codec_itpp.hpp | b41b6434d7b8aaa3e8dc68d642948118f7749ad6 | [] | no_license | snikulov/vidstream | 4c671c476c2b2478c78bd088a54e899cd665f6ab | 76689e96d0201056092f937221ef66b1c997aa9f | refs/heads/master | 2022-08-02T15:30:07.984508 | 2020-05-29T10:06:26 | 2020-05-29T10:06:26 | 262,551,939 | 0 | 0 | null | 2020-05-29T06:54:46 | 2020-05-09T11:03:43 | BitBake | UTF-8 | C++ | false | false | 933 | hpp | #ifndef BCH_CODEC_ITPP_HPP__
#define BCH_CODEC_ITPP_HPP__
#include <channel/ecc_codec.hpp>
#include <itpp/itcomm.h>
#include <boost/scoped_ptr.hpp>
class bch_codec_itpp : public abstract_ecc_codec
{
public:
explicit bch_codec_itpp(int n, int t)
{
codec_.reset(new itpp::BCH(n, t));
}
~bch_codec_itpp() {}
bool encode(const std::vector<uint8_t>& src, std::vector<uint8_t>& dst) const
{
return true;
}
bool encode(uint8_t src, std::vector<uint8_t>& dst) const
{
return true;
}
bool decode(const std::vector<uint8_t>& src, std::vector<uint8_t>& dst) const
{
return true;
}
double get_encode_coef()
{
return 1.0;
}
private:
boost::scoped_ptr<itpp::BCH> codec_;
};
#endif /* end of include guard: BCH_CODEC_ITPP_HPP__ */
| [
"sergey.nikulov@gmail.com"
] | sergey.nikulov@gmail.com |
9db78e604957041c2a0119d6aba8310c82037c85 | 3b74df8a933fbcb3ee3f7a2202aacdc240b939b7 | /libraries/chain/database.cpp | 9995c96465646f4506a9c515eff7b5f219b29dc9 | [
"MIT"
] | permissive | techsharesteam/techshares | 746111254c29d18376ddaddedcb6b3b66aa085ec | 47c58630a578204147057b7504e571e19546444f | refs/heads/master | 2021-01-21T14:43:23.261812 | 2017-04-23T13:03:31 | 2017-04-23T13:03:31 | 58,311,014 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,490 | cpp | /*
* Copyright (c) 2015 Cryptonomex, Inc., and contributors.
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <fc/smart_ref_impl.hpp>
#include "db_balance.cpp"
#include "db_block.cpp"
#include "db_debug.cpp"
#include "db_getter.cpp"
#include "db_init.cpp"
#include "db_maint.cpp"
#include "db_management.cpp"
#include "db_market.cpp"
#include "db_update.cpp"
#include "db_witness_schedule.cpp"
| [
"thsgroupteamcontact@gmail.com"
] | thsgroupteamcontact@gmail.com |
1d69c98ff582b6046e7072de474c1ec497ef1c12 | 51928337483095b12f046eda9ea17ba0b1a81fc0 | /3rdparty/cppwinrt/10.0.15063.0/winrt/internal/Windows.Data.Xml.Dom.0.h | ef0f981ea70fa3d84a3670c76a8f513b76f1b4b5 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | kingofthebongo2008/geometry_images | 8592aa99e53a16821725a2564313eeafb0462362 | 53109f9bc9ea19d0f119f0fe71762248d5038213 | refs/heads/master | 2021-01-19T03:02:56.996122 | 2017-07-06T13:25:47 | 2017-07-06T13:25:47 | 87,302,727 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,676 | h | // C++ for the Windows Runtime v1.0.170331.7
// Copyright (c) 2017 Microsoft Corporation. All rights reserved.
#pragma once
WINRT_EXPORT namespace winrt {
namespace ABI::Windows::Data::Xml::Dom {
struct IDtdEntity;
struct IDtdNotation;
struct IXmlAttribute;
struct IXmlCDataSection;
struct IXmlCharacterData;
struct IXmlComment;
struct IXmlDocument;
struct IXmlDocumentFragment;
struct IXmlDocumentIO;
struct IXmlDocumentIO2;
struct IXmlDocumentStatics;
struct IXmlDocumentType;
struct IXmlDomImplementation;
struct IXmlElement;
struct IXmlEntityReference;
struct IXmlLoadSettings;
struct IXmlNamedNodeMap;
struct IXmlNode;
struct IXmlNodeList;
struct IXmlNodeSelector;
struct IXmlNodeSerializer;
struct IXmlProcessingInstruction;
struct IXmlText;
struct DtdEntity;
struct DtdNotation;
struct XmlAttribute;
struct XmlCDataSection;
struct XmlComment;
struct XmlDocument;
struct XmlDocumentFragment;
struct XmlDocumentType;
struct XmlDomImplementation;
struct XmlElement;
struct XmlEntityReference;
struct XmlLoadSettings;
struct XmlNamedNodeMap;
struct XmlNodeList;
struct XmlProcessingInstruction;
struct XmlText;
}
namespace Windows::Data::Xml::Dom {
struct IDtdEntity;
struct IDtdNotation;
struct IXmlAttribute;
struct IXmlCDataSection;
struct IXmlCharacterData;
struct IXmlComment;
struct IXmlDocument;
struct IXmlDocumentFragment;
struct IXmlDocumentIO;
struct IXmlDocumentIO2;
struct IXmlDocumentStatics;
struct IXmlDocumentType;
struct IXmlDomImplementation;
struct IXmlElement;
struct IXmlEntityReference;
struct IXmlLoadSettings;
struct IXmlNamedNodeMap;
struct IXmlNode;
struct IXmlNodeList;
struct IXmlNodeSelector;
struct IXmlNodeSerializer;
struct IXmlProcessingInstruction;
struct IXmlText;
struct DtdEntity;
struct DtdNotation;
struct XmlAttribute;
struct XmlCDataSection;
struct XmlComment;
struct XmlDocument;
struct XmlDocumentFragment;
struct XmlDocumentType;
struct XmlDomImplementation;
struct XmlElement;
struct XmlEntityReference;
struct XmlLoadSettings;
struct XmlNamedNodeMap;
struct XmlNodeList;
struct XmlProcessingInstruction;
struct XmlText;
}
namespace Windows::Data::Xml::Dom {
template <typename T> struct impl_IDtdEntity;
template <typename T> struct impl_IDtdNotation;
template <typename T> struct impl_IXmlAttribute;
template <typename T> struct impl_IXmlCDataSection;
template <typename T> struct impl_IXmlCharacterData;
template <typename T> struct impl_IXmlComment;
template <typename T> struct impl_IXmlDocument;
template <typename T> struct impl_IXmlDocumentFragment;
template <typename T> struct impl_IXmlDocumentIO;
template <typename T> struct impl_IXmlDocumentIO2;
template <typename T> struct impl_IXmlDocumentStatics;
template <typename T> struct impl_IXmlDocumentType;
template <typename T> struct impl_IXmlDomImplementation;
template <typename T> struct impl_IXmlElement;
template <typename T> struct impl_IXmlEntityReference;
template <typename T> struct impl_IXmlLoadSettings;
template <typename T> struct impl_IXmlNamedNodeMap;
template <typename T> struct impl_IXmlNode;
template <typename T> struct impl_IXmlNodeList;
template <typename T> struct impl_IXmlNodeSelector;
template <typename T> struct impl_IXmlNodeSerializer;
template <typename T> struct impl_IXmlProcessingInstruction;
template <typename T> struct impl_IXmlText;
}
namespace Windows::Data::Xml::Dom {
enum class NodeType
{
Invalid = 0,
ElementNode = 1,
AttributeNode = 2,
TextNode = 3,
DataSectionNode = 4,
EntityReferenceNode = 5,
EntityNode = 6,
ProcessingInstructionNode = 7,
CommentNode = 8,
DocumentNode = 9,
DocumentTypeNode = 10,
DocumentFragmentNode = 11,
NotationNode = 12,
};
}
}
| [
"stefan.dyulgerov@gmail.com"
] | stefan.dyulgerov@gmail.com |
dd0062072f671ebf347898ac45c75b4070ea4c23 | 70ecac44b229e4e35050fd93ccc8b8778dc94720 | /min.cpp | ba702e668de768463fd166534cf31fbac92175d8 | [
"MIT"
] | permissive | t-mochizuki/cpp-study | 5602661ee1ad118b93ee8993e006f84b85a10a8b | 1f6eb99db765fd970f2a44f941610d9a79200953 | refs/heads/main | 2023-07-21T13:55:11.664199 | 2023-07-10T09:35:11 | 2023-07-10T09:35:11 | 92,583,299 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 550 | cpp | #include <stdio.h>
#include <iostream>
#include <cstdarg>
using namespace std;
#define REP(a, i, n) for (int i = a; i < n; ++i)
int func(const int N, const int argv...) {
va_list xs; va_start(xs, argv); int x = argv;
REP(1, i, N) {
int y = va_arg(xs, int);
if (x > y) {
x = y;
}
}
va_end(xs);
return x;
}
int main() {
cout << func(1, 3) << endl;
cout << func(2, 1, -1) << endl;
cout << func(3, 4, 1, -1) << endl;
cout << func(5, -2, 7, 6, 1, -1) << endl;
return 0;
}
| [
"t-mochizuki@users.noreply.github.com"
] | t-mochizuki@users.noreply.github.com |
0f42ddf01b7e461b10920b3f052bbd8e12f61856 | b6ab3efa1ae42100b6865bad18be7699c0dddf9b | /CALProject2/extra.cpp | 0f434222c094c01aa7a696483386e8f7a808ce37 | [] | no_license | Ncf16/CAL_PROJ2 | 0453b146787da3af834853bfcd8edfe7e6536da0 | a2ac465502c5510ee5f91fd0134b50bc7cab9c1a | refs/heads/master | 2021-01-15T10:30:51.472239 | 2016-03-03T13:15:25 | 2016-03-03T13:15:25 | 36,028,660 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 356 | cpp | #include "extra.h"
int GetMilliCount()
{
timeb tb;
ftime(&tb);
int nCount = tb.millitm + (tb.time & 0xfffff) * 1000;
return nCount;
}
//---------------------------------------------------------------------------
int GetMilliSpan(int nTimeStart)
{
int nSpan = GetMilliCount() - nTimeStart;
if (nSpan < 0)
nSpan += 0x100000 * 1000;
return nSpan;
} | [
"joaofilipe26@gmail.com"
] | joaofilipe26@gmail.com |
79ee7d0e6b84b6ddb71b1ae57cea49052f3fde1a | 272251b2685e16bf073eb70d7b3baebe628a5211 | /AcceptorConnector/Socket.h | c96aa92799e2ca966b954b8fe78b27de7db3e346 | [] | no_license | huiliu/Learn | f33bef135fb7109e08a7144bada42231e4de952f | 47456c3b2a2bc97ad30d202bc5c8c7d86586bdfc | refs/heads/master | 2021-01-17T09:36:04.526501 | 2020-10-12T16:34:54 | 2020-10-12T16:34:54 | 41,966,395 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 730 | h | #pragma once
class InetAddress;
class Socket
{
public:
static int createSocket();
public:
explicit Socket(int fd) : m_fd(fd) {}
~Socket();
Socket(const Socket&) = delete;
Socket& operator=(const Socket&) = delete;
Socket(Socket&& other);
public:
int fd() const { return m_fd; }
public:
void setKeepAlive(bool on);
void setNonBlocking(bool on);
void setNoDelay(bool on);
void setReuseAddr(bool on);
void setReusePort(bool on);
private:
void setSockOpt(int level, int type, bool val);
public:
int accept(InetAddress& peerAddr);
void bindAddress(const InetAddress& addr);
void close();
void listen();
void shutdownWrite();
private:
int m_fd;
};
| [
"hui.liu.e@gmail.com"
] | hui.liu.e@gmail.com |
bbbd55a8b6636440c2f4e61b922edf185e576f76 | 88ff05814ce15fbc3e4a7ac5ac23736ea6eb9431 | /redplane-store/apps/state_store/store_tester.h | 7f32043c890f61674335436f1c2041c4810f7d20 | [
"Apache-2.0"
] | permissive | gabriel-jcx/redplane-public-test | 12deb9e2ebee335629603aa00d6e932269c89a44 | da1f80ee50f977c6e7f01bbaa9c4c6b2fb82122b | refs/heads/master | 2023-05-29T08:39:18.658921 | 2021-05-26T16:52:38 | 2021-05-26T16:52:38 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,512 | h | #include <string>
#include <iostream>
#include <sys/mman.h>
#include <gflags/gflags.h>
#include <signal.h>
#include <thread>
#include <chrono>
#include <ctime>
#include <numa.h>
#include <unordered_map>
#include "raw_transport/raw_transport.h"
#include "redplane_header.h"
DEFINE_uint32(threads, 1, "Number of workers");
DEFINE_uint32(payload_size, 1, "payload size");
static constexpr uint16_t kUDPPort = 8000;
static constexpr uint16_t kNumThreads = 20;
static constexpr uint16_t kLeasePeriod = 5;
static const size_t kPhyPorts = 1; // Number of physical ports in CX-5 NIC
static const std::string kReceiverIpAddr = "198.19.13.0";
static const uint16_t MAX_SEQ = UINT16_MAX;
static const uint8_t kDestMacAddr[6] = {0x28, 0x99, 0x3a, 0x9f, 0xe7, 0x5d};
// Globals
volatile sig_atomic_t ctrl_c_pressed = 0;
void ctrl_c_handler(int) { ctrl_c_pressed = 1; }
static std::vector<size_t>
get_lcores_for_numa_node(size_t numa_node)
{
assert(numa_node <= static_cast<size_t>(numa_max_node()));
std::vector<size_t> ret;
size_t num_lcores = static_cast<size_t>(numa_num_configured_cpus());
for (size_t i = 0; i < num_lcores; i++)
{
if (numa_node == static_cast<size_t>(numa_node_of_cpu(i)))
{
ret.push_back(i);
}
}
return ret;
}
static void bind_to_core(std::thread &thread, size_t numa_node, size_t numa_local_index)
{
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
assert(numa_node <= static_cast<size_t>(numa_max_node()));
auto lcore_vec = get_lcores_for_numa_node(numa_node);
size_t global_index = lcore_vec.at(numa_local_index);
CPU_SET(global_index, &cpuset);
int rc = pthread_setaffinity_np(thread.native_handle(), sizeof(cpu_set_t),
&cpuset);
assert(rc == 0);
}
static uint16_t ip_checksum(const redplane::ipv4_hdr_t *buf, size_t hdr_len)
{
unsigned long sum = 0;
const uint16_t *ip1;
ip1 = reinterpret_cast<const uint16_t *>(buf);
while (hdr_len > 1)
{
sum += *ip1++;
if (sum & 0x80000000)
sum = (sum & 0xFFFF) + (sum >> 16);
hdr_len -= 2;
}
while (sum >> 16)
sum = (sum & 0xFFFF) + (sum >> 16);
return (~sum);
}
void print_bytes(uint8_t *buffer)
{
size_t k, j, base;
for (base = 0; base < 1; base++)
{
for (k = base * 256; k < (base * 256) + 256; k += 16)
{
for (j = 0; j < 15; j++)
{
fprintf(stderr, "%02x ", *(buffer + k + j));
}
fprintf(stderr, "%02x\n", *(buffer + k + j));
}
fprintf(stderr, "\n");
}
fprintf(stderr, "\n");
}
| [
"dkimcs@gmail.com"
] | dkimcs@gmail.com |
e234edc3ba17f2be0bd5fb2d73517f7259ec026a | a4fc431d3ba45eba078335328814ddd3970f9c01 | /src/plugins/servicebackends/windows/windowsservicebackend.h | f3a0b1ee5926e99d208a61576e9ea183021233cd | [
"BSD-3-Clause"
] | permissive | Light-Wizzard/QtService | 87dc3cae31c8e9d9f0e47d2154e8b7b18d06fb63 | d3d3d72a4d4146cc3be829bc10d7ea086c57dec6 | refs/heads/master | 2022-11-10T13:30:50.294632 | 2020-06-30T07:04:04 | 2020-06-30T07:04:04 | 266,441,076 | 0 | 0 | BSD-3-Clause | 2020-05-24T00:12:09 | 2020-05-24T00:12:09 | null | UTF-8 | C++ | false | false | 1,684 | h | #ifndef WINDOWSSERVICEBACKEND_H
#define WINDOWSSERVICEBACKEND_H
#include <QtCore/QMutex>
#include <QtCore/QWaitCondition>
#include <QtCore/QThread>
#include <QtCore/QPointer>
#include <QtCore/QAbstractNativeEventFilter>
#include <QtCore/QTimer>
#include <QtCore/QLoggingCategory>
#include <QtService/ServiceBackend>
#include <QtCore/qt_windows.h>
class WindowsServiceBackend : public QtService::ServiceBackend
{
Q_OBJECT
public:
explicit WindowsServiceBackend(QtService::Service *service);
int runService(int &argc, char **argv, int flags) override;
void quitService() override;
void reloadService() override;
private Q_SLOTS:
void onStarted(bool success);
void onPaused(bool success);
void onResumed(bool success);
private:
class SvcControlThread : public QThread
{
public:
SvcControlThread(WindowsServiceBackend *backend);
protected:
void run() override;
private:
WindowsServiceBackend *_backend;
};
class SvcEventFilter : public QAbstractNativeEventFilter
{
public:
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);
};
static QPointer<WindowsServiceBackend> _backendInstance;
QMutex _svcLock;
QWaitCondition _startCondition;
SERVICE_STATUS _status;
SERVICE_STATUS_HANDLE _statusHandle = nullptr;
//temporary stuff
QByteArrayList _svcArgs;
QTimer *_opTimer = nullptr;
void setStatus(DWORD status);
static void WINAPI serviceMain(DWORD dwArgc, wchar_t** lpszArgv);
static void WINAPI handler(DWORD dwOpcode);
static void winsvcMessageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message);
};
Q_DECLARE_LOGGING_CATEGORY(logBackend)
#endif // WINDOWSSERVICEBACKEND_H
| [
"Skycoder42@users.noreply.github.com"
] | Skycoder42@users.noreply.github.com |
e76e103002671c5c477501eed0ab1dab657c83d2 | 7aaba0d10df1545c8e3396b4209ffebf10dd62e0 | /sfml_rigidBody/controller.hpp | 6ee498cbda1c895fae02919a95392949e44c9a62 | [] | no_license | LEE-JAE-HYUN179/pinball_opengl | 8eada0b6974a4a9683110421ee4d814d0c9114c3 | 73d7177d208ab1664c0d27d94dcbedff0f7e794e | refs/heads/master | 2022-12-22T12:37:31.393153 | 2020-10-05T08:09:09 | 2020-10-05T08:09:09 | 301,335,855 | 2 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 598 | hpp | //
// controller.hpp
// sfml_rigidBody
//
// Created by 이재현 on 2020/10/04.
//
#ifndef controller_hpp
#define controller_hpp
#include "game.hpp"
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
class Controller{
public:
sf::RenderWindow* m_window;
Game* m_game;
sf::Clock deltaClock;
sf::Color bgColor;
bool my_tool_active=true;
float my_color[4]={0,0,0,0};
Controller(sf::RenderWindow& m_window,Game& m_game);
void processInput();
};
#endif /* controller_hpp */
| [
"leejaehyun1223@gmail.com"
] | leejaehyun1223@gmail.com |
fc9941554b8893429b43f19c70d2edf9f0600d42 | 375c093f555bddd1ce10e80530dba9119cc24306 | /BOJ/6975.cpp | ea5f4d836fce49ca146deb9bb8472c4c26fbdb72 | [] | no_license | Seojeonguk/Algorithm_practice | e8c2add155a1341087e4c528f5346c8711525f96 | b29a1a7421edf2a9968229822dcbdc5a7926e2f5 | refs/heads/master | 2023-08-25T11:40:40.076347 | 2023-08-25T09:07:45 | 2023-08-25T09:07:45 | 154,248,766 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 520 | cpp | #ifdef _DEBUG
#include "bits_stdc++.h"
#else
#include "bits/stdc++.h"
#endif
#pragma warning(disable:4996)
using namespace std;
int t,x;
int main() {
#ifdef _CONSOLE
freopen("sample.txt", "r", stdin);
#endif
scanf("%d", &t);
while (t--) {
scanf("%d", &x);
int sum = 0;
for (int i = 1; i < x; i++)
if (x % i == 0) sum += i;
if (sum > x) printf("%d is an abundant number.\n",x);
else if (sum < x) printf("%d is a deficient number.\n",x);
else printf("%d is a perfect number.\n",x);
puts("");
}
} | [
"uk7880@naver.com"
] | uk7880@naver.com |
11f59af8066cce82c3efc711c712684b6f2ff28a | d634429fd2c349aa159d6ff2aef924b8ac4ec39b | /Minimum Spanning Tree - GFG/minimum-spanning-tree.cpp | 7ebc627b6cc5c8bfd9e7eb486dc6fbe201ea59d7 | [] | no_license | rana11shubham/CPP | 40fd70348da723f04af6af3954fb698bacc75c99 | 015b22484710da13716c9f5d840f0ed6e7dcc9c9 | refs/heads/master | 2022-07-17T08:57:45.303297 | 2022-07-15T19:29:11 | 2022-07-15T19:29:11 | 163,268,964 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,618 | cpp | // { Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
//Function to find sum of weights of edges of the Minimum Spanning Tree.
int spanningTree(int V, vector<vector<int>> adj[])
{
vector<int>dist(V,INT_MAX);
dist[0]=0;
vector<int>MST(V,0);
priority_queue<pair<int,int>,vector<pair<int,int>>,greater<pair<int,int>>>pq;
pq.push({0,0});
while(!pq.empty()){
auto it=pq.top();
pq.pop();
int u=it.second;
MST[u]=1;
for(auto v:adj[u]){
int node=v[0];
int wt=v[1];
if(MST[node]==false and wt<dist[node]){
dist[node]=wt;
pq.push({wt,node});
//parent[node]=u;
}
}
}
// for(auto it:dist)
// cout<<it<<endl;
return accumulate(dist.begin(),dist.end(),0);
}
};
// { Driver Code Starts.
int main()
{
int t;
cin >> t;
while (t--) {
int V, E;
cin >> V >> E;
vector<vector<int>> adj[V];
int i=0;
while (i++<E) {
int u, v, w;
cin >> u >> v >> w;
vector<int> t1,t2;
t1.push_back(v);
t1.push_back(w);
adj[u].push_back(t1);
t2.push_back(u);
t2.push_back(w);
adj[v].push_back(t2);
}
Solution obj;
cout << obj.spanningTree(V, adj) << "\n";
}
return 0;
}
// } Driver Code Ends | [
"36005170+rana11shubham@users.noreply.github.com"
] | 36005170+rana11shubham@users.noreply.github.com |
a5950b5dc2da721d01130180b0a665d3d3e19ffc | 79715e048f2e9f03ca00ca1be2ba80ebc726a184 | /2colorable.cpp | 4a861e634fabb3b4d48877d38322a6242b4cd2b2 | [] | no_license | anuprasb6541/CS340 | 5c4c3a1350491b60d6f98a43a8c9566121f178d7 | bad2e80b6abe39a4a48999ccb430bf9f5349231c | refs/heads/master | 2022-11-30T18:47:11.376051 | 2020-08-17T21:13:45 | 2020-08-17T21:13:45 | 286,343,405 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,878 | cpp | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
void createedge(vector<int> near[], int u, int v)
{
near[u].push_back(v);
near[v].push_back(u);
}
bool isColorful(vector<int> near[], int v, vector<bool>& visited, vector<int>& color)
{
for (int u : near[v])
{
if (visited[u] == false)
{
visited[u] = true;
color[u] = !color[v];
if (!isColorful(near, u, visited, color))
{
return false;
}
}
else if (color[u] == color[v])
{
return false;
}
}
return true;
}
int main()
{
int nodes;
int first, second;
cout << "Enter the number of nodes you would like: ";
cin >> nodes;
vector<int> near[nodes + 1];
vector<bool> visited(nodes + 1);
vector<int> color(nodes + 1);
cout << "Rules for typing in edges: First edge must be '1 2', second edge '2 3' and so on, with the last edge being 'x 1'" << endl;
cout << "Now type in your edges (hit enter after typing in each set of digits):";
for (int i = 0; i < nodes; i++)
{
cin >> first >> second;
createedge(near, first, second);
}
visited[1] = true;
color[1] = 0;
if (isColorful(near, 1, visited, color))
{
cout << "Graph is 2-colorable";
}
else
{
cout << "Graph is not 2-colorable";
}
return 0;
}
| [
"noreply@github.com"
] | anuprasb6541.noreply@github.com |
40848a4e391a16c25560b00b64e38813a0dbc161 | 164933e94f91f41cc595a8d400bca2d6229ac77e | /main.cpp | 68f7a46799afa9f1122f02dac51b475254b2cae7 | [] | no_license | YanaShpot/Client | ef5a06146e4f57dfb6bf962428de648b03fe2ea4 | 08fd6b7b409f6e00e22b25bca077f14bca5274ed | refs/heads/master | 2021-01-25T06:56:37.422730 | 2017-06-07T13:10:29 | 2017-06-07T13:10:29 | 93,631,751 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,364 | cpp | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <fstream>
#include <iostream>
#define SIZE 3
using namespace std;
void error(const char *msg)
{
perror(msg);
exit(0);
}
void GetMessage(uint16_t len, int sockfd, char* message ) {
char buff [len];
strcpy(buff, message);
int n = write(sockfd,buff, len);
if (n < 0)
{
error("ERROR writing to socket");
}
bzero(buff, len);
n = read(sockfd, buff, len);
if (n < 0)
{
error("ERROR reading from socket");
}
printf("%s\n", buff);
}
void GetDateTime(int sockfd) {
char buff[11];
bzero(buff, 11);
int n = read(sockfd, buff, 11);
if (n < 0) {
error("ERROR reading from socket");
}
printf("%s\n", buff);
}
int main(int argc, char *argv[])
{
int sockfd, portno, n;
struct sockaddr_in serv_addr;
char buffer[SIZE]; //because the largest length, which can be decoded in 2 bytes of memory is 65536
// + 4 (for a flag, size and '\0')
setbuf(stdout, 0);
portno = 12347;
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0)
{
error("ERROR opening socket");
}
bzero((char *) &serv_addr, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
const char* ip = argv[1];
//const char* ip = "192.168.1.10";
if ( inet_aton(ip, &serv_addr.sin_addr) < 0)
{
error("Incorrect IP");
}
serv_addr.sin_port = htons(portno);
if (connect(sockfd,(struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0)
{
error("ERROR connecting");
}
bzero(buffer, SIZE);
std::string flag;
flag = argv[2];
buffer[0] = flag[0];
n = write(sockfd, buffer, 1);
if (n < 0)
{
error("ERROR writing to socket");
}
if (flag == "m")
{
char* message;
message = argv[3];
uint16_t len = strlen(message) + 1;
memcpy(buffer + 1, &len, sizeof(uint16_t));
n = write(sockfd,buffer + 1, 2);
if (n < 0)
{
error("ERROR writing to socket");
}
GetMessage(len, sockfd, message);
}
else
{
GetDateTime(sockfd);
}
close(sockfd);
return 0;
}
| [
"n.y.shpot@ucu.edu.ua"
] | n.y.shpot@ucu.edu.ua |
a72a2fe73717610af1159700dada3227b3a2c31f | 21fc17e66794f9f7081c431a16b56d3fb8d09283 | /gameplay.cpp | 9bfbaf76460a13fd4536f9749271b9f4beb91437 | [] | no_license | gfreenan755/C-courses | 1fd2b06be86e8473d4382c2dae03abdefe132491 | 698dea043ce6b7801dd965c55a705830ebccc346 | refs/heads/master | 2020-05-09T13:48:51.085846 | 2019-04-13T12:38:28 | 2019-04-13T12:38:28 | 181,168,643 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 55 | cpp | #include "gameplay.h"
Gameplay::Gameplay()
{
}
| [
"noreply@github.com"
] | gfreenan755.noreply@github.com |
45c4e678d0d12550350d99d2c049896ef3ad8530 | ed5669151a0ebe6bcc8c4b08fc6cde6481803d15 | /test/magma-1.7.0_timing/control/magma_winthread.cpp | 17d569b56bbe24608e8e83d639f8550b0691b4c1 | [] | no_license | JieyangChen7/DVFS-MAGMA | 1c36344bff29eeb0ce32736cadc921ff030225d4 | e7b83fe3a51ddf2cad0bed1d88a63f683b006f54 | refs/heads/master | 2021-09-26T09:11:28.772048 | 2018-05-27T01:45:43 | 2018-05-27T01:45:43 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 8,972 | cpp | /**
*
* magma_winthread.cpp
*
* This file handles the mapping from pthreads calls to windows threads.
* MAGMA is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.3.1
* @author Piotr Luszczek
* @date September 2015
*
* This file is originally from PLASMA project, where plasma has been
* replaced by MAGMA.
*
**/
#if defined( _WIN32 ) || defined( _WIN64 )
#include "magma_winthread.h"
#include <limits.h>
/** this is needed to get a declaration for _beginthreadex() */
#include <process.h>
#include <stdio.h>
#include <magma.h>
CRITICAL_SECTION magma_winthread_static_initializer_check_lock;
static int magma_winthread_initialized = 0;
extern "C"
MAGMA_DLLPORT unsigned int MAGMA_CDECL pthread_self_id(void)
{
return GetCurrentThreadId();
}
extern "C"
MAGMA_DLLPORT pthread_t MAGMA_CDECL pthread_self(void)
{
pthread_t pt;
pt.hThread = GetCurrentThread();
pt.uThId = GetCurrentThreadId();
return pt;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_equal(pthread_t thread1, pthread_t thread2)
{
if (thread1.uThId == thread2.uThId) // && thread1.hThread == thread2.hThread)
return 1;
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t * attr)
{
*mutex =
CreateMutex( NULL, /** no security atributes */
FALSE, /** not owned (initialy) by the creating thread */
NULL /** no name provided: cannot be shared between processes */
);
return 0;
}
static int pthread_mutex_check_for_static_initialization( pthread_mutex_t *mutex ) {
int retval = 0;
/* This should be called once to initialize some structures */
if ( magma_winthread_initialized == 0 ) {
magma_winthread_initialized = 1;
InitializeCriticalSection( &magma_winthread_static_initializer_check_lock );
}
EnterCriticalSection( &magma_winthread_static_initializer_check_lock );
if ( *mutex == PTHREAD_MUTEX_INITIALIZER )
retval = pthread_mutex_init( mutex, NULL );
LeaveCriticalSection( &magma_winthread_static_initializer_check_lock );
return retval;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_mutex_lock(pthread_mutex_t *mutex)
{
DWORD rv;
if ( *mutex == PTHREAD_MUTEX_INITIALIZER ) pthread_mutex_check_for_static_initialization( mutex );
rv = WaitForSingleObject( *mutex, INFINITE );
switch (rv) {
case WAIT_OBJECT_0: /** the wait was succesful */
return 0;
case WAIT_FAILED: /** the wait failed */
return -1;
case WAIT_ABANDONED: /** thread killed during the wait */
return -1;
case WAIT_TIMEOUT: /** impossible because of INFINITE */
return -1;
default:
return -1;
}
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_mutex_trylock(pthread_mutex_t *mutex)
{
DWORD rv;
if ( *mutex == PTHREAD_MUTEX_INITIALIZER ) pthread_mutex_check_for_static_initialization( mutex );
rv = WaitForSingleObject( *mutex, 0 );
switch (rv) {
case WAIT_OBJECT_0: /** the wait was succesful */
return 0;
case WAIT_FAILED: /** the wait failed */
return -1;
case WAIT_ABANDONED: /** thread killed during the wait */
return -1;
case WAIT_TIMEOUT: /** impossible because of INFINITE */
return -1;
default:
return -1;
}
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_mutex_unlock(pthread_mutex_t *mutex)
{
if (! ReleaseMutex( *mutex ))
return -1;
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_mutex_destroy(pthread_mutex_t *mutex)
{
CloseHandle( *mutex );
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_attr_init(pthread_attr_t *attr)
{
*attr = 1;
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_attr_destroy(pthread_attr_t *attr)
{
*attr = 0;
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_attr_setscope(pthread_attr_t *attr, int scope)
{
if (*attr != 1)
return -1;
if (scope != PTHREAD_SCOPE_SYSTEM)
return -1;
return 0;
}
void *(*MAGMA_realThStart)(void *);
/*
This function is only called to have a proxy that is compatible with WINAPI.
*/
unsigned WINAPI MAGMA_winThStart(void *arg) {
MAGMA_realThStart( arg );
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start) (void *), void *arg)
{
/* this assumes that the threads call the same function, always; it also assumes there
is no race condition while assigning a pointer and using it from within threads
(this assumption is fulfilled by creating the new thread in suspended state) */
MAGMA_realThStart = start;
thread->hThread = (HANDLE)_beginthreadex(
NULL, /* default security */
0, /* stack size: use the size of calling thread */
MAGMA_winThStart,
arg,
CREATE_SUSPENDED,
/*0,*/ /* the thread will run immedietally (rather than get suspended) */
&thread->uThId );
/* We need to make sure that _beginthreadex() returns to the parent thread first
so we can safely fill up the members of the pthread_t structure without possible
race conditions. If the new thread is created in supsended state we eliminate
the race condition but now we have to resume the new thread. */
ResumeThread( thread->hThread );
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_join(pthread_t thread, void **value_ptr)
{
WaitForSingleObject( thread.hThread, INFINITE );
CloseHandle( thread.hThread );
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
{
InitializeCriticalSection( &cond->cs );
cond->hSem = CreateSemaphore( NULL, /* no security attributes */
0, /* initial count */
LONG_MAX, /* maximum count*/
NULL ); /* unnamed semaphore */
cond->hEvt = CreateEvent( NULL, /* no security attributes */
FALSE, /* reset to not-singaled automatically */
FALSE, /* set initial status to not-signaled */
NULL ); /* unnamed event */
cond->waitCount = 0;
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_cond_destroy(pthread_cond_t *cond)
{
DeleteCriticalSection( &cond->cs );
CloseHandle( cond->hSem );
CloseHandle( cond->hEvt );
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
int last;
if ( *mutex == PTHREAD_MUTEX_INITIALIZER ) pthread_mutex_check_for_static_initialization( mutex );
/* Avoid race condition on waiting thread counter. */
EnterCriticalSection(&cond->cs);
cond->waitCount++;
LeaveCriticalSection(&cond->cs);
/* Releases _atomically_ the mutex and wait on the semaphore until
pthread_cond_signal() or pthread_cond_broadcast() are called (by another thread). */
SignalObjectAndWait(*mutex, cond->hSem, INFINITE, FALSE);
/* Avoid race condition on waiting thread counter. */
EnterCriticalSection(&cond->cs);
cond->waitCount--; /* this thread doesn't wait any more */
/* if this is the last thread to have waited */
last = cond->waitCount == 0;
LeaveCriticalSection(&cond->cs);
/* If this thread is the last waiter thread during this particular broadcast
then let all the other threads proceed. */
if (last)
/* This call ensures that two things happen atomically: signaling the hEvt event and
waiting until "mutex" can be acquired. */
SignalObjectAndWait(cond->hEvt, *mutex, INFINITE, FALSE);
else
WaitForSingleObject(*mutex, INFINITE); /* Upon return, this thread has to own "mutex". */
return 0;
}
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_cond_broadcast(pthread_cond_t *cond)
{
int more_waiters = 0;
/* This is needed to ensure exclusive access to "waitCount" */
EnterCriticalSection (&cond->cs);
if (cond->waitCount > 0) {
/* always are broadcasting - no need for pthread_cond_singal() case */
more_waiters = 1;
}
if (more_waiters) {
/* this will wake up all the waiters atomically at once. */
ReleaseSemaphore(cond->hSem, cond->waitCount, 0);
LeaveCriticalSection(&cond->cs);
/* Wait for all the awakened threads to acquire the counting semaphore. */
WaitForSingleObject(cond->hEvt, INFINITE);
} else
LeaveCriticalSection(&cond->cs);
return 0;
}
int pthread_conclevel;
extern "C"
MAGMA_DLLPORT int MAGMA_CDECL pthread_setconcurrency (int level)
{
pthread_conclevel = level;
return 0;
}
#endif /* defined( _WIN32 ) || defined( _WIN64 ) */
| [
"cjy7117@gmail.com"
] | cjy7117@gmail.com |
101f2c947d5a8cd2de99cf8dc87dce1be8d428cc | d4a41b8625a48e2870150b0494be830d5b5d8091 | /variadic_template.cpp | 613e4ed64dcfdfde79cca4ff300f03b20bd6ed64 | [] | no_license | coconutEgg/AdvancedCPP | 0eb25add6afd52078218b61ef193ee33b56120a6 | 85581b37967045beecea9b9c5f857808fa5af832 | refs/heads/master | 2020-12-29T11:07:57.524290 | 2020-02-12T03:10:51 | 2020-02-12T03:10:51 | 238,586,371 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 331 | cpp | #include <iostream>
void print()
{
}
//where to put ... is just the question of grammer
template<typename T, typename ... Types> // frist place of ...
void print(const T& firstArg, const Types&... args) //second place of ...
{
std::cout<<firstArg<<endl;
print(args...); //recursive calls itself; third place of ...
} | [
"he.zhu@utexas.edu"
] | he.zhu@utexas.edu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.