blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 247 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2 values | repo_name stringlengths 4 111 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 58 | visit_date timestamp[ns]date 2015-07-25 18:16:41 2023-09-06 10:45:08 | revision_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | committer_date timestamp[ns]date 1970-01-14 14:03:36 2023-09-06 06:22:19 | github_id int64 3.89k 689M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 25 values | gha_event_created_at timestamp[ns]date 2012-06-07 00:51:45 2023-09-14 21:58:52 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-08-24 19:49:39 ⌀ | gha_language stringclasses 159 values | src_encoding stringclasses 34 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 10.5M | extension stringclasses 111 values | filename stringlengths 1 195 | text stringlengths 7 10.5M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adeded975ff151c87f18bd528883a79069535a66 | c1209bd7b2d035097703f945fd84795c66ead643 | /inc/Parser.hpp | 7fdb5797bdc51cf9e88a5c0b22e176d8204143a3 | [] | no_license | MarryMilkman/anteniti_client_server | 0dced713b6c8d8ab10e27bd1506b0f182ee45deb | 5559c1a7bb595c5e15691a45093f05e877958826 | refs/heads/master | 2022-03-16T21:57:18.227010 | 2019-11-01T12:09:51 | 2019-11-01T12:09:51 | 204,306,317 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 639 | hpp | Parser.hpp | #ifndef PARSER
#define PARSER
#include "lib.h"
class Parser {
public:
Parser();
~Parser();
void pars_and_add_to_answer(std::string message);
std::string get_answer_for_cloud();
static std::vector<std::string> custom_split(std::string str, std::string delim);
static std::vector<std::string> pars_cloud_answer(std::string setting_str);
static std::vector<std::string> pars_answer_apply(std::string str_with_answer);
class Info {
public:
static std::map<std::string, std::string> pars_sysinfo(std::string std_sysinfo);
};
private:
std::vector<std::string> _list_str_info;
};
#endif
|
e52061846735f9dfe3adb912d0d55bd7e28872e1 | 7536f5d95e5094b20d360a3a6427acbb2c1cd368 | /cds/procadjust_cds.h | a14ecaf559edc98f96693beb45484f40594e5c8f | [] | no_license | ebadusb/Trima_12.4 | 6804354151afd5d70014ccea3ced73b054cd2eea | 8e3d59f14f30b1b5bd1c3696703c2a024c2e4c5f | refs/heads/master | 2022-11-12T19:30:35.576215 | 2019-08-19T19:16:23 | 2019-08-19T19:16:23 | 274,995,217 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,475 | h | procadjust_cds.h | #ifndef __PROCADJUST_CDS
#define __PROCADJUST_CDS
#include <vxworks.h> // Needed for CPU-based compiler directives in header
#include "adjust.h"
#include "datastore.h"
#include "run_defs.h"
#ifndef WIN32
#pragma interface
#endif
class ProcAdjustBar_CDS
: public MultWriteDataStore
{
public:
BaseElement<float> Maximum; // value top of the scale
BaseElement<float> Minimum; // value bottom of the scale
BaseElement<float> CurrentCap; // Position of the cap
BaseElement<float> CurrentValue; // actual present value
BaseElement<bool> Active; // 'true' if meter is active
public:
ProcAdjustBar_CDS(const char* name, Role role);
virtual ~ProcAdjustBar_CDS();
private:
ProcAdjustBar_CDS(); // Base constructor not available
};
class ProcAdjust_CDS
: public MultWriteDataStore
{
public:
BaseElement<BUTTON_VISIBILITY_STATUS> Spillover;
BaseElement<BUTTON_VISIBILITY_STATUS> AirBlock;
BaseElement<BUTTON_VISIBILITY_STATUS> SalineBolus;
ProcAdjustBar_CDS Draw;
ProcAdjustBar_CDS Return;
ProcAdjustBar_CDS Tingling;
ProcAdjustBar_CDS Clumping;
BaseElement<float> MaxQin;
public:
ProcAdjust_CDS(Role role);
virtual ~ProcAdjust_CDS();
private:
ProcAdjust_CDS(); // Base Constructor not available
};
#endif
/* FORMAT HASH 4db4613d03363ca1ff791516473874f0 */
|
f91b898ac437e105893c7fb9b5048743ddc21a29 | d44de257f5a4e4d7b733ed31179d0d28e62c352d | /CourseWorkUser/ChartForm.cpp | 9939c3304285b24c6303c06936004e8471931fb4 | [] | no_license | ErnestoFolting/CourseWorkUserInterface | ec79404bd56fe981f4d0b50e2a449eaddba90acf | ab9d2c1e1f08afd8dbaf43b81fa9b925e1679552 | refs/heads/main | 2023-05-08T10:32:24.087294 | 2021-06-03T12:56:13 | 2021-06-03T12:56:13 | 371,508,741 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,132 | cpp | ChartForm.cpp | #include "ChartForm.h"
#include "MenuForm.h"
#include "Root.h"
#include <string>
using namespace std;
System::Void CourseWorkUser::ChartForm::button1_Click(System::Object^ sender, System::EventArgs^ e)
{
MenuForm^ form = gcnew MenuForm();
this->Hide();
form->Show();
}
System::Void CourseWorkUser::ChartForm::printVectors(std::vector<double**> vec) {
dataGridView1->ColumnCount = vec.size();
dataGridView1->RowCount = vec.size();
dataGridView1->AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode::AutoSizeToAllHeaders);
dataGridView1->AutoResizeColumns();
for (int i = 0; i < vec.size(); i++) {
dataGridView1->Columns[i]->HeaderCell->Value = "X" + Convert::ToString(i + 1);
}
for (int i = 0; i < vec.size(); i++) {
for (int j = 0; j < vec.size(); j++) {
dataGridView1->Rows[i]->Cells[j]->Value = vec[j][i][0];
}
}
}
System::Void CourseWorkUser::ChartForm::printSelfNumbers(Root roots) {
string selfNumbers;
for (int i = 0; i < roots.getNum(); i++) {
string tempNumber = to_string(round(real(roots.getMas()[i]) * 1000) / 1000);
tempNumber = tempNumber.substr(0, tempNumber.length() - 3);
selfNumbers += "L" + to_string(i + 1) + ": " + tempNumber + " ";
}
String^ s = gcnew System::String(selfNumbers.c_str());
label5->Text = s;
}
System::Void CourseWorkUser::ChartForm::printStatistics(int iterations,int multiplies) {
string iterationsStr = to_string(iterations);
String^ s = gcnew System::String(iterationsStr.c_str());
label7->Text = s;
string multipliesStr = to_string(multiplies);
String^ s2 = gcnew System::String(multipliesStr.c_str());
label9->Text = s2;
}
System::Void CourseWorkUser::ChartForm::printChart(std::vector<double> vec,std::vector<double>areaOfRoots)
{
double min = areaOfRoots[0];
double max = areaOfRoots[0];
for (int i = 0; i < areaOfRoots.size(); i++) {
if (areaOfRoots[i] < min) min = areaOfRoots[i];
if (areaOfRoots[i] > max) max = areaOfRoots[i];
}
chart1->Series[0]->Points->Clear();
string function = + "y = x^" + to_string(vec.size()) + " ";
for (int i = 0; i < vec.size(); i++) {
if (i < vec.size() - 1 && -1 * vec[i + 1] > 0) {
string tempNum = to_string(round(-1 * vec[i]*1000)/1000);
tempNum = tempNum.substr(0, tempNum.size() - 3);
function += tempNum + "x^" + to_string(vec.size() - i - 1) + "+";
}
else {
string tempNum = to_string(round(-1 * vec[i] * 1000) / 1000);
tempNum = tempNum.substr(0, tempNum.size() - 3);
function += tempNum + "x^" + to_string(vec.size() - i - 1) + " ";
}
}
String^ s = gcnew System::String(function.c_str());
label2->Text = s;
for (int x = round(min)-1; x <= round(max)+1; x++) {
double sum = 0;
for (int i = 0; i < vec.size(); i++) {
sum += (-1)*(vec[i] * pow(x, vec.size() - i - 1));
}
sum += pow(x, vec.size());
double y = sum;
chart1->Series[0]->Points->AddXY(x, y);
}
}
|
68ecc60859a1c8af500c5651c8d3430bdca765ed | 7e5be101928eb7ea43bc1a335d3475536f8a5bb2 | /2015 Training/11.22/K.cpp | fff26f374cbefff3afa55803d660cc9c1d226e37 | [] | no_license | TaoSama/ICPC-Code-Library | f94d4df0786a8a1c175da02de0a3033f9bd103ec | ec80ec66a94a5ea1d560c54fe08be0ecfcfc025e | refs/heads/master | 2020-04-04T06:19:21.023777 | 2018-11-05T18:22:32 | 2018-11-05T18:22:32 | 54,618,194 | 0 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 2,377 | cpp | K.cpp | //
// Created by TaoSama on 2015-11-22
// Copyright (c) 2015 TaoSama. All rights reserved.
//
//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <set>
#include <vector>
using namespace std;
#define pr(x) cout << #x << " = " << x << " "
#define prln(x) cout << #x << " = " << x << endl
const int N = 2e3 + 10, INF = 0x3f3f3f3f, MOD = 10000007;
int n, m, u[N], v[N];
int b[N][N], dp[N][N];
void add(int &x, int y) {
x = x + y + MOD;
while(x >= MOD) x -= MOD;
}
void add(int x, int y, int v) {
for(int i = x; i <= n; i += i & -i)
for(int j = y; j <= m; j += j & -j)
add(b[i][j], v);
}
int sum(int x, int y) {
int ret = 0;
for(int i = x; i; i -= i & -i)
for(int j = y; j; j -= j & -j)
add(ret, b[i][j]);
return ret;
}
int cnt = 0;
map<string, int> mp;
int ID(string &s) {
if(mp.count(s)) return mp[s];
mp[s] = ++cnt;
return cnt;
}
void handle(int &n, string &s, int *u) {
n = 0; s += 'A';
string tmp;
for(int i = 0; i < s.size(); ++i) {
if(isalpha(s[i])) {
if(tmp.size()) {
u[++n] = ID(tmp);
tmp.clear();
}
}
tmp += s[i];
}
}
int two[2005] = {1};
string s, t;
int main() {
#ifdef LOCAL
freopen("C:\\Users\\TaoSama\\Desktop\\in.txt", "r", stdin);
// freopen("C:\\Users\\TaoSama\\Desktop\\out.txt","w",stdout);
#endif
ios_base::sync_with_stdio(0);
int T; cin >> T;
int kase = 0;
for(int i = 1; i <= 2000; ++i) two[i] = two[i - 1] * 2 % MOD;
while(T--) {
cin >> s >> t;
cnt = 0; mp.clear();
handle(n, s, u);
handle(m, t, v);
memset(dp, 0, sizeof dp);
memset(b, 0, sizeof b);
for(int i = 1; i <= n; ++i) {
for(int j = 1; j <= m; ++j) {
if(u[i] != v[j]) continue;
add(dp[i][j], sum(i, j - 1) + sum(i - 1, j)
- sum(i - 1, j - 1) + 2);
add(i, j, dp[i][j]);
}
}
int ans = ((two[n] + two[m] - 2 - sum(n, m)) % MOD + MOD) % MOD;
printf("Case %d: %d\n", ++kase, ans);
}
return 0;
}
|
60be0a948ad16fc69747cd6742d17717e23c4450 | 4fd13fae5c0c36357e34e0cbf0c4f0d389710255 | /Application.h | 8c898e249f6452605c31850a3ee47bcbe945c67f | [
"MIT"
] | permissive | jjzhang166/ModelViewer | c50affeceaef250d3fb9db651abca6e9bbf030e7 | 8b6277c2c8a9727d826414ec33f228bfbdb2635a | refs/heads/master | 2023-04-18T20:50:06.811282 | 2017-06-29T21:30:32 | 2017-06-29T21:30:32 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 964 | h | Application.h | #pragma once
#include <d3d11_1.h>
#include <cstdint>
#include <Windows.h>
class Application
{
public:
int32_t init();
int32_t run();
public:
LRESULT wnd_proc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
protected:
bool running;
HWND hWnd;
uint32_t bufferWidth;
uint32_t bufferHeight;
private:
int32_t create_window(uint32_t width, uint32_t height);
protected:
IDXGISwapChain1* swapChain;
ID3D11Device* device;
ID3D11DeviceContext* context;
ID3D11RenderTargetView* rtv;
ID3D11DepthStencilView* dsv;
private:
int32_t init_direct3d();
int32_t cleanup();
protected:
virtual void on_resize(uint32_t width, uint32_t height);
protected:
int64_t freq;
int64_t startTime;
int64_t prevTime;
float deltaTime;
float totalTime;
private:
void init_timer();
void on_tick();
protected:
virtual int32_t init_assets() = 0;
virtual void cleanup_assets() = 0;
virtual void update() = 0;
virtual void render() = 0;
}; |
4805e5cedc8d166f49a9451b7c2f21dbfbcba098 | 6f7c4dd5942bf8406d31a2467c97712eb2702669 | /mapeditdialog.cpp | 7a5b5ec5c29129acccca0ca3e21173c86c4831fc | [] | no_license | shimizunochikara/RoombaController | e42c98e00f34503811428a5597d90ee2e0e22aa5 | 6589e6ec3aeca6fa84e33e89d1540a346eb1c943 | refs/heads/master | 2021-01-12T06:06:08.967019 | 2017-02-05T06:46:34 | 2017-02-05T06:46:34 | 77,300,109 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 13,575 | cpp | mapeditdialog.cpp | #include "mapeditdialog.h"
#include "ui_mapeditdialog.h"
#include <QDomDocument>
#include <QFile>
#include <QTextStream>
#include <QtCore>
#include <QDomNodeList>
#include <QTimer>
#include <QColor>
MapEditDialog::MapEditDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::MapEditDialog)
{
roombaPointRow = 0;
roombaPointCol = 0;
roombaDirection = 0;
ui->setupUi(this);
// connect apply map size button
connect(ui->pushButton_applySize, SIGNAL(pressed()), this, SLOT(applyMapSize()));
//connect save button
connect(ui->pushButton_mapSave, SIGNAL(pressed()), this, SLOT(saveXml()));
//connect load button
connect(ui->pushButton_mapLoad, SIGNAL(pressed()), this, SLOT(loadXmx()));
//connect addObjectButton
connect(ui->pushButton_addItem, SIGNAL(pressed()), this, SLOT(addObject()));
//connect all clear button
connect(ui->pushButton_deleteAllItem, SIGNAL(pressed()), this, SLOT(clearAllObjects()));
// connect clear button
connect(ui->pushButton_deleteItem, SIGNAL(pressed()), this, SLOT(pressedDeleteButton()));
//connect cursor button
connect(ui->pushButton_cursor_forward, SIGNAL(pressed()), this, SLOT(pressedUpButton()));
connect(ui->pushButton_cursor_behind, SIGNAL(pressed()), this, SLOT(pressedDownButton()));
connect(ui->pushButton_left, SIGNAL(pressed()), this, SLOT(pressedLeftButton()));
connect(ui->pushButton_right, SIGNAL(pressed()), this, SLOT(pressedRightButton()));
connect(ui->tableWidget_EditMap, SIGNAL(itemSelectionChanged()), this, SLOT(selectedCellChanged()));
connect(ui->comboBox_SelectItem, SIGNAL(currentIndexChanged(const QString &)), this, SLOT(slotSelectedObjectChanged(const QString &)));
// initialize map data
for(int i = 0; i < maxRowCount; i++)
{
for(int j = 0; j < maxColCount; j++)
{
mapData[i][j] = 0x00;
}
}
//initialize table widget item
for(int i = 0; i < maxRowCount; i++)
{
for(int j = 0; j < maxColCount; j++)
{
tableItem[i][j] = new QTableWidgetItem();
ui->tableWidget_EditMap->setItem(i,j, tableItem[i][j]);
}
}
xmlFileName = "mapdata.xml";
ui->label_FileName->setText("FileName: " + xmlFileName);
loadXmx();
}
MapEditDialog::~MapEditDialog()
{
disconnect(ui->pushButton_applySize, SIGNAL(pressed()), this, SLOT(applyMapSize()));
disconnect(ui->tableWidget_EditMap, SIGNAL(itemSelectionChanged()), this, SLOT(selectedCellChanged()));
delete ui;
}
void MapEditDialog::applyMapSize()
{
//ui->tableWidget_EditMap->clearContents();
rowCount = ui->spinBox_Horizontal->value();
colCount = ui->spinBox_Vertical->value();
ui->tableWidget_EditMap->setRowCount(rowCount);
ui->tableWidget_EditMap->setColumnCount(colCount);
updateMap();
}
void MapEditDialog::selectedCellChanged()
{
updateObjectComboBox();
}
void MapEditDialog::saveXml()
{
QDomDocument doc;
QDomElement newroot = doc.createElement("MapData");
doc.appendChild(newroot);
//create new element
QDomElement versionElement = doc.createElement(dataVersionTagName);
QDomElement rowCountElement = doc.createElement(rowCountTagName);
QDomElement colCountElement = doc.createElement(colCountTagName);
// Roomba Info object
QDomElement roombaInfoElement = doc.createElement(roombaInfoTagName);
QDomElement roombaXPositionElement = doc.createElement(roombaXPositionTagName);
QDomElement roombaYPositionElement = doc.createElement(roombaYPositionTagName);
QDomElement roombaDerectionElement = doc.createElement(roombaDerectionTagName);
//assemble node
roombaInfoElement.appendChild(roombaXPositionElement);
roombaInfoElement.appendChild(roombaYPositionElement);
roombaInfoElement.appendChild(roombaDerectionElement);
// Map Array object
QDomElement objectArrayElement = doc.createElement(objectArrayTagName);
// create text
QDomText domTextVersion = doc.createTextNode("1.0");
QDomText domTextRowCount = doc.createTextNode(QString::number(rowCount));
QDomText domTextColCount = doc.createTextNode(QString::number(colCount));
//prepare roomba Position parameters
double tmpRoombaX;
double tmpRoombaY;
double tmpRoombaDir;
MapObject::convertToPositionFromMapCell(roombaPointRow, roombaPointCol, tmpRoombaX, tmpRoombaY);
MapObject::convertToDirectionFromMapDirection(roombaDirection, tmpRoombaDir);
QDomText domTextroombaXPosition = doc.createTextNode(QString::number(tmpRoombaX));
QDomText domTexroombaYPosition = doc.createTextNode(QString::number(tmpRoombaY));
QDomText domTextroombaDerection = doc.createTextNode(QString::number(tmpRoombaDir));
QString strArrayData = "";
for(int i = 0; i < rowCount; i++)
{
for(int j = 0; j < colCount; j++)
{
strArrayData += mapData[i][j];
}
}
QDomText domTextArrayData = doc.createTextNode(strArrayData);
//set text to dom object
versionElement.appendChild(domTextVersion);
rowCountElement.appendChild(domTextRowCount);
colCountElement.appendChild(domTextColCount);
roombaXPositionElement.appendChild(domTextroombaXPosition);
roombaYPositionElement.appendChild(domTexroombaYPosition);
roombaDerectionElement.appendChild(domTextroombaDerection);
objectArrayElement.appendChild(domTextArrayData);
//set object to root
newroot.appendChild(versionElement);
newroot.appendChild(rowCountElement);
newroot.appendChild(colCountElement);
newroot.appendChild(roombaInfoElement);
newroot.appendChild(objectArrayElement);
// save to file
QFile file(xmlFileName);//保存するファイルを設定
if(!file.open(QIODevice::WriteOnly))
{
qDebug("File cannot open!!");
return;
}
QTextStream out(&file);
doc.save(out,4);// 4 is indent count maybe…
file.close();
}
void MapEditDialog::loadXmx()
{
QDomDocument doc;
QFile file(xmlFileName);
if (!file.open(QIODevice::ReadOnly))
return;
if (!doc.setContent(&file)) {
file.close();
return;
}
file.close();
QString xmlFileVersion = doc.elementsByTagName(dataVersionTagName).at(0).toElement().text();
QString rowCountStr = doc.elementsByTagName(rowCountTagName).at(0).toElement().text();
QString colCountStr = doc.elementsByTagName(colCountTagName).at(0).toElement().text();
QString objectArrayAtr = doc.elementsByTagName(objectArrayTagName).at(0).toElement().text();
//get Roomba Position
QString roombaXPosStr = doc.elementsByTagName(roombaXPositionTagName).at(0).toElement().text();
QString roombaYPosStr = doc.elementsByTagName(roombaYPositionTagName).at(0).toElement().text();
QString roombaDirStr = doc.elementsByTagName(roombaDerectionTagName).at(0).toElement().text();
double tmpRoombaX = roombaXPosStr.toDouble();
double tmpRoombaY = roombaYPosStr.toDouble();
double tmpRoombaDir = roombaDirStr.toDouble();
rowCount = rowCountStr.toInt();
colCount = colCountStr.toInt();
MapObject::convertToMapCellFromPosition(tmpRoombaX, tmpRoombaY ,roombaPointRow, roombaPointCol);
MapObject::convertToMapDirectionFromDirection(tmpRoombaDir, roombaDirection);
ui->spinBox_Vertical->setValue(rowCount);
ui->spinBox_Horizontal->setValue(colCount);
ui->tableWidget_EditMap->setRowCount(rowCount);
ui->tableWidget_EditMap->setColumnCount(colCount);
for(int i = 0; i < rowCount; i++)
{
for(int j = 0; j < colCount; j++)
{
const QChar ch = objectArrayAtr.at(i * colCount + j);
mapData[i][j] = ch.toLatin1();
}
}
updateMap();
}
void MapEditDialog::updateMap()
{
//process roomba object
QString roombaMark = "R";
if(roombaDirection == MapObject::forward)
{
roombaMark = roombaFowardLogo;
}
else if(roombaDirection == MapObject::left)
{
roombaMark = roombaLeftLogo;
}
else if(roombaDirection == MapObject::right)
{
roombaMark = roombaRightLogo;
}
else if(roombaDirection == MapObject::behind)
{
roombaMark = roombaBehindLogo;
}
// process all cell
for(int i = 0; i < rowCount; i++)
{
for(int j = 0; j < colCount; j++)
{
bool isRoomba = (i == roombaPointRow) && (j == roombaPointCol);
bool isObstacle = 0x01 & (mapData[i][j] & MapObject::TranversabilityMask) >> MapObject::TranversabilityShift;
if(isObstacle)
{
tableItem[i][j]->setBackgroundColor(Qt::blue);
tableItem[i][j]->setText("");
}
else if(isRoomba)
{
tableItem[i][j]->setBackgroundColor(Qt::yellow);
tableItem[i][j]->setText(roombaMark);
}
else
{
tableItem[i][j]->setBackgroundColor(Qt::white);
tableItem[i][j]->setText("");
}
ui->tableWidget_EditMap->setItem(i,j, tableItem[i][j]->clone());
}
}
}
void MapEditDialog::updateObjectComboBox()
{
//QList<QTableWidgetItem *> selectedItemList = ui->tableWidget_EditMap->selectedItems();
QList<QTableWidgetSelectionRange> range = ui->tableWidget_EditMap->selectedRanges();
if(range.count() == 0)
{
return;
}
int tmpRowCount = range.at(0).columnCount() * range.at(0).rowCount();
if(tmpRowCount == 0)
{
ui->comboBox_SelectItem->clear();
}
else if(tmpRowCount == 1)
{
ui->comboBox_SelectItem->clear();
ui->comboBox_SelectItem->addItem(roombaLabelText);
ui->comboBox_SelectItem->addItem(obstaclerLabelText);
ui->comboBox_SelectItem->addItem(vacantLabelText);
}
else if(tmpRowCount > 1)
{
ui->comboBox_SelectItem->clear();
ui->comboBox_SelectItem->addItem(obstaclerLabelText);
ui->comboBox_SelectItem->addItem(vacantLabelText);
}
updateButton();
}
void MapEditDialog::slotSelectedObjectChanged(const QString &)
{
updateButton();
}
void MapEditDialog::updateButton()
{
bool isCursorButtonEnable = false;
if(ui->comboBox_SelectItem->currentText() == roombaLabelText)
{
isCursorButtonEnable = true;
}
ui->pushButton_cursor_forward->setEnabled(isCursorButtonEnable);
ui->pushButton_cursor_behind->setEnabled(isCursorButtonEnable);
ui->pushButton_left->setEnabled(isCursorButtonEnable);
ui->pushButton_right->setEnabled(isCursorButtonEnable);
ui->pushButton_addItem->setEnabled(!isCursorButtonEnable);
if(isCursorButtonEnable)
{
ui->label_cursor_notation->setText("add object to touch above cursor button");
}
else
{
ui->label_cursor_notation->setText("");
}
}
void MapEditDialog::addObject()
{
QList<QTableWidgetSelectionRange> rangeList = ui->tableWidget_EditMap->selectedRanges();
QTableWidgetSelectionRange rangeElem = rangeList.at(0);
int tmpRowCount = rangeElem.columnCount() * rangeElem.rowCount();
if(ui->comboBox_SelectItem->currentText() == roombaLabelText)
{
roombaDirection = selectedDirection;
roombaPointRow = rangeElem.topRow();
roombaPointCol = rangeElem.leftColumn();
}
else if(ui->comboBox_SelectItem->currentText() == obstaclerLabelText)
{
for(int i = rangeElem.topRow(); i <= rangeElem.bottomRow(); i++)
{
for(int j = rangeElem.leftColumn(); j <= rangeElem.rightColumn(); j++)
{
mapData[i][j] |= 0x01 << MapObject::TranversabilityShift;
}
}
}
else if(ui->comboBox_SelectItem->currentText() == vacantLabelText)
{
for(int i = rangeElem.topRow(); i <= rangeElem.bottomRow(); i++)
{
for(int j = rangeElem.leftColumn(); j <= rangeElem.rightColumn(); j++)
{
mapData[i][j] = 0x00;
}
}
}
updateMap();
}
void MapEditDialog::clearAllObjects()
{
//initialize table widget item
for(int i = 0; i < maxRowCount; i++)
{
for(int j = 0; j < maxColCount; j++)
{
mapData[i][j] = 0;
}
}
ui->tableWidget_EditMap->clearContents();
}
void MapEditDialog::pressedUpButton()
{
selectedDirection = MapObject::forward;
addObject();
}
void MapEditDialog::pressedDownButton()
{
selectedDirection = MapObject::behind;
addObject();
}
void MapEditDialog::pressedLeftButton()
{
selectedDirection = MapObject::left;
addObject();
}
void MapEditDialog::pressedRightButton()
{
selectedDirection = MapObject::right;
addObject();
}
void MapEditDialog::pressedDeleteButton()
{
QList<QTableWidgetSelectionRange> rangeList = ui->tableWidget_EditMap->selectedRanges();
QTableWidgetSelectionRange rangeElem = rangeList.at(0);
for(int i = rangeElem.topRow(); i <= rangeElem.bottomRow(); i++)
{
for(int j = rangeElem.leftColumn(); j <= rangeElem.rightColumn(); j++)
{
mapData[i][j] = 0x00;
}
}
updateMap();
}
|
b545ffd79722fdbb9a579743557bf966a1e113b0 | 32440b53eb897b377a44b7838719b6a66f2283ef | /src/mobius/PhysActor.hpp | a3d6fcf5b1f234d5c3af28a180e0103604121ddb | [
"Zlib",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | madeso/lolball | 7f904900be5acb55ee37fca342ecb4cfe3dcd342 | 18d831efa9978a07808fcfa51a7cda4925e1ac14 | refs/heads/master | 2020-06-05T12:23:00.462002 | 2014-09-24T06:00:50 | 2014-09-24T06:00:50 | 24,402,678 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 963 | hpp | PhysActor.hpp | #ifndef PHYS_ACTOR_HPP
#define PHYS_ACTOR_HPP
#include <string>
#include "ode/ode.h"
#include "Actor.hpp"
class PhysActor : public Actor {
public:
PhysActor(const std::string& pName, const vec3& pPosition, const Quaternion& pRotation, dWorldID pWorld, dSpaceID pSpace, bool pDoRotation, bool pAutoDisable);
virtual void teleport(const vec3& pNewPosition, const Quaternion& pNewOrientation);
virtual void move(const vec3& pNewPosition);
virtual void moveTo(const vec3& pNewPosition);
virtual void update(float pTime);
vec3 getSpeed() const;
void addImpulse(const vec3& pImpulse, real pTime);
void buildSphere(float pRadius, float pDensity);
void buildBox(float pSizeX, float pSizeY, float pSizeZ, float pDensity);
bool collision(const vec3& pDirection);
real distanceToWorld(const vec3& pDirection);
void freeze();
void unfreeze();
private:
dWorldID mWorld;
dSpaceID mSpace;
dBodyID mBody;
dGeomID mGeom;
const bool mDoRotation;
};
#endif |
d59e9814569a36da8f4729d2f30b52f677a219c6 | e126f1b2300937ff0636426d0e2b0ce3e4b6ac14 | /PDFReduce/Base/SmartRef.h | 74aa5946ba8d3cd8979f608f10f6061829e38ffb | [] | no_license | symanli/PDFReduce | f01fcef936e816a44fa027ec87cb9aefaf18a49a | c619a8c78929d90669e297d3dca49fd2f676f28e | refs/heads/master | 2022-01-14T06:50:18.473596 | 2018-05-24T02:24:30 | 2018-05-24T02:24:30 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 781 | h | SmartRef.h | //
// 描述:智能指针基类
// 注意:构造函数必须初始化m_ulRef为1
//
#ifndef __SMART_REF_H__
#define __SMART_REF_H__
class ISmartRef
{
public:
virtual unsigned long AddRef() = 0;
virtual unsigned long Release() = 0;
protected:
virtual ~ISmartRef() {}
};
#define IMPLEMENT_REFCOUNT(ClassName) \
public: \
unsigned long AddRef() { \
return ++m_ulRef; \
} \
unsigned long Release() { \
if (0 == --m_ulRef){ \
delete this; \
return 0; \
} \
return m_ulRef; \
} \
private: \
unsigned long m_ulRef {1};
#endif |
806bec54c45ad13905ab81e38996fe529f49d5b8 | 1bf8b46afad5402fe6fa74293b464e1ca5ee5fd7 | /SDK/BP_OD_Take2_classes.h | 2e61e30d54b2ee86deb784369db572c32c74452c | [] | no_license | LemonHaze420/ShenmueIIISDK | a4857eebefc7e66dba9f667efa43301c5efcdb62 | 47a433b5e94f171bbf5256e3ff4471dcec2c7d7e | refs/heads/master | 2021-06-30T17:33:06.034662 | 2021-01-19T20:33:33 | 2021-01-19T20:33:33 | 214,824,713 | 4 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,656 | h | BP_OD_Take2_classes.h | #pragma once
// Name: Shenmue3SDK, Version: 1.4.1
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
namespace SDK
{
//---------------------------------------------------------------------------
// Classes
//---------------------------------------------------------------------------
// BlueprintGeneratedClass BP_OD_Take2.BP_OD_Take2_C
// 0x0024 (0x0865 - 0x0841)
class ABP_OD_Take2_C : public ABP_Otoshidama_Base_C
{
public:
unsigned char UnknownData00[0x7]; // 0x0841(0x0007) MISSED OFFSET
struct FPointerToUberGraphFrame UberGraphFrame; // 0x0848(0x0008) (Transient, DuplicateTransient)
class UBPC_MiniGameGamble_C* BPC_MiniGameGamble; // 0x0850(0x0008) (BlueprintVisible, ZeroConstructor, InstancedReference, IsPlainOldData)
int clear_hit_num; // 0x0858(0x0004) (Edit, BlueprintVisible, ZeroConstructor, IsPlainOldData)
int EVENT_TALK_SUCCESS; // 0x085C(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData)
int EVENT_TALK_FAILURE; // 0x0860(0x0004) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData)
bool bGameSuccess; // 0x0864(0x0001) (Edit, BlueprintVisible, ZeroConstructor, DisableEditOnInstance, IsPlainOldData)
static UClass* StaticClass()
{
static auto ptr = UObject::FindClass("BlueprintGeneratedClass BP_OD_Take2.BP_OD_Take2_C");
return ptr;
}
class ABP_MiniGameInputBase_C* SpawnInputControlActor();
int GetRewardMoney();
void UserConstructionScript();
void BndEvt__BPC_MiniGameContinueConfirm_K2Node_ComponentBoundEvent_0_OnGameContinueDispatcher__DelegateSignature();
void BndEvt__BPC_MiniGameContinueConfirm_K2Node_ComponentBoundEvent_1_OnGameFinishedDispatcher__DelegateSignature();
void ResumeMiniGame(const struct FString& ResumeKeyword);
void OnTalkScriptEvent(int EventNumber);
void ReceiveTick(float DeltaSeconds);
void ReceiveBeginPlay();
void RestartMiniGame();
void EndMiniGame();
void HitCheck();
void Otoshidama_End(bool is_success);
void Finalize_Check();
void StartMiniGame();
void ExecuteUbergraph_BP_OD_Take2(int EntryPoint);
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
9bd7559ea8adbc85cb69afa991abab73778189ac | be4ed634abaab9032ad7a85802c3a62a4d5de050 | /FMU/Source/Model_Appliance_Large_Usage.cpp | 064dfe9ba6b9b854d983b987457b50ae73466646 | [
"MIT"
] | permissive | jacoblchapman/No-MASS | 380b08e56214ea08c885fe7a65d1f35a11bf1181 | 843ccaa461923e227a8e854daaa6952d14cb8bed | refs/heads/Master | 2021-03-27T11:47:05.283200 | 2020-08-28T18:11:39 | 2020-08-28T18:11:39 | 38,058,134 | 0 | 2 | MIT | 2020-08-28T18:11:40 | 2015-06-25T15:37:00 | Jupyter Notebook | UTF-8 | C++ | false | false | 4,291 | cpp | Model_Appliance_Large_Usage.cpp | // Copyright 2015 Jacob Chapman
#include <cstring>
#include <string>
#include <vector>
#include "Utility.hpp"
#include "Configuration.hpp"
#include "Model_Appliance_Large_Usage.hpp"
Model_Appliance_Large_Usage::Model_Appliance_Large_Usage() {
state = Utility::randomInt(0.0, 1.0);
}
void Model_Appliance_Large_Usage::setCountry(const std::string & country) {
this->country = country;
}
void Model_Appliance_Large_Usage::setID(const int id) {
this->id = id;
}
std::string Model_Appliance_Large_Usage::getCountry() {
return country;
}
double Model_Appliance_Large_Usage::probOn(int timestep) const {
double prob = 0.0;
int leninsec = Configuration::lengthOfTimestep();
int second = timestep * leninsec;
int stop = second + leninsec;
while (second < stop) {
int minuteOfDay = (second / 60) % 1440;
prob += onProbabilities[minuteOfDay];
second = second + 60;
}
return prob;
}
double Model_Appliance_Large_Usage::consumption(const int timeStep) {
double result = 0.0;
int leninsec = Configuration::lengthOfTimestep();
int now = timeStep * leninsec;
int end = now + leninsec;
while (now < end) {
result += getPower();
now += 60;
}
return result;
}
double Model_Appliance_Large_Usage::getPower() {
return getMeanFraction() * maxPower;
}
double Model_Appliance_Large_Usage::getMeanFraction() {
state = Utility::cumulativeProbability(transitions[state]);
return meanF[state];
}
bool Model_Appliance_Large_Usage::isOn() const {
return on;
}
bool Model_Appliance_Large_Usage::onAt(const int timeStep) {
double probability = probOn(timeStep);
double random = Utility::randomDouble(0.0, 1.0);
on = random < probability;
return on;
}
template <typename T>
std::vector<T> Model_Appliance_Large_Usage::as_vector(
rapidxml::xml_node<> *node) {
std::vector<T> r;
std::string value = node->value();
std::vector<std::string> tokens;
Utility::splitCSV(node->value(), &tokens);
for (std::string& item : tokens) {
r.push_back(std::stod(item));
}
return r;
}
template <typename T>
std::vector<std::vector<T>> Model_Appliance_Large_Usage::as_vector_vector(
rapidxml::xml_node<> *node) {
std::vector<std::vector<T>> r;
rapidxml::xml_node<> *cnode = node->first_node();
while (cnode) {
r.push_back(as_vector<T>(cnode));
cnode = cnode->next_sibling();
}
return r;
}
void Model_Appliance_Large_Usage::parseConfiguration(
const std::string &filename) {
namespace rx = rapidxml;
rx::file<> xmlFile(filename.c_str()); // Default template is char
rx::xml_document<> doc;
doc.parse<0>(xmlFile.data()); // 0 means default parse flags
rx::xml_node<> *root_node = doc.first_node("Appliances");
rx::xml_node<> *node = root_node->first_node("Appliance");
while (node) {
rx::xml_node<> *cnode = node->first_node();
bool found = false;
while (cnode) {
if (std::strcmp(cnode->name(), "id") == 0) {
if (id == std::stoi(cnode->value())) {
found = true;
}
}
cnode = cnode->next_sibling();
}
if (found) {
cnode = node->first_node();
while (cnode) {
if (std::strcmp(cnode->name(), "country") == 0) {
country = cnode->value();
} else if (std::strcmp(cnode->name(), "name") == 0) {
name = cnode->value();
} else if (std::strcmp(cnode->name(), "maxPower") == 0) {
maxPower = std::stod(cnode->value());
} else if (std::strcmp(cnode->name(), "meanF") == 0) {
meanF = as_vector<double>(cnode);
} else if (std::strcmp(cnode->name(), "transitions") == 0) {
transitions = as_vector_vector<double>(cnode);
} else if (std::strcmp(cnode->name(), "on") == 0) {
onProbabilities10 = as_vector<double>(cnode);
} else {
parseShapeScale(cnode);
}
cnode = cnode->next_sibling();
}
break;
}
node = node->next_sibling();
}
for(double onP : onProbabilities10){
for (int i = 0; i < 10; i++){
onProbabilities.push_back(onP / 10.0);
}
}
}
void Model_Appliance_Large_Usage::parseShapeScale(rapidxml::xml_node<> *node) {
node->value();
}
|
d934eadd22796bb2f436c72e98bcad988cf9c962 | 9de69910925e3a018abe4ca4d1554a8595bef9f2 | /empery_center/src/map_utilities_center.cpp | 4a287407b6f3400d268b935d5274d9b08b7cd6bc | [] | no_license | kspine/solution_pk | cbfec7d9f790d767788bfc1bfba670083aaaef72 | 3ae0f985f83cb6285fb01b7a90a488cbdf5ef7b8 | refs/heads/master | 2021-01-22T05:19:55.114481 | 2017-02-10T11:41:08 | 2017-02-10T11:41:08 | 81,637,282 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 26,062 | cpp | map_utilities_center.cpp | #include "precompiled.hpp"
#include "map_utilities_center.hpp"
#include "map_utilities.hpp"
#include "cbpp_response.hpp"
#include "data/global.hpp"
#include "data/map.hpp"
#include "map_cell.hpp"
#include "map_object.hpp"
#include "strategic_resource.hpp"
#include "singletons/world_map.hpp"
#include "msg/err_map.hpp"
#include "msg/err_castle.hpp"
#include "msg/sc_map.hpp"
#include "map_object_type_ids.hpp"
#include "resource_crate.hpp"
#include <poseidon/json.hpp>
#include <poseidon/async_job.hpp>
#include "castle.hpp"
#include "item_box.hpp"
#include "singletons/item_box_map.hpp"
#include "transaction_element.hpp"
#include "mail_box.hpp"
#include "singletons/mail_box_map.hpp"
#include "mail_data.hpp"
#include "chat_message_type_ids.hpp"
#include "chat_message_slot_ids.hpp"
#include "map_object_type_ids.hpp"
#include "item_ids.hpp"
#include "reason_ids.hpp"
#include "data/map_object_type.hpp"
#include "attribute_ids.hpp"
#include "buff_ids.hpp"
#include "player_session.hpp"
#include "singletons/account_map.hpp"
namespace EmperyCenter {
std::pair<long, std::string> can_place_defense_building_at(Coord coord){
PROFILE_ME;
// 检测阻挡。
const auto map_cell = WorldMap::get_map_cell(coord);
if(map_cell){
const auto cell_owner_uuid = map_cell->get_owner_uuid();
if(cell_owner_uuid){
LOG_EMPERY_CENTER_TRACE("Blocked by a cell owned by another player's territory: cell_owner_uuid = ", cell_owner_uuid);
return CbppResponse(Msg::ERR_BLOCKED_BY_OTHER_TERRITORY) <<cell_owner_uuid;
}
}
const auto cluster_scope = WorldMap::get_cluster_scope(coord);
const auto map_x = static_cast<unsigned>(coord.x() - cluster_scope.left());
const auto map_y = static_cast<unsigned>(coord.y() - cluster_scope.bottom());
const auto cell_data = Data::MapCellBasic::require(map_x, map_y);
const auto terrain_id = cell_data->terrain_id;
const auto terrain_data = Data::MapTerrain::require(terrain_id);
if(!terrain_data->passable){
LOG_EMPERY_CENTER_TRACE("Blocked by terrain: terrain_id = ", terrain_id);
return CbppResponse(Msg::ERR_BLOCKED_BY_IMPASSABLE_MAP_CELL) <<terrain_id;
}
const unsigned border_thickness = Data::Global::as_unsigned(Data::Global::SLOT_MAP_BORDER_THICKNESS);
if((map_x < border_thickness) || (map_x >= cluster_scope.width() - border_thickness) ||
(map_y < border_thickness) || (map_y >= cluster_scope.height() - border_thickness))
{
LOG_EMPERY_CENTER_TRACE("Blocked by map border: coord = ", coord);
return CbppResponse(Msg::ERR_BLOCKED_BY_IMPASSABLE_MAP_CELL) <<coord;
}
std::vector<boost::shared_ptr<MapObject>> adjacent_objects;
WorldMap::get_map_objects_by_rectangle(adjacent_objects,
Rectangle(Coord(coord.x() - 3, coord.y() - 3), Coord(coord.x() + 4, coord.y() + 4)));
std::vector<Coord> foundation;
for(auto it = adjacent_objects.begin(); it != adjacent_objects.end(); ++it){
const auto &other_object = *it;
const auto other_map_object_uuid = other_object->get_map_object_uuid();
const auto other_coord = other_object->get_coord();
if(coord == other_coord){
LOG_EMPERY_CENTER_TRACE("Blocked by another map object: other_map_object_uuid = ", other_map_object_uuid);
return CbppResponse(Msg::ERR_BLOCKED_BY_TROOPS) <<other_map_object_uuid;
}
const auto other_object_type_id = other_object->get_map_object_type_id();
if(other_object_type_id == MapObjectTypeIds::ID_CASTLE){
foundation.clear();
get_castle_foundation(foundation, other_coord, false);
for(auto fit = foundation.begin(); fit != foundation.end(); ++fit){
if(coord == *fit){
LOG_EMPERY_CENTER_TRACE("Blocked by castle: other_map_object_uuid = ", other_map_object_uuid);
return CbppResponse(Msg::ERR_BLOCKED_BY_CASTLE) <<other_map_object_uuid;
}
}
}
}
std::vector<boost::shared_ptr<ResourceCrate>> resource_crates;
WorldMap::get_resource_crates_by_rectangle(resource_crates, Rectangle(coord, 1, 1));
for(auto it = resource_crates.begin(); it != resource_crates.end(); ++it){
const auto &resource_crate = *it;
if(!resource_crate->is_virtually_removed()){
return CbppResponse(Msg::ERR_CANNOT_PLACE_DEFENSE_ON_CRATES) <<resource_crate->get_resource_crate_uuid();
}
}
return CbppResponse();
}
std::pair<long, std::string> can_deploy_castle_at(Coord coord, MapObjectUuid excluding_map_object_uuid, bool force_placing){
PROFILE_ME;
using Response = CbppResponse;
std::vector<boost::shared_ptr<MapCell>> map_cells;
std::vector<boost::shared_ptr<MapObject>> map_objects;
std::vector<boost::shared_ptr<StrategicResource>> strategic_resources;
std::vector<boost::shared_ptr<ResourceCrate>> resource_crates;
std::vector<Coord> foundation;
get_castle_foundation(foundation, coord, true);
for(auto it = foundation.begin(); it != foundation.end(); ++it){
const auto &foundation_coord = *it;
const auto cluster_scope = WorldMap::get_cluster_scope(foundation_coord);
const auto map_x = static_cast<unsigned>(foundation_coord.x() - cluster_scope.left());
const auto map_y = static_cast<unsigned>(foundation_coord.y() - cluster_scope.bottom());
LOG_EMPERY_CENTER_DEBUG("Castle foundation: foundation_coord = ", foundation_coord, ", cluster_scope = ", cluster_scope,
", map_x = ", map_x, ", map_y = ", map_y);
const auto basic_data = Data::MapCellBasic::require(map_x, map_y);
const auto terrain_data = Data::MapTerrain::require(basic_data->terrain_id);
if(!terrain_data->buildable){
return Response(Msg::ERR_CANNOT_DEPLOY_IMMIGRANTS_HERE) <<foundation_coord;
}
map_cells.clear();
WorldMap::get_map_cells_by_rectangle(map_cells, Rectangle(foundation_coord, 1, 1));
for(auto it = map_cells.begin(); it != map_cells.end(); ++it){
const auto &map_cell = *it;
if(!map_cell->is_virtually_removed()){
return Response(Msg::ERR_CANNOT_DEPLOY_ON_TERRITORY) <<foundation_coord;
}
}
map_objects.clear();
WorldMap::get_map_objects_by_rectangle(map_objects, Rectangle(foundation_coord, 1, 1));
for(auto it = map_objects.begin(); it != map_objects.end(); ++it){
const auto &other_object = *it;
if(other_object->get_map_object_uuid() == excluding_map_object_uuid){
continue;
}
if(!other_object->is_virtually_removed()){
if(other_object->get_owner_uuid() || !force_placing){
return Response(Msg::ERR_CANNOT_DEPLOY_ON_TROOPS) <<foundation_coord;
}
other_object->delete_from_game();
}
}
strategic_resources.clear();
WorldMap::get_strategic_resources_by_rectangle(strategic_resources, Rectangle(foundation_coord, 1, 1));
for(auto it = strategic_resources.begin(); it != strategic_resources.end(); ++it){
const auto &strategic_resource = *it;
if(!strategic_resource->is_virtually_removed()){
if(!force_placing){
return Response(Msg::ERR_CANNOT_DEPLOY_ON_STRATEGIC_RESOURCE) <<foundation_coord;
}
strategic_resource->delete_from_game();
}
}
}
const auto solid_offset = get_castle_foundation_solid_area();
for(auto it = foundation.begin(); it != foundation.begin() + static_cast<std::ptrdiff_t>(solid_offset); ++it){
const auto &foundation_coord = *it;
resource_crates.clear();
WorldMap::get_resource_crates_by_rectangle(resource_crates, Rectangle(foundation_coord, 1, 1));
for(auto it = resource_crates.begin(); it != resource_crates.end(); ++it){
const auto &resource_crate = *it;
if(!resource_crate->is_virtually_removed()){
if(!force_placing){
return Response(Msg::ERR_CANNOT_DEPLOY_ON_RESOURCE_CRATES) <<resource_crate->get_resource_crate_uuid();
}
resource_crate->delete_from_game();
}
}
}
// 检测与其他城堡距离。
const auto min_distance = static_cast<std::uint32_t>(Data::Global::as_unsigned(Data::Global::SLOT_MINIMUM_DISTANCE_BETWEEN_CASTLES));
const auto cluster_scope = WorldMap::get_cluster_scope(coord);
const auto other_left = std::max(coord.x() - (min_distance - 1), cluster_scope.left());
const auto other_bottom = std::max(coord.y() - (min_distance - 1), cluster_scope.bottom());
const auto other_right = std::min(coord.x() + (min_distance + 2), cluster_scope.right());
const auto other_top = std::min(coord.y() + (min_distance + 2), cluster_scope.top());
map_objects.clear();
WorldMap::get_map_objects_by_rectangle(map_objects, Rectangle(Coord(other_left, other_bottom), Coord(other_right, other_top)));
for(auto it = map_objects.begin(); it != map_objects.end(); ++it){
const auto &other_object = *it;
const auto other_object_type_id = other_object->get_map_object_type_id();
if(other_object_type_id != MapObjectTypeIds::ID_CASTLE){
continue;
}
const auto other_coord = other_object->get_coord();
const auto other_object_uuid = other_object->get_map_object_uuid();
LOG_EMPERY_CENTER_DEBUG("Checking distance: other_coord = ", other_coord, ", other_object_uuid = ", other_object_uuid);
const auto distance = get_distance_of_coords(other_coord, coord);
if(distance <= min_distance){
return Response(Msg::ERR_TOO_CLOSE_TO_ANOTHER_CASTLE) <<other_object_uuid;
}
}
return Response();
}
void create_resource_crates(Coord origin, ResourceId resource_id, std::uint64_t amount,
unsigned radius_inner, unsigned radius_outer, MapObjectTypeId map_object_type_id)
{
PROFILE_ME;
LOG_EMPERY_CENTER_DEBUG("Creating resource crates: origin = ", origin, ", resource_id = ", resource_id, ", amount = ", amount,
", radius_inner = ", radius_inner, ", radius_outer = ", radius_outer);
const auto border_thickness = Data::Global::as_unsigned(Data::Global::SLOT_MAP_BORDER_THICKNESS);
const auto inner_amount_ratio = Data::Global::as_double(Data::Global::SLOT_RESOURCE_CRATE_AMOUNT_INNER_RATIO);
const auto separation_amount_threshold = Data::Global::as_unsigned(Data::Global::SLOT_RESOURCE_CRATE_SEPARATION_AMOUNT_THRESHOLD);
const auto number_limits = Data::Global::as_array(Data::Global::SLOT_RESOURCE_CRATE_NUMBER_LIMITS);
const auto expiry_duration = Data::Global::as_double(Data::Global::SLOT_RESOURCE_CRATE_RADIUS_EXPIRY_DURATION);
const auto really_create_crates = [&](std::uint64_t &amount_remaining,
unsigned radius_begin, unsigned radius_end, unsigned number_limit)
{
if(amount_remaining == 0){
return;
}
if(radius_begin >= radius_end){
return;
}
unsigned crate_count = 1;
if(amount_remaining >= separation_amount_threshold){
crate_count = Poseidon::rand32() % number_limit + 1;
}
LOG_EMPERY_CENTER_DEBUG("> amount_remaining = ", amount_remaining, ", crate_count = ", crate_count, ", number_limit = ", number_limit);
if(crate_count == 0){
LOG_EMPERY_CENTER_WARNING("Crate count is zero?");
return;
}
const auto resource_amount_per_crate = amount_remaining / crate_count;
std::vector<Coord> coords;
const unsigned n_radius = radius_end - radius_begin;
coords.reserve(n_radius * 6 + 1 + n_radius * (n_radius - 1) * 3);
for(unsigned i = radius_begin; i < radius_end; ++i){
get_surrounding_coords(coords, origin, i);
}
std::vector<boost::shared_ptr<MapObject>> adjacent_objects;
std::vector<boost::shared_ptr<ResourceCrate>> adjacent_crates;
std::vector<Coord> foundation;
const auto solid_offset = get_castle_foundation_solid_area();
coords.erase(
std::remove_if(coords.begin(), coords.end(),
[&](Coord coord){
const auto cluster_scope = WorldMap::get_cluster_scope(coord);
const auto map_x = static_cast<unsigned>(coord.x() - cluster_scope.left());
const auto map_y = static_cast<unsigned>(coord.y() - cluster_scope.bottom());
const auto cell_data = Data::MapCellBasic::require(map_x, map_y);
const auto terrain_id = cell_data->terrain_id;
const auto terrain_data = Data::MapTerrain::require(terrain_id);
if(!terrain_data->passable){
return true;
}
if((map_x < border_thickness) || (map_x >= cluster_scope.width() - border_thickness) ||
(map_y < border_thickness) || (map_y >= cluster_scope.height() - border_thickness))
{
return true;
}
adjacent_objects.clear();
WorldMap::get_map_objects_by_rectangle(adjacent_objects,
Rectangle(Coord(coord.x() - 3, coord.y() - 3), Coord(coord.x() + 4, coord.y() + 4)));
for(auto it = adjacent_objects.begin(); it != adjacent_objects.end(); ++it){
const auto &other_object = *it;
const auto other_object_type_id = other_object->get_map_object_type_id();
if(other_object_type_id == MapObjectTypeIds::ID_CASTLE){
foundation.clear();
get_castle_foundation(foundation, other_object->get_coord(), true);
for(auto fit = foundation.begin(); fit != foundation.begin() + static_cast<std::ptrdiff_t>(solid_offset); ++fit){
if(*fit == coord){
return true;
}
}
continue;
}
const auto defense_building = boost::dynamic_pointer_cast<DefenseBuilding>(other_object);
if(defense_building){
if(defense_building->get_coord() == coord){
return true;
}
}
}
adjacent_crates.clear();
WorldMap::get_resource_crates_by_rectangle(adjacent_crates, Rectangle(coord, 1, 1));
for(auto it = adjacent_crates.begin(); it != adjacent_crates.end(); ++it){
const auto &other_crate = *it;
if(other_crate->get_coord() == coord){
return true;
}
}
return false;
}),
coords.end());
if(coords.empty()){
LOG_EMPERY_CENTER_DEBUG("> No coords available.");
return;
}
const auto utc_now = Poseidon::get_utc_time();
for(unsigned i = 0; i < crate_count; ++i){
try {
const auto resource_crate_uuid = ResourceCrateUuid(Poseidon::Uuid::random());
const auto coord = coords.at(Poseidon::rand32() % coords.size());
const auto expiry_time = saturated_add(utc_now, static_cast<std::uint64_t>(expiry_duration * 60000));
auto resource_crate = boost::make_shared<ResourceCrate>(resource_crate_uuid,
resource_id, resource_amount_per_crate, coord, utc_now, expiry_time);
WorldMap::insert_resource_crate(std::move(resource_crate));
LOG_EMPERY_CENTER_DEBUG("> Created resource crate: resource_crate_uuid = ", resource_crate_uuid,
", coord = ", coord, ", resource_id = ", resource_id, ", resource_amount_per_crate = ", resource_amount_per_crate);
amount_remaining -= resource_amount_per_crate;
} catch(std::exception &e){
LOG_EMPERY_CENTER_WARNING("std::exception thrown: what = ", e.what());
}
}
// 消除误差。
if(amount_remaining < crate_count){
amount_remaining = 0;
}
};
Msg::SC_MapResourceCrateExplosion msg;
msg.coord_x = origin.x();
msg.coord_y = origin.y();
msg.map_object_type_id = map_object_type_id.get();
std::vector<boost::shared_ptr<PlayerSession>> sessions;
WorldMap::get_players_viewing_rectangle(sessions, Rectangle(origin, 1, 1));
std::uint64_t amount_remaining = amount * (1 - inner_amount_ratio);
const auto outer_number_limit = static_cast<unsigned>(std::round(number_limits.at(1).get<double>()));
really_create_crates(amount_remaining, radius_inner, radius_inner + radius_outer, outer_number_limit);
LOG_EMPERY_CENTER_DEBUG("Outer crate creation complete: resource_id = ", resource_id, ", amount_remaining = ", amount_remaining);
amount_remaining += amount * inner_amount_ratio;
const auto inner_number_limit = static_cast<unsigned>(std::round(number_limits.at(0).get<double>()));
really_create_crates(amount_remaining, 0, radius_inner, inner_number_limit);
LOG_EMPERY_CENTER_DEBUG("Inner crate creation complete: resource_id = ", resource_id, ", amount_remaining = ", amount_remaining);
for(auto it = sessions.begin(); it != sessions.end(); ++it){
const auto &session = *it;
try {
session->send(msg);
} catch(std::exception &e){
LOG_EMPERY_CENTER_WARNING("std::exception thrown: what = ", e.what());
session->shutdown(e.what());
}
}
}
void async_hang_up_castle(const boost::shared_ptr<Castle> &castle) noexcept
try {
PROFILE_ME;
const auto really_hang_up = [=]() mutable {
PROFILE_ME;
const auto castle_uuid = castle->get_map_object_uuid();
const auto castle_uuid_head = Poseidon::load_be(reinterpret_cast<const std::uint64_t &>(castle_uuid.get()[0]));
const auto account_uuid = castle->get_owner_uuid();
AccountMap::require_controller_token(account_uuid, { });
const auto item_box = ItemBoxMap::require(account_uuid);
const auto mail_box = MailBoxMap::require(account_uuid);
if(castle->is_garrisoned()){
LOG_EMPERY_CENTER_DEBUG("Castle is already hung up: castle_uuid = ", castle_uuid);
return;
}
constexpr auto new_coord = Coord(INT32_MAX, INT32_MAX);
std::vector<boost::shared_ptr<MapObject>> child_objects;
WorldMap::get_map_objects_by_parent_object(child_objects, castle_uuid);
std::vector<boost::shared_ptr<MapCell>> map_cells;
WorldMap::get_map_cells_by_parent_object(map_cells, castle_uuid);
boost::container::flat_map<ItemId, std::uint64_t> items_regained;
items_regained.reserve(32);
std::vector<boost::shared_ptr<MapObject>> defenses_destroyed;
defenses_destroyed.reserve(child_objects.size());
const auto last_coord = castle->get_coord();
// 回收所有部队。
for(auto it = child_objects.begin(); it != child_objects.end(); ++it){
const auto &child_object = *it;
const auto map_object_type_id = child_object->get_map_object_type_id();
if(map_object_type_id == MapObjectTypeIds::ID_CASTLE){
continue;
}
const auto child_object_data = Data::MapObjectTypeBattalion::get(map_object_type_id);
if(child_object_data){
child_object->pump_status();
child_object->unload_resources(castle);
child_object->set_coord(last_coord);
child_object->set_garrisoned(true);
} else {
child_object->delete_from_game();
defenses_destroyed.emplace_back(child_object);
}
}
// 回收所有领地。
const auto item_rebate_rate = Data::Global::as_double(Data::Global::SLOT_MAP_CELL_ITEM_REBATE_RATE);
const auto resource_rebate_rate = Data::Global::as_double(Data::Global::SLOT_MAP_CELL_RESOURCE_REBATE_RATE);
for(auto it = map_cells.begin(); it != map_cells.end(); ++it){
const auto &map_cell = *it;
if(map_cell->is_buff_in_effect(BuffIds::ID_OCCUPATION_MAP_CELL)){
continue;
}
map_cell->pump_status();
map_cell->harvest(castle, UINT32_MAX, true);
const auto ticket_item_id = map_cell->get_ticket_item_id();
const auto ticket_data = Data::MapCellTicket::require(ticket_item_id);
std::vector<ItemTransactionElement> transaction;
std::vector<ResourceTransactionElement> resource_transaction;
for(auto it = ticket_data->need_items.begin(); it != ticket_data->need_items.end(); ++it){
const auto rebate = static_cast<std::uint64_t>(it->second * item_rebate_rate);
if(rebate <= 0 ){
continue;
}
transaction.emplace_back(ItemTransactionElement::OP_ADD, it->first, rebate,
ReasonIds::ID_HANG_UP_CASTLE, castle_uuid_head, 0, 0);
items_regained[it->first] += rebate;
}
for(auto it = ticket_data->need_resources.begin(); it != ticket_data->need_resources.end(); ++it){
const auto rebate = static_cast<std::uint64_t>(it->second * resource_rebate_rate);
if(rebate <= 0 ){
continue;
}
resource_transaction.emplace_back(ResourceTransactionElement::OP_ADD,it->first, rebate,
ReasonIds::ID_HANG_UP_CASTLE, castle_uuid_head, 0, 0);
}
if(map_cell->is_acceleration_card_applied()){
transaction.emplace_back(ItemTransactionElement::OP_ADD, ItemIds::ID_ACCELERATION_CARD, 1,
ReasonIds::ID_HANG_UP_CASTLE, castle_uuid_head, 0, 0);
items_regained[ItemIds::ID_ACCELERATION_CARD] += 1;
}
item_box->commit_transaction(transaction, false,
[&]{
castle->commit_resource_transaction_nothrow(resource_transaction,
[&]{
map_cell->clear_buff(BuffIds::ID_OCCUPATION_PROTECTION);
map_cell->set_parent_object({ }, { }, { });
map_cell->set_acceleration_card_applied(false);
});
});
}
// 挂起城堡。
boost::container::flat_map<AttributeId, std::int64_t> modifiers;
modifiers.reserve(8);
modifiers[AttributeIds::ID_CASTLE_LAST_COORD_X] = last_coord.x();
modifiers[AttributeIds::ID_CASTLE_LAST_COORD_Y] = last_coord.y();
castle->set_attributes(std::move(modifiers));
castle->set_coord(new_coord);
castle->set_garrisoned(true);
for(auto it = child_objects.begin(); it != child_objects.end(); ++it){
const auto &child_object = *it;
const auto map_object_type_id = child_object->get_map_object_type_id();
if(map_object_type_id == MapObjectTypeIds::ID_CASTLE){
continue;
}
child_object->set_coord(new_coord);
}
castle->pump_status();
// 发邮件。
try {
const auto mail_uuid = MailUuid(Poseidon::Uuid::random());
const auto language_id = LanguageId(); // neutral
std::vector<std::pair<ChatMessageSlotId, std::string>> segments;
segments.reserve(items_regained.size() + defenses_destroyed.size());
for(auto it = items_regained.begin(); it != items_regained.end(); ++it){
segments.emplace_back(ChatMessageSlotIds::ID_HUP_REGAINED_ITEM_ID, boost::lexical_cast<std::string>(it->first));
segments.emplace_back(ChatMessageSlotIds::ID_HUP_REGAINED_ITEM_COUNT, boost::lexical_cast<std::string>(it->second));
}
for(auto it = defenses_destroyed.begin(); it != defenses_destroyed.end(); ++it){
const auto defense = boost::dynamic_pointer_cast<DefenseBuilding>(*it);
if(!defense){
continue;
}
const auto building_id = defense->get_map_object_type_id();
const auto building_level = defense->get_level();
segments.emplace_back(ChatMessageSlotIds::ID_HUP_DESTROYED_DEFENSE_ID, boost::lexical_cast<std::string>(building_id));
segments.emplace_back(ChatMessageSlotIds::ID_HUP_DESTROYED_DEFENSE_LEVEL, boost::lexical_cast<std::string>(building_level));
}
segments.emplace_back(ChatMessageSlotIds::ID_HUP_LAST_COORD_X, boost::lexical_cast<std::string>(last_coord.x()));
segments.emplace_back(ChatMessageSlotIds::ID_HUP_LAST_COORD_Y, boost::lexical_cast<std::string>(last_coord.y()));
segments.emplace_back(ChatMessageSlotIds::ID_HUP_CASTLE_NAME, castle->get_name());
const auto utc_now = Poseidon::get_utc_time();
const auto mail_data = boost::make_shared<MailData>(mail_uuid, language_id, utc_now,
ChatMessageTypeIds::ID_CASTLE_HUNG_UP, AccountUuid(), std::string(), std::move(segments),
boost::container::flat_map<ItemId, std::uint64_t>());
MailBoxMap::insert_mail_data(mail_data);
MailBox::MailInfo mail_info = { };
mail_info.mail_uuid = mail_uuid;
mail_info.expiry_time = UINT64_MAX;
mail_info.system = true;
mail_box->insert(std::move(mail_info));
} catch(std::exception &e){
LOG_EMPERY_CENTER_ERROR("std::exception thrown: what = ", e.what());
}
};
Poseidon::enqueue_async_job(really_hang_up);
} catch(std::exception &e){
LOG_EMPERY_CENTER_ERROR("std::exception thrown: what = ", e.what());
}
namespace {
template<typename T>
long get_protection_error(const boost::shared_ptr<T> &ptr, bool is_attacker){
PROFILE_ME;
if(ptr->is_protectable()){
if(ptr->is_buff_in_effect(BuffIds::ID_NOVICIATE_PROTECTION)){
return is_attacker ? Msg::ERR_ATTACKER_UNDER_NOVICIATE_PROTECTION
: Msg::ERR_TARGET_UNDER_NOVICIATE_PROTECTION;
}
if(ptr->is_buff_in_effect(BuffIds::ID_CASTLE_PROTECTION) && !ptr->is_buff_in_effect(BuffIds::ID_CASTLE_PROTECTION_PREPARATION)){
return is_attacker ? Msg::ERR_ATTACKER_UNDER_CASTLE_PROTECTION
: Msg::ERR_TARGET_UNDER_CASTLE_PROTECTION;
}
}
if(ptr->is_buff_in_effect(BuffIds::ID_OCCUPATION_PROTECTION)){
return is_attacker ? Msg::ERR_ATTACKER_UNDER_OCCUPATION_PROTECTION
: Msg::ERR_TARGET_UNDER_OCCUPATION_PROTECTION;
}
return Msg::ST_OK;
}
}
std::pair<long, std::string> is_under_protection(const boost::shared_ptr<MapObject> &attacking_object,
const boost::shared_ptr<MapObject> &attacked_object)
{
PROFILE_ME;
const auto attacking_account_uuid = attacking_object->get_owner_uuid();
const auto attacked_account_uuid = attacked_object->get_owner_uuid();
long error;
if(attacked_account_uuid){
// 处于保护状态下的防御建筑不能攻击其他玩家的部队。
if((error = get_protection_error(attacking_object, true)) != Msg::ST_OK){
return CbppResponse(error) <<attacking_object->get_map_object_uuid();
}
}
if(attacking_account_uuid){
// 处于保护状态下的防御建筑不能遭到其他玩家的部队攻击。
if((error = get_protection_error(attacked_object, false)) != Msg::ST_OK){
return CbppResponse(error) <<attacked_object->get_map_object_uuid();
}
// 防御建筑不能遭到其他玩家处于保护状态下的部队的攻击。
if((error = get_protection_error(attacking_object, false)) != Msg::ST_OK){
return CbppResponse(error) <<attacking_object->get_map_object_uuid();
}
}
return CbppResponse();
}
std::pair<long, std::string> is_under_protection(const boost::shared_ptr<MapObject> &attacking_object,
const boost::shared_ptr<MapCell> &attacked_cell)
{
PROFILE_ME;
const auto attacking_account_uuid = attacking_object->get_owner_uuid();
auto attacked_account_uuid = attacked_cell->get_occupier_owner_uuid();
if(!attacked_account_uuid){
attacked_account_uuid = attacked_cell->get_owner_uuid();
}
long error;
if(attacked_account_uuid){
// 处于保护状态下的领地不能攻击其他玩家的部队。
if((error = get_protection_error(attacking_object, true)) != Msg::ST_OK){
return CbppResponse(error) <<attacking_object->get_map_object_uuid();
}
}
if(attacking_account_uuid){
// 处于保护状态下的领地不能遭到其他玩家的部队攻击。
if((error = get_protection_error(attacked_cell, false)) != Msg::ST_OK){
return CbppResponse(error) <<attacked_cell->get_coord();
}
// 领地不能遭到其他玩家处于保护状态下的部队的攻击。
if((error = get_protection_error(attacking_object, false)) != Msg::ST_OK){
return CbppResponse(error) <<attacking_object->get_map_object_uuid();
}
}
return CbppResponse();
}
}
|
2cc63dd81b97967edb6229e95730b7acb26e2215 | 5eec18cb592d55a164fdc07f8a223c50af505f43 | /ana.cpp | 61bde2f0083f2983b5735301397df09d199f4bca | [] | no_license | x27/rx63 | d0734042db795118e7ccffe79062e973fffa6222 | 4c257942d601e288453ff1485d12fed62ce5c33b | refs/heads/master | 2022-01-16T21:50:20.735318 | 2021-12-29T22:52:34 | 2021-12-29T22:52:34 | 62,134,011 | 12 | 4 | null | 2021-09-19T00:38:38 | 2016-06-28T11:00:45 | C++ | UTF-8 | C++ | false | false | 41,464 | cpp | ana.cpp | #include "rx63.hpp"
enum simm_t
{
imm32 = 0,
simm8 = 1,
simm16 = 2,
simm24 = 3,
};
void set_reg(op_t &op, uint16 reg)
{
op.type = o_reg;
op.reg = reg;
op.dtype = dt_word;
}
void set_displ_reg(op_t &op, uint16 reg, uval_t value, memex_t memex)
{
op.type = o_displ;
op.value = value;
op.reg = reg;
op.dtype = dt_word;
op.memex = (char)memex;
}
inline ea_t real_address( ea_t ea )
{
if (inf_is_be())
return (( ea >> 2 << 2 ) + 3 - ( ea & 3 ));
return ea;
}
uchar get_hl8( ea_t ea)
{
return (uchar) get_wide_byte(real_address( ea ) );
}
uint get_hl32( ea_t ea )
{
uint res = 0;
for( int i=3; i>=0; i-- )
{
res = res << 8;
res = res | get_hl8( ea + i );
}
return res;
}
uint get_hl24( ea_t ea )
{
uint res = 0;
for( int i=2; i>=0; i-- )
{
res = res << 8;
res = res | get_hl8( ea + i );
}
return res;
}
int get_signed_hl24( ea_t ea )
{
uint res = get_hl24( ea );
if ((res & 0x800000) != 0)
{
return (int)(res | 0xff000000);
}
else
{
return res;
}
}
ushort get_hl16( ea_t ea )
{
return (get_hl8( ea + 1) << 8 ) | get_hl8 ( ea );
}
int set_imm(op_t &op, simm_t imm, ea_t ea)
{
int size = 0;
op.type = o_imm;
switch(imm)
{
case imm32:
size = 4;
op.value = get_hl32( ea );
op.dtype = dt_dword;
break;
case simm8:
size = 1;
op.value = get_hl8( ea );
op.dtype = dt_byte;
break;
case simm16:
size = 2;
op.value = get_hl16( ea );
op.dtype = dt_word;
break;
case simm24:
size = 3;
op.value = get_signed_hl24( ea );
op.dtype = dt_dword;
break;
}
return size;
}
int get_scale(memex_t mem)
{
memex_t m = (memex_t)((int)mem & 0xf);
int scale = 1;
if ( memex_tw == m || memex_tuw == m )
scale = 2;
else if ( memex_tl == m )
scale = 4;
return scale;
}
int set_displ(op_t &op, ld_t ld, memex_t memex, uval_t reg, ea_t ea)
{
int res = 0;
op.ld = (char)ld;
if (ld == ld_tdsp8)
{
uval_t value = get_scale(memex) * get_hl8( ea );
set_displ_reg(op, reg, value, memex);
res = 1;
}
else if (ld == ld_tdsp16)
{
uval_t value = get_scale(memex) * get_hl16( ea );
//msg("value %a %a\n", ea, value);
set_displ_reg(op, reg, value, memex);
res = 2;
}
else
{
set_displ_reg(op, reg, 0, memex);
}
return res;
}
/* -------------------------------------------------------------*/
/* --------- instruction providers -------------------------- */
/* -------------------------------------------------------------*/
void b1_cd_dsp_s(insn_t *insn)
{
uchar data = get_hl8( insn->ea );
insn->auxpref = (data & 0x08) == 0 ? condition_teq : condition_tne;
insn->auxpref |= (memex_ts + 1) << 4;
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
uint disp = data & 7;
if (disp < 3)
disp += 8;
insn->Op1.addr = insn->ea + disp;
insn->size = 1;
}
void b1_cd_dsp_b(insn_t *insn)
{
uchar data = get_hl8( insn->ea );
uchar cd = data & 0xf;
if (cd == 0xf || cd == 0xe)
return;
insn->auxpref = cd;
insn->auxpref |= (memex_tb + 1) << 4;
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
insn->Op1.addr = insn->ea + (char)get_hl8( insn->ea + 1);
insn->size = 2;
}
void b1_cd_dsp_w(insn_t *insn)
{
uchar data = get_hl8( insn->ea );
insn->auxpref = data & 1 ? condition_tne : condition_teq;
insn->auxpref |= (memex_tw + 1) << 4;
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
insn->Op1.addr = insn->ea + (short)get_hl16( insn->ea + 1);
insn->size = 3;
}
void b1_dsp(insn_t *insn)
{
uint disp = get_hl8( insn->ea ) & 7;
if (disp < 3)
disp += 8;
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
insn->auxpref |= (memex_ts + 1) << 4;
insn->Op1.addr = insn->ea + disp;
insn->size = 1;
}
void b1_pcdsp8(insn_t *insn)
{
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
insn->auxpref |= (memex_tb + 1) << 4;
insn->Op1.addr = insn->ea + (char)get_hl8( insn->ea + 1 );
insn->size = 2;
}
void b1_pcdsp16(insn_t *insn)
{
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
insn->auxpref |= (memex_tw + 1) << 4;
insn->Op1.addr = insn->ea + (short)get_hl16( insn->ea + 1 );
insn->size = 3;
}
void b1_pcdsp24(insn_t *insn)
{
insn->Op1.type = o_near;
insn->Op1.dtype = dt_code;
insn->auxpref |= (memex_ta + 1) << 4;
insn->Op1.addr = insn->ea + get_signed_hl24( insn->ea + 1 );
insn->size = 4;
}
void b1_imm4_rd(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 1 );
insn->size = 2;
insn->Op1.type = o_imm;
insn->Op1.value = data >> 4;
set_reg(insn->Op2, data & 0xf);
}
void b1_imm4_rd_(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 1 );
insn->auxpref |= (memex_tl + 1) << 4;
insn->size = 2;
insn->Op1.type = o_imm;
insn->Op1.value = data >> 4;
set_reg(insn->Op2, data & 0xf);
}
void b1_imm5_rd(insn_t *insn)
{
ushort data0 = (get_hl8( insn->ea ) & 1) << 4;
ushort data1 = get_hl8( insn->ea + 1 );
insn->size = 2;
insn->Op1.type = o_imm;
insn->Op1.value = (data0 | (data1 >> 4)) & 0x1f;
set_reg(insn->Op2, data1 & 0xf);
}
void b1_ld_rd_li_sz(insn_t *insn)
{
ld_t ld = (ld_t)(get_hl8( insn->ea ) & 3);
if (ld == 3)
return;
uchar data = get_hl8( insn->ea + 1);
memex_t sz = (memex_t) (data & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
insn->size = 2 + set_displ(insn->Op2, ld, (memex_t)(sz|memex_tdont_show), data >> 4, insn->ea + 2);
simm_t li = (simm_t)( (data >> 2) & 3);
insn->size += set_imm(insn->Op1, li, insn->ea + insn->size );
}
void b1_ld_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
ld_t ld = (ld_t)(data0 & 3);
insn->size = 2 + set_displ(insn->Op1, ld, memex_tub, data1 >> 4, insn->ea + 2);
set_reg(insn->Op2, data1 & 0xf);
}
void b1_li_rs2_rd(insn_t *insn)
{
simm_t li = (simm_t)(get_hl8( insn->ea ) & 3);
uchar data = get_hl8 ( insn->ea + 1 );
insn->size = 2 + set_imm(insn->Op1, li, insn->ea + 2);
set_reg(insn->Op2, data >> 4);
set_reg(insn->Op3, data & 0xf );
}
void b1_no_args(insn_t *insn)
{
insn->size = 1;
}
void b1_rd_rd2(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 1 );
insn->Op1.type = o_phrase;
insn->Op1.phrase_type = rx63_phrasesf_r_2_r;
insn->Op1.value = data >> 4;
insn->Op1.reg = data & 0xf;
insn->size = 2;
}
void b1_rd_rd2_imm8(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 1 );
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 2 );
insn->Op2.type = o_phrase;
insn->Op2.phrase_type = rx63_phrasesf_r_2_r;
insn->Op2.value = data >> 4;
insn->Op1.reg = data & 0xf;
insn->size = 3;
}
void b1_sz_ld_rd_rs(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
ld_t ld = (ld_t) ( (data0 >> 2) & 3 );
if (ld == 3)
return;
insn->auxpref |= (sz + 1) << 4;
set_reg(insn->Op1, data1 & 0xf);
insn->size = 2 + set_displ(insn->Op2, ld, (memex_t)(sz|memex_tdont_show), data1 >> 4, insn->ea + 2);
}
void b1_sz_ld_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
ld_t ld = (ld_t) ( data0 & 3 );
if (ld == 3)
return;
insn->size = 2 + set_displ(insn->Op1, ld, (memex_t)(sz|memex_tdont_show), data1 >> 4, insn->ea + 2);
set_reg(insn->Op2, data1 & 0xf);
}
void b1_sz_ld_rs_rd_u(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 2 ) & 1);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
ld_t ld = (ld_t) ( data0 & 3 );
insn->size = 2 + set_displ(insn->Op1, ld, (memex_t)(sz|memex_tdont_show), data1 >> 4, insn->ea + 2);
set_reg(insn->Op2, data1 & 0xf);
}
void b1_sz_ldd_lds_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
ld_t ldd = (ld_t) ( (data0 >> 2) & 3 );
if (ldd == 3)
return;
insn->auxpref |= (sz + 1) << 4;
ld_t lds = (ld_t) ( data0 & 3 );
if (lds == 3)
return;
insn->size = 2 + set_displ(insn->Op1, lds, (memex_t)(sz|memex_tdont_show), data1 >> 4, insn->ea + 2);
insn->size += set_displ(insn->Op2, ldd, (memex_t)(sz|memex_tdont_show), data1 & 0xf, insn->ea + insn->size);
}
void b1_sz_rd7_rs(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
set_reg(insn->Op1, data1 & 7);
uchar dsp = get_scale( sz ) * (((data0 & 7) << 2) | ((data1 >> 6) & 2) | ((data1 >> 3) & 1));
set_displ_reg(insn->Op2, (data1 >> 4) & 7, dsp, (memex_t)(sz|memex_tdont_show));
insn->size = 2;
}
void b1_sz_rd7_rs7(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 3 ) & 1);
insn->auxpref |= (sz + 1) << 4;
uchar dsp = get_scale( sz ) * (((data0 & 7) << 2) | ((data1 >> 6) & 2) | ((data1 >> 3) & 1));
set_displ_reg(insn->Op1, (data1 >> 4) & 7, dsp, (memex_t)(sz|memex_tdont_show));
set_reg(insn->Op2, data1 & 7);
insn->size = 2;
}
void b1_sz_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)( data0 & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
insn->Op1.type = o_imm;
insn->Op1.value = get_hl8( insn->ea + 2 );
uchar dsp = get_scale( sz ) * (((data1 & 0x80) >> 3) | (data1 & 0xf));
set_displ_reg(insn->Op2, (data1 >> 4) & 7, dsp, (memex_t)(sz|memex_tdont_show));
insn->size = 3;
}
void b1_sz_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
set_reg(insn->Op1, data1 >> 4);
set_reg(insn->Op2, data1 & 0xf);
insn->size = 2;
}
void b1_sz_rs7_rd7(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea );
uchar data1 = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
set_reg(insn->Op2, data1 & 7);
uchar dsp = get_scale( sz ) * (((data0 & 7) << 2) | ((data1 >> 6) & 2) | ((data1 >> 3) & 1));
set_displ_reg(insn->Op1, (data1 >> 4) & 7, dsp, (memex_t)(sz|memex_tdont_show));
insn->size = 2;
}
void b1_uimm8(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 1 );
insn->size = 2;
}
void b2_ad_sz_rds(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t sz = (memex_t)( data0 & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
uchar ad = (data0 >> 2) & 3;
if (ad < 2)
{
set_reg(insn->Op1, data1 & 0xf);
insn->Op2.type = o_phrase;
insn->Op2.phrase_type = ad == 0 ? rx63_phrasesf_r_plus : rx63_phrasesf_r_minus;
insn->Op2.reg = data1 >> 4;
}
else
{
set_reg(insn->Op2, data1 & 0x0f);
insn->Op1.type = o_phrase;
insn->Op1.phrase_type = ad == 2 ? rx63_phrasesf_r_plus : rx63_phrasesf_r_minus;
insn->Op1.reg = data1 >> 4;
}
insn->size = 3;
}
void b2_ad_sz_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t sz = (memex_t)( data0 & 1);
insn->auxpref |= (sz + 1) << 4;
uchar ad = (data0 >> 2) & 3;
if (ad < 2)
return;
set_reg(insn->Op2, data1 & 0x0f);
insn->Op1.type = o_phrase;
insn->Op1.phrase_type = ad == 2 ? rx63_phrasesf_r_plus : rx63_phrasesf_r_minus;
insn->Op1.reg = data1 >> 4;
insn->size = 3;
}
void b2_cb(insn_t *insn)
{
uchar flag = get_hl8( insn->ea + 1 ) & 0xf;
if ((flag > 3 && flag < 8) || flag > 9)
return;
insn->size = 2;
insn->Op1.type = o_flag;
insn->Op1.value = flag;
}
void b2_cr(insn_t *insn)
{
uchar cr = get_hl8( insn->ea + 1 ) & 0xf;
if (cr == 1 || cr > 3 && cr < 8 || cr > 12)
return;
insn->size = 2;
insn->Op1.type = o_creg;
insn->Op1.value = cr;
}
void b2_cr_(insn_t *insn)
{
uchar cr = get_hl8( insn->ea + 1 ) & 0xf;
if (cr > 3 && cr < 8 || cr > 12)
return;
insn->size = 2;
insn->Op1.type = o_creg;
insn->Op1.value = cr;
}
void b2_cr_rd(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
uchar creg = data >> 4;
if ((creg > 3 && creg < 8) || creg > 12)
return;
insn->size = 3;
insn->Op1.type = o_creg;
insn->Op1.value = creg;
set_reg(insn->Op2, data & 0xf);
}
void b2_imm3_ld_rd_cd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
uchar cd = data1 & 0xf;
if (cd == 0xe || cd == 0xf)
return;
ld_t ld = (ld_t) ( data0 & 3 );
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = (data0 >> 2) & 7;
insn->auxpref = cd;
insn->size = 3 + set_displ(insn->Op2, ld, memex_tb, data1 >> 4, insn->ea + 3);
}
void b2_imm5_cd_rd(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
uchar cd = data >> 4;
if (cd == 0xe || cd == 0xf)
return;
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 1 ) & 0x1f;
insn->auxpref = cd;
set_reg(insn->Op2, data & 0xf);
insn->size = 3;
}
void b2_imm5_rd(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = (data >> 4) & 0x1f;
set_reg( insn->Op2, data & 0xf);
insn->size = 3;
}
void b2_imm5_rs2_rd(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 1 ) & 0x1f;
set_reg( insn->Op2, data >> 4 );
set_reg( insn->Op3, data & 0xf );
insn->size = 3;
}
void b2_imm8(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 2 );
insn->size = 3;
}
void b2_ld_rd_imm3(insn_t *insn)
{
ld_t ld = (ld_t) ( get_hl8( insn->ea ) & 3 );
uchar data = get_hl8( insn->ea + 1 );
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = data & 7;
insn->size = 2 + set_displ( insn->Op2, ld, memex_tb, data >> 4, insn->ea + 2);
}
void b2_ld_rd_rs(insn_t *insn)
{
ld_t ld = (ld_t) ( get_hl8( insn->ea + 1) & 3 );
uchar data = get_hl8( insn->ea + 2 );
set_reg(insn->Op1, data & 0xf);
insn->size = 3 + set_displ(insn->Op2, ld, memex_tb, data >> 4, insn->ea + 3);
}
void b2_ld_rs_rd_ub(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
ld_t ld = (ld_t)(get_hl8( insn->ea + 1 ) & 3);
insn->size = 3 + set_displ(insn->Op1, ld, memex_tub, data >> 4, insn->ea + 3);
set_reg(insn->Op2, data & 0xf);
}
void b2_ld_rs_rd_l(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
ld_t ld = (ld_t)(get_hl8( insn->ea + 1 ) & 3);
insn->size = 3 + set_displ(insn->Op1, ld, memex_tl, data >> 4, insn->ea + 3);
set_reg(insn->Op2, data & 0xf);
}
void b2_ld_rs_sz(insn_t *insn)
{
ld_t ld = (ld_t)(get_hl8( insn->ea ) & 3);
if (ld == 3)
return;
uchar data = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)( data & 3 );
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
insn->size = 2 + set_displ(insn->Op1, ld, (memex_t)(sz|memex_tdont_show), data >> 4, insn->ea + 2);
}
void b2_li_rd(insn_t *insn)
{
simm_t li = (simm_t)(get_hl8( insn->ea ) & 3);
uchar data = get_hl8 ( insn->ea + 1 );
insn->size = 2 + set_imm(insn->Op1, li, insn->ea + 2);
set_reg(insn->Op2, data & 0xf);
}
void b2_mi_ld_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t memex = (memex_t)(data0 >> 6);
ld_t ld = (ld_t)(data0 & 3);
insn->size = 3 + set_displ(insn->Op1, ld, memex, data1 >> 4, insn->ea + 3);
set_reg(insn->Op2, data1 & 0xf);
}
void b2_no_args(insn_t *insn)
{
insn->size = 2;
}
void b2_rd(insn_t *insn)
{
set_reg(insn->Op1, get_hl8( insn->ea + 1 ) & 0x0f);
insn->size = 2;
}
void b2_rd_li(insn_t *insn)
{
uchar data = get_hl8 ( insn->ea + 1 );
insn->auxpref |= (memex_tl + 1) << 4;
simm_t li = (simm_t)( (data >> 2) & 3);
insn->size = 2 + set_imm(insn->Op1, li, insn->ea + 2);
set_reg(insn->Op2, (data >> 4) & 0xf);
}
void b2_rd_rs_rs2(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
set_reg(insn->Op1, data1 >> 4);
set_reg(insn->Op2, data1 & 0xf);
set_reg(insn->Op3, data0 & 0xf );
insn->size = 3;
}
void b2_rs(insn_t *insn)
{
insn->auxpref |= (memex_tl + 1) << 4;
set_reg(insn->Op1, get_hl8( insn->ea + 1) & 0xf);
insn->size = 2;
}
void b2_rs_(insn_t *insn)
{
set_reg(insn->Op1, get_hl8( insn->ea + 1) & 0xf);
insn->size = 2;
}
void b2_rs_rd(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
insn->size = 3;
set_reg(insn->Op1, data >> 4);
set_reg(insn->Op2, data & 0xf);
}
void b2_rs2_uimm8(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 2 );
set_reg(insn->Op2, get_hl8( insn->ea + 1 ) & 0xf);
insn->size = 3;
}
void b2_rs2_uimm8_(insn_t *insn)
{
insn->auxpref |= (memex_tl + 1) << 4;
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 2 );
set_reg(insn->Op2, get_hl8( insn->ea + 1 ) & 0xf);
insn->size = 3;
}
void b2_rs_cr(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 2 );
uchar cr = data & 0xf;
if (cr == 1 || cr > 3 && cr < 8 || cr > 12)
return;
set_reg(insn->Op1, data >> 4);
insn->Op2.type = o_creg;
insn->Op2.value = cr;
insn->Op2.dtype = dt_byte;
insn->size = 3;
}
void b2_sz(insn_t *insn)
{
memex_t sz = (memex_t)( get_hl8( insn->ea + 1 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
insn->size = 2;
}
void b2_sz_ld_rd_cd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t sz = (memex_t)(( data0 >> 2 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
ld_t ld = (ld_t)(data0 & 3);
uchar cd = data1 & 0xf;
if (cd == 0xf || cd == 0xe)
return;
insn->auxpref = cd;
insn->auxpref |= (sz + 1) << 4;
insn->size = 3 + set_displ(insn->Op1, ld, (memex_t)(sz|memex_tdont_show), data1 >> 4, insn->ea + 3);
}
void b2_sz_ri_rb_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
insn->Op1.type = o_phrase;
insn->Op1.phrase_type = rx63_phrasesf_r_r;
insn->Op1.reg = data1 >> 4;
insn->Op1.value = data0 & 0xf;
insn->Op1.dtype = dt_word;
set_reg(insn->Op2, data1 & 0x0f);
insn->size = 3;
}
void b2_sz_ri_rb_rd_u(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 1);
insn->auxpref |= (sz + 1) << 4;
insn->Op1.type = o_phrase;
insn->Op1.phrase_type = rx63_phrasesf_r_r;
insn->Op1.reg = data1 >> 4;
insn->Op1.value = data0 & 0xf;
insn->Op1.dtype = dt_word;
set_reg(insn->Op2, data1 & 0x0f);
insn->size = 3;
}
void b2_sz_ri_rb_rs(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
memex_t sz = (memex_t)(( data0 >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
insn->Op2.type = o_phrase;
insn->Op2.phrase_type = rx63_phrasesf_r_r;
insn->Op2.reg = data1 >> 4;
insn->Op2.value = data0 & 0xf;
insn->Op2.dtype = dt_word;
set_reg(insn->Op1, data1 & 0x0f);
insn->size = 3;
}
void b2_sz_rs(insn_t *insn)
{
uchar data = get_hl8( insn->ea + 1 );
memex_t sz = (memex_t)(( data >> 4 ) & 3);
if (sz == 3)
return;
insn->auxpref |= (sz + 1) << 4;
set_reg(insn->Op1, data & 0xf);
insn->size = 2;
}
void b3_imm1(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = (get_hl8( insn->ea + 2) & 0x10) == 0 ? 1 : 2;
insn->size = 3;
}
void b3_imm3_ld_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 2 );
ld_t ld = (ld_t)(data0 & 3);
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = (data0 >> 2) & 7;
insn->size = 3 + set_displ(insn->Op2, ld, memex_tb, data1 >> 4, insn->ea + 3);
}
void b3_imm4(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.value = get_hl8( insn->ea + 2) & 0xf;
insn->Op1.dtype = dt_byte;
insn->size = 3;
}
void b3_imm5_rd(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_byte;
insn->Op1.value = get_hl8( insn->ea + 1 ) & 0x1f;
set_reg( insn->Op2, get_hl8( insn->ea + 2 ) & 0xf );
insn->size = 3;
}
void b3_ld_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 3 );
ld_t ld = (ld_t)(data0 & 3);
if (ld == 3)
return;
memex_t memex = (memex_t)(data0 >> 6);
insn->size = 4 + set_displ(insn->Op1, ld, memex, data1 >> 4, insn->ea + 4);
set_reg(insn->Op2, data1 & 0xf);
}
void b3_li_cr(insn_t *insn)
{
simm_t li = (simm_t)((get_hl8( insn->ea + 1 ) >> 2) & 3);
uchar cr = get_hl8( insn->ea + 2) & 0xf;
if (cr == 1 || cr >3 && cr < 8 || cr > 12)
return;
insn->size = 3 + set_imm(insn->Op1, li, insn->ea + 3);
insn->Op2.type = o_creg;
insn->Op2.value = cr;
insn->Op2.dtype = dt_byte;
}
void b3_li_rd(insn_t *insn)
{
simm_t li = (simm_t)((get_hl8( insn->ea + 1 ) >> 2) & 3);
uchar data = get_hl8( insn->ea + 2 ) & 0xf;
insn->size = 3 + set_imm(insn->Op1, li, insn->ea + 3);
set_reg(insn->Op2, data);
}
void b3_mi_ld_rs_rd(insn_t *insn)
{
uchar data0 = get_hl8( insn->ea + 1 );
uchar data1 = get_hl8( insn->ea + 3 );
memex_t memex = (memex_t)(data0 >> 6);
ld_t ld = (ld_t)(data0 & 3);
insn->size = 4 + set_displ(insn->Op1, ld, memex, data1 >> 4, insn->ea + 3);
set_reg(insn->Op2, data1 & 0xf);
}
void b3_rd_imm32(insn_t *insn)
{
insn->Op1.type = o_imm;
insn->Op1.dtype = dt_dword;
insn->Op1.value = get_hl32( insn->ea + 3 );
set_reg(insn->Op2, get_hl8( insn->ea + 2) & 0xf);
insn->size = 7;
}
void b3_rd(insn_t *insn)
{
set_reg( insn->Op1, get_hl8( insn->ea + 2) & 0xf);
insn->size = 3;
}
struct function_desc_t
{
void (*function)(insn_t*);
int opcode_count;
uchar mask[4];
};
static struct function_desc_t function_descs[] =
{
{ &b1_cd_dsp_s, 1, { 0xf0 } },
{ &b1_cd_dsp_b, 1, { 0xf0 } },
{ &b1_cd_dsp_w, 1, { 0xfe } },
{ &b1_dsp, 1, { 0xf8 } },
{ &b1_imm4_rd, 1, { 0xff } },
{ &b1_imm4_rd_, 1, { 0xff } },
{ &b1_imm5_rd, 1, { 0xfe } },
{ &b1_ld_rd_li_sz, 1, { 0xfc } },
{ &b1_ld_rs_rd, 1, { 0xfc } },
{ &b1_li_rs2_rd, 1, { 0xfc } },
{ &b1_no_args, 1, { 0xff } },
{ &b1_pcdsp8, 1, { 0xff } },
{ &b1_pcdsp16, 1, { 0xff } },
{ &b1_pcdsp24, 1, { 0xff } },
{ &b1_rd_rd2, 1, { 0xff } },
{ &b1_rd_rd2_imm8, 1, { 0xff } },
{ &b1_sz_ld_rd_rs, 1, { 0xc3 } },
{ &b1_sz_ld_rs_rd, 1, { 0xcc } },
{ &b1_sz_ld_rs_rd_u,1, {0xf8 } },
{ &b1_sz_ldd_lds_rs_rd, 1, { 0xc0 } },
{ &b1_sz_rd, 1, { 0xfc } },
{ &b1_sz_rd7_rs, 1, { 0xc8 } },
{ &b1_sz_rs_rd, 1, { 0xcf } },
{ &b1_sz_rd7_rs7, 1, { 0xf0 } },
{ &b1_sz_rs7_rd7, 1, { 0xc8 } },
{ &b1_uimm8, 1, { 0xff } },
{ &b2_ad_sz_rds, 2, { 0xff, 0xf0 } },
{ &b2_ad_sz_rs_rd, 2, { 0xff, 0xf2 } },
{ &b2_cb, 2, { 0xff, 0xf0 } },
{ &b2_cr, 2, { 0xff, 0xf0 } },
{ &b2_cr_, 2, { 0xff, 0xf0 } },
{ &b2_cr_rd, 2, { 0xff, 0xff } },
{ &b2_imm3_ld_rd_cd,2, { 0xff, 0xe0 } },
{ &b2_imm5_cd_rd, 2, { 0xff, 0xe0 } },
{ &b2_imm5_rd, 2, { 0xff, 0xfe } },
{ &b2_imm5_rs2_rd, 2, { 0xff, 0xe0 } },
{ &b2_imm8, 2, { 0xff, 0xff } },
{ &b2_ld_rd_imm3, 2, { 0xfc, 0x08 } },
{ &b2_ld_rd_rs, 2, { 0xff, 0xfc } },
{ &b2_ld_rs_rd_ub, 2, { 0xff, 0xfc } },
{ &b2_ld_rs_rd_l, 2, { 0xff, 0xfc } },
{ &b2_ld_rs_sz, 2, { 0xfc, 0x0c } },
{ &b2_li_rd, 2, { 0xfc, 0xf0 } },
{ &b2_mi_ld_rs_rd, 2, { 0xff, 0x3c } },
{ &b2_no_args, 2, { 0xff, 0xff } },
{ &b2_rd, 2, { 0xff, 0xf0 } },
{ &b2_rd_li, 2, { 0xff, 0x03 } },
{ &b2_rd_rs_rs2, 2, { 0xff, 0xf0 } },
{ &b2_rs2_uimm8, 2, { 0xff, 0xf0 } },
{ &b2_rs2_uimm8_, 2, { 0xff, 0xf0 } },
{ &b2_rs_cr, 2, { 0xff, 0xff } },
{ &b2_rs, 2, { 0xff, 0xf0 } },
{ &b2_rs_, 2, { 0xff, 0xf0 } },
{ &b2_rs_rd, 2, { 0xff, 0xff } },
{ &b2_sz, 2, { 0xff, 0xfc } },
{ &b2_sz_ld_rd_cd, 2, { 0xff, 0xf0 } },
{ &b2_sz_ri_rb_rd, 2, { 0xff, 0xc0 } },
{ &b2_sz_ri_rb_rd_u,2, { 0xff, 0xe0 } },
{ &b2_sz_ri_rb_rs, 2, { 0xff, 0xc0 } },
{ &b2_sz_rs, 2, { 0xff, 0xc0 } },
{ &b3_imm1, 3, { 0xff, 0xff, 0xef } },
{ &b3_imm3_ld_rd, 3, { 0xff, 0xe0, 0x0f } },
{ &b3_imm4, 3, { 0xff, 0xff, 0xf0 } },
{ &b3_imm5_rd, 3, { 0xff, 0xe0, 0xf0 } },
{ &b3_ld_rs_rd, 3, { 0xff, 0xfc, 0xff } },
{ &b3_li_cr, 3, { 0xff, 0xf3, 0xf0 } },
{ &b3_li_rd, 3, { 0xff, 0xf3, 0xf0 } },
{ &b3_mi_ld_rs_rd, 3, { 0xff, 0x3c, 0xff } },
{ &b3_rd_imm32, 3, { 0xff, 0xff, 0xf0 } },
{ &b3_rd, 3, { 0xff, 0xff, 0xf0 } }
};
struct opcode_t
{
int instruction;
void (*function)(insn_t*);
uchar opcodes[4];
};
static struct opcode_t opcodes[] = {
{ RX63_abs, &b2_rd, { 0x7e, 0x20 } },
{ RX63_abs_, &b2_rs_rd, { 0xfc, 0x0f } },
{ RX63_adc, &b3_li_rd, { 0xfd, 0x70, 0x20 } },
{ RX63_adc, &b2_rs_rd, { 0xfc, 0x0b } },
{ RX63_adc, &b3_ld_rs_rd, { 0x06, 0xa0, 0x02 } },
{ RX63_add, &b1_imm4_rd, { 0x62 } },
{ RX63_add, &b1_ld_rs_rd, { 0x48 } },
{ RX63_add, &b2_mi_ld_rs_rd, { 0x06, 0x08 } },
{ RX63_add_, &b1_li_rs2_rd, { 0x70 } },
{ RX63_add_, &b2_rd_rs_rs2, { 0xff, 0x20 } },
{ RX63_and, &b1_imm4_rd, { 0x64 } },
{ RX63_and, &b2_li_rd, { 0x74, 0x20 } },
{ RX63_and, &b1_ld_rs_rd, { 0x50 } },
{ RX63_and, &b2_mi_ld_rs_rd, { 0x06, 0x10 } },
{ RX63_and_, &b2_rd_rs_rs2, { 0xff, 0x40 } },
{ RX63_bclr, &b2_ld_rd_imm3, { 0xf0, 0x08 } },
{ RX63_bclr, &b2_ld_rd_rs, { 0xfc, 0x64 } },
{ RX63_bclr, &b1_imm5_rd, { 0x7a } },
{ RX63_b, &b1_cd_dsp_s, { 0x10 } },
{ RX63_b, &b1_cd_dsp_b, { 0x20 } },
{ RX63_b, &b1_cd_dsp_w, { 0x3a } },
{ RX63_bm, &b2_imm3_ld_rd_cd, { 0xfc, 0xe0 } },
{ RX63_bm, &b2_imm5_cd_rd, { 0xfd, 0xe0 } },
{ RX63_bnot, &b3_imm3_ld_rd, { 0xfc, 0xe0, 0x0f } },
{ RX63_bnot, &b2_ld_rd_rs, { 0xfc, 0x6c } },
{ RX63_bnot, &b3_imm5_rd, { 0xfd, 0xe0, 0xf0 } },
{ RX63_bra, &b1_dsp, { 0x08 } },
{ RX63_bra, &b1_pcdsp8, { 0x2e } },
{ RX63_bra, &b1_pcdsp16, { 0x38 } },
{ RX63_bra, &b1_pcdsp24, { 0x04 } },
{ RX63_bra, &b2_rs, { 0x7f, 0x40 } },
{ RX63_brk, &b1_no_args, { 0x00 } },
{ RX63_bset, &b2_ld_rd_imm3, { 0xf0, 0x00 } },
{ RX63_bset, &b2_ld_rd_rs, { 0xfc, 0x60 } },
{ RX63_bset, &b1_imm5_rd, { 0x78 } },
{ RX63_bsr, &b1_pcdsp16, { 0x39 } },
{ RX63_bsr, &b1_pcdsp24, { 0x05 } },
{ RX63_bsr, &b2_rs, { 0x7f, 0x50 } },
{ RX63_btst, &b2_ld_rd_imm3, { 0xf4, 0x00 } },
{ RX63_btst, &b2_ld_rd_rs, { 0xfc, 0x68 } },
{ RX63_btst, &b1_imm5_rd, { 0x7c } },
{ RX63_clrpsw, &b2_cb, { 0x7f, 0xb0 } },
{ RX63_cmp, &b1_imm4_rd, { 0x61 } },
{ RX63_cmp, &b2_rs2_uimm8, { 0x75, 0x50 } },
{ RX63_cmp, &b2_li_rd, { 0x74, 0x00 } },
{ RX63_cmp, &b1_ld_rs_rd, { 0x44 } },
{ RX63_cmp, &b2_mi_ld_rs_rd, { 0x06, 0x04 } },
{ RX63_div, &b3_li_rd, { 0xfd, 0x70, 0x80 } },
{ RX63_div, &b2_ld_rs_rd_ub, { 0xfc, 0x20 } },
{ RX63_div, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x08 } },
{ RX63_divu, &b3_li_rd, { 0xfd, 0x70, 0x90 } },
{ RX63_divu, &b2_ld_rs_rd_ub, { 0xfc, 0x24 } },
{ RX63_divu, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x09 } },
{ RX63_emul, &b3_li_rd, { 0xfd, 0x70, 0x60 } },
{ RX63_emul, &b2_ld_rs_rd_ub, { 0xfc, 0x18 } },
{ RX63_emul, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x06 } },
{ RX63_emulu, &b3_li_rd, { 0xfd, 0x70, 0x70 } },
{ RX63_emulu, &b2_ld_rs_rd_ub, { 0xfc, 0x1c } },
{ RX63_emulu, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x07 } },
{ RX63_fadd, &b3_rd_imm32, { 0xfd, 0x72, 0x20 } },
{ RX63_fadd, &b2_ld_rs_rd_l, { 0xfc, 0x88 } },
{ RX63_fcmp, &b3_rd_imm32, { 0xfd, 0x72, 0x10 } },
{ RX63_fcmp, &b2_ld_rs_rd_l, { 0xfc, 0x84 } },
{ RX63_fdiv, &b3_rd_imm32, { 0xfd, 0x72, 0x40 } },
{ RX63_fdiv, &b2_ld_rs_rd_l, { 0xfc, 0x90 } },
{ RX63_fmul, &b3_rd_imm32, { 0xfd, 0x72, 0x30 } },
{ RX63_fmul, &b2_ld_rs_rd_l, { 0xfc, 0x8c } },
{ RX63_fsub, &b3_rd_imm32, { 0xfd, 0x72, 0x00 } },
{ RX63_fsub, &b2_ld_rs_rd_l, { 0xfc, 0x80 } },
{ RX63_ftoi, &b2_ld_rs_rd_l, { 0xfc, 0x94 } },
{ RX63_int, &b2_imm8, { 0x75, 0x60 } },
{ RX63_itof, &b2_ld_rs_rd_ub, { 0xfc, 0x44 } },
{ RX63_itof, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x11 } },
{ RX63_jmp, &b2_rs_, { 0x7f, 0x00 } },
{ RX63_jsr, &b2_rs_, { 0x7f, 0x10 } },
{ RX63_machi, &b2_rs_rd, { 0xfd, 0x04 } },
{ RX63_maclo, &b2_rs_rd, { 0xfd, 0x05 } },
{ RX63_max, &b3_li_rd, { 0xfd, 0x70, 0x40 } },
{ RX63_max, &b2_ld_rs_rd_ub, { 0xfc, 0x10 } },
{ RX63_max, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x04 } },
{ RX63_min, &b3_li_rd, { 0xfd, 0x70, 0x50 } },
{ RX63_min, &b2_ld_rs_rd_ub, { 0xfc, 0x14 } },
{ RX63_min, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x05 } },
{ RX63_mov, &b1_sz_rd7_rs, { 0x80 } },
{ RX63_mov, &b1_sz_rs7_rd7, { 0x88 } },
{ RX63_mov, &b1_imm4_rd_, { 0x66 } },
{ RX63_mov, &b1_sz_rd, { 0x3c } },
{ RX63_mov, &b2_rs2_uimm8_, { 0x75, 0x40 } },
{ RX63_mov, &b2_rd_li, { 0xfb, 0x02 } },
{ RX63_mov, &b1_sz_rs_rd, { 0xcf } },
{ RX63_mov, &b1_ld_rd_li_sz, { 0xf8 } },
{ RX63_mov, &b1_sz_ld_rs_rd, { 0xcc } },
{ RX63_mov, &b2_sz_ri_rb_rd, { 0xfe, 0x40 } },
{ RX63_mov, &b1_sz_ld_rd_rs, { 0xc3 } },
{ RX63_mov, &b2_sz_ri_rb_rs, { 0xfe, 0x00 } },
{ RX63_mov, &b1_sz_ldd_lds_rs_rd, { 0xc0 } },
{ RX63_mov, &b2_ad_sz_rds, { 0xfd, 0x20 } },
{ RX63_movu, &b1_sz_rd7_rs7, { 0xb0 } },
{ RX63_movu, &b1_sz_ld_rs_rd_u, { 0x58 } },
{ RX63_movu, &b2_sz_ri_rb_rd_u, { 0xfe, 0xc0 } },
{ RX63_movu, &b2_ad_sz_rs_rd, { 0xfd, 0x30 } },
{ RX63_mul, &b1_imm4_rd, { 0x63 } },
{ RX63_mul, &b2_li_rd, { 0x74, 0x10 } },
{ RX63_mul, &b1_ld_rs_rd, { 0x4c } },
{ RX63_mul, &b2_mi_ld_rs_rd, { 0x06, 0x0c } },
{ RX63_mul, &b2_rd_rs_rs2, { 0xff, 0x30 } },
{ RX63_mulhi, &b2_rs_rd, { 0xfd, 0x00 } },
{ RX63_mullo, &b2_rs_rd, { 0xfd, 0x01 } },
{ RX63_mvfachi, &b3_rd, { 0xfd, 0x1f, 0x00 } },
{ RX63_mvfacmi, &b3_rd, { 0xfd, 0x1f, 0x20 } },
{ RX63_mvfc, &b2_cr_rd, { 0xfd, 0x6a } },
{ RX63_mvtachi, &b3_rd, { 0xfd, 0x17, 0x00 } },
{ RX63_mvtaclo, &b3_rd, { 0xfd, 0x17, 0x10 } },
{ RX63_mvtc, &b3_li_cr, { 0xfd, 0x73, 0x00 } },
{ RX63_mvtc, &b2_rs_cr, { 0xfd, 0x68 } },
{ RX63_mvtipl, &b3_imm4, { 0x75, 0x70, 0x00 } },
{ RX63_neg, &b2_rd, { 0x7e, 0x10 } },
{ RX63_neg_, &b2_rs_rd, { 0xfc, 0x07 } },
{ RX63_nop, &b1_no_args, { 0x03 } },
{ RX63_not, &b2_rd, { 0x7e, 0x00 } },
{ RX63_not_, &b2_rs_rd, { 0xfc, 0x3b } },
{ RX63_or, &b1_imm4_rd, { 0x65 } },
{ RX63_or, &b2_li_rd, { 0x74, 0x30 } },
{ RX63_or, &b1_ld_rs_rd, { 0x54 } },
{ RX63_or, &b2_mi_ld_rs_rd, { 0x06, 0x14 } },
{ RX63_or_, &b2_rd_rs_rs2, { 0xff, 0x50 } },
{ RX63_pop, &b2_rd, { 0x7e, 0xb0 } },
{ RX63_popc, &b2_cr, { 0x7e, 0xe0 } },
{ RX63_popm, &b1_rd_rd2, { 0x6f } },
{ RX63_push, &b2_sz_rs, { 0x7e, 0x80 } },
{ RX63_push, &b2_ld_rs_sz, { 0xf4, 0x08 } },
{ RX63_pushc, &b2_cr_, { 0x7e, 0xc0 } },
{ RX63_pushm, &b1_rd_rd2, { 0x6e } },
{ RX63_racw, &b3_imm1, { 0xfd, 0x18, 0x00 } },
{ RX63_revl, &b2_rs_rd, { 0xfd, 0x67 } },
{ RX63_revw, &b2_rs_rd, { 0xfd, 0x65 } },
{ RX63_rmpa, &b2_sz, { 0x7f, 0x8c } },
{ RX63_rolc, &b2_rd, { 0x7e, 0x50 } },
{ RX63_rorc, &b2_rd, { 0x7e, 0x40 } },
{ RX63_rotl, &b2_imm5_rd, { 0xfd, 0x6e } },
{ RX63_rotl, &b2_rs_rd, { 0xfd, 0x66 } },
{ RX63_rotr, &b2_imm5_rd, { 0xfd, 0x6c } },
{ RX63_rotr, &b2_rs_rd, { 0xfd, 0x64 } },
{ RX63_round, &b2_ld_rs_rd_l, { 0xfc, 0x98 } },
{ RX63_rte, &b2_no_args, { 0x7f, 0x95 } },
{ RX63_rtfi, &b2_no_args, { 0x7f, 0x94 } },
{ RX63_rts, &b1_no_args, { 0x02 } },
{ RX63_rtsd, &b1_uimm8, { 0x67 } },
{ RX63_rtsd, &b1_rd_rd2_imm8, { 0x3f } },
{ RX63_sat, &b2_rd, { 0x7e, 0x30 } },
{ RX63_satr, &b2_no_args, { 0x7f, 0x93 } },
{ RX63_sbb, &b2_rs_rd, { 0xfc, 0x03 } },
{ RX63_sbb, &b3_ld_rs_rd, { 0x06, 0xa0, 0x00 } },
{ RX63_sc, &b2_sz_ld_rd_cd, { 0xfc, 0xd0 } },
{ RX63_scmpu, &b2_no_args, { 0x7f, 0x83 } },
{ RX63_setpsw, &b2_cb, { 0x7f, 0xa0 } },
{ RX63_shar, &b1_imm5_rd, { 0x6a } },
{ RX63_shar, &b2_rs_rd, { 0xfd, 0x61} },
{ RX63_shar_, &b2_imm5_rs2_rd, { 0xfd, 0xa0} },
{ RX63_shll, &b1_imm5_rd, { 0x6c } },
{ RX63_shll, &b2_rs_rd, { 0xfd, 0x62} },
{ RX63_shll_, &b2_imm5_rs2_rd, { 0xfd, 0xc0} },
{ RX63_shlr, &b1_imm5_rd, { 0x68 } },
{ RX63_shlr, &b2_rs_rd, { 0xfd, 0x60} },
{ RX63_shlr_, &b2_imm5_rs2_rd, { 0xfd, 0x80} },
{ RX63_smovb, &b2_no_args, { 0x7f, 0x8b } },
{ RX63_smovf, &b2_no_args, { 0x7f, 0x8f } },
{ RX63_smovu, &b2_no_args, { 0x7f, 0x87 } },
{ RX63_sstr, &b2_sz, { 0x7f, 0x88 } },
{ RX63_stnz, &b3_li_rd, { 0xfd, 0x70, 0xf0 } },
{ RX63_stz, &b3_li_rd, { 0xfd, 0x70, 0xe0 } },
{ RX63_sub, &b1_imm4_rd, { 0x60 } },
{ RX63_sub, &b1_ld_rs_rd, { 0x40 } },
{ RX63_sub, &b2_mi_ld_rs_rd, { 0x06, 0x00 } },
{ RX63_sub_, &b2_rd_rs_rs2, { 0xff, 0x00 } },
{ RX63_suntil, &b2_sz, { 0x7f, 0x80 } },
{ RX63_swhile, &b2_sz, { 0x7f, 0x84 } },
{ RX63_tst, &b3_li_rd, { 0xfd, 0x70, 0xc0 } },
{ RX63_tst, &b2_ld_rs_rd_ub, { 0xfc, 0x30 } },
{ RX63_tst, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x0c } },
{ RX63_wait, &b2_no_args, { 0x7f, 0x96 } },
{ RX63_xchg, &b2_ld_rs_rd_ub, { 0xfc, 0x40 } },
{ RX63_xchg, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x10 } },
{ RX63_xor, &b3_li_rd, { 0xfd, 0x70, 0xd0 } },
{ RX63_xor, &b2_ld_rs_rd_ub, { 0xfc, 0x34 } },
{ RX63_xor, &b3_mi_ld_rs_rd, { 0x06, 0x20, 0x0d } },
};
enum parse_result_t
{
parse_result_tnomatch = 0,
parse_result_tmatch = 1,
parse_result_tparty_match = 2
};
parse_result_t parse_opcode(int stage,insn_t *insn, uchar opcode, void (*function)(insn_t*))
{
bool function_found = false;
int i;
for(i = 0; i < qnumber( function_descs ); i++)
{
if ( function_descs[i].function == function)
{
function_found = true;
break;
}
}
if (!function_found || function_descs[i].opcode_count < stage+1)
return parse_result_tnomatch;
uchar code = get_hl8( insn->ea + stage);
if ((code & function_descs[i].mask[stage]) != opcode)
return parse_result_tnomatch;
return stage + 1 == function_descs[i].opcode_count ? parse_result_tmatch : parse_result_tparty_match;
}
int idaapi ana( insn_t *_insn ) {
insn_t &insn = *_insn;
bool nomatches [ qnumber(opcodes) ]= {false};
bool fl_exit = false;
int stage = 0;
insn.size = 0;
insn.auxpref = (uint32)condition_tnone;
while(stage < 3 && !fl_exit)
{
for (int i = 0; i < qnumber(opcodes); i++)
{
if (nomatches[i])
continue;
parse_result_t res = parse_opcode(stage, &insn, opcodes[i].opcodes[stage], opcodes[i].function);
if (res == parse_result_tmatch)
{
insn.itype = opcodes[i].instruction;
opcodes[i].function(&insn);
if (insn.size != 0)
{
fl_exit = true;;
break;
}
else
{
nomatches[i] = true;
}
}
else if (res == parse_result_tnomatch)
{
nomatches[i] = true;
}
}
stage++;
}
return insn.size;
}
|
a30540fe2239470f7b78b1c658cc641d9dccc41d | 4ea6fbfd6eff19395ba8e5a1da33e712e8d23aca | /apps/simple/block-profiling.cpp | 86d9a9175219fe5cc99841676809e435c770a80e | [] | no_license | nanding0701/DyFuse_model | 968e3e66fda6eefe661eaa0d6b0429e388261e0f | 481f2d6b454a69ddbf8336915dee251ff72cf6ff | refs/heads/main | 2023-08-15T12:31:37.498876 | 2021-10-14T00:11:30 | 2021-10-14T00:11:30 | 416,920,417 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 9,707 | cpp | block-profiling.cpp | #include <otx/otx.h>
#include <Scheduler.h>
#include <algorithm>
#include <iomanip>
#include "../util/GrB_util.h"
#include "common.h"
extern "C" {
#include <GraphBLAS.h>
}
struct TaskArgs {
GrB_Matrix C;
GrB_Matrix M;
GrB_Matrix A;
GrB_Matrix B;
GrB_Descriptor descriptor;
int nthreads;
// TaskInfo *taskInfo;
};
starpu_task *createTask(starpu_codelet *cl, GrB_Matrix C, GrB_Matrix M, GrB_Matrix A, GrB_Matrix B,
bool transposeA, bool transposeB, int nthreads) {
auto task = starpu_task_create();
task->cl = cl;
auto args = static_cast<TaskArgs *>(malloc(sizeof(TaskArgs)));
args->C = C;
args->M = M;
args->A = A;
args->B = B;
GrB_Descriptor desc;
OK(GrB_Descriptor_new(&desc));
OK(GxB_Desc_set(desc, GrB_OUTP, GrB_REPLACE));
if (transposeA) { OK(GxB_Desc_set(desc, GrB_INP0, GrB_TRAN)); }
if (transposeB) { OK(GxB_Desc_set(desc, GrB_INP1, GrB_TRAN)); }
OK(GxB_Desc_set(desc, GxB_DESCRIPTOR_NTHREADS, 1));
args->descriptor = desc;
args->nthreads = nthreads;
task->cl_arg = args;
task->cl_arg_size = sizeof(TaskArgs);
task->cl_arg_free = 1;
return task;
}
void starpuBlocked(Scheduler &scheduler, GrB_Matrix M, GrB_Matrix A, GrB_Matrix B, bool transposeA, bool transposeB,
size_t nblocksM, size_t nblocksN, size_t nblocksL,
size_t witer, size_t niter, int ncores, const std::vector<int> &concurrencyClasses) {
assert(nblocksL == 1);
assert(ncores >= *std::max_element(concurrencyClasses.begin(), concurrencyClasses.end()));
for (auto it : concurrencyClasses) { assert(ncores % it == 0); }
// TODO: use witer
GrB_Matrix *bC, *bM, *bA, *bB;
createMxMBlocks(M, A, B, transposeA, transposeB, nblocksM, nblocksN, nblocksL, GrB_UINT64, &bC, &bM, &bA, &bB);
// region init codelet
starpu_codelet cl{};
starpu_codelet_init(&cl);
cl.cpu_funcs[0] = [](void *buffers[], void *clArgs) {
auto args = static_cast<TaskArgs *>(clArgs);
OK(GxB_Desc_set(args->descriptor, GxB_DESCRIPTOR_NTHREADS, args->nthreads));
GrB_Index nrows, ncols;
GrB_Matrix_nrows(&nrows, args->C);
GrB_Matrix_ncols(&ncols, args->C);
GrB_Matrix_new(&args->C, GrB_UINT64, nrows, ncols);
OK(GrB_mxm(args->C, args->M, GrB_NULL, GrB_PLUS_TIMES_SEMIRING_UINT64, args->A, args->B, args->descriptor));
OK(GrB_Matrix_free(&args->C));
};
cl.nbuffers = 0;
// endregion
auto *dupC = new GrB_Matrix[ncores];
auto *dupM = new GrB_Matrix[ncores];
auto *dupA = new GrB_Matrix[ncores];
auto *dupB = new GrB_Matrix[ncores];
for (int nthreads : concurrencyClasses) {
int nworkers = ncores / nthreads;
for (int i = 0; i < nworkers; i++) {
scheduler.mergeWorkers(i * nthreads, nthreads);
}
scheduler.waitForAll();
for (size_t i = 0; i < nblocksM; i++) {
for (size_t j = 0; j < nblocksN; j++) {
for (size_t k = 0; k < nblocksL; k++) {
size_t idxC = i * nblocksN + j;
size_t idxM = i * nblocksN + j;
size_t idxA = !transposeA ? i * nblocksL + k : k * nblocksL + i;
size_t idxB = !transposeB ? k * nblocksL + j : j * nblocksL + k;
// Create block duplicates
for (int w = 0; w < nworkers; w++) {
GrB_Matrix_dup(&dupC[w], bC[idxC]);
GrB_Matrix_dup(&dupM[w], bM[idxM]);
GrB_Matrix_dup(&dupA[w], bA[idxA]);
GrB_Matrix_dup(&dupB[w], bB[idxB]);
}
// Single task
double singleTaskTime = 0;
for (size_t iter = 0; iter < niter; iter++) {
scheduler.waitForAll();
timer_start();
scheduler.submitTask(createTask(&cl, dupC[0], dupM[0], dupA[0], dupB[0],
transposeA, transposeB, nthreads), 0, nthreads);
scheduler.waitForAll();
double iterTime = timer_end();
singleTaskTime += iterTime;
}
// Multi task
double multiTaskTime = 0;
for (size_t iter = 0; iter < niter; iter++) {
scheduler.waitForAll();
timer_start();
for (int w = 0; w < nworkers; w++) {
scheduler.submitTask(createTask(&cl, dupC[0], dupM[0], dupA[0], dupB[0],
transposeA, transposeB, nthreads), w * nthreads, nthreads);
}
scheduler.waitForAll();
double iterTime = timer_end();
// std::cout << nthreads << "," << i << "-" << j << "-" << k << "," << iterTime << std::endl;
multiTaskTime += iterTime;
}
// Multi task - copy
double multiTaskCopyTime = 0;
for (size_t iter = 0; iter < niter; iter++) {
scheduler.waitForAll();
timer_start();
for (int w = 0; w < nworkers; w++) {
scheduler.submitTask(createTask(&cl, dupC[w], dupM[w], dupA[w], dupB[w],
transposeA, transposeB, nthreads), w * nthreads, nthreads);
}
scheduler.waitForAll();
double iterTime = timer_end();
// std::cout << nthreads << "," << i << "-" << j << "-" << k << "," << iterTime << std::endl;
multiTaskCopyTime += iterTime;
}
// Free block duplicates
for (int w = 0; w < nworkers; w++) {
GrB_Matrix_free(&dupC[w]);
GrB_Matrix_free(&dupM[w]);
GrB_Matrix_free(&dupA[w]);
GrB_Matrix_free(&dupB[w]);
}
std::cout << "LOG-blocked;" << std::setw(3) << nthreads << ";"
<< std::setw(10)
<< (std::to_string(nblocksM) + "x" + std::to_string(nblocksN) + "x" +
std::to_string(nblocksL)) << ";"
<< std::setw(10) <<
(std::to_string(i) + "," + std::to_string(j) + "," + std::to_string(k)) << ";"
<< std::setprecision(8) << std::setw(15) << singleTaskTime / niter << ";"
<< std::setprecision(8) << std::setw(15) << multiTaskTime / niter << ";"
<< std::setprecision(8) << std::setw(15) << multiTaskCopyTime / niter
<< std::endl;
}
}
}
for (int i = 0; i < nworkers; i++) {
scheduler.splitWorker(i * nthreads, nthreads, 1);
}
scheduler.waitForAll();
}
freeMxMBlocks(bC, bM, bA, bB, nblocksM, nblocksN, nblocksL);
}
int main(int argc, char *argv[]) {
auto pathA = otx::argTo<std::string>(argc, argv, "-A", INPUTS_DIR"/simple");
auto niter = otx::argTo<size_t>(argc, argv, "--niter", 1);
auto witer = otx::argTo<size_t>(argc, argv, "--witer", 0);
auto nthreads = otx::argTo<int>(argc, argv, {"--nthreads"}, 1);
auto nblocks = otx::argTo<size_t>(argc, argv, {"--nblocks"}, 1);
auto nblocksMin = otx::argTo<size_t>(argc, argv, {"--nblocksMin"}, nblocks);
auto nblocksMax = otx::argTo<size_t>(argc, argv, {"--nblocksMax"}, nblocks);
auto executeBaseline = otx::argTo<int>(argc, argv, {"--baseline"}, 0);
auto executeBlockedBaseline = otx::argTo<int>(argc, argv, {"--blockedBaseline"}, 0);
auto executeSpu = otx::argTo<int>(argc, argv, {"--starpu"}, 0);
/* region init libraries */
GrB_init(GrB_BLOCKING);
GxB_Global_Option_set(static_cast<GxB_Option_Field>(GxB_NTHREADS), nthreads);
/* endregion */
// Read the input for triangle counting
GrB_Matrix L, U, M;
readLU(&L, &U, pathA.c_str(), false, GrB_UINT64);
GrB_Matrix_dup(&M, L);
// Baseline
if (executeBaseline) {
baselineTricnt(pathA.c_str(), L, L, U, witer, niter);
}
if (executeBlockedBaseline) {
for (size_t b = nblocksMin; b <= nblocksMax; b++) {
baselineBlockedTricnt(pathA.c_str(), L, L, U, witer, niter, b, b, 1);
}
}
if (executeSpu) {
// Init scheduler
Scheduler scheduler;
auto nworkers = scheduler.getNumWorkers();
switch (nworkers) {
case 12:
scheduler.start({12, 6, 3, 1});
break;
case 64:
scheduler.start({64, 32, 16, 8, 1});
break;
default:
std::cerr << "Unsupported number of threads: " << nworkers << std::endl;
exit(1);
};
for (size_t b = nblocksMin; b <= nblocksMax; b++) {
starpuBlocked(scheduler, M, L, U, false, true, b, b, 1,
witer, niter, nthreads, scheduler.getConcurrencyClasses());
std::cout << "LOG" << std::endl;
}
scheduler.stop();
}
GrB_Matrix_free(&M);
GrB_Matrix_free(&L);
GrB_Matrix_free(&U);
GrB_finalize();
}
|
7d495a727f25fe0bbe4eead021a17eb039259239 | df872c79b4547a12874fdaee0a363d1a3415c361 | /AStar-Traditional.cpp | 708c0451329c9aaed55b4a68a1d3fa7b1447b105 | [
"MIT"
] | permissive | ugokce/Efficent-Path-Finding-Algorithms | b06985af349c123bd76406700a8ae406cea0f186 | 7f4766cad5b8229ac6adb323209e34b5f47e7b5d | refs/heads/master | 2022-12-15T05:46:03.940822 | 2020-07-06T22:46:45 | 2020-07-06T22:46:45 | 296,418,955 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,805 | cpp | AStar-Traditional.cpp | #include <stdio.h>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cmath>
#define Weight 10;
template <typename T>
struct Vector2
{
Vector2() = default;
Vector2(T xValue, T yValue)
{
x = xValue;
y = yValue;
}
static T Distance(Vector2<T> firstPosition, Vector2<T> secondPosition)
{
return sqrt((firstPosition.x - secondPosition.x) * (firstPosition.x - secondPosition.x) +
(firstPosition.y - secondPosition.y) * (firstPosition.y - secondPosition.y));
}
static T ManhattanDistance(Vector2<T> firstPosition, Vector2<T> secondPosition)
{
return abs(firstPosition.x - secondPosition.x) + abs(firstPosition.y - secondPosition.y);
}
T x;
T y;
};
//Base structure of the grid system
struct GridNode
{
public:
GridNode()
{
isTraversable = false;
isVisited = false;
distanceToTarget = std::numeric_limits<int>::max();
localDistance = std::numeric_limits<int>::max();
position = Vector2<float>(0, 0);
parentNode = nullptr;
}
bool isTraversable = false;
bool isVisited = false;
float distanceToTarget;
float localDistance;
void SetPosition(const Vector2<float> newPosition)
{
position = newPosition;
}
Vector2<float> GetPosition()
{
return position;
}
float GetPositionX() const
{
return position.x;
}
float GetPositionY() const
{
return position.y;
}
void AddNeighbour(GridNode* neighbour)
{
neighbours.push_back(neighbour);
}
std::vector<GridNode*> GetNeighbours()
{
return neighbours;
}
GridNode* GetParentNode() const
{
return parentNode;
}
void SetParentNode(GridNode* newParent)
{
parentNode = newParent;
}
bool operator()(float targetDistanceA, float targetDistanceB) const
{
return targetDistanceA < targetDistanceB;
}
private:
std::vector<GridNode*> neighbours;
GridNode* parentNode;
Vector2<float> position;
};
//
bool IsObstacle(char input)
{
return input == '\0' ? true : false;
}
//With this method, i am assuring that the next neighbour node isnt out of bounds and not and obstacle
bool IsValidGrid(const int index, const int mapSize, const unsigned char* pMap)
{
return index >= 0 && index < mapSize && !IsObstacle(pMap[index]);
}
//Explore and initialize possible neighbours for a specific GridNode
void AssignNeighbourNodes(GridNode* gridNodes, GridNode* currentNode, const int nMapWidth, const int nMapHeight, const unsigned char* pMap)
{
const int index = currentNode->GetPositionY() * nMapWidth + currentNode->GetPositionX();
const int rightNeighbourIndex = index + 1;
const int leftNeighbourIndex = index - 1;
const int upNeighbourIndex = index - nMapWidth;
const int downNeighbourIndex = index + nMapWidth;
const int gridSize = nMapWidth * nMapHeight;
if (IsValidGrid(rightNeighbourIndex, gridSize, pMap) && currentNode->GetPositionX() < nMapWidth - 1)
{
gridNodes[rightNeighbourIndex].SetPosition(Vector2<float>(currentNode->GetPositionX() + 1, currentNode->GetPositionY()));
gridNodes[rightNeighbourIndex].isTraversable = true;
gridNodes[index].AddNeighbour(&gridNodes[rightNeighbourIndex]);
}
if (IsValidGrid(leftNeighbourIndex, gridSize, pMap) && currentNode->GetPositionX() > 0)
{
gridNodes[leftNeighbourIndex].SetPosition(Vector2<float>(currentNode->GetPositionX() - 1, currentNode->GetPositionY()));
gridNodes[leftNeighbourIndex].isTraversable = true;
gridNodes[index].AddNeighbour(&gridNodes[leftNeighbourIndex]);
}
if (IsValidGrid(upNeighbourIndex, gridSize, pMap) && currentNode->GetPositionY() > 0)
{
gridNodes[upNeighbourIndex].SetPosition(Vector2<float>(currentNode->GetPositionX(), currentNode->GetPositionY() - 1));
gridNodes[upNeighbourIndex].isTraversable = true;
gridNodes[index].AddNeighbour(&gridNodes[upNeighbourIndex]);
}
if (IsValidGrid(downNeighbourIndex, gridSize, pMap) && currentNode->GetPositionY() < nMapHeight - 1)
{
gridNodes[downNeighbourIndex].SetPosition(Vector2<float>(currentNode->GetPositionX(), currentNode->GetPositionY() + 1));
gridNodes[downNeighbourIndex].isTraversable = true;
gridNodes[index].AddNeighbour(&gridNodes[downNeighbourIndex]);
}
}
int GetPath(GridNode* startNode, GridNode* targetNode, int* pOutBuffer, const int nMapWidth)
{
int gridStepCount = 0;
auto* parentNode = targetNode;
while (parentNode != nullptr)
{
if (parentNode == startNode)
{
break;
}
const int nodeArrayIndex = parentNode->GetPositionY() * nMapWidth + parentNode->GetPositionX();
pOutBuffer[gridStepCount] = nodeArrayIndex;
gridStepCount++;
parentNode = parentNode->GetParentNode();
if (parentNode == nullptr)
{
pOutBuffer[gridStepCount] = 0;
gridStepCount = 0;
return -1;
}
}
std::reverse(pOutBuffer, pOutBuffer + gridStepCount);
return gridStepCount;
}
void UpdateNeighbours(GridNode* currentNode, GridNode* targetNode, std::vector<GridNode*>& unTestedNodes)
{
for (auto* neighbourNode : currentNode->GetNeighbours())
{
if (!neighbourNode->isVisited && neighbourNode->isTraversable)
unTestedNodes.push_back(neighbourNode);
float calculatedLocalDistance = currentNode->localDistance + Vector2<float>::ManhattanDistance(currentNode->GetPosition(),
neighbourNode->GetPosition());
if (calculatedLocalDistance < neighbourNode->localDistance)
{
neighbourNode->SetParentNode(currentNode);
neighbourNode->localDistance = calculatedLocalDistance;
const float heuristic = Vector2<float>::ManhattanDistance(neighbourNode->GetPosition(),
targetNode->GetPosition());
neighbourNode->distanceToTarget = neighbourNode->localDistance + heuristic * Weight;
}
}
}
int FindPath(const int nStartX, const int nStartY, const int nTargetX, const int nTargetY, const unsigned char* pMap,
const int nMapWidth, const int nMapHeight, int* pOutBuffer, const int nOutBufferSize)
{
GridNode* gridNodes = new GridNode[nMapWidth * nMapHeight];
GridNode* startNode = &gridNodes[nStartY * nMapWidth + nStartX];
startNode->SetPosition(Vector2<float>(nStartX, nStartY));
GridNode* targetNode = &gridNodes[nTargetY * nMapWidth + nTargetX];
targetNode->SetPosition(Vector2<float>(nTargetX, nTargetY));
if (startNode == targetNode)
{
return 0;
}
GridNode* currentNode = startNode;
startNode->localDistance = 0.0f;
startNode->distanceToTarget = Vector2<float>::ManhattanDistance(startNode->GetPosition(), targetNode->GetPosition());
std::vector<GridNode*> unTestedNodes;
unTestedNodes.push_back(startNode);
while (!unTestedNodes.empty() && currentNode != targetNode)
{
std::sort(unTestedNodes.begin(), unTestedNodes.end());
while (!unTestedNodes.empty() && unTestedNodes.front()->isVisited)
{
unTestedNodes.erase(unTestedNodes.begin());
}
if(unTestedNodes.empty())
break;
currentNode = unTestedNodes.front();
currentNode->isVisited = true;
AssignNeighbourNodes(gridNodes, currentNode, nMapWidth, nMapHeight, pMap);
UpdateNeighbours(currentNode, targetNode, unTestedNodes);
}
gridNodes = nullptr;
unTestedNodes.clear();
return GetPath(startNode, targetNode, pOutBuffer, nMapWidth);
} |
1d40db2e34eef89dc4c1d6f9f875e3134e82671a | 0b11c8c54b1e71ae935ea032376e785be8bfb65e | /1782_wyx.cpp | fdbc8abe796959429154e41cbafcbe0fd324c7f2 | [] | no_license | wyx150137/wyx-infinity37-ac-code-on-BZOJ | 320bef65927b065c938dec97c44fc599fac14176 | 5a1cc0803e0356e59f6e679e6aed23f8374ab67b | refs/heads/master | 2020-06-25T01:45:51.676298 | 2017-07-12T23:45:45 | 2017-07-12T23:45:45 | 96,950,945 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,947 | cpp | 1782_wyx.cpp |
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#define lowbit(x) ((x)&(-x))
#define N 100000+5
#define M 200000+5
using namespace std;
int n;
int head[N];
int size[N],depth[N];
int top[N],fa[N];
int w[N],sz;
inline int read()
{
int x=0,f=1;char ch = getchar();
while(ch < '0' || ch > '9'){if(ch == '-')f=-1;ch = getchar();}
while(ch >='0' && ch <='9'){x=(x<<1)+(x<<3)+ch - '0';ch = getchar();}
return x*f;
}
struct graph
{
int next,to;
graph () {}
graph (int _next,int _to)
:next(_next),to(_to){}
}edge[M];
inline void add(int x,int y)
{
static int cnt = 0;
edge[++cnt] = graph(head[x],y);
head[x] = cnt;
edge[++cnt] = graph(head[y],x);
head[y] =cnt;
}
void DFS1(int x)
{
size[x] = 1;
for(int i=head[x] ; i ; i=edge[i].next)
if(edge[i].to!=fa[x])
{
depth[edge[i].to ] =depth[x]+1;
fa[edge[i].to] = x;
DFS1(edge[i].to);
size[x] += size[edge[i].to];
}
}
void DFS2(int x,int chain)
{
top[x] = chain;w[x] = ++sz;
int k = 0;
for(int i=head[x] ; i ; i=edge[i].next)
if(edge[i].to!=fa[x]&&size[k] < size[edge[i].to])
k = edge[i].to;
if(!k)return;
DFS2(k,chain);
for(int i=head[x] ; i ; i=edge[i].next)
if(edge[i].to!=fa[x]&&edge[i].to!=k)
DFS2(edge[i].to,edge[i].to);
}
int T[N];
void updata(int x,int num)
{
while(x<=n)
{
T[x] += num;
x += lowbit(x);
}
}
int ask(int x)
{
int ans = 0;
while(x)
{
ans += T[x];
x -= lowbit(x);
}
return ans;
}
int solveask(int x,int y)
{
int ans = 0;
while(top[x]!=top[y])
{
if(depth[top[x]] < depth[top[y]])swap(x,y);
ans += ask(w[x])-ask(w[top[x]]-1);
//cout<<w[x] << " " << w[top[x]]-1<<endl;
x = fa[top[x]];
}
if(depth[x] > depth[y])swap(x,y);
ans += ask(w[y])-ask(w[x]-1);
return ans;
}
int main()
{
n = read();
for(int i=1;i<n;++i)
{
int x=read(),y=read();
add(x,y);
}
DFS1(1);
DFS2(1,1);
for(int i=1;i<=n;++i)
{
int x = read();
printf("%d\n",solveask(x,1));
updata(w[x],1);
}
}
|
1cb98477035e13b09d6ad9cbceb159cef838905b | 5ce902c690583a93c12a03da49201e6b3e6c3381 | /src/graphics/Size2D.cpp | 0c942a409e77f6b55d1ff7fe8897a77b60297cf8 | [] | no_license | raynardbrown/graphics | 44471109a76645ab4796495d0321d29dcbc242ef | fb6babc46df61667669e34e77a742be4db2988c1 | refs/heads/master | 2020-11-27T15:48:07.573134 | 2020-06-18T03:24:59 | 2020-06-18T03:55:03 | 229,517,838 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,042 | cpp | Size2D.cpp | ////////////////////////////////////////////////////////////////////////////////
//
// File: Size2D.cpp
//
// Author: Raynard Brown
//
// Copyright (c) 2020 Raynard Brown
//
// All rights reserved.
//
////////////////////////////////////////////////////////////////////////////////
#include "graphics/Size2D.h"
Size2D::Size2D(int width, int height)
:width(width),
height(height)
{
}
Size2D::Size2D(const Size2D * size2D)
:width(0),
height(0)
{
if(size2D)
{
width = size2D->getWidth();
height = size2D->getHeight();
}
}
Size2D::~Size2D()
{
}
int Size2D::getWidth() const
{
return this->width;
}
int Size2D::getHeight() const
{
return this->height;
}
void Size2D::setSize(int width, int height)
{
this->width = width;
this->height = height;
}
void Size2D::setSize(const Size2D * size2D)
{
if(size2D)
{
this->width = size2D->getWidth();
this->height = size2D->getHeight();
}
else
{
this->width = 0;
this->height = 0;
}
}
|
190d175c28cd387ebc0c8fe5fe2a9ca8850d3c9e | 69089974531355a74ccb9d2618952de2de30d4b5 | /Lab 3/matrixIterator.h | b917d4a975a834cfc66d16fc447cbb3d300661c5 | [] | no_license | GhermanCristian/Sem2_DSA | 4dd6bd3784df23912bc8fce796fcff0e58aafa2b | d8d28a91753fb4ea2824119428281bbb879d7171 | refs/heads/master | 2021-02-12T17:08:58.107801 | 2020-06-02T21:22:06 | 2020-06-02T21:22:06 | 244,610,034 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 864 | h | matrixIterator.h | #pragma once
#include "Matrix.h"
using namespace std;
class Matrix;
class MatrixIterator{
friend class Matrix;
private:
int currentLine;
int currentColumn;
const Matrix& currentMatrix;
MatrixIterator(const Matrix& crtMatrix, int line);
public:
TElem getCurrent();
/*
- BC : theta(1), when the element is on the first position in the line
- AC : theta(n),
- WC : theta(n), when the element is on the last position in the line
*/
// throws exception if the position is invalid
bool valid();
// checks if the current position is valid
// BC/AC/WC: theta(1)
void next();
// advances to the next position; throws exception if there is not valid position left
// BC/AC/WC: theta(1)
// throws exception if the position is invalid
void first();
// sets the iterator on the first position
// BC/AC/WC: theta(1)
};
|
0071436ed99aa82a2c3c002ce52ea1901bb74578 | 796fcd015c7d444189384c73f6539ff343d492d2 | /source/cpp/Unused/CCM_DistributionFuns.h | f5a1f57a11363fd49a8133eb2c56e63a08155ae4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hardmanko/CatContModel | 50e999ab2cdc931d8e2c2e4ee208a7cd7473393c | 94a27cf8cf6b1c664e9e7b887d8c3c0b22c5d602 | refs/heads/master | 2023-08-31T06:56:27.760526 | 2023-08-26T22:20:06 | 2023-08-26T22:20:06 | 63,280,312 | 9 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 218 | h | CCM_DistributionFuns.h | #pragma once
#include "CCM_Main.h"
namespace CatCont {
// Functions related to distributions from UtilityFunctions.h/cpp and CCM_Util.h/cpp
// Maybe some other stuff about transformations?
} // namespace CatCont |
7023efa0b692212d636d2a24a19b3107654a78a7 | fbe68d84e97262d6d26dd65c704a7b50af2b3943 | /third_party/virtualbox/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp | 5847b54d7c2ce0f3e121aafa6a65f03aca02740a | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"GPL-2.0-or-later",
"MPL-1.0",
"LicenseRef-scancode-generic-exception",
"Apache-2.0",
"OpenSSL",
"MIT"
] | permissive | thalium/icebox | c4e6573f2b4f0973b6c7bb0bf068fe9e795fdcfb | 6f78952d58da52ea4f0e55b2ab297f28e80c1160 | refs/heads/master | 2022-08-14T00:19:36.984579 | 2022-02-22T13:10:31 | 2022-02-22T13:10:31 | 190,019,914 | 585 | 109 | MIT | 2022-01-13T20:58:15 | 2019-06-03T14:18:12 | C++ | UTF-8 | C++ | false | false | 14,705 | cpp | UIMachineLogicNormal.cpp | /* $Id: UIMachineLogicNormal.cpp $ */
/** @file
* VBox Qt GUI - UIMachineLogicNormal class implementation.
*/
/*
* Copyright (C) 2010-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* you can redistribute it and/or modify it under the terms of the GNU
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifdef VBOX_WITH_PRECOMPILED_HEADERS
# include <precomp.h>
#else /* !VBOX_WITH_PRECOMPILED_HEADERS */
/* Qt includes: */
# ifndef VBOX_WS_MAC
# include <QTimer>
# endif /* !VBOX_WS_MAC */
/* GUI includes: */
# include "VBoxGlobal.h"
# include "UIDesktopWidgetWatchdog.h"
# include "UIMessageCenter.h"
# include "UISession.h"
# include "UIActionPoolRuntime.h"
# include "UIMachineLogicNormal.h"
# include "UIMachineWindow.h"
# include "UIMenuBarEditorWindow.h"
# include "UIStatusBarEditorWindow.h"
# include "UIExtraDataManager.h"
# include "UIFrameBuffer.h"
# ifndef VBOX_WS_MAC
# include "QIMenu.h"
# else /* VBOX_WS_MAC */
# include "VBoxUtils.h"
# endif /* VBOX_WS_MAC */
/* COM includes: */
# include "CConsole.h"
# include "CDisplay.h"
#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
UIMachineLogicNormal::UIMachineLogicNormal(QObject *pParent, UISession *pSession)
: UIMachineLogic(pParent, pSession, UIVisualStateType_Normal)
#ifndef VBOX_WS_MAC
, m_pPopupMenu(0)
#endif /* !VBOX_WS_MAC */
{
}
bool UIMachineLogicNormal::checkAvailability()
{
/* Normal mode is always available: */
return true;
}
void UIMachineLogicNormal::sltCheckForRequestedVisualStateType()
{
LogRel(("GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=%d, Machine-state=%d\n",
uisession()->requestedVisualState(), uisession()->machineState()));
/* Do not try to change visual-state type if machine was not started yet: */
if (!uisession()->isRunning() && !uisession()->isPaused())
return;
/* Do not try to change visual-state type in 'manual override' mode: */
if (isManualOverrideMode())
return;
/* Check requested visual-state types: */
switch (uisession()->requestedVisualState())
{
/* If 'seamless' visual-state type is requested: */
case UIVisualStateType_Seamless:
{
/* And supported: */
if (uisession()->isGuestSupportsSeamless())
{
LogRel(("GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: "
"Going 'seamless' as requested...\n"));
uisession()->setRequestedVisualState(UIVisualStateType_Invalid);
uisession()->changeVisualState(UIVisualStateType_Seamless);
}
else
LogRel(("GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: "
"Rejecting 'seamless' as is it not yet supported...\n"));
break;
}
default:
break;
}
}
#ifndef RT_OS_DARWIN
void UIMachineLogicNormal::sltInvokePopupMenu()
{
/* Popup main-menu if present: */
if (m_pPopupMenu && !m_pPopupMenu->isEmpty())
{
m_pPopupMenu->popup(activeMachineWindow()->geometry().center());
QTimer::singleShot(0, m_pPopupMenu, SLOT(sltHighlightFirstAction()));
}
}
#endif /* RT_OS_DARWIN */
void UIMachineLogicNormal::sltOpenMenuBarSettings()
{
/* Do not process if window(s) missed! */
AssertReturnVoid(isMachineWindowsCreated());
#ifndef VBOX_WS_MAC
/* Make sure menu-bar is enabled: */
const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->isChecked();
AssertReturnVoid(fEnabled);
#endif /* !VBOX_WS_MAC */
/* Prevent user from opening another one editor or toggle menu-bar: */
actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(false);
#ifndef VBOX_WS_MAC
actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->setEnabled(false);
#endif /* !VBOX_WS_MAC */
/* Create menu-bar editor: */
UIMenuBarEditorWindow *pMenuBarEditor = new UIMenuBarEditorWindow(activeMachineWindow(), actionPool());
AssertPtrReturnVoid(pMenuBarEditor);
{
/* Configure menu-bar editor: */
connect(pMenuBarEditor, SIGNAL(destroyed(QObject*)),
this, SLOT(sltMenuBarSettingsClosed()));
#ifdef VBOX_WS_MAC
connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
pMenuBarEditor, SLOT(sltActivateWindow()));
#endif /* VBOX_WS_MAC */
/* Show window: */
pMenuBarEditor->show();
}
}
void UIMachineLogicNormal::sltMenuBarSettingsClosed()
{
#ifndef VBOX_WS_MAC
/* Make sure menu-bar is enabled: */
const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->isChecked();
AssertReturnVoid(fEnabled);
#endif /* !VBOX_WS_MAC */
/* Allow user to open editor and toggle menu-bar again: */
actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings)->setEnabled(true);
#ifndef VBOX_WS_MAC
actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)->setEnabled(true);
#endif /* !VBOX_WS_MAC */
}
#ifndef RT_OS_DARWIN
void UIMachineLogicNormal::sltToggleMenuBar()
{
/* Do not process if window(s) missed! */
AssertReturnVoid(isMachineWindowsCreated());
/* Invert menu-bar availability option: */
const bool fEnabled = gEDataManager->menuBarEnabled(vboxGlobal().managedVMUuid());
gEDataManager->setMenuBarEnabled(!fEnabled, vboxGlobal().managedVMUuid());
}
#endif /* !RT_OS_DARWIN */
void UIMachineLogicNormal::sltOpenStatusBarSettings()
{
/* Do not process if window(s) missed! */
AssertReturnVoid(isMachineWindowsCreated());
/* Make sure status-bar is enabled: */
const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
AssertReturnVoid(fEnabled);
/* Prevent user from opening another one editor or toggle status-bar: */
actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(false);
actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(false);
/* Create status-bar editor: */
UIStatusBarEditorWindow *pStatusBarEditor = new UIStatusBarEditorWindow(activeMachineWindow());
AssertPtrReturnVoid(pStatusBarEditor);
{
/* Configure status-bar editor: */
connect(pStatusBarEditor, SIGNAL(destroyed(QObject*)),
this, SLOT(sltStatusBarSettingsClosed()));
#ifdef VBOX_WS_MAC
connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
pStatusBarEditor, SLOT(sltActivateWindow()));
#endif /* VBOX_WS_MAC */
/* Show window: */
pStatusBarEditor->show();
}
}
void UIMachineLogicNormal::sltStatusBarSettingsClosed()
{
/* Make sure status-bar is enabled: */
const bool fEnabled = actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->isChecked();
AssertReturnVoid(fEnabled);
/* Allow user to open editor and toggle status-bar again: */
actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings)->setEnabled(true);
actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility)->setEnabled(true);
}
void UIMachineLogicNormal::sltToggleStatusBar()
{
/* Do not process if window(s) missed! */
AssertReturnVoid(isMachineWindowsCreated());
/* Invert status-bar availability option: */
const bool fEnabled = gEDataManager->statusBarEnabled(vboxGlobal().managedVMUuid());
gEDataManager->setStatusBarEnabled(!fEnabled, vboxGlobal().managedVMUuid());
}
void UIMachineLogicNormal::sltHandleActionTriggerViewScreenToggle(int iIndex, bool fEnabled)
{
/* Enable/disable guest keeping current size: */
ULONG uWidth, uHeight, uBitsPerPixel;
LONG uOriginX, uOriginY;
KGuestMonitorStatus monitorStatus = KGuestMonitorStatus_Enabled;
display().GetScreenResolution(iIndex, uWidth, uHeight, uBitsPerPixel, uOriginX, uOriginY, monitorStatus);
if (!fEnabled)
{
display().SetVideoModeHint(iIndex, false, false, 0, 0, 0, 0, 0);
uisession()->setScreenVisibleHostDesires(iIndex, false);
}
else
{
/* Defaults: */
if (!uWidth)
uWidth = 800;
if (!uHeight)
uHeight = 600;
display().SetVideoModeHint(iIndex, true, false, 0, 0, uWidth, uHeight, 32);
uisession()->setScreenVisibleHostDesires(iIndex, true);
}
}
void UIMachineLogicNormal::sltHandleActionTriggerViewScreenResize(int iIndex, const QSize &size)
{
/* Resize guest to required size: */
display().SetVideoModeHint(iIndex, uisession()->isScreenVisible(iIndex),
false, 0, 0, size.width(), size.height(), 0);
}
void UIMachineLogicNormal::sltHostScreenAvailableAreaChange()
{
#ifdef VBOX_WS_X11
/* Prevent handling if fake screen detected: */
if (gpDesktop->isFakeScreenDetected())
return;
/* Make sure all machine-window(s) have previous but normalized geometry: */
foreach (UIMachineWindow *pMachineWindow, machineWindows())
if (!pMachineWindow->isMaximized())
pMachineWindow->restoreCachedGeometry();
#endif /* VBOX_WS_X11 */
/* Call to base-class: */
UIMachineLogic::sltHostScreenAvailableAreaChange();
}
void UIMachineLogicNormal::prepareActionConnections()
{
/* Call to base-class: */
UIMachineLogic::prepareActionConnections();
/* Prepare 'View' actions connections: */
connect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
this, SLOT(sltChangeVisualStateToFullscreen()));
connect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
this, SLOT(sltChangeVisualStateToSeamless()));
connect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
this, SLOT(sltChangeVisualStateToScale()));
connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),
this, SLOT(sltOpenMenuBarSettings()));
#ifndef VBOX_WS_MAC
connect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),
this, SLOT(sltToggleMenuBar()));
#endif /* !VBOX_WS_MAC */
connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
this, SLOT(sltOpenStatusBarSettings()));
connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
this, SLOT(sltToggleStatusBar()));
connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenToggle(int, bool)),
this, SLOT(sltHandleActionTriggerViewScreenToggle(int, bool)));
connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenResize(int, const QSize&)),
this, SLOT(sltHandleActionTriggerViewScreenResize(int, const QSize&)));
}
void UIMachineLogicNormal::prepareMachineWindows()
{
/* Do not create machine-window(s) if they created already: */
if (isMachineWindowsCreated())
return;
#ifdef VBOX_WS_MAC /// @todo Is that really need here?
/* We have to make sure that we are getting the front most process.
* This is necessary for Qt versions > 4.3.3: */
::darwinSetFrontMostProcess();
#endif /* VBOX_WS_MAC */
/* Get monitors count: */
ulong uMonitorCount = machine().GetMonitorCount();
/* Create machine window(s): */
for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId)
addMachineWindow(UIMachineWindow::create(this, uScreenId));
/* Order machine window(s): */
for (ulong uScreenId = uMonitorCount; uScreenId > 0; -- uScreenId)
machineWindows()[uScreenId - 1]->raise();
/* Listen for frame-buffer resize: */
foreach (UIMachineWindow *pMachineWindow, machineWindows())
connect(pMachineWindow, SIGNAL(sigFrameBufferResize()),
this, SIGNAL(sigFrameBufferResize()));
emit sigFrameBufferResize();
/* Mark machine-window(s) created: */
setMachineWindowsCreated(true);
}
#ifndef VBOX_WS_MAC
void UIMachineLogicNormal::prepareMenu()
{
/* Prepare popup-menu: */
m_pPopupMenu = new QIMenu;
AssertPtrReturnVoid(m_pPopupMenu);
{
/* Prepare popup-menu: */
foreach (QMenu *pMenu, actionPool()->menus())
m_pPopupMenu->addMenu(pMenu);
}
}
#endif /* !VBOX_WS_MAC */
#ifndef VBOX_WS_MAC
void UIMachineLogicNormal::cleanupMenu()
{
/* Cleanup popup-menu: */
delete m_pPopupMenu;
m_pPopupMenu = 0;
}
#endif /* !VBOX_WS_MAC */
void UIMachineLogicNormal::cleanupMachineWindows()
{
/* Do not destroy machine-window(s) if they destroyed already: */
if (!isMachineWindowsCreated())
return;
/* Mark machine-window(s) destroyed: */
setMachineWindowsCreated(false);
/* Cleanup machine-window(s): */
foreach (UIMachineWindow *pMachineWindow, machineWindows())
UIMachineWindow::destroy(pMachineWindow);
}
void UIMachineLogicNormal::cleanupActionConnections()
{
/* "View" actions disconnections: */
disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SIGNAL(triggered(bool)),
this, SLOT(sltChangeVisualStateToFullscreen()));
disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SIGNAL(triggered(bool)),
this, SLOT(sltChangeVisualStateToSeamless()));
disconnect(actionPool()->action(UIActionIndexRT_M_View_T_Scale), SIGNAL(triggered(bool)),
this, SLOT(sltChangeVisualStateToScale()));
disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_S_Settings), SIGNAL(triggered(bool)),
this, SLOT(sltOpenMenuBarSettings()));
#ifndef VBOX_WS_MAC
disconnect(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility), SIGNAL(triggered(bool)),
this, SLOT(sltToggleMenuBar()));
#endif /* !VBOX_WS_MAC */
disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_S_Settings), SIGNAL(triggered(bool)),
this, SLOT(sltOpenStatusBarSettings()));
disconnect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
this, SLOT(sltToggleStatusBar()));
/* Call to base-class: */
UIMachineLogic::cleanupActionConnections();
}
|
b0f92932b35dd174c4c3855c8a8210569db3b5c6 | 987d6b1057402bf364e9ffdac89fd45f280c1c05 | /FF/coreassets/nwbusiness/nwpwrfil.h | a38777cb62b526b5bf68000ffe77cb070a4c598d | [] | no_license | SteveZiZi/FeesCharged | ed1199de7c7007062d5dcb66d228c18bc727133b | a3983378d89fa77643cd0f7fb4e112ca0f91bc59 | refs/heads/master | 2021-03-13T04:08:40.881614 | 2017-03-10T08:00:58 | 2017-03-10T08:00:58 | 84,532,826 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 15,597 | h | nwpwrfil.h | /**
* @file
* @brief 集中器能量数据文件存取操作集
* @author
* @date 2009-11-24
* @version v1.0
* @note
* 1、同一个FN费率须以最大的那个为准,不足部分填充无效数据0xEE。可以依FN不同
* 2、同一个重点户FN数据点数只能固定为某个数据值(24的倍数)。可以依FN不同
*/
#ifndef __NWB_POWER_FILE_H__
#define __NWB_POWER_FILE_H__
#include "basedef.h"
#include "basetype.h"
#include "nwbtype.h"
#include "fileop.h"
#define CLASS2_FILE_VERSION "1.00"
/** @brief 数据标识类型*/
#define DI_TYPE_VIP "vip"
#define DI_TYPE_DAY "day"
#define DI_TYPE_MON "mon"
#define DI_TYPE_GTH "gth"
/** @brief 数据冻结密度
*/
enum S_DataDensity
{
DATA_DENSITY_TERM = 0,//终端按终端实际存储数据的时间间隔
DATA_DENSITY_MIN01, // 1 分钟
DATA_DENSITY_MIN05, // 5 分钟
DATA_DENSITY_MIN15, // 15 分钟
DATA_DENSITY_MIN30, // 30 分钟
DATA_DENSITY_MIN60, // 60 分钟
DATA_DENSITY_DAY01, // 1日
DATA_DENSITY_MON01, // 1月
DATA_DENSITY_MAX
};
/**
* @class S_VIPT DataFile.h "share/DataFile.h"
* @brief 重点户时标定义
* @see 《上行规约》5.13.1.3.2 曲线类数据时标Td_c
*/
struct S_VIPT
{
S_TIME m_time;
INT8U m_DataDots;
S_DataDensity m_DataDensity;
};
struct S_DataCond
{
S_TIME m_timeBegin;
S_TIME m_timeEnd;
S_DataDensity m_DataDensity;
};
/**
* @class S_DiTraffic DataFile.h "share/DataFile.h"
* @brief 费率数据项结构定义
* @see 《上行规约》5.13.1.3.2 曲线类数据时标Td_c
*/
struct S_TariffDi
{
INT32U m_DI;
INT32U m_BaseLen;
};
/** @brief 数据文件格式
* 文件头格式排列
* |文件标识|最大测量点号|电表保存记录数|记录长度|
* |---16---|------2-----|-------2------|---2----|
* |记录标准时间|记录间隔时间|记录间隔单位|保留|校验|
* |-----8------|------1-----|------1-----|-14-|--2-|
* //数据文件头共48个字节,考虑了适当的冗余
*
* 能量数据区格式
* |能量数据区标识|电能表地址|队尾|队头|
* |-------10-----|-----6----|--1-|--1-|
* |记录时标|开始标志|数据标志/记录长度|记录长度|记录1能量数据|
* |--3or4--|----1---|---4b-------4b---|---1----|------N------|
* |记录时标|开始标志|数据标志/记录长度|记录长度|记录2能量数据|
* |--3or4--|----1---|---4b-------4b---|---1----|------N------|
* |记录时标|开始标志|数据标志/记录长度|记录长度|记录3能量数据|
* |--3or4--|----1---|---4b-------4b---|---1----|------N------|
* //共有“最大测量点号”个能量数据区
*/
/** @brief 文件头偏移定义 */
#define DF_SIGNATURE_OFF 0
#define DF_SIGNATURE_SIZE 16
#define DF_MAXMP_OFF (DF_SIGNATURE_OFF+DF_SIGNATURE_SIZE)
#define DF_MAXMP_SIZE 2
#define DF_PIECEPM_OFF (DF_MAXMP_OFF+DF_MAXMP_SIZE)
#define DF_PIECEPM_SIZE 2
#define DF_RECORDLEN_OFF (DF_PIECEPM_OFF+DF_PIECEPM_SIZE)
#define DF_RECORDLEN_SIZE 2
#define DF_RECORDSTD_OFF (DF_RECORDLEN_OFF+DF_RECORDLEN_SIZE)
#define DF_RECORDSTD_SIZE 8
#define DF_RINTERVAL_OFF (DF_RECORDSTD_OFF+DF_RECORDSTD_SIZE)
#define DF_RINTERVAL_SIZE 1
#define DF_RINTERUNT_OFF (DF_RINTERVAL_OFF+DF_RINTERVAL_SIZE)
#define DF_RINTERUNT_SIZE 1
#define DF_VERSION_OFF (DF_RINTERUNT_OFF+DF_RINTERUNT_SIZE)
#define DF_VERSION_SIZE 6
#define DF_RESERVE_OFF (DF_VERSION_OFF+DF_VERSION_SIZE)
#define DF_RESERVE_SIZE 8
#define DF_CHECKSUM_OFF (DF_RESERVE_OFF+DF_RESERVE_SIZE)
#define DF_CHECKSUM_SIZE 2
#define DF_HEADER_SIZE (DF_SIGNATURE_SIZE+DF_MAXMP_SIZE+DF_PIECEPM_SIZE+DF_RECORDLEN_SIZE+DF_RECORDSTD_SIZE+DF_RINTERVAL_SIZE+DF_RINTERUNT_SIZE+DF_VERSION_SIZE+DF_RESERVE_SIZE+DF_CHECKSUM_SIZE)
/** @brief 能量数据区偏移 */
#define DF_EAREA_SIGNATURE_OFF 0
#define DF_EAREA_SIGNATURE_SIZE 10
#define DF_EAREA_MADDR_OFF (DF_EAREA_SIGNATURE_OFF+DF_EAREA_SIGNATURE_SIZE)
#define DF_EAREA_MADDR_SIZE 6
#define DF_EAREA_QTAIL_OFF (DF_EAREA_MADDR_OFF+DF_EAREA_MADDR_SIZE)
#define DF_EAREA_QTAIL_SIZE 1
#define DF_EAREA_QHEAD_OFF (DF_EAREA_QTAIL_OFF+DF_EAREA_QTAIL_SIZE)
#define DF_EAREA_QHEAD_SIZE 1
#define DF_TIME_SIZE 4
//#define DF_DAY_TIME_SIZE DF_TIME_SIZE
//#define DF_CBR_TIME_SIZE DF_TIME_SIZE
//#define DF_VIP_TIME_SIZE DF_TIME_SIZE
//#define DF_MON_TIME_SIZE 3
#define DF_RECORD_FLAG_SIZE 1
#define DF_RECORD_LEN_SIZE 2
#define DF_EAREA_INFO_SIZE (DF_EAREA_SIGNATURE_SIZE+DF_EAREA_MADDR_SIZE+DF_EAREA_QTAIL_SIZE+DF_EAREA_QHEAD_SIZE)
/** @brief 记录保存条数定义 */
#define RECORD_STORE_DAY_MAX 31
#define RECORD_STORE_MON_MAX 12
#define RECORD_STORE_VIP_MAX 10
#define RECORD_STORE_CBR_MAX 31
/** @brief 记录间隔单位 */
#define RECORD_INTER_UNIT_MIN ('m')
#define RECORD_INTER_UNIT_HOUR ('H')
#define RECORD_INTER_UNIT_DAY ('D')
#define RECORD_INTER_UNIT_MON ('M')
#define RECORD_VALID_FLAG ('R')
#define RECORD_INVALID_FLAG ('N')
#define NW_DATA_RECORD_LEN_MAX 4096
/** @brief 通用的数据文件头结构定义 */
struct S_DFHeader
{
INT8U m_Signature[DF_SIGNATURE_SIZE]; ///< 数据文件标志,目前存文件名
INT16U m_MaxMP; ///< 当前文件最大电能表测量点号
INT16U m_PiecePerMeter; ///< 本文件中每块电表保留的记录数
INT16U m_RecordLen; ///< 记录长度
INT8U m_RecordInterVal; ///< 记录时间间隔,重点户中指点数据的间隔
INT8U m_RecordInterUnt; ///< 记录时间间隔单位,重点户中指点数据间隔单位
S_TIME m_RecordStdT; ///< 记录参考时间
INT8U m_Version[DF_VERSION_SIZE];
INT16U m_CheckSum; ///< 文件头校验
public:
/** @brief 输出本结构体的值按文件头结构形式到缓冲中 */
int OutputBuffer(INT8U *pBuffer, int size);
/** @brief 从缓冲中获取文件头的数值 */
int GetFromBuffer(const INT8U *pBuffer, int size);
/** @brief 计算check sum */
int CalculateCheckSum(const INT8U *pBuffer, int size);
};
/** @brief 通用的能量数据区信息结构定义 */
struct S_EAreaInfo
{
INT8U Sign[DF_EAREA_SIGNATURE_SIZE];
INT8U MAddr[DF_EAREA_MADDR_SIZE];
INT8U QTail;
INT8U QHead;
/** @brief 从缓冲中获取数据 */
bool GetFromBuffer(const char *pbuf);
/** @brief 输出数据到缓冲 */
bool OutputBuffer(char *pbuf);
};
/**
* @class C_DataFileRW DataFile.h "share/DataFile.h"
* @brief the father of data file IO;
*/
class C_DBRW
{
public:
C_DBRW(void){m_DataDensity = DATA_DENSITY_DAY01; m_EnergyDataLen = 0;}
virtual ~C_DBRW(){}
public:
/** @brief 数据文件初始化 */
virtual bool InitDataFile(C_FILE &FileObj, INT32U FN, INT16U MaxMP, S_StoreMax &StoreMax) = 0;
/** @brief 获取一次写入数据的大小 */
virtual INT16U GetOnceWriteDataSize(void){return GetRecordLen();}
/** @brief 将时间按数据类型截齐 */
virtual S_TIME DataTimeTrim(S_TIME tm) = 0;
/** @brief 合并数据到记录 */
virtual int CombineRecord(string &strRecord, const S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 从数据区提取记录 */
virtual int ExtractRecord(const string &strRecord, S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 制作时标 */
virtual char *MakeTimeTag(char *TimeTag, S_TIME time);
/** @brief 记录大小核对 */
virtual bool CompareRecordSize(INT16U size);
/** @brief 读取一条数据记录 */
int Read(C_FILE &FileObj, S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 写入一条数据记录 */
int Write(C_FILE &FileObj, const S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 读取数据存储密度函数 */
S_DataDensity GetDensity(void);
/** @brief 增表后加大文件 */
bool AppendDataFile(C_FILE &FileObj, INT16U MaxMP);
/** @brief 获取记录长度 */
INT16U GetRecordLen(void){return m_Header.m_RecordLen;}
/** @brief 获取最大测量点号 */
INT16U GetMaxMP(void){return m_Header.m_MaxMP;}
/** @brief 写数据文件头标识 */
void InitDataFileSignature(INT8U *pbuff, INT32U FN, char *psign){sprintf((char*)pbuff, "%s_DI_%08X", psign, (unsigned int)FN);}
/** @brief 写能量数据区标识 */
void InitEAreaSignature(INT8U *pbuff, INT16U MP){sprintf((char*)pbuff, "meter%04d", MP);}
/** @brief 读取文件信息 */
int GetFileInfoHeader(C_FILE &FileObj);
/** @brief 设置重点户FN一天的数据点数 */
INT16U SetVipPoint(S_DataDensity DataDensity){m_DataDensity = DataDensity; return 0;}
/** @brief 设置初始数据度 */
INT16U SetEnergyDataLen(INT16U EnergyDataLen){return m_EnergyDataLen = EnergyDataLen;}
/** @brief 获取数据记录标志 */
INT8U GetDataRecordFlag(char Data){return (INT8U)((Data >> 4) & 0x0F);}
/** @brief 获取数据记录长度 */
INT16U GetDataRecordLen(char H, char L){return (((INT16U)(H & 0x0F)) << 8) | (((INT16U)L) & 0xFF);}
/** @brief 设置记录标志和长度 */
INT16U DataRecordLenFlag(INT8U flag, INT16U len);
/** @brief 断言文件版本信息 */
int AssertClass2FileVersion(const char *pExpectedVersion);
/** @brief 获取能量记录长度*/
int GetEnergyRecordSize(void);
/** @brief 提取记录,返回记录号 */
int FindReocrd(C_FILE &FileObj, string &strRecord, S_TIME DataTime);
protected:
/** @brief 获取FN要求的记录长度 */
INT16U GetRecordLenMax(INT32U FN);
/** @brief reset 数据文件 */
bool ResetDataFile(C_FILE &FileObj);
protected:
S_DFHeader m_Header;
S_DataDensity m_DataDensity;
INT16U m_EnergyDataLen;
};
/**
* @class C_DataFileRW_D DataFile.h "share/DataFile.h"
* @brief 日数据文件操作IO;
*/
class C_DBRW_D:public C_DBRW
{
public:
C_DBRW_D(void){}
~C_DBRW_D(){}
public:
/** @brief 数据文件初始化 */
bool InitDataFile(C_FILE &FileObj, INT32U FN, INT16U MaxMP, S_StoreMax &StoreMax);
/** @brief 将时间按数据类型截齐 */
S_TIME DataTimeTrim(S_TIME tm);
};
/**
* @class C_DataFileRW_M DataFile.h "share/DataFile.h"
* @brief 月数据文件操作IO;
*/
class C_DBRW_M:public C_DBRW
{
public:
C_DBRW_M(void){}
~C_DBRW_M(){}
public:
/** @brief 数据文件初始化 */
bool InitDataFile(C_FILE &FileObj, INT32U FN, INT16U MaxMP, S_StoreMax &StoreMax);
/** @brief 将时间按数据类型截齐 */
S_TIME DataTimeTrim(S_TIME tm);
/** @brief 制作时标 */
char *MakeTimeTag(char *TimeTag, S_TIME time);
};
/**
* @class C_DataFileRW_V DataFile.h "share/DataFile.h"
* @brief 重点户数据文件操作IO;
*/
class C_DBRW_V:public C_DBRW
{
public:
C_DBRW_V(void){}
~C_DBRW_V(){}
public:
/** @brief 数据文件初始化 */
bool InitDataFile(C_FILE &FileObj, INT32U FN, INT16U MaxMP, S_StoreMax &StoreMax);
/** @brief 获取一次写入数据的大小 */
INT16U GetOnceWriteDataSize(void){return (GetRecordLen()/((24*60)/m_Header.m_RecordInterVal)/*VIPDATA_POINT_PERDAY*/);}
/** @brief 将时间按数据类型截齐 */
S_TIME DataTimeTrim(S_TIME tm);
/** @brief 记录大小核对 */
bool CompareRecordSize(INT16U size);
/** @brief 合并数据到记录 */
int CombineRecord(string &strRecord, const S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 从数据区提取记录 */
int ExtractRecord(const string &strRecord, S_EnergyData &EnergyData, S_TIME DataTime);
};
/**
* @class C_DataFileRW_G DataFile.h "share/DataFile.h"
* @brief 抄表日数据文件操作IO;
*/
class C_DBRW_G:public C_DBRW
{
public:
C_DBRW_G(void){}
~C_DBRW_G(){}
public:
/** @brief 数据文件初始化 */
bool InitDataFile(C_FILE &FileObj, INT32U FN, INT16U MaxMP, S_StoreMax &StoreMax);
/** @brief 将时间按数据类型截齐 */
S_TIME DataTimeTrim(S_TIME tm);
};
/**
* @class C_DFRWFACT DataFile.h "share/DataFile.h"
* @brief 能量数据类读写实例工厂
*/
class C_DBRWFACT
{
public:
enum{CLASS2_UNKNOW, CLASS2_VIP, CLASS2_DAY, CLASS2_MON, CLASS2_GTH};
enum{CLASS2PN_UNKNOW, CLASS2PN_MPOINT, CLASS2PN_TGROUP, CLASS2PN_PORT, CLASS2PN_TERM};
/** @brief 获取一个数据读写实例 */
static C_DBRW *GetDataBlockRW(int ClassType);
/** @brief 释放一个数据读写实例 */
static void FreeDataBlockRW(C_DBRW *pDBRW);
/** @brief 获取二类数据FN类型 */
static int GetType4Class2FN(S_DataDensity DataDensity);
/** @brief 获取二类数据FN类型 */
static int GetType4Class2FN(char *pFnSign);
/** @brief 获取FN对应的PN意义*/
static int GetPnMean4Class2Fn(INT32U FN);
/** @brief 获取二类数据FN(费率)基础长度 */
static int GetDataBaseLen4Class2FN(INT32U FN);
/** @brief 获取VIP数据每天的点数*/
static int GetVipPointPerDay(S_DataDensity DataDensity);
/** @brief 获取重点户冻结时间间隔 */
static int GetVipFreezeIntervalM(S_DataDensity DataDensity);
};
/**
* @class C_DATAFILE DataFile.h "share/DataFile.h"
* @brief General data file OP.
*/
class C_DATAFILE
{
public:
enum{OPEN_READ, OPEN_WRITE};
public:
C_DATAFILE(const char *fPath, INT8U io, INT32U FN, S_DataDensity DataDensity);
C_DATAFILE(const char *fPath, INT8U io, INT32U FN);
~C_DATAFILE();
public:
/** @brief 读取一条记录 */
int Read(S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 写入一条记录 */
int Write(const S_EnergyData &EnergyData, S_TIME DataTime);
/** @brief 读取数据存储密度函数 */
int GetDensity(void);
/** @brief 判断实例是否可操作 */
bool operator!(void){return !m_File || m_pdbrw == NULL;}
/** @brief 判断是否新建 */
bool IsNew(void);
/** @brief 初始化数据文件 */
bool InitDataFile(INT16U MaxMP, S_StoreMax &StoreMax);
/** @brief 获取文件信息头 */
int GetFileHeader(void);
/** @brief 将时间按数据类型截齐 */
S_TIME DataTimeTrim(S_TIME tm);
/** @brief 设置重点户FN一天的数据点数 */
INT16U SetVipPoint(S_DataDensity DataDensity){return m_pdbrw->SetVipPoint(DataDensity);}
/** @brief 设置初始数据度 */
INT16U SetEnergyDataLen(INT16U EnergyDataLen){return m_pdbrw->SetEnergyDataLen(EnergyDataLen);}
/** @brief 判断是否为无效FN */
bool IsInvalidMP(INT16U MP){return (MP>NW_MP_MAX);}
/** @brief 记录大小核对 */
bool CompareRecordSize(INT16U size);
/** @备份数据文件*/
int Backup(const char *pBackupFile);
private:
C_DATAFILE(void);
/** @brief 获取数据类型 */
bool GetFileType(char *pBuf4B);
/** @brief 打开数据文件 */
bool Open(const char *pfile, INT8U io);
/** @brief 关闭数据文件 */
bool Close(void);
private:
INT32U m_FN;
C_FILE m_File;
C_DBRW *m_pdbrw;
};
class C_DFOP
{
public:
C_DFOP(S_WORD DayDataMax, S_WORD MonDataMax, S_WORD VipDataMax, S_WORD CbrDataMax, S_WORD TariffMax);
virtual ~C_DFOP(){}
/** @brief 二类数据写入函数
* @param[in] FN 国网要求的二类数据FN
* @param[in] MeterDatas 能量数据组,参见S_EnergyDatas定义
* @param[in] DataTime 时标
* @param[in] VipPointPerDay 重点户FN每天须要的数据点数据,仅过重点户FN有效
* @return 写入的记录条数
*/
virtual int WriteClass2Data(INT32U FN, const S_EnergyDatas &MeterDatas, S_TIME DataTime, S_DataDensity DataDensity);
/** @brief 二类数据读取函数
* @param[in] FN 国网要求的二类数据FN
* @param[inout] MeterDatas 能量数据组,参见S_EnergyDatas定义
* @param[in] DataTime 时标
* @return 读取的记录条数
*/
virtual int ReadClass2Data(INT32U FN, S_EnergyDatas &MeterDatas, S_TIME DataTime);
/** @brief 读取数据存储密度函数
* @param[in] FN 数据标识
* @return <=0:读取失败; >0:数据的存储密度
*/
virtual int GetDensity(INT32U FN);
private:
/** Set data file path */
char *MakeDataFilePath(INT32U FN);
private:
char m_FilePath[CFG_PATH_FILE_MAX_LEN];///<数据文件名
S_WORD m_TariffMax;
S_StoreMax m_StoreMax;
};
#endif//__NWB_POWER_FILE_H__
|
ea1d4a8f73844eff0c575a85e561c467fdbc9bee | 062db1a799c111ee5c51df5f2f2696d428e6cc5b | /src/LightweightGraph.cxx | c879c344ab077b6cc613cdc510400ebefd1e4195 | [
"MIT"
] | permissive | scott-snyder/lwtnn | 1c76dd1182cf5326f0ab45b4bbe628b8f8014111 | 95ecb14b45e6a1e40a9539fee810f4d5b965d6c3 | refs/heads/master | 2023-09-01T06:28:06.615208 | 2023-08-02T04:55:23 | 2023-08-02T04:55:23 | 76,580,675 | 0 | 0 | null | 2016-12-15T17:21:43 | 2016-12-15T17:21:43 | null | UTF-8 | C++ | false | false | 1,420 | cxx | LightweightGraph.cxx | #include "lwtnn/LightweightGraph.hh"
#include "lwtnn/generic/LightweightGraph.hh"
#include "lwtnn/generic/InputPreprocessor.hh"
#include "lwtnn/generic/Graph.hh"
#include "lwtnn/generic/eigen_typedefs.hh"
namespace lwt {
// ______________________________________________________________________
// Lightweight Graph
LightweightGraph::LightweightGraph(const GraphConfig& config,
std::string default_output) :
m_impl(new generic::LightweightGraph<double>(config, default_output))
{
}
LightweightGraph::~LightweightGraph()
{
}
ValueMap LightweightGraph::compute(const NodeMap& nodes,
const SeqNodeMap& seq) const {
return m_impl->compute(nodes, seq);
}
ValueMap LightweightGraph::compute(const NodeMap& nodes,
const SeqNodeMap& seq,
const std::string& output) const {
return m_impl->compute(nodes, seq, output);
}
VectorMap LightweightGraph::scan(const NodeMap& nodes,
const SeqNodeMap& seq) const {
return m_impl->scan(nodes, seq);
}
VectorMap LightweightGraph::scan(const NodeMap& nodes,
const SeqNodeMap& seq,
const std::string& output) const {
return m_impl->scan(nodes, seq, output);
}
} // namespace lwt
|
c0da824843908f70153a0c971239857d996dd886 | 662e36112643697e4f40b036a91c37436e3256d0 | /aslam_cv2/aslam_cv_cameras/test/test-camera-3d-lidar.cc | 78b898acb6ea8d5b921705e9aa479b940e0e7fb6 | [
"Apache-2.0"
] | permissive | ethz-asl/maplab | ca9e2cacd2fbaf9dac22b455e24a179f8613729a | 0b4868efeb292851d71f98d31a1e6bb40ebb244b | refs/heads/master | 2023-08-28T16:19:16.241444 | 2023-06-18T21:36:18 | 2023-06-18T21:36:18 | 112,253,403 | 2,488 | 755 | Apache-2.0 | 2023-06-18T21:36:19 | 2017-11-27T21:58:23 | C++ | UTF-8 | C++ | false | false | 9,520 | cc | test-camera-3d-lidar.cc | #include <Eigen/Core>
#include <eigen-checks/gtest.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <typeinfo>
#include <aslam/cameras/camera-3d-lidar.h>
#include <aslam/cameras/camera-factory.h>
#include <aslam/cameras/camera-pinhole.h>
#include <aslam/cameras/camera-unified-projection.h>
#include <aslam/cameras/camera.h>
#include <aslam/cameras/distortion-equidistant.h>
#include <aslam/cameras/distortion-fisheye.h>
#include <aslam/cameras/distortion-null.h>
#include <aslam/cameras/distortion-radtan.h>
#include <aslam/cameras/distortion.h>
#include <aslam/common/entrypoint.h>
#include <aslam/common/memory.h>
#include <aslam/common/numdiff-jacobian-tester.h>
#include <aslam/common/yaml-serialization.h>
///////////////////////////////////////////////
// Types to test
///////////////////////////////////////////////
template <typename Camera, typename Distortion>
struct CameraDistortion {
typedef Camera CameraType;
typedef Distortion DistortionType;
};
using testing::Types;
typedef Types<CameraDistortion<aslam::Camera3DLidar, aslam::NullDistortion>>
Implementations;
///////////////////////////////////////////////
// Test fixture
///////////////////////////////////////////////
template <class CameraDistortion>
class TestCameras : public testing::Test {
public:
typedef typename CameraDistortion::CameraType CameraType;
typedef typename CameraDistortion::DistortionType DistortionType;
protected:
TestCameras()
: camera_(CameraType::template createTestCamera<DistortionType>()){};
virtual ~TestCameras(){};
typename CameraType::Ptr camera_;
};
TYPED_TEST_CASE(TestCameras, Implementations);
TYPED_TEST(TestCameras, isVisible) {
const double ru = this->camera_->imageWidth();
const double rv = this->camera_->imageHeight();
Eigen::Vector2d keypoint1(0, 0);
EXPECT_TRUE(this->camera_->isKeypointVisible(keypoint1))
<< "Keypoint1: " << keypoint1;
Eigen::Vector2d keypoint2(ru - 1, rv - 1);
EXPECT_TRUE(this->camera_->isKeypointVisible(keypoint2))
<< "Keypoint2: " << keypoint2;
Eigen::Vector2d keypoint4(-1, 0);
EXPECT_FALSE(this->camera_->isKeypointVisible(keypoint4))
<< "Keypoint4: " << keypoint4;
Eigen::Vector2d keypoint5(-1, -1);
EXPECT_FALSE(this->camera_->isKeypointVisible(keypoint5))
<< "Keypoint5: " << keypoint5;
Eigen::Vector3d keypoint6(ru, rv, 1);
EXPECT_FALSE(this->camera_->isKeypointVisible(keypoint6.head<2>()))
<< "Keypoint6: " << keypoint6;
}
TYPED_TEST(TestCameras, isVisibleWithMargin) {
const double ru = this->camera_->imageWidth();
const double rv = this->camera_->imageHeight();
const double margin = 5.0;
Eigen::Vector2d keypoint1(margin, margin);
EXPECT_TRUE(this->camera_->isKeypointVisibleWithMargin(keypoint1, margin))
<< "Keypoint1: " << keypoint1;
Eigen::Vector2d keypoint2(ru - 1 - margin, rv - 1 - margin);
EXPECT_TRUE(this->camera_->isKeypointVisibleWithMargin(keypoint2, margin))
<< "Keypoint2: " << keypoint2;
Eigen::Vector2d keypoint4(0, 0);
EXPECT_FALSE(this->camera_->isKeypointVisibleWithMargin(keypoint4, margin))
<< "Keypoint4: " << keypoint4;
Eigen::Vector2f keypoint5(ru - 1, rv - 1);
EXPECT_FALSE(this->camera_->isKeypointVisibleWithMargin(keypoint5, 5.0f))
<< "Keypoint5: " << keypoint5;
Eigen::Vector3i keypoint6(ru, rv, 1);
EXPECT_FALSE(
this->camera_->isKeypointVisibleWithMargin(keypoint6.head<2>(), 5))
<< "Keypoint6: " << keypoint6;
}
TYPED_TEST(TestCameras, isProjectable) {
EXPECT_TRUE(this->camera_->isProjectable3(
Eigen::Vector3d(2, -1, 20))); // Approx. upper left corner.
EXPECT_TRUE(this->camera_->isProjectable3(
Eigen::Vector3d(2, 1, 20))); // Approx. lower left corner.
EXPECT_TRUE(this->camera_->isProjectable3(
Eigen::Vector3d(0.001, -5.734907715, 20))); // Approx. upper left corner.
EXPECT_TRUE(this->camera_->isProjectable3(
Eigen::Vector3d(0.001, 5.734907715, 20))); // Approx. lower left corner.
EXPECT_FALSE(this->camera_->isProjectable3(
Eigen::Vector3d(0.001, -5.734907715, 2))); // Outside image (too high)
EXPECT_FALSE(this->camera_->isProjectable3(
Eigen::Vector3d(0.001, 5.734907715, 2))); // Outside image (too low)
EXPECT_TRUE(this->camera_->isProjectable3(
Eigen::Vector3d(0.001, 0, 1))); // Left border
EXPECT_TRUE(this->camera_->isProjectable3(
Eigen::Vector3d(-0.001, 0, 1))); // Right border
EXPECT_TRUE(
this->camera_->isProjectable3(Eigen::Vector3d(0.001, 0, -1))); // Center
EXPECT_TRUE(
this->camera_->isProjectable3(Eigen::Vector3d(-0.001, 0, -1))); // Center
EXPECT_TRUE(
this->camera_->isProjectable3(Eigen::Vector3d(1, 0, 0))); // Right half
EXPECT_TRUE(
this->camera_->isProjectable3(Eigen::Vector3d(-1, 0, 0))); // Left half.
}
TYPED_TEST(TestCameras, CameraTest_isInvertible) {
const int N = 100;
const double depth = 10.0;
Eigen::Matrix3Xd points1(3, N);
Eigen::Matrix2Xd projections1(2, N);
Eigen::Matrix3Xd points2(3, N);
Eigen::Matrix3Xd points3(3, N);
Eigen::Matrix2Xd projections3(2, N);
Eigen::Vector3d point;
Eigen::Vector2d keypoint;
// N times, project and back-project a random point at a known depth.
// Then check that the back projection matches the projection.
for (size_t n = 0; n < N; ++n) {
points1.col(n) = this->camera_->createRandomVisiblePoint(depth);
if (this->camera_->project3(points1.col(n), &keypoint)
.getDetailedStatus() !=
aslam::ProjectionResult::Status::KEYPOINT_VISIBLE) {
LOG(ERROR) << "Projected point " << n << " is not in the image!";
}
projections1.col(n) = keypoint;
bool success = this->camera_->backProject3(keypoint, &point);
ASSERT_TRUE(success);
points2.col(n) = point * depth;
}
EXPECT_TRUE(EIGEN_MATRIX_NEAR(points1, points2, 1e-6));
// Do the same with the vectorized functions.
std::vector<aslam::ProjectionResult> result;
this->camera_->project3Vectorized(points1, &projections3, &result);
for (size_t n = 0; n < N; ++n) {
if (result[n].getDetailedStatus() !=
aslam::ProjectionResult::Status::KEYPOINT_VISIBLE) {
LOG(ERROR) << "Projected point " << n << " is not in the image!";
}
}
std::vector<unsigned char> success;
this->camera_->backProject3Vectorized(projections3, &points3, &success);
for (size_t n = 0; n < N; ++n) {
ASSERT_TRUE(success[n]);
points3.col(n) *= depth;
}
EXPECT_TRUE(EIGEN_MATRIX_NEAR(points1, points3, 1e-6));
}
TYPED_TEST(TestCameras, TestClone) {
aslam::Camera::Ptr cam1(this->camera_->clone());
EXPECT_TRUE(this->camera_.get() != nullptr); // Check both are valid objects.
EXPECT_TRUE(cam1.get() != nullptr);
EXPECT_TRUE(
this->camera_.get() !=
cam1.get()); // Check those are two different instances.
EXPECT_TRUE(
*(this->camera_) ==
*cam1); // Check that the copy is the same as the original.
// Check that the distortion object is copied aswell.
EXPECT_TRUE(&this->camera_->getDistortion() != &cam1->getDistortion());
// Check that the copy is the same as the original.
EXPECT_TRUE(this->camera_->getDistortion() == cam1->getDistortion());
}
TYPED_TEST(TestCameras, invalidMaskTest) {
// Die on empty mask.
cv::Mat mask;
EXPECT_DEATH(this->camera_->setMask(mask), "^");
// Die on wrong type.
mask = cv::Mat::zeros(
cv::Size2i(this->camera_->imageWidth(), this->camera_->imageHeight()),
CV_8UC2);
EXPECT_DEATH(this->camera_->setMask(mask), "^");
// Die on wrong size.
mask = cv::Mat::zeros(
cv::Size2i(this->camera_->imageWidth() - 1, this->camera_->imageHeight()),
CV_8UC1);
EXPECT_DEATH(this->camera_->setMask(mask), "^");
}
TYPED_TEST(TestCameras, validMaskTest) {
cv::Mat mask = cv::Mat::ones(
cv::Size2i(this->camera_->imageWidth(), this->camera_->imageHeight()),
CV_8UC1);
mask.at<uint8_t>(20, 10) = 0;
EXPECT_FALSE(this->camera_->hasMask());
this->camera_->setMask(mask);
EXPECT_TRUE(this->camera_->hasMask());
typedef Eigen::Vector2d Vec2;
EXPECT_TRUE(this->camera_->isMasked(Vec2(-1., -1.)));
EXPECT_FALSE(this->camera_->isMasked(Vec2(0., 0.)));
EXPECT_TRUE(this->camera_->isMasked(
Vec2(this->camera_->imageWidth(), this->camera_->imageHeight())));
EXPECT_FALSE(this->camera_->isMasked(Vec2(
this->camera_->imageWidth() - 1.1, this->camera_->imageHeight() - 1.1)));
EXPECT_FALSE(
this->camera_->isMasked(Vec2(0.0, this->camera_->imageHeight() - 1.1)));
EXPECT_FALSE(
this->camera_->isMasked(Vec2(this->camera_->imageWidth() - 1.1, 0.0)));
// Check the valid/invalid.
EXPECT_FALSE(this->camera_->isMasked(Vec2(2.0, 2.0)));
EXPECT_FALSE(this->camera_->isMasked(Vec2(9.0, 19.0)));
EXPECT_FALSE(this->camera_->isMasked(Vec2(10.0, 19.0)));
EXPECT_FALSE(this->camera_->isMasked(Vec2(10.0, 21.0)));
EXPECT_FALSE(this->camera_->isMasked(Vec2(11.0, 21.0)));
EXPECT_FALSE(this->camera_->isMasked(Vec2(9.0, 21.0)));
EXPECT_TRUE(this->camera_->isMasked(Vec2(10.0, 20.0)));
EXPECT_TRUE(this->camera_->isMasked(Vec2(10.5, 20.5)));
}
TYPED_TEST(TestCameras, YamlSerialization) {
ASSERT_NE(this->camera_, nullptr);
this->camera_->serializeToFile("test.yaml");
typename TypeParam::CameraType::Ptr camera =
aligned_shared<typename TypeParam::CameraType>();
bool success = camera->deserializeFromFile("test.yaml");
EXPECT_TRUE(success);
EXPECT_TRUE(camera->isEqual(*this->camera_.get(), true));
}
ASLAM_UNITTEST_ENTRYPOINT
|
2a786c338183800bc01bb099d67eb85d3b7e0ebe | 1e19224e3bd01383604354f2654e5f05ab97f789 | /Hackerrank/30-days-of-code/day_27.cpp | a751fd214e0e2754fdba19c72e11869a057a970b | [] | no_license | kiner-shah/CompetitiveProgramming | f67fdfeee189d9215c0b380197ca03ae2ae0efe1 | 8b3cea85bf99b099d18a978a209aa67030b75c9e | refs/heads/master | 2022-11-29T19:33:37.686989 | 2020-08-22T08:04:28 | 2020-08-22T08:04:28 | 102,189,359 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,323 | cpp | day_27.cpp | // Testing
#include <algorithm>
#include <iostream>
#include <stdexcept>
#include <vector>
#include <cassert>
#include <set>
using namespace std;
int minimum_index(vector<int> seq) {
if (seq.empty()) {
throw invalid_argument("Cannot get the minimum value index from an empty sequence");
}
int min_idx = 0;
for (int i = 1; i < seq.size(); ++i) {
if (seq[i] < seq[min_idx]) {
min_idx = i;
}
}
return min_idx;
}
#include <cstdlib>
#include <climits>
#include <cstring>
vector<int> v;
int pos;
int min1;
class TestDataEmptyArray {
public:
static vector<int> get_array() {
// complete this function
v.clear();
return v;
}
};
class TestDataUniqueValues {
public:
static vector<int> get_array() {
// complete this function
v.clear();
int x[10], xcnt = 0;
srand(time(NULL));
memset(x, 0, sizeof(x));
min1 = INT_MAX, pos = -1;
while(true) {
int k = rand() % 10 + 1;
if(x[k - 1] != 1) {
v.push_back(k);
x[k - 1] = 1;
if(min1 > k) {
min1 = k;
pos = xcnt;
}
xcnt++;
}
if(xcnt == 10) break;
}
return v;
}
static int get_expected_result() {
// complete this function
//cout << "UV " << pos << endl;
return pos;
}
};
class TestDataExactlyTwoDifferentMinimums {
public:
static vector<int> get_array() {
// complete this function
v.clear();
int x[10] = {3, 2, 4, 5, 1, 7, 8, 9, 1, 10};
min1 = INT_MAX, pos = -1;
for(int i = 0; i < 10; i++) {
v.push_back(x[i]);
if(min1 > x[i]) {
min1 = x[i];
pos = i;
}
}
return v;
}
static int get_expected_result() {
// complete this function
//cout << "ETD " << pos << endl;
return pos;
}
};
void TestWithEmptyArray() {
try {
auto seq = TestDataEmptyArray::get_array();
auto result = minimum_index(seq);
} catch (invalid_argument& e) {
return;
}
assert(false);
}
void TestWithUniqueValues() {
auto seq = TestDataUniqueValues::get_array();
assert(seq.size() >= 2);
assert(set<int>(seq.begin(), seq.end()).size() == seq.size());
auto expected_result = TestDataUniqueValues::get_expected_result();
auto result = minimum_index(seq);
assert(result == expected_result);
}
void TestWithExactlyTwoDifferentMinimums() {
auto seq = TestDataExactlyTwoDifferentMinimums::get_array();
assert(seq.size() >= 2);
auto tmp = seq;
sort(tmp.begin(), tmp.end());
assert(tmp[0] == tmp[1] and (tmp.size() == 2 or tmp[1] < tmp[2]));
auto expected_result = TestDataExactlyTwoDifferentMinimums::get_expected_result();
auto result = minimum_index(seq);
assert(result == expected_result);
}
int main() {
TestWithEmptyArray();
TestWithUniqueValues();
TestWithExactlyTwoDifferentMinimums();
cout << "OK" << endl;
return 0;
} |
18dae603205de69eada2c8fc74aba85ae6eb101a | dd2b111e9e336cbe32401444b2e190fbafac2df7 | /ZombieApocalypse/pa6-source-code/tests/StudentTests.cpp | 7895000d64ecb75a5cc2911d4fa202e438a115a7 | [] | no_license | marshalljacobs12/Professional-Cplusplus | 88bc0121dee322524c08df77043c08cf29394f49 | 90b4c7d5fcb302ac0f1c9c552ca5a12f219a4ae9 | refs/heads/master | 2021-08-28T03:08:04.355408 | 2017-12-11T04:59:52 | 2017-12-11T04:59:52 | 113,794,993 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,640 | cpp | StudentTests.cpp | #include "catch.hpp"
#include <string>
#include <chrono>
#include "Machine.h"
#include "Op.h"
#include "Traits.h"
#include "World.h"
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#endif
// Helper function declarations (don't change these)
extern bool CheckFileMD5(const std::string& fileName, const std::string& expected);
extern bool CheckTextFilesSame(const std::string& fileNameA,
const std::string& fileNameB);
// TODO:
// Add test cases for your functions here!!
// (You will want to make multiple test cases with different sections)
TEST_CASE("Function test cases", "[student]")
{
SECTION("Test Attack Op")
{
World::Get().InitializeTestStates();
auto testZombieVec = World::Get().GetmZombieMachineStates();
REQUIRE(testZombieVec->size() == 1);
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
testHumanVec->at(0).mX = 1;
testHumanVec->at(0).mFacing = MachineState::DOWN;
OpAttack testOp;
testOp.Execute(testHumanVec->at(0));
testZombieVec = World::Get().GetmZombieMachineStates();
REQUIRE(testHumanVec->size() == 1);
REQUIRE(testZombieVec->empty());
}
SECTION("Test Ranged_Attack Op")
{
World::Get().InitializeTestStates();
auto testZombieVec = World::Get().GetmZombieMachineStates();
REQUIRE(testZombieVec->size() == 1);
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
testHumanVec->at(0).mX = 3;
testHumanVec->at(0).mY = 1;
testHumanVec->at(0).mFacing = MachineState::LEFT;
OpRangedAttack testOp;
testOp.Execute(testHumanVec->at(0));
testZombieVec = World::Get().GetmZombieMachineStates();
REQUIRE(testHumanVec->size() == 1);
REQUIRE(testZombieVec->empty());
}
SECTION("Test Rotate Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
REQUIRE(testHumanVec->at(0).mFacing == MachineState::UP);
OpRotate testOp(1);
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mFacing == MachineState::LEFT);
OpRotate testOp2(0);
testOp2.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mFacing == MachineState::UP);
}
SECTION("Test Forward Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
testHumanVec->at(0).mX = 1;
OpForward testOp;
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mX == 1);
REQUIRE(testHumanVec->at(0).mY == 0);
testHumanVec->at(0).mFacing = MachineState::DOWN;
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mX == 1);
REQUIRE(testHumanVec->at(0).mY == 0);
testHumanVec->at(0).mFacing = MachineState::RIGHT;
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mX == 2);
REQUIRE(testHumanVec->at(0).mY == 0);
}
SECTION("Test Endturn Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
OpEndTurn testOp;
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mActionsTaken == 2);
}
SECTION("Test Test_Human Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
testHumanVec->at(0).mX = 1;
auto testZombieVec = World::Get().GetmZombieMachineStates();
OpTestHuman testOp(1);
testOp.Execute(testZombieVec->at(0));
REQUIRE(testZombieVec->at(0).mTest);
}
SECTION("Test Test_Wall Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
OpTestWall testOp;
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mTest);
}
SECTION("Test Test_Zombie Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
testHumanVec->at(0).mX = 1;
testHumanVec->at(0).mFacing = MachineState::DOWN;
OpTestZombie testOp(1);
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mTest);
}
SECTION("Test Test_Random Op")
{
/*
First random double between 0 and 1 generated with seed 7410785 is 0.476421,
so mTest flag should be set to false
*/
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
OpTestRandom testOp;
testOp.Execute(testHumanVec->at(0));
REQUIRE(!testHumanVec->at(0).mTest);
}
SECTION("Test Test_Passable Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
OpTestPassable testOp;
testOp.Execute(testHumanVec->at(0));
REQUIRE(!testHumanVec->at(0).mTest);
testHumanVec->at(0).mFacing = MachineState::DOWN;
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mTest);
testHumanVec->at(0).mX = 1;
testHumanVec->at(0).mFacing = MachineState::DOWN;
testOp.Execute(testHumanVec->at(0));
REQUIRE(!testHumanVec->at(0).mTest);
}
SECTION("Test Je Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
testHumanVec->at(0).mTest = true;
OpJe testOp(5);
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mProgramCounter == 5);
}
SECTION("Test Jne Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
OpJne testOp(5);
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mProgramCounter == 5);
}
SECTION("Test Goto Op")
{
World::Get().InitializeTestStates();
auto testHumanVec = World::Get().GetmSurvivorMachineStates();
OpGoto testOp(5);
testOp.Execute(testHumanVec->at(0));
REQUIRE(testHumanVec->at(0).mProgramCounter == 5);
}
}
|
daf10c5b032baaacaac4e8ccbc9c843b1e3b8ee4 | 173580b486a75b267ee542a25aea924e5971c2d5 | /Source/Project_C/Weapon/ShootingWeapon.cpp | a7e5a25ad2487c54bf63536aff28c650c7588377 | [] | no_license | gcclua/ShooterGame | 9188f2884acef1f570c543c94c5cb2ecb912e00d | 679c5a9e2e335250260d2d27b742120cf47befeb | refs/heads/master | 2021-05-21T01:49:53.210019 | 2019-10-29T04:48:21 | 2019-10-29T04:48:21 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 440 | cpp | ShootingWeapon.cpp | // Fill out your copyright notice in the Description page of Project Settings.
#include "ShootingWeapon.h"
#include "Components/StaticMeshComponent.h"
// Sets default values
AShootingWeapon::AShootingWeapon()
{
MuzzlePoint = CreateDefaultSubobject< USceneComponent >(TEXT("MuzzlePoint"));
MuzzlePoint->SetupAttachment(GetWeaponMesh());
}
class USceneComponent* AShootingWeapon::GetShootingWeaponMuzzle() const {
return MuzzlePoint;
} |
3398720e810077ab923d474d46b7d8790d96dff1 | d5f68f68ba46df63b20c1c5c7f020136cbc31647 | /Error-Game/Source/Difficulty.cpp | f0c75e7d93e1df5ee11621be20123fe8536ab9bb | [] | no_license | ianalcid08/FinalProject | 088f8bf035543b55243c20be274538552d58c384 | a41c87a85d130e3c3021d24d53df4ffa2a80d67f | refs/heads/master | 2021-01-23T08:15:25.394104 | 2014-02-25T01:29:40 | 2014-02-25T01:29:40 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 11,016 | cpp | Difficulty.cpp | /***********************************************
* Filename: Difficulty.cpp
* Date: 04/08/2013
* Mod. Date: 04/08/2013
* Mod. Initials: IA
* Author: Ian Alcid
* Purpose: State in which the difficulty is set for all levels.
************************************************/
#include "Difficulty.h"
#include "Game.h"
#include "GameplayState.h"
#include "Input.h"
#include "Renderer.h"
#include "BitmapFont.h"
#include "AssetManager.h"
#include "Definitions.h"
#include "Audio.h"
CDifficulty* CDifficulty::GetInstance()
{
static CDifficulty s_Instance;
return &s_Instance;
}
CDifficulty::CDifficulty(void)
{
}
CDifficulty::~CDifficulty(void)
{
}
void CDifficulty::Initialize()
{
m_pInput = CInput::GetInstance();
m_pRenderer = CRenderer::GetInstance();
m_pBMF = CBitmapFont::GetInstance();
m_pD3D = m_pRenderer->GetDirect3DDevice();
m_pAM = CAssetManager::GetInstance();
m_d3dShader = m_pAM->LoadShader("Shaders/StateFading.fx");
// TODO - REPLACE THIS WITH ACTUAL GOOD BACKGROUND
// JUST A PLACEHOLDER
d3dDifficultyBG = m_pAM->LoadTexture("Textures/OptionsMenu.png");
// Verts for the screen
tDiffVertexs[0].d3dPosition = D3DXVECTOR3(-1.0f,1.0f,0.0f);
tDiffVertexs[1].d3dPosition = D3DXVECTOR3(1.0f,1.0f,0.0f);
tDiffVertexs[2].d3dPosition = D3DXVECTOR3(1.0f,-1.0f,0.0f);
tDiffVertexs[3].d3dPosition = D3DXVECTOR3(-1.0f,-1.0f,0.0f);
tDiffVertexs[0].d3dUV = D3DXVECTOR2(0.0f,0.0f);
tDiffVertexs[1].d3dUV = D3DXVECTOR2(1.0f,0.0f);
tDiffVertexs[2].d3dUV = D3DXVECTOR2(1.0f,1.0f);
tDiffVertexs[3].d3dUV = D3DXVECTOR2(0.0f,1.0f);
m_pRenderer->GetDirect3DDevice()->CreateVertexBuffer(sizeof(TDifficultyVertex)*4,0,0,D3DPOOL_MANAGED,&m_d3dDifficultyBuff,0);
void* vram = nullptr;
m_d3dDifficultyBuff->Lock(0,0,&vram,0);
memcpy(vram,tDiffVertexs,sizeof(TDifficultyVertex)*4);
m_d3dDifficultyBuff->Unlock();
m_nfirstBoxX = 305;
m_nfirstBoxY = 380;
m_nletterHeight = 32;
m_nletterWidth = 32;
m_fLetterScale = 0.5f;
// Fading Varibles
m_fFadingTotalTime = 1.0f;
m_bisFadingDone = false;
m_fFadingAmount = 0;
m_fFadingElapsed = 0;
m_nChoice = NORMAL;
m_nDifficulty = NORMAL;
m_fTimer = 0.0f;
D3DXMatrixTranslation(&(m_d3dOffset[0]), -1.0f, 1.0f, 0.0f);
D3DXMatrixTranslation(&(m_d3dOffset[1]), -0.5f, 1.0f, 0.0f);
D3DXMatrixTranslation(&(m_d3dOffset[2]), 0.0f, 1.0f, 0.0f);
D3DXMatrixTranslation(&(m_d3dOffset[3]), 0.5f, 1.0f, 0.0f);
tCursorVertex[0].d3dPosition = D3DXVECTOR3(.05f, 0.0f, 0.0f);
tCursorVertex[1].d3dPosition = D3DXVECTOR3(.05f, -.1f, 0.0f);
tCursorVertex[2].d3dPosition = D3DXVECTOR3(0.0f, -.1f, 0.0f);
tCursorVertex[3].d3dPosition = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
tCursorVertex[0].d3dUV = D3DXVECTOR2(1.0f, 0.0f);
tCursorVertex[1].d3dUV = D3DXVECTOR2(1.0f, 1.0f);
tCursorVertex[2].d3dUV = D3DXVECTOR2(0.0f, 1.0f);
tCursorVertex[3].d3dUV = D3DXVECTOR2(0.0f, 0.0f);
d3dCursorShader = m_pAM->LoadShader("Assets/Shaders/HUDDraw.fx");
d3dCursorTexture = m_pAM->LoadTexture("Textures/cursor.png");
m_pRenderer->GetDirect3DDevice()->CreateVertexBuffer(sizeof(TDifficultyVertex)*4,0,0,D3DPOOL_MANAGED,&d3dCursorBuffer,0);
vram = nullptr;
d3dCursorBuffer->Lock(0,0,&vram,0);
memcpy(vram,tCursorVertex,sizeof(TDifficultyVertex)*4);
d3dCursorBuffer->Unlock();
}
void CDifficulty::Shutdown()
{
if(d3dCursorBuffer)
d3dCursorBuffer->Release();
if(m_d3dDifficultyBuff)
m_d3dDifficultyBuff->Release();
}
bool CDifficulty::Input()
{
if(m_fTimer < 0.25f)
return true;
bool moveMouse = false;
float tempX, tempY;
tempX = m_pInput->GetScreenMouseX();
tempY = m_pInput->GetScreenMouseY();
if(tempX != m_fMouseX || tempY != m_fMouseY)
{
m_fMouseX = tempX;
m_fMouseY = tempY;
moveMouse = true;
}
if(m_pInput->CheckInput(DOWN,4))
{
WwiseNS::PlaySFX(WwiseNS::EVENT_SOUND_MENUCHANGE);
m_nChoice++;
m_fTimer = 0.0f;
if(m_nChoice == NUM_DIFF + 1)
m_nChoice = NORMAL;
}
if(m_pInput->CheckInput(UP,4))
{
WwiseNS::PlaySFX(WwiseNS::EVENT_SOUND_MENUCHANGE);
m_nChoice--;
m_fTimer = 0.0f;
if(m_nChoice == 0)
m_nChoice = 3; // (back button
}
// if user hits enter / accept
if(m_pInput->CheckInput(ACCEPT,4) || m_pInput->GetLMB())
{
if(m_nChoice == 3)
{
CGame::GetInstance()->ChangeState(MAINMENU_STATE);
WwiseNS::PlaySFX(WwiseNS::EVENT_SOUND_MENUSELECT);
return true;
}
CGame::GetInstance()->SetDifficulty(m_nChoice); // = m_nChoice;
CGame::GetInstance()->ChangeState(CHAR_SELECT_STATE);
WwiseNS::PlaySFX(WwiseNS::EVENT_SOUND_MENUSELECT);
return true;
}
if(moveMouse)
{
//min x // max x // min y // max y
if(((m_fMouseX >= -0.384 && m_fMouseX <= -0.110f) && (m_fMouseY <= -0.1f && m_fMouseY >= -0.163889f)))
{
m_nChoice = NORMAL;
}
if(((m_fMouseX >= -0.3906 && m_fMouseX <= -0.1046f) && (m_fMouseY <= -0.1889f && m_fMouseY >= -0.2527f)))
{
m_nChoice = HARD;
}
if(((m_fMouseX >= -0.389 && m_fMouseX <= -0.2078f) && (m_fMouseY <= -0.275f && m_fMouseY >= -0.3388f)))
{
m_nChoice = 3;
}
/*if(((m_fMouseX >= -0.3875 && m_fMouseX <= -0.209f) && (m_fMouseY <= -0.3638f && m_fMouseY >= -0.4305f)))
{
m_nChoice = 4;
}*/
}
if(m_pInput->CheckInput(PAUSE, 4)) //GetAsyncKeyState(VK_ESCAPE)&1)
{
if(m_nChoice == 3)
CGame::GetInstance()->ChangeState(MAINMENU_STATE);
m_nChoice = 3;
}
if(GetAsyncKeyState('7') && 0x01)
cout << "Mouse PosX = " << m_fMouseX << " Mouse PosY = " << m_fMouseY << endl;
return true;
}
void CDifficulty::Update( float fElapsedTime )
{
m_fTimer += fElapsedTime;
if(!m_bisFadingDone)
{
m_fFadingElapsed += fElapsedTime;
if(m_fFadingElapsed < m_fFadingTotalTime)
{
m_fFadingAmount = m_fFadingElapsed / m_fFadingTotalTime;
}
if(m_fFadingElapsed >= m_fFadingTotalTime)
{
m_bisFadingDone = true;
}
}
}
void CDifficulty::Render()
{
m_pRenderer->GetSprite()->Flush();
m_pRenderer->Clear();
if(m_bisFadingDone)
{
RenderNormalScene();
}
else
{
RenderFadingScene();
}
}
void CDifficulty::RenderNormalScene()
{
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
unsigned int passes(0);
m_d3dShader->Begin(&passes,0);
for(unsigned i(0); i < passes; i++)
{
m_d3dShader->BeginPass(i);
m_pRenderer->GetDirect3DDevice()->SetStreamSource(0,m_d3dDifficultyBuff,0,sizeof(TDifficultyVertex));
m_pRenderer->GetDirect3DDevice()->SetVertexDeclaration(m_pAM->GetVertexDeclaration(POS_TEXCOORD));
D3DXMATRIX temp;
D3DXMatrixIdentity(&temp);
m_d3dShader->SetMatrix("gViewProjection",&temp);
m_d3dShader->SetTexture("gDiffuseTexture",d3dDifficultyBG);
m_d3dShader->SetFloat("fadeAmount",1.0f);
m_d3dShader->CommitChanges();
m_pRenderer->GetDirect3DDevice()->DrawPrimitive(D3DPT_TRIANGLEFAN,0,2);
m_d3dShader->EndPass();
}
m_d3dShader->End();
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_ALPHABLENDENABLE,false);
// Render the mouse stuff
// Updating the Mouse positions
passes = 0;
D3DXMATRIX mouseCursor;
D3DXMatrixIdentity(&mouseCursor);
D3DXMatrixTranslation(&mouseCursor,m_fMouseX,m_fMouseY,0.0f);
d3dCursorShader->Begin(&passes,0);
for(unsigned i(0); i < passes; i++)
{
d3dCursorShader->BeginPass(i);
m_pRenderer->GetDirect3DDevice()->SetStreamSource(0,d3dCursorBuffer,0,sizeof(TDifficultyVertex));
d3dCursorShader->SetFloatArray("gColor", D3DXVECTOR4(1.0f, 1.0f, 1.0f, 1.0f), 4);
d3dCursorShader->SetFloat("gFade", 1.0f);
d3dCursorShader->SetTexture("gDiffuseTexture", d3dCursorTexture);
d3dCursorShader->SetFloat("gRatio", 1.0f);
d3dCursorShader->SetMatrix("gOffset", &mouseCursor);
d3dCursorShader->CommitChanges();
m_pRenderer->GetDirect3DDevice()->SetStreamSource(0,d3dCursorBuffer,0,sizeof(TDifficultyVertex));
m_pRenderer->GetDirect3DDevice()->DrawPrimitive(D3DPT_TRIANGLEFAN,0,2);
d3dCursorShader->EndPass();
}
d3dCursorShader->End();
// x - 305 y - 380
float tempx, tempy;
tempx = m_nfirstBoxX / 1024.0f;
tempy = m_nfirstBoxY / 768.0f;
float tempWidth = CRenderer::GetInstance()->GetWindowWidth() * tempx;
float tempHeight = CRenderer::GetInstance()->GetWindowHeight() * tempy;
int windowHeight = CRenderer::GetInstance()->GetWindowHeight();
m_pBMF->PrintBF("Difficulty",(int)tempWidth,(int)(tempHeight),m_fLetterScale);
switch(m_nChoice)
{
case NORMAL:
{
m_pBMF->PrintBF("Normal",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight) / 768.0f) * windowHeight),m_fLetterScale,0xff000000);
m_pBMF->PrintBF("Hard",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight * 2) / 768.0f) * windowHeight),m_fLetterScale);
m_pBMF->PrintBF("Back",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight * 3) / 768.0f) * windowHeight),m_fLetterScale);
}
break;
case HARD:
{
m_pBMF->PrintBF("Normal",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight)/ 768.0f) * windowHeight),m_fLetterScale);
m_pBMF->PrintBF("Hard",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight * 2)/ 768.0f) * windowHeight),m_fLetterScale,0xff000000);
m_pBMF->PrintBF("Back",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight * 3)/ 768.0f) * windowHeight),m_fLetterScale);
}
break;
case 3:
{
m_pBMF->PrintBF("Normal",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight) / 768.0f) * windowHeight),m_fLetterScale);
m_pBMF->PrintBF("Hard",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight * 2)/ 768.0f) * windowHeight),m_fLetterScale);
m_pBMF->PrintBF("Back",(int)tempWidth,(int)(((m_nfirstBoxY + m_nletterHeight * 3)/ 768.0f) * windowHeight),m_fLetterScale,0xff000000);
}
}
};
void CDifficulty::RenderFadingScene()
{
DWORD srcBlend,destBlend;
m_pRenderer->GetDirect3DDevice()->GetRenderState(D3DRS_SRCBLEND,&srcBlend);
m_pRenderer->GetDirect3DDevice()->GetRenderState(D3DRS_DESTBLEND,&destBlend);
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_SRCALPHA);
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA);
unsigned int passes(0);
m_d3dShader->Begin(&passes,0);
for(unsigned i(0); i < passes; i++)
{
m_d3dShader->BeginPass(i);
m_pRenderer->GetDirect3DDevice()->SetStreamSource(0,m_d3dDifficultyBuff,0,sizeof(TDifficultyVertex));
m_pRenderer->GetDirect3DDevice()->SetVertexDeclaration(m_pAM->GetVertexDeclaration(POS_TEXCOORD));
D3DXMATRIX temp;
D3DXMatrixIdentity(&temp);
m_d3dShader->SetMatrix("gViewProjection",&temp);
m_d3dShader->SetTexture("gDiffuseTexture",d3dDifficultyBG);
m_d3dShader->SetFloat("fadeAmount",m_fFadingAmount);
m_d3dShader->CommitChanges();
m_pRenderer->GetDirect3DDevice()->DrawPrimitive(D3DPT_TRIANGLEFAN,0,2);
m_d3dShader->EndPass();
}
m_d3dShader->End();
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_ALPHABLENDENABLE,false);
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_SRCBLEND,srcBlend);
m_pRenderer->GetDirect3DDevice()->SetRenderState(D3DRS_DESTBLEND,destBlend);
} |
4d9932ad50a7a0fa107a313742f0cd07d90430a5 | 78918391a7809832dc486f68b90455c72e95cdda | /boost_lib/boost/type_erasure/dynamic_any_cast.hpp | f87f004e0270440fce3b6a646b87f94a6dde92e8 | [
"MIT"
] | permissive | kyx0r/FA_Patcher | 50681e3e8bb04745bba44a71b5fd04e1004c3845 | 3f539686955249004b4483001a9e49e63c4856ff | refs/heads/master | 2022-03-28T10:03:28.419352 | 2020-01-02T09:16:30 | 2020-01-02T09:16:30 | 141,066,396 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 7,925 | hpp | dynamic_any_cast.hpp | // Boost.TypeErasure library
//
// Copyright 2015 Steven Watanabe
//
// Distributed under the Boost Software License Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// $Id$
#ifndef BOOST_TYPE_ERASURE_DYNAMIC_ANY_CAST_HPP_INCLUDED
#define BOOST_TYPE_ERASURE_DYNAMIC_ANY_CAST_HPP_INCLUDED
#include <boost/type_erasure/detail/normalize.hpp>
#include <boost/type_erasure/binding_of.hpp>
#include <boost/type_erasure/static_binding.hpp>
#include <boost/type_erasure/dynamic_binding.hpp>
#include <boost/type_erasure/concept_of.hpp>
#include <boost/type_erasure/placeholder_of.hpp>
#include <boost/type_erasure/any.hpp>
#include <boost/type_erasure/binding.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/set.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
namespace boost
{
namespace type_erasure
{
namespace detail
{
template<class P, class P2, class Any>
struct make_ref_placeholder;
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2, const Any&>
{
typedef const P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2, Any&>
{
typedef P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2&, const Any&>
{
typedef P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2&, Any&>
{
typedef P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, const P2&, const Any&>
{
typedef const P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, const P2&, Any&>
{
typedef const P& type;
};
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<class P, class P2, class Any>
struct make_ref_placeholder
{
typedef P&& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2&, Any>
{
typedef P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, const P2&, Any>
{
typedef const P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2&&, Any>
{
typedef P&& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2&&, const Any&>
{
typedef const P& type;
};
template<class P, class P2, class Any>
struct make_ref_placeholder<P, P2&&, Any&>
{
typedef P& type;
};
#endif
template<class R, class Tag>
struct make_result_placeholder_map
{
typedef ::boost::mpl::map<
::boost::mpl::pair<
typename ::boost::remove_const<
typename ::boost::remove_reference<
typename ::boost::type_erasure::placeholder_of<R>::type
>::type
>::type,
typename ::boost::remove_const<
typename ::boost::remove_reference<
Tag
>::type
>::type
>
> type;
};
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<class R, class Any, class Map>
R dynamic_any_cast_impl(Any&& arg, const static_binding<Map>& map)
#else
template<class R, class Any, class Map>
R dynamic_any_cast_impl(Any& arg, const static_binding<Map>& map)
#endif
{
typedef typename ::boost::remove_const<typename ::boost::remove_reference<Any>::type>::type src_type;
typedef typename ::boost::type_erasure::detail::normalize_concept<
typename ::boost::type_erasure::concept_of<src_type>::type
>::type normalized;
typedef typename ::boost::mpl::fold<
normalized,
#ifndef BOOST_TYPE_ERASURE_USE_MP11
::boost::mpl::set0<>,
#else
::boost::mp11::mp_list<>,
#endif
::boost::type_erasure::detail::get_placeholders<
::boost::mpl::_2,
::boost::mpl::_1
>
>::type placeholders;
#ifndef BOOST_TYPE_ERASURE_USE_MP11
typedef ::boost::type_erasure::detail::substitution_map< ::boost::mpl::map0<> > identity_map;
#else
typedef ::boost::type_erasure::detail::make_identity_placeholder_map<normalized> identity_map;
#endif
::boost::type_erasure::dynamic_binding<placeholders> my_binding(
::boost::type_erasure::binding_of(arg),
::boost::type_erasure::make_binding<identity_map>());
typedef typename ::boost::remove_const<
typename ::boost::remove_reference<
typename ::boost::type_erasure::placeholder_of<R>::type
>::type
>::type result_placeholder;
::boost::type_erasure::binding< typename ::boost::type_erasure::concept_of<R>::type> new_binding(
my_binding,
map);
typedef ::boost::type_erasure::any<
typename ::boost::type_erasure::concept_of<R>::type,
typename ::boost::type_erasure::detail::make_ref_placeholder<
result_placeholder,
typename ::boost::type_erasure::placeholder_of<src_type>::type,
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
Any
#else
Any&
#endif
>::type
> result_ref_type;
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
return result_ref_type(std::forward<Any>(arg), new_binding);
#else
return result_ref_type(arg, new_binding);
#endif
}
}
#ifdef BOOST_TYPE_ERASURE_DOXYGEN
/**
* Downcasts or crosscasts an @ref any.
*
* \pre @c R and @c Any must both be specializations of @ref any.
* \pre PlaceholderMap must be an MPL map with a key
* for every non-deduced placeholder used by R.
* The value associated with each key should
* be the corresponding placeholder in Any.
* \pre The concept of Any must include @ref typeid_, for every
* @ref placeholder which is used by R.
*
* The single argument form can only be used when @c R uses
* a single non-deduced placeholder.
*
* \throws bad_any_cast if the concepts used by R were
* not previously registered via a call to
* \register_binding.
*
* Example:
* \code
* // Assume that typeid_<>, copy_constructible<>, and incrementable<>
* // have all been registered for int.
* any<mpl::vector<typeid_<>, copy_constructible<> > > x(1);
* typedef any<
* mpl::vector<
* typeid_<>,
* copy_constructible<>,
* incrementable<>
* >
* > incrementable_any;
* auto y = dynamic_any_cast<incrementable_any>(x);
* ++y;
* assert(any_cast<int>(y) == 2);
* \endcode
*/
template<class R, class Any>
R dynamic_any_cast(Any&& arg);
/**
* \overload
*/
template<class R, class Any, class Map>
R dynamic_any_cast(Any&& arg, const static_binding<Map>&);
#else
template<class R, class Concept, class Tag>
R dynamic_any_cast(const any<Concept, Tag>& arg)
{
return ::boost::type_erasure::detail::dynamic_any_cast_impl<R>(arg,
::boost::type_erasure::make_binding<typename ::boost::type_erasure::detail::make_result_placeholder_map<R, Tag>::type>());
}
template<class R, class Concept, class Tag>
R dynamic_any_cast(any<Concept, Tag>& arg)
{
return ::boost::type_erasure::detail::dynamic_any_cast_impl<R>(arg,
::boost::type_erasure::make_binding<typename ::boost::type_erasure::detail::make_result_placeholder_map<R, Tag>::type>());
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<class R, class Concept, class Tag>
R dynamic_any_cast(any<Concept, Tag>&& arg)
{
return ::boost::type_erasure::detail::dynamic_any_cast_impl<R>(::std::move(arg),
::boost::type_erasure::make_binding<typename ::boost::type_erasure::detail::make_result_placeholder_map<R, Tag>::type>());
}
#endif
template<class R, class Concept, class Tag, class Map>
R dynamic_any_cast(const any<Concept, Tag>& arg, const static_binding<Map>& map)
{
return ::boost::type_erasure::detail::dynamic_any_cast_impl<R>(arg, map);
}
template<class R, class Concept, class Tag, class Map>
R dynamic_any_cast(any<Concept, Tag>& arg, const static_binding<Map>& map)
{
return ::boost::type_erasure::detail::dynamic_any_cast_impl<R>(arg, map);
}
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<class R, class Concept, class Tag, class Map>
R dynamic_any_cast(any<Concept, Tag>&& arg, const static_binding<Map>& map)
{
return ::boost::type_erasure::detail::dynamic_any_cast_impl<R>(::std::move(arg), map);
}
#endif
#endif
}
}
#endif
|
a64f129d39ae8693b915074d58b3faaf06284ec9 | 6fd67c8a4b4e5de2eec30af3ed679fbdaee90a99 | /Diploma/Diploma/Diploma.h | 338bd3aab075991d37a00ee06bf9cb3c72fe542d | [] | no_license | Aeshylus/Test | 6912ef08828094a2840d87b61fc48c63630442e3 | d4ae1ff98b84cb67650ff6681dc6145fc7e8afb9 | refs/heads/master | 2021-01-25T05:35:40.187114 | 2014-01-29T18:12:37 | 2014-01-29T18:12:37 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 924 | h | Diploma.h |
// Diploma.h : main header file for the Diploma application
//
#pragma once
#ifndef __AFXWIN_H__
#error "include 'stdafx.h' before including this file for PCH"
#endif
#include "resource.h" // main symbols
#pragma comment(lib, "irrlicht.lib")
// CDiplomaApp:
// See Diploma.cpp for the implementation of this class
//
#include <boost\signal.hpp>
//////////////////////////////////////////////////////////////////////////
class CDiplomaApp : public CWinAppEx
{
typedef CWinAppEx _Super;
public:
CDiplomaApp();
// Overrides
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
// Implementation
UINT m_nAppLook;
BOOL m_bHiColorIcons;
boost::signal<void (void)> m_update_view;
virtual void PreLoadState();
virtual void LoadCustomState();
virtual void SaveCustomState();
virtual int Run() override;
afx_msg void OnAppAbout();
DECLARE_MESSAGE_MAP()
};
extern CDiplomaApp theApp;
|
aabe4dc37602d6c2f817926561a02618a8562886 | a34446bab88860ba15693ce570fcad328d00a0e4 | /test/all_up/all_up.ino | f555b6835baa41f429cf4335d1054691b5f3f45c | [] | no_license | Vlasciar/InfoEdu | 43977cbff44d4a0b53f6bee630ba3a6213803832 | 4cffcf34af62322be99fa362da1c43e449dce161 | refs/heads/master | 2021-04-17T10:43:09.859356 | 2020-05-09T14:51:41 | 2020-05-09T14:51:41 | 249,438,781 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 345 | ino | all_up.ino | void setup() {
// put your setup code here, to run once:
}
void loop() {
for(int i=2;i<=13;i++)
{
digitalWrite(i,HIGH);
}
analogWrite(A0 ,255);
analogWrite(A1 ,255);
analogWrite(A2 ,255);
analogWrite(A3 ,255);
analogWrite(A4 ,255);
analogWrite(A5 ,255);
analogWrite(A6 ,255);
analogWrite(A7 ,255);
}
|
bbc6e561dbfc6973d029b1ebc864578309d03d35 | 39f93acde728ccb6e7029658043de4548522cb35 | /include/crawl/db.hpp | 18ab08c21faa195a53ed553fd8e073df650a6631 | [] | no_license | siosig/libcrawl | a10c5bfcc3ca46a75b5ea8b142b7ca73bb832920 | 273595a4d4499a0c422ef5921b7eff137e9d676f | refs/heads/master | 2021-01-10T03:21:40.232045 | 2016-03-17T13:53:59 | 2016-03-17T13:53:59 | 51,982,168 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,098 | hpp | db.hpp | #pragma once
#include <string>
#include <mysql_driver.h>
#include <mysql_connection.h>
#include <cppconn/statement.h>
#include <cppconn/prepared_statement.h>
#include <vector>
namespace crawl {
class DB {
public:
DB();
explicit DB(const std::string &schema);
~DB();
void begin();
void commit();
void close();
void setSchema(const std::string &schema);
void lockTable(const std::string &table);
void unlockTables();
uint32_t bulkInsert(const std::string &query, const std::vector<std::vector<std::string>> &rows, bool outputlog = false) const;
sql::PreparedStatement* prepare(const std::string &query, bool outputlog = false);
sql::ResultSet* execute(sql::PreparedStatement* stmt, std::vector<std::string> param, bool outputlog = false);
sql::ResultSet* execute(sql::PreparedStatement* stmt, bool outputlog = false);
uint32_t update(const std::string& query);
uint32_t update(sql::PreparedStatement* stmt, std::vector<std::string> param, bool outputlog = false);
protected:
private:
class DBPrivate;
DBPrivate *d;
};
}
|
bf1c16e81643dc83ca6b1b8fb9d3d319fc9b1916 | 4ad2ec9e00f59c0e47d0de95110775a8a987cec2 | /_Practice/IOI wcipeg/Teleporters/main.cpp | ce825ac3f76906fbcf587cb74c5fc61868dab2f5 | [] | no_license | atatomir/work | 2f13cfd328e00275672e077bba1e84328fccf42f | e8444d2e48325476cfbf0d4cfe5a5aa1efbedce9 | refs/heads/master | 2021-01-23T10:03:44.821372 | 2021-01-17T18:07:15 | 2021-01-17T18:07:15 | 33,084,680 | 2 | 1 | null | 2015-08-02T20:16:02 | 2015-03-29T18:54:24 | C++ | UTF-8 | C++ | false | false | 1,578 | cpp | main.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
#define mp make_pair
#define pb push_back
#define ll long long
#define maxN 2000011
int n, m, i, x, y;
vector< pair<int, int> > pos;
pair<int, int> wh[maxN];
queue<int> Q;
int to[maxN];
bool us[maxN];
int cnt;
vector<int> cic;
int ans;
void bfs(int node) {
for (; !us[node] && node != 0; node = to[node]) {
cnt++;
us[node] = true;
}
}
int main()
{
freopen("test.in","r",stdin);
pos.pb(mp(-1, -1));
scanf("%d%d", &n, &m);
for (i = 1; i <= n; i++) {
scanf("%d%d", &x, &y);
pos.pb(mp(x, i));
pos.pb(mp(y, i));
}
sort(pos.begin(), pos.end());
for (i = 1; i < pos.size(); i++) {
int id = pos[i].second;
if (wh[id].first == 0)
wh[id].first = i;
else
wh[id].second = i;
}
n *= 2;
for (i = 1; i <= n; i++) {
int id = pos[i].second;
if (i == wh[id].first)
to[i] = 1 + wh[id].second;
else
to[i] = 1 + wh[id].first;
if (to[i] > n) to[i] = 0;
}
cnt = 0;
bfs(1);
ans = cnt;
for (i = 2; i <= n; i++) {
if (us[i]) continue;
cnt = 0;
bfs(i);
cic.pb(cnt);
}
sort(cic.begin(), cic.end());
while (m && !cic.empty()) {
ans += cic.back() + 2;
m--; cic.pop_back();
}
ans += 4 * (m / 2);
ans += m & 1;
printf("%d", ans);
return 0;
}
|
d96bfde994bd6f53e21a87d6c2c861d24779280c | 7c2c16c7b74095020b2d35039ba7af5c37149217 | /test_sub_derived_2.h | 88d1a838c24df7550275edbaec8702a1b48a061f | [
"MIT"
] | permissive | Dugy/generic_factory | 4ba0264e1aabc98af48a2a7185d174a2333e74a5 | 327d4234d8e79de4775ca07fef1a2601f70b0e5f | refs/heads/master | 2020-07-09T09:38:42.911151 | 2019-09-06T14:36:11 | 2019-09-06T14:36:11 | 203,941,046 | 9 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 297 | h | test_sub_derived_2.h | #ifndef TEST_SUB_DERIVED_2_H
#define TEST_SUB_DERIVED_2_H
#include "test_sub_base.hpp"
class TestSubDerived2 : public TestSubBase {
std::string _name;
public:
TestSubDerived2();
std::string name() const override;
void setName(const std::string&) override;
};
#endif // TEST_SUB_DERIVED_2_H
|
fc8bf008873b90159d396357c6c83f2a7b0023b1 | 0364bdde2c7386f38dc84e6791697c9413f51443 | /Test/Base/utilsTest.h | 9a008e342a82c36b27f2b7c6a8d25f4a2c1c728f | [
"MIT"
] | permissive | DrStrangelove42/DreamOfaRidiculousMan | 0cd088375851bc68b1f1b958a69ddcee3b3ec23c | a19af08c0a044ed4a30194ffdfac912475618b14 | refs/heads/main | 2023-06-17T19:21:53.341035 | 2021-07-14T09:39:05 | 2021-07-14T09:39:05 | 304,332,780 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 498 | h | utilsTest.h | #ifndef TEST_UTILS_H
#define TEST_UTILS_H
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include "../../Source/Base/utils.h"
class UtilsTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(UtilsTest);
CPPUNIT_TEST(TestRandRange);
CPPUNIT_TEST(Textures);
CPPUNIT_TEST(TestEatTokenEx);
CPPUNIT_TEST_SUITE_END();
public:
void TestRandRange(void);
void Textures(void);
void TestEatTokenEx(void);
virtual void setUp();
virtual void tearDown();
};
#endif |
8923234d38a42d0e66e5ffdf5a0d0349dbd91376 | 0f00091b2adebd8ab7d84396387bb6cb0eb8d2da | /RemoteController_LocalPowerSwitch.cpp | efdb4028067273268c1b89549f2059e8e138d242 | [
"Apache-2.0"
] | permissive | hidenorly/Esp32_WiFi_PowerSwitch | fd24f781a0ae1fbe124615c0138d3506c6baac18 | ee36ec146a91b26e6d7ed5f9902795e5625f8e8b | refs/heads/master | 2022-07-29T23:46:45.269422 | 2020-05-17T16:01:35 | 2020-05-17T16:01:35 | 262,970,587 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 955 | cpp | RemoteController_LocalPowerSwitch.cpp | /*
Copyright (C) 2020 hidenorly
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 "config.h"
#if ENABLE_LOCAL_POWER_CONTROLLER
#include "RemoteController.h"
#include "RemoteController_LocalPowerSwitch.h"
LocalPowerController::LocalPowerController(void)
{
}
LocalPowerController::~LocalPowerController()
{
}
void LocalPowerController::sendKey(int keyCode)
{
DEBUG_PRINT("sendKey ");
DEBUG_PRINTLN(keyCode);
}
#endif // ENABLE_LOCAL_POWER_CONTROLLER |
7ed38a4b02ab229c083bdcdddafc80263b01a858 | e59d731900e54c51de71f427e88d035dad6543fd | /controller/clientesEnCaja/ClientesEnCajaController.h | c3bc7805ab0c5bfe9352492ba8b145b81d8462b2 | [] | no_license | L2AsHdz/MiniMarketManager | 05def2c800792f724674a39d5f7b3c608664c377 | 20c81654b891e7c53072a19bf892f66658b77188 | refs/heads/master | 2023-03-15T10:50:57.807644 | 2021-03-06T17:41:58 | 2021-03-06T17:41:58 | 342,705,948 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 333 | h | ClientesEnCajaController.h | #ifndef CLIENTES_EN_CAJA_CONTROLLER_H
#define CLIENTES_EN_CAJA_CONTROLLER_H
#include "../../edd/pila/Pila.h"
#include "../../edd/linkedList/LinkedList.h"
class ClientesEnCajaController {
public:
ClientesEnCajaController();
void start(LinkedList*, Pila*, Pila*, int);
};
#endif /*CLIENTES_EN_CAJA_CONTROLLER_H*/ |
094af4cbcc838ade1c5a8391217a7da2734ed209 | 699f63477c9659498e1b342602656507c92f3e79 | /Worm/Biologie/WormDegatsIrradiationHadron.h | 3a125b87b70c52d9e85ee07bfd86957e4b028b50 | [] | no_license | dcussol/protoPMRT | 634477174d01c1d3a48d63adc175e412729fb748 | e3a66a11ce341ed0a3e7091fee4801cb5ba4ac76 | refs/heads/master | 2021-01-10T19:05:18.382410 | 2014-12-17T16:11:03 | 2014-12-17T16:11:03 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 604 | h | WormDegatsIrradiationHadron.h | //
// Classe d'imagerie du Worm
//
#ifndef WormDegatsIrradiationHadron_h
#define WormDegatsIrradiationHadron_h
#include "WormDegatsIrradiationX.h"
#include "GenerateurNombresAleatoires.h"
class WormDegatsIrradiationHadron : public WormDegatsIrradiationX
{
protected:
CartographieVecteur<double> EBRalpha;
CartographieVecteur<double> SFsaines;
CartographieVecteur<double> SFtumorales;
public:
WormDegatsIrradiationHadron(void);
~WormDegatsIrradiationHadron(void);
virtual Jeton *resoudre(Jeton *j);
virtual bool peutOperer(Jeton *j);
};
#endif
|
aa26ce346f289b2d1eff942b671eb18740755fe0 | 350623fcfc747d8f87ad235eff811768dc74020a | /bftengine/tests/bcstatetransfer/bcstatetransfer_tests.cpp | d2bc35699e77ecef6232869d6a75ab4cb384f268 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | dartdart26/concord-bft | 3e26f501331619916e26ece9d286a987b6bb7d3b | 7e863d933d4b6be5d46eaa6861aa2827936055d2 | refs/heads/master | 2022-03-19T02:50:16.164649 | 2022-02-17T16:06:41 | 2022-02-17T16:06:41 | 218,711,816 | 2 | 0 | null | 2019-10-31T07:47:49 | 2019-10-31T07:47:47 | null | UTF-8 | C++ | false | false | 32,520 | cpp | bcstatetransfer_tests.cpp | // Concord
//
// Copyright (c) 2019 VMware, Inc. All Rights Reserved.
//
// This product is licensed to you under the Apache 2.0 license (the "License").
// You may not use this product except in compliance with the Apache 2.0
// License.
//
// This product may include a number of subcomponents with separate copyright
// notices and license terms. Your use of these subcomponents is subject to the
// terms and conditions of the subcomponent's license, as noted in the LICENSE
// file.
#include <chrono>
#include <thread>
#include <set>
#include <string>
#include <vector>
#include <random>
#include <climits>
#include <optional>
#include "gtest/gtest.h"
#include "SimpleBCStateTransfer.hpp"
#include "BCStateTran.hpp"
#include "test_app_state.hpp"
#include "test_replica.hpp"
#include "Logger.hpp"
#include "DBDataStore.hpp"
#include "direct_kv_db_adapter.h"
#include "memorydb/client.h"
#include "storage/direct_kv_key_manipulator.h"
#include "Logger.hpp"
#ifdef USE_ROCKSDB
#include "rocksdb/client.h"
#include "rocksdb/key_comparator.h"
using concord::storage::rocksdb::Client;
using concord::storage::rocksdb::KeyComparator;
#endif
using std::chrono::milliseconds;
using namespace std;
using random_bytes_engine = std::independent_bits_engine<std::default_random_engine, CHAR_BIT, unsigned char>;
using namespace bftEngine::bcst;
namespace bftEngine::bcst::impl {
// Create a test config with small blocks and chunks for testing
Config TestConfig() {
return {
1, // myReplicaId
2, // fVal
0, // cVal
7, // numReplicas
0, // numRoReplicas
false, // pedanticChecks
false, // isReadOnly
1024, // maxChunkSize
256, // maxNumberOfChunksInBatch
kMaxBlockSize, // maxBlockSize
256 * 1024 * 1024, // maxPendingDataFromSourceReplica
2048, // maxNumOfReservedPages
4096, // sizeOfReservedPage
600, // gettingMissingBlocksSummaryWindowSize
300, // refreshTimerMs
2500, // checkpointSummariesRetransmissionTimeoutMs
60000, // maxAcceptableMsgDelayMs
0, // sourceReplicaReplacementTimeoutMs
2000, // fetchRetransmissionTimeoutMs
2, // maxFetchRetransmissions
5, // metricsDumpIntervalSec
false, // runInSeparateThread
true, // enableReservedPages
true // enableSourceBlocksPreFetch
};
}
// Test fixture for blockchain state transfer tests
class BcStTest : public ::testing::Test {
protected:
class MockedSources;
/////////////////////////////////////////////////////////
// Constants
/////////////////////////////////////////////////////////
protected:
static constexpr char BCST_DB[] = "./bcst_db";
static constexpr char MOCKED_BCST_DB[] = "./mocked_bcst_db";
static constexpr uint64_t maxNumOfRequiredStoredCheckpoints = 3;
static constexpr uint32_t numberOfRequiredReservedPages = 100;
static constexpr uint32_t checkpointWindowSize = 150;
static constexpr uint32_t defaultMinBlockDataSize = 300;
static constexpr uint32_t defaultLastReachedcheckpointNum = 10;
static constexpr uint32_t minNumberOfUpdatedReservedPages = 3;
static constexpr uint32_t maxNumberOfUpdatedReservedPages = numberOfRequiredReservedPages;
protected:
/////////////////////////////////////////////////////////
// Members
/////////////////////////////////////////////////////////
// test subject - all the below are used to create a tested replica
Config config_;
TestAppState app_state_;
TestReplica replica_;
std::shared_ptr<BCStateTran> stateTransfer_;
DataStore* datastore_ = nullptr;
std::unique_ptr<MockedSources> mockedSrc_;
// Test body related members
struct CommonTestParams {
uint64_t lastReachedcheckpointNum;
uint64_t expectedFirstRequiredBlockNum;
uint64_t expectedLastRequiredBlockNum;
};
CommonTestParams testParams_;
/////////////////////////////////////////////////////////
// Ctor / Dtor / SetUp / TearDown
/////////////////////////////////////////////////////////
BcStTest() {
testParams_.lastReachedcheckpointNum = defaultLastReachedcheckpointNum;
testParams_.expectedFirstRequiredBlockNum = app_state_.getGenesisBlockNum() + 1;
testParams_.expectedLastRequiredBlockNum = (testParams_.lastReachedcheckpointNum + 1) * checkpointWindowSize;
DeleteBcStateTransferDbFolder(BCST_DB);
}
~BcStTest(){};
void SetUp() override {
// uncomment if needed after setting the required log level
#ifdef USE_LOG4CPP
log4cplus::LogLevel logLevel = log4cplus::INFO_LOG_LEVEL;
// logging::Logger::getInstance("serializable").setLogLevel(logLevel);
// logging::Logger::getInstance("concord.bft.st.dbdatastore").setLogLevel(logLevel);
logging::Logger::getInstance("concord.bft.st.dst").setLogLevel(logLevel);
logging::Logger::getInstance("concord.bft.st.src").setLogLevel(logLevel);
logging::Logger::getInstance("concord.util.handoff").setLogLevel(logLevel);
// logging::Logger::getInstance("rocksdb").setLogLevel(logLevel);
#else
logging::LogLevel logLevel = logging::LogLevel::info;
// logging::Logger::getInstance("serializable").setLogLevel(logLevel);
// logging::Logger::getInstance("concord.bft.st.dbdatastore").setLogLevel(logLevel);
logging::getLogger("concord.bft.st.dst").setLogLevel(logLevel);
logging::getLogger("concord.bft.st.src").setLogLevel(logLevel);
logging::getLogger("concord.util.handoff").setLogLevel(logLevel);
// logging::Logger::getInstance("rocksdb").setLogLevel(logLevel);
#endif
config_ = TestConfig();
// For now we assume no chunking is supported
ConcordAssertEQ(config_.maxChunkSize, config_.maxBlockSize);
#ifdef USE_ROCKSDB
auto* db_key_comparator = new concord::kvbc::v1DirectKeyValue::DBKeyComparator();
concord::storage::IDBClient::ptr dbc(
new concord::storage::rocksdb::Client(string(BCST_DB), make_unique<KeyComparator>(db_key_comparator)));
dbc->init();
datastore_ = new DBDataStore(dbc,
config_.sizeOfReservedPage,
make_shared<concord::storage::v1DirectKeyValue::STKeyManipulator>(),
config_.enableReservedPages);
#else
auto comparator = concord::storage::memorydb::KeyComparator(db_key_comparator);
concord::storage::IDBClient::ptr dbc1(new concord::storage::memorydb::Client(comparator));
datastore_ = new InMemoryDataStore(config_.sizeOfReservedPage);
#endif
stateTransfer_.reset(new BCStateTran(config_, &app_state_, datastore_));
stateTransfer_->init(maxNumOfRequiredStoredCheckpoints, numberOfRequiredReservedPages, config_.sizeOfReservedPage);
for (uint32_t i{0}; i < numberOfRequiredReservedPages; ++i) {
stateTransfer_->zeroReservedPage(i);
}
mockedSrc_.reset(new MockedSources(config_, testParams_, replica_, stateTransfer_));
ASSERT_FALSE(stateTransfer_->isRunning());
stateTransfer_->startRunning(&replica_);
ASSERT_TRUE(stateTransfer_->isRunning());
ASSERT_EQ(BCStateTran::FetchingState::NotFetching, stateTransfer_->getFetchingState());
ASSERT_LE(minNumberOfUpdatedReservedPages, maxNumberOfUpdatedReservedPages);
ASSERT_LE(testParams_.expectedFirstRequiredBlockNum, testParams_.expectedLastRequiredBlockNum);
}
void TearDown() override {
if (stateTransfer_) {
// Must stop running before destruction
if (stateTransfer_->isRunning()) {
stateTransfer_->stopRunning();
}
}
DeleteBcStateTransferDbFolder(BCST_DB);
}
static void DeleteBcStateTransferDbFolder(string&& path) {
string cmd = string("rm -rf ") + string(path);
if (system(cmd.c_str())) {
ASSERT_TRUE(false);
}
}
/////////////////////////////////////////////////////////
// State Transfer proxies (BcStTest is a friend class)
/////////////////////////////////////////////////////////
void onTimerImp() { stateTransfer_->onTimerImp(); }
SourceSelector& GetSourceSelector() { return stateTransfer_->sourceSelector_; }
/////////////////////////////////////////////////////////
// Tests common code - send messages
/////////////////////////////////////////////////////////
void SendCheckpointSummaries() {
stateTransfer_->startCollectingState();
ASSERT_EQ(BCStateTran::FetchingState::GettingCheckpointSummaries, stateTransfer_->getFetchingState());
auto min_relevant_checkpoint = 1;
AssertCheckpointSummariesSent(min_relevant_checkpoint);
}
/////////////////////////////////////////////////////////
// Tests common code - state assertions
/////////////////////////////////////////////////////////
static void AssertMsgType(const Msg& msg, uint16_t type) {
auto header = reinterpret_cast<BCStateTranBaseMsg*>(msg.data_.get());
ASSERT_EQ(type, header->type);
}
void AssertCheckpointSummariesSent(uint64_t checkpoint_num) {
ASSERT_EQ(replica_.sent_messages_.size(), config_.numReplicas - 1);
set<uint16_t> dests;
for (auto& msg : replica_.sent_messages_) {
auto p = dests.insert(msg.to_);
ASSERT_TRUE(p.second); // destinations must be unique
AssertMsgType(msg, MsgType::AskForCheckpointSummaries);
auto askMsg = reinterpret_cast<AskForCheckpointSummariesMsg*>(msg.data_.get());
ASSERT_TRUE(askMsg->msgSeqNum > 0);
ASSERT_EQ(checkpoint_num, askMsg->minRelevantCheckpointNum);
}
}
void AssertFetchBlocksMsgSent(uint64_t firstRequiredBlock, uint64_t lastRequiredBlock) {
ASSERT_EQ(BCStateTran::FetchingState::GettingMissingBlocks, stateTransfer_->getFetchingState());
auto currentSourceId = GetSourceSelector().currentReplica();
ASSERT_NE(currentSourceId, NO_REPLICA);
ASSERT_EQ(datastore_->getFirstRequiredBlock(), firstRequiredBlock);
ASSERT_EQ(datastore_->getLastRequiredBlock(), lastRequiredBlock);
ASSERT_EQ(replica_.sent_messages_.size(), 1);
AssertMsgType(replica_.sent_messages_.front(), MsgType::FetchBlocks);
ASSERT_EQ(replica_.sent_messages_.front().to_, currentSourceId);
}
void AssertFetchResPagesMsgSent() {
ASSERT_EQ(BCStateTran::FetchingState::GettingMissingResPages, stateTransfer_->getFetchingState());
auto currentSourceId = GetSourceSelector().currentReplica();
ASSERT_NE(currentSourceId, NO_REPLICA);
ASSERT_EQ(datastore_->getFirstRequiredBlock(), datastore_->getLastRequiredBlock());
ASSERT_EQ(replica_.sent_messages_.size(), 1);
AssertMsgType(replica_.sent_messages_.front(), MsgType::FetchResPages);
ASSERT_EQ(replica_.sent_messages_.front().to_, currentSourceId);
}
// TODO(GL) - consider transforming to gMock? + the mocked interfaces (replica, app)
class MockedSources {
protected:
DataStore* mockedDatastore_ = nullptr;
std::unique_ptr<char[]> rawVBlock_;
std::map<uint64_t, std::shared_ptr<Block>> generatedBlocks_; // map: blockId -> Block
std::optional<FetchResPagesMsg> lastReceivedFetchResPagesMsg_;
Config& config_;
CommonTestParams testParams_;
TestAppState app_state_;
TestReplica& replica_;
const std::shared_ptr<BCStateTran>& stateTransfer_;
/////////////////////////////////////////////////////////
// Ctor / Dtor
/////////////////////////////////////////////////////////
public:
MockedSources(Config& config,
CommonTestParams& testParams_,
TestReplica& replica,
const std::shared_ptr<BCStateTran>& stateTransfer)
: config_(config), testParams_(testParams_), replica_(replica), stateTransfer_(stateTransfer) {
DeleteBcStateTransferDbFolder(MOCKED_BCST_DB);
#ifdef USE_ROCKSDB
// create a mocked data store
auto* mocked_db_key_comparator = new concord::kvbc::v1DirectKeyValue::DBKeyComparator();
concord::storage::IDBClient::ptr mockedDbc(new concord::storage::rocksdb::Client(
string(MOCKED_BCST_DB), make_unique<KeyComparator>(mocked_db_key_comparator)));
mockedDbc->init();
mockedDatastore_ = new DBDataStore(mockedDbc,
config_.sizeOfReservedPage,
make_shared<concord::storage::v1DirectKeyValue::STKeyManipulator>(),
config_.enableReservedPages);
mockedDatastore_->setNumberOfReservedPages(numberOfRequiredReservedPages);
#else
concord::storage::IDBClient::ptr dbc2(new concord::storage::memorydb::Client(comparator));
mockedDatastore_ = new InMemoryDataStore(config_.sizeOfReservedPage);
#endif
}
~MockedSources() {
delete mockedDatastore_;
DeleteBcStateTransferDbFolder(MOCKED_BCST_DB);
}
/////////////////////////////////////////////////////////
// Source (Mock) Replies
/////////////////////////////////////////////////////////
void ReplyAskForCheckpointSummariesMsg() {
const uint64_t toCheckpoint = testParams_.lastReachedcheckpointNum;
const uint64_t fromCheckpoint = testParams_.lastReachedcheckpointNum - maxNumOfRequiredStoredCheckpoints + 1;
vector<unique_ptr<CheckpointSummaryMsg>> checkpointSummaryReplies;
// Generate all the blocks until lastBlock of the last checkpoint
auto lastBlockId = (toCheckpoint + 1) * checkpointWindowSize;
GenerateBlocks(app_state_.getGenesisBlockNum() + 1, lastBlockId);
// Compute digest of last block
StateTransferDigest lastBlockDigest;
const auto& lastBlk = generatedBlocks_[lastBlockId];
computeBlockDigest(
lastBlockId, reinterpret_cast<const char*>(lastBlk.get()), lastBlk->totalBlockSize, &lastBlockDigest);
// build a single copy of all replied messages, push to a vector
const auto& firstMsg = replica_.sent_messages_.front();
auto firstAskForCheckpointSummariesMsg = reinterpret_cast<AskForCheckpointSummariesMsg*>(firstMsg.data_.get());
for (uint64_t i = toCheckpoint; i >= fromCheckpoint; i--) {
unique_ptr<CheckpointSummaryMsg> reply = make_unique<CheckpointSummaryMsg>();
reply->checkpointNum = i;
reply->lastBlock = (i + 1) * checkpointWindowSize;
auto digestBytes = reply->digestOfLastBlock.getForUpdate();
if (i == toCheckpoint)
memcpy(digestBytes, &lastBlockDigest, sizeof(lastBlockDigest));
else {
auto blk = generatedBlocks_[reply->lastBlock + 1];
memcpy(digestBytes, &blk->digestPrev, sizeof(blk->digestPrev));
}
GenerateReservedPages(i);
DataStore::ResPagesDescriptor* resPagesDesc = mockedDatastore_->getResPagesDescriptor(i);
STDigest digestOfResPagesDescriptor;
BCStateTran::computeDigestOfPagesDescriptor(resPagesDesc, digestOfResPagesDescriptor);
reply->digestOfResPagesDescriptor = digestOfResPagesDescriptor;
reply->requestMsgSeqNum = firstAskForCheckpointSummariesMsg->msgSeqNum;
checkpointSummaryReplies.push_back(move(reply));
}
// send replies from all replicas (shuffle the requests to get a random reply order)
auto rng = std::default_random_engine{};
std::shuffle(std::begin(replica_.sent_messages_), std::end(replica_.sent_messages_), rng);
for (const auto& reply : checkpointSummaryReplies) {
for (auto& request : replica_.sent_messages_) {
CheckpointSummaryMsg* uniqueReply = new CheckpointSummaryMsg();
*uniqueReply = *reply.get();
stateTransfer_->onMessage(uniqueReply, sizeof(CheckpointSummaryMsg), request.to_);
}
}
ASSERT_EQ(ClearSentMessagesByMessageType(MsgType::AskForCheckpointSummaries), config_.numReplicas - 1);
}
void ReplyFetchBlocksMsg() {
ASSERT_EQ(replica_.sent_messages_.size(), 1);
const auto& msg = replica_.sent_messages_.front();
AssertMsgType(msg, MsgType::FetchBlocks);
auto fetchBlocksMsg = reinterpret_cast<FetchBlocksMsg*>(msg.data_.get());
uint64_t nextBlockId = fetchBlocksMsg->lastRequiredBlock;
size_t numOfSentChunks = 0;
// For now we assume no chunking is supported
ConcordAssertEQ(fetchBlocksMsg->lastKnownChunkInLastRequiredBlock, 0);
ConcordAssertLE(fetchBlocksMsg->firstRequiredBlock, fetchBlocksMsg->lastRequiredBlock);
while (true) {
const auto& blk = generatedBlocks_[nextBlockId];
ItemDataMsg* itemDataMsg = ItemDataMsg::alloc(blk->totalBlockSize);
bool lastInBatch = ((numOfSentChunks + 1) >= config_.maxNumberOfChunksInBatch) ||
((nextBlockId - 1) < fetchBlocksMsg->firstRequiredBlock);
itemDataMsg->lastInBatch = lastInBatch;
itemDataMsg->blockNumber = nextBlockId;
itemDataMsg->totalNumberOfChunksInBlock = 1;
itemDataMsg->chunkNumber = 1;
itemDataMsg->requestMsgSeqNum = fetchBlocksMsg->msgSeqNum;
itemDataMsg->dataSize = blk->totalBlockSize;
memcpy(itemDataMsg->data, blk.get(), blk->totalBlockSize);
stateTransfer_->onMessage(itemDataMsg, itemDataMsg->size(), msg.to_, std::chrono::steady_clock::now());
if (lastInBatch) {
break;
}
--nextBlockId;
++numOfSentChunks;
}
replica_.sent_messages_.pop_front();
}
// To ASSERT_ / EXPECT_ inside this function, we must pass output as a parameter
void ReplyResPagesMsg(bool& outDoneSending) {
ASSERT_EQ(replica_.sent_messages_.size(), 1);
const auto& msg = replica_.sent_messages_.front();
AssertMsgType(msg, MsgType::FetchResPages);
auto fetchResPagesMsg = reinterpret_cast<FetchResPagesMsg*>(msg.data_.get());
// check if need to create a vBlock
if (!lastReceivedFetchResPagesMsg_ ||
lastReceivedFetchResPagesMsg_.value().lastCheckpointKnownToRequester !=
fetchResPagesMsg->lastCheckpointKnownToRequester ||
lastReceivedFetchResPagesMsg_.value().requiredCheckpointNum != fetchResPagesMsg->requiredCheckpointNum) {
// need to generate pages - for now, lets assume all pages need to be updated
uint32_t numberOfUpdatedPages = maxNumberOfUpdatedReservedPages;
const uint32_t elementSize = sizeof(BCStateTran::ElementOfVirtualBlock) + config_.sizeOfReservedPage - 1;
const uint32_t size = sizeof(BCStateTran::HeaderOfVirtualBlock) + numberOfUpdatedPages * elementSize;
lastReceivedFetchResPagesMsg_ = *fetchResPagesMsg;
// allocate and fill vBlock
rawVBlock_.reset(new char[size]);
std::fill(rawVBlock_.get(), rawVBlock_.get() + size, 0);
BCStateTran::HeaderOfVirtualBlock* header =
reinterpret_cast<BCStateTran::HeaderOfVirtualBlock*>(rawVBlock_.get());
header->lastCheckpointKnownToRequester = fetchResPagesMsg->lastCheckpointKnownToRequester;
header->numberOfUpdatedPages = numberOfUpdatedPages;
char* elements = rawVBlock_.get() + sizeof(BCStateTran::HeaderOfVirtualBlock);
uint32_t idx = 0;
DataStore::ResPagesDescriptor* resPagesDesc =
mockedDatastore_->getResPagesDescriptor(fetchResPagesMsg->requiredCheckpointNum);
for (uint32_t pageId{0}; pageId < numberOfUpdatedPages; ++pageId) {
ConcordAssertLT(idx, numberOfUpdatedPages);
BCStateTran::ElementOfVirtualBlock* currElement =
reinterpret_cast<BCStateTran::ElementOfVirtualBlock*>(elements + idx * elementSize);
currElement->pageId = pageId;
currElement->checkpointNumber = fetchResPagesMsg->requiredCheckpointNum;
currElement->pageDigest = resPagesDesc->d[pageId].pageDigest;
ASSERT_TRUE(!currElement->pageDigest.isZero());
mockedDatastore_->getResPage(
pageId, currElement->checkpointNumber, nullptr, currElement->page, config_.sizeOfReservedPage);
ASSERT_TRUE(!currElement->pageDigest.isZero());
idx++;
}
}
ASSERT_TRUE(rawVBlock_.get());
uint32_t vblockSize = BCStateTran::getSizeOfVirtualBlock(rawVBlock_.get(), config_.sizeOfReservedPage);
ASSERT_GE(vblockSize, sizeof(BCStateTran::HeaderOfVirtualBlock));
ASSERT_TRUE(BCStateTran::checkStructureOfVirtualBlock(
rawVBlock_.get(), vblockSize, config_.sizeOfReservedPage, stateTransfer_->logger_));
// compute information about next chunk
uint32_t sizeOfLastChunk = config_.maxChunkSize;
uint32_t numOfChunksInVBlock = vblockSize / config_.maxChunkSize;
uint16_t nextChunk = fetchResPagesMsg->lastKnownChunk + 1;
if (vblockSize % config_.maxChunkSize != 0) {
sizeOfLastChunk = vblockSize % config_.maxChunkSize;
numOfChunksInVBlock++;
}
// if msg is invalid (because lastKnownChunk+1 does not exist)
ASSERT_LE(nextChunk, numOfChunksInVBlock);
// send chunks
uint16_t numOfSentChunks = 0;
while (true) {
uint32_t chunkSize = (nextChunk < numOfChunksInVBlock) ? config_.maxChunkSize : sizeOfLastChunk;
ASSERT_GT(chunkSize, 0);
char* pRawChunk = rawVBlock_.get() + (nextChunk - 1) * config_.maxChunkSize;
ItemDataMsg* outMsg = ItemDataMsg::alloc(chunkSize);
outMsg->requestMsgSeqNum = fetchResPagesMsg->msgSeqNum;
outMsg->blockNumber = BCStateTran::ID_OF_VBLOCK_RES_PAGES;
outMsg->totalNumberOfChunksInBlock = numOfChunksInVBlock;
outMsg->chunkNumber = nextChunk;
outMsg->dataSize = chunkSize;
outMsg->lastInBatch =
((numOfSentChunks + 1) >= config_.maxNumberOfChunksInBatch || (nextChunk == numOfChunksInVBlock));
memcpy(outMsg->data, pRawChunk, chunkSize);
stateTransfer_->onMessage(outMsg, outMsg->size(), msg.to_, std::chrono::steady_clock::now());
numOfSentChunks++;
// if we've already sent enough chunks
if (numOfSentChunks >= config_.maxNumberOfChunksInBatch) {
outDoneSending = false;
break;
}
// if we still have chunks in block
if (nextChunk < numOfChunksInVBlock) {
nextChunk++;
} else { // we sent all chunks
outDoneSending = true;
break;
}
} // while
replica_.sent_messages_.pop_front();
}
protected:
void GenerateReservedPages(uint64_t checkpointNumber) {
uint32_t idx = 0;
std::unique_ptr<char[]> buffer(new char[config_.sizeOfReservedPage]);
for (uint32_t pageId{0}; pageId < maxNumberOfUpdatedReservedPages; ++pageId) {
ConcordAssertLT(idx, maxNumberOfUpdatedReservedPages);
STDigest pageDigest;
fillRandomBytes(buffer.get(), config_.sizeOfReservedPage);
BCStateTran::computeDigestOfPage(
pageId, checkpointNumber, buffer.get(), config_.sizeOfReservedPage, pageDigest);
ASSERT_TRUE(!pageDigest.isZero());
mockedDatastore_->setResPage(pageId, checkpointNumber, pageDigest, buffer.get());
idx++;
}
}
// toBlockId is assumed to be a checkpoint block, we also assume generatedBlocks_ is empty
void GenerateBlocks(uint64_t fromBlockId, uint64_t toBlockId) {
char buff[kMaxBlockSize];
ConcordAssertEQ(toBlockId % checkpointWindowSize, 0);
ConcordAssert(generatedBlocks_.empty());
ConcordAssertGT(fromBlockId, 1);
auto maxBlockDataSize = Block::calcMaxDataSize();
for (size_t i = fromBlockId; i <= toBlockId; ++i) {
uint32_t dataSize =
static_cast<uint32_t>(rand()) % (maxBlockDataSize - defaultMinBlockDataSize + 1) + defaultMinBlockDataSize;
ConcordAssertLE(dataSize, maxBlockDataSize);
fillRandomBytes(buff, dataSize);
std::shared_ptr<Block> blk;
StateTransferDigest prevBlkDigest{1};
if (i == fromBlockId) {
blk = Block::createFromData(dataSize, buff, i, prevBlkDigest);
} else {
auto prevBlk = generatedBlocks_[i - 1];
computeBlockDigest(
prevBlk->blockId, reinterpret_cast<const char*>(prevBlk.get()), prevBlk->totalBlockSize, &prevBlkDigest);
blk = Block::createFromData(dataSize, buff, i, prevBlkDigest);
}
generatedBlocks_[i] = blk;
}
}
/////////////////////////////////////////////////////////
// Helper functions
/////////////////////////////////////////////////////////
size_t ClearSentMessagesByMessageType(uint16_t type) { return FilterSentMessagesByMessageType(type, false); }
size_t KeepSentMessagesByMessageType(uint16_t type) { return FilterSentMessagesByMessageType(type, true); }
// keep is true: keep only messages with msg->type == type
// keep is false: keep all message with msg->type != type
// return number of messages deleted
size_t FilterSentMessagesByMessageType(uint16_t type, bool keep) {
auto& sent_messages_ = replica_.sent_messages_;
size_t n{0};
for (auto it = sent_messages_.begin(); it != sent_messages_.end();) {
auto header = reinterpret_cast<BCStateTranBaseMsg*>((*it).data_.get());
// This block can be much shorter. For better readibility, keep it like that
if (keep) {
if (header->type != type) {
it = sent_messages_.erase(it);
++n;
continue;
}
} else { // keep == false
if (header->type == type) {
it = sent_messages_.erase(it);
++n;
continue;
}
}
++it;
} // for
return n;
}
}; // class MockedSources
static void fillRandomBytes(char* data, size_t bytesToFill) {
using random_bytes_engine = std::independent_bits_engine<std::default_random_engine, CHAR_BIT, unsigned char>;
random_bytes_engine rbe;
std::generate(data, data + bytesToFill, std::ref(rbe));
}
}; // class BcStTest
// Validates that GettingCheckpointSummaries is sent to all replicas
TEST_F(BcStTest, dstSendAskForCheckpointSummariesMsg) { ASSERT_NO_FATAL_FAILURE(SendCheckpointSummaries()); }
// Validates that after GettingCheckpointSummaries is sent to all replicas, dest retrnasmit on timeout
TEST_F(BcStTest, dstRetransmitAskForCheckpointSummariesMsg) {
ASSERT_NO_FATAL_FAILURE(SendCheckpointSummaries());
this_thread::sleep_for(milliseconds(config_.checkpointSummariesRetransmissionTimeoutMs + 100));
onTimerImp();
ASSERT_EQ(replica_.sent_messages_.size(), (config_.numReplicas - 1) * 2);
}
// Validate that when f+1 identical checkpoint summary message are received within a certain duration from f+1 sources,
// then destinations process them correctly and moves into the next stage to fetch blocks / reserved pages
// Also validate that a single FetchBlocksMsg has been sent to a specific source
TEST_F(BcStTest, dstProcessCheckpointSummariesMsgs) {
ASSERT_NO_FATAL_FAILURE(SendCheckpointSummaries());
// in the next call multiple CheckpointSummaries message are sent, and in addition, a single FetchBlocksMsg is sent
mockedSrc_->ReplyAskForCheckpointSummariesMsg();
ASSERT_NO_FATAL_FAILURE(
AssertFetchBlocksMsgSent(testParams_.expectedFirstRequiredBlockNum, testParams_.expectedLastRequiredBlockNum));
}
// Validate correct processing of series of ItemDataMsg messages from a mocked source
TEST_F(BcStTest, dstProcessItemDataMsgs) {
ASSERT_NO_FATAL_FAILURE(SendCheckpointSummaries());
mockedSrc_->ReplyAskForCheckpointSummariesMsg();
while (true) {
ASSERT_NO_FATAL_FAILURE(
AssertFetchBlocksMsgSent(testParams_.expectedFirstRequiredBlockNum, testParams_.expectedLastRequiredBlockNum));
mockedSrc_->ReplyFetchBlocksMsg();
if (testParams_.expectedLastRequiredBlockNum <= config_.maxNumberOfChunksInBatch) break;
testParams_.expectedLastRequiredBlockNum -= config_.maxNumberOfChunksInBatch;
// There might be pending jobs for putBlock, we need to wait some time and then finalize them by calling
// onTimerImp()
this_thread::sleep_for(chrono::milliseconds(20));
onTimerImp();
}
ASSERT_NO_FATAL_FAILURE(AssertFetchResPagesMsgSent());
}
// Validate a full state transfer
TEST_F(BcStTest, dstFullStateTransfer) {
ASSERT_NO_FATAL_FAILURE(SendCheckpointSummaries());
mockedSrc_->ReplyAskForCheckpointSummariesMsg();
while (true) {
ASSERT_NO_FATAL_FAILURE(
AssertFetchBlocksMsgSent(testParams_.expectedFirstRequiredBlockNum, testParams_.expectedLastRequiredBlockNum));
mockedSrc_->ReplyFetchBlocksMsg();
if (testParams_.expectedLastRequiredBlockNum <= config_.maxNumberOfChunksInBatch) break;
testParams_.expectedLastRequiredBlockNum -= config_.maxNumberOfChunksInBatch;
// There might be pending jobs for putBlock, we need to wait some time and then finalize them by calling
// onTimerImp()
this_thread::sleep_for(chrono::milliseconds(20));
onTimerImp();
}
ASSERT_NO_FATAL_FAILURE(AssertFetchResPagesMsgSent());
bool doneSending = false;
while (!doneSending) mockedSrc_->ReplyResPagesMsg(doneSending);
// now validate commpletion
ASSERT_TRUE(replica_.onTransferringCompleteCalled_);
ASSERT_EQ(BCStateTran::FetchingState::NotFetching, stateTransfer_->getFetchingState());
}
// Check that only actual resources are inserted into source selector actualSources_
// This is done by triggering multiple retransmissions and then source replacments, and checking that only the sources
// which replied are in the list, and in the expected order.
// The check is done only for FetchingMissingblocks state sources.
TEST_F(BcStTest, dstValidateRealSourceListReported) {
uint16_t currentSrc;
// Add callback to ST to be executed when transferring is completed.
// Here we valiate that only one actual source is in the sources list, although we had multiple
// retransmissions and few sources were selected.
stateTransfer_->addOnTransferringCompleteCallback([this, ¤tSrc](std::uint64_t) {
const auto& sources_ = GetSourceSelector().getActualSources();
ASSERT_EQ(sources_.size(), 1);
ASSERT_EQ(sources_[0], currentSrc);
});
ASSERT_NO_FATAL_FAILURE(SendCheckpointSummaries());
mockedSrc_->ReplyAskForCheckpointSummariesMsg();
// Trigger multiple retransmissions to 2 sources. none will be answered, then we expect the replica to move into the
// 3rd source
auto& sourceSelector = GetSourceSelector();
set<uint16_t> sources;
for (uint32_t i{0}; i < 2; ++i) {
for (uint32_t j{0}; j < config_.maxFetchRetransmissions; ++j) {
if (j == 0) {
currentSrc = sourceSelector.currentReplica();
auto result = sources.insert(currentSrc);
ASSERT_TRUE(result.second);
} else {
ASSERT_EQ(currentSrc, sourceSelector.currentReplica());
}
ASSERT_EQ(replica_.sent_messages_.size(), 1);
ASSERT_EQ(replica_.sent_messages_.front().to_, currentSrc);
replica_.sent_messages_.clear();
this_thread::sleep_for(chrono::milliseconds(config_.fetchRetransmissionTimeoutMs + 10));
onTimerImp();
}
}
ASSERT_EQ(replica_.sent_messages_.size(), 1);
currentSrc = sourceSelector.currentReplica();
while (true) {
ASSERT_NO_FATAL_FAILURE(
AssertFetchBlocksMsgSent(testParams_.expectedFirstRequiredBlockNum, testParams_.expectedLastRequiredBlockNum));
mockedSrc_->ReplyFetchBlocksMsg();
if (testParams_.expectedLastRequiredBlockNum <= config_.maxNumberOfChunksInBatch) break;
testParams_.expectedLastRequiredBlockNum -= config_.maxNumberOfChunksInBatch;
// There might be pending jobs for putBlock, we need to wait some time and then finalize them by calling
// onTimerImp()
this_thread::sleep_for(chrono::milliseconds(20));
onTimerImp();
}
ASSERT_NO_FATAL_FAILURE(AssertFetchResPagesMsgSent());
bool doneSending = false;
while (!doneSending) mockedSrc_->ReplyResPagesMsg(doneSending);
// now validate completion
ASSERT_TRUE(replica_.onTransferringCompleteCalled_);
ASSERT_EQ(BCStateTran::FetchingState::NotFetching, stateTransfer_->getFetchingState());
}
} // namespace bftEngine::bcst::impl
int main(int argc, char** argv) {
srand(time(NULL));
testing::InitGoogleTest(&argc, argv);
testing::FLAGS_gtest_death_test_style =
"threadsafe"; // mitigate the risks of testing in a possibly multithreaded environment
return RUN_ALL_TESTS();
}
|
76a39c69a4db7f761cd55020a6716e9642ae361b | 916109bf168239202442498e568b2bfc9a8bc8a9 | /src/asiVisu/asiVisu_MeshDisplayMode.h | 6ff3a9cf6651e9c60637ab28809e44d0cc0fd9c5 | [
"BSD-3-Clause",
"MIT"
] | permissive | yeeeeeeti/3D_feature_extract | 35da69cd64cd6ed6c92fd4541da5de7bb96dc2b6 | 6297daa8afaac09aef9b44858e74fb2a95e1e7c5 | refs/heads/master | 2020-09-05T02:27:30.997017 | 2019-11-07T01:24:26 | 2019-11-07T01:24:26 | 219,956,109 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,533 | h | asiVisu_MeshDisplayMode.h | //-----------------------------------------------------------------------------
// Created on: 11 July 2017
//-----------------------------------------------------------------------------
// Copyright (c) 2017, Sergey Slyadnev
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the copyright holder(s) nor the
// names of all contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------
#ifndef asiVisu_MeshDisplayMode_h
#define asiVisu_MeshDisplayMode_h
// asiVisu includes
#include <asiVisu_MeshPrimitive.h>
// OCCT includes
#include <TColStd_PackedMapOfInteger.hxx>
//-----------------------------------------------------------------------------
//! Enumerates display modes.
enum asiVisu_MeshDisplayMode
{
MeshDisplayMode_Undefined = 0x0000, //!< Undefined display mode.
MeshDisplayMode_Shaded = 0x0001, //!< Shaded.
MeshDisplayMode_Shrunk = 0x0002, //!< Shrunk.
MeshDisplayMode_Vertices = 0x0004, //!< Vertices.
MeshDisplayMode_Wireframe = 0x0008, //!< Wireframe.
MeshDisplayMode_WireframeAndVertices = 0x0010 //!< Wireframe with vertices.
};
//-----------------------------------------------------------------------------
//! Provides display modes for a display mode filter.
class asiVisu_MeshDisplayModeProvider
{
public:
//! \return collection of mesh primitives employed in SHADED mode.
static TColStd_PackedMapOfInteger SHADED()
{
TColStd_PackedMapOfInteger mode;
// Add anomaly node types
mode.Add(MeshPrimitive_FreeNode);
mode.Add(MeshPrimitive_BorderNode);
// Add anomaly link types
mode.Add(MeshPrimitive_FreeLink);
mode.Add(MeshPrimitive_DanglingLink);
mode.Add(MeshPrimitive_BorderLink);
mode.Add(MeshPrimitive_NonManifoldLink);
// Add 2D and 3D cells
mode.Add(MeshPrimitive_CellTriangle);
mode.Add(MeshPrimitive_CellQuad);
mode.Add(MeshPrimitive_CellTetra);
mode.Add(MeshPrimitive_CellHexa);
return mode;
}
//! \return collection of mesh primitives employed in SHRUNK mode.
static TColStd_PackedMapOfInteger SHRUNK()
{
TColStd_PackedMapOfInteger mode = WIREFRAME();
// TODO: NYI
mode.Add(MeshPrimitive_SharedNode);
return mode;
}
//! \return collection of mesh primitives employed in VERTICES mode.
static TColStd_PackedMapOfInteger VERTICES()
{
TColStd_PackedMapOfInteger mode;
//
mode.Add(MeshPrimitive_FreeNode);
mode.Add(MeshPrimitive_BorderNode);
mode.Add(MeshPrimitive_SharedNode);
//
return mode;
}
//! \return collection of mesh primitives employed in WIREFRAME mode.
static TColStd_PackedMapOfInteger WIREFRAME()
{
TColStd_PackedMapOfInteger mode;
// Add anomaly node types
mode.Add(MeshPrimitive_FreeNode);
mode.Add(MeshPrimitive_BorderNode);
// Add all types of links
mode.Add(MeshPrimitive_FreeLink);
mode.Add(MeshPrimitive_DanglingLink);
mode.Add(MeshPrimitive_BorderLink);
mode.Add(MeshPrimitive_ManifoldLink);
mode.Add(MeshPrimitive_NonManifoldLink);
return mode;
}
//! \return collection of shape primitives employed in WIREFRAME and VERTICES mode.
static TColStd_PackedMapOfInteger WIREFRAME_AND_VERTICES()
{
TColStd_PackedMapOfInteger mode = WIREFRAME();
//
mode.Unite( VERTICES() );
//
return mode;
}
//! Returns shape primitives employed in the given display mode.
//! \param mode [in] display mode of interest.
//! \return collection of primitive types.
static TColStd_PackedMapOfInteger GetPrimitivesForMode(const asiVisu_MeshDisplayMode mode)
{
switch ( mode )
{
case MeshDisplayMode_Shaded: return SHADED();
case MeshDisplayMode_Shrunk: return SHRUNK();
case MeshDisplayMode_Vertices: return VERTICES();
case MeshDisplayMode_Wireframe: return WIREFRAME();
case MeshDisplayMode_WireframeAndVertices: return WIREFRAME_AND_VERTICES();
//
default: break;
}
return TColStd_PackedMapOfInteger();
}
};
#endif
|
5fed4de581326c7ce7c3dd5fbd81f1ec2212cd05 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /GPU-Gems-Book-Source-Code/GPU-Gems-3-CD-Content/content/30/Include/FCollada/FCDocument/FCDCamera.h | efed18499edbeffd1b716308a36721cb84c62ba4 | [
"MIT",
"LicenseRef-scancode-x11-xconsortium-veillard"
] | permissive | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | C++ | false | false | 11,800 | h | FCDCamera.h | /*
Copyright (C) 2005-2007 Feeling Software Inc.
MIT License: http://www.opensource.org/licenses/mit-license.php
*/
/*
Based on the FS Import classes:
Copyright (C) 2005-2006 Feeling Software Inc
Copyright (C) 2005-2006 Autodesk Media Entertainment
MIT License: http://www.opensource.org/licenses/mit-license.php
*/
/**
@file FCDCamera.h
This file contains the FCDCamera class.
*/
#ifndef _FCD_CAMERA_H_
#define _FCD_CAMERA_H_
#ifndef _FCD_TARGETED_ENTITY_H_
#include "FCDocument/FCDTargetedEntity.h"
#endif // _FCD_TARGETED_ENTITY_H_
class FCDocument;
class FCDSceneNode;
/**
A COLLADA camera.
Based on the FCDTargetedEntity class to support aimed cameras.
COLLADA defines two types of cameras: perspective and orthographic.
Both types are fully handled by this class.
A COLLADA perspective camera defines two of the three following parameters: horizontal field of view,
vertical field of view and aspect ratio. The missing parameter can be calculated using the following formulae:
aspect ratio = vertical field of view / horizontal field of view. The vertical and horizontal field
of view are in degrees.
A COLLADA orthographic camera defines two of the three following parameters: horizontal magnification,
vertical magnification and aspect ratio. The missing parameter can be calculated using the following formulae:
aspect ratio = vertical magnification / horizontal magnification. You can calculate the viewport width
and height using the following formulas: viewport width = horizontal magnification * 2, viewport height
= vertical magnification * 2.
@ingroup FCDocument
*/
class FCOLLADA_EXPORT FCDCamera : public FCDTargetedEntity
{
private:
DeclareObjectType(FCDTargetedEntity);
// Camera flags
bool isPerspective;
bool isOrthographic;
bool hasHorizontalView;
bool hasVerticalView;
// Camera parameters
float viewY;
float viewX;
float nearZ;
float farZ;
float aspectRatio;
// Maya parameters
bool hasAperture;
float verticalAperture;
float horizontalAperture;
float lensSqueeze;
public:
/** Constructor: do not use directly. Create new cameras using the FCDLibrary::AddEntity function.
@param document The COLLADA document that contains this camera entity.*/
FCDCamera(FCDocument* document);
/** Destructor. */
virtual ~FCDCamera();
/** Retrieves the entity type for this class. This function is part of the FCDEntity interface.
@return The entity type: CAMERA. */
virtual Type GetType() const { return CAMERA; }
/** Retrieves whether this camera is a perspective camera.
This is the default type of camera.
@return Whether this camera is a perspective camera.*/
inline bool IsPerspective() const { return isPerspective; }
/** Sets the type of this camera to perspective. */
inline void SetPerspective() { isPerspective = true; isOrthographic = false; SetDirtyFlag(); }
/** Retrieves whether the perspective camera defines an horizontal field of view.
If the camera does not define the horizontal field of view, you can calculate
it using the following formula: horizontal field of view = vertical field of view / aspect ratio.
@return Whether the perspective camera defines an horizontal field of view. */
inline bool HasHorizontalFov() const { return hasHorizontalView; }
/** Retrieves whether the perspective camera defines a vertical field of view.
If the camera does not define the vertical field of view, you can calculate
it using the following formula: vertical field of view = aspect ratio * horizontal field of view.
@return Whether the perspective camera defines a vertical field of view. */
inline bool HasVerticalFov() const { return hasVerticalView; }
/** Retrieves the horizontal field of view. Before retrieving this value,
check whether the camera defines the horizontal field of view using the
HasHorizontalFov function.
@return The horizontal field of view, in degrees. */
inline float& GetFovX() { return viewX; }
inline const float& GetFovX() const { return viewX; } /**< See above. */
/** Retrieves the vertical field of view. Before retrieving this value,
check whether the camera defines the vertical field of view using the
HasVerticalFov function.
@return The horizontal field of view, in degrees. */
inline float& GetFovY() { return viewY; }
inline const float& GetFovY() const { return viewY; } /**< See above. */
/** Sets the horizontal field of view value for this camera.
@param fovX The new horizontal field of view, in degrees. */
void SetFovX(float fovX);
/** Sets the vertical field of view value for this camera.
@param fovY The new vertical field of view, in degrees. */
void SetFovY(float fovY);
/** Retrieves whether this camera is an orthographic camera.
@return Whether this camera is an orthographic camera. */
inline bool IsOrthographic() const { return isOrthographic; }
/** Sets the type of this camera to orthographic. */
inline void SetOrthographic() { isPerspective = false; isOrthographic = true; SetDirtyFlag(); }
/** Retrieves whether the orthographic camera defines an horizontal magnification.
If the camera does not define the horizontal magnification, you can calculate
it using the following formula: horizontal magnification = vertical magnification / aspect ratio.
@return Whether the orthographic camera defines an horizontal magnification. */
inline bool HasHorizontalMag() const { return hasHorizontalView; }
/** Retrieves whether the perspective camera defines a vertical magnification.
If the camera does not define the vertical magnification, you can calculate
it using the following formula: vertical magnification = aspect ratio * horizontal magnification.
@return Whether the perspective camera defines a vertical magnification. */
inline bool HasVerticalMag() const { return hasVerticalView; }
/** Retrieves the horizontal magnification. Before retrieving this value,
check whether the camera defines the horizontal magnification using the
HasHorizontalMag function.
@return The horizontal magnification. */
inline float& GetMagX() { return viewX; }
inline const float& GetMagX() const { return viewX; } /**< See above. */
/** Retrieves the vertical magnification. Before retrieving this value,
check whether the camera defines the vertical magnification using the
HasVerticalMag function.
@return The vertical magnification. */
inline float& GetMagY() { return viewY; }
inline const float& GetMagY() const { return viewY; } /**< See above. */
/** Sets the horizontal magnification for this camera.
@param magX The new horizontal magnification, in degrees. */
inline void SetMagX(float magX) { return SetFovX(magX); }
/** Sets the vertical magnification value for this camera.
@param magY The new vertical magnification, in degrees. */
inline void SetMagY(float magY) { return SetFovY(magY); }
/** Retrieves the near-z value for this camera.
The near-z value represent how close the near-clip
plane of the view frustum is. For orthographic cameras,
this value is solely used for depth-buffering.
@return The near-z value for this camera. */
inline float& GetNearZ() { return nearZ; }
inline const float& GetNearZ() const { return nearZ; } /**< See above. */
/** Retrieves the far-z value for this camera. The far-z value represent
how close the far-clip plane of the view frustum is.
For orthographic cameras, this value is solely used for depth-buffering.
@return The far-z value for this camera. */
inline float& GetFarZ() { return farZ; }
inline const float& GetFarZ() const { return farZ; } /**< See above. */
/** Retrieves the aspect ratio for the view of this camera. Before using this value,
check if there are only one of the horizontal and vertical view ratios.
If there are both of the view ratios provided for the camera, you will
need to calculate the aspect ratio using the following formula:
aspect ratio = vertical field of view / horizontal field of view.
@return The view aspect ratio. */
inline float& GetAspectRatio() { return aspectRatio; }
inline const float& GetAspectRatio() const { return aspectRatio; } /**< See above. */
/** Sets the near-z value for this camera.
The near-z value represent how close the near-clip
plane of the view frustum is. For orthographic cameras,
this value is solely used for depth-buffering.
@param _nearZ A valid near-z value. No check is made to verify that the
near-z value is greater than the far-z value.*/
inline void SetNearZ(float _nearZ) { nearZ = _nearZ; SetDirtyFlag(); }
/** Sets the far-z value for this camera. The far-z value represent
how close the far-clip plane of the view frustum is.
For orthographic cameras, this value is solely used for depth-buffering.
@param _farZ A valid far-z value. No check is made to verify that the
far-z value is greater than the near-z value.*/
inline void SetFarZ(float _farZ) { farZ = _farZ; SetDirtyFlag(); }
/** Sets the aspect ratio for the view of this camera.
@param aspectRatio The new view aspect ratio. */
void SetAspectRatio(float aspectRatio);
/** Retrieves whether the camera provides aperture information. This information is specific
to COLLADA documents exported from ColladaMaya.
@return Whether the camera provides aperture information. */
inline bool HasAperture() const { return hasAperture; }
/** Retrieves the vertical aperture of the camera. This information is specific to
COLLADA documents exported from ColladaMaya.
@return The vertical aperture of the camera. */
inline float& GetVerticalAperture() { return verticalAperture; }
inline const float& GetVerticalAperture() const { return verticalAperture; } /**< See above. */
/** Retrieves the horizontal aperture of the camera. This information is specific to
COLLADA documents exported from ColladaMaya.
@return The horizontal aperture of the camera. */
inline float& GetHorizontalAperture() { return horizontalAperture; }
inline const float& GetHorizontalAperture() const { return horizontalAperture; } /**< See above. */
/** Retrieves the lens squeeze of the camera. This information is specific to
COLLADA documents exported from ColladaMaya. The lens squeeze of the camera
is a multiplier that acts directly on the horizontal aperture, following this
formula: real horizontal aperture = given horizontal aperture * lens squeeze.
@return The lens squeeze of the camera. */
inline float& GetLensSqueeze() { return lensSqueeze; }
inline const float& GetLensSqueeze() const { return lensSqueeze; } /**< See above. */
/** Sets the vertical aperture of the camera.
@param aperture The vertical aperture of the camera. */
inline void SetVerticalAperture(float aperture) { verticalAperture = aperture; hasAperture = true; SetDirtyFlag(); }
/** Sets the horizontal aperture of the camera.
@param aperture The horizontal aperture of the camera. */
inline void SetHorizontalAperture(float aperture) { horizontalAperture = aperture; hasAperture = true; SetDirtyFlag(); }
/** Sets the lens squeeze of the camera.
@param factor The lens squeeze of the camera. */
inline void SetLensSqueeze(float factor) { lensSqueeze = factor; SetDirtyFlag(); }
/** [INTERNAL] Reads in the \<camera\> element from a given COLLADA XML tree node.
@param cameraNode A COLLADA XML tree node.
@return The status of the import. If the status is 'false',
it may be dangerous to extract information from the camera.*/
bool LoadFromXML(xmlNode* cameraNode);
/** [INTERNAL] Writes out the \<camera\> element to the given COLLADA XML tree node.
@param parentNode The COLLADA XML parent node in which to insert the geometry information.
@return The created XML tree node. */
virtual xmlNode* WriteToXML(xmlNode* parentNode) const;
};
#endif // _FCD_CAMERA_H_
|
5665185320d2efed53e9056c0a1a9b3ca5329704 | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/compiler/tf2xla/kernels/tensor_list_ops.cc | 94b3af69323e1f307682aa2d5f777de78650eeca | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | C++ | false | false | 26,353 | cc | tensor_list_ops.cc | /* Copyright 2017 The TensorFlow Authors. 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.
==============================================================================*/
// XLA TensorList operators.
#include <limits>
#include <utility>
#include <vector>
#include "tensorflow/compiler/tf2xla/kernels/gather_op_helpers.h"
#include "tensorflow/compiler/tf2xla/kernels/tensor_list_utils.h"
#include "tensorflow/compiler/tf2xla/shape_util.h"
#include "tensorflow/compiler/tf2xla/type_util.h"
#include "tensorflow/compiler/tf2xla/xla_helpers.h"
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
#include "tensorflow/compiler/xla/client/xla_builder.h"
#include "tensorflow/compiler/xla/literal.h"
#include "tensorflow/compiler/xla/status_macros.h"
#include "tensorflow/compiler/xla/xla_data.pb.h"
#include "tensorflow/core/framework/bounds_check.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/partial_tensor_shape.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/platform/types.h"
namespace tensorflow {
namespace {
// GetTensorListDynamicDims collects the dynamic dimensions that a tensorlist
// may carry and returns them in a 2D vector: XlaOp[ElementSize][DimSize]. If a
// dimension is static, a constant dimension is returned. If a dim is dynamic, a
// dynamic XlaOp representing the dynamic size is returned.
StatusOr<std::vector<std::vector<xla::XlaOp>>> GetTensorListDynamicDims(
XlaOpKernelContext* ctx, const xla::Shape& element_shape,
const xla::Shape& list_shape, int64_t num_elements) {
std::vector<int64_t> dynamic_sizes;
// The multiplier can be a dynamic value.
TF_RETURN_IF_ERROR(ctx->ConstantInputAsIntVector(0, &dynamic_sizes));
std::vector<bool> dims_are_dynamic;
TF_RETURN_IF_ERROR(
ctx->ResolveInputDynamismIntoPredVector(0, &dims_are_dynamic));
bool leading_dim_is_dynamic;
TF_RETURN_IF_ERROR(
ctx->ResolveInputDynamismIntoPred(1, &leading_dim_is_dynamic));
std::vector<std::vector<xla::XlaOp>> list_dynamic_dims;
// Set dynamic dimension size to 0 for initialization value.
std::vector<xla::XlaOp> dynamic_dims;
dynamic_dims.reserve(1 + element_shape.dimensions_size());
if (leading_dim_is_dynamic) {
dynamic_dims.push_back(ctx->Input(1));
} else {
dynamic_dims.push_back(
xla::ConstantR0<int32>(ctx->builder(), num_elements));
}
for (int64_t dim = 0; dim < element_shape.dimensions_size(); ++dim) {
if (dims_are_dynamic[dim]) {
auto dynamic_dim_size = xla::Slice(ctx->Input(0), {dim}, {dim + 1}, {1});
dynamic_dim_size = xla::Reshape(dynamic_dim_size, {});
dynamic_dim_size = xla::ConvertElementType(dynamic_dim_size, xla::S32);
dynamic_dims.push_back(dynamic_dim_size);
} else {
dynamic_dims.push_back(
xla::ConstantR0<int32>(ctx->builder(), dynamic_sizes[dim]));
}
}
list_dynamic_dims.push_back(std::move(dynamic_dims));
return list_dynamic_dims;
}
class TensorListLengthOp : public XlaOpKernel {
public:
explicit TensorListLengthOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
int64_t leading_dim;
xla::XlaOp leading_dim_size;
bool leading_dim_is_dynamic;
OP_REQUIRES_OK(ctx, GetLeadingDimForTensorList(ctx->Input(0), &leading_dim,
&leading_dim_is_dynamic,
&leading_dim_size));
ctx->SetOutput(0, leading_dim_size);
}
private:
TF_DISALLOW_COPY_AND_ASSIGN(TensorListLengthOp);
};
REGISTER_XLA_OP(Name("TensorListLength").IsMetadataOp(), TensorListLengthOp);
// "input" is the shape input for EmptyTensorList/TensorListReserve ops.
// If "input" is a compile time constant and not "unknown rank" (-1), return
// its value in "*shape".
Status TryGetElementShapeFromInput(XlaOpKernelContext* ctx, xla::XlaOp input,
xla::PrimitiveType dtype, bool* got_shape,
xla::Shape* shape) {
auto is_compile_time_constant_or = input.builder()->IsConstant(input);
TF_RETURN_IF_ERROR(is_compile_time_constant_or.status());
bool is_compile_time_constant = is_compile_time_constant_or.value();
if (!is_compile_time_constant) {
*got_shape = false;
return OkStatus();
}
PartialTensorShape partial_shape;
TF_RETURN_IF_ERROR(ctx->ConstantInputAsPartialShape(0, &partial_shape));
if (!partial_shape.IsFullyDefined()) {
*got_shape = false;
return OkStatus();
}
*shape = xla::ShapeUtil::MakeShape(dtype, partial_shape.dim_sizes());
*got_shape = true;
return OkStatus();
}
class TensorListReserveOp : public XlaOpKernel {
public:
explicit TensorListReserveOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("element_dtype", &dtype_));
// Only non-nested TensorList is supported for now.
OP_REQUIRES(
ctx, dtype_ != DT_VARIANT,
errors::Unimplemented(
"Only non-nested TensorList is supported for TensorListReserve."));
}
void Compile(XlaOpKernelContext* ctx) override {
int64_t num_elements;
OP_REQUIRES_OK(ctx,
ctx->ConstantInputAsIntScalar(
1, &num_elements, xla::ValueInferenceMode::kUpperBound));
bool num_element_is_dynamic;
OP_REQUIRES_OK(
ctx, ctx->ResolveInputDynamismIntoPred(1, &num_element_is_dynamic));
OP_REQUIRES(
ctx, num_elements >= 0,
errors::InvalidArgument(
"XLA compilation requires a fixed tensor list size. Set the number "
"of elements. This could also happen if you're using a TensorArray "
"in a while loop that does not have its maximum_iteration set, you "
"can fix this by setting maximum_iteration to a suitable value."));
// If element shape is compile time constant and it's not "unknown rank"
// shape (-1), create an initialized TensorList. Otherwise create an
// uninitialized TensorList.
xla::XlaOp element_shape_handle = ctx->Input(0);
xla::PrimitiveType type;
OP_REQUIRES_OK(ctx, DataTypeToPrimitiveType(dtype_, &type));
bool got_shape;
xla::Shape element_shape;
OP_REQUIRES_OK(ctx,
TryGetElementShapeFromInput(ctx, element_shape_handle, type,
&got_shape, &element_shape));
if (got_shape) {
xla::Shape list_shape;
OP_REQUIRES_OK(ctx, GetTensorListShapeFromElementShape(
element_shape, num_elements,
num_element_is_dynamic, &list_shape));
// Set up dynamic dimension sizes to create the zero tensor.
auto list_dynamic_dims_or = GetTensorListDynamicDims(
ctx, element_shape, list_shape, num_elements);
OP_REQUIRES_OK(ctx, list_dynamic_dims_or.status());
xla::XlaOp new_list;
OP_REQUIRES_OK(ctx, CreateZerosTensorListWithShape(
ctx->builder(), list_shape,
list_dynamic_dims_or.value(), &new_list));
xla::XlaOp result;
OP_REQUIRES_OK(
ctx,
SetTensorListPushIndex(
new_list, xla::ConstantR0<int32>(ctx->builder(), num_elements),
&result));
ctx->SetTensorListOutput(0, result);
return;
}
xla::XlaOp result = BuildUninitializedTensorList(
ctx->builder(), num_elements, num_element_is_dynamic, ctx->Input(1));
ctx->SetTensorListOutput(0, result);
}
private:
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(TensorListReserveOp);
};
REGISTER_XLA_OP(Name("TensorListReserve")
.CompileTimeConstantInput("element_shape")
.CompileTimeConstantInput("num_elements"),
TensorListReserveOp);
class EmptyTensorListOp : public XlaOpKernel {
public:
explicit EmptyTensorListOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("element_dtype", &dtype_));
}
void Compile(XlaOpKernelContext* ctx) override {
int64_t max_num_elements;
OP_REQUIRES_OK(
ctx, ctx->ConstantInputAsIntScalar(
1, &max_num_elements, xla::ValueInferenceMode::kUpperBound));
bool num_element_is_dynamic;
OP_REQUIRES_OK(
ctx, ctx->ResolveInputDynamismIntoPred(1, &num_element_is_dynamic));
OP_REQUIRES(ctx, max_num_elements >= 0,
errors::InvalidArgument(
"XLA compilation requires a fixed tensor list size. Set "
"the max number of elements. This could also happen if "
"you're using a TensorArray in a while loop that does not "
"have its maximum_iteration set, you can fix this by "
"setting maximum_iteration to a suitable value."));
if (dtype_ != DT_VARIANT) {
// We are creating a non-nested TensorList.
// If element shape is compile time constant and it's not "unknown
// rank" shape (-1), create an initialized TensorList. Otherwise
// create an uninitialized TensorList.
xla::XlaOp element_shape_handle = ctx->Input(0);
xla::PrimitiveType type;
OP_REQUIRES_OK(ctx, DataTypeToPrimitiveType(dtype_, &type));
bool got_shape;
xla::Shape element_shape;
OP_REQUIRES_OK(
ctx, TryGetElementShapeFromInput(ctx, element_shape_handle, type,
&got_shape, &element_shape));
if (got_shape) {
xla::Shape list_shape;
OP_REQUIRES_OK(ctx, GetTensorListShapeFromElementShape(
element_shape, max_num_elements,
num_element_is_dynamic, &list_shape));
// Set up dynamic dimension sizes to create the zero tensor.
auto list_dynamic_dims_or = GetTensorListDynamicDims(
ctx, element_shape, list_shape, max_num_elements);
OP_REQUIRES_OK(ctx, list_dynamic_dims_or.status());
xla::XlaOp result;
OP_REQUIRES_OK(ctx, CreateZerosTensorListWithShape(
ctx->builder(), list_shape,
list_dynamic_dims_or.value(), &result));
ctx->SetTensorListOutput(0, result);
return;
}
}
// We are creating a nested TensorList or a non-nested TensorList with
// unknown shape. Just create an uninitialized TensorList.
xla::XlaOp result =
BuildUninitializedTensorList(ctx->builder(), max_num_elements,
num_element_is_dynamic, ctx->Input(1));
ctx->SetTensorListOutput(0, result);
}
private:
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(EmptyTensorListOp);
};
REGISTER_XLA_OP(Name("EmptyTensorList")
.CompileTimeConstantInput("element_shape")
.CompileTimeConstantInput("max_num_elements")
.AllowVariantTypes(),
EmptyTensorListOp);
class TensorListElementShapeOp : public XlaOpKernel {
public:
explicit TensorListElementShapeOp(OpKernelConstruction* ctx)
: XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("shape_type", &shape_type_));
}
void Compile(XlaOpKernelContext* ctx) override {
// Check that the TensorList is initialized.
bool is_initialized;
OP_REQUIRES_OK(ctx,
(IsTensorListInitialized(ctx->Input(0), &is_initialized)));
OP_REQUIRES(ctx, is_initialized,
errors::InvalidArgument("TensorList is not initialized"));
// Only non-nested TensorList is supported for now.
bool is_nested;
OP_REQUIRES_OK(ctx, IsNestedTensorList(ctx->Input(0), &is_nested));
OP_REQUIRES(ctx, !is_nested,
errors::Unimplemented("Only non-nested TensorList is supported "
"for TensorListElementShape."));
// For non-nested TensorList, element shape is the buffer shape without
// the first dimension.
xla::XlaBuilder* b = ctx->builder();
xla::Shape list_shape;
OP_REQUIRES_OK(ctx, GetTensorListBufferShape(ctx->Input(0), &list_shape));
list_shape.DeleteDimension(0);
switch (shape_type_) {
case DT_INT64:
ctx->SetOutput(0, xla::ConstantR1<int64_t>(b, list_shape.dimensions()));
break;
case DT_INT32: {
std::vector<int32> size;
const auto& dimensions = list_shape.dimensions();
size.reserve(dimensions.size());
for (int64_t s : dimensions) {
size.push_back(s);
}
ctx->SetOutput(0, xla::ConstantR1<int32>(b, size));
break;
}
default:
ctx->CtxFailure(
errors::InvalidArgument("Unsupported shape type requested"));
return;
}
}
private:
DataType shape_type_;
TF_DISALLOW_COPY_AND_ASSIGN(TensorListElementShapeOp);
};
REGISTER_XLA_OP(Name("TensorListElementShape").IsMetadataOp(),
TensorListElementShapeOp);
class TensorListGetItemOp : public XlaOpKernel {
public:
explicit TensorListGetItemOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("element_dtype", &dtype_));
}
void Compile(XlaOpKernelContext* ctx) override {
// Check that the TensorList is initialized.
bool is_initialized;
OP_REQUIRES_OK(ctx,
(IsTensorListInitialized(ctx->Input(0), &is_initialized)));
OP_REQUIRES(ctx, is_initialized,
errors::InvalidArgument("TensorList is not initialized"));
// Only non-nested TensorList is supported for now.
bool is_nested;
OP_REQUIRES_OK(ctx, IsNestedTensorList(ctx->Input(0), &is_nested));
OP_REQUIRES(ctx, !is_nested,
errors::Unimplemented("Only non-nested TensorList is supported "
"for TensorListGetItem."));
xla::XlaOp list = ctx->Input(0);
xla::XlaOp index = ctx->Input(1);
xla::XlaOp result;
OP_REQUIRES_OK(ctx, ExecuteTensorListGetItem(list, index, &result));
ctx->SetOutput(0, result);
}
private:
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(TensorListGetItemOp);
};
REGISTER_XLA_OP(Name("TensorListGetItem"), TensorListGetItemOp);
class TensorListGatherOp : public XlaOpKernel {
public:
explicit TensorListGatherOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("element_dtype", &dtype_));
}
void Compile(XlaOpKernelContext* ctx) override {
// Check that the TensorList is initialized.
bool is_initialized;
OP_REQUIRES_OK(ctx,
(IsTensorListInitialized(ctx->Input(0), &is_initialized)));
OP_REQUIRES(ctx, is_initialized,
errors::InvalidArgument("TensorList is not initialized"));
// Only non-nested TensorList is supported for now.
bool is_nested;
OP_REQUIRES_OK(ctx, IsNestedTensorList(ctx->Input(0), &is_nested));
OP_REQUIRES(ctx, !is_nested,
errors::Unimplemented("Only non-nested TensorList is supported "
"for TensorListGather."));
DataType indices_type = ctx->input_type(1);
const TensorShape indices_shape = ctx->InputShape(1);
OP_REQUIRES(ctx, indices_shape.dims() == 1,
errors::InvalidArgument("indices must be rank 1"));
xla::XlaOp list = ctx->Input(0);
xla::XlaOp indices = ctx->Input(1);
xla::XlaOp buffer;
OP_REQUIRES_OK(ctx, GetTensorListBuffer(list, &buffer));
xla::Shape buffer_xla_shape;
OP_REQUIRES_OK(ctx, GetTensorListBufferShape(list, &buffer_xla_shape));
TensorShape buffer_shape;
OP_REQUIRES_OK(ctx, XLAShapeToTensorShape(buffer_xla_shape, &buffer_shape));
xla::XlaOp result;
OP_REQUIRES_OK(
ctx, XlaGather(buffer, buffer_shape, indices, indices_shape, /*axis=*/0,
/*indices_are_nd=*/false, dtype_, indices_type,
ctx->builder(), &result));
ctx->SetOutput(0, result);
}
private:
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(TensorListGatherOp);
};
REGISTER_XLA_OP(Name("TensorListGather"), TensorListGatherOp);
class TensorListStackOp : public XlaOpKernel {
public:
explicit TensorListStackOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
// Check that the TensorList is initialized.
bool is_initialized;
OP_REQUIRES_OK(ctx,
(IsTensorListInitialized(ctx->Input(0), &is_initialized)));
OP_REQUIRES(ctx, is_initialized,
errors::InvalidArgument("TensorList is not initialized"));
// Only non-nested TensorList is supported for now.
bool is_nested;
OP_REQUIRES_OK(ctx, IsNestedTensorList(ctx->Input(0), &is_nested));
OP_REQUIRES(ctx, !is_nested,
errors::Unimplemented("Only non-nested TensorList is supported "
"for TensorListGetItem."));
xla::XlaOp buffer;
OP_REQUIRES_OK(ctx, GetTensorListBuffer(ctx->Input(0), &buffer));
ctx->SetOutput(0, buffer);
}
private:
TF_DISALLOW_COPY_AND_ASSIGN(TensorListStackOp);
};
REGISTER_XLA_OP(Name("TensorListStack"), TensorListStackOp);
class TensorListConcatOp : public XlaOpKernel {
public:
explicit TensorListConcatOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
xla::XlaOp input = ctx->Input(0);
// Check that the TensorList is initialized.
bool is_initialized;
OP_REQUIRES_OK(ctx, (IsTensorListInitialized(input, &is_initialized)));
OP_REQUIRES(ctx, is_initialized,
errors::InvalidArgument("TensorList is not initialized"));
// Only non-nested TensorList is supported for now.
bool is_nested;
OP_REQUIRES_OK(ctx, IsNestedTensorList(input, &is_nested));
OP_REQUIRES(ctx, !is_nested,
errors::Unimplemented("Only non-nested TensorList is supported "
"for TensorListConcat."));
xla::XlaOp buffer;
OP_REQUIRES_OK(ctx, GetTensorListBuffer(input, &buffer));
xla::XlaBuilder* b = input.builder();
auto shape_or = b->GetShape(buffer);
OP_REQUIRES_OK(ctx, shape_or.status());
xla::Shape element_shape = std::move(shape_or).value();
std::vector<int64_t> element_dims =
xla::SpanToVector(element_shape.dimensions());
OP_REQUIRES(
ctx, element_dims.size() > 1,
errors::Unimplemented("TensorList of scalars is not supported"));
int64_t num_elements = element_dims[0];
int64_t tensor_lengths = element_dims[1];
std::vector<int64_t> new_dims = {num_elements * tensor_lengths};
for (int i = 2; i < element_dims.size(); i++) {
new_dims.push_back(element_dims[i]);
}
xla::XlaOp out = xla::Reshape(buffer, new_dims);
ctx->SetOutput(0, out);
// Second output is a tensor of lengths of returned tensors.
xla::XlaOp lengths = xla::ConstantR1(b, num_elements, tensor_lengths);
ctx->SetOutput(1, lengths);
}
private:
TF_DISALLOW_COPY_AND_ASSIGN(TensorListConcatOp);
};
REGISTER_XLA_OP(Name("TensorListConcatV2"), TensorListConcatOp);
class TensorListSplitOp : public XlaOpKernel {
public:
explicit TensorListSplitOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("element_dtype", &dtype_));
// Only non-nested TensorList is supported for now.
OP_REQUIRES(
ctx, dtype_ != DT_VARIANT,
errors::Unimplemented(
"Only non-nested TensorList is supported for TensorListReserve."));
}
void Compile(XlaOpKernelContext* ctx) override {
xla::XlaOp input_tensor = ctx->Input(0);
xla::XlaBuilder* b = input_tensor.builder();
auto shape_or = b->GetShape(input_tensor);
OP_REQUIRES_OK(ctx, shape_or.status());
xla::Shape element_shape = std::move(shape_or).value();
std::vector<int64_t> element_dims =
xla::SpanToVector(element_shape.dimensions());
OP_REQUIRES(
ctx, !element_dims.empty(),
errors::Unimplemented("Element dimensions have to be non-empty"));
std::vector<int64_t> lengths;
OP_REQUIRES_OK(ctx, ctx->ConstantInputAsIntVector(2, &lengths));
OP_REQUIRES(ctx, !lengths.empty(),
errors::Unimplemented("Length has to be non-empty"));
int64_t length = lengths[0];
for (int64_t len : lengths) {
OP_REQUIRES(ctx, len == length,
errors::Unimplemented("All lengths have to be the same"));
}
OP_REQUIRES(ctx, length > 0,
errors::Unimplemented("All lengths must be positive"));
OP_REQUIRES(
ctx, element_dims[0] % length == 0,
errors::Unimplemented("Buffer size has to be a multiple of length"));
std::vector<int64_t> new_dims = {element_dims[0] / length, length};
for (int i = 1; i < element_dims.size(); i++) {
new_dims.push_back(element_dims[i]);
}
xla::XlaOp reshaped = xla::Reshape(input_tensor, new_dims);
xla::XlaOp result;
OP_REQUIRES_OK(ctx, ExecuteTensorListFromTensor(length, reshaped, &result));
ctx->SetTensorListOutput(0, result);
}
private:
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(TensorListSplitOp);
};
REGISTER_XLA_OP(Name("TensorListSplit")
.CompileTimeConstantInput("element_shape")
.CompileTimeConstantInput("lengths"),
TensorListSplitOp);
class TensorListFromTensorOp : public XlaOpKernel {
public:
explicit TensorListFromTensorOp(OpKernelConstruction* ctx)
: XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
const TensorShape& tensor_shape = ctx->InputShape(0);
int num_elements = tensor_shape.dim_size(0);
const xla::XlaOp tensor = ctx->Input(0);
xla::XlaOp result;
OP_REQUIRES_OK(ctx,
ExecuteTensorListFromTensor(num_elements, tensor, &result));
auto list_shape_or = ctx->builder()->GetShape(result);
ctx->SetTensorListOutput(0, result);
}
private:
TF_DISALLOW_COPY_AND_ASSIGN(TensorListFromTensorOp);
};
REGISTER_XLA_OP(
Name("TensorListFromTensor").CompileTimeConstantInput("element_shape"),
TensorListFromTensorOp);
class TensorListSetItemOp : public XlaOpKernel {
public:
explicit TensorListSetItemOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
xla::XlaOp list = ctx->Input(0);
xla::XlaOp index = ctx->Input(1);
xla::XlaOp element = ctx->Input(2);
xla::XlaOp initialized_list;
OP_REQUIRES_OK(ctx, GetInitializedTensorListForElement(
list, element, /*element_is_tensor_list=*/false,
&initialized_list));
// Only non-nested TensorList is supported for now.
bool is_nested;
OP_REQUIRES_OK(ctx, IsNestedTensorList(initialized_list, &is_nested));
OP_REQUIRES(ctx, !is_nested,
errors::Unimplemented("Only non-nested TensorList is supported "
"for TensorListSetItem."));
xla::XlaOp result;
OP_REQUIRES_OK(ctx, ExecuteTensorListSetItem(initialized_list, index,
element, &result));
ctx->SetTensorListOutput(0, result);
}
private:
TF_DISALLOW_COPY_AND_ASSIGN(TensorListSetItemOp);
};
REGISTER_XLA_OP(Name("TensorListSetItem"), TensorListSetItemOp);
class TensorListPushBackOp : public XlaOpKernel {
public:
explicit TensorListPushBackOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
xla::XlaOp list = ctx->Input(0);
xla::XlaOp element = ctx->Input(1);
bool element_is_tensor_list = IsTensorListInput(ctx, 1);
xla::XlaOp initialized_list;
OP_REQUIRES_OK(
ctx, GetInitializedTensorListForElement(
list, element, element_is_tensor_list, &initialized_list));
xla::XlaOp result;
OP_REQUIRES_OK(ctx,
ExecuteTensorListPushBack(initialized_list, element,
element_is_tensor_list, &result));
ctx->SetTensorListOutput(0, result);
}
private:
TF_DISALLOW_COPY_AND_ASSIGN(TensorListPushBackOp);
};
REGISTER_XLA_OP(Name("TensorListPushBack").AllowVariantTypes(),
TensorListPushBackOp);
class TensorListPopBackOp : public XlaOpKernel {
public:
explicit TensorListPopBackOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) {}
void Compile(XlaOpKernelContext* ctx) override {
// Check that the TensorList is initialized.
bool is_initialized;
OP_REQUIRES_OK(ctx,
(IsTensorListInitialized(ctx->Input(0), &is_initialized)));
OP_REQUIRES(ctx, is_initialized,
errors::InvalidArgument("TensorList is not initialized"));
xla::XlaOp list = ctx->Input(0);
xla::XlaOp list_result, element_result;
bool element_is_tensor_list;
OP_REQUIRES_OK(ctx,
ExecuteTensorListPopBack(list, &list_result, &element_result,
&element_is_tensor_list));
ctx->SetTensorListOutput(0, list_result);
if (element_is_tensor_list) {
ctx->SetTensorListOutput(1, element_result);
} else {
ctx->SetOutput(1, element_result);
}
}
private:
DataType dtype_;
TF_DISALLOW_COPY_AND_ASSIGN(TensorListPopBackOp);
};
REGISTER_XLA_OP(Name("TensorListPopBack").AllowVariantTypes(),
TensorListPopBackOp);
} // anonymous namespace
} // namespace tensorflow
|
c34581fb3b68ba445cf8760005a402815ac71a73 | d3932e6bded7d8def64078fbce8e91e0189175f4 | /tutorials/week2/overload.cpp | 08106e0ce7e278a76d4aef83e1f5a7636682e8a2 | [] | no_license | Wilsonchoo2017/cs6771-Advance-Cpp | d249aa431c6512d48959ca017f9a22e2209d6e1e | d8901ca4801744bbdf719faa1966d9847334a114 | refs/heads/master | 2020-06-06T07:06:13.306485 | 2019-10-07T20:17:36 | 2019-10-07T20:17:36 | 192,673,564 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 77 | cpp | overload.cpp | //
// Created by wilson on 1/07/19.
//
#include <iostream>
int main() {
}
|
c377a189f582af00fb27d6107036657a92ac1217 | 497c6f4c3f5cdb0573a5d892b7a2e2464f5f5b8e | /Input and Output Questions/Control Instructions/Question8.cpp | dcafb38de2f1737dd3f989d8c94900c7399b434c | [] | no_license | Sanyam96/Programming | cde481359f361d3c055285b5b772525a752be256 | 507cc12fc124612764764f888720643ff4d76a88 | refs/heads/master | 2020-12-02T16:38:22.499217 | 2017-10-26T18:04:24 | 2017-10-26T18:04:24 | 96,563,328 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 656 | cpp | Question8.cpp | // What is the output of the following program and also Point out the Error If Any
#include <bits/stdc++.h>
using namespace std;
int main() {
void fun();
int i = 1;
while( i <= 5 ) {
cout << i <<"\n";
if ( i > 2 ){
goto here;
}
}
return 0;
}
void fun() {
here :
cout << "Goto works!\n";
}
// ----------------------------------------------------------------------------------
/*
Output :
error: label ‘here’ used but not defined
goto here;
^
Description :
goto cannot take control to a function other than the one in which it is performing or used
or
goto cannot perform a non-local jump
*/ |
c57ee966da8b610c1beed6f8e0da8c0b191a8ca4 | 6ee203634b91de08a3869c40adb43feef11e11d9 | /ComputerGraphics/computergraphicsview.cpp | 358d4aad91eaa64c04d3f7b8b3a37f147eed1816 | [] | no_license | Ice2Faith/ComputerGraphics | e339e33e82dfab63fa97bcaeb8f47f169f5bfc34 | be04228b67c475b65f38eafd788191408ea8585d | refs/heads/master | 2020-09-22T09:24:17.361379 | 2019-12-08T10:39:56 | 2019-12-08T10:39:56 | 224,854,838 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 38,184 | cpp | computergraphicsview.cpp | // ComputerGraphicsView.cpp : implementation of the CComputerGraphicsView class
//
#include "stdafx.h"
#include "ComputerGraphics.h"
#include "ComputerGraphicsDoc.h"
#include "ComputerGraphicsView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CComputerGraphicsView
IMPLEMENT_DYNCREATE(CComputerGraphicsView, CView)
BEGIN_MESSAGE_MAP(CComputerGraphicsView, CView)
//{{AFX_MSG_MAP(CComputerGraphicsView)
ON_COMMAND(ID_PEN_COLOR, OnPenColor)
ON_COMMAND(ID_PEN_SIZE, OnPenSize)
ON_COMMAND(ID_BRUSH_COLOR, OnBrushColor)
ON_COMMAND(ID_DRAW_POINT, OnDrawPoint)
ON_COMMAND(ID_DRAW_LINE, OnDrawLine)
ON_COMMAND(ID_DRAW_GON, OnDrawGon)
ON_COMMAND(ID_DRAW_ELIPESE, OnDrawElipese)
ON_COMMAND(ID_DRAW_CONLINE, OnDrawConline)
ON_COMMAND(ID_DRAW_CLEANER, OnDrawCleaner)
ON_COMMAND(ID_DRAW_CIRCLE, OnDrawCircle)
ON_COMMAND(ID_DRAW_BEZIERLINE, OnDrawBezierline)
ON_COMMAND(ID_DRAW_ARC, OnDrawArc)
ON_COMMAND(ID_DRAW_POLYGON, OnDrawPolygon)
ON_COMMAND(ID_DRAW_POLYLINE, OnDrawPolyline)
ON_COMMAND(ID_DRAW_RECTANGLE, OnDrawRectangle)
ON_COMMAND(ID_DRAW_NULL, OnDrawNull)
ON_COMMAND(ID_DRAW_ROUNDRECT, OnDrawRoundrect)
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOVE()
ON_WM_MOUSEMOVE()
ON_WM_RBUTTONDOWN()
ON_WM_RBUTTONUP()
ON_COMMAND(ID_TMFILE_OPEN, OnTmfileOpen)
ON_COMMAND(ID_TMFILE_SAVE, OnTmfileSave)
ON_COMMAND(ID_DISMOD_FLAT, OnDismodFlat)
ON_COMMAND(ID_DISMOD_LINEAR, OnDismodLinear)
ON_COMMAND(ID_DISMOD_POINTCLOUD, OnDismodPointcloud)
ON_COMMAND(ID_DISMOD_CLEANPAINTER, OnDismodCleanpainter)
ON_COMMAND(ID_GEOMOD_BALL, OnGeomodBall)
ON_COMMAND(ID_GEOMOD_CONE, OnGeomodCone)
ON_COMMAND(ID_GEOMOD_CYLINDER, OnGeomodCylinder)
ON_COMMAND(ID_GEOMOD_DODEC, OnGeomodDodec)
ON_COMMAND(ID_GEOMOD_HEX, OnGeomodHex)
ON_COMMAND(ID_GEOMOD_ICOS, OnGeomodIcos)
ON_COMMAND(ID_GEOMOD_OCT, OnGeomodOct)
ON_COMMAND(ID_GEOMOD_TETR, OnGeomodTetr)
ON_COMMAND(ID_GEOMOD_TORUS, OnGeomodTorus)
ON_COMMAND(ID_TRANGLELIZED, OnTranglelized)
ON_COMMAND(ID_LINEMODE_BEZIER, OnLinemodeBezier)
ON_COMMAND(ID_LINEMOD_EDIT, OnLinemodEdit)
ON_COMMAND(ID_SCANDIS_DDALINE, OnScandisDdaline)
ON_COMMAND(ID_SCANDIS_ANTIALIASLINE, OnScandisAntialiasline)
ON_COMMAND(ID_SCAN_SEEDFILL, OnScanSeedfill)
ON_COMMAND(ID_SCAN_TRANGLEFILL, OnScanTranglefill)
ON_COMMAND(ID_GRAPH_VARY, OnGraphVary)
ON_COMMAND(ID_PROJ_DEEPSCREEN, OnProjDeepscreen)
ON_COMMAND(ID_PROJ_MAINVIEW, OnProjMainview)
ON_COMMAND(ID_PROJ_OBLIQUE, OnProjOblique)
ON_COMMAND(ID_PROJ_ONEPOINT, OnProjOnepoint)
ON_COMMAND(ID_PROJ_ORTHOGONAL, OnProjOrthogonal)
ON_COMMAND(ID_PROJ_SIDEVIEW, OnProjSideview)
ON_COMMAND(ID_PROJ_THREEPOINT, OnProjThreepoint)
ON_COMMAND(ID_PROJ_TOPVIEW, OnProjTopview)
ON_COMMAND(ID_PROJ_TWOPOINT, OnProjTwopoint)
ON_COMMAND(ID_PROJ_WORDTOSCREEN, OnProjWordtoscreen)
ON_COMMAND(ID_MODHIDE_BACKREMOVE, OnModhideBackremove)
ON_COMMAND(ID_MODHIDE_DEEPBUFF, OnModhideDeepbuff)
ON_COMMAND(ID_MODHIDE_NONE, OnModhideNone)
ON_COMMAND(ID_MODLIGHT_FLAT, OnModlightFlat)
ON_COMMAND(ID_MODLIGHT_NONE, OnModlightNone)
ON_COMMAND(ID_MODLIGHT_MATERIAEX, OnModlightMateriaex)
ON_COMMAND(ID_MODLIGHT_LIGHT, OnModlightLight)
ON_COMMAND(ID_OPERATION_TIPS, OnOperationTips)
ON_WM_KEYDOWN()
ON_COMMAND(ID_CARTON_SETTING, OnCartonSetting)
ON_WM_TIMER()
ON_COMMAND(ID_DISMOD_NONE, OnDismodNone)
ON_COMMAND(ID_LINEMOD_BEZIERYSPIN, OnLinemodBezieryspin)
ON_COMMAND(ID_SHOW_ORGLINE, OnShowOrgline)
ON_COMMAND(ID_HIDE_ORGLINE, OnHideOrgline)
ON_COMMAND(ID_LINEMOD_BEZIERXSPIN, OnLinemodBezierxspin)
ON_WM_MOUSEWHEEL()
ON_WM_KEYUP()
ON_COMMAND(ID_OPERATION_BASEOPE, OnOperationBaseope)
ON_COMMAND(ID_GEOMOD_BALLEX, OnGeomodBallex)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CComputerGraphicsView construction/destruction
CComputerGraphicsView::CComputerGraphicsView()
{
// TODO: add construction code here
penColor=0x000000;
brushColor=0xffffff;
penSize=1;
penDraw=new CPen(1,1,penColor);
brushDraw=new CBrush(brushColor);
colorDlg = new DlgColorSetting(this);
sizeDlg=new DlgSizeSetting(this);
inputDlg=new DlgInputBox(this);
varyDlg=new DlgGraphVarySetting(this);
metaDlg=new DlgMaterialSetting(this);
lightDlg=new DlgLightSetting(this);
geomodDlg=new DlgGeoModCreateSetting(this);
opetipDlg=new DlgOperationTips(this);
cartonDlg=new DlgCartonSetting(this);
baseOpeDlg=new DlgBaseOperationHelp(this);
drawType=DT_NULL;
pointArr=new CPoint[MAXPOINTCOUNT];
prePointCount=0;
isLBtnDown=false;
isRBtnDown=false;
isFristLoad=true;
isShiftDown=false;
isXDown=false;
isYDown=false;
isZDown=false;
srand((unsigned int)time(NULL));
viewType=VT_NONE;
needCleanPainter=false;
stbmoveIndex=-1;
projType=PT_TWOPOINT;
hideType=HT_NONE;
//金色光照
lg_light.diff_red = 0.752;
lg_light.diff_green = 0.606;
lg_light.diff_blue = 0.226;
lg_light.spec_red = 0.628;
lg_light.spec_green = 0.556;
lg_light.spec_blue = 0.366;
lg_light.c0 = 0.5;
lg_light.c1 = 0.8;
lg_light.c2 = 0.99;
lg_light.point = GD3Point(1000,0,0);
lg_mate=metaDlg->GetMaterial();
lg_viewPoint.ParseSpherical(1000,0,0);
lg_amb.ambi_red = 0;
lg_amb.ambi_green = 0;
lg_amb.ambi_blue = 0;
needShowCtrlPoint=false;
needShowOrgLine=false;
}
CComputerGraphicsView::~CComputerGraphicsView()
{
delete colorDlg;
delete sizeDlg;
delete pointArr;
delete metaDlg;
delete varyDlg;
delete inputDlg;
delete lightDlg;
delete geomodDlg;
delete cartonDlg;
delete baseOpeDlg;
}
BOOL CComputerGraphicsView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CComputerGraphicsView drawing
void CComputerGraphicsView::OnDraw(CDC* pDC)
{
CComputerGraphicsDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
if(isFristLoad)
{
//仅在第一次打开程序时适配缓冲绘图环境
this->mdc=new CDC();
mdc->CreateCompatibleDC(pDC);
this->mdimg=new CBitmap();
mdimg->CreateCompatibleBitmap(pDC,2048,1280);
mdc->SelectObject(mdimg);
mdc->SetBkColor(0xffffff);
mdc->Rectangle(-1,-1,2048,1280);
opetipDlg->DoModal();
isFristLoad=false;
}
CRect rect;
CWnd * wnd=pDC->GetWindow();
wnd->GetWindowRect(rect);
if(needCleanPainter)
{
//清空绘图内容,三维数据不收影响
COLORREF balckColor=0x000000;
CPen * pen=new CPen(0,1,balckColor);
CBrush brush;
brush.CreateSolidBrush(mdc->GetBkColor());
CPen * oldPen=mdc->SelectObject(pen);
CBrush * oldBrush=mdc->SelectObject(&brush);
mdc->Rectangle(-1,-1,rect.Width(),rect.Height());
mdc->SelectObject(oldBrush);
mdc->SelectObject(oldPen);
delete pen;
needCleanPainter=false;
}
CentralOrg(rect);//三维数据使用中心坐标系
DrawD3Graph();
ResetOrg(rect);//绘制完毕之后需要重置坐标给Bitblt使用
pDC->BitBlt(0,0,rect.Width(),rect.Height(),mdc,0,0,SRCCOPY);
if(needShowCtrlPoint)
{
int i;
for (i = 0; i <prePointCount; i++)
{
pDC->Ellipse(pointArr[i].x-3,pointArr[i].y-3,pointArr[i].x+3,pointArr[i].y+3);
}
}
}
void CComputerGraphicsView::CentralOrg(CRect pdcRect)
{
mdc->SetMapMode(MM_ANISOTROPIC);
mdc->SetViewportOrg(pdcRect.Width()/2,pdcRect.Height()/2);
mdc->SetViewportExt(pdcRect.Width(),pdcRect.Height());
mdc->SetWindowOrg(0,0);
mdc->SetWindowExt(pdcRect.Width(),-pdcRect.Height());
}
void CComputerGraphicsView::ResetOrg(CRect pdcRect)
{
mdc->SetMapMode(MM_ANISOTROPIC);
mdc->SetViewportOrg(0,0);
mdc->SetViewportExt(pdcRect.Width(),pdcRect.Height());
mdc->SetWindowOrg(0,0);
mdc->SetWindowExt(pdcRect.Width(),pdcRect.Height());
}
/////////////////////////////////////////////////////////////////////////////
// CComputerGraphicsView printing
BOOL CComputerGraphicsView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CComputerGraphicsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CComputerGraphicsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CComputerGraphicsView diagnostics
#ifdef _DEBUG
void CComputerGraphicsView::AssertValid() const
{
CView::AssertValid();
}
void CComputerGraphicsView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CComputerGraphicsDoc* CComputerGraphicsView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CComputerGraphicsDoc)));
return (CComputerGraphicsDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CComputerGraphicsView message handlers
void CComputerGraphicsView::OnLButtonDown(UINT nFlags, CPoint point)
{
isLBtnDown=true;
int i=0,j=0;
switch(drawType)
{
case DT_POINT://左键点击画点
prePointCount=0;
mdc->SetPixelV(point,penColor);
break;
case ST_SEENDFILL://左键点击进行种子填充
{
HDC hdc=mdc->GetSafeHdc();
GD2Point seedp(point.x,point.y);
GGrating::SeedFillAlgorithm(hdc,seedp,mdc->GetPixel(point),brushColor);
}
break;
case DT_LINE:
case DT_CONLINE:
case DT_CIRCLE:
case DT_ELIPESE:
case DT_RECT:
case DT_ROUNDRECT:
case ST_DDALINE:
case ST_WUALIASLINE://对于需要两点控制点的绘图记录起点
prePointCount=0;
pointArr[prePointCount++]=point;
break;
case DT_POLYGON://对于需要多点控制点的直接记录
pointArr[prePointCount++]=point;
break;
case DT_POLYLINE:
pointArr[prePointCount++]=point;
break;
case DT_BEZIER:
pointArr[prePointCount++]=point;
break;
case DT_ARC:
pointArr[prePointCount++]=point;
break;
case DT_GON://左键点击进行喷枪绘制,大小为画笔大小的矩形区域,填充小于等于1/3的像素
{
int count=penSize*penSize*0.33;
for(j=0;j<count;j++)
{
int rx=rand()%penSize-penSize/2;
int ry=rand()%penSize-penSize/2;
mdc->SetPixelV(point.x+rx,point.y+ry,penColor);
}
}
break;
case DT_CLEANER://橡皮擦和连续划线一致
prePointCount=0;
pointArr[prePointCount++]=point;
break;
case ST_BEZIER://Bezier曲线和多点控制一致
pointArr[prePointCount++]=point;
break;
case ST_CTR_BEZIER://左键按下时获取控制点下标
stbmoveIndex = -1;
for (i = 0; i <prePointCount; i++)
{
if (sqrt(pow(point.x - pointArr[i].x, 2.0) + pow(point.y - pointArr[i].y, 2.0)) < 3)
{
stbmoveIndex = i;
break;
}
}
break;
case ST_TRANGLEFILL://三角填充,只要有三个控制点就进行填充区域
pointArr[prePointCount++]=point;
if(prePointCount==3)
{
HDC hdc=mdc->GetSafeHdc();
GD2Point p1(pointArr[0].x,pointArr[0].y);
GD2Point p2(pointArr[1].x,pointArr[1].y);
GD2Point p3(pointArr[2].x,pointArr[2].y);
GD2Flat flat(p1,p2,p3);
GGrating::TrangleFillScanLine(flat,brushColor,hdc);
prePointCount=0;
}
break;
default:
return;
}
this->Invalidate();
CView::OnLButtonDown(nFlags, point);
}
void CComputerGraphicsView::OnLButtonUp(UINT nFlags, CPoint point)
{
isLBtnDown=false;
switch(drawType)//对于所有两控制点的绘图方式,都采用左键按下点作为起点,左键抬起作为终点交互
{
case DT_LINE:
mdc->MoveTo(pointArr[0]);
mdc->LineTo(point);
break;
case DT_CIRCLE:
{
int x=(point.x+pointArr[0].x)/2;
int y=(point.y+pointArr[0].y)/2;
int r=sqrt(pow(point.x-pointArr[0].x,2.0)+pow(point.y-pointArr[0].y,2.0))/2;
mdc->Ellipse(x-r,y-r,x+r,y+r);
}
break;
case DT_ELIPESE:
mdc->Ellipse(pointArr[0].x,pointArr[0].y,point.x,point.y);
break;
case DT_RECT:
mdc->Rectangle(pointArr[0].x,pointArr[0].y,point.x,point.y);
break;
case DT_ROUNDRECT:
{
int rh = point.x - pointArr[0].x;
int rw = point.y - pointArr[0].y;
if (rh < 0)
rh = 0 - rh;
if (rw < 0)
rw = 0 - rw;
int r = rh < rw ? rh : rw;
r = r / 10;
if (r < 5)
r = 5;
mdc->RoundRect(pointArr[0].x, pointArr[0].y, point.x, point.y, r, r);
}
break;
case ST_DDALINE:
{
HDC hdc=mdc->GetSafeHdc();
GD2Point p1(pointArr[0].x,pointArr[0].y);
GD2Point p2(point.x,point.y);
GGrating::DDALine(hdc,p1,p2,penColor);
}
break;
case ST_WUALIASLINE:
{
HDC hdc=mdc->GetSafeHdc();
GD2Point p1(pointArr[0].x,pointArr[0].y);
GD2Point p2(point.x,point.y);
GGrating::AntialiasLine(hdc,p1,p2,penColor,mdc->GetBkColor());
}
break;
default://没有进行任何绘图时,左键抬起不触发刷新界面
return;
}
this->Invalidate();
CView::OnLButtonUp(nFlags, point);
}
void CComputerGraphicsView::OnMouseMove(UINT nFlags, CPoint point)
{
switch(drawType)//连续曲线,橡皮擦,移动控制点都使用左键按下并移动的方式交互
{
case DT_CONLINE:
if(isLBtnDown)
{
mdc->MoveTo(pointArr[0]);
mdc->LineTo(point);
pointArr[0]=point;
prePointCount=1;
}
break;
case DT_CLEANER:
if(isLBtnDown)
{
int x=(point.x+pointArr[0].x)/2;
int y=(point.y+pointArr[0].y)/2;
int r=20;
CPen cPen;//生明画笔
cPen.CreatePen(PS_SOLID, 1, mdc->GetBkColor());
CPen * oldPen=mdc->SelectObject(&cPen);
CBrush brush;
brush.CreateSolidBrush(mdc->GetBkColor());
CBrush * oldBrush=mdc->SelectObject(&brush);
mdc->Ellipse(x-r,y-r,x+r,y+r);
mdc->SelectObject(oldPen);
mdc->SelectObject(oldBrush);
}
break;
case ST_CTR_BEZIER:
if(isLBtnDown && stbmoveIndex!=-1)
{
{//清除原来的曲线
HDC hdc=mdc->GetSafeHdc();
GD2Point * gdpoints=new GD2Point[prePointCount];
int i;
for(i=0;i<prePointCount;i++)
{
gdpoints[i].x=pointArr[i].x;
gdpoints[i].y=pointArr[i].y;
}
GGrating::BezierLine(hdc,gdpoints,prePointCount,mdc->GetBkColor());
delete[] gdpoints;
}
pointArr[stbmoveIndex]=point;
{//绘制新的曲线
HDC hdc=mdc->GetSafeHdc();
GD2Point * gdpoints=new GD2Point[prePointCount];
int i;
for(i=0;i<prePointCount;i++)
{
gdpoints[i].x=pointArr[i].x;
gdpoints[i].y=pointArr[i].y;
}
GGrating::BezierLine(hdc,gdpoints,prePointCount,0x0000ff);
delete[] gdpoints;
}
}
break;
default:
return;
}
this->Invalidate();
CView::OnMouseMove(nFlags, point);
}
void CComputerGraphicsView::OnRButtonDown(UINT nFlags, CPoint point)
{
isRBtnDown=true;
CView::OnRButtonDown(nFlags, point);
}
void CComputerGraphicsView::OnRButtonUp(UINT nFlags, CPoint point)
{
isRBtnDown=false;
int i=0;
switch(drawType)
{
case DT_POLYGON://对于多边形,只有鼠标右键点击时,才进行绘制,否则都是在增加控制点
mdc->Polygon(pointArr,prePointCount);
prePointCount=0;
break;
case DT_POLYLINE:
pointArr[prePointCount]=pointArr[0];
mdc->Polyline(pointArr,prePointCount+1);
prePointCount=0;
break;
case DT_BEZIER://使用系统提供的Bezier绘制,每3个顶点作为一段进行拼接
for(i=0;i<prePointCount-3;i+=3)
mdc->PolyBezier(&pointArr[i],4);
prePointCount=0;
break;
case DT_ARC://画弧线,需要四个控制点,前两个记录内接椭圆,后两个记录逆时针的角度起始点
if(prePointCount>=4)
{
mdc->Arc(pointArr[0].x,pointArr[0].y,pointArr[1].x,pointArr[1].y,
pointArr[2].x,pointArr[2].y,pointArr[3].x,pointArr[3].y);
prePointCount=0;
}
break;
case ST_BEZIER://使用自定义高阶Bezier曲线绘制
{
HDC hdc=mdc->GetSafeHdc();
GD2Point * gdpoints=new GD2Point[prePointCount];
for(i=0;i<prePointCount;i++)
{
gdpoints[i].x=pointArr[i].x;
gdpoints[i].y=pointArr[i].y;
}
GGrating::BezierLine(hdc,gdpoints,prePointCount,0x0000ff);
delete[] gdpoints;
}
break;
default:
return;
}
this->Invalidate();
CView::OnRButtonUp(nFlags, point);
}
void CComputerGraphicsView::OnTmfileOpen()
{
inputDlg->DoModal();
CString str=inputDlg->GetInputText();
if(str.GetLength()==0)
{
MessageBox(_T("没有输入文件名"),_T("信息错误"));
return;
}
GTMData gdata;
gdata.loadTMFile(str.GetBuffer(256));
if(gdata.isLoadFile()==false)
{
MessageBox(_T("文件打开失败或不是TM文件!!"),_T("文件错误"));
}
else
{
gddata=gdata.data;
this->Invalidate();
}
}
void CComputerGraphicsView::OnTmfileSave()
{
inputDlg->DoModal();
CString str=inputDlg->GetInputText();
if(str.GetLength()==0)
{
MessageBox(_T("没有输入文件名"),_T("信息错误"));
return;
}
GTMData gdata;
gdata.data=gddata;
if(gdata.saveTMFile(str.GetBuffer(256))==false)
{
MessageBox(_T("文件保存失败或权限不足!!"),_T("文件错误"));
}
}
void CComputerGraphicsView::OnPenColor()
{
colorDlg->DoModal();
penColor=colorDlg->GetColor();
delete penDraw;
penDraw=new CPen(0,penSize,penColor);
mdc->SelectObject(penDraw);
}
void CComputerGraphicsView::OnPenSize()
{
sizeDlg->DoModal();
penSize=sizeDlg->GetSize();
delete penDraw;
penDraw=new CPen(0,penSize,penColor);
mdc->SelectObject(penDraw);
}
void CComputerGraphicsView::OnBrushColor()
{
colorDlg->DoModal();
brushColor=colorDlg->GetColor();
delete brushDraw;
brushDraw=new CBrush(brushColor);
mdc->SelectObject(brushDraw);
}
void CComputerGraphicsView::DrawD3Graph()
{
if(needShowOrgLine)
{
GD3Point op;
CPoint cp;
for(int p=0;p<2048;p++)
{
op.x=0;
op.y=0;
op.z=p;
cp=GD3PointToCPoint(VaryProjGD3Point(op));
mdc->SetPixelV(cp.x,cp.y,0xff0000);
op.x=0;
op.y=p;
op.z=0;
cp=GD3PointToCPoint(VaryProjGD3Point(op));
mdc->SetPixelV(cp.x,cp.y,0x00ff00);
op.x=p;
op.y=0;
op.z=0;
cp=GD3PointToCPoint(VaryProjGD3Point(op));
mdc->SetPixelV(cp.x,cp.y,0x0000ff);
}
}
if(viewType==VT_NONE)
return;
if(hideType==HT_ZBUFFER)
{
ZBufferDrawGraph();
return;
}
int i;
if(viewType==VT_POINTCLOUD)
{
for(i=0;i<gddata.getPointCount();i++)
{
CPoint p=GD3PointToCPoint(VaryProjGD3Point(gddata.pointAt(i)));
mdc->SetPixelV(p.x,p.y,penColor);
}
}
else if(viewType==VT_LINEAR)
{
CPoint arr[4];
GD3Flat flat;
for(i=0;i<gddata.getTrangleCount();i++)
{
GD3Point tp=gddata.pointAt(gddata.trangleAt(i).p1);
flat.p1=tp;
arr[0]=GD3PointToCPoint(VaryProjGD3Point( tp ));
tp=gddata.pointAt(gddata.trangleAt(i).p2);
flat.p2=tp;
arr[1]=GD3PointToCPoint(VaryProjGD3Point( tp ));
tp=gddata.pointAt(gddata.trangleAt(i).p3);
flat.p3=tp;
arr[2]=GD3PointToCPoint(VaryProjGD3Point( tp ));
arr[3]=arr[0];
if(hideType==HT_BLANK)
{
double cosradian=GHideZBuffer::D3FlatBlankingAlgorithm(varyDlg->m_R,GTools::AngleToRadian(varyDlg->m_aAngle),GTools::AngleToRadian(varyDlg->m_bAngle),flat);
if(cosradian>0)
mdc->Polyline(arr,4);
}
else
{
mdc->Polyline(arr,4);
}
}
}
else if(viewType==VT_FALT)
{
CPoint arr[4];
GD3Flat flat;
for(i=0;i<gddata.getTrangleCount();i++)
{
GD3Point tp=gddata.pointAt(gddata.trangleAt(i).p1);
flat.p1=tp;
arr[0]=GD3PointToCPoint(VaryProjGD3Point( tp ));
tp=gddata.pointAt(gddata.trangleAt(i).p2);
flat.p2=tp;
arr[1]=GD3PointToCPoint(VaryProjGD3Point( tp ));
tp=gddata.pointAt(gddata.trangleAt(i).p3);
flat.p3=tp;
arr[2]=GD3PointToCPoint(VaryProjGD3Point( tp ));
GD3NormalLine nl=flat.GetNormalLine();
if(hideType==HT_BLANK)
{
double cosradian=GHideZBuffer::D3FlatBlankingAlgorithm(varyDlg->m_R,GTools::AngleToRadian(varyDlg->m_aAngle),GTools::AngleToRadian(varyDlg->m_bAngle),flat);
if(cosradian>0)
if(lightType==LT_OPEN)
{
D3Color color=GD3Light::Light(lg_light,flat.p1,lg_viewPoint,nl,lg_mate,lg_amb);
CPen pen(0,1,RGB(color.red, color.green, color.blue));
CPen * oldPen=mdc->SelectObject(&pen);
CBrush brush(RGB(color.red,color.green,color.blue));
CBrush * oldBrush=mdc->SelectObject(&brush);
mdc->Polygon(arr,3);
mdc->SelectObject(oldPen);
mdc->SelectObject(oldBrush);
}else
{
mdc->Polygon(arr,3);
}
}
else
{
if(lightType==LT_OPEN)
{
D3Color color=GD3Light::Light(lg_light,flat.p1,lg_viewPoint,nl,lg_mate,lg_amb);
CPen pen(0,1,RGB(color.red, color.green, color.blue));
CPen * oldPen=mdc->SelectObject(&pen);
CBrush brush(RGB(color.red,color.green,color.blue));
CBrush * oldBrush=mdc->SelectObject(&brush);
mdc->Polygon(arr,3);
mdc->SelectObject(oldPen);
mdc->SelectObject(oldBrush);
}else
{
mdc->Polygon(arr,3);
}
}
}
}
}
void CComputerGraphicsView::ZBufferDrawGraph()
{
GD3Flat * flats=new GD3Flat[gddata.getTrangleCount()];
COLORREF * colors=(COLORREF * )malloc(sizeof(COLORREF)*gddata.getTrangleCount());
int i;
COLORREF uniformColor=0x0000ff;
for(i=0;i<gddata.getTrangleCount();i++)
{
GD3Point tp=gddata.pointAt(gddata.trangleAt(i).p1);
flats[i].p1=VaryProjGD3Point( tp );
tp=gddata.pointAt(gddata.trangleAt(i).p2);
flats[i].p2=VaryProjGD3Point( tp );
tp=gddata.pointAt(gddata.trangleAt(i).p3);
flats[i].p3=VaryProjGD3Point( tp );
colors[i]=RGB(rand()%156+100,rand()%156+100,rand()%156+100);
}
CClientDC dc(this);
CWnd * wnd=dc.GetWindow();
CRect rect;
wnd->GetWindowRect(rect);
GHideZBuffer::ZBufferAlgorithm(flats,colors,gddata.getTrangleCount(),
rect.Width(),rect.Height(),mdc->GetSafeHdc(),mdc->GetBkColor());
delete[] flats;
free(colors);
}
GD3Point CComputerGraphicsView::VaryProjGD3Point(GD3Point point)
{
GD3Point retp(point);
if(varyDlg->m_Switch_Move)
{
GD3Vary::Move(&retp,varyDlg->m_Move_x,varyDlg->m_Move_y,varyDlg->m_Move_z);
}
if(varyDlg->m_Switch_Scale)
{
GD3Vary::Scale(&retp,varyDlg->m_Scale_x,varyDlg->m_Scale_y,varyDlg->m_Scale_z);
}
if(varyDlg->m_Switch_Spin)
{
GD3Vary::Spin(&retp,GTools::AngleToRadian(varyDlg->m_Spin_x),GTools::AngleToRadian(varyDlg->m_Spin_y),GTools::AngleToRadian(varyDlg->m_Spin_z));
}
if(varyDlg->m_Switch_Reflact)
{
bool bx=true,by=true,bz=true;
if(varyDlg->m_Reflact_x==FALSE)
bx=false;
if(varyDlg->m_Reflact_y==FALSE)
by=false;
if(varyDlg->m_Reflact_z==FALSE)
bz=false;
GD3Vary::Reflact(&retp,bx,by,bz);
}
if(varyDlg->m_Switch_FlatRef)
{
bool bxoy=true,byoz=true,bxoz=true;
if(varyDlg->m_FlatRef_xoy==FALSE)
bxoy=false;
if(varyDlg->m_FlatRef_yoz==FALSE)
byoz=false;
if(varyDlg->m_FlatRef_xoz==FALSE)
bxoz=false;
GD3Vary::FlatReflact(&retp,bxoy,byoz,bxoz);
}
if(varyDlg->m_Switch_Miscut)
{
GD3Vary::Miscut(&retp,varyDlg->m_Miscut_xgz,varyDlg->m_Miscut_xdy
,varyDlg->m_Miscut_yhz,varyDlg->m_Miscut_ybx
,varyDlg->m_Miscut_zfy,varyDlg->m_Miscut_zcx);
}
switch(projType)
{
case PT_ORTHOGONAL:
GProj::Orthogonal(&retp);
break;
case PT_MAINVIEW:
GProj::MainView(&retp);
GProj::SwapXandZ(&retp);
break;
case PT_SIDEVIEW:
GProj::SideView(&retp);
GProj::SwapXandZ(&retp);
break;
case PT_TOPVIEW:
GProj::TopView(&retp);
GProj::SwapXandZ(&retp);
break;
case PT_OBLIQUE:
GProj::Oblique(&retp,GTools::AngleToRadian(varyDlg->m_aAngle),GTools::AngleToRadian(varyDlg->m_bAngle));
break;
case PT_WORDTOSCREEN:
GProj::WorldOrgToScreenOrg(&retp,varyDlg->m_R,varyDlg->m_d,
GTools::AngleToRadian(varyDlg->m_aAngle),GTools::AngleToRadian(varyDlg->m_bAngle));
break;
case PT_ONEPOINT:
GProj::OnePoint(&retp,varyDlg->m_R,varyDlg->m_d);
break;
case PT_TWOPOINT:
GProj::TwoPoint(&retp,varyDlg->m_R,varyDlg->m_d);
break;
case PT_THREEPOINT:
GProj::ThreePoint(&retp,varyDlg->m_R,varyDlg->m_d);
break;
case PT_DEEPSCREEN:
GProj::ViewOrgToDeepScreenD3Org(&retp, varyDlg->m_d, varyDlg->m_Near, varyDlg->m_Far);
GProj::ViewOrgToScreenOrg(&retp, varyDlg->m_d);
break;
}
return retp;
}
//以下为菜单响应函数部分
void CComputerGraphicsView::OnMove(int x, int y)
{
CView::OnMove(x, y);
}
void CComputerGraphicsView::OnDrawPoint()
{
drawType=DT_POINT;
}
void CComputerGraphicsView::OnDrawLine()
{
drawType=DT_LINE;
}
void CComputerGraphicsView::OnDrawGon()
{
drawType=DT_GON;
}
void CComputerGraphicsView::OnDrawElipese()
{
drawType=DT_ELIPESE;
}
void CComputerGraphicsView::OnDrawConline()
{
drawType=DT_CONLINE;
}
void CComputerGraphicsView::OnDrawCleaner()
{
drawType=DT_CLEANER;
}
void CComputerGraphicsView::OnDrawCircle()
{
drawType=DT_CIRCLE;
}
void CComputerGraphicsView::OnDrawBezierline()
{
drawType=DT_BEZIER;
}
void CComputerGraphicsView::OnDrawArc()
{
drawType=DT_ARC;
}
void CComputerGraphicsView::OnDrawPolygon()
{
drawType=DT_POLYGON;
}
void CComputerGraphicsView::OnDrawPolyline()
{
drawType=DT_POLYLINE;
}
void CComputerGraphicsView::OnDrawRectangle()
{
drawType=DT_RECT;
}
void CComputerGraphicsView::OnDrawNull()
{
drawType=DT_NULL;
}
void CComputerGraphicsView::OnDrawRoundrect()
{
drawType=DT_ROUNDRECT;
}
void CComputerGraphicsView::OnDismodFlat()
{
viewType=VT_FALT;
this->Invalidate();
}
void CComputerGraphicsView::OnDismodLinear()
{
viewType=VT_LINEAR;
this->Invalidate();
}
void CComputerGraphicsView::OnDismodPointcloud()
{
viewType=VT_POINTCLOUD;
this->Invalidate();
}
CPoint CComputerGraphicsView::GD3PointToCPoint(GD3Point & p)
{
CPoint rp(p.x,p.y);
return rp;
}
void CComputerGraphicsView::OnDismodCleanpainter()
{
needCleanPainter=true;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodBall()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateBall(geomodDlg->m_r,geomodDlg->m_aAngleCount,geomodDlg->m_bAngleCount);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodCone()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateCone(geomodDlg->m_h,geomodDlg->m_r,geomodDlg->m_hCount,geomodDlg->m_rCount,geomodDlg->m_rAngleCount);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodCylinder()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateCylinder(geomodDlg->m_r,geomodDlg->m_h,geomodDlg->m_rCount,geomodDlg->m_hCount,geomodDlg->m_rAngleCount);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodDodec()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateDodecahedron(geomodDlg->m_a);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodHex()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateHexahedron(geomodDlg->m_a);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodIcos()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateIcosahedron(geomodDlg->m_a);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodOct()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateOctahedron(geomodDlg->m_a);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodTetr()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateTetrahedron(geomodDlg->m_a);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnGeomodTorus()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateTorus(geomodDlg->m_r,geomodDlg->m_r2,geomodDlg->m_aAngleCount,geomodDlg->m_bAngleCount);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnTranglelized()
{
GD3DataGroup * pd=GTeanglelized::PointsTranglelized(&gddata);
gddata=*pd;
delete pd;
this->Invalidate();
}
void CComputerGraphicsView::OnLinemodeBezier()
{
drawType=ST_BEZIER;
prePointCount=0;
needShowCtrlPoint=false;
}
void CComputerGraphicsView::OnLinemodEdit()
{
drawType=ST_CTR_BEZIER;
needShowCtrlPoint=true;
this->Invalidate();
}
void CComputerGraphicsView::OnScandisDdaline()
{
drawType=ST_DDALINE;
}
void CComputerGraphicsView::OnScandisAntialiasline()
{
drawType=ST_WUALIASLINE;
}
void CComputerGraphicsView::OnScanSeedfill()
{
drawType=ST_SEENDFILL;
}
void CComputerGraphicsView::OnScanTranglefill()
{
drawType=ST_TRANGLEFILL;
}
void CComputerGraphicsView::OnGraphVary()
{
varyDlg->DoModal();
this->Invalidate();
}
void CComputerGraphicsView::OnProjDeepscreen()
{
projType=PT_DEEPSCREEN;
this->Invalidate();
}
void CComputerGraphicsView::OnProjMainview()
{
projType=PT_MAINVIEW;
this->Invalidate();
}
void CComputerGraphicsView::OnProjOblique()
{
projType=PT_OBLIQUE;
this->Invalidate();
}
void CComputerGraphicsView::OnProjOnepoint()
{
projType=PT_ONEPOINT;
this->Invalidate();
}
void CComputerGraphicsView::OnProjOrthogonal()
{
projType=PT_ORTHOGONAL;
this->Invalidate();
}
void CComputerGraphicsView::OnProjSideview()
{
projType=PT_SIDEVIEW;
this->Invalidate();
}
void CComputerGraphicsView::OnProjThreepoint()
{
projType=PT_THREEPOINT;
this->Invalidate();
}
void CComputerGraphicsView::OnProjTopview()
{
projType=PT_TOPVIEW;
this->Invalidate();
}
void CComputerGraphicsView::OnProjTwopoint()
{
projType=PT_TWOPOINT;
this->Invalidate();
}
void CComputerGraphicsView::OnProjWordtoscreen()
{
projType=PT_WORDTOSCREEN;
this->Invalidate();
}
void CComputerGraphicsView::OnModhideBackremove()
{
hideType=HT_BLANK;
this->Invalidate();
}
void CComputerGraphicsView::OnModhideDeepbuff()
{
hideType=HT_ZBUFFER;
this->Invalidate();
}
void CComputerGraphicsView::OnModhideNone()
{
hideType=HT_NONE;
this->Invalidate();
}
void CComputerGraphicsView::OnModlightFlat()
{
lightType=LT_OPEN;
this->Invalidate();
}
void CComputerGraphicsView::OnModlightNone()
{
lightType=LT_NONE;
this->Invalidate();
}
void CComputerGraphicsView::OnModlightMateriaex()
{
metaDlg->DoModal();
lg_mate=metaDlg->GetMaterial();
this->Invalidate();
}
void CComputerGraphicsView::OnModlightLight()
{
lightDlg->DoModal();
lg_light=lightDlg->GetLight();
this->Invalidate();
}
void CComputerGraphicsView::OnOperationTips()
{
opetipDlg->DoModal();
}
void CComputerGraphicsView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch(nChar)
{
case VK_F5:// F5清空其他绘图,只保留三维模型
needCleanPainter=true;
this->Invalidate();
break;
case VK_LEFT:// 左右键进行X轴左右移动
varyDlg->m_Switch_Move=TRUE;
varyDlg->m_Move_x-=10;
needCleanPainter=true;
this->Invalidate();
break;
case VK_RIGHT:
varyDlg->m_Switch_Move=TRUE;
varyDlg->m_Move_x+=10;
needCleanPainter=true;
this->Invalidate();
break;
case VK_UP:// 上下键进行Y轴上下移动,Shift+上下进行Z轴上下移动
if(isShiftDown)
{
varyDlg->m_Switch_Move=TRUE;
varyDlg->m_Move_z+=10;
}
else
{
varyDlg->m_Switch_Move=TRUE;
varyDlg->m_Move_y+=10;
}
needCleanPainter=true;
this->Invalidate();
break;
case VK_DOWN:
if(isShiftDown)
{
varyDlg->m_Switch_Move=TRUE;
varyDlg->m_Move_z-=10;
}
else
{
varyDlg->m_Switch_Move=TRUE;
varyDlg->m_Move_y-=10;
}
needCleanPainter=true;
this->Invalidate();
break;
case VK_SHIFT:
isShiftDown=true;
break;
case 'X':// Shift+X/Y/Z轴反射
isXDown=true;
if(isShiftDown)
{
varyDlg->m_Switch_Reflact=TRUE;
varyDlg->m_Reflact_x=!varyDlg->m_Reflact_x;
needCleanPainter=true;
this->Invalidate();
}
break;
case 'Y':
isYDown=true;
if(isShiftDown)
{
varyDlg->m_Switch_Reflact=TRUE;
varyDlg->m_Reflact_y=!varyDlg->m_Reflact_y;
needCleanPainter=true;
this->Invalidate();
}
break;
case 'Z':
isZDown=true;
if(isShiftDown)
{
varyDlg->m_Switch_Reflact=TRUE;
varyDlg->m_Reflact_z=!varyDlg->m_Reflact_z;
needCleanPainter=true;
this->Invalidate();
}
break;
case VK_F1:// 显示帮助对话框
opetipDlg->DoModal();
break;
case VK_F2:// F2-F4对XOY,YOZ,XOZ平面反射
varyDlg->m_Switch_FlatRef=TRUE;
varyDlg->m_FlatRef_xoy=!varyDlg->m_FlatRef_xoy;
needCleanPainter=true;
this->Invalidate();
break;
case VK_F3:
varyDlg->m_Switch_FlatRef=TRUE;
varyDlg->m_FlatRef_yoz=!varyDlg->m_FlatRef_yoz;
needCleanPainter=true;
this->Invalidate();
break;
case VK_F4:
varyDlg->m_Switch_FlatRef=TRUE;
varyDlg->m_FlatRef_xoz=!varyDlg->m_FlatRef_xoz;
needCleanPainter=true;
this->Invalidate();
break;
}
CView::OnKeyDown(nChar, nRepCnt, nFlags);
}
void CComputerGraphicsView::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
{
switch(nChar)
{
case VK_SHIFT:
isShiftDown=false;
break;
case 'X':
isXDown=false;
break;
case 'Y':
isYDown=false;
break;
case 'Z':
isZDown=false;
break;
}
CView::OnKeyUp(nChar, nRepCnt, nFlags);
}
void CComputerGraphicsView::OnCartonSetting()
{
cartonDlg->DoModal();
if(cartonDlg->m_openCarton)
{
KillTimer(ID_TIMER_CARTON);
varyDlg->m_Switch_Spin=TRUE;
SetTimer(ID_TIMER_CARTON,cartonDlg->m_updataTime,NULL);
}
else
{
varyDlg->m_Switch_Spin=FALSE;
KillTimer(ID_TIMER_CARTON);
}
}
void CComputerGraphicsView::OnTimer(UINT nIDEvent)
{
if(nIDEvent==ID_TIMER_CARTON)
{
if(cartonDlg->m_openCarton)
{
if(cartonDlg->m_spinX)
{
varyDlg->m_Spin_x+=cartonDlg->m_spinXup;
if(varyDlg->m_Spin_x>360)
varyDlg->m_Spin_x-=360;
}
if(cartonDlg->m_spinY)
{
varyDlg->m_Spin_y+=cartonDlg->m_spinYup;
if(varyDlg->m_Spin_y>360)
varyDlg->m_Spin_y-=360;
}
if(cartonDlg->m_spinZ)
{
varyDlg->m_Spin_z+=cartonDlg->m_spinZup;
if(varyDlg->m_Spin_z>360)
varyDlg->m_Spin_z-=360;
}
needCleanPainter=true;
this->Invalidate();
}
}
CView::OnTimer(nIDEvent);
}
void CComputerGraphicsView::OnDismodNone()
{
viewType=VT_NONE;
this->Invalidate();
}
void CComputerGraphicsView::OnLinemodBezieryspin()
{
if(prePointCount>0)
{
geomodDlg->DoModal();
CRect rect;
this->GetWindowRect(rect);
int wndhei=rect.Height();
GD2Point * points=new GD2Point[prePointCount];
for(int i=0;i<prePointCount;i++)
{
points[i].x=pointArr[i].x;
points[i].y=wndhei-pointArr[i].y;
}
GD3DataGroup* pd= GGrating::CreateBezierSpinYCube(points,prePointCount,geomodDlg->m_Bezier_tCount,geomodDlg->m_Bezier_rAngleCount);
gddata=*pd;
delete pd;
delete points;
this->Invalidate();
}
}
void CComputerGraphicsView::OnLinemodBezierxspin()
{
if(prePointCount>0)
{
geomodDlg->DoModal();
GD2Point * points=new GD2Point[prePointCount];
for(int i=0;i<prePointCount;i++)
{
points[i].x=pointArr[i].x;
points[i].y=pointArr[i].y;
}
GD3DataGroup* pd= GGrating::CreateBezierSpinXCube(points,prePointCount,geomodDlg->m_Bezier_tCount,geomodDlg->m_Bezier_rAngleCount);
gddata=*pd;
delete pd;
delete points;
this->Invalidate();
}
}
void CComputerGraphicsView::OnShowOrgline()
{
needShowOrgLine=true;
this->Invalidate();
}
void CComputerGraphicsView::OnHideOrgline()
{
needShowOrgLine=false;
this->Invalidate();
}
BOOL CComputerGraphicsView::OnMouseWheel(UINT nFlags, short zDelta, CPoint pt)
{
if(isXDown)// 按住X/Y/Z按键再滚动鼠标,进行轴旋转
{
varyDlg->m_Switch_Spin=TRUE;
if(zDelta>0)
{
varyDlg->m_Spin_x=(varyDlg->m_Spin_x+5)%360;
}else
{
varyDlg->m_Spin_x-=5;
if(varyDlg->m_Spin_x<0)
varyDlg->m_Spin_x=360-varyDlg->m_Spin_x;
}
needCleanPainter=true;
this->Invalidate();
}
else if(isYDown)
{
varyDlg->m_Switch_Spin=TRUE;
if(zDelta>0)
{
varyDlg->m_Spin_y=(varyDlg->m_Spin_y+5)%360;
}else
{
varyDlg->m_Spin_y-=5;
if(varyDlg->m_Spin_y<0)
varyDlg->m_Spin_y=360-varyDlg->m_Spin_y;
}
needCleanPainter=true;
this->Invalidate();
}
else if(isZDown)
{
varyDlg->m_Switch_Spin=TRUE;
if(zDelta>0)
{
varyDlg->m_Spin_z=(varyDlg->m_Spin_z+5)%360;
}else
{
varyDlg->m_Spin_z-=5;
if(varyDlg->m_Spin_z<0)
varyDlg->m_Spin_z=360-varyDlg->m_Spin_z;
}
needCleanPainter=true;
this->Invalidate();
}
else // 鼠标滚动,进行图形缩放
{
varyDlg->m_Switch_Scale=TRUE;
if(zDelta>0)
{
varyDlg->m_Scale_x*=1.1;
varyDlg->m_Scale_y*=1.1;
varyDlg->m_Scale_z*=1.1;
}else
{
varyDlg->m_Scale_x*=0.9;
varyDlg->m_Scale_y*=0.9;
varyDlg->m_Scale_z*=0.9;
}
needCleanPainter=true;
this->Invalidate();
}
return CView::OnMouseWheel(nFlags, zDelta, pt);
}
void CComputerGraphicsView::OnOperationBaseope()
{
baseOpeDlg->DoModal();
}
void CComputerGraphicsView::OnGeomodBallex()
{
geomodDlg->DoModal();
GD3DataGroup * pd=GStereo::CreateBallEx(geomodDlg->m_r,geomodDlg->m_ballex_Level);
gddata=*pd;
delete pd;
this->Invalidate();
}
|
e49c918ae6df95b7a26e6737843df8307906fbb4 | cd121380c1dca39123d9950c49d138bb1b32d027 | /ArduinoTestCode/oldOutputCAN/oldOutputCAN.ino | ff3d50380a8ad80b7168c9908934914ea57ea554 | [] | no_license | nusolar/sc7-telemetry-code | 38a085139efbec0296d1784d4eb29642a55e747b | e3d0f13968e043367ef454d870b83a256d13480e | refs/heads/master | 2021-01-18T22:33:18.542592 | 2018-02-24T19:21:30 | 2018-02-24T19:21:30 | 30,443,312 | 1 | 4 | null | 2017-02-08T23:31:51 | 2015-02-07T03:14:31 | Visual Basic | UTF-8 | C++ | false | false | 2,987 | ino | oldOutputCAN.ino | /* TODO Documentation for this file */
#define COMPILE_ARDUINO
#define DEBUG
//#define LOOPBACK
#include <SPI.h>
#include "CAN_experimenting.h"
#define CANINT 8
#define CANCS 5
#define CAN_NBT 1000 //Nominal Bit Time
#define CAN_FOSC 16
#define PEDAL_ACCL_MAX_CURRENT 0.8f
CAN_IO can(CANCS,CANINT,CAN_NBT,CAN_FOSC);
uint16_t errors = 0; // for catching can errors
long lastmillis = 0; // for timing
int switchpos = 0x0020; // run position
void setup()
{
//Set up push button to toggle message transmission
pinMode(12,INPUT_PULLUP);
//Start Serial and wait for MCP2515 to finish 128 clock cycles
Serial.begin(9600);
Serial.print("BEGIN");
delay(100);
//create a filter options structure
CANFilterOpt filter;
filter.setRB0(MASK_NONE,DC_DRIVE_ID,0);
filter.setRB1(MASK_NONE,DC_SWITCHPOS_ID,0,0,0);
can.Setup(filter, &errors);
#ifdef LOOPBACK
can.controller.Mode(MODE_LOOPBACK);
#endif
#ifdef DEBUG
Serial.println(errors, BIN);
#endif
WDT_Disable(WDT);
}
void loop()
{
//Generate Random Can Packets and Send them
int choice = random(0,10);
Serial.print(choice);
switch(choice)
{
case 0:{
can.Send(DC_Heartbeat(100.0,42.0),TXB0);
break;}
case 1:{
can.Send(DC_Drive(100.0,random(80)/100.0),TXB0);
break;}
case 2:{
can.Send(BMS_Heartbeat(400.0,99.0),TXB0);
break;}
case 3:
default:{ //Move down later
float cvel = random(30);
float mvel = cvel + random(-3,3);
can.Send(MC_Velocity(cvel,mvel),TXB0);
break;}
}
delay(50);
#ifdef DEBUG
Serial.print("TEC: ");
Serial.println(can.controller.Read(TEC), BIN);
Serial.print("REC: ");
Serial.println(can.controller.Read(REC), BIN);
Serial.print("EFLG: ");
Serial.println(can.controller.Read(EFLG), BIN);
#endif
while (can.Available())
{
Frame& f = can.Read();
char str[50];
switch (f.id)
{
case DC_DRIVE_ID:
{
DC_Drive packet(f); //Get the drive packet
sprintf(str, "Id: %x, Vel: %.1f, Cur: %.4f,", packet.id, packet.velocity, packet.current);
Serial.println(str);
break;
}
case MC_VELOCITY_ID:
{
MC_Velocity packet(f);
sprintf(str, "Id: %x, CarVel: %f, MotVel: %f", packet.id, packet.car_velocity, packet.motor_velocity);
Serial.println(str);
break;
}
default:
{
Serial.print("Id: ");
Serial.println(f.id,HEX);
break;
}
}
//Print out buffer size so we can see if there is overflow (this is not accurate when serial is enabled.
if (millis() > lastmillis + 1000)
{
lastmillis = millis();
Serial.print("Buffer Count:");
Serial.println(can.RXbuffer.size());
}
}
}
//Function for reading "pedal" data
void read_ins()
{
Status.raw_pedal = analogRead(pedalPin);
Status.current = constrain(Status.raw_pedal / 710.0 , 0.0f, PEDAL_ACCL_MAX_CURRENT);
}
|
38d2560caed949c5f0da96c8da561d51f1ab61d5 | f17f0751530fa69b2ab40a3ef8a9e2ce50b39771 | /src/Mesh.cpp | 1385f8eb17db9f617f9123483dc3ee7e175079de | [
"Zlib"
] | permissive | whztt07/globe | 8b1bb505b215c0b66abc495729e49b73d8edd0a9 | 98dba87da749bcb5cc5cb0cffa759b38f74e784c | refs/heads/master | 2020-12-03T10:31:38.400104 | 2015-01-16T15:26:39 | 2015-01-16T15:26:39 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,493 | cpp | Mesh.cpp | //***************************************************************************
//
// Globe
// A small C++ library to allow fast prototyping of Direct3D animations.
//
// Copyright (C) 2012-2013 Jean-Charles Lefebvre <polyvertex@gmail.com>
//
// 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.
//
// Created On: 2011-12-08 01:53:44
//
//***************************************************************************
#include "_internal.hpp"
#ifdef GLOBE_GFX
namespace glb {
//---------------------------------------------------------------------------
Mesh::Mesh (ID3DXMesh* pMesh/*=0*/)
: SmartPointer<ID3DXMesh>(pMesh)
{
}
//---------------------------------------------------------------------------
VertexBuffer Mesh::getVertexBuffer (void)
{
IDirect3DVertexBuffer9* pVertexBuffer;
GLB_ASSERT(this->getRef());
GLB_DXTEST(this->getRef()->GetVertexBuffer(&pVertexBuffer));
return VertexBuffer(pVertexBuffer);
}
//---------------------------------------------------------------------------
IndexBuffer Mesh::getIndexBuffer (void)
{
IDirect3DIndexBuffer9* pIndexBuffer;
GLB_ASSERT(this->getRef());
GLB_DXTEST(this->getRef()->GetIndexBuffer(&pIndexBuffer));
return IndexBuffer(pIndexBuffer);
}
//---------------------------------------------------------------------------
Mesh Mesh::createBox (float rWidth, float rHeight, float rDepth)
{
ID3DXMesh* pMesh;
GLB_ASSERT(g_pRenderer());
GLB_DXTEST(D3DXCreateBox(
g_Renderer().getDev(), rWidth, rHeight, rDepth, &pMesh, NULL));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
//---------------------------------------------------------------------------
Mesh Mesh::createCylinder (float rRadius1, float rRadius2, float rLength, uint uiSlices, uint uiStacks)
{
ID3DXMesh* pMesh;
GLB_ASSERT(g_pRenderer());
GLB_DXTEST(D3DXCreateCylinder(
g_Renderer().getDev(), rRadius1, rRadius2, rLength, uiSlices, uiStacks,
&pMesh, NULL));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
//---------------------------------------------------------------------------
Mesh Mesh::createPolygon (float rLength, uint uiSides)
{
ID3DXMesh* pMesh;
GLB_ASSERT(g_pRenderer());
GLB_DXTEST(D3DXCreatePolygon(
g_Renderer().getDev(), rLength, uiSides, &pMesh, NULL));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
//---------------------------------------------------------------------------
Mesh Mesh::createSphere (float rRadius, uint uiSlices, uint uiStacks)
{
ID3DXMesh* pMesh;
GLB_ASSERT(g_pRenderer());
GLB_DXTEST(D3DXCreateSphere(
g_Renderer().getDev(), rRadius, uiSlices, uiStacks, &pMesh, NULL));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
//---------------------------------------------------------------------------
Mesh Mesh::createTeapot (void)
{
ID3DXMesh* pMesh;
GLB_ASSERT(g_pRenderer());
GLB_DXTEST(D3DXCreateTeapot(g_Renderer().getDev(), &pMesh, NULL));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
//---------------------------------------------------------------------------
Mesh Mesh::createTorus (float rInnerRadius, float rOuterRadius, uint uiSides, uint uiRings)
{
ID3DXMesh* pMesh;
GLB_ASSERT(g_pRenderer());
GLB_DXTEST(D3DXCreateTorus(
g_Renderer().getDev(), rInnerRadius, rOuterRadius, uiSides, uiRings,
&pMesh, NULL));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
//---------------------------------------------------------------------------
Mesh Mesh::loadX (const char* pszVirtPath)
{
ID3DXMesh* pMesh;
HRESULT hRes;
GLB_ASSERT(g_pVFS());
GLB_ASSERT(g_pRenderer());
GLB_ASSERT(g_VFS().hasFile(pszVirtPath));
if (g_VFS().isArchivedFile(pszVirtPath))
{
uint32 uiSize = 0;
glb_byte* pData = g_VFS().acquireMemFile(pszVirtPath, &uiSize);
hRes = D3DXLoadMeshFromXInMemory(
pData, uiSize,
0,
g_Renderer().getDev(),
NULL, NULL, NULL, NULL,
&pMesh);
g_VFS().releaseMemFile(pData);
}
else
{
StringA strFile(g_VFS().acquirePhysFile(pszVirtPath));
hRes = D3DXLoadMeshFromX(
strFile.c_str(),
0,
g_Renderer().getDev(),
NULL, NULL, NULL, NULL,
&pMesh);
g_VFS().releasePhysFile(strFile);
}
if (FAILED(hRes))
GLB_THROW(EXCODE_SYSTEM_API, "Failed to load X mesh \"%s\" ! Error %s : %s", pszVirtPath, DXGetErrorString9(hRes), DXGetErrorDescription9(hRes));
Mesh mesh;
mesh.attachRef(pMesh);
return mesh;
}
} // namespace glb
#endif // #ifdef GLOBE_GFX
|
6a895d36e39f98f6744fdd968a41bdd49467318e | 73edb03b249034cde7fb40737b9c1fac8b2cada5 | /Sequence.h | 6767764c48300852b85241c0fa33d4df2c6d9d51 | [] | no_license | BK286/Sequence | 839c17a294ceea730407ed8a8673325659f5420f | 44fe67d5f73ec810287ec2021edf860fdc26f7c1 | refs/heads/master | 2020-03-21T08:44:52.809274 | 2018-07-05T06:10:52 | 2018-07-05T06:10:52 | 138,362,042 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 304 | h | Sequence.h | #ifndef SEQUENCE_H
#define SEQUENCE_H
#include <string>
#include <fstream>
using namespace std;
class Sequence
{
public:
Sequence(string filename);
int length();
int numberOf(char base);
string longestConsecutive();
string longestRepeated();
~Sequence();
private:
string s;
int num;
};
#endif
|
b5271a96913f12f6fce3a446e4c91141020365e6 | 95a5346295a7c277ac4f0f04988dbe1476a970c9 | /src/n_dir_watcher.h | 1e373cc90f6d64b353629ffadbe5d3d7039296dc | [] | no_license | sdolard/nawis | ecc0a83f1d79991af477c8f3fba1c39ce77a802d | 9e0b701c612f551760ec3ccca6b28610f0c9a122 | refs/heads/master | 2016-09-02T11:33:28.726466 | 2010-11-01T15:31:55 | 2010-11-01T15:31:55 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,591 | h | n_dir_watcher.h | /*
* kn_dir_watcher.cpp - file sharing watcher
* Copyright (C) 2008 Sebastien Dolard
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef N_DIR_WATCHER_H
#define N_DIR_WATCHER_H
// Qt
#include <QList>
#include <QString>
#include <QByteArray>
#include <QMutex>
#include <QTime>
#include <QStringList>
#include <QHash>
#include <QCryptographicHash>
#include <QDir>
// App
#include "n_thread.h"
#include "n_dir.h"
#include "n_file_suffix.h"
// NDirWatcherThreadItem
class NDirWatcherThreadItem
{
friend class NDirWatcherThread;
public:
NDirWatcherThreadItem(const QString & path, const QString & rootPath);
QByteArray hash() const;
QByteArray previousHash() const;
QString path() const;
QString rootPath() const;
bool hasChanged() const;
bool exists() const;
private:
QByteArray m_hash;
QByteArray m_previousHash;
QString m_path;
QString m_rootPath;
};
// NDirWatcherThreadItems
class NDirWatcherThreadItems: public QHash<QString/*path*/, NDirWatcherThreadItem>
{
public:
void addDir(const QString & path, const QString & rootPath);
};
// NDirWatcherThread
class NDirWatcherThread: public NThread
{
Q_OBJECT
public:
NDirWatcherThread(QObject * parent = 0);
~NDirWatcherThread();
protected:
void run();
private:
NDirWatcherThreadItems m_dirs;
QByteArray m_hash;
QCryptographicHash *m_hasher;
QDir m_dir;
NDirList m_sharedDirectories;
NDirHash m_notSharedDirs;
NFileSuffixList m_fileSuffixes;
void parseSharedDirs();
void parseDir(const QString & path, bool recursive, const QString & rootPath);
void updateHash();
void updateItemHash(NDirWatcherThreadItem & item);
signals:
void hash(QString hash, NDirWatcherThreadItems dirWatcherThreadItems);
};
#endif // N_DIR_WATCHER_H
|
43bc8155c235b1b3d454c7240eec9de7311a7f5f | 1b3fa108fcea48d6cfa7ee8abe910c601215c9bf | /src/buffered_cstyle_fadvise.h | 955f7b537e5dc1b3d709676d882c5a9165531200 | [
"ISC"
] | permissive | mdtisdall/read_strategies | 899c7e1e893ddd9ef50c8ab626654793424143c7 | b96285026c8833161b68e44f0176590d92755e73 | refs/heads/master | 2021-01-10T07:32:51.968587 | 2015-12-22T23:28:34 | 2015-12-22T23:28:34 | 48,198,057 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,329 | h | buffered_cstyle_fadvise.h | #ifndef buffered_cstyle_fadvise_h
#define buffered_cstyle_fadvise_h
#include <iostream>
#include <vector>
#include <fcntl.h>
#include <unistd.h>
template <typename T>
class buffered_cstyle_fadvise {
public:
buffered_cstyle_fadvise(
std::vector<std::string> inputFilePaths,
size_t buffersize = (8 * 1024)) :
numFiles(inputFilePaths.size()),
buffersize(buffersize),
inputFiles(numFiles),
bufferSizeInBytes(buffersize * sizeof(T)),
ioBuffer(numFiles * bufferSizeInBytes),
readCounter(0),
maxReadCounter(0),
bytesReadFromFile(0),
eof(false)
{
for(size_t i = 0; i < numFiles; i++) {
inputFiles[i] = open(inputFilePaths[i].c_str(), O_RDONLY);
if(-1 == inputFiles[i]) {
std::cerr << "Could not open file: " << inputFilePaths[i] << std::endl;
exit(1);
}
// posix_fadvise(inputFiles[i], 0, bufferSizeInBytes, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE | POSIX_FADV_WILLNEED);
posix_fadvise(inputFiles[i], 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE );
}
}
bool read(T *buffer) {
if(eof) {
return false;
}
if(readCounter == maxReadCounter) {
T* writeHead = ioBuffer.data();
size_t readSize;
bytesReadFromFile += bufferSizeInBytes;
for(size_t i = 0; i < numFiles; i++) {
readSize = ::read(inputFiles[i], writeHead, bufferSizeInBytes);
// posix_fadvise(
// inputFiles[i],
// bytesReadFromFile, bufferSizeInBytes,
// POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE | POSIX_FADV_WILLNEED);
if(0 == readSize) {
eof = true;
return false;
}
writeHead += buffersize;
}
readCounter = 0;
maxReadCounter = readSize / sizeof(T);
}
for(size_t i = 0; i < numFiles; i++) {
buffer[i] = ioBuffer[i * buffersize + readCounter];
}
readCounter++;
return true;
}
protected:
size_t numFiles;
size_t buffersize;
std::vector<int> inputFiles;
size_t bufferSizeInBytes;
std::vector<T> ioBuffer;
size_t readCounter;
size_t maxReadCounter;
size_t bytesReadFromFile;
bool eof;
};
#endif
|
3d18e881ca1defaf038e3f35783e457001caf73c | 4e346e409b905a4858410e9f01818aa5f426d6ef | /Desktop/Git/Bank-Ecommerce Simulation Design/Simulation3:E-Pay System/BANK_1.0/build-BANK_STEAM-Desktop_Qt_5_4_1_MinGW_32bit-Debug/debug/qrc_background_bank.cpp | c2f83f48a3ae982057ed127a437f7cfd5def3d1a | [] | no_license | BonZhao/Bank-and-E-commerce-System-Simulation-Design | 017c89f872491226925f73e57d7da6f376cdebc7 | 9cf3525590926aace0df37bbd4a84311ab45128b | refs/heads/master | 2020-03-31T14:19:10.383084 | 2018-10-09T17:12:33 | 2018-10-09T17:12:33 | 152,289,346 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 176,139 | cpp | qrc_background_bank.cpp | /****************************************************************************
** Resource object code
**
** Created by: The Resource Compiler for Qt version 5.4.1
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
static const unsigned char qt_resource_data[] = {
// C:/Users/znn/Desktop/C/BANK_1.0/BANK_STEAM/bac1.jpg
0x0,0x0,0x84,0xfe,
0xff,
0xd8,0xff,0xe0,0x0,0x10,0x4a,0x46,0x49,0x46,0x0,0x1,0x1,0x1,0x0,0x48,0x0,
0x48,0x0,0x0,0xff,0xdb,0x0,0x43,0x0,0x5,0x4,0x4,0x5,0x4,0x3,0x5,0x5,
0x4,0x5,0x6,0x6,0x5,0x6,0x8,0xe,0x9,0x8,0x7,0x7,0x8,0x11,0xc,0xd,
0xa,0xe,0x14,0x11,0x15,0x14,0x13,0x11,0x13,0x13,0x16,0x18,0x1f,0x1b,0x16,0x17,
0x1e,0x17,0x13,0x13,0x1b,0x25,0x1c,0x1e,0x20,0x21,0x23,0x23,0x23,0x15,0x1a,0x26,
0x29,0x26,0x22,0x29,0x1f,0x22,0x23,0x22,0xff,0xdb,0x0,0x43,0x1,0x6,0x6,0x6,
0x8,0x7,0x8,0x10,0x9,0x9,0x10,0x22,0x16,0x13,0x16,0x22,0x22,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xff,0xc0,0x0,
0x11,0x8,0x2,0x58,0x1,0xac,0x3,0x1,0x11,0x0,0x2,0x11,0x1,0x3,0x11,0x1,
0xff,0xc4,0x0,0x1c,0x0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4,0x40,0x30,0x3d,0x7,0xec,0x80,0x63,0xd8,0x20,
0x18,0x1d,0xc0,0x40,0x30,0x3d,0x2,0x12,0xcb,0x81,0xe8,0x3f,0x64,0x1b,0x8c,0xf,
0x44,0x1b,0x97,0x8,0x37,0x26,0x3d,0x95,0x40,0xbf,0x84,0x3,0x1f,0x65,0x50,0x18,
0x50,0x10,0xfd,0x94,0x4,0xfc,0x25,0x14,0xa0,0x21,0xb,0x85,0x41,0x30,0x80,0xb8,
0x40,0x30,0x8c,0xc,0xf,0x45,0x1,0x30,0x3d,0x2,0xd,0xc6,0x0,0xec,0x10,0x6e,
0x4f,0xc2,0x2,0xe0,0x7a,0xf,0xd9,0xa,0x4c,0xe,0xe0,0x20,0x18,0x1e,0x81,0x0,
0xc0,0xf4,0x8,0x6,0x7,0xa0,0x42,0xc,0x7b,0x4,0x16,0x31,0xec,0x10,0x6e,0x30,
0x3d,0x2,0x14,0x60,0x7a,0x4,0xa0,0x31,0xec,0x10,0xc,0xf,0x40,0x80,0x60,0x7a,
0x4,0x3,0xf0,0x10,0xc,0xf,0x40,0x80,0x60,0x7a,0x4,0x3,0x3,0xd1,0x0,0xe3,
0xd0,0x20,0xb3,0x2,0xdc,0xcd,0x8e,0x7c,0x10,0x7a,0x67,0x80,0xb5,0xc9,0xd3,0x36,
0x45,0x5a,0x33,0xd6,0xc3,0x51,0x50,0xa1,0xa,0x10,0x4,0x25,0x84,0x27,0x21,0x7,
0x1,0xb,0x61,0xa,0x10,0x8c,0x21,0x2,0xb,0x8,0x64,0x10,0x81,0xa,0x10,0x4,
0x23,0x8,0x42,0x84,0x1,0x0,0x54,0x4,0x1,0x0,0x40,0x10,0x10,0xa8,0x18,0x40,
0x54,0x1,0x50,0x10,0x4,0x1,0x0,0x50,0x4,0x3,0x8,0x8,0x80,0x21,0x42,0x14,
0x20,0x8,0x46,0x10,0x88,0x20,0x61,0x5,0x84,0x2a,0x8,0x50,0x84,0xb0,0x84,0x6c,
0x20,0xba,0x8,0x5b,0x8,0x2,0x14,0x21,0x8,0x84,0x31,0x2c,0xc7,0xbe,0x5c,0xe0,
0x74,0x58,0xb4,0x6c,0x8b,0xd8,0xcc,0xb,0x23,0x0,0x85,0x8,0x2,0x0,0x84,0x8,
0x46,0x10,0x81,0xa,0x82,0x6,0x7,0x54,0x5,0x28,0x19,0x10,0x81,0xc,0xc2,0x10,
0x21,0x2c,0x21,0x90,0x42,0x36,0x50,0x38,0x42,0x4,0x1,0x0,0x54,0x4,0x1,0x0,
0x40,0x10,0x2,0xa0,0x64,0x40,0x54,0x1,0x50,0x10,0x4,0x1,0x0,0x50,0x4,0x1,
0x1,0x10,0x4,0x2d,0x84,0x28,0x43,0x16,0xc2,0x14,0x20,0x61,0xc,0x42,0x14,0x20,
0xe0,0x20,0xb0,0x84,0x8,0x50,0x84,0x8,0x65,0x41,0x0,0x42,0x84,0x1,0x8,0xcf,
0xe,0x6e,0x4a,0x8c,0xa9,0x9e,0xd5,0x20,0x42,0x84,0x1,0x0,0x42,0x58,0x42,0x58,
0x40,0x10,0x4,0x3,0x8,0x40,0x80,0x21,0x42,0x4,0x82,0x19,0x4,0x20,0x40,0x10,
0xc4,0xa8,0x50,0x80,0x20,0xa,0x80,0x80,0x20,0x8,0x2,0x0,0xa0,0x7,0xaa,0xb,
0x19,0x40,0x15,0x1,0x0,0x40,0x10,0x4,0x1,0x40,0x10,0x11,0x0,0x40,0x10,0xa1,
0x8,0xc2,0x19,0x4,0x23,0x41,0x8,0x5e,0xc8,0x8,0x84,0x8,0xb,0xd9,0xa,0x4c,
0x20,0x8,0x2,0x16,0xc2,0x0,0x85,0x8,0x8,0x84,0x8,0x10,0x40,0x54,0x1,0x1,
0x32,0x80,0xa8,0x40,0x82,0x86,0x50,0x58,0xce,0x50,0x4,0x5,0xca,0x2,0x20,0x61,
0x5,0x4,0x28,0x40,0x10,0x50,0x43,0x10,0x80,0x21,0x4b,0x94,0x1,0x54,0x2,0x0,
0x80,0x20,0x8,0x2,0x0,0xa0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x99,0xa9,
0x24,0xa4,0xe0,0xaf,0xf3,0x93,0x26,0xed,0x8a,0xbe,0x19,0x91,0xac,0xa3,0xa8,0xca,
0x5e,0xc7,0xd,0xf4,0xa6,0x79,0x91,0xaf,0xc9,0xe7,0x7,0x1f,0x2b,0xb9,0xcf,0x55,
0xb3,0x24,0xf1,0xf6,0x77,0x50,0x96,0xfe,0x5b,0xb5,0xfc,0x18,0xc6,0x32,0xcc,0xbc,
0x4b,0xde,0x76,0x4b,0xd2,0x39,0x42,0x14,0x20,0x8,0x63,0x61,0x2,0x61,0xb,0x61,
0x5,0x84,0x1,0xa,0x10,0x4,0x23,0x8,0x4b,0x8,0x10,0x1d,0x55,0x45,0x65,0x42,
0x4,0x1,0x0,0x40,0x11,0x82,0x28,0x2,0x14,0xe,0xa8,0x62,0x55,0x4a,0x10,0x4,
0x1,0x0,0x40,0x43,0xd5,0x19,0x50,0x50,0x81,0x8,0x10,0xca,0xc2,0x14,0x20,0x8,
0x4b,0x8,0x2c,0x20,0xb0,0x86,0x21,0xc,0x90,0x42,0x84,0x3,0xaa,0x11,0x9c,0x75,
0x6b,0x55,0x7c,0x49,0x66,0x48,0xaf,0xea,0x12,0xb0,0xb9,0xee,0x6b,0x28,0xc2,0xe2,
0xc0,0x3,0x4f,0x19,0x38,0xf9,0x9d,0xc6,0x71,0x95,0xe6,0xc2,0x70,0xed,0xd,0xac,
0x92,0xdf,0xcb,0x84,0x75,0x4a,0x32,0xc2,0xae,0x31,0xf7,0x98,0xf1,0x43,0x3d,0x4b,
0xba,0xc4,0x3a,0x54,0xf1,0x58,0x92,0x8,0x44,0x4c,0x92,0x77,0x93,0x23,0x1a,0x1b,
0x93,0x13,0x40,0xe4,0x9e,0x73,0x9f,0xb2,0xc5,0x41,0xa9,0x4e,0x38,0xdf,0xa7,0xae,
0xdd,0x11,0x93,0x92,0x71,0x8e,0xb5,0x5f,0x9c,0x99,0x1a,0x74,0x9a,0x75,0x98,0xaa,
0x47,0xac,0xe9,0xf2,0x56,0xb9,0x23,0x9a,0xe6,0x1b,0x10,0xed,0x6e,0xe1,0xf4,0xb1,
0xae,0xf4,0x3,0xb7,0x75,0x9e,0x29,0x41,0xa8,0xac,0xb1,0xa7,0xea,0xbe,0x8,0xc6,
0x6a,0x49,0xb7,0x7,0x68,0xec,0x17,0xa2,0x72,0x15,0xa,0x44,0x3,0xa,0x30,0x8a,
0xa8,0x8,0x53,0x5f,0xad,0x59,0x75,0x3d,0xa,0xec,0xf1,0x9c,0x3d,0x91,0x1d,0xa7,
0xd0,0x9e,0x32,0xb4,0xf6,0x89,0x38,0xe2,0x93,0x46,0x58,0xe2,0xa5,0x34,0x99,0xa0,
0xbd,0xac,0xc7,0xe1,0x4d,0x3b,0x4f,0xa1,0x52,0xb1,0xb1,0x62,0x58,0xc1,0x3,0x76,
0x32,0x4f,0x52,0x7b,0x92,0x49,0x5c,0x99,0x73,0xff,0x0,0x8b,0x8,0xe3,0x82,0xb6,
0xcd,0xd0,0xc5,0xdf,0x49,0xca,0x4c,0xf9,0xc5,0xaa,0x57,0xb5,0xab,0xc7,0x36,0xaf,
0x41,0xf0,0x58,0xc,0x11,0xcf,0x14,0xb1,0x97,0x79,0x58,0x3b,0x99,0x20,0x38,0xe0,
0x67,0x23,0x2b,0x15,0x9a,0xf2,0x27,0x96,0x34,0xfa,0xfb,0x3a,0x33,0x27,0x8d,0xa8,
0xd4,0x1d,0xf9,0x1f,0x5d,0x24,0x43,0x27,0x89,0x2d,0x41,0x3c,0x61,0xef,0x6b,0xa5,
0x93,0xe6,0xe4,0x38,0xb9,0xcd,0x3b,0xbf,0xf2,0xed,0xc2,0xcb,0x5,0x77,0xcd,0x3f,
0x5f,0x9b,0xfb,0x13,0x25,0xac,0x69,0xa3,0xae,0x5e,0x89,0xca,0x10,0xa1,0x1,0x50,
0xc4,0x88,0x10,0x40,0xc2,0x14,0x21,0x42,0x0,0x80,0x21,0x8b,0x8,0x41,0x84,0x28,
0x1d,0x50,0x15,0x50,0x10,0x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0,0x40,0x10,0x4,0x1,0x0,0x2a,0x2,0x21,0xa,0x10,
0xa1,0x50,0x10,0x4,0x1,0x0,0x40,0x10,0x5,0x0,0x40,0xf,0x44,0x29,0x10,0x4,
0x28,0x43,0x1b,0x8,0x41,0x94,0x0,0x20,0x29,0x42,0xb2,0x21,0x50,0x42,0x58,0x40,
0x73,0x36,0xde,0xe8,0xfc,0x43,0x7a,0x76,0x5e,0x8a,0x8b,0x61,0x86,0x20,0xf2,0xe6,
0x7,0x36,0x5c,0xe7,0x1b,0xbd,0xf8,0xc0,0xc7,0x2b,0x83,0x23,0xac,0xd2,0x96,0xad,
0x34,0x97,0xbf,0xda,0x74,0xc1,0x5c,0x12,0xab,0xe4,0xd7,0xea,0xf2,0x3d,0xfa,0x25,
0xad,0x52,0x2d,0x4a,0x3b,0x53,0x42,0xc3,0x11,0x6c,0x6c,0xd,0x60,0x6b,0xf8,0x73,
0x4b,0x79,0x39,0xe8,0x72,0x7d,0x16,0xac,0xce,0xf1,0xbc,0x8a,0x76,0xd6,0xdf,0x1f,
0x43,0x3c,0x7b,0x49,0x41,0xc6,0x91,0xf2,0xbd,0x10,0xb5,0xa4,0xe8,0x30,0xb6,0x53,
0xba,0x6,0x36,0x70,0xee,0x99,0x3b,0x9a,0xd6,0xff,0x0,0x72,0xa4,0xd2,0x96,0x3c,
0x71,0xbe,0x37,0xf9,0xd2,0x32,0x8e,0xd2,0x93,0xf7,0x1d,0xd9,0x3c,0x9e,0x7b,0xaf,
0x54,0xe1,0x8,0x50,0x80,0x87,0xaa,0x81,0x15,0x52,0x4,0x28,0x1d,0x42,0x10,0xfc,
0xbe,0xfc,0x5f,0x7,0x42,0x19,0x63,0x74,0xc5,0xf2,0x59,0x73,0x2c,0x30,0x1c,0x9d,
0xfb,0xfe,0x71,0x8f,0x42,0x0,0x3f,0x71,0xee,0xbc,0x2c,0x91,0xd3,0x14,0xd7,0x37,
0xbf,0xb7,0xf9,0x3d,0x28,0x3b,0x93,0xbf,0x23,0xa1,0x67,0x95,0xe,0xbf,0x76,0x7a,
0xd1,0x35,0xf6,0x65,0xb0,0xd8,0x2a,0xc6,0xec,0xec,0x61,0x73,0x3,0xdf,0x26,0x3b,
0x64,0x72,0x71,0xe8,0xbb,0x15,0x2c,0xb2,0x94,0x56,0xed,0xd2,0xf4,0xda,0xdb,0x39,
0xdd,0xb8,0x24,0xf8,0xad,0xcc,0xba,0x7a,0x65,0xf9,0x75,0x79,0x27,0xd4,0x1b,0x5e,
0x38,0xa3,0xb0,0x25,0x63,0xa1,0xc8,0x32,0x10,0xd2,0xdc,0xe3,0xb0,0x39,0xe7,0xd7,
0x1,0x6c,0xc7,0x87,0x23,0xc8,0xe5,0x92,0xaa,0xcc,0x65,0x92,0x2a,0x35,0x1f,0x23,
0xa4,0x5d,0xa7,0x38,0x40,0x10,0x81,0x0,0x28,0x52,0xf6,0x40,0x44,0x8,0x21,0x42,
0x14,0x21,0x0,0x42,0x15,0x0,0x40,0x15,0x1,0x0,0x40,0x10,0x4,0x1,0x1,0xa,
0x81,0x84,0x20,0x8,0x52,0xaa,0x2,0x0,0x80,0x20,0x8,0x2,0x0,0xa0,0x8,0x8,
0x50,0x4,0x2a,0x8,0x50,0x80,0x21,0xa,0x84,0x22,0x10,0x21,0x42,0x10,0x61,0xa,
0xa,0x3,0x9c,0xbf,0xa5,0xde,0x8f,0x54,0x65,0x8d,0x39,0x95,0xe4,0x64,0xb6,0x4,
0xb2,0x79,0xd9,0xcb,0xe,0xdd,0xb9,0xc7,0x70,0x3a,0x8f,0x42,0xb8,0xf2,0xe1,0xc9,
0xad,0x4b,0x1d,0x73,0x7b,0x9d,0x10,0x9c,0x5c,0x6a,0x5e,0x46,0x24,0xe2,0x39,0xb5,
0xca,0x52,0x5b,0x8d,0x82,0xd4,0x16,0x84,0x16,0x5a,0xcc,0x86,0x4a,0x36,0x97,0xb1,
0xf8,0xef,0x8c,0x67,0x9e,0x9c,0xad,0x72,0xa7,0x96,0x2e,0x5f,0xa9,0x3a,0x7e,0xbd,
0x51,0x92,0xda,0xd,0x2e,0x2b,0x63,0x9d,0xad,0x18,0xbb,0x4e,0xfc,0x92,0xba,0x70,
0x23,0x9f,0x64,0xc,0x24,0xb4,0xee,0xdd,0x98,0xdb,0x8f,0x41,0xb8,0x9f,0xb9,0xf6,
0x5c,0x51,0x8e,0xb5,0x26,0xfc,0xf6,0x5f,0x4f,0x71,0xd1,0x27,0xa5,0xa4,0x8f,0xd3,
0xc6,0x40,0xe7,0xaf,0x75,0xee,0x9e,0x71,0x50,0x4,0x21,0xa,0x8c,0xa8,0x2a,0xa,
0x80,0x20,0x38,0xbf,0x12,0xed,0xd3,0xaf,0x7c,0x45,0x37,0x6f,0x95,0xf2,0x36,0x77,
0xc0,0xd6,0x97,0x39,0x8f,0x6f,0x47,0xf1,0xd0,0x10,0x30,0x7f,0x5,0x79,0x9d,0xad,
0x68,0x96,0xa8,0x73,0xcd,0x7e,0xe7,0x56,0xf,0x12,0xa9,0x18,0xae,0xd6,0x23,0x76,
0xa5,0xa6,0xeb,0xed,0x63,0xdb,0xa7,0xce,0xf2,0xc9,0xd9,0x8d,0xce,0x8a,0x50,0xd2,
0xd1,0xd3,0xd4,0x61,0x61,0xdf,0xa7,0x28,0xe7,0x4b,0x67,0xca,0xf5,0x33,0xee,0xda,
0x8b,0xc7,0xd4,0xea,0x22,0xd6,0x1f,0xf1,0x11,0xb6,0xe5,0x9,0xea,0xc5,0x31,0x2,
0x29,0x64,0x20,0x82,0x4f,0x40,0xe0,0x3e,0x92,0x7d,0xd7,0x72,0xcd,0x24,0xd6,0xb8,
0xd2,0x7d,0x7e,0xe7,0x33,0xc6,0xab,0xc2,0xec,0xdb,0x2e,0x83,0x48,0x42,0x84,0x1,
0x0,0x41,0x63,0xb2,0x0,0x84,0x8,0x65,0xc0,0x42,0x84,0x23,0x28,0x42,0x20,0x80,
0x20,0xa,0x80,0x80,0x20,0x8,0x2,0x0,0x8c,0x5,0x1,0x10,0x51,0x50,0x5,0x40,
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x8b,0xde,0xcc,
0xf6,0x24,0x10,0x33,0xec,0xb5,0x63,0x94,0x6b,0xc5,0xc3,0x5b,0xbf,0x5e,0x68,0xce,
0x57,0x7b,0x74,0x7c,0x1b,0x87,0xde,0xa9,0xa8,0xdc,0xa5,0xa6,0x50,0x20,0x57,0x63,
0x84,0x85,0xfb,0x4b,0x5a,0x43,0x39,0xc,0x66,0x47,0x3c,0xe3,0x3e,0x81,0x74,0xbc,
0x91,0xc9,0x28,0xe3,0x8f,0x1c,0xfc,0x3a,0x23,0x4a,0x8b,0x82,0x73,0x97,0x3f,0x73,
0xa3,0x5d,0x86,0x94,0x10,0xa1,0x0,0x40,0x10,0x96,0x10,0x8c,0x21,0x90,0x40,0x10,
0x4,0x0,0x21,0xa,0x84,0x8,0x2,0x0,0xa8,0x8,0x2,0x0,0x80,0x20,0x21,0x50,
0x30,0x85,0x2a,0x10,0x2a,0x2,0x0,0x80,0x20,0x8,0x2,0x80,0x20,0x8,0x8,0x80,
0x21,0x42,0x14,0x20,0x8,0x2,0x18,0xb0,0x85,0xb0,0x82,0xc2,0x0,0x85,0x8,0x46,
0x73,0xc2,0xf5,0x6d,0x33,0x52,0xb9,0x46,0xe9,0xcd,0x79,0x89,0x9c,0x3f,0x69,0x70,
0x60,0x7f,0x56,0xbf,0x3,0x8e,0x7a,0x7a,0xae,0x4e,0xf2,0x38,0xe7,0x28,0x4b,0x8e,
0x7e,0x3e,0x66,0xed,0xe,0x71,0x52,0x5c,0x9a,0x5b,0xaf,0xae,0xc8,0x58,0xca,0xb3,
0x3d,0xf5,0xab,0xd7,0x92,0x38,0xac,0x86,0x61,0xad,0x7e,0x43,0xa3,0x66,0xee,0xe4,
0x6d,0x3c,0xae,0x69,0xb8,0xd7,0x85,0xf8,0x52,0x7b,0xfc,0xd1,0xba,0x3a,0xba,0xf3,
0xf9,0x66,0x66,0xa5,0xa9,0xc9,0x1c,0x5e,0x1c,0xbb,0x13,0xb,0x8b,0xa4,0xdc,0xf6,
0xe3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xff,0x0,0x9e,0xa5,0xd3,0xee,0x74,0x30,0x69,0xf5,0x6b,0x58,
0x9a,0x78,0x20,0x8d,0x93,0x4e,0x73,0x24,0x80,0x72,0xef,0xca,0xec,0x8c,0x23,0x16,
0xe4,0x96,0xec,0xe7,0x72,0x93,0x54,0xdf,0x6,0x52,0xcc,0xc5,0x4,0x32,0x8,0x2,
0x18,0xd8,0x42,0x4,0x1,0xc,0xc2,0x0,0x80,0x21,0x88,0x40,0x51,0xd1,0x0,0x40,
0x10,0x5,0x40,0x40,0x10,0x4,0x1,0x18,0x21,0x50,0x30,0x80,0xa8,0x2,0xa0,0x20,
0x8,0x2,0x0,0x80,0x28,0x2,0x0,0x80,0x20,0x22,0x0,0x85,0x8,0x50,0x80,0x21,
0x8b,0x8,0x40,0x85,0x41,0xc,0x82,0x10,0x21,0xc,0x5b,0x34,0x2a,0xdb,0x9a,0x19,
0x6c,0x41,0x1c,0x92,0x42,0x43,0xa3,0x7b,0x87,0x2d,0x23,0xdd,0x61,0x2c,0x71,0x93,
0x4d,0xae,0xc,0x94,0x9c,0x76,0x4c,0xe7,0x81,0xc7,0x8b,0x3f,0x87,0xc2,0x7e,0x8b,
0x22,0xd3,0x5a,0x6,0x7c,0xb0,0x62,0x3b,0xbf,0x5,0xc4,0x7e,0xeb,0x8f,0xff,0x0,
0xbf,0x42,0xf3,0xbf,0x97,0xdc,0xe8,0xff,0x0,0xeb,0xd4,0xfc,0xab,0xe6,0x6b,0xb4,
0xfa,0x3f,0x34,0xf4,0x2b,0xca,0x67,0x6d,0x9b,0x6e,0xdd,0x23,0xba,0xf9,0x2d,0x20,
0xbc,0xfa,0x60,0xbb,0x23,0xdc,0xad,0x38,0xa0,0x9b,0x78,0xe2,0xed,0x37,0xf2,0x5f,
0xc9,0xb2,0x73,0xe2,0x4f,0xa2,0xf9,0x9d,0xe2,0xf5,0x4e,0x24,0x10,0x11,0x8,0x42,
0xa3,0x2a,0x28,0xea,0xa8,0x2a,0x14,0x21,0xe,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e,0x3,0x7d,0xc8,
0x68,0xeb,0xf7,0x2b,0x72,0x83,0x84,0x34,0xc9,0xdb,0x7c,0x98,0x6a,0x4e,0x56,0xb8,
0x47,0x46,0x17,0x61,0xa0,0xa8,0x2,0x10,0xf2,0xee,0xaa,0x32,0xa2,0xfe,0x55,0x21,
0x50,0xa8,0x20,0x39,0x9f,0x11,0x3a,0x38,0xe6,0x64,0x95,0x35,0x28,0x29,0xea,0x11,
0xe2,0x42,0xc9,0x4f,0x12,0x1,0x9c,0x67,0xd3,0xb8,0xcf,0x70,0x70,0xb8,0x7b,0x56,
0x9b,0xb5,0x2d,0x32,0x5f,0x9b,0x9b,0xf0,0xdb,0x54,0xe3,0x68,0xc1,0xd1,0x75,0xa8,
0x75,0x5b,0x73,0xc7,0x7a,0x11,0x1b,0x2e,0x16,0xee,0x89,0xff,0x0,0xa2,0x50,0x3f,
0xb3,0x80,0xc8,0x3e,0xc4,0x2d,0x58,0x33,0xf7,0x92,0x6b,0x22,0xab,0xfa,0xff,0x0,
0x3f,0x53,0x66,0x4c,0x7a,0x52,0x71,0x7c,0x1b,0x3d,0x18,0xb1,0xb7,0xad,0xd3,0x9d,
0xa1,0xcf,0xc,0x66,0xe0,0xe1,0x9c,0x96,0x7c,0x99,0xfd,0x83,0xf,0xe5,0x74,0x60,
0xa5,0x27,0x7,0xf9,0x5f,0x88,0xd5,0x91,0x5c,0x54,0x91,0xd0,0xae,0xb3,0x48,0x42,
0x84,0x1,0x0,0x40,0x10,0x4,0x1,0x0,0x40,0x10,0x81,0xc,0x42,0x14,0xa8,0x2,
0x0,0xa8,0x8,0x2,0x0,0x80,0x23,0x4,0x50,0x81,0xa,0x54,0x1,0x50,0x10,0x4,
0x1,0x0,0x40,0x14,0x1,0x0,0x40,0x44,0x1,0xa,0x10,0xa1,0x0,0x40,0x10,0x4,
0x1,0x0,0x40,0x10,0x4,0x21,0xcf,0xeb,0x6f,0x6b,0x6d,0x53,0xab,0x3,0x40,0x91,
0xdb,0xde,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,0x7f,0xb2,0xdf,0x3c,
0xa9,0x4b,0x1c,0xfc,0xff,0x0,0x73,0x5c,0x60,0xda,0x9a,0x3a,0x35,0xda,0x73,0x84,
0x1,0x1,0x1d,0xd5,0x46,0x64,0x52,0xa9,0xa,0x84,0x3,0xa8,0x40,0x70,0xf0,0xdf,
0xa7,0x5a,0xce,0xa6,0x5a,0x5a,0x23,0x97,0xce,0x89,0xc7,0x1f,0x5b,0xc3,0xb7,0x37,
0xef,0x90,0x48,0x1f,0x65,0xe5,0xac,0x91,0x8b,0x97,0xad,0xaf,0xb1,0xda,0xe0,0xda,
0x5e,0x94,0x7a,0xd2,0x63,0x64,0x3a,0x78,0xd2,0xad,0x50,0x16,0xb5,0x46,0xca,0xe7,
0x49,0x1b,0x8e,0x4,0x6d,0xe8,0xd7,0x17,0xf6,0x18,0xc0,0x18,0x59,0x61,0x8e,0x98,
0xf7,0x2e,0x37,0x2e,0xbf,0x7b,0x26,0x47,0x72,0xd6,0x9d,0x23,0x36,0x26,0x43,0x57,
0x54,0xa2,0x5b,0x41,0xb4,0xe6,0x8e,0x73,0x14,0xbe,0x5b,0xb7,0x6e,0xde,0xd3,0xb0,
0xe7,0xbb,0x49,0x7,0xaf,0x42,0x16,0xc4,0x94,0x67,0x1f,0xd,0x53,0xe9,0xea,0x8c,
0x1d,0xca,0x2f,0x7b,0xd8,0xea,0x57,0x71,0xce,0x10,0xa1,0x0,0x42,0x50,0x42,0x84,
0x1,0x0,0x40,0x10,0x4,0x1,0x8,0x30,0x80,0xa3,0xa2,0x10,0x20,0xa,0x80,0x80,
0x20,0x8,0x2,0x30,0x45,0x8,0x10,0xa0,0x75,0x40,0x55,0x40,0x40,0x10,0x4,0x1,
0x0,0x50,0x4,0x4,0x40,0x10,0xc8,0x20,0x8,0x2,0x12,0xc2,0x14,0x20,0x8,0x2,
0x10,0x20,0x8,0x50,0x84,0x67,0x2f,0x61,0xb0,0xd9,0xd6,0x2f,0x6f,0xa2,0xdb,0x92,
0x3e,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4,0x1,0x8,0xcb,0x94,0x20,0x40,0x10,0x5,0x40,0x40,0x10,0x4,0x1,0x1,0x14,
0xc,0x77,0x41,0x60,0x75,0x42,0x15,0x52,0x84,0x1,0x0,0x40,0x10,0x5,0x0,0x40,
0x3a,0xa0,0x22,0x14,0x21,0x42,0x0,0x80,0x20,0x8,0x2,0x0,0x80,0x20,0x8,0xf,
0x12,0x46,0x26,0x89,0xd1,0xb8,0xb8,0x7,0x8c,0x12,0xd3,0x82,0x3e,0xc5,0x46,0x94,
0x95,0x31,0x74,0xec,0xe7,0xaa,0xb5,0xf4,0xfc,0x37,0x62,0xc4,0x72,0x3e,0x47,0x42,
0x64,0x11,0xee,0x60,0x25,0x80,0x38,0x82,0xef,0x52,0xec,0x72,0x4a,0xe3,0x87,0x83,
0xb,0x69,0xf1,0x7f,0x9e,0xd3,0x74,0xbc,0x53,0x4b,0xcc,0xd7,0xc3,0x76,0x41,0x79,
0xbb,0x6b,0xda,0x84,0x4a,0x1a,0xe8,0xe5,0x9e,0xc6,0xf6,0xce,0xd7,0x1e,0x37,0xf,
0xd2,0x4f,0x38,0x23,0xa1,0xc0,0xee,0xb4,0xc6,0x4d,0x4b,0x8a,0xf7,0xf3,0xed,0xfc,
0xd8,0xd8,0xe2,0xab,0x9b,0xfd,0x8d,0xeb,0x1a,0x6b,0xf8,0x96,0x37,0x37,0x1b,0x2d,
0xd5,0x21,0xf8,0xee,0xe6,0x11,0x83,0xfb,0x39,0x75,0xab,0x8e,0x65,0xea,0xbe,0x86,
0x87,0xbc,0x3d,0x8c,0xdb,0xae,0x83,0x58,0x40,0x4c,0x20,0x23,0x8f,0x2a,0x15,0x1e,
0x95,0x31,0x8,0x50,0x80,0xe5,0x34,0xe9,0xec,0xff,0x0,0x1e,0xd7,0xe5,0x9c,0xe4,
0xb9,0xbf,0xc8,0x19,0xfd,0x2c,0x25,0xb8,0xfd,0xd7,0x6,0x37,0x2e,0xf3,0x23,0x7e,
0xef,0x71,0xd3,0x34,0xb4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4c,0xaf,0x99,0xc5,0xed,0x94,0x7c,0xcd,0x27,0xb1,0x3d,0xfb,0x72,0x57,0x47,0x61,
0x4d,0x63,0xdf,0x9b,0x35,0xf6,0x8a,0xd7,0xb1,0xd1,0x76,0x5d,0x87,0x38,0x40,0x54,
0x28,0x40,0x10,0x4,0x28,0xec,0x84,0x26,0x50,0x15,0xa,0x10,0x4,0x31,0x7b,0x95,
0x0,0x40,0x15,0xb0,0x32,0x80,0x20,0x8,0x2,0x0,0x8c,0x11,0x42,0x4,0x0,0x75,
0x40,0x55,0x51,0x42,0x0,0x80,0x20,0x8,0x2,0x80,0x20,0x8,0x8,0x81,0x4,0x28,
0x41,0x64,0xe8,0x84,0x2a,0x14,0x20,0x22,0x2,0xa1,0x2,0x0,0x85,0x22,0x10,0xd0,
0x78,0xb8,0x3b,0xf8,0x1,0x2c,0x7c,0x8d,0x91,0xb2,0xb4,0xb1,0xb1,0xb7,0x2e,0x7b,
0xb3,0xc0,0x1e,0x9f,0x70,0xb9,0x3b,0x6a,0xbc,0x46,0xfe,0xcf,0xfa,0xcd,0x43,0x35,
0xaa,0x9a,0xec,0x10,0x57,0x2c,0xb9,0x5,0xa8,0x8b,0x76,0xcd,0x23,0x7a,0x3f,0x19,
0x19,0x70,0xef,0x91,0xc0,0xef,0xf9,0x5c,0xbd,0xf4,0x73,0x45,0x46,0x49,0xa6,0xba,
0xbf,0xcf,0xec,0xdc,0xf1,0xcb,0x1d,0xbe,0x87,0x8a,0xba,0xec,0x97,0x7c,0x69,0x52,
0x37,0x57,0x10,0x4c,0xc6,0x18,0x66,0xe7,0xeb,0xf5,0xfc,0x67,0x90,0xb1,0x8f,0x68,
0x96,0x4e,0xd3,0x1b,0x54,0xd6,0xde,0xd2,0xbc,0x4a,0x38,0x5e,0xf6,0x77,0x4b,0xd7,
0x38,0x88,0x7a,0x21,0xa,0x85,0x47,0xca,0x4f,0xab,0xf0,0xa1,0x51,0xf4,0x54,0x81,
0x8,0x54,0x29,0xc1,0x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x1d,0x14,0x59,0xdc,0x6a,0x9e,0xa4,0xfe,0x21,0xe3,0x52,0xbd,0xa9,0x9b,0xd1,
0xca,0xec,0x34,0x1a,0xab,0x8f,0x17,0x75,0x1,0x47,0x7e,0x20,0x64,0x7e,0x6d,0x80,
0xd7,0x72,0xe1,0x9c,0x6,0xf1,0xd0,0x7a,0xae,0x69,0xc9,0x64,0x96,0x8e,0x89,0x5b,
0xfb,0x1b,0x62,0xb4,0xc7,0x57,0x5e,0x86,0x9a,0xd6,0xba,0xd8,0xea,0xc0,0x67,0x8e,
0xec,0x15,0x9e,0xe0,0x59,0x25,0x50,0x1a,0xd6,0x37,0x1c,0x34,0x93,0xd4,0xe3,0x9e,
0x17,0x2c,0xfb,0x45,0x45,0x39,0x27,0x5e,0x9b,0x7f,0x66,0xe8,0xe2,0xdd,0xd5,0x5f,
0xa9,0xba,0xa9,0x2b,0x9d,0x33,0x60,0x96,0x66,0xdb,0xad,0x62,0x22,0xf8,0x64,0x70,
0x19,0x23,0xb8,0x77,0x63,0xd7,0xaa,0xea,0xc7,0x27,0x6a,0x37,0x69,0xad,0x8d,0x32,
0x54,0xad,0x2a,0x68,0xc6,0xb1,0x5a,0xae,0x93,0xa2,0x5a,0xab,0xb,0x5c,0xf7,0x4f,
0xbc,0xb2,0x26,0x8c,0xb9,0xc4,0xfa,0xf,0x41,0xea,0xb0,0xc9,0x18,0x61,0xc4,0xe1,
0x1d,0xee,0xf6,0x32,0x8c,0xa5,0x92,0x6a,0x4f,0xa1,0x87,0x42,0xac,0x5a,0x85,0xa,
0xf6,0x84,0xce,0x12,0x0,0x45,0xb9,0xdd,0x9f,0x31,0xdc,0x72,0xd1,0xe8,0x3e,0xcb,
0x4e,0x28,0x47,0x24,0x14,0xae,0xab,0x9f,0x3f,0xe8,0xce,0x72,0x70,0x93,0x5f,0x3,
0xec,0xed,0x42,0x49,0x18,0xc6,0x50,0xc,0xa9,0x45,0x87,0xd,0x79,0x69,0x26,0x4f,
0x66,0x34,0x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0x55,0x80,0x96,0xbd,0xa7,0x12,0x34,0xe7,0x20,
0xed,0x3c,0x1c,0x1f,0x45,0xc9,0x2c,0x59,0x21,0x8f,0x45,0x6a,0x5f,0x33,0x7a,0x94,
0x5c,0xb5,0x70,0xc9,0x26,0x9f,0x77,0xe1,0x22,0x31,0x69,0x74,0x59,0x6a,0x37,0x35,
0xed,0x96,0x19,0x3,0x48,0x23,0xaf,0x4,0x7d,0xc2,0x3c,0x59,0x5c,0x55,0x45,0x5f,
0x98,0xd7,0xb,0xdd,0xba,0x37,0x56,0x74,0xca,0x97,0x1e,0x24,0xb1,0x7,0xf3,0x48,
0x0,0xbd,0xae,0x2d,0x77,0xdb,0x20,0xf2,0xba,0x65,0x8a,0x13,0xde,0x4b,0x73,0x4c,
0x67,0x28,0xec,0x99,0xf4,0xa9,0x42,0xb5,0x12,0xf3,0x56,0x2d,0x8e,0x7e,0x37,0x38,
0x92,0xe7,0x3b,0x1d,0x32,0x4a,0xca,0x18,0xe3,0xf,0xd2,0x83,0x9b,0x97,0x26,0x4a,
0xcc,0xc0,0xf8,0xd8,0xab,0x5,0xb8,0x84,0x76,0xa1,0x64,0xb1,0x83,0x9d,0xaf,0x19,
0x19,0x58,0xca,0x2a,0x5c,0x95,0x49,0xc7,0x74,0x7d,0x19,0x1b,0x22,0x63,0x59,0x1b,
0x5a,0xc6,0x34,0x60,0x35,0xa3,0x0,0x2a,0x95,0x2a,0x41,0xbb,0x3d,0xaa,0x42,0x70,
0x80,0xf8,0xc9,0x52,0x9,0x6d,0xc3,0x62,0x48,0xda,0x67,0x87,0x3b,0x1f,0x8e,0x46,
0x7a,0xac,0x5c,0x22,0xe4,0xa4,0xf9,0x46,0x5a,0x9a,0x55,0xd0,0xc0,0xbb,0xa0,0xd7,
0xb4,0xe7,0x3e,0x12,0xea,0xf2,0xb9,0xdb,0x9c,0x63,0xe5,0xae,0x3e,0xa5,0xa7,0x8c,
0xfb,0xf5,0x5a,0x72,0x76,0x68,0x4f,0x7e,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1b,0x27,0x39,0xe4,0x67,0xfa,0x85,0x84,0xfb,0x34,0xe5,
0xff,0x0,0x55,0xec,0xfd,0xcb,0x1c,0xb1,0x5c,0xa3,0x7b,0xcf,0x7e,0xab,0xb1,0x1a,
0x4a,0x84,0x8,0x53,0xe6,0xff,0x0,0xa8,0x7d,0x94,0x65,0x47,0xb2,0xa9,0x7,0x44,
0x20,0x40,0x10,0xa5,0x40,0x82,0x0,0x85,0x8,0x46,0x4e,0xa8,0x40,0x80,0x74,0x40,
0x3b,0x20,0x8,0x1,0x40,0x2,0x14,0x21,0xa,0x85,0xe4,0x67,0xb2,0x13,0x82,0xa0,
0x8,0x2,0xa0,0x20,0x8,0x2,0x0,0x8c,0x11,0x42,0x4,0x28,0x1d,0x50,0x85,0x55,
0x14,0x20,0x8,0x2,0x0,0x80,0x28,0x2,0x2,0x21,0x42,0x2,0x7a,0xa1,0xb,0xd9,
0x0,0x40,0x44,0x5,0x40,0x44,0x1,0x0,0x40,0x54,0x2d,0x4,0x1,0x0,0x40,0x44,
0x20,0xe8,0x85,0x8,0x41,0xdd,0xa,0x78,0x79,0xf9,0x87,0xd9,0x46,0x54,0x7b,0x3d,
0x15,0x20,0x42,0x15,0xa,0x10,0xa1,0x0,0x42,0x4,0x1,0x1,0x10,0x81,0x0,0xc2,
0x2,0xa0,0x26,0x10,0x4,0x5,0x42,0x91,0x8,0x54,0x28,0x42,0x17,0x84,0x1,0x54,
0x2,0x0,0x80,0x20,0x8,0x2,0x30,0x45,0x5,0x4,0x1,0x1,0x55,0x40,0x20,0x8,
0x2,0x0,0x80,0x28,0x2,0x2,0x20,0x8,0x51,0x84,0x20,0xec,0x85,0x27,0x64,0x20,
0x40,0x10,0xc,0x20,0x1d,0xd0,0x2,0x80,0x21,0x4a,0x80,0x20,0x8,0x2,0x0,0x80,
0x88,0x42,0xa1,0x51,0xf3,0x78,0xf9,0xbf,0xa,0x32,0xa3,0xff,0xd9,
};
static const unsigned char qt_resource_name[] = {
// new
0x0,0x3,
0x0,0x0,0x74,0xc7,
0x0,0x6e,
0x0,0x65,0x0,0x77,
// prefix1
0x0,0x7,
0x7,0x8b,0xd0,0x51,
0x0,0x70,
0x0,0x72,0x0,0x65,0x0,0x66,0x0,0x69,0x0,0x78,0x0,0x31,
// bac1.jpg
0x0,0x8,
0x7,0x64,0x5c,0x67,
0x0,0x62,
0x0,0x61,0x0,0x63,0x0,0x31,0x0,0x2e,0x0,0x6a,0x0,0x70,0x0,0x67,
};
static const unsigned char qt_resource_struct[] = {
// :
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
// :/new
0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x2,
// :/new/prefix1
0x0,0x0,0x0,0xc,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x3,
// :/new/prefix1/bac1.jpg
0x0,0x0,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
};
#ifdef QT_NAMESPACE
# define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
# define QT_RCC_MANGLE_NAMESPACE0(x) x
# define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
# define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
# define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
#else
# define QT_RCC_PREPEND_NAMESPACE(name) name
# define QT_RCC_MANGLE_NAMESPACE(name) name
#endif
#ifdef QT_NAMESPACE
namespace QT_NAMESPACE {
#endif
bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
#ifdef QT_NAMESPACE
}
#endif
int QT_RCC_MANGLE_NAMESPACE(qInitResources_background_bank)();
int QT_RCC_MANGLE_NAMESPACE(qInitResources_background_bank)()
{
QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_background_bank)();
int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_background_bank)()
{
QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
(0x01, qt_resource_struct, qt_resource_name, qt_resource_data);
return 1;
}
namespace {
struct initializer {
initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_background_bank)(); }
~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_background_bank)(); }
} dummy;
}
|
9df95be176a0a5daf516c4a9748c2ac9fb504b33 | 3a2463e1c3ae40056358194c1c710c7050a0d891 | /Client Source/.svn/pristine/9d/9df95be176a0a5daf516c4a9748c2ac9fb504b33.svn-base | bfa07cfe8ab446a7239f420c9ef0ac4d5bd75437 | [] | no_license | jgenoss/LCSource | c20e928eae3406b06849c4d45624ee9f8df7bed5 | 07197bffbe38f9c9d5e745cc1c91fca58b30c856 | refs/heads/master | 2023-08-26T00:38:04.820048 | 2015-08-13T19:39:50 | 2015-08-13T19:39:50 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 429 | 9df95be176a0a5daf516c4a9748c2ac9fb504b33.svn-base | // collision box dimension equality names
#define HEIGHT_EQ_WIDTH 0
#define LENGTH_EQ_WIDTH 1
#define LENGTH_EQ_HEIGHT 2
#define MAX_MODELMIPS 32
#define MAX_TEXTUREPATCHES 32
#define MAX_COLOR_NAMES 32
struct PolygonsPerPatch;
struct ModelPolygon;
struct ModelTextureVertex;
struct MappingSurface;
class CModelCollisionBox;
class CAttachedModelPosition;
class CRenderModel;
class CModelInfo;
| |
2d97381e74715ffbaa0de8f7a943d3cbaff78488 | cdd092e7c2e2a52093200797737205b6a2fe716e | /ldr_matrix/ldr_matrix.ino | 2e4d9ce1f1f665a2ddf39d3f49e074382c8737af | [] | no_license | somas95/E-T-A | 3182b09637931bdc5838e1cef7477a05552d31b5 | 3abe9a8e8fde29711ec1bc7fc07d5291813731c1 | refs/heads/master | 2022-11-09T17:17:56.931560 | 2020-06-21T17:39:06 | 2020-06-21T17:39:06 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,924 | ino | ldr_matrix.ino | const int n_rows = 8; // matrix size
const int n_columns = 8;
// columns are digital pins
//const int colPins[n_columns] = { 8, 9, 10 };
// rows are analog inputs with 10k resistor to GND.
const int rowPins[n_rows] = { A0, A1, A2, A3};
int ldr[n_rows][n_columns];
int ldr_basis[n_rows][n_columns];
int gol[n_rows][n_columns];
int gol_last[n_rows][n_columns];
bool has_changed = true;
int margin = 2;
///**** shift register ***///
//Pin connected to latch pin (ST_CP) of 74HC595
const int latchPin = 8;
//Pin connected to clock pin (SH_CP) of 74HC595
const int clockPin = 12;
////Pin connected to Data in (DS) of 74HC595
const int dataPin = 11;
///*** multiplexer ***///
const int muxPins[3] = {2, 3, 4}; // S0~2, S1~3, S2~4
const int zInput = A0;
void setup()
{
Serial.begin( 57600);
Serial.println( "LDR Matrix sketch");
pinMode(latchPin, OUTPUT);
pinMode(dataPin, OUTPUT);
pinMode(clockPin, OUTPUT);
for( int i=0; i<n_columns; i++)
{
registerWrite(i, LOW);
}
for (int i=0; i<3; i++)
{
pinMode(muxPins[i], OUTPUT);
digitalWrite(muxPins[i], HIGH);
}
pinMode(zInput, INPUT);
// retrieve LDR values for calibrating purposes
fillLdrMatrix();
for( int i=0; i<n_rows; i++)
{
for( int j=0; j<n_columns; j++)
{
ldr_basis[i][j] = ldr[i][j];
}
}
}
void loop()
{
// retrieve all LDR values.
fillLdrMatrix();
// print all LDR values.
//Serial.println( "----------------");
if (has_changed)
{
sendData();
}
delay(1000);
}
void fillLdrMatrix()
{
// One colum gets 5V, then four rows can be read.
for( int i=0; i<n_columns; i++)
{
registerWrite(i, HIGH);
for( int j=0; j<n_rows; j++)
{
selectMuxPin(j);
ldr[j][i] = analogRead( zInput);
if (ldr[j][i] < ldr_basis[j][i] - margin){
gol[j][i] = 1;
}else{
gol[j][i] = 0;
}
// keep track of changes
if (gol[j][i] != gol_last[j][i])
{
gol_last[j][i] = gol[j][i];
has_changed = true;
}
}
registerWrite(i, LOW);
}
}
void sendData()
{
//OJO
for( int i=0; i<n_rows; i++)
{
for( int j=0; j<n_columns; j++)
{
Serial.print(gol[i][j]);
}
}
Serial.println();
has_changed = false;
}
void registerWrite(int whichPin, int whichState) {
// the bits you want to send
byte bitsToSend = 0;
// turn off the output so the pins don't light up
// while you're shifting bits:
digitalWrite(latchPin, LOW);
// turn on the next highest bit in bitsToSend:
bitWrite(bitsToSend, whichPin, whichState);
// shift the bits out:
shiftOut(dataPin, clockPin, MSBFIRST, bitsToSend);
// turn on the output so the LEDs can light up:
digitalWrite(latchPin, HIGH);
}
void selectMuxPin(byte pin)
{
for (int i=0; i<3; i++)
{
if (pin & (1<<i))
digitalWrite(muxPins[i], HIGH);
else
digitalWrite(muxPins[i], LOW);
}
}
|
f857aa87a95689eb7a0646aa6eae90a6112cc9b1 | f7453b84352aff79ef7b7bc091d5ceec90eee2f5 | /src/Tools/xmltree.cpp | 6c2c581a30b8a3ecc3b5d687c5e5de879e4a3edc | [
"MIT"
] | permissive | DisCODe/DisCODe | a1be865f1fc28104a8f1e3a368a4428e4c54a0e9 | c6e1e5795eeccfc5ed03bec1acff693990726d81 | refs/heads/master | 2021-01-15T18:09:30.589299 | 2016-01-27T14:32:20 | 2016-01-27T14:32:20 | 930,813 | 2 | 9 | null | 2014-11-20T09:44:13 | 2010-09-22T14:50:45 | C++ | UTF-8 | C++ | false | false | 1,833 | cpp | xmltree.cpp | /*!
* \file xmltree.cpp
* \brief Simple program printing XML-tree from given file.
*
* File name must be passed as first argument, tree is printed in very simple
* form, with indents indicating child-parent relationship. For each node
* value is printed, event if there is no value associated (in that case empty
* string is shown).
*
* \author mstefanc
*/
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/xml_parser.hpp>
#include <boost/foreach.hpp>
#include <string>
#include <exception>
#include <iostream>
using boost::property_tree::ptree;
typedef std::pair<std::string, ptree> sp;
void colprint(const std::string & key, const std::string & val, int colwidth, int indent = 0, char ch = '.') {
for (int i = 0; i < indent; ++i)
std::cout << " ";
std::cout << key << " ";
for (int i = key.length() + indent; i < colwidth-2; ++i)
std::cout << ch;
std::cout << " \"" << val << "\"";
std::cout << std::endl;
}
void printTree(const ptree & pt, int lvl) {
BOOST_FOREACH( sp p, pt) {
colprint(p.first, pt.get(p.first, ""), 25, lvl*2);
printTree(p.second, lvl+1);
}
}
void iterate(const std::string &filename) {
// Create empty property tree object
using boost::property_tree::ptree;
ptree pt;
// Load XML file and put its contents in property tree.
// No namespace qualification is needed, because of Koenig
// lookup on the second argument. If reading fails, exception
// is thrown.
read_xml(filename, pt);
printTree(pt, 0);
}
int main(int argc, const char * argv[])
{
if (argc < 2) {
std::cout << "Supply filename.\n";
return 1;
}
try
{
iterate(argv[1]);
}
catch (std::exception &e)
{
std::cout << "Error: " << e.what() << "\n";
}
return 0;
}
|
b47c4cd4c31dfd629432129150287f38237891f1 | b8adcabb72f6db3c4eeeb9f24ddc42bab4eeefca | /SWEA/level_B/3993.cpp | ba8a46e9e897fbd40a19c152c3483148079c4d71 | [] | no_license | don2101/APS_problem | 71ceccf413c3432321cda4e0543780faf0647ce7 | c51d9980e67d59ec3c10500f92a4fa8ca4b4ae3d | refs/heads/master | 2020-04-25T09:08:49.480350 | 2019-11-06T08:17:10 | 2019-11-06T08:17:10 | 172,667,731 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 995 | cpp | 3993.cpp | #include <iostream>
using namespace std;
long long ans;
int n, l, r;
long long dp[21][21][21];
long long search(int n, int l, int r) {
if(n == 1 && r == 1 && l == 1) return 1;
if(n < 1 || r < 1 || l < 1) return 0;
if(n < r || n < l) return 0;
if(n+1 < l+r) return 0;
if(dp[n-1][l-1][r] == 0) dp[n-1][l-1][r] = search(n-1, l-1, r);
if(dp[n-1][l][r-1] == 0) dp[n-1][l][r-1] = search(n-1, l, r-1);
if(dp[n-1][l][r] == 0) dp[n-1][l][r] = search(n-1, l, r);
return dp[n][l][r] = dp[n-1][l-1][r] + dp[n-1][l][r-1] + (n-2)*dp[n-1][l][r];
}
int main(void) {
int t, tc = 0;
cin >> t;
while(++tc <= t) {
cin >> n >> l >> r;
for(int i = 0; i <= 20; ++i) {
for(int j = 0; j <= 20; ++j) {
for(int k = 0; k <= 20; ++k) dp[i][j][k] = 0;
}
}
dp[1][1][1] = 1;
dp[n][l][r] = search(n, l, r);
cout << "#" << tc << " " << dp[n][l][r] << endl;
}
} |
0af41372b695641ee75b23b625d53b35ed09857d | ecfbddcdf4fb6328d21dd69c4c768dd908689b5d | /include/polyvec/utils/num.hpp | d30f8be5d0313021fa670dd45630a0e6d2ee3319 | [
"MIT"
] | permissive | ShnitzelKiller/polyfit | 83aece9269e12b3d47d5cb0e4eb2884f551c9635 | 51ddc6365a794db1678459140658211cb78f65b1 | refs/heads/master | 2022-12-04T07:28:01.805877 | 2020-09-02T00:36:32 | 2020-09-02T00:36:32 | 291,927,085 | 0 | 0 | MIT | 2020-09-01T07:24:42 | 2020-09-01T07:24:41 | null | UTF-8 | C++ | false | false | 1,722 | hpp | num.hpp | #pragma once
#include <polyvec/core/macros.hpp>
#include <polyvec/core/types.hpp>
#include <algorithm>
#ifndef logic_xor // https://benpfaff.org/writings/clc/logical-xor.html
#define logic_xor(a, b) ((!(a)) != (!(b)))
#endif
NAMESPACE_BEGIN(polyvec)
NAMESPACE_BEGIN(Num)
template <typename T>
T lerp(const T& v0, const T& v1, const double t) {
return v0 + (v1 - v0) * t;
}
// hlsl ftw
template <typename T>
T saturate(const T& v) {
return std::max(std::min(v, (T)1.), (T)0.);
}
inline double sign(const double v) {
return (0 < v) - (v < 0);
}
inline double sign_with_tol(const double v) {
const double tol = 1e-10;
if(v > tol ) return 1;
if ( v < -tol) return -1;
return 0;
}
double determinant(Eigen::Ref<const Eigen::MatrixXd> mat);
// Returns true if the two intervals are overlapping and the value is written to overlap
bool test_and_calculate_interval_overlap(
const double i0, const double i1,
const double j0, const double j1,
double& overlap
);
// put this here prevent huge compilation times
Eigen::MatrixXd solve_linear_system(
const Eigen::Ref<const Eigen::MatrixXd> LHS,
const Eigen::Ref<const Eigen::MatrixXd> RHS) ;
//Implements a smooth transition function that returns
// 0 iff x <= zero_up_to
// 1 iff x >= one_beyond
// a smooth transition otherwise
double smooth_probability_incr(double x, double zero_up_to, double one_beyond);
//Implements a smooth transition function that returns
// 1 iff x <= one_up_to
// 0 iff x >= zero_beyond
// a smooth transition otherwise
double smooth_probability_decr(double x, double one_up_to, double zero_beyond);
NAMESPACE_END(Num)
NAMESPACE_END(polyvec)
|
fae0cf5fe7f193eb13fa87a601ceb7383ec6e11e | 0145d34a74227b85fddeed2de86f26037dd9e1a7 | /solutions/house-robber/solution.cpp | 716ba912be551381219db43818a0cfda9a8405cc | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | locker/leetcode | f2b5d2607b388e39b459ced77dde33d881e087cc | ad3a0b2f6b01d9ae05bb93b10ba1c9f66d6a9abb | refs/heads/master | 2022-08-29T12:49:13.422799 | 2022-08-28T13:26:09 | 2022-08-28T13:26:09 | 172,386,042 | 0 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 1,344 | cpp | solution.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v)
{
out << '[';
for (auto it = v.begin(); it != v.end(); ++it) {
if (it != v.begin())
out << ',';
out << *it;
}
out << ']';
return out;
}
class Solution {
public:
int rob(const vector<int>& nums) {
// Let n be the number of houses we can rob. Let f(i) be
// the max amount of money we could rob tonight if there
// were only houses i, i+1, ..., n-1, i = 0, 1, ..., n-1.
// We want to find f(0).
//
// Apparently,
//
// f(n-1) = x[n-1]
// f(n-2) = max(x[n-2], x[n-1])
// f(i) = max(f(i+1), x[i] + f(i+2)), i = 0, 1, ... n-3
//
int n = nums.size();
if (n == 0)
return 0;
if (n == 1)
return nums[0];
int f[2];
f[(n - 1) % 2] = nums[n - 1];
f[(n - 2) % 2] = max(nums[n - 2], nums[n - 1]);
for (int i = n - 3; i >= 0; --i) {
int val = max(f[(i + 1) % 2], nums[i] + f[(i + 2) % 2]);
f[i % 2] = val;
}
return f[0];
}
};
int main()
{
vector<int> input[] = {
{}, // 0
{3}, // 3
{4, 5}, // 5
{5, 3}, // 5
{6, 7, 1}, // 7
{2, 1, 1, 2}, // 4
{1, 2, 3, 1}, // 4
{2, 7, 9, 3, 1}, // 12
};
Solution solution;
for (const auto& nums: input)
cout << nums << " => " << solution.rob(nums) << endl;
return 0;
}
|
555c76980aab0b4c64b36f7ce171eba758d96080 | b125436787ea535eee0c7eea07d36f0f75a4a3ca | /1/소스.cpp | 6d6830fef7a97d5eed0556f94d3f55f78961de49 | [] | no_license | leeseong10/test | 70742423aa0ddc483738a5b8c3fb39e4da42c4a6 | 066e58087898e289ff2b7034ccb61e0aaa698a85 | refs/heads/master | 2023-04-25T04:50:17.541300 | 2021-05-21T03:58:20 | 2021-05-21T03:58:20 | 369,404,952 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 687 | cpp | 소스.cpp | #include <stdio.h>
#pragma warning (disable:4996)
#include <iostream>
#include <limits>
using namespace std;
int main() {
int n;
scanf("%d", &n);
printf("%d", n);
return 0;
char x;
scanf("%c", &x);
printf("%c", x);
float x;
scanf("%f", &x);
printf("%f", x);
int a, b;
scanf("%d%d", &a, &b);
printf("%d%d", a, b);
char x, y;
scanf("%c%c", &x, &y);
printf("%c%c", y, x);
float k;
scanf("%f", &k);
printf("%.3f", k);
int a;
scanf("%d", &a, &a, &a);
printf("%d%d%d", a, a, a);
char h, m;
scanf("%d:%d", &h, &m);
printf(h, ":", m);
19char y, m, d;
scanf("%d.%d.%d", &y, &m, &d);
printf("")
char x, y;
scanf("%d-%d", &x, &y);
printf("%d%d", x, y);
} |
4258b9a8a456b87a55453be9295f5c2b1dabe776 | 04fee3ff94cde55400ee67352d16234bb5e62712 | /11.11contest/source/Stu-54-Peper/equal/equal.cpp | 337382a4c3b428cb5d9c805681a3e30ded47f772 | [] | no_license | zsq001/oi-code | 0bc09c839c9a27c7329c38e490c14bff0177b96e | 56f4bfed78fb96ac5d4da50ccc2775489166e47a | refs/heads/master | 2023-08-31T06:14:49.709105 | 2021-09-14T02:28:28 | 2021-09-14T02:28:28 | 218,049,685 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,149 | cpp | equal.cpp | #include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
template<class T>void read(T &x){
int f=0;x=0;char ch=getchar();
while(ch<'0'||ch>'9') {f|=(ch=='-');ch=getchar();}
while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
x=f?-x:x;
}
const int N=1e5+100;
struct Edge{
int v,next;
}e[N<<1];
int tot,n,m,c,head[N],dep[N],fa[N][25];
int siz[N],cha,len,ans,f,u,v,q;
inline void add(int u,int v){
e[++tot].next=head[u];
e[tot].v=v;
head[u]=tot;
}
inline void dfs(int u,int f){
fa[u][0]=f;
for(int i=1;i<=20;i++) fa[u][i]=fa[fa[u][i-1]][i-1];
for(int i=head[u];i;i=e[i].next)
if(e[i].v!=f){
dep[e[i].v]=dep[u]+1;
dfs(e[i].v,u);
siz[u]+=siz[e[i].v];
}
}
inline int lca(int x,int y){
if(dep[x]<dep[y]) swap(x,y);
for(int i=20;i>=0;i--)
if((1<<i)&(dep[x]-dep[y])) x=fa[x][i];
if(x==y) return x;
for(int i=20;i>=0;i--)
if(fa[x][i]!=fa[y][i])
x=fa[x][i],y=fa[y][i];
return fa[x][0];
}
int main()
{
freopen("equal.in","r",stdin);
freopen("equal.out","w",stdout);
read(n);
for(int i=1;i<n;i++){
read(u),read(v);
add(u,v),add(v,u);
}
for(int i=1;i<=n;i++) siz[i]=1;
dep[1]=0;
dfs(1,0);
read(m);
while(m--){
read(u),read(v);
if(u==v){printf("%d\n",n);continue;}
c=lca(u,v);
len=dep[u]+dep[v]-2*dep[c];
if(len&1){printf("0\n");continue;}
if(dep[u]<dep[v]) swap(u,v);
int d=len/2;
if(dep[u]==dep[v]){
q=u;f=v;
for(int i=20;i>=0;i--)
if((d-1)&(1<<i)) q=fa[q][i];
for(int i=20;i>=0;i--)
if((d-1)&(1<<i)) f=fa[f][i];
ans=n-siz[q]-siz[f];
}
else{
q=f=u;
for(int i=20;i>=0;i--)
if(d&(1<<i)) q=fa[q][i];
for(int i=20;i>=0;i--)
if((d-1)&(1<<i)) f=fa[f][i];
ans=siz[q]-siz[f];
}
printf("%d\n",ans);
}
return 0;
}
|
0f1120e77a51c0f42d758ac4e80570d46c5f65b6 | 0b9fc8d6fa090c9ff23215b4dab16aa28d2c85d0 | /Graphs/Graph.h | cc03414dcc3ec15fa197983b9dc5de6fe84b19b4 | [] | no_license | birneAgeev/ShortestPaths | ee9b2a278d82ad097768ab82ba1b6212074432b6 | 5d326db5e4d8ad24e13bd8449fe25c10161c52c5 | refs/heads/master | 2021-01-10T14:14:40.118314 | 2015-10-02T09:19:56 | 2015-10-02T09:21:19 | 43,388,713 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 808 | h | Graph.h | #pragma once
#include "IReader.h"
#include "Edges.h"
class Graph {
public:
class Builder;
static Graph* ReadFrom(IReader& reader);
virtual ~Graph();
Link* & operator[](int vertexIndex) const;
int GetVertexDegree(int vertexIndex) const;
Link* FindLink(int startVertex, int endVertex) const;
int GetVertexCount() const;
int GetLinksCount() const;
private:
Graph();
void CheckVertexIndex(int vertexIndex) const;
Link* links;
Link** linksStarts;
int vertexCount;
int linksCount;
};
class Graph::Builder {
public:
Builder(int vertexCount, int arcsCapacity);
virtual ~Builder();
void AddArc(const Arc &arc);
Graph* Build();
private:
void SortArcsAndCopyTo(Graph* graph);
Arc* unsortedArcs;
int vertexCount;
int arcsCount;
int arcsCapacity;
}; |
58a070bcd38b5a20f7f9fd1d704da6614d7712e5 | 6219258b970ebf2b83848a9661aee27035bdf730 | /molecular_dynamics/fast/vec.h | e213d9500c77e6a9141305f7a1a7938ca45aa323 | [] | no_license | liujiamingustc/c-programs | d1ce57b8f8833b926e4e10316be10971799e5b8b | c56c7a2012938b569a25e3b8be45aa6f0498dbe4 | refs/heads/master | 2020-04-15T02:34:55.043529 | 2015-11-09T14:11:00 | 2015-11-09T14:11:00 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,594 | h | vec.h | #ifndef VEC_H
#define VEC_H
#include <iostream>
#include <cmath>
using namespace std;
typedef double real;
class Vec
{
private:
real x_val, y_val, z_val;
public:
Vec();
Vec(real,real);
Vec(real,real,real);
void set(real,real);
void set(real,real,real);
real& x();
real& y();
real& z();
void operator=(Vec);
Vec operator+(Vec);
void operator+=(Vec);
Vec operator+(real);
void operator+=(real);
Vec operator-(Vec);
void operator-=(Vec);
Vec operator-(real);
void operator-=(real);
Vec operator*(Vec);
void operator*=(Vec);
Vec operator*(real);
void operator*=(real);
Vec operator/(Vec);
void operator/=(Vec);
Vec operator/(real);
void operator/=(real);
void rand_dir_2D();
void rand_dir_3D();
real norm2();
real norm3();
real quad2();
real quad3();
void print();
};
class Vec_int
{
private:
int x_val, y_val, z_val;
public:
Vec_int();
Vec_int(int,int);
Vec_int(int,int,int);
void set(int,int);
void set(int,int,int);
int& x();
int& y();
int& z();
void operator=(Vec_int);
void operator=(Vec);
Vec_int operator+(Vec_int);
void operator+=(Vec_int);
Vec_int operator+(real);
void operator+=(real);
Vec_int operator-(Vec_int);
void operator-=(Vec_int);
Vec_int operator-(real);
void operator-=(real);
Vec_int operator*(Vec_int);
void operator*=(Vec_int);
Vec_int operator*(real);
void operator*=(real);
Vec_int operator/(Vec_int);
void operator/=(Vec_int);
Vec_int operator/(real);
void operator/=(real);
int get_cell_num(Vec_int);
void print();
};
#endif
|
57e3a166f6066873fe4e5f48dd2ba44713b6e68c | f7acc5ec96931a0c03a2ebf519d6861f751016df | /algorithm/bakejoonAlgorithm/14500_테트로미노.cc | 176b9d101e60881d0d2f84069c5fb133ffebee32 | [] | no_license | saeromkim/TIL | 43bee8d5d25e8fc4b9889b8b5556583caed12899 | 55bb02ae539a9f4edc0e1d71abb23529d7117797 | refs/heads/master | 2020-03-28T12:08:04.089480 | 2019-05-02T10:49:19 | 2019-05-02T10:49:19 | 148,271,844 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 2,837 | cc | 14500_테트로미노.cc | //dfs로 풀었다 혼자 못풀고 몇달 전 푼 그대로 풀었다.
#include <iostream>
using namespace std;
int a[500][500]; //입력배열
bool check[500][500]; //방문했는지 여부를 체크하기 위한 배열
int x[] = {0,0,1,-1};
int y[] = {1,-1,0,0};
int n,m;
int ans = 0;
void go(int i, int j, int sum, int cnt){
//4가지에 대해 순회
if(cnt == 4){
if(ans<sum) ans = sum;
return;
}
if(i<0 || i>=n || j<0 || j>=m) return;
if(check[i][j]) return;
check[i][j] = true; //순회함으로 체크
//상하좌우 모든 칸에 대해 방문하는 재귀
for(int k=0; k<4; k++){
go(i+x[k], j+y[k], sum + a[i][j], cnt+1);
}
check[i][j] = false; //다시 순회하기 위해 원래대로
}
int main() {
cin>>n>>m;
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
cin>>a[i][j];
}
}
//모든 칸에 대해 돌려본다
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
go(i,j,0,0);
//한번에 그리기 불가능한 ㅏㅓㅗㅜ는 직접해준다
//ㅗㅜ
if(j+2 < m){
int col = a[i][j] + a[i][j+1] + a[i][j+2];
if(i+1 < n){
int col2 = col + a[i+1][j+1];
if(ans<col2) ans = col2;
}
if(i-1 >= 0){
int col2 = col + a[i-1][j+1];
if(ans<col2) ans = col2;
}
}
//ㅓㅏ
if(i+2 < n){
int row = a[i][j] + a[i+1][j] + a[i+2][j];
if(j+1 < m){
int row2 = row + a[i+1][j+1];
if(ans<row2) ans = row2;
}
if(j-1 >= 0){
int row2 = row + a[i+1][j-1];
if(ans<row2) ans = row2;
}
}
}
}
cout<<ans;
return 0;
}
//재귀 사용해서 푸는 문제
#include <iostream>
using namespace std;
int a[500][500];
bool c[500][500];
int n,m;
int dx[] = {0,0,1,-1};
int dy[] = {1,-1,0,0};
int ans = 0;
void go(int x, int y,int sum, int cnt){
if(cnt == 4){
if(ans<sum) ans = sum;
return;
}
if(x < 0 || x >= n || y < 0 || y >= m) return;
if(c[x][y]) return;
c[x][y] = true;
for(int k=0; k<4; k++){
go(x+dx[k],y+dy[k],sum+a[x][y],cnt+1); //모든 모양이 4칸이동하는 것이므로 4번 순회
}
c[x][y]=false; //모두 순회해야하므로 다시 false
}
int main() {
cin >> n >> m;
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
cin >> a[i][j];
}
}
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
go(i,j,0,0);
//ㅏ ㅓ ㅗ ㅜ 모양 모두 비교
if(j+2 < m){
int temp = a[i][j]+a[i][j+1]+a[i][j+2];
if(i-1 >= 0){
int temp2=temp+a[i-1][j+1];
if(ans<temp2) ans=temp2;
}
if(i+1<n){
int temp2=temp+a[i+1][j+1];
if(ans<temp2) ans=temp2;
}
}
if(i+2<n){
int temp = a[i][j]+a[i+1][j]+a[i+2][j];
if(j+1<m){
int temp2=temp+a[i+1][j+1];
if(ans<temp2) ans=temp2;
}
if(j-1>=0){
int temp2=temp+a[i+1][j-1];
if(ans<temp2) ans=temp2;
}
}
}
}
cout << ans <<'\n';
return 0;
}
|
d0ddc807835a2350bc87cc0503838b488a42f4f4 | 2cc110a97d0710c3a140cd22c2012569cc3716be | /KolkoKrzyzyk/board.h | 04a5ba28c07b5821fb7ec762dfd67b0fb27e03af | [] | no_license | Dewkong/CPPKolkoKrzyzyk | 31294010bc2318f547f0a9068a2cf3344c8a27c1 | 1d3f20f8e5ca3e4e5400aebf86d1f047e34772b3 | refs/heads/main | 2023-05-25T18:16:35.127528 | 2021-06-09T12:36:10 | 2021-06-09T12:36:10 | 375,346,534 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 814 | h | board.h | #ifndef BOARD_H
#define BOARD_H
//enum odpowiedzialny za całą logikę symboli/znaków na planszy, BLANK oznacza puste pole
enum Sign {BLANK, X, O};
//enum używany przy wyznaczaniu zwycięzcy lub remisu
enum State {UNDECIDED, X_WINNER, O_WINNER, DRAW};
//klasa planszy, która zawiera całą logikę gry
class board
{
public:
board();
Sign currentSign();
Sign getField(int idx);
Sign checkWinner();
int makeMove(int idx);
int numberOfNonBlanks();
State checkGame();
static const char* sign_string(Sign sign);
private:
Sign fields[9]; //jednowymiarowa tablica symboli, gdzie pola 0-2 to pierwszy wiersz planszy, 3-5 drugi, 6-8 trzeci
bool now_O; //zmienna określająca, czyj ruch jest następny; gra zaczyna się od O
};
#endif // BOARD_H
|
069d5881ecd4fd8a87b7332bebedbe2e44c05b71 | 0254285e639c21a286ecc876a4bb1ce52b9408dd | /smalldb/solution/src/main.cpp | fde980e9c828d2f3cae149c7f9882295b15153e4 | [] | no_license | jeagrego/jeagrego | 3981cf7012b16d6e797427e7ac72941fca44331e | 25aaaa20369d85bdc9716137c651c58ed2adf762 | refs/heads/main | 2022-12-13T04:01:57.921299 | 2022-11-29T13:50:00 | 2022-11-29T13:50:00 | 220,828,329 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 5,616 | cpp | main.cpp | /**
* L'application est répartie en 1 processus principal (le processus initial) et
* 4 processus dédiés dont les informations sont contenues dans des données de
* type dedicated_process_t.
*
* Au niveau des communications :
*
* • stdin : lecture des commandes (select, insert, delete, update, transaction),
* uniquement lu par le processus principal. Fermer stdin ferme proprement le
* processus. La fermeture de stdin est utilisée pour forcer une fermeture
* propre du processus principal
*
* • pipes anonymes :
* • 4 pipes de commandes (processus principal -> dédié) pour les commandes
* de l'utilisateur mais aussi celles de synchronisation (munmap et resync)
* • 4 pipes de synchronisation (processus dédié -> principal). Les pipes
* de synchronisation permettent :
* 1. d'attendre que tous les processus dédiés soient arrivé à la fin
* d'une transaction ;
* 2. rafraîchir la mémoire partagée pour l'étendre.
*
* • signaux :
* • SIGINT : fermeture propre (principal) -- ignoré (dédié)
* • SIGUSR1 : écrire les changements dans le fichier (principal) --
* ignoré (dédié)
* • SIGPIPE : fermeture propre (principal et dédié).
*
* • mémoire partagée :
* • db.lsize : la taille logique est conservée en mémoire partagée
* anonyme. La taille physique est augmentée localement lors de
* l'extension de la mémoire.
* • db.fd_shm : référence un fichier anonyme conservé uniquement en RAM
* où le contenu de la base de données est conservé. Il est utilisé
* comme paramètre de mmap() pour que tous les processus référencent la
* même mémoire partagée (permet aussi d'agrandir la mémoire partagée
* puis de laisser les processus dédiés y réaccéder).
* • db.data : données de la base de données (issu d'un mmap() sur db.fd_shm).
*
* Commande
* --------
* Les commandes sont transmises telles quelles sur le pipe de commande du
* processus dédié associé (y compris le '\n' final, servant de délimiteur entre
* deux commandes écrites sur le pipe).
*
* Transaction
* -----------
* Les transactions sont initiées via le pipe de commande en écrivant
* "transaction\n". Chaque processus dédié reçoit cette commande. Le processus
* principal se met ensuite en attente jusqu'à ce que tous les processus
* dédiés aient écrit 1 octet sur le pipe de synchronisation.
*
* Extension de la mémoire partagée
* --------------------------------
* La mémoire partagée est étendue en plusieurs étapes. Pour simplifier
* les mécanismes de synchronisation entre les processus, l'extension de
* la mémoire est réalisée sur demande du processus principal.
*
* Une estimation de la différence entre la taille physique et la taille
* logique de la BDD est utilisée pour détecter quand il pourrait y avoir
* besoin d'agrandir la taille physique. Cette estimation est conservée dans
* remaining_before_expansion mais elle peut être différente de la taille
* logique (ex. : si un insert a échoué, un delete a été effectué ou si tous
* les inserts n'ont pas encore été traités par le processus dédié).
*
* La valeur remaining_before_expansion est mise à jour lorsque les
* processus se synchronisent (via une transaction ou une demande de munmap,
* cf ci-dessous pour le munmap).
*
* Lorsque le processus principal détecte qu'une extension de la mémoire est
* nécessaire, l'extension s'effectue ainsi :
*
* 1. Envoi d'une demande d'munmap (via la commande "munmap\n" sur le pipe
* de commande de chaque processus dédié).
*
* Sens : processus principal --[pipe]--> processus dédiés
*
* 2. munmap() dans tous les processus dédiés à la réception de "munmap\n".
*
* 3. Les processus dédiés indiquent qu'ils ont munmap() au processus
* principal (écrivent sur le pipe de synchronisation).
*
* Sens : processus dédiés --[pipe]--> processus principal
*
* 4. munmap() dans le processus principal, extension via ftruncate() du
* fichier db.fd_shm et mmap() sur db.fd_shm.
*
* 5. mmap() réeffectué par les autres processus dédiés via la commande
* "resync\n". Le mmap() est fait sur db.fd_shm pour que tous les
* processus puissent accéder à la même mémoire partagée.
*
* Sens : principal --[pipe]--> dédiés
*
* Il est important de noter que db.fd_shm reste ouvert en continu et sert de
* fichier commun à tous les processus d'une instance, permettant de toujours
* ouvrir la même mémoire partagée avec mmap().
*
* Ce fichier est créé à l'aide de memfd_create() qui a l'avantage de créer un
* fichier anonyme (pas de risques que plusieurs instances se partagent la même
* mémoire partagée ainsi) et est en RAM uniquement (ce qui la rend plus rapide
* d'accès). La fonction shm_open() est aussi disponible en tant qu'alternative
* intéressante à memfd_create() mais il faut gérer les conflits de noms car la
* mémoire partagée est alors nommée.
**/
#include "process/process.h"
#include "db.h"
int main(int argc, char const *argv[]) {
database_t db;
const char *database_file;
if (argc > 1) {
database_file = argv[1];
} else {
fprintf(stderr, "Mandatory parameter (db file) missing.\n");
return 1;
}
db_load(&db, database_file);
main_process(&db);
return 0;
}
|
1eb7cbbdccb284d6ea1a8683a546abd67e4a84a9 | 0c226f4a47ac0abde45f9daecd8e03ca6e7a2c26 | /cpp/15905.cpp | 2e1505f05e08f8d54077df5e7d74b2fbb429136f | [] | no_license | fjvbn2003/BOJ_backup | 1c86542131ffe0621be5dc6f37f3da812ceba00e | 9ee0dfcd86bb3010040121b3a09b30b03e66d062 | refs/heads/master | 2023-01-08T00:43:26.061434 | 2020-11-11T07:23:05 | 2020-11-11T07:23:05 | 100,412,849 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 667 | cpp | 15905.cpp | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
struct person{
int n;
int p;
person(int a, int b): n(a), p(b){}
};
bool comp(person &a, person &b){
if(a.n == b.n){
return a.p <b.p;
}
return a.n >b.n;
};
int main(){
int n, a, b;
vector<person> arr;
cin>> n;
for(int i=0; i< n; i++){
cin>> a>> b;
arr.push_back(person(a,b));
}
sort(arr.begin(), arr.end(), comp);
int cnt =0;
int p=arr[4].n;
int i=5;
while(1){
if(arr[i].n == p){
cnt++;
}else{
break;
}
i++;
}
cout <<cnt<<endl;
} |
c56e9411f915469cda1e40988634ba139ab52c03 | 6c8b28f7e3c455db2bd593d9c30e8169b35bfd5f | /Daemon/config/config_daemon.h | 95dc1d9619afe91535ebb2cebe7427b0e0fda662 | [] | no_license | sokolov-s/IEXAPITest | 21ae13c1e23ce66f0c152e61cc41656c1c48b976 | 8c43cbb5ab8c7c0045de0a076c158de2121b7c4b | refs/heads/master | 2020-06-26T11:25:58.152382 | 2019-07-30T10:45:20 | 2019-07-30T10:45:20 | 199,619,258 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,002 | h | config_daemon.h | #pragma once
#include "config.h"
#include "common_utils/noncopyable.h"
namespace config {
class Daemon : private common_utils::noncopyable::NonCopyable
{
enum class eKeys {
LOG_PATH,
DB_PATH,
INTERFACE,
PORT,
IEX_URL,
IEX_TOCKEN,
IEX_UPDATE_PRICE_SECOND,
IEX_UPDATE_SYMBOLS,
};
Daemon();
public:
static Daemon &GetInstance();
std::string GetDBPath() const;
std::string GetLogPath() const;
std::string GetGRPCServerInterface() const;
std::string GetGRPCServerPort() const;
std::string GetIEXUrl() const;
std::string GetIEXTocken() const;
int GetIEXUpdateTimeout() const;
std::vector<std::string> GetIEXUpdateSymbols() const;
private:
void Init();
private:
std::shared_ptr<Config> cfg;
const additions::Section sectionDaemon;
const additions::Section sectionGRPC;
const additions::Section sectionIEX;
additions::KeyManager<eKeys> keys;
};
} //namespace config
|
0a9335b7b07f8fa442993c2e32ea086a4b574687 | 16f80b3229701a6bea60d411f6459c6b980003b8 | /CreateLisencelib/SodiumLicense/License/SdmLicense.h | 5675c715a3f865f63f56d049a7dc39c843ab27ab | [] | no_license | asky991/LicensePro | 8fdd3e381153aba3d9c09e5b18b3d4b1d756ecba | 2437ebd99e60407ee6c49188d96c7f225dedb05d | refs/heads/master | 2021-07-06T19:43:40.554242 | 2017-09-30T06:37:31 | 2017-09-30T06:37:31 | 104,193,212 | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 1,582 | h | SdmLicense.h | #ifndef __STDLICENSE_H__
#define __STDLICENSE_H__
#define PUBLICKEYPATH "./public.bin"
#define PRIVATEKEYPATH "./private.bin"
#define LICENSEDATPATH "./license.dat"
#include <vector>
class CSdmLicense
{
public:
CSdmLicense();
~CSdmLicense();
// 生成证书
int EncodeLicense(const char* pDate,const int nLen);
//解密证书
int DecodeLicense(std::string & strData);
// 生成公钥私钥
int GeneratePubPriKey();
string ConvertStringToHexData(string str);
string ConvertHexDataToString(string strHexData);
int EncodeLicense(const string strSKData,const string strSrcData,const string strWFileName ,string& strDestHexData);
int DecodeLicense(const string strPKdata,const string strDestData ,string &strSrcData);
int SaveHexDataToFile(const string strFileName,const string strData);
//Function
private:
// 初始化一组公钥私钥 nRes: 0: 成功 非0: 失败
int InitSdmLicenseKey(std::string & strpublicKey, std::string & strprivateKey);
bool isExistFile(const std::string& strFilePath);
// 保存数据到文件 DataType 0: 私钥 1:公钥 2:签名数据
bool SaveDataToFile(const std::string& strData,const int nDataType);
// 读取文件 DataType 0: 私钥 1:公钥 2:签名数据
bool LoadDataFromFile(std::string& strData,const int nDataType);
void SaveDataToFile(const std::string& fileName, const std::string& data);
void LoadDataFromFile(const std::string& fileName, std::string& data);
int HextoNum(char hex);
//Param
private:
std::string m_publicKey;
std::string m_privateKey;
std::string m_licenseDat;
};
#endif |
1c4168e38d129ca54bedee23207302787cb78786 | 294fb36d24c61a7754ecc42013027c725f5084e7 | /OpenCVTest/RenderScene.cpp | 5292bd04247e5c5c4023d9be741687af34a81c42 | [
"Apache-2.0"
] | permissive | chiltonotlihc/KinectViewport | 97d479c36de32c1dc9cab086453c45fe6f06fe35 | a04db0694577bd7d9969cb312a9bba9255fa1f41 | refs/heads/master | 2021-01-25T10:49:38.767199 | 2014-05-04T15:13:25 | 2014-05-04T15:13:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 6,810 | cpp | RenderScene.cpp | //
// RenderScene.cpp
// OpenGLScene
//
// Created by Oliver Chilton on 24/03/2014.
// Copyright (c) 2014 Oliver Chilton. All rights reserved.
//
#include "RenderScene.h"
RenderScene *RenderScene::instance = NULL;
RenderScene::RenderScene(){
windowTitle = "Window1";
WINDOW_WIDTH = 200;
WINDOW_HEIGHT = 200;
frameCount = 0;
previousTime = 0;
position = 0;
}
RenderScene::RenderScene(std::string title, int width, int height){
windowTitle = title;
WINDOW_WIDTH = width;
WINDOW_HEIGHT = height;
frameCount = 0;
previousTime = 0;
position = 0;
//setup vectors
eyeVector.push_back(0.0);
eyeVector.push_back(0.0);
eyeVector.push_back(-70.0);
centerVector.push_back(0.0);
centerVector.push_back(0.0);
centerVector.push_back(0.0);
upVector.push_back(0.0);
upVector.push_back(1.0);
upVector.push_back(0.0);
aspectRatio = width/height;
hands.setCaptureObject(&capture);
}
RenderScene::~RenderScene(){
}
void RenderScene::setEyePosition(float x, float y, float z){
eyeVector[0] = x;
eyeVector[1] = y;
eyeVector[2] = z;
}
void RenderScene::initialize(int argc, char**argv){
//set global RenderScene variable to this instance
setInstance();
//setup glut environment
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
glutInitWindowPosition(100, 100);
glutInitWindowSize(WINDOW_WIDTH, WINDOW_HEIGHT);
glutCreateWindow(windowTitle.c_str());
glutDisplayFunc(displayWrapper);
glClearColor(1.0, 0.0, 0.0, 1.0);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHT1);
glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glutIdleFunc(runWrapper);
glutPassiveMotionFunc(mouseCallback);
glutMainLoop();
}
void RenderScene::setInstance(){
instance = this;
}
/* Display function,
* Render Scene here....
*/
void RenderScene::displayScene(){
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
setMatricies();
drawSceneObjects();
renderLights();
glutSwapBuffers();
}
void RenderScene::drawSceneObjects(){
GLfloat whiteDiffuseMaterialTea[] = {0.8, 0.8, 0.8, 1.0};
GLfloat redSpecularMaterialTea[] = {1.0, 0.3, 0.3, 1.0};
GLfloat whiteDiffuseMaterialArena[] = {0.4, 0.4, 0.4, 1.0};
GLfloat whiteSpecularMaterialArena[] = {0.2, 0.2, 0.2, 1.0};
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, whiteDiffuseMaterialTea);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, redSpecularMaterialTea);
glutWireTeapot(10);
glPushMatrix();
glPushMatrix();
glTranslatef(-10, -40, 100);
glutSolidSphere(10, 20, 20);
glTranslatef(20, 20, -10);
glutSolidSphere(10, 20, 20);
glTranslatef(20, 40, -50);
glutSolidSphere(10, 20, 20);
glTranslatef(-50, 20, 30);
glutSolidSphere(10, 20, 20);
glPopMatrix();
glTranslatef(0, 0, 50);
glScalef(aspectRatio, 1.0, 4.0);
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, whiteDiffuseMaterialArena);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, whiteSpecularMaterialArena);
glutSolidCube(100);
glPopMatrix();
}
void RenderScene::runScene(){
capture.run();
eyeVector[0] = capture.getNormPositionX();
eyeVector[1] = capture.getNormPositionY();
eyeVector[2] = capture.getNormPositionZ();
//eyeVector[0] = mouseX-WINDOW_WIDTH/2;
//eyeVector[0] = 25;
//eyeVector[1] = -5;
//std::cout << "Eye-x: " << eyeVector[0] << std::endl;
//std::cout << "Eye-y: " << eyeVector[1] << std::endl;
//std::cout << "Eye-z: " << eyeVector[2] << std::endl;
hands.update();
capture.showRGB("InputRGB");
capture.showDepth("Depth");
//capture.showMask("Mask");
calculateFramerate();
//std::cout << "Framerate: " << fps << std::endl;
glutPostRedisplay();
}
void RenderScene::setMatricies(){
glViewport( 0, 0, WINDOW_WIDTH , WINDOW_HEIGHT );
//float fov = 2*atanf(WINDOW_HEIGHT/(2.0*eyeVector[2]));
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluPerspective( 60, aspectRatio, 1, 500.0 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
gluLookAt(eyeVector[0], eyeVector[1], eyeVector[2],
centerVector[0], centerVector[1], centerVector[2],
upVector[0], upVector[1], upVector[2]);
}
void RenderScene::renderLights(){
GLfloat light0_position[] = { 10.0, 10.0, -80.0, 0.0 };
GLfloat light1_position[] = { -8.0, -10.0, -60.0, 0.0 };
GLfloat white_light[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat lmodel_ambient[] = { 0.8, 0.8, 0.8, 1.0 };
GLfloat ambient_light0[] = { 0.8, 0.8, 0.85, 0.5 };
GLfloat ambient_light1[] = { 0.3, 1.0, 0.2, 0.5 };
glLightfv( GL_LIGHT0, GL_POSITION, light0_position );
glLightfv( GL_LIGHT1, GL_POSITION, light1_position );
glLightfv( GL_LIGHT0, GL_DIFFUSE, ambient_light0 );
glLightfv( GL_LIGHT1, GL_DIFFUSE, ambient_light1 );
glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 2.0);
glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 1.0);
glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0.5);
glLightf(GL_LIGHT1, GL_CONSTANT_ATTENUATION, 2.0);
glLightf(GL_LIGHT1, GL_LINEAR_ATTENUATION, 1.0);
glLightf(GL_LIGHT1, GL_QUADRATIC_ATTENUATION, 0.5);
//glLightfv( GL_LIGHT0, GL_DIFFUSE, white_light );
//glLightfv( GL_LIGHT0, GL_SPECULAR, white_light );
glLightModelfv( GL_LIGHT_MODEL_AMBIENT, lmodel_ambient );
}
void RenderScene::displayTestScene(){
renderLights();
setMatricies();
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON);
glVertex2i(100,100);
glVertex2i(100,300);
glVertex2i(400,300);
glVertex2i(600,150);
glVertex2i(400,100);
glEnd();
glFlush();
}
void RenderScene::calculateFramerate(){
frameCount++;
int currentTime = glutGet(GLUT_ELAPSED_TIME);
int timeInterval = currentTime - previousTime;
if(timeInterval > 1000){
fps = frameCount / (timeInterval / 1000.0f);
previousTime = currentTime;
frameCount = 0;
}
}
void RenderScene::mouseCallback(int x, int y){
instance->mouseX = x;
instance->mouseY = y;
}
// wrappers for callbacks
void RenderScene::displayWrapper(){
instance->displayScene();
//instance->displayTestScene();
}
void RenderScene::runWrapper(){
instance->runScene();
}
|
0c2d4104bb00c06629d9b1e39fed069b94f7b65a | 8a732195cbf21196c5c2888f101cb7b37dc4e51e | /cplusplus/367_Valid_Perfect_Square.cpp | f41288adc2f55130d6f69286cf2f8feca45a5358 | [] | no_license | arnabs542/LeetCode-31 | e00e46377ef63b7070d113f8c09c2e3ea1225548 | 0a95d510871b6507ba4352c063f712281791bdf9 | refs/heads/master | 2023-05-01T12:00:21.541998 | 2021-05-10T00:28:45 | 2021-05-10T00:28:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 396 | cpp | 367_Valid_Perfect_Square.cpp | class Solution {
public:
bool isPerfectSquare(int num) {
if (num<0) return false;
long low(0),high(num/2+1);
while (low<=high) {
long mid = low + (high-low)/2;
long product = mid * mid;
if (product == num) {
return true;
} else if (product > num) {
high = mid - 1;
} else {
low = mid + 1;
}
}
return false;
}
};
|
73f31b6286e3272d76fa8ec310eb967837442e8f | ada318d06bb13b96b6ba1f1b29dde132589f2fe6 | /kb_test.txt | 2fe47e9c686add9ed05171e9b94aa477127bd8c0 | [] | no_license | jzy-byte-cmd/keyboard-gazer-test- | 90f478cfa4d1de7b438e78f38275b3482353a400 | c4a5bcad5f92219533cd7affabbc65d385bde90c | refs/heads/master | 2022-12-28T21:24:59.278639 | 2020-10-06T14:41:19 | 2020-10-06T14:41:19 | null | 0 | 0 | null | null | null | null | GB18030 | C++ | false | false | 16,093 | txt | kb_test.txt | #include <iostream>
#include <conio.h>
#include <windows.h>
#include <fstream>
#include <tchar.h>
#include <ctime>
//#pragma comment( linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"" )
using namespace std;
//声明
int symbol[70] = { 0 };
int b = 0;
//变量声明
int Kwrite(char a)
{
ofstream outfile;
outfile.open("ifm.txt", ios::out | ios::app);
outfile << a;
outfile.close();
return 0;
}
//normal:
int key_w()
{
while (1)
{
if (GetKeyState(87) != -127 && GetKeyState(87) != symbol[0] && GetKeyState(87) != -128)
{
Kwrite('w');
symbol[0] = GetKeyState(87);
}
Sleep(2);
}
return 87;
}
int key_q()
{
while (1)
{
if (GetKeyState(81) != -127 && GetKeyState(81) != symbol[1] && GetKeyState(81) != -128)
{
Kwrite('q');
symbol[1] = GetKeyState(81);
}
Sleep(2);
}
return 81;
}
int key_e()
{
while (1)
{
if (GetKeyState(69) != -128 && GetKeyState(69) != symbol[2] && GetKeyState(69) != -127)
{
Kwrite('e');
symbol[2] = GetKeyState(69);
}
Sleep(2);
}
return 69;
}
int key_r()
{
while (1)
{
if (GetKeyState(82) != -127 && GetKeyState(82) != symbol[3] && GetKeyState(82) != -128)
{
Kwrite('r');
symbol[3] = GetKeyState(82);
}
Sleep(2);
}
return 82;
}
int key_t()
{
while (1)
{
if (GetKeyState(84) != -127 && GetKeyState(84) != symbol[4] && GetKeyState(84) != -128)
{
Kwrite('t');
symbol[4] = GetKeyState(84);
}
Sleep(2);
}
return 84;
}
int key_y()
{
while (1)
{
if (GetKeyState(89) != -127 && GetKeyState(89) != symbol[5] && GetKeyState(89) != -128)
{
Kwrite('y');
symbol[5] = GetKeyState(89);
}
Sleep(2);
}
return 89;
}
int key_u()
{
while (1)
{
if (GetKeyState(85) != -127 && GetKeyState(85) != symbol[6] && GetKeyState(85) != -128)
{
Kwrite('u');
symbol[6] = GetKeyState(85);
}
Sleep(2);
}
return 85;
}
int key_i()
{
while (1)
{
if (GetKeyState(73) != -127 && GetKeyState(73) != symbol[7] && GetKeyState(73) != -128)
{
Kwrite('i');
symbol[7] = GetKeyState(73);
}
Sleep(2);
}
return 73;
}
int key_o()
{
while (1)
{
if (GetKeyState(79) != -127 && GetKeyState(79) != symbol[8] && GetKeyState(79) != -128)
{
Kwrite('o');
symbol[8] = GetKeyState(79);
}
Sleep(2);
}
return 79;
}
int key_p()
{
while (1)
{
if (GetKeyState(80) != -127 && GetKeyState(80) != symbol[9] && GetKeyState(80) != -128)
{
Kwrite('p');
symbol[9] = GetKeyState(80);
}
Sleep(2);
}
return 80;
}
int key_a()
{
while (1)
{
if (GetKeyState(65) != -127 && GetKeyState(65) != symbol[10] && GetKeyState(65) != -128)
{
Kwrite('a');
symbol[10] = GetKeyState(65);
}
Sleep(2);
}
return 65;
}
int key_s()
{
while (1)
{
if (GetKeyState(83) != -127 && GetKeyState(83) != symbol[11] && GetKeyState(83) != -128)
{
Kwrite('s');
symbol[11] = GetKeyState(83);
}
Sleep(2);
}
return 83;
}
int key_d()
{
while (1)
{
if (GetKeyState(68) != -127 && GetKeyState(68) != symbol[12] && GetKeyState(68) != -128)
{
Kwrite('d');
symbol[12] = GetKeyState(68);
}
Sleep(2);
}
return 68;
}
int key_f()
{
while (1)
{
if (GetKeyState(70) != -127 && GetKeyState(70) != symbol[13] && GetKeyState(70) != -128)
{
Kwrite('f');
symbol[13] = GetKeyState(70);
}
Sleep(2);
}
return 70;
}
int key_g()
{
while (1)
{
if (GetKeyState(71) != -127 && GetKeyState(71) != symbol[14] && GetKeyState(71) != -128)
{
Kwrite('g');
symbol[14] = GetKeyState(71);
}
Sleep(2);
}
return 71;
}
int key_h()
{
while (1)
{
if (GetKeyState(72) != -127 && GetKeyState(72) != symbol[15] && GetKeyState(72) != -128)
{
Kwrite('h');
symbol[15] = GetKeyState(72);
}
Sleep(2);
}
return 72;
}
int key_j()
{
while (1)
{
if (GetKeyState(74) != -127 && GetKeyState(74) != symbol[16] && GetKeyState(74) != -128)
{
Kwrite('j');
symbol[16] = GetKeyState(74);
}
Sleep(2);
}
return 74;
}
int key_k()
{
while (1)
{
if (GetKeyState(75) != -127 && GetKeyState(75) != symbol[17] && GetKeyState(75) != -128)
{
Kwrite('k');
symbol[17] = GetKeyState(75);
}
Sleep(2);
}
return 75;
}
int key_l()
{
while (1)
{
if (GetKeyState(76) != -127 && GetKeyState(76) != symbol[18] && GetKeyState(76) != -128)
{
Kwrite('l');
symbol[18] = GetKeyState(76);
}
Sleep(2);
}
return 76;
}
int key_z()
{
while (1)
{
if (GetKeyState(90) != -127 && GetKeyState(90) != symbol[19] && GetKeyState(90) != -128)
{
Kwrite('z');
symbol[19] = GetKeyState(90);
}
Sleep(2);
}
return 81;
}
int key_x()
{
while (1)
{
if (GetKeyState(88) != -127 && GetKeyState(88) != symbol[20] && GetKeyState(88) != -128)
{
Kwrite('x');
symbol[20] = GetKeyState(88);
}
Sleep(2);
}
return 88;
}
int key_c()
{
while (1)
{
if (GetKeyState(67) != -127 && GetKeyState(67) != symbol[21] && GetKeyState(67) != -128)
{
Kwrite('c');
symbol[21] = GetKeyState(67);
}
Sleep(2);
}
return 67;
}
int key_v()
{
while (1)
{
if (GetKeyState(86) != -127 && GetKeyState(86) != symbol[22] && GetKeyState(86) != -128)
{
Kwrite('v');
symbol[22] = GetKeyState(86);
}
Sleep(2);
}
return 86;
}
int key_b()
{
while (1)
{
if (GetKeyState(66) != -127 && GetKeyState(66) != symbol[23] && GetKeyState(66) != -128)
{
Kwrite('b');
symbol[23] = GetKeyState(66);
}
Sleep(2);
}
return 66;
}
int key_n()
{
while (1)
{
if (GetKeyState(78) != -127 && GetKeyState(78) != symbol[24] && GetKeyState(78) != -128)
{
Kwrite('n');
symbol[24] = GetKeyState(78);
}
Sleep(2);
}
return 78;
}
int key_m()
{
while (1)
{
if (GetKeyState(77) != -127 && GetKeyState(77) != symbol[25] && GetKeyState(77) != -128)
{
Kwrite('m');
symbol[25] = GetKeyState(77);
}
Sleep(2);
}
return 77;
}
int key_1()
{
while (1)
{
if (GetKeyState(49) != -127 && GetKeyState(49) != symbol[26] && GetKeyState(49) != -128)
{
Kwrite('1');
symbol[26] = GetKeyState(49);
}
Sleep(2);
}
return 49;
}
int key_2()
{
while (1)
{
if (GetKeyState(50) != -127 && GetKeyState(50) != symbol[27] && GetKeyState(50) != -128)
{
Kwrite('2');
symbol[27] = GetKeyState(50);
}
Sleep(2);
}
return 50;
}
int key_3()
{
while (1)
{
if (GetKeyState(51) != -127 && GetKeyState(51) != symbol[28] && GetKeyState(51) != -128)
{
Kwrite('3');
symbol[28] = GetKeyState(51);
}
Sleep(2);
}
return 51;
}
int key_4()
{
while (1)
{
if (GetKeyState(52) != -127 && GetKeyState(52) != symbol[29] && GetKeyState(52) != -128)
{
Kwrite('4');
symbol[29] = GetKeyState(52);
}
Sleep(2);
}
return 52;
}
int key_5()
{
while (1)
{
if (GetKeyState(53) != -127 && GetKeyState(53) != symbol[30] && GetKeyState(53) != -128)
{
Kwrite('5');
symbol[30] = GetKeyState(53);
}
Sleep(2);
}
return 53;
}
int key_6()
{
while (1)
{
if (GetKeyState(54) != -127 && GetKeyState(54) != symbol[31] && GetKeyState(54) != -128)
{
Kwrite('6');
symbol[31] = GetKeyState(54);
}
Sleep(2);
}
return 54;
}
int key_7()
{
while (1)
{
if (GetKeyState(55) != -127 && GetKeyState(55) != symbol[32] && GetKeyState(55) != -128)
{
Kwrite('7');
symbol[32] = GetKeyState(55);
}
Sleep(2);
}
return 55;
}
int key_8()
{
while (1)
{
if (GetKeyState(56) != -127 && GetKeyState(56) != symbol[33] && GetKeyState(56) != -128)
{
Kwrite('8');
symbol[33] = GetKeyState(56);
}
Sleep(2);
}
return 56;
}
int key_9()
{
while (1)
{
if (GetKeyState(57) != -127 && GetKeyState(57) != symbol[34] && GetKeyState(57) != -128)
{
Kwrite('9');
symbol[34] = GetKeyState(57);
}
Sleep(2);
}
return 57;
}
int key_0()
{
while (1)
{
if (GetKeyState(48) != -127 && GetKeyState(48) != symbol[35] && GetKeyState(48) != -128)
{
Kwrite('0');
symbol[35] = GetKeyState(48);
}
Sleep(2);
}
return 58;
}//
//special:
int key_shift()
{
while (1)
{
if (GetKeyState(16) != 0 && GetKeyState(16) != symbol[36] && GetKeyState(16) != 1)
{
Kwrite('(');
Kwrite('s');
Kwrite(')');
symbol[36] = GetKeyState(16);
}
Sleep(2);
}
return 16;
}
int key_ENTER()
{
while (1)
{
if (GetKeyState(13) != -127 && GetKeyState(13) != symbol[37] && GetKeyState(13) != -128)
{
Kwrite('{');
Kwrite('E');
Kwrite('}');
symbol[37] = GetKeyState(13);
}
Sleep(2);
}
return 13;
}//
int key_L_lean()
{
while (1)
{
if (GetKeyState(191) != -127 && GetKeyState(191) != symbol[38] && GetKeyState(191) != -128)
{
Kwrite('/');
symbol[38] = GetKeyState(191);
}
Sleep(2);
}
return 191;
}
int key_R_lean()
{
while (1)
{
if (GetKeyState(220) != -127 && GetKeyState(220) != symbol[39] && GetKeyState(220) != -128)
{
Kwrite('|');
symbol[39] = GetKeyState(220);
}
Sleep(2);
}
return 220;
}
int key_semicolon()
{
while (1)
{
if (GetKeyState(186) != -127 && GetKeyState(186) != symbol[40] && GetKeyState(186) != -128)
{
Kwrite(':');
Kwrite(';');
symbol[40] = GetKeyState(186);
}
Sleep(2);
}
return 186;
}
int key_ctrl()
{
while (1)
{
if (GetKeyState(17) != 0 && GetKeyState(17) != symbol[41] && GetKeyState(17) != 1)
{
Kwrite('{');
Kwrite('C');
Kwrite('}');
symbol[41] = GetKeyState(17);
}
Sleep(2);
}
return 17;
}
int key_BackSpace()
{
while (1)
{
if (GetKeyState(8) != -127 && GetKeyState(8) != symbol[42] && GetKeyState(8) != -128)
{
Kwrite('{');
Kwrite('B');
Kwrite('}');
symbol[42] = GetKeyState(8);
}
Sleep(2);
}
return 8;
}
int key_Space()
{
while (1)
{
if (GetKeyState(32) != -127 && GetKeyState(32) != symbol[43] && GetKeyState(32) != -128)
{
Kwrite('{');
Kwrite('N');
Kwrite('}');
symbol[43] = GetKeyState(32);
}
Sleep(2);
}
return 32;
}
int key_Alt()
{
while (1)
{
if (GetKeyState(18) != 0 && GetKeyState(18) != symbol[44] && GetKeyState(18) != 1)
{
Kwrite('{');
Kwrite('A');
Kwrite('}');
symbol[44] = GetKeyState(18);
}
Sleep(2);
}
return 18;
}
int key_R_LArrow()
{
while (1)
{
if (GetKeyState(190) != -127 && GetKeyState(190) != symbol[45] && GetKeyState(190) != -128)
{
Kwrite('>');
Kwrite('.');
symbol[45] = GetKeyState(190);
}
Sleep(2);
}
return 190;
}
int key_L_LArrow()
{
while (1)
{
if (GetKeyState(188) != -127 && GetKeyState(188) != symbol[46] && GetKeyState(188) != -128)
{
Kwrite('<');
Kwrite(',');
symbol[46] = GetKeyState(188);
}
Sleep(2);
}
return 190;
}
int key_LArrow()
{
while (1)
{
if (GetKeyState(37) != -127 && GetKeyState(37) != symbol[47] && GetKeyState(37) != -128)
{
Kwrite('{');
Kwrite('L');
Kwrite('}');
symbol[47] = GetKeyState(37);
}
Sleep(2);
}
return 37;
}
int key_RArrow()
{
while (1)
{
if (GetKeyState(39) != -127 && GetKeyState(39) != symbol[48] && GetKeyState(39) != -128)
{
Kwrite('{');
Kwrite('R');
Kwrite('}');
symbol[48] = GetKeyState(39);
}
Sleep(2);
}
return 39;
}
int key_UArrow()
{
while (1)
{
if (GetKeyState(38) != -127 && GetKeyState(38) != symbol[49] && GetKeyState(38) != -128)
{
Kwrite('{');
Kwrite('U');
Kwrite('}');
symbol[49] = GetKeyState(38);
}
Sleep(2);
}
return 38;
}
int key_DArrow()
{
while (1)
{
if (GetKeyState(40) != -127 && GetKeyState(40) != symbol[50] && GetKeyState(40) != -128)
{
Kwrite('{');
Kwrite('D');
Kwrite('}');
symbol[50] = GetKeyState(40);
}
Sleep(2);
}
return 40;
}
//
int main()
{
HWND hWnd = GetForegroundWindow();
ShowWindow(hWnd, SW_HIDE);//隐藏窗口
HANDLE thread_w = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_w, NULL, 0, NULL);//开始线程检测
HANDLE thread_q = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_q, NULL, 0, NULL);
HANDLE thread_e = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_e, NULL, 0, NULL);
HANDLE thread_r = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_r, NULL, 0, NULL);
HANDLE thread_t = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_t, NULL, 0, NULL);
HANDLE thread_y = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_y, NULL, 0, NULL);
HANDLE thread_u = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_u, NULL, 0, NULL);
HANDLE thread_i = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_i, NULL, 0, NULL);
HANDLE thread_o = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_o, NULL, 0, NULL);
HANDLE thread_p = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_p, NULL, 0, NULL);
HANDLE thread_a = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_a, NULL, 0, NULL);
HANDLE thread_s = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_s, NULL, 0, NULL);
HANDLE thread_d = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_d, NULL, 0, NULL);
HANDLE thread_f = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_f, NULL, 0, NULL);
HANDLE thread_g = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_g, NULL, 0, NULL);
HANDLE thread_h = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_h, NULL, 0, NULL);
HANDLE thread_j = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_j, NULL, 0, NULL);
HANDLE thread_k = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_k, NULL, 0, NULL);
HANDLE thread_l = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_l, NULL, 0, NULL);
HANDLE thread_z = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_z, NULL, 0, NULL);
HANDLE thread_x = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_x, NULL, 0, NULL);
HANDLE thread_c = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_c, NULL, 0, NULL);
HANDLE thread_v = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_v, NULL, 0, NULL);
HANDLE thread_b = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_b, NULL, 0, NULL);
HANDLE thread_n = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_n, NULL, 0, NULL);
HANDLE thread_m = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_m, NULL, 0, NULL);
HANDLE thread_1 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_1, NULL, 0, NULL);
HANDLE thread_2 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_2, NULL, 0, NULL);
HANDLE thread_3 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_3, NULL, 0, NULL);
HANDLE thread_4 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_4, NULL, 0, NULL);
HANDLE thread_5 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_5, NULL, 0, NULL);
HANDLE thread_6 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_6, NULL, 0, NULL);
HANDLE thread_7 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_7, NULL, 0, NULL);
HANDLE thread_8 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_8, NULL, 0, NULL);
HANDLE thread_9 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_9, NULL, 0, NULL);
HANDLE thread_0 = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_0, NULL, 0, NULL);
HANDLE thread_shift = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_shift, NULL, 0, NULL);
HANDLE thread_ENTER = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_ENTER, NULL, 0, NULL);
HANDLE thread_L_lean = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_L_lean, NULL, 0, NULL);
HANDLE thread_R_lean = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_R_lean, NULL, 0, NULL);
HANDLE thread_semicolon = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_semicolon, NULL, 0, NULL);
HANDLE thread_ctrl = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_ctrl, NULL, 0, NULL);
HANDLE thread_BackSpace = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_BackSpace, NULL, 0, NULL);
HANDLE thread_Space = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_Space, NULL, 0, NULL);
HANDLE thread_R_LArrow = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_R_LArrow, NULL, 0, NULL);
HANDLE thread_L_LArrow = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_L_LArrow, NULL, 0, NULL);
HANDLE thread_LArrow = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_LArrow, NULL, 0, NULL);
HANDLE thread_RArrow = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_RArrow, NULL, 0, NULL);
HANDLE thread_UArrow = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_UArrow, NULL, 0, NULL);
HANDLE thread_DArrow = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_DArrow, NULL, 0, NULL);
HANDLE thread_Alt = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)key_Alt, NULL, 0, NULL);
cin >> b;
}
|
f4289b88bc0e989c76356d710360584ca9b4c98e | 83abc9a2234192dbf69b276710f4219c6bc40e28 | /Bow-Man_Engine3/Bow-Man_Engine3/Source/Material.h | 4d6e8d8f70932d4b7ca38a91de7813b86cf48c2f | [] | no_license | GyungBaeCho/Bow-Man_Engine3 | 34c6f536fc5df28dcc61cdb046d0592629ee6bf3 | 879ff4cafb74c0cf15d7ee5b6e414d93a60e30da | refs/heads/master | 2021-04-09T14:17:08.767384 | 2018-03-18T14:30:00 | 2018-03-18T14:30:00 | 125,732,905 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 899 | h | Material.h | #pragma once
#include "ResourceData.h"
//Dummy Class
//class CResource;
//--------------------------------------------------
class CMaterial : public CResource{
private:
XMFLOAT4 m_vDiffuseSpecExp;
public:
static ID3D11Buffer* m_pcbMaterialColors;
public:
CMaterial(float r, float g, float b, float specular){
m_vDiffuseSpecExp = XMFLOAT4(r, g, b, specular);
}
CMaterial(XMFLOAT4 vColor){
m_vDiffuseSpecExp = vColor;
}
virtual ~CMaterial(){}
static void CreateConstantBuffer(ID3D11Device *pDevice);
void Release() override {
if (m_pcbMaterialColors) m_pcbMaterialColors->Release();
}
void SetResourceToDevice(ID3D11DeviceContext *pDeviceContext);
void Render(ID3D11DeviceContext *pDeviceContext) override {}
const XMFLOAT4& GetMaterialColor() const {
return m_vDiffuseSpecExp;
}
};
__declspec(selectany) ID3D11Buffer* CMaterial::m_pcbMaterialColors = nullptr; |
f8d79b1da60fb427b9028eef0adbefc1bb5266a4 | 6fc13abb5678ca70b96af488c1c66a63f7aef7d3 | /clip.cpp | 7fa9ff6504feaedc1ea86940912f21f8582f2f87 | [] | no_license | thasmin/twinkle | 71e43e4674e7464c7971f09180618f736ff50be7 | 502658c91ac0a9f5dba99112aac9a38880c95bdf | refs/heads/master | 2021-01-20T11:55:46.340216 | 2017-08-26T02:18:26 | 2017-08-26T02:18:26 | 82,636,620 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 25,773 | cpp | clip.cpp | #include "clip.h"
#include <iomanip>
#include <numeric>
#include <sstream>
extern "C" {
#include "libavutil/opt.h"
}
#include "logger.h"
std::ostream& operator<<(std::ostream& out, const TransitionEffect value){
const char* s = 0;
#define SWITCH_VAL(p) case(p): s = #p; break;
switch(value){
SWITCH_VAL(TransitionEffect::None);
SWITCH_VAL(TransitionEffect::Fade);
}
#undef SWITCH_VAL
return out << s;
}
std::ostream& operator<<(std::ostream& out, const FilterEffect value){
const char* s = 0;
#define SWITCH_VAL(p) case(p): s = #p; break;
switch(value){
SWITCH_VAL(FilterEffect::None);
SWITCH_VAL(FilterEffect::FadeOut);
SWITCH_VAL(FilterEffect::FadeIn);
SWITCH_VAL(FilterEffect::Overlay);
SWITCH_VAL(FilterEffect::Scale);
SWITCH_VAL(FilterEffect::RGB);
SWITCH_VAL(FilterEffect::SoloTrack);
SWITCH_VAL(FilterEffect::OverlayTrack);
SWITCH_VAL(FilterEffect::AudioMix);
SWITCH_VAL(FilterEffect::AudioPrep);
}
#undef SWITCH_VAL
return out << s;
}
std::string get_buffer_str(const Decoder_Ctx* decoder, const std::string& output_name)
{
const AVCodecContext* video_ctx = decoder->get_video_context();
const AVStream* video_stream = decoder->get_video_stream();
std::stringstream ss;
ss << "buffer=";
ss << "video_size=" << video_ctx->width << "x" << video_ctx->height << ":";
ss << "pix_fmt=" << video_ctx->pix_fmt << ":";
ss << "time_base=" << video_stream->time_base.num << "/" << video_stream->time_base.den << ":";
ss << "pixel_aspect=" << video_stream->sample_aspect_ratio.num << "/" << video_stream->sample_aspect_ratio.den << " ";
ss << "[" << output_name << "];";
return ss.str();
}
std::string get_buffersink_str(const std::string& input_name)
{
std::stringstream ss;
ss << "[" << input_name << "] buffersink";
return ss.str();
}
std::string get_abuffer_str(const Decoder_Ctx* decoder, const std::string& output_name)
{
const AVCodecContext* audio_ctx = decoder->get_audio_context();
const AVStream* audio_stream = decoder->get_audio_stream();
std::stringstream ss;
ss << "abuffer=";
ss << "time_base=" << audio_stream->time_base.num << "/" << audio_stream->time_base.den << ":";
ss << "sample_rate=" << audio_ctx->sample_rate << ":";
ss << "sample_fmt=" << audio_ctx->sample_fmt << ":";
ss << "channel_layout=" << audio_ctx->channel_layout << " ";
ss << "[" << output_name << "];";
return ss.str();
}
std::string get_abuffersink_str(const std::string& input_name)
{
std::stringstream ss;
ss << "[" << input_name << "] abuffersink";
return ss.str();
}
Filter* Filter::FadeOut(const Decoder_Ctx* decoder, float duration)
{
std::string buffer_str = get_buffer_str(decoder, "in_1");
std::string sink_str = get_buffersink_str("result");
std::stringstream fade_str;
fade_str << "[in_1] fade=t=out:s=0:n=" << decoder->get_num_frames_in(duration) << " [result];";
std::string filter_str = buffer_str + fade_str.str() + sink_str;
return new Filter(FilterEffect::FadeOut, filter_str);
}
Filter* Filter::FadeIn(const Decoder_Ctx* decoder, float duration)
{
std::string buffer_str = get_buffer_str(decoder, "in_1");
std::string sink_str = get_buffersink_str("result");
std::stringstream fade_str;
fade_str << "[in_1] fade=t=in:s=0:n=" << decoder->get_num_frames_in(duration) << " [result];";
std::string filter_str = buffer_str + fade_str.str() + sink_str;
return new Filter(FilterEffect::FadeIn, filter_str);
}
Filter* Filter::Scale(const Decoder_Ctx* decoder, int out_width, int out_height)
{
std::string buffer_str = get_buffer_str(decoder, "in_1");
std::string sink_str = get_buffersink_str("result");
std::stringstream scale_str;
scale_str << buffer_str;
scale_str << "[in_1] scale=w=" << out_width << ":h=" << out_height << " [scaled];";
scale_str << sink_str;
return new Filter(FilterEffect::Scale, scale_str.str());
}
Filter* Filter::RGB(const Decoder_Ctx* decoder) {
std::string buffer_str = get_buffer_str(decoder, "in_1");
std::string sink_str = get_buffersink_str("result");
std::stringstream rgb_str;
rgb_str << "[in_1] format=pix_fmts=rgb24 [result];";
return new Filter(FilterEffect::RGB, rgb_str.str());
}
Filter* Filter::Overlay(const Decoder_Ctx* decoder1, const Decoder_Ctx* decoder2)
{
std::string buffer1_str = get_buffer_str(decoder1, "in_1");
std::string buffer2_str = get_buffer_str(decoder2, "in_2");
std::string sink_str = get_buffersink_str("result");
std::string box_str = "[in_1] drawbox=x=9:y=9:w=52:h=52:c=red:t=3 [boxed];";
std::string scale_str = "[in_2] scale=w=50:h=50 [overlay];";
std::string overlay_str = "[boxed] [overlay] overlay=x=10:y=10 [result];";
std::stringstream filter_str;
filter_str << buffer1_str << buffer2_str << box_str << scale_str << overlay_str << sink_str;
Logger::get("overlay") << filter_str.str() << "\n";
return new Filter(FilterEffect::Overlay, filter_str.str());
}
Filter* Filter::SoloTrack(const Decoder_Ctx* decoder, int out_width, int out_height)
{
std::string buffer_str = get_buffer_str(decoder, "in_1");
std::string sink_str = get_buffersink_str("result");
std::stringstream filter_str;
filter_str << buffer_str;
filter_str << "[in_1] scale=w=" << out_width << ":h=" << out_height << " [scaled];";
filter_str << "[scaled] format=pix_fmts=rgb24 [result];";
filter_str << sink_str;
return new Filter(FilterEffect::SoloTrack, filter_str.str());
}
Filter* Filter::OverlayTrack(const Decoder_Ctx* decoder1, const Decoder_Ctx* decoder2, int out_width, int out_height)
{
std::string buffer1_str = get_buffer_str(decoder1, "in_1");
std::string buffer2_str = get_buffer_str(decoder2, "in_2");
std::string sink_str = get_buffersink_str("result");
std::stringstream filter_str;
filter_str << buffer1_str;
filter_str << buffer2_str;
filter_str << "[in_1] scale=w=" << out_width << ":h=" << out_height << " [scaled];";
filter_str << "[scaled] drawbox=x=9:y=9:w=102:h=102:c=red:t=3 [boxed];";
filter_str << "[in_2] scale=w=100:h=100 [overlay];";
filter_str << "[boxed] [overlay] overlay=x=10:y=10 [overlayed];";
filter_str << "[overlayed] format=pix_fmts=rgb24 [result];";
filter_str << sink_str;
Logger::get("overlay") << "overlay video filter: " << filter_str.str() << "\n";
return new Filter(FilterEffect::OverlayTrack, filter_str.str());
}
Filter* Filter::AudioMix(const Decoder_Ctx* decoder1, const Decoder_Ctx* decoder2)
{
std::string buffer1_str = get_abuffer_str(decoder1, "in_1");
std::string buffer2_str = get_abuffer_str(decoder2, "in_2");
std::string sink_str = get_abuffersink_str("result");
std::stringstream filter_str;
filter_str << buffer1_str;
filter_str << buffer2_str;
filter_str << "[in_1] volume=0.8 [v1];";
filter_str << "[in_2] volume=2.5 [v2];";
filter_str << "[v1] [v2] amix [mixed];";
filter_str << "[mixed] aresample=osr=44100:ocl=stereo:osf=s16 [result];";
filter_str << sink_str;
Logger::get("overlay") << "audiomix filter: " << filter_str.str() << "\n";
return new Filter(FilterEffect::AudioMix, filter_str.str());
}
Filter* Filter::AudioPrep(const Decoder_Ctx* decoder)
{
std::string buffer1_str = get_abuffer_str(decoder, "in_1");
std::string sink_str = get_abuffersink_str("result");
std::stringstream filter_str;
filter_str << buffer1_str;
filter_str << "[in_1] aresample=osr=44100:ocl=stereo:osf=s16 [result];";
filter_str << sink_str;
Logger::get("overlay") << "audioprep filter: " << filter_str.str() << "\n";
return new Filter(FilterEffect::AudioPrep, filter_str.str());
}
Filter::Filter(FilterEffect effect, const std::string& filter_str)
{
this->effect = effect;
this->filter_str = filter_str;
this->output_frame = av_frame_alloc();
this->init(filter_str);
}
Filter::~Filter()
{
av_frame_unref(this->output_frame);
if (filter_graph != nullptr)
avfilter_graph_free(&this->filter_graph);
}
int Filter::init(const std::string& filter_str)
{
int ret;
AVFilterInOut *unused_ins = NULL;
AVFilterInOut *unused_outs = NULL;
this->graph = avfilter_graph_alloc();
if (this->graph == NULL) {
Logger::get("error") << "Cannot allocate filter graph.";
return AVERROR(ENOMEM);
}
ret = avfilter_graph_parse2(graph, filter_str.c_str(), &unused_ins, &unused_outs);
if (ret < 0) {
Logger::get("error") << "Cannot parse graph:" << av_err2str(ret) << "\n";
return ret;
}
ret = avfilter_graph_config(graph, NULL);
if (ret < 0) {
Logger::get("error") << "Cannot configure graph:" << av_err2str(ret) << "\n";
return ret;
}
if (unused_ins != nullptr || unused_outs != nullptr) {
Logger::get("error") << "Incomplete filter chain\n";
return -1;
}
// find buffers and buffersinks
for (int i = 0; i < this->graph->nb_filters; ++i) {
AVFilterContext* f_ctx = graph->filters[i];
std::string filter_name = f_ctx->filter->name;
if (filter_name == "buffer" || filter_name == "abuffer") {
if (this->buffersrc_ctx == nullptr)
this->buffersrc_ctx = f_ctx;
else
this->buffersrc2_ctx = f_ctx;
} else if (filter_name == "buffersink" || filter_name == "abuffersink")
this->buffersink_ctx = f_ctx;
}
return 0;
}
bool Filter::is_finished()
{
return this->frame_duration == this->frames_fed;
}
AVFrame* Filter::get_output_frame()
{
return this->output_frame;
}
int Filter::feed(AVFrame* in_frame)
{
int ret;
// if the input frame hasn't changed, don't change the output frame
if (in_frame->pts == this->last_pts1_fed)
return 0;
this->last_pts1_fed = in_frame->pts;
frames_fed += 1;
ret = av_buffersrc_add_frame_flags(this->buffersrc_ctx, in_frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0;
if (ret < 0) {
Logger::get("filter") << "Error while feeding the filtergraph: " << av_err2str(ret) << "\n";
return ret;
}
while (true) {
ret = av_buffersink_get_frame(this->buffersink_ctx, this->output_frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
break;
if (ret < 0) {
Logger::get("error") << "Error while retrieving from the filter graph: " << av_err2str(ret) << "\n";
return ret;
}
}
return 0;
}
int Filter::feed(AVFrame* in, AVFrame* in2)
{
int ret;
// if the input frame hasn't changed, don't change the output frame
if (in->pts == this->last_pts1_fed && in2->pts == this->last_pts2_fed)
return 0;
frames_fed += 1;
if (this->last_pts1_fed != in->pts) {
ret = av_buffersrc_write_frame(this->buffersrc_ctx, in) < 0;
if (ret < 0) {
Logger::get("error") << "Error while adding frame 1 to the filtergraph: " << av_err2str(ret) << "\n";
return ret;
}
this->last_pts1_fed = in->pts;
}
if (this->buffersrc2_ctx != nullptr && this->last_pts2_fed != in2->pts) {
ret = av_buffersrc_write_frame(this->buffersrc2_ctx, in2) < 0;
if (ret < 0) {
Logger::get("error") << "Error while adding frame 2 to the filtergraph: " << av_err2str(ret) << "\n";
return ret;
}
this->last_pts2_fed = in2->pts;
}
while (true) {
ret = av_buffersink_get_frame(this->buffersink_ctx, this->output_frame);
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
break;
if (ret < 0) {
Logger::get("error") << "Error while retrieving from the filter graph: " << av_err2str(ret) << "\n";
return ret;
}
}
return 0;
}
/********
* Clip *
********/
Clip::Clip(const FilePiece& file_piece)
{
this->filename = file_piece.filename;
this->video_start_secs = file_piece.video_start_secs;
this->file_start_secs = file_piece.file_start_secs;
this->duration_secs = file_piece.duration_secs;
this->effect = FilterEffect::None;
}
Clip::Clip(const FilePiece& file_piece, enum FilterEffect effect)
{
this->filename = file_piece.filename;
this->video_start_secs = file_piece.video_start_secs;
this->file_start_secs = file_piece.file_start_secs;
this->duration_secs = file_piece.duration_secs;
this->effect = effect;
}
Clip::~Clip()
{
}
/*************
* FilePiece *
*************/
FilePiece::FilePiece(std::string filename, float video_start_secs)
{
this->filename = filename;
this->video_start_secs = video_start_secs;
this->file_start_secs = 0;
this->duration_secs = Decoder_Ctx::get_duration_secs(filename);
}
FilePiece::FilePiece(std::string filename, float video_start_secs, float file_start_secs, float duration_secs)
{
this->filename = filename;
this->video_start_secs = video_start_secs;
this->file_start_secs = file_start_secs;
this->duration_secs = duration_secs;
}
FilePiece::FilePiece(const FilePiece& fp)
{
this->filename = fp.filename;
this->video_start_secs = fp.video_start_secs;
this->file_start_secs = fp.file_start_secs;
this->duration_secs = fp.duration_secs;
}
FilePiece FilePiece::with_duration(float duration_secs)
{
return FilePiece(this->filename, this->video_start_secs, this->file_start_secs, duration_secs);
}
/********
* Track *
********/
TrackPiece::TrackPiece(FilePiece file_piece, TransitionEffect effect)
: file(file_piece)
{
this->transition = effect;
}
Track::Track(Video* video)
{
this->video = video;
this->decoder = std::make_unique<Decoder_Ctx>();
}
Track::Track(Video* video, const std::string& filename)
{
this->video = video;
add(FilePiece(filename, 0), TransitionEffect::None);
}
Track::Track(Video* video, FilePiece file_piece)
{
this->video = video;
add(file_piece, TransitionEffect::None);
}
Track::Track(Video* video, FilePiece file_piece, TransitionEffect effect)
{
this->video = video;
add(file_piece, effect);
}
struct FilePiece_Compare
{
bool operator()( const FilePiece& lhs, const FilePiece& rhs ) const {
return lhs.video_start_secs > rhs.video_start_secs;
}
};
void Track::add(FilePiece file_piece, TransitionEffect effect)
{
this->pieces.push_back(TrackPiece(file_piece, effect));
this->pieces.sort([](const TrackPiece& tp1, const TrackPiece& tp2) {
return tp1.file.video_start_secs > tp2.file.video_start_secs;
});
recalc_clips();
}
const std::list<Clip>& Track::get_clips()
{
return clips;
}
float Track::get_duration_secs() const
{
return std::accumulate(this->pieces.begin(), this->pieces.end(), 0,
[](int duration_secs_so_far, const TrackPiece& piece) {
return duration_secs_so_far + piece.file.duration_secs;
}
);
}
Clip* Track::get_next_frame_clip()
{
return find_clip_at(this->last_shown_frame_secs);
}
Clip* Track::get_next_clip()
{
return find_next_clip_after(this->last_shown_frame_secs);
}
float Track::get_last_video_frame_secs()
{
return last_shown_frame_secs;
}
void Track::split(float secs, TransitionEffect effect)
{
/* scenario
video_start_secs=1s - starts 1s into video
file_start_secs=9s starts 9s into file
duration_secs=5s lasts for 5s
video: 1s-6s
file: 9s-14s
split at 3s
1st filepiece: video=1s-3s, file 9s-11s - f/v start=unchanged, duration=secs-video_start(2)
2nd filepiece: video=3s-6s, file 11s-14s - vstart=secs(3), fstart=fstart+secs-vstart(11), duration=duration+vstart-secs(3)
*/
// find file piece to split
auto piece = std::find_if(this->pieces.begin(), this->pieces.end(),
[secs](const TrackPiece& piece) { return piece.file.video_start_secs <= secs && secs < piece.file.video_start_secs + piece.file.duration_secs; });
float new_piece_duration_secs = piece->file.duration_secs + piece->file.video_start_secs - secs;
float new_piece_file_start_secs = piece->file.file_start_secs + secs - piece->file.video_start_secs;
// lower current file piece duration
piece->file.duration_secs = secs - piece->file.video_start_secs;
// insert new track piece
this->pieces.insert(std::next(piece, 1), TrackPiece(FilePiece(piece->file.filename, secs, new_piece_file_start_secs, new_piece_duration_secs), effect));
recalc_clips();
}
void Track::recalc_clips()
{
this->clips.clear();
const float transition_duration_secs = 0.5f;
for (auto track_piece = pieces.begin(); track_piece != pieces.end(); ++track_piece) {
if (track_piece->file.duration_secs < transition_duration_secs) {
clips.push_back(Clip(track_piece->file));
continue;
}
bool has_incoming_effect = (track_piece->transition != TransitionEffect::None);
auto next_track_piece = std::next(track_piece, 1);
bool has_outgoing_effect = (next_track_piece != pieces.end() && next_track_piece->transition != TransitionEffect::None);
if (has_incoming_effect)
clips.push_back(Clip(track_piece->file.with_duration(transition_duration_secs), FilterEffect::FadeIn));
float main_clip_file_start = track_piece->file.file_start_secs + (has_incoming_effect ? transition_duration_secs : 0);
float main_clip_video_start = track_piece->file.video_start_secs + (has_incoming_effect ? transition_duration_secs : 0);
float main_clip_duration = track_piece->file.duration_secs - (has_incoming_effect ? transition_duration_secs : 0) - (has_outgoing_effect ? transition_duration_secs : 0);
if (main_clip_duration > 0)
clips.push_back(Clip(FilePiece(track_piece->file.filename, main_clip_video_start, main_clip_file_start, main_clip_duration)));
if (has_outgoing_effect) {
float outgoing_clip_file_start = track_piece->file.file_start_secs + track_piece->file.duration_secs - transition_duration_secs;
float outgoing_clip_video_start = track_piece->file.video_start_secs + track_piece->file.duration_secs - transition_duration_secs;
clips.push_back(Clip(FilePiece(track_piece->file.filename, outgoing_clip_video_start, outgoing_clip_file_start, transition_duration_secs), FilterEffect::FadeOut));
}
}
Logger::get("clip_recalc") << "track " << this << "\n";
int p = 0;
for (auto piece = pieces.begin(); piece != pieces.end(); ++piece) {
Logger::get("clip_recalc") << " piece " << p++ << "\n";
Logger::get("clip_recalc") << " file piece at " << std::setprecision(3) << piece->file.video_start_secs << "s: " << piece->file.filename << " from " << piece->file.file_start_secs << " for " << piece->file.duration_secs << "\n";
Logger::get("clip_recalc") << " transition " << piece->transition << "\n";
}
int c = 0;
for (auto clip = clips.begin(); clip != clips.end(); ++clip)
Logger::get("clip_recalc") << "clip " << c++ << " at " << clip->video_start_secs << " on " << clip->filename << " from " << clip->file_start_secs << " for " << clip->duration_secs << " with effect " << clip->effect << "\n";
// make sure current decoders is on proper file at correct place
Clip* cur_clip = this->get_next_frame_clip();
if (cur_clip != nullptr) {
float decoder_seek = this->last_shown_frame_secs - cur_clip->video_start_secs + cur_clip->file_start_secs;
Track::ensure_decoder_at(decoder.get(), cur_clip->filename, decoder_seek);
}
Logger::get("clip_recalc") << "---\n";
}
Clip* Track::find_clip_at(float secs)
{
auto clip = std::find_if(this->clips.begin(), this->clips.end(),
[secs](const Clip& clip) { return clip.video_start_secs <= secs && secs < clip.video_start_secs + clip.duration_secs; });
if (clip == clips.end())
return nullptr;
return &*clip;
}
Clip* Track::find_next_clip_after(float secs)
{
auto clip = std::find_if(this->clips.begin(), this->clips.end(), [secs](const Clip& clip) { return clip.video_start_secs > secs; });
if (clip == clips.end())
return nullptr;
return &*clip;
}
bool Track::seek(float secs)
{
if (this->last_shown_frame_secs == secs)
return false;
// ensure decoders have the proper files
Clip* cur_clip = this->find_clip_at(secs);
float decoder_seek = secs - cur_clip->video_start_secs + cur_clip->file_start_secs;
this->last_shown_frame_secs = secs;
delete current_filter;
current_filter = nullptr;
return Track::ensure_decoder_at(decoder.get(), cur_clip->filename, decoder_seek);
}
bool Track::ensure_decoder_at(Decoder_Ctx* decoder, const std::string& filename, float seek_secs)
{
if (decoder->filename != filename)
decoder->open_file(filename, seek_secs);
else if (decoder->get_last_video_frame_secs() != seek_secs)
decoder->seek(seek_secs);
else
return false;
std::this_thread::sleep_for(std::chrono::milliseconds(200));
return true;
}
const Decoder_Ctx* Track::get_decoder() const
{
return this->decoder.get();
}
const AVCodecContext* Track::get_audio_context() const
{
return this->decoder->get_audio_context();
}
AVFrame* Track::get_next_audio_frame() {
return decoder->get_audio_frame();
}
AVFrame* Track::get_video_frame(float secs)
{
Clip* clip = find_clip_at(secs);
if (clip == nullptr)
return nullptr;
// see whether we need to set up the filter
// TODO: see if this was sequential
Clip* last_clip = find_clip_at(this->last_shown_frame_secs);
// get a new filter if the clip changed and we don't have a filter, it's the wrong effect, or it's finished its frames
Filter* filter = this->current_filter;
if (clip != last_clip && (filter == nullptr || filter->effect != clip->effect || filter->is_finished())) {
Logger::get("filter") << "last frame " << this->last_shown_frame_secs << ", this frame " << secs << ", switching filter to " << clip->effect << "\n";
delete this->current_filter;
// setup the filter
switch (clip->effect) {
case FilterEffect::FadeOut:
Logger::get("filter") << "creating a fadeout filter with duration " << clip->duration_secs << "s\n";
this->current_filter = Filter::FadeOut(decoder.get(), clip->duration_secs);
break;
case FilterEffect::FadeIn:
Logger::get("filter") << "creating a fadein filter with duration " << clip->duration_secs << "s\n";
this->current_filter = Filter::FadeIn(decoder.get(), clip->duration_secs);
break;
case FilterEffect::None:
default:
this->current_filter = nullptr;
break;
}
}
AVFrame* decoded_frame = decoder->get_video_frame_at(secs - clip->video_start_secs + clip->file_start_secs);
if (decoded_frame == nullptr) {
Logger::get("get_video_frame") << "didn't get frame from decoder\n";
return nullptr;
} else if (decoded_frame->width == 0) {
Logger::get("get_video_frame") << "got a frame with 0 width\n";
return nullptr;
}
AVFrame* filtered_frame = decoded_frame;
if (this->current_filter != nullptr) {
int ret = this->current_filter->feed(decoded_frame);
if (ret != 0) {
Logger::get("error") << "error feeding the clip filter: " << av_err2str(ret) << "\n";
return nullptr;
}
filtered_frame = this->current_filter->get_output_frame();
}
this->last_shown_frame_secs = clip->video_start_secs + decoder->get_last_video_frame_secs() - clip->file_start_secs;
return filtered_frame;
}
/********
* Video *
********/
Video::Video() : main_track(this), overlay_track(this)
{
}
Video::~Video()
{
if (this->out_video_frame != nullptr)
av_frame_unref(this->out_video_frame);
if (this->out_audio_frame != nullptr)
av_frame_unref(this->out_audio_frame);
}
void Video::addToMainTrack(const std::string& filename, TransitionEffect effect)
{
main_track.add(FilePiece(filename, this->main_track.get_duration_secs()), effect);
}
void Video::addToOverlayTrack(const std::string& filename, TransitionEffect effect)
{
overlay_track.add(FilePiece(filename, this->overlay_track.get_duration_secs()), effect);
}
// returns whether the frame will change
bool Video::seek(float secs)
{
return this->main_track.seek(secs);
}
float Video::get_duration_secs()
{
return std::max(this->main_track.get_duration_secs(), this->overlay_track.get_duration_secs());
}
float Video::get_last_video_frame_secs()
{
return this->main_track.last_shown_frame_secs;
}
int Video::get_video_frame(float secs, int out_width, int out_height)
{
AVFrame* main_frame = this->main_track.get_video_frame(secs);
if (main_frame == nullptr) {
// TODO: add status to decoder so we know whether it's got an error or operating normally
Logger::get("error") << "xx error getting a video frame from the main track\n";
return AVERROR(EAGAIN);
}
// put overlay track on top
AVFrame* overlay_frame = this->overlay_track.get_video_frame(secs);
if (overlay_frame != nullptr) {
if (this->overlay_track_filter == nullptr)
this->overlay_track_filter = Filter::OverlayTrack(main_track.get_decoder(), this->overlay_track.get_decoder(), out_width, out_height);
int ret = this->overlay_track_filter->feed(main_frame, overlay_frame);
if (ret != 0) {
Logger::get("error") << "error feeding the overlay filter: " << av_err2str(ret) << "\n";
return ret;
}
this->out_video_frame = this->overlay_track_filter->get_output_frame();
} else {
if (this->solo_track_filter == nullptr)
this->solo_track_filter = Filter::SoloTrack(main_track.get_decoder(), out_width, out_height);
int ret = this->solo_track_filter->feed(main_frame);
if (ret != 0) {
Logger::get("error") << "error feeding the overlay filter: " << av_err2str(ret) << "\n";
return ret;
}
this->out_video_frame = this->solo_track_filter->get_output_frame();
}
return 0;
}
int Video::get_next_audio_frame()
{
AVFrame* main_frame = this->main_track.get_next_audio_frame();
if (main_frame == nullptr) {
// TODO: add status to decoder so we know whether it's got an error or operating normally
Logger::get("error") << "xx error getting an audio frame from the main track\n";
return AVERROR(EAGAIN);
}
// put overlay track on top
AVFrame* overlay_frame = this->overlay_track.get_next_audio_frame();
if (overlay_frame == nullptr) {
if (this->audioprep_filter == nullptr)
this->audioprep_filter = Filter::AudioPrep(main_track.get_decoder());
int ret = this->audioprep_filter->feed(main_frame);
if (ret != 0) {
Logger::get("error") << "error feeding the overlay filter: " << av_err2str(ret) << "\n";
return ret;
}
this->out_audio_frame = this->audioprep_filter->get_output_frame();
return 0;
}
if (this->audiomix_filter == nullptr)
this->audiomix_filter = Filter::AudioMix(main_track.get_decoder(), this->overlay_track.get_decoder());
int ret = this->audiomix_filter->feed(main_frame, overlay_frame);
if (ret != 0) {
Logger::get("error") << "error feeding the overlay filter: " << av_err2str(ret) << "\n";
return ret;
}
this->out_audio_frame = this->audiomix_filter->get_output_frame();
return 0;
}
|
4fc7acd62742197896107fbf0b2f686b00f45b68 | 15ae3c07d969f1e75bc2af9555cf3e952be9bfff | /analysis/pragma_before/pragma_220.hpp | 553b89019ced1c6401196631c1837a6ec95173ae | [] | no_license | marroko/generators | d2d1855d9183cbc32f9cd67bdae8232aba2d1131 | 9e80511155444f42f11f25063c0176cb3b6f0a66 | refs/heads/master | 2023-02-01T16:55:03.955738 | 2020-12-12T14:11:17 | 2020-12-12T14:11:17 | 316,802,086 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 74 | hpp | pragma_220.hpp | #ifndef JMRFYZHWWXG_HPP
#define JMRFYZHWWXG_HPP
#endif // JMRFYZHWWXG_HPP |
b4190a027c9e297678f6ffd8ef30b9071648d1d8 | 891cf45a426de2fe8fb1fb3e93d2159b8298d881 | /src/vw/Mosaic/UniviewQuadTreeConfig.h | 2626f1b922f1f8969ad4dd0ee43b75f33c13f39b | [
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | visionworkbench/visionworkbench | bf4bfeac0af1691844fc9fd496b4ffa153a1db9d | e7b350370ca424c745d223cbeaa9072fd42fca79 | refs/heads/master | 2023-08-30T06:32:10.746834 | 2023-08-22T21:46:05 | 2023-08-22T21:46:05 | 665,764 | 362 | 146 | NOASSERTION | 2019-11-14T16:35:49 | 2010-05-14T02:48:33 | C++ | UTF-8 | C++ | false | false | 2,130 | h | UniviewQuadTreeConfig.h | // __BEGIN_LICENSE__
// Copyright (c) 2006-2013, United States Government as represented by the
// Administrator of the National Aeronautics and Space Administration. All
// rights reserved.
//
// The NASA Vision Workbench is 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.
// __END_LICENSE__
/// \file UniviewQuadTreeConfig.h
///
/// A configuration class that provides callbacks for
/// QuadTreeGenerator that generate Uniview overlays.
///
#ifndef __VW_MOSAIC_UNIVIEWQUADTREECONFIG_H__
#define __VW_MOSAIC_UNIVIEWQUADTREECONFIG_H__
#include <vw/Mosaic/QuadTreeGenerator.h>
#include <vw/Mosaic/QuadTreeConfig.h>
namespace vw {
namespace mosaic {
class UniviewQuadTreeConfig : public QuadTreeConfig {
public:
UniviewQuadTreeConfig( bool terrain = false ) : m_terrain( terrain ) {}
virtual ~UniviewQuadTreeConfig() {}
void set_terrain( bool terrain ) { m_terrain = terrain; }
void configure( QuadTreeGenerator &qtree ) const;
cartography::GeoReference output_georef(uint32 xresolution, uint32 yresolution = 0);
static std::string image_path( QuadTreeGenerator const& qtree, std::string const& name );
static boost::shared_ptr<DstImageResource> terrain_tile_resource( QuadTreeGenerator const& qtree, QuadTreeGenerator::TileInfo const& info, ImageFormat const& format );
void metadata_func( QuadTreeGenerator const& qtree, QuadTreeGenerator::TileInfo const& info ) const;
void set_module(const std::string& module);
private:
bool m_terrain;
std::string m_module_name;
};
} // namespace mosaic
} // namespace vw
#endif // __VW_MOSAIC_UNIVIEWQUADTREECONFIG_H__
|
3f54033fb9ece08450cefd85ec6868f47ef8c077 | 9bdb93b3a3125c1b4d6480972459cb61b5ee2b0b | /src/libraries/Utils/TextureToViewportRenderer.h | c9222cde949ce039b654a9541928ea0212abf308 | [] | no_license | BatsiMcLovin/EZR-Project | 74d8275c07bb525e2e4c84c6c4613e14a718a1e1 | e9ff7b41102c1f5802e7ae6a593109ed5d66606c | refs/heads/master | 2020-03-07T23:53:07.702602 | 2018-04-01T18:46:43 | 2018-04-01T18:46:43 | 127,792,379 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 722 | h | TextureToViewportRenderer.h | //
// Created by rheidrich on 14.06.17.
//
#ifndef EZR_PROJECT_TEXTURETOVIEWPORTRENDERER_H
#define EZR_PROJECT_TEXTURETOVIEWPORTRENDERER_H
#include <Renderables/Quad.h>
#include <Shaders/SimpleShader.h>
#include <FBO/TextureArray.h>
namespace ezr
{
class TextureToViewportRenderer
{
public:
TextureToViewportRenderer();
~TextureToViewportRenderer();
void renderTexture(ezr::TextureArray texture, int layer = 0);
void renderTexture(ezr::Texture texture);
void renderTexture(ezr::Texture* texture);
private:
ezr::Quad _quad;
ezr::SimpleShader _quadShader2D;
ezr::SimpleShader _quadShader2DArray;
};
}
#endif //EZR_PROJECT_TEXTURETOVIEWPORTRENDERER_H
|
9e35c52b9d65c133fe6782c8efc37963d885e61a | f7f379a617a99904b919df4591756e6c282a75b4 | /q72_alt.cpp | ea4b6f40c092b5ac1bf791374f56f4f97321c522 | [] | no_license | kk77777/LeetCode-Solutions | f9bcbba1a29e33f0d495fc1fc66550f217037ce0 | aaae843bd52485cf7218fbfe1d58ae5e860662b8 | refs/heads/master | 2022-02-05T14:40:48.085094 | 2022-01-26T05:07:09 | 2022-01-26T05:07:09 | 251,509,553 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 961 | cpp | q72_alt.cpp | class Solution
{
int solve(string &s1, string &s2, int n, int m, vector<vector<int>> &dp)
{
for (int i = 0; i <= n; i++)
{
for (int j = 0; j <= m; j++)
{
if (i == 0)
dp[i][j] = j;
else if (j == 0)
dp[i][j] = i;
else if (s1[i - 1] == s2[j - 1])
dp[i][j] = dp[i - 1][j - 1];
else
{
dp[i][j] = 1 + min(dp[i][j - 1], min(dp[i - 1][j], dp[i - 1][j - 1]));
}
}
}
return dp[n][m];
}
public:
int minDistance(string word1, string word2)
{
int n = word1.length();
int m = word2.length();
if (n == 0)
return m;
if (m == 0)
return n;
vector<vector<int>> dp(n + 1, vector<int>(m + 1, -1));
return solve(word1, word2, n, m, dp);
}
}; |
cc7aa3c4434543be8ff13f524945392b747890f5 | e17143acf0204d8a8b8e6e8f61893b9fc18e9d34 | /include/ImageFile.h | a781cc14eee0f4ad0d0d2f942330fc8023b42ce2 | [
"Zlib"
] | permissive | nullpointer2017/mod_uploader | 2b8654c847bfa87c7664828deb1c6bde02a9eecc | 31632a29138b18b7adbf533416a0ec660f1b07ac | refs/heads/master | 2022-07-26T15:25:00.829263 | 2022-06-27T00:42:39 | 2022-06-27T00:42:39 | 110,597,596 | 0 | 0 | null | 2017-11-13T20:21:31 | 2017-11-13T20:21:31 | null | UTF-8 | C++ | false | false | 2,317 | h | ImageFile.h | /******************************************************************************
* Copyright (C) 2007 Tetsuya Kimata <kimata@acapulco.dyndns.org>
*
* 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.
*
* $Id: ImageFile.h 2756 2007-12-11 10:57:59Z svn $
*****************************************************************************/
#ifndef IMAGE_FILE_H
#define IMAGE_FILE_H
#include "Environment.h"
#include <cstdlib>
#include "File.h"
namespace Magick {
class Image;
}
#ifdef MAKE_THUMBNAIL
/**
* @brief 画像ファイルを表すクラス.
*/
class ImageFile: File
{
public:
/**
* コンストラクタです.
*
* @param[in] pool プール
* @param[in] file_path ファイルのパス
*/
ImageFile(apr_pool_t *pool, const char *file_path="");
~ImageFile();
/**
* サムネイル画像を作成します.
*
* @param[in] file_path サムネイル画像のパス
* @param[in] width サムネイル画像の横サイズ
* @param[in] height サムネイル画像の縦サイズ
*/
void create_thumbnail(const char *file_path,
apr_size_t width, apr_size_t height) const;
apr_uint16_t get_width() const;
apr_uint16_t get_height() const;
private:
Magick::Image *image_;
};
#endif
#endif
// Local Variables:
// mode: c++
// coding: utf-8-dos
// End:
|
1a3e8f7086d7e2cf1351033b498a939ff1438c5f | e90437391895d0d798278571826a93ce415506c8 | /include/grpc/event_engine/endpoint_config.h | ea1e172f7865be3cf99c8d20019b625b422710bf | [
"Apache-2.0"
] | permissive | donnadionne/grpc | ecca6a14a2bb0a24eb760bf8df478c4551c93c16 | 001c497c230fa94e8baec78fa0c83839c0e79103 | refs/heads/master | 2022-06-24T03:13:34.565857 | 2021-09-07T21:16:02 | 2021-09-07T21:16:02 | 31,379,498 | 2 | 0 | Apache-2.0 | 2022-05-13T08:04:02 | 2015-02-26T17:33:37 | C++ | UTF-8 | C++ | false | false | 1,965 | h | endpoint_config.h | // Copyright 2021 The gRPC Authors
//
// 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 GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H
#define GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H
#include <grpc/support/port_platform.h>
#include <string>
#include "absl/strings/string_view.h"
#include "absl/types/variant.h"
namespace grpc_event_engine {
namespace experimental {
/// A set of parameters used to configure an endpoint, either when initiating a
/// new connection on the client side or when listening for incoming connections
/// on the server side. An EndpointConfig contains a set of zero or more
/// Settings. Each setting has a unique name, which can be used to fetch that
/// Setting via the Get() method. Each Setting has a value, which can be an
/// integer, string, or void pointer. Each EE impl should define the set of
/// Settings that it supports being passed into it, along with the corresponding
/// type.
class EndpointConfig {
public:
virtual ~EndpointConfig() = default;
using Setting = absl::variant<absl::monostate, int, absl::string_view, void*>;
/// Returns an EndpointConfig Setting. If there is no Setting associated with
/// \a key in the EndpointConfig, an \a absl::monostate type will be
/// returned. Caller does not take ownership of resulting value.
virtual Setting Get(absl::string_view key) const = 0;
};
} // namespace experimental
} // namespace grpc_event_engine
#endif // GRPC_EVENT_ENGINE_ENDPOINT_CONFIG_H
|
18593bde2af07a08a8f920f3bc3a516d52466d83 | eccf6398310a3f7d67ef18374d80733cc9077742 | /AuctionClient/ClientSocket.cpp | 96663a9a861e500d79013a1cd4589ab1df0b08a6 | [] | no_license | richardsongqc/AuctionSystem | 7d4ea444ff45980914b66438dedf2caebc5ad36d | 59402cd9fde29d7c7023058c700b8bb5d1fb0e5b | refs/heads/master | 2021-01-10T05:10:28.247881 | 2015-12-07T05:52:31 | 2015-12-07T05:52:31 | 46,315,085 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 477 | cpp | ClientSocket.cpp | // ClientSocket.cpp : implementation file
//
#include "stdafx.h"
#include "AuctionClient.h"
#include "ClientSocket.h"
#include "AuctionClientDoc.h"
// CClientSocket
IMPLEMENT_DYNAMIC(CClientSocket, CSocket)
CClientSocket::CClientSocket(CAuctionClientDoc* pDoc)
{
m_pDoc = pDoc;
}
void CClientSocket::OnReceive(int nErrorCode)
{
CSocket::OnReceive(nErrorCode);
m_pDoc->ProcessPendingRead();
}
CClientSocket::~CClientSocket()
{
}
// CClientSocket member functions
|
5d05023f1b37bf13a2b6a1d8837e35ab297ed2cf | ba7308ec0c68378e3125c8d2d32113380c6f21fa | /WebDownloaderDlg.cpp | 47e003ec46146cf0cf62aae1b7d629480d7ce7c6 | [
"MIT"
] | permissive | smok95/WebDownloader | 33a0d3ba145c970aaa868040ab24b6e01f827583 | f0212ceab819bc01adc133e601b9ec7e5b7b5b26 | refs/heads/master | 2021-02-07T17:21:13.243056 | 2020-02-29T23:49:54 | 2020-02-29T23:49:54 | 244,056,437 | 0 | 0 | null | null | null | null | UHC | C++ | false | false | 6,388 | cpp | WebDownloaderDlg.cpp | // WebDownloaderDlg.cpp : 구현 파일
//
#include "stdafx.h"
#include "WebDownloader.h"
#include "WebDownloaderDlg.h"
#include ".\webdownloaderdlg.h"
#include "JKDir.h"
#include "urlmon.h"
#pragma comment(lib,"urlmon")
#include <wininet.h>
#include "JKDebug.h"
#include "WDReg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CWebDownloaderDlg 대화 상자
CWebDownloaderDlg::CWebDownloaderDlg(CWnd* pParent /*=NULL*/)
: CDialog(CWebDownloaderDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CWebDownloaderDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_STATIC_ADDRESS, m_cAddress);
DDX_Control(pDX, IDC_PROGRESS, m_progress);
}
BEGIN_MESSAGE_MAP(CWebDownloaderDlg, CDialog)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, OnBnClickedOk)
ON_WM_HELPINFO()
ON_BN_CLICKED(IDC_BTN_OPEN, &CWebDownloaderDlg::OnBnClickedBtnOpen)
END_MESSAGE_MAP()
// CWebDownloaderDlg 메시지 처리기
BOOL CWebDownloaderDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// 이 대화 상자의 아이콘을 설정합니다. 응용 프로그램의 주 창이 대화 상자가 아닐 경우에는
// 프레임워크가 이 작업을 자동으로 수행합니다.
SetIcon(m_hIcon, TRUE); // 큰 아이콘을 설정합니다.
SetIcon(m_hIcon, FALSE); // 작은 아이콘을 설정합니다.
// TODO: 여기에 추가 초기화 작업을 추가합니다.
m_btnStatus = WD_STATUS_STOP;
m_bStopDownload = FALSE;
InitControl();
return TRUE; // 컨트롤에 대한 포커스를 설정하지 않을 경우 TRUE를 반환합니다.
}
// 대화 상자에 최소화 단추를 추가할 경우 아이콘을 그리려면
// 아래 코드가 필요합니다. 문서/뷰 모델을 사용하는 MFC 응용 프로그램의 경우에는
// 프레임워크에서 이 작업을 자동으로 수행합니다.
void CWebDownloaderDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // 그리기를 위한 디바이스 컨텍스트
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
// 클라이언트 사각형에서 아이콘을 가운데에 맞춥니다.
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// 아이콘을 그립니다.
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// 사용자가 최소화된 창을 끄는 동안에 커서가 표시되도록 시스템에서
// 이 함수를 호출합니다.
HCURSOR CWebDownloaderDlg::OnQueryDragIcon(){ return static_cast<HCURSOR>(m_hIcon); }
void CWebDownloaderDlg::OnBnClickedOk()
{
switch(m_btnStatus)
{
case WD_STATUS_DOWNLOAD:
SetButtonStatus(WD_STATUS_STOP);
break;
case WD_STATUS_STOP:
::CreateThread(NULL,0, (LPTHREAD_START_ROUTINE)CWebDownloaderDlg::DownloadThread,this,0,0);
SetButtonStatus(WD_STATUS_DOWNLOAD);
break;
}
}
CString CWebDownloaderDlg::GetDownloadFileUrl(void)
{
CString url;
GetDlgItemText(IDC_EDIT_FILEURL,url);
url.Trim();
const char* protocols[] = {
"http://",
"https://",
"ftp://"
};
for (size_t i = 0; i < _countof(protocols); i++) {
if (strnicmp(protocols[i], url.GetString(), strlen(protocols[i])) == 0) {
return url;
}
}
// 알 수 없는 경우 http:// 붙인다.
CString temp(url.GetBuffer());
url.Format("http://%s", temp.GetBuffer());
return url;
}
void CWebDownloaderDlg::OpenFolder(const char* folderPath)
{
HWND hWnd = ::FindWindow(NULL,WD_DOWNLOAD_DIRECTORY);
if(hWnd)
{
::SetForegroundWindow(hWnd);
::ShowWindow(hWnd, SW_SHOWNORMAL);
}
else
{
if(folderPath)
::ShellExecute(NULL,"explore",folderPath,NULL,NULL,SW_SHOWNORMAL);
}
}
DWORD CWebDownloaderDlg::DownloadThread(void* vp)
{
CWebDownloaderDlg* pWD = (CWebDownloaderDlg*)vp;
CString url;
CWDReg reg;
//CJKHttpDownload m_download;
if(pWD==NULL) goto exit;
url = pWD->GetDownloadFileUrl();
if(url.GetLength() <= 7)
{
pWD->MessageBox("URL을 입력하세요");
goto exit;
}
pWD->m_download.SetDownloadDirectory(reg.GetDownloadFolder());
HWND hPercent;
pWD->GetDlgItem(IDC_STATIC_PERCENT, &hPercent);
pWD->m_download.SetHwndPercentText(hPercent);
HWND hSize;
pWD->GetDlgItem(IDC_STATIC_DN_STATE, &hSize);
pWD->m_download.SetProgressTextWindow(hSize, STATE_SIZE);
HWND hSpeed;
pWD->GetDlgItem(IDC_STATIC_STATE_SPEED, &hSpeed);
pWD->m_download.SetProgressTextWindow(hSpeed, STATE_SPEED);
pWD->m_download.SetCancelFlag(&pWD->m_bStopDownload);
pWD->m_download.SetProgress(&pWD->m_progress);
if(pWD->m_download.Download(url.GetBuffer()) == E_OK)
pWD->OpenFolder(pWD->m_download.GetDownloadDirectory());
else
{
CString result;
result.Format("%s 다운로드 실패",url.GetBuffer());
pWD->MessageBox(result);
}
exit:
pWD->SetButtonStatus(WD_STATUS_STOP);
ExitThread(0);
return 0;
}
void CWebDownloaderDlg::SetButtonStatus(UINT status)
{
m_btnStatus = status;
switch(m_btnStatus)
{
case WD_STATUS_STOP:
{
SetDlgItemText(IDOK, "download");
m_bStopDownload = TRUE;
}
break;
case WD_STATUS_DOWNLOAD:
{
m_progress.ShowWindow(SW_SHOW);
HWND caption;
GetDlgItem(IDC_STATIC_CAPTION_FILE, &caption);
::ShowWindow(caption, SW_SHOW);
CString file;
GetDlgItemText(IDC_EDIT_FILEURL, file);
int index = file.ReverseFind('/');
SetDlgItemText(IDC_STATIC_FILENAME, file.Right(file.GetLength()-index-1));
SetDlgItemText(IDOK, "stop");
m_bStopDownload = FALSE;
}
break;
}
}
void CWebDownloaderDlg::InitControl(void)
{
m_progress.ShowWindow(SW_HIDE);
m_menu.InitMenuMgr(this);
HWND hWnd[1]={0,};
UINT idc[1]={IDC_STATIC_CAPTION_FILE};
for(int i=0; i<1; i++)
{
GetDlgItem(idc[i], &hWnd[i]);
::ShowWindow(hWnd[i], SW_HIDE);
}
}
BOOL CWebDownloaderDlg::OnHelpInfo(HELPINFO* pHelpInfo)
{
return FALSE;
return CDialog::OnHelpInfo(pHelpInfo);
}
BOOL CWebDownloaderDlg::OnCommand(WPARAM wParam, LPARAM lParam)
{
// CWDMenuMgr로 Message를 전달하여 Menu처리를 할 수 있도록 한다.
m_menu.SendMessage(WM_COMMAND, wParam, lParam);
return CDialog::OnCommand(wParam, lParam);
}
void CWebDownloaderDlg::OnBnClickedBtnOpen()
{
CWDReg reg;
ShellExecute(nullptr, "open", reg.GetDownloadFolder(), nullptr, nullptr, SW_SHOWNORMAL);
}
|
3b871a3ce89823863af61f00aa4c4b08268df8e0 | 8fd3b655b2dce3dec782ccc9d1779176758612c0 | /vehiclemaintainpage.cpp | 7c5a185cc45c4feb69aa7d0a4098ba485cd244fd | [] | no_license | isliulin/HHHTL1 | 0f0ce52016f2c0938cef7d99cb6ab8ec04992e53 | 944255c99ee8f9ec6a71574b208da1f6e7d62549 | refs/heads/master | 2022-03-29T09:35:42.153557 | 2018-08-05T13:19:20 | 2018-08-05T13:19:20 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,768 | cpp | vehiclemaintainpage.cpp | #include "vehiclemaintainpage.h"
#include "ui_vehiclemaintainpage.h"
#include "qdebug.h"
VehicleMaintainPage::VehicleMaintainPage(QWidget *parent) :
MyBase(parent),
ui(new Ui::VehicleMaintainPage)
{
ui->setupUi(this);
buttons<<ui->BTN1<<ui->BTN2<<ui->BTN3<<ui->BTN4<<ui->BTN5<<ui->BTN6<<ui->BTN7<<ui->BTN8<<ui->BTN9<<ui->BTNHome
<<ui->BTN_AuxiliarySubsystem<<ui->BTN_BatterySubsystem<<ui->BTN_BogieLampSubsystem<<ui->BTN_BrakeSubsystem
<<ui->BTN_CommunicationStatus<<ui->BTN_DataManage<<ui->BTN_DataMonitor<<ui->BTN_HistoryFault<<ui->BTN_MetroSet
<<ui->BTN_ResetCut<<ui->BTN_RIOMTest<<ui->BTN_SoftwareVersion<<ui->BTN_TimeSet<<ui->BTN_TractSubsystem<<ui->BTN_HMIInitSet;
foreach(QPushButton* button,buttons)
{
connect(button,SIGNAL(pressed()),this,SLOT(NBpressEvent()));
}
}
VehicleMaintainPage::~VehicleMaintainPage()
{
delete ui;
}
void VehicleMaintainPage::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing, true); //消除锯齿效果
//构造painterpath
QPainterPath path;
//司机室1
path.moveTo(75,41);
path.lineTo(101,41);
path.lineTo(101,110);
path.lineTo(75,110);
path.lineTo(70,106);
path.lineTo(70,44);
path.lineTo(75,41);
//司机室2
path.moveTo(939,41);
path.lineTo(965,41);
path.lineTo(970,44);
path.lineTo(970,106);
path.lineTo(965,110);
path.lineTo(939,110);
path.lineTo(939,41);
//path->setFillRule(Qt::WindingFill);
//设置无画笔,避免边框出现一条黑线
painter.setPen(Qt::NoPen);
//设置画刷
painter.setBrush(QBrush(QColor(170,170,170), Qt::SolidPattern));
//绘制背景
painter.drawPath(path);
// event->accept();//不再向父类传递消息
}
void VehicleMaintainPage::NBpressEvent()
{
QString BTNName=((QPushButton*)this->sender())->objectName();
if(BTNName=="BTN1")
{
changePage(uVehicleTrainArea);
}
else if(BTNName=="BTNHome")
{
changePage(uVehicleTrainArea);
}
else if(BTNName=="BTN_TimeSet")
{
changePage(uVehicleMTTimeSetPage);
}
else if(BTNName=="BTN_HistoryFault")
{
changePage(uVehicleMTHistoryFaultPage);
}
else if(BTNName=="BTN_DataManage")
{
changePage(uVehicleMaintainceDataManagePage);
}
else if(BTNName=="BTN_ResetCut")
{
changePage(uVehicleMaintainceResetExcisionPage);
}
else if(BTNName=="BTN_CommunicationStatus")
{
changePage(uVehicleMaintainceCommunicationStatePage);
}
else if(BTNName=="BTN_SoftwareVersion")
{
changePage(uVehicleMaintainceSoftwareVersionPage);
}
else if(BTNName=="BTN_MetroSet")
{
changePage(uVehicleMaintainceWheelDiameterSetPage);
}
else if(BTNName=="BTN_RIOMTest")
{
changePage(uVehicleMaintainceRIOMPage);
}
else if(BTNName=="BTN_DataMonitor")
{
changePage(uVehicleMaintainceAllPortsPage);
}
else if(BTNName=="BTN_TractSubsystem")
{
changePage(uVehicleMaintainceTractSubsystemPage);
}
else if(BTNName=="BTN_BrakeSubsystem")
{
changePage(uVehicleMaintainceBrakeSubsystemPage);
}
else if(BTNName=="BTN_AuxiliarySubsystem")
{
changePage(uVehicleMaintainceAuxiliarySubsystemPage);
}
else if(BTNName=="BTN_BatterySubsystem")
{
changePage(uVehicleMaintainceAccumulatorSubsystemPage);
}
else if(BTNName=="BTN_BogieLampSubsystem")
{
changePage(uVehicleMaintainceRunningGearSubsystemPage);
}
else if(BTNName=="BTN_HMIInitSet")
{
changePage(uVehicleMaintainceInitSetPage);
}
else
{
}
}
|
c6bd8343ec7735c3b3bc5e30809364bc86fc898b | 9ca51d1ee38b5157c11685b348ba58602c837d6a | /ch17/baseFile/binaryFile.cpp | b7bda60ee98b63c2930751ab8e08c696f146be0b | [] | no_license | HLPJay/C-PrimerPlusTest | 54fdc41e809e0bd707bc430b1dca3ade2faee6bc | bd08d23210b1947c7dd24d5ae974df5ec1136b6a | refs/heads/master | 2020-06-29T14:21:34.451932 | 2019-09-19T09:30:32 | 2019-09-19T09:30:32 | 200,559,949 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,975 | cpp | binaryFile.cpp | /*************************
二进制文件和文本文件
使用write()和read()实现,逐个字节进行复制,而不进行转换。
第一个参数强制转为为指向char的指针,第二个参数为长度
//TODO 强制转换为char*
*************************/
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdlib> //exit()
inline void eatline()
{
while(std::cin.get() != '\n')
continue;
}
struct planet
{
char name[20];
double population;
double g;
};
const char* file = "planets.bat";
int main(void)
{
using namespace std;
planet p1;
cout<<fixed<<right;
ifstream fin;
fin.open(file, ios_base::in|ios_base::binary);//打开文件 读取 以二进制
if(fin.is_open())
{
cout<<"Here is contents of the "<<file<<":\n";
while(fin.read((char*)&p1,sizeof(p1)))
{
cout<<setw(20)<<p1.name<<":"
<<setprecision(0)<<setw(12)<<p1.population
<<setprecision(2)<<setw(6)<<p1.g<<endl;
}
fin.close();
}
ofstream fout(file, ios_base::out| ios_base::app| ios_base::binary);//打开文件 输入 以二进制追加
if(!fout.is_open())
{
cerr<<"Can't not open "<<file<<" for output\n";
exit(EXIT_FAILURE);
}
cout<<"Enter planet name (enter a blank to quit): \n";
cin.get(p1.name, 20);
while(p1.name[0]!='\0') //TODO 数组初始化 \0
{
eatline();
cout<<"Enter planet population:";
cin>>p1.population;
cout<<"Enter planet gravity:";
cin>>p1.g;
eatline();
fout.write((char *)&p1, sizeof p1);
cout<<"Enter planet name (enter a blank to quit): \n";
cin.get(p1.name, 20);
}
fout.close();
fin.clear();
fin.open(file, ios_base::in|ios_base::binary);
if(fin.is_open())
{
cout<<"Here is contents of the "<<file<<":\n";
while(fin.read((char*)&p1, sizeof p1)) //TODO 强制类型转换,塞值
{
cout<<setw(20)<<p1.name<<":"
<<setprecision(0)<<setw(12)<<p1.population
<<setprecision(2)<<setw(6)<<p1.g<<endl;
}
fin.close();
}
cout<<"Done \n";
return 0;
} |
eb06a101379f75856db8b19d88eba2cb981393c7 | 6a15b70197d05c1245f8a5572823545712731edb | /lib/InstModel/GenericInstModel/GenericInstModel.cpp | 9bc86f929b90eae26d557600d99ef453eadfcc75 | [] | no_license | ayush-qubit/spatial | a9ddb0574da8f3fd8e74445b703431d93798f9d8 | 48d0d0d307f40b5f58ddaa1c6dfef6d3080c9a90 | refs/heads/master | 2023-05-30T14:33:09.278435 | 2021-06-21T14:19:18 | 2021-06-21T14:19:18 | 340,381,795 | 0 | 0 | null | 2021-06-04T11:05:07 | 2021-02-19T13:45:21 | C++ | UTF-8 | C++ | false | false | 8,792 | cpp | GenericInstModel.cpp | #include "InstModel/GenericInstModel/GenericInstModel.h"
#include "InstInfo/InstInfo.h"
#include "vector"
namespace spatial {
/// extractInstInfo - Returns empty InstInfo for every instruction as it is not
/// support right now
InstInfo GenericInstModel::extractInstInfo(llvm::Instruction *) {
InstInfo II;
return II;
}
/// extractToken - Returns a vector of alias objects derived from
/// Instruction \Inst operands
std::vector<Token *> GenericInstModel::extractToken(llvm::Instruction *Inst) {
if (llvm::StoreInst *SI = llvm::dyn_cast<llvm::StoreInst>(Inst)) {
return extractToken(SI);
} else if (llvm::LoadInst *LI = llvm::dyn_cast<llvm::LoadInst>(Inst)) {
return extractToken(LI);
} else if (llvm::AllocaInst *AI = llvm::dyn_cast<llvm::AllocaInst>(Inst)) {
return extractToken(AI);
} else if (llvm::BitCastInst *BI = llvm::dyn_cast<llvm::BitCastInst>(Inst)) {
return extractToken(BI);
} else if (llvm::ReturnInst *RI = llvm::dyn_cast<llvm::ReturnInst>(Inst)) {
return extractToken(RI);
} else if (llvm::GetElementPtrInst *GEP =
llvm::dyn_cast<llvm::GetElementPtrInst>(Inst)) {
return extractToken(GEP);
} else if (llvm::CallInst *CI = llvm::dyn_cast<llvm::CallInst>(Inst)) {
return extractToken(CI);
} else if(llvm::isa<llvm::PHINode>(Inst)){
return extractPHINodeToken(Inst);
} else {
// Direct support to some instructions may not be useful example
// CallInst, as it is more useful to generate alias object for call
// arguments on the fly
llvm::errs() << "[TODO]: Unsupported Instruction " << *Inst << "\n";
}
return {};
}
/// extractToken - Returns a vector of alias objects derived from
/// Global variable \Global operands
std::vector<Token *>
GenericInstModel::extractToken(llvm::GlobalVariable *Global) {
std::vector<Token *> TokenVec;
if (Global->hasName() && !Global->getName().startswith("_")) {
TokenVec.push_back(this->getTokenWrapper()->getToken(Global));
TokenVec.push_back(this->getTokenWrapper()->getToken(
Global->getName().str() + "-orig", nullptr));
}
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for StoreInst \Inst
/// operands.
std::vector<Token *> GenericInstModel::extractToken(llvm::StoreInst *Inst) {
// The operands are returned in the same order as they are present in the
// instruction example store op1 op2
std::vector<Token *> TokenVec;
TokenVec.push_back(
this->getTokenWrapper()->getToken(Inst->getPointerOperand()));
llvm::Value *ValOp = Inst->getValueOperand();
if(llvm::isa<llvm::ConstantPointerNull>(ValOp)){
std::string s("NULL");
TokenVec.push_back(this->getTokenWrapper()->getToken(s,nullptr));
}
else if(!llvm::isa<llvm::ConstantInt>(ValOp)){
TokenVec.push_back(this->getTokenWrapper()->getToken(ValOp));
}
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for StoreInst \Inst
/// operands.
std::vector<Token *> GenericInstModel::extractToken(llvm::LoadInst *Inst) {
// The operands are returned in the same order as they are present in the
// instruction example x = load op1
std::vector<Token *> TokenVec;
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst));
TokenVec.push_back(
this->getTokenWrapper()->getToken(Inst->getPointerOperand()));
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for AllocaInst \Inst
/// operands.
std::vector<Token *> GenericInstModel::extractToken(llvm::AllocaInst *Inst) {
// The operands are returned in the same order as they are present in the
// instruction example x = alloca op1
std::vector<Token *> TokenVec;
Token *Alloca = this->getTokenWrapper()->getToken(Inst);
TokenVec.push_back(Alloca);
TokenVec.push_back(this->getTokenWrapper()->getToken(
Alloca->getName().str() + "-orig", Inst->getParent()->getParent()));
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for ReturnInst \Inst
/// operands.
std::vector<Token *> GenericInstModel::extractToken(llvm::ReturnInst *Inst) {
// The operands are returned in the same order as they are present in the
// instruction example return op1
std::vector<Token *> TokenVec;
llvm::Value *RetVal = Inst->getReturnValue();
if (RetVal && !llvm::isa<llvm::ConstantInt>(RetVal))
TokenVec.push_back(this->getTokenWrapper()->getToken(RetVal));
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for BitCastInst \Inst
/// operands.
std::vector<Token *> GenericInstModel::extractToken(llvm::BitCastInst *Inst) {
// The operands are returned in the same order as they are present in the
// instruction example x = bitcast op1
std::vector<Token *> TokenVec;
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst));
if (llvm::CallInst *CI =
llvm::dyn_cast<llvm::CallInst>(Inst->getOperand(0))) {
if (CI->getCalledFunction()->getName().startswith("_Zn") ||
CI->getCalledFunction()->getName().startswith("_zn"))
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst->getDestTy()));
} else if (llvm::BitCastInst *BI =
llvm::dyn_cast<llvm::BitCastInst>(Inst->getOperand(0))) {
TokenVec.push_back(this->getTokenWrapper()->getToken(BI->getDestTy()));
}
if (TokenVec.size() == 1) {
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst->getOperand(0)));
}
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for GetElementPointer
/// \Inst operands.
std::vector<Token *>
GenericInstModel::extractToken(llvm::GetElementPtrInst *Inst) {
// Only provides partial support and returns {op1, op2[idx1]} for op1 = GEP
// op2 0 idx1
std::vector<Token *> TokenVec;
llvm::Function *Func = Inst->getParent()->getParent();
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst));
TokenVec.push_back(this->getTokenWrapper()->getToken(
llvm::cast<llvm::GEPOperator>(Inst), Func));
return TokenVec;
}
/// extractToken - Returns a vector of alias objects for Argument \Arg of
/// Function \Func
std::vector<Token *> GenericInstModel::extractToken(llvm::Argument *Arg,
llvm::Function *Func) {
std::vector<Token *> TokenVec;
Token *ArgToken = this->getTokenWrapper()->getToken(Arg);
TokenVec.push_back(ArgToken);
TokenVec.push_back(
this->getTokenWrapper()->getToken(Arg->getName().str() + "-orig", Func));
return TokenVec;
}
/// extractToken - Returns the alias object for variable storing the
/// return value from the function call
std::vector<Token *> GenericInstModel::extractToken(llvm::CallInst *CI) {
std::vector<Token *> TokenVec;
if (!CI->doesNotReturn()) {
TokenVec.push_back(this->getTokenWrapper()->getToken(CI));
}
return TokenVec;
}
/// extractPHINodeToken - Returns the alias objects for PHInode instruction
std::vector<Token *> GenericInstModel::extractPHINodeToken(llvm::Instruction *Inst){
std::vector<Token *> TokenVec;
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst));
if(!llvm::isa<llvm::ConstantInt>(Inst->getOperand(0))){
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst->getOperand(0)));
}
if(!llvm::isa<llvm::ConstantInt>(Inst->getOperand(1))){
TokenVec.push_back(this->getTokenWrapper()->getToken(Inst->getOperand(1)));
}
return TokenVec;
}
/// extractRedirections - Returns the relative level of redirection based of
/// LHS and RHS on the statement
std::vector<int>
GenericInstModel::extractRedirections(llvm::Instruction *Inst) {
std::vector<int> load{1, 2}, store{2, 1}, copy{1, 1}, assign{1, 0}, phiNode{1,1,1};
if (llvm::isa<llvm::AllocaInst>(Inst) ||
llvm::isa<llvm::GetElementPtrInst>(Inst))
return assign;
if (llvm::isa<llvm::StoreInst>(Inst))
return store;
if (llvm::isa<llvm::LoadInst>(Inst))
return load;
if(llvm::isa<llvm::PHINode>(Inst))
return phiNode;
return copy;
}
std::vector<int>
GenericInstModel::extractRedirections(llvm::GlobalVariable *G) {
std::vector<int> load{1, 2}, store{2, 1}, copy{1, 1}, assign{1, 0};
if (llvm::isa<llvm::GlobalVariable>(G))
return assign;
}
/// handleGEPUtil - Returns the extended field value for a GEP
template <typename GEP>
Token *GenericInstModel::handleGEPUtil(GEP *G, Token *Ptr) {
if (!Ptr)
return Ptr;
Token *FieldVal = new Token(Ptr);
FieldVal->setIndex(G);
FieldVal = this->getTokenWrapper()->getToken(FieldVal);
return FieldVal;
}
template Token *GenericInstModel::handleGEPUtil<llvm::GetElementPtrInst>(
llvm::GetElementPtrInst *G, Token *Ptr);
template Token *
GenericInstModel::handleGEPUtil<llvm::GEPOperator>(llvm::GEPOperator *G,
Token *Ptr);
GenericInstModel::~GenericInstModel(){};
} // namespace spatial
|
a411b3544a4b79e7836404d9bf68b0cb8a49629a | 1cf1543cd5460621f530f730a4f3969cfa74197c | /Const.cpp | b274e7a6d9f02238a70702726fc1010ed19eef45 | [] | no_license | derpepe/sysprog | 042048d0c8f30fb26f0fb79a024530f67a852ca9 | 2fa6fb3b7c7f53b3fa8ff6aeb74d8d3e3331ba61 | refs/heads/master | 2021-01-18T14:01:45.742680 | 2010-02-23T22:23:25 | 2010-02-23T22:23:25 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,442 | cpp | Const.cpp | #include "Const.h"
tokenType Const::stateTypeToTokenType(stateType state)
{
tokenType myResult = TOKEN_UNKNOWN;
switch(state)
{
case STATE_IDENTIFIER:
myResult = TOKEN_IDENTIFIER;
break;
case STATE_INTEGER:
myResult = TOKEN_INTEGER;
break;
case STATE_SIGN:
case STATE_SIGN_OPENBRACE:
myResult = TOKEN_SIGN;
break;
case STATE_REAL:
case STATE_REAL_EXTENDED:
myResult = TOKEN_REAL;
break;
case STATE_COMMENT:
myResult = TOKEN_COMMENT;
break;
}
return myResult;
}
std::string Const::tokenTypeAsString(tokenType type)
{
std::string myResult;
switch(type)
{
case TOKEN_ERROR: myResult = "Error"; break;
case TOKEN_IDENTIFIER: myResult = "Identifier"; break;
case TOKEN_INTEGER: myResult = "Integer"; break;
case TOKEN_SIGN: myResult = "Sign"; break;
case TOKEN_REAL: myResult = "Real"; break;
case TOKEN_READ: myResult = "Read"; break;
case TOKEN_WRITE: myResult = "Write"; break;
case TOKEN_COMMENT: myResult = "Comment"; break;
case TOKEN_PLUS: myResult = "Plus"; break;
case TOKEN_MINUS: myResult = "Minus"; break;
case TOKEN_SLASH: myResult = "Slash"; break;
case TOKEN_STAR: myResult = "Star"; break;
case TOKEN_SMALLER: myResult = "Lesser"; break;
case TOKEN_GREATER: myResult = "Greater"; break;
case TOKEN_ASSIGN: myResult = "Assign"; break;
case TOKEN_EXCLAMATIONMARK: myResult = "Exclamation Mark"; break;
case TOKEN_AND: myResult = "And"; break;
case TOKEN_SEMICOLON: myResult = "Semicolon"; break;
case TOKEN_COLON: myResult = "Colon"; break;
case TOKEN_BRACE_OPEN: myResult = "Opening Bracket"; break;
case TOKEN_BRACE_CLOSE: myResult = "Closing Bracket"; break;
case TOKEN_CURLY_BRACE_OPEN: myResult = "Opening Brace"; break;
case TOKEN_CURLY_BRACE_CLOSE: myResult = "Closing Brace"; break;
case TOKEN_SQUARED_BRACKET_OPEN: myResult = "Opening Square Bracket"; break;
case TOKEN_SQUARED_BRACKET_CLOSE: myResult = "Closing Square Bracket"; break;
// Erweiterung aus Aufgabe 2
case TOKEN_IF: myResult = "if"; break;
case TOKEN_ELSE: myResult = "else"; break;
case TOKEN_WHILE: myResult = "while"; break;
case TOKEN_INT: myResult = "int"; break;
case TOKEN_FLOAT: myResult = "float"; break;
//
default: myResult = "UNKNOWN"; break;
}
return myResult;
}
std::string Const::stateTypeAsString(stateType state)
{
std::string myResult;
switch(state)
{
case STATE_UNKNOWN : myResult = "Unknown"; break;
case STATE_ERROR : myResult = "Error"; break;
case STATE_START : myResult = "Start"; break;
case STATE_IDENTIFIER : myResult = "Identifier"; break;
case STATE_INTEGER : myResult = "Integer"; break;
case STATE_SIGN : myResult = "Sign"; break;
case STATE_DOT : myResult = "Dot"; break;
case STATE_REAL : myResult = "Real"; break;
case STATE_REAL_E : myResult = "Real E"; break;
case STATE_REAL_PLUSMINUS : myResult = "Real Plus/Minus"; break;
case STATE_REAL_EXTENDED : myResult = "Real Extended"; break;
case STATE_SIGN_OPENBRACE : myResult = "Sign Openbrace"; break;
case STATE_IN_COMMENT : myResult = "In Comment"; break;
case STATE_ALMOST_COMMENT : myResult = "Almost Comment"; break;
case STATE_COMMENT : myResult = "Comment"; break;
default: myResult = "UNKNOWN"; break;
}
return myResult;
}
|
6e007f0554b41e697cacf472fd1c4de4791b72bf | 5cd36f5e76a7b1b255b6c115a19342211fd7bdf6 | /ckc_abb/tests/test_proj.cpp | 8a8cd384252e4ba120e471b2587a062ca724574a | [] | no_license | avishais/ml_planner | aa9d411a95d0c51638bda141ff2e3a4aba1e1765 | 28671b13c9eac7556662dbef5cb245dd92792c2d | refs/heads/master | 2020-03-08T06:11:03.289576 | 2018-04-03T20:31:46 | 2018-04-03T20:31:46 | 127,964,864 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,573 | cpp | test_proj.cpp | #include "kdl_class.h"
#include "net_proj.h"
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <chrono> // for high_resolution_clock
typedef std::chrono::high_resolution_clock Clock;
#define ROBOTS_DISTANCE 900
#define ROD_LENGTH 300
double fRand(double fMin, double fMax)
{
double f = (double)rand() / RAND_MAX;
return fMin + f * (fMax - fMin);
}
int main() {
int Seed = time(NULL);
srand( Seed );
cout << "Seed in testing: " << Seed << endl;
// KDL
kdl K;
int n = 12;
int N = 1e4;
State q(n), qp_kdl(n);
double kdl_time = 0;
for (int i = 0; i < N; i++) {
for (int j = 0; j < n-1; j++)
q[j] = fRand(-PI, PI);
q[n-1] = fRand(0, 2*PI);
// KDL
auto begin = Clock::now();
bool Ksuc = K.GD(q);
qp_kdl = K.get_GD_result();
kdl_time += std::chrono::duration<double>(Clock::now() - begin).count();
// K.log_q(qp_kdl);
}
net_proj U;
double t = 0;
State z(6, 0);
State zmax = {1., 0.99441636, 0.59342104, 0.6667417, 0.61381936, 0.8222987};
for (int i = 0; i < N; i++) {
for (int j = 0; j < 6; j++)
z[j] = fRand(0, zmax[j]);
auto begin = Clock::now();
U.decoder(z);
t += std::chrono::duration<double>(Clock::now() - begin).count();
}
// q = U.decoder(z);
// K.printVector(q);
// K.log_q(q);
// K.printVector(qp_kdl);
// K.log_q(qp_kdl);
// cin.ignore();
// State qq = U.decoder(U.encoder(qp_kdl));
// K.printVector(qq);
// K.log_q(qq);
cout << "Avg. kdl time: " << kdl_time / N << "sec." << endl;
cout << "Avg. time: " << t / n << "sec." << endl;
}
|
e84fe15d7e20b5659875464e18fa0e9800017fb4 | cb066dbcb76f1ce142c1f5bf439bee57d546bbc0 | /application/slave_main.cpp | 44082c618b7813e37cd6cf57ae0f8530f7c61b58 | [] | no_license | JP-Reddy/distribute_download | 5220b2222a641c524d1c08996821decd0dfdbd3f | e0b78fafdae9ba63d93f2a806d3468eb6f425071 | refs/heads/master | 2020-04-04T10:09:35.772673 | 2018-11-04T04:14:14 | 2018-11-04T04:14:14 | 155,844,478 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 3,786 | cpp | slave_main.cpp | //Socket headers
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
//C++ headers.
#include <string>
#include <iostream>
#include <curl/curl.h>
//C headers.
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <fcntl.h>
#include <signal.h>
using std::cin;
using std::cout;
using std::endl;
void exit_cleanup()
{
int n = sysconf(_SC_OPEN_MAX);
for (int i = 0; i < n; i++)
close(i);
}
int main()
{
atexit(exit_cleanup);
int readfd, connfd_read;
struct sockaddr_in addr_read, client_read;
// Descriptors to send the file back to the master
int writefd, connfd_write;
struct sockaddr_in addr_write, client_write;
socklen_t len;
readfd = socket(AF_INET, SOCK_STREAM, 0);
if (readfd < 0)
{
cout << "[SLAVE] "
<< "socket not created." << endl;
}
addr_read.sin_family = AF_INET;
addr_read.sin_port = htons(9515);
addr_read.sin_addr.s_addr = INADDR_ANY;
bind(readfd, (struct sockaddr *)&addr_read, sizeof(addr_read));
cout << "[SLAVE] "
<< "Bind successfull for reading on 9515\n"
<< endl;
listen(readfd, 5);
//Socket for writing on 9516
writefd = socket(AF_INET, SOCK_STREAM, 0);
if (writefd < 0)
{
cout << "[SLAVE] "
<< "socket created." << endl;
}
addr_write.sin_family = AF_INET;
addr_write.sin_port = htons(9516);
addr_write.sin_addr.s_addr = INADDR_ANY;
bind(writefd, (struct sockaddr *)&addr_write, sizeof(addr_write));
cout << "[SLAVE] "
<< "Bind successfull for write on 9516\n"
<< endl;
listen(writefd, 5);
for (;;)
{
// Accept connection to read on 9515
// cout<<"Accepting connections:"<<endl;
len = sizeof(client_read);
connfd_read = accept(readfd, (struct sockaddr *)&client_read, &len);
cout << "[SLAVE] "
<< "Connection accepted on 9515" << endl;
char *client_ip = new char[20];
inet_ntop(AF_INET, &client_read.sin_addr, client_ip, 20);
// cout<<"client ip:"<<client_ip<<endl;
//Setting the alarm so that if this connection fails, it
//calls the handler which will clean up and restart the program.
// alarm(10);
// Accept connection to write on 9516
len = sizeof(client_write);
int connection_flag = 0;
char *client_ip_temp = new char[20];
// connfd_write=accept(writefd,(struct sockaddr *) &client_write,&len);
// inet_ntop(AF_INET, &client_write.sin_addr, client_ip_temp, 20);
// cout<<"client ip:"<<client_ip_temp<<endl;
while (connection_flag == 0)
{
connfd_write = accept(writefd, (struct sockaddr *)&client_write, &len);
inet_ntop(AF_INET, &client_write.sin_addr, client_ip_temp, 20);
// cout<<"client ip:"<<client_ip_temp<<endl;
if (strcmp(client_ip, client_ip_temp) == 0)
{
connection_flag = 1;
}
else
{
cout << "Multiple connections requested." << endl;
close(connfd_write);
}
}
delete[] client_ip_temp;
cout << "[SLAVE] "
<< "Connection accepted on 9516" << endl;
std::string connfd_read_string = std::to_string(connfd_read);
std::string connfd_write_string = std::to_string(connfd_write);
int pid = fork();
if (pid == 0)
{
execl("./slave", connfd_read_string.c_str(), connfd_write_string.c_str(), client_ip, (char *)0);
}
close(connfd_read);
close(connfd_write);
delete[] client_ip;
}
close(readfd);
close(writefd);
} |
23f7a534b21ec13e100c1ff3fe937b2ff1cf1621 | c2ebaf489c1932ca852925219c4846377ee23dd0 | /cplusplus/exercise6/q2/q2.cpp | 123ceda79d72bdeb0b2e0628253675c478748a06 | [] | no_license | edlym96/misc-projects | 0c97be0b0322dd90ea489004a898593b250ee9a7 | e91a79ce91e9ed7a6575e6b8db8227a498c9f131 | refs/heads/master | 2020-06-19T21:33:41.316396 | 2019-08-08T21:37:46 | 2019-08-08T21:37:46 | 196,881,105 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 864 | cpp | q2.cpp | #include <iostream>
#include <cstring>
using namespace std;
void selection_sort(char a[]);
int minimum_from(char a[], int position);
void swap(char& first, char& second);
const int MAXIMUM_LENGTH=80;
int main(){
char str[MAXIMUM_LENGTH];
cout << "Type in a string" << endl;
cin.getline(str, MAXIMUM_LENGTH);
selection_sort(str);
cout << "Sorted string: ";
cout << str << endl;
}
void selection_sort(char a[])
{
int count=0;
while(a[count] != '\0'){
swap(a[count],a[minimum_from(a,count)]);
count++;
}
}
int minimum_from(char a[], int position)
{
int count = position+1;
int min_index=position;
while(a[count]!='\0'){
if(a[count] < a[min_index]){
min_index=count;
}
count++;
}
return min_index;
}
void swap(char& first, char& second)
{
int temp = first;
first = second;
second = temp;
}
|
ad8dcba831841296257ad1026cd9d454db02c0f7 | 0e8d72cdea3d9ae065414d5061a885f4875594b8 | /CH-6 C++ CLASSES/ex6010.cpp | c044a0b7c14a66b85411730b40e40022ecd2f6c5 | [] | no_license | yeyintlwin/learn-cpp | 7fabe2d1d46a3ad37e1870547cfd5f89e1ebed03 | 0f8201ebe78f7d62073f3a6e3cc8841e2b2d24f2 | refs/heads/master | 2022-06-18T00:10:18.608936 | 2020-05-04T06:55:30 | 2020-05-04T06:55:30 | 245,497,044 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 450 | cpp | ex6010.cpp | // Listing 6.10: Overloaded constructors
#include <iostream>
class Box
{
float height, width, depth;
public:
Box(){};
Box(float h, float w, float d)
{
height = h;
width = w;
depth = d;
}
float calVolume()
{
return height * width * depth;
}
};
int main()
{
Box thisBox(7.5, 8.5, 9.5);
Box otherBox;
otherBox = thisBox;
std::cout << "Volume = " << otherBox.calVolume()
<< std::endl;
return 0;
}
|
5bc47552957cc0ebe85b4d3cfed483f769d85cbe | 15ba4aefaad5ee8d7f1d7bfb3709c289315432f6 | /4.5/盒子与小球之四.cpp | dcd899cde2a52324368041372e9a7116da1efbe9 | [
"MIT"
] | permissive | tangxiangru/NOIP | e48b253e19eca82082dd7d9dfd3d75141930e238 | 6c756df37e5cb6105f5d5eb0fd9b03a4ef8407e4 | refs/heads/master | 2022-03-01T22:55:06.509064 | 2019-09-07T05:11:46 | 2019-09-07T05:11:46 | 194,476,273 | 1 | 1 | null | null | null | null | UTF-8 | C++ | false | false | 884 | cpp | 盒子与小球之四.cpp | #include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <ctime>
#include <stack>
#define siji(i,x,y) for(int i=(x);i<=y;i++)
#define gongzi(j,x,y) for(int j=(x);j>=y;j--)
#define ivory(z,x) for(int z=h[x];z;z=e[z].n)
#define pii pair<int,int>
#define pi acos(-1.0)
#define fi first
#define se second
#define mod 1000007
using namespace std;
typedef long long ll;
int n,m,k;
ll dp[16][16],c[16][16];
int main()
{
//freopen("f1.in","r",stdin);
ios::sync_with_stdio(false);
siji(i,0,15) c[i][0]=1;
siji(i,1,15) siji(j,1,i)
{
c[i][j]=c[i-1][j-1]+c[i-1][j];
}
while(1)
{
cin>>n>>m>>k;
if(!n) break;
if(k*m>n) {cout<<0<<endl;continue;}
memset(dp,0,sizeof(dp));
siji(i,k,n) dp[1][i]=c[n][i];
siji(g,2,m)
siji(j,(g-1)*k,n)
{
siji(z,j+k,n)
{
dp[g][z]+=dp[g-1][j]*max(c[n-j][z-j],(ll)1);
}
}
cout<<dp[m][n]<<endl;
}
return 0;
}
|
1033f93e3605e8dd842590101fbc2ecaa6727f60 | 2a9bb2479249dcc311dc437efdaf365f827e7cb2 | /IfcPlusPlus/src/ifcpp/IFC4X3/include/IfcReinforcedSoilTypeEnum.h | c62e0b3b5249ae9cd684a0bf56b6d57fb9f88894 | [
"MIT"
] | permissive | ifcquery/ifcplusplus | b889ea11bac77e34ef19c4561b24b4ac30389703 | d28b77d85ed45d3da5a674ee3d3ebee88e681717 | refs/heads/master | 2023-08-21T21:23:49.859570 | 2023-08-04T15:37:54 | 2023-08-04T15:37:54 | 33,250,365 | 540 | 240 | MIT | 2023-08-04T14:04:20 | 2015-04-01T13:53:19 | C++ | UTF-8 | C++ | false | false | 1,301 | h | IfcReinforcedSoilTypeEnum.h | /* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#pragma once
#include <vector>
#include <map>
#include <sstream>
#include <string>
#include "ifcpp/model/GlobalDefines.h"
#include "ifcpp/model/BasicTypes.h"
#include "ifcpp/model/BuildingObject.h"
namespace IFC4X3
{
// TYPE IfcReinforcedSoilTypeEnum = ENUMERATION OF (DYNAMICALLYCOMPACTED ,GROUTED ,REPLACED ,ROLLERCOMPACTED ,SURCHARGEPRELOADED ,VERTICALLYDRAINED ,USERDEFINED ,NOTDEFINED);
class IFCQUERY_EXPORT IfcReinforcedSoilTypeEnum : virtual public BuildingObject
{
public:
enum IfcReinforcedSoilTypeEnumEnum
{
ENUM_DYNAMICALLYCOMPACTED,
ENUM_GROUTED,
ENUM_REPLACED,
ENUM_ROLLERCOMPACTED,
ENUM_SURCHARGEPRELOADED,
ENUM_VERTICALLYDRAINED,
ENUM_USERDEFINED,
ENUM_NOTDEFINED
};
IfcReinforcedSoilTypeEnum() = default;
IfcReinforcedSoilTypeEnum( IfcReinforcedSoilTypeEnumEnum e ) { m_enum = e; }
virtual uint32_t classID() const { return 2875026444; }
virtual void getStepParameter( std::stringstream& stream, bool is_select_type, size_t precision ) const;
static shared_ptr<IfcReinforcedSoilTypeEnum> createObjectFromSTEP( const std::string& arg, const std::map<int,shared_ptr<BuildingEntity> >& map, std::stringstream& errorStream );
IfcReinforcedSoilTypeEnumEnum m_enum;
};
}
|
d4d8a91f3526de68d770a7e7b047ec0906abbed6 | a2b0ccdfd1a3f385bc364d7330049a0273415fd7 | /Engine/Engine/src/graphics/animation/AnimationLoader.h | 2f173afe69617b5228a335077bec49b81c465f98 | [] | no_license | TheGreenBridge/bridgeengine | c38d4115fec818aed842a29af48f1860cbfa9502 | fd13d261a9f537a04b8b5a11fb76033ef7ec4708 | refs/heads/master | 2021-01-24T00:15:29.504844 | 2018-02-24T18:18:27 | 2018-02-24T18:18:27 | 122,758,838 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 230 | h | AnimationLoader.h | #pragma once
namespace engine { namespace animation {
// forward declaration
struct AnimationClip;
struct RenderableSkin;
bool loadAnimation(const char* path, AnimationClip *clipStorage, RenderableSkin *mesh);
}}
|
2424e08eb460e217bebb08db01dc96ddfbd97115 | 00bc7da8ebe48a6d01b6305317049376c181acb5 | /Direct2DNet/DWriteNet/DWriteError.cpp | bce8212dac02b66927572c84a61face62500d66a | [
"MIT"
] | permissive | SansyHuman/Direct2DNet | f9f8db13eb47d687b4a777cff75507abf0981fce | 345d981a07fd8cbdf7cf7e6ca9d7b493439dbd17 | refs/heads/master | 2021-07-24T12:04:38.292005 | 2021-04-27T13:27:10 | 2021-04-27T13:27:10 | 247,935,390 | 0 | 0 | MIT | 2021-04-21T19:44:14 | 2020-03-17T10:00:47 | C++ | UTF-8 | C++ | false | false | 24 | cpp | DWriteError.cpp | #include "DWriteError.h" |
8257ed96048e61bb1dcb02bb18837541efc60f5c | 303316f1105ab10d0978bab2731ee8d9ef0f7ee3 | /module04/ex02/TacticalMarine.cpp | be66fd4454aa0795b11f079cd1aa322207e84578 | [] | no_license | AcensJJ/Piscine-CPP | db26bcc710ce916c3313e73f429dc8918b9f60d3 | 773d3614a2eb7bf9f1c3e2f5a31a07e5b1ee4c7e | refs/heads/master | 2021-07-01T08:05:28.824226 | 2021-06-11T23:54:19 | 2021-06-11T23:54:19 | 241,883,493 | 0 | 3 | null | null | null | null | UTF-8 | C++ | false | false | 892 | cpp | TacticalMarine.cpp | #include "TacticalMarine.hpp"
/*
** ------------------------------- CONSTRUCTOR --------------------------------
*/
TacticalMarine::TacticalMarine()
{
std::cout << "Tactical Marine ready for battle!" << std::endl;
}
TacticalMarine::TacticalMarine( const TacticalMarine & src )
{
(void)src;
std::cout << "Tactical Marine ready for battle!" << std::endl;
}
/*
** -------------------------------- DESTRUCTOR --------------------------------
*/
TacticalMarine::~TacticalMarine()
{
std::cout << "Aaargh..." << std::endl;
}
/*
** --------------------------------- OVERLOAD ---------------------------------
*/
TacticalMarine & TacticalMarine::operator=( TacticalMarine const & rhs )
{
(void)rhs;
return *this;
}
/*
** --------------------------------- METHODS ----------------------------------
*/
/* ************************************************************************** */ |
22008f8e60959544cfc84bbb6e51a55380ad7b36 | 39703209f20ad5d630808340b8e8bb9b8483d121 | /selection_sort.cpp | e99a3055eeb0d98b2e37d13ed386240756b432ad | [
"ISC"
] | permissive | chaitanyav/fun_code | 6586f24a51532d4a3675ed696d9a6777d5973f8c | 3e9aa04c050f357ec5389adeb2bda93c929393db | refs/heads/master | 2016-09-06T06:53:06.109068 | 2012-11-12T21:00:26 | 2012-11-12T21:01:00 | 905,560 | 2 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,174 | cpp | selection_sort.cpp | /*
*Copyright 2010, NagaChaitanya Vellanki
*
*Author NagaChaitanya Vellanki
*
* Selection sort , complexity O(n^2)
*/
#include <iostream>
#include <stdint.h>
#include <vector>
#include <algorithm>
using namespace std;
void PrintArray(vector<int32_t> &array)
{
for (int32_t index = 0; index < array.size(); index++)
{
cout << array[index] << " ";
}
cout << endl;
}
void SelectionSort(vector<int32_t> &array) {
int32_t num_elements = array.size();
for (int32_t i = 0; i < num_elements; i++) {
int32_t min = i;
for (int32_t j = i + 1; j < num_elements; j++) {
if(array[j] < array[min]) {
min = j;
}
}
int32_t temp = array[i];
array[i] = array[min];
array[min] = temp;
cout << "Iteration: " << endl;
PrintArray(array);
}
}
int main() {
int32_t n = 0;
int32_t temp = 0;
vector<int32_t> array;
cout << "Enter the number of elements" << endl;
cin >> n;
// read the elements
cout << " ** Enter the elements of the array **" << endl;
for (int32_t index = 0; index < n; index++)
{
cin >> temp;
array.push_back(temp);
}
SelectionSort(array);
return 0;
}
|
74449c3019c3a43dca34e6d8f2cae9258dff80b4 | b88c23a80df02c5214bf62c968a0479d7f2b74f9 | /test/test-600-others/sources/tools/algorithm/tokenizer/list-new/test-tokenizer-list-new-w.cpp | 123957bdee2957ff8b2342cfdbccfcf296a0292f | [
"MIT"
] | permissive | Kartonagnick/tools | 6458cab1754a9d521755781f4301428189780fad | 5e4027d9e734adff375b6d56092ffb80364a0389 | refs/heads/master | 2023-04-28T15:15:42.141295 | 2021-05-16T20:39:09 | 2021-05-16T20:39:15 | 340,688,558 | 0 | 0 | MIT | 2021-03-17T20:34:52 | 2021-02-20T15:35:50 | C++ | UTF-8 | C++ | false | false | 9,842 | cpp | test-tokenizer-list-new-w.cpp |
#include <mygtest/modern.hpp>
//=================================================================================
//=================================================================================
#ifdef TEST_TOOLS_TOKENIZER
#include <tools/features.hpp>
#ifndef dHAS_AGGREGATE_INITIALIZE
dMESSAGE("[test] tools: disabled -> dHAS_AGGREGATE_INITIALIZE")
#else
#define dTEST_COMPONENT tools, algorithm
#define dTEST_METHOD tokenizer
#define dTEST_TAG new_list_wide
#include <tools/algorithm/tokenizer.hpp>
#include <string>
#include <list>
namespace me = ::tools;
//================================================================================
//================================================================================
namespace
{
typedef ::std::wstring str_w;
} //namespace
//================================================================================
//================================================================================
TEST_COMPONENT(000)
{
// простейший (и самый частый) случай
const str_w sepparators = L",;.!: ";
const str_w text
= L"aaabbb! cccddd, fffggg, hhhjjj; yyyuuu : oooppp";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_punct = [&puncts](const wchar_t ch)
{ if(ch != L' ') puncts.emplace_back(ch); };
const std::list<str_w>
etalon_w = { L"aaabbb", L"cccddd", L"fffggg", L"hhhjjj", L"yyyuuu", L"oooppp" };
const std::list<wchar_t>
etalon_p = { L'!', L',', L',', L';', L':' };
me::tokenize(
text.cbegin(),
text.cend(),
sepparators.cbegin(),
sepparators.cend(),
call_words,
call_punct,
true
);
ASSERT_TRUE(words == etalon_w);
ASSERT_TRUE(puncts == etalon_p);
}
TEST_COMPONENT(001)
{
const wchar_t sepparators[] = L",;.!: ";
const wchar_t* text
= L"aaabbb! cccddd, fffggg, hhhjjj; yyyuuu : : oooppp, ";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_puncts = [&puncts](const wchar_t ch)
{ if(ch != L' ') puncts.emplace_back(ch); };
const std::list<str_w>
etalon_w = { L"aaabbb", L"cccddd", L"fffggg", L"hhhjjj", L"yyyuuu", L"oooppp" };
const std::list<wchar_t>
etalon_p = { L'!', L',', L',', L';', L':', L':', L',' };
me::tokenize(
text,
text + std::wcslen(text),
std::begin(sepparators),
std::end(sepparators),
call_words,
call_puncts,
true
);
ASSERT_TRUE( words == etalon_w );
ASSERT_TRUE( puncts == etalon_p );
}
TEST_COMPONENT(002)
{
// trim_empty = false
// в этом режиме,
// если между двумя символами разделителями ничего нет
// то считается, что между ними токен 'пустышка'
// он добавляется в список в виде токена нулевой длины
const wchar_t* sepparators = L",;.!: ";
const str_w text
= L"aaabbb! cccddd, fffggg, hhhjjj;,, yyyuuu : oooppp, ";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_punct = [&puncts](const wchar_t ch)
{ if(ch != L' ') puncts.emplace_back(ch); };
const std::list<str_w> etalon_w =
{
L"aaabbb", L"", L"cccddd", L"" , L"fffggg", L"", L"hhhjjj",
L"" , L"", L"" , L"yyyuuu", L"" , L"", L"oooppp",
L""
};
const std::list<wchar_t>
etalon_p = { L'!', L',', L',', L';', L',', L',', L':', L',' };
me::tokenize(
text.cbegin(),
text.cend(),
sepparators,
sepparators + ::std::wcslen(sepparators),
call_words,
call_punct,
false
);
ASSERT_TRUE(words == etalon_w);
ASSERT_TRUE(puncts == etalon_p);
}
TEST_COMPONENT(003)
{
// trim_empty = false
// в этом режиме,
// если между двумя символами разделителями ничего нет
// то считается, что между ними токен 'пустышка'
// он добавляется в список в виде токена нулевой длины
const wchar_t* sepparators = L",;.!: ";
const str_w text
= L"aaabbb! cccddd, fffggg, hhhjjj;,, yyyuuu : : oooppp,, ";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_punct = [&puncts](const wchar_t ch)
{ if(ch != L' ') puncts.emplace_back(ch); };
const std::list<str_w> etalon_w =
{
L"aaabbb", L"" , L"cccddd", L"" , L"fffggg", L"", L"hhhjjj",
L"" , L"" , L"" , L"yyyuuu", L"" , L"", L"",
L"" , L"oooppp", L"" , L""
};
const std::list<wchar_t>
etalon_p = { L'!', L',', L',', L';', L',', L',', L':', L':', L',', L',' };
me::tokenize(
text.cbegin(),
text.cend(),
sepparators,
sepparators + ::std::wcslen(sepparators),
call_words,
call_punct,
false
);
ASSERT_TRUE(words == etalon_w);
ASSERT_TRUE(puncts == etalon_p);
}
// --- invalid nullptr
TEST_COMPONENT(004)
{
const wchar_t* nill = nullptr;
const wchar_t* b = L"";
const wchar_t* e = L"";
const wchar_t sep[] = L",;.!: ";
const auto words = [](const wchar_t*, size_t){};
const auto puncts = [](const wchar_t){};
(void) nill;
(void) b;
(void) e;
(void) sep;
(void) words;
(void) puncts;
ASSERT_DEATH_DEBUG(
me::tokenize(
nill, e,
std::begin(sep),
std::end(sep),
words,
puncts,
true
)
);
ASSERT_DEATH_DEBUG(
me::tokenize(
b, nill,
std::begin(sep),
std::end(sep),
words,
puncts,
false
)
);
ASSERT_DEATH_DEBUG(
me::tokenize(
nill, nill,
std::begin(sep),
std::end(sep),
words,
puncts,
false
)
);
}
TEST_COMPONENT(005)
{
const wchar_t* nill = nullptr;
const str_w text = L"text";
const wchar_t sep[] = L",;.!: ";
const auto words = [](const wchar_t*, size_t){};
const auto puncts = [](const wchar_t){};
(void) nill;
(void) text;
(void) sep;
(void) words;
(void) puncts;
ASSERT_DEATH_DEBUG(
me::tokenize(
text.cbegin(),
text.cend(),
nill,
std::end(sep),
words,
puncts,
true
)
);
ASSERT_DEATH_DEBUG(
me::tokenize(
text.cbegin(),
text.cend(),
std::begin(sep),
nill,
words,
puncts,
true
)
);
ASSERT_DEATH_DEBUG(
me::tokenize(
text.cbegin(),
text.cend(),
nill,
nill,
words,
puncts,
true
)
);
}
// --- stress
TEST_COMPONENT(006)
{
const str_w sep = L",;.!: ";
const str_w text = L"";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_punct = [&puncts](const wchar_t ch)
{ if(ch!=' ') puncts.emplace_back(ch); };
me::tokenize(
text.cbegin(),
text.cend(),
sep.cbegin(),
sep.cend(),
call_words,
call_punct
);
ASSERT_TRUE(words.empty());
ASSERT_TRUE(puncts.empty());
}
TEST_COMPONENT(007)
{
const str_w sep = L",;.!: ";
const str_w text = L";;";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_punct = [&puncts](const wchar_t ch)
{ if(ch!=' ') puncts.emplace_back(ch); };
const std::list<wchar_t> etalon_p = { L';', L';' };
me::tokenize(
text.cbegin(),
text.cend(),
sep.cbegin(),
sep.cend(),
call_words,
call_punct
);
ASSERT_TRUE(words.empty());
ASSERT_TRUE(puncts == etalon_p);
}
TEST_COMPONENT(008)
{
const str_w sep = L",;.!: ";
const str_w text = L"; ;";
std::list<str_w> words;
std::list<wchar_t> puncts;
const auto call_words = [&words](const wchar_t* p, size_t len)
{ words.emplace_back(p, len); };
const auto call_punct = [&puncts](const wchar_t ch)
{ if(ch != L' ') puncts.emplace_back(ch); };
const std::list<str_w> etalon_w = { L"", L"", L"" };
const std::list<wchar_t> etalon_p = { L';', L';' };
me::tokenize(
text.cbegin(),
text.cend(),
sep.cbegin(),
sep.cend(),
call_words,
call_punct,
false
);
ASSERT_TRUE(words == etalon_w);
ASSERT_TRUE(puncts == etalon_p);
}
//================================================================================
//================================================================================
#endif // !dHAS_AGGREGATE_INITIALIZE
#endif // !TEST_TOOLS_TOKENIZER
|
41cdbacdc987e8562886e222d7ef22516168e4c4 | 78c443fafbe992d2d8b6b8dc3f2d4a346b1f019b | /src/ui/MainWindow.cpp | cff8db81516c9ecd881dc1f819c68e333528acf9 | [] | no_license | seanyangsz/FaceRecognition | 21dbdb0fbf3a8444bc9e13b8f9c3d0468420c5a5 | 6b66e3b65fd3658174b337722fa2d4d31e312d36 | refs/heads/master | 2020-04-06T14:41:42.859410 | 2018-11-14T13:19:02 | 2018-11-14T13:19:02 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,271 | cpp | MainWindow.cpp | #include "ui/MainWindow.h"
#include "ui_MainWindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
// Setup UI
ui->setupUi(this);
// Connect other signals/slots
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()));
connect(ui->actionFullScreen, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)));
connectToCamera();
}
MainWindow::~MainWindow()
{
disconnectCamera();
delete ui;
}
void MainWindow::connectToCamera()
{
// Create CameraView
cameraView = new CameraView(ui->centralWidget);
ui->frameLayout->addWidget(cameraView,0,0);
}
void MainWindow::disconnectCamera()
{
delete cameraView;
}
void MainWindow::showAboutDialog()
{
QString aboutMessage;
QTextStream ts(&aboutMessage);
ts << "<h3>Face Detect and Recognition</h3>"<<
"<p>This is an OpenCV and Qt based face detect and recognition.</p>"<<
"<p>Copyright © 2018 Yang Fenghu</p>";
QMessageBox::about(this, tr("About"), aboutMessage);
}
void MainWindow::setFullScreen(bool input)
{
if(input)
this->showFullScreen();
else
this->showNormal();
}
|
3292d41e7497eb39f3cef31c4e1797bc8df126e7 | cf8ddfc720bf6451c4ef4fa01684327431db1919 | /SDK/ARKSurvivalEvolved_MultiUseUI_classes.hpp | db364648bc7c46de48b4fda8369bd842ee283ad3 | [
"MIT"
] | permissive | git-Charlie/ARK-SDK | 75337684b11e7b9f668da1f15e8054052a3b600f | c38ca9925309516b2093ad8c3a70ed9489e1d573 | refs/heads/master | 2023-06-20T06:30:33.550123 | 2021-07-11T13:41:45 | 2021-07-11T13:41:45 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,083 | hpp | ARKSurvivalEvolved_MultiUseUI_classes.hpp | #pragma once
// ARKSurvivalEvolved (329.9) SDK
#ifdef _MSC_VER
#pragma pack(push, 0x8)
#endif
#include "ARKSurvivalEvolved_MultiUseUI_structs.hpp"
namespace sdk
{
//---------------------------------------------------------------------------
//Classes
//---------------------------------------------------------------------------
// WidgetBlueprintGeneratedClass MultiUseUI.MultiUseUI_C
// 0x0010 (0x0570 - 0x0560)
class UMultiUseUI_C : public UUI_MultiUse
{
public:
class UWidgetAnimation* Close; // 0x0560(0x0008) (BlueprintVisible, ZeroConstructor, IsPlainOldData)
class UWidgetAnimation* Open; // 0x0568(0x0008) (BlueprintVisible, ZeroConstructor, IsPlainOldData)
static UClass* StaticClass()
{
static auto ptr = UObject::FindClass("WidgetBlueprintGeneratedClass MultiUseUI.MultiUseUI_C");
return ptr;
}
void ExecuteUbergraph_MultiUseUI(int EntryPoint);
};
}
#ifdef _MSC_VER
#pragma pack(pop)
#endif
|
a29cecc61b38c3f664e84177f1959ca43278d40a | 2476e036866ebf861e834eb0ddb2a8cd49104285 | /leetcode/leetcode258/add_digit.cpp | 9ae4a140b048c8b6c8b491fdf2a27e907c7bf240 | [] | no_license | xchmwang/algorithm | 7deaedecb58e3925cc23239020553ffed8cc3f04 | 55345160b6d8ef02bc89e01247b4dbd1bc094d5e | refs/heads/master | 2021-09-17T23:54:40.785962 | 2018-07-07T06:40:27 | 2018-07-07T06:40:27 | null | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 465 | cpp | add_digit.cpp | #include <iostream>
using namespace std;
class Solution {
public:
int addDigits(int num) {
while (num > 9) {
int digit_sum = 0;
while (num) {
digit_sum += num%10;
num /= 10;
}
num = digit_sum;
}
return num;
}
};
int main() {
Solution sol;
while (true) {
int n; cin >> n;
cout << sol.addDigits(n) << endl;
}
return 0;
}
|
510a8feb576289cd0c4966216082ef3a4090876a | f4118e47a6dc256f7525fe2fbda41e8e0ce447b5 | /Bin/tools/publish-tool_pro/source/lua_function/LuaFunction.cpp | 935f02ea17f0b8b32993a3fe134bf9c7d692c485 | [] | no_license | tkzcfc/ed_imgui | 066668dd0a1f567c056b9f926288ed639b86033a | 609e6b0aa570635816b94b57229cc4bb76f44114 | refs/heads/master | 2023-06-07T22:27:40.136889 | 2023-05-30T10:44:11 | 2023-05-30T10:44:11 | 221,164,955 | 6 | 2 | null | null | null | null | UTF-8 | C++ | false | false | 6,296 | cpp | LuaFunction.cpp | #include "LuaFunction.h"
#include <assert.h>
LuaRef::LuaRef()
: L(nullptr)
, m_ref(LUA_NOREF)
{
}
LuaRef::LuaRef(lua_State* aL, int index)
: L(aL)
, m_ref(LUA_NOREF)
{
lua_pushvalue(L, index);
m_ref = luaL_ref(L, LUA_REGISTRYINDEX);
}
LuaRef::~LuaRef()
{
unref();
}
LuaRef::LuaRef(const LuaRef& other)
: L(nullptr)
, m_ref(LUA_NOREF)
{
*this = other;
}
LuaRef& LuaRef::operator=(const LuaRef& rhs)
{
if (this != &rhs)
{
rhs.push();
reset(rhs.L, -1);
lua_pop(L, 1);
}
return *this;
}
LuaRef::LuaRef(LuaRef&& other)
: L(nullptr)
, m_ref(LUA_NOREF)
{
*this = std::move(other);
}
LuaRef& LuaRef::operator=(LuaRef&& rhs)
{
if (this != &rhs)
{
unref();
L = rhs.L;
m_ref = rhs.m_ref;
rhs.L = nullptr;
rhs.m_ref = LUA_NOREF;
}
return *this;
}
LuaRef::operator bool() const
{
return m_ref != LUA_NOREF;
}
void LuaRef::reset(lua_State* aL, int index)
{
unref();
if (aL != nullptr)
{
L = aL;
lua_pushvalue(L, index);
m_ref = luaL_ref(L, LUA_REGISTRYINDEX);
}
}
void LuaRef::push() const
{
lua_rawgeti(L, LUA_REGISTRYINDEX, m_ref);
}
void LuaRef::unref() const
{
if (L && m_ref != LUA_NOREF && m_ref != LUA_REFNIL)
{
luaL_unref(L, LUA_REGISTRYINDEX, m_ref);
}
}
LuaFunction::LuaFunction()
: LuaRef()
, m_trackback(0)
, m_isValid(true)
{
}
LuaFunction::LuaFunction(lua_State* aL, int index, int)
: LuaRef(aL, index)
, m_trackback(0)
, m_isValid(true)
{
luaL_checktype(aL, index, LUA_TFUNCTION);
}
LuaFunction::LuaFunction(const LuaFunction& other)
: LuaRef()
, m_isValid(true)
{
*this = other;
}
LuaFunction& LuaFunction::operator=(const LuaFunction& rhs)
{
if (this != &rhs)
{
rhs.push();
luaL_checktype(rhs.L, -1, LUA_TFUNCTION);
reset(rhs.L, -1);
lua_pop(L, 1);
m_isValid = rhs.m_isValid;
}
return *this;
}
LuaFunction::LuaFunction(LuaFunction&& other)
: LuaRef()
, m_isValid(true)
{
*this = std::move(other);
}
LuaFunction::~LuaFunction()
{
clear_ret();
}
LuaFunction& LuaFunction::operator=(LuaFunction&& rhs)
{
if (this != &rhs)
{
unref();
L = rhs.L;
m_ref = rhs.m_ref;
rhs.L = nullptr;
rhs.m_ref = LUA_NOREF;
m_isValid = rhs.m_isValid;
}
return *this;
}
void LuaFunction::operator()()
{
ppush();
pcall();
}
void LuaFunction::ppush()
{
lua_getglobal(L, "__G__TRACKBACK__");
m_trackback = lua_gettop(L);
push();
luaL_checktype(L, -1, LUA_TFUNCTION);
}
void LuaFunction::pcall(int nresults/* = 0*/)
{
assert(nresults <= MAX_RET_ARGS_COUNT);
clear_ret();
int argc = lua_gettop(L) - m_trackback - 1;
int r = lua_pcall(L, argc, nresults, m_trackback);
m_retCount = nresults;
if (r == 0 && nresults > 0)
{
int index = 0;
for (int i = -nresults; i < 0; ++i)
{
int type = lua_type(L, i);
switch (type)
{
case LUA_TNIL:
{
m_retValues[index].type = type;
}break;
case LUA_TBOOLEAN:
{
m_retValues[index].type = type;
m_retValues[index].value.boolValue = (bool)lua_toboolean(L, i);
}break;
case LUA_TLIGHTUSERDATA:
{
m_retValues[index].type = type;
m_retValues[index].value.userdata = *((void**)lua_touserdata(L, i));
}break;
case LUA_TNUMBER:
{
m_retValues[index].type = type;
m_retValues[index].value.numberValue = lua_tonumber(L, i);
}break;
case LUA_TSTRING:
{
m_retValues[index].type = type;
m_retValues[index].value.stringValue = new std::string(lua_tostring(L, i));
}break;
case LUA_TUSERDATA:
{
m_retValues[index].type = type;
m_retValues[index].value.userdata = *((void**)lua_touserdata(L, i));
}break;
default:
assert(0);
break;
}
index++;
}
}
// remove trackback and any thing above it.
lua_settop(L, m_trackback - 1);
}
void LuaFunction::pusharg(bool v)
{
lua_pushboolean(L, v);
}
void LuaFunction::pusharg(float v)
{
lua_pushnumber(L, v);
}
void LuaFunction::pusharg(double v)
{
lua_pushnumber(L, v);
}
void LuaFunction::pusharg(int v)
{
lua_pushinteger(L, v);
}
void LuaFunction::pusharg(unsigned int v)
{
lua_pushinteger(L, v);
}
void LuaFunction::pusharg(const std::string& v)
{
lua_pushlstring(L, v.data(), v.size());
}
void LuaFunction::pusharg(const char* v)
{
lua_pushstring(L, v);
}
void LuaFunction::pushlstring(const char* v, unsigned int len)
{
lua_pushlstring(L, v, len);
}
void LuaFunction::pushusertype(void* v, const char* type)
{
tolua_pushusertype(L, (void*)v, type);
}
void LuaFunction::clear_ret()
{
for (int i = 0; i < MAX_RET_ARGS_COUNT; ++i)
{
if (m_retValues[i].type == LUA_TSTRING)
{
delete m_retValues[i].value.stringValue;
}
m_retValues[i].type = LUA_TNONE;
}
m_retCount = 0;
}
bool LuaFunction::retbool(int index/* = 0*/, bool defaultvalue/* = false*/)
{
assert(index < MAX_RET_ARGS_COUNT && index >= 0);
if (index >= m_retCount)
{
return defaultvalue;
}
if (m_retValues[index].type == LUA_TBOOLEAN)
{
return m_retValues[index].value.boolValue;
}
if (m_retValues[index].type == LUA_TNIL)
{
return false;
}
return defaultvalue;
}
int LuaFunction::retint(int index/* = 0*/, int defaultvalue/* = 0*/)
{
assert(index < MAX_RET_ARGS_COUNT && index >= 0);
if (index >= m_retCount)
{
return defaultvalue;
}
if (m_retValues[index].type == LUA_TNUMBER)
{
return m_retValues[index].value.numberValue;
}
return defaultvalue;
}
std::string LuaFunction::retstring(int index/* = 0*/, const std::string& defaultvalue/* = ""*/)
{
assert(index < MAX_RET_ARGS_COUNT && index >= 0);
if (index >= m_retCount)
{
return defaultvalue;
}
if (m_retValues[index].type == LUA_TSTRING)
{
return *m_retValues[index].value.stringValue;
}
return defaultvalue;
}
void* LuaFunction::retuserdata(int index/* = 0*/)
{
assert(index < MAX_RET_ARGS_COUNT && index >= 0);
if (index >= m_retCount)
{
return NULL;
}
if (m_retValues[index].type == LUA_TUSERDATA)
{
return m_retValues[index].value.userdata;
}
return NULL;
}
void* LuaFunction::retlightuserdata(int index/* = 0*/)
{
assert(index < MAX_RET_ARGS_COUNT && index >= 0);
if (index >= m_retCount)
{
return NULL;
}
if (m_retValues[index].type == LUA_TLIGHTUSERDATA)
{
return m_retValues[index].value.userdata;
}
return NULL;
}
int LuaFunction::checktype(int index/* = 0*/)
{
assert(index < MAX_RET_ARGS_COUNT && index >= 0);
return m_retValues[index].type;
} |
939e23e3a34422e390efe1f18e26f3a93d00f5ce | 6a2bf8b17e5856fa288b6f788019d8f508a38fb7 | /0200/0269/B/Solution.cpp | 19d7a802c42fc2d8611a0e2ab36ee5ed4e184d3c | [] | no_license | apluscs/Codeforces | a708951dc410e85d201d44b9e55a415f8bf4f280 | 38646599e7f7912d2ebe3853a6693407ea5f36b7 | refs/heads/master | 2021-06-11T19:59:13.147940 | 2021-04-15T01:33:16 | 2021-04-15T01:33:16 | 171,361,624 | 1 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 1,018 | cpp | Solution.cpp | #include <assert.h>
#include <math.h>
#include <algorithm>
#include <climits>
#include <functional>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
int n, m;
vector<int> nums;
struct Solution {
void solve() {
vector<int> res;
res.reserve(n);
res.push_back(nums[0]);
for (int i = 1; i != n; ++i) {
if (nums[i] >= res.back())
res.push_back(nums[i]);
else {
int j = upper_bound(res.begin(), res.end(), nums[i]) -
res.begin(); // leave the ones == nums[i] be
res[j] = nums[i];
}
}
cout << n - res.size() << endl;
}
};
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int T = 1;
while (T--) {
cin >> n >> m;
nums.resize(n);
for (int i = 0; i != n; ++i) {
double x;
cin >> nums[i] >> x;
}
Solution test;
test.solve();
}
}
|
af3515a55828b1ab07a1f4e5d5f7a4498270b0d9 | 4c9e16e6b2f1a2a0e1f8cf29e6c6128fb1706a42 | /MontyRaspberryPI/hardware/stepper.cpp | 6b74cd7b4d48e81837c0120f29eda299c5b0a3bd | [] | no_license | travelhawk/MontyNotPython | 21ffcfa83427db9c2a9444a7e50d4b9942e85a09 | cfe241e09f1bcf63ce37aab998d4b9982c7cdefe | refs/heads/master | 2020-05-29T12:28:32.455072 | 2020-03-01T18:27:34 | 2020-03-01T18:27:34 | 27,126,859 | 0 | 0 | null | null | null | null | UTF-8 | C++ | false | false | 4,280 | cpp | stepper.cpp | ///g++ -Wall -o stepper stepper.cpp
#include "stepper.h"
#include "util/gpio.h"
#include <QThread>
#include <unistd.h>
#include <QDebug>
const int Stepper::TIME_TO_WAIT = 10;
/**
* @brief create a new stepper instance
* @details init the pins
*/
Stepper::Stepper(int pin1, int pin2,int pin3, int pin4){
counter=0;
active=false;
gpios.push_back(pin1);
gpios.push_back(pin2);
gpios.push_back(pin3);
gpios.push_back(pin4);
pinMode(pin1, OUTPUT);
pinMode(pin2, OUTPUT);
pinMode(pin3, OUTPUT);
pinMode(pin4, OUTPUT);
digitalWrite(pin1, LOW);
digitalWrite(pin2, LOW);
digitalWrite(pin3, LOW);
digitalWrite(pin4, LOW);
thread = new QThread();
this->moveToThread(thread);
connect(this, SIGNAL(finished()), thread, SLOT(quit()));
}
/**
* @brief step clockwise
* @param steps 100 steps == 10 degree?
*/
void Stepper::clockwise(int steps){
if(thread->isRunning()){
//TODO freezing program
//thread->terminate();
qDebug()<<"thread already running";
}
//thread->wait();
this->steps = steps;
//thread = new QThread();
this->moveToThread(thread);
connect(thread,SIGNAL(started()),this,SLOT(clockwise()));
thread->start();
}
/**
* @brief steps counterclockwise
* @param steps 100 steps == 10 degree?
*/
void Stepper::counterclockwise(int steps){
if(thread->isRunning()){
qDebug()<<"thread already running";
}
this->steps = steps;
connect(thread,SIGNAL(started()),this,SLOT(counterclockwise()));
thread->start();
}
bool Stepper::isActive()
{
return active;
}
/**
* @brief wait for thread
* @return thread is terminated
*/
bool Stepper::join()
{
return thread->wait();
}
/**
* @brief stopping the stepper
*/
void Stepper::stop()
{
thread->terminate();
}
void Stepper::sequence1()
{
digitalWrite(gpios.at(3), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(3), LOW);
}
void Stepper::sequence2()
{
digitalWrite(gpios.at(3), HIGH);
digitalWrite(gpios.at(2), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(3), LOW);
digitalWrite(gpios.at(2), LOW);
}
void Stepper::sequence3()
{
digitalWrite(gpios.at(2), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(2), LOW);
}
void Stepper::sequence4()
{
digitalWrite(gpios.at(1), HIGH);
digitalWrite(gpios.at(2), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(1), LOW);
digitalWrite(gpios.at(2), LOW);
}
void Stepper::sequence5()
{
digitalWrite(gpios.at(1), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(1), LOW);
}
void Stepper::sequence6()
{
digitalWrite(gpios.at(0), HIGH);
digitalWrite(gpios.at(1), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(0), LOW);
digitalWrite(gpios.at(1), LOW);
}
void Stepper::sequence7()
{
digitalWrite(gpios.at(0), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(0), LOW);
}
void Stepper::sequence8()
{
digitalWrite(gpios.at(3), HIGH);
digitalWrite(gpios.at(0), HIGH);
delay(TIME_TO_WAIT);
digitalWrite(gpios.at(3), LOW);
digitalWrite(gpios.at(0), LOW);
}
/**
* @brief clockwise, called by thread
*/
void Stepper::clockwise()
{
switchActiveState();
for(int counter=0; counter<steps; counter++){
sequence1();
sequence2();
sequence3();
sequence4();
sequence5();
sequence6();
sequence7();
sequence8();
}
disconnect(thread,SIGNAL(started()),this,SLOT(clockwise()));
qDebug()<<"end cw of stepper "<<gpios.at(0);
emit finished();
switchActiveState();
}
/**
* @brief called by thread
*/
void Stepper::counterclockwise()
{
switchActiveState();
for(int counter=0; counter<steps; counter++){
sequence8();
sequence7();
sequence6();
sequence5();
sequence4();
sequence3();
sequence2();
sequence1();
//cout << counter<<"\n";
}
disconnect(thread,SIGNAL(started()),this,SLOT(counterclockwise()));
qDebug()<<"end ccw of stepper "<<gpios.at(0);
emit finished();
switchActiveState();
}
void Stepper::switchActiveState()
{
qDebug()<<"change active state of servo"<<gpios.at(0);
this->active = !active;
}
|
ce15bfb82750c920aa1f9092a9033fd72579dd35 | 0e53a42e9bc27b8353a04b4121d63dc61b615ec8 | /src/ExtensionsCommon/ProfilerHostServices.h | 9c6656cfb65ce7c6b737355d10f1c067659cfe4e | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | microsoft/CLRInstrumentationEngine | 2b899b981323e7c96a3a7b50f370314370d78a3c | 8f085c2c18d82577c94e2425bd58f0e301603e3a | refs/heads/main | 2023-08-26T07:38:19.043373 | 2023-04-20T16:44:34 | 2023-04-20T16:44:34 | 144,217,162 | 86 | 49 | NOASSERTION | 2023-09-06T11:36:07 | 2018-08-10T00:31:22 | C++ | UTF-8 | C++ | false | false | 2,274 | h | ProfilerHostServices.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "InstrumentationEngineInfraPointerDefs.h"
#include "AgentValidation.h"
#include "Exception.h"
class CProfilerHostServices
{
CProfilerHostServices(const CProfilerHostServices&) = delete;
public:
virtual ~CProfilerHostServices()
{
//_ASSERT(m_sptrLogger != nullptr);
}
template<
typename T,
typename... Args
>
HRESULT Create(_Out_ T** ppResult, Args&&... args)
{
IfTrueRet(nullptr == ppResult, E_INVALIDARG);
try
{
*ppResult = new T(std::forward<Args>(args)...);
}
catch (const Agent::Diagnostics::CException& exc)
{
return exc.GetCode();
}
IfTrueRet(nullptr == *ppResult, E_OUTOFMEMORY);
return S_OK;
}
template<
typename TPointer,
typename... Args
>
HRESULT Create(_Out_ TPointer& spResult, Args&&... args)
{
TPointer::element_type* pResult = nullptr;
IfFailRet(Create(&pResult, std::forward<Args>(args)...));
spResult.reset(pResult);
IfTrueRet(nullptr == spResult, E_OUTOFMEMORY);
return S_OK;
}
virtual HRESULT BuildUpMembers()
{
return S_OK;
};
template<typename T> HRESULT BuildUpObjPtr(T& spObject)
{
spObject->SetLogger(m_sptrLogger);
return spObject->BuildUpMembers();
}
template<typename T> HRESULT BuildUpObjRef(T& obj)
{
obj.SetLogger(m_sptrLogger);
return obj.BuildUpMembers();
}
template<
typename TPointer,
typename... Args
>
HRESULT CreateAndBuildUp(_Out_ TPointer& spResult, Args&&... args)
{
IfFailRet(Create(spResult, std::forward<Args>(args)...));
IfFailRet(BuildUpObjPtr(spResult));
return S_OK;
}
protected:
CProfilerHostServices() noexcept {}
void SetLogger(const IProfilerManagerLoggingSptr& spLogger)
{
//_ASSERT(spLogger != nullptr);
m_sptrLogger = spLogger;
}
const IProfilerManagerLoggingSptr& GetLogger() const
{
return m_sptrLogger;
}
private:
IProfilerManagerLoggingSptr m_sptrLogger;
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.